Skip to content

Commit 3b90dfa

Browse files
authored
update react-json-view (#8083)
* update react-json-view * revert
1 parent d93177d commit 3b90dfa

File tree

4 files changed

+101
-135
lines changed

4 files changed

+101
-135
lines changed

package-lock.json

Lines changed: 96 additions & 128 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@kittycad/lib": "^2.0.34",
3535
"@lezer/highlight": "^1.2.1",
3636
"@lezer/lr": "^1.4.1",
37+
"@microlink/react-json-view": "^1.27.0",
3738
"@million/lint": "^1.0.14",
3839
"@react-hook/resize-observer": "^2.0.1",
3940
"@replit/codemirror-interact": "^6.3.1",
@@ -61,7 +62,6 @@
6162
"react-dom": "^18.2.0",
6263
"react-hot-toast": "^2.5.2",
6364
"react-hotkeys-hook": "^4.6.1",
64-
"react-json-view": "^1.21.3",
6565
"react-modal": "^3.16.3",
6666
"react-modal-promise": "^1.0.2",
6767
"react-router-dom": "^6.28.0",

src/components/ModelingSidebar/ModelingPanes/LoggingPanes.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
import ReactJson from 'react-json-view'
1+
import ReactJsonView from '@microlink/react-json-view'
22

33
import { useResolvedTheme } from '@src/hooks/useResolvedTheme'
44
import { useKclContext } from '@src/lang/KclProvider'
55

6-
const ReactJsonTypeHack = ReactJson as any
7-
86
export const LogsPane = () => {
97
const theme = useResolvedTheme()
108
const { logs } = useKclContext()
119
return (
1210
<div className="overflow-hidden">
1311
<div className="absolute inset-0 p-2 flex flex-col overflow-auto">
14-
<ReactJsonTypeHack
12+
<ReactJsonView
1513
src={logs}
1614
collapsed={1}
1715
collapseStringsAfterLength={60}

src/components/ModelingSidebar/ModelingPanes/MemoryPane.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useMemo } from 'react'
22
import toast from 'react-hot-toast'
3-
import ReactJson from 'react-json-view'
3+
import ReactJsonView from '@microlink/react-json-view'
44

55
import type { ExtrudeSurface } from '@rust/kcl-lib/bindings/ExtrudeSurface'
66
import type { Path } from '@rust/kcl-lib/bindings/Path'
@@ -55,7 +55,7 @@ export const MemoryPane = () => {
5555
<div className="h-full relative">
5656
<div className="absolute inset-0 p-2 flex flex-col items-start">
5757
<div className="overflow-auto h-full w-full pb-12">
58-
<ReactJson
58+
<ReactJsonView
5959
src={ProcessedMemory}
6060
collapsed={1}
6161
collapseStringsAfterLength={60}

0 commit comments

Comments
 (0)