hive-react-kit 0.0.5 → 0.0.13

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 (46) hide show
  1. package/README.md +20 -0
  2. package/dist/components/ActivityHistory.d.ts +7 -0
  3. package/dist/components/ActivityList.d.ts +15 -0
  4. package/dist/components/FollowersList.d.ts +8 -0
  5. package/dist/components/FollowingList.d.ts +8 -0
  6. package/dist/components/ListOfWitnesses.d.ts +4 -0
  7. package/dist/components/PostFeedList.d.ts +17 -0
  8. package/dist/components/ProposalsList.d.ts +4 -0
  9. package/dist/components/TransactionHistory.d.ts +6 -0
  10. package/dist/components/UpvoteListModal.d.ts +11 -0
  11. package/dist/components/VideoDetail.d.ts +16 -1
  12. package/dist/components/VoteSlider.d.ts +7 -0
  13. package/dist/components/WitnessFilters.d.ts +8 -0
  14. package/dist/components/comments/AddCommentInput.d.ts +10 -0
  15. package/dist/components/comments/CommentSearchBar.d.ts +8 -0
  16. package/dist/components/comments/CommentTile.d.ts +16 -0
  17. package/dist/components/comments/CommentsModal.d.ts +13 -0
  18. package/dist/components/comments/ReplyModal.d.ts +9 -0
  19. package/dist/components/community/CommunityDetails.d.ts +13 -0
  20. package/dist/components/index.d.ts +5 -0
  21. package/dist/components/user/UserProfilePage.d.ts +9 -1
  22. package/dist/index.d.ts +3 -0
  23. package/dist/index.es.js +2535 -1626
  24. package/dist/index.umd.js +22 -22
  25. package/dist/services/activityListService.d.ts +79 -0
  26. package/dist/services/activityService.d.ts +104 -0
  27. package/dist/services/apiService.d.ts +2 -0
  28. package/dist/services/communityService.d.ts +5 -1
  29. package/dist/services/proposalService.d.ts +9 -0
  30. package/dist/services/transactionService.d.ts +69 -0
  31. package/dist/services/userService.d.ts +6 -1
  32. package/dist/services/witnessService.d.ts +61 -0
  33. package/dist/store/index.d.ts +2 -0
  34. package/dist/store/witnessStore.d.ts +31 -0
  35. package/dist/types/activity.d.ts +108 -0
  36. package/dist/types/activityList.d.ts +46 -0
  37. package/dist/types/comment.d.ts +7 -1
  38. package/dist/types/community.d.ts +79 -0
  39. package/dist/types/index.d.ts +3 -0
  40. package/dist/types/post.d.ts +53 -0
  41. package/dist/types/proposal.d.ts +35 -0
  42. package/dist/types/transaction.d.ts +90 -0
  43. package/dist/types/user.d.ts +91 -0
  44. package/dist/types/witness.d.ts +57 -0
  45. package/package.json +16 -37
  46. package/dist/components/ui/index.d.ts +0 -1
@@ -0,0 +1,53 @@
1
+ import { ActiveVote } from './video';
2
+ export interface Beneficiary {
3
+ account: string;
4
+ weight: number;
5
+ }
6
+ export interface PostStats {
7
+ flag_weight: number;
8
+ gray: boolean;
9
+ hide: boolean;
10
+ total_votes: number;
11
+ }
12
+ export interface Post {
13
+ active_votes: ActiveVote[];
14
+ author: string;
15
+ author_payout_value: string;
16
+ author_reputation: number;
17
+ author_role?: string;
18
+ author_title?: string;
19
+ beneficiaries: Beneficiary[];
20
+ blacklists: any[];
21
+ body: string;
22
+ category: string;
23
+ children: number;
24
+ community: string;
25
+ community_title: string;
26
+ created: string;
27
+ curator_payout_value: string;
28
+ depth: number;
29
+ is_paidout: boolean;
30
+ json_metadata: {
31
+ app?: string;
32
+ description?: string;
33
+ format?: string;
34
+ image?: string[];
35
+ tags?: string[];
36
+ users?: string[];
37
+ };
38
+ max_accepted_payout: string;
39
+ net_rshares: number;
40
+ payout: number;
41
+ payout_at: string;
42
+ pending_payout_value: string;
43
+ percent_hbd: number;
44
+ permlink: string;
45
+ post_id: number;
46
+ reblogs: number;
47
+ replies: any[];
48
+ stats: PostStats;
49
+ title: string;
50
+ updated: string;
51
+ url: string;
52
+ }
53
+ export type PostSort = 'trending' | 'hot' | 'created';
@@ -0,0 +1,35 @@
1
+ export type Proposal = {
2
+ proposal_id: number;
3
+ subject: string;
4
+ permlink: string;
5
+ creator: string;
6
+ receiver: string;
7
+ start_date: string;
8
+ end_date: string;
9
+ total_hbd_received: string;
10
+ max_hbd_remaining: string;
11
+ all_votes_num: string;
12
+ all_votes_hp: string;
13
+ votes: Array<{
14
+ name: string;
15
+ hive_power: string;
16
+ proxied_hive_power: string;
17
+ }>;
18
+ status?: string;
19
+ daily_pay?: {
20
+ amount: string;
21
+ nai: string;
22
+ precision: number;
23
+ };
24
+ total_votes?: string;
25
+ daily_pay_hbd?: number;
26
+ remaining_days?: number;
27
+ vote_value_total?: number;
28
+ };
29
+ export interface ProposalsListProps {
30
+ onClickSupport: (proposal: Proposal) => void;
31
+ onClickVoteValue: (proposal: Proposal) => void;
32
+ onClickSelect: (proposal: Proposal) => void;
33
+ onClickUser: (proposal: Proposal) => void;
34
+ onClickAvatar: (proposal: Proposal) => void;
35
+ }
@@ -0,0 +1,90 @@
1
+ export interface TransactionHistoryItem {
2
+ trx_id: string;
3
+ block: number;
4
+ trx_in_block: number;
5
+ op_in_trx: number;
6
+ virtual_op: boolean;
7
+ timestamp: string;
8
+ op: any;
9
+ }
10
+ export interface TransactionHistoryParams {
11
+ account: string;
12
+ index?: number;
13
+ limit?: number;
14
+ start?: number;
15
+ stop?: number;
16
+ }
17
+ export interface TransactionHistoryResponse {
18
+ result: TransactionHistoryItem[];
19
+ }
20
+ export interface TransferOperation {
21
+ type: 'transfer';
22
+ value: {
23
+ from: string;
24
+ to: string;
25
+ amount: string;
26
+ memo: string;
27
+ };
28
+ }
29
+ export interface VoteOperation {
30
+ type: 'vote';
31
+ value: {
32
+ voter: string;
33
+ author: string;
34
+ permlink: string;
35
+ weight: number;
36
+ };
37
+ }
38
+ export interface CommentOperation {
39
+ type: 'comment';
40
+ value: {
41
+ parent_author: string;
42
+ parent_permlink: string;
43
+ author: string;
44
+ permlink: string;
45
+ title: string;
46
+ body: string;
47
+ json_metadata: string;
48
+ };
49
+ }
50
+ export interface CustomJsonOperation {
51
+ type: 'custom_json';
52
+ value: {
53
+ required_auths: string[];
54
+ required_posting_auths: string[];
55
+ id: string;
56
+ json: string;
57
+ };
58
+ }
59
+ export interface CommentPayoutUpdateOperation {
60
+ type: "comment_payout_update";
61
+ value: {
62
+ author: string;
63
+ permlink: string;
64
+ };
65
+ }
66
+ export interface CommentOptionsOperation {
67
+ type: "comment_options";
68
+ value: {
69
+ author: string;
70
+ permlink: string;
71
+ max_accepted_payout: string;
72
+ percent_hbd: number;
73
+ allow_votes: boolean;
74
+ allow_curation_rewards: boolean;
75
+ extensions: any[];
76
+ };
77
+ }
78
+ export interface EffectiveCommentVoteOperation {
79
+ type: "effective_comment_vote";
80
+ value: {
81
+ voter: string;
82
+ author: string;
83
+ permlink: string;
84
+ pending_payout: string;
85
+ weight: number;
86
+ rshares: number;
87
+ total_vote_weight: number;
88
+ };
89
+ }
90
+ export type Operation = TransferOperation | VoteOperation | CommentOperation | CustomJsonOperation | CommentPayoutUpdateOperation | CommentOptionsOperation | EffectiveCommentVoteOperation;
@@ -42,3 +42,94 @@ export interface User {
42
42
  username: string;
43
43
  token: string;
44
44
  }
45
+ export interface Account {
46
+ id: number;
47
+ name: string;
48
+ balance: string;
49
+ hbd_balance: string;
50
+ vesting_shares: string;
51
+ voting_power: number;
52
+ last_post: string;
53
+ last_root_post: string;
54
+ posting_json_metadata: string;
55
+ reputation: number;
56
+ can_vote: boolean;
57
+ comment_count: number;
58
+ created: string;
59
+ curation_rewards: number;
60
+ delayed_votes: any[];
61
+ delegated_vesting_shares: string;
62
+ downvote_manabar: {
63
+ current_mana: number;
64
+ last_update_time: number;
65
+ };
66
+ governance_vote_expiration_ts: string;
67
+ guest_bloggers: any[];
68
+ hbd_last_interest_payment: string;
69
+ hbd_seconds: string;
70
+ hbd_seconds_last_update: string;
71
+ json_metadata: string;
72
+ last_account_recovery: string;
73
+ last_account_update: string;
74
+ last_owner_update: string;
75
+ last_vote_time: string;
76
+ lifetime_vote_count: number;
77
+ market_history: any[];
78
+ memo_key: string;
79
+ mined: boolean;
80
+ next_vesting_withdrawal: string;
81
+ open_recurrent_transfers: number;
82
+ other_history: any[];
83
+ owner: {
84
+ account_auths: any[];
85
+ key_auths: [string, number][];
86
+ weight_threshold: number;
87
+ };
88
+ pending_claimed_accounts: number;
89
+ pending_transfers: number;
90
+ post_bandwidth: number;
91
+ post_count: number;
92
+ post_history: any[];
93
+ post_voting_power: string;
94
+ posting: {
95
+ account_auths: [string, number][];
96
+ key_auths: [string, number][];
97
+ weight_threshold: number;
98
+ };
99
+ posting_rewards: number;
100
+ previous_owner_update: string;
101
+ proxied_vsf_votes: number[];
102
+ proxy: string;
103
+ received_vesting_shares: string;
104
+ recovery_account: string;
105
+ reset_account: string;
106
+ reward_hbd_balance: string;
107
+ reward_hive_balance: string;
108
+ reward_vesting_balance: string;
109
+ reward_vesting_hive: string;
110
+ savings_balance: string;
111
+ savings_hbd_balance: string;
112
+ savings_hbd_last_interest_payment: string;
113
+ savings_hbd_seconds: string;
114
+ savings_hbd_seconds_last_update: string;
115
+ savings_withdraw_requests: number;
116
+ tags_usage: any[];
117
+ to_withdraw: number;
118
+ transfer_history: any[];
119
+ vesting_balance: string;
120
+ vesting_withdraw_rate: string;
121
+ vote_history: any[];
122
+ voting_manabar: {
123
+ current_mana: number;
124
+ last_update_time: number;
125
+ };
126
+ withdraw_routes: number;
127
+ withdrawn: number;
128
+ witness_votes: string[];
129
+ witnesses_voted_for: number;
130
+ active: {
131
+ account_auths: any[];
132
+ key_auths: [string, number][];
133
+ weight_threshold: number;
134
+ };
135
+ }
@@ -0,0 +1,57 @@
1
+ export interface Witness {
2
+ available_witness_account_subsidies: number;
3
+ created: string;
4
+ hardfork_time_vote: string;
5
+ hardfork_version_vote: string;
6
+ hbd_exchange_rate: {
7
+ base: string;
8
+ quote: string;
9
+ };
10
+ id: number;
11
+ last_aslot: number;
12
+ last_confirmed_block_num: number;
13
+ last_hbd_exchange_update: string;
14
+ last_work: string;
15
+ owner: string;
16
+ pow_worker: number;
17
+ props: {
18
+ account_creation_fee: string;
19
+ account_subsidy_budget: number;
20
+ account_subsidy_decay: number;
21
+ hbd_interest_rate: number;
22
+ maximum_block_size: number;
23
+ };
24
+ running_version: string;
25
+ signing_key: string;
26
+ total_missed: number;
27
+ url: string;
28
+ virtual_last_update: string;
29
+ virtual_position: string;
30
+ virtual_scheduled_time: string;
31
+ votes: string;
32
+ }
33
+ export interface WitnessVote {
34
+ account: string;
35
+ id: number;
36
+ witness: string;
37
+ }
38
+ export interface WitnessVotesResponse {
39
+ votes: WitnessVote[];
40
+ }
41
+ export interface Account {
42
+ name: string;
43
+ witness_votes: string[];
44
+ [key: string]: any;
45
+ }
46
+ export interface WitnessFilters {
47
+ status: 'all' | 'active' | 'disabled' | 'approved';
48
+ name: string;
49
+ version: string;
50
+ }
51
+ export interface ListOfWitnessesProps {
52
+ username?: string;
53
+ filters?: WitnessFilters;
54
+ onWitnessVoteClick?: (witness: string) => void;
55
+ onWitnessStatsClick?: (witness: string) => void;
56
+ onWitnessUrlClick?: (url: string) => void;
57
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hive-react-kit",
3
3
  "private": false,
4
- "version": "0.0.5",
4
+ "version": "0.0.13",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -45,42 +45,22 @@
45
45
  "license": "MIT",
46
46
  "scripts": {
47
47
  "dev": "vite",
48
- "clean": "rm -r dist/*",
49
- "build": "tsc -p tsconfig.build.json && vite build && tsc --project tsconfig.build.json",
48
+ "clean": "rm -rf dist dist-app && mkdir -p dist dist-app",
49
+ "build": "tsc -p tsconfig.build.json && vite build --mode lib && tsc --project tsconfig.build.json",
50
+ "build:app": "vite build",
51
+ "build:lib": "tsc -p tsconfig.build.json && vite build --mode lib && tsc --project tsconfig.build.json",
52
+ "build:all": "npm run clean && npm run build:lib && npm run build:app",
50
53
  "lint": "eslint .",
51
- "prepublish": "pnpm run clean; pnpm run build",
52
- "preview": "vite preview"
54
+ "preview": "vite preview",
55
+ "serve": "npm run build:app && npx serve dist-app",
56
+ "serve:lib": "npm run build:lib && npx serve dist",
57
+ "serve:all": "npm run build:all && npx serve dist-app"
53
58
  },
54
59
  "dependencies": {
60
+ "@hiveio/content-renderer": "^2.3.1",
55
61
  "@hiveio/dhive": "^1.3.2",
56
62
  "@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",
63
+ "@tailwindcss/vite": "^4.1.11",
84
64
  "@tanstack/react-query": "^5.83.0",
85
65
  "class-variance-authority": "^0.7.1",
86
66
  "clsx": "^2.1.1",
@@ -100,27 +80,26 @@
100
80
  "react-router-dom": "^6.30.1",
101
81
  "recharts": "^2.15.4",
102
82
  "sonner": "^1.7.4",
103
- "tailwind-merge": "^2.6.0",
104
- "tailwindcss-animate": "^1.0.7",
83
+ "tailwindcss": "^4.1.11",
105
84
  "vaul": "^0.9.9",
106
85
  "zod": "^3.25.76",
107
86
  "zustand": "^5.0.8"
108
87
  },
109
88
  "devDependencies": {
110
89
  "@eslint/js": "^9.32.0",
111
- "@tailwindcss/typography": "^0.5.16",
112
90
  "@types/node": "^22.16.5",
113
91
  "@types/react": "^18.3.23",
114
92
  "@types/react-dom": "^18.3.7",
93
+ "@vitejs/plugin-react": "^4.6.0",
115
94
  "@vitejs/plugin-react-swc": "^3.11.0",
116
95
  "autoprefixer": "^10.4.21",
117
96
  "eslint": "^9.32.0",
118
97
  "eslint-plugin-react-hooks": "^5.2.0",
119
98
  "eslint-plugin-react-refresh": "^0.4.20",
120
99
  "globals": "^15.15.0",
121
- "lovable-tagger": "^1.1.9",
122
100
  "postcss": "^8.5.6",
123
- "tailwindcss": "^3.4.17",
101
+ "serve": "^14.2.5",
102
+ "tailwindcss-animate": "^1.0.7",
124
103
  "typescript": "^5.8.3",
125
104
  "typescript-eslint": "^8.38.0",
126
105
  "vite": "^5.4.19"
@@ -1 +0,0 @@
1
- export {};