@dxos/react-ui-chat 0.8.4-main.bc674ce → 0.8.4-main.c351d160a8

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.bc674ce",
3
+ "version": "0.8.4-main.c351d160a8",
4
4
  "description": "Chat components.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -36,41 +36,41 @@
36
36
  "@fluentui/react-tabster": "9.26.11",
37
37
  "@radix-ui/react-accordion": "1.2.3",
38
38
  "@radix-ui/react-context": "1.1.1",
39
- "@dxos/async": "0.8.4-main.bc674ce",
40
- "@dxos/debug": "0.8.4-main.bc674ce",
41
- "@dxos/invariant": "0.8.4-main.bc674ce",
42
- "@dxos/echo": "0.8.4-main.bc674ce",
43
- "@dxos/react-ui": "0.8.4-main.bc674ce",
44
- "@dxos/log": "0.8.4-main.bc674ce",
45
- "@dxos/react-ui-dnd": "0.8.4-main.bc674ce",
46
- "@dxos/react-ui-editor": "0.8.4-main.bc674ce",
47
- "@dxos/react-ui-components": "0.8.4-main.bc674ce",
48
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.bc674ce",
49
- "@dxos/react-ui-text-tooltip": "0.8.4-main.bc674ce",
50
- "@dxos/react-ui-sfx": "0.8.4-main.bc674ce",
51
- "@dxos/ui-editor": "0.8.4-main.bc674ce",
52
- "@dxos/ui-theme": "0.8.4-main.bc674ce",
53
- "@dxos/util": "0.8.4-main.bc674ce",
54
- "@dxos/ui-types": "0.8.4-main.bc674ce"
39
+ "@dxos/async": "0.8.4-main.c351d160a8",
40
+ "@dxos/debug": "0.8.4-main.c351d160a8",
41
+ "@dxos/echo": "0.8.4-main.c351d160a8",
42
+ "@dxos/invariant": "0.8.4-main.c351d160a8",
43
+ "@dxos/react-ui": "0.8.4-main.c351d160a8",
44
+ "@dxos/log": "0.8.4-main.c351d160a8",
45
+ "@dxos/react-ui-components": "0.8.4-main.c351d160a8",
46
+ "@dxos/react-ui-editor": "0.8.4-main.c351d160a8",
47
+ "@dxos/react-ui-dnd": "0.8.4-main.c351d160a8",
48
+ "@dxos/react-ui-sfx": "0.8.4-main.c351d160a8",
49
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.c351d160a8",
50
+ "@dxos/ui-editor": "0.8.4-main.c351d160a8",
51
+ "@dxos/react-ui-text-tooltip": "0.8.4-main.c351d160a8",
52
+ "@dxos/ui-theme": "0.8.4-main.c351d160a8",
53
+ "@dxos/util": "0.8.4-main.c351d160a8",
54
+ "@dxos/ui-types": "0.8.4-main.c351d160a8"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/react": "~19.2.7",
58
58
  "@types/react-dom": "~19.2.3",
59
- "effect": "3.19.11",
59
+ "effect": "3.19.16",
60
60
  "react": "~19.2.3",
61
61
  "react-dom": "~19.2.3",
62
- "vite": "7.1.9",
63
- "@dxos/random": "0.8.4-main.bc674ce",
64
- "@dxos/react-client": "0.8.4-main.bc674ce",
65
- "@dxos/echo": "0.8.4-main.bc674ce",
66
- "@dxos/storybook-utils": "0.8.4-main.bc674ce"
62
+ "vite": "^7.1.11",
63
+ "@dxos/echo": "0.8.4-main.c351d160a8",
64
+ "@dxos/react-client": "0.8.4-main.c351d160a8",
65
+ "@dxos/random": "0.8.4-main.c351d160a8",
66
+ "@dxos/storybook-utils": "0.8.4-main.c351d160a8"
67
67
  },
68
68
  "peerDependencies": {
69
- "effect": "3.19.11",
69
+ "effect": "3.19.16",
70
70
  "react": "~19.2.3",
71
71
  "react-dom": "~19.2.3",
72
- "@dxos/react-ui": "0.8.4-main.bc674ce",
73
- "@dxos/ui-theme": "0.8.4-main.bc674ce"
72
+ "@dxos/react-ui": "0.8.4-main.c351d160a8",
73
+ "@dxos/ui-theme": "0.8.4-main.c351d160a8"
74
74
  },
75
75
  "publishConfig": {
76
76
  "access": "public"
@@ -37,12 +37,12 @@ const meta = {
37
37
  <ChatDialog.Header title='Chat' />
38
38
  <ChatDialog.Content>
39
39
  {items.map((item) => (
40
- <div key={item} className='pis-4 pbe-1'>
40
+ <div key={item} className='ps-4 pb-1'>
41
41
  {item}
42
42
  </div>
43
43
  ))}
44
44
  </ChatDialog.Content>
45
- <ChatDialog.Footer classNames='pli-2 items-center'>
45
+ <ChatDialog.Footer classNames='px-2 items-center'>
46
46
  <Input.Root>
47
47
  <Input.TextInput classNames='border-none' placeholder='Test' />
48
48
  </Input.Root>
@@ -51,7 +51,7 @@ const meta = {
51
51
  </>
52
52
  );
53
53
  },
54
- decorators: [withTheme, withLayout({ layout: 'column' })],
54
+ decorators: [withTheme(), withLayout({ layout: 'column' })],
55
55
  parameters: {
56
56
  translations,
57
57
  },
@@ -14,7 +14,9 @@ const preventDefault = (event: Event) => event.preventDefault();
14
14
  // TODO(burdon): Factor out.
15
15
  const Endcap = ({ children }: PropsWithChildren) => {
16
16
  return (
17
- <div className='grid is-[var(--rail-action)] bs-[var(--rail-action)] items-center justify-center'>{children}</div>
17
+ <div className='grid w-[var(--dx-rail-action)] h-[var(--dx-rail-action)] items-center justify-center'>
18
+ {children}
19
+ </div>
18
20
  );
19
21
  };
20
22
 
@@ -71,10 +73,10 @@ const ChatDialogRoot = ({
71
73
  <Dialog.Root modal={false} open={open} onOpenChange={setOpen}>
72
74
  <div role='none' className='dx-dialog__overlay bg-transparent pointer-events-none' data-block-align='end'>
73
75
  <Dialog.Content
76
+ size='md'
74
77
  inOverlayLayout
75
78
  classNames={[
76
- 'grid grid-rows-[var(--rail-action)_1fr_min-content] p-0 overflow-hidden',
77
- 'box-content md:is-[35rem] md:max-is-none pointer-events-auto',
79
+ 'grid grid-rows-[var(--dx-rail-action)_1fr_min-content] p-0 overflow-hidden box-content pointer-events-auto',
78
80
  ]}
79
81
  onEscapeKeyDown={onEscape}
80
82
  onInteractOutside={preventDefault}
@@ -93,22 +95,26 @@ ChatDialogRoot.displayName = 'ChatDialog.Root';
93
95
  // Header
94
96
  //
95
97
 
98
+ const CHAT_DIALOG_HEADER_NAME = 'ChatDialog.Header';
99
+
96
100
  type ChatDialogHeaderProps = ThemedClassName<{
97
101
  title?: string;
98
102
  }>;
99
103
 
100
104
  const ChatDialogHeader = ({ classNames, title }: ChatDialogHeaderProps) => {
101
- const { expanded, setExpanded } = useChatDialogContext(ChatDialogHeader.displayName);
105
+ const { expanded, setExpanded } = useChatDialogContext(CHAT_DIALOG_HEADER_NAME);
102
106
 
103
107
  return (
104
- <div className={mx('grid grid-cols-[var(--rail-action)_1fr_min-content] items-center overflow-hidden', classNames)}>
108
+ <div
109
+ className={mx('grid grid-cols-[var(--dx-rail-action)_1fr_min-content] items-center overflow-hidden', classNames)}
110
+ >
105
111
  <Endcap>
106
112
  <Dialog.Close>
107
113
  <Icon icon='ph--x--regular' />
108
114
  </Dialog.Close>
109
115
  </Endcap>
110
116
  <Dialog.Title
111
- classNames='flex is-full justify-center text-sm text-subdued select-none cursor-pointer'
117
+ classNames='flex w-full justify-center text-sm text-subdued select-none cursor-pointer'
112
118
  onClick={() => setExpanded((expanded) => !expanded)}
113
119
  >
114
120
  {title}
@@ -118,7 +124,7 @@ const ChatDialogHeader = ({ classNames, title }: ChatDialogHeaderProps) => {
118
124
  variant='ghost'
119
125
  icon='ph--caret-up--regular'
120
126
  iconOnly
121
- classNames={mx('!p-1 [&>svg]:transition [&>svg]:duration-200', expanded && '[&>svg]:rotate-180')}
127
+ classNames={mx('p-1! [&>svg]:transition [&>svg]:duration-200', expanded && '[&>svg]:rotate-180')}
122
128
  label={expanded ? 'Close' : 'Open'}
123
129
  onClick={() => setExpanded((expanded) => !expanded)}
124
130
  />
@@ -127,16 +133,18 @@ const ChatDialogHeader = ({ classNames, title }: ChatDialogHeaderProps) => {
127
133
  );
128
134
  };
129
135
 
130
- ChatDialogHeader.displayName = 'ChatDialog.Header';
136
+ ChatDialogHeader.displayName = CHAT_DIALOG_HEADER_NAME;
131
137
 
132
138
  //
133
139
  // Content
134
140
  //
135
141
 
142
+ const CHAT_DIALOG_CONTENT_NAME = 'ChatDialog.Content';
143
+
136
144
  type ChatDialogContentProps = ThemedClassName<PropsWithChildren>;
137
145
 
138
146
  const ChatDialogContent = ({ children, classNames }: ChatDialogContentProps) => {
139
- const { expanded, size, setSize } = useChatDialogContext(ChatDialogContent.displayName);
147
+ const { expanded, size, setSize } = useChatDialogContext(CHAT_DIALOG_CONTENT_NAME);
140
148
  useEffect(() => {
141
149
  setSize(expanded ? 'min-content' : 0);
142
150
  }, [expanded]);
@@ -144,8 +152,8 @@ const ChatDialogContent = ({ children, classNames }: ChatDialogContentProps) =>
144
152
  return (
145
153
  <div
146
154
  className={mx(
147
- 'flex flex-col overflow-y-auto border-bs border-be border-subduedSeparator',
148
- 'transition-[block-size] ease-in-out duration-0 [&:not([data-dx-resizing="true"])]:duration-200',
155
+ 'border-t border-b border-subdued-separator',
156
+ 'transition ease-in-out duration-0 [&:not([data-dx-resizing="true"])]:duration-200',
149
157
  classNames,
150
158
  )}
151
159
  style={{
@@ -167,19 +175,21 @@ const ChatDialogContent = ({ children, classNames }: ChatDialogContentProps) =>
167
175
  );
168
176
  };
169
177
 
170
- ChatDialogContent.displayName = 'ChatDialog.Content';
178
+ ChatDialogContent.displayName = CHAT_DIALOG_CONTENT_NAME;
171
179
 
172
180
  //
173
181
  // Footer
174
182
  //
175
183
 
184
+ const CHAT_DIALOG_FOOTER_NAME = 'ChatDialog.Footer';
185
+
176
186
  type ChatDialogFooterProps = ThemedClassName<PropsWithChildren>;
177
187
 
178
188
  const ChatDialogFooter = ({ children, classNames }: ChatDialogFooterProps) => {
179
189
  return <div className={mx(classNames)}>{children}</div>;
180
190
  };
181
191
 
182
- ChatDialogFooter.displayName = 'ChatDialog.Footer';
192
+ ChatDialogFooter.displayName = CHAT_DIALOG_FOOTER_NAME;
183
193
 
184
194
  //
185
195
  // ChatDialog
@@ -15,7 +15,7 @@ import { type ReferenceData } from './references';
15
15
  const meta = {
16
16
  title: 'ui/react-ui-chat/ChatEditor',
17
17
  component: ChatEditor,
18
- decorators: [withTheme],
18
+ decorators: [withTheme()],
19
19
  parameters: {
20
20
  layout: 'centered',
21
21
  translations,
@@ -24,7 +24,7 @@ const meta = {
24
24
 
25
25
  export default meta;
26
26
 
27
- const classNames = 'is-[20rem] p-2 border border-separator';
27
+ const classNames = 'w-[20rem] p-2 border border-separator';
28
28
 
29
29
  type Story = StoryObj<typeof meta>;
30
30
 
@@ -130,7 +130,7 @@ export const references = ({ provider, triggerCharacter = '@', debug = false }:
130
130
  }),
131
131
 
132
132
  autocompletion({
133
- tooltipClass: () => 'shadow rounded',
133
+ tooltipClass: () => 'shadow rounded-sm',
134
134
  activateOnTyping: true,
135
135
  aboveCursor: true,
136
136
  closeOnBlur: !debug,