hive-react-kit 1.6.6 → 1.6.7

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/build.css CHANGED
@@ -3649,6 +3649,16 @@
3649
3649
  }
3650
3650
  }
3651
3651
  }
3652
+ .hover\:border-blue-400\/50 {
3653
+ &:hover {
3654
+ @media (hover: hover) {
3655
+ border-color: color-mix(in srgb, oklch(70.7% 0.165 254.624) 50%, transparent);
3656
+ @supports (color: color-mix(in lab, red, red)) {
3657
+ border-color: color-mix(in oklab, var(--color-blue-400) 50%, transparent);
3658
+ }
3659
+ }
3660
+ }
3661
+ }
3652
3662
  .hover\:border-blue-500 {
3653
3663
  &:hover {
3654
3664
  @media (hover: hover) {
@@ -102,6 +102,14 @@ export interface HiveDetailPostProps {
102
102
  parent_permlink: string;
103
103
  json_metadata: string;
104
104
  }) => void;
105
+ /** Called when the post author taps Delete on their own post. Only
106
+ * rendered as an action when `currentUser === post.author`. The
107
+ * consumer is responsible for confirming and broadcasting the
108
+ * `delete_comment` operation. */
109
+ onDelete?: (data: {
110
+ author: string;
111
+ permlink: string;
112
+ }) => void;
105
113
  onShareComment?: (author: string, permlink: string) => void;
106
114
  onTipComment?: (author: string, permlink: string) => void;
107
115
  onReportComment?: (author: string, permlink: string) => void;
@@ -123,6 +131,10 @@ export interface HiveDetailPostProps {
123
131
  parent_permlink: string;
124
132
  json_metadata: string;
125
133
  }) => void;
134
+ /** Called when the comment author taps Delete on their own comment.
135
+ * Only rendered on comments whose author matches `currentUser`. The
136
+ * consumer confirms and broadcasts the `delete_comment` operation. */
137
+ onDeleteComment?: (author: string, permlink: string) => void;
126
138
  /**
127
139
  * Called when the user submits a poll vote.
128
140
  * @param author - post author
@@ -200,5 +212,5 @@ export interface HiveDetailPostProps {
200
212
  * page will then re-render with the new language. */
201
213
  onSelectLanguage?: (code: string) => void;
202
214
  }
203
- export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, onEdit, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, onEditComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, backgroundColor, onBack, onUserClick, onCommunityClick, getUserUrl, getCommunityUrl, onNavigateToPost, isBookmarked, onToggleBookmark, onHeaderShare, onHeaderReport, language, onSelectLanguage, onVotePoll, showVoteButton, processBody, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, renderOptions, awaitingWalletApproval, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
215
+ export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, onEdit, onDelete, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, onEditComment, onDeleteComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, backgroundColor, onBack, onUserClick, onCommunityClick, getUserUrl, getCommunityUrl, onNavigateToPost, isBookmarked, onToggleBookmark, onHeaderShare, onHeaderReport, language, onSelectLanguage, onVotePoll, showVoteButton, processBody, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, renderOptions, awaitingWalletApproval, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
204
216
  export default HiveDetailPost;
@@ -4,6 +4,11 @@ import { type Currency } from "./WalletActionModals";
4
4
  interface WalletProps {
5
5
  username?: string;
6
6
  className?: string;
7
+ /** The actual scroll container this wallet lives inside. When provided,
8
+ * the transaction-history infinite scroll observes it directly instead
9
+ * of the viewport — `root: null` is unreliable inside the profile's
10
+ * nested scroll pane (the sentinel never crosses the viewport). */
11
+ scrollRootRef?: React.RefObject<HTMLElement | null>;
7
12
  /** Logged-in user — when equal to `username`, RC Update / Delete buttons
8
13
  * and Delegate HP/RC buttons are exposed (and only fire when the matching
9
14
  * callbacks below are wired). */
@@ -94,6 +94,12 @@ export interface PostActionButtonProps {
94
94
  onDelete?: () => void;
95
95
  /** Called when user confirms comment upvote with (author, permlink, percent). Frontend handles signing. Voted comments show icon in blue. */
96
96
  onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
97
+ /** Tapping a voter inside the upvote-list dialog calls this with the
98
+ * account name so the consumer can open that user's profile. */
99
+ onUserClick?: (username: string) => void;
100
+ /** Builds a profile URL for each voter row so they render as real
101
+ * <a href> links (open-in-new-tab); paired with `onUserClick`. */
102
+ getUserUrl?: (username: string) => string;
97
103
  /** Ecency image hosting token — enables image upload in comment composer */
98
104
  ecencyToken?: string;
99
105
  /** 3Speak API key — enables audio/video upload in comment composer */
@@ -139,5 +145,5 @@ export interface PostActionButtonProps {
139
145
  * polls, community detail) where there isn't room for four icons. */
140
146
  actionsAsMenu?: boolean;
141
147
  }
142
- 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, 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;
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;
143
149
  export default PostActionButton;
@@ -45,6 +45,9 @@ interface InlineCommentItemProps {
45
45
  parent_permlink: string;
46
46
  json_metadata: string;
47
47
  }) => void;
48
+ /** Called when the author of this comment taps Delete. Each row gates
49
+ * the entry-point internally to `comment.author === currentUser`. */
50
+ onDeleteComment?: (author: string, permlink: string) => void;
48
51
  /** Called when an intra-body link points at a Hive post (peakd/hive.blog/ecency/inleo). */
49
52
  onNavigateToPost?: (author: string, permlink: string) => void;
50
53
  /** Called when an intra-body link points at a Hive user profile. */
@@ -74,5 +77,5 @@ interface InlineCommentItemProps {
74
77
  ipfsGateway?: string;
75
78
  };
76
79
  }
77
- export default function InlineCommentItem({ comment, allComments, onReply, onCancelReply, onCommentSubmit, activeReplyKey, currentUser, token, depth, onVotedRefresh, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, mentionSeedAccounts, onEditComment, onNavigateToPost, onUserClick, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
80
+ export default function InlineCommentItem({ comment, allComments, onReply, onCancelReply, onCommentSubmit, activeReplyKey, currentUser, token, depth, onVotedRefresh, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, mentionSeedAccounts, onEditComment, onDeleteComment, onNavigateToPost, onUserClick, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
78
81
  export {};
@@ -74,10 +74,13 @@ interface InlineCommentSectionProps {
74
74
  parent_permlink: string;
75
75
  json_metadata: string;
76
76
  }) => void;
77
+ /** Delete a comment — only surfaced on the current user's own
78
+ * comments. Consumer confirms + broadcasts `delete_comment`. */
79
+ onDeleteComment?: (author: string, permlink: string) => void;
77
80
  /** Intercept intra-body Hive post links in comment bodies. */
78
81
  onNavigateToPost?: (author: string, permlink: string) => void;
79
82
  /** Intercept intra-body Hive profile links in comment bodies. */
80
83
  onUserClick?: (username: string) => void;
81
84
  }
82
- export default function InlineCommentSection({ author, permlink, currentUser, token, onSubmitComment, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, mentionSeedAccounts, onEditComment, onNavigateToPost, onUserClick, showVoteButton, alreadyVoted, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
85
+ export default function InlineCommentSection({ author, permlink, currentUser, token, onSubmitComment, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, mentionSeedAccounts, onEditComment, onDeleteComment, onNavigateToPost, onUserClick, showVoteButton, alreadyVoted, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
83
86
  export {};