hive-react-kit 0.6.0 → 0.6.2
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 +83 -0
- package/dist/build.css +258 -23
- package/dist/components/HiveDetailPost.d.ts +18 -7
- package/dist/components/index.d.ts +1 -1
- package/dist/index.cjs.js +90 -89
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +6229 -5898
- package/dist/pages/HiveDetailPostPage.d.ts +2 -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,88 @@ 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
|
+
// Custom gradient background
|
|
232
|
+
<HiveDetailPost
|
|
233
|
+
author="sagarkothari88"
|
|
234
|
+
permlink="my-first-post"
|
|
235
|
+
backgroundColor={["#0f172a", "#1e293b", "#0f3460"]}
|
|
236
|
+
onUpvote={(percent) => console.log("Upvote:", percent)}
|
|
237
|
+
/>
|
|
238
|
+
|
|
239
|
+
// Full usage with all callbacks
|
|
240
|
+
<HiveDetailPost
|
|
241
|
+
author="sagarkothari88"
|
|
242
|
+
permlink="my-first-post"
|
|
243
|
+
currentUser="myusername"
|
|
244
|
+
onBack={() => navigate(-1)}
|
|
245
|
+
onUserClick={(user) => navigate(`/profile/${user}`)}
|
|
246
|
+
onUpvote={(percent) => console.log("Upvote:", percent)}
|
|
247
|
+
onSubmitComment={(pAuthor, pPermlink, body) => console.log("Comment:", body)}
|
|
248
|
+
onClickCommentUpvote={(a, p, pct) => console.log("Comment upvote:", a, p, pct)}
|
|
249
|
+
onReblog={() => console.log("Reblog")}
|
|
250
|
+
onShare={() => navigator.clipboard.writeText(`https://peakd.com/@${author}/${permlink}`)}
|
|
251
|
+
onTip={() => console.log("Tip")}
|
|
252
|
+
onReport={() => console.log("Report")}
|
|
253
|
+
ecencyToken="your-ecency-token"
|
|
254
|
+
threeSpeakApiKey="your-3speak-key"
|
|
255
|
+
giphyApiKey="your-giphy-key"
|
|
256
|
+
templateToken="your-template-token"
|
|
257
|
+
/>
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
#### HiveDetailPost Props
|
|
261
|
+
|
|
262
|
+
| Prop | Type | Default | Description |
|
|
263
|
+
|------|------|---------|-------------|
|
|
264
|
+
| `author` | `string` | *required* | Hive account name of the post author |
|
|
265
|
+
| `permlink` | `string` | *required* | Permlink of the post |
|
|
266
|
+
| `currentUser` | `string` | `undefined` | Logged-in username. Required for upvote/comment/reblog |
|
|
267
|
+
| `backgroundColor` | `string \| string[]` | `undefined` (gray-900) | Single color for solid bg, or array of colors for gradient |
|
|
268
|
+
| `onBack` | `() => void` | `undefined` | Back button callback. Hidden when not provided |
|
|
269
|
+
| `onUserClick` | `(username: string) => void` | `undefined` | Called when author avatar/name is clicked |
|
|
270
|
+
|
|
271
|
+
**Post Action Callbacks (via PostActionButton)**
|
|
272
|
+
|
|
273
|
+
| Prop | Type | Description |
|
|
274
|
+
|------|------|-------------|
|
|
275
|
+
| `onUpvote` | `(percent: number) => void \| Promise<void>` | Called when user confirms upvote with vote weight (1-100) |
|
|
276
|
+
| `onSubmitComment` | `(parentAuthor, parentPermlink, body) => void \| Promise<void>` | Called when a comment is submitted |
|
|
277
|
+
| `onClickCommentUpvote` | `(author, permlink, percent) => void \| Promise<void>` | Called when a comment is upvoted inside the comments modal |
|
|
278
|
+
| `onReblog` | `() => void` | Called when reblog is clicked |
|
|
279
|
+
| `onShare` | `() => void` | Called when share is clicked. Falls back to Web Share API / clipboard |
|
|
280
|
+
| `onTip` | `() => void` | Called when tip is clicked |
|
|
281
|
+
| `onReport` | `() => void` | Called when report is clicked |
|
|
282
|
+
|
|
283
|
+
**Comment Composer Tokens**
|
|
284
|
+
|
|
285
|
+
| Prop | Type | Description |
|
|
286
|
+
|------|------|-------------|
|
|
287
|
+
| `ecencyToken` | `string` | Ecency image hosting token — enables image upload |
|
|
288
|
+
| `threeSpeakApiKey` | `string` | 3Speak API key — enables audio/video upload |
|
|
289
|
+
| `giphyApiKey` | `string` | GIPHY API key — enables GIF search |
|
|
290
|
+
| `templateToken` | `string` | HReplier API token — enables template picker |
|
|
291
|
+
| `templateApiBaseUrl` | `string` | Custom template API endpoint |
|
|
292
|
+
|
|
293
|
+
See [docs/HiveDetailPost.md](docs/HiveDetailPost.md) for full documentation including layout diagram, content rendering details, skeleton loading, and CSS requirements.
|
|
294
|
+
|
|
212
295
|
### Toolbar Component
|
|
213
296
|
|
|
214
297
|
- **HiveToolbar** - A fixed bottom toolbar showcasing Hive ecosystem apps and witness voting links. Responsive across mobile, tablet, and desktop.
|
package/dist/build.css
CHANGED
|
@@ -745,6 +745,12 @@
|
|
|
745
745
|
.w-2 {
|
|
746
746
|
width: calc(var(--spacing) * 2);
|
|
747
747
|
}
|
|
748
|
+
.w-2\/3 {
|
|
749
|
+
width: calc(2 / 3 * 100%);
|
|
750
|
+
}
|
|
751
|
+
.w-2\/5 {
|
|
752
|
+
width: calc(2 / 5 * 100%);
|
|
753
|
+
}
|
|
748
754
|
.w-3 {
|
|
749
755
|
width: calc(var(--spacing) * 3);
|
|
750
756
|
}
|
|
@@ -790,6 +796,9 @@
|
|
|
790
796
|
.w-16 {
|
|
791
797
|
width: calc(var(--spacing) * 16);
|
|
792
798
|
}
|
|
799
|
+
.w-18 {
|
|
800
|
+
width: calc(var(--spacing) * 18);
|
|
801
|
+
}
|
|
793
802
|
.w-20 {
|
|
794
803
|
width: calc(var(--spacing) * 20);
|
|
795
804
|
}
|
|
@@ -1054,6 +1063,9 @@
|
|
|
1054
1063
|
margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));
|
|
1055
1064
|
}
|
|
1056
1065
|
}
|
|
1066
|
+
.gap-x-2 {
|
|
1067
|
+
column-gap: calc(var(--spacing) * 2);
|
|
1068
|
+
}
|
|
1057
1069
|
.gap-x-3 {
|
|
1058
1070
|
column-gap: calc(var(--spacing) * 3);
|
|
1059
1071
|
}
|
|
@@ -1167,6 +1179,10 @@
|
|
|
1167
1179
|
border-style: var(--tw-border-style);
|
|
1168
1180
|
border-width: 4px;
|
|
1169
1181
|
}
|
|
1182
|
+
.border-y {
|
|
1183
|
+
border-block-style: var(--tw-border-style);
|
|
1184
|
+
border-block-width: 1px;
|
|
1185
|
+
}
|
|
1170
1186
|
.border-t {
|
|
1171
1187
|
border-top-style: var(--tw-border-style);
|
|
1172
1188
|
border-top-width: 1px;
|
|
@@ -1386,6 +1402,12 @@
|
|
|
1386
1402
|
background-color: color-mix(in oklab, var(--color-blue-900) 40%, transparent);
|
|
1387
1403
|
}
|
|
1388
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
|
+
}
|
|
1389
1411
|
.bg-emerald-500\/15 {
|
|
1390
1412
|
background-color: color-mix(in srgb, oklch(69.6% 0.17 162.48) 15%, transparent);
|
|
1391
1413
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1422,6 +1444,12 @@
|
|
|
1422
1444
|
.bg-gray-700 {
|
|
1423
1445
|
background-color: var(--color-gray-700);
|
|
1424
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
|
+
}
|
|
1425
1453
|
.bg-gray-800 {
|
|
1426
1454
|
background-color: var(--color-gray-800);
|
|
1427
1455
|
}
|
|
@@ -1691,6 +1719,9 @@
|
|
|
1691
1719
|
.px-2 {
|
|
1692
1720
|
padding-inline: calc(var(--spacing) * 2);
|
|
1693
1721
|
}
|
|
1722
|
+
.px-2\.5 {
|
|
1723
|
+
padding-inline: calc(var(--spacing) * 2.5);
|
|
1724
|
+
}
|
|
1694
1725
|
.px-3 {
|
|
1695
1726
|
padding-inline: calc(var(--spacing) * 3);
|
|
1696
1727
|
}
|
|
@@ -1787,6 +1818,9 @@
|
|
|
1787
1818
|
.pb-4 {
|
|
1788
1819
|
padding-bottom: calc(var(--spacing) * 4);
|
|
1789
1820
|
}
|
|
1821
|
+
.pb-6 {
|
|
1822
|
+
padding-bottom: calc(var(--spacing) * 6);
|
|
1823
|
+
}
|
|
1790
1824
|
.pb-8 {
|
|
1791
1825
|
padding-bottom: calc(var(--spacing) * 8);
|
|
1792
1826
|
}
|
|
@@ -1957,9 +1991,6 @@
|
|
|
1957
1991
|
.text-blue-600 {
|
|
1958
1992
|
color: var(--color-blue-600);
|
|
1959
1993
|
}
|
|
1960
|
-
.text-blue-700 {
|
|
1961
|
-
color: var(--color-blue-700);
|
|
1962
|
-
}
|
|
1963
1994
|
.text-blue-800 {
|
|
1964
1995
|
color: var(--color-blue-800);
|
|
1965
1996
|
}
|
|
@@ -2832,6 +2863,11 @@
|
|
|
2832
2863
|
height: calc(var(--spacing) * 44);
|
|
2833
2864
|
}
|
|
2834
2865
|
}
|
|
2866
|
+
.sm\:h-64 {
|
|
2867
|
+
@media (width >= 40rem) {
|
|
2868
|
+
height: calc(var(--spacing) * 64);
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2835
2871
|
.sm\:w-4 {
|
|
2836
2872
|
@media (width >= 40rem) {
|
|
2837
2873
|
width: calc(var(--spacing) * 4);
|
|
@@ -2942,11 +2978,22 @@
|
|
|
2942
2978
|
padding-block: calc(var(--spacing) * 3);
|
|
2943
2979
|
}
|
|
2944
2980
|
}
|
|
2981
|
+
.sm\:py-6 {
|
|
2982
|
+
@media (width >= 40rem) {
|
|
2983
|
+
padding-block: calc(var(--spacing) * 6);
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2945
2986
|
.sm\:text-left {
|
|
2946
2987
|
@media (width >= 40rem) {
|
|
2947
2988
|
text-align: left;
|
|
2948
2989
|
}
|
|
2949
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
|
+
}
|
|
2950
2997
|
.sm\:text-base {
|
|
2951
2998
|
@media (width >= 40rem) {
|
|
2952
2999
|
font-size: var(--text-base);
|
|
@@ -3173,26 +3220,11 @@
|
|
|
3173
3220
|
grid-column: span 2 / span 2;
|
|
3174
3221
|
}
|
|
3175
3222
|
}
|
|
3176
|
-
.lg\:grid {
|
|
3177
|
-
@media (width >= 64rem) {
|
|
3178
|
-
display: grid;
|
|
3179
|
-
}
|
|
3180
|
-
}
|
|
3181
|
-
.lg\:hidden {
|
|
3182
|
-
@media (width >= 64rem) {
|
|
3183
|
-
display: none;
|
|
3184
|
-
}
|
|
3185
|
-
}
|
|
3186
3223
|
.lg\:table-cell {
|
|
3187
3224
|
@media (width >= 64rem) {
|
|
3188
3225
|
display: table-cell;
|
|
3189
3226
|
}
|
|
3190
3227
|
}
|
|
3191
|
-
.lg\:grid-cols-2 {
|
|
3192
|
-
@media (width >= 64rem) {
|
|
3193
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
3194
|
-
}
|
|
3195
|
-
}
|
|
3196
3228
|
.lg\:grid-cols-3 {
|
|
3197
3229
|
@media (width >= 64rem) {
|
|
3198
3230
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
@@ -3238,11 +3270,6 @@
|
|
|
3238
3270
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
3239
3271
|
}
|
|
3240
3272
|
}
|
|
3241
|
-
.dark\:border-blue-400 {
|
|
3242
|
-
@media (prefers-color-scheme: dark) {
|
|
3243
|
-
border-color: var(--color-blue-400);
|
|
3244
|
-
}
|
|
3245
|
-
}
|
|
3246
3273
|
.dark\:border-gray-600 {
|
|
3247
3274
|
@media (prefers-color-scheme: dark) {
|
|
3248
3275
|
border-color: var(--color-gray-600);
|
|
@@ -3634,6 +3661,214 @@
|
|
|
3634
3661
|
}
|
|
3635
3662
|
}
|
|
3636
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
|
+
}
|
|
3637
3872
|
@property --tw-translate-x {
|
|
3638
3873
|
syntax: "*";
|
|
3639
3874
|
inherits: false;
|
|
@@ -1,12 +1,23 @@
|
|
|
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
|
+
/** 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. */
|
|
18
|
+
backgroundColor?: string | string[];
|
|
19
|
+
onBack?: () => void;
|
|
20
|
+
onUserClick?: (username: string) => void;
|
|
10
21
|
}
|
|
11
|
-
export declare function HiveDetailPost({ author, permlink, currentUser,
|
|
12
|
-
export
|
|
22
|
+
export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, backgroundColor, onBack, onUserClick, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
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';
|