@dxos/react-ui-syntax-highlighter 0.8.4-main.dedc0f3 → 0.8.4-main.ead640a

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-syntax-highlighter",
3
- "version": "0.8.4-main.dedc0f3",
3
+ "version": "0.8.4-main.ead640a",
4
4
  "description": "A syntax highlighter wrapper.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -31,23 +31,23 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/jsonpath": "^0.2.4",
34
- "@types/react": "~18.2.0",
35
- "@types/react-dom": "~18.2.0",
34
+ "@types/react": "~19.2.2",
35
+ "@types/react-dom": "~19.2.1",
36
36
  "@types/react-syntax-highlighter": "^15.5.13",
37
- "react": "~18.2.0",
38
- "react-dom": "~18.2.0",
39
- "vite": "7.1.1",
40
- "@dxos/random": "0.8.4-main.dedc0f3",
41
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
42
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3",
43
- "@dxos/storybook-utils": "0.8.4-main.dedc0f3",
44
- "@dxos/util": "0.8.4-main.dedc0f3"
37
+ "react": "~19.2.0",
38
+ "react-dom": "~19.2.0",
39
+ "vite": "7.1.9",
40
+ "@dxos/random": "0.8.4-main.ead640a",
41
+ "@dxos/storybook-utils": "0.8.4-main.ead640a",
42
+ "@dxos/util": "0.8.4-main.ead640a",
43
+ "@dxos/react-ui": "0.8.4-main.ead640a",
44
+ "@dxos/react-ui-theme": "0.8.4-main.ead640a"
45
45
  },
46
46
  "peerDependencies": {
47
- "react": "~18.2.0",
48
- "react-dom": "~18.2.0",
49
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
50
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3"
47
+ "react": "^19.0.0",
48
+ "react-dom": "^19.0.0",
49
+ "@dxos/react-ui": "0.8.4-main.ead640a",
50
+ "@dxos/react-ui-theme": "0.8.4-main.ead640a"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
@@ -2,12 +2,10 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
 
9
7
  import { faker } from '@dxos/random';
10
- import { ColumnContainer, withLayout, withTheme } from '@dxos/storybook-utils';
8
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
11
9
 
12
10
  import { Json } from './Json';
13
11
 
@@ -57,7 +55,7 @@ const createData = ({ depth = 2, children = 3 } = {}): any => {
57
55
  const meta = {
58
56
  title: 'ui/react-ui-syntax-highlighter/Json',
59
57
  component: Json,
60
- decorators: [withTheme, withLayout({ fullscreen: true, Container: ColumnContainer })],
58
+ decorators: [withTheme, withLayout({ container: 'column' })],
61
59
  } satisfies Meta<typeof Json>;
62
60
 
63
61
  export default meta;
package/src/Json/Json.tsx CHANGED
@@ -10,7 +10,7 @@ import { Input, type ThemedClassName } from '@dxos/react-ui';
10
10
 
11
11
  import { SyntaxHighlighter } from '../SyntaxHighlighter';
12
12
 
13
- const defaultClassNames = '!m-0 grow overflow-y-auto';
13
+ const defaultClassNames = '!m-0 grow overflow-y-auto text-sm';
14
14
 
15
15
  export type JsonProps = ThemedClassName<{
16
16
  data?: any;
@@ -2,11 +2,9 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
 
9
- import { withTheme } from '@dxos/storybook-utils';
7
+ import { withTheme } from '@dxos/react-ui/testing';
10
8
  import { trim } from '@dxos/util';
11
9
 
12
10
  import { SyntaxHighlighter } from './SyntaxHighlighter';
@@ -25,6 +25,7 @@ export type SyntaxHighlighterProps = ThemedClassName<
25
25
  * https://github.com/react-syntax-highlighter/react-syntax-highlighter
26
26
  * https://react-syntax-highlighter.github.io/react-syntax-highlighter/demo/prism.html
27
27
  */
28
+ // TODO(burdon): Replace with react-ui-editor (and reuse styles).
28
29
  export const SyntaxHighlighter = ({
29
30
  classNames,
30
31
  children,
@@ -35,7 +36,7 @@ export const SyntaxHighlighter = ({
35
36
  const { themeMode } = useThemeContext();
36
37
 
37
38
  return (
38
- <div className={mx('is-full p-1 overflow-hidden font-thin text-baseText', classNames)}>
39
+ <div className={mx('flex is-full p-1 overflow-hidden text-baseText', classNames)}>
39
40
  <NativeSyntaxHighlighter
40
41
  className='is-full overflow-auto scrollbar-thin'
41
42
  language={languages[language as keyof typeof languages] || language}