@dxos/react-ui-thread 0.8.3 → 0.8.4-main.1068cf700f
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/dist/lib/browser/index.mjs +143 -185
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/types/src/Message/Message.d.ts.map +1 -1
- package/dist/types/src/Message/Message.stories.d.ts +21 -19
- package/dist/types/src/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/Thread/Comments.stories.d.ts +21 -38
- package/dist/types/src/Thread/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/Thread/Thread.d.ts +10 -7
- package/dist/types/src/Thread/Thread.d.ts.map +1 -1
- package/dist/types/src/Thread/Thread.stories.d.ts +21 -19
- package/dist/types/src/Thread/Thread.stories.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/testing.d.ts +1 -2
- package/dist/types/src/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +15 -16
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +27 -25
- package/src/Message/Message.stories.tsx +24 -17
- package/src/Message/Message.tsx +9 -8
- package/src/Thread/Comments.stories.tsx +86 -56
- package/src/Thread/Thread.stories.tsx +28 -19
- package/src/Thread/Thread.tsx +36 -17
- package/src/index.ts +2 -2
- package/src/testing.tsx +8 -12
- package/src/translations.ts +5 -3
package/src/index.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import translations from './translations';
|
|
5
|
+
import { translations } from './translations';
|
|
6
6
|
|
|
7
7
|
export * from './Thread';
|
|
8
8
|
export * from './Message';
|
|
9
|
-
export * from './types';
|
|
9
|
+
export type * from './types';
|
|
10
10
|
export { translations };
|
package/src/testing.tsx
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import React, { type PropsWithChildren } from 'react';
|
|
5
|
+
import React from 'react';
|
|
7
6
|
|
|
8
|
-
import {
|
|
9
|
-
import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/
|
|
7
|
+
import { IconButton } from '@dxos/react-ui';
|
|
8
|
+
import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/ui-theme';
|
|
10
9
|
|
|
11
10
|
import { MessageBody, MessageHeading } from './Message';
|
|
12
11
|
import { type MessageMetadata } from './types';
|
|
@@ -26,13 +25,14 @@ export const MessageStoryText = ({ text, onDelete, authorName, timestamp }: Mess
|
|
|
26
25
|
<>
|
|
27
26
|
<MessageHeading authorName={authorName} timestamp={timestamp}>
|
|
28
27
|
{onDelete && (
|
|
29
|
-
<
|
|
28
|
+
<IconButton
|
|
29
|
+
icon='ph--x--regular'
|
|
30
|
+
iconOnly
|
|
31
|
+
label='Delete'
|
|
30
32
|
variant='ghost'
|
|
31
33
|
classNames={['p-1.5 min-bs-0 mie-1 items-start transition-opacity', hoverableControlItem]}
|
|
32
34
|
onClick={() => onDelete()}
|
|
33
|
-
|
|
34
|
-
<X />
|
|
35
|
-
</Button>
|
|
35
|
+
/>
|
|
36
36
|
)}
|
|
37
37
|
</MessageHeading>
|
|
38
38
|
<MessageBody>{text}</MessageBody>
|
|
@@ -56,7 +56,3 @@ export const MessageStoryBlock = <PartValue,>({ part }: MessagePartProps<PartVal
|
|
|
56
56
|
</div>
|
|
57
57
|
);
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
export const ThreadStoryContainer = ({ children }: PropsWithChildren) => {
|
|
61
|
-
return <div className={mx('bg-white dark:bg-black mli-auto is-96 overflow-y-auto')}>{children}</div>;
|
|
62
|
-
};
|
package/src/translations.ts
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export const translationKey = '@dxos/react-ui-thread';
|
|
8
|
+
|
|
9
|
+
export const translations = [
|
|
8
10
|
{
|
|
9
11
|
'en-US': {
|
|
10
12
|
[translationKey]: {
|
|
@@ -21,4 +23,4 @@ export default [
|
|
|
21
23
|
},
|
|
22
24
|
},
|
|
23
25
|
},
|
|
24
|
-
];
|
|
26
|
+
] as const satisfies Resource[];
|