@dxos/react-ui-thread 0.8.1-staging.9eaf14f → 0.8.2-main.12df754
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 +14 -14
- package/src/Thread/Comments.stories.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-thread",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2-main.12df754",
|
|
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",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@radix-ui/react-primitive": "2.0.2",
|
|
27
27
|
"date-fns": "^3.3.1",
|
|
28
|
-
"@dxos/react-ui-editor": "0.8.
|
|
29
|
-
"@dxos/util": "0.8.
|
|
28
|
+
"@dxos/react-ui-editor": "0.8.2-main.12df754",
|
|
29
|
+
"@dxos/util": "0.8.2-main.12df754"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
"react": "~18.2.0",
|
|
36
36
|
"react-dom": "~18.2.0",
|
|
37
37
|
"vite": "5.4.7",
|
|
38
|
-
"@dxos/echo-db": "0.8.
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/react-ui": "0.8.
|
|
45
|
-
"@dxos/react-ui
|
|
46
|
-
"@dxos/storybook-utils": "0.8.
|
|
38
|
+
"@dxos/echo-db": "0.8.2-main.12df754",
|
|
39
|
+
"@dxos/keys": "0.8.2-main.12df754",
|
|
40
|
+
"@dxos/echo-schema": "0.8.2-main.12df754",
|
|
41
|
+
"@dxos/log": "0.8.2-main.12df754",
|
|
42
|
+
"@dxos/live-object": "0.8.2-main.12df754",
|
|
43
|
+
"@dxos/random": "0.8.2-main.12df754",
|
|
44
|
+
"@dxos/react-ui-theme": "0.8.2-main.12df754",
|
|
45
|
+
"@dxos/react-ui": "0.8.2-main.12df754",
|
|
46
|
+
"@dxos/storybook-utils": "0.8.2-main.12df754"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@phosphor-icons/react": "^2.1.5",
|
|
50
50
|
"react": "~18.2.0",
|
|
51
51
|
"react-dom": "~18.2.0",
|
|
52
|
-
"@dxos/react-ui": "0.8.
|
|
53
|
-
"@dxos/react-ui-theme": "0.8.
|
|
52
|
+
"@dxos/react-ui": "0.8.2-main.12df754",
|
|
53
|
+
"@dxos/react-ui-theme": "0.8.2-main.12df754"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
@@ -10,7 +10,7 @@ import React, { type FC, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
10
10
|
import { createDocAccessor, createObject } from '@dxos/echo-db';
|
|
11
11
|
import { Expando } from '@dxos/echo-schema';
|
|
12
12
|
import { PublicKey } from '@dxos/keys';
|
|
13
|
-
import {
|
|
13
|
+
import { live } from '@dxos/live-object';
|
|
14
14
|
import { log } from '@dxos/log';
|
|
15
15
|
import { faker } from '@dxos/random';
|
|
16
16
|
import { Button, useThemeContext } from '@dxos/react-ui';
|
|
@@ -143,7 +143,7 @@ const StoryThread: FC<{
|
|
|
143
143
|
|
|
144
144
|
const handleCreateMessage = () => {
|
|
145
145
|
if (messageRef.current?.length) {
|
|
146
|
-
const message =
|
|
146
|
+
const message = live(Expando, {
|
|
147
147
|
timestamp: new Date().toISOString(),
|
|
148
148
|
sender: { identityKey: authorId },
|
|
149
149
|
text: messageRef.current,
|
|
@@ -233,7 +233,7 @@ type StoryProps = {
|
|
|
233
233
|
};
|
|
234
234
|
|
|
235
235
|
const Story = ({ text, autoCreate }: StoryProps) => {
|
|
236
|
-
const [item] = useState(createObject(
|
|
236
|
+
const [item] = useState(createObject(live(Expando, { content: text ?? '' })));
|
|
237
237
|
const [threads, setThreads] = useState<StoryCommentThread[]>([]);
|
|
238
238
|
const [selected, setSelected] = useState<string>();
|
|
239
239
|
|