hive-react-kit 1.7.8 → 1.7.12

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.
@@ -27,8 +27,12 @@ interface UpvoteListModalProps {
27
27
  /** Unit suffix for each voter's `value` (e.g. "MHP"). Shown after the
28
28
  * number in voters-only mode; no Hive reward icon is rendered. */
29
29
  valueUnit?: string;
30
- /** Header title override. Defaults to "Votes (Hive Rewards)". */
30
+ /** Header title override. Defaults to "Votes (Hive Rewards)" or
31
+ * "Downvotes" when `voteFilter` is `"downvotes"`. */
31
32
  title?: string;
33
+ /** When `"downvotes"`, only negative votes are listed (opened from
34
+ * the broken-heart indicator). Default `"upvotes"`. */
35
+ voteFilter?: 'upvotes' | 'downvotes';
32
36
  /** Makes each voter row navigate to the account's profile. Mainly
33
37
  * used in voters-only mode. */
34
38
  onUserClick?: (username: string) => void;
@@ -43,5 +47,5 @@ export interface VoterRow {
43
47
  value?: number;
44
48
  }
45
49
  export declare function formatTimeAgo(date: string | Date): string;
46
- declare const UpvoteListModal: ({ author, permlink, onClose, currentUser, token, onClickUpvoteButton, hiveIconUrl, voters, fetchVoters, valueUnit, title, onUserClick, getUserUrl, }: UpvoteListModalProps) => import("react/jsx-runtime").JSX.Element;
50
+ declare const UpvoteListModal: ({ author, permlink, onClose, currentUser, token, onClickUpvoteButton, hiveIconUrl, voters, fetchVoters, valueUnit, title, voteFilter, onUserClick, getUserUrl, }: UpvoteListModalProps) => import("react/jsx-runtime").JSX.Element;
47
51
  export default UpvoteListModal;
@@ -27,6 +27,10 @@ export interface PostActionButtonProps {
27
27
  * popular posts. Pass this when you have the canonical total so
28
28
  * the chip reads "1.2k" instead of being capped at 1000. */
29
29
  initialVoteCount?: number;
30
+ /** Hive `stats.flag_weight` — non-zero means the post has downvotes.
31
+ * Pair with `initialVotes` so the broken-heart indicator is reliable
32
+ * even when the capped `active_votes` array omits flag voters. */
33
+ initialFlagWeight?: number;
30
34
  /** Optional: Pre-loaded comments count from the Post object (item.children). Skips the API call when provided. */
31
35
  initialCommentsCount?: number;
32
36
  /** Called when user confirms vote with percent (1–100). Frontend handles signing/broadcast. */
@@ -150,5 +154,5 @@ export interface PostActionButtonProps {
150
154
  * polls, community detail) where there isn't room for four icons. */
151
155
  actionsAsMenu?: boolean;
152
156
  }
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;
157
+ export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, payoutDetails, initialVotes, initialVoteCount, initialFlagWeight, 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;
154
158
  export default PostActionButton;