hive-react-kit 0.7.9 → 0.8.1

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
@@ -127,6 +127,7 @@
127
127
  --radius-lg: 0.5rem;
128
128
  --radius-xl: 0.75rem;
129
129
  --radius-2xl: 1rem;
130
+ --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12);
130
131
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
131
132
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
132
133
  --animate-spin: spin 1s linear infinite;
@@ -689,9 +690,15 @@
689
690
  .h-36 {
690
691
  height: calc(var(--spacing) * 36);
691
692
  }
693
+ .h-44 {
694
+ height: calc(var(--spacing) * 44);
695
+ }
692
696
  .h-48 {
693
697
  height: calc(var(--spacing) * 48);
694
698
  }
699
+ .h-52 {
700
+ height: calc(var(--spacing) * 52);
701
+ }
695
702
  .h-\[56px\] {
696
703
  height: 56px;
697
704
  }
@@ -1143,9 +1150,6 @@
1143
1150
  margin-inline-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-x-reverse)));
1144
1151
  }
1145
1152
  }
1146
- .gap-y-0\.5 {
1147
- row-gap: calc(var(--spacing) * 0.5);
1148
- }
1149
1153
  .gap-y-1 {
1150
1154
  row-gap: calc(var(--spacing) * 1);
1151
1155
  }
@@ -1318,6 +1322,9 @@
1318
1322
  .border-gray-800 {
1319
1323
  border-color: var(--color-gray-800);
1320
1324
  }
1325
+ .border-gray-900 {
1326
+ border-color: var(--color-gray-900);
1327
+ }
1321
1328
  .border-green-600\/60 {
1322
1329
  border-color: color-mix(in srgb, oklch(62.7% 0.194 149.214) 60%, transparent);
1323
1330
  @supports (color: color-mix(in lab, red, red)) {
@@ -1741,6 +1748,10 @@
1741
1748
  --tw-gradient-position: to right in oklab;
1742
1749
  background-image: linear-gradient(var(--tw-gradient-stops));
1743
1750
  }
1751
+ .bg-gradient-to-t {
1752
+ --tw-gradient-position: to top in oklab;
1753
+ background-image: linear-gradient(var(--tw-gradient-stops));
1754
+ }
1744
1755
  .from-amber-900\/30 {
1745
1756
  --tw-gradient-from: color-mix(in srgb, oklch(41.4% 0.112 45.904) 30%, transparent);
1746
1757
  @supports (color: color-mix(in lab, red, red)) {
@@ -1759,10 +1770,22 @@
1759
1770
  }
1760
1771
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1761
1772
  }
1773
+ .from-gray-900 {
1774
+ --tw-gradient-from: var(--color-gray-900);
1775
+ --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1776
+ }
1762
1777
  .from-purple-600 {
1763
1778
  --tw-gradient-from: var(--color-purple-600);
1764
1779
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1765
1780
  }
1781
+ .via-gray-900\/60 {
1782
+ --tw-gradient-via: color-mix(in srgb, oklch(21% 0.034 264.665) 60%, transparent);
1783
+ @supports (color: color-mix(in lab, red, red)) {
1784
+ --tw-gradient-via: color-mix(in oklab, var(--color-gray-900) 60%, transparent);
1785
+ }
1786
+ --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
1787
+ --tw-gradient-stops: var(--tw-gradient-via-stops);
1788
+ }
1766
1789
  .via-transparent {
1767
1790
  --tw-gradient-via: transparent;
1768
1791
  --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
@@ -1794,6 +1817,10 @@
1794
1817
  }
1795
1818
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1796
1819
  }
1820
+ .to-transparent {
1821
+ --tw-gradient-to: transparent;
1822
+ --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1823
+ }
1797
1824
  .bg-cover {
1798
1825
  background-size: cover;
1799
1826
  }
@@ -1920,9 +1947,6 @@
1920
1947
  .pt-4 {
1921
1948
  padding-top: calc(var(--spacing) * 4);
1922
1949
  }
1923
- .pt-6 {
1924
- padding-top: calc(var(--spacing) * 6);
1925
- }
1926
1950
  .pt-8 {
1927
1951
  padding-top: calc(var(--spacing) * 8);
1928
1952
  }
@@ -1938,6 +1962,9 @@
1938
1962
  .pr-10 {
1939
1963
  padding-right: calc(var(--spacing) * 10);
1940
1964
  }
1965
+ .pb-0\.5 {
1966
+ padding-bottom: calc(var(--spacing) * 0.5);
1967
+ }
1941
1968
  .pb-1 {
1942
1969
  padding-bottom: calc(var(--spacing) * 1);
1943
1970
  }
@@ -2342,6 +2369,11 @@
2342
2369
  outline-style: var(--tw-outline-style);
2343
2370
  outline-width: 1px;
2344
2371
  }
2372
+ .drop-shadow-md {
2373
+ --tw-drop-shadow-size: drop-shadow(0 3px 3px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.12)));
2374
+ --tw-drop-shadow: drop-shadow(var(--drop-shadow-md));
2375
+ filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
2376
+ }
2345
2377
  .filter {
2346
2378
  filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
2347
2379
  }
@@ -2544,6 +2576,16 @@
2544
2576
  }
2545
2577
  }
2546
2578
  }
2579
+ .hover\:bg-black\/60 {
2580
+ &:hover {
2581
+ @media (hover: hover) {
2582
+ background-color: color-mix(in srgb, #000 60%, transparent);
2583
+ @supports (color: color-mix(in lab, red, red)) {
2584
+ background-color: color-mix(in oklab, var(--color-black) 60%, transparent);
2585
+ }
2586
+ }
2587
+ }
2588
+ }
2547
2589
  .hover\:bg-black\/70 {
2548
2590
  &:hover {
2549
2591
  @media (hover: hover) {
@@ -2664,16 +2706,6 @@
2664
2706
  }
2665
2707
  }
2666
2708
  }
2667
- .hover\:bg-orange-900\/20 {
2668
- &:hover {
2669
- @media (hover: hover) {
2670
- background-color: color-mix(in srgb, oklch(40.8% 0.123 38.172) 20%, transparent);
2671
- @supports (color: color-mix(in lab, red, red)) {
2672
- background-color: color-mix(in oklab, var(--color-orange-900) 20%, transparent);
2673
- }
2674
- }
2675
- }
2676
- }
2677
2709
  .hover\:bg-purple-700 {
2678
2710
  &:hover {
2679
2711
  @media (hover: hover) {
@@ -2688,16 +2720,6 @@
2688
2720
  }
2689
2721
  }
2690
2722
  }
2691
- .hover\:bg-red-900\/20 {
2692
- &:hover {
2693
- @media (hover: hover) {
2694
- background-color: color-mix(in srgb, oklch(39.6% 0.141 25.723) 20%, transparent);
2695
- @supports (color: color-mix(in lab, red, red)) {
2696
- background-color: color-mix(in oklab, var(--color-red-900) 20%, transparent);
2697
- }
2698
- }
2699
- }
2700
- }
2701
2723
  .hover\:bg-slate-800 {
2702
2724
  &:hover {
2703
2725
  @media (hover: hover) {
@@ -2705,16 +2727,6 @@
2705
2727
  }
2706
2728
  }
2707
2729
  }
2708
- .hover\:bg-white\/10 {
2709
- &:hover {
2710
- @media (hover: hover) {
2711
- background-color: color-mix(in srgb, #fff 10%, transparent);
2712
- @supports (color: color-mix(in lab, red, red)) {
2713
- background-color: color-mix(in oklab, var(--color-white) 10%, transparent);
2714
- }
2715
- }
2716
- }
2717
- }
2718
2730
  .hover\:bg-white\/20 {
2719
2731
  &:hover {
2720
2732
  @media (hover: hover) {
@@ -3051,6 +3063,11 @@
3051
3063
  height: calc(var(--spacing) * 8);
3052
3064
  }
3053
3065
  }
3066
+ .sm\:h-20 {
3067
+ @media (width >= 40rem) {
3068
+ height: calc(var(--spacing) * 20);
3069
+ }
3070
+ }
3054
3071
  .sm\:h-32 {
3055
3072
  @media (width >= 40rem) {
3056
3073
  height: calc(var(--spacing) * 32);
@@ -3061,6 +3078,11 @@
3061
3078
  height: calc(var(--spacing) * 44);
3062
3079
  }
3063
3080
  }
3081
+ .sm\:h-52 {
3082
+ @media (width >= 40rem) {
3083
+ height: calc(var(--spacing) * 52);
3084
+ }
3085
+ }
3064
3086
  .sm\:h-64 {
3065
3087
  @media (width >= 40rem) {
3066
3088
  height: calc(var(--spacing) * 64);
@@ -3086,6 +3108,11 @@
3086
3108
  width: calc(var(--spacing) * 8);
3087
3109
  }
3088
3110
  }
3111
+ .sm\:w-20 {
3112
+ @media (width >= 40rem) {
3113
+ width: calc(var(--spacing) * 20);
3114
+ }
3115
+ }
3089
3116
  .sm\:w-32 {
3090
3117
  @media (width >= 40rem) {
3091
3118
  width: calc(var(--spacing) * 32);
@@ -3141,6 +3168,12 @@
3141
3168
  gap: calc(var(--spacing) * 4);
3142
3169
  }
3143
3170
  }
3171
+ .sm\:border-4 {
3172
+ @media (width >= 40rem) {
3173
+ border-style: var(--tw-border-style);
3174
+ border-width: 4px;
3175
+ }
3176
+ }
3144
3177
  .sm\:p-1 {
3145
3178
  @media (width >= 40rem) {
3146
3179
  padding: calc(var(--spacing) * 1);
@@ -3271,6 +3304,16 @@
3271
3304
  height: calc(var(--spacing) * 16);
3272
3305
  }
3273
3306
  }
3307
+ .md\:h-24 {
3308
+ @media (width >= 48rem) {
3309
+ height: calc(var(--spacing) * 24);
3310
+ }
3311
+ }
3312
+ .md\:h-60 {
3313
+ @media (width >= 48rem) {
3314
+ height: calc(var(--spacing) * 60);
3315
+ }
3316
+ }
3274
3317
  .md\:w-4 {
3275
3318
  @media (width >= 48rem) {
3276
3319
  width: calc(var(--spacing) * 4);
@@ -3291,6 +3334,11 @@
3291
3334
  width: calc(var(--spacing) * 16);
3292
3335
  }
3293
3336
  }
3337
+ .md\:w-24 {
3338
+ @media (width >= 48rem) {
3339
+ width: calc(var(--spacing) * 24);
3340
+ }
3341
+ }
3294
3342
  .md\:w-auto {
3295
3343
  @media (width >= 48rem) {
3296
3344
  width: auto;
@@ -3,7 +3,12 @@ export interface HiveDetailPostProps {
3
3
  permlink: string;
4
4
  currentUser?: string;
5
5
  onUpvote?: (percent: number) => void | Promise<void>;
6
- onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | Promise<void>;
6
+ /**
7
+ * Called when the user submits a comment.
8
+ * Return `false` to indicate the operation was cancelled (e.g. keychain request denied)
9
+ * — the composed text will be preserved and no refresh will occur.
10
+ */
11
+ onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | boolean | Promise<void | boolean>;
7
12
  onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
8
13
  onReblog?: () => void;
9
14
  onShare?: () => void;
@@ -18,7 +23,12 @@ export interface HiveDetailPostProps {
18
23
  * @param permlink - post permlink
19
24
  * @param choiceNums - 1-based choice numbers selected by the user
20
25
  */
21
- onVotePoll?: (author: string, permlink: string, choiceNums: number[]) => void | Promise<void>;
26
+ /**
27
+ * Called when the user submits a poll vote.
28
+ * Return `false` to indicate the operation was cancelled (e.g. keychain request denied)
29
+ * — the vote UI will not be updated.
30
+ */
31
+ onVotePoll?: (author: string, permlink: string, choiceNums: number[]) => void | boolean | Promise<void | boolean>;
22
32
  ecencyToken?: string;
23
33
  threeSpeakApiKey?: string;
24
34
  giphyApiKey?: string;
@@ -16,8 +16,9 @@ export interface PostActionButtonProps {
16
16
  initialCommentsCount?: number;
17
17
  /** Called when user confirms vote with percent (1–100). Frontend handles signing/broadcast. */
18
18
  onUpvote?: (percent: number) => void | Promise<void>;
19
- /** Called when user submits a comment. Frontend handles signing/broadcast. */
20
- onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | Promise<void>;
19
+ /** Called when user submits a comment. Frontend handles signing/broadcast.
20
+ * Return `false` to indicate the operation was cancelled the composer text will be preserved. */
21
+ onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | boolean | Promise<void | boolean>;
21
22
  /** Called when comment button is clicked (e.g. open comments). */
22
23
  onComments?: () => void;
23
24
  /** Called when reblog is clicked (when logged in). */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export interface PostComposerProps {
3
- onSubmit: (body: string) => void;
3
+ onSubmit: (body: string) => void | boolean | Promise<void | boolean>;
4
4
  onCancel?: () => void;
5
5
  currentUser?: string;
6
6
  placeholder?: string;
@@ -9,8 +9,9 @@ interface CommentsModalProps {
9
9
  onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
10
10
  onClickCommentReply?: (comment: Discussion) => void;
11
11
  onClickUpvoteButton?: (currentUser?: string, token?: string) => void;
12
- /** When provided, used instead of apiService.handleComment (e.g. for aioha wallet) */
13
- onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => Promise<void>;
12
+ /** When provided, used instead of apiService.handleComment (e.g. for aioha wallet).
13
+ * Return `false` to indicate the operation was cancelled — the composer text will be preserved. */
14
+ onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => Promise<void | boolean>;
14
15
  /** Ecency image hosting token — enables image upload in comment composer */
15
16
  ecencyToken?: string;
16
17
  /** 3Speak API key — enables audio/video upload in comment composer */
@@ -4,7 +4,7 @@ interface InlineCommentItemProps {
4
4
  allComments: Discussion[];
5
5
  onReply: (author: string, permlink: string) => void;
6
6
  onCancelReply: () => void;
7
- onCommentSubmit: (parentAuthor: string, parentPermlink: string, body: string) => Promise<void>;
7
+ onCommentSubmit: (parentAuthor: string, parentPermlink: string, body: string) => Promise<void | boolean>;
8
8
  /** "author/permlink" key of the comment currently being replied to (null = none) */
9
9
  activeReplyKey: string | null;
10
10
  currentUser?: string;
@@ -3,7 +3,7 @@ interface InlineCommentSectionProps {
3
3
  permlink: string;
4
4
  currentUser?: string;
5
5
  token?: string;
6
- onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | Promise<void>;
6
+ onSubmitComment?: (parentAuthor: string, parentPermlink: string, body: string) => void | boolean | Promise<void | boolean>;
7
7
  onClickCommentUpvote?: (author: string, permlink: string, percent: number) => void | Promise<void>;
8
8
  ecencyToken?: string;
9
9
  threeSpeakApiKey?: string;