@poolse/react-ui 3.6.1 → 3.7.0
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/CHANGELOG.md +13 -0
- package/dist/index.cjs +16 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -4,7 +4,7 @@ import * as react from 'react';
|
|
|
4
4
|
import { SVGProps, ReactElement, ReactNode, CSSProperties } from 'react';
|
|
5
5
|
import { GroupPosition, UseRoom, UploadItem, ReactionMap } from '@poolse/react';
|
|
6
6
|
import { ThemeInput, ColorSchemePreference, ResolvedTheme, ColorScheme } from '@poolse/theme';
|
|
7
|
-
export { BUILT_IN_THEME_IDS, BuiltInThemeId, ColorScheme, ColorSchemePreference, DEFAULT_THEME_ID, Theme, ThemeInput, createTheme, decodeTheme, encodeTheme } from '@poolse/theme';
|
|
7
|
+
export { BUILT_IN_THEME_IDS, BuiltInThemeId, ColorScheme, ColorSchemePreference, DEFAULT_THEME_ID, FlatThemeTokens, Theme, ThemeInput, createTheme, decodeTheme, encodeTheme, tokensFromFlat } from '@poolse/theme';
|
|
8
8
|
|
|
9
9
|
interface CallVideoGridProps {
|
|
10
10
|
participants: CallParticipant[];
|
|
@@ -1061,12 +1061,23 @@ interface ThreadViewProps {
|
|
|
1061
1061
|
/** Row layout for the replies — see `ChatLayout`. Defaults to `'bubbles'`. */
|
|
1062
1062
|
layout?: ChatLayout;
|
|
1063
1063
|
timeFormat?: TimeFormat;
|
|
1064
|
+
/**
|
|
1065
|
+
* Row spacing. Inside `ConversationView` the thread follows the view's
|
|
1066
|
+
* own `density`; set it when using ThreadView on its own.
|
|
1067
|
+
*/
|
|
1068
|
+
density?: ChatDensity;
|
|
1069
|
+
/** Avatars on replies, as `ConversationView`'s `showAvatars`. */
|
|
1070
|
+
showAvatars?: boolean;
|
|
1071
|
+
/** Presence badges on reply avatars. Defaults to `false`. */
|
|
1072
|
+
showPresence?: boolean;
|
|
1073
|
+
/** Link previews under replies. Defaults to `true`. */
|
|
1074
|
+
linkPreviews?: boolean;
|
|
1064
1075
|
/** Largest attachment accepted, in bytes (see `MessageComposer`). */
|
|
1065
1076
|
maxFileSize?: number;
|
|
1066
1077
|
/** Accepted attachment types (see `MessageComposer`). */
|
|
1067
1078
|
acceptFileTypes?: string[];
|
|
1068
1079
|
}
|
|
1069
|
-
declare function ThreadView({ conversationId, rootMessage, onClose, renderMessage, layout, timeFormat, maxFileSize, acceptFileTypes, }: ThreadViewProps): react_jsx_runtime.JSX.Element;
|
|
1080
|
+
declare function ThreadView({ conversationId, rootMessage, onClose, renderMessage, layout, timeFormat, density, showAvatars, showPresence, linkPreviews, maxFileSize, acceptFileTypes, }: ThreadViewProps): react_jsx_runtime.JSX.Element;
|
|
1070
1081
|
|
|
1071
1082
|
interface ThreadSummaryProps {
|
|
1072
1083
|
/** The thread's root message. Renders nothing without replies. */
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as react from 'react';
|
|
|
4
4
|
import { SVGProps, ReactElement, ReactNode, CSSProperties } from 'react';
|
|
5
5
|
import { GroupPosition, UseRoom, UploadItem, ReactionMap } from '@poolse/react';
|
|
6
6
|
import { ThemeInput, ColorSchemePreference, ResolvedTheme, ColorScheme } from '@poolse/theme';
|
|
7
|
-
export { BUILT_IN_THEME_IDS, BuiltInThemeId, ColorScheme, ColorSchemePreference, DEFAULT_THEME_ID, Theme, ThemeInput, createTheme, decodeTheme, encodeTheme } from '@poolse/theme';
|
|
7
|
+
export { BUILT_IN_THEME_IDS, BuiltInThemeId, ColorScheme, ColorSchemePreference, DEFAULT_THEME_ID, FlatThemeTokens, Theme, ThemeInput, createTheme, decodeTheme, encodeTheme, tokensFromFlat } from '@poolse/theme';
|
|
8
8
|
|
|
9
9
|
interface CallVideoGridProps {
|
|
10
10
|
participants: CallParticipant[];
|
|
@@ -1061,12 +1061,23 @@ interface ThreadViewProps {
|
|
|
1061
1061
|
/** Row layout for the replies — see `ChatLayout`. Defaults to `'bubbles'`. */
|
|
1062
1062
|
layout?: ChatLayout;
|
|
1063
1063
|
timeFormat?: TimeFormat;
|
|
1064
|
+
/**
|
|
1065
|
+
* Row spacing. Inside `ConversationView` the thread follows the view's
|
|
1066
|
+
* own `density`; set it when using ThreadView on its own.
|
|
1067
|
+
*/
|
|
1068
|
+
density?: ChatDensity;
|
|
1069
|
+
/** Avatars on replies, as `ConversationView`'s `showAvatars`. */
|
|
1070
|
+
showAvatars?: boolean;
|
|
1071
|
+
/** Presence badges on reply avatars. Defaults to `false`. */
|
|
1072
|
+
showPresence?: boolean;
|
|
1073
|
+
/** Link previews under replies. Defaults to `true`. */
|
|
1074
|
+
linkPreviews?: boolean;
|
|
1064
1075
|
/** Largest attachment accepted, in bytes (see `MessageComposer`). */
|
|
1065
1076
|
maxFileSize?: number;
|
|
1066
1077
|
/** Accepted attachment types (see `MessageComposer`). */
|
|
1067
1078
|
acceptFileTypes?: string[];
|
|
1068
1079
|
}
|
|
1069
|
-
declare function ThreadView({ conversationId, rootMessage, onClose, renderMessage, layout, timeFormat, maxFileSize, acceptFileTypes, }: ThreadViewProps): react_jsx_runtime.JSX.Element;
|
|
1080
|
+
declare function ThreadView({ conversationId, rootMessage, onClose, renderMessage, layout, timeFormat, density, showAvatars, showPresence, linkPreviews, maxFileSize, acceptFileTypes, }: ThreadViewProps): react_jsx_runtime.JSX.Element;
|
|
1070
1081
|
|
|
1071
1082
|
interface ThreadSummaryProps {
|
|
1072
1083
|
/** The thread's root message. Renders nothing without replies. */
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { usePoolse, useMembers, useUser, useMe, useConversations, useAttachmentU
|
|
|
5
5
|
import ReactMarkdown from 'react-markdown';
|
|
6
6
|
import remarkGfm from 'remark-gfm';
|
|
7
7
|
import { resolveTheme, tokensToCssVariables } from '@poolse/theme';
|
|
8
|
-
export { BUILT_IN_THEME_IDS, DEFAULT_THEME_ID, createTheme, decodeTheme, encodeTheme } from '@poolse/theme';
|
|
8
|
+
export { BUILT_IN_THEME_IDS, DEFAULT_THEME_ID, createTheme, decodeTheme, encodeTheme, tokensFromFlat } from '@poolse/theme';
|
|
9
9
|
|
|
10
10
|
// src/CallVideoGrid.tsx
|
|
11
11
|
|
|
@@ -3696,6 +3696,10 @@ function ThreadView({
|
|
|
3696
3696
|
renderMessage,
|
|
3697
3697
|
layout,
|
|
3698
3698
|
timeFormat,
|
|
3699
|
+
density,
|
|
3700
|
+
showAvatars,
|
|
3701
|
+
showPresence = false,
|
|
3702
|
+
linkPreviews = true,
|
|
3699
3703
|
maxFileSize,
|
|
3700
3704
|
acceptFileTypes
|
|
3701
3705
|
}) {
|
|
@@ -3782,14 +3786,17 @@ function ThreadView({
|
|
|
3782
3786
|
},
|
|
3783
3787
|
onDelete: () => void deleteReply(msg.id),
|
|
3784
3788
|
...layout ? { layout } : {},
|
|
3785
|
-
...timeFormat ? { timeFormat } : {}
|
|
3789
|
+
...timeFormat ? { timeFormat } : {},
|
|
3790
|
+
...showAvatars !== void 0 ? { showAvatar: showAvatars } : {},
|
|
3791
|
+
showPresence,
|
|
3792
|
+
linkPreviews
|
|
3786
3793
|
}
|
|
3787
3794
|
);
|
|
3788
3795
|
const renderOne = renderMessage ? (msg, currentUserId) => renderMessage(msg, currentUserId) : (msg) => renderDefault(msg);
|
|
3789
3796
|
return /* @__PURE__ */ jsxs(
|
|
3790
3797
|
"aside",
|
|
3791
3798
|
{
|
|
3792
|
-
className: `poolse-thread${dragActive ? " is-drag-active" : ""}`,
|
|
3799
|
+
className: `poolse-thread${density ? ` poolse-conversation--density-${density}` : ""}${dragActive ? " is-drag-active" : ""}`,
|
|
3793
3800
|
role: "complementary",
|
|
3794
3801
|
"aria-label": "Message thread",
|
|
3795
3802
|
onDragEnter,
|
|
@@ -4645,6 +4652,9 @@ function ConversationView({
|
|
|
4645
4652
|
onClose: () => setThreadRootId(null),
|
|
4646
4653
|
layout,
|
|
4647
4654
|
...timeFormat ? { timeFormat } : {},
|
|
4655
|
+
showAvatars: showAvatarsResolved,
|
|
4656
|
+
showPresence,
|
|
4657
|
+
linkPreviews,
|
|
4648
4658
|
...attachmentRules
|
|
4649
4659
|
}
|
|
4650
4660
|
) })
|