Skip to content

Commit ee17286

Browse files
authored
export built hyperparam CSS (#185)
* export built hyperparam CSS * let pass class name to hightable via new config param, upgrade hightable, avoid passing default stringify which is useless
1 parent e5aa823 commit ee17286

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"types": "./lib/index.d.ts",
1616
"import": "./lib/index.es.min.js",
1717
"require": "./lib/index.umd.min.js"
18-
}
18+
},
19+
"./hyperparam.css": "./lib/hyperparam.css"
1920
},
2021
"bin": {
2122
"hyp": "bin/cli.js",
@@ -47,7 +48,7 @@
4748
"watch:url": "NODE_ENV=development nodemon bin/cli.js https://hyperparam.blob.core.windows.net/hyperparam/starcoderdata-js-00000-of-00065.parquet"
4849
},
4950
"dependencies": {
50-
"hightable": "0.13.1",
51+
"hightable": "0.13.2",
5152
"hyparquet": "1.10.1",
5253
"hyparquet-compressors": "1.1.1",
5354
"icebird": "0.1.9",

src/components/Page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { Source } from '../lib/sources/types.js'
2-
import { BreadcrumbConfig } from './Breadcrumb.js'
32
import Cell from './Cell.js'
43
import File, { FileConfig } from './File.js'
54
import Folder from './Folder.js'
65

7-
export type PageConfig = FileConfig & BreadcrumbConfig
6+
export type PageConfig = FileConfig
87
export interface Navigation {
98
col?: number
109
row?: number

src/components/viewers/ParquetView.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
import HighTable, { DataFrame, rowCache, stringify } from 'hightable'
1+
import HighTable, { DataFrame, rowCache } from 'hightable'
22
import { asyncBufferFromUrl, parquetMetadataAsync } from 'hyparquet'
33
import React, { useCallback, useEffect, useState } from 'react'
44
import { RoutesConfig, appendSearchParams } from '../../lib/routes.js'
55
import { FileSource } from '../../lib/sources/types.js'
66
import { parquetDataFrame } from '../../lib/tableProvider.js'
7+
import { cn } from '../../lib/utils.js'
78
import styles from '../../styles/ParquetView.module.css'
89
import { Spinner } from '../Layout.js'
910
import CellPanel from './CellPanel.js'
1011
import ContentHeader, { ContentSize } from './ContentHeader.js'
1112
import SlidePanel, { SlidePanelConfig } from './SlidePanel.js'
1213

13-
export type ParquetViewConfig = SlidePanelConfig & RoutesConfig
14+
interface HighTableConfig {
15+
hightable?: {
16+
className?: string;
17+
}
18+
}
19+
export type ParquetViewConfig = SlidePanelConfig & RoutesConfig & HighTableConfig
1420

1521
interface ViewerProps {
1622
source: FileSource
@@ -102,8 +108,7 @@ export default function ParquetView({ source, setProgress, setError, config }: V
102108
onDoubleClickCell={onDoubleClickCell}
103109
onMouseDownCell={onMouseDownCell}
104110
onError={setError}
105-
className={styles.hightable}
106-
stringify={stringify}
111+
className={cn(styles.hightable, config?.hightable?.className)}
107112
/>}
108113

109114
{isLoading && <div className='center'><Spinner /></div>}

0 commit comments

Comments
 (0)