hive-react-kit 0.10.6 → 0.10.8
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 +14 -17
- package/dist/components/community/CommunityDetail.d.ts +16 -1
- package/dist/components/community/CommunitySnapsTab.d.ts +56 -0
- package/dist/components/composer/ParentPostComposer.d.ts +7 -0
- package/dist/index.cjs.js +208 -209
- package/dist/index.esm.js +25097 -25157
- package/dist/services/communityService.d.ts +33 -0
- package/package.json +1 -1
package/dist/build.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.
|
|
1
|
+
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
@@ -336,12 +336,6 @@
|
|
|
336
336
|
.inset-y-0 {
|
|
337
337
|
inset-block: calc(var(--spacing) * 0);
|
|
338
338
|
}
|
|
339
|
-
.start {
|
|
340
|
-
inset-inline-start: var(--spacing);
|
|
341
|
-
}
|
|
342
|
-
.end {
|
|
343
|
-
inset-inline-end: var(--spacing);
|
|
344
|
-
}
|
|
345
339
|
.-top-1 {
|
|
346
340
|
top: calc(var(--spacing) * -1);
|
|
347
341
|
}
|
|
@@ -666,6 +660,13 @@
|
|
|
666
660
|
.ml-auto {
|
|
667
661
|
margin-left: auto;
|
|
668
662
|
}
|
|
663
|
+
.scrollbar-hide {
|
|
664
|
+
-ms-overflow-style: none;
|
|
665
|
+
scrollbar-width: none;
|
|
666
|
+
&::-webkit-scrollbar {
|
|
667
|
+
display: none;
|
|
668
|
+
}
|
|
669
|
+
}
|
|
669
670
|
.line-clamp-2 {
|
|
670
671
|
overflow: hidden;
|
|
671
672
|
display: -webkit-box;
|
|
@@ -678,13 +679,6 @@
|
|
|
678
679
|
-webkit-box-orient: vertical;
|
|
679
680
|
-webkit-line-clamp: 6;
|
|
680
681
|
}
|
|
681
|
-
.scrollbar-hide {
|
|
682
|
-
-ms-overflow-style: none;
|
|
683
|
-
scrollbar-width: none;
|
|
684
|
-
&::-webkit-scrollbar {
|
|
685
|
-
display: none;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
682
|
.block {
|
|
689
683
|
display: block;
|
|
690
684
|
}
|
|
@@ -709,9 +703,6 @@
|
|
|
709
703
|
.table {
|
|
710
704
|
display: table;
|
|
711
705
|
}
|
|
712
|
-
.aspect-\[4\/3\] {
|
|
713
|
-
aspect-ratio: 4/3;
|
|
714
|
-
}
|
|
715
706
|
.aspect-video {
|
|
716
707
|
aspect-ratio: var(--aspect-video);
|
|
717
708
|
}
|
|
@@ -796,6 +787,9 @@
|
|
|
796
787
|
.h-\[90vh\] {
|
|
797
788
|
height: 90vh;
|
|
798
789
|
}
|
|
790
|
+
.h-\[280px\] {
|
|
791
|
+
height: 280px;
|
|
792
|
+
}
|
|
799
793
|
.h-\[400px\] {
|
|
800
794
|
height: 400px;
|
|
801
795
|
}
|
|
@@ -859,6 +853,9 @@
|
|
|
859
853
|
.max-h-\[calc\(90vh-80px\)\] {
|
|
860
854
|
max-height: calc(90vh - 80px);
|
|
861
855
|
}
|
|
856
|
+
.max-h-full {
|
|
857
|
+
max-height: 100%;
|
|
858
|
+
}
|
|
862
859
|
.max-h-screen {
|
|
863
860
|
max-height: 100vh;
|
|
864
861
|
}
|
|
@@ -29,8 +29,23 @@ export interface CommunityDetailProps {
|
|
|
29
29
|
* flag) into a single 3-dot kebab menu inside the embedded
|
|
30
30
|
* `<BlogPostList/>`. */
|
|
31
31
|
actionsAsMenu?: boolean;
|
|
32
|
+
/** @deprecated The Snaps tab now uses the kit's built-in
|
|
33
|
+
* CommunitySnapsTab (multi-container SnapsFeedView). This prop is
|
|
34
|
+
* retained for backward compatibility but no longer consumed. */
|
|
35
|
+
loadCommunitySnaps?: (communityId: string, cursor?: {
|
|
36
|
+
author: string;
|
|
37
|
+
permlink: string;
|
|
38
|
+
}) => Promise<import('@/types/post').Post[]>;
|
|
39
|
+
/** Authors the user has reported / muted — forwarded into the snaps
|
|
40
|
+
* tab so their snaps drop out of the per-card list. */
|
|
41
|
+
reportedAuthors?: string[];
|
|
42
|
+
/** Reported posts (author + permlink pairs) — same purpose. */
|
|
43
|
+
reportedPosts?: {
|
|
44
|
+
author: string;
|
|
45
|
+
permlink: string;
|
|
46
|
+
}[];
|
|
32
47
|
onShare?: () => void;
|
|
33
48
|
onRss?: () => void;
|
|
34
49
|
}
|
|
35
|
-
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, actionsAsMenu, onShare, onRss, }: CommunityDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
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, actionsAsMenu, onShare, onRss, loadCommunitySnaps: _loadCommunitySnaps, reportedAuthors, reportedPosts, }: CommunityDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
51
|
export default CommunityDetail;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CommunitySnapsTab — Snaps tab body for the community-detail page.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `ProfileSnapsTab` so a community renders the same 1-col-mobile
|
|
5
|
+
* / 4-col-desktop snaps layout as the unified Snaps page. Each of the
|
|
6
|
+
* four container types (peak.snaps · ecency.waves · leothreads ·
|
|
7
|
+
* liketu.moments) gets its own slot, fetched in parallel from
|
|
8
|
+
* `communityService.getCommunitySnaps` and filtered to the current
|
|
9
|
+
* community.
|
|
10
|
+
*
|
|
11
|
+
* The kit's CommunityDetail used to render the snaps tab as a flat
|
|
12
|
+
* `<BlogPostList/>` driven by ranked-posts; this swaps in the rich
|
|
13
|
+
* snaps UI (swipeable image carousels, inline composer, per-feed
|
|
14
|
+
* pagination) so community snaps look and behave exactly like the
|
|
15
|
+
* profile-level snaps tab.
|
|
16
|
+
*/
|
|
17
|
+
import { type ReactNode } from 'react';
|
|
18
|
+
import type { Post } from '@/types/post';
|
|
19
|
+
import type { RewardOption } from '../../utils/commentOptions';
|
|
20
|
+
export interface CommunitySnapsTabProps {
|
|
21
|
+
communityId: string;
|
|
22
|
+
currentUser?: string;
|
|
23
|
+
reportedPosts?: {
|
|
24
|
+
author: string;
|
|
25
|
+
permlink: string;
|
|
26
|
+
}[];
|
|
27
|
+
reportedAuthors?: string[];
|
|
28
|
+
onUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
29
|
+
onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | Promise<void>;
|
|
30
|
+
onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
|
|
31
|
+
onReblog?: (author: string, permlink: string) => void;
|
|
32
|
+
onTip?: (author: string, permlink: string) => void;
|
|
33
|
+
onSharePost?: (author: string, permlink: string) => void;
|
|
34
|
+
onCommentClick?: (author: string, permlink: string) => void;
|
|
35
|
+
onClickCommentIcon?: (author: string, permlink: string) => void;
|
|
36
|
+
onClickCommentCount?: (author: string, permlink: string) => void;
|
|
37
|
+
onReportPost?: (author: string, permlink: string) => void;
|
|
38
|
+
onUserClick?: (username: string) => void;
|
|
39
|
+
onPostClick?: (author: string, permlink: string, title?: string) => void;
|
|
40
|
+
ecencyToken?: string;
|
|
41
|
+
threeSpeakApiKey?: string;
|
|
42
|
+
giphyApiKey?: string;
|
|
43
|
+
templateToken?: string;
|
|
44
|
+
templateApiBaseUrl?: string;
|
|
45
|
+
defaultVotePercent?: number;
|
|
46
|
+
voteWeightStep?: number;
|
|
47
|
+
allowLandscapeVideos?: boolean;
|
|
48
|
+
defaultReward?: RewardOption;
|
|
49
|
+
/** Per-card right-side header action menu slot. */
|
|
50
|
+
renderHeaderActions?: (post: Post) => ReactNode;
|
|
51
|
+
/** Collapse the per-card secondary actions (reblog · share · tip ·
|
|
52
|
+
* flag) into a single 3-dot kebab. Forwarded into <SnapsFeedView/>. */
|
|
53
|
+
actionsAsMenu?: boolean;
|
|
54
|
+
}
|
|
55
|
+
declare const CommunitySnapsTab: React.FC<CommunitySnapsTabProps>;
|
|
56
|
+
export default CommunitySnapsTab;
|
|
@@ -135,6 +135,13 @@ export interface ParentPostComposerProps {
|
|
|
135
135
|
walletApprovalLabel?: string;
|
|
136
136
|
/** When true, the composer renders a blinking "approve in wallet" banner. */
|
|
137
137
|
awaitingWalletApproval?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Optional content rendered at the very top of the composer body, above the
|
|
140
|
+
* title input. Use this to plug in a community picker or any other
|
|
141
|
+
* post-routing UI without forking the composer. Receives no props — the
|
|
142
|
+
* consumer owns the state.
|
|
143
|
+
*/
|
|
144
|
+
communitySlot?: React.ReactNode;
|
|
138
145
|
}
|
|
139
146
|
declare const ParentPostComposer: React.FC<ParentPostComposerProps>;
|
|
140
147
|
export default ParentPostComposer;
|