hive-react-kit 1.12.2 → 1.12.5
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 +4 -28
- package/dist/components/BlogPostList.d.ts +8 -0
- package/dist/components/CurationButton.d.ts +23 -2
- package/dist/components/HiveDetailPost.d.ts +9 -1
- package/dist/components/VoteSlider.d.ts +30 -1
- package/dist/components/actionButtons/PostActionButton.d.ts +18 -1
- package/dist/components/feed/SnapsFeedCard.d.ts +8 -0
- package/dist/components/feed/SnapsFeedView.d.ts +8 -1
- package/dist/components/inlineComments/InlineCommentItem.d.ts +9 -1
- package/dist/components/inlineComments/InlineCommentSection.d.ts +8 -1
- package/dist/components/user/ProfileSnapsTab.d.ts +12 -0
- package/dist/components/user/UserDetailProfile.d.ts +14 -0
- package/dist/index.cjs.js +190 -190
- package/dist/index.esm.js +23060 -22832
- package/dist/utils/postVotes.d.ts +23 -0
- package/package.json +1 -1
package/dist/build.css
CHANGED
|
@@ -73,8 +73,6 @@
|
|
|
73
73
|
--color-purple-800: oklch(43.8% 0.218 303.724);
|
|
74
74
|
--color-purple-900: oklch(38.1% 0.176 304.987);
|
|
75
75
|
--color-pink-400: oklch(71.8% 0.202 349.761);
|
|
76
|
-
--color-pink-500: oklch(65.6% 0.241 354.308);
|
|
77
|
-
--color-pink-600: oklch(59.2% 0.249 0.584);
|
|
78
76
|
--color-rose-400: oklch(71.2% 0.194 13.428);
|
|
79
77
|
--color-slate-50: oklch(98.4% 0.003 247.858);
|
|
80
78
|
--color-slate-300: oklch(86.9% 0.022 252.894);
|
|
@@ -1239,6 +1237,10 @@
|
|
|
1239
1237
|
--tw-translate-x: calc(var(--spacing) * 4);
|
|
1240
1238
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1241
1239
|
}
|
|
1240
|
+
.translate-x-5 {
|
|
1241
|
+
--tw-translate-x: calc(var(--spacing) * 5);
|
|
1242
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1243
|
+
}
|
|
1242
1244
|
.-translate-y-1\/2 {
|
|
1243
1245
|
--tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
|
|
1244
1246
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -2052,9 +2054,6 @@
|
|
|
2052
2054
|
background-color: color-mix(in oklab, var(--hrk-bg-app) 95%, transparent);
|
|
2053
2055
|
}
|
|
2054
2056
|
}
|
|
2055
|
-
.bg-\[var\(--hrk-bg-card\)\] {
|
|
2056
|
-
background-color: var(--hrk-bg-card);
|
|
2057
|
-
}
|
|
2058
2057
|
.bg-\[var\(--hrk-bg-hover\)\] {
|
|
2059
2058
|
background-color: var(--hrk-bg-hover);
|
|
2060
2059
|
}
|
|
@@ -2550,9 +2549,6 @@
|
|
|
2550
2549
|
background-color: color-mix(in oklab, var(--color-orange-500) 15%, transparent);
|
|
2551
2550
|
}
|
|
2552
2551
|
}
|
|
2553
|
-
.bg-pink-500 {
|
|
2554
|
-
background-color: var(--color-pink-500);
|
|
2555
|
-
}
|
|
2556
2552
|
.bg-purple-100 {
|
|
2557
2553
|
background-color: var(--color-purple-100);
|
|
2558
2554
|
}
|
|
@@ -3197,9 +3193,6 @@
|
|
|
3197
3193
|
.text-\[var\(--hrk-success\)\] {
|
|
3198
3194
|
color: var(--hrk-success);
|
|
3199
3195
|
}
|
|
3200
|
-
.text-\[var\(--hrk-text-muted\)\] {
|
|
3201
|
-
color: var(--hrk-text-muted);
|
|
3202
|
-
}
|
|
3203
3196
|
.text-\[var\(--hrk-text-on-brand\)\] {
|
|
3204
3197
|
color: var(--hrk-text-on-brand);
|
|
3205
3198
|
}
|
|
@@ -3493,9 +3486,6 @@
|
|
|
3493
3486
|
.accent-blue-600 {
|
|
3494
3487
|
accent-color: var(--color-blue-600);
|
|
3495
3488
|
}
|
|
3496
|
-
.accent-pink-500 {
|
|
3497
|
-
accent-color: var(--color-pink-500);
|
|
3498
|
-
}
|
|
3499
3489
|
.opacity-0 {
|
|
3500
3490
|
opacity: 0%;
|
|
3501
3491
|
}
|
|
@@ -4297,13 +4287,6 @@
|
|
|
4297
4287
|
}
|
|
4298
4288
|
}
|
|
4299
4289
|
}
|
|
4300
|
-
.hover\:bg-pink-600 {
|
|
4301
|
-
&:hover {
|
|
4302
|
-
@media (hover: hover) {
|
|
4303
|
-
background-color: var(--color-pink-600);
|
|
4304
|
-
}
|
|
4305
|
-
}
|
|
4306
|
-
}
|
|
4307
4290
|
.hover\:bg-purple-700 {
|
|
4308
4291
|
&:hover {
|
|
4309
4292
|
@media (hover: hover) {
|
|
@@ -4567,13 +4550,6 @@
|
|
|
4567
4550
|
}
|
|
4568
4551
|
}
|
|
4569
4552
|
}
|
|
4570
|
-
.hover\:text-pink-400 {
|
|
4571
|
-
&:hover {
|
|
4572
|
-
@media (hover: hover) {
|
|
4573
|
-
color: var(--color-pink-400);
|
|
4574
|
-
}
|
|
4575
|
-
}
|
|
4576
|
-
}
|
|
4577
4553
|
.hover\:text-red-400 {
|
|
4578
4554
|
&:hover {
|
|
4579
4555
|
@media (hover: hover) {
|
|
@@ -91,6 +91,14 @@ export interface BlogPostListProps {
|
|
|
91
91
|
isCurator?: boolean;
|
|
92
92
|
/** Called when the curator submits a curation request. Weight is 1–15. */
|
|
93
93
|
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
94
|
+
/** Looks up the server-configured max curation weight for a content
|
|
95
|
+
* type, plus whether it's already been submitted for curation.
|
|
96
|
+
* Forwarded to each card's vote slider and to the already-voted
|
|
97
|
+
* fallback <CurationButton/>. */
|
|
98
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
|
|
99
|
+
maxWeight: number;
|
|
100
|
+
alreadySubmitted: boolean;
|
|
101
|
+
}>;
|
|
94
102
|
}
|
|
95
103
|
export declare const BlogPostList: FC<BlogPostListProps>;
|
|
96
104
|
export default BlogPostList;
|
|
@@ -1,8 +1,29 @@
|
|
|
1
|
+
type CurationType = 'post' | 'snap' | 'comment';
|
|
2
|
+
interface CurationStatus {
|
|
3
|
+
maxWeight: number;
|
|
4
|
+
alreadySubmitted: boolean;
|
|
5
|
+
}
|
|
1
6
|
interface CurationButtonProps {
|
|
2
7
|
author: string;
|
|
3
8
|
permlink: string;
|
|
4
|
-
type:
|
|
9
|
+
type: CurationType;
|
|
5
10
|
onCurationRequest: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
11
|
+
/** Looks up the max slider weight for this content type, plus whether
|
|
12
|
+
* it's already been submitted for curation by any curator. Checked
|
|
13
|
+
* fresh every time the modal opens. */
|
|
14
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: CurationType) => Promise<CurationStatus>;
|
|
6
15
|
}
|
|
7
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Fallback curation entry point — for curators who already spent their
|
|
18
|
+
* own vote on this content (before the curation feature existed, or
|
|
19
|
+
* simply voted before deciding to curate). The vote slider's "Request
|
|
20
|
+
* curation" toggle can't help there since it never reopens once you've
|
|
21
|
+
* voted, so this is a separate, vote-free trigger.
|
|
22
|
+
*
|
|
23
|
+
* Only ever rendered by the caller when: `isCurator && onCurationRequest
|
|
24
|
+
* && isHiveSuiteContent(...) && !hasCurationVoterVoted(...) &&
|
|
25
|
+
* hasUserVoted(votes, currentUser)` — i.e. exactly the case the merged
|
|
26
|
+
* vote-slider flow can't cover.
|
|
27
|
+
*/
|
|
28
|
+
export declare function CurationButton({ author, permlink, type, onCurationRequest, onFetchCurationStatus }: CurationButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
29
|
export {};
|
|
@@ -229,6 +229,14 @@ export interface HiveDetailPostProps {
|
|
|
229
229
|
/** Called when the curator submits a curation request. `type` is
|
|
230
230
|
* `'post'` for the main post or `'comment'` for a comment. */
|
|
231
231
|
onCurationRequest?: (author: string, permlink: string, weight: number, type: 'post' | 'comment') => void | Promise<void>;
|
|
232
|
+
/** Looks up the server-configured max curation weight for a content
|
|
233
|
+
* type, plus whether it's already been submitted for curation.
|
|
234
|
+
* Forwarded to the post's vote slider, its already-voted fallback
|
|
235
|
+
* button, and to every comment via <InlineCommentSection/>. */
|
|
236
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
|
|
237
|
+
maxWeight: number;
|
|
238
|
+
alreadySubmitted: boolean;
|
|
239
|
+
}>;
|
|
232
240
|
}
|
|
233
|
-
export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, isReblogged, onShare, onTip, onReport, onEdit, onDelete, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, onEditComment, onDeleteComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, backgroundColor, onBack, onOpenMenu, onOpenProfileMenu, onUserClick, onCommunityClick, getUserUrl, getCommunityUrl, onNavigateToPost, isBookmarked, onToggleBookmark, onHeaderShare, onHeaderReport, language, onSelectLanguage, onVotePoll, showVoteButton, processBody, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, renderOptions, awaitingWalletApproval, decentMemesAppAccount, decentMemesTheme, isCurator, onCurationRequest, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
241
|
+
export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, isReblogged, onShare, onTip, onReport, onEdit, onDelete, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, onEditComment, onDeleteComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, backgroundColor, onBack, onOpenMenu, onOpenProfileMenu, onUserClick, onCommunityClick, getUserUrl, getCommunityUrl, onNavigateToPost, isBookmarked, onToggleBookmark, onHeaderShare, onHeaderReport, language, onSelectLanguage, onVotePoll, showVoteButton, processBody, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, renderOptions, awaitingWalletApproval, decentMemesAppAccount, decentMemesTheme, isCurator, onCurationRequest, onFetchCurationStatus, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
234
242
|
export default HiveDetailPost;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
type CurationType = 'post' | 'snap' | 'comment';
|
|
2
|
+
interface CurationStatus {
|
|
3
|
+
maxWeight: number;
|
|
4
|
+
alreadySubmitted: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function VoteSlider({ author, permlink, defaultValue, step, onUpvote, onCancel, awaitingWalletApproval, walletApprovalLabel, curationEligible, curationType, onCurationRequest, onFetchCurationStatus, }: {
|
|
2
7
|
author: string;
|
|
3
8
|
permlink: string;
|
|
4
9
|
defaultValue?: number;
|
|
@@ -13,4 +18,28 @@ export declare function VoteSlider({ author, permlink, defaultValue, step, onUpv
|
|
|
13
18
|
awaitingWalletApproval?: boolean;
|
|
14
19
|
/** Override for the wallet-approval hint text. */
|
|
15
20
|
walletApprovalLabel?: string;
|
|
21
|
+
/** Shows the curator-only "Request curation" toggle below the vote
|
|
22
|
+
* slider. Callers resolve this from `isCurator && !!onCurationRequest
|
|
23
|
+
* && <not already curated> && <content published via HiveSuite>`
|
|
24
|
+
* before rendering — this component has no opinion on eligibility,
|
|
25
|
+
* it just renders the toggle when told to (pending a fresh
|
|
26
|
+
* already-submitted check — see `onFetchCurationStatus`). */
|
|
27
|
+
curationEligible?: boolean;
|
|
28
|
+
/** Required when `curationEligible` — sizes the curation-weight
|
|
29
|
+
* slider's built-in default range before the server limit resolves. */
|
|
30
|
+
curationType?: CurationType;
|
|
31
|
+
/** Fired with the chosen curation weight immediately after a
|
|
32
|
+
* successful vote, only when the curator switched the toggle on.
|
|
33
|
+
* Voting and curation are deliberately one action — a curator can no
|
|
34
|
+
* longer request curation without also spending their own vote. */
|
|
35
|
+
onCurationRequest?: (weight: number) => void | Promise<void>;
|
|
36
|
+
/** Looks up the server-configured max curation weight for
|
|
37
|
+
* `curationType`, plus whether this content was already submitted for
|
|
38
|
+
* curation by any curator. Called once, as soon as the slider opens
|
|
39
|
+
* (if `curationEligible`) — the toggle only renders once this
|
|
40
|
+
* resolves, and stays hidden entirely when `alreadySubmitted` is
|
|
41
|
+
* true, so a curator never sees an option that would just silently
|
|
42
|
+
* fail as a duplicate. */
|
|
43
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: CurationType) => Promise<CurationStatus>;
|
|
16
44
|
}): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export {};
|
|
@@ -35,6 +35,23 @@ export interface PostActionButtonProps {
|
|
|
35
35
|
initialCommentsCount?: number;
|
|
36
36
|
/** Called when user confirms vote with percent (1–100). Frontend handles signing/broadcast. */
|
|
37
37
|
onUpvote?: (percent: number) => void | Promise<void>;
|
|
38
|
+
/** Shows the curator-only "Request curation" toggle inside the vote
|
|
39
|
+
* slider. Caller resolves this from `isCurator && !!onCurationRequest
|
|
40
|
+
* && <not already curated> && <content published via HiveSuite>`. */
|
|
41
|
+
curationEligible?: boolean;
|
|
42
|
+
/** Required alongside `curationEligible` — sizes the curation-weight
|
|
43
|
+
* slider's default range before the server limit resolves. */
|
|
44
|
+
curationType?: 'post' | 'snap' | 'comment';
|
|
45
|
+
/** Fired with the chosen curation weight right after a successful
|
|
46
|
+
* vote, only when the curator switched the toggle on. */
|
|
47
|
+
onCurationRequest?: (weight: number) => void | Promise<void>;
|
|
48
|
+
/** Looks up the server-configured max curation weight for
|
|
49
|
+
* `curationType`, plus whether this content was already submitted
|
|
50
|
+
* for curation by any curator. */
|
|
51
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
|
|
52
|
+
maxWeight: number;
|
|
53
|
+
alreadySubmitted: boolean;
|
|
54
|
+
}>;
|
|
38
55
|
/** Called when user submits a comment. Frontend handles signing/broadcast.
|
|
39
56
|
* Return `false` to indicate the operation was cancelled — the composer text will be preserved.
|
|
40
57
|
* `voteWeight` is non-null when the composer's upvote-on-publish toggle is enabled
|
|
@@ -156,5 +173,5 @@ export interface PostActionButtonProps {
|
|
|
156
173
|
* polls, community detail) where there isn't room for four icons. */
|
|
157
174
|
actionsAsMenu?: boolean;
|
|
158
175
|
}
|
|
159
|
-
export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, payoutDetails, initialVotes, initialVoteCount, initialFlagWeight, initialCommentsCount, onUpvote, onSubmitComment, onComments, onEdit, onReblog, isReblogged, onCheckReblogged, 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;
|
|
176
|
+
export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, payoutDetails, initialVotes, initialVoteCount, initialFlagWeight, initialCommentsCount, onUpvote, curationEligible, curationType, onCurationRequest, onFetchCurationStatus, onSubmitComment, onComments, onEdit, onReblog, isReblogged, onCheckReblogged, 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;
|
|
160
177
|
export default PostActionButton;
|
|
@@ -110,6 +110,14 @@ export interface SnapsFeedCardProps {
|
|
|
110
110
|
isCurator?: boolean;
|
|
111
111
|
/** Called when the curator submits a curation request. Weight is 1–6. */
|
|
112
112
|
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
113
|
+
/** Looks up the server-configured max curation weight for a content
|
|
114
|
+
* type, plus whether this content was already submitted for curation
|
|
115
|
+
* by any curator. Forwarded to the card's vote slider and to the
|
|
116
|
+
* already-voted fallback <CurationButton/>. */
|
|
117
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
|
|
118
|
+
maxWeight: number;
|
|
119
|
+
alreadySubmitted: boolean;
|
|
120
|
+
}>;
|
|
113
121
|
}
|
|
114
122
|
declare const SnapsFeedCard: FC<SnapsFeedCardProps>;
|
|
115
123
|
export default SnapsFeedCard;
|
|
@@ -128,6 +128,13 @@ export interface SnapsFeedViewProps {
|
|
|
128
128
|
isCurator?: boolean;
|
|
129
129
|
/** Called when the curator submits a curation request on a snap. */
|
|
130
130
|
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
131
|
+
/** Looks up the server-configured max curation weight for a content
|
|
132
|
+
* type, plus whether it's already been submitted for curation.
|
|
133
|
+
* Forwarded to every <SnapsFeedCard/>. */
|
|
134
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
|
|
135
|
+
maxWeight: number;
|
|
136
|
+
alreadySubmitted: boolean;
|
|
137
|
+
}>;
|
|
131
138
|
/** When `true`, the desktop 4-column layout grows naturally with its
|
|
132
139
|
* content instead of pinning each column to a fixed-height per-column
|
|
133
140
|
* scroller. Use this when the parent page already provides a single
|
|
@@ -137,5 +144,5 @@ export interface SnapsFeedViewProps {
|
|
|
137
144
|
pageScroll?: boolean;
|
|
138
145
|
onActiveFeedChange?: (feed: SnapsFeedKey) => void;
|
|
139
146
|
}
|
|
140
|
-
export declare function SnapsFeedView({ feeds, labels, avatars, defaultPrimary, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, isPostReblogged, onCheckReblogged, onReSnap, onTip, onSharePost, onCommentClick, onClickCommentIcon, onClickCommentCount, onReportPost, onToggleBookmark, isPostBookmarked, onDeletePost, onEditSnap, onVotePoll, onUserClick, onPostClick, getPostUrl, getUserUrl, getTagUrl, getCommunityUrl, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, defaultReward, toolbar, footer, renderHeaderActions, actionsAsMenu, isCurator, onCurationRequest, pageScroll, onActiveFeedChange, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
|
|
147
|
+
export declare function SnapsFeedView({ feeds, labels, avatars, defaultPrimary, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, isPostReblogged, onCheckReblogged, onReSnap, onTip, onSharePost, onCommentClick, onClickCommentIcon, onClickCommentCount, onReportPost, onToggleBookmark, isPostBookmarked, onDeletePost, onEditSnap, onVotePoll, onUserClick, onPostClick, getPostUrl, getUserUrl, getTagUrl, getCommunityUrl, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, defaultReward, toolbar, footer, renderHeaderActions, actionsAsMenu, isCurator, onCurationRequest, onFetchCurationStatus, pageScroll, onActiveFeedChange, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
|
|
141
148
|
export default SnapsFeedView;
|
|
@@ -87,6 +87,14 @@ interface InlineCommentItemProps {
|
|
|
87
87
|
isCurator?: boolean;
|
|
88
88
|
/** Called when the curator submits a curation request. Weight is 1–3. */
|
|
89
89
|
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
90
|
+
/** Looks up the server-configured max curation weight for a content
|
|
91
|
+
* type, plus whether it's already been submitted for curation.
|
|
92
|
+
* Forwarded to this comment's vote slider, its already-voted
|
|
93
|
+
* fallback button, and to every nested reply. */
|
|
94
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
|
|
95
|
+
maxWeight: number;
|
|
96
|
+
alreadySubmitted: boolean;
|
|
97
|
+
}>;
|
|
90
98
|
}
|
|
91
|
-
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, parentTags, decentMemesAppAccount, decentMemesTheme, isCurator, onCurationRequest, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
99
|
+
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, parentTags, decentMemesAppAccount, decentMemesTheme, isCurator, onCurationRequest, onFetchCurationStatus, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
92
100
|
export {};
|
|
@@ -92,6 +92,13 @@ interface InlineCommentSectionProps {
|
|
|
92
92
|
isCurator?: boolean;
|
|
93
93
|
/** Called when the curator submits a curation request on a comment. */
|
|
94
94
|
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
95
|
+
/** Looks up the server-configured max curation weight for a content
|
|
96
|
+
* type, plus whether it's already been submitted for curation.
|
|
97
|
+
* Forwarded to every <InlineCommentItem/>. */
|
|
98
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
|
|
99
|
+
maxWeight: number;
|
|
100
|
+
alreadySubmitted: boolean;
|
|
101
|
+
}>;
|
|
95
102
|
}
|
|
96
|
-
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, decentMemesAppAccount, decentMemesTheme, isCurator, onCurationRequest, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
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, decentMemesAppAccount, decentMemesTheme, isCurator, onCurationRequest, onFetchCurationStatus, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
97
104
|
export {};
|
|
@@ -69,6 +69,18 @@ export interface ProfileSnapsTabProps {
|
|
|
69
69
|
defaultReward?: RewardOption;
|
|
70
70
|
/** Per-card right-side header action menu slot (e.g. Edit / Flag). */
|
|
71
71
|
renderHeaderActions?: (post: Post) => ReactNode;
|
|
72
|
+
/** When true, a heart button is shown on each snap card so the curator
|
|
73
|
+
* can request an on-chain upvote. Forwarded to <SnapsFeedView/>. */
|
|
74
|
+
isCurator?: boolean;
|
|
75
|
+
/** Called when the curator submits a curation request on a snap. */
|
|
76
|
+
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
77
|
+
/** Looks up the server-configured max curation weight for a content
|
|
78
|
+
* type, plus whether it's already been submitted for curation.
|
|
79
|
+
* Forwarded to <SnapsFeedView/>. */
|
|
80
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
|
|
81
|
+
maxWeight: number;
|
|
82
|
+
alreadySubmitted: boolean;
|
|
83
|
+
}>;
|
|
72
84
|
}
|
|
73
85
|
declare const ProfileSnapsTab: React.FC<ProfileSnapsTabProps>;
|
|
74
86
|
export default ProfileSnapsTab;
|
|
@@ -114,6 +114,20 @@ export interface UserDetailProfileProps {
|
|
|
114
114
|
* (e.g. "51000000000" for 51 b RC). Return `false` to indicate cancellation
|
|
115
115
|
* (keychain denied / user closed the prompt) — the row stays in edit mode. */
|
|
116
116
|
onUpdateRcDelegation?: (delegatee: string, maxRc: string) => void | boolean | Promise<void | boolean>;
|
|
117
|
+
/** When true, a heart button is shown on each post/blog/snap card so
|
|
118
|
+
* the curator can request an on-chain upvote. */
|
|
119
|
+
isCurator?: boolean;
|
|
120
|
+
/** Called when the curator submits a curation request. `type` is
|
|
121
|
+
* `'post'` for the Posts/Blogs tab or `'snap'` for the Snaps tab. */
|
|
122
|
+
onCurationRequest?: (author: string, permlink: string, weight: number, type: 'post' | 'snap') => void | Promise<void>;
|
|
123
|
+
/** Looks up the server-configured max curation weight for a content
|
|
124
|
+
* type, plus whether it's already been submitted for curation.
|
|
125
|
+
* Forwarded to every card's vote slider and already-voted fallback
|
|
126
|
+
* button. */
|
|
127
|
+
onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
|
|
128
|
+
maxWeight: number;
|
|
129
|
+
alreadySubmitted: boolean;
|
|
130
|
+
}>;
|
|
117
131
|
/** Wallet tab — RC delegation removal (broadcasts max_rc=0 internally). */
|
|
118
132
|
onDeleteRcDelegation?: (delegatee: string) => void | boolean | Promise<void | boolean>;
|
|
119
133
|
/** Wallet tab — create a new HP delegation. `hp` is HP as a numeric string
|