hive-react-kit 0.5.9 → 0.6.1
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/README.md +74 -0
- package/dist/build.css +282 -23
- package/dist/components/HiveDetailPost.d.ts +16 -7
- package/dist/components/index.d.ts +1 -1
- package/dist/components/user/UserDetailProfile.d.ts +1 -1
- package/dist/index.cjs.js +120 -124
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +14320 -13966
- package/dist/pages/HiveDetailPostPage.d.ts +2 -0
- package/dist/types/wallet.d.ts +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,7 @@ import type { Video, Comment, Wallet as WalletType } from 'hive-react-kit/types'
|
|
|
56
56
|
- **VideoDetail** - Detailed video view
|
|
57
57
|
- **VideoInfo** - Video information display
|
|
58
58
|
- **Wallet** - Hive wallet integration
|
|
59
|
+
- **HiveDetailPost** - Full-screen post detail view with content rendering, action buttons, and author header
|
|
59
60
|
|
|
60
61
|
### Community Components
|
|
61
62
|
|
|
@@ -209,6 +210,79 @@ The `tabShown` prop accepts an array of these values:
|
|
|
209
210
|
|
|
210
211
|
See [docs/UserDetailProfile.md](docs/UserDetailProfile.md) for full documentation including all callbacks, tab types, streaming behavior, and styling details.
|
|
211
212
|
|
|
213
|
+
### HiveDetailPost
|
|
214
|
+
|
|
215
|
+
A full-screen, single-column post detail view. Renders Hive post content using `@hiveio/content-renderer` with a compact author header (avatar, username, reputation, follower/following/posts stats), `PostActionButton` for all interactions, image captions from alt text, tags, and payout info.
|
|
216
|
+
|
|
217
|
+
#### HiveDetailPost Usage
|
|
218
|
+
|
|
219
|
+
```tsx
|
|
220
|
+
import { HiveDetailPost } from 'hive-react-kit';
|
|
221
|
+
|
|
222
|
+
// Basic
|
|
223
|
+
<HiveDetailPost
|
|
224
|
+
author="sagarkothari88"
|
|
225
|
+
permlink="my-first-post"
|
|
226
|
+
currentUser="myusername"
|
|
227
|
+
onUpvote={(percent) => console.log("Upvote:", percent)}
|
|
228
|
+
onSubmitComment={(pAuthor, pPermlink, body) => console.log("Comment:", body)}
|
|
229
|
+
/>
|
|
230
|
+
|
|
231
|
+
// Full usage with all callbacks
|
|
232
|
+
<HiveDetailPost
|
|
233
|
+
author="sagarkothari88"
|
|
234
|
+
permlink="my-first-post"
|
|
235
|
+
currentUser="myusername"
|
|
236
|
+
onBack={() => navigate(-1)}
|
|
237
|
+
onUserClick={(user) => navigate(`/profile/${user}`)}
|
|
238
|
+
onUpvote={(percent) => console.log("Upvote:", percent)}
|
|
239
|
+
onSubmitComment={(pAuthor, pPermlink, body) => console.log("Comment:", body)}
|
|
240
|
+
onClickCommentUpvote={(a, p, pct) => console.log("Comment upvote:", a, p, pct)}
|
|
241
|
+
onReblog={() => console.log("Reblog")}
|
|
242
|
+
onShare={() => navigator.clipboard.writeText(`https://peakd.com/@${author}/${permlink}`)}
|
|
243
|
+
onTip={() => console.log("Tip")}
|
|
244
|
+
onReport={() => console.log("Report")}
|
|
245
|
+
ecencyToken="your-ecency-token"
|
|
246
|
+
threeSpeakApiKey="your-3speak-key"
|
|
247
|
+
giphyApiKey="your-giphy-key"
|
|
248
|
+
templateToken="your-template-token"
|
|
249
|
+
/>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
#### HiveDetailPost Props
|
|
253
|
+
|
|
254
|
+
| Prop | Type | Default | Description |
|
|
255
|
+
|------|------|---------|-------------|
|
|
256
|
+
| `author` | `string` | *required* | Hive account name of the post author |
|
|
257
|
+
| `permlink` | `string` | *required* | Permlink of the post |
|
|
258
|
+
| `currentUser` | `string` | `undefined` | Logged-in username. Required for upvote/comment/reblog |
|
|
259
|
+
| `onBack` | `() => void` | `undefined` | Back button callback. Hidden when not provided |
|
|
260
|
+
| `onUserClick` | `(username: string) => void` | `undefined` | Called when author avatar/name is clicked |
|
|
261
|
+
|
|
262
|
+
**Post Action Callbacks (via PostActionButton)**
|
|
263
|
+
|
|
264
|
+
| Prop | Type | Description |
|
|
265
|
+
|------|------|-------------|
|
|
266
|
+
| `onUpvote` | `(percent: number) => void \| Promise<void>` | Called when user confirms upvote with vote weight (1-100) |
|
|
267
|
+
| `onSubmitComment` | `(parentAuthor, parentPermlink, body) => void \| Promise<void>` | Called when a comment is submitted |
|
|
268
|
+
| `onClickCommentUpvote` | `(author, permlink, percent) => void \| Promise<void>` | Called when a comment is upvoted inside the comments modal |
|
|
269
|
+
| `onReblog` | `() => void` | Called when reblog is clicked |
|
|
270
|
+
| `onShare` | `() => void` | Called when share is clicked. Falls back to Web Share API / clipboard |
|
|
271
|
+
| `onTip` | `() => void` | Called when tip is clicked |
|
|
272
|
+
| `onReport` | `() => void` | Called when report is clicked |
|
|
273
|
+
|
|
274
|
+
**Comment Composer Tokens**
|
|
275
|
+
|
|
276
|
+
| Prop | Type | Description |
|
|
277
|
+
|------|------|-------------|
|
|
278
|
+
| `ecencyToken` | `string` | Ecency image hosting token — enables image upload |
|
|
279
|
+
| `threeSpeakApiKey` | `string` | 3Speak API key — enables audio/video upload |
|
|
280
|
+
| `giphyApiKey` | `string` | GIPHY API key — enables GIF search |
|
|
281
|
+
| `templateToken` | `string` | HReplier API token — enables template picker |
|
|
282
|
+
| `templateApiBaseUrl` | `string` | Custom template API endpoint |
|
|
283
|
+
|
|
284
|
+
See [docs/HiveDetailPost.md](docs/HiveDetailPost.md) for full documentation including layout diagram, content rendering details, skeleton loading, and CSS requirements.
|
|
285
|
+
|
|
212
286
|
### Toolbar Component
|
|
213
287
|
|
|
214
288
|
- **HiveToolbar** - A fixed bottom toolbar showcasing Hive ecosystem apps and witness voting links. Responsive across mobile, tablet, and desktop.
|
package/dist/build.css
CHANGED
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
--radius-lg: 0.5rem;
|
|
128
128
|
--radius-xl: 0.75rem;
|
|
129
129
|
--radius-2xl: 1rem;
|
|
130
|
+
--ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
130
131
|
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
131
132
|
--animate-spin: spin 1s linear infinite;
|
|
132
133
|
--animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
@@ -453,6 +454,9 @@
|
|
|
453
454
|
.mx-1 {
|
|
454
455
|
margin-inline: calc(var(--spacing) * 1);
|
|
455
456
|
}
|
|
457
|
+
.mx-1\.5 {
|
|
458
|
+
margin-inline: calc(var(--spacing) * 1.5);
|
|
459
|
+
}
|
|
456
460
|
.mx-2 {
|
|
457
461
|
margin-inline: calc(var(--spacing) * 2);
|
|
458
462
|
}
|
|
@@ -741,6 +745,12 @@
|
|
|
741
745
|
.w-2 {
|
|
742
746
|
width: calc(var(--spacing) * 2);
|
|
743
747
|
}
|
|
748
|
+
.w-2\/3 {
|
|
749
|
+
width: calc(2 / 3 * 100%);
|
|
750
|
+
}
|
|
751
|
+
.w-2\/5 {
|
|
752
|
+
width: calc(2 / 5 * 100%);
|
|
753
|
+
}
|
|
744
754
|
.w-3 {
|
|
745
755
|
width: calc(var(--spacing) * 3);
|
|
746
756
|
}
|
|
@@ -786,6 +796,9 @@
|
|
|
786
796
|
.w-16 {
|
|
787
797
|
width: calc(var(--spacing) * 16);
|
|
788
798
|
}
|
|
799
|
+
.w-18 {
|
|
800
|
+
width: calc(var(--spacing) * 18);
|
|
801
|
+
}
|
|
789
802
|
.w-20 {
|
|
790
803
|
width: calc(var(--spacing) * 20);
|
|
791
804
|
}
|
|
@@ -1050,6 +1063,9 @@
|
|
|
1050
1063
|
margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));
|
|
1051
1064
|
}
|
|
1052
1065
|
}
|
|
1066
|
+
.gap-x-2 {
|
|
1067
|
+
column-gap: calc(var(--spacing) * 2);
|
|
1068
|
+
}
|
|
1053
1069
|
.gap-x-3 {
|
|
1054
1070
|
column-gap: calc(var(--spacing) * 3);
|
|
1055
1071
|
}
|
|
@@ -1163,6 +1179,10 @@
|
|
|
1163
1179
|
border-style: var(--tw-border-style);
|
|
1164
1180
|
border-width: 4px;
|
|
1165
1181
|
}
|
|
1182
|
+
.border-y {
|
|
1183
|
+
border-block-style: var(--tw-border-style);
|
|
1184
|
+
border-block-width: 1px;
|
|
1185
|
+
}
|
|
1166
1186
|
.border-t {
|
|
1167
1187
|
border-top-style: var(--tw-border-style);
|
|
1168
1188
|
border-top-width: 1px;
|
|
@@ -1265,6 +1285,9 @@
|
|
|
1265
1285
|
.border-yellow-800 {
|
|
1266
1286
|
border-color: var(--color-yellow-800);
|
|
1267
1287
|
}
|
|
1288
|
+
.border-t-blue-400 {
|
|
1289
|
+
border-top-color: var(--color-blue-400);
|
|
1290
|
+
}
|
|
1268
1291
|
.border-t-transparent {
|
|
1269
1292
|
border-top-color: transparent;
|
|
1270
1293
|
}
|
|
@@ -1379,6 +1402,12 @@
|
|
|
1379
1402
|
background-color: color-mix(in oklab, var(--color-blue-900) 40%, transparent);
|
|
1380
1403
|
}
|
|
1381
1404
|
}
|
|
1405
|
+
.bg-blue-900\/50 {
|
|
1406
|
+
background-color: color-mix(in srgb, oklch(37.9% 0.146 265.522) 50%, transparent);
|
|
1407
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1408
|
+
background-color: color-mix(in oklab, var(--color-blue-900) 50%, transparent);
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1382
1411
|
.bg-emerald-500\/15 {
|
|
1383
1412
|
background-color: color-mix(in srgb, oklch(69.6% 0.17 162.48) 15%, transparent);
|
|
1384
1413
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1415,6 +1444,12 @@
|
|
|
1415
1444
|
.bg-gray-700 {
|
|
1416
1445
|
background-color: var(--color-gray-700);
|
|
1417
1446
|
}
|
|
1447
|
+
.bg-gray-700\/60 {
|
|
1448
|
+
background-color: color-mix(in srgb, oklch(37.3% 0.034 259.733) 60%, transparent);
|
|
1449
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1450
|
+
background-color: color-mix(in oklab, var(--color-gray-700) 60%, transparent);
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1418
1453
|
.bg-gray-800 {
|
|
1419
1454
|
background-color: var(--color-gray-800);
|
|
1420
1455
|
}
|
|
@@ -1511,6 +1546,12 @@
|
|
|
1511
1546
|
background-color: color-mix(in oklab, var(--color-red-500) 10%, transparent);
|
|
1512
1547
|
}
|
|
1513
1548
|
}
|
|
1549
|
+
.bg-red-500\/15 {
|
|
1550
|
+
background-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 15%, transparent);
|
|
1551
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1552
|
+
background-color: color-mix(in oklab, var(--color-red-500) 15%, transparent);
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1514
1555
|
.bg-red-600 {
|
|
1515
1556
|
background-color: var(--color-red-600);
|
|
1516
1557
|
}
|
|
@@ -1678,6 +1719,9 @@
|
|
|
1678
1719
|
.px-2 {
|
|
1679
1720
|
padding-inline: calc(var(--spacing) * 2);
|
|
1680
1721
|
}
|
|
1722
|
+
.px-2\.5 {
|
|
1723
|
+
padding-inline: calc(var(--spacing) * 2.5);
|
|
1724
|
+
}
|
|
1681
1725
|
.px-3 {
|
|
1682
1726
|
padding-inline: calc(var(--spacing) * 3);
|
|
1683
1727
|
}
|
|
@@ -1774,6 +1818,9 @@
|
|
|
1774
1818
|
.pb-4 {
|
|
1775
1819
|
padding-bottom: calc(var(--spacing) * 4);
|
|
1776
1820
|
}
|
|
1821
|
+
.pb-6 {
|
|
1822
|
+
padding-bottom: calc(var(--spacing) * 6);
|
|
1823
|
+
}
|
|
1777
1824
|
.pb-8 {
|
|
1778
1825
|
padding-bottom: calc(var(--spacing) * 8);
|
|
1779
1826
|
}
|
|
@@ -1856,6 +1903,9 @@
|
|
|
1856
1903
|
.text-\[11px\] {
|
|
1857
1904
|
font-size: 11px;
|
|
1858
1905
|
}
|
|
1906
|
+
.text-\[13px\] {
|
|
1907
|
+
font-size: 13px;
|
|
1908
|
+
}
|
|
1859
1909
|
.leading-none {
|
|
1860
1910
|
--tw-leading: 1;
|
|
1861
1911
|
line-height: 1;
|
|
@@ -1941,9 +1991,6 @@
|
|
|
1941
1991
|
.text-blue-600 {
|
|
1942
1992
|
color: var(--color-blue-600);
|
|
1943
1993
|
}
|
|
1944
|
-
.text-blue-700 {
|
|
1945
|
-
color: var(--color-blue-700);
|
|
1946
|
-
}
|
|
1947
1994
|
.text-blue-800 {
|
|
1948
1995
|
color: var(--color-blue-800);
|
|
1949
1996
|
}
|
|
@@ -2194,6 +2241,10 @@
|
|
|
2194
2241
|
--tw-duration: 300ms;
|
|
2195
2242
|
transition-duration: 300ms;
|
|
2196
2243
|
}
|
|
2244
|
+
.duration-500 {
|
|
2245
|
+
--tw-duration: 500ms;
|
|
2246
|
+
transition-duration: 500ms;
|
|
2247
|
+
}
|
|
2197
2248
|
.duration-1000 {
|
|
2198
2249
|
--tw-duration: 1000ms;
|
|
2199
2250
|
transition-duration: 1000ms;
|
|
@@ -2202,6 +2253,10 @@
|
|
|
2202
2253
|
--tw-ease: var(--ease-in-out);
|
|
2203
2254
|
transition-timing-function: var(--ease-in-out);
|
|
2204
2255
|
}
|
|
2256
|
+
.ease-out {
|
|
2257
|
+
--tw-ease: var(--ease-out);
|
|
2258
|
+
transition-timing-function: var(--ease-out);
|
|
2259
|
+
}
|
|
2205
2260
|
.group-hover\:pointer-events-auto {
|
|
2206
2261
|
&:is(:where(.group):hover *) {
|
|
2207
2262
|
@media (hover: hover) {
|
|
@@ -2808,6 +2863,11 @@
|
|
|
2808
2863
|
height: calc(var(--spacing) * 44);
|
|
2809
2864
|
}
|
|
2810
2865
|
}
|
|
2866
|
+
.sm\:h-64 {
|
|
2867
|
+
@media (width >= 40rem) {
|
|
2868
|
+
height: calc(var(--spacing) * 64);
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2811
2871
|
.sm\:w-4 {
|
|
2812
2872
|
@media (width >= 40rem) {
|
|
2813
2873
|
width: calc(var(--spacing) * 4);
|
|
@@ -2918,11 +2978,22 @@
|
|
|
2918
2978
|
padding-block: calc(var(--spacing) * 3);
|
|
2919
2979
|
}
|
|
2920
2980
|
}
|
|
2981
|
+
.sm\:py-6 {
|
|
2982
|
+
@media (width >= 40rem) {
|
|
2983
|
+
padding-block: calc(var(--spacing) * 6);
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2921
2986
|
.sm\:text-left {
|
|
2922
2987
|
@media (width >= 40rem) {
|
|
2923
2988
|
text-align: left;
|
|
2924
2989
|
}
|
|
2925
2990
|
}
|
|
2991
|
+
.sm\:text-2xl {
|
|
2992
|
+
@media (width >= 40rem) {
|
|
2993
|
+
font-size: var(--text-2xl);
|
|
2994
|
+
line-height: var(--tw-leading, var(--text-2xl--line-height));
|
|
2995
|
+
}
|
|
2996
|
+
}
|
|
2926
2997
|
.sm\:text-base {
|
|
2927
2998
|
@media (width >= 40rem) {
|
|
2928
2999
|
font-size: var(--text-base);
|
|
@@ -3149,26 +3220,11 @@
|
|
|
3149
3220
|
grid-column: span 2 / span 2;
|
|
3150
3221
|
}
|
|
3151
3222
|
}
|
|
3152
|
-
.lg\:grid {
|
|
3153
|
-
@media (width >= 64rem) {
|
|
3154
|
-
display: grid;
|
|
3155
|
-
}
|
|
3156
|
-
}
|
|
3157
|
-
.lg\:hidden {
|
|
3158
|
-
@media (width >= 64rem) {
|
|
3159
|
-
display: none;
|
|
3160
|
-
}
|
|
3161
|
-
}
|
|
3162
3223
|
.lg\:table-cell {
|
|
3163
3224
|
@media (width >= 64rem) {
|
|
3164
3225
|
display: table-cell;
|
|
3165
3226
|
}
|
|
3166
3227
|
}
|
|
3167
|
-
.lg\:grid-cols-2 {
|
|
3168
|
-
@media (width >= 64rem) {
|
|
3169
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
3170
|
-
}
|
|
3171
|
-
}
|
|
3172
3228
|
.lg\:grid-cols-3 {
|
|
3173
3229
|
@media (width >= 64rem) {
|
|
3174
3230
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
@@ -3214,11 +3270,6 @@
|
|
|
3214
3270
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
3215
3271
|
}
|
|
3216
3272
|
}
|
|
3217
|
-
.dark\:border-blue-400 {
|
|
3218
|
-
@media (prefers-color-scheme: dark) {
|
|
3219
|
-
border-color: var(--color-blue-400);
|
|
3220
|
-
}
|
|
3221
|
-
}
|
|
3222
3273
|
.dark\:border-gray-600 {
|
|
3223
3274
|
@media (prefers-color-scheme: dark) {
|
|
3224
3275
|
border-color: var(--color-gray-600);
|
|
@@ -3610,6 +3661,214 @@
|
|
|
3610
3661
|
}
|
|
3611
3662
|
}
|
|
3612
3663
|
}
|
|
3664
|
+
.hive-post-body {
|
|
3665
|
+
color: #e5e7eb;
|
|
3666
|
+
font-size: 1rem;
|
|
3667
|
+
line-height: 1.75;
|
|
3668
|
+
word-break: break-word;
|
|
3669
|
+
overflow-wrap: break-word;
|
|
3670
|
+
}
|
|
3671
|
+
.hive-post-body h1, .hive-post-body h2, .hive-post-body h3, .hive-post-body h4, .hive-post-body h5, .hive-post-body h6 {
|
|
3672
|
+
color: #fff;
|
|
3673
|
+
font-weight: 700;
|
|
3674
|
+
margin-top: 1.5em;
|
|
3675
|
+
margin-bottom: 0.5em;
|
|
3676
|
+
line-height: 1.3;
|
|
3677
|
+
}
|
|
3678
|
+
.hive-post-body h1 {
|
|
3679
|
+
font-size: 1.875rem;
|
|
3680
|
+
}
|
|
3681
|
+
.hive-post-body h2 {
|
|
3682
|
+
font-size: 1.5rem;
|
|
3683
|
+
}
|
|
3684
|
+
.hive-post-body h3 {
|
|
3685
|
+
font-size: 1.25rem;
|
|
3686
|
+
}
|
|
3687
|
+
.hive-post-body h4 {
|
|
3688
|
+
font-size: 1.125rem;
|
|
3689
|
+
}
|
|
3690
|
+
.hive-post-body p {
|
|
3691
|
+
color: #d1d5db;
|
|
3692
|
+
margin-bottom: 1em;
|
|
3693
|
+
line-height: 1.75;
|
|
3694
|
+
}
|
|
3695
|
+
.hive-post-body a {
|
|
3696
|
+
color: #60a5fa;
|
|
3697
|
+
text-decoration: none;
|
|
3698
|
+
transition: color 0.15s;
|
|
3699
|
+
}
|
|
3700
|
+
.hive-post-body a:hover {
|
|
3701
|
+
color: #93bbfd;
|
|
3702
|
+
text-decoration: underline;
|
|
3703
|
+
}
|
|
3704
|
+
.hive-post-body img {
|
|
3705
|
+
max-width: 100%;
|
|
3706
|
+
height: auto;
|
|
3707
|
+
border-radius: 0.75rem;
|
|
3708
|
+
margin: 1rem auto;
|
|
3709
|
+
display: block;
|
|
3710
|
+
}
|
|
3711
|
+
.hive-post-body blockquote {
|
|
3712
|
+
border-left: 4px solid #3b82f680;
|
|
3713
|
+
background: #1f293780;
|
|
3714
|
+
padding: 0.75rem 1rem;
|
|
3715
|
+
margin: 1rem 0;
|
|
3716
|
+
border-radius: 0 0.5rem 0.5rem 0;
|
|
3717
|
+
color: #d1d5db;
|
|
3718
|
+
font-style: italic;
|
|
3719
|
+
}
|
|
3720
|
+
.hive-post-body blockquote p {
|
|
3721
|
+
margin-bottom: 0.25em;
|
|
3722
|
+
}
|
|
3723
|
+
.hive-post-body ul, .hive-post-body ol {
|
|
3724
|
+
padding-left: 1.5em;
|
|
3725
|
+
margin-bottom: 1em;
|
|
3726
|
+
color: #d1d5db;
|
|
3727
|
+
}
|
|
3728
|
+
.hive-post-body ul {
|
|
3729
|
+
list-style: disc;
|
|
3730
|
+
}
|
|
3731
|
+
.hive-post-body ol {
|
|
3732
|
+
list-style: decimal;
|
|
3733
|
+
}
|
|
3734
|
+
.hive-post-body li {
|
|
3735
|
+
margin-bottom: 0.25em;
|
|
3736
|
+
line-height: 1.65;
|
|
3737
|
+
}
|
|
3738
|
+
.hive-post-body li > ul, .hive-post-body li > ol {
|
|
3739
|
+
margin-top: 0.25em;
|
|
3740
|
+
margin-bottom: 0;
|
|
3741
|
+
}
|
|
3742
|
+
.hive-post-body code {
|
|
3743
|
+
color: #f472b6;
|
|
3744
|
+
background: #1f2937;
|
|
3745
|
+
padding: 0.15em 0.4em;
|
|
3746
|
+
border-radius: 0.25rem;
|
|
3747
|
+
font-size: 0.875em;
|
|
3748
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
3749
|
+
}
|
|
3750
|
+
.hive-post-body pre {
|
|
3751
|
+
background: #111827;
|
|
3752
|
+
border: 1px solid #374151;
|
|
3753
|
+
border-radius: 0.75rem;
|
|
3754
|
+
padding: 1rem 1.25rem;
|
|
3755
|
+
overflow-x: auto;
|
|
3756
|
+
margin: 1rem 0;
|
|
3757
|
+
font-size: 0.875rem;
|
|
3758
|
+
line-height: 1.6;
|
|
3759
|
+
}
|
|
3760
|
+
.hive-post-body pre code {
|
|
3761
|
+
color: #e5e7eb;
|
|
3762
|
+
background: transparent;
|
|
3763
|
+
padding: 0;
|
|
3764
|
+
border-radius: 0;
|
|
3765
|
+
font-size: inherit;
|
|
3766
|
+
}
|
|
3767
|
+
.hive-post-body hr {
|
|
3768
|
+
border: none;
|
|
3769
|
+
border-top: 1px solid #374151;
|
|
3770
|
+
margin: 1.5rem 0;
|
|
3771
|
+
}
|
|
3772
|
+
.hive-post-body table {
|
|
3773
|
+
width: 100%;
|
|
3774
|
+
border-collapse: collapse;
|
|
3775
|
+
margin: 1rem 0;
|
|
3776
|
+
font-size: 0.875rem;
|
|
3777
|
+
}
|
|
3778
|
+
.hive-post-body th {
|
|
3779
|
+
background: #1f2937;
|
|
3780
|
+
color: #e5e7eb;
|
|
3781
|
+
padding: 0.5rem 0.75rem;
|
|
3782
|
+
text-align: left;
|
|
3783
|
+
font-weight: 600;
|
|
3784
|
+
border-bottom: 2px solid #374151;
|
|
3785
|
+
}
|
|
3786
|
+
.hive-post-body td {
|
|
3787
|
+
padding: 0.5rem 0.75rem;
|
|
3788
|
+
border-bottom: 1px solid #1f2937;
|
|
3789
|
+
color: #d1d5db;
|
|
3790
|
+
}
|
|
3791
|
+
.hive-post-body tr:hover td {
|
|
3792
|
+
background: #1f293740;
|
|
3793
|
+
}
|
|
3794
|
+
.hive-post-body strong, .hive-post-body b {
|
|
3795
|
+
color: #fff;
|
|
3796
|
+
font-weight: 700;
|
|
3797
|
+
}
|
|
3798
|
+
.hive-post-body em, .hive-post-body i {
|
|
3799
|
+
color: #d1d5db;
|
|
3800
|
+
}
|
|
3801
|
+
.hive-post-body iframe {
|
|
3802
|
+
width: 100%;
|
|
3803
|
+
max-width: 100%;
|
|
3804
|
+
aspect-ratio: 16 / 9;
|
|
3805
|
+
border: none;
|
|
3806
|
+
border-radius: 0.75rem;
|
|
3807
|
+
margin: 1rem 0;
|
|
3808
|
+
}
|
|
3809
|
+
.hive-post-body .videoWrapper, .hive-post-body .embed-responsive {
|
|
3810
|
+
position: relative;
|
|
3811
|
+
padding-bottom: 56.25%;
|
|
3812
|
+
height: 0;
|
|
3813
|
+
overflow: hidden;
|
|
3814
|
+
border-radius: 0.75rem;
|
|
3815
|
+
margin: 1rem 0;
|
|
3816
|
+
}
|
|
3817
|
+
.hive-post-body .videoWrapper iframe, .hive-post-body .embed-responsive iframe {
|
|
3818
|
+
position: absolute;
|
|
3819
|
+
top: 0;
|
|
3820
|
+
left: 0;
|
|
3821
|
+
width: 100%;
|
|
3822
|
+
height: 100%;
|
|
3823
|
+
border-radius: 0.75rem;
|
|
3824
|
+
margin: 0;
|
|
3825
|
+
}
|
|
3826
|
+
.hive-post-body > :first-child {
|
|
3827
|
+
margin-top: 0;
|
|
3828
|
+
}
|
|
3829
|
+
.hive-post-body > :last-child {
|
|
3830
|
+
margin-bottom: 0;
|
|
3831
|
+
}
|
|
3832
|
+
.hive-post-body center, .hive-post-body .text-center {
|
|
3833
|
+
text-align: center;
|
|
3834
|
+
}
|
|
3835
|
+
.hive-post-body center img {
|
|
3836
|
+
margin-left: auto;
|
|
3837
|
+
margin-right: auto;
|
|
3838
|
+
}
|
|
3839
|
+
.hive-post-body .hive-img-figure {
|
|
3840
|
+
margin: 1.25rem 0;
|
|
3841
|
+
text-align: center;
|
|
3842
|
+
}
|
|
3843
|
+
.hive-post-body .hive-img-figure img {
|
|
3844
|
+
margin-bottom: 0.375rem;
|
|
3845
|
+
}
|
|
3846
|
+
.hive-post-body .hive-img-figure figcaption {
|
|
3847
|
+
color: #9ca3af;
|
|
3848
|
+
font-size: 0.8125rem;
|
|
3849
|
+
font-style: italic;
|
|
3850
|
+
line-height: 1.4;
|
|
3851
|
+
padding: 0 1rem;
|
|
3852
|
+
}
|
|
3853
|
+
@media (max-width: 640px) {
|
|
3854
|
+
.hive-post-body {
|
|
3855
|
+
font-size: 0.9375rem;
|
|
3856
|
+
line-height: 1.65;
|
|
3857
|
+
}
|
|
3858
|
+
.hive-post-body h1 {
|
|
3859
|
+
font-size: 1.5rem;
|
|
3860
|
+
}
|
|
3861
|
+
.hive-post-body h2 {
|
|
3862
|
+
font-size: 1.25rem;
|
|
3863
|
+
}
|
|
3864
|
+
.hive-post-body h3 {
|
|
3865
|
+
font-size: 1.125rem;
|
|
3866
|
+
}
|
|
3867
|
+
.hive-post-body pre {
|
|
3868
|
+
padding: 0.75rem;
|
|
3869
|
+
font-size: 0.8125rem;
|
|
3870
|
+
}
|
|
3871
|
+
}
|
|
3613
3872
|
@property --tw-translate-x {
|
|
3614
3873
|
syntax: "*";
|
|
3615
3874
|
inherits: false;
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
interface HiveDetailPostProps {
|
|
1
|
+
export interface HiveDetailPostProps {
|
|
3
2
|
author: string;
|
|
4
3
|
permlink: string;
|
|
5
4
|
currentUser?: string;
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
onUpvote?: (percent: number) => void | Promise<void>;
|
|
6
|
+
onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | Promise<void>;
|
|
8
7
|
onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
9
|
-
|
|
8
|
+
onReblog?: () => void;
|
|
9
|
+
onShare?: () => void;
|
|
10
|
+
onTip?: () => void;
|
|
11
|
+
onReport?: () => void;
|
|
12
|
+
ecencyToken?: string;
|
|
13
|
+
threeSpeakApiKey?: string;
|
|
14
|
+
giphyApiKey?: string;
|
|
15
|
+
templateToken?: string;
|
|
16
|
+
templateApiBaseUrl?: string;
|
|
17
|
+
onBack?: () => void;
|
|
18
|
+
onUserClick?: (username: string) => void;
|
|
10
19
|
}
|
|
11
|
-
export declare function HiveDetailPost({ author, permlink, currentUser,
|
|
12
|
-
export
|
|
20
|
+
export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, onBack, onUserClick, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default HiveDetailPost;
|
|
@@ -8,7 +8,7 @@ export { default as ProposalsList } from './ProposalsList';
|
|
|
8
8
|
export { default as FollowersList } from './FollowersList';
|
|
9
9
|
export { default as FollowingList } from './FollowingList';
|
|
10
10
|
export { default as ActivityList } from './ActivityList';
|
|
11
|
-
export { HiveDetailPost } from './HiveDetailPost';
|
|
11
|
+
export { HiveDetailPost, type HiveDetailPostProps } from './HiveDetailPost';
|
|
12
12
|
export { default as HiveToolbar, type HiveToolbarProps } from './HiveToolbar';
|
|
13
13
|
export { default as FavouriteWidget } from './common/FavouriteWidget';
|
|
14
14
|
export { default as CommunitiesList } from './community/CommunitiesList';
|
|
@@ -48,6 +48,6 @@ export interface UserDetailProfileProps {
|
|
|
48
48
|
onShare?: (username: string) => void;
|
|
49
49
|
onSharePost?: (author: string, permlink: string) => void;
|
|
50
50
|
}
|
|
51
|
-
type TabType = "blogs" | "posts" | "snaps" | "polls" | "comments" | "replies" | "activities" | "authorRewards" | "curationRewards" | "followers" | "following" | "wallet";
|
|
51
|
+
type TabType = "blogs" | "posts" | "snaps" | "polls" | "comments" | "replies" | "activities" | "authorRewards" | "curationRewards" | "followers" | "following" | "wallet" | "votingPower" | "badges" | "witnessVotes";
|
|
52
52
|
declare const UserDetailProfile: React.FC<UserDetailProfileProps>;
|
|
53
53
|
export default UserDetailProfile;
|