hive-react-kit 0.10.8 → 0.10.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 CHANGED
@@ -348,6 +348,9 @@
348
348
  .top-0 {
349
349
  top: calc(var(--spacing) * 0);
350
350
  }
351
+ .top-0\.5 {
352
+ top: calc(var(--spacing) * 0.5);
353
+ }
351
354
  .top-1 {
352
355
  top: calc(var(--spacing) * 1);
353
356
  }
@@ -402,6 +405,9 @@
402
405
  .bottom-0 {
403
406
  bottom: calc(var(--spacing) * 0);
404
407
  }
408
+ .bottom-0\.5 {
409
+ bottom: calc(var(--spacing) * 0.5);
410
+ }
405
411
  .bottom-1\.5 {
406
412
  bottom: calc(var(--spacing) * 1.5);
407
413
  }
@@ -420,6 +426,9 @@
420
426
  .left-0 {
421
427
  left: calc(var(--spacing) * 0);
422
428
  }
429
+ .left-0\.5 {
430
+ left: calc(var(--spacing) * 0.5);
431
+ }
423
432
  .left-1 {
424
433
  left: calc(var(--spacing) * 1);
425
434
  }
@@ -832,6 +841,9 @@
832
841
  .max-h-\[70vh\] {
833
842
  max-height: 70vh;
834
843
  }
844
+ .max-h-\[75vh\] {
845
+ max-height: 75vh;
846
+ }
835
847
  .max-h-\[80vh\] {
836
848
  max-height: 80vh;
837
849
  }
@@ -1000,6 +1012,9 @@
1000
1012
  .w-72 {
1001
1013
  width: calc(var(--spacing) * 72);
1002
1014
  }
1015
+ .w-\[8\.5rem\] {
1016
+ width: 8.5rem;
1017
+ }
1003
1018
  .w-\[280px\] {
1004
1019
  width: 280px;
1005
1020
  }
@@ -1091,6 +1106,14 @@
1091
1106
  --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
1092
1107
  translate: var(--tw-translate-x) var(--tw-translate-y);
1093
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
+ }
1094
1117
  .-translate-y-1\/2 {
1095
1118
  --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
1096
1119
  translate: var(--tw-translate-x) var(--tw-translate-y);
@@ -1404,6 +1427,10 @@
1404
1427
  border-top-left-radius: var(--radius-2xl);
1405
1428
  border-top-right-radius: var(--radius-2xl);
1406
1429
  }
1430
+ .rounded-t-xl {
1431
+ border-top-left-radius: var(--radius-xl);
1432
+ border-top-right-radius: var(--radius-xl);
1433
+ }
1407
1434
  .rounded-b-lg {
1408
1435
  border-bottom-right-radius: var(--radius-lg);
1409
1436
  border-bottom-left-radius: var(--radius-lg);
@@ -1663,6 +1690,9 @@
1663
1690
  .bg-\[\#1f2429\] {
1664
1691
  background-color: #1f2429;
1665
1692
  }
1693
+ .bg-\[\#1f2429\]\/60 {
1694
+ background-color: color-mix(in oklab, #1f2429 60%, transparent);
1695
+ }
1666
1696
  .bg-\[\#2f353d\] {
1667
1697
  background-color: #2f353d;
1668
1698
  }
@@ -2375,6 +2405,9 @@
2375
2405
  .pb-1 {
2376
2406
  padding-bottom: calc(var(--spacing) * 1);
2377
2407
  }
2408
+ .pb-1\.5 {
2409
+ padding-bottom: calc(var(--spacing) * 1.5);
2410
+ }
2378
2411
  .pb-2 {
2379
2412
  padding-bottom: calc(var(--spacing) * 2);
2380
2413
  }
@@ -2549,6 +2582,9 @@
2549
2582
  .text-\[\#6f7780\] {
2550
2583
  color: #6f7780;
2551
2584
  }
2585
+ .text-\[\#7c8694\] {
2586
+ color: #7c8694;
2587
+ }
2552
2588
  .text-\[\#9ca3b0\] {
2553
2589
  color: #9ca3b0;
2554
2590
  }
@@ -3345,6 +3381,16 @@
3345
3381
  }
3346
3382
  }
3347
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
+ }
3348
3394
  .hover\:bg-white\/20 {
3349
3395
  &:hover {
3350
3396
  @media (hover: hover) {
@@ -3674,16 +3720,36 @@
3674
3720
  opacity: 50%;
3675
3721
  }
3676
3722
  }
3723
+ .sm\:absolute {
3724
+ @media (width >= 40rem) {
3725
+ position: absolute;
3726
+ }
3727
+ }
3728
+ .sm\:inset-auto {
3729
+ @media (width >= 40rem) {
3730
+ inset: auto;
3731
+ }
3732
+ }
3677
3733
  .sm\:inset-x-auto {
3678
3734
  @media (width >= 40rem) {
3679
3735
  inset-inline: auto;
3680
3736
  }
3681
3737
  }
3738
+ .sm\:top-full {
3739
+ @media (width >= 40rem) {
3740
+ top: 100%;
3741
+ }
3742
+ }
3682
3743
  .sm\:-right-2 {
3683
3744
  @media (width >= 40rem) {
3684
3745
  right: calc(var(--spacing) * -2);
3685
3746
  }
3686
3747
  }
3748
+ .sm\:right-0 {
3749
+ @media (width >= 40rem) {
3750
+ right: calc(var(--spacing) * 0);
3751
+ }
3752
+ }
3687
3753
  .sm\:right-4 {
3688
3754
  @media (width >= 40rem) {
3689
3755
  right: calc(var(--spacing) * 4);
@@ -3880,6 +3946,11 @@
3880
3946
  height: auto;
3881
3947
  }
3882
3948
  }
3949
+ .sm\:max-h-\[60vh\] {
3950
+ @media (width >= 40rem) {
3951
+ max-height: 60vh;
3952
+ }
3953
+ }
3883
3954
  .sm\:w-3\.5 {
3884
3955
  @media (width >= 40rem) {
3885
3956
  width: calc(var(--spacing) * 3.5);
@@ -3945,11 +4016,26 @@
3945
4016
  width: calc(var(--spacing) * 40);
3946
4017
  }
3947
4018
  }
4019
+ .sm\:w-44 {
4020
+ @media (width >= 40rem) {
4021
+ width: calc(var(--spacing) * 44);
4022
+ }
4023
+ }
3948
4024
  .sm\:w-48 {
3949
4025
  @media (width >= 40rem) {
3950
4026
  width: calc(var(--spacing) * 48);
3951
4027
  }
3952
4028
  }
4029
+ .sm\:w-72 {
4030
+ @media (width >= 40rem) {
4031
+ width: calc(var(--spacing) * 72);
4032
+ }
4033
+ }
4034
+ .sm\:w-\[11rem\] {
4035
+ @media (width >= 40rem) {
4036
+ width: 11rem;
4037
+ }
4038
+ }
3953
4039
  .sm\:w-auto {
3954
4040
  @media (width >= 40rem) {
3955
4041
  width: auto;
@@ -4025,6 +4111,11 @@
4025
4111
  justify-content: flex-end;
4026
4112
  }
4027
4113
  }
4114
+ .sm\:gap-1 {
4115
+ @media (width >= 40rem) {
4116
+ gap: calc(var(--spacing) * 1);
4117
+ }
4118
+ }
4028
4119
  .sm\:gap-2 {
4029
4120
  @media (width >= 40rem) {
4030
4121
  gap: calc(var(--spacing) * 2);
@@ -4079,6 +4170,11 @@
4079
4170
  border-radius: var(--radius-2xl);
4080
4171
  }
4081
4172
  }
4173
+ .sm\:rounded-lg {
4174
+ @media (width >= 40rem) {
4175
+ border-radius: var(--radius-lg);
4176
+ }
4177
+ }
4082
4178
  .sm\:rounded-none {
4083
4179
  @media (width >= 40rem) {
4084
4180
  border-radius: 0;
@@ -4182,6 +4278,11 @@
4182
4278
  padding-inline: calc(var(--spacing) * 6);
4183
4279
  }
4184
4280
  }
4281
+ .sm\:py-1\.5 {
4282
+ @media (width >= 40rem) {
4283
+ padding-block: calc(var(--spacing) * 1.5);
4284
+ }
4285
+ }
4185
4286
  .sm\:py-2 {
4186
4287
  @media (width >= 40rem) {
4187
4288
  padding-block: calc(var(--spacing) * 2);
@@ -1,11 +1,9 @@
1
1
  import React from "react";
2
- import { ActivityListItem, DirectionFilter, GeneralFilter, RewardFilter } from "@/types/activityList";
2
+ import { ActivityListItem, DirectionFilter, OperationFilter } from "@/types/activityList";
3
3
  interface ActivityListProps {
4
4
  username: string;
5
5
  directionFilter?: DirectionFilter;
6
- generalFilter?: GeneralFilter;
7
- rewardFilter?: RewardFilter;
8
- searchTerm?: string;
6
+ operationFilter?: OperationFilter;
9
7
  limit?: number;
10
8
  className?: string;
11
9
  onClickPermlink?: (author: string, permlink: string) => void;
@@ -83,9 +83,35 @@ export interface HiveDetailPostProps {
83
83
  onShare?: () => void;
84
84
  onTip?: () => void;
85
85
  onReport?: () => void;
86
+ /** Called when the post author taps Edit on their own post. Only
87
+ * rendered as an action when `currentUser === post.author`. The
88
+ * payload contains everything the consumer needs to open an edit
89
+ * modal without re-fetching: original body, title, parent refs, and
90
+ * json_metadata. */
91
+ onEdit?: (data: {
92
+ author: string;
93
+ permlink: string;
94
+ body: string;
95
+ title: string;
96
+ parent_author: string;
97
+ parent_permlink: string;
98
+ json_metadata: string;
99
+ }) => void;
86
100
  onShareComment?: (author: string, permlink: string) => void;
87
101
  onTipComment?: (author: string, permlink: string) => void;
88
102
  onReportComment?: (author: string, permlink: string) => void;
103
+ /** Called when the comment author taps Edit on their own comment. Only
104
+ * rendered as an action on comments whose author matches `currentUser`.
105
+ * Includes the original body, parent refs, and json_metadata so the
106
+ * consumer can open an edit modal without re-fetching. */
107
+ onEditComment?: (data: {
108
+ author: string;
109
+ permlink: string;
110
+ body: string;
111
+ parent_author: string;
112
+ parent_permlink: string;
113
+ json_metadata: string;
114
+ }) => void;
89
115
  /**
90
116
  * Called when the user submits a poll vote.
91
117
  * @param author - post author
@@ -119,5 +145,5 @@ export interface HiveDetailPostProps {
119
145
  /** Called when user clicks "View parent post" — navigate to the parent post. */
120
146
  onNavigateToPost?: (author: string, permlink: string) => void;
121
147
  }
122
- export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, onShareComment, onTipComment, onReportComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, backgroundColor, onBack, onUserClick, onNavigateToPost, onVotePoll, showVoteButton, processBody, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, renderOptions, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
148
+ 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, onVotePoll, showVoteButton, processBody, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, renderOptions, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
123
149
  export default HiveDetailPost;
@@ -0,0 +1,22 @@
1
+ export interface PollVoteWidgetProps {
2
+ author: string;
3
+ permlink: string;
4
+ /** Logged-in user. When null/undefined the widget renders results
5
+ * only (no vote UI). */
6
+ currentUser?: string;
7
+ /** Consumer broadcasts the vote (custom_json id=`polls`). Return
8
+ * `false` to indicate cancellation so the widget keeps the
9
+ * selection. */
10
+ onVotePoll?: (author: string, permlink: string, choiceNums: number[]) => void | boolean | Promise<void | boolean>;
11
+ /** Parsed `json_metadata` from the post — used as a fallback for the
12
+ * question/choices when the polls API hasn't indexed the poll yet. */
13
+ parsedMetadata?: {
14
+ question?: string;
15
+ choices?: string[];
16
+ end_time?: number;
17
+ max_choices_voted?: number;
18
+ allow_vote_changes?: boolean;
19
+ } | null;
20
+ }
21
+ export declare function PollVoteWidget({ author, permlink, currentUser, onVotePoll, parsedMetadata, }: PollVoteWidgetProps): import("react/jsx-runtime").JSX.Element;
22
+ export default PollVoteWidget;
@@ -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,4 +1,7 @@
1
1
  export interface MoreActionsMenuProps {
2
+ /** Show the Edit item (rendered first, gated by the caller to the
3
+ * author themselves). */
4
+ onEdit?: () => void;
2
5
  /** Show the Reblog item. */
3
6
  onReblog?: () => void;
4
7
  /** Show the Share item. */
@@ -13,5 +16,5 @@ export interface MoreActionsMenuProps {
13
16
  /** aria-label for the trigger. */
14
17
  ariaLabel?: string;
15
18
  }
16
- export declare function MoreActionsMenu({ onReblog, onShare, onTip, onReport, buttonClassName, ariaLabel, }: MoreActionsMenuProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function MoreActionsMenu({ onEdit, onReblog, onShare, onTip, onReport, buttonClassName, ariaLabel, }: MoreActionsMenuProps): import("react/jsx-runtime").JSX.Element;
17
20
  export default MoreActionsMenu;
@@ -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. */
@@ -43,6 +51,10 @@ export interface PostActionButtonProps {
43
51
  allowLandscapeVideos?: boolean;
44
52
  /** Called when comment button is clicked (e.g. open comments). */
45
53
  onComments?: () => void;
54
+ /** Called when the Edit action is clicked. Pass only when the current
55
+ * user is the post's author — the kit renders the Edit entry-point
56
+ * iff this handler is provided. */
57
+ onEdit?: () => void;
46
58
  /** Called when reblog is clicked (when logged in). */
47
59
  onReblog?: () => void;
48
60
  /** Called when share is clicked. */
@@ -88,5 +100,5 @@ export interface PostActionButtonProps {
88
100
  * polls, community detail) where there isn't room for four icons. */
89
101
  actionsAsMenu?: boolean;
90
102
  }
91
- export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, initialVotes, initialCommentsCount, onUpvote, onSubmitComment, onComments, 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;
92
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;
@@ -38,6 +38,22 @@ export interface SnapsFeedCardProps {
38
38
  * use: navigate to the post detail / comments view. Mirrors hSnaps. */
39
39
  onClickCommentCount?: (author: string, permlink: string) => void;
40
40
  onReportPost?: (author: string, permlink: string) => void;
41
+ /** Called when the snap's author taps Edit on the action-bar kebab.
42
+ * The kit only renders the entry-point when `currentUser` matches
43
+ * `post.author`. Payload mirrors HiveDetailPost.onEdit. */
44
+ onEditSnap?: (data: {
45
+ author: string;
46
+ permlink: string;
47
+ body: string;
48
+ title: string;
49
+ parent_author: string;
50
+ parent_permlink: string;
51
+ json_metadata: string;
52
+ }) => void;
53
+ /** Called when the viewer submits a vote on a poll embedded in this
54
+ * snap. Pass the same handler used for poll posts on the detail
55
+ * page — consumers broadcast a `custom_json` op (id: "polls"). */
56
+ onVotePoll?: (author: string, permlink: string, choiceNums: number[]) => void | boolean | Promise<void | boolean>;
41
57
  onUserClick?: (username: string) => void;
42
58
  onPostClick?: (author: string, permlink: string, title?: string) => void;
43
59
  onTagClick?: (tag: string) => void;
@@ -56,6 +56,19 @@ export interface SnapsFeedViewProps {
56
56
  /** Comment-count click (per card) — typical use: open post detail. */
57
57
  onClickCommentCount?: (author: string, permlink: string) => void;
58
58
  onReportPost?: (author: string, permlink: string) => void;
59
+ /** Forwarded to every <SnapsFeedCard/> — Edit entry on the action-bar
60
+ * kebab, gated to the snap's author. */
61
+ onEditSnap?: (data: {
62
+ author: string;
63
+ permlink: string;
64
+ body: string;
65
+ title: string;
66
+ parent_author: string;
67
+ parent_permlink: string;
68
+ json_metadata: string;
69
+ }) => void;
70
+ /** Cast a poll vote from inside a snap card (custom_json id: "polls"). */
71
+ onVotePoll?: (author: string, permlink: string, choiceNums: number[]) => void | boolean | Promise<void | boolean>;
59
72
  onUserClick?: (username: string) => void;
60
73
  onPostClick?: (author: string, permlink: string, title?: string) => void;
61
74
  ecencyToken?: string;
@@ -87,5 +100,5 @@ export interface SnapsFeedViewProps {
87
100
  * headers stay visible via `sticky top-0`. Mobile is unaffected. */
88
101
  pageScroll?: boolean;
89
102
  }
90
- export declare function SnapsFeedView({ feeds, labels, avatars, defaultPrimary, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onTip, onSharePost, onCommentClick, onClickCommentIcon, onClickCommentCount, onReportPost, onUserClick, onPostClick, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, defaultReward, toolbar, footer, renderHeaderActions, actionsAsMenu, pageScroll, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
103
+ export declare function SnapsFeedView({ feeds, labels, avatars, defaultPrimary, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onTip, onSharePost, onCommentClick, onClickCommentIcon, onClickCommentCount, onReportPost, onEditSnap, onVotePoll, onUserClick, onPostClick, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, defaultReward, toolbar, footer, renderHeaderActions, actionsAsMenu, pageScroll, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
91
104
  export default SnapsFeedView;
@@ -24,6 +24,16 @@ 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
+ /** Called when the author of this comment taps Edit. Each row gates
28
+ * the entry-point internally to `comment.author === currentUser`. */
29
+ onEditComment?: (data: {
30
+ author: string;
31
+ permlink: string;
32
+ body: string;
33
+ parent_author: string;
34
+ parent_permlink: string;
35
+ json_metadata: string;
36
+ }) => void;
27
37
  /** Called when an intra-body link points at a Hive post (peakd/hive.blog/ecency/inleo). */
28
38
  onNavigateToPost?: (author: string, permlink: string) => void;
29
39
  /** Called when an intra-body link points at a Hive user profile. */
@@ -49,5 +59,5 @@ interface InlineCommentItemProps {
49
59
  ipfsGateway?: string;
50
60
  };
51
61
  }
52
- export default function InlineCommentItem({ comment, allComments, onReply, onCancelReply, onCommentSubmit, activeReplyKey, currentUser, token, depth, onVotedRefresh, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, onShareComment, onTipComment, onReportComment, onNavigateToPost, onUserClick, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, renderOptions, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
62
+ 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, renderOptions, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
53
63
  export {};
@@ -50,10 +50,22 @@ interface InlineCommentSectionProps {
50
50
  onShareComment?: (author: string, permlink: string) => void;
51
51
  onTipComment?: (author: string, permlink: string) => void;
52
52
  onReportComment?: (author: string, permlink: string) => void;
53
+ /** Called when the comment author taps Edit on one of their own
54
+ * comments. Each comment row gates the entry-point internally to
55
+ * `comment.author === currentUser`. Payload mirrors HiveDetailPost
56
+ * `onEditComment` — includes body / parent refs / json_metadata. */
57
+ onEditComment?: (data: {
58
+ author: string;
59
+ permlink: string;
60
+ body: string;
61
+ parent_author: string;
62
+ parent_permlink: string;
63
+ json_metadata: string;
64
+ }) => void;
53
65
  /** Intercept intra-body Hive post links in comment bodies. */
54
66
  onNavigateToPost?: (author: string, permlink: string) => void;
55
67
  /** Intercept intra-body Hive profile links in comment bodies. */
56
68
  onUserClick?: (username: string) => void;
57
69
  }
58
- export default function InlineCommentSection({ author, permlink, currentUser, token, onSubmitComment, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, onShareComment, onTipComment, onReportComment, onNavigateToPost, onUserClick, showVoteButton, alreadyVoted, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, renderOptions, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
70
+ 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, renderOptions, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
59
71
  export {};
@@ -30,6 +30,19 @@ export interface ProfileSnapsTabProps {
30
30
  /** Comment-count click (per card) — typical use: open post detail. */
31
31
  onClickCommentCount?: (author: string, permlink: string) => void;
32
32
  onReportPost?: (author: string, permlink: string) => void;
33
+ /** Edit entry-point inside each snap's 3-dot menu — gated to the
34
+ * snap's author. Forwarded directly to <SnapsFeedView/>. */
35
+ onEditSnap?: (data: {
36
+ author: string;
37
+ permlink: string;
38
+ body: string;
39
+ title: string;
40
+ parent_author: string;
41
+ parent_permlink: string;
42
+ json_metadata: string;
43
+ }) => void;
44
+ /** Cast a poll vote from inside a snap card. */
45
+ onVotePoll?: (author: string, permlink: string, choiceNums: number[]) => void | boolean | Promise<void | boolean>;
33
46
  onUserClick?: (username: string) => void;
34
47
  onPostClick?: (author: string, permlink: string, title?: string) => void;
35
48
  ecencyToken?: string;
@@ -13,6 +13,17 @@ export interface UserDetailProfileProps {
13
13
  * Example: `["followers", "following", "blogs", "wallet"]` — only these 4 tabs, in this order.
14
14
  */
15
15
  tabShown?: TabType[];
16
+ /**
17
+ * Controlled active tab. When provided, the component renders this tab
18
+ * and reports user-driven tab changes via `onActiveTabChange`. Pair the
19
+ * two to drive tab selection from a parent store (e.g. persist per user
20
+ * across navigation). When omitted, the component manages tab state
21
+ * internally with its own per-username cache.
22
+ */
23
+ activeTab?: TabType;
24
+ /** Called whenever the user clicks a different tab. Fires whether or
25
+ * not `activeTab` is supplied. */
26
+ onActiveTabChange?: (tab: TabType) => void;
16
27
  /** Ecency image hosting token — enables image and video thumbnail upload in comment composer */
17
28
  ecencyToken?: string;
18
29
  /** 3Speak API key — enables audio and video upload in comment composer */
@@ -75,6 +86,17 @@ export interface UserDetailProfileProps {
75
86
  * vote bars but is read-only.
76
87
  */
77
88
  onVotePoll?: (author: string, permlink: string, choiceNums: number[]) => void | boolean | Promise<void | boolean>;
89
+ /** Forwarded to each snap card on the Snaps tab — opens the
90
+ * consumer's edit modal when the snap's author taps Edit. */
91
+ onEditSnap?: (data: {
92
+ author: string;
93
+ permlink: string;
94
+ body: string;
95
+ title: string;
96
+ parent_author: string;
97
+ parent_permlink: string;
98
+ json_metadata: string;
99
+ }) => void;
78
100
  onUserClick?: (username: string) => void;
79
101
  onPostClick?: (author: string, permlink: string, title: string) => void;
80
102
  onSnapClick?: (author: string, permlink: string) => void;