hive-react-kit 0.0.33 → 0.0.35
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 +3017 -0
- package/dist/components/CommentsList.d.ts +12 -0
- package/dist/components/HiveDetailPost.d.ts +12 -0
- package/dist/components/UpvoteList.d.ts +9 -0
- package/dist/components/UserChannel.d.ts +7 -0
- package/dist/components/index.d.ts +3 -2
- package/dist/index.cjs.js +89 -84
- package/dist/index.d.ts +2 -3
- package/dist/index.esm.js +14089 -12268
- package/dist/services/activityService.d.ts +16 -16
- package/dist/services/apiService.d.ts +1 -0
- package/dist/types/activity.d.ts +6 -6
- package/package.json +4 -3
- package/dist/components/ActivityHistory.d.ts +0 -7
- package/dist/components/modals/CommentsModal.d.ts +0 -8
- package/dist/components/modals/UpvoteListModal.d.ts +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserChannelItem, ActivityDisplayItem } from "@/types/activity";
|
|
2
2
|
declare class ActivityService {
|
|
3
3
|
/**
|
|
4
4
|
* Get activity history for a user (posts, comments, replies)
|
|
@@ -8,43 +8,43 @@ declare class ActivityService {
|
|
|
8
8
|
* @param startAuthor - Starting author for pagination (optional)
|
|
9
9
|
* @param startPermlink - Starting permlink for pagination (optional)
|
|
10
10
|
* @param observer - Observer username for personalized results (optional)
|
|
11
|
-
* @returns Promise<
|
|
11
|
+
* @returns Promise<UserChannelItem[]>
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
getUserChannel(username: string, sortBy?: "posts" | "comments" | "replies", limit?: number, startAuthor?: string | null, startPermlink?: string | null, observer?: string | null): Promise<UserChannelItem[]>;
|
|
14
14
|
/**
|
|
15
15
|
* Get user's posts only
|
|
16
16
|
* @param username - Hive username
|
|
17
17
|
* @param limit - Maximum number of posts to return
|
|
18
|
-
* @returns Promise<
|
|
18
|
+
* @returns Promise<UserChannelItem[]>
|
|
19
19
|
*/
|
|
20
|
-
getUserPosts(username: string, limit?: number): Promise<
|
|
20
|
+
getUserPosts(username: string, limit?: number): Promise<UserChannelItem[]>;
|
|
21
21
|
/**
|
|
22
22
|
* Get user's comments only
|
|
23
23
|
* @param username - Hive username
|
|
24
24
|
* @param limit - Maximum number of comments to return
|
|
25
|
-
* @returns Promise<
|
|
25
|
+
* @returns Promise<UserChannelItem[]>
|
|
26
26
|
*/
|
|
27
|
-
getUserComments(username: string, limit?: number): Promise<
|
|
27
|
+
getUserComments(username: string, limit?: number): Promise<UserChannelItem[]>;
|
|
28
28
|
/**
|
|
29
29
|
* Get user's replies only
|
|
30
30
|
* @param username - Hive username
|
|
31
31
|
* @param limit - Maximum number of replies to return
|
|
32
|
-
* @returns Promise<
|
|
32
|
+
* @returns Promise<UserChannelItem[]>
|
|
33
33
|
*/
|
|
34
|
-
getUserReplies(username: string, limit?: number): Promise<
|
|
34
|
+
getUserReplies(username: string, limit?: number): Promise<UserChannelItem[]>;
|
|
35
35
|
/**
|
|
36
36
|
* Get all user activity (posts, comments, and replies combined)
|
|
37
37
|
* @param username - Hive username
|
|
38
38
|
* @param limit - Maximum number of items per type
|
|
39
|
-
* @returns Promise<
|
|
39
|
+
* @returns Promise<UserChannelItem[]>
|
|
40
40
|
*/
|
|
41
|
-
getAllUserActivity(username: string, limit?: number): Promise<
|
|
41
|
+
getAllUserActivity(username: string, limit?: number): Promise<UserChannelItem[]>;
|
|
42
42
|
/**
|
|
43
43
|
* Convert raw activity item to display format
|
|
44
44
|
* @param item - Raw activity history item
|
|
45
45
|
* @returns ActivityDisplayItem
|
|
46
46
|
*/
|
|
47
|
-
convertToDisplayItem(item:
|
|
47
|
+
convertToDisplayItem(item: UserChannelItem): ActivityDisplayItem;
|
|
48
48
|
/**
|
|
49
49
|
* Format activity timestamp to readable date
|
|
50
50
|
* @param timestamp - Activity timestamp
|
|
@@ -69,7 +69,7 @@ declare class ActivityService {
|
|
|
69
69
|
* @param activities - Array of activities
|
|
70
70
|
* @returns Summary statistics
|
|
71
71
|
*/
|
|
72
|
-
getActivitySummary(activities:
|
|
72
|
+
getActivitySummary(activities: UserChannelItem[]): {
|
|
73
73
|
totalActivities: number;
|
|
74
74
|
postsCount: number;
|
|
75
75
|
commentsCount: number;
|
|
@@ -83,7 +83,7 @@ declare class ActivityService {
|
|
|
83
83
|
* @param category - Category to filter by
|
|
84
84
|
* @returns Filtered activities
|
|
85
85
|
*/
|
|
86
|
-
filterByCategory(activities:
|
|
86
|
+
filterByCategory(activities: UserChannelItem[], category: string): UserChannelItem[];
|
|
87
87
|
/**
|
|
88
88
|
* Filter activities by date range
|
|
89
89
|
* @param activities - Array of activities
|
|
@@ -91,14 +91,14 @@ declare class ActivityService {
|
|
|
91
91
|
* @param endDate - End date
|
|
92
92
|
* @returns Filtered activities
|
|
93
93
|
*/
|
|
94
|
-
filterByDateRange(activities:
|
|
94
|
+
filterByDateRange(activities: UserChannelItem[], startDate: Date, endDate: Date): UserChannelItem[];
|
|
95
95
|
/**
|
|
96
96
|
* Search activities by text
|
|
97
97
|
* @param activities - Array of activities
|
|
98
98
|
* @param searchText - Text to search for
|
|
99
99
|
* @returns Filtered activities
|
|
100
100
|
*/
|
|
101
|
-
searchActivities(activities:
|
|
101
|
+
searchActivities(activities: UserChannelItem[], searchText: string): UserChannelItem[];
|
|
102
102
|
}
|
|
103
103
|
export declare const activityService: ActivityService;
|
|
104
104
|
export {};
|
|
@@ -46,6 +46,7 @@ declare class ApiService {
|
|
|
46
46
|
getCommentsList(author: string, permlink: string): Promise<Discussion[]>;
|
|
47
47
|
getMyVideos(authToken: string): Promise<ThreeSpeakVideo[]>;
|
|
48
48
|
getRankedPosts(sort?: PostSort, tag?: string, observer?: string, limit?: number, start_author?: string, start_permlink?: string): Promise<Post[]>;
|
|
49
|
+
getPostContent(author: string, permlink: string): Promise<Post | null>;
|
|
49
50
|
}
|
|
50
51
|
export declare const apiService: ApiService;
|
|
51
52
|
export { server };
|
package/dist/types/activity.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface UserChannelItem {
|
|
2
2
|
id: number;
|
|
3
3
|
author: string;
|
|
4
4
|
permlink: string;
|
|
@@ -80,16 +80,16 @@ export interface ActivityHistoryItem {
|
|
|
80
80
|
author_downvote_manabar: any;
|
|
81
81
|
author_rc_manabar: any;
|
|
82
82
|
}
|
|
83
|
-
export interface
|
|
83
|
+
export interface UserChannelParams {
|
|
84
84
|
username: string;
|
|
85
|
-
sortBy?:
|
|
85
|
+
sortBy?: "posts" | "comments" | "replies";
|
|
86
86
|
limit?: number;
|
|
87
87
|
startAuthor?: string;
|
|
88
88
|
startPermlink?: string;
|
|
89
89
|
observer?: string;
|
|
90
90
|
}
|
|
91
|
-
export interface
|
|
92
|
-
result:
|
|
91
|
+
export interface UserChannelResponse {
|
|
92
|
+
result: UserChannelItem[];
|
|
93
93
|
}
|
|
94
94
|
export interface ActivityDisplayItem {
|
|
95
95
|
id: number;
|
|
@@ -104,5 +104,5 @@ export interface ActivityDisplayItem {
|
|
|
104
104
|
total_payout_value: string;
|
|
105
105
|
pending_payout_value: string;
|
|
106
106
|
url: string;
|
|
107
|
-
type:
|
|
107
|
+
type: "post" | "comment";
|
|
108
108
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hive-react-kit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.35",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.esm.js",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"types": "./dist/types/index.d.ts",
|
|
27
27
|
"import": "./dist/types/index.js",
|
|
28
28
|
"require": "./dist/types/index.js"
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"./build.css": "./dist/build.css"
|
|
30
31
|
},
|
|
31
32
|
"files": [
|
|
32
33
|
"dist",
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
"clean": "rm -rf dist dist-app && mkdir -p dist dist-app",
|
|
53
54
|
"build": "tsc -p tsconfig.build.json && vite build --mode lib && tsc --project tsconfig.build.json",
|
|
54
55
|
"build:app": "vite build",
|
|
55
|
-
"build:lib": "tsc -p tsconfig.build.json && vite build --mode lib && tsc --project tsconfig.build.json",
|
|
56
|
+
"build:lib": "tsc -p tsconfig.build.json && vite build --mode lib && tsc --project tsconfig.build.json && npx @tailwindcss/cli -i src/build.css -o dist/build.css --content 'src/**/*.{ts,tsx}'",
|
|
56
57
|
"build:all": "npm run clean && npm run build:lib && npm run build:app",
|
|
57
58
|
"lint": "eslint .",
|
|
58
59
|
"preview": "vite preview",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
interface CommentsModalProps {
|
|
2
|
-
author: string;
|
|
3
|
-
permlink: string;
|
|
4
|
-
currentUser?: string;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const CommentsModal: ({ author, permlink, currentUser, onClose }: CommentsModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default CommentsModal;
|