hive-react-kit 0.8.0 → 0.8.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/HiveDetailPost.d.ts +12 -2
- package/dist/components/actionButtons/PostActionButton.d.ts +3 -2
- package/dist/components/comments/AddCommentInput.d.ts +1 -1
- package/dist/components/comments/CommentsModal.d.ts +3 -2
- package/dist/components/inlineComments/InlineCommentItem.d.ts +1 -1
- package/dist/components/inlineComments/InlineCommentSection.d.ts +1 -1
- package/dist/index.cjs.js +47 -47
- package/dist/index.esm.js +2445 -2409
- package/package.json +1 -1
|
@@ -3,7 +3,12 @@ export interface HiveDetailPostProps {
|
|
|
3
3
|
permlink: string;
|
|
4
4
|
currentUser?: string;
|
|
5
5
|
onUpvote?: (percent: number) => void | Promise<void>;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Called when the user submits a comment.
|
|
8
|
+
* Return `false` to indicate the operation was cancelled (e.g. keychain request denied)
|
|
9
|
+
* — the composed text will be preserved and no refresh will occur.
|
|
10
|
+
*/
|
|
11
|
+
onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | boolean | Promise<void | boolean>;
|
|
7
12
|
onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
8
13
|
onReblog?: () => void;
|
|
9
14
|
onShare?: () => void;
|
|
@@ -18,7 +23,12 @@ export interface HiveDetailPostProps {
|
|
|
18
23
|
* @param permlink - post permlink
|
|
19
24
|
* @param choiceNums - 1-based choice numbers selected by the user
|
|
20
25
|
*/
|
|
21
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Called when the user submits a poll vote.
|
|
28
|
+
* Return `false` to indicate the operation was cancelled (e.g. keychain request denied)
|
|
29
|
+
* — the vote UI will not be updated.
|
|
30
|
+
*/
|
|
31
|
+
onVotePoll?: (author: string, permlink: string, choiceNums: number[]) => void | boolean | Promise<void | boolean>;
|
|
22
32
|
ecencyToken?: string;
|
|
23
33
|
threeSpeakApiKey?: string;
|
|
24
34
|
giphyApiKey?: string;
|
|
@@ -16,8 +16,9 @@ export interface PostActionButtonProps {
|
|
|
16
16
|
initialCommentsCount?: number;
|
|
17
17
|
/** Called when user confirms vote with percent (1–100). Frontend handles signing/broadcast. */
|
|
18
18
|
onUpvote?: (percent: number) => void | Promise<void>;
|
|
19
|
-
/** Called when user submits a comment. Frontend handles signing/broadcast.
|
|
20
|
-
|
|
19
|
+
/** Called when user submits a comment. Frontend handles signing/broadcast.
|
|
20
|
+
* Return `false` to indicate the operation was cancelled — the composer text will be preserved. */
|
|
21
|
+
onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | boolean | Promise<void | boolean>;
|
|
21
22
|
/** Called when comment button is clicked (e.g. open comments). */
|
|
22
23
|
onComments?: () => void;
|
|
23
24
|
/** Called when reblog is clicked (when logged in). */
|
|
@@ -9,8 +9,9 @@ interface CommentsModalProps {
|
|
|
9
9
|
onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
10
10
|
onClickCommentReply?: (comment: Discussion) => void;
|
|
11
11
|
onClickUpvoteButton?: (currentUser?: string, token?: string) => void;
|
|
12
|
-
/** When provided, used instead of apiService.handleComment (e.g. for aioha wallet)
|
|
13
|
-
|
|
12
|
+
/** When provided, used instead of apiService.handleComment (e.g. for aioha wallet).
|
|
13
|
+
* Return `false` to indicate the operation was cancelled — the composer text will be preserved. */
|
|
14
|
+
onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => Promise<void | boolean>;
|
|
14
15
|
/** Ecency image hosting token — enables image upload in comment composer */
|
|
15
16
|
ecencyToken?: string;
|
|
16
17
|
/** 3Speak API key — enables audio/video upload in comment composer */
|
|
@@ -4,7 +4,7 @@ interface InlineCommentItemProps {
|
|
|
4
4
|
allComments: Discussion[];
|
|
5
5
|
onReply: (author: string, permlink: string) => void;
|
|
6
6
|
onCancelReply: () => void;
|
|
7
|
-
onCommentSubmit: (parentAuthor: string, parentPermlink: string, body: string) => Promise<void>;
|
|
7
|
+
onCommentSubmit: (parentAuthor: string, parentPermlink: string, body: string) => Promise<void | boolean>;
|
|
8
8
|
/** "author/permlink" key of the comment currently being replied to (null = none) */
|
|
9
9
|
activeReplyKey: string | null;
|
|
10
10
|
currentUser?: string;
|
|
@@ -3,7 +3,7 @@ interface InlineCommentSectionProps {
|
|
|
3
3
|
permlink: string;
|
|
4
4
|
currentUser?: string;
|
|
5
5
|
token?: string;
|
|
6
|
-
onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | Promise<void>;
|
|
6
|
+
onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | boolean | Promise<void | boolean>;
|
|
7
7
|
onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
8
8
|
ecencyToken?: string;
|
|
9
9
|
threeSpeakApiKey?: string;
|