@dxos/react-ui-chat 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-chat",
3
- "version": "0.8.4-main.dedc0f3",
3
+ "version": "0.8.4-main.ead640a",
4
4
  "description": "Chat components.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -24,50 +24,51 @@
24
24
  "src"
25
25
  ],
26
26
  "dependencies": {
27
- "@codemirror/autocomplete": "^6.18.7",
27
+ "@codemirror/autocomplete": "^6.19.0",
28
28
  "@codemirror/language": "^6.11.3",
29
29
  "@codemirror/search": "^6.5.11",
30
30
  "@codemirror/state": "^6.5.2",
31
- "@codemirror/view": "^6.38.2",
31
+ "@codemirror/view": "^6.38.4",
32
+ "@fluentui/react-tabster": "^9.24.2",
32
33
  "@preact-signals/safe-react": "^0.9.0",
33
- "@preact/signals-core": "^1.9.0",
34
+ "@preact/signals-core": "^1.12.1",
34
35
  "@radix-ui/react-accordion": "1.2.3",
35
36
  "@radix-ui/react-context": "1.1.1",
36
- "@dxos/async": "0.8.4-main.dedc0f3",
37
- "@dxos/debug": "0.8.4-main.dedc0f3",
38
- "@dxos/echo-schema": "0.8.4-main.dedc0f3",
39
- "@dxos/invariant": "0.8.4-main.dedc0f3",
40
- "@dxos/live-object": "0.8.4-main.dedc0f3",
41
- "@dxos/log": "0.8.4-main.dedc0f3",
42
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
43
- "@dxos/react-ui-components": "0.8.4-main.dedc0f3",
44
- "@dxos/react-ui-dnd": "0.8.4-main.dedc0f3",
45
- "@dxos/react-ui-editor": "0.8.4-main.dedc0f3",
46
- "@dxos/react-ui-sfx": "0.8.4-main.dedc0f3",
47
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.dedc0f3",
48
- "@dxos/react-ui-text-tooltip": "0.8.4-main.dedc0f3",
49
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3",
50
- "@dxos/react-ui-types": "0.8.4-main.dedc0f3",
51
- "@dxos/util": "0.8.4-main.dedc0f3"
37
+ "@dxos/async": "0.8.4-main.ead640a",
38
+ "@dxos/debug": "0.8.4-main.ead640a",
39
+ "@dxos/echo": "0.8.4-main.ead640a",
40
+ "@dxos/live-object": "0.8.4-main.ead640a",
41
+ "@dxos/log": "0.8.4-main.ead640a",
42
+ "@dxos/react-ui": "0.8.4-main.ead640a",
43
+ "@dxos/react-ui-components": "0.8.4-main.ead640a",
44
+ "@dxos/invariant": "0.8.4-main.ead640a",
45
+ "@dxos/react-ui-dnd": "0.8.4-main.ead640a",
46
+ "@dxos/react-ui-sfx": "0.8.4-main.ead640a",
47
+ "@dxos/react-ui-editor": "0.8.4-main.ead640a",
48
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.ead640a",
49
+ "@dxos/react-ui-text-tooltip": "0.8.4-main.ead640a",
50
+ "@dxos/util": "0.8.4-main.ead640a",
51
+ "@dxos/react-ui-types": "0.8.4-main.ead640a",
52
+ "@dxos/react-ui-theme": "0.8.4-main.ead640a"
52
53
  },
53
54
  "devDependencies": {
54
- "@types/react": "~18.2.0",
55
- "@types/react-dom": "~18.2.0",
56
- "effect": "3.17.7",
57
- "react": "~18.2.0",
58
- "react-dom": "~18.2.0",
59
- "vite": "7.1.1",
60
- "@dxos/echo": "0.8.4-main.dedc0f3",
61
- "@dxos/random": "0.8.4-main.dedc0f3",
62
- "@dxos/react-client": "0.8.4-main.dedc0f3",
63
- "@dxos/storybook-utils": "0.8.4-main.dedc0f3"
55
+ "@types/react": "~19.2.2",
56
+ "@types/react-dom": "~19.2.1",
57
+ "effect": "3.18.3",
58
+ "react": "~19.2.0",
59
+ "react-dom": "~19.2.0",
60
+ "vite": "7.1.9",
61
+ "@dxos/echo": "0.8.4-main.ead640a",
62
+ "@dxos/random": "0.8.4-main.ead640a",
63
+ "@dxos/storybook-utils": "0.8.4-main.ead640a",
64
+ "@dxos/react-client": "0.8.4-main.ead640a"
64
65
  },
65
66
  "peerDependencies": {
66
67
  "effect": "^3.13.3",
67
- "react": "~18.2.0",
68
- "react-dom": "~18.2.0",
69
- "@dxos/react-ui": "0.8.4-main.dedc0f3",
70
- "@dxos/react-ui-theme": "0.8.4-main.dedc0f3"
68
+ "react": "^19.0.0",
69
+ "react-dom": "^19.0.0",
70
+ "@dxos/react-ui": "0.8.4-main.ead640a",
71
+ "@dxos/react-ui-theme": "0.8.4-main.ead640a"
71
72
  },
72
73
  "publishConfig": {
73
74
  "access": "public"
@@ -2,13 +2,11 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
  import React, { useState } from 'react';
9
7
 
10
8
  import { Input, Toolbar } from '@dxos/react-ui';
11
- import { withLayout, withTheme } from '@dxos/storybook-utils';
9
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
12
10
 
13
11
  import { translations } from '../../translations';
14
12
 
@@ -53,7 +51,7 @@ const meta = {
53
51
  </>
54
52
  );
55
53
  },
56
- decorators: [withTheme, withLayout({ fullscreen: true, classNames: 'flex flex-col' })],
54
+ decorators: [withTheme, withLayout({ container: 'column' })],
57
55
  parameters: {
58
56
  translations,
59
57
  },
@@ -2,12 +2,10 @@
2
2
  // Copyright 2025 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 { log } from '@dxos/log';
10
- import { withTheme } from '@dxos/storybook-utils';
8
+ import { withTheme } from '@dxos/react-ui/testing';
11
9
 
12
10
  import { translations } from '../../translations';
13
11
 
@@ -3,6 +3,8 @@
3
3
  //
4
4
 
5
5
  import { type Extension } from '@codemirror/state';
6
+ import { keymap } from '@codemirror/view';
7
+ import { useFocusFinders } from '@fluentui/react-tabster';
6
8
  import React, { forwardRef, useImperativeHandle } from 'react';
7
9
 
8
10
  import { type ThemedClassName, useThemeContext } from '@dxos/react-ui';
@@ -16,7 +18,7 @@ import {
16
18
  useTextEditor,
17
19
  } from '@dxos/react-ui-editor';
18
20
  import { mx } from '@dxos/react-ui-theme';
19
- import { isNonNullable } from '@dxos/util';
21
+ import { isTruthy } from '@dxos/util';
20
22
 
21
23
  import { type ReferencesOptions, references as referencesExtension } from './references';
22
24
 
@@ -41,22 +43,37 @@ export const ChatEditor = forwardRef<ChatEditorController, ChatEditorProps>(
41
43
  forwardRef,
42
44
  ) => {
43
45
  const { themeMode } = useThemeContext();
44
-
46
+ const { findNextFocusable, findPrevFocusable } = useFocusFinders();
45
47
  const { parentRef, view } = useTextEditor(
46
48
  () => ({
47
49
  debug: true,
48
50
  autoFocus,
49
51
  extensions: [
50
52
  createThemeExtensions({ themeMode }),
53
+ createBasicExtensions({ bracketMatching: false, lineWrapping, placeholder }),
51
54
  autocomplete({ onSubmit, onSuggest, onCancel }),
52
55
  references ? referencesExtension({ provider: references.provider }) : [],
53
- createBasicExtensions({
54
- bracketMatching: false,
55
- lineWrapping,
56
- placeholder,
57
- }),
56
+ // TODO(burdon): Standardize.
57
+ keymap.of([
58
+ {
59
+ key: 'Tab',
60
+ preventDefault: true,
61
+ run: (view) => {
62
+ findNextFocusable(view.dom)?.focus();
63
+ return true;
64
+ },
65
+ },
66
+ {
67
+ key: 'Shift-Tab',
68
+ preventDefault: true,
69
+ run: (view) => {
70
+ findPrevFocusable(view.dom)?.focus();
71
+ return true;
72
+ },
73
+ },
74
+ ]),
58
75
  extensions,
59
- ].filter(isNonNullable),
76
+ ].filter(isTruthy),
60
77
  }),
61
78
  [themeMode, extensions, onSubmit, onSuggest, onCancel],
62
79
  );