@bbki.ng/site 5.4.8 → 5.4.9
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/CHANGELOG.md +2 -0
- package/index.html +1 -1
- package/package.json +2 -2
- package/src/blog/pages/streaming/index.tsx +18 -13
package/CHANGELOG.md
CHANGED
package/index.html
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
</style>
|
|
56
56
|
<script src="https://unpkg.com/open-heart-element" type="module"></script>
|
|
57
57
|
<script type="module" src="https://cdn.jsdelivr.net/npm/@bbki.ng/bbimg@0.0.3/dist/index.js"></script>
|
|
58
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@bbki.ng/bb-msg-history@0.
|
|
58
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@bbki.ng/bb-msg-history@0.11.0/dist/index.js"></script>
|
|
59
59
|
</head>
|
|
60
60
|
|
|
61
61
|
<body class="h-full m-0 flex flex-col font-mono">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bbki.ng/site",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.9",
|
|
4
4
|
"description": "code behind bbki.ng",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"sonner": "1.4.0",
|
|
21
21
|
"swr": "^2.2.5",
|
|
22
22
|
"vaul": "1.1.2",
|
|
23
|
-
"@bbki.ng/components": "5.2.
|
|
23
|
+
"@bbki.ng/components": "5.2.3",
|
|
24
24
|
"@bbki.ng/stylebase": "3.1.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
2
|
import { useStreaming, StreamingItem } from "@/hooks/use_streaming";
|
|
3
3
|
import { formatStreamingData } from "@/utils/streaming";
|
|
4
|
+
import { Article, Panel } from "@bbki.ng/components";
|
|
4
5
|
|
|
5
6
|
// Extend JSX IntrinsicElements for the web component
|
|
6
7
|
declare global {
|
|
@@ -11,6 +12,7 @@ declare global {
|
|
|
11
12
|
BbMsgHistoryElement
|
|
12
13
|
> & {
|
|
13
14
|
loading?: boolean;
|
|
15
|
+
infinite?: boolean;
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -29,11 +31,11 @@ const Streaming = () => {
|
|
|
29
31
|
if (!$blog) return;
|
|
30
32
|
|
|
31
33
|
// disable scroll
|
|
32
|
-
$blog.style.overflow = "hidden";
|
|
34
|
+
// $blog.style.overflow = "hidden";
|
|
33
35
|
|
|
34
|
-
return () => {
|
|
35
|
-
|
|
36
|
-
}
|
|
36
|
+
// return () => {
|
|
37
|
+
// $blog.style.overflow = "auto";
|
|
38
|
+
// }
|
|
37
39
|
}, [])
|
|
38
40
|
|
|
39
41
|
if (isError) {
|
|
@@ -47,15 +49,18 @@ const Streaming = () => {
|
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
return (
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
<Article title="直播">
|
|
53
|
+
<Panel className="!p-[10px]">
|
|
54
|
+
<bb-msg-history
|
|
55
|
+
// infinite
|
|
56
|
+
hide-scroll-bar
|
|
57
|
+
ref={bbMsgHistoryRef}
|
|
58
|
+
style={{ height: "100%", "--bb-max-height": "200px" } as React.CSSProperties}
|
|
59
|
+
>
|
|
60
|
+
{formattedData}
|
|
61
|
+
</bb-msg-history>
|
|
62
|
+
</Panel>
|
|
63
|
+
</Article>
|
|
59
64
|
);
|
|
60
65
|
};
|
|
61
66
|
|