hive-react-kit 1.8.2 → 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/dist/build.css +9 -37
- package/dist/components/feed/AttachmentStrip.d.ts +95 -0
- package/dist/index.cjs.js +117 -117
- package/dist/index.esm.js +11404 -11373
- package/package.json +1 -1
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
|
}
|
|
@@ -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>;
|