hive-react-kit 1.8.1 → 1.8.3
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/README.md +1 -1
- package/dist/build.css +9 -37
- package/dist/components/comments/AddCommentInput.d.ts +1 -1
- package/dist/components/community/CommunitySnapsTab.d.ts +1 -0
- package/dist/components/feed/AttachmentStrip.d.ts +95 -0
- package/dist/components/user/UserDetailProfile.d.ts +1 -1
- package/dist/index.cjs.js +125 -125
- package/dist/index.esm.js +11288 -11260
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,7 +132,7 @@ import { UserDetailProfile } from 'hive-react-kit';
|
|
|
132
132
|
| `threeSpeakApiKey` | `string` | `undefined` | 3Speak API key. Enables audio recording/upload and video upload (TUS protocol). Hidden when not provided |
|
|
133
133
|
| `giphyApiKey` | `string` | `undefined` | GIPHY API key. Enables GIF search. Hidden when not provided |
|
|
134
134
|
| `templateToken` | `string` | `undefined` | HReplier API JWT token. Enables template picker. Hidden when not provided |
|
|
135
|
-
| `templateApiBaseUrl` | `string` | `https://
|
|
135
|
+
| `templateApiBaseUrl` | `string` | `https://api.hivesuite.app...` | Custom template API endpoint. Override when self-hosting |
|
|
136
136
|
|
|
137
137
|
**Social Action Callbacks**
|
|
138
138
|
|
package/dist/build.css
CHANGED
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
--color-emerald-400: oklch(76.5% 0.177 163.223);
|
|
45
45
|
--color-emerald-500: oklch(69.6% 0.17 162.48);
|
|
46
46
|
--color-emerald-900: oklch(37.8% 0.077 168.94);
|
|
47
|
-
--color-emerald-950: oklch(26.2% 0.051 172.552);
|
|
48
47
|
--color-teal-500: oklch(70.4% 0.14 182.503);
|
|
49
48
|
--color-teal-600: oklch(60% 0.118 184.704);
|
|
50
49
|
--color-sky-300: oklch(82.8% 0.111 230.318);
|
|
@@ -60,8 +59,6 @@
|
|
|
60
59
|
--color-blue-800: oklch(42.4% 0.199 265.638);
|
|
61
60
|
--color-blue-900: oklch(37.9% 0.146 265.522);
|
|
62
61
|
--color-indigo-600: oklch(51.1% 0.262 276.966);
|
|
63
|
-
--color-violet-900: oklch(38% 0.189 293.745);
|
|
64
|
-
--color-violet-950: oklch(28.3% 0.141 291.089);
|
|
65
62
|
--color-purple-100: oklch(94.6% 0.033 307.174);
|
|
66
63
|
--color-purple-200: oklch(90.2% 0.063 306.703);
|
|
67
64
|
--color-purple-300: oklch(82.7% 0.119 306.383);
|
|
@@ -832,6 +829,12 @@
|
|
|
832
829
|
.h-56 {
|
|
833
830
|
height: calc(var(--spacing) * 56);
|
|
834
831
|
}
|
|
832
|
+
.h-72 {
|
|
833
|
+
height: calc(var(--spacing) * 72);
|
|
834
|
+
}
|
|
835
|
+
.h-80 {
|
|
836
|
+
height: calc(var(--spacing) * 80);
|
|
837
|
+
}
|
|
835
838
|
.h-\[80vh\] {
|
|
836
839
|
height: 80vh;
|
|
837
840
|
}
|
|
@@ -841,9 +844,6 @@
|
|
|
841
844
|
.h-\[90vh\] {
|
|
842
845
|
height: 90vh;
|
|
843
846
|
}
|
|
844
|
-
.h-\[280px\] {
|
|
845
|
-
height: 280px;
|
|
846
|
-
}
|
|
847
847
|
.h-\[460px\] {
|
|
848
848
|
height: 460px;
|
|
849
849
|
}
|
|
@@ -1126,9 +1126,6 @@
|
|
|
1126
1126
|
.max-w-\[250px\] {
|
|
1127
1127
|
max-width: 250px;
|
|
1128
1128
|
}
|
|
1129
|
-
.max-w-\[260px\] {
|
|
1130
|
-
max-width: 260px;
|
|
1131
|
-
}
|
|
1132
1129
|
.max-w-\[280px\] {
|
|
1133
1130
|
max-width: 280px;
|
|
1134
1131
|
}
|
|
@@ -1884,6 +1881,9 @@
|
|
|
1884
1881
|
.bg-\[\#181d23\] {
|
|
1885
1882
|
background-color: #181d23;
|
|
1886
1883
|
}
|
|
1884
|
+
.bg-\[\#15181b\] {
|
|
1885
|
+
background-color: #15181b;
|
|
1886
|
+
}
|
|
1887
1887
|
.bg-\[\#15191e\] {
|
|
1888
1888
|
background-color: #15191e;
|
|
1889
1889
|
}
|
|
@@ -2564,13 +2564,6 @@
|
|
|
2564
2564
|
}
|
|
2565
2565
|
--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));
|
|
2566
2566
|
}
|
|
2567
|
-
.from-emerald-900\/40 {
|
|
2568
|
-
--tw-gradient-from: color-mix(in srgb, oklch(37.8% 0.077 168.94) 40%, transparent);
|
|
2569
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2570
|
-
--tw-gradient-from: color-mix(in oklab, var(--color-emerald-900) 40%, transparent);
|
|
2571
|
-
}
|
|
2572
|
-
--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));
|
|
2573
|
-
}
|
|
2574
2567
|
.from-gray-900 {
|
|
2575
2568
|
--tw-gradient-from: var(--color-gray-900);
|
|
2576
2569
|
--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));
|
|
@@ -2579,13 +2572,6 @@
|
|
|
2579
2572
|
--tw-gradient-from: var(--color-purple-600);
|
|
2580
2573
|
--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));
|
|
2581
2574
|
}
|
|
2582
|
-
.from-violet-900\/40 {
|
|
2583
|
-
--tw-gradient-from: color-mix(in srgb, oklch(38% 0.189 293.745) 40%, transparent);
|
|
2584
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2585
|
-
--tw-gradient-from: color-mix(in oklab, var(--color-violet-900) 40%, transparent);
|
|
2586
|
-
}
|
|
2587
|
-
--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));
|
|
2588
|
-
}
|
|
2589
2575
|
.via-gray-900\/60 {
|
|
2590
2576
|
--tw-gradient-via: color-mix(in srgb, oklch(21% 0.034 264.665) 60%, transparent);
|
|
2591
2577
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -2603,13 +2589,6 @@
|
|
|
2603
2589
|
--tw-gradient-to: var(--color-blue-600);
|
|
2604
2590
|
--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));
|
|
2605
2591
|
}
|
|
2606
|
-
.to-emerald-950\/60 {
|
|
2607
|
-
--tw-gradient-to: color-mix(in srgb, oklch(26.2% 0.051 172.552) 60%, transparent);
|
|
2608
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2609
|
-
--tw-gradient-to: color-mix(in oklab, var(--color-emerald-950) 60%, transparent);
|
|
2610
|
-
}
|
|
2611
|
-
--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));
|
|
2612
|
-
}
|
|
2613
2592
|
.to-orange-900\/30 {
|
|
2614
2593
|
--tw-gradient-to: color-mix(in srgb, oklch(40.8% 0.123 38.172) 30%, transparent);
|
|
2615
2594
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -2636,13 +2615,6 @@
|
|
|
2636
2615
|
--tw-gradient-to: transparent;
|
|
2637
2616
|
--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));
|
|
2638
2617
|
}
|
|
2639
|
-
.to-violet-950\/60 {
|
|
2640
|
-
--tw-gradient-to: color-mix(in srgb, oklch(28.3% 0.141 291.089) 60%, transparent);
|
|
2641
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2642
|
-
--tw-gradient-to: color-mix(in oklab, var(--color-violet-950) 60%, transparent);
|
|
2643
|
-
}
|
|
2644
|
-
--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));
|
|
2645
|
-
}
|
|
2646
2618
|
.bg-cover {
|
|
2647
2619
|
background-size: cover;
|
|
2648
2620
|
}
|
|
@@ -24,7 +24,7 @@ export interface PostComposerProps {
|
|
|
24
24
|
youtubeApiKey?: string;
|
|
25
25
|
/** HReplier API token — enables template picker */
|
|
26
26
|
templateToken?: string;
|
|
27
|
-
/** Custom template API endpoint (defaults to https://
|
|
27
|
+
/** Custom template API endpoint (defaults to https://api.hivesuite.app/data/templates) */
|
|
28
28
|
templateApiBaseUrl?: string;
|
|
29
29
|
/** Hide individual toolbar features */
|
|
30
30
|
hideBold?: boolean;
|
|
@@ -63,6 +63,7 @@ export interface CommunitySnapsTabProps {
|
|
|
63
63
|
/** Collapse the per-card secondary actions (reblog · share · tip ·
|
|
64
64
|
* flag) into a single 3-dot kebab. Forwarded into <SnapsFeedView/>. */
|
|
65
65
|
actionsAsMenu?: boolean;
|
|
66
|
+
pageScroll?: boolean;
|
|
66
67
|
}
|
|
67
68
|
declare const CommunitySnapsTab: React.FC<CommunitySnapsTabProps>;
|
|
68
69
|
export default CommunitySnapsTab;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { Post } from '@/types/post';
|
|
3
|
+
export interface AttachmentStripProps {
|
|
4
|
+
attachments: Attachment[];
|
|
5
|
+
}
|
|
6
|
+
export interface ParsedBody {
|
|
7
|
+
segments: BodySegment[];
|
|
8
|
+
attachments: Attachment[];
|
|
9
|
+
}
|
|
10
|
+
export type BodySegment = {
|
|
11
|
+
kind: 'text';
|
|
12
|
+
text: string;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'mention';
|
|
15
|
+
username: string;
|
|
16
|
+
} | {
|
|
17
|
+
kind: 'hashtag';
|
|
18
|
+
tag: string;
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'link';
|
|
21
|
+
url: string;
|
|
22
|
+
};
|
|
23
|
+
export type Attachment = {
|
|
24
|
+
kind: 'image';
|
|
25
|
+
url: string;
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'ipfs';
|
|
28
|
+
url: string;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'youtube';
|
|
31
|
+
id: string;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'threespeak';
|
|
34
|
+
url: string;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'twitter';
|
|
37
|
+
id: string;
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'audio';
|
|
40
|
+
url: string;
|
|
41
|
+
} | {
|
|
42
|
+
kind: '3speak-audio';
|
|
43
|
+
url: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'spotify';
|
|
46
|
+
url: string;
|
|
47
|
+
};
|
|
48
|
+
export declare const SPOTIFY_REGEX: RegExp;
|
|
49
|
+
export declare const TWITTER_REGEX: RegExp;
|
|
50
|
+
export declare const YOUTUBE_REGEX: RegExp;
|
|
51
|
+
export declare const THREE_SPEAK_REGEX: RegExp;
|
|
52
|
+
export declare const AUDIO_FILE_REGEX: RegExp;
|
|
53
|
+
export declare const THREE_SPEAK_AUDIO_REGEX: RegExp;
|
|
54
|
+
export declare const IMG_MD_REGEX: RegExp;
|
|
55
|
+
export declare const IMG_HTML_REGEX: RegExp;
|
|
56
|
+
export declare const IMG_URL_REGEX: RegExp;
|
|
57
|
+
export declare const URL_REGEX: RegExp;
|
|
58
|
+
export declare const MENTION_REGEX: RegExp;
|
|
59
|
+
export declare const HASHTAG_REGEX: RegExp;
|
|
60
|
+
export declare function parseJsonMetadata(jm: unknown): Record<string, unknown>;
|
|
61
|
+
export declare function hasHivesuiteFamilyTag(post: Post): boolean;
|
|
62
|
+
export declare function extractTagsFromMeta(post: Post): string[];
|
|
63
|
+
export declare function stripViaAppsCredit(body: string): string;
|
|
64
|
+
export declare function parseBody(post: Post): ParsedBody;
|
|
65
|
+
export declare function parse3SpeakAuthorPermlink(url: string): {
|
|
66
|
+
author: string;
|
|
67
|
+
permlink: string;
|
|
68
|
+
} | null;
|
|
69
|
+
export declare const ThreeSpeakPlayer: FC<{
|
|
70
|
+
author: string;
|
|
71
|
+
permlink: string;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const attachmentLabel: (a: Attachment) => string;
|
|
74
|
+
export declare const TwitterEmbed: FC<{
|
|
75
|
+
id: string;
|
|
76
|
+
}>;
|
|
77
|
+
export declare const ZoomableImage: FC<{
|
|
78
|
+
src: string;
|
|
79
|
+
}>;
|
|
80
|
+
export declare const IpfsStripTile: FC<{
|
|
81
|
+
url: string;
|
|
82
|
+
onOpen: (e: React.MouseEvent) => void;
|
|
83
|
+
}>;
|
|
84
|
+
export declare const IpfsPopupBody: FC<{
|
|
85
|
+
url: string;
|
|
86
|
+
}>;
|
|
87
|
+
export declare const MediaPopup: FC<{
|
|
88
|
+
attachment: Attachment;
|
|
89
|
+
onClose: () => void;
|
|
90
|
+
index?: number;
|
|
91
|
+
total?: number;
|
|
92
|
+
onPrev?: () => void;
|
|
93
|
+
onNext?: () => void;
|
|
94
|
+
}>;
|
|
95
|
+
export declare const AttachmentStrip: FC<AttachmentStripProps>;
|
|
@@ -37,7 +37,7 @@ export interface UserDetailProfileProps {
|
|
|
37
37
|
giphyApiKey?: string;
|
|
38
38
|
/** HReplier API token — enables template picker in comment composer */
|
|
39
39
|
templateToken?: string;
|
|
40
|
-
/** Custom template API endpoint (defaults to https://
|
|
40
|
+
/** Custom template API endpoint (defaults to https://api.hivesuite.app/data/templates) */
|
|
41
41
|
templateApiBaseUrl?: string;
|
|
42
42
|
/** List of reported posts to exclude from feed. Each entry has { author, permlink }. */
|
|
43
43
|
reportedPosts?: {
|