chrome-devtools-frontend 1.0.1587905 → 1.0.1589336
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/docs/ui_engineering.md +2 -2
- package/front_end/core/common/AppProvider.ts +1 -2
- package/front_end/core/common/Color.ts +19 -20
- package/front_end/core/common/ParsedURL.ts +3 -3
- package/front_end/core/common/Progress.ts +5 -5
- package/front_end/core/common/Settings.ts +2 -2
- package/front_end/core/dom_extension/DOMExtension.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostStub.ts +1 -11
- package/front_end/core/host/UserMetrics.ts +1 -1
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +2 -2
- package/front_end/core/sdk/CSSMatchedStyles.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +38 -0
- package/front_end/core/sdk/CSSRule.ts +4 -9
- package/front_end/core/sdk/ChildTargetManager.ts +1 -1
- package/front_end/core/sdk/CookieModel.ts +0 -1
- package/front_end/core/sdk/DOMModel.ts +42 -6
- package/front_end/core/sdk/EmulationModel.ts +3 -3
- package/front_end/core/sdk/NetworkRequest.ts +1 -1
- package/front_end/core/sdk/PageResourceLoader.ts +11 -6
- package/front_end/core/sdk/PerformanceMetricsModel.ts +2 -2
- package/front_end/core/sdk/PreloadingModel.ts +15 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +2 -6
- package/front_end/core/sdk/SourceMap.ts +2 -3
- package/front_end/core/sdk/SourceMapManager.ts +1 -2
- package/front_end/entrypoint_template.html +1 -1
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +6 -16
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +4 -2
- package/front_end/entrypoints/main/main-meta.ts +0 -3
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +6 -4
- package/front_end/generated/SupportedCSSProperties.js +46 -0
- package/front_end/generated/protocol-mapping.d.ts +4 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +50 -0
- package/front_end/models/ai_assistance/AiConversation.ts +20 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +7 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +28 -26
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +3 -5
- package/front_end/models/computed_style/ComputedStyleModel.ts +2 -1
- package/front_end/models/emulation/DeviceModeModel.ts +0 -3
- package/front_end/models/emulation/EmulatedDevices.ts +0 -2
- package/front_end/models/extensions/ExtensionAPI.ts +2 -2
- package/front_end/models/har/Importer.ts +0 -1
- package/front_end/models/har/Log.ts +2 -11
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -21
- package/front_end/models/logs/NetworkLog.ts +0 -2
- package/front_end/models/network_time_calculator/NetworkTimeCalculator.ts +4 -1
- package/front_end/models/text_utils/TextUtils.ts +0 -9
- package/front_end/models/trace/LanternComputationData.ts +1 -6
- package/front_end/models/trace/helpers/Trace.ts +1 -4
- package/front_end/models/trace/lantern/types/Lantern.ts +6 -6
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +7 -6
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +15 -26
- package/front_end/panels/application/BackgroundServiceView.ts +0 -2
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +0 -1
- package/front_end/panels/application/IndexedDBViews.ts +19 -23
- package/front_end/panels/application/OriginTrialTreeView.ts +3 -3
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/preloading/PreloadingView.ts +18 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.css +12 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +3 -3
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +3 -4
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +76 -19
- package/front_end/panels/common/aiCodeGenerationTeaser.css +11 -0
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +4 -0
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -3
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +32 -32
- package/front_end/panels/elements/ElementsPanel.ts +12 -4
- package/front_end/panels/elements/ElementsTreeElement.ts +9 -1
- package/front_end/panels/elements/ImagePreviewPopover.ts +0 -2
- package/front_end/panels/elements/MarkerDecorator.ts +0 -2
- package/front_end/panels/elements/PropertiesWidget.ts +62 -61
- package/front_end/panels/elements/StylePropertiesSection.ts +32 -3
- package/front_end/panels/elements/StylePropertyTreeElement.ts +15 -20
- package/front_end/panels/elements/StylesSidebarPane.ts +25 -90
- package/front_end/panels/elements/elementsPanel.css +6 -2
- package/front_end/panels/emulation/emulation-meta.ts +0 -2
- package/front_end/panels/event_listeners/EventListenersUtils.ts +0 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +0 -5
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -3
- package/front_end/panels/media/EventDisplayTable.ts +0 -2
- package/front_end/panels/media/PlayerMessagesView.ts +4 -6
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +18 -6
- package/front_end/panels/network/EventSourceMessagesView.ts +0 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +0 -2
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +3 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +113 -128
- package/front_end/panels/network/RequestInitiatorView.ts +74 -69
- package/front_end/panels/network/RequestPayloadView.ts +6 -3
- package/front_end/panels/network/ResourceChunkView.ts +0 -2
- package/front_end/panels/network/components/ResponseHeaderSection.ts +3 -1
- package/front_end/panels/network/network-meta.ts +0 -2
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -9
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -2
- package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -12
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +14 -1
- package/front_end/panels/profiler/ProfileView.ts +0 -35
- package/front_end/panels/profiler/profiler-meta.ts +0 -1
- package/front_end/panels/recorder/components/StepView.ts +0 -1
- package/front_end/panels/screencast/ScreencastView.ts +2 -2
- package/front_end/panels/search/SearchResultsPane.ts +3 -2
- package/front_end/panels/security/SecurityPanel.ts +0 -1
- package/front_end/panels/sensors/LocationsSettingsTab.ts +27 -9
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -2
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +2 -2
- package/front_end/panels/settings/emulation/utils/UserAgentMetadata.ts +1 -1
- package/front_end/panels/settings/settings-meta.ts +0 -3
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +6 -0
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -5
- package/front_end/panels/sources/sources-meta.ts +0 -9
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +1 -1
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +5 -2
- package/front_end/panels/timeline/TimelinePanel.ts +0 -7
- package/front_end/panels/timeline/TimelineTreeView.ts +8 -10
- package/front_end/panels/timeline/TimelineUIUtils.ts +11 -3
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +0 -1
- package/front_end/panels/timeline/utils/Treemap.ts +0 -4
- package/front_end/panels/whats_new/whats_new-meta.ts +0 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/highlighting/HighlightManager.ts +1 -2
- package/front_end/ui/components/highlighting/MarkupHighlight.ts +1 -12
- package/front_end/ui/components/icon_button/IconButton.ts +2 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +6 -6
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +4 -0
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +11 -6
- package/front_end/ui/legacy/ContextMenu.ts +1 -17
- package/front_end/ui/legacy/EmptyWidget.ts +4 -4
- package/front_end/ui/legacy/Fragment.ts +2 -4
- package/front_end/ui/legacy/SoftContextMenu.ts +1 -15
- package/front_end/ui/legacy/TabbedPane.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +16 -9
- package/front_end/ui/legacy/UIUtils.ts +1 -4
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +6 -3
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +32 -28
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +31 -6
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +0 -2
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +0 -1
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +0 -2
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +3 -2
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +3 -3
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as Host from '../../core/host/host.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import * as AiCodeCompletion from '../../models/ai_code_completion/ai_code_completion.js';
|
|
8
|
+
import * as AiCodeGeneration from '../../models/ai_code_generation/ai_code_generation.js';
|
|
8
9
|
import type * as Workspace from '../../models/workspace/workspace.js';
|
|
9
10
|
import type * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
|
|
10
11
|
import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
@@ -46,6 +47,11 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
46
47
|
undefined,
|
|
47
48
|
inferenceLanguage: this.#getInferenceLanguage()
|
|
48
49
|
},
|
|
50
|
+
generationContext: {
|
|
51
|
+
additionalPreambleContext: this.uiSourceCode.url().startsWith('snippet://') ?
|
|
52
|
+
AiCodeGeneration.AiCodeGeneration.additionalContextForConsole :
|
|
53
|
+
undefined,
|
|
54
|
+
},
|
|
49
55
|
onFeatureEnabled: () => {
|
|
50
56
|
this.#setupAiCodeCompletion();
|
|
51
57
|
},
|
|
@@ -163,7 +163,7 @@ class ColorSwatchWidget extends CodeMirror.WidgetType {
|
|
|
163
163
|
|
|
164
164
|
toDOM(view: CodeMirror.EditorView): HTMLElement {
|
|
165
165
|
const swatch = new InlineEditor.ColorSwatch.ColorSwatch(i18nString(UIStrings.openColorPicker));
|
|
166
|
-
swatch.
|
|
166
|
+
swatch.renderColor(this.#color);
|
|
167
167
|
const value = swatch.createChild('span');
|
|
168
168
|
value.textContent = this.#text;
|
|
169
169
|
value.setAttribute('hidden', 'true');
|
|
@@ -212,7 +212,7 @@ export class DebuggerPlugin extends Plugin {
|
|
|
212
212
|
// locations, so breakpoint manipulation is permanently disabled.
|
|
213
213
|
private initializedMuted: boolean;
|
|
214
214
|
private ignoreListInfobar: UI.Infobar.Infobar|null;
|
|
215
|
-
private refreshBreakpointsTimeout
|
|
215
|
+
private refreshBreakpointsTimeout?: number;
|
|
216
216
|
private activeBreakpointDialog: BreakpointEditDialog|null = null;
|
|
217
217
|
#activeBreakpointEditRequest?: BreakpointEditRequest = undefined;
|
|
218
218
|
#scheduledFinishingActiveDialog = false;
|
|
@@ -719,10 +719,6 @@ export class DebuggerPlugin extends Plugin {
|
|
|
719
719
|
returnByValue: false,
|
|
720
720
|
generatePreview: false,
|
|
721
721
|
throwOnSideEffect,
|
|
722
|
-
timeout: undefined,
|
|
723
|
-
disableBreaks: undefined,
|
|
724
|
-
replMode: undefined,
|
|
725
|
-
allowUnsafeEvalBlockedByCSP: undefined,
|
|
726
722
|
});
|
|
727
723
|
if (!result || 'error' in result || !result.object ||
|
|
728
724
|
(result.object.type === 'object' && result.object.subtype === 'error')) {
|
|
@@ -1848,7 +1848,6 @@ UI.ContextMenu.registerProvider({
|
|
|
1848
1848
|
const Sources = await loadSourcesModule();
|
|
1849
1849
|
return Sources.SourcesPanel.SourcesPanel.instance();
|
|
1850
1850
|
},
|
|
1851
|
-
experiment: undefined,
|
|
1852
1851
|
});
|
|
1853
1852
|
|
|
1854
1853
|
UI.ContextMenu.registerProvider({
|
|
@@ -1862,7 +1861,6 @@ UI.ContextMenu.registerProvider({
|
|
|
1862
1861
|
...maybeRetrieveContextTypes(Sources => [Sources.UISourceCodeFrame.UISourceCodeFrame]),
|
|
1863
1862
|
];
|
|
1864
1863
|
},
|
|
1865
|
-
experiment: undefined,
|
|
1866
1864
|
});
|
|
1867
1865
|
|
|
1868
1866
|
Common.Revealer.registerRevealer({
|
|
@@ -1947,7 +1945,6 @@ Common.Revealer.registerRevealer({
|
|
|
1947
1945
|
contextTypes() {
|
|
1948
1946
|
return maybeRetrieveContextTypes(Sources => [Sources.SearchSourcesView.SearchSources]);
|
|
1949
1947
|
},
|
|
1950
|
-
destination: undefined,
|
|
1951
1948
|
async loadRevealer() {
|
|
1952
1949
|
const Sources = await loadSourcesModule();
|
|
1953
1950
|
return new Sources.SearchSourcesView.Revealer();
|
|
@@ -1958,9 +1955,6 @@ UI.Toolbar.registerToolbarItem({
|
|
|
1958
1955
|
actionId: 'sources.add-folder-to-workspace',
|
|
1959
1956
|
location: UI.Toolbar.ToolbarItemLocation.FILES_NAVIGATION_TOOLBAR,
|
|
1960
1957
|
label: i18nLazyString(UIStrings.addFolderManually),
|
|
1961
|
-
loadItem: undefined,
|
|
1962
|
-
order: undefined,
|
|
1963
|
-
separator: undefined,
|
|
1964
1958
|
});
|
|
1965
1959
|
|
|
1966
1960
|
UI.Context.registerListener({
|
|
@@ -1996,13 +1990,11 @@ UI.Context.registerListener({
|
|
|
1996
1990
|
UI.ContextMenu.registerItem({
|
|
1997
1991
|
location: UI.ContextMenu.ItemLocation.NAVIGATOR_MENU_DEFAULT,
|
|
1998
1992
|
actionId: 'quick-open.show',
|
|
1999
|
-
order: undefined,
|
|
2000
1993
|
});
|
|
2001
1994
|
|
|
2002
1995
|
UI.ContextMenu.registerItem({
|
|
2003
1996
|
location: UI.ContextMenu.ItemLocation.MAIN_MENU_DEFAULT,
|
|
2004
1997
|
actionId: 'sources.search',
|
|
2005
|
-
order: undefined,
|
|
2006
1998
|
});
|
|
2007
1999
|
|
|
2008
2000
|
QuickOpen.FilteredListWidget.registerProvider({
|
|
@@ -2056,5 +2048,4 @@ UI.ContextMenu.registerProvider({
|
|
|
2056
2048
|
const Sources = await loadSourcesModule();
|
|
2057
2049
|
return new Sources.PersistenceActions.ContextMenuProvider();
|
|
2058
2050
|
},
|
|
2059
|
-
experiment: undefined,
|
|
2060
2051
|
});
|
|
@@ -234,7 +234,7 @@ export class CompatibilityTracksAppender {
|
|
|
234
234
|
this.#entityMapper = entityMapper;
|
|
235
235
|
this.#entryData = entryData;
|
|
236
236
|
this.#colorGenerator = new Common.Color.Generator(
|
|
237
|
-
/* hueSpace= */ {min: 30, max: 55
|
|
237
|
+
/* hueSpace= */ {min: 30, max: 55},
|
|
238
238
|
/* satSpace= */ {min: 70, max: 100, count: 6},
|
|
239
239
|
/* lightnessSpace= */ 50,
|
|
240
240
|
/* alphaSpace= */ 0.7);
|
|
@@ -217,7 +217,7 @@ export class ThirdPartyTreeViewWidget extends TimelineTreeView.TimelineTreeView
|
|
|
217
217
|
displayInfoForGroupNode(node: Trace.Extras.TraceTree.Node): {
|
|
218
218
|
name: string,
|
|
219
219
|
color: string,
|
|
220
|
-
icon
|
|
220
|
+
icon?: Element,
|
|
221
221
|
} {
|
|
222
222
|
const color = 'gray';
|
|
223
223
|
const unattributed = i18nString(UIStrings.unattributed);
|
|
@@ -225,7 +225,10 @@ export class ThirdPartyTreeViewWidget extends TimelineTreeView.TimelineTreeView
|
|
|
225
225
|
// This `undefined` is [unattributed]
|
|
226
226
|
// TODO(paulirish): Improve attribution to reduce amount of items in [unattributed].
|
|
227
227
|
const domainName = id ? this.entityMapper()?.entityForEvent(node.event)?.name || id : undefined;
|
|
228
|
-
return {
|
|
228
|
+
return {
|
|
229
|
+
name: domainName || unattributed,
|
|
230
|
+
color,
|
|
231
|
+
};
|
|
229
232
|
}
|
|
230
233
|
|
|
231
234
|
nodeIsFirstParty(node: Trace.Extras.TraceTree.Node): boolean {
|
|
@@ -1995,8 +1995,6 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1995
1995
|
description: error,
|
|
1996
1996
|
buttonText: i18nString(UIStrings.close),
|
|
1997
1997
|
hideStopButton: false,
|
|
1998
|
-
showProgress: undefined,
|
|
1999
|
-
showTimer: undefined,
|
|
2000
1998
|
},
|
|
2001
1999
|
// When recording failed, we should load null to go back to the landing page.
|
|
2002
2000
|
async () => {
|
|
@@ -2475,10 +2473,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2475
2473
|
this.statusDialog = new StatusDialog(
|
|
2476
2474
|
{
|
|
2477
2475
|
showProgress: true,
|
|
2478
|
-
showTimer: undefined,
|
|
2479
2476
|
hideStopButton: true,
|
|
2480
|
-
buttonText: undefined,
|
|
2481
|
-
description: undefined,
|
|
2482
2477
|
},
|
|
2483
2478
|
() => this.cancelLoading());
|
|
2484
2479
|
this.statusDialog.showPane(this.statusPaneContainer);
|
|
@@ -2864,8 +2859,6 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2864
2859
|
showTimer: true,
|
|
2865
2860
|
showProgress: true,
|
|
2866
2861
|
hideStopButton: false,
|
|
2867
|
-
description: undefined,
|
|
2868
|
-
buttonText: undefined,
|
|
2869
2862
|
},
|
|
2870
2863
|
() => this.stopRecording());
|
|
2871
2864
|
this.statusDialog.showPane(this.statusPaneContainer);
|
|
@@ -268,8 +268,6 @@ export class TimelineTreeView extends
|
|
|
268
268
|
this.dataGrid = new DataGrid.SortableDataGrid.SortableDataGrid({
|
|
269
269
|
displayName: i18nString(UIStrings.performance),
|
|
270
270
|
columns,
|
|
271
|
-
refreshCallback: undefined,
|
|
272
|
-
deleteCallback: undefined,
|
|
273
271
|
});
|
|
274
272
|
this.dataGrid.addEventListener(DataGrid.DataGrid.Events.SORTING_CHANGED, this.sortingChanged, this);
|
|
275
273
|
this.dataGrid.element.addEventListener('mousemove', this.onMouseMove.bind(this), true);
|
|
@@ -984,7 +982,7 @@ export class AggregatedTimelineTreeView extends TimelineTreeView {
|
|
|
984
982
|
displayInfoForGroupNode(node: Trace.Extras.TraceTree.Node): {
|
|
985
983
|
name: string,
|
|
986
984
|
color: string,
|
|
987
|
-
icon
|
|
985
|
+
icon?: Element,
|
|
988
986
|
} {
|
|
989
987
|
const categories = Trace.Styles.getCategoryStyles();
|
|
990
988
|
const color = TimelineUIUtils.eventColor(node.event);
|
|
@@ -1000,7 +998,7 @@ export class AggregatedTimelineTreeView extends TimelineTreeView {
|
|
|
1000
998
|
const color = category instanceof Trace.Styles.TimelineCategory ?
|
|
1001
999
|
ThemeSupport.ThemeSupport.instance().getComputedValue(category.cssVariable) :
|
|
1002
1000
|
category.color;
|
|
1003
|
-
return {name: category.title, color
|
|
1001
|
+
return {name: category.title, color};
|
|
1004
1002
|
}
|
|
1005
1003
|
|
|
1006
1004
|
case AggregatedTimelineTreeView.GroupBy.Domain:
|
|
@@ -1009,7 +1007,7 @@ export class AggregatedTimelineTreeView extends TimelineTreeView {
|
|
|
1009
1007
|
// This `undefined` is [unattributed]
|
|
1010
1008
|
// TODO(paulirish): Improve attribution to reduce amount of items in [unattributed].
|
|
1011
1009
|
const domainName = id ? this.beautifyDomainName(id, node) : undefined;
|
|
1012
|
-
return {name: domainName || unattributed, color
|
|
1010
|
+
return {name: domainName || unattributed, color};
|
|
1013
1011
|
}
|
|
1014
1012
|
|
|
1015
1013
|
case AggregatedTimelineTreeView.GroupBy.EventName: {
|
|
@@ -1020,7 +1018,6 @@ export class AggregatedTimelineTreeView extends TimelineTreeView {
|
|
|
1020
1018
|
return {
|
|
1021
1019
|
name,
|
|
1022
1020
|
color,
|
|
1023
|
-
icon: undefined,
|
|
1024
1021
|
};
|
|
1025
1022
|
}
|
|
1026
1023
|
|
|
@@ -1030,13 +1027,16 @@ export class AggregatedTimelineTreeView extends TimelineTreeView {
|
|
|
1030
1027
|
case AggregatedTimelineTreeView.GroupBy.Frame: {
|
|
1031
1028
|
const frame = id ? this.parsedTrace()?.data.PageFrames.frames.get(id) : undefined;
|
|
1032
1029
|
const frameName = frame ? TimelineUIUtils.displayNameForFrame(frame) : i18nString(UIStrings.page);
|
|
1033
|
-
return {name: frameName, color
|
|
1030
|
+
return {name: frameName, color};
|
|
1034
1031
|
}
|
|
1035
1032
|
|
|
1036
1033
|
default:
|
|
1037
1034
|
console.assert(false, 'Unexpected grouping type');
|
|
1038
1035
|
}
|
|
1039
|
-
return {
|
|
1036
|
+
return {
|
|
1037
|
+
name: id || unattributed,
|
|
1038
|
+
color,
|
|
1039
|
+
};
|
|
1040
1040
|
}
|
|
1041
1041
|
|
|
1042
1042
|
override populateToolbar(toolbar: UI.Toolbar.Toolbar): void {
|
|
@@ -1293,8 +1293,6 @@ export class TimelineStackView extends
|
|
|
1293
1293
|
this.dataGrid = new DataGrid.ViewportDataGrid.ViewportDataGrid({
|
|
1294
1294
|
displayName: i18nString(UIStrings.timelineStack),
|
|
1295
1295
|
columns,
|
|
1296
|
-
deleteCallback: undefined,
|
|
1297
|
-
refreshCallback: undefined,
|
|
1298
1296
|
});
|
|
1299
1297
|
|
|
1300
1298
|
this.dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.LAST);
|
|
@@ -930,7 +930,6 @@ export class TimelineUIUtils {
|
|
|
930
930
|
if (url) {
|
|
931
931
|
previewElement = await LegacyComponents.ImagePreview.ImagePreview.build(url, false, {
|
|
932
932
|
imageAltText: LegacyComponents.ImagePreview.ImagePreview.defaultAltTextForImageURL(url),
|
|
933
|
-
precomputedFeatures: undefined,
|
|
934
933
|
align: LegacyComponents.ImagePreview.Align.START,
|
|
935
934
|
});
|
|
936
935
|
} else if (Trace.Types.Events.isPaint(event)) {
|
|
@@ -2293,8 +2292,17 @@ export class TimelineUIUtils {
|
|
|
2293
2292
|
|
|
2294
2293
|
static colorForId(id: string): string {
|
|
2295
2294
|
if (!colorGenerator) {
|
|
2296
|
-
colorGenerator =
|
|
2297
|
-
|
|
2295
|
+
colorGenerator = new Common.Color.Generator(
|
|
2296
|
+
{
|
|
2297
|
+
min: 30,
|
|
2298
|
+
max: 330,
|
|
2299
|
+
},
|
|
2300
|
+
{
|
|
2301
|
+
min: 50,
|
|
2302
|
+
max: 80,
|
|
2303
|
+
count: 3,
|
|
2304
|
+
},
|
|
2305
|
+
85);
|
|
2298
2306
|
colorGenerator.setColorForID('', '#f2ecdc');
|
|
2299
2307
|
}
|
|
2300
2308
|
return colorGenerator.colorForID(id);
|
|
@@ -202,7 +202,7 @@ export class IgnoreListSetting extends UI.Widget.Widget {
|
|
|
202
202
|
|
|
203
203
|
#onNewRegexInputFocus(value: string): void {
|
|
204
204
|
// Do not need to trim here because this is a temporary one, we will trim the input when finish editing,
|
|
205
|
-
this.#editingRegexSetting = {pattern: value, disabled: false
|
|
205
|
+
this.#editingRegexSetting = {pattern: value, disabled: false};
|
|
206
206
|
// We need to push the temp regex here to update the flame chart.
|
|
207
207
|
// We are using the "skip-stack-frames-pattern" setting to determine which is rendered on flame chart. And the push
|
|
208
208
|
// here will update the setting's value.
|
|
@@ -308,7 +308,6 @@ async function renderPreviewElement(
|
|
|
308
308
|
const previewOpts = {
|
|
309
309
|
imageAltText:
|
|
310
310
|
LegacyComponents.ImagePreview.ImagePreview.defaultAltTextForImageURL(url as Platform.DevToolsPath.UrlString),
|
|
311
|
-
precomputedFeatures: undefined,
|
|
312
311
|
align: LegacyComponents.ImagePreview.Align.START,
|
|
313
312
|
hideFileData: true,
|
|
314
313
|
};
|
|
@@ -77,7 +77,6 @@ export function makeScriptNode(src: string, sourceRoot: string, sourcesData: Rec
|
|
|
77
77
|
return {
|
|
78
78
|
name,
|
|
79
79
|
resourceBytes: 0,
|
|
80
|
-
encodedBytes: undefined,
|
|
81
80
|
};
|
|
82
81
|
}
|
|
83
82
|
|
|
@@ -215,7 +214,6 @@ export function createTreemapData(
|
|
|
215
214
|
for (const [source, resourceBytes] of Object.entries(sizes.files)) {
|
|
216
215
|
const sourceData: SourceData = {
|
|
217
216
|
resourceBytes,
|
|
218
|
-
encodedBytes: undefined,
|
|
219
217
|
};
|
|
220
218
|
|
|
221
219
|
const key = Trace.Extras.ScriptDuplication.normalizeSource(source);
|
|
@@ -239,7 +237,6 @@ export function createTreemapData(
|
|
|
239
237
|
node = {
|
|
240
238
|
name,
|
|
241
239
|
resourceBytes: script.content?.length ?? 0,
|
|
242
|
-
encodedBytes: undefined,
|
|
243
240
|
};
|
|
244
241
|
}
|
|
245
242
|
|
|
@@ -252,7 +249,6 @@ export function createTreemapData(
|
|
|
252
249
|
htmlNode = {
|
|
253
250
|
name,
|
|
254
251
|
resourceBytes: 0,
|
|
255
|
-
encodedBytes: undefined,
|
|
256
252
|
children: [],
|
|
257
253
|
};
|
|
258
254
|
htmlNodesByFrameId.set(script.frame, htmlNode);
|
|
@@ -58,12 +58,10 @@ Common.Settings.maybeRemoveSettingExtension('help.show-release-note');
|
|
|
58
58
|
UI.ContextMenu.maybeRemoveItem({
|
|
59
59
|
location: UI.ContextMenu.ItemLocation.MAIN_MENU_HELP_DEFAULT,
|
|
60
60
|
actionId: 'help.release-notes',
|
|
61
|
-
order: undefined,
|
|
62
61
|
});
|
|
63
62
|
UI.ContextMenu.maybeRemoveItem({
|
|
64
63
|
location: UI.ContextMenu.ItemLocation.MAIN_MENU_HELP_DEFAULT,
|
|
65
64
|
actionId: 'help.report-issue',
|
|
66
|
-
order: undefined,
|
|
67
65
|
});
|
|
68
66
|
|
|
69
67
|
Common.Runnable.maybeRemoveLateInitializationRunnable('whats-new');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: https://chromium.googlesource.com/chromium/src
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: 38fcac45e10d0cf6f8cf7007d4891f7c2038fc22
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -85,7 +85,7 @@ export const CURRENT_HIGHLIGHT_REGISTRY = 'current-search-result';
|
|
|
85
85
|
interface HighlightState {
|
|
86
86
|
activeRanges: Range[];
|
|
87
87
|
ranges: TextUtils.TextRange.SourceRange[];
|
|
88
|
-
currentRange
|
|
88
|
+
currentRange?: TextUtils.TextRange.SourceRange;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
let highlightManagerInstance: HighlightManager;
|
|
@@ -153,7 +153,6 @@ export class HighlightManager {
|
|
|
153
153
|
state = {
|
|
154
154
|
activeRanges: [],
|
|
155
155
|
ranges: [],
|
|
156
|
-
currentRange: undefined,
|
|
157
156
|
};
|
|
158
157
|
this.#stateByNode.set(node, state);
|
|
159
158
|
}
|
|
@@ -71,8 +71,6 @@ export function highlightRangesWithStyleClass(
|
|
|
71
71
|
type: 'changed',
|
|
72
72
|
oldText: lastText,
|
|
73
73
|
newText: lastTextNode.textContent,
|
|
74
|
-
nextSibling: undefined,
|
|
75
|
-
parent: undefined,
|
|
76
74
|
});
|
|
77
75
|
|
|
78
76
|
if (startIndex === endIndex && lastTextNode.parentElement) {
|
|
@@ -82,8 +80,6 @@ export function highlightRangesWithStyleClass(
|
|
|
82
80
|
type: 'added',
|
|
83
81
|
nextSibling: lastTextNode,
|
|
84
82
|
parent: lastTextNode.parentElement,
|
|
85
|
-
oldText: undefined,
|
|
86
|
-
newText: undefined,
|
|
87
83
|
});
|
|
88
84
|
highlightNodes.push(highlightNode);
|
|
89
85
|
|
|
@@ -95,8 +91,6 @@ export function highlightRangesWithStyleClass(
|
|
|
95
91
|
type: 'added',
|
|
96
92
|
nextSibling: highlightNode,
|
|
97
93
|
parent: lastTextNode.parentElement,
|
|
98
|
-
oldText: undefined,
|
|
99
|
-
newText: undefined,
|
|
100
94
|
});
|
|
101
95
|
} else {
|
|
102
96
|
const firstTextNode = textNodes[startIndex];
|
|
@@ -110,8 +104,7 @@ export function highlightRangesWithStyleClass(
|
|
|
110
104
|
type: 'added',
|
|
111
105
|
nextSibling: anchorElement || undefined,
|
|
112
106
|
parent: firstTextNode.parentElement,
|
|
113
|
-
|
|
114
|
-
newText: undefined,
|
|
107
|
+
|
|
115
108
|
});
|
|
116
109
|
highlightNodes.push(highlightNode);
|
|
117
110
|
}
|
|
@@ -122,8 +115,6 @@ export function highlightRangesWithStyleClass(
|
|
|
122
115
|
type: 'changed',
|
|
123
116
|
oldText: firstText,
|
|
124
117
|
newText: firstTextNode.textContent,
|
|
125
|
-
nextSibling: undefined,
|
|
126
|
-
parent: undefined,
|
|
127
118
|
});
|
|
128
119
|
|
|
129
120
|
for (let j = startIndex + 1; j < endIndex; j++) {
|
|
@@ -135,8 +126,6 @@ export function highlightRangesWithStyleClass(
|
|
|
135
126
|
type: 'changed',
|
|
136
127
|
oldText: text || undefined,
|
|
137
128
|
newText: textNode.textContent,
|
|
138
|
-
nextSibling: undefined,
|
|
139
|
-
parent: undefined,
|
|
140
129
|
});
|
|
141
130
|
}
|
|
142
131
|
}
|
|
@@ -30,12 +30,12 @@ export interface IconButtonData {
|
|
|
30
30
|
|
|
31
31
|
export class IconButton extends HTMLElement {
|
|
32
32
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
33
|
-
#clickHandler
|
|
33
|
+
#clickHandler?: () => void;
|
|
34
34
|
#groups: IconWithTextData[] = [];
|
|
35
35
|
#compact = false;
|
|
36
36
|
#leadingText = '';
|
|
37
37
|
#trailingText = '';
|
|
38
|
-
#accessibleName
|
|
38
|
+
#accessibleName?: string;
|
|
39
39
|
|
|
40
40
|
set data(data: IconButtonData) {
|
|
41
41
|
this.#groups = data.groups.map(group => ({...group})); // Ensure we make a deep copy.
|
|
@@ -97,15 +97,15 @@ export function getIssueCountsEnumeration(
|
|
|
97
97
|
|
|
98
98
|
export class IssueCounter extends HTMLElement {
|
|
99
99
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
100
|
-
#clickHandler
|
|
101
|
-
#tooltipCallback
|
|
100
|
+
#clickHandler?: () => void;
|
|
101
|
+
#tooltipCallback?: () => void;
|
|
102
102
|
#leadingText = '';
|
|
103
|
-
#throttler
|
|
103
|
+
#throttler?: Common.Throttler.Throttler;
|
|
104
104
|
#counts: [number, number, number] = [0, 0, 0];
|
|
105
105
|
#displayMode: DisplayMode = DisplayMode.OMIT_EMPTY;
|
|
106
|
-
#issuesManager
|
|
107
|
-
#accessibleName
|
|
108
|
-
#throttlerTimeout
|
|
106
|
+
#issuesManager?: IssuesManager.IssuesManager.IssuesManager;
|
|
107
|
+
#accessibleName?: string;
|
|
108
|
+
#throttlerTimeout?: number;
|
|
109
109
|
#compact = false;
|
|
110
110
|
|
|
111
111
|
scheduleUpdate(): void {
|
|
@@ -47,6 +47,9 @@ export interface AiCodeCompletionConfig {
|
|
|
47
47
|
getPrefix?: () => string,
|
|
48
48
|
stopSequences?: string[],
|
|
49
49
|
};
|
|
50
|
+
generationContext: {
|
|
51
|
+
additionalPreambleContext?: string,
|
|
52
|
+
};
|
|
50
53
|
onFeatureEnabled: () => void;
|
|
51
54
|
onFeatureDisabled: () => void;
|
|
52
55
|
onSuggestionAccepted: (citations: Host.AidaClient.Citation[]) => void;
|
|
@@ -86,6 +89,7 @@ export class AiCodeCompletionProvider {
|
|
|
86
89
|
this.#aiCodeGenerationConfig = {
|
|
87
90
|
generationContext: {
|
|
88
91
|
inferenceLanguage: this.#aiCodeCompletionConfig.completionContext.inferenceLanguage,
|
|
92
|
+
additionalPreambleContext: this.#aiCodeCompletionConfig.generationContext.additionalPreambleContext,
|
|
89
93
|
},
|
|
90
94
|
onSuggestionAccepted: this.#aiCodeCompletionConfig.onSuggestionAccepted.bind(this),
|
|
91
95
|
onRequestTriggered: this.#aiCodeCompletionConfig.onRequestTriggered.bind(this),
|
|
@@ -41,6 +41,7 @@ const aiCodeGenerationTeaserModeState = CodeMirror.StateField.define<AiCodeGener
|
|
|
41
41
|
|
|
42
42
|
export interface AiCodeGenerationConfig {
|
|
43
43
|
generationContext: {
|
|
44
|
+
additionalPreambleContext?: string,
|
|
44
45
|
inferenceLanguage?: Host.AidaClient.AidaInferenceLanguage,
|
|
45
46
|
};
|
|
46
47
|
onSuggestionAccepted: (citations: Host.AidaClient.Citation[]) => void;
|
|
@@ -58,6 +59,7 @@ export class AiCodeGenerationProvider {
|
|
|
58
59
|
#aiCodeGenerationSettingEnabled = this.#aiCodeGenerationEnabledSetting.get();
|
|
59
60
|
#aiCodeGenerationOnboardingCompletedSetting =
|
|
60
61
|
Common.Settings.Settings.instance().createSetting('ai-code-generation-onboarding-completed', false);
|
|
62
|
+
#aiCodeGenerationUsedSetting = Common.Settings.Settings.instance().createSetting('ai-code-generation-used', false);
|
|
61
63
|
#generationTeaserCompartment = new CodeMirror.Compartment();
|
|
62
64
|
#generationTeaser: PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaser;
|
|
63
65
|
#editor?: TextEditor;
|
|
@@ -302,6 +304,8 @@ export class AiCodeGenerationProvider {
|
|
|
302
304
|
return;
|
|
303
305
|
}
|
|
304
306
|
|
|
307
|
+
this.#aiCodeGenerationUsedSetting.set(true);
|
|
308
|
+
|
|
305
309
|
this.#aiCodeGenerationCitations = [];
|
|
306
310
|
const cursor = this.#editor.state.selection.main.head;
|
|
307
311
|
const commentNodeInfo = AiCodeGenerationParser.extractCommentNodeInfo(this.#editor.state, cursor);
|
|
@@ -319,19 +323,20 @@ export class AiCodeGenerationProvider {
|
|
|
319
323
|
this.#generationTeaser.displayState = PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.LOADING;
|
|
320
324
|
try {
|
|
321
325
|
const startTime = performance.now();
|
|
322
|
-
this.#aiCodeGenerationConfig
|
|
326
|
+
this.#aiCodeGenerationConfig.onRequestTriggered();
|
|
323
327
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeGenerationRequestTriggered);
|
|
324
328
|
|
|
329
|
+
const preamble = AiCodeGeneration.AiCodeGeneration.basePreamble +
|
|
330
|
+
this.#aiCodeGenerationConfig.generationContext.additionalPreambleContext;
|
|
325
331
|
const generationResponse = await this.#aiCodeGeneration.generateCode(
|
|
326
|
-
query,
|
|
327
|
-
this.#aiCodeGenerationConfig?.generationContext.inferenceLanguage, options);
|
|
332
|
+
query, preamble, this.#aiCodeGenerationConfig.generationContext.inferenceLanguage, options);
|
|
328
333
|
|
|
329
334
|
if (this.#generationTeaser) {
|
|
330
335
|
this.#dismissTeaserAndSuggestion();
|
|
331
336
|
}
|
|
332
337
|
|
|
333
338
|
if (!generationResponse || generationResponse.samples.length === 0) {
|
|
334
|
-
this.#aiCodeGenerationConfig
|
|
339
|
+
this.#aiCodeGenerationConfig.onResponseReceived();
|
|
335
340
|
return;
|
|
336
341
|
}
|
|
337
342
|
const topSample = generationResponse.samples[0];
|
|
@@ -365,7 +370,7 @@ export class AiCodeGenerationProvider {
|
|
|
365
370
|
AiCodeGeneration.debugLog('Suggestion dispatched to the editor', suggestionText);
|
|
366
371
|
const citations = topSample.attributionMetadata?.citations ?? [];
|
|
367
372
|
this.#aiCodeGenerationCitations = citations;
|
|
368
|
-
this.#aiCodeGenerationConfig
|
|
373
|
+
this.#aiCodeGenerationConfig.onResponseReceived();
|
|
369
374
|
return;
|
|
370
375
|
} catch (e) {
|
|
371
376
|
if (e instanceof Host.DispatchHttpRequestClient.DispatchHttpRequestError &&
|
|
@@ -373,7 +378,7 @@ export class AiCodeGenerationProvider {
|
|
|
373
378
|
return;
|
|
374
379
|
}
|
|
375
380
|
AiCodeGeneration.debugLog('Error while fetching code generation suggestions from AIDA', e);
|
|
376
|
-
this.#aiCodeGenerationConfig
|
|
381
|
+
this.#aiCodeGenerationConfig.onResponseReceived();
|
|
377
382
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeGenerationError);
|
|
378
383
|
}
|
|
379
384
|
|
|
@@ -122,8 +122,6 @@ export class Item {
|
|
|
122
122
|
label: this.label,
|
|
123
123
|
isExperimentalFeature: this.previewFeature,
|
|
124
124
|
enabled: !this.disabled,
|
|
125
|
-
checked: undefined,
|
|
126
|
-
subItems: undefined,
|
|
127
125
|
tooltip: this.#tooltip,
|
|
128
126
|
jslogContext: this.jslogContext,
|
|
129
127
|
featureName: this.featureName,
|
|
@@ -145,11 +143,6 @@ export class Item {
|
|
|
145
143
|
case 'separator': {
|
|
146
144
|
return {
|
|
147
145
|
type: 'separator',
|
|
148
|
-
id: undefined,
|
|
149
|
-
label: undefined,
|
|
150
|
-
enabled: undefined,
|
|
151
|
-
checked: undefined,
|
|
152
|
-
subItems: undefined,
|
|
153
146
|
};
|
|
154
147
|
}
|
|
155
148
|
case 'checkbox': {
|
|
@@ -160,7 +153,6 @@ export class Item {
|
|
|
160
153
|
checked: Boolean(this.checked),
|
|
161
154
|
isExperimentalFeature: this.previewFeature,
|
|
162
155
|
enabled: !this.disabled,
|
|
163
|
-
subItems: undefined,
|
|
164
156
|
tooltip: this.#tooltip,
|
|
165
157
|
jslogContext: this.jslogContext,
|
|
166
158
|
};
|
|
@@ -512,8 +504,6 @@ export class SubMenu extends Item {
|
|
|
512
504
|
isExperimentalFeature: this.previewFeature,
|
|
513
505
|
enabled: !this.disabled,
|
|
514
506
|
subItems: [],
|
|
515
|
-
id: undefined,
|
|
516
|
-
checked: undefined,
|
|
517
507
|
jslogContext: this.jslogContext,
|
|
518
508
|
featureName: this.featureName,
|
|
519
509
|
};
|
|
@@ -532,11 +522,6 @@ export class SubMenu extends Item {
|
|
|
532
522
|
}
|
|
533
523
|
result.subItems.push({
|
|
534
524
|
type: 'separator',
|
|
535
|
-
id: undefined,
|
|
536
|
-
subItems: undefined,
|
|
537
|
-
checked: undefined,
|
|
538
|
-
enabled: undefined,
|
|
539
|
-
label: undefined,
|
|
540
525
|
});
|
|
541
526
|
}
|
|
542
527
|
}
|
|
@@ -1157,8 +1142,7 @@ export function registerProvider<T>(registration: ProviderRegistration<T>): void
|
|
|
1157
1142
|
async function loadApplicableRegisteredProviders(target: unknown): Promise<Array<Provider<unknown>>> {
|
|
1158
1143
|
const providers: Array<Provider<unknown>> = [];
|
|
1159
1144
|
for (const providerRegistration of registeredProviders) {
|
|
1160
|
-
if (!Root.Runtime.Runtime.isDescriptorEnabled(
|
|
1161
|
-
{experiment: providerRegistration.experiment, condition: undefined})) {
|
|
1145
|
+
if (!Root.Runtime.Runtime.isDescriptorEnabled({experiment: providerRegistration.experiment})) {
|
|
1162
1146
|
continue;
|
|
1163
1147
|
}
|
|
1164
1148
|
if (providerRegistration.contextTypes) {
|
|
@@ -26,12 +26,12 @@ const {ref} = Directives;
|
|
|
26
26
|
interface EmptyWidgetInput {
|
|
27
27
|
header: string;
|
|
28
28
|
text: string;
|
|
29
|
-
link?: Platform.DevToolsPath.UrlString|
|
|
29
|
+
link?: Platform.DevToolsPath.UrlString|null;
|
|
30
30
|
extraElements?: Element[];
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
interface EmptyWidgetOutput {
|
|
34
|
-
contentElement
|
|
34
|
+
contentElement?: Element;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
type View = (input: EmptyWidgetInput, output: EmptyWidgetOutput, target: HTMLElement) => void;
|
|
@@ -100,12 +100,12 @@ export class EmptyWidget extends VBox {
|
|
|
100
100
|
this.#extraElements = [...this.element.children];
|
|
101
101
|
this.#firstUpdate = false;
|
|
102
102
|
}
|
|
103
|
-
const output = {
|
|
103
|
+
const output: EmptyWidgetOutput = {};
|
|
104
104
|
this.#view(
|
|
105
105
|
{header: this.#header, text: this.#text, link: this.#link, extraElements: this.#extraElements}, output,
|
|
106
106
|
this.element);
|
|
107
107
|
if (output.contentElement) {
|
|
108
|
-
this.contentElement = output.contentElement;
|
|
108
|
+
this.contentElement = output.contentElement as HTMLElement;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -74,7 +74,7 @@ export class Fragment {
|
|
|
74
74
|
if (node.nodeType === Node.ELEMENT_NODE && node.hasAttributes()) {
|
|
75
75
|
if (node.hasAttribute('$')) {
|
|
76
76
|
nodesToMark.push(node);
|
|
77
|
-
binds.push({
|
|
77
|
+
binds.push({elementId: node.getAttribute('$') || ''});
|
|
78
78
|
node.removeAttribute('$');
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -97,8 +97,6 @@ export class Fragment {
|
|
|
97
97
|
valueIndex += attr.names.length - 1;
|
|
98
98
|
valueIndex += attr.values.length - 1;
|
|
99
99
|
const bind: Bind = {
|
|
100
|
-
elementId: undefined,
|
|
101
|
-
replaceNodeIndex: undefined,
|
|
102
100
|
attr,
|
|
103
101
|
};
|
|
104
102
|
binds.push(bind);
|
|
@@ -118,7 +116,7 @@ export class Fragment {
|
|
|
118
116
|
}
|
|
119
117
|
const nodeToReplace = document.createElement('span');
|
|
120
118
|
nodesToMark.push(nodeToReplace);
|
|
121
|
-
binds.push({
|
|
119
|
+
binds.push({replaceNodeIndex: valueIndex++});
|
|
122
120
|
parentNode.insertBefore(nodeToReplace, node);
|
|
123
121
|
}
|
|
124
122
|
}
|