hive-react-kit 1.12.6 → 1.12.8

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
@@ -3477,6 +3477,9 @@
3477
3477
  color: var(--color-gray-500);
3478
3478
  }
3479
3479
  }
3480
+ .accent-\[var\(--hrk-brand\)\] {
3481
+ accent-color: var(--hrk-brand);
3482
+ }
3480
3483
  .accent-\[var\(--hs-brand\,\#e31337\)\] {
3481
3484
  accent-color: var(--hs-brand,#e31337);
3482
3485
  }
@@ -4438,6 +4441,13 @@
4438
4441
  }
4439
4442
  }
4440
4443
  }
4444
+ .hover\:text-\[var\(--hrk-brand-hover\)\] {
4445
+ &:hover {
4446
+ @media (hover: hover) {
4447
+ color: var(--hrk-brand-hover);
4448
+ }
4449
+ }
4450
+ }
4441
4451
  .hover\:text-\[var\(--hrk-danger\)\] {
4442
4452
  &:hover {
4443
4453
  @media (hover: hover) {
@@ -89,12 +89,13 @@ export interface BlogPostListProps {
89
89
  /** When true, a heart button is shown on each post card so the curator
90
90
  * can request an on-chain upvote with a chosen vote weight. */
91
91
  isCurator?: boolean;
92
- /** Called when the curator submits a curation request. Weight is 1–15. */
93
- onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
92
+ /** Called when the curator submits a curation request. Weight is 1–15.
93
+ * `ownVoteWeight` is the curator's own vote weight on this content
94
+ * (0–100), recorded alongside the request for review. */
95
+ onCurationRequest?: (author: string, permlink: string, weight: number, ownVoteWeight: number) => void | Promise<void>;
94
96
  /** Looks up the server-configured max curation weight for a content
95
97
  * 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
+ * Forwarded to each card's vote slider. */
98
99
  onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
99
100
  maxWeight: number;
100
101
  alreadySubmitted: boolean;
@@ -227,12 +227,14 @@ export interface HiveDetailPostProps {
227
227
  * so the curator can request on-chain upvotes. */
228
228
  isCurator?: boolean;
229
229
  /** Called when the curator submits a curation request. `type` is
230
- * `'post'` for the main post or `'comment'` for a comment. */
231
- onCurationRequest?: (author: string, permlink: string, weight: number, type: 'post' | 'comment') => void | Promise<void>;
230
+ * `'post'` for the main post or `'comment'` for a comment.
231
+ * `ownVoteWeight` is the curator's own vote weight on this content
232
+ * (0–100), recorded alongside the request for review. */
233
+ onCurationRequest?: (author: string, permlink: string, weight: number, type: 'post' | 'comment', ownVoteWeight: number) => void | Promise<void>;
232
234
  /** Looks up the server-configured max curation weight for a content
233
235
  * 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
+ * Forwarded to the post's vote slider and to every comment via
237
+ * <InlineCommentSection/>. */
236
238
  onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
237
239
  maxWeight: number;
238
240
  alreadySubmitted: boolean;
@@ -3,7 +3,7 @@ interface CurationStatus {
3
3
  maxWeight: number;
4
4
  alreadySubmitted: boolean;
5
5
  }
6
- export declare function VoteSlider({ author, permlink, defaultValue, step, onUpvote, onCancel, awaitingWalletApproval, walletApprovalLabel, curationEligible, curationType, onCurationRequest, onFetchCurationStatus, }: {
6
+ export declare function VoteSlider({ author, permlink, defaultValue, step, onUpvote, onCancel, awaitingWalletApproval, walletApprovalLabel, alreadyVoted, curatorOwnVoteWeight, curationEligible, curationType, onCurationRequest, onFetchCurationStatus, }: {
7
7
  author: string;
8
8
  permlink: string;
9
9
  defaultValue?: number;
@@ -18,25 +18,41 @@ export declare function VoteSlider({ author, permlink, defaultValue, step, onUpv
18
18
  awaitingWalletApproval?: boolean;
19
19
  /** Override for the wallet-approval hint text. */
20
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`). */
21
+ /** True when the current user already voted on this content. Skips
22
+ * the vote-percent slider and "Vote" button entirely there's
23
+ * nothing left to vote on and shows only the curation-request
24
+ * section (when `curationEligible`), so a curator who already spent
25
+ * their own vote before deciding to curate still has a path in. */
26
+ alreadyVoted?: boolean;
27
+ /** The vote weight (0–100) the user already cast, when `alreadyVoted`.
28
+ * Reported alongside the curation request since there's no live
29
+ * slider value to capture in this mode. */
30
+ curatorOwnVoteWeight?: number;
31
+ /** Shows the curator-only curation-request UI. Callers resolve this
32
+ * from `isCurator && !!onCurationRequest && <not already curated> &&
33
+ * <content published via HiveSuite>` before rendering — this
34
+ * component has no opinion on eligibility, it just renders the
35
+ * option when told to (pending a fresh already-submitted check —
36
+ * see `onFetchCurationStatus`). */
27
37
  curationEligible?: boolean;
28
38
  /** Required when `curationEligible` — sizes the curation-weight
29
39
  * slider's built-in default range before the server limit resolves. */
30
40
  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>;
41
+ /** Fired with the chosen curation weight and the curator's own vote
42
+ * weight. When not `alreadyVoted`, fired immediately after a
43
+ * successful vote, only when the curator switched the toggle on
44
+ * voting and curation are deliberately one action, so a curator can't
45
+ * request curation without also spending their own vote. When
46
+ * `alreadyVoted`, it's the only action available, fired with
47
+ * `curatorOwnVoteWeight` as the already-cast vote weight. Either way
48
+ * the own-vote weight is forwarded so it can be recorded and reviewed
49
+ * (e.g. a curator voting 0.25% on their own while requesting 15% from
50
+ * the curation account is a visible red flag). */
51
+ onCurationRequest?: (weight: number, ownVoteWeight: number) => void | Promise<void>;
36
52
  /** Looks up the server-configured max curation weight for
37
53
  * `curationType`, plus whether this content was already submitted for
38
54
  * curation by any curator. Called once, as soon as the slider opens
39
- * (if `curationEligible`) — the toggle only renders once this
55
+ * (if `curationEligible`) — the curation UI only renders once this
40
56
  * resolves, and stays hidden entirely when `alreadySubmitted` is
41
57
  * true, so a curator never sees an option that would just silently
42
58
  * fail as a duplicate. */
@@ -42,9 +42,10 @@ export interface PostActionButtonProps {
42
42
  /** Required alongside `curationEligible` — sizes the curation-weight
43
43
  * slider's default range before the server limit resolves. */
44
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>;
45
+ /** Fired with the chosen curation weight and the curator's own vote
46
+ * weight right after a successful vote, only when the curator
47
+ * switched the toggle on. */
48
+ onCurationRequest?: (weight: number, ownVoteWeight: number) => void | Promise<void>;
48
49
  /** Looks up the server-configured max curation weight for
49
50
  * `curationType`, plus whether this content was already submitted
50
51
  * for curation by any curator. */
@@ -108,12 +108,13 @@ export interface SnapsFeedCardProps {
108
108
  /** When true, a heart button is shown so the curator can request an
109
109
  * on-chain upvote with a chosen weight (1–6%). */
110
110
  isCurator?: boolean;
111
- /** Called when the curator submits a curation request. Weight is 1–6. */
112
- onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
111
+ /** Called when the curator submits a curation request. Weight is 1–6.
112
+ * `ownVoteWeight` is the curator's own vote weight on this content
113
+ * (0–100), recorded alongside the request for review. */
114
+ onCurationRequest?: (author: string, permlink: string, weight: number, ownVoteWeight: number) => void | Promise<void>;
113
115
  /** Looks up the server-configured max curation weight for a content
114
116
  * 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
+ * by any curator. Forwarded to the card's vote slider. */
117
118
  onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
118
119
  maxWeight: number;
119
120
  alreadySubmitted: boolean;
@@ -126,8 +126,10 @@ export interface SnapsFeedViewProps {
126
126
  /** When true, a heart button is shown on each snap card so the curator
127
127
  * can request an on-chain upvote (1–6%). Forwarded to every <SnapsFeedCard/>. */
128
128
  isCurator?: boolean;
129
- /** Called when the curator submits a curation request on a snap. */
130
- onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
129
+ /** Called when the curator submits a curation request on a snap.
130
+ * `ownVoteWeight` is the curator's own vote weight on this snap
131
+ * (0–100), recorded alongside the request for review. */
132
+ onCurationRequest?: (author: string, permlink: string, weight: number, ownVoteWeight: number) => void | Promise<void>;
131
133
  /** Looks up the server-configured max curation weight for a content
132
134
  * type, plus whether it's already been submitted for curation.
133
135
  * Forwarded to every <SnapsFeedCard/>. */
@@ -85,12 +85,13 @@ interface InlineCommentItemProps {
85
85
  /** When true, a heart button is shown on this comment so the curator
86
86
  * can request an on-chain upvote (1–3%). */
87
87
  isCurator?: boolean;
88
- /** Called when the curator submits a curation request. Weight is 1–3. */
89
- onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
88
+ /** Called when the curator submits a curation request. Weight is 1–3.
89
+ * `ownVoteWeight` is the curator's own vote weight on this comment
90
+ * (0–100), recorded alongside the request for review. */
91
+ onCurationRequest?: (author: string, permlink: string, weight: number, ownVoteWeight: number) => void | Promise<void>;
90
92
  /** Looks up the server-configured max curation weight for a content
91
93
  * 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
+ * Forwarded to this comment's vote slider and to every nested reply. */
94
95
  onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
95
96
  maxWeight: number;
96
97
  alreadySubmitted: boolean;
@@ -90,8 +90,10 @@ interface InlineCommentSectionProps {
90
90
  /** When true, a heart button is shown on each comment so the curator
91
91
  * can request an on-chain upvote (1–3%). */
92
92
  isCurator?: boolean;
93
- /** Called when the curator submits a curation request on a comment. */
94
- onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
93
+ /** Called when the curator submits a curation request on a comment.
94
+ * `ownVoteWeight` is the curator's own vote weight on this comment
95
+ * (0–100), recorded alongside the request for review. */
96
+ onCurationRequest?: (author: string, permlink: string, weight: number, ownVoteWeight: number) => void | Promise<void>;
95
97
  /** Looks up the server-configured max curation weight for a content
96
98
  * type, plus whether it's already been submitted for curation.
97
99
  * Forwarded to every <InlineCommentItem/>. */
@@ -72,8 +72,10 @@ export interface ProfileSnapsTabProps {
72
72
  /** When true, a heart button is shown on each snap card so the curator
73
73
  * can request an on-chain upvote. Forwarded to <SnapsFeedView/>. */
74
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>;
75
+ /** Called when the curator submits a curation request on a snap.
76
+ * `ownVoteWeight` is the curator's own vote weight on this snap
77
+ * (0–100), recorded alongside the request for review. */
78
+ onCurationRequest?: (author: string, permlink: string, weight: number, ownVoteWeight: number) => void | Promise<void>;
77
79
  /** Looks up the server-configured max curation weight for a content
78
80
  * type, plus whether it's already been submitted for curation.
79
81
  * Forwarded to <SnapsFeedView/>. */
@@ -118,12 +118,13 @@ export interface UserDetailProfileProps {
118
118
  * the curator can request an on-chain upvote. */
119
119
  isCurator?: boolean;
120
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>;
121
+ * `'post'` for the Posts/Blogs tab or `'snap'` for the Snaps tab.
122
+ * `ownVoteWeight` is the curator's own vote weight on this content
123
+ * (0–100), recorded alongside the request for review. */
124
+ onCurationRequest?: (author: string, permlink: string, weight: number, type: 'post' | 'snap', ownVoteWeight: number) => void | Promise<void>;
123
125
  /** Looks up the server-configured max curation weight for a content
124
126
  * 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
+ * Forwarded to every card's vote slider. */
127
128
  onFetchCurationStatus?: (author: string, permlink: string, type: 'post' | 'snap' | 'comment') => Promise<{
128
129
  maxWeight: number;
129
130
  alreadySubmitted: boolean;