hive-react-kit 0.10.6 → 0.10.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 +6 -3
- package/dist/components/community/CommunityDetail.d.ts +16 -1
- package/dist/components/community/CommunitySnapsTab.d.ts +56 -0
- package/dist/index.cjs.js +188 -188
- package/dist/index.esm.js +13940 -13690
- package/dist/services/communityService.d.ts +33 -0
- package/package.json +1 -1
package/dist/build.css
CHANGED
|
@@ -709,9 +709,6 @@
|
|
|
709
709
|
.table {
|
|
710
710
|
display: table;
|
|
711
711
|
}
|
|
712
|
-
.aspect-\[4\/3\] {
|
|
713
|
-
aspect-ratio: 4/3;
|
|
714
|
-
}
|
|
715
712
|
.aspect-video {
|
|
716
713
|
aspect-ratio: var(--aspect-video);
|
|
717
714
|
}
|
|
@@ -796,6 +793,9 @@
|
|
|
796
793
|
.h-\[90vh\] {
|
|
797
794
|
height: 90vh;
|
|
798
795
|
}
|
|
796
|
+
.h-\[280px\] {
|
|
797
|
+
height: 280px;
|
|
798
|
+
}
|
|
799
799
|
.h-\[400px\] {
|
|
800
800
|
height: 400px;
|
|
801
801
|
}
|
|
@@ -859,6 +859,9 @@
|
|
|
859
859
|
.max-h-\[calc\(90vh-80px\)\] {
|
|
860
860
|
max-height: calc(90vh - 80px);
|
|
861
861
|
}
|
|
862
|
+
.max-h-full {
|
|
863
|
+
max-height: 100%;
|
|
864
|
+
}
|
|
862
865
|
.max-h-screen {
|
|
863
866
|
max-height: 100vh;
|
|
864
867
|
}
|
|
@@ -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;
|