hive-react-kit 0.9.4 → 0.9.6
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 +20 -1
- package/dist/components/VoteSlider.d.ts +3 -1
- package/dist/components/actionButtons/PostActionButton.d.ts +8 -1
- package/dist/components/comments/AddCommentInput.d.ts +10 -3
- package/dist/components/comments/CommentsModal.d.ts +7 -1
- package/dist/components/composer/VideoUploader.d.ts +3 -0
- package/dist/components/inlineComments/InlineCommentItem.d.ts +8 -1
- package/dist/components/inlineComments/InlineCommentSection.d.ts +7 -1
- package/dist/components/user/PollListItem.d.ts +6 -0
- package/dist/components/user/UserDetailProfile.d.ts +10 -0
- package/dist/index.cjs.js +83 -83
- package/dist/index.esm.js +5358 -5299
- package/package.json +1 -1
|
@@ -28,6 +28,25 @@ 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;
|
|
43
|
+
/**
|
|
44
|
+
* Allow landscape (horizontal) videos in the embedded comment composer's
|
|
45
|
+
* video uploader. Default false — only portrait clips, matching the
|
|
46
|
+
* hSnaps Moments contract. Set true for apps where horizontal video is
|
|
47
|
+
* acceptable (e.g. hivesuite).
|
|
48
|
+
*/
|
|
49
|
+
allowLandscapeVideos?: boolean;
|
|
31
50
|
/**
|
|
32
51
|
* Override the Hive content renderer's link-generating functions so the
|
|
33
52
|
* rendered `<a>` URLs route into your app instead of an external Hive
|
|
@@ -88,5 +107,5 @@ export interface HiveDetailPostProps {
|
|
|
88
107
|
/** Called when user clicks "View parent post" — navigate to the parent post. */
|
|
89
108
|
onNavigateToPost?: (author: string, permlink: string) => void;
|
|
90
109
|
}
|
|
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;
|
|
110
|
+
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, allowLandscapeVideos, renderOptions, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
92
111
|
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,13 @@ 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;
|
|
36
|
+
/** Allow landscape videos in the embedded comment composer's uploader. Default false. */
|
|
37
|
+
allowLandscapeVideos?: boolean;
|
|
31
38
|
/** Called when comment button is clicked (e.g. open comments). */
|
|
32
39
|
onComments?: () => void;
|
|
33
40
|
/** Called when reblog is clicked (when logged in). */
|
|
@@ -53,5 +60,5 @@ export interface PostActionButtonProps {
|
|
|
53
60
|
/** When true, clicking the comment icon calls onComments instead of opening the CommentsModal popup */
|
|
54
61
|
disableCommentsModal?: boolean;
|
|
55
62
|
}
|
|
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;
|
|
63
|
+
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, allowLandscapeVideos, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
57
64
|
export default PostActionButton;
|
|
@@ -68,8 +68,15 @@ 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;
|
|
76
|
+
/** Allow landscape (horizontal) videos in the embedded VideoUploader.
|
|
77
|
+
* Default false — only portrait clips, matching the hSnaps Moments contract.
|
|
78
|
+
* Set true on apps where horizontal video is acceptable (e.g. hivesuite). */
|
|
79
|
+
allowLandscapeVideos?: boolean;
|
|
73
80
|
/**
|
|
74
81
|
* Called whenever the upvote-on-publish toggle or percent changes.
|
|
75
82
|
* `enabled=false` => consumer should post a plain comment.
|
|
@@ -115,8 +122,8 @@ export interface PostComposerProps {
|
|
|
115
122
|
}
|
|
116
123
|
/** @deprecated Use PostComposerProps instead */
|
|
117
124
|
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;
|
|
125
|
+
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, allowLandscapeVideos, 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
126
|
/** @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;
|
|
127
|
+
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, allowLandscapeVideos, 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
128
|
export { PostComposer };
|
|
122
129
|
export default AddCommentInput;
|
|
@@ -30,6 +30,12 @@ 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;
|
|
37
|
+
/** Allow landscape videos in the comment composer. Default false. */
|
|
38
|
+
allowLandscapeVideos?: boolean;
|
|
33
39
|
}
|
|
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;
|
|
40
|
+
declare const CommentsModal: ({ author, permlink, onClose, currentUser, token, onClickCommentUpvote, onClickCommentReply, onClickUpvoteButton, onSubmitComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, showVoteButton, parentTags, defaultReward, defaultVotePercent, voteWeightStep, allowLandscapeVideos }: CommentsModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
41
|
export default CommentsModal;
|
|
@@ -12,6 +12,9 @@ export interface VideoUploaderProps {
|
|
|
12
12
|
/** 3Speak API key. Falls back to demo key if not provided. */
|
|
13
13
|
threeSpeakApiKey?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
|
+
/** When true, accept landscape videos too. Default false — only portrait
|
|
16
|
+
* (vertical) clips are accepted, matching the hSnaps Moments contract. */
|
|
17
|
+
allowLandscape?: boolean;
|
|
15
18
|
}
|
|
16
19
|
declare const VideoUploader: React.FC<VideoUploaderProps>;
|
|
17
20
|
export default VideoUploader;
|
|
@@ -29,6 +29,13 @@ 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;
|
|
37
|
+
/** Allow landscape videos in this comment's reply composer. Default false. */
|
|
38
|
+
allowLandscapeVideos?: boolean;
|
|
32
39
|
/** Renderer URL overrides applied to the comment body. */
|
|
33
40
|
renderOptions?: {
|
|
34
41
|
userLinkUrlFn?: (username: string) => string;
|
|
@@ -37,5 +44,5 @@ interface InlineCommentItemProps {
|
|
|
37
44
|
ipfsGateway?: string;
|
|
38
45
|
};
|
|
39
46
|
}
|
|
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;
|
|
47
|
+
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, allowLandscapeVideos, renderOptions, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
41
48
|
export {};
|
|
@@ -15,6 +15,12 @@ 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;
|
|
22
|
+
/** Allow landscape videos in every reply composer's video uploader. Default false. */
|
|
23
|
+
allowLandscapeVideos?: boolean;
|
|
18
24
|
/** Renderer URL overrides applied to every comment body in this section. */
|
|
19
25
|
renderOptions?: {
|
|
20
26
|
userLinkUrlFn?: (username: string) => string;
|
|
@@ -43,5 +49,5 @@ interface InlineCommentSectionProps {
|
|
|
43
49
|
/** Intercept intra-body Hive profile links in comment bodies. */
|
|
44
50
|
onUserClick?: (username: string) => void;
|
|
45
51
|
}
|
|
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;
|
|
52
|
+
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, allowLandscapeVideos, renderOptions, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
47
53
|
export {};
|
|
@@ -32,6 +32,12 @@ 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;
|
|
39
|
+
/** Allow landscape videos in the poll's comment composer uploader. Default false. */
|
|
40
|
+
allowLandscapeVideos?: boolean;
|
|
35
41
|
}
|
|
36
42
|
declare const PollListItem: React.FC<PollListItemProps>;
|
|
37
43
|
export default PollListItem;
|
|
@@ -66,6 +66,16 @@ 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;
|
|
76
|
+
/** Allow landscape videos in every embedded comment composer on this profile.
|
|
77
|
+
* Default false (portrait-only, matches hSnaps Moments contract). */
|
|
78
|
+
allowLandscapeVideos?: boolean;
|
|
69
79
|
}
|
|
70
80
|
type TabType = "blogs" | "posts" | "snaps" | "polls" | "comments" | "replies" | "activities" | "authorRewards" | "curationRewards" | "followers" | "following" | "wallet" | "votingPower" | "badges" | "witnessVotes" | "growth";
|
|
71
81
|
declare const UserDetailProfile: React.FC<UserDetailProfileProps>;
|