@blocklet/discuss-kit-ux 1.6.174 → 1.6.175

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.
@@ -1,7 +1,8 @@
1
+ import type { AvatarGroupProps } from '@mui/material/AvatarGroup';
1
2
  import type { User } from '../../types';
2
- interface AvatarsProps {
3
+ interface AvatarsProps extends Omit<AvatarGroupProps, 'variant'> {
3
4
  users: User[];
4
5
  variant?: 'circle' | 'rounded';
5
6
  }
6
- export default function Avatars({ users, variant }: AvatarsProps): import("react/jsx-runtime").JSX.Element;
7
+ export default function Avatars({ users, variant, ...restProps }: AvatarsProps): import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -0,0 +1,7 @@
1
+ import type { Chat } from '../chat/types';
2
+ interface Props {
3
+ chat: Chat;
4
+ size?: 'sm' | 'normal';
5
+ }
6
+ export default function ChannelGroup({ size, chat, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -3,3 +3,4 @@ export { default as Avatars } from './avatars';
3
3
  export { default as AuthorInfo } from './author-info';
4
4
  export { default as SystemUser } from './system-user';
5
5
  export { default as Badge } from './badge';
6
+ export { default as ChannelGroup } from './channel-group';
@@ -2,8 +2,9 @@
2
2
  interface Props {
3
3
  name: string;
4
4
  showDidAddress?: boolean;
5
+ showIcon?: boolean;
5
6
  size?: 'sm' | 'normal';
6
7
  icon?: React.ReactNode;
7
8
  }
8
- export default function SystemUser({ name, showDidAddress, size, icon, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export default function SystemUser({ name, showDidAddress, showIcon, size, icon, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -57,6 +57,7 @@ interface PostCreateNotificationMessage extends INotificationMessage {
57
57
  export type NotificationMessage = CommentNotificationMessage | ReplyNotificationMessage | MentionInCommentNotificationMessage | MentionInPostNotificationMessage | PointUpNotificationMessage | TaskNotificationMessage | PostCreateNotificationMessage;
58
58
  interface CommonChat {
59
59
  id: string;
60
+ name: string;
60
61
  participants: User[];
61
62
  messages?: Message[];
62
63
  nextCursor?: string;
@@ -15,6 +15,6 @@ export declare const isEmptyContent: (editorState: EditorState, editor: LexicalE
15
15
  * @returns initial editor state
16
16
  */
17
17
  export declare const inferInitialEditorState: (str: string) => string | (() => void);
18
- export declare const getExcerpt: (editorState: EditorState | null | undefined) => Promise<string> | "";
18
+ export declare const getExcerpt: (editorState: EditorState | null | undefined) => "" | Promise<string>;
19
19
  export declare const getExcerptSync: (editorState: EditorState | null | undefined) => string;
20
20
  export declare const stringify: (editorState: EditorState | null | undefined) => string;
@@ -39,8 +39,37 @@ declare const _default: {
39
39
  timeout: string;
40
40
  error: string;
41
41
  };
42
- message: {
42
+ chat: {
43
+ notification: string;
44
+ unknown: string;
45
+ chats: string;
46
+ create: string;
47
+ channel: string;
48
+ description: string;
49
+ newChannel: string;
50
+ noChats: string;
51
+ unknownChannel: string;
52
+ channelDescription: string;
53
+ channelName: string;
54
+ deleteChannel: string;
55
+ commentedYourPost: string;
56
+ commentedPost: string;
43
57
  newPost: string;
58
+ mentionInComment: string;
59
+ mentionInPost: string;
60
+ replyYourComment: string;
61
+ replyComment: string;
62
+ deleteChannelTitle: string;
63
+ deleteChannelDesc: string;
64
+ leaveChannel: string;
65
+ joinChannel: string;
66
+ openTask: string;
67
+ closeTask: string;
68
+ assignTask: string;
69
+ unassignTask: string;
70
+ points: string;
71
+ point: string;
72
+ pointUp: string;
44
73
  };
45
74
  };
46
75
  export default _default;
@@ -41,8 +41,37 @@ export declare const translations: {
41
41
  timeout: string;
42
42
  error: string;
43
43
  };
44
- message: {
44
+ chat: {
45
+ notification: string;
46
+ unknown: string;
47
+ chats: string;
48
+ create: string;
49
+ channel: string;
50
+ description: string;
51
+ newChannel: string;
52
+ noChats: string;
53
+ unknownChannel: string;
54
+ channelDescription: string;
55
+ channelName: string;
56
+ deleteChannel: string;
57
+ commentedYourPost: string;
58
+ commentedPost: string;
45
59
  newPost: string;
60
+ mentionInComment: string;
61
+ mentionInPost: string;
62
+ replyYourComment: string;
63
+ replyComment: string;
64
+ deleteChannelTitle: string;
65
+ deleteChannelDesc: string;
66
+ leaveChannel: string;
67
+ joinChannel: string;
68
+ openTask: string;
69
+ closeTask: string;
70
+ assignTask: string;
71
+ unassignTask: string;
72
+ points: string;
73
+ point: string;
74
+ pointUp: string;
46
75
  };
47
76
  };
48
77
  en: {
@@ -86,8 +115,37 @@ export declare const translations: {
86
115
  timeout: string;
87
116
  error: string;
88
117
  };
89
- message: {
118
+ chat: {
119
+ notification: string;
120
+ unknown: string;
121
+ chats: string;
122
+ create: string;
123
+ channel: string;
124
+ description: string;
125
+ newChannel: string;
126
+ noChats: string;
127
+ unknownChannel: string;
128
+ channelDescription: string;
129
+ channelName: string;
130
+ deleteChannel: string;
131
+ commentedYourPost: string;
132
+ commentedPost: string;
90
133
  newPost: string;
134
+ mentionInComment: string;
135
+ mentionInPost: string;
136
+ replyYourComment: string;
137
+ replyComment: string;
138
+ deleteChannelTitle: string;
139
+ deleteChannelDesc: string;
140
+ leaveChannel: string;
141
+ joinChannel: string;
142
+ openTask: string;
143
+ closeTask: string;
144
+ assignTask: string;
145
+ unassignTask: string;
146
+ points: string;
147
+ point: string;
148
+ pointUp: string;
91
149
  };
92
150
  };
93
151
  };
@@ -40,8 +40,37 @@ declare const _default: {
40
40
  timeout: string;
41
41
  error: string;
42
42
  };
43
- message: {
43
+ chat: {
44
+ notification: string;
45
+ unknown: string;
46
+ chats: string;
47
+ create: string;
48
+ channel: string;
49
+ description: string;
50
+ newChannel: string;
51
+ noChats: string;
52
+ unknownChannel: string;
53
+ channelDescription: string;
54
+ channelName: string;
55
+ deleteChannel: string;
56
+ commentedYourPost: string;
57
+ commentedPost: string;
44
58
  newPost: string;
59
+ mentionInComment: string;
60
+ mentionInPost: string;
61
+ replyYourComment: string;
62
+ replyComment: string;
63
+ deleteChannelTitle: string;
64
+ deleteChannelDesc: string;
65
+ leaveChannel: string;
66
+ joinChannel: string;
67
+ openTask: string;
68
+ closeTask: string;
69
+ assignTask: string;
70
+ unassignTask: string;
71
+ points: string;
72
+ point: string;
73
+ pointUp: string;
45
74
  };
46
75
  };
47
76
  export default _default;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { type SxProps } from '@mui/material';
3
+ interface Option {
4
+ value: string;
5
+ label: React.ReactNode;
6
+ }
7
+ interface Props {
8
+ value: string;
9
+ options: Option[];
10
+ onChange?: (value: string) => void;
11
+ sx?: SxProps;
12
+ }
13
+ export declare function SegmentedControl({ value, options, onChange, sx, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -1,3 +1,5 @@
1
+ import type { SxProps, Theme } from '@mui/material';
2
+ import type { SystemStyleObject } from '@mui/system';
1
3
  export declare const repairBase64Avatar: (avatar?: string) => string | undefined;
2
4
  export declare const getResizedAvatar: (avatar: string, size?: number) => string;
3
5
  export declare const sleep: (ms: number) => Promise<unknown>;
@@ -11,3 +13,5 @@ export declare const getBlockletMountPointInfo: (name: string) => any;
11
13
  export declare const blockletExists: (name: string) => boolean;
12
14
  export declare const inferDiscussKitApiPrefix: () => any;
13
15
  export declare const getDraftSessionKeyPrefix: () => string;
16
+ export declare const getExcerptFromLexicalContent: (content: any, size?: number) => string;
17
+ export declare const mergeSx: (initial: SystemStyleObject<Theme>, sx?: SxProps<Theme>) => any[];
@@ -4,7 +4,7 @@ import { OnContentChangePlugin } from "@blocklet/editor/lib/ext/OnContentChangeP
4
4
  import { CtrlsShortcutPlugin } from "@blocklet/editor/lib/ext/ShortcutPlugin";
5
5
  import { SafeAreaPlugin } from "@blocklet/editor/lib/ext/SafeAreaPlugin";
6
6
  import { lazy } from "react";
7
- import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-XTjHijc6.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-7VREaKfa.mjs";
8
8
  import "@blocklet/labels";
9
9
  import "@mui/material/styles";
10
10
  import "@mui/material/Box";
@@ -25,6 +25,8 @@ import "@mui/material/Alert";
25
25
  import "lodash/isBoolean";
26
26
  import "@mui/material/Button";
27
27
  import "@arcblock/did-connect/lib/Avatar";
28
+ import "@mui/material/AvatarGroup";
29
+ import "@mui/material/colors";
28
30
  import "@mui/material/useMediaQuery";
29
31
  import "@arcblock/ux/lib/DID";
30
32
  import "@mui/material/Tooltip";
@@ -40,9 +42,10 @@ import "@mui/material/Avatar";
40
42
  import "@mui/icons-material/BrokenImage";
41
43
  import "@iconify/react";
42
44
  import "@arcblock/ux/lib/Empty";
43
- import "@mui/material/colors";
44
45
  import "@arcblock/did-connect/lib/Session";
45
46
  import "@arcblock/did-connect/lib/Address";
47
+ import "@mui/icons-material/NotificationsActiveOutlined";
48
+ import "@mui/icons-material/Groups2Rounded";
46
49
  import "@blocklet/editor/lib/ext/CheckboxPlugin";
47
50
  import "@mui/material/MenuItem";
48
51
  import "clsx";
@@ -62,6 +65,7 @@ import "react-flip-toolkit";
62
65
  import "@mui/material/Fab";
63
66
  import "lodash/debounce";
64
67
  import "@mui/material/TextField";
68
+ import "@mui/icons-material/Add";
65
69
  import "axios";
66
70
  import "@arcblock/ux/lib/Toast";
67
71
  import "@mui/material/Pagination";