hive-react-kit 1.5.5 → 1.5.6
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 +7 -0
- package/dist/components/HiveDetailPost.d.ts +16 -4
- package/dist/components/VideoCard.d.ts +8 -1
- package/dist/components/VideoFeed.d.ts +7 -1
- package/dist/components/actionButtons/MoreActionsMenu.d.ts +6 -1
- package/dist/components/actionButtons/PostActionButton.d.ts +9 -1
- package/dist/components/community/CommunityDetail.d.ts +14 -1
- package/dist/components/feed/SnapsFeedCard.d.ts +9 -0
- package/dist/components/feed/SnapsFeedView.d.ts +9 -1
- package/dist/components/inlineComments/InlineCommentItem.d.ts +8 -1
- package/dist/components/inlineComments/InlineCommentSection.d.ts +5 -1
- package/dist/components/user/UserDetailProfile.d.ts +14 -0
- package/dist/index.cjs.js +194 -194
- package/dist/index.esm.js +20295 -20163
- package/package.json +1 -1
|
@@ -39,6 +39,13 @@ export interface BlogPostListProps {
|
|
|
39
39
|
onSharePost?: (author: string, permlink: string) => void;
|
|
40
40
|
onCommentClick?: (author: string, permlink: string) => void;
|
|
41
41
|
onReportPost?: (author: string, permlink: string) => void;
|
|
42
|
+
/** Per-row bookmark toggle. Forwarded to each PostActionButton's
|
|
43
|
+
* kebab. Consumer decides add vs remove based on
|
|
44
|
+
* `isPostBookmarked`. */
|
|
45
|
+
onToggleBookmark?: (author: string, permlink: string) => void;
|
|
46
|
+
/** Read function — controls the filled vs outline bookmark icon
|
|
47
|
+
* per row. Typically backed by the consumer's bookmark store. */
|
|
48
|
+
isPostBookmarked?: (author: string, permlink: string) => boolean;
|
|
42
49
|
/** Author-only — when the consumer's current user is `post.author`,
|
|
43
50
|
* PostActionButton's kebab gets a red "Delete" entry that calls
|
|
44
51
|
* this handler. The kit does no ownership check; the consumer
|
|
@@ -105,6 +105,12 @@ export interface HiveDetailPostProps {
|
|
|
105
105
|
onShareComment?: (author: string, permlink: string) => void;
|
|
106
106
|
onTipComment?: (author: string, permlink: string) => void;
|
|
107
107
|
onReportComment?: (author: string, permlink: string) => void;
|
|
108
|
+
/** Bookmark toggle on each inline comment — surfaces a small 3-dot
|
|
109
|
+
* kebab with a Bookmark item at the end of every comment's action
|
|
110
|
+
* row. Consumer decides add vs remove based on
|
|
111
|
+
* `isCommentBookmarked`. */
|
|
112
|
+
onToggleCommentBookmark?: (author: string, permlink: string) => void;
|
|
113
|
+
isCommentBookmarked?: (author: string, permlink: string) => boolean;
|
|
108
114
|
/** Called when the comment author taps Edit on their own comment. Only
|
|
109
115
|
* rendered as an action on comments whose author matches `currentUser`.
|
|
110
116
|
* Includes the original body, parent refs, and json_metadata so the
|
|
@@ -157,12 +163,18 @@ export interface HiveDetailPostProps {
|
|
|
157
163
|
/** Called when the user taps Bookmark in the header kebab.
|
|
158
164
|
* Consumer decides whether to add or remove based on
|
|
159
165
|
* `isBookmarked`. The `meta` payload carries the post's
|
|
160
|
-
* `title
|
|
161
|
-
*
|
|
162
|
-
*
|
|
166
|
+
* `title`, a `body` excerpt (useful for storage backends that
|
|
167
|
+
* require a non-empty body, e.g. hreplier's `/data/v2/bookmarks`),
|
|
168
|
+
* and the parent / depth / json_metadata fields so the consumer
|
|
169
|
+
* can route the bookmark to the right category (snap / comment /
|
|
170
|
+
* video / post) without re-fetching the post. */
|
|
163
171
|
onToggleBookmark?: (meta: {
|
|
164
172
|
title: string;
|
|
165
173
|
body: string;
|
|
174
|
+
parent_author?: string;
|
|
175
|
+
parent_permlink?: string;
|
|
176
|
+
depth?: number;
|
|
177
|
+
json_metadata?: string;
|
|
166
178
|
}) => void;
|
|
167
179
|
/** Called when the user taps Share in the header kebab. When
|
|
168
180
|
* omitted, falls back to `onShare`. */
|
|
@@ -182,5 +194,5 @@ export interface HiveDetailPostProps {
|
|
|
182
194
|
* page will then re-render with the new language. */
|
|
183
195
|
onSelectLanguage?: (code: string) => void;
|
|
184
196
|
}
|
|
185
|
-
export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, onEdit, onShareComment, onTipComment, onReportComment, onEditComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, backgroundColor, onBack, onUserClick, 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;
|
|
197
|
+
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, 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;
|
|
186
198
|
export default HiveDetailPost;
|
|
@@ -4,6 +4,13 @@ interface VideoCardProps {
|
|
|
4
4
|
onVideoClick: (video: VideoFeedItem) => void;
|
|
5
5
|
onAuthorClick: (author: string) => void;
|
|
6
6
|
isGrid?: boolean;
|
|
7
|
+
/** Toggle bookmark on the video. Surfaces a small 3-dot kebab on
|
|
8
|
+
* the card with a Bookmark item. Consumer decides add vs remove
|
|
9
|
+
* based on `isBookmarked`. */
|
|
10
|
+
onToggleBookmark?: (author: string, permlink: string) => void;
|
|
11
|
+
/** Read flag — controls filled vs outline state of the Bookmark
|
|
12
|
+
* item inside the kebab. */
|
|
13
|
+
isBookmarked?: boolean;
|
|
7
14
|
}
|
|
8
|
-
declare const VideoCard: ({ video, onVideoClick, onAuthorClick, isGrid, }: VideoCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const VideoCard: ({ video, onVideoClick, onAuthorClick, isGrid, onToggleBookmark, isBookmarked, }: VideoCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
16
|
export default VideoCard;
|
|
@@ -6,6 +6,12 @@ interface VideoFeedProps {
|
|
|
6
6
|
tag?: string;
|
|
7
7
|
onVideoClick: (video: VideoFeedItem) => void;
|
|
8
8
|
onAuthorClick: (author: string) => void;
|
|
9
|
+
/** Per-card bookmark toggle. Surfaces a small 3-dot kebab on each
|
|
10
|
+
* video card with a Bookmark item. */
|
|
11
|
+
onToggleBookmark?: (author: string, permlink: string) => void;
|
|
12
|
+
/** Read function — controls the filled vs outline state of the
|
|
13
|
+
* Bookmark item per card. */
|
|
14
|
+
isPostBookmarked?: (author: string, permlink: string) => boolean;
|
|
9
15
|
}
|
|
10
|
-
declare const VideoFeed: ({ feedType, username, communityId, tag, onVideoClick, onAuthorClick, }: VideoFeedProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const VideoFeed: ({ feedType, username, communityId, tag, onVideoClick, onAuthorClick, onToggleBookmark, isPostBookmarked, }: VideoFeedProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
17
|
export default VideoFeed;
|
|
@@ -14,6 +14,11 @@ export interface MoreActionsMenuProps {
|
|
|
14
14
|
onTip?: () => void;
|
|
15
15
|
/** Show the Flag item. */
|
|
16
16
|
onReport?: () => void;
|
|
17
|
+
/** Show the Bookmark item. The icon fills when `isBookmarked` is true
|
|
18
|
+
* so the user can see at a glance whether this post is saved.
|
|
19
|
+
* Consumer decides whether to add or remove based on `isBookmarked`. */
|
|
20
|
+
onToggleBookmark?: () => void;
|
|
21
|
+
isBookmarked?: boolean;
|
|
17
22
|
/** Show the Delete item (rendered last, in red, gated by the caller
|
|
18
23
|
* to the author themselves — the kit does no ownership check). */
|
|
19
24
|
onDelete?: () => void;
|
|
@@ -23,5 +28,5 @@ export interface MoreActionsMenuProps {
|
|
|
23
28
|
/** aria-label for the trigger. */
|
|
24
29
|
ariaLabel?: string;
|
|
25
30
|
}
|
|
26
|
-
export declare function MoreActionsMenu({ onEdit, onReblog, onReSnap, onShare, onTip, onReport, onDelete, buttonClassName, ariaLabel, }: MoreActionsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function MoreActionsMenu({ onEdit, onReblog, onReSnap, onShare, onTip, onReport, onToggleBookmark, isBookmarked, onDelete, buttonClassName, ariaLabel, }: MoreActionsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
27
32
|
export default MoreActionsMenu;
|
|
@@ -79,6 +79,14 @@ export interface PostActionButtonProps {
|
|
|
79
79
|
onTip?: () => void;
|
|
80
80
|
/** Called when report is clicked (when logged in). */
|
|
81
81
|
onReport?: () => void;
|
|
82
|
+
/** Called when the user toggles the bookmark item inside the kebab.
|
|
83
|
+
* The kit doesn't fetch bookmark state itself — pass `isBookmarked`
|
|
84
|
+
* from the consumer's store and decide inside the handler whether
|
|
85
|
+
* to add or remove. Surfaces wherever the kebab does (inline kebab
|
|
86
|
+
* on the bar, or the owner kebab when `actionsAsMenu` is off). */
|
|
87
|
+
onToggleBookmark?: () => void;
|
|
88
|
+
/** Current bookmark state — controls the filled vs outline icon. */
|
|
89
|
+
isBookmarked?: boolean;
|
|
82
90
|
/** Called when delete is clicked. Pass only when the current user
|
|
83
91
|
* is the post's author — the kit renders the Delete entry-point
|
|
84
92
|
* iff this handler is provided. Lives inside the kebab popover
|
|
@@ -131,5 +139,5 @@ export interface PostActionButtonProps {
|
|
|
131
139
|
* polls, community detail) where there isn't room for four icons. */
|
|
132
140
|
actionsAsMenu?: boolean;
|
|
133
141
|
}
|
|
134
|
-
export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, payoutDetails, initialVotes, initialVoteCount, initialCommentsCount, onUpvote, onSubmitComment, onComments, onEdit, onReblog, onReSnap, onShare, onTip, onReport, 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;
|
|
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;
|
|
135
143
|
export default PostActionButton;
|
|
@@ -17,6 +17,19 @@ export interface CommunityDetailProps {
|
|
|
17
17
|
onTip?: (author: string, permlink: string) => void;
|
|
18
18
|
onSharePost?: (author: string, permlink: string) => void;
|
|
19
19
|
onReportPost?: (author: string, permlink: string) => void;
|
|
20
|
+
/** Per-row bookmark toggle on every BlogPostList card. Consumer
|
|
21
|
+
* decides add vs remove based on `isPostBookmarked`. */
|
|
22
|
+
onToggleBookmark?: (author: string, permlink: string) => void;
|
|
23
|
+
/** Read function — controls the filled vs outline bookmark icon
|
|
24
|
+
* per row in the embedded BlogPostList. */
|
|
25
|
+
isPostBookmarked?: (author: string, permlink: string) => boolean;
|
|
26
|
+
/** Toggle the *community itself* (backend category `community`).
|
|
27
|
+
* Renders a Bookmark icon button next to the community header
|
|
28
|
+
* actions. Omit to hide the entry. */
|
|
29
|
+
onToggleCommunityBookmark?: (communityId: string) => void;
|
|
30
|
+
/** Read flag — controls the filled vs outline state of the
|
|
31
|
+
* community-header bookmark button. */
|
|
32
|
+
isCommunityBookmarked?: boolean;
|
|
20
33
|
/** Author-only — forwarded into the embedded <BlogPostList/> so the
|
|
21
34
|
* card kebab gets a red Delete entry when `currentUser === author`. */
|
|
22
35
|
onDeletePost?: (author: string, permlink: string) => void;
|
|
@@ -85,5 +98,5 @@ export interface CommunityDetailProps {
|
|
|
85
98
|
* the view starts at the top, matching forward navigation. */
|
|
86
99
|
shouldRestoreScroll?: boolean;
|
|
87
100
|
}
|
|
88
|
-
declare const CommunityDetail: ({ communityId, currentUser, onBack, onUserClick, onPostClick, onCommentClick, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onTip, onSharePost, onReportPost, 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;
|
|
101
|
+
declare const CommunityDetail: ({ communityId, currentUser, onBack, onUserClick, onPostClick, 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;
|
|
89
102
|
export default CommunityDetail;
|
|
@@ -46,6 +46,15 @@ export interface SnapsFeedCardProps {
|
|
|
46
46
|
* use: navigate to the post detail / comments view. Mirrors hSnaps. */
|
|
47
47
|
onClickCommentCount?: (author: string, permlink: string) => void;
|
|
48
48
|
onReportPost?: (author: string, permlink: string) => void;
|
|
49
|
+
/** Called when the user toggles the bookmark item inside the snap's
|
|
50
|
+
* kebab. Consumer decides whether to add or remove based on
|
|
51
|
+
* `isPostBookmarked` below. Omit to hide the bookmark item entirely. */
|
|
52
|
+
onToggleBookmark?: (author: string, permlink: string) => void;
|
|
53
|
+
/** Pure read function called per render with the snap's author +
|
|
54
|
+
* permlink. Return `true` when the current user has this snap
|
|
55
|
+
* bookmarked so the kebab item shows filled state. Pulled from the
|
|
56
|
+
* consumer's bookmark store. */
|
|
57
|
+
isPostBookmarked?: (author: string, permlink: string) => boolean;
|
|
49
58
|
/** Called when the snap's author taps Delete on the action-bar
|
|
50
59
|
* kebab. The kit only renders the entry-point when `currentUser`
|
|
51
60
|
* matches `post.author`. Consumer is responsible for the confirm
|
|
@@ -62,6 +62,14 @@ export interface SnapsFeedViewProps {
|
|
|
62
62
|
/** Comment-count click (per card) — typical use: open post detail. */
|
|
63
63
|
onClickCommentCount?: (author: string, permlink: string) => void;
|
|
64
64
|
onReportPost?: (author: string, permlink: string) => void;
|
|
65
|
+
/** Forwarded to every <SnapsFeedCard/> — Bookmark entry on the
|
|
66
|
+
* action-bar kebab. Consumer decides add vs remove based on
|
|
67
|
+
* `isPostBookmarked`. */
|
|
68
|
+
onToggleBookmark?: (author: string, permlink: string) => void;
|
|
69
|
+
/** Forwarded to every <SnapsFeedCard/> — controls the filled vs
|
|
70
|
+
* outline bookmark icon per snap. Typically backed by a Zustand
|
|
71
|
+
* store like hivesuite's `useBookmarkStore`. */
|
|
72
|
+
isPostBookmarked?: (author: string, permlink: string) => boolean;
|
|
65
73
|
/** Forwarded to every <SnapsFeedCard/> — Delete entry on the
|
|
66
74
|
* action-bar kebab, gated to the snap's author. Consumer owns
|
|
67
75
|
* the confirm dialog + broadcast. */
|
|
@@ -114,5 +122,5 @@ export interface SnapsFeedViewProps {
|
|
|
114
122
|
* headers stay visible via `sticky top-0`. Mobile is unaffected. */
|
|
115
123
|
pageScroll?: boolean;
|
|
116
124
|
}
|
|
117
|
-
export declare function SnapsFeedView({ feeds, labels, avatars, defaultPrimary, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onReSnap, onTip, onSharePost, onCommentClick, onClickCommentIcon, onClickCommentCount, onReportPost, onDeletePost, onEditSnap, onVotePoll, onUserClick, onPostClick, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, defaultReward, toolbar, footer, renderHeaderActions, actionsAsMenu, pageScroll, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
|
|
125
|
+
export declare function SnapsFeedView({ feeds, labels, avatars, defaultPrimary, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onReSnap, onTip, onSharePost, onCommentClick, onClickCommentIcon, onClickCommentCount, onReportPost, onToggleBookmark, isPostBookmarked, onDeletePost, onEditSnap, onVotePoll, onUserClick, onPostClick, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, defaultReward, toolbar, footer, renderHeaderActions, actionsAsMenu, pageScroll, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
|
|
118
126
|
export default SnapsFeedView;
|
|
@@ -24,6 +24,13 @@ interface InlineCommentItemProps {
|
|
|
24
24
|
onShareComment?: (author: string, permlink: string) => void;
|
|
25
25
|
onTipComment?: (author: string, permlink: string) => void;
|
|
26
26
|
onReportComment?: (author: string, permlink: string) => void;
|
|
27
|
+
/** Toggle bookmark on this inline comment. Surfaces inside a small
|
|
28
|
+
* 3-dot kebab at the end of the action row. Consumer decides add
|
|
29
|
+
* vs remove based on `isCommentBookmarked`. */
|
|
30
|
+
onToggleCommentBookmark?: (author: string, permlink: string) => void;
|
|
31
|
+
/** Read function — controls the filled vs outline state of the
|
|
32
|
+
* bookmark item inside the kebab. */
|
|
33
|
+
isCommentBookmarked?: (author: string, permlink: string) => boolean;
|
|
27
34
|
/** Called when the author of this comment taps Edit. Each row gates
|
|
28
35
|
* the entry-point internally to `comment.author === currentUser`. */
|
|
29
36
|
onEditComment?: (data: {
|
|
@@ -63,5 +70,5 @@ interface InlineCommentItemProps {
|
|
|
63
70
|
ipfsGateway?: string;
|
|
64
71
|
};
|
|
65
72
|
}
|
|
66
|
-
export default function InlineCommentItem({ comment, allComments, onReply, onCancelReply, onCommentSubmit, activeReplyKey, currentUser, token, depth, onVotedRefresh, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, onShareComment, onTipComment, onReportComment, onEditComment, onNavigateToPost, onUserClick, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
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, onEditComment, onNavigateToPost, onUserClick, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
67
74
|
export {};
|
|
@@ -54,6 +54,10 @@ interface InlineCommentSectionProps {
|
|
|
54
54
|
onShareComment?: (author: string, permlink: string) => void;
|
|
55
55
|
onTipComment?: (author: string, permlink: string) => void;
|
|
56
56
|
onReportComment?: (author: string, permlink: string) => void;
|
|
57
|
+
/** Forwarded to every <InlineCommentItem/> — surfaces a small 3-dot
|
|
58
|
+
* kebab with a Bookmark item on each comment row. */
|
|
59
|
+
onToggleCommentBookmark?: (author: string, permlink: string) => void;
|
|
60
|
+
isCommentBookmarked?: (author: string, permlink: string) => boolean;
|
|
57
61
|
/** Called when the comment author taps Edit on one of their own
|
|
58
62
|
* comments. Each comment row gates the entry-point internally to
|
|
59
63
|
* `comment.author === currentUser`. Payload mirrors HiveDetailPost
|
|
@@ -71,5 +75,5 @@ interface InlineCommentSectionProps {
|
|
|
71
75
|
/** Intercept intra-body Hive profile links in comment bodies. */
|
|
72
76
|
onUserClick?: (username: string) => void;
|
|
73
77
|
}
|
|
74
|
-
export default function InlineCommentSection({ author, permlink, currentUser, token, onSubmitComment, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, onShareComment, onTipComment, onReportComment, onEditComment, onNavigateToPost, onUserClick, showVoteButton, alreadyVoted, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
export default function InlineCommentSection({ author, permlink, currentUser, token, onSubmitComment, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, onEditComment, onNavigateToPost, onUserClick, showVoteButton, alreadyVoted, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
75
79
|
export {};
|
|
@@ -58,6 +58,20 @@ export interface UserDetailProfileProps {
|
|
|
58
58
|
onReblog?: (author: string, permlink: string) => void;
|
|
59
59
|
onTip?: (author: string, permlink: string) => void;
|
|
60
60
|
onReportPost?: (author: string, permlink: string, reason: string) => void | Promise<void>;
|
|
61
|
+
/** Per-row bookmark toggle on every Blogs / Posts / Comments / Replies
|
|
62
|
+
* card. Consumer decides add vs remove based on `isPostBookmarked`. */
|
|
63
|
+
onToggleBookmark?: (author: string, permlink: string) => void;
|
|
64
|
+
/** Read function — controls the filled vs outline bookmark icon per
|
|
65
|
+
* row inside the content tabs. Typically backed by the consumer's
|
|
66
|
+
* bookmark store. */
|
|
67
|
+
isPostBookmarked?: (author: string, permlink: string) => boolean;
|
|
68
|
+
/** Header-level toggle — bookmark the *viewed user themselves*
|
|
69
|
+
* (backend category `user`). Renders a Bookmark icon button next
|
|
70
|
+
* to the Follow toggle. Omit to hide the entry. */
|
|
71
|
+
onToggleUserBookmark?: (username: string) => void;
|
|
72
|
+
/** Read flag — controls the filled vs outline state of the
|
|
73
|
+
* user-header bookmark button. */
|
|
74
|
+
isUserBookmarked?: boolean;
|
|
61
75
|
/** Author-only — when the viewed profile is `currentUsername`,
|
|
62
76
|
* each post card on the Blogs / Posts / Comments / Replies tabs
|
|
63
77
|
* gets a red Delete entry in the kebab. Consumer owns the
|