@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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//
|
|
2
|
-
var translationKey = "thread";
|
|
3
|
-
var
|
|
1
|
+
// src/translations.ts
|
|
2
|
+
var translationKey = "@dxos/react-ui-thread";
|
|
3
|
+
var translations = [
|
|
4
4
|
{
|
|
5
5
|
"en-US": {
|
|
6
6
|
[translationKey]: {
|
|
@@ -19,167 +19,132 @@ var translations_default = [
|
|
|
19
19
|
}
|
|
20
20
|
];
|
|
21
21
|
|
|
22
|
-
//
|
|
23
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
24
|
-
import { CaretDoubleRight, Spinner } from "@phosphor-icons/react";
|
|
22
|
+
// src/Thread/Thread.tsx
|
|
25
23
|
import React, { forwardRef } from "react";
|
|
26
|
-
import { useTranslation } from "@dxos/react-ui";
|
|
27
|
-
import { hoverableControlItem, hoverableFocusedWithinControls, mx } from "@dxos/
|
|
24
|
+
import { Icon, useTranslation } from "@dxos/react-ui";
|
|
25
|
+
import { hoverableControlItem, hoverableFocusedWithinControls, mx } from "@dxos/ui-theme";
|
|
28
26
|
var threadLayout = "is-full place-self-start grid grid-cols-[var(--rail-size)_1fr]";
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
ref: forwardedRef
|
|
41
|
-
}, children);
|
|
42
|
-
} finally {
|
|
43
|
-
_effect.f();
|
|
44
|
-
}
|
|
27
|
+
var ThreadRoot = /* @__PURE__ */ forwardRef(({ current, children, classNames, ...props }, forwardedRef) => {
|
|
28
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
29
|
+
role: "group",
|
|
30
|
+
"data-testid": "thread",
|
|
31
|
+
...current && {
|
|
32
|
+
"aria-current": typeof current === "string" ? current : "location"
|
|
33
|
+
},
|
|
34
|
+
...props,
|
|
35
|
+
className: mx(threadLayout, hoverableFocusedWithinControls, "bg-[var(--surface-bg)] current-related attention-surface [--controls-opacity:0]", classNames),
|
|
36
|
+
ref: forwardedRef
|
|
37
|
+
}, children);
|
|
45
38
|
});
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
} finally {
|
|
63
|
-
_effect.f();
|
|
64
|
-
}
|
|
39
|
+
var ThreadHeader = /* @__PURE__ */ forwardRef(({ children, detached, ...props }, forwardedRef) => {
|
|
40
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
41
|
+
role: "none",
|
|
42
|
+
className: "flex items-center justify-center text-description"
|
|
43
|
+
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
44
|
+
icon: "ph--caret-double-right--regular"
|
|
45
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
46
|
+
role: "none",
|
|
47
|
+
className: "flex items-center overflow-hidden"
|
|
48
|
+
}, /* @__PURE__ */ React.createElement("p", {
|
|
49
|
+
role: "heading",
|
|
50
|
+
"data-testid": "thread.heading",
|
|
51
|
+
...props,
|
|
52
|
+
className: mx("mie-2 text-description font-medium truncate italic", detached && "line-through decoration-1"),
|
|
53
|
+
ref: forwardedRef
|
|
54
|
+
}, children)));
|
|
65
55
|
});
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
className: mx("text-end", hoverableControlItem)
|
|
83
|
-
}, t("enter to send message")));
|
|
84
|
-
} finally {
|
|
85
|
-
_effect.f();
|
|
86
|
-
}
|
|
56
|
+
var ThreadStatus = /* @__PURE__ */ forwardRef(({ activity, classNames, children, ...props }, forwardedRef) => {
|
|
57
|
+
const { t } = useTranslation(translationKey);
|
|
58
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
59
|
+
...props,
|
|
60
|
+
className: mx("col-start-2 grid grid-cols-[min-content_1fr_max-content] pb-2 pie-2 text-xs text-description", classNames),
|
|
61
|
+
ref: forwardedRef
|
|
62
|
+
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
63
|
+
icon: "ph--spinner--bold",
|
|
64
|
+
classNames: "is-6 bs-4 invisible data-[visible=show]:visible animate-spin-slow",
|
|
65
|
+
"data-visible": activity ? "show" : "hide"
|
|
66
|
+
}), /* @__PURE__ */ React.createElement("span", {
|
|
67
|
+
className: "truncate min-is-0",
|
|
68
|
+
"aria-live": "polite"
|
|
69
|
+
}, activity ? children : null), /* @__PURE__ */ React.createElement("span", {
|
|
70
|
+
className: mx("text-end", hoverableControlItem)
|
|
71
|
+
}, t("enter to send message")));
|
|
87
72
|
});
|
|
73
|
+
var Thread = {
|
|
74
|
+
Root: ThreadRoot,
|
|
75
|
+
Header: ThreadHeader,
|
|
76
|
+
Status: ThreadStatus
|
|
77
|
+
};
|
|
88
78
|
|
|
89
|
-
//
|
|
90
|
-
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
79
|
+
// src/Message/Message.tsx
|
|
91
80
|
import { formatDistanceToNow } from "date-fns/formatDistanceToNow";
|
|
92
81
|
import React2, { forwardRef as forwardRef2 } from "react";
|
|
93
82
|
import { Avatar, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
83
|
+
import { useTextEditor } from "@dxos/react-ui-editor";
|
|
84
|
+
import { keymap, listener } from "@dxos/ui-editor";
|
|
85
|
+
import { focusRing, mx as mx2 } from "@dxos/ui-theme";
|
|
86
|
+
import { hexToEmoji, hexToHue, isTruthy } from "@dxos/util";
|
|
97
87
|
var avatarSize = 7;
|
|
98
88
|
var MessageRoot = /* @__PURE__ */ forwardRef2(({ authorImgSrc, authorId, authorName, authorAvatarProps, continues = true, children, classNames, ...rootProps }, forwardedRef) => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}, children)))
|
|
126
|
-
);
|
|
127
|
-
} finally {
|
|
128
|
-
_effect.f();
|
|
129
|
-
}
|
|
89
|
+
return (
|
|
90
|
+
// Must wrap the message since Avatar.Label may be used in the content.
|
|
91
|
+
/* @__PURE__ */ React2.createElement(Avatar.Root, null, /* @__PURE__ */ React2.createElement("div", {
|
|
92
|
+
role: "none",
|
|
93
|
+
"data-testid": "thread.message",
|
|
94
|
+
...rootProps,
|
|
95
|
+
className: mx2("grid grid-cols-subgrid col-span-2", classNames),
|
|
96
|
+
ref: forwardedRef
|
|
97
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
98
|
+
role: "none",
|
|
99
|
+
className: "flex flex-col items-center gap-2 pbs-1"
|
|
100
|
+
}, /* @__PURE__ */ React2.createElement(Avatar.Content, {
|
|
101
|
+
size: avatarSize,
|
|
102
|
+
hue: authorAvatarProps?.hue || hexToHue(authorId ?? "0"),
|
|
103
|
+
fallback: authorAvatarProps?.emoji || hexToEmoji(authorId ?? "0"),
|
|
104
|
+
...authorImgSrc && {
|
|
105
|
+
imgSrc: authorImgSrc
|
|
106
|
+
}
|
|
107
|
+
}), continues && /* @__PURE__ */ React2.createElement("div", {
|
|
108
|
+
role: "none",
|
|
109
|
+
className: "is-px grow bg-separator"
|
|
110
|
+
})), /* @__PURE__ */ React2.createElement("div", {
|
|
111
|
+
role: "none",
|
|
112
|
+
className: "plb-1 min-is-0"
|
|
113
|
+
}, children)))
|
|
114
|
+
);
|
|
130
115
|
});
|
|
131
116
|
var MessageHeading = ({ children, classNames, timestamp, authorName, ...props }) => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
timestamp
|
|
144
|
-
})), children);
|
|
145
|
-
} finally {
|
|
146
|
-
_effect.f();
|
|
147
|
-
}
|
|
117
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
118
|
+
role: "none",
|
|
119
|
+
...props,
|
|
120
|
+
className: mx2("flex gap-2 items-start", classNames)
|
|
121
|
+
}, /* @__PURE__ */ React2.createElement("p", {
|
|
122
|
+
className: "grow"
|
|
123
|
+
}, /* @__PURE__ */ React2.createElement(MessageAuthorName, {
|
|
124
|
+
authorName
|
|
125
|
+
}), timestamp && /* @__PURE__ */ React2.createElement(MessageTime, {
|
|
126
|
+
timestamp
|
|
127
|
+
})), children);
|
|
148
128
|
};
|
|
149
129
|
var MessageAuthorName = ({ authorName }) => {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
classNames: "block truncate text-sm text-subdued"
|
|
155
|
-
}, authorName ?? t("anonymous label"));
|
|
156
|
-
} finally {
|
|
157
|
-
_effect.f();
|
|
158
|
-
}
|
|
130
|
+
const { t } = useTranslation2(translationKey);
|
|
131
|
+
return /* @__PURE__ */ React2.createElement(Avatar.Label, {
|
|
132
|
+
classNames: "block truncate text-sm text-subdued"
|
|
133
|
+
}, authorName ?? t("anonymous label"));
|
|
159
134
|
};
|
|
160
135
|
var MessageTime = ({ timestamp }) => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
addSuffix: true
|
|
171
|
-
}) : "");
|
|
172
|
-
} finally {
|
|
173
|
-
_effect.f();
|
|
174
|
-
}
|
|
136
|
+
const { dtLocale } = useTranslation2(translationKey);
|
|
137
|
+
const dt = timestamp ? new Date(timestamp) : void 0;
|
|
138
|
+
return /* @__PURE__ */ React2.createElement("time", {
|
|
139
|
+
className: "block text-subdued text-xs pbe-0.5",
|
|
140
|
+
dateTime: dt?.toISOString()
|
|
141
|
+
}, dt ? formatDistanceToNow(dt, {
|
|
142
|
+
locale: dtLocale,
|
|
143
|
+
addSuffix: true
|
|
144
|
+
}) : "");
|
|
175
145
|
};
|
|
176
146
|
var MessageBody = ({ children, ...props }) => {
|
|
177
|
-
|
|
178
|
-
try {
|
|
179
|
-
return /* @__PURE__ */ React2.createElement("p", props, children);
|
|
180
|
-
} finally {
|
|
181
|
-
_effect.f();
|
|
182
|
-
}
|
|
147
|
+
return /* @__PURE__ */ React2.createElement("p", props, children);
|
|
183
148
|
};
|
|
184
149
|
var keyBindings = ({ onSend, onClear }) => [
|
|
185
150
|
{
|
|
@@ -207,45 +172,40 @@ var keyBindings = ({ onSend, onClear }) => [
|
|
|
207
172
|
}
|
|
208
173
|
];
|
|
209
174
|
var MessageTextbox = ({ id, authorId, authorName, authorImgSrc, authorAvatarProps, disabled, extensions, onSend, onClear, onEditorFocus, ...editorProps }) => {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
})
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
if (focusing) {
|
|
222
|
-
onEditorFocus?.();
|
|
223
|
-
}
|
|
175
|
+
const { parentRef, focusAttributes } = useTextEditor(() => ({
|
|
176
|
+
id,
|
|
177
|
+
extensions: [
|
|
178
|
+
keymap.of(keyBindings({
|
|
179
|
+
onSend,
|
|
180
|
+
onClear
|
|
181
|
+
})),
|
|
182
|
+
listener({
|
|
183
|
+
onFocus: ({ focusing }) => {
|
|
184
|
+
if (focusing) {
|
|
185
|
+
onEditorFocus?.();
|
|
224
186
|
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
].filter(isNotFalsy),
|
|
228
|
-
...editorProps
|
|
229
|
-
}), [
|
|
230
|
-
id,
|
|
187
|
+
}
|
|
188
|
+
}),
|
|
231
189
|
extensions
|
|
232
|
-
])
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
190
|
+
].filter(isTruthy),
|
|
191
|
+
...editorProps
|
|
192
|
+
}), [
|
|
193
|
+
id,
|
|
194
|
+
extensions
|
|
195
|
+
]);
|
|
196
|
+
return /* @__PURE__ */ React2.createElement(MessageRoot, {
|
|
197
|
+
id,
|
|
198
|
+
authorId,
|
|
199
|
+
authorName,
|
|
200
|
+
authorImgSrc,
|
|
201
|
+
authorAvatarProps,
|
|
202
|
+
continues: false
|
|
203
|
+
}, /* @__PURE__ */ React2.createElement("div", {
|
|
204
|
+
role: "none",
|
|
205
|
+
ref: parentRef,
|
|
206
|
+
className: mx2("plb-0.5 mie-1 rounded-sm", focusRing, disabled && "opacity-50"),
|
|
207
|
+
...focusAttributes
|
|
208
|
+
}));
|
|
249
209
|
};
|
|
250
210
|
export {
|
|
251
211
|
MessageAuthorName,
|
|
@@ -255,9 +215,7 @@ export {
|
|
|
255
215
|
MessageTextbox,
|
|
256
216
|
MessageTime,
|
|
257
217
|
Thread,
|
|
258
|
-
ThreadFooter,
|
|
259
|
-
ThreadHeading,
|
|
260
218
|
threadLayout,
|
|
261
|
-
|
|
219
|
+
translations
|
|
262
220
|
};
|
|
263
221
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/translations.ts", "../../../src/Thread/Thread.tsx", "../../../src/Message/Message.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nexport const translationKey = 'thread';\n\nexport
|
|
5
|
-
"mappings": ";
|
|
6
|
-
"names": ["translationKey", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '@dxos/react-ui-thread';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'plugin name': 'Threads',\n 'thread title placeholder': 'New thread',\n 'thread title label': 'Title',\n 'delete thread label': 'Delete',\n 'create thread label': 'Create thread',\n 'message placeholder': 'Enter message...',\n 'comment placeholder': 'Enter comment...',\n 'settings standalone label': 'Enable standalone thread creation',\n 'anonymous label': 'Anonymous',\n 'enter to send message': 'Enter to add ⏎',\n },\n },\n },\n] as const satisfies Resource[];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { Icon, type ThemedClassName, useTranslation } from '@dxos/react-ui';\nimport { hoverableControlItem, hoverableFocusedWithinControls, mx } from '@dxos/ui-theme';\n\nimport { translationKey } from '../translations';\nimport type { ThreadEntity } from '../types';\n\n// TODO(burdon): Avoid exporting fragments.\nexport const threadLayout = 'is-full place-self-start grid grid-cols-[var(--rail-size)_1fr]';\n\n//\n// Root\n//\n\ntype ThreadRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & ThreadEntity & { current?: boolean };\n\nconst ThreadRoot = forwardRef<HTMLDivElement, ThreadRootProps>(\n ({ current, children, classNames, ...props }, forwardedRef) => {\n return (\n <div\n role='group'\n data-testid='thread'\n {...(current && { 'aria-current': typeof current === 'string' ? current : 'location' })}\n {...props}\n className={mx(\n threadLayout,\n hoverableFocusedWithinControls,\n 'bg-[var(--surface-bg)] current-related attention-surface [--controls-opacity:0]',\n classNames,\n )}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n\n//\n// Heading\n//\n\ntype ThreadHeaderProps = ComponentPropsWithRef<'div'> & { detached?: boolean };\n\nconst ThreadHeader = forwardRef<HTMLParagraphElement, ThreadHeaderProps>(\n ({ children, detached, ...props }, forwardedRef) => {\n return (\n <>\n <div role='none' className='flex items-center justify-center text-description'>\n <Icon icon='ph--caret-double-right--regular' />\n </div>\n <div role='none' className='flex items-center overflow-hidden'>\n <p\n role='heading'\n data-testid='thread.heading'\n {...props}\n className={mx(\n 'mie-2 text-description font-medium truncate italic',\n detached && 'line-through decoration-1',\n )}\n ref={forwardedRef}\n >\n {children}\n </p>\n </div>\n </>\n );\n },\n);\n\n//\n// Status\n//\n\ntype ThreadStatusProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {\n activity?: boolean;\n};\n\nconst ThreadStatus = forwardRef<HTMLDivElement, ThreadStatusProps>(\n ({ activity, classNames, children, ...props }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n return (\n <div\n {...props}\n className={mx(\n 'col-start-2 grid grid-cols-[min-content_1fr_max-content] pb-2 pie-2 text-xs text-description',\n classNames,\n )}\n ref={forwardedRef}\n >\n <Icon\n icon='ph--spinner--bold'\n classNames='is-6 bs-4 invisible data-[visible=show]:visible animate-spin-slow'\n data-visible={activity ? 'show' : 'hide'}\n />\n <span className='truncate min-is-0' aria-live='polite'>\n {activity ? children : null}\n </span>\n <span className={mx('text-end', hoverableControlItem)}>{t('enter to send message')}</span>\n </div>\n );\n },\n);\n\nexport const Thread = {\n Root: ThreadRoot,\n Header: ThreadHeader,\n Status: ThreadStatus,\n};\n\nexport type { ThreadRootProps, ThreadHeaderProps as ThreadHeadingProps, ThreadStatusProps };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { formatDistanceToNow } from 'date-fns/formatDistanceToNow';\nimport React, { type ComponentPropsWithRef, type ComponentPropsWithoutRef, forwardRef } from 'react';\n\nimport { Avatar, type ThemedClassName, useTranslation } from '@dxos/react-ui';\nimport { type UseTextEditorProps, useTextEditor } from '@dxos/react-ui-editor';\nimport { keymap, listener } from '@dxos/ui-editor';\nimport { focusRing, mx } from '@dxos/ui-theme';\nimport { hexToEmoji, hexToHue, isTruthy } from '@dxos/util';\n\nimport { translationKey } from '../translations';\nimport { type MessageMetadata } from '../types';\n\nconst avatarSize = 7;\n\nexport type MessageRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> &\n MessageMetadata &\n Partial<{ continues: boolean }>;\n\n// TODO(burdon): Show authorName on tooltip.\nexport const MessageRoot = forwardRef<HTMLDivElement, MessageRootProps>(\n (\n { authorImgSrc, authorId, authorName, authorAvatarProps, continues = true, children, classNames, ...rootProps },\n forwardedRef,\n ) => {\n return (\n // Must wrap the message since Avatar.Label may be used in the content.\n <Avatar.Root>\n <div\n role='none'\n data-testid='thread.message'\n {...rootProps}\n className={mx('grid grid-cols-subgrid col-span-2', classNames)}\n ref={forwardedRef}\n >\n <div role='none' className='flex flex-col items-center gap-2 pbs-1'>\n <Avatar.Content\n size={avatarSize}\n hue={authorAvatarProps?.hue || hexToHue(authorId ?? '0')}\n fallback={authorAvatarProps?.emoji || hexToEmoji(authorId ?? '0')}\n {...(authorImgSrc && { imgSrc: authorImgSrc })}\n />\n {continues && <div role='none' className='is-px grow bg-separator' />}\n </div>\n <div role='none' className='plb-1 min-is-0'>\n {children}\n </div>\n </div>\n </Avatar.Root>\n );\n },\n);\n\nexport type MessageHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> &\n Pick<MessageMetadata, 'authorName' | 'timestamp'>;\n\nexport const MessageHeading = ({ children, classNames, timestamp, authorName, ...props }: MessageHeadingProps) => {\n return (\n <div role='none' {...props} className={mx('flex gap-2 items-start', classNames)}>\n <p className='grow'>\n <MessageAuthorName authorName={authorName} />\n {timestamp && <MessageTime timestamp={timestamp} />}\n </p>\n {children}\n </div>\n );\n};\n\nexport type MessageAuthorNameProps = Pick<MessageMetadata, 'authorName'>;\n\nexport const MessageAuthorName = ({ authorName }: MessageAuthorNameProps) => {\n const { t } = useTranslation(translationKey);\n return (\n <Avatar.Label classNames='block truncate text-sm text-subdued'>{authorName ?? t('anonymous label')}</Avatar.Label>\n );\n};\n\nexport type MessageTimeProps = Pick<MessageMetadata, 'timestamp'>;\n\nexport const MessageTime = ({ timestamp }: MessageTimeProps) => {\n const { dtLocale } = useTranslation(translationKey);\n const dt = timestamp ? new Date(timestamp) : undefined;\n return (\n <time className='block text-subdued text-xs pbe-0.5' dateTime={dt?.toISOString()}>\n {dt ? formatDistanceToNow(dt, { locale: dtLocale, addSuffix: true }) : ''}\n </time>\n );\n};\n\nexport type MessageBodyProps = ComponentPropsWithoutRef<'p'>;\n\nexport const MessageBody = ({ children, ...props }: MessageBodyProps) => {\n return <p {...props}>{children}</p>;\n};\n\nexport type MessageTextboxProps = {\n disabled?: boolean;\n onSend?: () => void;\n onClear?: () => void;\n onEditorFocus?: () => void;\n} & MessageMetadata &\n UseTextEditorProps;\n\nconst keyBindings = ({ onSend, onClear }: Pick<MessageTextboxProps, 'onSend' | 'onClear'>) => [\n {\n key: 'Enter',\n run: () => {\n if (onSend) {\n onSend();\n return true;\n } else {\n return false;\n }\n },\n },\n {\n // TODO(burdon): Other key bindings.\n key: 'Meta+Backspace',\n run: () => {\n if (onClear) {\n onClear();\n return true;\n } else {\n return false;\n }\n },\n },\n];\n\nexport const MessageTextbox = ({\n id,\n authorId,\n authorName,\n authorImgSrc,\n authorAvatarProps,\n disabled,\n extensions,\n onSend,\n onClear,\n onEditorFocus,\n ...editorProps\n}: MessageTextboxProps) => {\n const { parentRef, focusAttributes } = useTextEditor(\n () => ({\n id,\n extensions: [\n keymap.of(keyBindings({ onSend, onClear })),\n listener({\n onFocus: ({ focusing }) => {\n if (focusing) {\n onEditorFocus?.();\n }\n },\n }),\n extensions,\n ].filter(isTruthy),\n ...editorProps,\n }),\n [id, extensions],\n );\n\n return (\n <MessageRoot {...{ id, authorId, authorName, authorImgSrc, authorAvatarProps }} continues={false}>\n <div\n role='none'\n ref={parentRef}\n className={mx('plb-0.5 mie-1 rounded-sm', focusRing, disabled && 'opacity-50')}\n {...focusAttributes}\n />\n </MessageRoot>\n );\n};\n"],
|
|
5
|
+
"mappings": ";AAMO,IAAMA,iBAAiB;AAEvB,IAA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,QAAQC,QAAO,MAAwD;EAC5F;IACEC,KAAK;IACLC,KAAK,MAAA;AACH,UAAIH,QAAQ;AACVA,eAAAA;AACA,eAAO;MACT,OAAO;AACL,eAAO;MACT;IACF;EACF;EACA;;IAEEE,KAAK;IACLC,KAAK,MAAA;AACH,UAAIF,SAAS;AACXA,gBAAAA;AACA,eAAO;MACT,OAAO;AACL,eAAO;MACT;IACF;EACF;;AAGK,IAAMG,iBAAiB,CAAC,EAC7BC,IACApD,UACAC,YACAF,cACAG,mBACAmD,UACAC,YACAP,QACAC,SACAO,eACA,GAAGC,YAAAA,MACiB;AACpB,QAAM,EAAEC,WAAWC,gBAAe,IAAKC,cACrC,OAAO;IACLP;IACAE,YAAY;MACVM,OAAOC,GAAGf,YAAY;QAAEC;QAAQC;MAAQ,CAAA,CAAA;MACxCc,SAAS;QACPC,SAAS,CAAC,EAAEC,SAAQ,MAAE;AACpB,cAAIA,UAAU;AACZT,4BAAAA;UACF;QACF;MACF,CAAA;MACAD;MACAW,OAAOC,QAAAA;IACT,GAAGV;EACL,IACA;IAACJ;IAAIE;GAAW;AAGlB,SACE,gBAAA9C,OAAA,cAACX,aAAAA;IAAkBuD;IAAIpD;IAAUC;IAAYF;IAAcG;IAAqBC,WAAW;KACzF,gBAAAK,OAAA,cAACG,OAAAA;IACCC,MAAK;IACLI,KAAKyC;IACL3C,WAAWC,IAAG,4BAA4BoD,WAAWd,YAAY,YAAA;IAChE,GAAGK;;AAIZ;",
|
|
6
|
+
"names": ["translationKey", "translations", "React", "forwardRef", "Icon", "useTranslation", "hoverableControlItem", "hoverableFocusedWithinControls", "mx", "threadLayout", "ThreadRoot", "forwardRef", "current", "children", "classNames", "props", "forwardedRef", "div", "role", "data-testid", "className", "mx", "hoverableFocusedWithinControls", "ref", "ThreadHeader", "detached", "Icon", "icon", "p", "ThreadStatus", "activity", "t", "useTranslation", "translationKey", "data-visible", "span", "aria-live", "hoverableControlItem", "Thread", "Root", "Header", "Status", "formatDistanceToNow", "React", "forwardRef", "Avatar", "useTranslation", "useTextEditor", "keymap", "listener", "focusRing", "mx", "hexToEmoji", "hexToHue", "isTruthy", "avatarSize", "MessageRoot", "forwardRef", "authorImgSrc", "authorId", "authorName", "authorAvatarProps", "continues", "children", "classNames", "rootProps", "forwardedRef", "React", "Avatar", "Root", "div", "role", "data-testid", "className", "mx", "ref", "Content", "size", "hue", "hexToHue", "fallback", "emoji", "hexToEmoji", "imgSrc", "MessageHeading", "timestamp", "props", "p", "MessageAuthorName", "MessageTime", "t", "useTranslation", "translationKey", "Label", "dtLocale", "dt", "Date", "undefined", "time", "dateTime", "toISOString", "formatDistanceToNow", "locale", "addSuffix", "MessageBody", "keyBindings", "onSend", "onClear", "key", "run", "MessageTextbox", "id", "disabled", "extensions", "onEditorFocus", "editorProps", "parentRef", "focusAttributes", "useTextEditor", "keymap", "of", "listener", "onFocus", "focusing", "filter", "isTruthy", "focusRing"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"
|
|
1
|
+
{"inputs":{"src/translations.ts":{"bytes":2480,"imports":[],"format":"esm"},"src/Thread/Thread.tsx":{"bytes":9776,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"src/Thread/index.ts":{"bytes":459,"imports":[{"path":"src/Thread/Thread.tsx","kind":"import-statement","original":"./Thread"}],"format":"esm"},"src/Message/Message.tsx":{"bytes":16734,"imports":[{"path":"date-fns/formatDistanceToNow","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/translations.ts","kind":"import-statement","original":"../translations"}],"format":"esm"},"src/Message/index.ts":{"bytes":461,"imports":[{"path":"src/Message/Message.tsx","kind":"import-statement","original":"./Message"}],"format":"esm"},"src/index.ts":{"bytes":839,"imports":[{"path":"src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"src/Thread/index.ts","kind":"import-statement","original":"./Thread"},{"path":"src/Message/index.ts","kind":"import-statement","original":"./Message"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15281},"dist/lib/browser/index.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"date-fns/formatDistanceToNow","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-editor","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["MessageAuthorName","MessageBody","MessageHeading","MessageRoot","MessageTextbox","MessageTime","Thread","threadLayout","translations"],"entryPoint":"src/index.ts","inputs":{"src/translations.ts":{"bytesInOutput":616},"src/Thread/Thread.tsx":{"bytesInOutput":2549},"src/index.ts":{"bytesInOutput":0},"src/Message/Message.tsx":{"bytesInOutput":4260}},"bytes":7692}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../src/Message/Message.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../src/Message/Message.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAEr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GAAI,qIAY5B,mBAAmB,sBA8BrB,CAAC"}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import '@
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
declare const
|
|
3
|
+
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: any;
|
|
6
6
|
render: () => React.JSX.Element;
|
|
7
7
|
decorators: import("@storybook/react").Decorator[];
|
|
8
8
|
parameters: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
'
|
|
14
|
-
'thread title
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
9
|
+
layout: string;
|
|
10
|
+
translations: [{
|
|
11
|
+
readonly 'en-US': {
|
|
12
|
+
readonly "@dxos/react-ui-thread": {
|
|
13
|
+
readonly 'plugin name': "Threads";
|
|
14
|
+
readonly 'thread title placeholder': "New thread";
|
|
15
|
+
readonly 'thread title label': "Title";
|
|
16
|
+
readonly 'delete thread label': "Delete";
|
|
17
|
+
readonly 'create thread label': "Create thread";
|
|
18
|
+
readonly 'message placeholder': "Enter message...";
|
|
19
|
+
readonly 'comment placeholder': "Enter comment...";
|
|
20
|
+
readonly 'settings standalone label': "Enable standalone thread creation";
|
|
21
|
+
readonly 'anonymous label': "Anonymous";
|
|
22
|
+
readonly 'enter to send message': "Enter to add ⏎";
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
|
-
}
|
|
25
|
+
}];
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
|
-
export default
|
|
28
|
-
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
export declare const Default: Story;
|
|
29
31
|
//# sourceMappingURL=Message.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.stories.d.ts","sourceRoot":"","sources":["../../../../src/Message/Message.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"Message.stories.d.ts","sourceRoot":"","sources":["../../../../src/Message/Message.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgCxC,QAAA,MAAM,IAAI;;eAEkB,GAAG;;;;;;;;;;;;;;;;;;;;;;CAOM,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|