hive-react-kit 0.2.2 → 0.2.3

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
@@ -264,6 +264,9 @@
264
264
  .pointer-events-none {
265
265
  pointer-events: none;
266
266
  }
267
+ .visible {
268
+ visibility: visible;
269
+ }
267
270
  .absolute {
268
271
  position: absolute;
269
272
  }
@@ -351,6 +354,12 @@
351
354
  .z-50 {
352
355
  z-index: 50;
353
356
  }
357
+ .z-\[60\] {
358
+ z-index: 60;
359
+ }
360
+ .z-\[100\] {
361
+ z-index: 100;
362
+ }
354
363
  .col-span-1 {
355
364
  grid-column: span 1 / span 1;
356
365
  }
@@ -657,6 +666,9 @@
657
666
  .max-w-7xl {
658
667
  max-width: var(--container-7xl);
659
668
  }
669
+ .max-w-\[280px\] {
670
+ max-width: 280px;
671
+ }
660
672
  .max-w-full {
661
673
  max-width: 100%;
662
674
  }
@@ -764,6 +776,9 @@
764
776
  .justify-center {
765
777
  justify-content: center;
766
778
  }
779
+ .justify-start {
780
+ justify-content: flex-start;
781
+ }
767
782
  .gap-1 {
768
783
  gap: calc(var(--spacing) * 1);
769
784
  }
@@ -1546,6 +1561,10 @@
1546
1561
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
1547
1562
  transition-duration: var(--tw-duration, var(--default-transition-duration));
1548
1563
  }
1564
+ .duration-150 {
1565
+ --tw-duration: 150ms;
1566
+ transition-duration: 150ms;
1567
+ }
1549
1568
  .duration-200 {
1550
1569
  --tw-duration: 200ms;
1551
1570
  transition-duration: 200ms;
@@ -1815,6 +1834,13 @@
1815
1834
  }
1816
1835
  }
1817
1836
  }
1837
+ .hover\:text-green-600 {
1838
+ &:hover {
1839
+ @media (hover: hover) {
1840
+ color: var(--color-green-600);
1841
+ }
1842
+ }
1843
+ }
1818
1844
  .hover\:text-green-700 {
1819
1845
  &:hover {
1820
1846
  @media (hover: hover) {
@@ -1822,6 +1848,13 @@
1822
1848
  }
1823
1849
  }
1824
1850
  }
1851
+ .hover\:text-red-600 {
1852
+ &:hover {
1853
+ @media (hover: hover) {
1854
+ color: var(--color-red-600);
1855
+ }
1856
+ }
1857
+ }
1825
1858
  .hover\:text-white {
1826
1859
  &:hover {
1827
1860
  @media (hover: hover) {
@@ -2650,6 +2683,24 @@
2650
2683
  }
2651
2684
  }
2652
2685
  }
2686
+ .dark\:hover\:text-green-400 {
2687
+ @media (prefers-color-scheme: dark) {
2688
+ &:hover {
2689
+ @media (hover: hover) {
2690
+ color: var(--color-green-400);
2691
+ }
2692
+ }
2693
+ }
2694
+ }
2695
+ .dark\:hover\:text-red-400 {
2696
+ @media (prefers-color-scheme: dark) {
2697
+ &:hover {
2698
+ @media (hover: hover) {
2699
+ color: var(--color-red-400);
2700
+ }
2701
+ }
2702
+ }
2703
+ }
2653
2704
  .dark\:hover\:text-white {
2654
2705
  @media (prefers-color-scheme: dark) {
2655
2706
  &:hover {
@@ -2666,6 +2717,11 @@
2666
2717
  }
2667
2718
  }
2668
2719
  }
2720
+ .\[\&\>\*\]\:text-left {
2721
+ &>* {
2722
+ text-align: left;
2723
+ }
2724
+ }
2669
2725
  }
2670
2726
  @property --tw-translate-x {
2671
2727
  syntax: "*";
@@ -5,7 +5,7 @@ interface CommentsListProps {
5
5
  currentUser?: string;
6
6
  token?: string;
7
7
  onClickUpvoteButton?: (currentUser?: string, token?: string) => void;
8
- onClickCommentUpvote?: (comment: Discussion) => void;
8
+ onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
9
9
  onClickCommentReply?: (comment: Discussion) => void;
10
10
  }
11
11
  export declare function CommentsList({ author, permlink, currentUser, token, onClickUpvoteButton, onClickCommentUpvote, onClickCommentReply, }: CommentsListProps): import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,7 @@ interface HiveDetailPostProps {
5
5
  currentUser?: string;
6
6
  token?: string;
7
7
  onClickUpvoteButton?: (currentUser?: string, token?: string) => void;
8
- onClickCommentUpvote?: (comment: Discussion) => void;
8
+ onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
9
9
  onClickCommentReply?: (comment: Discussion) => void;
10
10
  }
11
11
  export declare function HiveDetailPost({ author, permlink, currentUser, token, onClickUpvoteButton, onClickCommentUpvote, onClickCommentReply }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ export interface PostActionButtonProps {
2
+ author: string;
3
+ permlink: string;
4
+ /** Current logged-in username; null or '' means not logged in */
5
+ currentUser?: string | null;
6
+ /** Optional: Hive payout/value to display */
7
+ hiveValue?: number;
8
+ /** Called when user confirms vote with percent (1–100). Frontend handles signing/broadcast. */
9
+ onUpvote?: (percent: number) => void | Promise<void>;
10
+ /** Called when user submits a comment. Frontend handles signing/broadcast. */
11
+ onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | Promise<void>;
12
+ /** Called when comment button is clicked (e.g. open comments). */
13
+ onComments?: () => void;
14
+ /** Called when reblog is clicked (when logged in). */
15
+ onReblog?: () => void;
16
+ /** Called when share is clicked. */
17
+ onShare?: () => void;
18
+ /** Called when tip is clicked (when logged in). */
19
+ onTip?: () => void;
20
+ /** Called when report is clicked (when logged in). */
21
+ onReport?: () => void;
22
+ /** Called when user confirms comment upvote with (author, permlink, percent). Frontend handles signing. Voted comments show icon in blue. */
23
+ onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
24
+ }
25
+ export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, onUpvote, onSubmitComment, onComments, onReblog, onShare, onTip, onReport, onClickCommentUpvote, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
26
+ export default PostActionButton;
@@ -0,0 +1 @@
1
+ export { PostActionButton, type PostActionButtonProps } from "./PostActionButton";
@@ -8,7 +8,8 @@ interface CommentTileProps {
8
8
  searchQuery?: string;
9
9
  depth?: number;
10
10
  onVotedRefresh?: () => void;
11
- onClickCommentUpvote?: (comment: Discussion) => void;
11
+ /** When provided: called with (author, permlink, percent) on vote confirm; apiService.handleUpvote is never used. Token is ignored. */
12
+ onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
12
13
  onClickCommentReply?: (comment: Discussion) => void;
13
14
  onClickUpvoteButton?: (currentUser?: string, token?: string) => void;
14
15
  }
@@ -5,9 +5,12 @@ interface CommentsModalProps {
5
5
  onClose: () => void;
6
6
  currentUser?: string;
7
7
  token?: string;
8
- onClickCommentUpvote?: (comment: Discussion) => void;
8
+ /** Called with (author, permlink, percent) when user confirms comment upvote; frontend handles signing. */
9
+ onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
9
10
  onClickCommentReply?: (comment: Discussion) => void;
10
11
  onClickUpvoteButton?: (currentUser?: string, token?: string) => void;
12
+ /** When provided, used instead of apiService.handleComment (e.g. for aioha wallet) */
13
+ onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => Promise<void>;
11
14
  }
12
- declare const CommentsModal: ({ author, permlink, onClose, currentUser, token, onClickCommentUpvote, onClickCommentReply, onClickUpvoteButton }: CommentsModalProps) => import("react/jsx-runtime").JSX.Element;
15
+ declare const CommentsModal: ({ author, permlink, onClose, currentUser, token, onClickCommentUpvote, onClickCommentReply, onClickUpvoteButton, onSubmitComment }: CommentsModalProps) => import("react/jsx-runtime").JSX.Element;
13
16
  export default CommentsModal;
@@ -20,6 +20,7 @@ export { default as Modal } from './modals/Modal';
20
20
  export { UpvoteList } from './UpvoteList';
21
21
  export { CommentsList } from './CommentsList';
22
22
  export { default as CommentsModal } from './comments/CommentsModal';
23
+ export { PostActionButton, type PostActionButtonProps } from './actionButtons';
23
24
  export { default as UserAccount } from './user/UserAccount';
24
25
  export { default as UserFollowers } from './user/UserFollowers';
25
26
  export { default as UserFollowing } from './user/UserFollowing';