hive-react-kit 0.10.5 → 0.10.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/build.css +26 -0
- package/dist/components/composer/ParentPostComposer.d.ts +6 -0
- package/dist/components/composer/PollCreator.d.ts +33 -0
- package/dist/components/feed/SnapsFeedView.d.ts +8 -1
- package/dist/index.cjs.js +163 -163
- package/dist/index.esm.js +14559 -14331
- package/package.json +1 -1
package/dist/build.css
CHANGED
|
@@ -826,6 +826,9 @@
|
|
|
826
826
|
.max-h-64 {
|
|
827
827
|
max-height: calc(var(--spacing) * 64);
|
|
828
828
|
}
|
|
829
|
+
.max-h-72 {
|
|
830
|
+
max-height: calc(var(--spacing) * 72);
|
|
831
|
+
}
|
|
829
832
|
.max-h-96 {
|
|
830
833
|
max-height: calc(var(--spacing) * 96);
|
|
831
834
|
}
|
|
@@ -1474,6 +1477,12 @@
|
|
|
1474
1477
|
border-color: color-mix(in oklab, var(--color-amber-500) 30%, transparent);
|
|
1475
1478
|
}
|
|
1476
1479
|
}
|
|
1480
|
+
.border-amber-500\/40 {
|
|
1481
|
+
border-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 40%, transparent);
|
|
1482
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1483
|
+
border-color: color-mix(in oklab, var(--color-amber-500) 40%, transparent);
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1477
1486
|
.border-amber-700\/40 {
|
|
1478
1487
|
border-color: color-mix(in srgb, oklch(55.5% 0.163 48.998) 40%, transparent);
|
|
1479
1488
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -3127,6 +3136,16 @@
|
|
|
3127
3136
|
}
|
|
3128
3137
|
}
|
|
3129
3138
|
}
|
|
3139
|
+
.hover\:bg-amber-500\/15 {
|
|
3140
|
+
&:hover {
|
|
3141
|
+
@media (hover: hover) {
|
|
3142
|
+
background-color: color-mix(in srgb, oklch(76.9% 0.188 70.08) 15%, transparent);
|
|
3143
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
3144
|
+
background-color: color-mix(in oklab, var(--color-amber-500) 15%, transparent);
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
3148
|
+
}
|
|
3130
3149
|
.hover\:bg-black {
|
|
3131
3150
|
&:hover {
|
|
3132
3151
|
@media (hover: hover) {
|
|
@@ -3431,6 +3450,13 @@
|
|
|
3431
3450
|
}
|
|
3432
3451
|
}
|
|
3433
3452
|
}
|
|
3453
|
+
.hover\:text-gray-200 {
|
|
3454
|
+
&:hover {
|
|
3455
|
+
@media (hover: hover) {
|
|
3456
|
+
color: var(--color-gray-200);
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3434
3460
|
.hover\:text-gray-300 {
|
|
3435
3461
|
&:hover {
|
|
3436
3462
|
@media (hover: hover) {
|
|
@@ -85,6 +85,12 @@ export interface ParentPostComposerProps {
|
|
|
85
85
|
hideTags?: boolean;
|
|
86
86
|
hideReward?: boolean;
|
|
87
87
|
hideBeneficiaries?: boolean;
|
|
88
|
+
/** Force the publisher to attach a poll. When `true`, Publish stays
|
|
89
|
+
* disabled with a "poll required" hint until `pollData` is set, and an
|
|
90
|
+
* inline warning banner appears above the toolbar. Use this when the
|
|
91
|
+
* composer is dedicated to poll creation (e.g. the Polls screen) so
|
|
92
|
+
* users can't accidentally publish a regular parent post. */
|
|
93
|
+
requirePoll?: boolean;
|
|
88
94
|
/** Allow landscape videos (default true on the parent post composer). */
|
|
89
95
|
allowLandscapeVideos?: boolean;
|
|
90
96
|
/**
|
|
@@ -1,4 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Poll attachment editor for ParentPostComposer.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the feature set of the standalone hPolls "Create Poll" surface so
|
|
5
|
+
* a poll attached from the kit composer is indistinguishable on-chain from
|
|
6
|
+
* one published by hPolls itself: vote-interpretation engines (Number of
|
|
7
|
+
* Votes / HIVE→HP / Splinterlands / Arcade Colony / GLX / Hive-Engine
|
|
8
|
+
* tokens), a short preview description, max-choice slider, voter-change
|
|
9
|
+
* toggle, minimum account age, hide-results-until-voted, and the
|
|
10
|
+
* community-restricted flag.
|
|
11
|
+
*
|
|
12
|
+
* The component returns a `PollData` object whose shape matches what the
|
|
13
|
+
* Hive comment metadata expects (`preferred_interpretation`, `choices`,
|
|
14
|
+
* `end_time`, etc.) so consumers can inline it into `json_metadata`
|
|
15
|
+
* without further mapping.
|
|
16
|
+
*/
|
|
1
17
|
import React from 'react';
|
|
18
|
+
/** Curated list of vote-weight interpretation engines hPolls supports. */
|
|
19
|
+
export declare const POLL_VOTE_INTERPRETATIONS: ReadonlyArray<{
|
|
20
|
+
key: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}>;
|
|
23
|
+
/** Hive-Engine tokens (and stake variants) that hPolls can interpret. The
|
|
24
|
+
* key follows the same `token_he_<slug>` pattern hPolls broadcasts. */
|
|
25
|
+
export declare const POLL_HE_VOTE_INTERPRETATIONS: ReadonlyArray<{
|
|
26
|
+
key: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}>;
|
|
2
29
|
export interface PollData {
|
|
3
30
|
question: string;
|
|
4
31
|
choices: string[];
|
|
@@ -9,6 +36,12 @@ export interface PollData {
|
|
|
9
36
|
account_age: number;
|
|
10
37
|
};
|
|
11
38
|
ui_hide_res_until_voted: boolean;
|
|
39
|
+
/** Short user-facing summary surfaced by some clients above the choices. */
|
|
40
|
+
description?: string;
|
|
41
|
+
/** Engine key used to weight votes (`number_of_votes`, `token_hive_hp`, …). */
|
|
42
|
+
preferred_interpretation?: string;
|
|
43
|
+
/** Restrict voting to community members. Maps to `community_restricted`. */
|
|
44
|
+
community_restricted?: boolean;
|
|
12
45
|
}
|
|
13
46
|
export interface PollCreatorProps {
|
|
14
47
|
isOpen: boolean;
|
|
@@ -79,6 +79,13 @@ export interface SnapsFeedViewProps {
|
|
|
79
79
|
* flag) into a single 3-dot kebab menu. Forwarded to every
|
|
80
80
|
* <SnapsFeedCard/>. */
|
|
81
81
|
actionsAsMenu?: boolean;
|
|
82
|
+
/** When `true`, the desktop 4-column layout grows naturally with its
|
|
83
|
+
* content instead of pinning each column to a fixed-height per-column
|
|
84
|
+
* scroller. Use this when the parent page already provides a single
|
|
85
|
+
* scroll surface (e.g. a wrapping `overflow-y-auto`) so users get one
|
|
86
|
+
* page-level scrollbar instead of four independent ones. Column
|
|
87
|
+
* headers stay visible via `sticky top-0`. Mobile is unaffected. */
|
|
88
|
+
pageScroll?: boolean;
|
|
82
89
|
}
|
|
83
|
-
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;
|
|
90
|
+
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, pageScroll, }: SnapsFeedViewProps): import("react/jsx-runtime").JSX.Element;
|
|
84
91
|
export default SnapsFeedView;
|