@dxos/react-ui-syntax-highlighter 0.8.4-main.ef1bc66f44 → 0.8.4-main.f466a3d56e
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/LICENSE +102 -5
- package/dist/lib/browser/index.mjs +169 -66
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +169 -66
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/JsonHighlighter/JsonHighlighter.d.ts +23 -0
- package/dist/types/src/JsonHighlighter/JsonHighlighter.d.ts.map +1 -0
- package/dist/types/src/JsonHighlighter/JsonHighlighter.stories.d.ts +14 -0
- package/dist/types/src/JsonHighlighter/JsonHighlighter.stories.d.ts.map +1 -0
- package/dist/types/src/JsonHighlighter/index.d.ts +2 -0
- package/dist/types/src/JsonHighlighter/index.d.ts.map +1 -0
- package/dist/types/src/Syntax/Syntax.d.ts +49 -0
- package/dist/types/src/Syntax/Syntax.d.ts.map +1 -0
- package/dist/types/src/Syntax/Syntax.stories.d.ts +23 -0
- package/dist/types/src/Syntax/Syntax.stories.d.ts.map +1 -0
- package/dist/types/src/Syntax/index.d.ts +2 -0
- package/dist/types/src/Syntax/index.d.ts.map +1 -0
- package/dist/types/src/SyntaxHighlighter/SyntaxHighlighter.d.ts +12 -4
- package/dist/types/src/SyntaxHighlighter/SyntaxHighlighter.d.ts.map +1 -1
- package/dist/types/src/SyntaxHighlighter/SyntaxHighlighter.stories.d.ts +6 -1
- package/dist/types/src/SyntaxHighlighter/SyntaxHighlighter.stories.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -16
- package/src/JsonHighlighter/JsonHighlighter.stories.tsx +65 -0
- package/src/JsonHighlighter/JsonHighlighter.tsx +47 -0
- package/src/JsonHighlighter/index.ts +5 -0
- package/src/Syntax/Syntax.stories.tsx +99 -0
- package/src/Syntax/Syntax.tsx +229 -0
- package/src/{Json → Syntax}/index.ts +1 -1
- package/src/SyntaxHighlighter/SyntaxHighlighter.stories.tsx +11 -10
- package/src/SyntaxHighlighter/SyntaxHighlighter.tsx +93 -42
- package/src/index.ts +2 -1
- package/dist/types/src/Json/Json.d.ts +0 -26
- package/dist/types/src/Json/Json.d.ts.map +0 -1
- package/dist/types/src/Json/Json.stories.d.ts +0 -22
- package/dist/types/src/Json/Json.stories.d.ts.map +0 -1
- package/dist/types/src/Json/index.d.ts +0 -2
- package/dist/types/src/Json/index.d.ts.map +0 -1
- package/src/Json/Json.stories.tsx +0 -106
- package/src/Json/Json.tsx +0 -80
|
@@ -2,62 +2,113 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { Children } from 'react';
|
|
6
6
|
import { type SyntaxHighlighterProps as NaturalSyntaxHighlighterProps } from 'react-syntax-highlighter';
|
|
7
7
|
import NativeSyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism-async-light';
|
|
8
8
|
import { coldarkDark as dark, coldarkCold as light } from 'react-syntax-highlighter/dist/esm/styles/prism';
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { Clipboard, useThemeContext } from '@dxos/react-ui';
|
|
11
|
+
import { composable, composableProps } from '@dxos/ui-theme';
|
|
12
12
|
|
|
13
13
|
const zeroWidthSpace = '\u200b';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
const languages = {
|
|
16
|
+
js: 'javascript',
|
|
17
|
+
ts: 'typescript',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type SyntaxHighlighterProps = Pick<
|
|
21
|
+
NaturalSyntaxHighlighterProps,
|
|
22
|
+
| 'language'
|
|
23
|
+
| 'renderer'
|
|
24
|
+
| 'showLineNumbers'
|
|
25
|
+
| 'showInlineLineNumbers'
|
|
26
|
+
| 'startingLineNumber'
|
|
27
|
+
| 'wrapLines'
|
|
28
|
+
| 'wrapLongLines'
|
|
29
|
+
| 'PreTag'
|
|
30
|
+
> & {
|
|
31
|
+
themeStyle?: NaturalSyntaxHighlighterProps['style'];
|
|
32
|
+
fallback?: string;
|
|
33
|
+
copyButton?: boolean;
|
|
34
|
+
};
|
|
20
35
|
|
|
21
36
|
/**
|
|
37
|
+
* Inline, non-scrolling wrapper around `react-syntax-highlighter`.
|
|
38
|
+
*
|
|
39
|
+
* Use directly for small snippets (e.g. inside markdown code blocks).
|
|
40
|
+
* For scrollable panels, compose with `Syntax.Viewport`.
|
|
41
|
+
*
|
|
22
42
|
* NOTE: Using `light-async` version directly from dist to avoid any chance of the heavy one being loaded.
|
|
23
43
|
* The lightweight version will load specific language parsers asynchronously.
|
|
24
44
|
*
|
|
25
45
|
* https://github.com/react-syntax-highlighter/react-syntax-highlighter
|
|
26
46
|
* https://react-syntax-highlighter.github.io/react-syntax-highlighter/demo/prism.html
|
|
27
47
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
export const SyntaxHighlighter = composable<HTMLDivElement, SyntaxHighlighterProps>(
|
|
49
|
+
(
|
|
50
|
+
{
|
|
51
|
+
classNames,
|
|
52
|
+
className,
|
|
53
|
+
children,
|
|
54
|
+
role,
|
|
55
|
+
style,
|
|
56
|
+
themeStyle,
|
|
57
|
+
language = 'text',
|
|
58
|
+
fallback = zeroWidthSpace,
|
|
59
|
+
copyButton,
|
|
60
|
+
...nativeProps
|
|
61
|
+
},
|
|
62
|
+
forwardedRef,
|
|
63
|
+
) => {
|
|
64
|
+
const { themeMode } = useThemeContext();
|
|
65
|
+
const source = Children.toArray(children).join('') || fallback;
|
|
66
|
+
|
|
67
|
+
const hasCustomTheme = themeStyle && typeof themeStyle === 'object' && Object.keys(themeStyle).length > 0;
|
|
68
|
+
const prismTheme = hasCustomTheme ? themeStyle : themeMode === 'dark' ? dark : light;
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<div
|
|
72
|
+
{...composableProps(
|
|
73
|
+
{ classNames, className, role, style },
|
|
74
|
+
{
|
|
75
|
+
role: 'none',
|
|
76
|
+
classNames: copyButton && 'relative group',
|
|
77
|
+
},
|
|
78
|
+
)}
|
|
79
|
+
ref={forwardedRef}
|
|
52
80
|
>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
81
|
+
<NativeSyntaxHighlighter
|
|
82
|
+
language={languages[language as keyof typeof languages] || language}
|
|
83
|
+
style={prismTheme}
|
|
84
|
+
customStyle={{
|
|
85
|
+
background: 'unset',
|
|
86
|
+
border: 'none',
|
|
87
|
+
boxShadow: 'none',
|
|
88
|
+
padding: 0,
|
|
89
|
+
margin: 0,
|
|
90
|
+
}}
|
|
91
|
+
{...nativeProps}
|
|
92
|
+
>
|
|
93
|
+
{/* Non-empty fallback prevents collapse. */}
|
|
94
|
+
{source}
|
|
95
|
+
</NativeSyntaxHighlighter>
|
|
59
96
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
97
|
+
{copyButton && (
|
|
98
|
+
<div className='pointer-events-none absolute top-1 right-1 z-10 opacity-0 group-hover:opacity-100 focus-within:opacity-100'>
|
|
99
|
+
<Clipboard.Provider>
|
|
100
|
+
<Clipboard.IconButton
|
|
101
|
+
value={source}
|
|
102
|
+
variant='ghost'
|
|
103
|
+
size={4}
|
|
104
|
+
classNames='pointer-events-auto aspect-square rounded-sm'
|
|
105
|
+
/>
|
|
106
|
+
</Clipboard.Provider>
|
|
107
|
+
</div>
|
|
108
|
+
)}
|
|
109
|
+
</div>
|
|
110
|
+
);
|
|
111
|
+
},
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
SyntaxHighlighter.displayName = 'SyntaxHighlighter';
|
package/src/index.ts
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
-
import { type CreateReplacerProps } from '@dxos/util';
|
|
4
|
-
export type JsonProps = ThemedClassName<{
|
|
5
|
-
data?: any;
|
|
6
|
-
filter?: boolean;
|
|
7
|
-
replacer?: CreateReplacerProps;
|
|
8
|
-
testId?: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const Json: React.ForwardRefExoticComponent<Omit<{
|
|
11
|
-
data?: any;
|
|
12
|
-
filter?: boolean;
|
|
13
|
-
replacer?: CreateReplacerProps;
|
|
14
|
-
testId?: string;
|
|
15
|
-
}, "className"> & {
|
|
16
|
-
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
17
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
export declare const JsonFilter: React.ForwardRefExoticComponent<Omit<{
|
|
19
|
-
data?: any;
|
|
20
|
-
filter?: boolean;
|
|
21
|
-
replacer?: CreateReplacerProps;
|
|
22
|
-
testId?: string;
|
|
23
|
-
}, "className"> & {
|
|
24
|
-
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
25
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
-
//# sourceMappingURL=Json.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Json.d.ts","sourceRoot":"","sources":["../../../../src/Json/Json.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAS,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,KAAK,mBAAmB,EAAiC,MAAM,YAAY,CAAC;AAIrF,MAAM,MAAM,SAAS,GAAG,eAAe,CAAC;IACtC,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH,eAAO,MAAM,IAAI;WANR,GAAG;aACD,OAAO;eACL,mBAAmB;aACrB,MAAM;;;wCAmBf,CAAC;AAEH,eAAO,MAAM,UAAU;WAxBd,GAAG;aACD,OAAO;eACL,mBAAmB;aACrB,MAAM;;;wCA8DhB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Json } from './Json';
|
|
4
|
-
declare const meta: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: React.ForwardRefExoticComponent<Omit<{
|
|
7
|
-
data?: any;
|
|
8
|
-
filter?: boolean;
|
|
9
|
-
replacer?: import("@dxos/util").CreateReplacerProps;
|
|
10
|
-
testId?: string;
|
|
11
|
-
}, "className"> & {
|
|
12
|
-
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
13
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
-
decorators: import("@storybook/react").Decorator[];
|
|
15
|
-
};
|
|
16
|
-
export default meta;
|
|
17
|
-
type Story = StoryObj<typeof Json>;
|
|
18
|
-
export declare const Default: Story;
|
|
19
|
-
export declare const Filter: Story;
|
|
20
|
-
export declare const Large: Story;
|
|
21
|
-
export declare const Cycle: Story;
|
|
22
|
-
//# sourceMappingURL=Json.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Json.stories.d.ts","sourceRoot":"","sources":["../../../../src/Json/Json.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA6C9B,QAAA,MAAM,IAAI;;;;;;;;;;;CAImB,CAAC;AAE9B,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAInC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAWnB,CAAC;AAUF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Json/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import { faker } from '@dxos/random';
|
|
9
|
-
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
10
|
-
|
|
11
|
-
import { Json } from './Json';
|
|
12
|
-
|
|
13
|
-
faker.seed(0);
|
|
14
|
-
|
|
15
|
-
const createNode = () => {
|
|
16
|
-
const data: Record<string, any> = {};
|
|
17
|
-
const keys = [...Array(faker.number.int({ min: 1, max: 5 }))].map(() => faker.lorem.word());
|
|
18
|
-
keys.forEach((key) => {
|
|
19
|
-
switch (faker.helpers.arrayElement(['object', 'string', 'number', 'boolean', 'null'])) {
|
|
20
|
-
case 'object':
|
|
21
|
-
data[key] = createNode();
|
|
22
|
-
break;
|
|
23
|
-
case 'string':
|
|
24
|
-
data[key] = faker.lorem.word();
|
|
25
|
-
break;
|
|
26
|
-
case 'number':
|
|
27
|
-
data[key] = faker.number.int();
|
|
28
|
-
break;
|
|
29
|
-
case 'boolean':
|
|
30
|
-
data[key] = faker.datatype.boolean();
|
|
31
|
-
break;
|
|
32
|
-
case 'null':
|
|
33
|
-
data[key] = null;
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const createData = ({ depth = 2, children = 3 } = {}): any => {
|
|
42
|
-
const createChildren = (root: any, d = 0) => {
|
|
43
|
-
if (d < depth) {
|
|
44
|
-
const num = faker.number.int({ min: 1, max: Math.round(Math.log(depth + 1 - d) * children) });
|
|
45
|
-
root.children = [...new Array(num)].map(() => {
|
|
46
|
-
return createChildren(createNode(), d + 1);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return root;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
return createChildren(createNode());
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const meta = {
|
|
57
|
-
title: 'ui/react-ui-syntax-highlighter/Json',
|
|
58
|
-
component: Json,
|
|
59
|
-
decorators: [withTheme(), withLayout({ layout: 'column' })],
|
|
60
|
-
} satisfies Meta<typeof Json>;
|
|
61
|
-
|
|
62
|
-
export default meta;
|
|
63
|
-
|
|
64
|
-
type Story = StoryObj<typeof Json>;
|
|
65
|
-
|
|
66
|
-
const data = createData();
|
|
67
|
-
|
|
68
|
-
export const Default: Story = {
|
|
69
|
-
args: {
|
|
70
|
-
classNames: 'text-sm',
|
|
71
|
-
data,
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export const Filter: Story = {
|
|
76
|
-
args: {
|
|
77
|
-
classNames: 'text-sm',
|
|
78
|
-
filter: true,
|
|
79
|
-
data,
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const Large: Story = {
|
|
84
|
-
args: {
|
|
85
|
-
classNames: 'text-sm',
|
|
86
|
-
filter: true,
|
|
87
|
-
data: createData({ depth: 5 }),
|
|
88
|
-
replacer: {
|
|
89
|
-
maxDepth: 3,
|
|
90
|
-
maxArrayLen: 10,
|
|
91
|
-
maxStringLen: 10,
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
const cycle: any = {
|
|
97
|
-
a: 1,
|
|
98
|
-
b: [],
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
cycle.b.push(cycle);
|
|
102
|
-
|
|
103
|
-
// NOTE: Storybook args cannot be circular.
|
|
104
|
-
export const Cycle: Story = {
|
|
105
|
-
render: () => <Json data={cycle} />,
|
|
106
|
-
};
|
package/src/Json/Json.tsx
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
// TODO(burdon): Use to jsonpath-plus.
|
|
6
|
-
import jp from 'jsonpath';
|
|
7
|
-
import React, { forwardRef, useEffect, useState } from 'react';
|
|
8
|
-
|
|
9
|
-
import { Input, type ThemedClassName } from '@dxos/react-ui';
|
|
10
|
-
import { type CreateReplacerProps, createReplacer, safeStringify } from '@dxos/util';
|
|
11
|
-
|
|
12
|
-
import { SyntaxHighlighter } from '../SyntaxHighlighter';
|
|
13
|
-
|
|
14
|
-
export type JsonProps = ThemedClassName<{
|
|
15
|
-
data?: any;
|
|
16
|
-
filter?: boolean;
|
|
17
|
-
replacer?: CreateReplacerProps;
|
|
18
|
-
testId?: string;
|
|
19
|
-
}>;
|
|
20
|
-
|
|
21
|
-
export const Json = forwardRef<HTMLDivElement, JsonProps>((props, forwardedRef) => {
|
|
22
|
-
if (props.filter) {
|
|
23
|
-
return <JsonFilter {...props} />;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const { classNames, data, replacer, testId } = props;
|
|
27
|
-
return (
|
|
28
|
-
<SyntaxHighlighter
|
|
29
|
-
language='json'
|
|
30
|
-
classNames={['is-full overflow-y-auto text-sm', classNames]}
|
|
31
|
-
data-testid={testId}
|
|
32
|
-
ref={forwardedRef}
|
|
33
|
-
>
|
|
34
|
-
{safeStringify(data, replacer && createReplacer(replacer), 2)}
|
|
35
|
-
</SyntaxHighlighter>
|
|
36
|
-
);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export const JsonFilter = forwardRef<HTMLDivElement, JsonProps>(
|
|
40
|
-
({ classNames, data: initialData, replacer, testId }, forwardedRef) => {
|
|
41
|
-
const [data, setData] = useState(initialData);
|
|
42
|
-
const [text, setText] = useState('');
|
|
43
|
-
const [error, setError] = useState<Error | null>(null);
|
|
44
|
-
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
if (!initialData || !text.trim().length) {
|
|
47
|
-
setData(initialData);
|
|
48
|
-
} else {
|
|
49
|
-
try {
|
|
50
|
-
setData(jp.query(initialData, text));
|
|
51
|
-
setError(null);
|
|
52
|
-
} catch (err) {
|
|
53
|
-
setData(initialData);
|
|
54
|
-
setError(err as Error);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}, [initialData, text]); // TODO(burdon): Need structural diff.
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<div className='flex flex-col bs-full overflow-hidden' ref={forwardedRef}>
|
|
61
|
-
<Input.Root validationValence={error ? 'error' : 'success'}>
|
|
62
|
-
<Input.TextInput
|
|
63
|
-
classNames={['p-1 pli-2 font-mono', error && 'border-rose-500']}
|
|
64
|
-
variant='subdued'
|
|
65
|
-
value={text}
|
|
66
|
-
placeholder='JSONPath (e.g., $.graph.nodes)'
|
|
67
|
-
onChange={(event) => setText(event.target.value)}
|
|
68
|
-
/>
|
|
69
|
-
</Input.Root>
|
|
70
|
-
<SyntaxHighlighter
|
|
71
|
-
language='json'
|
|
72
|
-
classNames={['is-full overflow-y-auto text-sm', classNames]}
|
|
73
|
-
data-testid={testId}
|
|
74
|
-
>
|
|
75
|
-
{safeStringify(data, replacer && createReplacer(replacer), 2)}
|
|
76
|
-
</SyntaxHighlighter>
|
|
77
|
-
</div>
|
|
78
|
-
);
|
|
79
|
-
},
|
|
80
|
-
);
|