hive-react-kit 1.7.1 → 1.7.2
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/BlogPostList.d.ts +9 -0
- package/dist/components/actionButtons/MoreActionsMenu.d.ts +6 -1
- package/dist/components/actionButtons/PostActionButton.d.ts +6 -1
- package/dist/components/community/CommunityDetail.d.ts +9 -1
- package/dist/index.cjs.js +150 -150
- package/dist/index.esm.js +15085 -15023
- package/package.json +1 -1
|
@@ -51,6 +51,15 @@ export interface BlogPostListProps {
|
|
|
51
51
|
* this handler. The kit does no ownership check; the consumer
|
|
52
52
|
* decides whether to pass the prop. */
|
|
53
53
|
onDeletePost?: (author: string, permlink: string) => void;
|
|
54
|
+
/** Community admin/mod — when true, each card's kebab gets Pin / Unpin
|
|
55
|
+
* entries (Unpin when the post is already pinned). The consumer gates
|
|
56
|
+
* this by the current user's role and handles the broadcast. */
|
|
57
|
+
canPin?: boolean;
|
|
58
|
+
onPinPost?: (author: string, permlink: string) => void;
|
|
59
|
+
onUnpinPost?: (author: string, permlink: string) => void;
|
|
60
|
+
/** Broadcasts a poll vote (custom_json id=`polls`). When provided, poll
|
|
61
|
+
* posts in the feed render an inline <PollVoteWidget/>. */
|
|
62
|
+
onVotePoll?: (author: string, permlink: string, choiceNums: number[]) => void | boolean | Promise<void | boolean>;
|
|
54
63
|
onUserClick?: (username: string) => void;
|
|
55
64
|
onPostClick?: (author: string, permlink: string, title?: string) => void;
|
|
56
65
|
getPostUrl?: (author: string, permlink: string) => string;
|
|
@@ -19,6 +19,11 @@ export interface MoreActionsMenuProps {
|
|
|
19
19
|
* Consumer decides whether to add or remove based on `isBookmarked`. */
|
|
20
20
|
onToggleBookmark?: () => void;
|
|
21
21
|
isBookmarked?: boolean;
|
|
22
|
+
/** Show the Pin item (community admins/mods). Caller gates visibility
|
|
23
|
+
* by role; the kit just renders the entry. */
|
|
24
|
+
onPin?: () => void;
|
|
25
|
+
/** Show the Unpin item (community admins/mods, when already pinned). */
|
|
26
|
+
onUnpin?: () => void;
|
|
22
27
|
/** Show the Delete item (rendered last, in red, gated by the caller
|
|
23
28
|
* to the author themselves — the kit does no ownership check). */
|
|
24
29
|
onDelete?: () => void;
|
|
@@ -28,5 +33,5 @@ export interface MoreActionsMenuProps {
|
|
|
28
33
|
/** aria-label for the trigger. */
|
|
29
34
|
ariaLabel?: string;
|
|
30
35
|
}
|
|
31
|
-
export declare function MoreActionsMenu({ onEdit, onReblog, onReSnap, onShare, onTip, onReport, onToggleBookmark, isBookmarked, onDelete, buttonClassName, ariaLabel, }: MoreActionsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function MoreActionsMenu({ onEdit, onReblog, onReSnap, onShare, onTip, onReport, onToggleBookmark, isBookmarked, onPin, onUnpin, onDelete, buttonClassName, ariaLabel, }: MoreActionsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
32
37
|
export default MoreActionsMenu;
|
|
@@ -92,6 +92,11 @@ export interface PostActionButtonProps {
|
|
|
92
92
|
* iff this handler is provided. Lives inside the kebab popover
|
|
93
93
|
* (always — not as a standalone inline action), styled in red. */
|
|
94
94
|
onDelete?: () => void;
|
|
95
|
+
/** Community admin/mod — pin this post to the top of the community. The
|
|
96
|
+
* caller gates these by role; the kit just renders the menu entries. */
|
|
97
|
+
onPin?: () => void;
|
|
98
|
+
/** Community admin/mod — unpin this post (shown when already pinned). */
|
|
99
|
+
onUnpin?: () => void;
|
|
95
100
|
/** Called when user confirms comment upvote with (author, permlink, percent). Frontend handles signing. Voted comments show icon in blue. */
|
|
96
101
|
onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
97
102
|
/** Tapping a voter inside the upvote-list dialog calls this with the
|
|
@@ -145,5 +150,5 @@ export interface PostActionButtonProps {
|
|
|
145
150
|
* polls, community detail) where there isn't room for four icons. */
|
|
146
151
|
actionsAsMenu?: boolean;
|
|
147
152
|
}
|
|
148
|
-
export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, payoutDetails, initialVotes, initialVoteCount, initialCommentsCount, onUpvote, onSubmitComment, onComments, onEdit, onReblog, onReSnap, onShare, onTip, onReport, onToggleBookmark, isBookmarked, onDelete, onClickCommentUpvote, onUserClick, getUserUrl, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, disableCommentsModal, onClickCommentIcon, onClickCommentCount, hasCommented, myReplyKey, showVoteButton, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, actionsAsMenu, awaitingWalletApproval, postCreatedAt, size, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
153
|
+
export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, payoutDetails, initialVotes, initialVoteCount, initialCommentsCount, onUpvote, onSubmitComment, onComments, onEdit, onReblog, onReSnap, onShare, onTip, onReport, onToggleBookmark, isBookmarked, onDelete, onPin, onUnpin, onClickCommentUpvote, onUserClick, getUserUrl, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, disableCommentsModal, onClickCommentIcon, onClickCommentCount, hasCommented, myReplyKey, showVoteButton, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, actionsAsMenu, awaitingWalletApproval, postCreatedAt, size, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
149
154
|
export default PostActionButton;
|
|
@@ -37,6 +37,14 @@ export interface CommunityDetailProps {
|
|
|
37
37
|
/** Author-only — forwarded into the embedded <BlogPostList/> so the
|
|
38
38
|
* card kebab gets a red Delete entry when `currentUser === author`. */
|
|
39
39
|
onDeletePost?: (author: string, permlink: string) => void;
|
|
40
|
+
/** Community admin/mod — surfaces Pin / Unpin entries on each post's
|
|
41
|
+
* kebab. The consumer gates `canPin` by role and broadcasts. */
|
|
42
|
+
canPin?: boolean;
|
|
43
|
+
onPinPost?: (author: string, permlink: string) => void;
|
|
44
|
+
onUnpinPost?: (author: string, permlink: string) => void;
|
|
45
|
+
/** Broadcasts a poll vote — forwarded to the feed's <BlogPostList/> so
|
|
46
|
+
* poll posts can be voted on inline. */
|
|
47
|
+
onVotePoll?: (author: string, permlink: string, choiceNums: number[]) => void | boolean | Promise<void | boolean>;
|
|
40
48
|
ecencyToken?: string;
|
|
41
49
|
threeSpeakApiKey?: string;
|
|
42
50
|
giphyApiKey?: string;
|
|
@@ -102,5 +110,5 @@ export interface CommunityDetailProps {
|
|
|
102
110
|
* the view starts at the top, matching forward navigation. */
|
|
103
111
|
shouldRestoreScroll?: boolean;
|
|
104
112
|
}
|
|
105
|
-
declare const CommunityDetail: ({ communityId, currentUser, onBack, onUserClick, onPostClick, getPostUrl, getUserUrl, getTagUrl, getCommunityUrl, onCommentClick, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onTip, onSharePost, onReportPost, onToggleBookmark, isPostBookmarked, onToggleCommunityBookmark, isCommunityBookmarked, onDeletePost, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, defaultReward, actionsAsMenu, onShare, onRss, isSubscribed: controlledIsSubscribed, onToggleSubscribe, subscribePending, loadCommunitySnaps: _loadCommunitySnaps, reportedAuthors, reportedPosts, activeTab: controlledActiveTab, onActiveTabChange, postSort: controlledPostSort, onPostSortChange, shouldRestoreScroll, }: CommunityDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
113
|
+
declare const CommunityDetail: ({ communityId, currentUser, onBack, onUserClick, onPostClick, getPostUrl, getUserUrl, getTagUrl, getCommunityUrl, onCommentClick, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onTip, onSharePost, onReportPost, onToggleBookmark, isPostBookmarked, onToggleCommunityBookmark, isCommunityBookmarked, onDeletePost, canPin, onPinPost, onUnpinPost, onVotePoll, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, defaultReward, actionsAsMenu, onShare, onRss, isSubscribed: controlledIsSubscribed, onToggleSubscribe, subscribePending, loadCommunitySnaps: _loadCommunitySnaps, reportedAuthors, reportedPosts, activeTab: controlledActiveTab, onActiveTabChange, postSort: controlledPostSort, onPostSortChange, shouldRestoreScroll, }: CommunityDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
106
114
|
export default CommunityDetail;
|