11import type {
2- RendererContext ,
3- OutputItem
4- }
5- from 'vscode-notebook-renderer' ;
6- import { OutputLoader } from './outputLoader' ;
2+ OutputItem , RendererContext
3+ } from 'vscode-notebook-renderer' ;
4+ import { OutputLoader } from './outputLoader' ;
75const aq = require ( 'arquero' ) ;
86const inputs = require ( '@observablehq/inputs' ) ;
97
@@ -51,7 +49,7 @@ export function render(output: IRenderInfo) {
5149 }
5250 else {
5351 // output text in pre/code tags
54- output . container . innerHTML = `<pre
52+ output . container . innerHTML = `<pre
5553 style="max-height: 300px; white-space: pre-wrap; tab-size: 2; overflow: auto;">
5654 <code style="display: block; white-space: pre-wrap;">${ data } </code>
5755 </pre>` ;
@@ -77,7 +75,7 @@ if (module.hot) {
7775
7876 if ( typeof data . size === 'number' ) {
7977 // map or set
80- return data . size ;
78+ return data . size ;
8179 }
8280
8381 if ( typeof data . numRows === 'function' ) {
@@ -102,18 +100,26 @@ function addStyles(document: HTMLDocument): HTMLStyleElement {
102100 margin: 0px !important;
103101 }
104102
103+ tbody tr:hover {
104+ box-shadow: inset 0 0 1500px 100px rgba(255, 255, 255, 0.1);
105+ }
106+
107+ .vscode-light tbody tr:hover {
108+ box-shadow: inset 0 0 1500px 100px rgba(0, 0, 0, 0.1);
109+ }
110+
105111 .data-table form table thead th {
106112 background-color: var(--vscode-editor-background) !important;
107113 }
108114
109115 thead th {
110116 box-shadow: 0 1px 0 var(--vscode-panel-border) !important;
111117 }
112-
118+
113119 th {
114120 text-align: left !important;
115121 }
116122 ` ;
117-
123+
118124 return styles ;
119125}
0 commit comments