@dxos/react-ui-thread 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef
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 +28 -51
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +25 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/types/src/Message/Message.d.ts.map +1 -1
- package/dist/types/src/Message/Message.stories.d.ts +10 -10
- package/dist/types/src/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/Thread/Comments.stories.d.ts +10 -10
- package/dist/types/src/Thread/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/Thread/Thread.d.ts +1 -1
- package/dist/types/src/Thread/Thread.d.ts.map +1 -1
- package/dist/types/src/Thread/Thread.stories.d.ts +10 -10
- package/dist/types/src/Thread/Thread.stories.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +10 -10
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -18
- package/src/Message/Message.stories.tsx +2 -1
- package/src/Message/Message.tsx +3 -2
- package/src/Thread/Comments.stories.tsx +3 -3
- package/src/Thread/Thread.stories.tsx +2 -1
- package/src/Thread/Thread.tsx +2 -1
- package/src/index.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-thread",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.abd8ff62ef",
|
|
4
4
|
"description": "A set of components to use with threads, including comments and messages.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,17 +12,23 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#translations": "./src/translations.ts"
|
|
17
|
+
},
|
|
15
18
|
"exports": {
|
|
16
19
|
".": {
|
|
17
20
|
"source": "./src/index.ts",
|
|
18
21
|
"types": "./dist/types/src/index.d.ts",
|
|
19
22
|
"browser": "./dist/lib/browser/index.mjs"
|
|
23
|
+
},
|
|
24
|
+
"./translations": {
|
|
25
|
+
"source": "./src/translations.ts",
|
|
26
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
27
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
28
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
20
29
|
}
|
|
21
30
|
},
|
|
22
31
|
"types": "dist/types/src/index.d.ts",
|
|
23
|
-
"typesVersions": {
|
|
24
|
-
"*": {}
|
|
25
|
-
},
|
|
26
32
|
"files": [
|
|
27
33
|
"dist",
|
|
28
34
|
"src"
|
|
@@ -30,30 +36,30 @@
|
|
|
30
36
|
"dependencies": {
|
|
31
37
|
"@radix-ui/react-primitive": "2.0.2",
|
|
32
38
|
"date-fns": "^3.6.0",
|
|
33
|
-
"@dxos/react-ui-editor": "0.8.4-main.
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
39
|
+
"@dxos/react-ui-editor": "0.8.4-main.abd8ff62ef",
|
|
40
|
+
"@dxos/util": "0.8.4-main.abd8ff62ef",
|
|
41
|
+
"@dxos/ui-editor": "0.8.4-main.abd8ff62ef"
|
|
36
42
|
},
|
|
37
43
|
"devDependencies": {
|
|
38
44
|
"@types/react": "~19.2.7",
|
|
39
45
|
"@types/react-dom": "~19.2.3",
|
|
40
46
|
"react": "~19.2.3",
|
|
41
47
|
"react-dom": "~19.2.3",
|
|
42
|
-
"vite": "^
|
|
43
|
-
"@dxos/echo": "0.8.4-main.
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/ui
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
48
|
+
"vite": "^8.0.10",
|
|
49
|
+
"@dxos/echo-db": "0.8.4-main.abd8ff62ef",
|
|
50
|
+
"@dxos/echo": "0.8.4-main.abd8ff62ef",
|
|
51
|
+
"@dxos/log": "0.8.4-main.abd8ff62ef",
|
|
52
|
+
"@dxos/keys": "0.8.4-main.abd8ff62ef",
|
|
53
|
+
"@dxos/random": "0.8.4-main.abd8ff62ef",
|
|
54
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef",
|
|
55
|
+
"@dxos/storybook-utils": "0.8.4-main.abd8ff62ef",
|
|
56
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
|
|
51
57
|
},
|
|
52
58
|
"peerDependencies": {
|
|
53
59
|
"react": "~19.2.3",
|
|
54
60
|
"react-dom": "~19.2.3",
|
|
55
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
56
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
61
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef",
|
|
62
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
|
|
57
63
|
},
|
|
58
64
|
"publishConfig": {
|
|
59
65
|
"access": "public"
|
|
@@ -9,9 +9,10 @@ import { PublicKey } from '@dxos/keys';
|
|
|
9
9
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
10
10
|
import { hoverableControls, hoverableFocusedWithinControls } from '@dxos/ui-theme';
|
|
11
11
|
|
|
12
|
+
import { translations } from '#translations';
|
|
13
|
+
|
|
12
14
|
import { type MessageEntity, MessageStoryText } from '../testing';
|
|
13
15
|
import { Thread } from '../Thread';
|
|
14
|
-
import { translations } from '../translations';
|
|
15
16
|
import { MessageRoot } from './Message';
|
|
16
17
|
|
|
17
18
|
const DefaultStory = () => {
|
package/src/Message/Message.tsx
CHANGED
|
@@ -11,7 +11,8 @@ import { keymap, listener } from '@dxos/ui-editor';
|
|
|
11
11
|
import { mx } from '@dxos/ui-theme';
|
|
12
12
|
import { hexToEmoji, hexToHue, isTruthy } from '@dxos/util';
|
|
13
13
|
|
|
14
|
-
import { translationKey } from '
|
|
14
|
+
import { translationKey } from '#translations';
|
|
15
|
+
|
|
15
16
|
import { type MessageMetadata } from '../types';
|
|
16
17
|
|
|
17
18
|
const avatarSize = 7;
|
|
@@ -26,8 +27,8 @@ export const MessageRoot = forwardRef<HTMLDivElement, MessageRootProps>(
|
|
|
26
27
|
{ authorImgSrc, authorId, authorName, authorAvatarProps, continues = true, children, classNames, ...rootProps },
|
|
27
28
|
forwardedRef,
|
|
28
29
|
) => {
|
|
30
|
+
// Must wrap the message since Avatar.Label may be used in the content.
|
|
29
31
|
return (
|
|
30
|
-
// Must wrap the message since Avatar.Label may be used in the content.
|
|
31
32
|
<Avatar.Root>
|
|
32
33
|
<div
|
|
33
34
|
role='none'
|
|
@@ -14,10 +14,8 @@ import { Icon, IconButton, useThemeContext } from '@dxos/react-ui';
|
|
|
14
14
|
import { useTextEditor } from '@dxos/react-ui-editor';
|
|
15
15
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
16
16
|
import {
|
|
17
|
-
type Comment,
|
|
18
17
|
type CommentsOptions,
|
|
19
18
|
type EditorView,
|
|
20
|
-
type Range,
|
|
21
19
|
comments,
|
|
22
20
|
createBasicExtensions,
|
|
23
21
|
createThemeExtensions,
|
|
@@ -26,11 +24,13 @@ import {
|
|
|
26
24
|
scrollThreadIntoView,
|
|
27
25
|
setComments,
|
|
28
26
|
} from '@dxos/ui-editor';
|
|
27
|
+
import { type Comment, type Range } from '@dxos/ui-editor/types';
|
|
29
28
|
import { hoverableControls, hoverableFocusedWithinControls } from '@dxos/ui-theme';
|
|
30
29
|
|
|
30
|
+
import { translations } from '#translations';
|
|
31
|
+
|
|
31
32
|
import { MessageBody, MessageHeading, MessageRoot, MessageTextbox } from '../Message';
|
|
32
33
|
import { type MessageEntity } from '../testing';
|
|
33
|
-
import { translations } from '../translations';
|
|
34
34
|
import { Thread } from './Thread';
|
|
35
35
|
|
|
36
36
|
random.seed(101);
|
|
@@ -11,9 +11,10 @@ import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
|
11
11
|
import { createBasicExtensions, createThemeExtensions } from '@dxos/ui-editor';
|
|
12
12
|
import { hoverableControls, hoverableFocusedWithinControls } from '@dxos/ui-theme';
|
|
13
13
|
|
|
14
|
+
import { translations } from '#translations';
|
|
15
|
+
|
|
14
16
|
import { MessageRoot, MessageTextbox } from '../Message';
|
|
15
17
|
import { type MessageEntity, MessageStoryText } from '../testing';
|
|
16
|
-
import { translations } from '../translations';
|
|
17
18
|
import { Thread } from './Thread';
|
|
18
19
|
|
|
19
20
|
random.seed(1);
|
package/src/Thread/Thread.tsx
CHANGED
|
@@ -7,7 +7,8 @@ import React, { ComponentPropsWithRef, forwardRef, PropsWithChildren } from 'rea
|
|
|
7
7
|
import { Icon, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
8
8
|
import { hoverableControlItem, hoverableFocusedWithinControls, mx } from '@dxos/ui-theme';
|
|
9
9
|
|
|
10
|
-
import { translationKey } from '
|
|
10
|
+
import { translationKey } from '#translations';
|
|
11
|
+
|
|
11
12
|
import type { ThreadEntity } from '../types';
|
|
12
13
|
|
|
13
14
|
// TODO(burdon): Avoid exporting fragments.
|