hive-react-kit 0.2.2 → 0.2.5
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 +65 -0
- package/dist/components/CommentsList.d.ts +1 -1
- package/dist/components/HiveDetailPost.d.ts +1 -1
- package/dist/components/actionButtons/PostActionButton.d.ts +26 -0
- package/dist/components/actionButtons/index.d.ts +1 -0
- package/dist/components/comments/CommentTile.d.ts +2 -1
- package/dist/components/comments/CommentsModal.d.ts +5 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs.js +59 -59
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +3840 -3542
- package/package.json +1 -1
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
|
}
|
|
@@ -288,6 +291,9 @@
|
|
|
288
291
|
.start {
|
|
289
292
|
inset-inline-start: var(--spacing);
|
|
290
293
|
}
|
|
294
|
+
.end {
|
|
295
|
+
inset-inline-end: var(--spacing);
|
|
296
|
+
}
|
|
291
297
|
.-top-8 {
|
|
292
298
|
top: calc(var(--spacing) * -8);
|
|
293
299
|
}
|
|
@@ -351,6 +357,12 @@
|
|
|
351
357
|
.z-50 {
|
|
352
358
|
z-index: 50;
|
|
353
359
|
}
|
|
360
|
+
.z-\[60\] {
|
|
361
|
+
z-index: 60;
|
|
362
|
+
}
|
|
363
|
+
.z-\[100\] {
|
|
364
|
+
z-index: 100;
|
|
365
|
+
}
|
|
354
366
|
.col-span-1 {
|
|
355
367
|
grid-column: span 1 / span 1;
|
|
356
368
|
}
|
|
@@ -657,6 +669,9 @@
|
|
|
657
669
|
.max-w-7xl {
|
|
658
670
|
max-width: var(--container-7xl);
|
|
659
671
|
}
|
|
672
|
+
.max-w-\[280px\] {
|
|
673
|
+
max-width: 280px;
|
|
674
|
+
}
|
|
660
675
|
.max-w-full {
|
|
661
676
|
max-width: 100%;
|
|
662
677
|
}
|
|
@@ -681,6 +696,9 @@
|
|
|
681
696
|
.flex-shrink-0 {
|
|
682
697
|
flex-shrink: 0;
|
|
683
698
|
}
|
|
699
|
+
.shrink-0 {
|
|
700
|
+
flex-shrink: 0;
|
|
701
|
+
}
|
|
684
702
|
.border-collapse {
|
|
685
703
|
border-collapse: collapse;
|
|
686
704
|
}
|
|
@@ -764,6 +782,12 @@
|
|
|
764
782
|
.justify-center {
|
|
765
783
|
justify-content: center;
|
|
766
784
|
}
|
|
785
|
+
.justify-end {
|
|
786
|
+
justify-content: flex-end;
|
|
787
|
+
}
|
|
788
|
+
.justify-start {
|
|
789
|
+
justify-content: flex-start;
|
|
790
|
+
}
|
|
767
791
|
.gap-1 {
|
|
768
792
|
gap: calc(var(--spacing) * 1);
|
|
769
793
|
}
|
|
@@ -1546,6 +1570,10 @@
|
|
|
1546
1570
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1547
1571
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1548
1572
|
}
|
|
1573
|
+
.duration-150 {
|
|
1574
|
+
--tw-duration: 150ms;
|
|
1575
|
+
transition-duration: 150ms;
|
|
1576
|
+
}
|
|
1549
1577
|
.duration-200 {
|
|
1550
1578
|
--tw-duration: 200ms;
|
|
1551
1579
|
transition-duration: 200ms;
|
|
@@ -1815,6 +1843,13 @@
|
|
|
1815
1843
|
}
|
|
1816
1844
|
}
|
|
1817
1845
|
}
|
|
1846
|
+
.hover\:text-green-600 {
|
|
1847
|
+
&:hover {
|
|
1848
|
+
@media (hover: hover) {
|
|
1849
|
+
color: var(--color-green-600);
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1818
1853
|
.hover\:text-green-700 {
|
|
1819
1854
|
&:hover {
|
|
1820
1855
|
@media (hover: hover) {
|
|
@@ -1822,6 +1857,13 @@
|
|
|
1822
1857
|
}
|
|
1823
1858
|
}
|
|
1824
1859
|
}
|
|
1860
|
+
.hover\:text-red-600 {
|
|
1861
|
+
&:hover {
|
|
1862
|
+
@media (hover: hover) {
|
|
1863
|
+
color: var(--color-red-600);
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1825
1867
|
.hover\:text-white {
|
|
1826
1868
|
&:hover {
|
|
1827
1869
|
@media (hover: hover) {
|
|
@@ -2650,6 +2692,24 @@
|
|
|
2650
2692
|
}
|
|
2651
2693
|
}
|
|
2652
2694
|
}
|
|
2695
|
+
.dark\:hover\:text-green-400 {
|
|
2696
|
+
@media (prefers-color-scheme: dark) {
|
|
2697
|
+
&:hover {
|
|
2698
|
+
@media (hover: hover) {
|
|
2699
|
+
color: var(--color-green-400);
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
.dark\:hover\:text-red-400 {
|
|
2705
|
+
@media (prefers-color-scheme: dark) {
|
|
2706
|
+
&:hover {
|
|
2707
|
+
@media (hover: hover) {
|
|
2708
|
+
color: var(--color-red-400);
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2653
2713
|
.dark\:hover\:text-white {
|
|
2654
2714
|
@media (prefers-color-scheme: dark) {
|
|
2655
2715
|
&:hover {
|
|
@@ -2666,6 +2726,11 @@
|
|
|
2666
2726
|
}
|
|
2667
2727
|
}
|
|
2668
2728
|
}
|
|
2729
|
+
.\[\&\>\*\]\:text-left {
|
|
2730
|
+
&>* {
|
|
2731
|
+
text-align: left;
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2669
2734
|
}
|
|
2670
2735
|
@property --tw-translate-x {
|
|
2671
2736
|
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?: (
|
|
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?: (
|
|
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 value to display (string so unit is decided by user, e.g. "$8.50", "10 HIVE") */
|
|
7
|
+
hiveValue?: string;
|
|
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
|
-
|
|
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
|
-
|
|
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';
|