hive-react-kit 0.6.4 → 0.6.6
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 +125 -0
- package/dist/components/HiveDetailPost.d.ts +13 -1
- package/dist/components/actionButtons/PostActionButton.d.ts +3 -1
- package/dist/components/comments/AddCommentInput.d.ts +4 -2
- package/dist/components/inlineComments/InlineCommentItem.d.ts +27 -0
- package/dist/components/inlineComments/InlineCommentSection.d.ts +26 -0
- package/dist/components/user/UserDetailProfile.d.ts +2 -0
- package/dist/index.cjs.js +127 -127
- package/dist/index.esm.js +11755 -11050
- package/dist/services/apiService.d.ts +1 -1
- package/dist/types/comment.d.ts +5 -0
- package/package.json +1 -1
package/dist/build.css
CHANGED
|
@@ -313,6 +313,9 @@
|
|
|
313
313
|
.inset-0 {
|
|
314
314
|
inset: calc(var(--spacing) * 0);
|
|
315
315
|
}
|
|
316
|
+
.inset-x-0 {
|
|
317
|
+
inset-inline: calc(var(--spacing) * 0);
|
|
318
|
+
}
|
|
316
319
|
.inset-y-0 {
|
|
317
320
|
inset-block: calc(var(--spacing) * 0);
|
|
318
321
|
}
|
|
@@ -550,15 +553,24 @@
|
|
|
550
553
|
.ml-2 {
|
|
551
554
|
margin-left: calc(var(--spacing) * 2);
|
|
552
555
|
}
|
|
556
|
+
.ml-3 {
|
|
557
|
+
margin-left: calc(var(--spacing) * 3);
|
|
558
|
+
}
|
|
553
559
|
.ml-4 {
|
|
554
560
|
margin-left: calc(var(--spacing) * 4);
|
|
555
561
|
}
|
|
556
562
|
.ml-6 {
|
|
557
563
|
margin-left: calc(var(--spacing) * 6);
|
|
558
564
|
}
|
|
565
|
+
.ml-7 {
|
|
566
|
+
margin-left: calc(var(--spacing) * 7);
|
|
567
|
+
}
|
|
559
568
|
.ml-8 {
|
|
560
569
|
margin-left: calc(var(--spacing) * 8);
|
|
561
570
|
}
|
|
571
|
+
.ml-9 {
|
|
572
|
+
margin-left: calc(var(--spacing) * 9);
|
|
573
|
+
}
|
|
562
574
|
.ml-auto {
|
|
563
575
|
margin-left: auto;
|
|
564
576
|
}
|
|
@@ -853,6 +865,9 @@
|
|
|
853
865
|
.max-w-7xl {
|
|
854
866
|
max-width: var(--container-7xl);
|
|
855
867
|
}
|
|
868
|
+
.max-w-\[250px\] {
|
|
869
|
+
max-width: 250px;
|
|
870
|
+
}
|
|
856
871
|
.max-w-\[280px\] {
|
|
857
872
|
max-width: 280px;
|
|
858
873
|
}
|
|
@@ -1009,6 +1024,9 @@
|
|
|
1009
1024
|
.gap-2 {
|
|
1010
1025
|
gap: calc(var(--spacing) * 2);
|
|
1011
1026
|
}
|
|
1027
|
+
.gap-2\.5 {
|
|
1028
|
+
gap: calc(var(--spacing) * 2.5);
|
|
1029
|
+
}
|
|
1012
1030
|
.gap-3 {
|
|
1013
1031
|
gap: calc(var(--spacing) * 3);
|
|
1014
1032
|
}
|
|
@@ -1106,6 +1124,9 @@
|
|
|
1106
1124
|
.gap-y-1 {
|
|
1107
1125
|
row-gap: calc(var(--spacing) * 1);
|
|
1108
1126
|
}
|
|
1127
|
+
.gap-y-1\.5 {
|
|
1128
|
+
row-gap: calc(var(--spacing) * 1.5);
|
|
1129
|
+
}
|
|
1109
1130
|
.divide-y {
|
|
1110
1131
|
:where(& > :not(:last-child)) {
|
|
1111
1132
|
--tw-divide-y-reverse: 0;
|
|
@@ -1120,6 +1141,14 @@
|
|
|
1120
1141
|
border-color: var(--color-gray-700);
|
|
1121
1142
|
}
|
|
1122
1143
|
}
|
|
1144
|
+
.divide-gray-800\/50 {
|
|
1145
|
+
:where(& > :not(:last-child)) {
|
|
1146
|
+
border-color: color-mix(in srgb, oklch(27.8% 0.033 256.848) 50%, transparent);
|
|
1147
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1148
|
+
border-color: color-mix(in oklab, var(--color-gray-800) 50%, transparent);
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1123
1152
|
.truncate {
|
|
1124
1153
|
overflow: hidden;
|
|
1125
1154
|
text-overflow: ellipsis;
|
|
@@ -1270,6 +1299,12 @@
|
|
|
1270
1299
|
border-color: color-mix(in oklab, var(--color-green-600) 60%, transparent);
|
|
1271
1300
|
}
|
|
1272
1301
|
}
|
|
1302
|
+
.border-green-800\/40 {
|
|
1303
|
+
border-color: color-mix(in srgb, oklch(44.8% 0.119 151.328) 40%, transparent);
|
|
1304
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1305
|
+
border-color: color-mix(in oklab, var(--color-green-800) 40%, transparent);
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1273
1308
|
.border-red-200 {
|
|
1274
1309
|
border-color: var(--color-red-200);
|
|
1275
1310
|
}
|
|
@@ -1339,6 +1374,12 @@
|
|
|
1339
1374
|
background-color: color-mix(in oklab, var(--color-black) 30%, transparent);
|
|
1340
1375
|
}
|
|
1341
1376
|
}
|
|
1377
|
+
.bg-black\/40 {
|
|
1378
|
+
background-color: color-mix(in srgb, #000 40%, transparent);
|
|
1379
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1380
|
+
background-color: color-mix(in oklab, var(--color-black) 40%, transparent);
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1342
1383
|
.bg-black\/50 {
|
|
1343
1384
|
background-color: color-mix(in srgb, #000 50%, transparent);
|
|
1344
1385
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1510,6 +1551,12 @@
|
|
|
1510
1551
|
background-color: color-mix(in oklab, var(--color-gray-900) 80%, transparent);
|
|
1511
1552
|
}
|
|
1512
1553
|
}
|
|
1554
|
+
.bg-gray-900\/95 {
|
|
1555
|
+
background-color: color-mix(in srgb, oklch(21% 0.034 264.665) 95%, transparent);
|
|
1556
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1557
|
+
background-color: color-mix(in oklab, var(--color-gray-900) 95%, transparent);
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1513
1560
|
.bg-gray-950 {
|
|
1514
1561
|
background-color: var(--color-gray-950);
|
|
1515
1562
|
}
|
|
@@ -1534,6 +1581,12 @@
|
|
|
1534
1581
|
background-color: color-mix(in oklab, var(--color-green-600) 20%, transparent);
|
|
1535
1582
|
}
|
|
1536
1583
|
}
|
|
1584
|
+
.bg-green-900\/10 {
|
|
1585
|
+
background-color: color-mix(in srgb, oklch(39.3% 0.095 152.535) 10%, transparent);
|
|
1586
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1587
|
+
background-color: color-mix(in oklab, var(--color-green-900) 10%, transparent);
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1537
1590
|
.bg-green-900\/50 {
|
|
1538
1591
|
background-color: color-mix(in srgb, oklch(39.3% 0.095 152.535) 50%, transparent);
|
|
1539
1592
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1933,6 +1986,9 @@
|
|
|
1933
1986
|
font-size: var(--text-xs);
|
|
1934
1987
|
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
1935
1988
|
}
|
|
1989
|
+
.text-\[9px\] {
|
|
1990
|
+
font-size: 9px;
|
|
1991
|
+
}
|
|
1936
1992
|
.text-\[10px\] {
|
|
1937
1993
|
font-size: 10px;
|
|
1938
1994
|
}
|
|
@@ -2075,6 +2131,9 @@
|
|
|
2075
2131
|
.text-green-600 {
|
|
2076
2132
|
color: var(--color-green-600);
|
|
2077
2133
|
}
|
|
2134
|
+
.text-green-700 {
|
|
2135
|
+
color: var(--color-green-700);
|
|
2136
|
+
}
|
|
2078
2137
|
.text-green-800 {
|
|
2079
2138
|
color: var(--color-green-800);
|
|
2080
2139
|
}
|
|
@@ -2196,6 +2255,10 @@
|
|
|
2196
2255
|
--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));
|
|
2197
2256
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2198
2257
|
}
|
|
2258
|
+
.shadow-\[0_-4px_20px_rgba\(0\,0\,0\,0\.5\)\] {
|
|
2259
|
+
--tw-shadow: 0 -4px 20px var(--tw-shadow-color, rgba(0,0,0,0.5));
|
|
2260
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2261
|
+
}
|
|
2199
2262
|
.shadow-lg {
|
|
2200
2263
|
--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
2201
2264
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -2506,6 +2569,16 @@
|
|
|
2506
2569
|
}
|
|
2507
2570
|
}
|
|
2508
2571
|
}
|
|
2572
|
+
.hover\:bg-gray-700\/60 {
|
|
2573
|
+
&:hover {
|
|
2574
|
+
@media (hover: hover) {
|
|
2575
|
+
background-color: color-mix(in srgb, oklch(37.3% 0.034 259.733) 60%, transparent);
|
|
2576
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
2577
|
+
background-color: color-mix(in oklab, var(--color-gray-700) 60%, transparent);
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2509
2582
|
.hover\:bg-gray-800 {
|
|
2510
2583
|
&:hover {
|
|
2511
2584
|
@media (hover: hover) {
|
|
@@ -2715,6 +2788,13 @@
|
|
|
2715
2788
|
}
|
|
2716
2789
|
}
|
|
2717
2790
|
}
|
|
2791
|
+
.hover\:opacity-90 {
|
|
2792
|
+
&:hover {
|
|
2793
|
+
@media (hover: hover) {
|
|
2794
|
+
opacity: 90%;
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2718
2798
|
.hover\:opacity-100 {
|
|
2719
2799
|
&:hover {
|
|
2720
2800
|
@media (hover: hover) {
|
|
@@ -3065,6 +3145,11 @@
|
|
|
3065
3145
|
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
3066
3146
|
}
|
|
3067
3147
|
}
|
|
3148
|
+
.md\:ml-6 {
|
|
3149
|
+
@media (width >= 48rem) {
|
|
3150
|
+
margin-left: calc(var(--spacing) * 6);
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3068
3153
|
.md\:ml-7 {
|
|
3069
3154
|
@media (width >= 48rem) {
|
|
3070
3155
|
margin-left: calc(var(--spacing) * 7);
|
|
@@ -3075,6 +3160,11 @@
|
|
|
3075
3160
|
margin-left: calc(var(--spacing) * 8);
|
|
3076
3161
|
}
|
|
3077
3162
|
}
|
|
3163
|
+
.md\:ml-9 {
|
|
3164
|
+
@media (width >= 48rem) {
|
|
3165
|
+
margin-left: calc(var(--spacing) * 9);
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3078
3168
|
.md\:block {
|
|
3079
3169
|
@media (width >= 48rem) {
|
|
3080
3170
|
display: block;
|
|
@@ -3095,6 +3185,11 @@
|
|
|
3095
3185
|
height: calc(var(--spacing) * 4);
|
|
3096
3186
|
}
|
|
3097
3187
|
}
|
|
3188
|
+
.md\:h-7 {
|
|
3189
|
+
@media (width >= 48rem) {
|
|
3190
|
+
height: calc(var(--spacing) * 7);
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3098
3193
|
.md\:h-10 {
|
|
3099
3194
|
@media (width >= 48rem) {
|
|
3100
3195
|
height: calc(var(--spacing) * 10);
|
|
@@ -3110,6 +3205,11 @@
|
|
|
3110
3205
|
width: calc(var(--spacing) * 4);
|
|
3111
3206
|
}
|
|
3112
3207
|
}
|
|
3208
|
+
.md\:w-7 {
|
|
3209
|
+
@media (width >= 48rem) {
|
|
3210
|
+
width: calc(var(--spacing) * 7);
|
|
3211
|
+
}
|
|
3212
|
+
}
|
|
3113
3213
|
.md\:w-10 {
|
|
3114
3214
|
@media (width >= 48rem) {
|
|
3115
3215
|
width: calc(var(--spacing) * 10);
|
|
@@ -3155,6 +3255,11 @@
|
|
|
3155
3255
|
align-items: center;
|
|
3156
3256
|
}
|
|
3157
3257
|
}
|
|
3258
|
+
.md\:gap-2 {
|
|
3259
|
+
@media (width >= 48rem) {
|
|
3260
|
+
gap: calc(var(--spacing) * 2);
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3158
3263
|
.md\:space-y-4 {
|
|
3159
3264
|
@media (width >= 48rem) {
|
|
3160
3265
|
:where(& > :not(:last-child)) {
|
|
@@ -3211,16 +3316,31 @@
|
|
|
3211
3316
|
padding: calc(var(--spacing) * 8);
|
|
3212
3317
|
}
|
|
3213
3318
|
}
|
|
3319
|
+
.md\:px-3 {
|
|
3320
|
+
@media (width >= 48rem) {
|
|
3321
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
3322
|
+
}
|
|
3323
|
+
}
|
|
3214
3324
|
.md\:px-6 {
|
|
3215
3325
|
@media (width >= 48rem) {
|
|
3216
3326
|
padding-inline: calc(var(--spacing) * 6);
|
|
3217
3327
|
}
|
|
3218
3328
|
}
|
|
3329
|
+
.md\:py-3 {
|
|
3330
|
+
@media (width >= 48rem) {
|
|
3331
|
+
padding-block: calc(var(--spacing) * 3);
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3219
3334
|
.md\:py-6 {
|
|
3220
3335
|
@media (width >= 48rem) {
|
|
3221
3336
|
padding-block: calc(var(--spacing) * 6);
|
|
3222
3337
|
}
|
|
3223
3338
|
}
|
|
3339
|
+
.md\:pl-4 {
|
|
3340
|
+
@media (width >= 48rem) {
|
|
3341
|
+
padding-left: calc(var(--spacing) * 4);
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3224
3344
|
.md\:pl-6 {
|
|
3225
3345
|
@media (width >= 48rem) {
|
|
3226
3346
|
padding-left: calc(var(--spacing) * 6);
|
|
@@ -3262,6 +3382,11 @@
|
|
|
3262
3382
|
line-height: var(--tw-leading, var(--text-xl--line-height));
|
|
3263
3383
|
}
|
|
3264
3384
|
}
|
|
3385
|
+
.md\:text-\[10px\] {
|
|
3386
|
+
@media (width >= 48rem) {
|
|
3387
|
+
font-size: 10px;
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3265
3390
|
.lg\:col-span-2 {
|
|
3266
3391
|
@media (width >= 64rem) {
|
|
3267
3392
|
grid-column: span 2 / span 2;
|
|
@@ -9,6 +9,9 @@ export interface HiveDetailPostProps {
|
|
|
9
9
|
onShare?: () => void;
|
|
10
10
|
onTip?: () => void;
|
|
11
11
|
onReport?: () => void;
|
|
12
|
+
onShareComment?: (author: string, permlink: string) => void;
|
|
13
|
+
onTipComment?: (author: string, permlink: string) => void;
|
|
14
|
+
onReportComment?: (author: string, permlink: string) => void;
|
|
12
15
|
/**
|
|
13
16
|
* Called when the user submits a poll vote.
|
|
14
17
|
* @param author - post author
|
|
@@ -21,12 +24,21 @@ export interface HiveDetailPostProps {
|
|
|
21
24
|
giphyApiKey?: string;
|
|
22
25
|
templateToken?: string;
|
|
23
26
|
templateApiBaseUrl?: string;
|
|
27
|
+
/** Array of usernames whose comments should be hidden from the current user's view. */
|
|
28
|
+
reportedAuthors?: string[];
|
|
29
|
+
/** Array of {author, permlink} posts/comments to hide from the current user's view. */
|
|
30
|
+
reportedPosts?: {
|
|
31
|
+
author: string;
|
|
32
|
+
permlink: string;
|
|
33
|
+
}[];
|
|
24
34
|
/** URL to a Hive logo icon shown next to the payout value. Defaults to "/images/hive_logo.png". */
|
|
25
35
|
hiveIconUrl?: string;
|
|
26
36
|
/** Background color for the component. Pass a single color string for a solid background, or an array of colors for a gradient (e.g. `["#0f172a", "#1e293b"]` or `["#1a1a2e", "#16213e", "#0f3460"]`). Defaults to gray-900. */
|
|
27
37
|
backgroundColor?: string | string[];
|
|
28
38
|
onBack?: () => void;
|
|
29
39
|
onUserClick?: (username: string) => void;
|
|
40
|
+
/** Called when user clicks "View parent post" — navigate to the parent post. */
|
|
41
|
+
onNavigateToPost?: (author: string, permlink: string) => void;
|
|
30
42
|
}
|
|
31
|
-
export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, backgroundColor, onBack, onUserClick, onVotePoll, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
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, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
32
44
|
export default HiveDetailPost;
|
|
@@ -40,6 +40,8 @@ export interface PostActionButtonProps {
|
|
|
40
40
|
templateToken?: string;
|
|
41
41
|
/** Custom template API endpoint */
|
|
42
42
|
templateApiBaseUrl?: string;
|
|
43
|
+
/** When true, clicking the comment icon calls onComments instead of opening the CommentsModal popup */
|
|
44
|
+
disableCommentsModal?: boolean;
|
|
43
45
|
}
|
|
44
|
-
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, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
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, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
45
47
|
export default PostActionButton;
|
|
@@ -60,11 +60,13 @@ export interface PostComposerProps {
|
|
|
60
60
|
bgColor?: string;
|
|
61
61
|
/** Custom border color for the composer container (e.g. "#3a424a", "transparent") */
|
|
62
62
|
borderColor?: string;
|
|
63
|
+
/** Disable auto-focus on mount (default false). Use when the composer is always visible and shouldn't steal scroll. */
|
|
64
|
+
disableAutoFocus?: boolean;
|
|
63
65
|
}
|
|
64
66
|
/** @deprecated Use PostComposerProps instead */
|
|
65
67
|
export type AddCommentInputProps = PostComposerProps;
|
|
66
|
-
declare const PostComposer: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
declare const PostComposer: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, disableAutoFocus, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
67
69
|
/** @deprecated Use PostComposer instead */
|
|
68
|
-
declare const AddCommentInput: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
declare const AddCommentInput: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, disableAutoFocus, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
69
71
|
export { PostComposer };
|
|
70
72
|
export default AddCommentInput;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Discussion } from '@/types/comment';
|
|
2
|
+
interface InlineCommentItemProps {
|
|
3
|
+
comment: Discussion;
|
|
4
|
+
allComments: Discussion[];
|
|
5
|
+
onReply: (author: string, permlink: string) => void;
|
|
6
|
+
onCancelReply: () => void;
|
|
7
|
+
onCommentSubmit: (parentAuthor: string, parentPermlink: string, body: string) => Promise<void>;
|
|
8
|
+
/** "author/permlink" key of the comment currently being replied to (null = none) */
|
|
9
|
+
activeReplyKey: string | null;
|
|
10
|
+
currentUser?: string;
|
|
11
|
+
token?: string;
|
|
12
|
+
depth?: number;
|
|
13
|
+
onVotedRefresh?: () => void;
|
|
14
|
+
onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
15
|
+
/** Composer props passed through */
|
|
16
|
+
ecencyToken?: string;
|
|
17
|
+
threeSpeakApiKey?: string;
|
|
18
|
+
giphyApiKey?: string;
|
|
19
|
+
templateToken?: string;
|
|
20
|
+
templateApiBaseUrl?: string;
|
|
21
|
+
hiveIconUrl?: string;
|
|
22
|
+
onShareComment?: (author: string, permlink: string) => void;
|
|
23
|
+
onTipComment?: (author: string, permlink: string) => void;
|
|
24
|
+
onReportComment?: (author: string, permlink: string) => void;
|
|
25
|
+
}
|
|
26
|
+
export default function InlineCommentItem({ comment, allComments, onReply, onCancelReply, onCommentSubmit, activeReplyKey, currentUser, token, depth, onVotedRefresh, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, onShareComment, onTipComment, onReportComment, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface InlineCommentSectionProps {
|
|
2
|
+
author: string;
|
|
3
|
+
permlink: string;
|
|
4
|
+
currentUser?: string;
|
|
5
|
+
token?: string;
|
|
6
|
+
onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | Promise<void>;
|
|
7
|
+
onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
8
|
+
ecencyToken?: string;
|
|
9
|
+
threeSpeakApiKey?: string;
|
|
10
|
+
giphyApiKey?: string;
|
|
11
|
+
templateToken?: string;
|
|
12
|
+
templateApiBaseUrl?: string;
|
|
13
|
+
/** Usernames whose comments should be hidden for the current logged-in user. */
|
|
14
|
+
reportedAuthors?: string[];
|
|
15
|
+
/** Specific posts/comments to hide for the current logged-in user. */
|
|
16
|
+
reportedPosts?: {
|
|
17
|
+
author: string;
|
|
18
|
+
permlink: string;
|
|
19
|
+
}[];
|
|
20
|
+
hiveIconUrl?: string;
|
|
21
|
+
onShareComment?: (author: string, permlink: string) => void;
|
|
22
|
+
onTipComment?: (author: string, permlink: string) => void;
|
|
23
|
+
onReportComment?: (author: string, permlink: string) => void;
|
|
24
|
+
}
|
|
25
|
+
export default function InlineCommentSection({ author, permlink, currentUser, token, onSubmitComment, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, onShareComment, onTipComment, onReportComment, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -47,6 +47,8 @@ export interface UserDetailProfileProps {
|
|
|
47
47
|
onActivitySelect?: (activity: any) => void;
|
|
48
48
|
onShare?: (username: string) => void;
|
|
49
49
|
onSharePost?: (author: string, permlink: string) => void;
|
|
50
|
+
/** When provided, clicking the comment icon navigates to the post detail instead of opening the comments modal. */
|
|
51
|
+
onCommentClick?: (author: string, permlink: string) => void;
|
|
50
52
|
}
|
|
51
53
|
type TabType = "blogs" | "posts" | "snaps" | "polls" | "comments" | "replies" | "activities" | "authorRewards" | "curationRewards" | "followers" | "following" | "wallet" | "votingPower" | "badges" | "witnessVotes";
|
|
52
54
|
declare const UserDetailProfile: React.FC<UserDetailProfileProps>;
|