hive-react-kit 1.11.2 → 1.12.2
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/build.css +28 -0
- package/dist/components/BlogPostList.d.ts +5 -0
- package/dist/components/CurationButton.d.ts +8 -0
- package/dist/components/HiveDetailPost.d.ts +7 -1
- package/dist/components/feed/AttachmentStrip.d.ts +1 -0
- package/dist/components/feed/SnapsFeedCard.d.ts +5 -0
- package/dist/components/feed/SnapsFeedView.d.ts +6 -1
- package/dist/components/inlineComments/InlineCommentItem.d.ts +6 -1
- package/dist/components/inlineComments/InlineCommentSection.d.ts +6 -1
- package/dist/index.cjs.js +214 -215
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +31348 -31510
- package/package.json +1 -1
package/dist/build.css
CHANGED
|
@@ -73,6 +73,8 @@
|
|
|
73
73
|
--color-purple-800: oklch(43.8% 0.218 303.724);
|
|
74
74
|
--color-purple-900: oklch(38.1% 0.176 304.987);
|
|
75
75
|
--color-pink-400: oklch(71.8% 0.202 349.761);
|
|
76
|
+
--color-pink-500: oklch(65.6% 0.241 354.308);
|
|
77
|
+
--color-pink-600: oklch(59.2% 0.249 0.584);
|
|
76
78
|
--color-rose-400: oklch(71.2% 0.194 13.428);
|
|
77
79
|
--color-slate-50: oklch(98.4% 0.003 247.858);
|
|
78
80
|
--color-slate-300: oklch(86.9% 0.022 252.894);
|
|
@@ -2050,6 +2052,9 @@
|
|
|
2050
2052
|
background-color: color-mix(in oklab, var(--hrk-bg-app) 95%, transparent);
|
|
2051
2053
|
}
|
|
2052
2054
|
}
|
|
2055
|
+
.bg-\[var\(--hrk-bg-card\)\] {
|
|
2056
|
+
background-color: var(--hrk-bg-card);
|
|
2057
|
+
}
|
|
2053
2058
|
.bg-\[var\(--hrk-bg-hover\)\] {
|
|
2054
2059
|
background-color: var(--hrk-bg-hover);
|
|
2055
2060
|
}
|
|
@@ -2545,6 +2550,9 @@
|
|
|
2545
2550
|
background-color: color-mix(in oklab, var(--color-orange-500) 15%, transparent);
|
|
2546
2551
|
}
|
|
2547
2552
|
}
|
|
2553
|
+
.bg-pink-500 {
|
|
2554
|
+
background-color: var(--color-pink-500);
|
|
2555
|
+
}
|
|
2548
2556
|
.bg-purple-100 {
|
|
2549
2557
|
background-color: var(--color-purple-100);
|
|
2550
2558
|
}
|
|
@@ -3189,6 +3197,9 @@
|
|
|
3189
3197
|
.text-\[var\(--hrk-success\)\] {
|
|
3190
3198
|
color: var(--hrk-success);
|
|
3191
3199
|
}
|
|
3200
|
+
.text-\[var\(--hrk-text-muted\)\] {
|
|
3201
|
+
color: var(--hrk-text-muted);
|
|
3202
|
+
}
|
|
3192
3203
|
.text-\[var\(--hrk-text-on-brand\)\] {
|
|
3193
3204
|
color: var(--hrk-text-on-brand);
|
|
3194
3205
|
}
|
|
@@ -3482,6 +3493,9 @@
|
|
|
3482
3493
|
.accent-blue-600 {
|
|
3483
3494
|
accent-color: var(--color-blue-600);
|
|
3484
3495
|
}
|
|
3496
|
+
.accent-pink-500 {
|
|
3497
|
+
accent-color: var(--color-pink-500);
|
|
3498
|
+
}
|
|
3485
3499
|
.opacity-0 {
|
|
3486
3500
|
opacity: 0%;
|
|
3487
3501
|
}
|
|
@@ -4283,6 +4297,13 @@
|
|
|
4283
4297
|
}
|
|
4284
4298
|
}
|
|
4285
4299
|
}
|
|
4300
|
+
.hover\:bg-pink-600 {
|
|
4301
|
+
&:hover {
|
|
4302
|
+
@media (hover: hover) {
|
|
4303
|
+
background-color: var(--color-pink-600);
|
|
4304
|
+
}
|
|
4305
|
+
}
|
|
4306
|
+
}
|
|
4286
4307
|
.hover\:bg-purple-700 {
|
|
4287
4308
|
&:hover {
|
|
4288
4309
|
@media (hover: hover) {
|
|
@@ -4546,6 +4567,13 @@
|
|
|
4546
4567
|
}
|
|
4547
4568
|
}
|
|
4548
4569
|
}
|
|
4570
|
+
.hover\:text-pink-400 {
|
|
4571
|
+
&:hover {
|
|
4572
|
+
@media (hover: hover) {
|
|
4573
|
+
color: var(--color-pink-400);
|
|
4574
|
+
}
|
|
4575
|
+
}
|
|
4576
|
+
}
|
|
4549
4577
|
.hover\:text-red-400 {
|
|
4550
4578
|
&:hover {
|
|
4551
4579
|
@media (hover: hover) {
|
|
@@ -86,6 +86,11 @@ export interface BlogPostListProps {
|
|
|
86
86
|
* flag) into a single 3-dot kebab menu. Forwarded to
|
|
87
87
|
* `<PostActionButton/>`. */
|
|
88
88
|
actionsAsMenu?: boolean;
|
|
89
|
+
/** When true, a heart button is shown on each post card so the curator
|
|
90
|
+
* can request an on-chain upvote with a chosen vote weight. */
|
|
91
|
+
isCurator?: boolean;
|
|
92
|
+
/** Called when the curator submits a curation request. Weight is 1–15. */
|
|
93
|
+
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
89
94
|
}
|
|
90
95
|
export declare const BlogPostList: FC<BlogPostListProps>;
|
|
91
96
|
export default BlogPostList;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface CurationButtonProps {
|
|
2
|
+
author: string;
|
|
3
|
+
permlink: string;
|
|
4
|
+
type: 'post' | 'snap' | 'comment';
|
|
5
|
+
onCurationRequest: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare function CurationButton({ author, permlink, type, onCurationRequest }: CurationButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -223,6 +223,12 @@ export interface HiveDetailPostProps {
|
|
|
223
223
|
* `<TranslatedText>` / inline-comment translators inside the
|
|
224
224
|
* page will then re-render with the new language. */
|
|
225
225
|
onSelectLanguage?: (code: string) => void;
|
|
226
|
+
/** When true, a heart button is shown on the post and on each comment
|
|
227
|
+
* so the curator can request on-chain upvotes. */
|
|
228
|
+
isCurator?: boolean;
|
|
229
|
+
/** Called when the curator submits a curation request. `type` is
|
|
230
|
+
* `'post'` for the main post or `'comment'` for a comment. */
|
|
231
|
+
onCurationRequest?: (author: string, permlink: string, weight: number, type: 'post' | 'comment') => void | Promise<void>;
|
|
226
232
|
}
|
|
227
|
-
export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, isReblogged, onShare, onTip, onReport, onEdit, onDelete, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, onEditComment, onDeleteComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, backgroundColor, onBack, onOpenMenu, onOpenProfileMenu, onUserClick, onCommunityClick, getUserUrl, getCommunityUrl, onNavigateToPost, isBookmarked, onToggleBookmark, onHeaderShare, onHeaderReport, language, onSelectLanguage, onVotePoll, showVoteButton, processBody, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, renderOptions, awaitingWalletApproval, decentMemesAppAccount, decentMemesTheme, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
233
|
+
export declare function HiveDetailPost({ author, permlink, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, isReblogged, onShare, onTip, onReport, onEdit, onDelete, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, onEditComment, onDeleteComment, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, backgroundColor, onBack, onOpenMenu, onOpenProfileMenu, onUserClick, onCommunityClick, getUserUrl, getCommunityUrl, onNavigateToPost, isBookmarked, onToggleBookmark, onHeaderShare, onHeaderReport, language, onSelectLanguage, onVotePoll, showVoteButton, processBody, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, renderOptions, awaitingWalletApproval, decentMemesAppAccount, decentMemesTheme, isCurator, onCurationRequest, }: HiveDetailPostProps): import("react/jsx-runtime").JSX.Element;
|
|
228
234
|
export default HiveDetailPost;
|
|
@@ -61,6 +61,7 @@ export declare const IMG_URL_REGEX: RegExp;
|
|
|
61
61
|
export declare const URL_REGEX: RegExp;
|
|
62
62
|
export declare const MENTION_REGEX: RegExp;
|
|
63
63
|
export declare const HASHTAG_REGEX: RegExp;
|
|
64
|
+
export declare function proxyHeicUrl(url: string): string;
|
|
64
65
|
export declare function parseJsonMetadata(jm: unknown): Record<string, unknown>;
|
|
65
66
|
export declare function hasHivesuiteFamilyTag(post: Post): boolean;
|
|
66
67
|
export declare function extractTagsFromMeta(post: Post): string[];
|
|
@@ -105,6 +105,11 @@ export interface SnapsFeedCardProps {
|
|
|
105
105
|
/** Collapse the per-card secondary actions (reblog · share · tip ·
|
|
106
106
|
* flag) into a single 3-dot kebab menu inside the action bar. */
|
|
107
107
|
actionsAsMenu?: boolean;
|
|
108
|
+
/** When true, a heart button is shown so the curator can request an
|
|
109
|
+
* on-chain upvote with a chosen weight (1–6%). */
|
|
110
|
+
isCurator?: boolean;
|
|
111
|
+
/** Called when the curator submits a curation request. Weight is 1–6. */
|
|
112
|
+
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
108
113
|
}
|
|
109
114
|
declare const SnapsFeedCard: FC<SnapsFeedCardProps>;
|
|
110
115
|
export default SnapsFeedCard;
|
|
@@ -123,6 +123,11 @@ export interface SnapsFeedViewProps {
|
|
|
123
123
|
* flag) into a single 3-dot kebab menu. Forwarded to every
|
|
124
124
|
* <SnapsFeedCard/>. */
|
|
125
125
|
actionsAsMenu?: boolean;
|
|
126
|
+
/** When true, a heart button is shown on each snap card so the curator
|
|
127
|
+
* can request an on-chain upvote (1–6%). Forwarded to every <SnapsFeedCard/>. */
|
|
128
|
+
isCurator?: boolean;
|
|
129
|
+
/** Called when the curator submits a curation request on a snap. */
|
|
130
|
+
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
126
131
|
/** When `true`, the desktop 4-column layout grows naturally with its
|
|
127
132
|
* content instead of pinning each column to a fixed-height per-column
|
|
128
133
|
* scroller. Use this when the parent page already provides a single
|
|
@@ -132,5 +137,5 @@ export interface SnapsFeedViewProps {
|
|
|
132
137
|
pageScroll?: boolean;
|
|
133
138
|
onActiveFeedChange?: (feed: SnapsFeedKey) => void;
|
|
134
139
|
}
|
|
135
|
-
export declare function SnapsFeedView({ feeds, labels, avatars, defaultPrimary, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, isPostReblogged, onCheckReblogged, onReSnap, onTip, onSharePost, onCommentClick, onClickCommentIcon, onClickCommentCount, onReportPost, onToggleBookmark, isPostBookmarked, onDeletePost, onEditSnap, onVotePoll, onUserClick, onPostClick, getPostUrl, getUserUrl, getTagUrl, getCommunityUrl, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, defaultReward, toolbar, footer, renderHeaderActions, actionsAsMenu, pageScroll, onActiveFeedChange, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
|
|
140
|
+
export declare function SnapsFeedView({ feeds, labels, avatars, defaultPrimary, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, isPostReblogged, onCheckReblogged, onReSnap, onTip, onSharePost, onCommentClick, onClickCommentIcon, onClickCommentCount, onReportPost, onToggleBookmark, isPostBookmarked, onDeletePost, onEditSnap, onVotePoll, onUserClick, onPostClick, getPostUrl, getUserUrl, getTagUrl, getCommunityUrl, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, defaultReward, toolbar, footer, renderHeaderActions, actionsAsMenu, isCurator, onCurationRequest, pageScroll, onActiveFeedChange, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
|
|
136
141
|
export default SnapsFeedView;
|
|
@@ -82,6 +82,11 @@ interface InlineCommentItemProps {
|
|
|
82
82
|
decentMemesAppAccount?: string;
|
|
83
83
|
/** Forwarded to DecentMemes pickers as `frontendInit.theme` / `setTheme`. */
|
|
84
84
|
decentMemesTheme?: 'light' | 'dark';
|
|
85
|
+
/** When true, a heart button is shown on this comment so the curator
|
|
86
|
+
* can request an on-chain upvote (1–3%). */
|
|
87
|
+
isCurator?: boolean;
|
|
88
|
+
/** Called when the curator submits a curation request. Weight is 1–3. */
|
|
89
|
+
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
85
90
|
}
|
|
86
|
-
export default function InlineCommentItem({ comment, allComments, onReply, onCancelReply, onCommentSubmit, activeReplyKey, currentUser, token, depth, onVotedRefresh, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, mentionSeedAccounts, onEditComment, onDeleteComment, onNavigateToPost, onUserClick, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, parentTags, decentMemesAppAccount, decentMemesTheme, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
export default function InlineCommentItem({ comment, allComments, onReply, onCancelReply, onCommentSubmit, activeReplyKey, currentUser, token, depth, onVotedRefresh, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, hiveIconUrl, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, mentionSeedAccounts, onEditComment, onDeleteComment, onNavigateToPost, onUserClick, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, parentTags, decentMemesAppAccount, decentMemesTheme, isCurator, onCurationRequest, }: InlineCommentItemProps): import("react/jsx-runtime").JSX.Element;
|
|
87
92
|
export {};
|
|
@@ -87,6 +87,11 @@ interface InlineCommentSectionProps {
|
|
|
87
87
|
decentMemesAppAccount?: string;
|
|
88
88
|
/** Forwarded to DecentMemes pickers as `frontendInit.theme` / `setTheme`. */
|
|
89
89
|
decentMemesTheme?: 'light' | 'dark';
|
|
90
|
+
/** When true, a heart button is shown on each comment so the curator
|
|
91
|
+
* can request an on-chain upvote (1–3%). */
|
|
92
|
+
isCurator?: boolean;
|
|
93
|
+
/** Called when the curator submits a curation request on a comment. */
|
|
94
|
+
onCurationRequest?: (author: string, permlink: string, weight: number) => void | Promise<void>;
|
|
90
95
|
}
|
|
91
|
-
export default function InlineCommentSection({ author, permlink, currentUser, token, onSubmitComment, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, mentionSeedAccounts, onEditComment, onDeleteComment, onNavigateToPost, onUserClick, showVoteButton, alreadyVoted, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, decentMemesAppAccount, decentMemesTheme, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
export default function InlineCommentSection({ author, permlink, currentUser, token, onSubmitComment, onClickCommentUpvote, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, reportedAuthors, reportedPosts, hiveIconUrl, onShareComment, onTipComment, onReportComment, onToggleCommentBookmark, isCommentBookmarked, mentionSeedAccounts, onEditComment, onDeleteComment, onNavigateToPost, onUserClick, showVoteButton, alreadyVoted, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, awaitingWalletApproval, renderOptions, decentMemesAppAccount, decentMemesTheme, isCurator, onCurationRequest, }: InlineCommentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
92
97
|
export {};
|