hive-react-kit 1.7.7 → 1.7.12

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 CHANGED
@@ -303,6 +303,9 @@
303
303
  }
304
304
  }
305
305
  @layer utilities {
306
+ .\@container {
307
+ container-type: inline-size;
308
+ }
306
309
  .pointer-events-none {
307
310
  pointer-events: none;
308
311
  }
@@ -709,6 +712,12 @@
709
712
  -webkit-box-orient: vertical;
710
713
  -webkit-line-clamp: 2;
711
714
  }
715
+ .line-clamp-3 {
716
+ overflow: hidden;
717
+ display: -webkit-box;
718
+ -webkit-box-orient: vertical;
719
+ -webkit-line-clamp: 3;
720
+ }
712
721
  .line-clamp-4 {
713
722
  overflow: hidden;
714
723
  display: -webkit-box;
@@ -3614,6 +3623,16 @@
3614
3623
  }
3615
3624
  }
3616
3625
  }
3626
+ .hover\:border-\[var\(--hrk-brand\)\]\/50 {
3627
+ &:hover {
3628
+ @media (hover: hover) {
3629
+ border-color: var(--hrk-brand);
3630
+ @supports (color: color-mix(in lab, red, red)) {
3631
+ border-color: color-mix(in oklab, var(--hrk-brand) 50%, transparent);
3632
+ }
3633
+ }
3634
+ }
3635
+ }
3617
3636
  .hover\:border-\[var\(--hrk-brand\)\]\/60 {
3618
3637
  &:hover {
3619
3638
  @media (hover: hover) {
@@ -5529,6 +5548,27 @@
5529
5548
  grid-template-columns: repeat(4, minmax(0, 1fr));
5530
5549
  }
5531
5550
  }
5551
+ .\@\[28rem\]\:h-32 {
5552
+ @container (width >= 28rem) {
5553
+ height: calc(var(--spacing) * 32);
5554
+ }
5555
+ }
5556
+ .\@\[28rem\]\:w-44 {
5557
+ @container (width >= 28rem) {
5558
+ width: calc(var(--spacing) * 44);
5559
+ }
5560
+ }
5561
+ .\@\[28rem\]\:flex-row {
5562
+ @container (width >= 28rem) {
5563
+ flex-direction: row;
5564
+ }
5565
+ }
5566
+ .\@\[28rem\]\:text-base {
5567
+ @container (width >= 28rem) {
5568
+ font-size: var(--text-base);
5569
+ line-height: var(--tw-leading, var(--text-base--line-height));
5570
+ }
5571
+ }
5532
5572
  .dark\:border-\[var\(--hrk-border-default\)\] {
5533
5573
  @media (prefers-color-scheme: dark) {
5534
5574
  border-color: var(--hrk-border-default);
@@ -27,8 +27,12 @@ interface UpvoteListModalProps {
27
27
  /** Unit suffix for each voter's `value` (e.g. "MHP"). Shown after the
28
28
  * number in voters-only mode; no Hive reward icon is rendered. */
29
29
  valueUnit?: string;
30
- /** Header title override. Defaults to "Votes (Hive Rewards)". */
30
+ /** Header title override. Defaults to "Votes (Hive Rewards)" or
31
+ * "Downvotes" when `voteFilter` is `"downvotes"`. */
31
32
  title?: string;
33
+ /** When `"downvotes"`, only negative votes are listed (opened from
34
+ * the broken-heart indicator). Default `"upvotes"`. */
35
+ voteFilter?: 'upvotes' | 'downvotes';
32
36
  /** Makes each voter row navigate to the account's profile. Mainly
33
37
  * used in voters-only mode. */
34
38
  onUserClick?: (username: string) => void;
@@ -43,5 +47,5 @@ export interface VoterRow {
43
47
  value?: number;
44
48
  }
45
49
  export declare function formatTimeAgo(date: string | Date): string;
46
- declare const UpvoteListModal: ({ author, permlink, onClose, currentUser, token, onClickUpvoteButton, hiveIconUrl, voters, fetchVoters, valueUnit, title, onUserClick, getUserUrl, }: UpvoteListModalProps) => import("react/jsx-runtime").JSX.Element;
50
+ declare const UpvoteListModal: ({ author, permlink, onClose, currentUser, token, onClickUpvoteButton, hiveIconUrl, voters, fetchVoters, valueUnit, title, voteFilter, onUserClick, getUserUrl, }: UpvoteListModalProps) => import("react/jsx-runtime").JSX.Element;
47
51
  export default UpvoteListModal;
@@ -27,6 +27,10 @@ export interface PostActionButtonProps {
27
27
  * popular posts. Pass this when you have the canonical total so
28
28
  * the chip reads "1.2k" instead of being capped at 1000. */
29
29
  initialVoteCount?: number;
30
+ /** Hive `stats.flag_weight` — non-zero means the post has downvotes.
31
+ * Pair with `initialVotes` so the broken-heart indicator is reliable
32
+ * even when the capped `active_votes` array omits flag voters. */
33
+ initialFlagWeight?: number;
30
34
  /** Optional: Pre-loaded comments count from the Post object (item.children). Skips the API call when provided. */
31
35
  initialCommentsCount?: number;
32
36
  /** Called when user confirms vote with percent (1–100). Frontend handles signing/broadcast. */
@@ -150,5 +154,5 @@ export interface PostActionButtonProps {
150
154
  * polls, community detail) where there isn't room for four icons. */
151
155
  actionsAsMenu?: boolean;
152
156
  }
153
- export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, payoutDetails, initialVotes, initialVoteCount, initialCommentsCount, onUpvote, onSubmitComment, onComments, onEdit, onReblog, onReSnap, onShare, onTip, onReport, onToggleBookmark, isBookmarked, onDelete, onPin, onUnpin, onClickCommentUpvote, onUserClick, getUserUrl, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, disableCommentsModal, onClickCommentIcon, onClickCommentCount, hasCommented, myReplyKey, showVoteButton, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, actionsAsMenu, awaitingWalletApproval, postCreatedAt, size, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
157
+ export declare function PostActionButton({ author, permlink, currentUser: currentUserProp, hiveValue, hiveIconUrl, payoutTooltip, payoutDetails, initialVotes, initialVoteCount, initialFlagWeight, initialCommentsCount, onUpvote, onSubmitComment, onComments, onEdit, onReblog, onReSnap, onShare, onTip, onReport, onToggleBookmark, isBookmarked, onDelete, onPin, onUnpin, onClickCommentUpvote, onUserClick, getUserUrl, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, disableCommentsModal, onClickCommentIcon, onClickCommentCount, hasCommented, myReplyKey, showVoteButton, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, actionsAsMenu, awaitingWalletApproval, postCreatedAt, size, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
154
158
  export default PostActionButton;
@@ -32,6 +32,13 @@ interface ReSnapEmbedProps {
32
32
  onPostClick?: (author: string, permlink: string) => void;
33
33
  /** Optional callback for tapping the embedded author. */
34
34
  onUserClick?: (username: string) => void;
35
+ /** Emits true when a preview card is shown (post or re-snap). Emits false
36
+ * when the fetch fails or top-level posts are hidden (`showTopLevelPostPreview`
37
+ * is false). */
38
+ onPreviewVisibilityChange?: (visible: boolean) => void;
39
+ /** When true, depth-0 targets render a compact "Post" preview instead of
40
+ * being hidden. Used in Snaps feed and detail pages. */
41
+ showTopLevelPostPreview?: boolean;
35
42
  }
36
43
  declare const ReSnapEmbed: FC<ReSnapEmbedProps>;
37
44
  export default ReSnapEmbed;