@blocklet/discuss-kit-ux 2.3.106 → 2.4.1
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/components/auto-translate/store.d.ts +1 -1
- package/dist/components/avatars/author-info.d.ts +1 -1
- package/dist/components/blog/blog-list.d.ts +3 -1
- package/dist/components/chat/message-list.d.ts +4 -2
- package/dist/components/confirm.d.ts +1 -1
- package/dist/components/input/comment-input.d.ts +1 -1
- package/dist/components/input/input.d.ts +2 -2
- package/dist/components/input/shortcut-plugin.d.ts +1 -1
- package/dist/components/posts/comment-list/context.d.ts +3 -3
- package/dist/components/posts/menu.d.ts +3 -1
- package/dist/components/profile-card/profile-card.d.ts +2 -2
- package/dist/components/rating/rating.d.ts +1 -1
- package/dist/{editor-w8GSIliM.mjs → editor-BCcDTroE.mjs} +2 -2
- package/dist/{index-DjHDHSY9.mjs → index-C1TuS5sj.mjs} +753 -6144
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +753 -6142
- package/dist/theme/typography.d.ts +2 -2
- package/package.json +22 -22
|
@@ -17,5 +17,5 @@ export declare const useAutoTranslateStore: import('zustand').UseBoundStore<Omit
|
|
|
17
17
|
getOptions: () => Partial<import('zustand/middleware').PersistOptions<State & Action, State & Action>>;
|
|
18
18
|
};
|
|
19
19
|
}>;
|
|
20
|
-
export declare const useTargetLanguage: () =>
|
|
20
|
+
export declare const useTargetLanguage: () => any;
|
|
21
21
|
export {};
|
|
@@ -3,7 +3,7 @@ import { User } from '../../types';
|
|
|
3
3
|
interface Props {
|
|
4
4
|
user: User;
|
|
5
5
|
newTitle?: string;
|
|
6
|
-
createdAt?: Date | string | React.ReactElement
|
|
6
|
+
createdAt?: Date | string | React.ReactElement<any>;
|
|
7
7
|
append?: React.ReactNode;
|
|
8
8
|
size?: 'sm' | 'normal';
|
|
9
9
|
responsive?: boolean;
|
|
@@ -19,7 +19,9 @@ type CardProps = {
|
|
|
19
19
|
compactLayout?: '0' | '1';
|
|
20
20
|
loading?: boolean;
|
|
21
21
|
};
|
|
22
|
-
export declare
|
|
22
|
+
export declare function BlogCard({ ref, post, hideAuthor, linkTarget, compactLayout, loading, }: CardProps & {
|
|
23
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
25
|
export default function BlogListWrapper({ variant, cardsLayout, ...rest }: BlogListProps & {
|
|
24
26
|
variant?: 'card' | 'list';
|
|
25
27
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,5 +5,7 @@ interface ChatProps {
|
|
|
5
5
|
export interface MessageListHandle {
|
|
6
6
|
scrollToBottom: () => void;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
export default function MessageList({ ref, chat, ...rest }: ChatProps & {
|
|
9
|
+
ref?: React.RefObject<MessageListHandle | null>;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -3,7 +3,7 @@ interface Props extends Omit<InputProps, 'render'> {
|
|
|
3
3
|
sendText?: string;
|
|
4
4
|
sendIcon?: React.ReactNode;
|
|
5
5
|
disabledSend?: boolean;
|
|
6
|
-
renderInnerFooter?: (args: RenderProps) => React.ReactElement
|
|
6
|
+
renderInnerFooter?: (args: RenderProps) => React.ReactElement<any>;
|
|
7
7
|
disableCmdEnter?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export default function CommentInput({ disabledSend, send, onSuccess, placeholder, sendText, sendIcon, draftKey, renderInnerFooter, disableCmdEnter, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -20,8 +20,8 @@ export interface InputProps extends Omit<BoxProps, 'onChange'> {
|
|
|
20
20
|
draftKey?: string;
|
|
21
21
|
shortcut?: 'CMD_ENTER' | 'ENTER';
|
|
22
22
|
children?: React.ReactNode;
|
|
23
|
-
renderInnerFooter?: (args: RenderProps) => React.ReactElement
|
|
24
|
-
renderEditorFooter?: (args: RenderProps) => React.ReactElement
|
|
23
|
+
renderInnerFooter?: (args: RenderProps) => React.ReactElement<any>;
|
|
24
|
+
renderEditorFooter?: (args: RenderProps) => React.ReactElement<any>;
|
|
25
25
|
editorRef?: MutableRefObject<LexicalEditor | null>;
|
|
26
26
|
disableCmdEnter?: boolean;
|
|
27
27
|
}
|
|
@@ -3,5 +3,5 @@ interface Props {
|
|
|
3
3
|
callback: () => void;
|
|
4
4
|
shortcut?: 'CMD_ENTER' | 'ENTER';
|
|
5
5
|
}
|
|
6
|
-
export default function CmdEnterShortcutPlugin({ callback, shortcut }: Props): React.ReactElement | null;
|
|
6
|
+
export default function CmdEnterShortcutPlugin({ callback, shortcut, }: Props): React.ReactElement<any> | null;
|
|
7
7
|
export {};
|
|
@@ -17,13 +17,13 @@ interface CommentsProviderProps {
|
|
|
17
17
|
allowCopyLink?: boolean;
|
|
18
18
|
showProfileCard?: boolean;
|
|
19
19
|
interactive?: boolean;
|
|
20
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
20
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
21
21
|
renderComments?: CommentsRender;
|
|
22
22
|
renderDonation?: (post: Post) => React.ReactNode;
|
|
23
23
|
renderActions?: (post: Post) => React.ReactNode;
|
|
24
24
|
renderEditorPlugins?: (post: Post) => React.ReactNode;
|
|
25
25
|
enableAutoTranslate?: boolean;
|
|
26
|
-
renderInnerFooter?: (post: Post) => React.ReactElement
|
|
26
|
+
renderInnerFooter?: (post: Post) => React.ReactElement<any>;
|
|
27
27
|
}
|
|
28
28
|
interface State {
|
|
29
29
|
comments: Post[];
|
|
@@ -68,7 +68,7 @@ interface CommentsContextValue {
|
|
|
68
68
|
renderActions?: (post: Post) => React.ReactNode;
|
|
69
69
|
renderEditorPlugins?: (post: Post) => React.ReactNode;
|
|
70
70
|
enableAutoTranslate?: boolean;
|
|
71
|
-
renderInnerFooter?: (post: Post) => React.ReactElement
|
|
71
|
+
renderInnerFooter?: (post: Post) => React.ReactElement<any>;
|
|
72
72
|
}
|
|
73
73
|
export declare const CommentsContext: React.Context<CommentsContextValue>;
|
|
74
74
|
export declare const useCommentsContext: () => CommentsContextValue;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { default as MuiMenuItem } from '@mui/material/MenuItem';
|
|
2
|
+
import { SxProps } from '@mui/material';
|
|
2
3
|
interface MenuProps {
|
|
3
4
|
items: React.ReactElement<typeof MuiMenuItem>[];
|
|
4
5
|
style?: React.CSSProperties;
|
|
5
6
|
className?: string;
|
|
7
|
+
sx?: SxProps;
|
|
6
8
|
}
|
|
7
9
|
declare function Menu({ items, ...rest }: MenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
10
|
declare namespace Menu {
|
|
9
|
-
var Item: import("@mui/material").ExtendButtonBase<import("@mui/material
|
|
11
|
+
var Item: import("@mui/material").ExtendButtonBase<import("@mui/material").MenuItemTypeMap<{}, "li">>;
|
|
10
12
|
}
|
|
11
13
|
export default Menu;
|
|
@@ -6,9 +6,9 @@ interface ProfileCardProps {
|
|
|
6
6
|
export declare function ProfileCard({ user, click, ...rest }: ProfileCardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
interface ProfileCardTooltipProps {
|
|
8
8
|
user: User;
|
|
9
|
-
children: React.ReactElement | ((props: {
|
|
9
|
+
children: React.ReactElement<any> | ((props: {
|
|
10
10
|
navigateToProfile: () => void;
|
|
11
|
-
}) => React.ReactElement);
|
|
11
|
+
}) => React.ReactElement<any>);
|
|
12
12
|
}
|
|
13
13
|
export declare function ProfileCardTooltip({ user, children }: ProfileCardTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -16,7 +16,7 @@ export interface RatingProps {
|
|
|
16
16
|
[key: string]: number;
|
|
17
17
|
};
|
|
18
18
|
selectedValue?: string;
|
|
19
|
-
render: ({ options, toggleRate }: RenderProps) => React.ReactElement
|
|
19
|
+
render: ({ options, toggleRate }: RenderProps) => React.ReactElement<any>;
|
|
20
20
|
onRate: ({ ratingType, value }: {
|
|
21
21
|
ratingType: RatingType;
|
|
22
22
|
value: string;
|
|
@@ -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 { lazyRetry } from "@arcblock/ux/lib/Util";
|
|
7
|
-
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent,
|
|
7
|
+
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, g as getExcerptSync, s as stringify } from "./index-C1TuS5sj.mjs";
|
|
8
8
|
const BlockletEditor = lazyRetry(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -23,7 +23,7 @@ function Editor({
|
|
|
23
23
|
}) {
|
|
24
24
|
const handleChange = async (editorState, editor) => {
|
|
25
25
|
const isEmpty = await isEmptyContent(editorState, editor);
|
|
26
|
-
onChange
|
|
26
|
+
onChange?.({
|
|
27
27
|
content: isEmpty ? "" : stringify(editorState),
|
|
28
28
|
editorState,
|
|
29
29
|
editor,
|