chrome-devtools-frontend 1.0.951410 → 1.0.952713
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/config/gni/devtools_grd_files.gni +3 -0
- package/extension-api/ExtensionAPI.d.ts +1 -1
- package/front_end/.eslintrc.js +6 -0
- package/front_end/Tests.js +10 -0
- package/front_end/core/common/App.ts +0 -3
- package/front_end/core/common/AppProvider.ts +0 -3
- package/front_end/core/common/JavaScriptMetaData.ts +0 -3
- package/front_end/core/common/QueryParamHandler.ts +0 -3
- package/front_end/core/common/Runnable.ts +0 -3
- package/front_end/core/common/SimpleHistoryManager.ts +0 -3
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +3 -0
- package/front_end/core/i18n/locales/en-XL.json +3 -0
- package/front_end/core/root/Runtime.ts +4 -12
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +0 -12
- package/front_end/core/sdk/PageResourceLoader.ts +2 -1
- package/front_end/core/sdk/TracingManager.ts +0 -3
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +39 -39
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +54 -54
- package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +20 -20
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +54 -54
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +145 -144
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +40 -40
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +64 -69
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +203 -203
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +109 -108
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +17 -17
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +30 -30
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +25 -25
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +52 -55
- package/front_end/entrypoints/main/MainImpl.ts +49 -49
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +43 -43
- package/front_end/entrypoints/node_app/NodeMain.ts +38 -38
- package/front_end/generated/InspectorBackendCommands.js +5 -1
- package/front_end/generated/protocol.d.ts +16 -0
- package/front_end/legacy/legacy-defs.d.ts +0 -21
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +0 -3
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -3
- package/front_end/models/bindings/FileUtils.ts +0 -3
- package/front_end/models/extensions/ExtensionAPI.ts +2 -1
- package/front_end/models/extensions/ExtensionTraceProvider.ts +0 -3
- package/front_end/models/heap_snapshot_model/HeapSnapshotModel.ts +1 -1
- package/front_end/models/issues_manager/ClientHintIssue.ts +95 -0
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +6 -6
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +15 -15
- package/front_end/models/issues_manager/CorsIssue.ts +9 -9
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -5
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -7
- package/front_end/models/issues_manager/GenericIssue.ts +5 -5
- package/front_end/models/issues_manager/HeavyAdIssue.ts +5 -5
- package/front_end/models/issues_manager/Issue.ts +10 -10
- package/front_end/models/issues_manager/IssueResolver.ts +11 -10
- package/front_end/models/issues_manager/IssuesManager.ts +61 -56
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +4 -4
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -7
- package/front_end/models/issues_manager/NavigatorUserAgentIssue.ts +7 -7
- package/front_end/models/issues_manager/QuirksModeIssue.ts +4 -4
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +16 -16
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +5 -5
- package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +32 -31
- package/front_end/models/issues_manager/TrustedWebActivityIssue.ts +5 -5
- package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +5 -5
- package/front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
- package/front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/timeline_model/TimelineModel.ts +1 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +33 -33
- package/front_end/panels/application/components/EndpointsGrid.ts +12 -12
- package/front_end/panels/application/components/FrameDetailsView.ts +108 -110
- package/front_end/panels/application/components/OriginTrialTreeView.ts +45 -45
- package/front_end/panels/application/components/PermissionsPolicySection.ts +19 -19
- package/front_end/panels/application/components/ReportsGrid.ts +30 -30
- package/front_end/panels/application/components/StackTrace.ts +48 -47
- package/front_end/panels/application/components/TrustTokensView.ts +31 -31
- package/front_end/panels/console/ConsoleView.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -25
- package/front_end/panels/console/consoleView.css +5 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +41 -52
- package/front_end/panels/css_overview/CSSOverviewController.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +18 -27
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +6 -6
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +4 -4
- package/front_end/panels/elements/ElementsTreeElement.ts +2 -6
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +17 -17
- package/front_end/panels/elements/components/AdornerManager.ts +21 -21
- package/front_end/panels/elements/components/AdornerSettingsPane.ts +14 -14
- package/front_end/panels/elements/components/CSSQuery.ts +16 -16
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +14 -14
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +15 -15
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +78 -78
- package/front_end/panels/elements/components/ElementsPanelLink.ts +16 -16
- package/front_end/panels/elements/components/LayoutPane.ts +47 -47
- package/front_end/panels/elements/components/NodeText.ts +18 -18
- package/front_end/panels/elements/components/QueryContainer.ts +40 -40
- package/front_end/panels/elements/components/StylePropertyEditor.ts +18 -18
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +4 -4
- package/front_end/panels/event_listeners/EventListenersUtils.ts +2 -1
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +4 -4
- package/front_end/panels/issues/AffectedCookiesView.ts +4 -5
- package/front_end/panels/issues/AffectedDirectivesView.ts +19 -19
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +7 -8
- package/front_end/panels/issues/AffectedElementsView.ts +4 -4
- package/front_end/panels/issues/AffectedElementsWithLowContrastView.ts +7 -8
- package/front_end/panels/issues/AffectedHeavyAdView.ts +8 -8
- package/front_end/panels/issues/AffectedResourcesView.ts +25 -26
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +8 -8
- package/front_end/panels/issues/AffectedSourcesView.ts +4 -4
- package/front_end/panels/issues/AffectedTrustedWebActivityIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +17 -17
- package/front_end/panels/issues/CSPViolationsListView.ts +22 -23
- package/front_end/panels/issues/CSPViolationsView.ts +17 -17
- package/front_end/panels/issues/ComboBoxOfCheckBoxes.ts +13 -13
- package/front_end/panels/issues/CorsIssueDetailsView.ts +23 -23
- package/front_end/panels/issues/GenericIssueDetailsView.ts +4 -4
- package/front_end/panels/issues/HiddenIssuesRow.ts +7 -7
- package/front_end/panels/issues/IssueAggregator.ts +95 -95
- package/front_end/panels/issues/IssueKindView.ts +14 -14
- package/front_end/panels/issues/IssueView.ts +98 -98
- package/front_end/panels/issues/IssuesPane.ts +102 -102
- package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +5 -5
- package/front_end/panels/issues/components/HideIssuesMenu.ts +10 -10
- package/front_end/panels/media/PlayerListView.ts +160 -97
- package/front_end/panels/media/PlayerMessagesView.ts +1 -0
- package/front_end/panels/media/playerListView.css +58 -0
- package/front_end/panels/network/NetworkLogView.ts +2 -6
- package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -4
- package/front_end/panels/network/components/RequestTrustTokensView.ts +40 -40
- package/front_end/panels/network/components/WebBundleInfoView.ts +9 -9
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +92 -37
- package/front_end/panels/performance_monitor/performanceMonitor.css +32 -0
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +2 -2
- package/front_end/panels/search/SearchConfig.ts +0 -6
- package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -0
- package/front_end/panels/settings/components/SyncSection.ts +14 -14
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +96 -96
- package/front_end/panels/sources/BreakpointEditDialog.ts +4 -3
- package/front_end/panels/sources/NavigatorView.ts +3 -9
- package/front_end/panels/sources/SourceMapNamesResolver.ts +3 -3
- package/front_end/panels/sources/SourcesPanel.ts +1 -3
- package/front_end/panels/sources/SourcesView.ts +0 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +0 -3
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelineLoader.ts +0 -3
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/components/WebVitalsLane.ts +77 -76
- package/front_end/panels/timeline/components/WebVitalsTimeline.ts +133 -133
- package/front_end/panels/timeline/components/WebVitalsTooltip.ts +9 -9
- package/front_end/panels/webauthn/WebauthnPane.ts +203 -205
- package/front_end/third_party/codemirror.next/bundle.ts +3 -3
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +10 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +2 -1
- package/front_end/third_party/codemirror.next/package.json +3 -3
- package/front_end/third_party/diff/DiffWrapper.ts +7 -0
- package/front_end/ui/components/adorners/Adorner.ts +2 -2
- package/front_end/ui/components/buttons/Button.ts +9 -9
- package/front_end/ui/components/data_grid/DataGrid.ts +64 -64
- package/front_end/ui/components/data_grid/DataGridController.ts +22 -22
- package/front_end/ui/components/data_grid/DataGridUtils.ts +3 -0
- package/front_end/ui/components/diff_view/DiffView.ts +6 -6
- package/front_end/ui/components/expandable_list/ExpandableList.ts +5 -5
- package/front_end/ui/components/icon_button/Icon.ts +4 -4
- package/front_end/ui/components/icon_button/IconButton.ts +4 -4
- package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +50 -50
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +6 -6
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +4 -4
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +12 -12
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +11 -11
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +40 -39
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +18 -18
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +4 -4
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +5 -5
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +2 -2
- package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +2 -2
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +4 -4
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +22 -22
- package/front_end/ui/components/report_view/ReportView.ts +16 -16
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +14 -14
- package/front_end/ui/components/settings/SettingCheckbox.ts +5 -5
- package/front_end/ui/components/survey_link/SurveyLink.ts +8 -8
- package/front_end/ui/components/text_editor/TextEditor.ts +9 -9
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +7 -1
- package/front_end/ui/components/text_prompt/TextPrompt.ts +18 -18
- package/front_end/ui/components/tree_outline/TreeOutline.ts +69 -70
- package/front_end/ui/legacy/ContextFlavorListener.ts +0 -4
- package/front_end/ui/legacy/SearchableView.ts +13 -4
- package/front_end/ui/legacy/SuggestBox.ts +0 -3
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -3
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +13 -12
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -2
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/front_end/ui/legacy/theme_support/theme_support_impl.ts +34 -7
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/use_private_class_members.js +41 -0
- package/scripts/eslint_rules/tests/use_private_class_members_test.js +62 -0
- package/scripts/migration/class-fields/migrate.js +2 -3
- package/scripts/migration/class-fields/migrate.sh +1 -3
- package/scripts/migration/class-fields/package.json +1 -1
- package/config/gni/all_devtools_files.gni +0 -255
- package/scripts/build/devtools_file_hashes.py +0 -82
- package/scripts/devtools_run/devtools_run_cli +0 -49
- package/scripts/devtools_run/package.json +0 -13
- package/scripts/unzip.py +0 -20
- package/scripts/visualize_deps/jquery_svg.html +0 -57
- package/scripts/visualize_deps/run_visualize.js +0 -119
|
@@ -45,33 +45,33 @@ const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();
|
|
|
45
45
|
|
|
46
46
|
export class ElementsBreadcrumbs extends HTMLElement {
|
|
47
47
|
static readonly litTagName = LitHtml.literal`devtools-elements-breadcrumbs`;
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
49
|
+
readonly #resizeObserver = new ResizeObserver(() => this.#checkForOverflowOnResize());
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
#crumbsData: readonly DOMNode[] = [];
|
|
52
|
+
#selectedDOMNode: Readonly<DOMNode>|null = null;
|
|
53
|
+
#overflowing = false;
|
|
54
|
+
#userScrollPosition: UserScrollPosition = 'start';
|
|
55
|
+
#isObservingResize = false;
|
|
56
|
+
#userHasManuallyScrolled = false;
|
|
57
57
|
|
|
58
58
|
connectedCallback(): void {
|
|
59
|
-
this
|
|
59
|
+
this.#shadow.adoptedStyleSheets = [elementsBreadcrumbsStyles];
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
set data(data: ElementsBreadcrumbsData) {
|
|
63
|
-
this
|
|
64
|
-
this
|
|
65
|
-
this
|
|
66
|
-
this
|
|
63
|
+
this.#selectedDOMNode = data.selectedNode;
|
|
64
|
+
this.#crumbsData = data.crumbs;
|
|
65
|
+
this.#userHasManuallyScrolled = false;
|
|
66
|
+
this.#update();
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
disconnectedCallback(): void {
|
|
70
|
-
this
|
|
71
|
-
this
|
|
70
|
+
this.#isObservingResize = false;
|
|
71
|
+
this.#resizeObserver.disconnect();
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
#onCrumbClick(node: DOMNode): (event: Event) => void {
|
|
75
75
|
return (event: Event): void => {
|
|
76
76
|
event.preventDefault();
|
|
77
77
|
this.dispatchEvent(new NodeSelectedEvent(node));
|
|
@@ -85,9 +85,9 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
85
85
|
*
|
|
86
86
|
* If either of these are true, we toggle the overflowing state accordingly and trigger a re-render.
|
|
87
87
|
*/
|
|
88
|
-
|
|
89
|
-
const wrappingElement = this
|
|
90
|
-
const crumbs = this
|
|
88
|
+
async #checkForOverflowOnResize(): Promise<void> {
|
|
89
|
+
const wrappingElement = this.#shadow.querySelector('.crumbs');
|
|
90
|
+
const crumbs = this.#shadow.querySelector('.crumbs-scroll-container');
|
|
91
91
|
if (!wrappingElement || !crumbs) {
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
@@ -95,52 +95,52 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
95
95
|
const totalContainingWidth = await coordinator.read<number>(() => wrappingElement.clientWidth);
|
|
96
96
|
const totalCrumbsWidth = await coordinator.read<number>(() => crumbs.clientWidth);
|
|
97
97
|
|
|
98
|
-
if (totalCrumbsWidth >= totalContainingWidth && this
|
|
99
|
-
this
|
|
100
|
-
this
|
|
101
|
-
this
|
|
102
|
-
} else if (totalCrumbsWidth < totalContainingWidth && this
|
|
103
|
-
this
|
|
104
|
-
this
|
|
105
|
-
this
|
|
98
|
+
if (totalCrumbsWidth >= totalContainingWidth && this.#overflowing === false) {
|
|
99
|
+
this.#overflowing = true;
|
|
100
|
+
this.#userScrollPosition = 'start';
|
|
101
|
+
this.#render();
|
|
102
|
+
} else if (totalCrumbsWidth < totalContainingWidth && this.#overflowing === true) {
|
|
103
|
+
this.#overflowing = false;
|
|
104
|
+
this.#userScrollPosition = 'start';
|
|
105
|
+
this.#render();
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
await this
|
|
111
|
-
this
|
|
112
|
-
this
|
|
109
|
+
async #update(): Promise<void> {
|
|
110
|
+
await this.#render();
|
|
111
|
+
this.#engageResizeObserver();
|
|
112
|
+
this.#ensureSelectedNodeIsVisible();
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
#onCrumbMouseMove(node: DOMNode): () => void {
|
|
116
116
|
return (): void => node.highlightNode();
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
#onCrumbMouseLeave(node: DOMNode): () => void {
|
|
120
120
|
return (): void => node.clearHighlight();
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
#onCrumbFocus(node: DOMNode): () => void {
|
|
124
124
|
return (): void => node.highlightNode();
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
#onCrumbBlur(node: DOMNode): () => void {
|
|
128
128
|
return (): void => node.clearHighlight();
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
if (!this
|
|
131
|
+
#engageResizeObserver(): void {
|
|
132
|
+
if (!this.#resizeObserver || this.#isObservingResize === true) {
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
const crumbs = this
|
|
136
|
+
const crumbs = this.#shadow.querySelector('.crumbs');
|
|
137
137
|
|
|
138
138
|
if (!crumbs) {
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
this
|
|
143
|
-
this
|
|
142
|
+
this.#resizeObserver.observe(crumbs);
|
|
143
|
+
this.#isObservingResize = true;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
@@ -151,9 +151,9 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
151
151
|
* triggers a re-render. If we are not overflowing, this method returns and
|
|
152
152
|
* does nothing.
|
|
153
153
|
*/
|
|
154
|
-
|
|
155
|
-
const crumbScrollContainer = this
|
|
156
|
-
const crumbWindow = this
|
|
154
|
+
async #checkForOverflow(): Promise<void> {
|
|
155
|
+
const crumbScrollContainer = this.#shadow.querySelector('.crumbs-scroll-container');
|
|
156
|
+
const crumbWindow = this.#shadow.querySelector('.crumbs-window');
|
|
157
157
|
|
|
158
158
|
if (!crumbScrollContainer || !crumbWindow) {
|
|
159
159
|
return;
|
|
@@ -171,24 +171,24 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
171
171
|
const maxChildWidth = crumbWindowWidth - paddingAllowance;
|
|
172
172
|
|
|
173
173
|
if (scrollContainerWidth < maxChildWidth) {
|
|
174
|
-
if (this
|
|
174
|
+
if (this.#overflowing) {
|
|
175
175
|
// We were overflowing, but now we have enough room, so re-render with
|
|
176
176
|
// overflowing set to false so the overflow buttons get removed.
|
|
177
|
-
this
|
|
178
|
-
this
|
|
177
|
+
this.#overflowing = false;
|
|
178
|
+
this.#render();
|
|
179
179
|
}
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
// We don't have enough room, so if we are not currently overflowing, mark
|
|
184
184
|
// as overflowing and re-render to update the UI.
|
|
185
|
-
if (!this
|
|
186
|
-
this
|
|
187
|
-
this
|
|
185
|
+
if (!this.#overflowing) {
|
|
186
|
+
this.#overflowing = true;
|
|
187
|
+
this.#render();
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
#onCrumbsWindowScroll(event: Event): void {
|
|
192
192
|
if (!event.target) {
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
@@ -200,10 +200,10 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
200
200
|
*/
|
|
201
201
|
const scrollWindow = event.target as Element;
|
|
202
202
|
|
|
203
|
-
this
|
|
203
|
+
this.#updateScrollState(scrollWindow);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
#updateScrollState(scrollWindow: Element): void {
|
|
207
207
|
const maxScrollLeft = scrollWindow.scrollWidth - scrollWindow.clientWidth;
|
|
208
208
|
const currentScroll = scrollWindow.scrollLeft;
|
|
209
209
|
|
|
@@ -220,20 +220,20 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
220
220
|
const scrollBeginningAndEndPadding = 10;
|
|
221
221
|
|
|
222
222
|
if (currentScroll < scrollBeginningAndEndPadding) {
|
|
223
|
-
this
|
|
223
|
+
this.#userScrollPosition = 'start';
|
|
224
224
|
} else if (currentScroll >= maxScrollLeft - scrollBeginningAndEndPadding) {
|
|
225
|
-
this
|
|
225
|
+
this.#userScrollPosition = 'end';
|
|
226
226
|
} else {
|
|
227
|
-
this
|
|
227
|
+
this.#userScrollPosition = 'middle';
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
this
|
|
230
|
+
this.#render();
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
|
|
233
|
+
#onOverflowClick(direction: 'left'|'right'): () => void {
|
|
234
234
|
return (): void => {
|
|
235
|
-
this
|
|
236
|
-
const scrollWindow = this
|
|
235
|
+
this.#userHasManuallyScrolled = true;
|
|
236
|
+
const scrollWindow = this.#shadow.querySelector('.crumbs-window');
|
|
237
237
|
|
|
238
238
|
if (!scrollWindow) {
|
|
239
239
|
return;
|
|
@@ -252,34 +252,34 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
#renderOverflowButton(direction: 'left'|'right', disabled: boolean): LitHtml.TemplateResult {
|
|
256
256
|
const buttonStyles = LitHtml.Directives.classMap({
|
|
257
257
|
overflow: true,
|
|
258
258
|
[direction]: true,
|
|
259
|
-
hidden: this
|
|
259
|
+
hidden: this.#overflowing === false,
|
|
260
260
|
});
|
|
261
261
|
|
|
262
262
|
return LitHtml.html`
|
|
263
263
|
<button
|
|
264
264
|
class=${buttonStyles}
|
|
265
|
-
@click=${this
|
|
265
|
+
@click=${this.#onOverflowClick(direction)}
|
|
266
266
|
?disabled=${disabled}
|
|
267
267
|
aria-label="Scroll ${direction}"
|
|
268
268
|
>…</button>
|
|
269
269
|
`;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
|
|
273
|
-
const crumbs = crumbsToRender(this
|
|
272
|
+
async #render(): Promise<void> {
|
|
273
|
+
const crumbs = crumbsToRender(this.#crumbsData, this.#selectedDOMNode);
|
|
274
274
|
|
|
275
275
|
await coordinator.write('Breadcrumbs render', () => {
|
|
276
276
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
277
277
|
// clang-format off
|
|
278
278
|
LitHtml.render(LitHtml.html`
|
|
279
279
|
<nav class="crumbs" aria-label=${i18nString(UIStrings.breadcrumbs)}>
|
|
280
|
-
${this
|
|
280
|
+
${this.#renderOverflowButton('left', this.#userScrollPosition === 'start')}
|
|
281
281
|
|
|
282
|
-
<div class="crumbs-window" @scroll=${this
|
|
282
|
+
<div class="crumbs-window" @scroll=${this.#onCrumbsWindowScroll}>
|
|
283
283
|
<ul class="crumbs-scroll-container">
|
|
284
284
|
${crumbs.map(crumb => {
|
|
285
285
|
const crumbClasses = {
|
|
@@ -295,11 +295,11 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
295
295
|
<a href="#"
|
|
296
296
|
draggable=false
|
|
297
297
|
class="crumb-link"
|
|
298
|
-
@click=${this
|
|
299
|
-
@mousemove=${this
|
|
300
|
-
@mouseleave=${this
|
|
301
|
-
@focus=${this
|
|
302
|
-
@blur=${this
|
|
298
|
+
@click=${this.#onCrumbClick(crumb.node)}
|
|
299
|
+
@mousemove=${this.#onCrumbMouseMove(crumb.node)}
|
|
300
|
+
@mouseleave=${this.#onCrumbMouseLeave(crumb.node)}
|
|
301
|
+
@focus=${this.#onCrumbFocus(crumb.node)}
|
|
302
|
+
@blur=${this.#onCrumbBlur(crumb.node)}
|
|
303
303
|
><${NodeText.litTagName} data-node-title=${crumb.title.main} .data=${{
|
|
304
304
|
nodeTitle: crumb.title.main,
|
|
305
305
|
nodeId: crumb.title.extras.id,
|
|
@@ -309,16 +309,16 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
309
309
|
})}
|
|
310
310
|
</ul>
|
|
311
311
|
</div>
|
|
312
|
-
${this
|
|
312
|
+
${this.#renderOverflowButton('right', this.#userScrollPosition === 'end')}
|
|
313
313
|
</nav>
|
|
314
|
-
`, this
|
|
314
|
+
`, this.#shadow, { host: this });
|
|
315
315
|
// clang-format on
|
|
316
316
|
});
|
|
317
317
|
|
|
318
|
-
this
|
|
318
|
+
this.#checkForOverflow();
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
async #ensureSelectedNodeIsVisible(): Promise<void> {
|
|
322
322
|
/*
|
|
323
323
|
* If the user has manually scrolled the crumbs in either direction, we
|
|
324
324
|
* effectively hand control over the scrolling down to them. This is to
|
|
@@ -329,11 +329,11 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
329
329
|
* tree, we will auto-scroll that element into view, because we'll get new
|
|
330
330
|
* data and hence the flag will be reset.
|
|
331
331
|
*/
|
|
332
|
-
if (!this
|
|
332
|
+
if (!this.#selectedDOMNode || !this.#shadow || !this.#overflowing || this.#userHasManuallyScrolled) {
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
|
-
const activeCrumbId = this
|
|
336
|
-
const activeCrumb = this
|
|
335
|
+
const activeCrumbId = this.#selectedDOMNode.id;
|
|
336
|
+
const activeCrumb = this.#shadow.querySelector(`.crumb[data-node-id="${activeCrumbId}"]`);
|
|
337
337
|
|
|
338
338
|
if (activeCrumb) {
|
|
339
339
|
await coordinator.scroll(() => {
|
|
@@ -13,36 +13,36 @@ export interface ElementsPanelLinkData {
|
|
|
13
13
|
}
|
|
14
14
|
export class ElementsPanelLink extends HTMLElement {
|
|
15
15
|
static readonly litTagName = LitHtml.literal`devtools-elements-panel-link`;
|
|
16
|
-
|
|
16
|
+
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
#onElementRevealIconClick: ((event?: Event) => void) = () => {};
|
|
19
|
+
#onElementRevealIconMouseEnter: ((event?: Event) => void) = () => {};
|
|
20
|
+
#onElementRevealIconMouseLeave: ((event?: Event) => void) = () => {};
|
|
21
21
|
|
|
22
22
|
set data(data: ElementsPanelLinkData) {
|
|
23
|
-
this
|
|
24
|
-
this
|
|
25
|
-
this
|
|
26
|
-
this
|
|
23
|
+
this.#onElementRevealIconClick = data.onElementRevealIconClick;
|
|
24
|
+
this.#onElementRevealIconMouseEnter = data.onElementRevealIconMouseEnter;
|
|
25
|
+
this.#onElementRevealIconMouseLeave = data.onElementRevealIconMouseLeave;
|
|
26
|
+
this.#update();
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
this
|
|
29
|
+
#update(): void {
|
|
30
|
+
this.#render();
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
connectedCallback(): void {
|
|
34
|
-
this
|
|
34
|
+
this.#shadow.adoptedStyleSheets = [elementsPanelLinkStyles];
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
#render(): void {
|
|
38
38
|
// clang-format off
|
|
39
39
|
LitHtml.render(LitHtml.html`
|
|
40
40
|
<span
|
|
41
41
|
class="element-reveal-icon"
|
|
42
|
-
@click=${this
|
|
43
|
-
@mouseenter=${this
|
|
44
|
-
@mouseleave=${this
|
|
45
|
-
`, this
|
|
42
|
+
@click=${this.#onElementRevealIconClick}
|
|
43
|
+
@mouseenter=${this.#onElementRevealIconMouseEnter}
|
|
44
|
+
@mouseleave=${this.#onElementRevealIconMouseLeave}></span>
|
|
45
|
+
`, this.#shadow, {host: this});
|
|
46
46
|
// clang-format on
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -95,27 +95,27 @@ export interface LayoutPaneData {
|
|
|
95
95
|
|
|
96
96
|
export class LayoutPane extends HTMLElement {
|
|
97
97
|
static readonly litTagName = LitHtml.literal`devtools-layout-pane`;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
99
|
+
#settings: Readonly<Setting[]> = [];
|
|
100
|
+
#gridElements: Readonly<LayoutElement[]> = [];
|
|
101
|
+
#flexContainerElements?: Readonly<LayoutElement[]> = [];
|
|
102
102
|
|
|
103
103
|
constructor() {
|
|
104
104
|
super();
|
|
105
|
-
this
|
|
105
|
+
this.#shadow.adoptedStyleSheets = [
|
|
106
106
|
layoutPaneStyles,
|
|
107
107
|
inspectorCommonStyles,
|
|
108
108
|
];
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
set data(data: LayoutPaneData) {
|
|
112
|
-
this
|
|
113
|
-
this
|
|
114
|
-
this
|
|
115
|
-
this
|
|
112
|
+
this.#settings = data.settings;
|
|
113
|
+
this.#gridElements = data.gridElements;
|
|
114
|
+
this.#flexContainerElements = data.flexContainerElements;
|
|
115
|
+
this.#render();
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
#onSummaryKeyDown(event: KeyboardEvent): void {
|
|
119
119
|
if (!event.target) {
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
@@ -134,109 +134,109 @@ export class LayoutPane extends HTMLElement {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
#render(): void {
|
|
138
138
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
139
139
|
// clang-format off
|
|
140
140
|
render(html`
|
|
141
141
|
<details open>
|
|
142
|
-
<summary class="header" @keydown=${this
|
|
142
|
+
<summary class="header" @keydown=${this.#onSummaryKeyDown}>
|
|
143
143
|
${i18nString(UIStrings.grid)}
|
|
144
144
|
</summary>
|
|
145
145
|
<div class="content-section">
|
|
146
146
|
<h3 class="content-section-title">${i18nString(UIStrings.overlayDisplaySettings)}</h3>
|
|
147
147
|
<div class="select-settings">
|
|
148
|
-
${this
|
|
148
|
+
${this.#getEnumSettings().map(setting => this.#renderEnumSetting(setting))}
|
|
149
149
|
</div>
|
|
150
150
|
<div class="checkbox-settings">
|
|
151
|
-
${this
|
|
151
|
+
${this.#getBooleanSettings().map(setting => this.#renderBooleanSetting(setting))}
|
|
152
152
|
</div>
|
|
153
153
|
</div>
|
|
154
|
-
${this
|
|
154
|
+
${this.#gridElements ?
|
|
155
155
|
html`<div class="content-section">
|
|
156
156
|
<h3 class="content-section-title">
|
|
157
|
-
${this
|
|
157
|
+
${this.#gridElements.length ? i18nString(UIStrings.gridOverlays) : i18nString(UIStrings.noGridLayoutsFoundOnThisPage)}
|
|
158
158
|
</h3>
|
|
159
|
-
${this
|
|
159
|
+
${this.#gridElements.length ?
|
|
160
160
|
html`<div class="elements">
|
|
161
|
-
${this
|
|
161
|
+
${this.#gridElements.map(element => this.#renderElement(element))}
|
|
162
162
|
</div>` : ''}
|
|
163
163
|
</div>` : ''}
|
|
164
164
|
</details>
|
|
165
|
-
${this
|
|
165
|
+
${this.#flexContainerElements !== undefined ?
|
|
166
166
|
html`
|
|
167
167
|
<details open>
|
|
168
|
-
<summary class="header" @keydown=${this
|
|
168
|
+
<summary class="header" @keydown=${this.#onSummaryKeyDown}>
|
|
169
169
|
${i18nString(UIStrings.flexbox)}
|
|
170
170
|
</summary>
|
|
171
|
-
${this
|
|
171
|
+
${this.#flexContainerElements ?
|
|
172
172
|
html`<div class="content-section">
|
|
173
173
|
<h3 class="content-section-title">
|
|
174
|
-
${this
|
|
174
|
+
${this.#flexContainerElements.length ? i18nString(UIStrings.flexboxOverlays) : i18nString(UIStrings.noFlexboxLayoutsFoundOnThisPage)}
|
|
175
175
|
</h3>
|
|
176
|
-
${this
|
|
176
|
+
${this.#flexContainerElements.length ?
|
|
177
177
|
html`<div class="elements">
|
|
178
|
-
${this
|
|
178
|
+
${this.#flexContainerElements.map(element => this.#renderElement(element))}
|
|
179
179
|
</div>` : ''}
|
|
180
180
|
</div>` : ''}
|
|
181
181
|
</details>
|
|
182
182
|
`
|
|
183
183
|
: ''}
|
|
184
|
-
`, this
|
|
184
|
+
`, this.#shadow, {
|
|
185
185
|
host: this,
|
|
186
186
|
});
|
|
187
187
|
// clang-format on
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
|
|
191
|
-
return this
|
|
190
|
+
#getEnumSettings(): EnumSetting[] {
|
|
191
|
+
return this.#settings.filter(isEnumSetting);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
|
|
195
|
-
return this
|
|
194
|
+
#getBooleanSettings(): BooleanSetting[] {
|
|
195
|
+
return this.#settings.filter(isBooleanSetting);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
#onBooleanSettingChange(setting: BooleanSetting, event: HTMLInputElementEvent): void {
|
|
199
199
|
event.preventDefault();
|
|
200
200
|
this.dispatchEvent(new SettingChangedEvent(setting.name, event.target.checked));
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
|
|
203
|
+
#onEnumSettingChange(setting: EnumSetting, event: HTMLInputElementEvent): void {
|
|
204
204
|
event.preventDefault();
|
|
205
205
|
this.dispatchEvent(new SettingChangedEvent(setting.name, event.target.value));
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
#onElementToggle(element: LayoutElement, event: HTMLInputElementEvent): void {
|
|
209
209
|
event.preventDefault();
|
|
210
210
|
element.toggle(event.target.checked);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
|
|
213
|
+
#onElementClick(element: LayoutElement, event: HTMLInputElementEvent): void {
|
|
214
214
|
event.preventDefault();
|
|
215
215
|
element.reveal();
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
#onColorChange(element: LayoutElement, event: HTMLInputElementEvent): void {
|
|
219
219
|
event.preventDefault();
|
|
220
220
|
element.setColor(event.target.value);
|
|
221
|
-
this
|
|
221
|
+
this.#render();
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
|
|
224
|
+
#onElementMouseEnter(element: LayoutElement, event: HTMLInputElementEvent): void {
|
|
225
225
|
event.preventDefault();
|
|
226
226
|
element.highlight();
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
|
|
229
|
+
#onElementMouseLeave(element: LayoutElement, event: HTMLInputElementEvent): void {
|
|
230
230
|
event.preventDefault();
|
|
231
231
|
element.hideHighlight();
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
|
|
235
|
-
const onElementToggle = this
|
|
236
|
-
const onElementClick = this
|
|
237
|
-
const onColorChange = this
|
|
238
|
-
const onMouseEnter = this
|
|
239
|
-
const onMouseLeave = this
|
|
234
|
+
#renderElement(element: LayoutElement): LitHtml.TemplateResult {
|
|
235
|
+
const onElementToggle = this.#onElementToggle.bind(this, element);
|
|
236
|
+
const onElementClick = this.#onElementClick.bind(this, element);
|
|
237
|
+
const onColorChange = this.#onColorChange.bind(this, element);
|
|
238
|
+
const onMouseEnter = this.#onElementMouseEnter.bind(this, element);
|
|
239
|
+
const onMouseLeave = this.#onElementMouseLeave.bind(this, element);
|
|
240
240
|
const onColorLabelKeyUp = (event: KeyboardEvent): void => {
|
|
241
241
|
// Handle Enter and Space events to make the color picker accessible.
|
|
242
242
|
if (event.key !== 'Enter' && event.key !== ' ') {
|
|
@@ -275,16 +275,16 @@ export class LayoutPane extends HTMLElement {
|
|
|
275
275
|
// clang-format on
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
|
|
279
|
-
const onBooleanSettingChange = this
|
|
278
|
+
#renderBooleanSetting(setting: BooleanSetting): LitHtml.TemplateResult {
|
|
279
|
+
const onBooleanSettingChange = this.#onBooleanSettingChange.bind(this, setting);
|
|
280
280
|
return html`<label data-boolean-setting="true" class="checkbox-label" title=${setting.title}>
|
|
281
281
|
<input data-input="true" type="checkbox" .checked=${setting.value} @change=${onBooleanSettingChange} />
|
|
282
282
|
<span data-label="true">${setting.title}</span>
|
|
283
283
|
</label>`;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
|
|
287
|
-
const onEnumSettingChange = this
|
|
286
|
+
#renderEnumSetting(setting: EnumSetting): LitHtml.TemplateResult {
|
|
287
|
+
const onEnumSettingChange = this.#onEnumSettingChange.bind(this, setting);
|
|
288
288
|
return html`<label data-enum-setting="true" class="select-label" title=${setting.title}>
|
|
289
289
|
<select class="chrome-select" data-input="true" @change=${onEnumSettingChange}>
|
|
290
290
|
${
|
|
@@ -17,40 +17,40 @@ export interface NodeTextData {
|
|
|
17
17
|
export class NodeText extends HTMLElement {
|
|
18
18
|
static readonly litTagName = LitHtml.literal`devtools-node-text`;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
21
|
+
#nodeTitle: string = '';
|
|
22
|
+
#nodeId?: string = '';
|
|
23
|
+
#nodeClasses?: string[] = [];
|
|
24
24
|
|
|
25
25
|
connectedCallback(): void {
|
|
26
|
-
this
|
|
26
|
+
this.#shadow.adoptedStyleSheets = [nodeTextStyles];
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
set data(data: NodeTextData) {
|
|
30
|
-
this
|
|
31
|
-
this
|
|
32
|
-
this
|
|
33
|
-
this
|
|
30
|
+
this.#nodeTitle = data.nodeTitle;
|
|
31
|
+
this.#nodeId = data.nodeId;
|
|
32
|
+
this.#nodeClasses = data.nodeClasses;
|
|
33
|
+
this.#render();
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
const hasId = Boolean(this
|
|
38
|
-
const hasNodeClasses = Boolean(this
|
|
36
|
+
#render(): void {
|
|
37
|
+
const hasId = Boolean(this.#nodeId);
|
|
38
|
+
const hasNodeClasses = Boolean(this.#nodeClasses && this.#nodeClasses.length > 0);
|
|
39
39
|
|
|
40
40
|
const parts = [
|
|
41
|
-
html`<span class="node-label-name">${this
|
|
41
|
+
html`<span class="node-label-name">${this.#nodeTitle}</span>`,
|
|
42
42
|
];
|
|
43
43
|
|
|
44
|
-
if (this
|
|
44
|
+
if (this.#nodeId) {
|
|
45
45
|
const classes = LitHtml.Directives.classMap({
|
|
46
46
|
'node-label-id': true,
|
|
47
47
|
'node-multiple-descriptors': hasNodeClasses,
|
|
48
48
|
});
|
|
49
|
-
parts.push(html`<span class=${classes}>#${CSS.escape(this
|
|
49
|
+
parts.push(html`<span class=${classes}>#${CSS.escape(this.#nodeId)}</span>`);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
if (this
|
|
53
|
-
const text = this
|
|
52
|
+
if (this.#nodeClasses && this.#nodeClasses.length > 0) {
|
|
53
|
+
const text = this.#nodeClasses.map(c => `.${CSS.escape(c)}`).join('');
|
|
54
54
|
const classes = LitHtml.Directives.classMap({
|
|
55
55
|
'node-label-class': true,
|
|
56
56
|
'node-multiple-descriptors': hasId,
|
|
@@ -62,7 +62,7 @@ export class NodeText extends HTMLElement {
|
|
|
62
62
|
// clang-format off
|
|
63
63
|
render(html`
|
|
64
64
|
${parts}
|
|
65
|
-
`, this
|
|
65
|
+
`, this.#shadow, {
|
|
66
66
|
host: this,
|
|
67
67
|
});
|
|
68
68
|
// clang-format on
|