hive-react-kit 0.9.4 → 0.9.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.
- package/dist/components/HiveDetailPost.d.ts +13 -1
- package/dist/components/VoteSlider.d.ts +3 -1
- package/dist/components/actionButtons/PostActionButton.d.ts +6 -1
- package/dist/components/comments/AddCommentInput.d.ts +6 -3
- package/dist/components/comments/CommentsModal.d.ts +5 -1
- package/dist/components/inlineComments/InlineCommentItem.d.ts +6 -1
- package/dist/components/inlineComments/InlineCommentSection.d.ts +5 -1
- package/dist/components/user/PollListItem.d.ts +4 -0
- package/dist/components/user/UserDetailProfile.d.ts +7 -0
- package/dist/index.cjs.js +87 -87
- package/dist/index.esm.js +5308 -5269
- package/package.json +1 -1
|
@@ -28,6 +28,18 @@ export interface HiveDetailPostProps {
|
|
|
28
28
|
* Typically wired to a user setting.
|
|
29
29
|
*/
|
|
30
30
|
defaultReward?: import('../utils/commentOptions').RewardOption;
|
|
31
|
+
/**
|
|
32
|
+
* Initial percent (1–100) for the post's upvote slider AND every comment
|
|
33
|
+
* composer's "upvote-on-publish" / comment-upvote slider on this page.
|
|
34
|
+
* Default 100. Typically wired to a user setting.
|
|
35
|
+
*/
|
|
36
|
+
defaultVotePercent?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Slider precision (0.25, 0.5, or 1) used by every vote slider on this
|
|
39
|
+
* page — the post upvote action, comment upvote actions, and the
|
|
40
|
+
* upvote-on-publish slider in the comment composer. Default 0.25.
|
|
41
|
+
*/
|
|
42
|
+
voteWeightStep?: number;
|
|
31
43
|
/**
|
|
32
44
|
* Override the Hive content renderer's link-generating functions so the
|
|
33
45
|
* rendered `<a>` URLs route into your app instead of an external Hive
|
|
@@ -88,5 +100,5 @@ export interface HiveDetailPostProps {
|
|
|
88
100
|
/** Called when user clicks "View parent post" — navigate to the parent post. */
|
|
89
101
|
onNavigateToPost?: (author: string, permlink: string) => void;
|
|
90
102
|
}
|
|
91
|
-
export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, onShareComment, onTipComment, onReportComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, backgroundColor, onBack, onUserClick, onNavigateToPost, onVotePoll, showVoteButton, processBody, defaultReward, renderOptions, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onShare, onTip, onReport, onShareComment, onTipComment, onReportComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, backgroundColor, onBack, onUserClick, onNavigateToPost, onVotePoll, showVoteButton, processBody, defaultReward, defaultVotePercent, voteWeightStep, renderOptions, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
92
104
|
export default HiveDetailPost;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export declare function VoteSlider({ author, permlink, defaultValue, onUpvote, onCancel, }: {
|
|
1
|
+
export declare function VoteSlider({ author, permlink, defaultValue, step, onUpvote, onCancel, }: {
|
|
2
2
|
author: string;
|
|
3
3
|
permlink: string;
|
|
4
4
|
defaultValue?: number;
|
|
5
|
+
/** Slider precision. Use 0.25, 0.5, or 1 (default 1). */
|
|
6
|
+
step?: number;
|
|
5
7
|
onUpvote: (percent: number) => Promise<void> | void;
|
|
6
8
|
onCancel: () => void;
|
|
7
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -28,6 +28,11 @@ export interface PostActionButtonProps {
|
|
|
28
28
|
parentTags?: string[];
|
|
29
29
|
/** Default reward routing seeded into the comment composer. */
|
|
30
30
|
defaultReward?: import('../../utils/commentOptions').RewardOption;
|
|
31
|
+
/** Initial percent for the upvote slider when opened (1–100). Default 100. */
|
|
32
|
+
defaultVotePercent?: number;
|
|
33
|
+
/** Slider precision used by both the post upvote slider AND the comment composer's
|
|
34
|
+
* "upvote-on-publish" slider. Use 0.25, 0.5, or 1. Default 0.25 (back-compat). */
|
|
35
|
+
voteWeightStep?: number;
|
|
31
36
|
/** Called when comment button is clicked (e.g. open comments). */
|
|
32
37
|
onComments?: () => void;
|
|
33
38
|
/** Called when reblog is clicked (when logged in). */
|
|
@@ -53,5 +58,5 @@ export interface PostActionButtonProps {
|
|
|
53
58
|
/** When true, clicking the comment icon calls onComments instead of opening the CommentsModal popup */
|
|
54
59
|
disableCommentsModal?: boolean;
|
|
55
60
|
}
|
|
56
|
-
export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, initialVotes, initialCommentsCount, onUpvote, onSubmitComment, onComments, onReblog, onShare, onTip, onReport, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, disableCommentsModal, showVoteButton, parentTags, defaultReward, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, initialVotes, initialCommentsCount, onUpvote, onSubmitComment, onComments, onReblog, onShare, onTip, onReport, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, disableCommentsModal, showVoteButton, parentTags, defaultReward, defaultVotePercent, voteWeightStep, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
57
62
|
export default PostActionButton;
|
|
@@ -68,8 +68,11 @@ export interface PostComposerProps {
|
|
|
68
68
|
showVoteButton?: boolean;
|
|
69
69
|
/** Initial toggle state for upvote-on-publish (default false). */
|
|
70
70
|
defaultVoteEnabled?: boolean;
|
|
71
|
-
/** Initial slider percent (1–100,
|
|
71
|
+
/** Initial slider percent (1–100, default 100). Snapped to `voteWeightStep`. */
|
|
72
72
|
defaultVotePercent?: number;
|
|
73
|
+
/** Slider precision for the upvote-on-publish slider. Use 0.25, 0.5, or 1.
|
|
74
|
+
* Default 0.25 (back-compat). */
|
|
75
|
+
voteWeightStep?: number;
|
|
73
76
|
/**
|
|
74
77
|
* Called whenever the upvote-on-publish toggle or percent changes.
|
|
75
78
|
* `enabled=false` => consumer should post a plain comment.
|
|
@@ -115,8 +118,8 @@ export interface PostComposerProps {
|
|
|
115
118
|
}
|
|
116
119
|
/** @deprecated Use PostComposerProps instead */
|
|
117
120
|
export type AddCommentInputProps = PostComposerProps;
|
|
118
|
-
declare const PostComposer: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, onSignMessage, signingUsername, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, defaultTags, maxTags, onTagsChange, hideTags, reward, defaultReward, onRewardChange, hideReward, showVoteButton, defaultVoteEnabled, defaultVotePercent, onVoteChange, voteLabel, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, disableAutoFocus, walletApprovalLabel, awaitingWalletApproval, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
121
|
+
declare const PostComposer: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, onSignMessage, signingUsername, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, defaultTags, maxTags, onTagsChange, hideTags, reward, defaultReward, onRewardChange, hideReward, showVoteButton, defaultVoteEnabled, defaultVotePercent, voteWeightStep, onVoteChange, voteLabel, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, disableAutoFocus, walletApprovalLabel, awaitingWalletApproval, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
119
122
|
/** @deprecated Use PostComposer instead */
|
|
120
|
-
declare const AddCommentInput: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, onSignMessage, signingUsername, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, defaultTags, maxTags, onTagsChange, hideTags, reward, defaultReward, onRewardChange, hideReward, showVoteButton, defaultVoteEnabled, defaultVotePercent, onVoteChange, voteLabel, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, disableAutoFocus, walletApprovalLabel, awaitingWalletApproval, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
123
|
+
declare const AddCommentInput: ({ onSubmit, onCancel, currentUser, placeholder, parentAuthor, parentPermlink, ecencyToken, onSignMessage, signingUsername, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hideBold, hideItalic, hideLink, hideImage, hideAudio, hideVideo, hideEmoji, hideGif, hideCode, hideMention, hideTemplate, hidePreview, hidePoll, onPollChange, defaultTags, maxTags, onTagsChange, hideTags, reward, defaultReward, onRewardChange, hideReward, showVoteButton, defaultVoteEnabled, defaultVotePercent, voteWeightStep, onVoteChange, voteLabel, showCancel, submitLabel, title, defaultPreviewOn, value, onChange, disabled, hideSubmitArea, submitRef, hideUserHeader, bgColor, borderColor, disableAutoFocus, walletApprovalLabel, awaitingWalletApproval, }: PostComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
121
124
|
export { PostComposer };
|
|
122
125
|
export default AddCommentInput;
|
|
@@ -30,6 +30,10 @@ interface CommentsModalProps {
|
|
|
30
30
|
templateToken?: string;
|
|
31
31
|
/** Custom template API endpoint */
|
|
32
32
|
templateApiBaseUrl?: string;
|
|
33
|
+
/** Initial percent for the composer's "upvote on publish" slider. Default 100. */
|
|
34
|
+
defaultVotePercent?: number;
|
|
35
|
+
/** Slider precision for the composer's "upvote on publish" slider (0.25, 0.5, or 1). Default 0.25. */
|
|
36
|
+
voteWeightStep?: number;
|
|
33
37
|
}
|
|
34
|
-
declare const CommentsModal: ({ author, permlink, onClose, currentUser, token, onClickCommentUpvote, onClickCommentReply, onClickUpvoteButton, onSubmitComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, showVoteButton, parentTags, defaultReward }: CommentsModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
declare const CommentsModal: ({ author, permlink, onClose, currentUser, token, onClickCommentUpvote, onClickCommentReply, onClickUpvoteButton, onSubmitComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, showVoteButton, parentTags, defaultReward, defaultVotePercent, voteWeightStep }: CommentsModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
39
|
export default CommentsModal;
|
|
@@ -29,6 +29,11 @@ interface InlineCommentItemProps {
|
|
|
29
29
|
onUserClick?: (username: string) => void;
|
|
30
30
|
/** Default reward routing seeded into every reply composer. */
|
|
31
31
|
defaultReward?: RewardOption;
|
|
32
|
+
/** Initial percent for the comment-upvote slider AND reply composer's
|
|
33
|
+
* upvote-on-publish slider. Default 100. */
|
|
34
|
+
defaultVotePercent?: number;
|
|
35
|
+
/** Slider precision (0.25, 0.5, or 1) used by both sliders. Default 0.25. */
|
|
36
|
+
voteWeightStep?: number;
|
|
32
37
|
/** Renderer URL overrides applied to the comment body. */
|
|
33
38
|
renderOptions?: {
|
|
34
39
|
userLinkUrlFn?: (username: string) => string;
|
|
@@ -37,5 +42,5 @@ interface InlineCommentItemProps {
|
|
|
37
42
|
ipfsGateway?: string;
|
|
38
43
|
};
|
|
39
44
|
}
|
|
40
|
-
export default function InlineCommentItem({ comment, allComments, onReply, onCancelReply, onCommentSubmit, activeReplyKey, currentUser, token, depth, onVotedRefresh, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, onShareComment, onTipComment, onReportComment, onNavigateToPost, onUserClick, defaultReward, renderOptions, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export default function InlineCommentItem({ comment, allComments, onReply, onCancelReply, onCommentSubmit, activeReplyKey, currentUser, token, depth, onVotedRefresh, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, onShareComment, onTipComment, onReportComment, onNavigateToPost, onUserClick, defaultReward, defaultVotePercent, voteWeightStep, renderOptions, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
41
46
|
export {};
|
|
@@ -15,6 +15,10 @@ interface InlineCommentSectionProps {
|
|
|
15
15
|
parentTags?: string[];
|
|
16
16
|
/** Default reward routing seeded into every reply composer in this section. */
|
|
17
17
|
defaultReward?: RewardOption;
|
|
18
|
+
/** Initial percent for the "upvote on publish" slider in every reply composer. Default 100. */
|
|
19
|
+
defaultVotePercent?: number;
|
|
20
|
+
/** Slider precision (0.25, 0.5, or 1) used by every reply composer. Default 0.25. */
|
|
21
|
+
voteWeightStep?: number;
|
|
18
22
|
/** Renderer URL overrides applied to every comment body in this section. */
|
|
19
23
|
renderOptions?: {
|
|
20
24
|
userLinkUrlFn?: (username: string) => string;
|
|
@@ -43,5 +47,5 @@ interface InlineCommentSectionProps {
|
|
|
43
47
|
/** Intercept intra-body Hive profile links in comment bodies. */
|
|
44
48
|
onUserClick?: (username: string) => void;
|
|
45
49
|
}
|
|
46
|
-
export default function InlineCommentSection({ author, permlink, currentUser, token, onSubmitComment, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, onShareComment, onTipComment, onReportComment, onNavigateToPost, onUserClick, showVoteButton, alreadyVoted, parentTags, defaultReward, renderOptions, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export default function InlineCommentSection({ author, permlink, currentUser, token, onSubmitComment, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, onShareComment, onTipComment, onReportComment, onNavigateToPost, onUserClick, showVoteButton, alreadyVoted, parentTags, defaultReward, defaultVotePercent, voteWeightStep, renderOptions, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
47
51
|
export {};
|
|
@@ -32,6 +32,10 @@ export interface PollListItemProps {
|
|
|
32
32
|
giphyApiKey?: string;
|
|
33
33
|
templateToken?: string;
|
|
34
34
|
templateApiBaseUrl?: string;
|
|
35
|
+
/** Initial percent (1–100) for the poll's upvote slider. Default 100. */
|
|
36
|
+
defaultVotePercent?: number;
|
|
37
|
+
/** Slider precision (0.25 / 0.5 / 1) used by the poll's upvote slider. Default 0.25. */
|
|
38
|
+
voteWeightStep?: number;
|
|
35
39
|
}
|
|
36
40
|
declare const PollListItem: React.FC<PollListItemProps>;
|
|
37
41
|
export default PollListItem;
|
|
@@ -66,6 +66,13 @@ export interface UserDetailProfileProps {
|
|
|
66
66
|
onAddToFavourite?: (username: string) => void | Promise<void>;
|
|
67
67
|
isFavourited?: boolean;
|
|
68
68
|
favouriteCount?: number;
|
|
69
|
+
/** Initial percent (1–100) for every upvote slider on the profile page —
|
|
70
|
+
* post upvotes, comment upvotes, and the upvote-on-publish slider in
|
|
71
|
+
* inline comment composers. Default 100. Typically wired to a user setting. */
|
|
72
|
+
defaultVotePercent?: number;
|
|
73
|
+
/** Slider precision (0.25, 0.5, or 1) for every upvote slider on this page.
|
|
74
|
+
* Default 0.25. */
|
|
75
|
+
voteWeightStep?: number;
|
|
69
76
|
}
|
|
70
77
|
type TabType = "blogs" | "posts" | "snaps" | "polls" | "comments" | "replies" | "activities" | "authorRewards" | "curationRewards" | "followers" | "following" | "wallet" | "votingPower" | "badges" | "witnessVotes" | "growth";
|
|
71
78
|
declare const UserDetailProfile: React.FC<UserDetailProfileProps>;
|