hive-react-kit 1.10.1 → 1.10.3

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.
@@ -25,7 +25,7 @@ interface WalletProps {
25
25
  onTransfer?: (to: string, amount: string, currency: Currency, memo: string) => void | boolean | Promise<void | boolean>;
26
26
  onPowerUp?: (to: string, amount: string) => void | boolean | Promise<void | boolean>;
27
27
  onPowerDown?: (hp: string) => void | boolean | Promise<void | boolean>;
28
- onTransferToSavings?: (currency: Currency, amount: string, memo: string) => void | boolean | Promise<void | boolean>;
28
+ onTransferToSavings?: (to: string, currency: Currency, amount: string, memo: string) => void | boolean | Promise<void | boolean>;
29
29
  onTransferFromSavings?: (currency: Currency, amount: string, memo: string) => void | boolean | Promise<void | boolean>;
30
30
  /** Cancels the in-progress HP power-down (broadcasts `withdraw_vesting`
31
31
  * with 0 vests). Surfaces a STOP button on the Hive Power row when the
@@ -17,6 +17,7 @@ export declare const TransferModal: React.FC<{
17
17
  }>;
18
18
  export declare const PowerUpModal: React.FC<{
19
19
  from: string;
20
+ toDefault?: string;
20
21
  hiveBalance?: string;
21
22
  onClose: () => void;
22
23
  onSubmit: (to: string, amount: string) => void | boolean | Promise<void | boolean>;
@@ -30,10 +31,11 @@ export declare const PowerDownModal: React.FC<{
30
31
  export declare const SavingsModal: React.FC<{
31
32
  mode: "add" | "remove";
32
33
  from: string;
34
+ toDefault?: string;
33
35
  currency: Currency;
34
36
  availableBalance?: string;
35
37
  onClose: () => void;
36
- onSubmit: (currency: Currency, amount: string, memo: string) => void | boolean | Promise<void | boolean>;
38
+ onSubmit: any;
37
39
  }>;
38
40
  export declare const ConfirmActionModal: React.FC<{
39
41
  title: string;
@@ -27,8 +27,22 @@ export interface UserDetailProfileProps {
27
27
  */
28
28
  activeTab?: TabType;
29
29
  /** Called whenever the user clicks a different tab. Fires whether or
30
- * not `activeTab` is supplied. */
30
+ * not `activeTab` is supplied. Always fires with the PARENT tab name
31
+ * (e.g. `"posts"`, not `"blogs"`). */
31
32
  onActiveTabChange?: (tab: TabType) => void;
33
+ /**
34
+ * Called whenever the user switches a sub-tab toggle (Blogs/Posts,
35
+ * Comments/Replies, etc.). Receives both the parent tab name and the
36
+ * sub-tab name so the host app can sync the URL (e.g. `?subtab=blogs`).
37
+ */
38
+ onSubTabChange?: (parentTab: TabType, subTab: string) => void;
39
+ /**
40
+ * Initial sub-tab to activate within the parent `activeTab`. Lets the
41
+ * host app restore a sub-tab from the URL on first render.
42
+ * E.g. `initialSubTab="replies"` opens the Replies sub-tab inside the
43
+ * parent Replies tab.
44
+ */
45
+ initialSubTab?: string;
32
46
  /** Ecency image hosting token — enables image and video thumbnail upload in comment composer */
33
47
  ecencyToken?: string;
34
48
  /** 3Speak API key — enables audio and video upload in comment composer */
@@ -119,7 +133,7 @@ export interface UserDetailProfileProps {
119
133
  /** Wallet tab — power down (unstake HP → HIVE over 13 weeks). */
120
134
  onPowerDown?: (hp: string) => void | boolean | Promise<void | boolean>;
121
135
  /** Wallet tab — add to savings (transfer_to_savings). */
122
- onTransferToSavings?: (currency: "HIVE" | "HBD", amount: string, memo: string) => void | boolean | Promise<void | boolean>;
136
+ onTransferToSavings?: (to: string, currency: "HIVE" | "HBD", amount: string, memo: string) => void | boolean | Promise<void | boolean>;
123
137
  /** Wallet tab — withdraw from savings (transfer_from_savings). */
124
138
  onTransferFromSavings?: (currency: "HIVE" | "HBD", amount: string, memo: string) => void | boolean | Promise<void | boolean>;
125
139
  /** Wallet tab — stop an in-progress power-down (withdraw_vesting with 0). */
@@ -231,6 +245,6 @@ export interface UserDetailProfileProps {
231
245
  * `addAccountAuthority` / `removeAccountAuthority`). */
232
246
  onPostingAuthority?: () => void;
233
247
  }
234
- type TabType = "blogs" | "posts" | "snaps" | "polls" | "comments" | "replies" | "activities" | "authorRewards" | "curationRewards" | "followers" | "following" | "wallet" | "votingPower" | "badges" | "witnessVotes" | "growth" | "curation";
248
+ type TabType = "blogs" | "posts" | "snaps" | "polls" | "comments" | "replies" | "activities" | "authorRewards" | "curationRewards" | "followers" | "following" | "wallet" | "votingPower" | "badges" | "witnessVotes" | "growth" | "curation" | "rewards" | "tokens" | "follows";
235
249
  declare const UserDetailProfile: React.FC<UserDetailProfileProps>;
236
250
  export default UserDetailProfile;
@@ -15,7 +15,7 @@
15
15
  * Missing keys for a non-English language fall back to the English entry,
16
16
  * which is the source of truth for every label.
17
17
  */
18
- export type KitMessageKey = "tab.blogs" | "tab.posts" | "tab.snaps" | "tab.polls" | "tab.comments" | "tab.replies" | "tab.activities" | "tab.authorRewards" | "tab.curationRewards" | "tab.growth" | "tab.followers" | "tab.following" | "tab.wallet" | "tab.engineTokens" | "tab.votingPower" | "tab.badges" | "tab.witnessVotes" | "tab.curation" | "meta.followers" | "meta.following" | "meta.posts" | "action.follow" | "action.unfollow" | "action.ignoreAuthor" | "action.mute" | "action.unmute" | "action.reportUser" | "action.shareProfile" | "action.cancel" | "action.confirmIgnore" | "action.processing" | "modal.ignoreAuthorTitle" | "modal.ignoreAuthorBody" | "empty.noBlogs" | "empty.noPosts" | "empty.noSnaps" | "empty.noPolls" | "empty.noComments" | "empty.noReplies" | "empty.noFollowers" | "empty.notFollowing" | "empty.noBadges" | "empty.noWitnessVotes" | "empty.noPendingAuthor" | "empty.noPendingCuration" | "empty.curationHint" | "empty.votingPowerUnavailable" | "empty.userNotFound" | "empty.noCuration" | "status.active" | "status.ended" | "poll.selectAnOption" | "poll.selectUpTo" | "poll.changeYourVote" | "poll.selected" | "poll.submitVote" | "poll.submitVotes" | "poll.changeVote" | "poll.submitting" | "poll.voted" | "poll.voteChangesAllowed" | "poll.voter" | "poll.voters" | "poll.option" | "poll.options" | "poll.endsIn" | "common.translating" | "common.processing" | "common.fullyCharged" | "reward.pendingAuthor" | "reward.pendingCuration" | "reward.posts" | "reward.comments" | "reward.totalHbd" | "reward.totalHp" | "reward.avgEfficiency" | "reward.post" | "reward.comment" | "vp.upvotePower" | "vp.downvotePower" | "vp.resourceCredits";
18
+ export type KitMessageKey = "tab.blogs" | "tab.posts" | "tab.snaps" | "tab.polls" | "tab.comments" | "tab.replies" | "tab.activities" | "tab.authorRewards" | "tab.curationRewards" | "tab.growth" | "tab.followers" | "tab.following" | "tab.follows" | "tab.wallet" | "tab.engineTokens" | "tab.rewards" | "tab.votingPower" | "tab.badges" | "tab.witnessVotes" | "tab.curation" | "meta.followers" | "meta.following" | "meta.posts" | "action.follow" | "action.unfollow" | "action.ignoreAuthor" | "action.mute" | "action.unmute" | "action.reportUser" | "action.shareProfile" | "action.cancel" | "action.confirmIgnore" | "action.processing" | "modal.ignoreAuthorTitle" | "modal.ignoreAuthorBody" | "empty.noBlogs" | "empty.noPosts" | "empty.noSnaps" | "empty.noPolls" | "empty.noComments" | "empty.noReplies" | "empty.noFollowers" | "empty.notFollowing" | "empty.noBadges" | "empty.noWitnessVotes" | "empty.noPendingAuthor" | "empty.noPendingCuration" | "empty.curationHint" | "empty.votingPowerUnavailable" | "empty.userNotFound" | "empty.noCuration" | "status.active" | "status.ended" | "poll.selectAnOption" | "poll.selectUpTo" | "poll.changeYourVote" | "poll.selected" | "poll.submitVote" | "poll.submitVotes" | "poll.changeVote" | "poll.submitting" | "poll.voted" | "poll.voteChangesAllowed" | "poll.voter" | "poll.voters" | "poll.option" | "poll.options" | "poll.endsIn" | "common.translating" | "common.processing" | "common.fullyCharged" | "reward.pendingAuthor" | "reward.pendingCuration" | "reward.posts" | "reward.comments" | "reward.totalHbd" | "reward.totalHp" | "reward.avgEfficiency" | "reward.post" | "reward.comment" | "vp.upvotePower" | "vp.downvotePower" | "vp.resourceCredits";
19
19
  export type KitMessages = Partial<Record<KitMessageKey, string>>;
20
20
  export declare const BUILTIN_MESSAGES: Record<string, Record<string, string>>;
21
21
  /**