hive-react-kit 0.9.6 → 0.9.7
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 +136 -7
- package/dist/components/BlogPostList.d.ts +57 -0
- package/dist/components/community/CommunitiesList.d.ts +1 -0
- package/dist/components/community/CommunityDetail.d.ts +26 -10
- package/dist/index.cjs.js +77 -79
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +8029 -7673
- package/package.json +1 -1
package/dist/build.css
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
--color-purple-700: oklch(49.6% 0.265 301.924);
|
|
66
66
|
--color-purple-800: oklch(43.8% 0.218 303.724);
|
|
67
67
|
--color-purple-900: oklch(38.1% 0.176 304.987);
|
|
68
|
+
--color-pink-400: oklch(71.8% 0.202 349.761);
|
|
68
69
|
--color-rose-400: oklch(71.2% 0.194 13.428);
|
|
69
70
|
--color-slate-50: oklch(98.4% 0.003 247.858);
|
|
70
71
|
--color-slate-800: oklch(27.9% 0.041 260.031);
|
|
@@ -833,9 +834,15 @@
|
|
|
833
834
|
.w-4\/5 {
|
|
834
835
|
width: calc(4 / 5 * 100%);
|
|
835
836
|
}
|
|
837
|
+
.w-4\/6 {
|
|
838
|
+
width: calc(4 / 6 * 100%);
|
|
839
|
+
}
|
|
836
840
|
.w-5 {
|
|
837
841
|
width: calc(var(--spacing) * 5);
|
|
838
842
|
}
|
|
843
|
+
.w-5\/6 {
|
|
844
|
+
width: calc(5 / 6 * 100%);
|
|
845
|
+
}
|
|
839
846
|
.w-6 {
|
|
840
847
|
width: calc(var(--spacing) * 6);
|
|
841
848
|
}
|
|
@@ -851,6 +858,9 @@
|
|
|
851
858
|
.w-10 {
|
|
852
859
|
width: calc(var(--spacing) * 10);
|
|
853
860
|
}
|
|
861
|
+
.w-11\/12 {
|
|
862
|
+
width: calc(11 / 12 * 100%);
|
|
863
|
+
}
|
|
854
864
|
.w-12 {
|
|
855
865
|
width: calc(var(--spacing) * 12);
|
|
856
866
|
}
|
|
@@ -1108,6 +1118,13 @@
|
|
|
1108
1118
|
margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
|
|
1109
1119
|
}
|
|
1110
1120
|
}
|
|
1121
|
+
.space-y-1\.5 {
|
|
1122
|
+
:where(& > :not(:last-child)) {
|
|
1123
|
+
--tw-space-y-reverse: 0;
|
|
1124
|
+
margin-block-start: calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));
|
|
1125
|
+
margin-block-end: calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)));
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1111
1128
|
.space-y-2 {
|
|
1112
1129
|
:where(& > :not(:last-child)) {
|
|
1113
1130
|
--tw-space-y-reverse: 0;
|
|
@@ -1188,6 +1205,11 @@
|
|
|
1188
1205
|
border-bottom-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
|
|
1189
1206
|
}
|
|
1190
1207
|
}
|
|
1208
|
+
.divide-\[\#3a424a\] {
|
|
1209
|
+
:where(& > :not(:last-child)) {
|
|
1210
|
+
border-color: #3a424a;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1191
1213
|
.divide-gray-700 {
|
|
1192
1214
|
:where(& > :not(:last-child)) {
|
|
1193
1215
|
border-color: var(--color-gray-700);
|
|
@@ -1218,6 +1240,9 @@
|
|
|
1218
1240
|
.overflow-y-auto {
|
|
1219
1241
|
overflow-y: auto;
|
|
1220
1242
|
}
|
|
1243
|
+
.overscroll-contain {
|
|
1244
|
+
overscroll-behavior: contain;
|
|
1245
|
+
}
|
|
1221
1246
|
.rounded {
|
|
1222
1247
|
border-radius: 0.25rem;
|
|
1223
1248
|
}
|
|
@@ -1291,6 +1316,15 @@
|
|
|
1291
1316
|
--tw-border-style: dashed;
|
|
1292
1317
|
border-style: dashed;
|
|
1293
1318
|
}
|
|
1319
|
+
.border-\[\#3a424a\] {
|
|
1320
|
+
border-color: #3a424a;
|
|
1321
|
+
}
|
|
1322
|
+
.border-\[\#3a424a\]\/60 {
|
|
1323
|
+
border-color: color-mix(in oklab, #3a424a 60%, transparent);
|
|
1324
|
+
}
|
|
1325
|
+
.border-\[\#e31337\] {
|
|
1326
|
+
border-color: #e31337;
|
|
1327
|
+
}
|
|
1294
1328
|
.border-amber-700\/40 {
|
|
1295
1329
|
border-color: color-mix(in srgb, oklch(55.5% 0.163 48.998) 40%, transparent);
|
|
1296
1330
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1423,6 +1457,24 @@
|
|
|
1423
1457
|
background-color: rgba(255, 255, 255, 0.04);
|
|
1424
1458
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
1425
1459
|
}
|
|
1460
|
+
.bg-\[\#2f353d\] {
|
|
1461
|
+
background-color: #2f353d;
|
|
1462
|
+
}
|
|
1463
|
+
.bg-\[\#2f353d\]\/70 {
|
|
1464
|
+
background-color: color-mix(in oklab, #2f353d 70%, transparent);
|
|
1465
|
+
}
|
|
1466
|
+
.bg-\[\#3a424a\] {
|
|
1467
|
+
background-color: #3a424a;
|
|
1468
|
+
}
|
|
1469
|
+
.bg-\[\#262b30\] {
|
|
1470
|
+
background-color: #262b30;
|
|
1471
|
+
}
|
|
1472
|
+
.bg-\[\#212529\] {
|
|
1473
|
+
background-color: #212529;
|
|
1474
|
+
}
|
|
1475
|
+
.bg-\[\#e31337\] {
|
|
1476
|
+
background-color: #e31337;
|
|
1477
|
+
}
|
|
1426
1478
|
.bg-amber-500\/15 {
|
|
1427
1479
|
background-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 15%, transparent);
|
|
1428
1480
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1741,6 +1793,12 @@
|
|
|
1741
1793
|
.bg-red-900 {
|
|
1742
1794
|
background-color: var(--color-red-900);
|
|
1743
1795
|
}
|
|
1796
|
+
.bg-red-900\/20 {
|
|
1797
|
+
background-color: color-mix(in srgb, oklch(39.6% 0.141 25.723) 20%, transparent);
|
|
1798
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1799
|
+
background-color: color-mix(in oklab, var(--color-red-900) 20%, transparent);
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1744
1802
|
.bg-sky-500\/20 {
|
|
1745
1803
|
background-color: color-mix(in srgb, oklch(68.5% 0.169 237.323) 20%, transparent);
|
|
1746
1804
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -1976,6 +2034,9 @@
|
|
|
1976
2034
|
.py-8 {
|
|
1977
2035
|
padding-block: calc(var(--spacing) * 8);
|
|
1978
2036
|
}
|
|
2037
|
+
.py-10 {
|
|
2038
|
+
padding-block: calc(var(--spacing) * 10);
|
|
2039
|
+
}
|
|
1979
2040
|
.py-12 {
|
|
1980
2041
|
padding-block: calc(var(--spacing) * 12);
|
|
1981
2042
|
}
|
|
@@ -2173,6 +2234,24 @@
|
|
|
2173
2234
|
.whitespace-pre-wrap {
|
|
2174
2235
|
white-space: pre-wrap;
|
|
2175
2236
|
}
|
|
2237
|
+
.text-\[\#3a424a\] {
|
|
2238
|
+
color: #3a424a;
|
|
2239
|
+
}
|
|
2240
|
+
.text-\[\#6f7780\] {
|
|
2241
|
+
color: #6f7780;
|
|
2242
|
+
}
|
|
2243
|
+
.text-\[\#9ca3b0\] {
|
|
2244
|
+
color: #9ca3b0;
|
|
2245
|
+
}
|
|
2246
|
+
.text-\[\#e7e7f1\] {
|
|
2247
|
+
color: #e7e7f1;
|
|
2248
|
+
}
|
|
2249
|
+
.text-\[\#e31337\] {
|
|
2250
|
+
color: #e31337;
|
|
2251
|
+
}
|
|
2252
|
+
.text-\[\#f0f0f8\] {
|
|
2253
|
+
color: #f0f0f8;
|
|
2254
|
+
}
|
|
2176
2255
|
.text-amber-300 {
|
|
2177
2256
|
color: var(--color-amber-300);
|
|
2178
2257
|
}
|
|
@@ -2263,6 +2342,9 @@
|
|
|
2263
2342
|
.text-orange-400 {
|
|
2264
2343
|
color: var(--color-orange-400);
|
|
2265
2344
|
}
|
|
2345
|
+
.text-pink-400 {
|
|
2346
|
+
color: var(--color-pink-400);
|
|
2347
|
+
}
|
|
2266
2348
|
.text-purple-200 {
|
|
2267
2349
|
color: var(--color-purple-200);
|
|
2268
2350
|
}
|
|
@@ -2348,6 +2430,11 @@
|
|
|
2348
2430
|
.underline {
|
|
2349
2431
|
text-decoration-line: underline;
|
|
2350
2432
|
}
|
|
2433
|
+
.placeholder-\[\#9ca3b0\] {
|
|
2434
|
+
&::placeholder {
|
|
2435
|
+
color: #9ca3b0;
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2351
2438
|
.placeholder-gray-400 {
|
|
2352
2439
|
&::placeholder {
|
|
2353
2440
|
color: var(--color-gray-400);
|
|
@@ -2621,6 +2708,13 @@
|
|
|
2621
2708
|
}
|
|
2622
2709
|
}
|
|
2623
2710
|
}
|
|
2711
|
+
.hover\:border-\[\#e31337\] {
|
|
2712
|
+
&:hover {
|
|
2713
|
+
@media (hover: hover) {
|
|
2714
|
+
border-color: #e31337;
|
|
2715
|
+
}
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2624
2718
|
.hover\:border-blue-500 {
|
|
2625
2719
|
&:hover {
|
|
2626
2720
|
@media (hover: hover) {
|
|
@@ -2645,6 +2739,20 @@
|
|
|
2645
2739
|
}
|
|
2646
2740
|
}
|
|
2647
2741
|
}
|
|
2742
|
+
.hover\:bg-\[\#2f353d\] {
|
|
2743
|
+
&:hover {
|
|
2744
|
+
@media (hover: hover) {
|
|
2745
|
+
background-color: #2f353d;
|
|
2746
|
+
}
|
|
2747
|
+
}
|
|
2748
|
+
}
|
|
2749
|
+
.hover\:bg-\[\#262b30\] {
|
|
2750
|
+
&:hover {
|
|
2751
|
+
@media (hover: hover) {
|
|
2752
|
+
background-color: #262b30;
|
|
2753
|
+
}
|
|
2754
|
+
}
|
|
2755
|
+
}
|
|
2648
2756
|
.hover\:bg-black\/60 {
|
|
2649
2757
|
&:hover {
|
|
2650
2758
|
@media (hover: hover) {
|
|
@@ -2799,13 +2907,6 @@
|
|
|
2799
2907
|
}
|
|
2800
2908
|
}
|
|
2801
2909
|
}
|
|
2802
|
-
.hover\:bg-slate-800 {
|
|
2803
|
-
&:hover {
|
|
2804
|
-
@media (hover: hover) {
|
|
2805
|
-
background-color: var(--color-slate-800);
|
|
2806
|
-
}
|
|
2807
|
-
}
|
|
2808
|
-
}
|
|
2809
2910
|
.hover\:bg-white\/20 {
|
|
2810
2911
|
&:hover {
|
|
2811
2912
|
@media (hover: hover) {
|
|
@@ -2852,6 +2953,20 @@
|
|
|
2852
2953
|
}
|
|
2853
2954
|
}
|
|
2854
2955
|
}
|
|
2956
|
+
.hover\:text-\[\#e31337\] {
|
|
2957
|
+
&:hover {
|
|
2958
|
+
@media (hover: hover) {
|
|
2959
|
+
color: #e31337;
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
}
|
|
2963
|
+
.hover\:text-\[\#f0f0f8\] {
|
|
2964
|
+
&:hover {
|
|
2965
|
+
@media (hover: hover) {
|
|
2966
|
+
color: #f0f0f8;
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
}
|
|
2855
2970
|
.hover\:text-blue-300 {
|
|
2856
2971
|
&:hover {
|
|
2857
2972
|
@media (hover: hover) {
|
|
@@ -3012,6 +3127,11 @@
|
|
|
3012
3127
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
3013
3128
|
}
|
|
3014
3129
|
}
|
|
3130
|
+
.focus\:ring-\[\#e31337\] {
|
|
3131
|
+
&:focus {
|
|
3132
|
+
--tw-ring-color: #e31337;
|
|
3133
|
+
}
|
|
3134
|
+
}
|
|
3015
3135
|
.focus\:ring-blue-500 {
|
|
3016
3136
|
&:focus {
|
|
3017
3137
|
--tw-ring-color: var(--color-blue-500);
|
|
@@ -3829,6 +3949,15 @@
|
|
|
3829
3949
|
}
|
|
3830
3950
|
}
|
|
3831
3951
|
}
|
|
3952
|
+
.dark\:hover\:bg-\[\#2f353d\] {
|
|
3953
|
+
@media (prefers-color-scheme: dark) {
|
|
3954
|
+
&:hover {
|
|
3955
|
+
@media (hover: hover) {
|
|
3956
|
+
background-color: #2f353d;
|
|
3957
|
+
}
|
|
3958
|
+
}
|
|
3959
|
+
}
|
|
3960
|
+
}
|
|
3832
3961
|
.dark\:hover\:bg-gray-600 {
|
|
3833
3962
|
@media (prefers-color-scheme: dark) {
|
|
3834
3963
|
&:hover {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standalone "Blogs" feed list — same per-post card layout as the Blogs tab
|
|
3
|
+
* in <UserDetailProfile/>, but accepts a `posts: Post[]` array directly so
|
|
4
|
+
* the consumer owns the data source (per-user blogs, global trending,
|
|
5
|
+
* tag-filtered, search results, etc.).
|
|
6
|
+
*
|
|
7
|
+
* Cards render: avatar + side image carousel + author/time + title + body
|
|
8
|
+
* preview + community tag, and a <PostActionButton/> action bar at the
|
|
9
|
+
* bottom (upvote / comment / reblog / share / tip / report).
|
|
10
|
+
*
|
|
11
|
+
* Helpers (`formatTimeAgo`, `extractPlainText`, `PostImageCarousel`) are
|
|
12
|
+
* inlined here to keep the component self-contained — they mirror the
|
|
13
|
+
* implementations in UserDetailProfile and can be lifted to a shared util
|
|
14
|
+
* module later if more lists need them.
|
|
15
|
+
*/
|
|
16
|
+
import { type FC } from 'react';
|
|
17
|
+
import type { Post } from '@/types/post';
|
|
18
|
+
import type { RewardOption } from '../utils/commentOptions';
|
|
19
|
+
export interface BlogPostListProps {
|
|
20
|
+
/** Post records, in the order they should render. */
|
|
21
|
+
posts: Post[];
|
|
22
|
+
/** Logged-in username (used by the action bar's auth-gated buttons). */
|
|
23
|
+
currentUser?: string;
|
|
24
|
+
/** Initial-page loader spinner. */
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
/** Pagination loader (shown at the bottom while fetching the next page). */
|
|
27
|
+
loadingMore?: boolean;
|
|
28
|
+
/** True when more pages are available. Drives "Load more" + observer. */
|
|
29
|
+
hasMore?: boolean;
|
|
30
|
+
/** Called when the user requests the next page (button click or scroll). */
|
|
31
|
+
onLoadMore?: () => void;
|
|
32
|
+
/** Optional empty-state message override. */
|
|
33
|
+
emptyMessage?: string;
|
|
34
|
+
onUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
35
|
+
onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | Promise<void>;
|
|
36
|
+
onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
37
|
+
onReblog?: (author: string, permlink: string) => void;
|
|
38
|
+
onTip?: (author: string, permlink: string) => void;
|
|
39
|
+
onSharePost?: (author: string, permlink: string) => void;
|
|
40
|
+
onCommentClick?: (author: string, permlink: string) => void;
|
|
41
|
+
onReportPost?: (author: string, permlink: string) => void;
|
|
42
|
+
onUserClick?: (username: string) => void;
|
|
43
|
+
onPostClick?: (author: string, permlink: string, title?: string) => void;
|
|
44
|
+
ecencyToken?: string;
|
|
45
|
+
threeSpeakApiKey?: string;
|
|
46
|
+
giphyApiKey?: string;
|
|
47
|
+
templateToken?: string;
|
|
48
|
+
templateApiBaseUrl?: string;
|
|
49
|
+
defaultVotePercent?: number;
|
|
50
|
+
voteWeightStep?: number;
|
|
51
|
+
/** Allow landscape video uploads in the inline comment composer. */
|
|
52
|
+
allowLandscapeVideos?: boolean;
|
|
53
|
+
/** Default reward routing for inline comment composers. */
|
|
54
|
+
defaultReward?: RewardOption;
|
|
55
|
+
}
|
|
56
|
+
export declare const BlogPostList: FC<BlogPostListProps>;
|
|
57
|
+
export default BlogPostList;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface CommunitiesListProps {
|
|
2
2
|
onSelectCommunity: (communityId: string) => void;
|
|
3
|
+
/** Visual variant. Default `"dark"` — uses hivesuite Hive-red tokens. */
|
|
3
4
|
theme?: "light" | "dark";
|
|
4
5
|
}
|
|
5
6
|
declare const CommunitiesList: ({ onSelectCommunity, theme, }: CommunitiesListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
import type { RewardOption } from '../../utils/commentOptions';
|
|
2
|
+
export interface CommunityDetailProps {
|
|
3
|
+
/** Community id (e.g. `hive-167922`). */
|
|
2
4
|
communityId: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
/** Logged-in observer username — drives feed personalisation + auth-gated actions. */
|
|
6
|
+
currentUser?: string;
|
|
7
|
+
/** Back-arrow handler. */
|
|
5
8
|
onBack: () => void;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
onUserClick?: (username: string) => void;
|
|
10
|
+
onPostClick?: (author: string, permlink: string, title?: string) => void;
|
|
11
|
+
onCommentClick?: (author: string, permlink: string) => void;
|
|
12
|
+
onUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
13
|
+
onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | Promise<void>;
|
|
14
|
+
onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
15
|
+
onReblog?: (author: string, permlink: string) => void;
|
|
16
|
+
onTip?: (author: string, permlink: string) => void;
|
|
17
|
+
onSharePost?: (author: string, permlink: string) => void;
|
|
18
|
+
onReportPost?: (author: string, permlink: string) => void;
|
|
19
|
+
ecencyToken?: string;
|
|
20
|
+
threeSpeakApiKey?: string;
|
|
21
|
+
giphyApiKey?: string;
|
|
22
|
+
templateToken?: string;
|
|
23
|
+
templateApiBaseUrl?: string;
|
|
24
|
+
defaultVotePercent?: number;
|
|
25
|
+
voteWeightStep?: number;
|
|
26
|
+
allowLandscapeVideos?: boolean;
|
|
27
|
+
defaultReward?: RewardOption;
|
|
9
28
|
onShare?: () => void;
|
|
10
|
-
onFavourite?: () => void;
|
|
11
29
|
onRss?: () => void;
|
|
12
|
-
onMoreVertical?: () => void;
|
|
13
|
-
showMoreVertical?: boolean;
|
|
14
30
|
}
|
|
15
|
-
declare const CommunityDetail: ({ communityId,
|
|
31
|
+
declare const CommunityDetail: ({ communityId, currentUser, onBack, onUserClick, onPostClick, onCommentClick, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onTip, onSharePost, onReportPost, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, defaultReward, onShare, onRss, }: CommunityDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
32
|
export default CommunityDetail;
|