hive-react-kit 0.10.8 → 0.10.9

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
  }
@@ -1404,6 +1419,10 @@
1404
1419
  border-top-left-radius: var(--radius-2xl);
1405
1420
  border-top-right-radius: var(--radius-2xl);
1406
1421
  }
1422
+ .rounded-t-xl {
1423
+ border-top-left-radius: var(--radius-xl);
1424
+ border-top-right-radius: var(--radius-xl);
1425
+ }
1407
1426
  .rounded-b-lg {
1408
1427
  border-bottom-right-radius: var(--radius-lg);
1409
1428
  border-bottom-left-radius: var(--radius-lg);
@@ -2375,6 +2394,9 @@
2375
2394
  .pb-1 {
2376
2395
  padding-bottom: calc(var(--spacing) * 1);
2377
2396
  }
2397
+ .pb-1\.5 {
2398
+ padding-bottom: calc(var(--spacing) * 1.5);
2399
+ }
2378
2400
  .pb-2 {
2379
2401
  padding-bottom: calc(var(--spacing) * 2);
2380
2402
  }
@@ -3674,16 +3696,36 @@
3674
3696
  opacity: 50%;
3675
3697
  }
3676
3698
  }
3699
+ .sm\:absolute {
3700
+ @media (width >= 40rem) {
3701
+ position: absolute;
3702
+ }
3703
+ }
3704
+ .sm\:inset-auto {
3705
+ @media (width >= 40rem) {
3706
+ inset: auto;
3707
+ }
3708
+ }
3677
3709
  .sm\:inset-x-auto {
3678
3710
  @media (width >= 40rem) {
3679
3711
  inset-inline: auto;
3680
3712
  }
3681
3713
  }
3714
+ .sm\:top-full {
3715
+ @media (width >= 40rem) {
3716
+ top: 100%;
3717
+ }
3718
+ }
3682
3719
  .sm\:-right-2 {
3683
3720
  @media (width >= 40rem) {
3684
3721
  right: calc(var(--spacing) * -2);
3685
3722
  }
3686
3723
  }
3724
+ .sm\:right-0 {
3725
+ @media (width >= 40rem) {
3726
+ right: calc(var(--spacing) * 0);
3727
+ }
3728
+ }
3687
3729
  .sm\:right-4 {
3688
3730
  @media (width >= 40rem) {
3689
3731
  right: calc(var(--spacing) * 4);
@@ -3880,6 +3922,11 @@
3880
3922
  height: auto;
3881
3923
  }
3882
3924
  }
3925
+ .sm\:max-h-\[60vh\] {
3926
+ @media (width >= 40rem) {
3927
+ max-height: 60vh;
3928
+ }
3929
+ }
3883
3930
  .sm\:w-3\.5 {
3884
3931
  @media (width >= 40rem) {
3885
3932
  width: calc(var(--spacing) * 3.5);
@@ -3945,11 +3992,26 @@
3945
3992
  width: calc(var(--spacing) * 40);
3946
3993
  }
3947
3994
  }
3995
+ .sm\:w-44 {
3996
+ @media (width >= 40rem) {
3997
+ width: calc(var(--spacing) * 44);
3998
+ }
3999
+ }
3948
4000
  .sm\:w-48 {
3949
4001
  @media (width >= 40rem) {
3950
4002
  width: calc(var(--spacing) * 48);
3951
4003
  }
3952
4004
  }
4005
+ .sm\:w-72 {
4006
+ @media (width >= 40rem) {
4007
+ width: calc(var(--spacing) * 72);
4008
+ }
4009
+ }
4010
+ .sm\:w-\[11rem\] {
4011
+ @media (width >= 40rem) {
4012
+ width: 11rem;
4013
+ }
4014
+ }
3953
4015
  .sm\:w-auto {
3954
4016
  @media (width >= 40rem) {
3955
4017
  width: auto;
@@ -4025,6 +4087,11 @@
4025
4087
  justify-content: flex-end;
4026
4088
  }
4027
4089
  }
4090
+ .sm\:gap-1 {
4091
+ @media (width >= 40rem) {
4092
+ gap: calc(var(--spacing) * 1);
4093
+ }
4094
+ }
4028
4095
  .sm\:gap-2 {
4029
4096
  @media (width >= 40rem) {
4030
4097
  gap: calc(var(--spacing) * 2);
@@ -4079,6 +4146,11 @@
4079
4146
  border-radius: var(--radius-2xl);
4080
4147
  }
4081
4148
  }
4149
+ .sm\:rounded-lg {
4150
+ @media (width >= 40rem) {
4151
+ border-radius: var(--radius-lg);
4152
+ }
4153
+ }
4082
4154
  .sm\:rounded-none {
4083
4155
  @media (width >= 40rem) {
4084
4156
  border-radius: 0;
@@ -4182,6 +4254,11 @@
4182
4254
  padding-inline: calc(var(--spacing) * 6);
4183
4255
  }
4184
4256
  }
4257
+ .sm\:py-1\.5 {
4258
+ @media (width >= 40rem) {
4259
+ padding-block: calc(var(--spacing) * 1.5);
4260
+ }
4261
+ }
4185
4262
  .sm\:py-2 {
4186
4263
  @media (width >= 40rem) {
4187
4264
  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;
@@ -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;
@@ -43,6 +43,10 @@ export interface PostActionButtonProps {
43
43
  allowLandscapeVideos?: boolean;
44
44
  /** Called when comment button is clicked (e.g. open comments). */
45
45
  onComments?: () => void;
46
+ /** Called when the Edit action is clicked. Pass only when the current
47
+ * user is the post's author — the kit renders the Edit entry-point
48
+ * iff this handler is provided. */
49
+ onEdit?: () => void;
46
50
  /** Called when reblog is clicked (when logged in). */
47
51
  onReblog?: () => void;
48
52
  /** Called when share is clicked. */
@@ -88,5 +92,5 @@ export interface PostActionButtonProps {
88
92
  * polls, community detail) where there isn't room for four icons. */
89
93
  actionsAsMenu?: boolean;
90
94
  }
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;
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;
92
96
  export default PostActionButton;
@@ -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;