hive-react-kit 0.10.1 → 0.10.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 CHANGED
@@ -1621,6 +1621,12 @@
1621
1621
  .bg-\[\#1a1e22\] {
1622
1622
  background-color: #1a1e22;
1623
1623
  }
1624
+ .bg-\[\#1a1e22\]\/40 {
1625
+ background-color: color-mix(in oklab, #1a1e22 40%, transparent);
1626
+ }
1627
+ .bg-\[\#1a1e22\]\/80 {
1628
+ background-color: color-mix(in oklab, #1a1e22 80%, transparent);
1629
+ }
1624
1630
  .bg-\[\#1a1e22\]\/90 {
1625
1631
  background-color: color-mix(in oklab, #1a1e22 90%, transparent);
1626
1632
  }
@@ -2488,6 +2494,9 @@
2488
2494
  .text-\[\#9ca3b0\] {
2489
2495
  color: #9ca3b0;
2490
2496
  }
2497
+ .text-\[\#22c55e\] {
2498
+ color: #22c55e;
2499
+ }
2491
2500
  .text-\[\#e7e7f1\] {
2492
2501
  color: #e7e7f1;
2493
2502
  }
@@ -3462,6 +3471,16 @@
3462
3471
  border-color: var(--color-blue-500);
3463
3472
  }
3464
3473
  }
3474
+ .focus\:text-blue-400 {
3475
+ &:focus {
3476
+ color: var(--color-blue-400);
3477
+ }
3478
+ }
3479
+ .focus\:underline {
3480
+ &:focus {
3481
+ text-decoration-line: underline;
3482
+ }
3483
+ }
3465
3484
  .focus\:ring-1 {
3466
3485
  &:focus {
3467
3486
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
@@ -3484,6 +3503,14 @@
3484
3503
  --tw-ring-color: var(--color-blue-500);
3485
3504
  }
3486
3505
  }
3506
+ .focus\:ring-blue-500\/60 {
3507
+ &:focus {
3508
+ --tw-ring-color: color-mix(in srgb, oklch(62.3% 0.214 259.815) 60%, transparent);
3509
+ @supports (color: color-mix(in lab, red, red)) {
3510
+ --tw-ring-color: color-mix(in oklab, var(--color-blue-500) 60%, transparent);
3511
+ }
3512
+ }
3513
+ }
3487
3514
  .focus\:ring-purple-500\/50 {
3488
3515
  &:focus {
3489
3516
  --tw-ring-color: color-mix(in srgb, oklch(62.7% 0.265 303.9) 50%, transparent);
@@ -5075,7 +5102,7 @@
5075
5102
  display: flex;
5076
5103
  justify-content: center;
5077
5104
  }
5078
- .hive-post-body .threeSpeakNative {
5105
+ .threeSpeakNative {
5079
5106
  width: 100%;
5080
5107
  margin: 0 auto;
5081
5108
  border-radius: 0.75rem;
@@ -5086,17 +5113,17 @@
5086
5113
  justify-content: center;
5087
5114
  position: relative;
5088
5115
  }
5089
- .hive-post-body .threeSpeakNative.threeSpeakNativeLandscape {
5116
+ .threeSpeakNative.threeSpeakNativeLandscape {
5090
5117
  aspect-ratio: 16 / 9;
5091
5118
  max-width: 800px;
5092
5119
  max-height: 80vh;
5093
5120
  }
5094
- .hive-post-body .threeSpeakNative.threeSpeakNativePortrait {
5121
+ .threeSpeakNative.threeSpeakNativePortrait {
5095
5122
  aspect-ratio: 9 / 16;
5096
5123
  max-width: 450px;
5097
5124
  max-height: 80vh;
5098
5125
  }
5099
- .hive-post-body .threeSpeakNative video, .hive-post-body .threeSpeakNative .threeSpeakNativeThumb {
5126
+ .threeSpeakNative video, .threeSpeakNative .threeSpeakNativeThumb {
5100
5127
  display: block;
5101
5128
  position: absolute;
5102
5129
  inset: 0;
@@ -5106,27 +5133,35 @@
5106
5133
  border-radius: 0.75rem;
5107
5134
  object-fit: contain;
5108
5135
  }
5109
- .hive-post-body .threeSpeakNative .threeSpeakNativeThumb {
5136
+ .threeSpeakNative .threeSpeakNativeThumb {
5110
5137
  z-index: 1;
5111
5138
  pointer-events: none;
5112
5139
  }
5113
- .hive-post-body .threeSpeakNative video {
5140
+ .threeSpeakNative video {
5114
5141
  z-index: 2;
5115
5142
  }
5116
- .hive-post-body .threeSpeakNative.threeSpeakNativeNoThumb {
5117
- aspect-ratio: auto;
5118
- max-width: none;
5143
+ .threeSpeakNative.threeSpeakNativeNoThumb {
5119
5144
  display: block;
5120
- background: transparent;
5145
+ margin: 0 auto;
5146
+ background: #000;
5147
+ border-radius: 0.75rem;
5148
+ overflow: hidden;
5149
+ max-width: min(100%, 800px);
5150
+ max-height: 80vh;
5151
+ position: relative;
5152
+ min-height: 200px;
5121
5153
  }
5122
- .hive-post-body .threeSpeakNative.threeSpeakNativeNoThumb video {
5123
- position: static;
5154
+ .threeSpeakNative.threeSpeakNativeNoThumb video {
5155
+ position: absolute;
5156
+ inset: 0;
5124
5157
  width: 100%;
5125
- height: auto;
5126
- max-width: 800px;
5127
- margin: 0 auto;
5158
+ height: 100%;
5159
+ display: block;
5160
+ background: #000;
5161
+ border-radius: 0.75rem;
5162
+ object-fit: contain;
5128
5163
  }
5129
- .hive-post-body .threeSpeakNativeMessage {
5164
+ .threeSpeakNativeMessage {
5130
5165
  color: #9ca3b0;
5131
5166
  font-size: 0.875rem;
5132
5167
  }
@@ -52,6 +52,10 @@ export interface BlogPostListProps {
52
52
  allowLandscapeVideos?: boolean;
53
53
  /** Default reward routing for inline comment composers. */
54
54
  defaultReward?: RewardOption;
55
+ /** Collapse the per-card secondary actions (reblog · share · tip ·
56
+ * flag) into a single 3-dot kebab menu. Forwarded to
57
+ * `<PostActionButton/>`. */
58
+ actionsAsMenu?: boolean;
55
59
  }
56
60
  export declare const BlogPostList: FC<BlogPostListProps>;
57
61
  export default BlogPostList;
@@ -5,7 +5,13 @@ interface UpvoteListModalProps {
5
5
  currentUser?: string;
6
6
  token?: string;
7
7
  onClickUpvoteButton?: (currentUser?: string, token?: string) => void;
8
+ /** URL for the small Hive icon shown next to each voter's reward
9
+ * amount. Consumers usually pass a local asset (e.g. the bundled
10
+ * hivesuite hive_logo.png) so the icon stays sharp on retina and
11
+ * works offline; falls back to the official Hive logo from
12
+ * hive.io otherwise. */
13
+ hiveIconUrl?: string;
8
14
  }
9
15
  export declare function formatTimeAgo(date: string | Date): string;
10
- declare const UpvoteListModal: ({ author, permlink, onClose, currentUser, token, onClickUpvoteButton }: UpvoteListModalProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const UpvoteListModal: ({ author, permlink, onClose, currentUser, token, onClickUpvoteButton, hiveIconUrl, }: UpvoteListModalProps) => import("react/jsx-runtime").JSX.Element;
11
17
  export default UpvoteListModal;
@@ -0,0 +1,17 @@
1
+ export interface MoreActionsMenuProps {
2
+ /** Show the Reblog item. */
3
+ onReblog?: () => void;
4
+ /** Show the Share item. */
5
+ onShare?: () => void;
6
+ /** Show the Tip item. */
7
+ onTip?: () => void;
8
+ /** Show the Flag item. */
9
+ onReport?: () => void;
10
+ /** Tailwind classes for the trigger button (defaults match the kit's
11
+ * inline action buttons). */
12
+ buttonClassName?: string;
13
+ /** aria-label for the trigger. */
14
+ ariaLabel?: string;
15
+ }
16
+ export declare function MoreActionsMenu({ onReblog, onShare, onTip, onReport, buttonClassName, ariaLabel, }: MoreActionsMenuProps): import("react/jsx-runtime").JSX.Element;
17
+ export default MoreActionsMenu;
@@ -82,6 +82,11 @@ export interface PostActionButtonProps {
82
82
  * Used to lazy-fetch the reply body the first time the user hovers
83
83
  * the comment icon, so the tooltip can show what they wrote. */
84
84
  myReplyKey?: string;
85
+ /** Collapse the secondary actions (reblog · share · tip · report)
86
+ * into a single 3-dot kebab popover. Upvote / comment counters and
87
+ * the payout chip stay inline. Useful in dense card layouts (videos,
88
+ * polls, community detail) where there isn't room for four icons. */
89
+ actionsAsMenu?: boolean;
85
90
  }
86
- 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, onClickCommentIcon, onClickCommentCount, hasCommented, myReplyKey, showVoteButton, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
91
+ 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, onClickCommentIcon, onClickCommentCount, hasCommented, myReplyKey, showVoteButton, parentTags, defaultReward, defaultBeneficiaries, beneficiaryFavorites, defaultVotePercent, voteWeightStep, allowLandscapeVideos, actionsAsMenu, }: PostActionButtonProps): import("react/jsx-runtime").JSX.Element;
87
92
  export default PostActionButton;
@@ -1 +1,2 @@
1
1
  export { PostActionButton, type PostActionButtonProps } from "./PostActionButton";
2
+ export { MoreActionsMenu, type MoreActionsMenuProps } from "./MoreActionsMenu";
@@ -25,8 +25,12 @@ export interface CommunityDetailProps {
25
25
  voteWeightStep?: number;
26
26
  allowLandscapeVideos?: boolean;
27
27
  defaultReward?: RewardOption;
28
+ /** Collapse the per-post secondary actions (reblog · share · tip ·
29
+ * flag) into a single 3-dot kebab menu inside the embedded
30
+ * `<BlogPostList/>`. */
31
+ actionsAsMenu?: boolean;
28
32
  onShare?: () => void;
29
33
  onRss?: () => void;
30
34
  }
31
- declare const CommunityDetail: ({ communityId, currentUser, onBack, onUserClick, onPostClick, onCommentClick, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onTip, onSharePost, onReportPost, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, defaultReward, onShare, onRss, }: CommunityDetailProps) => import("react/jsx-runtime").JSX.Element;
35
+ declare const CommunityDetail: ({ communityId, currentUser, onBack, onUserClick, onPostClick, onCommentClick, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onTip, onSharePost, onReportPost, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, defaultReward, actionsAsMenu, onShare, onRss, }: CommunityDetailProps) => import("react/jsx-runtime").JSX.Element;
32
36
  export default CommunityDetail;
@@ -51,6 +51,9 @@ export interface SnapsFeedCardProps {
51
51
  * menu with Edit / Delete / Flag). Receives the post so the host can
52
52
  * own edit/delete/flag state per card. */
53
53
  renderHeaderActions?: (post: Post) => ReactNode;
54
+ /** Collapse the per-card secondary actions (reblog · share · tip ·
55
+ * flag) into a single 3-dot kebab menu inside the action bar. */
56
+ actionsAsMenu?: boolean;
54
57
  }
55
58
  declare const SnapsFeedCard: FC<SnapsFeedCardProps>;
56
59
  export default SnapsFeedCard;
@@ -72,6 +72,10 @@ export interface SnapsFeedViewProps {
72
72
  /** Optional render slot for a per-card right-side header action menu
73
73
  * (Edit / Delete / Flag). Forwarded to every <SnapsFeedCard/>. */
74
74
  renderHeaderActions?: (post: import('@/types/post').Post) => ReactNode;
75
+ /** Collapse the per-card secondary actions (reblog · share · tip ·
76
+ * flag) into a single 3-dot kebab menu. Forwarded to every
77
+ * <SnapsFeedCard/>. */
78
+ actionsAsMenu?: boolean;
75
79
  }
76
- export declare function SnapsFeedView({ feeds, labels, avatars, defaultPrimary, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onTip, onSharePost, onCommentClick, onClickCommentIcon, onClickCommentCount, onReportPost, onUserClick, onPostClick, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, defaultReward, toolbar, footer, renderHeaderActions, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
80
+ export declare function SnapsFeedView({ feeds, labels, avatars, defaultPrimary, currentUser, onUpvote, onSubmitComment, onClickCommentUpvote, onReblog, onTip, onSharePost, onCommentClick, onClickCommentIcon, onClickCommentCount, onReportPost, onUserClick, onPostClick, ecencyToken, threeSpeakApiKey, giphyApiKey, templateToken, templateApiBaseUrl, defaultVotePercent, voteWeightStep, allowLandscapeVideos, defaultReward, toolbar, footer, renderHeaderActions, actionsAsMenu, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
77
81
  export default SnapsFeedView;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Runtime-configurable Hive RPC endpoint.
3
+ *
4
+ * Every dhive Client and every direct JSON-RPC fetch inside the kit reads
5
+ * the URL from `getHiveApiEndpoint()` (or shares the singleton returned by
6
+ * `getHiveClient()`), so callers can switch nodes at runtime via
7
+ * `setHiveApiEndpoint(url)` and have the change picked up immediately —
8
+ * without re-importing modules or rebuilding clients.
9
+ */
10
+ import { Client, ClientOptions } from '@hiveio/dhive';
11
+ export declare function getHiveApiEndpoint(): string;
12
+ export declare function setHiveApiEndpoint(url: string): void;
13
+ export declare function subscribeHiveApiEndpoint(cb: (url: string) => void): () => void;
14
+ /**
15
+ * Returns the kit-wide dhive Client. The same instance is returned on every
16
+ * call; its `address` / `currentAddress` are updated when
17
+ * `setHiveApiEndpoint()` is called, so existing references continue to use
18
+ * the latest node without reconstruction.
19
+ */
20
+ export declare function getHiveClient(options?: ClientOptions): Client;