@dxos/react-ui-thread 0.8.4-main.f9ba587 → 0.8.4-main.fcc0d83b33

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.
Files changed (36) hide show
  1. package/dist/lib/browser/index.mjs +134 -199
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/browser/translations.mjs +25 -0
  5. package/dist/lib/browser/translations.mjs.map +7 -0
  6. package/dist/types/src/Message/Message.d.ts +2 -2
  7. package/dist/types/src/Message/Message.d.ts.map +1 -1
  8. package/dist/types/src/Message/Message.stories.d.ts +18 -16
  9. package/dist/types/src/Message/Message.stories.d.ts.map +1 -1
  10. package/dist/types/src/Thread/Comments.stories.d.ts +19 -36
  11. package/dist/types/src/Thread/Comments.stories.d.ts.map +1 -1
  12. package/dist/types/src/Thread/Thread.d.ts +25 -11
  13. package/dist/types/src/Thread/Thread.d.ts.map +1 -1
  14. package/dist/types/src/Thread/Thread.stories.d.ts +33 -5
  15. package/dist/types/src/Thread/Thread.stories.d.ts.map +1 -1
  16. package/dist/types/src/index.d.ts +1 -3
  17. package/dist/types/src/index.d.ts.map +1 -1
  18. package/dist/types/src/testing.d.ts.map +1 -1
  19. package/dist/types/src/translations.d.ts +12 -12
  20. package/dist/types/src/translations.d.ts.map +1 -1
  21. package/dist/types/src/types.d.ts +1 -0
  22. package/dist/types/src/types.d.ts.map +1 -1
  23. package/dist/types/tsconfig.tsbuildinfo +1 -1
  24. package/package.json +37 -29
  25. package/src/Message/Message.stories.tsx +21 -14
  26. package/src/Message/Message.tsx +19 -17
  27. package/src/Thread/Comments.stories.tsx +84 -53
  28. package/src/Thread/Thread.stories.tsx +22 -17
  29. package/src/Thread/Thread.tsx +25 -24
  30. package/src/index.ts +1 -4
  31. package/src/testing.tsx +9 -9
  32. package/src/translations.ts +11 -11
  33. package/src/types.ts +1 -0
  34. package/dist/lib/node-esm/index.mjs +0 -268
  35. package/dist/lib/node-esm/index.mjs.map +0 -7
  36. package/dist/lib/node-esm/meta.json +0 -1
@@ -1,89 +1,54 @@
1
- // src/translations.ts
2
- var translationKey = "react-ui-thread";
3
- var translations = [
4
- {
5
- "en-US": {
6
- [translationKey]: {
7
- "plugin name": "Threads",
8
- "thread title placeholder": "New thread",
9
- "thread title label": "Title",
10
- "delete thread label": "Delete",
11
- "create thread label": "Create thread",
12
- "message placeholder": "Enter message...",
13
- "comment placeholder": "Enter comment...",
14
- "settings standalone label": "Enable standalone thread creation",
15
- "anonymous label": "Anonymous",
16
- "enter to send message": "Enter to add \u23CE"
17
- }
18
- }
19
- }
20
- ];
21
-
22
1
  // src/Thread/Thread.tsx
23
- import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
24
- import { CaretDoubleRight, Spinner } from "@phosphor-icons/react";
25
2
  import React, { forwardRef } from "react";
26
- import { useTranslation } from "@dxos/react-ui";
27
- import { hoverableControlItem, hoverableFocusedWithinControls, mx } from "@dxos/react-ui-theme";
28
- var threadLayout = "is-full place-self-start grid grid-cols-[var(--rail-size)_1fr]";
3
+ import { Icon, useTranslation } from "@dxos/react-ui";
4
+ import { hoverableControlItem, hoverableFocusedWithinControls, mx } from "@dxos/ui-theme";
5
+ import { translationKey } from "#translations";
6
+ var threadLayout = "w-full place-self-start grid grid-cols-[var(--dx-rail-size)_1fr]";
29
7
  var ThreadRoot = /* @__PURE__ */ forwardRef(({ current, children, classNames, ...props }, forwardedRef) => {
30
- var _effect = _useSignals();
31
- try {
32
- return /* @__PURE__ */ React.createElement("div", {
33
- role: "group",
34
- "data-testid": "thread",
35
- ...current && {
36
- "aria-current": typeof current === "string" ? current : "location"
37
- },
38
- ...props,
39
- className: mx(threadLayout, hoverableFocusedWithinControls, "bg-[var(--surface-bg)] current-related attention-surface [--controls-opacity:0]", classNames),
40
- ref: forwardedRef
41
- }, children);
42
- } finally {
43
- _effect.f();
44
- }
8
+ return /* @__PURE__ */ React.createElement("div", {
9
+ role: "group",
10
+ "data-testid": "thread",
11
+ ...current && {
12
+ "aria-current": typeof current === "string" ? current : "location"
13
+ },
14
+ ...props,
15
+ className: mx(threadLayout, hoverableFocusedWithinControls, "bg-[var(--surface-bg)] current-related dx-attention-surface [--controls-opacity:0]", classNames),
16
+ ref: forwardedRef
17
+ }, children);
45
18
  });
46
- var ThreadHeader = /* @__PURE__ */ forwardRef(({ classNames, children, detached, ...props }, forwardedRef) => {
47
- var _effect = _useSignals();
48
- try {
49
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
50
- role: "none",
51
- className: "flex items-center justify-center text-description"
52
- }, /* @__PURE__ */ React.createElement(CaretDoubleRight, null)), /* @__PURE__ */ React.createElement("div", {
53
- role: "none",
54
- className: "flex items-center overflow-hidden"
55
- }, /* @__PURE__ */ React.createElement("p", {
56
- role: "heading",
57
- "data-testid": "thread.heading",
58
- ...props,
59
- className: mx("mie-2 text-description font-medium truncate italic", detached && "line-through decoration-1"),
60
- ref: forwardedRef
61
- }, children)));
62
- } finally {
63
- _effect.f();
64
- }
19
+ var ThreadHeader = /* @__PURE__ */ forwardRef(({ children, detached, ...props }, forwardedRef) => {
20
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
21
+ role: "none",
22
+ className: "flex items-center justify-center text-description"
23
+ }, /* @__PURE__ */ React.createElement(Icon, {
24
+ icon: "ph--caret-double-right--regular"
25
+ })), /* @__PURE__ */ React.createElement("div", {
26
+ role: "none",
27
+ className: "flex items-center overflow-hidden"
28
+ }, /* @__PURE__ */ React.createElement("p", {
29
+ role: "heading",
30
+ "data-testid": "thread.heading",
31
+ ...props,
32
+ className: mx("me-2 text-description font-medium truncate italic", detached && "line-through decoration-1"),
33
+ ref: forwardedRef
34
+ }, children)));
65
35
  });
66
36
  var ThreadStatus = /* @__PURE__ */ forwardRef(({ activity, classNames, children, ...props }, forwardedRef) => {
67
- var _effect = _useSignals();
68
- try {
69
- const { t } = useTranslation(translationKey);
70
- return /* @__PURE__ */ React.createElement("div", {
71
- ...props,
72
- className: mx("col-start-2 grid grid-cols-[min-content_1fr_max-content] pb-2 pie-2 text-xs text-description", classNames),
73
- ref: forwardedRef
74
- }, /* @__PURE__ */ React.createElement(Spinner, {
75
- weight: "bold",
76
- "data-visible": activity ? "show" : "hide",
77
- className: "is-6 bs-4 invisible data-[visible=show]:visible animate-spin-slow"
78
- }), /* @__PURE__ */ React.createElement("span", {
79
- className: "truncate min-is-0",
80
- "aria-live": "polite"
81
- }, activity ? children : null), /* @__PURE__ */ React.createElement("span", {
82
- className: mx("text-end", hoverableControlItem)
83
- }, t("enter to send message")));
84
- } finally {
85
- _effect.f();
86
- }
37
+ const { t } = useTranslation(translationKey);
38
+ return /* @__PURE__ */ React.createElement("div", {
39
+ ...props,
40
+ className: mx("col-start-2 grid grid-cols-[min-content_1fr_max-content] pb-2 pe-2 text-xs text-description", classNames),
41
+ ref: forwardedRef
42
+ }, /* @__PURE__ */ React.createElement(Icon, {
43
+ icon: "ph--spinner--bold",
44
+ classNames: "w-6 h-4 invisible data-[visible=show]:visible animate-spin-slow",
45
+ "data-visible": activity ? "show" : "hide"
46
+ }), /* @__PURE__ */ React.createElement("span", {
47
+ className: "truncate min-w-0",
48
+ "aria-live": "polite"
49
+ }, activity ? children : null), /* @__PURE__ */ React.createElement("span", {
50
+ className: mx("text-end", hoverableControlItem)
51
+ }, t("enter-to-send.message")));
87
52
  });
88
53
  var Thread = {
89
54
  Root: ThreadRoot,
@@ -92,99 +57,75 @@ var Thread = {
92
57
  };
93
58
 
94
59
  // src/Message/Message.tsx
95
- import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
96
60
  import { formatDistanceToNow } from "date-fns/formatDistanceToNow";
97
61
  import React2, { forwardRef as forwardRef2 } from "react";
98
62
  import { Avatar, useTranslation as useTranslation2 } from "@dxos/react-ui";
99
- import { keymap, listener, useTextEditor } from "@dxos/react-ui-editor";
100
- import { focusRing, mx as mx2 } from "@dxos/react-ui-theme";
101
- import { hexToEmoji, hexToHue, isNotFalsy } from "@dxos/util";
63
+ import { useTextEditor } from "@dxos/react-ui-editor";
64
+ import { keymap, listener } from "@dxos/ui-editor";
65
+ import { mx as mx2 } from "@dxos/ui-theme";
66
+ import { hexToEmoji, hexToHue, isTruthy } from "@dxos/util";
67
+ import { translationKey as translationKey2 } from "#translations";
102
68
  var avatarSize = 7;
103
69
  var MessageRoot = /* @__PURE__ */ forwardRef2(({ authorImgSrc, authorId, authorName, authorAvatarProps, continues = true, children, classNames, ...rootProps }, forwardedRef) => {
104
- var _effect = _useSignals2();
105
- try {
106
- return (
107
- // Must wrap the message since Avatar.Label may be used in the content.
108
- /* @__PURE__ */ React2.createElement(Avatar.Root, null, /* @__PURE__ */ React2.createElement("div", {
109
- role: "none",
110
- "data-testid": "thread.message",
111
- ...rootProps,
112
- className: mx2("grid grid-cols-subgrid col-span-2", classNames),
113
- ref: forwardedRef
114
- }, /* @__PURE__ */ React2.createElement("div", {
115
- role: "none",
116
- className: "flex flex-col items-center gap-2 pbs-2"
117
- }, /* @__PURE__ */ React2.createElement(Avatar.Content, {
118
- size: avatarSize,
119
- hue: authorAvatarProps?.hue || hexToHue(authorId ?? "0"),
120
- fallback: authorAvatarProps?.emoji || hexToEmoji(authorId ?? "0"),
121
- ...authorImgSrc && {
122
- imgSrc: authorImgSrc
123
- }
124
- }), continues && /* @__PURE__ */ React2.createElement("div", {
125
- role: "none",
126
- className: "is-px grow bg-separator"
127
- })), /* @__PURE__ */ React2.createElement("div", {
128
- role: "none",
129
- className: "plb-1 min-is-0"
130
- }, children)))
131
- );
132
- } finally {
133
- _effect.f();
134
- }
70
+ return (
71
+ // Must wrap the message since Avatar.Label may be used in the content.
72
+ /* @__PURE__ */ React2.createElement(Avatar.Root, null, /* @__PURE__ */ React2.createElement("div", {
73
+ role: "none",
74
+ "data-testid": "thread.message",
75
+ ...rootProps,
76
+ className: mx2("grid grid-cols-subgrid col-span-2", classNames),
77
+ ref: forwardedRef
78
+ }, /* @__PURE__ */ React2.createElement("div", {
79
+ role: "none",
80
+ className: "flex flex-col items-center gap-2 pt-1"
81
+ }, /* @__PURE__ */ React2.createElement(Avatar.Content, {
82
+ size: avatarSize,
83
+ hue: authorAvatarProps?.hue || hexToHue(authorId ?? "0"),
84
+ fallback: authorAvatarProps?.emoji || hexToEmoji(authorId ?? "0"),
85
+ ...authorImgSrc && {
86
+ imgSrc: authorImgSrc
87
+ }
88
+ }), continues && /* @__PURE__ */ React2.createElement("div", {
89
+ role: "none",
90
+ className: "w-px grow bg-separator"
91
+ })), /* @__PURE__ */ React2.createElement("div", {
92
+ role: "none",
93
+ className: "py-1 min-w-0"
94
+ }, children)))
95
+ );
135
96
  });
136
97
  var MessageHeading = ({ children, classNames, timestamp, authorName, ...props }) => {
137
- var _effect = _useSignals2();
138
- try {
139
- return /* @__PURE__ */ React2.createElement("div", {
140
- role: "none",
141
- ...props,
142
- className: mx2("flex gap-2 items-start", classNames)
143
- }, /* @__PURE__ */ React2.createElement("p", {
144
- className: "grow"
145
- }, /* @__PURE__ */ React2.createElement(MessageAuthorName, {
146
- authorName
147
- }), timestamp && /* @__PURE__ */ React2.createElement(MessageTime, {
148
- timestamp
149
- })), children);
150
- } finally {
151
- _effect.f();
152
- }
98
+ return /* @__PURE__ */ React2.createElement("div", {
99
+ role: "none",
100
+ ...props,
101
+ className: mx2("flex gap-2 items-start", classNames)
102
+ }, /* @__PURE__ */ React2.createElement("p", {
103
+ className: "grow"
104
+ }, /* @__PURE__ */ React2.createElement(MessageAuthorName, {
105
+ authorName
106
+ }), timestamp && /* @__PURE__ */ React2.createElement(MessageTime, {
107
+ timestamp
108
+ })), children);
153
109
  };
154
110
  var MessageAuthorName = ({ authorName }) => {
155
- var _effect = _useSignals2();
156
- try {
157
- const { t } = useTranslation2(translationKey);
158
- return /* @__PURE__ */ React2.createElement(Avatar.Label, {
159
- classNames: "block truncate text-sm text-subdued"
160
- }, authorName ?? t("anonymous label"));
161
- } finally {
162
- _effect.f();
163
- }
111
+ const { t } = useTranslation2(translationKey2);
112
+ return /* @__PURE__ */ React2.createElement(Avatar.Label, {
113
+ classNames: "block truncate text-sm text-subdued"
114
+ }, authorName ?? t("anonymous.label"));
164
115
  };
165
116
  var MessageTime = ({ timestamp }) => {
166
- var _effect = _useSignals2();
167
- try {
168
- const { dtLocale } = useTranslation2(translationKey);
169
- const dt = timestamp ? new Date(timestamp) : void 0;
170
- return /* @__PURE__ */ React2.createElement("time", {
171
- className: "block text-subdued text-xs pbe-0.5",
172
- dateTime: dt?.toISOString()
173
- }, dt ? formatDistanceToNow(dt, {
174
- locale: dtLocale,
175
- addSuffix: true
176
- }) : "");
177
- } finally {
178
- _effect.f();
179
- }
117
+ const { dtLocale } = useTranslation2(translationKey2);
118
+ const dt = timestamp ? new Date(timestamp) : void 0;
119
+ return /* @__PURE__ */ React2.createElement("time", {
120
+ className: "block text-subdued text-xs pb-0.5",
121
+ dateTime: dt?.toISOString()
122
+ }, dt ? formatDistanceToNow(dt, {
123
+ locale: dtLocale,
124
+ addSuffix: true
125
+ }) : "");
180
126
  };
181
127
  var MessageBody = ({ children, ...props }) => {
182
- var _effect = _useSignals2();
183
- try {
184
- return /* @__PURE__ */ React2.createElement("p", props, children);
185
- } finally {
186
- _effect.f();
187
- }
128
+ return /* @__PURE__ */ React2.createElement("p", props, children);
188
129
  };
189
130
  var keyBindings = ({ onSend, onClear }) => [
190
131
  {
@@ -212,45 +153,40 @@ var keyBindings = ({ onSend, onClear }) => [
212
153
  }
213
154
  ];
214
155
  var MessageTextbox = ({ id, authorId, authorName, authorImgSrc, authorAvatarProps, disabled, extensions, onSend, onClear, onEditorFocus, ...editorProps }) => {
215
- var _effect = _useSignals2();
216
- try {
217
- const { parentRef, focusAttributes } = useTextEditor(() => ({
218
- id,
219
- extensions: [
220
- keymap.of(keyBindings({
221
- onSend,
222
- onClear
223
- })),
224
- listener({
225
- onFocus: (focusing) => {
226
- if (focusing) {
227
- onEditorFocus?.();
228
- }
156
+ const { parentRef, focusAttributes } = useTextEditor(() => ({
157
+ id,
158
+ extensions: [
159
+ keymap.of(keyBindings({
160
+ onSend,
161
+ onClear
162
+ })),
163
+ listener({
164
+ onFocus: ({ focusing }) => {
165
+ if (focusing) {
166
+ onEditorFocus?.();
229
167
  }
230
- }),
231
- extensions
232
- ].filter(isNotFalsy),
233
- ...editorProps
234
- }), [
235
- id,
168
+ }
169
+ }),
236
170
  extensions
237
- ]);
238
- return /* @__PURE__ */ React2.createElement(MessageRoot, {
239
- id,
240
- authorId,
241
- authorName,
242
- authorImgSrc,
243
- authorAvatarProps,
244
- continues: false
245
- }, /* @__PURE__ */ React2.createElement("div", {
246
- role: "none",
247
- ref: parentRef,
248
- className: mx2("plb-0.5 mie-1 rounded-sm", focusRing, disabled && "opacity-50"),
249
- ...focusAttributes
250
- }));
251
- } finally {
252
- _effect.f();
253
- }
171
+ ].filter(isTruthy),
172
+ ...editorProps
173
+ }), [
174
+ id,
175
+ extensions
176
+ ]);
177
+ return /* @__PURE__ */ React2.createElement(MessageRoot, {
178
+ id,
179
+ authorId,
180
+ authorName,
181
+ authorImgSrc,
182
+ authorAvatarProps,
183
+ continues: false
184
+ }, /* @__PURE__ */ React2.createElement("div", {
185
+ role: "none",
186
+ ref: parentRef,
187
+ className: mx2("py-0.5 me-1 rounded-xs dx-focus-ring", disabled && "opacity-50"),
188
+ ...focusAttributes
189
+ }));
254
190
  };
255
191
  export {
256
192
  MessageAuthorName,
@@ -260,7 +196,6 @@ export {
260
196
  MessageTextbox,
261
197
  MessageTime,
262
198
  Thread,
263
- threadLayout,
264
- translations
199
+ threadLayout
265
200
  };
266
201
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/translations.ts", "../../../src/Thread/Thread.tsx", "../../../src/Message/Message.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '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 { CaretDoubleRight, Spinner } from '@phosphor-icons/react';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { type ThemedClassName, useTranslation } from '@dxos/react-ui';\nimport { hoverableControlItem, hoverableFocusedWithinControls, mx } from '@dxos/react-ui-theme';\n\nimport { translationKey } from '../translations';\nimport type { ThreadEntity } from '../types';\n\n// TODO(burdon): Why is this exported?\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 = ThemedClassName<ComponentPropsWithRef<'div'>> & { detached?: boolean };\n\nconst ThreadHeader = forwardRef<HTMLParagraphElement, ThreadHeaderProps>(\n ({ classNames, children, detached, ...props }, forwardedRef) => {\n return (\n <>\n <div role='none' className='flex items-center justify-center text-description'>\n <CaretDoubleRight />\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 <Spinner\n weight='bold'\n data-visible={activity ? 'show' : 'hide'}\n className='is-6 bs-4 invisible data-[visible=show]:visible animate-spin-slow'\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, forwardRef, type ComponentPropsWithoutRef } from 'react';\n\n// TODO(burdon): Remove dep.\nimport { Avatar, type ThemedClassName, useTranslation } from '@dxos/react-ui';\nimport { type UseTextEditorProps, keymap, listener, useTextEditor } from '@dxos/react-ui-editor';\nimport { focusRing, mx } from '@dxos/react-ui-theme';\nimport { hexToEmoji, hexToHue, isNotFalsy } 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\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-2'>\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(isNotFalsy),\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,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB;QAChB,eAAe;QACf,4BAA4B;QAC5B,sBAAsB;QACtB,uBAAu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K;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,UAAM,EAAEC,WAAWC,gBAAe,IAAKC,cACrC,OAAO;MACLP;MACAE,YAAY;QACVM,OAAOC,GAAGf,YAAY;UAAEC;UAAQC;QAAQ,CAAA,CAAA;QACxCc,SAAS;UACPC,SAAS,CAACC,aAAAA;AACR,gBAAIA,UAAU;AACZT,8BAAAA;YACF;UACF;QACF,CAAA;QACAD;QACAW,OAAOC,UAAAA;MACT,GAAGV;IACL,IACA;MAACJ;MAAIE;KAAW;AAGlB,WACE,gBAAA9C,OAAA,cAACX,aAAAA;MAAkBuD;MAAIpD;MAAUC;MAAYF;MAAcG;MAAqBC,WAAW;OACzF,gBAAAK,OAAA,cAACG,OAAAA;MACCC,MAAK;MACLI,KAAKyC;MACL3C,WAAWC,IAAG,4BAA4BoD,WAAWd,YAAY,YAAA;MAChE,GAAGK;;;;;AAIZ;",
6
- "names": ["translationKey", "translations", "CaretDoubleRight", "Spinner", "React", "forwardRef", "useTranslation", "hoverableControlItem", "hoverableFocusedWithinControls", "mx", "threadLayout", "ThreadRoot", "forwardRef", "current", "children", "classNames", "props", "forwardedRef", "div", "role", "data-testid", "className", "mx", "hoverableFocusedWithinControls", "ref", "ThreadHeader", "detached", "CaretDoubleRight", "p", "ThreadStatus", "activity", "t", "useTranslation", "translationKey", "Spinner", "weight", "data-visible", "span", "aria-live", "hoverableControlItem", "Thread", "Root", "Header", "Status", "formatDistanceToNow", "React", "forwardRef", "Avatar", "useTranslation", "keymap", "listener", "useTextEditor", "focusRing", "mx", "hexToEmoji", "hexToHue", "isNotFalsy", "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", "isNotFalsy", "focusRing"]
3
+ "sources": ["../../../src/Thread/Thread.tsx", "../../../src/Message/Message.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { ComponentPropsWithRef, forwardRef, PropsWithChildren } 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';\n\nimport type { ThreadEntity } from '../types';\n\n// TODO(burdon): Avoid exporting fragments.\nexport const threadLayout = 'w-full place-self-start grid grid-cols-[var(--dx-rail-size)_1fr]';\n\n//\n// Root\n//\n\ntype ThreadRootProps = ThemedClassName<\n PropsWithChildren<\n ThreadEntity & { current?: boolean } & Pick<ComponentPropsWithRef<'div'>, 'onClickCapture' | 'onFocusCapture'>\n >\n>;\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 dx-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 = PropsWithChildren<{ 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('me-2 text-description font-medium truncate italic', detached && 'line-through decoration-1')}\n ref={forwardedRef}\n >\n {children}\n </p>\n </div>\n </>\n );\n },\n);\n\n//\n// Status\n//\n\ntype ThreadStatusProps = ThemedClassName<PropsWithChildren> & {\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 pe-2 text-xs text-description',\n classNames,\n )}\n ref={forwardedRef}\n >\n <Icon\n icon='ph--spinner--bold'\n classNames='w-6 h-4 invisible data-[visible=show]:visible animate-spin-slow'\n data-visible={activity ? 'show' : 'hide'}\n />\n <span className='truncate min-w-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, 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 { mx } from '@dxos/ui-theme';\nimport { hexToEmoji, hexToHue, isTruthy } from '@dxos/util';\n\nimport { translationKey } from '#translations';\n\nimport { type MessageMetadata } from '../types';\n\nconst avatarSize = 7;\n\nexport type MessageRootProps = ThemedClassName<\n ComponentPropsWithRef<'div'> & MessageMetadata & Partial<{ continues: boolean }>\n>;\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 pt-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='w-px grow bg-separator' />}\n </div>\n <div role='none' className='py-1 min-w-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 pb-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('py-0.5 me-1 rounded-xs dx-focus-ring', disabled && 'opacity-50')}\n {...focusAttributes}\n />\n </MessageRoot>\n );\n};\n"],
5
+ "mappings": ";AAIA,OAAOA,SAAgCC,kBAAqC;AAE5E,SAASC,MAA4BC,sBAAsB;AAC3D,SAASC,sBAAsBC,gCAAgCC,UAAU;AAEzE,SAASC,sBAAsB;AAKxB,IAAMC,eAAe;AAY5B,IAAMC,aAAaR,2BACjB,CAAC,EAAES,SAASC,UAAUC,YAAY,GAAGC,MAAAA,GAASC,iBAAAA;AAC5C,SACE,sBAAA,cAACC,OAAAA;IACCC,MAAK;IACLC,eAAY;IACX,GAAIP,WAAW;MAAE,gBAAgB,OAAOA,YAAY,WAAWA,UAAU;IAAW;IACpF,GAAGG;IACJK,WAAWZ,GACTE,cACAH,gCACA,sFACAO,UAAAA;IAEFO,KAAKL;KAEJH,QAAAA;AAGP,CAAA;AASF,IAAMS,eAAenB,2BACnB,CAAC,EAAEU,UAAUU,UAAU,GAAGR,MAAAA,GAASC,iBAAAA;AACjC,SACE,sBAAA,cAAA,MAAA,UAAA,MACE,sBAAA,cAACC,OAAAA;IAAIC,MAAK;IAAOE,WAAU;KACzB,sBAAA,cAAChB,MAAAA;IAAKoB,MAAK;OAEb,sBAAA,cAACP,OAAAA;IAAIC,MAAK;IAAOE,WAAU;KACzB,sBAAA,cAACK,KAAAA;IACCP,MAAK;IACLC,eAAY;IACX,GAAGJ;IACJK,WAAWZ,GAAG,qDAAqDe,YAAY,2BAAA;IAC/EF,KAAKL;KAEJH,QAAAA,CAAAA,CAAAA;AAKX,CAAA;AAWF,IAAMa,eAAevB,2BACnB,CAAC,EAAEwB,UAAUb,YAAYD,UAAU,GAAGE,MAAAA,GAASC,iBAAAA;AAC7C,QAAM,EAAEY,EAAC,IAAKvB,eAAeI,cAAAA;AAC7B,SACE,sBAAA,cAAC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A;AACxB;AAUA,IAAMkC,cAAc,CAAC,EAAEC,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,IACA5C,UACAC,YACAF,cACAG,mBACA2C,UACAC,YACAP,QACAC,SACAO,eACA,GAAGC,YAAAA,MACiB;AACpB,QAAM,EAAEC,WAAWC,gBAAe,IAAK7D,cACrC,OAAO;IACLuD;IACAE,YAAY;MACVxD,OAAO6D,GAAGb,YAAY;QAAEC;QAAQC;MAAQ,CAAA,CAAA;MACxCjD,SAAS;QACP6D,SAAS,CAAC,EAAEC,SAAQ,MAAE;AACpB,cAAIA,UAAU;AACZN,4BAAAA;UACF;QACF;MACF,CAAA;MACAD;MACAQ,OAAO3D,QAAAA;IACT,GAAGqD;EACL,IACA;IAACJ;IAAIE;GAAW;AAGlB,SACE,gBAAA7D,OAAA,cAACa,aAAAA;IAAkB8C;IAAI5C;IAAUC;IAAYF;IAAcG;IAAqBC,WAAW;KACzF,gBAAAlB,OAAA,cAACwB,OAAAA;IACCC,MAAK;IACLG,KAAKoC;IACLrC,WAAWpB,IAAG,wCAAwCqD,YAAY,YAAA;IACjE,GAAGK;;AAIZ;",
6
+ "names": ["React", "forwardRef", "Icon", "useTranslation", "hoverableControlItem", "hoverableFocusedWithinControls", "mx", "translationKey", "threadLayout", "ThreadRoot", "current", "children", "classNames", "props", "forwardedRef", "div", "role", "data-testid", "className", "ref", "ThreadHeader", "detached", "icon", "p", "ThreadStatus", "activity", "t", "data-visible", "span", "aria-live", "Thread", "Root", "Header", "Status", "formatDistanceToNow", "React", "forwardRef", "Avatar", "useTranslation", "useTextEditor", "keymap", "listener", "mx", "hexToEmoji", "hexToHue", "isTruthy", "translationKey", "avatarSize", "MessageRoot", "authorImgSrc", "authorId", "authorName", "authorAvatarProps", "continues", "children", "classNames", "rootProps", "forwardedRef", "Root", "div", "role", "data-testid", "className", "ref", "Content", "size", "hue", "fallback", "emoji", "imgSrc", "MessageHeading", "timestamp", "props", "p", "MessageAuthorName", "MessageTime", "t", "Label", "dtLocale", "dt", "Date", "undefined", "time", "dateTime", "toISOString", "locale", "addSuffix", "MessageBody", "keyBindings", "onSend", "onClear", "key", "run", "MessageTextbox", "id", "disabled", "extensions", "onEditorFocus", "editorProps", "parentRef", "focusAttributes", "of", "onFocus", "focusing", "filter"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/translations.ts":{"bytes":2466,"imports":[],"format":"esm"},"src/Thread/Thread.tsx":{"bytes":10462,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","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-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":17557,"imports":[{"path":"@preact-signals/safe-react/tracking","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/react-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/types.ts":{"bytes":898,"imports":[],"format":"esm"},"src/index.ts":{"bytes":876,"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"},{"path":"src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15390},"dist/lib/browser/index.mjs":{"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","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-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","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/react-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":610},"src/Thread/Thread.tsx":{"bytesInOutput":2965},"src/Thread/index.ts":{"bytesInOutput":0},"src/index.ts":{"bytesInOutput":0},"src/Message/Message.tsx":{"bytesInOutput":4934},"src/Message/index.ts":{"bytesInOutput":0}},"bytes":8776}}}
1
+ {"inputs":{"src/Thread/Thread.tsx":{"bytes":9691,"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":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/Thread/index.ts":{"bytes":370,"imports":[{"path":"src/Thread/Thread.tsx","kind":"import-statement","original":"./Thread"}],"format":"esm"},"src/Message/Message.tsx":{"bytes":16568,"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":"#translations","kind":"import-statement","external":true}],"format":"esm"},"src/Message/index.ts":{"bytes":375,"imports":[{"path":"src/Message/Message.tsx","kind":"import-statement","original":"./Message"}],"format":"esm"},"src/index.ts":{"bytes":497,"imports":[{"path":"src/Thread/index.ts","kind":"import-statement","original":"./Thread"},{"path":"src/Message/index.ts","kind":"import-statement","original":"./Message"}],"format":"esm"},"src/translations.ts":{"bytes":2395,"imports":[],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13975},"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":"#translations","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},{"path":"#translations","kind":"import-statement","external":true}],"exports":["MessageAuthorName","MessageBody","MessageHeading","MessageRoot","MessageTextbox","MessageTime","Thread","threadLayout"],"entryPoint":"src/index.ts","inputs":{"src/Thread/Thread.tsx":{"bytesInOutput":2597},"src/index.ts":{"bytesInOutput":0},"src/Message/Message.tsx":{"bytesInOutput":4314}},"bytes":7138},"dist/lib/browser/translations.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1151},"dist/lib/browser/translations.mjs":{"imports":[],"exports":["translationKey","translations"],"entryPoint":"src/translations.ts","inputs":{"src/translations.ts":{"bytesInOutput":616}},"bytes":726}}}
@@ -0,0 +1,25 @@
1
+ // src/translations.ts
2
+ var translationKey = "@dxos/react-ui-thread";
3
+ var translations = [
4
+ {
5
+ "en-US": {
6
+ [translationKey]: {
7
+ "plugin.name": "Threads",
8
+ "thread-title.placeholder": "New thread",
9
+ "thread-title.label": "Title",
10
+ "delete-thread.label": "Delete",
11
+ "create-thread.label": "Create thread",
12
+ "message.placeholder": "Enter message...",
13
+ "comment.placeholder": "Enter comment...",
14
+ "settings-standalone.label": "Enable standalone thread creation",
15
+ "anonymous.label": "Anonymous",
16
+ "enter-to-send.message": "Enter to add \u23CE"
17
+ }
18
+ }
19
+ }
20
+ ];
21
+ export {
22
+ translationKey,
23
+ translations
24
+ };
25
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/translations.ts"],
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"],
5
+ "mappings": ";AAMO,IAAMA,iBAAiB;AAEvB,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,cAAAA,GAAiB;QAChB,eAAe;QACf,4BAA4B;QAC5B,sBAAsB;QACtB,uBAAuB;QACvB,uBAAuB;QACvB,uBAAuB;QACvB,uBAAuB;QACvB,6BAA6B;QAC7B,mBAAmB;QACnB,yBAAyB;MAC3B;IACF;EACF;;",
6
+ "names": ["translationKey", "translations"]
7
+ }
@@ -2,9 +2,9 @@ import React, { type ComponentPropsWithRef, type ComponentPropsWithoutRef } from
2
2
  import { type ThemedClassName } from '@dxos/react-ui';
3
3
  import { type UseTextEditorProps } from '@dxos/react-ui-editor';
4
4
  import { type MessageMetadata } from '../types';
5
- export type MessageRootProps = ThemedClassName<ComponentPropsWithRef<'div'>> & MessageMetadata & Partial<{
5
+ export type MessageRootProps = ThemedClassName<ComponentPropsWithRef<'div'> & MessageMetadata & Partial<{
6
6
  continues: boolean;
7
- }>;
7
+ }>>;
8
8
  export declare const MessageRoot: React.ForwardRefExoticComponent<Omit<MessageRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  export type MessageHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & Pick<MessageMetadata, 'authorName' | 'timestamp'>;
10
10
  export declare const MessageHeading: ({ children, classNames, timestamp, authorName, ...props }: MessageHeadingProps) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../src/Message/Message.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAc,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGrG,OAAO,EAAU,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,KAAK,kBAAkB,EAAmC,MAAM,uBAAuB,CAAC;AAKjG,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,GAC1E,eAAe,GACf,OAAO,CAAC;I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