hive-react-kit 0.10.7 → 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
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
2
2
  @layer properties;
3
3
  @layer theme, base, components, utilities;
4
4
  @layer theme {
@@ -336,12 +336,6 @@
336
336
  .inset-y-0 {
337
337
  inset-block: calc(var(--spacing) * 0);
338
338
  }
339
- .start {
340
- inset-inline-start: var(--spacing);
341
- }
342
- .end {
343
- inset-inline-end: var(--spacing);
344
- }
345
339
  .-top-1 {
346
340
  top: calc(var(--spacing) * -1);
347
341
  }
@@ -354,6 +348,9 @@
354
348
  .top-0 {
355
349
  top: calc(var(--spacing) * 0);
356
350
  }
351
+ .top-0\.5 {
352
+ top: calc(var(--spacing) * 0.5);
353
+ }
357
354
  .top-1 {
358
355
  top: calc(var(--spacing) * 1);
359
356
  }
@@ -408,6 +405,9 @@
408
405
  .bottom-0 {
409
406
  bottom: calc(var(--spacing) * 0);
410
407
  }
408
+ .bottom-0\.5 {
409
+ bottom: calc(var(--spacing) * 0.5);
410
+ }
411
411
  .bottom-1\.5 {
412
412
  bottom: calc(var(--spacing) * 1.5);
413
413
  }
@@ -426,6 +426,9 @@
426
426
  .left-0 {
427
427
  left: calc(var(--spacing) * 0);
428
428
  }
429
+ .left-0\.5 {
430
+ left: calc(var(--spacing) * 0.5);
431
+ }
429
432
  .left-1 {
430
433
  left: calc(var(--spacing) * 1);
431
434
  }
@@ -666,6 +669,13 @@
666
669
  .ml-auto {
667
670
  margin-left: auto;
668
671
  }
672
+ .scrollbar-hide {
673
+ -ms-overflow-style: none;
674
+ scrollbar-width: none;
675
+ &::-webkit-scrollbar {
676
+ display: none;
677
+ }
678
+ }
669
679
  .line-clamp-2 {
670
680
  overflow: hidden;
671
681
  display: -webkit-box;
@@ -678,13 +688,6 @@
678
688
  -webkit-box-orient: vertical;
679
689
  -webkit-line-clamp: 6;
680
690
  }
681
- .scrollbar-hide {
682
- -ms-overflow-style: none;
683
- scrollbar-width: none;
684
- &::-webkit-scrollbar {
685
- display: none;
686
- }
687
- }
688
691
  .block {
689
692
  display: block;
690
693
  }
@@ -838,6 +841,9 @@
838
841
  .max-h-\[70vh\] {
839
842
  max-height: 70vh;
840
843
  }
844
+ .max-h-\[75vh\] {
845
+ max-height: 75vh;
846
+ }
841
847
  .max-h-\[80vh\] {
842
848
  max-height: 80vh;
843
849
  }
@@ -1006,6 +1012,9 @@
1006
1012
  .w-72 {
1007
1013
  width: calc(var(--spacing) * 72);
1008
1014
  }
1015
+ .w-\[8\.5rem\] {
1016
+ width: 8.5rem;
1017
+ }
1009
1018
  .w-\[280px\] {
1010
1019
  width: 280px;
1011
1020
  }
@@ -1410,6 +1419,10 @@
1410
1419
  border-top-left-radius: var(--radius-2xl);
1411
1420
  border-top-right-radius: var(--radius-2xl);
1412
1421
  }
1422
+ .rounded-t-xl {
1423
+ border-top-left-radius: var(--radius-xl);
1424
+ border-top-right-radius: var(--radius-xl);
1425
+ }
1413
1426
  .rounded-b-lg {
1414
1427
  border-bottom-right-radius: var(--radius-lg);
1415
1428
  border-bottom-left-radius: var(--radius-lg);
@@ -2381,6 +2394,9 @@
2381
2394
  .pb-1 {
2382
2395
  padding-bottom: calc(var(--spacing) * 1);
2383
2396
  }
2397
+ .pb-1\.5 {
2398
+ padding-bottom: calc(var(--spacing) * 1.5);
2399
+ }
2384
2400
  .pb-2 {
2385
2401
  padding-bottom: calc(var(--spacing) * 2);
2386
2402
  }
@@ -3680,16 +3696,36 @@
3680
3696
  opacity: 50%;
3681
3697
  }
3682
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
+ }
3683
3709
  .sm\:inset-x-auto {
3684
3710
  @media (width >= 40rem) {
3685
3711
  inset-inline: auto;
3686
3712
  }
3687
3713
  }
3714
+ .sm\:top-full {
3715
+ @media (width >= 40rem) {
3716
+ top: 100%;
3717
+ }
3718
+ }
3688
3719
  .sm\:-right-2 {
3689
3720
  @media (width >= 40rem) {
3690
3721
  right: calc(var(--spacing) * -2);
3691
3722
  }
3692
3723
  }
3724
+ .sm\:right-0 {
3725
+ @media (width >= 40rem) {
3726
+ right: calc(var(--spacing) * 0);
3727
+ }
3728
+ }
3693
3729
  .sm\:right-4 {
3694
3730
  @media (width >= 40rem) {
3695
3731
  right: calc(var(--spacing) * 4);
@@ -3886,6 +3922,11 @@
3886
3922
  height: auto;
3887
3923
  }
3888
3924
  }
3925
+ .sm\:max-h-\[60vh\] {
3926
+ @media (width >= 40rem) {
3927
+ max-height: 60vh;
3928
+ }
3929
+ }
3889
3930
  .sm\:w-3\.5 {
3890
3931
  @media (width >= 40rem) {
3891
3932
  width: calc(var(--spacing) * 3.5);
@@ -3951,11 +3992,26 @@
3951
3992
  width: calc(var(--spacing) * 40);
3952
3993
  }
3953
3994
  }
3995
+ .sm\:w-44 {
3996
+ @media (width >= 40rem) {
3997
+ width: calc(var(--spacing) * 44);
3998
+ }
3999
+ }
3954
4000
  .sm\:w-48 {
3955
4001
  @media (width >= 40rem) {
3956
4002
  width: calc(var(--spacing) * 48);
3957
4003
  }
3958
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
+ }
3959
4015
  .sm\:w-auto {
3960
4016
  @media (width >= 40rem) {
3961
4017
  width: auto;
@@ -4031,6 +4087,11 @@
4031
4087
  justify-content: flex-end;
4032
4088
  }
4033
4089
  }
4090
+ .sm\:gap-1 {
4091
+ @media (width >= 40rem) {
4092
+ gap: calc(var(--spacing) * 1);
4093
+ }
4094
+ }
4034
4095
  .sm\:gap-2 {
4035
4096
  @media (width >= 40rem) {
4036
4097
  gap: calc(var(--spacing) * 2);
@@ -4085,6 +4146,11 @@
4085
4146
  border-radius: var(--radius-2xl);
4086
4147
  }
4087
4148
  }
4149
+ .sm\:rounded-lg {
4150
+ @media (width >= 40rem) {
4151
+ border-radius: var(--radius-lg);
4152
+ }
4153
+ }
4088
4154
  .sm\:rounded-none {
4089
4155
  @media (width >= 40rem) {
4090
4156
  border-radius: 0;
@@ -4188,6 +4254,11 @@
4188
4254
  padding-inline: calc(var(--spacing) * 6);
4189
4255
  }
4190
4256
  }
4257
+ .sm\:py-1\.5 {
4258
+ @media (width >= 40rem) {
4259
+ padding-block: calc(var(--spacing) * 1.5);
4260
+ }
4261
+ }
4191
4262
  .sm\:py-2 {
4192
4263
  @media (width >= 40rem) {
4193
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;
@@ -135,6 +135,13 @@ export interface ParentPostComposerProps {
135
135
  walletApprovalLabel?: string;
136
136
  /** When true, the composer renders a blinking "approve in wallet" banner. */
137
137
  awaitingWalletApproval?: boolean;
138
+ /**
139
+ * Optional content rendered at the very top of the composer body, above the
140
+ * title input. Use this to plug in a community picker or any other
141
+ * post-routing UI without forking the composer. Receives no props — the
142
+ * consumer owns the state.
143
+ */
144
+ communitySlot?: React.ReactNode;
138
145
  }
139
146
  declare const ParentPostComposer: React.FC<ParentPostComposerProps>;
140
147
  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;