hive-react-kit 0.10.9 → 0.11.10
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 +24 -0
- package/dist/components/RewardsModal.d.ts +30 -0
- package/dist/components/actionButtons/PostActionButton.d.ts +10 -2
- package/dist/components/composer/ParentPostComposer.d.ts +19 -0
- package/dist/index.cjs.js +189 -189
- package/dist/index.esm.js +28520 -28124
- package/package.json +1 -1
package/dist/build.css
CHANGED
|
@@ -1106,6 +1106,14 @@
|
|
|
1106
1106
|
--tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
|
|
1107
1107
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1108
1108
|
}
|
|
1109
|
+
.translate-x-0\.5 {
|
|
1110
|
+
--tw-translate-x: calc(var(--spacing) * 0.5);
|
|
1111
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1112
|
+
}
|
|
1113
|
+
.translate-x-4 {
|
|
1114
|
+
--tw-translate-x: calc(var(--spacing) * 4);
|
|
1115
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1116
|
+
}
|
|
1109
1117
|
.-translate-y-1\/2 {
|
|
1110
1118
|
--tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
|
|
1111
1119
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -1682,6 +1690,9 @@
|
|
|
1682
1690
|
.bg-\[\#1f2429\] {
|
|
1683
1691
|
background-color: #1f2429;
|
|
1684
1692
|
}
|
|
1693
|
+
.bg-\[\#1f2429\]\/60 {
|
|
1694
|
+
background-color: color-mix(in oklab, #1f2429 60%, transparent);
|
|
1695
|
+
}
|
|
1685
1696
|
.bg-\[\#2f353d\] {
|
|
1686
1697
|
background-color: #2f353d;
|
|
1687
1698
|
}
|
|
@@ -2571,6 +2582,9 @@
|
|
|
2571
2582
|
.text-\[\#6f7780\] {
|
|
2572
2583
|
color: #6f7780;
|
|
2573
2584
|
}
|
|
2585
|
+
.text-\[\#7c8694\] {
|
|
2586
|
+
color: #7c8694;
|
|
2587
|
+
}
|
|
2574
2588
|
.text-\[\#9ca3b0\] {
|
|
2575
2589
|
color: #9ca3b0;
|
|
2576
2590
|
}
|
|
@@ -3367,6 +3381,16 @@
|
|
|
3367
3381
|
}
|
|
3368
3382
|
}
|
|
3369
3383
|
}
|
|
3384
|
+
.hover\:bg-white\/5 {
|
|
3385
|
+
&:hover {
|
|
3386
|
+
@media (hover: hover) {
|
|
3387
|
+
background-color: color-mix(in srgb, #fff 5%, transparent);
|
|
3388
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
3389
|
+
background-color: color-mix(in oklab, var(--color-white) 5%, transparent);
|
|
3390
|
+
}
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3370
3394
|
.hover\:bg-white\/20 {
|
|
3371
3395
|
&:hover {
|
|
3372
3396
|
@media (hover: hover) {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface RewardsModalBeneficiary {
|
|
2
|
+
account: string;
|
|
3
|
+
/** Hive `weight` field: 1 unit = 0.01% (10000 = 100%). */
|
|
4
|
+
weight: number;
|
|
5
|
+
}
|
|
6
|
+
export interface RewardsModalPayoutDetails {
|
|
7
|
+
/** Sum of pending payout in HBD-equivalent units. */
|
|
8
|
+
pendingValue: number;
|
|
9
|
+
authorValue: number;
|
|
10
|
+
curatorValue: number;
|
|
11
|
+
/** Final/total realised payout once `isPaidout` is true. */
|
|
12
|
+
totalValue: number;
|
|
13
|
+
isPaidout: boolean;
|
|
14
|
+
/** ISO timestamp when payout will occur (only meaningful when not yet paid). */
|
|
15
|
+
payoutAt?: string;
|
|
16
|
+
/** Hive `percent_hbd` field: 10000 = 50/50 HBD/HP, 0 = 100% Powered Up. */
|
|
17
|
+
percentHbd: number;
|
|
18
|
+
beneficiaries: RewardsModalBeneficiary[];
|
|
19
|
+
}
|
|
20
|
+
interface RewardsModalProps {
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
details: RewardsModalPayoutDetails;
|
|
23
|
+
/** Optional avatar URL builder for beneficiary rows. Defaults to
|
|
24
|
+
* `https://images.hive.blog/u/<account>/avatar`. */
|
|
25
|
+
avatarUrlFn?: (account: string) => string;
|
|
26
|
+
/** URL for the small Hive icon shown next to payout totals. */
|
|
27
|
+
hiveIconUrl?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function RewardsModal({ onClose, details, avatarUrlFn, hiveIconUrl }: RewardsModalProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export default RewardsModal;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RewardsModalPayoutDetails } from "@/components/RewardsModal";
|
|
1
2
|
import { ActiveVote } from "@/types/video";
|
|
2
3
|
export interface PostActionButtonProps {
|
|
3
4
|
author: string;
|
|
@@ -8,8 +9,15 @@ export interface PostActionButtonProps {
|
|
|
8
9
|
hiveValue?: string;
|
|
9
10
|
/** Optional: URL to a Hive logo icon shown next to the payout value */
|
|
10
11
|
hiveIconUrl?: string;
|
|
11
|
-
/** Optional: Tooltip text shown on hover over the payout value (e.g. payout breakdown)
|
|
12
|
+
/** Optional: Tooltip text shown on hover over the payout value (e.g. payout breakdown).
|
|
13
|
+
* Deprecated path used for compatibility — when `payoutDetails` is
|
|
14
|
+
* also provided the value pill becomes a tap target opening the
|
|
15
|
+
* full `RewardsModal` instead of a hover tooltip. */
|
|
12
16
|
payoutTooltip?: string;
|
|
17
|
+
/** Structured payout breakdown — when supplied, tapping the payout
|
|
18
|
+
* chip opens a `RewardsModal` showing pending/realised amounts,
|
|
19
|
+
* HBD↔HP split, time to payout, and a beneficiary list. */
|
|
20
|
+
payoutDetails?: RewardsModalPayoutDetails;
|
|
13
21
|
/** Optional: Pre-loaded active votes array from the Post object. Skips the API call when provided. */
|
|
14
22
|
initialVotes?: ActiveVote[];
|
|
15
23
|
/** Optional: Pre-loaded comments count from the Post object (item.children). Skips the API call when provided. */
|
|
@@ -92,5 +100,5 @@ export interface PostActionButtonProps {
|
|
|
92
100
|
* polls, community detail) where there isn't room for four icons. */
|
|
93
101
|
actionsAsMenu?: boolean;
|
|
94
102
|
}
|
|
95
|
-
export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, initialVotes, initialCommentsCount, onUpvote, onSubmitComment, onComments, onEdit, onReblog, onShare, onTip, onReport, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, disableCommentsModal, onClickCommentIcon, onClickCommentCount, hasCommented, myReplyKey, showVoteButton, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, actionsAsMenu, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, payoutDetails, initialVotes, initialCommentsCount, onUpvote, onSubmitComment, onComments, onEdit, onReblog, onShare, onTip, onReport, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, disableCommentsModal, onClickCommentIcon, onClickCommentCount, hasCommented, myReplyKey, showVoteButton, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, actionsAsMenu, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
96
104
|
export default PostActionButton;
|
|
@@ -27,6 +27,12 @@ export interface ParentPostSubmitPayload {
|
|
|
27
27
|
videoEmbedUrl: string | null;
|
|
28
28
|
videoUploadUrl: string | null;
|
|
29
29
|
videoAspectRatio: string | null;
|
|
30
|
+
/** True when the consumer enabled the reblog toggle AND the user
|
|
31
|
+
* left it on — host should fire a second `reblog` custom_json with
|
|
32
|
+
* `(author=currentUser, permlink=<new post permlink>)` after the
|
|
33
|
+
* post broadcast succeeds. Only meaningful when the post was sent
|
|
34
|
+
* to a community (`reblogToggle` is auto-hidden otherwise). */
|
|
35
|
+
reblog: boolean;
|
|
30
36
|
/**
|
|
31
37
|
* Full 3Speak upload metadata when the user attached a video — populated
|
|
32
38
|
* by the kit's `<VideoUploader>` after a successful TUS upload. Consumers
|
|
@@ -142,6 +148,19 @@ export interface ParentPostComposerProps {
|
|
|
142
148
|
* consumer owns the state.
|
|
143
149
|
*/
|
|
144
150
|
communitySlot?: React.ReactNode;
|
|
151
|
+
/** When true, render an inline "Reblog after publish" toggle next to
|
|
152
|
+
* the community pill. Typical use: host app flips this on when a
|
|
153
|
+
* community is selected, so users can also reblog the post into
|
|
154
|
+
* their own feed after the parent broadcast succeeds. The toggle
|
|
155
|
+
* state is emitted via `ParentPostSubmitPayload.reblog`; the host
|
|
156
|
+
* is responsible for the second broadcast. */
|
|
157
|
+
reblogToggle?: boolean;
|
|
158
|
+
/** Initial state of the reblog toggle when `reblogToggle` is shown.
|
|
159
|
+
* Defaults to `true` to match the screenshot UX (toggle on by
|
|
160
|
+
* default whenever it's offered). */
|
|
161
|
+
reblogToggleDefault?: boolean;
|
|
162
|
+
/** Label rendered next to the toggle. Defaults to "Reblog". */
|
|
163
|
+
reblogToggleLabel?: string;
|
|
145
164
|
}
|
|
146
165
|
declare const ParentPostComposer: React.FC<ParentPostComposerProps>;
|
|
147
166
|
export default ParentPostComposer;
|