Skip to content

Commit 7437843

Browse files
committed
hyparquet demo: use json viewer for metadata
1 parent 15799cf commit 7437843

File tree

8 files changed

+16
-7
lines changed

8 files changed

+16
-7
lines changed

hightable/eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export default tseslint.config(
4848
eqeqeq: 'error',
4949
'func-style': ['error', 'declaration'],
5050
indent: ['error', 2],
51+
'key-spacing': 'error',
5152
'no-constant-condition': 'off',
5253
'no-extra-parens': 'error',
5354
'no-multi-spaces': 'error',

hightable/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"devDependencies": {
2323
"@types/react": "19.1.4",
24-
"@types/react-dom": "19.1.4",
24+
"@types/react-dom": "19.1.5",
2525
"@vitejs/plugin-react": "4.4.1",
2626
"@vitest/coverage-v8": "3.1.3",
2727
"eslint": "9.26.0",

hyparquet/eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export default tseslint.config(
4848
eqeqeq: 'error',
4949
'func-style': ['error', 'declaration'],
5050
indent: ['error', 2],
51+
'key-spacing': 'error',
5152
'no-constant-condition': 'off',
5253
'no-extra-parens': 'error',
5354
'no-multi-spaces': 'error',

hyparquet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"devDependencies": {
2525
"@types/react": "19.1.4",
26-
"@types/react-dom": "19.1.4",
26+
"@types/react-dom": "19.1.5",
2727
"@vitejs/plugin-react": "4.4.1",
2828
"@vitest/coverage-v8": "3.1.3",
2929
"eslint": "9.26.0",

hyparquet/src/ParquetMetadata.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { FileMetaData, toJson } from 'hyparquet'
2-
import { ReactNode } from 'react'
1+
import type { FileMetaData } from 'hyparquet'
2+
import { Json } from 'hyperparam'
3+
import type { ReactNode } from 'react'
34

45
interface MetadataProps {
56
metadata: FileMetaData
@@ -12,7 +13,7 @@ interface MetadataProps {
1213
* @returns {ReactNode}
1314
*/
1415
export default function ParquetMetadata({ metadata }: MetadataProps): ReactNode {
15-
return <code className='viewer'>
16-
{JSON.stringify(toJson(metadata), null, ' ')}
16+
return <code className='viewer json'>
17+
<Json json={metadata} />
1718
</code>
1819
}

hyparquet/src/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,3 +311,8 @@ input[type="file"] {
311311
min-width: 0;
312312
width: 0;
313313
}
314+
315+
.json {
316+
background-color: #22222b;
317+
padding-left: 20px;
318+
}

icebird/eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export default tseslint.config(
4848
eqeqeq: 'error',
4949
'func-style': ['error', 'declaration'],
5050
indent: ['error', 2],
51+
'key-spacing': 'error',
5152
'no-constant-condition': 'off',
5253
'no-extra-parens': 'error',
5354
'no-multi-spaces': 'error',

icebird/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"devDependencies": {
2424
"@types/react": "19.1.4",
25-
"@types/react-dom": "19.1.4",
25+
"@types/react-dom": "19.1.5",
2626
"@vitejs/plugin-react": "4.4.1",
2727
"@vitest/coverage-v8": "3.1.3",
2828
"eslint": "9.26.0",

0 commit comments

Comments
 (0)