hive-react-kit 0.0.5

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.
Files changed (52) hide show
  1. package/README.md +105 -0
  2. package/dist/App.d.ts +2 -0
  3. package/dist/components/VideoCard.d.ts +9 -0
  4. package/dist/components/VideoDetail.d.ts +2 -0
  5. package/dist/components/VideoFeed.d.ts +11 -0
  6. package/dist/components/VideoInfo.d.ts +19 -0
  7. package/dist/components/Wallet.d.ts +7 -0
  8. package/dist/components/common/FavouriteWidget.d.ts +10 -0
  9. package/dist/components/community/CommunitiesList.d.ts +5 -0
  10. package/dist/components/community/CommunityAbout.d.ts +5 -0
  11. package/dist/components/community/CommunityDetail.d.ts +16 -0
  12. package/dist/components/community/CommunityMembers.d.ts +6 -0
  13. package/dist/components/community/CommunityTeam.d.ts +6 -0
  14. package/dist/components/index.d.ts +20 -0
  15. package/dist/components/modals/CommentsModal.d.ts +8 -0
  16. package/dist/components/modals/DescriptionModal.d.ts +8 -0
  17. package/dist/components/modals/Modal.d.ts +10 -0
  18. package/dist/components/modals/UpvoteListModal.d.ts +7 -0
  19. package/dist/components/ui/index.d.ts +1 -0
  20. package/dist/components/user/UserAccount.d.ts +14 -0
  21. package/dist/components/user/UserFollowers.d.ts +6 -0
  22. package/dist/components/user/UserFollowing.d.ts +6 -0
  23. package/dist/components/user/UserInfo.d.ts +5 -0
  24. package/dist/components/user/UserProfilePage.d.ts +8 -0
  25. package/dist/favicon.ico +0 -0
  26. package/dist/hooks/CommunityFavouriteProvider.d.ts +5 -0
  27. package/dist/hooks/index.d.ts +2 -0
  28. package/dist/hooks/use-mobile.d.ts +1 -0
  29. package/dist/hooks/use-toast.d.ts +52 -0
  30. package/dist/index.d.ts +29 -0
  31. package/dist/index.es.js +3988 -0
  32. package/dist/index.umd.js +102 -0
  33. package/dist/main.d.ts +1 -0
  34. package/dist/pages/Index.d.ts +2 -0
  35. package/dist/pages/NotFound.d.ts +2 -0
  36. package/dist/pages/UserProfile.d.ts +2 -0
  37. package/dist/placeholder.svg +1 -0
  38. package/dist/robots.txt +14 -0
  39. package/dist/services/apiService.d.ts +49 -0
  40. package/dist/services/communityService.d.ts +11 -0
  41. package/dist/services/userService.d.ts +10 -0
  42. package/dist/store/walletStore.d.ts +2 -0
  43. package/dist/types/comment.d.ts +13 -0
  44. package/dist/types/community.d.ts +57 -0
  45. package/dist/types/graphql.d.ts +28 -0
  46. package/dist/types/index.d.ts +5 -0
  47. package/dist/types/trending.d.ts +4 -0
  48. package/dist/types/user.d.ts +44 -0
  49. package/dist/types/video.d.ts +106 -0
  50. package/dist/types/wallet.d.ts +17 -0
  51. package/dist/utils/thumbnail.d.ts +1 -0
  52. package/package.json +128 -0
@@ -0,0 +1,28 @@
1
+ export interface GQLActiveVoter {
2
+ percent: number;
3
+ rshares: number;
4
+ voter: string;
5
+ weight: number;
6
+ }
7
+ export interface GQLStats {
8
+ active_voters: GQLActiveVoter[];
9
+ num_comments: number;
10
+ num_votes: number;
11
+ total_hive_reward: number;
12
+ }
13
+ export interface GQLAuthor {
14
+ username: string;
15
+ }
16
+ export interface GQLVideoItem {
17
+ created_at: string;
18
+ title: string;
19
+ permlink?: string;
20
+ lang?: string;
21
+ tags?: string[];
22
+ spkvideo?: any;
23
+ stats?: GQLStats;
24
+ author?: GQLAuthor;
25
+ json_metadata?: {
26
+ raw: any;
27
+ };
28
+ }
@@ -0,0 +1,5 @@
1
+ export * from './comment';
2
+ export * from './graphql';
3
+ export * from './trending';
4
+ export * from './video';
5
+ export * from './wallet';
@@ -0,0 +1,4 @@
1
+ export interface TrendingTag {
2
+ tag: string;
3
+ score: number;
4
+ }
@@ -0,0 +1,44 @@
1
+ export interface UserProfileResponse {
2
+ id: number;
3
+ jsonrpc: string;
4
+ result: {
5
+ active: string;
6
+ blacklists: any[];
7
+ created: string;
8
+ id: number;
9
+ metadata: {
10
+ profile: {
11
+ about: string;
12
+ blacklist_description: string;
13
+ cover_image: string;
14
+ location: string;
15
+ muted_list_description: string;
16
+ name: string;
17
+ profile_image: string;
18
+ website: string;
19
+ };
20
+ };
21
+ name: string;
22
+ post_count: number;
23
+ reputation: number;
24
+ stats: {
25
+ followers: number;
26
+ following: number;
27
+ rank: number;
28
+ };
29
+ };
30
+ }
31
+ export interface Follower {
32
+ follower: string;
33
+ following: string;
34
+ what: string[];
35
+ }
36
+ export interface Following {
37
+ follower: string;
38
+ following: string;
39
+ what: string[];
40
+ }
41
+ export interface User {
42
+ username: string;
43
+ token: string;
44
+ }
@@ -0,0 +1,106 @@
1
+ export interface ThreeSpeakVideo {
2
+ encoding?: Record<string, boolean>;
3
+ updateSteem?: boolean;
4
+ lowRc?: boolean;
5
+ needsBlockchainUpdate?: boolean;
6
+ status?: string;
7
+ encodingPriceSteem?: string;
8
+ paid?: boolean;
9
+ encodingProgress?: number;
10
+ created?: Date;
11
+ is3CjContent?: boolean;
12
+ isVod?: boolean;
13
+ isNsfwContent?: boolean;
14
+ declineRewards?: boolean;
15
+ rewardPowerup?: boolean;
16
+ language?: string;
17
+ category?: string;
18
+ firstUpload?: boolean;
19
+ community?: string;
20
+ indexed?: boolean;
21
+ views?: number;
22
+ hive?: string;
23
+ upvoteEligible?: boolean;
24
+ publishType?: string;
25
+ beneficiaries?: string;
26
+ votePercent?: number;
27
+ reducedUpvote?: boolean;
28
+ donations?: boolean;
29
+ postToHiveBlog?: boolean;
30
+ tagsV2?: string[];
31
+ fromMobile?: boolean;
32
+ isReel?: boolean;
33
+ width?: number;
34
+ height?: number;
35
+ isAudio?: boolean;
36
+ jsonMetaDataAppName?: any;
37
+ id?: string;
38
+ originalFilename?: string;
39
+ permlink?: string;
40
+ duration?: number;
41
+ size?: number;
42
+ owner?: string;
43
+ uploadType?: string;
44
+ title?: string;
45
+ description?: string;
46
+ tags?: string;
47
+ v?: number;
48
+ filename?: string;
49
+ localFilename?: string;
50
+ thumbnail?: string;
51
+ video_v2?: string;
52
+ badges?: any[];
53
+ curationComplete?: boolean;
54
+ hasAudioOnlyVersion?: boolean;
55
+ hasTorrent?: boolean;
56
+ isB2?: boolean;
57
+ needsHiveUpdate?: boolean;
58
+ pinned?: boolean;
59
+ publishFailed?: boolean;
60
+ recommended?: boolean;
61
+ score?: number;
62
+ steemPosted?: boolean;
63
+ jobId?: string;
64
+ numOfUpvotes?: number;
65
+ numOfComments?: number;
66
+ hiveValue?: number;
67
+ active_votes?: ActiveVote[];
68
+ }
69
+ export interface VideoFeedItem {
70
+ title: string;
71
+ author: string;
72
+ permlink: string;
73
+ created: Date;
74
+ category: string;
75
+ numOfUpvotes?: number;
76
+ numOfComments?: number;
77
+ hiveValue?: number;
78
+ duration?: number;
79
+ thumbnail?: string;
80
+ views?: number;
81
+ }
82
+ export declare enum ApiVideoFeedType {
83
+ HOME = "home",
84
+ TRENDING = "trending",
85
+ NEW_VIDEOS = "newVideos",
86
+ FIRST_UPLOADS = "firstUploads",
87
+ USER = "user",
88
+ COMMUNITY = "community",
89
+ RELATED = "related",
90
+ TAG_FEED = "tag_feed",
91
+ SEARCH = "search"
92
+ }
93
+ export interface LoginModel {
94
+ challenge: string;
95
+ proof: string;
96
+ publicKey: string;
97
+ username: string;
98
+ }
99
+ export interface ActiveVote {
100
+ voter: string;
101
+ rshares: number;
102
+ percent?: number;
103
+ reputation?: number;
104
+ time?: string;
105
+ weight?: number;
106
+ }
@@ -0,0 +1,17 @@
1
+ export interface WalletData {
2
+ balance: string;
3
+ hbd_balance: string;
4
+ savings_balance: string;
5
+ savings_hbd_balance: string;
6
+ hive_power: string;
7
+ estimated_value: string;
8
+ error?: string;
9
+ }
10
+ export interface WalletStore {
11
+ walletData: WalletData | null;
12
+ isLoading: boolean;
13
+ error: string | null;
14
+ setWalletData: (data: WalletData | null) => void;
15
+ clearWalletData: () => void;
16
+ fetchWalletData: (username: string) => Promise<WalletData>;
17
+ }
@@ -0,0 +1 @@
1
+ export declare const formatThumbnailUrl: (thumbnail?: string) => string;
package/package.json ADDED
@@ -0,0 +1,128 @@
1
+ {
2
+ "name": "hive-react-kit",
3
+ "private": false,
4
+ "version": "0.0.5",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ },
14
+ "./components": {
15
+ "import": "./dist/components/index.js",
16
+ "types": "./dist/components/index.d.ts"
17
+ },
18
+ "./hooks": {
19
+ "import": "./dist/hooks/index.js",
20
+ "types": "./dist/hooks/index.d.ts"
21
+ },
22
+ "./types": {
23
+ "import": "./dist/types/index.js",
24
+ "types": "./dist/types/index.d.ts"
25
+ }
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "README.md"
30
+ ],
31
+ "keywords": [
32
+ "react",
33
+ "hive",
34
+ "blockchain",
35
+ "ui",
36
+ "components",
37
+ "shadcn",
38
+ "typescript"
39
+ ],
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/your-username/hive-react-kit.git"
43
+ },
44
+ "author": "Your Name",
45
+ "license": "MIT",
46
+ "scripts": {
47
+ "dev": "vite",
48
+ "clean": "rm -r dist/*",
49
+ "build": "tsc -p tsconfig.build.json && vite build && tsc --project tsconfig.build.json",
50
+ "lint": "eslint .",
51
+ "prepublish": "pnpm run clean; pnpm run build",
52
+ "preview": "vite preview"
53
+ },
54
+ "dependencies": {
55
+ "@hiveio/dhive": "^1.3.2",
56
+ "@hookform/resolvers": "^3.10.0",
57
+ "@radix-ui/react-accordion": "^1.2.11",
58
+ "@radix-ui/react-alert-dialog": "^1.1.14",
59
+ "@radix-ui/react-aspect-ratio": "^1.1.7",
60
+ "@radix-ui/react-avatar": "^1.1.10",
61
+ "@radix-ui/react-checkbox": "^1.3.2",
62
+ "@radix-ui/react-collapsible": "^1.1.11",
63
+ "@radix-ui/react-context-menu": "^2.2.15",
64
+ "@radix-ui/react-dialog": "^1.1.14",
65
+ "@radix-ui/react-dropdown-menu": "^2.1.15",
66
+ "@radix-ui/react-hover-card": "^1.1.14",
67
+ "@radix-ui/react-label": "^2.1.7",
68
+ "@radix-ui/react-menubar": "^1.1.15",
69
+ "@radix-ui/react-navigation-menu": "^1.2.13",
70
+ "@radix-ui/react-popover": "^1.1.14",
71
+ "@radix-ui/react-progress": "^1.1.7",
72
+ "@radix-ui/react-radio-group": "^1.3.7",
73
+ "@radix-ui/react-scroll-area": "^1.2.9",
74
+ "@radix-ui/react-select": "^2.2.5",
75
+ "@radix-ui/react-separator": "^1.1.7",
76
+ "@radix-ui/react-slider": "^1.3.5",
77
+ "@radix-ui/react-slot": "^1.2.3",
78
+ "@radix-ui/react-switch": "^1.2.5",
79
+ "@radix-ui/react-tabs": "^1.1.12",
80
+ "@radix-ui/react-toast": "^1.2.14",
81
+ "@radix-ui/react-toggle": "^1.1.9",
82
+ "@radix-ui/react-toggle-group": "^1.1.10",
83
+ "@radix-ui/react-tooltip": "^1.2.7",
84
+ "@tanstack/react-query": "^5.83.0",
85
+ "class-variance-authority": "^0.7.1",
86
+ "clsx": "^2.1.1",
87
+ "cmdk": "^1.1.1",
88
+ "date-fns": "^3.6.0",
89
+ "embla-carousel-react": "^8.6.0",
90
+ "hls.js": "^1.6.13",
91
+ "input-otp": "^1.4.2",
92
+ "lucide-react": "^0.462.0",
93
+ "next-themes": "^0.3.0",
94
+ "react": "^18.3.1",
95
+ "react-day-picker": "^8.10.1",
96
+ "react-dom": "^18.3.1",
97
+ "react-hook-form": "^7.61.1",
98
+ "react-icons": "^5.5.0",
99
+ "react-resizable-panels": "^2.1.9",
100
+ "react-router-dom": "^6.30.1",
101
+ "recharts": "^2.15.4",
102
+ "sonner": "^1.7.4",
103
+ "tailwind-merge": "^2.6.0",
104
+ "tailwindcss-animate": "^1.0.7",
105
+ "vaul": "^0.9.9",
106
+ "zod": "^3.25.76",
107
+ "zustand": "^5.0.8"
108
+ },
109
+ "devDependencies": {
110
+ "@eslint/js": "^9.32.0",
111
+ "@tailwindcss/typography": "^0.5.16",
112
+ "@types/node": "^22.16.5",
113
+ "@types/react": "^18.3.23",
114
+ "@types/react-dom": "^18.3.7",
115
+ "@vitejs/plugin-react-swc": "^3.11.0",
116
+ "autoprefixer": "^10.4.21",
117
+ "eslint": "^9.32.0",
118
+ "eslint-plugin-react-hooks": "^5.2.0",
119
+ "eslint-plugin-react-refresh": "^0.4.20",
120
+ "globals": "^15.15.0",
121
+ "lovable-tagger": "^1.1.9",
122
+ "postcss": "^8.5.6",
123
+ "tailwindcss": "^3.4.17",
124
+ "typescript": "^5.8.3",
125
+ "typescript-eslint": "^8.38.0",
126
+ "vite": "^5.4.19"
127
+ }
128
+ }