karin-plugin-kkk 2.31.0 → 2.31.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/CHANGELOG.md +34 -0
- package/lib/build-metadata.json +5 -5
- package/lib/core_chunk/amagi.js +1 -1
- package/lib/core_chunk/amagiClient.js +1 -1
- package/lib/core_chunk/{index-CN7AJkHp.d.mts → index-DNlQJ2Zs.d.mts} +11 -3
- package/lib/core_chunk/main.js +860 -1295
- package/lib/core_chunk/richtext.d.mts +2 -2
- package/lib/core_chunk/richtext.js +2 -2
- package/lib/core_chunk/template.d.mts +64 -97
- package/lib/core_chunk/vendor.js +200 -142
- package/lib/karin-plugin-kkk.css +19 -17
- package/lib/root.js +1 -1
- package/package.json +2 -2
package/lib/core_chunk/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __toESM } from "./rolldown-runtime.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as SiHonor, $n as require_protobufjs, $t as Moon, A as RiGroupLine, An as CircleEllipsis, At as Square, B as RiStarLine, Bn as Bookmark, Bt as ScanLine, C as BiImage, Cn as CornerDownLeft, Ct as UserPlus, D as AiOutlineVideoCamera, Dn as Clapperboard, Dt as Terminal, E as AiFillStar, En as Clock, Et as Trash2, F as RiLiveLine, Fn as ChartColumn, Ft as Shield, G as RiVerifiedBadgeFill, Gn as clsx, Gt as Quote, H as RiTiktokFill, Hn as ArrowDownToLine, Ht as RotateCcw, I as RiMessage3Fill, In as Camera, It as ShieldCheck, J as SiVivo, Jn as require_react, Jt as Plus, K as RiVideoLine, Kn as require_jsx_runtime, Kt as QrCode, L as RiPieChart2Fill, Ln as Calendar, Lt as Share2, M as RiHeart3Fill, Mn as CircleCheckBig, Mt as Sparkles, N as RiHeart3Line, Nn as CircleAlert, Nt as Smartphone, O as Markdown, On as CircleQuestionMark, Ot as Sun, P as RiHeartLine, Pn as Check, Pt as ShoppingBag, Q as SiHuawei, Qn as require_heic_decode, Qt as Music, R as RiShareForwardFill, Rn as Box, Rt as Settings2, S as FaUserGroup, Sn as Cpu, St as User, T as AiFillPushpin, Tn as Code, Tt as TriangleAlert, U as RiTrophyFill, Un as Chip, Ut as RefreshCw, V as RiThumbUpFill, Vn as BellRing, Vt as Save, W as RiUserFollowLine, Wn as Button, Wt as Radio, X as SiOppo, Xn as require_jsQR, Xt as Pencil, Y as SiSamsung, Yn as require_png, Yt as Play, Z as SiOneplus, Zn as require_jpeg_js, Zt as Palette, _ as MdLocationOn, _n as Eye, _t as X, a as purify, an as LoaderCircle, at as o, b as FaMusic, bn as Download, bt as Users, c as VictoryLine, cn as Info, ct as n, d as VictoryLabel, dn as Hash, dt as parse, en as Monitor, er as Chalk, et as SiGooglephotos, f as VictoryTheme, fn as GitBranch, ft as fromUnixTime, g as MdLightbulbOutline, gn as FilePlay, gt as Zap, h as MdInfoOutline, hn as FileText, ht as differenceInSeconds, i as Window, in as MapPin, it as SiAnthropic, j as RiHashtag, jn as CircleCheck, jt as SquarePen, k as RiArrowRightFill, kn as CircleFadingArrowUp, kt as Star, l as VictoryChart, ln as Image$1, lt as c, m as MdFitScreen, mn as Gamepad2, mt as format, n as require_lib, nn as Menu, nr as zod_default, nt as SiBilibili, o as VictoryScatter, on as Link, ot as m, p as rehypeHighlight, pn as Gift, pt as formatDistanceToNow, q as SiXiaomi, qn as require_server_node, qt as Puzzle, r as require_qr_code_styling, rn as Maximize, rt as SiApple, s as VictoryPie, sn as LayoutTemplate, st as a, t as createProxyMiddleware, tn as MessageCircle, tr as Xhshow, tt as SiGithub, u as VictoryAxis, un as Heart, ut as zhCN, v as MdSchedule, vn as EyeOff, vt as WandSparkles, w as AiFillHeart, wn as Copy, wt as Upload, x as FaTiktok, xn as Crown, xt as UsersRound, y as FaCommentDots, yn as ExternalLink, yt as Video, z as RiStarFill, zn as Bot, zt as Search } from "./vendor.js";
|
|
3
3
|
import "node:module";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path, { resolve } from "node:path";
|
|
@@ -15377,11 +15377,14 @@ var createParagraphNode = (nodes) => ({
|
|
|
15377
15377
|
nodes
|
|
15378
15378
|
});
|
|
15379
15379
|
/** 创建图片节点。 */
|
|
15380
|
-
var createImageNode = (src, alt) => ({
|
|
15380
|
+
var createImageNode = (src, alt, caption) => ({
|
|
15381
15381
|
type: "image",
|
|
15382
15382
|
src,
|
|
15383
|
-
alt
|
|
15383
|
+
alt,
|
|
15384
|
+
caption
|
|
15384
15385
|
});
|
|
15386
|
+
/** 创建水平分隔线节点。 */
|
|
15387
|
+
var createHorizontalRuleNode = () => ({ type: "horizontalRule" });
|
|
15385
15388
|
/** 创建引用块节点。 */
|
|
15386
15389
|
var createBlockquoteNode = (nodes) => ({
|
|
15387
15390
|
type: "blockquote",
|
|
@@ -15456,7 +15459,8 @@ var extractRichTextPlainText = (document) => {
|
|
|
15456
15459
|
case "blockquote":
|
|
15457
15460
|
case "listItem": return node.nodes.map(extractFromNode).join("");
|
|
15458
15461
|
case "list": return node.items.map(extractFromNode).join("");
|
|
15459
|
-
case "lineBreak":
|
|
15462
|
+
case "lineBreak":
|
|
15463
|
+
case "horizontalRule": return "";
|
|
15460
15464
|
case "image": return "";
|
|
15461
15465
|
case "codeBlock": return node.content;
|
|
15462
15466
|
case "linkCard": return node.title;
|
|
@@ -15804,15 +15808,24 @@ var renderNodeToReact = (node, index, options) => {
|
|
|
15804
15808
|
case "image": {
|
|
15805
15809
|
const safeSrc = sanitizeImageSource(node.src);
|
|
15806
15810
|
if (!safeSrc) return null;
|
|
15807
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
15808
|
-
|
|
15809
|
-
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
|
|
15813
|
-
|
|
15811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
15812
|
+
"data-richtext-node": "image",
|
|
15813
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
15814
|
+
className: "rounded-4xl",
|
|
15815
|
+
src: safeSrc,
|
|
15816
|
+
alt: node.alt || "",
|
|
15817
|
+
referrerPolicy: "no-referrer",
|
|
15818
|
+
crossOrigin: "anonymous"
|
|
15819
|
+
}), node.caption && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
15820
|
+
className: "mt-6 text-center text-[36px] text-foreground/60 select-text",
|
|
15821
|
+
children: node.caption
|
|
15822
|
+
})]
|
|
15814
15823
|
}, `image-${index}`);
|
|
15815
15824
|
}
|
|
15825
|
+
case "horizontalRule": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
15826
|
+
className: "my-16 w-full h-px bg-border",
|
|
15827
|
+
"data-richtext-node": "horizontalRule"
|
|
15828
|
+
}, `hr-${index}`);
|
|
15816
15829
|
case "blockquote": return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("blockquote", {
|
|
15817
15830
|
"data-richtext-node": "blockquote",
|
|
15818
15831
|
children: node.nodes.map((child, childIndex) => renderNodeToReact(child, childIndex, options))
|
|
@@ -16029,6 +16042,28 @@ var CoinIcon = ({ className, size, variant = "solid" }) => {
|
|
|
16029
16042
|
})
|
|
16030
16043
|
});
|
|
16031
16044
|
};
|
|
16045
|
+
/** B站官方浏览图标 */
|
|
16046
|
+
var ViewIcon = ({ className, size, variant = "solid" }) => {
|
|
16047
|
+
if (variant === "line") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
|
|
16048
|
+
viewBox: "0 0 16 16",
|
|
16049
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16050
|
+
className,
|
|
16051
|
+
fill: "currentColor",
|
|
16052
|
+
width: size,
|
|
16053
|
+
height: size,
|
|
16054
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M8 3.3320333333333334C6.321186666666667 3.3320333333333334 4.855333333333333 3.4174399999999996 3.820593333333333 3.5013466666666666C3.1014733333333333 3.5596599999999996 2.5440733333333334 4.109013333333333 2.48 4.821693333333333C2.4040466666666664 5.666533333333334 2.333333333333333 6.780666666666666 2.333333333333333 7.998666666666666C2.333333333333333 9.216733333333334 2.4040466666666664 10.330866666666665 2.48 11.175699999999999C2.5440733333333334 11.888366666666666 3.1014733333333333 12.437733333333334 3.820593333333333 12.496066666666666C4.855333333333333 12.579933333333333 6.321186666666667 12.665333333333333 8 12.665333333333333C9.678999999999998 12.665333333333333 11.144933333333334 12.579933333333333 12.179733333333333 12.496033333333333C12.898733333333332 12.4377 13.456 11.888533333333331 13.520066666666667 11.176033333333333C13.595999999999998 10.331533333333333 13.666666666666666 9.217633333333332 13.666666666666666 7.998666666666666C13.666666666666666 6.779766666666667 13.595999999999998 5.665846666666667 13.520066666666667 4.821366666666666C13.456 4.108866666666666 12.898733333333332 3.55968 12.179733333333333 3.5013666666666663C11.144933333333334 3.417453333333333 9.678999999999998 3.3320333333333334 8 3.3320333333333334zM3.7397666666666667 2.50462C4.794879999999999 2.41906 6.288386666666666 2.3320333333333334 8 2.3320333333333334C9.7118 2.3320333333333334 11.2054 2.4190733333333334 12.260533333333331 2.5046399999999998C13.458733333333331 2.6018133333333333 14.407866666666665 3.5285199999999994 14.516066666666667 4.73182C14.593933333333332 5.597933333333334 14.666666666666666 6.7427 14.666666666666666 7.998666666666666C14.666666666666666 9.2547 14.593933333333332 10.399466666666665 14.516066666666667 11.2656C14.407866666666665 12.468866666666665 13.458733333333331 13.395566666666667 12.260533333333331 13.492766666666665C11.2054 13.578333333333333 9.7118 13.665333333333333 8 13.665333333333333C6.288386666666666 13.665333333333333 4.794879999999999 13.578333333333333 3.7397666666666667 13.492799999999999C2.541373333333333 13.395599999999998 1.5922066666666668 12.468633333333333 1.4840200000000001 11.265266666666665C1.4061199999999998 10.3988 1.3333333333333333 9.253866666666667 1.3333333333333333 7.998666666666666C1.3333333333333333 6.743533333333333 1.4061199999999998 5.598579999999999 1.4840200000000001 4.732153333333333C1.5922066666666668 3.5287466666666667 2.541373333333333 2.601793333333333 3.7397666666666667 2.50462z" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M9.8092 7.3125C10.338433333333333 7.618066666666666 10.338433333333333 8.382 9.809166666666666 8.687533333333333L7.690799999999999 9.910599999999999C7.161566666666666 10.216133333333332 6.5 9.8342 6.500006666666666 9.223066666666666L6.500006666666666 6.776999999999999C6.500006666666666 6.165873333333334 7.161566666666666 5.783913333333333 7.690799999999999 6.089479999999999L9.8092 7.3125z" })]
|
|
16055
|
+
});
|
|
16056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
16057
|
+
viewBox: "0 0 16 16",
|
|
16058
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16059
|
+
className,
|
|
16060
|
+
fill: "currentColor",
|
|
16061
|
+
fillRule: "evenodd",
|
|
16062
|
+
width: size,
|
|
16063
|
+
height: size,
|
|
16064
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M3.7397666666666667 2.50462C4.794879999999999 2.41906 6.288386666666666 2.3320333333333334 8 2.3320333333333334C9.7118 2.3320333333333334 11.2054 2.4190733333333334 12.260533333333331 2.5046399999999998C13.458733333333331 2.6018133333333333 14.407866666666665 3.5285199999999994 14.516066666666667 4.73182C14.593933333333332 5.597933333333334 14.666666666666666 6.7427 14.666666666666666 7.998666666666666C14.666666666666666 9.2547 14.593933333333332 10.399466666666665 14.516066666666667 11.2656C14.407866666666665 12.468866666666665 13.458733333333331 13.395566666666667 12.260533333333331 13.492766666666665C11.2054 13.578333333333333 9.7118 13.665333333333333 8 13.665333333333333C6.288386666666666 13.665333333333333 4.794879999999999 13.578333333333333 3.7397666666666667 13.492799999999999C2.541373333333333 13.395599999999998 1.5922066666666668 12.468633333333333 1.4840200000000001 11.265266666666665C1.4061199999999998 10.3988 1.3333333333333333 9.253866666666667 1.3333333333333333 7.998666666666666C1.3333333333333333 6.743533333333333 1.4061199999999998 5.598579999999999 1.4840200000000001 4.732153333333333C1.5922066666666668 3.5287466666666667 2.541373333333333 2.601793333333333 3.7397666666666667 2.50462z M9.8092 7.3125L7.6908 6.0895C7.1616 5.7839 6.5 6.1659 6.5 6.777L6.5 9.2231C6.5 9.8342 7.1616 10.2161 7.6908 9.9106L9.8092 8.6875C10.3384 8.382 10.3384 7.6181 9.8092 7.3125z" })
|
|
16065
|
+
});
|
|
16066
|
+
};
|
|
16032
16067
|
/** B站官方评论图标 */
|
|
16033
16068
|
var CommentIcon = ({ className, size, variant = "solid" }) => {
|
|
16034
16069
|
if (variant === "line") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
@@ -16152,10 +16187,10 @@ var formatBilibiliLikeCount = (count) => {
|
|
|
16152
16187
|
};
|
|
16153
16188
|
var renderBilibiliUserName = (uname, unameColor, vipstatus) => {
|
|
16154
16189
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
16155
|
-
className: "inline-block leading-[1.2]",
|
|
16190
|
+
className: "inline-block leading-[1.2] font-medium whitespace-nowrap",
|
|
16156
16191
|
style: {
|
|
16157
16192
|
color: unameColor ?? "#888",
|
|
16158
|
-
fontWeight: vipstatus === 1 ?
|
|
16193
|
+
fontWeight: vipstatus === 1 ? 500 : void 0
|
|
16159
16194
|
},
|
|
16160
16195
|
children: uname
|
|
16161
16196
|
});
|
|
@@ -16984,557 +17019,11 @@ var BilibiliArticleDynamic = import_react.memo((props) => {
|
|
|
16984
17019
|
});
|
|
16985
17020
|
BilibiliArticleDynamic.displayName = "BilibiliArticleDynamic";
|
|
16986
17021
|
//#endregion
|
|
16987
|
-
//#region ../template/src/components/platforms/bilibili/dynamic/
|
|
16988
|
-
/**
|
|
16989
|
-
* B站视频动态头部组件
|
|
16990
|
-
*/
|
|
16991
|
-
var BilibiliVideoDynamicHeader = () => {
|
|
16992
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
16993
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-25" }),
|
|
16994
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
16995
|
-
className: "flex items-center pl-20 text-6xl text-muted",
|
|
16996
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
16997
|
-
src: "/image/bilibili/bilibili.png",
|
|
16998
|
-
alt: "bilibili",
|
|
16999
|
-
className: "h-auto w-120"
|
|
17000
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17001
|
-
className: "ml-8 text-5xl select-text",
|
|
17002
|
-
children: "你感兴趣的视频都在哔哩哔哩"
|
|
17003
|
-
})]
|
|
17004
|
-
}),
|
|
17005
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-20" })
|
|
17006
|
-
] });
|
|
17007
|
-
};
|
|
17008
|
-
/**
|
|
17009
|
-
* B站视频动态内容组件
|
|
17010
|
-
*/
|
|
17011
|
-
var BilibiliVideoDynamicContent = (props) => {
|
|
17012
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [props.data.image_url && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17013
|
-
className: "flex flex-col items-center",
|
|
17014
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17015
|
-
className: "flex overflow-hidden relative flex-col flex-1 items-center w-11/12 rounded-5xl shadow-large",
|
|
17016
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17017
|
-
src: props.data.image_url,
|
|
17018
|
-
alt: "封面",
|
|
17019
|
-
className: "object-contain w-full h-full rounded-3xl"
|
|
17020
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17021
|
-
className: "flex absolute bottom-12 right-16",
|
|
17022
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
17023
|
-
src: "/image/bilibili/play.svg",
|
|
17024
|
-
alt: "播放图标",
|
|
17025
|
-
className: "w-40 h-40"
|
|
17026
|
-
})
|
|
17027
|
-
})]
|
|
17028
|
-
})
|
|
17029
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-10" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17030
|
-
className: "flex flex-col w-full leading-relaxed px-16",
|
|
17031
|
-
children: [
|
|
17032
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17033
|
-
className: "relative items-center text-7xl font-bold tracking-wider wrap-break-word text-foreground leading-tight",
|
|
17034
|
-
children: props.data.text && renderRichTextToReact(props.data.text, {
|
|
17035
|
-
at: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17036
|
-
topic: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17037
|
-
lottery: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17038
|
-
webLink: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17039
|
-
vote: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17040
|
-
viewPicture: { className: "text-[#006A9E] dark:text-[#58B0D5]" }
|
|
17041
|
-
})
|
|
17042
|
-
}),
|
|
17043
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-10" }),
|
|
17044
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17045
|
-
className: "text-5xl text-muted leading-normal wrap-break-word break-keep",
|
|
17046
|
-
children: props.data.desc && renderRichTextToReact(props.data.desc, {
|
|
17047
|
-
at: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17048
|
-
topic: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17049
|
-
lottery: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17050
|
-
webLink: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17051
|
-
vote: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17052
|
-
viewPicture: { className: "text-[#006A9E] dark:text-[#58B0D5]" }
|
|
17053
|
-
})
|
|
17054
|
-
}),
|
|
17055
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-30" }),
|
|
17056
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17057
|
-
className: "flex flex-col gap-15 text-foreground/70",
|
|
17058
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17059
|
-
className: "flex flex-col gap-8",
|
|
17060
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17061
|
-
className: "flex gap-12 items-center text-5xl font-light tracking-normal",
|
|
17062
|
-
children: [
|
|
17063
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17064
|
-
className: "flex gap-3 items-center",
|
|
17065
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThumbUpIcon, { size: 48 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17066
|
-
className: "select-text",
|
|
17067
|
-
children: [props.data.dianzan, "点赞"]
|
|
17068
|
-
})]
|
|
17069
|
-
}),
|
|
17070
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17071
|
-
className: "flex gap-3 items-center",
|
|
17072
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommentIcon, { size: 48 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17073
|
-
className: "select-text",
|
|
17074
|
-
children: [props.data.pinglun, "评论"]
|
|
17075
|
-
})]
|
|
17076
|
-
}),
|
|
17077
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17078
|
-
className: "flex gap-3 items-center",
|
|
17079
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShareIcon, { size: 48 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17080
|
-
className: "select-text",
|
|
17081
|
-
children: [props.data.share, "分享"]
|
|
17082
|
-
})]
|
|
17083
|
-
})
|
|
17084
|
-
]
|
|
17085
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17086
|
-
className: "flex gap-12 items-center text-5xl font-light tracking-normal",
|
|
17087
|
-
children: [
|
|
17088
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17089
|
-
className: "flex gap-3 items-center",
|
|
17090
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CoinIcon, { size: 48 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17091
|
-
className: "select-text",
|
|
17092
|
-
children: [props.data.coin, "硬币"]
|
|
17093
|
-
})]
|
|
17094
|
-
}),
|
|
17095
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17096
|
-
className: "flex gap-3 items-center",
|
|
17097
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Eye, { size: 48 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17098
|
-
className: "select-text",
|
|
17099
|
-
children: [props.data.view, "浏览"]
|
|
17100
|
-
})]
|
|
17101
|
-
}),
|
|
17102
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17103
|
-
className: "flex gap-3 items-center text-5xl font-light tracking-normal",
|
|
17104
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Clock, { size: 48 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17105
|
-
className: "select-text",
|
|
17106
|
-
children: ["视频时长: ", props.data.duration_text]
|
|
17107
|
-
})]
|
|
17108
|
-
})
|
|
17109
|
-
]
|
|
17110
|
-
})]
|
|
17111
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17112
|
-
className: "flex flex-col gap-4 text-4xl font-light",
|
|
17113
|
-
children: [
|
|
17114
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17115
|
-
className: "flex gap-3 items-center whitespace-nowrap",
|
|
17116
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Clock, { size: 32 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17117
|
-
className: "select-text",
|
|
17118
|
-
children: ["发布于", props.data.create_time]
|
|
17119
|
-
})]
|
|
17120
|
-
}),
|
|
17121
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17122
|
-
className: "flex gap-3 items-center whitespace-nowrap",
|
|
17123
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Clock, { size: 32 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["图片生成于: ", format(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss")] })]
|
|
17124
|
-
}),
|
|
17125
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17126
|
-
className: "flex gap-3 items-center",
|
|
17127
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Hash, { size: 32 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17128
|
-
className: "select-text",
|
|
17129
|
-
children: ["动态ID: ", props.data.dynamic_id]
|
|
17130
|
-
})]
|
|
17131
|
-
})
|
|
17132
|
-
]
|
|
17133
|
-
})]
|
|
17134
|
-
}),
|
|
17135
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-40" })
|
|
17136
|
-
]
|
|
17137
|
-
})] });
|
|
17138
|
-
};
|
|
17139
|
-
/**
|
|
17140
|
-
* B站视频动态底部信息组件
|
|
17141
|
-
*/
|
|
17142
|
-
var BilibiliVideoDynamicFooter = (props) => {
|
|
17143
|
-
const otherStaff = props.data.staff?.filter((member) => member.mid !== Number(props.data.user_shortid)) || [];
|
|
17144
|
-
const currentUserRole = props.data.staff?.find((member) => member.mid === Number(props.data.user_shortid))?.title;
|
|
17145
|
-
const listRef = import_react.useRef(null);
|
|
17146
|
-
const [visibleCount, setVisibleCount] = import_react.useState(otherStaff.length);
|
|
17147
|
-
import_react.useEffect(() => {
|
|
17148
|
-
const calc = () => {
|
|
17149
|
-
const el = listRef.current;
|
|
17150
|
-
if (!el || otherStaff.length === 0) return;
|
|
17151
|
-
const containerWidth = el.offsetWidth;
|
|
17152
|
-
const capacity = Math.floor(containerWidth / 200);
|
|
17153
|
-
setVisibleCount(otherStaff.length > capacity ? Math.max(0, capacity - 1) : otherStaff.length);
|
|
17154
|
-
};
|
|
17155
|
-
calc();
|
|
17156
|
-
window.addEventListener("resize", calc);
|
|
17157
|
-
return () => window.removeEventListener("resize", calc);
|
|
17158
|
-
}, [otherStaff.length]);
|
|
17159
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
17160
|
-
otherStaff.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17161
|
-
className: "flex flex-col px-20 w-full",
|
|
17162
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17163
|
-
ref: listRef,
|
|
17164
|
-
className: "flex overflow-hidden gap-8 py-1 w-full",
|
|
17165
|
-
children: [otherStaff.slice(0, visibleCount).map((member) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17166
|
-
className: "flex flex-col items-center min-w-42 w-42 shrink-0",
|
|
17167
|
-
children: [
|
|
17168
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17169
|
-
className: "flex justify-center items-center bg-white rounded-full w-30 h-30",
|
|
17170
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17171
|
-
src: member.face,
|
|
17172
|
-
alt: member.name,
|
|
17173
|
-
className: "object-cover w-28 h-28 rounded-full",
|
|
17174
|
-
isCircular: true
|
|
17175
|
-
})
|
|
17176
|
-
}),
|
|
17177
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17178
|
-
className: "overflow-hidden mt-6 w-full text-3xl font-medium leading-tight text-center truncate whitespace-nowrap select-text text-foreground",
|
|
17179
|
-
children: member.name
|
|
17180
|
-
}),
|
|
17181
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17182
|
-
className: "overflow-hidden mt-2 w-full text-3xl leading-tight text-center truncate whitespace-nowrap select-text text-muted",
|
|
17183
|
-
children: member.title
|
|
17184
|
-
})
|
|
17185
|
-
]
|
|
17186
|
-
}, member.mid)), otherStaff.length > visibleCount && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17187
|
-
className: "flex flex-col items-center min-w-42 w-42 shrink-0",
|
|
17188
|
-
children: [
|
|
17189
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17190
|
-
className: "flex justify-center items-center rounded-full bg-surface-secondary w-30 h-30",
|
|
17191
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17192
|
-
className: "text-[42px] leading-none text-muted",
|
|
17193
|
-
children: "···"
|
|
17194
|
-
})
|
|
17195
|
-
}),
|
|
17196
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17197
|
-
className: "overflow-hidden mt-6 w-full text-3xl font-medium leading-tight text-center truncate whitespace-nowrap select-text text-foreground",
|
|
17198
|
-
children: [
|
|
17199
|
-
"还有",
|
|
17200
|
-
otherStaff.length - visibleCount,
|
|
17201
|
-
"人"
|
|
17202
|
-
]
|
|
17203
|
-
}),
|
|
17204
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17205
|
-
className: "overflow-hidden mt-2 w-full text-3xl leading-tight text-center truncate whitespace-nowrap select-text text-muted",
|
|
17206
|
-
children: "共创"
|
|
17207
|
-
})
|
|
17208
|
-
]
|
|
17209
|
-
})]
|
|
17210
|
-
})
|
|
17211
|
-
}),
|
|
17212
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-15" }),
|
|
17213
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17214
|
-
className: "flex justify-between items-start px-20 pb-20",
|
|
17215
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17216
|
-
className: "flex flex-col gap-12",
|
|
17217
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17218
|
-
className: "flex gap-12 items-start",
|
|
17219
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17220
|
-
className: "relative shrink-0",
|
|
17221
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17222
|
-
src: props.data.avatar_url,
|
|
17223
|
-
alt: "头像",
|
|
17224
|
-
className: "rounded-full shadow-medium w-35 h-auto",
|
|
17225
|
-
isCircular: true
|
|
17226
|
-
}), props.data.frame && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17227
|
-
src: props.data.frame,
|
|
17228
|
-
alt: "头像框",
|
|
17229
|
-
className: "absolute inset-0 transform scale-180"
|
|
17230
|
-
})]
|
|
17231
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17232
|
-
className: "flex flex-col gap-5",
|
|
17233
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17234
|
-
className: "text-7xl font-bold select-text text-foreground",
|
|
17235
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsernameDisplay, { metadata: props.data.usernameMeta })
|
|
17236
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17237
|
-
className: "flex gap-2 items-center text-4xl text-muted",
|
|
17238
|
-
children: [
|
|
17239
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Hash, { size: 32 }),
|
|
17240
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["UID: ", props.data.user_shortid] }),
|
|
17241
|
-
currentUserRole && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17242
|
-
className: "ml-5 px-3 py-1 rounded-xl bg-surface-secondary text-3xl",
|
|
17243
|
-
children: currentUserRole
|
|
17244
|
-
})
|
|
17245
|
-
]
|
|
17246
|
-
})]
|
|
17247
|
-
})]
|
|
17248
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17249
|
-
className: "text-3xl flex gap-6 items-center text-foreground/70",
|
|
17250
|
-
children: [
|
|
17251
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17252
|
-
className: "flex flex-col gap-1 items-start px-6 py-3 rounded-2xl bg-surface",
|
|
17253
|
-
children: [
|
|
17254
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17255
|
-
className: "flex gap-1 items-center",
|
|
17256
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThumbUpIcon, { size: 28 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17257
|
-
className: "text-muted",
|
|
17258
|
-
children: "获赞"
|
|
17259
|
-
})]
|
|
17260
|
-
}),
|
|
17261
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-px bg-border" }),
|
|
17262
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17263
|
-
className: "select-text font-medium text-4xl",
|
|
17264
|
-
children: props.data.total_favorited
|
|
17265
|
-
})
|
|
17266
|
-
]
|
|
17267
|
-
}),
|
|
17268
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17269
|
-
className: "flex flex-col gap-1 items-start px-6 py-3 rounded-2xl bg-surface",
|
|
17270
|
-
children: [
|
|
17271
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17272
|
-
className: "flex gap-1 items-center",
|
|
17273
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Eye, { size: 28 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17274
|
-
className: "text-muted",
|
|
17275
|
-
children: "关注"
|
|
17276
|
-
})]
|
|
17277
|
-
}),
|
|
17278
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-px bg-border" }),
|
|
17279
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17280
|
-
className: "select-text font-medium text-4xl",
|
|
17281
|
-
children: props.data.following_count
|
|
17282
|
-
})
|
|
17283
|
-
]
|
|
17284
|
-
}),
|
|
17285
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17286
|
-
className: "flex flex-col gap-1 items-start px-6 py-3 rounded-2xl bg-surface",
|
|
17287
|
-
children: [
|
|
17288
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17289
|
-
className: "flex gap-1 items-center",
|
|
17290
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsersRound, { size: 28 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17291
|
-
className: "text-muted",
|
|
17292
|
-
children: "粉丝"
|
|
17293
|
-
})]
|
|
17294
|
-
}),
|
|
17295
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-px bg-border" }),
|
|
17296
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17297
|
-
className: "select-text font-medium text-4xl",
|
|
17298
|
-
children: props.data.fans
|
|
17299
|
-
})
|
|
17300
|
-
]
|
|
17301
|
-
})
|
|
17302
|
-
]
|
|
17303
|
-
})]
|
|
17304
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17305
|
-
className: "flex flex-col items-center gap-4",
|
|
17306
|
-
children: props.qrCodeDataUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
17307
|
-
src: props.qrCodeDataUrl,
|
|
17308
|
-
alt: "二维码",
|
|
17309
|
-
className: "h-auto w-75 rounded-xl"
|
|
17310
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17311
|
-
className: "flex justify-center items-center rounded-xl bg-surface w-100 h-100",
|
|
17312
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17313
|
-
className: "text-muted",
|
|
17314
|
-
children: "二维码"
|
|
17315
|
-
})
|
|
17316
|
-
})
|
|
17317
|
-
})]
|
|
17318
|
-
})
|
|
17319
|
-
] });
|
|
17320
|
-
};
|
|
17321
|
-
/**
|
|
17322
|
-
* B站视频动态组件
|
|
17323
|
-
*/
|
|
17324
|
-
var BilibiliVideoDynamic = import_react.memo((props) => {
|
|
17325
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DefaultLayout, {
|
|
17326
|
-
...props,
|
|
17327
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17328
|
-
className: "p-4",
|
|
17329
|
-
children: [
|
|
17330
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliVideoDynamicHeader, {}),
|
|
17331
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliVideoDynamicContent, { ...props }),
|
|
17332
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliVideoDynamicFooter, { ...props })
|
|
17333
|
-
]
|
|
17334
|
-
})
|
|
17335
|
-
});
|
|
17336
|
-
});
|
|
17337
|
-
BilibiliVideoDynamic.displayName = "BilibiliVideoDynamic";
|
|
17338
|
-
//#endregion
|
|
17339
|
-
//#region ../template/src/components/platforms/bilibili/dynamic/AdditionalCard.tsx
|
|
17340
|
-
/**
|
|
17341
|
-
* B站预约卡片组件
|
|
17342
|
-
*/
|
|
17343
|
-
var BilibiliReserveCard = ({ reserve }) => {
|
|
17344
|
-
if (!reserve) return null;
|
|
17345
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17346
|
-
className: "overflow-hidden rounded-2xl bg-surface",
|
|
17347
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17348
|
-
className: "flex gap-8 justify-between items-center px-10 py-10",
|
|
17349
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17350
|
-
className: "flex flex-col gap-4 flex-1",
|
|
17351
|
-
children: [
|
|
17352
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17353
|
-
className: "text-5xl font-normal text-foreground select-text leading-tight",
|
|
17354
|
-
children: reserve.title
|
|
17355
|
-
}),
|
|
17356
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17357
|
-
className: "flex gap-8 items-center font-light text-4xl text-muted",
|
|
17358
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17359
|
-
className: "select-text",
|
|
17360
|
-
children: reserve.desc1
|
|
17361
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17362
|
-
className: "select-text",
|
|
17363
|
-
children: reserve.desc2
|
|
17364
|
-
})]
|
|
17365
|
-
}),
|
|
17366
|
-
reserve.desc3 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17367
|
-
className: "flex gap-2 items-center text-4xl select-text leading-none text-[#fb7299]",
|
|
17368
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Gift, {
|
|
17369
|
-
size: 40,
|
|
17370
|
-
className: "shrink-0"
|
|
17371
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17372
|
-
className: "line-clamp-1",
|
|
17373
|
-
children: reserve.desc3
|
|
17374
|
-
})]
|
|
17375
|
-
})
|
|
17376
|
-
]
|
|
17377
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17378
|
-
className: "shrink-0",
|
|
17379
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
|
|
17380
|
-
className: `text-5xl font-normal px-8 py-5 h-auto min-w-0 ${reserve.buttonText === "已结束" ? "bg-surface-secondary/70 text-muted" : "bg-[#fb7299] text-white"}`,
|
|
17381
|
-
children: [reserve.buttonText !== "已结束" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BellRing, { className: "scale-180 mr-4" }), reserve.buttonText]
|
|
17382
|
-
})
|
|
17383
|
-
})]
|
|
17384
|
-
})
|
|
17385
|
-
});
|
|
17386
|
-
};
|
|
17387
|
-
/**
|
|
17388
|
-
* B站投票卡片组件
|
|
17389
|
-
*/
|
|
17390
|
-
var BilibiliVoteCard = ({ vote }) => {
|
|
17391
|
-
if (!vote) return null;
|
|
17392
|
-
const isEnded = vote.status === 4;
|
|
17393
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17394
|
-
className: "overflow-hidden rounded-2xl bg-surface",
|
|
17395
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17396
|
-
className: "flex gap-8 items-center px-10 py-8",
|
|
17397
|
-
children: [
|
|
17398
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17399
|
-
className: "shrink-0",
|
|
17400
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartColumn, { size: 56 })
|
|
17401
|
-
}),
|
|
17402
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17403
|
-
className: "flex flex-col gap-3 flex-1 min-w-0",
|
|
17404
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17405
|
-
className: "text-5xl font-medium text-foreground select-text line-clamp-1",
|
|
17406
|
-
children: vote.title
|
|
17407
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17408
|
-
className: "text-4xl text-muted select-text",
|
|
17409
|
-
children: vote.desc
|
|
17410
|
-
})]
|
|
17411
|
-
}),
|
|
17412
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17413
|
-
className: "shrink-0",
|
|
17414
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
17415
|
-
className: `text-5xl font-normal px-8 py-5 h-auto min-w-0 ${isEnded ? "bg-surface-secondary/70 text-muted" : "bg-[#fb7299] text-white"}`,
|
|
17416
|
-
children: isEnded ? "已结束" : "参与"
|
|
17417
|
-
})
|
|
17418
|
-
})
|
|
17419
|
-
]
|
|
17420
|
-
})
|
|
17421
|
-
});
|
|
17422
|
-
};
|
|
17423
|
-
/**
|
|
17424
|
-
* B站通用卡片组件(游戏等)
|
|
17425
|
-
*/
|
|
17426
|
-
var BilibiliCommonCard = ({ common }) => {
|
|
17427
|
-
if (!common) return null;
|
|
17428
|
-
const getTagText = () => {
|
|
17429
|
-
if (common.sub_type === "game") return "游戏";
|
|
17430
|
-
return common.desc1;
|
|
17431
|
-
};
|
|
17432
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17433
|
-
className: "flex flex-col gap-4",
|
|
17434
|
-
children: [common.head_text && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17435
|
-
className: "flex gap-2 items-center text-4xl text-muted",
|
|
17436
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Gamepad2, { size: 40 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: common.head_text })]
|
|
17437
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17438
|
-
className: "overflow-hidden rounded-4xl bg-surface",
|
|
17439
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17440
|
-
className: "flex gap-8 items-center pl-6 pr-12 py-6",
|
|
17441
|
-
children: [
|
|
17442
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17443
|
-
className: "shrink-0",
|
|
17444
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17445
|
-
src: common.cover,
|
|
17446
|
-
alt: common.title,
|
|
17447
|
-
className: "w-40 h-40 rounded-2xl object-cover"
|
|
17448
|
-
})
|
|
17449
|
-
}),
|
|
17450
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17451
|
-
className: "flex flex-col gap-3 flex-1 min-w-0",
|
|
17452
|
-
children: [
|
|
17453
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17454
|
-
className: "text-5xl font-medium text-foreground select-text line-clamp-1",
|
|
17455
|
-
children: common.title
|
|
17456
|
-
}),
|
|
17457
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17458
|
-
className: "flex gap-3 items-center text-4xl",
|
|
17459
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17460
|
-
className: "shrink-0 px-3 py-1 rounded-md bg-[#fb7299]/10 text-[#fb7299] text-3xl",
|
|
17461
|
-
children: getTagText()
|
|
17462
|
-
}), common.sub_type === "game" && common.desc1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17463
|
-
className: "text-muted line-clamp-1 select-text",
|
|
17464
|
-
children: common.desc1
|
|
17465
|
-
})]
|
|
17466
|
-
}),
|
|
17467
|
-
common.desc2 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17468
|
-
className: "text-4xl text-muted line-clamp-1 select-text",
|
|
17469
|
-
children: common.desc2
|
|
17470
|
-
})
|
|
17471
|
-
]
|
|
17472
|
-
}),
|
|
17473
|
-
common.button_text && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17474
|
-
className: "shrink-0",
|
|
17475
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
17476
|
-
className: "text-5xl font-normal px-8 py-5 h-auto min-w-0 bg-[#fb7299] text-white",
|
|
17477
|
-
children: common.button_text
|
|
17478
|
-
})
|
|
17479
|
-
})
|
|
17480
|
-
]
|
|
17481
|
-
})
|
|
17482
|
-
})]
|
|
17483
|
-
});
|
|
17484
|
-
};
|
|
17485
|
-
/**
|
|
17486
|
-
* B站视频跳转卡片组件(UGC)
|
|
17487
|
-
*/
|
|
17488
|
-
var BilibiliUgcCard = ({ ugc }) => {
|
|
17489
|
-
if (!ugc) return null;
|
|
17490
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17491
|
-
className: "overflow-hidden rounded-3xl bg-surface",
|
|
17492
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17493
|
-
className: "flex gap-8 items-center pr-8",
|
|
17494
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17495
|
-
className: "relative shrink-0 p-5",
|
|
17496
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17497
|
-
src: ugc.cover,
|
|
17498
|
-
alt: ugc.title,
|
|
17499
|
-
className: "h-52 w-auto rounded-2xl"
|
|
17500
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17501
|
-
className: "absolute bottom-7 right-7 px-3 py-1 rounded-lg bg-black/70 text-white text-3xl",
|
|
17502
|
-
children: ugc.duration
|
|
17503
|
-
})]
|
|
17504
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17505
|
-
className: "flex flex-col gap-4 flex-1 min-w-0",
|
|
17506
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17507
|
-
className: "text-5xl font-medium text-foreground select-text line-clamp-2 leading-normal",
|
|
17508
|
-
children: ugc.title
|
|
17509
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17510
|
-
className: "flex gap-8 items-center text-4xl text-muted",
|
|
17511
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [ugc.play, "播放"] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [ugc.danmaku, "弹幕"] })]
|
|
17512
|
-
})]
|
|
17513
|
-
})]
|
|
17514
|
-
})
|
|
17515
|
-
});
|
|
17516
|
-
};
|
|
17517
|
-
/**
|
|
17518
|
-
* B站相关卡片容器组件
|
|
17519
|
-
*/
|
|
17520
|
-
var BilibiliAdditionalCard = ({ additional }) => {
|
|
17521
|
-
if (!additional) return null;
|
|
17522
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17523
|
-
className: "px-20 pb-20",
|
|
17524
|
-
children: [
|
|
17525
|
-
additional.type === "ADDITIONAL_TYPE_RESERVE" && additional.reserve && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliReserveCard, { reserve: additional.reserve }),
|
|
17526
|
-
additional.type === "ADDITIONAL_TYPE_VOTE" && additional.vote && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliVoteCard, { vote: additional.vote }),
|
|
17527
|
-
additional.type === "ADDITIONAL_TYPE_COMMON" && additional.common && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliCommonCard, { common: additional.common }),
|
|
17528
|
-
additional.type === "ADDITIONAL_TYPE_UGC" && additional.ugc && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliUgcCard, { ugc: additional.ugc })
|
|
17529
|
-
]
|
|
17530
|
-
});
|
|
17531
|
-
};
|
|
17532
|
-
//#endregion
|
|
17533
|
-
//#region ../template/src/components/platforms/bilibili/dynamic/DYNAMIC_TYPE_DRAW.tsx
|
|
17022
|
+
//#region ../template/src/components/platforms/bilibili/dynamic/CommonComponents.tsx
|
|
17534
17023
|
/**
|
|
17535
17024
|
* B站动态用户信息组件
|
|
17536
17025
|
*/
|
|
17537
|
-
var BilibiliDynamicUserInfo
|
|
17026
|
+
var BilibiliDynamicUserInfo = (props) => {
|
|
17538
17027
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17539
17028
|
className: "flex gap-10 items-center justify-between px-0 pb-0 pl-24 pr-10",
|
|
17540
17029
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -17558,7 +17047,10 @@ var BilibiliDynamicUserInfo$1 = (props) => {
|
|
|
17558
17047
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsernameDisplay, { metadata: props.usernameMeta })
|
|
17559
17048
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17560
17049
|
className: "flex gap-2 items-center text-4xl font-normal whitespace-nowrap text-muted",
|
|
17561
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
17050
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(c, {
|
|
17051
|
+
size: 40,
|
|
17052
|
+
weight: "fill"
|
|
17053
|
+
}), props.create_time]
|
|
17562
17054
|
})]
|
|
17563
17055
|
})]
|
|
17564
17056
|
}), props.decoration_card && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
@@ -17568,139 +17060,11 @@ var BilibiliDynamicUserInfo$1 = (props) => {
|
|
|
17568
17060
|
});
|
|
17569
17061
|
};
|
|
17570
17062
|
/**
|
|
17571
|
-
* B站动态内容组件
|
|
17572
|
-
*/
|
|
17573
|
-
var BilibiliDynamicContent = (props) => {
|
|
17574
|
-
const getLayoutType = () => {
|
|
17575
|
-
if (!props.image_url || props.image_url.length === 0) return "auto";
|
|
17576
|
-
switch (props.imageLayout) {
|
|
17577
|
-
case "vertical": return "vertical";
|
|
17578
|
-
case "waterfall": return "waterfall";
|
|
17579
|
-
case "grid": return "grid";
|
|
17580
|
-
default:
|
|
17581
|
-
if (props.image_url.length <= 4) return "vertical";
|
|
17582
|
-
if (props.image_url.length >= 9) return "grid";
|
|
17583
|
-
return "waterfall";
|
|
17584
|
-
}
|
|
17585
|
-
};
|
|
17586
|
-
const layoutType = getLayoutType();
|
|
17587
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
17588
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17589
|
-
className: "flex flex-col px-20 w-full leading-relaxed",
|
|
17590
|
-
children: [
|
|
17591
|
-
props.title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17592
|
-
className: "mb-8",
|
|
17593
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
17594
|
-
className: "text-[72px] font-bold leading-[1.4] text-foreground select-text",
|
|
17595
|
-
children: props.title
|
|
17596
|
-
})
|
|
17597
|
-
}),
|
|
17598
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17599
|
-
className: "relative items-center text-5xl tracking-wider wrap-break-word text-foreground",
|
|
17600
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17601
|
-
className: "text-[60px] tracking-[0.5px] leading-[1.6] whitespace-pre-wrap text-foreground select-text",
|
|
17602
|
-
style: {
|
|
17603
|
-
wordBreak: "break-word",
|
|
17604
|
-
overflowWrap: "break-word"
|
|
17605
|
-
},
|
|
17606
|
-
children: props.text && renderRichTextToReact(props.text, {
|
|
17607
|
-
at: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17608
|
-
topic: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17609
|
-
lottery: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17610
|
-
webLink: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17611
|
-
vote: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17612
|
-
viewPicture: { className: "text-[#006A9E] dark:text-[#58B0D5]" }
|
|
17613
|
-
})
|
|
17614
|
-
})
|
|
17615
|
-
}),
|
|
17616
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-15" })
|
|
17617
|
-
]
|
|
17618
|
-
}),
|
|
17619
|
-
props.image_url && Array.isArray(props.image_url) && props.image_url.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17620
|
-
className: "px-20",
|
|
17621
|
-
children: [
|
|
17622
|
-
layoutType === "grid" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17623
|
-
className: "grid grid-cols-3 gap-3 w-full",
|
|
17624
|
-
children: props.image_url.slice(0, 9).map((img, index) => {
|
|
17625
|
-
const total = Math.min(props.image_url?.length || 0, 9);
|
|
17626
|
-
const cols = 3;
|
|
17627
|
-
const row = Math.floor(index / cols);
|
|
17628
|
-
const col = index % cols;
|
|
17629
|
-
const lastRow = Math.floor((total - 1) / cols);
|
|
17630
|
-
const firstRowLastCol = Math.min(cols, total) - 1;
|
|
17631
|
-
const lastRowLastCol = (total - 1) % cols;
|
|
17632
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17633
|
-
className: [
|
|
17634
|
-
"overflow-hidden",
|
|
17635
|
-
"aspect-square",
|
|
17636
|
-
"shadow-medium",
|
|
17637
|
-
"rounded-2xl",
|
|
17638
|
-
row === 0 && col === 0 ? "rounded-tl-4xl" : "",
|
|
17639
|
-
row === 0 && col === firstRowLastCol ? "rounded-tr-4xl" : "",
|
|
17640
|
-
row === lastRow && col === 0 ? "rounded-bl-4xl" : "",
|
|
17641
|
-
row === lastRow && col === lastRowLastCol ? "rounded-br-4xl" : ""
|
|
17642
|
-
].filter(Boolean).join(" "),
|
|
17643
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17644
|
-
src: img.image_src,
|
|
17645
|
-
alt: `图片${index + 1}`,
|
|
17646
|
-
className: "object-cover w-full h-full"
|
|
17647
|
-
})
|
|
17648
|
-
}, index);
|
|
17649
|
-
})
|
|
17650
|
-
}),
|
|
17651
|
-
layoutType === "waterfall" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17652
|
-
className: "flex gap-4 w-full",
|
|
17653
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17654
|
-
className: "flex flex-col flex-1 gap-4",
|
|
17655
|
-
children: props.image_url.filter((_, index) => index % 2 === 0).map((img, arrayIndex) => {
|
|
17656
|
-
const originalIndex = arrayIndex * 2;
|
|
17657
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17658
|
-
className: "overflow-hidden rounded-3xl shadow-medium",
|
|
17659
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17660
|
-
src: img.image_src,
|
|
17661
|
-
alt: `图片${originalIndex + 1}`,
|
|
17662
|
-
className: "object-cover w-full h-auto"
|
|
17663
|
-
})
|
|
17664
|
-
}, originalIndex);
|
|
17665
|
-
})
|
|
17666
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17667
|
-
className: "flex flex-col flex-1 gap-4",
|
|
17668
|
-
children: props.image_url.filter((_, index) => index % 2 === 1).map((img, arrayIndex) => {
|
|
17669
|
-
const originalIndex = arrayIndex * 2 + 1;
|
|
17670
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17671
|
-
className: "overflow-hidden rounded-3xl shadow-medium",
|
|
17672
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17673
|
-
src: img.image_src,
|
|
17674
|
-
alt: `图片${originalIndex + 1}`,
|
|
17675
|
-
className: "object-cover w-full h-auto"
|
|
17676
|
-
})
|
|
17677
|
-
}, originalIndex);
|
|
17678
|
-
})
|
|
17679
|
-
})]
|
|
17680
|
-
}),
|
|
17681
|
-
layoutType === "vertical" && props.image_url.map((img, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17682
|
-
className: "flex flex-col items-center",
|
|
17683
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17684
|
-
className: "flex overflow-hidden flex-col flex-1 items-center rounded-4xl shadow-large",
|
|
17685
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17686
|
-
src: img.image_src,
|
|
17687
|
-
alt: "封面",
|
|
17688
|
-
className: "object-contain w-full h-full rounded-3xl"
|
|
17689
|
-
})
|
|
17690
|
-
})
|
|
17691
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-18" })] }, index)),
|
|
17692
|
-
(layoutType === "waterfall" || layoutType === "grid") && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-18" })
|
|
17693
|
-
]
|
|
17694
|
-
}),
|
|
17695
|
-
props.additional && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliAdditionalCard, { additional: props.additional })
|
|
17696
|
-
] });
|
|
17697
|
-
};
|
|
17698
|
-
/**
|
|
17699
17063
|
* B站动态状态组件
|
|
17700
17064
|
*/
|
|
17701
|
-
var BilibiliDynamicStatus
|
|
17065
|
+
var BilibiliDynamicStatus = (props) => {
|
|
17702
17066
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17703
|
-
className: "flex flex-col gap-10 px-
|
|
17067
|
+
className: "flex flex-col gap-10 px-18 w-full leading-relaxed",
|
|
17704
17068
|
children: [
|
|
17705
17069
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17706
17070
|
className: "flex gap-6 items-center text-5xl font-light tracking-normal select-text text-foreground/70",
|
|
@@ -17708,7 +17072,10 @@ var BilibiliDynamicStatus$1 = (props) => {
|
|
|
17708
17072
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17709
17073
|
className: "flex gap-2 items-center",
|
|
17710
17074
|
children: [
|
|
17711
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThumbUpIcon, {
|
|
17075
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThumbUpIcon, {
|
|
17076
|
+
size: 50,
|
|
17077
|
+
className: "mt-2"
|
|
17078
|
+
}),
|
|
17712
17079
|
props.dianzan,
|
|
17713
17080
|
"点赞"
|
|
17714
17081
|
]
|
|
@@ -17736,19 +17103,25 @@ var BilibiliDynamicStatus$1 = (props) => {
|
|
|
17736
17103
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17737
17104
|
className: "flex gap-2 items-center text-5xl font-light tracking-normal select-text text-foreground/70",
|
|
17738
17105
|
children: [
|
|
17739
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
17106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(c, {
|
|
17107
|
+
size: 52,
|
|
17108
|
+
weight: "fill"
|
|
17109
|
+
}),
|
|
17740
17110
|
"图片生成于: ",
|
|
17741
17111
|
props.render_time
|
|
17742
17112
|
]
|
|
17743
17113
|
}),
|
|
17744
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
17114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17115
|
+
className: "flex gap-2 items-center text-5xl font-light tracking-normal select-text text-[#006A9E] dark:text-[#58B0D5]",
|
|
17116
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { size: 46 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["https://t.bilibili.com/", props.dynamic_id] })]
|
|
17117
|
+
})
|
|
17745
17118
|
]
|
|
17746
17119
|
});
|
|
17747
17120
|
};
|
|
17748
17121
|
/**
|
|
17749
17122
|
* B站动态底部信息组件
|
|
17750
17123
|
*/
|
|
17751
|
-
var BilibiliDynamicFooter
|
|
17124
|
+
var BilibiliDynamicFooter = (props) => {
|
|
17752
17125
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17753
17126
|
className: "flex justify-between items-start px-20 pb-20",
|
|
17754
17127
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -17772,12 +17145,15 @@ var BilibiliDynamicFooter$1 = (props) => {
|
|
|
17772
17145
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17773
17146
|
className: "text-7xl font-bold select-text",
|
|
17774
17147
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsernameDisplay, { metadata: props.usernameMeta })
|
|
17775
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.
|
|
17148
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17776
17149
|
className: "flex gap-2 items-center text-4xl text-muted",
|
|
17777
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.
|
|
17150
|
+
children: [props.showUidHash && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17151
|
+
className: "text-muted",
|
|
17152
|
+
children: "#"
|
|
17153
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17778
17154
|
className: "text-muted select-text",
|
|
17779
17155
|
children: ["UID: ", props.user_shortid]
|
|
17780
|
-
})
|
|
17156
|
+
})]
|
|
17781
17157
|
})]
|
|
17782
17158
|
})]
|
|
17783
17159
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -17788,7 +17164,7 @@ var BilibiliDynamicFooter$1 = (props) => {
|
|
|
17788
17164
|
children: [
|
|
17789
17165
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17790
17166
|
className: "flex gap-1 items-center",
|
|
17791
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThumbUpIcon, { size:
|
|
17167
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThumbUpIcon, { size: 36 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17792
17168
|
className: "text-muted",
|
|
17793
17169
|
children: "获赞"
|
|
17794
17170
|
})]
|
|
@@ -17805,7 +17181,7 @@ var BilibiliDynamicFooter$1 = (props) => {
|
|
|
17805
17181
|
children: [
|
|
17806
17182
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17807
17183
|
className: "flex gap-1 items-center",
|
|
17808
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
17184
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ViewIcon, { size: 36 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17809
17185
|
className: "text-muted",
|
|
17810
17186
|
children: "关注"
|
|
17811
17187
|
})]
|
|
@@ -17822,7 +17198,10 @@ var BilibiliDynamicFooter$1 = (props) => {
|
|
|
17822
17198
|
children: [
|
|
17823
17199
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17824
17200
|
className: "flex gap-1 items-center",
|
|
17825
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
17201
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(o, {
|
|
17202
|
+
size: 36,
|
|
17203
|
+
weight: "fill"
|
|
17204
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17826
17205
|
className: "text-muted",
|
|
17827
17206
|
children: "粉丝"
|
|
17828
17207
|
})]
|
|
@@ -17852,39 +17231,221 @@ var BilibiliDynamicFooter$1 = (props) => {
|
|
|
17852
17231
|
})]
|
|
17853
17232
|
});
|
|
17854
17233
|
};
|
|
17234
|
+
//#endregion
|
|
17235
|
+
//#region ../template/src/components/platforms/bilibili/dynamic/DYNAMIC_TYPE_AV.tsx
|
|
17855
17236
|
/**
|
|
17856
|
-
* B
|
|
17237
|
+
* B站视频内容组件
|
|
17857
17238
|
*/
|
|
17858
|
-
var
|
|
17239
|
+
var BilibiliVideoContent = (props) => {
|
|
17240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17241
|
+
className: "px-16",
|
|
17242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17243
|
+
className: "px-12 py-12 rounded-8xl bg-surface-secondary",
|
|
17244
|
+
children: [props.data.image_url && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17245
|
+
className: "items-center",
|
|
17246
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17247
|
+
className: "flex overflow-hidden relative flex-col flex-1 items-center rounded-5xl shadow-large",
|
|
17248
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17249
|
+
src: props.data.image_url,
|
|
17250
|
+
alt: "封面",
|
|
17251
|
+
className: "object-contain w-full h-full rounded-3xl"
|
|
17252
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17253
|
+
className: "flex absolute bottom-12 right-16",
|
|
17254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
17255
|
+
src: "/image/bilibili/play.svg",
|
|
17256
|
+
alt: "播放图标",
|
|
17257
|
+
className: "w-40 h-40"
|
|
17258
|
+
})
|
|
17259
|
+
})]
|
|
17260
|
+
})
|
|
17261
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-10" })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17262
|
+
className: "flex flex-col w-full leading-relaxed",
|
|
17263
|
+
children: [
|
|
17264
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17265
|
+
className: "relative items-center text-6xl font-bold tracking-wider wrap-break-word text-foreground leading-tight",
|
|
17266
|
+
children: props.data.text && renderRichTextToReact(props.data.text, {
|
|
17267
|
+
at: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17268
|
+
topic: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17269
|
+
lottery: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17270
|
+
webLink: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17271
|
+
vote: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17272
|
+
viewPicture: { className: "text-[#006A9E] dark:text-[#58B0D5]" }
|
|
17273
|
+
})
|
|
17274
|
+
}),
|
|
17275
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-10" }),
|
|
17276
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17277
|
+
className: "text-5xl text-muted leading-normal wrap-break-word break-keep",
|
|
17278
|
+
children: props.data.desc && renderRichTextToReact(props.data.desc, {
|
|
17279
|
+
at: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17280
|
+
topic: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17281
|
+
lottery: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17282
|
+
webLink: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17283
|
+
vote: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17284
|
+
viewPicture: { className: "text-[#006A9E] dark:text-[#58B0D5]" }
|
|
17285
|
+
})
|
|
17286
|
+
}),
|
|
17287
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-20" }),
|
|
17288
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17289
|
+
className: "flex flex-col gap-8 text-foreground/70",
|
|
17290
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17291
|
+
className: "flex gap-12 items-center text-5xl font-light tracking-normal",
|
|
17292
|
+
children: [
|
|
17293
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17294
|
+
className: "flex gap-3 items-center",
|
|
17295
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CoinIcon, { size: 52 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17296
|
+
className: "select-text",
|
|
17297
|
+
children: [props.data.coin, "硬币"]
|
|
17298
|
+
})]
|
|
17299
|
+
}),
|
|
17300
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17301
|
+
className: "flex gap-3 items-center",
|
|
17302
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ViewIcon, {
|
|
17303
|
+
size: 52,
|
|
17304
|
+
variant: "solid"
|
|
17305
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17306
|
+
className: "select-text",
|
|
17307
|
+
children: [props.data.view, "播放"]
|
|
17308
|
+
})]
|
|
17309
|
+
}),
|
|
17310
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17311
|
+
className: "flex gap-3 items-center text-5xl font-light tracking-normal",
|
|
17312
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(c, {
|
|
17313
|
+
size: 52,
|
|
17314
|
+
weight: "fill"
|
|
17315
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
17316
|
+
className: "select-text",
|
|
17317
|
+
children: [
|
|
17318
|
+
"时长(",
|
|
17319
|
+
props.data.page_length,
|
|
17320
|
+
"P): ",
|
|
17321
|
+
props.data.duration_text
|
|
17322
|
+
]
|
|
17323
|
+
})]
|
|
17324
|
+
})
|
|
17325
|
+
]
|
|
17326
|
+
})
|
|
17327
|
+
}),
|
|
17328
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-2" })
|
|
17329
|
+
]
|
|
17330
|
+
})]
|
|
17331
|
+
})
|
|
17332
|
+
});
|
|
17333
|
+
};
|
|
17334
|
+
/**
|
|
17335
|
+
* B站视频动态共创者组件
|
|
17336
|
+
*/
|
|
17337
|
+
var BilibiliVideoStaff = (props) => {
|
|
17338
|
+
const otherStaff = props.data.staff?.filter((member) => member.mid !== Number(props.data.user_shortid)) || [];
|
|
17339
|
+
const listRef = import_react.useRef(null);
|
|
17340
|
+
const [visibleCount, setVisibleCount] = import_react.useState(otherStaff.length);
|
|
17341
|
+
import_react.useEffect(() => {
|
|
17342
|
+
const calc = () => {
|
|
17343
|
+
const el = listRef.current;
|
|
17344
|
+
if (!el || otherStaff.length === 0) return;
|
|
17345
|
+
const containerWidth = el.offsetWidth;
|
|
17346
|
+
const capacity = Math.floor(containerWidth / 200);
|
|
17347
|
+
setVisibleCount(otherStaff.length > capacity ? Math.max(0, capacity - 1) : otherStaff.length);
|
|
17348
|
+
};
|
|
17349
|
+
calc();
|
|
17350
|
+
window.addEventListener("resize", calc);
|
|
17351
|
+
return () => window.removeEventListener("resize", calc);
|
|
17352
|
+
}, [otherStaff.length]);
|
|
17353
|
+
if (otherStaff.length === 0) return null;
|
|
17354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17355
|
+
className: "flex flex-col px-20 w-full",
|
|
17356
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17357
|
+
ref: listRef,
|
|
17358
|
+
className: "flex overflow-hidden gap-8 py-1 w-full",
|
|
17359
|
+
children: [otherStaff.slice(0, visibleCount).map((member) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17360
|
+
className: "flex flex-col items-center min-w-42 w-42 shrink-0",
|
|
17361
|
+
children: [
|
|
17362
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17363
|
+
className: "flex justify-center items-center bg-white rounded-full w-30 h-30",
|
|
17364
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17365
|
+
src: member.face,
|
|
17366
|
+
alt: member.name,
|
|
17367
|
+
className: "object-cover w-28 h-28 rounded-full",
|
|
17368
|
+
isCircular: true
|
|
17369
|
+
})
|
|
17370
|
+
}),
|
|
17371
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17372
|
+
className: "overflow-hidden mt-6 w-full text-3xl font-medium leading-tight text-center truncate whitespace-nowrap select-text text-foreground",
|
|
17373
|
+
children: member.name
|
|
17374
|
+
}),
|
|
17375
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17376
|
+
className: "overflow-hidden mt-2 w-full text-3xl leading-tight text-center truncate whitespace-nowrap select-text text-muted",
|
|
17377
|
+
children: member.title
|
|
17378
|
+
})
|
|
17379
|
+
]
|
|
17380
|
+
}, member.mid)), otherStaff.length > visibleCount && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17381
|
+
className: "flex flex-col items-center min-w-42 w-42 shrink-0",
|
|
17382
|
+
children: [
|
|
17383
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17384
|
+
className: "flex justify-center items-center rounded-full bg-surface-secondary w-30 h-30",
|
|
17385
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17386
|
+
className: "text-[42px] leading-none text-muted",
|
|
17387
|
+
children: "···"
|
|
17388
|
+
})
|
|
17389
|
+
}),
|
|
17390
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17391
|
+
className: "overflow-hidden mt-6 w-full text-3xl font-medium leading-tight text-center truncate whitespace-nowrap select-text text-foreground",
|
|
17392
|
+
children: [
|
|
17393
|
+
"还有",
|
|
17394
|
+
otherStaff.length - visibleCount,
|
|
17395
|
+
"人"
|
|
17396
|
+
]
|
|
17397
|
+
}),
|
|
17398
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17399
|
+
className: "overflow-hidden mt-2 w-full text-3xl leading-tight text-center truncate whitespace-nowrap select-text text-muted",
|
|
17400
|
+
children: "共创"
|
|
17401
|
+
})
|
|
17402
|
+
]
|
|
17403
|
+
})]
|
|
17404
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-15" })]
|
|
17405
|
+
});
|
|
17406
|
+
};
|
|
17407
|
+
/**
|
|
17408
|
+
* B站视频动态组件
|
|
17409
|
+
*/
|
|
17410
|
+
var BilibiliVideoDynamic = import_react.memo((props) => {
|
|
17859
17411
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DefaultLayout, {
|
|
17860
17412
|
...props,
|
|
17861
17413
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17862
17414
|
className: "p-4",
|
|
17863
17415
|
children: [
|
|
17864
17416
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-25" }),
|
|
17865
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicUserInfo
|
|
17866
|
-
avatar_url: props.data.avatar_url,
|
|
17867
|
-
frame: props.data.frame,
|
|
17868
|
-
usernameMeta: props.data.usernameMeta,
|
|
17869
|
-
create_time: props.data.create_time,
|
|
17870
|
-
decoration_card: props.data.decoration_card
|
|
17871
|
-
}),
|
|
17417
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicUserInfo, { ...props.data }),
|
|
17872
17418
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-15" }),
|
|
17873
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
17874
|
-
|
|
17875
|
-
|
|
17876
|
-
|
|
17877
|
-
|
|
17878
|
-
|
|
17879
|
-
|
|
17880
|
-
|
|
17881
|
-
|
|
17882
|
-
|
|
17883
|
-
|
|
17884
|
-
|
|
17419
|
+
props.data.dynamic_text && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17420
|
+
className: "flex flex-col px-20 w-full leading-relaxed",
|
|
17421
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17422
|
+
className: "relative items-center text-5xl tracking-wider wrap-break-word text-foreground",
|
|
17423
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17424
|
+
className: "text-[60px] tracking-[0.5px] leading-[1.6] whitespace-pre-wrap text-foreground select-text",
|
|
17425
|
+
style: {
|
|
17426
|
+
wordBreak: "break-word",
|
|
17427
|
+
overflowWrap: "break-word"
|
|
17428
|
+
},
|
|
17429
|
+
children: props.data.dynamic_text.nodes.length > 0 ? renderRichTextToReact(props.data.dynamic_text, {
|
|
17430
|
+
at: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17431
|
+
topic: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17432
|
+
lottery: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17433
|
+
webLink: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17434
|
+
vote: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17435
|
+
viewPicture: { className: "text-[#006A9E] dark:text-[#58B0D5]" }
|
|
17436
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17437
|
+
className: "text-default-foreground/50",
|
|
17438
|
+
children: "投稿了视频"
|
|
17439
|
+
})
|
|
17440
|
+
})
|
|
17441
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-15" })]
|
|
17885
17442
|
}),
|
|
17886
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
17887
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
17443
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliVideoContent, { ...props }),
|
|
17444
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-15" }),
|
|
17445
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicStatus, { ...props.data }),
|
|
17446
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: clsx(props.data.staff && props.data.staff.length > 0 && "h-23", !props.data.staff && "h-40") }),
|
|
17447
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliVideoStaff, { ...props }),
|
|
17448
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicFooter, {
|
|
17888
17449
|
avatar_url: props.data.avatar_url,
|
|
17889
17450
|
frame: props.data.frame,
|
|
17890
17451
|
usernameMeta: props.data.usernameMeta,
|
|
@@ -17900,51 +17461,377 @@ var BilibiliDrawDynamic = import_react.memo((props) => {
|
|
|
17900
17461
|
})
|
|
17901
17462
|
});
|
|
17902
17463
|
});
|
|
17903
|
-
|
|
17464
|
+
BilibiliVideoDynamic.displayName = "BilibiliVideoDynamic";
|
|
17904
17465
|
//#endregion
|
|
17905
|
-
//#region ../template/src/components/platforms/bilibili/dynamic/
|
|
17466
|
+
//#region ../template/src/components/platforms/bilibili/dynamic/AdditionalCard.tsx
|
|
17467
|
+
/**
|
|
17468
|
+
* B站预约卡片组件
|
|
17469
|
+
*/
|
|
17470
|
+
var BilibiliReserveCard = ({ reserve }) => {
|
|
17471
|
+
if (!reserve) return null;
|
|
17472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17473
|
+
className: "overflow-hidden rounded-4xl bg-surface",
|
|
17474
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17475
|
+
className: "flex gap-8 justify-between items-center px-10 py-10",
|
|
17476
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17477
|
+
className: "flex flex-col gap-4 flex-1",
|
|
17478
|
+
children: [
|
|
17479
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17480
|
+
className: "text-5xl font-normal text-foreground select-text leading-tight",
|
|
17481
|
+
children: reserve.title
|
|
17482
|
+
}),
|
|
17483
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17484
|
+
className: "flex gap-8 items-center font-light text-4xl text-muted",
|
|
17485
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17486
|
+
className: "select-text",
|
|
17487
|
+
children: reserve.desc1
|
|
17488
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17489
|
+
className: "select-text",
|
|
17490
|
+
children: reserve.desc2
|
|
17491
|
+
})]
|
|
17492
|
+
}),
|
|
17493
|
+
reserve.desc3 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17494
|
+
className: "flex gap-2 items-center text-4xl select-text leading-none text-[#fb7299]",
|
|
17495
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Gift, {
|
|
17496
|
+
size: 40,
|
|
17497
|
+
className: "shrink-0"
|
|
17498
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17499
|
+
className: "line-clamp-1",
|
|
17500
|
+
children: reserve.desc3
|
|
17501
|
+
})]
|
|
17502
|
+
})
|
|
17503
|
+
]
|
|
17504
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17505
|
+
className: "shrink-0",
|
|
17506
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Button, {
|
|
17507
|
+
className: `text-5xl font-normal px-8 py-5 h-auto min-w-0 ${reserve.buttonText === "已结束" ? "bg-surface-secondary/70 text-muted" : "bg-[#fb7299] text-white"}`,
|
|
17508
|
+
children: [reserve.buttonText !== "已结束" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BellRing, { className: "scale-180 mr-4" }), reserve.buttonText]
|
|
17509
|
+
})
|
|
17510
|
+
})]
|
|
17511
|
+
})
|
|
17512
|
+
});
|
|
17513
|
+
};
|
|
17906
17514
|
/**
|
|
17907
|
-
* B
|
|
17515
|
+
* B站投票卡片组件
|
|
17908
17516
|
*/
|
|
17909
|
-
var
|
|
17517
|
+
var BilibiliVoteCard = ({ vote }) => {
|
|
17518
|
+
if (!vote) return null;
|
|
17519
|
+
const isEnded = vote.status === 4;
|
|
17520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17521
|
+
className: "overflow-hidden rounded-4xl bg-surface",
|
|
17522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17523
|
+
className: "flex gap-8 items-center px-10 py-8",
|
|
17524
|
+
children: [
|
|
17525
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17526
|
+
className: "shrink-0",
|
|
17527
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartColumn, { size: 56 })
|
|
17528
|
+
}),
|
|
17529
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17530
|
+
className: "flex flex-col gap-3 flex-1 min-w-0",
|
|
17531
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17532
|
+
className: "text-5xl font-medium text-foreground select-text line-clamp-1",
|
|
17533
|
+
children: vote.title
|
|
17534
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17535
|
+
className: "text-4xl text-muted select-text",
|
|
17536
|
+
children: vote.desc
|
|
17537
|
+
})]
|
|
17538
|
+
}),
|
|
17539
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17540
|
+
className: "shrink-0",
|
|
17541
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
17542
|
+
className: `text-5xl font-normal px-8 py-5 h-auto min-w-0 ${isEnded ? "bg-surface-secondary/70 text-muted" : "bg-[#fb7299] text-white"}`,
|
|
17543
|
+
children: isEnded ? "已结束" : "参与"
|
|
17544
|
+
})
|
|
17545
|
+
})
|
|
17546
|
+
]
|
|
17547
|
+
})
|
|
17548
|
+
});
|
|
17549
|
+
};
|
|
17550
|
+
/**
|
|
17551
|
+
* B站通用卡片组件(游戏等)
|
|
17552
|
+
*/
|
|
17553
|
+
var BilibiliCommonCard = ({ common }) => {
|
|
17554
|
+
if (!common) return null;
|
|
17555
|
+
const getTagText = () => {
|
|
17556
|
+
if (common.sub_type === "game") return "游戏";
|
|
17557
|
+
return common.desc1;
|
|
17558
|
+
};
|
|
17910
17559
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17911
|
-
className: "flex
|
|
17912
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17913
|
-
className: "flex gap-
|
|
17560
|
+
className: "flex flex-col gap-4",
|
|
17561
|
+
children: [common.head_text && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17562
|
+
className: "flex gap-2 items-center text-4xl text-muted",
|
|
17563
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Gamepad2, { size: 40 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: common.head_text })]
|
|
17564
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17565
|
+
className: "overflow-hidden rounded-4xl bg-surface",
|
|
17566
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17567
|
+
className: "flex gap-8 items-center pl-6 pr-12 py-6",
|
|
17568
|
+
children: [
|
|
17569
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17570
|
+
className: "shrink-0",
|
|
17571
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17572
|
+
src: common.cover,
|
|
17573
|
+
alt: common.title,
|
|
17574
|
+
className: "w-40 h-40 rounded-2xl object-cover"
|
|
17575
|
+
})
|
|
17576
|
+
}),
|
|
17577
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17578
|
+
className: "flex flex-col gap-3 flex-1 min-w-0",
|
|
17579
|
+
children: [
|
|
17580
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17581
|
+
className: "text-5xl font-medium text-foreground select-text line-clamp-1",
|
|
17582
|
+
children: common.title
|
|
17583
|
+
}),
|
|
17584
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17585
|
+
className: "flex gap-3 items-center text-4xl",
|
|
17586
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17587
|
+
className: "shrink-0 px-3 py-1 rounded-md bg-[#fb7299]/10 text-[#fb7299] text-3xl",
|
|
17588
|
+
children: getTagText()
|
|
17589
|
+
}), common.sub_type === "game" && common.desc1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
17590
|
+
className: "text-muted line-clamp-1 select-text",
|
|
17591
|
+
children: common.desc1
|
|
17592
|
+
})]
|
|
17593
|
+
}),
|
|
17594
|
+
common.desc2 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17595
|
+
className: "text-4xl text-muted line-clamp-1 select-text",
|
|
17596
|
+
children: common.desc2
|
|
17597
|
+
})
|
|
17598
|
+
]
|
|
17599
|
+
}),
|
|
17600
|
+
common.button_text && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17601
|
+
className: "shrink-0",
|
|
17602
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
17603
|
+
className: "text-5xl font-normal px-8 py-5 h-auto min-w-0 bg-[#fb7299] text-white",
|
|
17604
|
+
children: common.button_text
|
|
17605
|
+
})
|
|
17606
|
+
})
|
|
17607
|
+
]
|
|
17608
|
+
})
|
|
17609
|
+
})]
|
|
17610
|
+
});
|
|
17611
|
+
};
|
|
17612
|
+
/**
|
|
17613
|
+
* B站视频跳转卡片组件(UGC)
|
|
17614
|
+
*/
|
|
17615
|
+
var BilibiliUgcCard = ({ ugc }) => {
|
|
17616
|
+
if (!ugc) return null;
|
|
17617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17618
|
+
className: "overflow-hidden rounded-3xl bg-surface",
|
|
17619
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17620
|
+
className: "flex gap-8 items-center pr-8",
|
|
17914
17621
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17915
|
-
className: "relative",
|
|
17622
|
+
className: "relative shrink-0 p-5",
|
|
17916
17623
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17917
|
-
src:
|
|
17918
|
-
alt:
|
|
17919
|
-
className: "
|
|
17920
|
-
|
|
17921
|
-
|
|
17922
|
-
|
|
17923
|
-
alt: "头像框",
|
|
17924
|
-
className: "absolute inset-0 transform scale-180"
|
|
17624
|
+
src: ugc.cover,
|
|
17625
|
+
alt: ugc.title,
|
|
17626
|
+
className: "h-52 w-auto rounded-4xl"
|
|
17627
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17628
|
+
className: "absolute bottom-7 right-7 px-3 py-1 rounded-lg bg-black/70 text-white text-3xl",
|
|
17629
|
+
children: ugc.duration
|
|
17925
17630
|
})]
|
|
17926
17631
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17927
|
-
className: "flex flex-col gap-
|
|
17632
|
+
className: "flex flex-col gap-4 flex-1 min-w-0",
|
|
17928
17633
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17929
|
-
className: "text-
|
|
17930
|
-
children:
|
|
17634
|
+
className: "text-5xl font-medium text-foreground select-text line-clamp-2 leading-normal",
|
|
17635
|
+
children: ugc.title
|
|
17931
17636
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17932
|
-
className: "flex gap-
|
|
17933
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.
|
|
17637
|
+
className: "flex gap-8 items-center text-4xl text-muted",
|
|
17638
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [ugc.play, "播放"] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [ugc.danmaku, "弹幕"] })]
|
|
17934
17639
|
})]
|
|
17935
17640
|
})]
|
|
17936
|
-
})
|
|
17937
|
-
className: "shrink-0",
|
|
17938
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DecorationCard, { data: props.decoration_card })
|
|
17939
|
-
})]
|
|
17641
|
+
})
|
|
17940
17642
|
});
|
|
17941
17643
|
};
|
|
17942
17644
|
/**
|
|
17645
|
+
* B站相关卡片容器组件
|
|
17646
|
+
*/
|
|
17647
|
+
var BilibiliAdditionalCard = ({ additional, gap = true, className }) => {
|
|
17648
|
+
if (!additional) return null;
|
|
17649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17650
|
+
className: clsx(gap && "px-20 pb-20", className),
|
|
17651
|
+
children: [
|
|
17652
|
+
additional.type === "ADDITIONAL_TYPE_RESERVE" && additional.reserve && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliReserveCard, { reserve: additional.reserve }),
|
|
17653
|
+
additional.type === "ADDITIONAL_TYPE_VOTE" && additional.vote && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliVoteCard, { vote: additional.vote }),
|
|
17654
|
+
additional.type === "ADDITIONAL_TYPE_COMMON" && additional.common && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliCommonCard, { common: additional.common }),
|
|
17655
|
+
additional.type === "ADDITIONAL_TYPE_UGC" && additional.ugc && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliUgcCard, { ugc: additional.ugc })
|
|
17656
|
+
]
|
|
17657
|
+
});
|
|
17658
|
+
};
|
|
17659
|
+
//#endregion
|
|
17660
|
+
//#region ../template/src/components/platforms/bilibili/dynamic/DYNAMIC_TYPE_DRAW.tsx
|
|
17661
|
+
/**
|
|
17662
|
+
* B站动态内容组件
|
|
17663
|
+
*/
|
|
17664
|
+
var BilibiliDynamicContent = (props) => {
|
|
17665
|
+
const getLayoutType = () => {
|
|
17666
|
+
if (!props.image_url || props.image_url.length === 0) return "auto";
|
|
17667
|
+
switch (props.imageLayout) {
|
|
17668
|
+
case "vertical": return "vertical";
|
|
17669
|
+
case "waterfall": return "waterfall";
|
|
17670
|
+
case "grid": return "grid";
|
|
17671
|
+
default:
|
|
17672
|
+
if (props.image_url.length <= 4) return "vertical";
|
|
17673
|
+
if (props.image_url.length >= 9) return "grid";
|
|
17674
|
+
return "waterfall";
|
|
17675
|
+
}
|
|
17676
|
+
};
|
|
17677
|
+
const layoutType = getLayoutType();
|
|
17678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
17679
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17680
|
+
className: "flex flex-col px-20 w-full leading-relaxed",
|
|
17681
|
+
children: [
|
|
17682
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17683
|
+
className: "mb-8",
|
|
17684
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
|
|
17685
|
+
className: "text-[72px] font-bold leading-[1.4] text-foreground select-text",
|
|
17686
|
+
children: props.title
|
|
17687
|
+
})
|
|
17688
|
+
}),
|
|
17689
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17690
|
+
className: "relative items-center text-5xl tracking-wider wrap-break-word text-foreground",
|
|
17691
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17692
|
+
className: "text-[60px] tracking-[0.5px] leading-[1.6] whitespace-pre-wrap text-foreground select-text",
|
|
17693
|
+
style: {
|
|
17694
|
+
wordBreak: "break-word",
|
|
17695
|
+
overflowWrap: "break-word"
|
|
17696
|
+
},
|
|
17697
|
+
children: props.text && renderRichTextToReact(props.text, {
|
|
17698
|
+
at: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17699
|
+
topic: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17700
|
+
lottery: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17701
|
+
webLink: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17702
|
+
vote: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
17703
|
+
viewPicture: { className: "text-[#006A9E] dark:text-[#58B0D5]" }
|
|
17704
|
+
})
|
|
17705
|
+
})
|
|
17706
|
+
}),
|
|
17707
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-15" })
|
|
17708
|
+
]
|
|
17709
|
+
}),
|
|
17710
|
+
props.image_url && Array.isArray(props.image_url) && props.image_url.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17711
|
+
className: "px-20",
|
|
17712
|
+
children: [
|
|
17713
|
+
layoutType === "grid" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17714
|
+
className: "grid grid-cols-3 gap-3 w-full",
|
|
17715
|
+
children: props.image_url.slice(0, 9).map((img, index) => {
|
|
17716
|
+
const total = Math.min(props.image_url?.length || 0, 9);
|
|
17717
|
+
const cols = 3;
|
|
17718
|
+
const row = Math.floor(index / cols);
|
|
17719
|
+
const col = index % cols;
|
|
17720
|
+
const lastRow = Math.floor((total - 1) / cols);
|
|
17721
|
+
const firstRowLastCol = Math.min(cols, total) - 1;
|
|
17722
|
+
const lastRowLastCol = (total - 1) % cols;
|
|
17723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17724
|
+
className: [
|
|
17725
|
+
"overflow-hidden",
|
|
17726
|
+
"aspect-square",
|
|
17727
|
+
"shadow-medium",
|
|
17728
|
+
"rounded-2xl",
|
|
17729
|
+
row === 0 && col === 0 ? "rounded-tl-4xl" : "",
|
|
17730
|
+
row === 0 && col === firstRowLastCol ? "rounded-tr-4xl" : "",
|
|
17731
|
+
row === lastRow && col === 0 ? "rounded-bl-4xl" : "",
|
|
17732
|
+
row === lastRow && col === lastRowLastCol ? "rounded-br-4xl" : ""
|
|
17733
|
+
].filter(Boolean).join(" "),
|
|
17734
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17735
|
+
src: img.image_src,
|
|
17736
|
+
alt: `图片${index + 1}`,
|
|
17737
|
+
className: "object-cover w-full h-full"
|
|
17738
|
+
})
|
|
17739
|
+
}, index);
|
|
17740
|
+
})
|
|
17741
|
+
}),
|
|
17742
|
+
layoutType === "waterfall" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17743
|
+
className: "flex gap-4 w-full",
|
|
17744
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17745
|
+
className: "flex flex-col flex-1 gap-4",
|
|
17746
|
+
children: props.image_url.filter((_, index) => index % 2 === 0).map((img, arrayIndex) => {
|
|
17747
|
+
const originalIndex = arrayIndex * 2;
|
|
17748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17749
|
+
className: "overflow-hidden rounded-3xl shadow-medium",
|
|
17750
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17751
|
+
src: img.image_src,
|
|
17752
|
+
alt: `图片${originalIndex + 1}`,
|
|
17753
|
+
className: "object-cover w-full h-auto"
|
|
17754
|
+
})
|
|
17755
|
+
}, originalIndex);
|
|
17756
|
+
})
|
|
17757
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17758
|
+
className: "flex flex-col flex-1 gap-4",
|
|
17759
|
+
children: props.image_url.filter((_, index) => index % 2 === 1).map((img, arrayIndex) => {
|
|
17760
|
+
const originalIndex = arrayIndex * 2 + 1;
|
|
17761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17762
|
+
className: "overflow-hidden rounded-3xl shadow-medium",
|
|
17763
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17764
|
+
src: img.image_src,
|
|
17765
|
+
alt: `图片${originalIndex + 1}`,
|
|
17766
|
+
className: "object-cover w-full h-auto"
|
|
17767
|
+
})
|
|
17768
|
+
}, originalIndex);
|
|
17769
|
+
})
|
|
17770
|
+
})]
|
|
17771
|
+
}),
|
|
17772
|
+
layoutType === "vertical" && props.image_url.map((img, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17773
|
+
className: "flex flex-col items-center",
|
|
17774
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17775
|
+
className: "flex overflow-hidden flex-col flex-1 items-center rounded-4xl shadow-large",
|
|
17776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
17777
|
+
src: img.image_src,
|
|
17778
|
+
alt: "封面",
|
|
17779
|
+
className: "object-contain w-full h-full rounded-3xl"
|
|
17780
|
+
})
|
|
17781
|
+
})
|
|
17782
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-18" })] }, index)),
|
|
17783
|
+
(layoutType === "waterfall" || layoutType === "grid") && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-18" })
|
|
17784
|
+
]
|
|
17785
|
+
}),
|
|
17786
|
+
props.additional && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliAdditionalCard, { additional: props.additional })
|
|
17787
|
+
] });
|
|
17788
|
+
};
|
|
17789
|
+
/**
|
|
17790
|
+
* B站动态组件
|
|
17791
|
+
*/
|
|
17792
|
+
var BilibiliDrawDynamic = import_react.memo((props) => {
|
|
17793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DefaultLayout, {
|
|
17794
|
+
...props,
|
|
17795
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17796
|
+
className: "p-4",
|
|
17797
|
+
children: [
|
|
17798
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-25" }),
|
|
17799
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicUserInfo, { ...props.data }),
|
|
17800
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-15" }),
|
|
17801
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicContent, {
|
|
17802
|
+
title: props.data.title,
|
|
17803
|
+
text: props.data.text,
|
|
17804
|
+
image_url: props.data.image_url,
|
|
17805
|
+
imageLayout: props.data.imageLayout,
|
|
17806
|
+
additional: props.data.additional
|
|
17807
|
+
}),
|
|
17808
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicStatus, { ...props.data }),
|
|
17809
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-23" }),
|
|
17810
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicFooter, {
|
|
17811
|
+
avatar_url: props.data.avatar_url,
|
|
17812
|
+
frame: props.data.frame,
|
|
17813
|
+
usernameMeta: props.data.usernameMeta,
|
|
17814
|
+
user_shortid: props.data.user_shortid,
|
|
17815
|
+
total_favorited: props.data.total_favorited,
|
|
17816
|
+
following_count: props.data.following_count,
|
|
17817
|
+
fans: props.data.fans,
|
|
17818
|
+
dynamicTYPE: props.data.dynamicTYPE,
|
|
17819
|
+
share_url: props.data.share_url,
|
|
17820
|
+
qrCodeDataUrl: props.qrCodeDataUrl
|
|
17821
|
+
})
|
|
17822
|
+
]
|
|
17823
|
+
})
|
|
17824
|
+
});
|
|
17825
|
+
});
|
|
17826
|
+
BilibiliDrawDynamic.displayName = "BilibiliDrawDynamic";
|
|
17827
|
+
//#endregion
|
|
17828
|
+
//#region ../template/src/components/platforms/bilibili/dynamic/DYNAMIC_TYPE_FORWARD.tsx
|
|
17829
|
+
/**
|
|
17943
17830
|
* 原始内容用户信息组件
|
|
17944
17831
|
*/
|
|
17945
17832
|
var OriginalUserInfo = (props) => {
|
|
17946
17833
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17947
|
-
className: "flex justify-between items-center pt-
|
|
17834
|
+
className: "flex justify-between items-center pt-6 pb-10 pl-6 pr-0",
|
|
17948
17835
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17949
17836
|
className: "flex gap-10 items-center min-w-0",
|
|
17950
17837
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -18034,7 +17921,7 @@ var OriginalAVContent = ({ content }) => {
|
|
|
18034
17921
|
*/
|
|
18035
17922
|
var OriginalDrawContent = ({ content }) => {
|
|
18036
17923
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18037
|
-
className: "px-12 py-
|
|
17924
|
+
className: "px-12 py-12 mt-4 w-full rounded-8xl bg-surface-secondary",
|
|
18038
17925
|
children: [
|
|
18039
17926
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(OriginalUserInfo, {
|
|
18040
17927
|
avatar_url: content.avatar_url,
|
|
@@ -18066,7 +17953,7 @@ var OriginalDrawContent = ({ content }) => {
|
|
|
18066
17953
|
})
|
|
18067
17954
|
}),
|
|
18068
17955
|
content.image_url && content.image_url.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18069
|
-
className: "flex justify-center py-11 pb-
|
|
17956
|
+
className: "flex justify-center py-11 pb-0",
|
|
18070
17957
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18071
17958
|
className: "flex overflow-hidden flex-col items-center w-full rounded-4xl shadow-large",
|
|
18072
17959
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
@@ -18075,9 +17962,9 @@ var OriginalDrawContent = ({ content }) => {
|
|
|
18075
17962
|
className: "object-cover w-full h-full rounded-6"
|
|
18076
17963
|
})
|
|
18077
17964
|
})
|
|
18078
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.
|
|
17965
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18079
17966
|
className: `grid gap-3 ${content.image_url?.length === 4 ? "grid-cols-2" : "grid-cols-3"}`,
|
|
18080
|
-
children:
|
|
17967
|
+
children: content.image_url?.map((img, index) => {
|
|
18081
17968
|
const total = content.image_url?.length || 0;
|
|
18082
17969
|
const cols = total === 4 ? 2 : 3;
|
|
18083
17970
|
const row = Math.floor(index / cols);
|
|
@@ -18100,10 +17987,10 @@ var OriginalDrawContent = ({ content }) => {
|
|
|
18100
17987
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
18101
17988
|
src: img.image_src,
|
|
18102
17989
|
alt: `图片${index + 1}`,
|
|
18103
|
-
className: "object-cover
|
|
17990
|
+
className: "object-cover w-full h-full"
|
|
18104
17991
|
})
|
|
18105
17992
|
}, index);
|
|
18106
|
-
})
|
|
17993
|
+
})
|
|
18107
17994
|
})
|
|
18108
17995
|
]
|
|
18109
17996
|
});
|
|
@@ -18114,27 +18001,35 @@ var OriginalDrawContent = ({ content }) => {
|
|
|
18114
18001
|
var OriginalWordContent = ({ content }) => {
|
|
18115
18002
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18116
18003
|
className: "px-12 py-8 mt-4 w-full rounded-8xl bg-surface-secondary",
|
|
18117
|
-
children: [
|
|
18118
|
-
|
|
18119
|
-
|
|
18120
|
-
|
|
18121
|
-
|
|
18122
|
-
|
|
18123
|
-
|
|
18124
|
-
|
|
18125
|
-
|
|
18126
|
-
className: "
|
|
18127
|
-
children:
|
|
18128
|
-
|
|
18129
|
-
|
|
18130
|
-
|
|
18131
|
-
|
|
18132
|
-
|
|
18133
|
-
|
|
18134
|
-
|
|
18004
|
+
children: [
|
|
18005
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(OriginalUserInfo, {
|
|
18006
|
+
avatar_url: content.avatar_url,
|
|
18007
|
+
frame: content.frame,
|
|
18008
|
+
usernameMeta: content.usernameMeta,
|
|
18009
|
+
create_time: content.create_time,
|
|
18010
|
+
decoration_card: content.decoration_card
|
|
18011
|
+
}),
|
|
18012
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18013
|
+
className: "py-4",
|
|
18014
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18015
|
+
className: "text-5xl leading-relaxed text-foreground wrap-break-word",
|
|
18016
|
+
children: content.text && renderRichTextToReact(content.text, {
|
|
18017
|
+
at: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
18018
|
+
topic: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
18019
|
+
lottery: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
18020
|
+
webLink: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
18021
|
+
vote: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
18022
|
+
viewPicture: { className: "text-[#006A9E] dark:text-[#58B0D5]" },
|
|
18023
|
+
iconScale: .8
|
|
18024
|
+
})
|
|
18135
18025
|
})
|
|
18026
|
+
}),
|
|
18027
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliAdditionalCard, {
|
|
18028
|
+
additional: content.additional,
|
|
18029
|
+
gap: false,
|
|
18030
|
+
className: "pb-4"
|
|
18136
18031
|
})
|
|
18137
|
-
|
|
18032
|
+
]
|
|
18138
18033
|
});
|
|
18139
18034
|
};
|
|
18140
18035
|
/**
|
|
@@ -18234,163 +18129,6 @@ var BilibiliForwardContent = (props) => {
|
|
|
18234
18129
|
] });
|
|
18235
18130
|
};
|
|
18236
18131
|
/**
|
|
18237
|
-
* B站转发动态状态组件
|
|
18238
|
-
*/
|
|
18239
|
-
var BilibiliForwardStatus = (props) => {
|
|
18240
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18241
|
-
className: "flex flex-col gap-10 px-20 w-full leading-relaxed",
|
|
18242
|
-
children: [
|
|
18243
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18244
|
-
className: "flex gap-6 items-center text-5xl font-light tracking-normal select-text text-foreground/70",
|
|
18245
|
-
children: [
|
|
18246
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18247
|
-
className: "flex gap-2 items-center",
|
|
18248
|
-
children: [
|
|
18249
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThumbUpIcon, { size: 48 }),
|
|
18250
|
-
props.dianzan,
|
|
18251
|
-
"点赞"
|
|
18252
|
-
]
|
|
18253
|
-
}),
|
|
18254
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "·" }),
|
|
18255
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18256
|
-
className: "flex gap-2 items-center",
|
|
18257
|
-
children: [
|
|
18258
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommentIcon, { size: 48 }),
|
|
18259
|
-
props.pinglun,
|
|
18260
|
-
"评论"
|
|
18261
|
-
]
|
|
18262
|
-
}),
|
|
18263
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "·" }),
|
|
18264
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18265
|
-
className: "flex gap-2 items-center",
|
|
18266
|
-
children: [
|
|
18267
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShareIcon, { size: 48 }),
|
|
18268
|
-
props.share,
|
|
18269
|
-
"分享"
|
|
18270
|
-
]
|
|
18271
|
-
})
|
|
18272
|
-
]
|
|
18273
|
-
}),
|
|
18274
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18275
|
-
className: "flex gap-2 items-center text-5xl font-light tracking-normal select-text text-foreground/70",
|
|
18276
|
-
children: [
|
|
18277
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Clock, { size: 48 }),
|
|
18278
|
-
"图片生成于: ",
|
|
18279
|
-
props.render_time
|
|
18280
|
-
]
|
|
18281
|
-
}),
|
|
18282
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-3" })
|
|
18283
|
-
]
|
|
18284
|
-
});
|
|
18285
|
-
};
|
|
18286
|
-
/**
|
|
18287
|
-
* B站转发动态底部信息组件
|
|
18288
|
-
*/
|
|
18289
|
-
var BilibiliForwardFooter = (props) => {
|
|
18290
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18291
|
-
className: "flex justify-between items-start px-20 pb-20",
|
|
18292
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18293
|
-
className: "flex flex-col gap-12",
|
|
18294
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18295
|
-
className: "flex gap-12 items-start",
|
|
18296
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18297
|
-
className: "relative shrink-0",
|
|
18298
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
18299
|
-
src: props.avatar_url,
|
|
18300
|
-
alt: "头像",
|
|
18301
|
-
className: "rounded-full shadow-medium w-35 h-auto",
|
|
18302
|
-
isCircular: true
|
|
18303
|
-
}), props.frame && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
18304
|
-
src: props.frame,
|
|
18305
|
-
alt: "头像框",
|
|
18306
|
-
className: "absolute inset-0 transform scale-180"
|
|
18307
|
-
})]
|
|
18308
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18309
|
-
className: "flex flex-col gap-5",
|
|
18310
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18311
|
-
className: "text-7xl font-bold select-text text-foreground",
|
|
18312
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsernameDisplay, { metadata: props.usernameMeta })
|
|
18313
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18314
|
-
className: "flex gap-2 items-center text-4xl text-muted",
|
|
18315
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Hash, { size: 32 }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
18316
|
-
className: "select-text",
|
|
18317
|
-
children: ["UID: ", props.user_shortid]
|
|
18318
|
-
})]
|
|
18319
|
-
})]
|
|
18320
|
-
})]
|
|
18321
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18322
|
-
className: "text-3xl flex gap-6 items-center text-foreground/70",
|
|
18323
|
-
children: [
|
|
18324
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18325
|
-
className: "flex flex-col gap-1 items-start px-6 py-3 rounded-2xl bg-surface",
|
|
18326
|
-
children: [
|
|
18327
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18328
|
-
className: "flex gap-1 items-center",
|
|
18329
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThumbUpIcon, { size: 28 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
18330
|
-
className: "text-muted",
|
|
18331
|
-
children: "获赞"
|
|
18332
|
-
})]
|
|
18333
|
-
}),
|
|
18334
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-px bg-border" }),
|
|
18335
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
18336
|
-
className: "select-text font-medium text-4xl",
|
|
18337
|
-
children: props.total_favorited
|
|
18338
|
-
})
|
|
18339
|
-
]
|
|
18340
|
-
}),
|
|
18341
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18342
|
-
className: "flex flex-col gap-1 items-start px-6 py-3 rounded-2xl bg-surface",
|
|
18343
|
-
children: [
|
|
18344
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18345
|
-
className: "flex gap-1 items-center",
|
|
18346
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Eye, { size: 28 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
18347
|
-
className: "text-muted",
|
|
18348
|
-
children: "关注"
|
|
18349
|
-
})]
|
|
18350
|
-
}),
|
|
18351
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-px bg-border" }),
|
|
18352
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
18353
|
-
className: "select-text font-medium text-4xl",
|
|
18354
|
-
children: props.following_count
|
|
18355
|
-
})
|
|
18356
|
-
]
|
|
18357
|
-
}),
|
|
18358
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18359
|
-
className: "flex flex-col gap-1 items-start px-6 py-3 rounded-2xl bg-surface",
|
|
18360
|
-
children: [
|
|
18361
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18362
|
-
className: "flex gap-1 items-center",
|
|
18363
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsersRound, { size: 28 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
18364
|
-
className: "text-muted",
|
|
18365
|
-
children: "粉丝"
|
|
18366
|
-
})]
|
|
18367
|
-
}),
|
|
18368
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-px bg-border" }),
|
|
18369
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
18370
|
-
className: "select-text font-medium text-4xl",
|
|
18371
|
-
children: props.fans
|
|
18372
|
-
})
|
|
18373
|
-
]
|
|
18374
|
-
})
|
|
18375
|
-
]
|
|
18376
|
-
})]
|
|
18377
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18378
|
-
className: "flex flex-col items-center gap-4",
|
|
18379
|
-
children: props.qrCodeDataUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
18380
|
-
src: props.qrCodeDataUrl,
|
|
18381
|
-
alt: "二维码",
|
|
18382
|
-
className: "h-auto w-75 rounded-2xl"
|
|
18383
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18384
|
-
className: "flex justify-center items-center rounded-2xl bg-surface w-100 h-100",
|
|
18385
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
18386
|
-
className: "text-muted",
|
|
18387
|
-
children: "二维码"
|
|
18388
|
-
})
|
|
18389
|
-
})
|
|
18390
|
-
})]
|
|
18391
|
-
});
|
|
18392
|
-
};
|
|
18393
|
-
/**
|
|
18394
18132
|
* B站转发动态组件
|
|
18395
18133
|
*/
|
|
18396
18134
|
var BilibiliForwardDynamic = import_react.memo((props) => {
|
|
@@ -18400,24 +18138,13 @@ var BilibiliForwardDynamic = import_react.memo((props) => {
|
|
|
18400
18138
|
className: "p-4",
|
|
18401
18139
|
children: [
|
|
18402
18140
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-25" }),
|
|
18403
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
18404
|
-
avatar_url: props.data.avatar_url,
|
|
18405
|
-
frame: props.data.frame,
|
|
18406
|
-
usernameMeta: props.data.usernameMeta,
|
|
18407
|
-
create_time: props.data.create_time,
|
|
18408
|
-
decoration_card: props.data.decoration_card
|
|
18409
|
-
}),
|
|
18141
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicUserInfo, { ...props.data }),
|
|
18410
18142
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-15" }),
|
|
18411
18143
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliForwardContent, { ...props.data }),
|
|
18412
18144
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-25" }),
|
|
18413
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
18414
|
-
dianzan: props.data.dianzan,
|
|
18415
|
-
pinglun: props.data.pinglun,
|
|
18416
|
-
share: props.data.share,
|
|
18417
|
-
render_time: props.data.render_time
|
|
18418
|
-
}),
|
|
18145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicStatus, { ...props.data }),
|
|
18419
18146
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-23" }),
|
|
18420
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
18147
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicFooter, {
|
|
18421
18148
|
avatar_url: props.data.avatar_url,
|
|
18422
18149
|
frame: props.data.frame,
|
|
18423
18150
|
usernameMeta: props.data.usernameMeta,
|
|
@@ -18427,7 +18154,8 @@ var BilibiliForwardDynamic = import_react.memo((props) => {
|
|
|
18427
18154
|
fans: props.data.fans,
|
|
18428
18155
|
dynamicTYPE: props.data.dynamicTYPE,
|
|
18429
18156
|
share_url: props.data.share_url,
|
|
18430
|
-
qrCodeDataUrl: props.qrCodeDataUrl
|
|
18157
|
+
qrCodeDataUrl: props.qrCodeDataUrl,
|
|
18158
|
+
showUidHash: true
|
|
18431
18159
|
})
|
|
18432
18160
|
]
|
|
18433
18161
|
})
|
|
@@ -18969,42 +18697,6 @@ BilibiliLiveDynamic.displayName = "BilibiliLiveDynamic";
|
|
|
18969
18697
|
//#endregion
|
|
18970
18698
|
//#region ../template/src/components/platforms/bilibili/dynamic/DYNAMIC_TYPE_WORD.tsx
|
|
18971
18699
|
/**
|
|
18972
|
-
* B站动态用户信息组件
|
|
18973
|
-
*/
|
|
18974
|
-
var BilibiliDynamicUserInfo = (props) => {
|
|
18975
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18976
|
-
className: "flex gap-10 items-center justify-between px-0 pb-0 pl-24 pr-10",
|
|
18977
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18978
|
-
className: "flex gap-10 items-center",
|
|
18979
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18980
|
-
className: "relative",
|
|
18981
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
18982
|
-
src: props.avatar_url,
|
|
18983
|
-
alt: "头像",
|
|
18984
|
-
className: "w-32 h-32 rounded-full shadow-medium",
|
|
18985
|
-
isCircular: true
|
|
18986
|
-
}), props.frame && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
18987
|
-
src: props.frame,
|
|
18988
|
-
alt: "头像框",
|
|
18989
|
-
className: "absolute inset-0 transform scale-180"
|
|
18990
|
-
})]
|
|
18991
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18992
|
-
className: "flex flex-col gap-8 text-7xl",
|
|
18993
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
18994
|
-
className: "text-6xl font-bold select-text text-foreground",
|
|
18995
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsernameDisplay, { metadata: props.usernameMeta })
|
|
18996
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
18997
|
-
className: "flex gap-2 items-center text-4xl font-normal whitespace-nowrap text-muted",
|
|
18998
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Clock, { size: 36 }), props.create_time]
|
|
18999
|
-
})]
|
|
19000
|
-
})]
|
|
19001
|
-
}), props.decoration_card && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
19002
|
-
className: "shrink-0",
|
|
19003
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DecorationCard, { data: props.decoration_card })
|
|
19004
|
-
})]
|
|
19005
|
-
});
|
|
19006
|
-
};
|
|
19007
|
-
/**
|
|
19008
18700
|
* B站纯文动态内容组件
|
|
19009
18701
|
*/
|
|
19010
18702
|
var BilibiliWordContent = (props) => {
|
|
@@ -19028,163 +18720,6 @@ var BilibiliWordContent = (props) => {
|
|
|
19028
18720
|
}), props.additional && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliAdditionalCard, { additional: props.additional })] });
|
|
19029
18721
|
};
|
|
19030
18722
|
/**
|
|
19031
|
-
* B站动态状态组件
|
|
19032
|
-
*/
|
|
19033
|
-
var BilibiliDynamicStatus = (props) => {
|
|
19034
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19035
|
-
className: "flex flex-col gap-10 px-20 w-full leading-relaxed",
|
|
19036
|
-
children: [
|
|
19037
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19038
|
-
className: "flex gap-6 items-center text-5xl font-light tracking-normal select-text text-foreground/70",
|
|
19039
|
-
children: [
|
|
19040
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19041
|
-
className: "flex gap-2 items-center",
|
|
19042
|
-
children: [
|
|
19043
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThumbUpIcon, { size: 48 }),
|
|
19044
|
-
props.dianzan,
|
|
19045
|
-
"点赞"
|
|
19046
|
-
]
|
|
19047
|
-
}),
|
|
19048
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "·" }),
|
|
19049
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19050
|
-
className: "flex gap-2 items-center",
|
|
19051
|
-
children: [
|
|
19052
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommentIcon, { size: 48 }),
|
|
19053
|
-
props.pinglun,
|
|
19054
|
-
"评论"
|
|
19055
|
-
]
|
|
19056
|
-
}),
|
|
19057
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "·" }),
|
|
19058
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19059
|
-
className: "flex gap-2 items-center",
|
|
19060
|
-
children: [
|
|
19061
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShareIcon, { size: 48 }),
|
|
19062
|
-
props.share,
|
|
19063
|
-
"分享"
|
|
19064
|
-
]
|
|
19065
|
-
})
|
|
19066
|
-
]
|
|
19067
|
-
}),
|
|
19068
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19069
|
-
className: "flex gap-2 items-center text-5xl font-light tracking-normal select-text text-foreground/70",
|
|
19070
|
-
children: [
|
|
19071
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Clock, { size: 48 }),
|
|
19072
|
-
"图片生成于: ",
|
|
19073
|
-
props.render_time
|
|
19074
|
-
]
|
|
19075
|
-
}),
|
|
19076
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-3" })
|
|
19077
|
-
]
|
|
19078
|
-
});
|
|
19079
|
-
};
|
|
19080
|
-
/**
|
|
19081
|
-
* B站动态底部信息组件
|
|
19082
|
-
*/
|
|
19083
|
-
var BilibiliDynamicFooter = (props) => {
|
|
19084
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19085
|
-
className: "flex justify-between items-start px-20 pb-20",
|
|
19086
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19087
|
-
className: "flex flex-col gap-12",
|
|
19088
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19089
|
-
className: "flex gap-12 items-start",
|
|
19090
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19091
|
-
className: "relative shrink-0",
|
|
19092
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
19093
|
-
src: props.avatar_url,
|
|
19094
|
-
alt: "头像",
|
|
19095
|
-
className: "rounded-full shadow-medium w-35 h-auto",
|
|
19096
|
-
isCircular: true
|
|
19097
|
-
}), props.frame && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EnhancedImage, {
|
|
19098
|
-
src: props.frame,
|
|
19099
|
-
alt: "头像框",
|
|
19100
|
-
className: "absolute inset-0 transform scale-180"
|
|
19101
|
-
})]
|
|
19102
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19103
|
-
className: "flex flex-col gap-5",
|
|
19104
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
19105
|
-
className: "text-7xl font-bold select-text text-foreground",
|
|
19106
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsernameDisplay, { metadata: props.usernameMeta })
|
|
19107
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
19108
|
-
className: "flex gap-2 items-center text-4xl text-muted",
|
|
19109
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
19110
|
-
className: "select-text",
|
|
19111
|
-
children: ["UID: ", props.user_shortid]
|
|
19112
|
-
})
|
|
19113
|
-
})]
|
|
19114
|
-
})]
|
|
19115
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19116
|
-
className: "text-3xl flex gap-6 items-center text-foreground/70",
|
|
19117
|
-
children: [
|
|
19118
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19119
|
-
className: "flex flex-col gap-1 items-start px-6 py-3 rounded-2xl bg-surface",
|
|
19120
|
-
children: [
|
|
19121
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19122
|
-
className: "flex gap-1 items-center",
|
|
19123
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThumbUpIcon, { size: 28 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
19124
|
-
className: "text-muted",
|
|
19125
|
-
children: "获赞"
|
|
19126
|
-
})]
|
|
19127
|
-
}),
|
|
19128
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-px bg-border" }),
|
|
19129
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
19130
|
-
className: "select-text font-medium text-4xl",
|
|
19131
|
-
children: props.total_favorited
|
|
19132
|
-
})
|
|
19133
|
-
]
|
|
19134
|
-
}),
|
|
19135
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19136
|
-
className: "flex flex-col gap-1 items-start px-6 py-3 rounded-2xl bg-surface",
|
|
19137
|
-
children: [
|
|
19138
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19139
|
-
className: "flex gap-1 items-center",
|
|
19140
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Eye, { size: 28 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
19141
|
-
className: "text-muted",
|
|
19142
|
-
children: "关注"
|
|
19143
|
-
})]
|
|
19144
|
-
}),
|
|
19145
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-px bg-border" }),
|
|
19146
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
19147
|
-
className: "select-text font-medium text-4xl",
|
|
19148
|
-
children: props.following_count
|
|
19149
|
-
})
|
|
19150
|
-
]
|
|
19151
|
-
}),
|
|
19152
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19153
|
-
className: "flex flex-col gap-1 items-start px-6 py-3 rounded-2xl bg-surface",
|
|
19154
|
-
children: [
|
|
19155
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
19156
|
-
className: "flex gap-1 items-center",
|
|
19157
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsersRound, { size: 28 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
19158
|
-
className: "text-muted",
|
|
19159
|
-
children: "粉丝"
|
|
19160
|
-
})]
|
|
19161
|
-
}),
|
|
19162
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-px bg-border" }),
|
|
19163
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
19164
|
-
className: "select-text font-medium text-4xl",
|
|
19165
|
-
children: props.fans
|
|
19166
|
-
})
|
|
19167
|
-
]
|
|
19168
|
-
})
|
|
19169
|
-
]
|
|
19170
|
-
})]
|
|
19171
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
19172
|
-
className: "flex flex-col items-center gap-4",
|
|
19173
|
-
children: props.qrCodeDataUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", {
|
|
19174
|
-
src: props.qrCodeDataUrl,
|
|
19175
|
-
alt: "二维码",
|
|
19176
|
-
className: "h-auto w-75 rounded-2xl"
|
|
19177
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
19178
|
-
className: "flex justify-center items-center rounded-2xl bg-surface w-100 h-100",
|
|
19179
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
19180
|
-
className: "text-muted",
|
|
19181
|
-
children: "二维码"
|
|
19182
|
-
})
|
|
19183
|
-
})
|
|
19184
|
-
})]
|
|
19185
|
-
});
|
|
19186
|
-
};
|
|
19187
|
-
/**
|
|
19188
18723
|
* B站纯文动态组件
|
|
19189
18724
|
*/
|
|
19190
18725
|
var BilibiliWordDynamic = import_react.memo((props) => {
|
|
@@ -19194,24 +18729,13 @@ var BilibiliWordDynamic = import_react.memo((props) => {
|
|
|
19194
18729
|
className: "p-4",
|
|
19195
18730
|
children: [
|
|
19196
18731
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-25" }),
|
|
19197
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicUserInfo, {
|
|
19198
|
-
avatar_url: props.data.avatar_url,
|
|
19199
|
-
frame: props.data.frame,
|
|
19200
|
-
usernameMeta: props.data.usernameMeta,
|
|
19201
|
-
create_time: props.data.create_time,
|
|
19202
|
-
decoration_card: props.data.decoration_card
|
|
19203
|
-
}),
|
|
18732
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicUserInfo, { ...props.data }),
|
|
19204
18733
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-15" }),
|
|
19205
18734
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliWordContent, {
|
|
19206
18735
|
text: props.data.text,
|
|
19207
18736
|
additional: props.data.additional
|
|
19208
18737
|
}),
|
|
19209
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicStatus, {
|
|
19210
|
-
dianzan: props.data.dianzan,
|
|
19211
|
-
pinglun: props.data.pinglun,
|
|
19212
|
-
share: props.data.share,
|
|
19213
|
-
render_time: props.data.render_time
|
|
19214
|
-
}),
|
|
18738
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicStatus, { ...props.data }),
|
|
19215
18739
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-23" }),
|
|
19216
18740
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BilibiliDynamicFooter, {
|
|
19217
18741
|
avatar_url: props.data.avatar_url,
|
|
@@ -33859,29 +33383,12 @@ var DouyinWeb = (all) => {
|
|
|
33859
33383
|
}],
|
|
33860
33384
|
isDisabled: !all.douyin.sendContent.includes("comment") || !all.douyin.switch
|
|
33861
33385
|
}),
|
|
33862
|
-
components.input.number("subCommentDepth", {
|
|
33863
|
-
label: "次级评论解析深度",
|
|
33864
|
-
description: "次级评论解析深度",
|
|
33865
|
-
defaultValue: all.douyin.subCommentDepth.toString(),
|
|
33866
|
-
rules: [{
|
|
33867
|
-
min: 1,
|
|
33868
|
-
max: 6,
|
|
33869
|
-
error: "嵌套深度最高只有 6 层,超过 6 层的评论会被强制截断"
|
|
33870
|
-
}],
|
|
33871
|
-
isDisabled: !all.douyin.sendContent.includes("comment") || !all.douyin.switch
|
|
33872
|
-
}),
|
|
33873
33386
|
components.switch.create("commentImageCollection", {
|
|
33874
33387
|
label: "是否收集评论区的图片",
|
|
33875
33388
|
description: "开启后将收集评论区的图片,以合并转发的形式返回",
|
|
33876
33389
|
defaultSelected: all.douyin.commentImageCollection,
|
|
33877
33390
|
isDisabled: !all.douyin.sendContent.includes("comment") || !all.douyin.switch
|
|
33878
33391
|
}),
|
|
33879
|
-
components.switch.create("realCommentCount", {
|
|
33880
|
-
label: "显示真实评论数量",
|
|
33881
|
-
description: "评论图是否显示真实评论数量,关闭则显示解析到的评论数量",
|
|
33882
|
-
defaultSelected: all.douyin.realCommentCount,
|
|
33883
|
-
isDisabled: !all.douyin.sendContent.includes("comment") || !all.douyin.switch
|
|
33884
|
-
}),
|
|
33885
33392
|
components.divider.create("divider-dy-render", {
|
|
33886
33393
|
description: "渲染与画质设置",
|
|
33887
33394
|
descPosition: 20
|
|
@@ -36368,60 +35875,71 @@ var buildBilibiliDynamicRichText = (text, richTextNodes) => {
|
|
|
36368
35875
|
}
|
|
36369
35876
|
return createRichTextDocument(nodes, { platform: "bilibili" });
|
|
36370
35877
|
}
|
|
36371
|
-
const
|
|
36372
|
-
return text.indexOf(searchText, startPos);
|
|
36373
|
-
};
|
|
36374
|
-
let currentPos = 0;
|
|
36375
|
-
for (const tag of richTextNodes) {
|
|
35878
|
+
const buildNodesFromTag = (tag) => {
|
|
36376
35879
|
const matchText = tag.orig_text || tag.text || "";
|
|
36377
|
-
if (!matchText)
|
|
36378
|
-
const
|
|
36379
|
-
if (matchPos === -1) continue;
|
|
36380
|
-
if (matchPos > currentPos) {
|
|
36381
|
-
const parts = text.slice(currentPos, matchPos).split(/(\r?\n)/);
|
|
36382
|
-
for (const part of parts) if (part === "\r\n" || part === "\n") nodes.push(createLineBreakNode());
|
|
36383
|
-
else if (part) nodes.push(...parseTextWithUrls(part));
|
|
36384
|
-
}
|
|
35880
|
+
if (!matchText) return [];
|
|
35881
|
+
const result = [];
|
|
36385
35882
|
switch (tag.type) {
|
|
36386
35883
|
case "RICH_TEXT_NODE_TYPE_TEXT": {
|
|
36387
35884
|
const parts = matchText.split(/(\r?\n)/);
|
|
36388
|
-
for (const part of parts) if (part === "\r\n" || part === "\n")
|
|
36389
|
-
else if (part)
|
|
35885
|
+
for (const part of parts) if (part === "\r\n" || part === "\n") result.push(createLineBreakNode());
|
|
35886
|
+
else if (part) result.push(...parseTextWithUrls(part));
|
|
36390
35887
|
break;
|
|
36391
35888
|
}
|
|
36392
35889
|
case "topic":
|
|
36393
35890
|
case "RICH_TEXT_NODE_TYPE_TOPIC":
|
|
36394
|
-
|
|
35891
|
+
result.push(createTopicNode(matchText));
|
|
36395
35892
|
break;
|
|
36396
35893
|
case "RICH_TEXT_NODE_TYPE_AT":
|
|
36397
|
-
|
|
35894
|
+
result.push(createAtNode(matchText));
|
|
36398
35895
|
break;
|
|
36399
35896
|
case "RICH_TEXT_NODE_TYPE_LOTTERY":
|
|
36400
|
-
|
|
35897
|
+
result.push(createLotteryNode(matchText));
|
|
36401
35898
|
break;
|
|
36402
35899
|
case "RICH_TEXT_NODE_TYPE_WEB":
|
|
36403
|
-
|
|
35900
|
+
result.push(createWebLinkNode(tag.text || matchText, matchText));
|
|
36404
35901
|
break;
|
|
36405
35902
|
case "RICH_TEXT_NODE_TYPE_EMOJI": {
|
|
36406
35903
|
const emojiUrl = tag.emoji?.gif_url || tag.emoji?.icon_url;
|
|
36407
35904
|
const scale = tag.emoji?.size === 2 || tag.emoji?.size === 3 ? 2 : void 0;
|
|
36408
|
-
if (emojiUrl)
|
|
36409
|
-
else
|
|
35905
|
+
if (emojiUrl) result.push(createEmojiNode(matchText, emojiUrl, { scale }));
|
|
35906
|
+
else result.push(createTextNode(matchText));
|
|
36410
35907
|
break;
|
|
36411
35908
|
}
|
|
36412
35909
|
case "RICH_TEXT_NODE_TYPE_VOTE":
|
|
36413
|
-
|
|
35910
|
+
result.push(createVoteNode(tag.text || matchText));
|
|
36414
35911
|
break;
|
|
36415
35912
|
case "RICH_TEXT_NODE_TYPE_VIEW_PICTURE":
|
|
36416
|
-
|
|
35913
|
+
result.push(createViewPictureNode(matchText));
|
|
36417
35914
|
break;
|
|
36418
35915
|
default: {
|
|
36419
35916
|
const parts = matchText.split(/(\r?\n)/);
|
|
36420
|
-
for (const part of parts) if (part === "\r\n" || part === "\n")
|
|
36421
|
-
else if (part)
|
|
35917
|
+
for (const part of parts) if (part === "\r\n" || part === "\n") result.push(createLineBreakNode());
|
|
35918
|
+
else if (part) result.push(...parseTextWithUrls(part));
|
|
36422
35919
|
break;
|
|
36423
35920
|
}
|
|
36424
35921
|
}
|
|
35922
|
+
return result;
|
|
35923
|
+
};
|
|
35924
|
+
if (!text) {
|
|
35925
|
+
for (const tag of richTextNodes) nodes.push(...buildNodesFromTag(tag));
|
|
35926
|
+
return createRichTextDocument(nodes, { platform: "bilibili" });
|
|
35927
|
+
}
|
|
35928
|
+
const findInText = (searchText, startPos) => {
|
|
35929
|
+
return text.indexOf(searchText, startPos);
|
|
35930
|
+
};
|
|
35931
|
+
let currentPos = 0;
|
|
35932
|
+
for (const tag of richTextNodes) {
|
|
35933
|
+
const matchText = tag.orig_text || tag.text || "";
|
|
35934
|
+
if (!matchText) continue;
|
|
35935
|
+
const matchPos = findInText(matchText, currentPos);
|
|
35936
|
+
if (matchPos === -1) continue;
|
|
35937
|
+
if (matchPos > currentPos) {
|
|
35938
|
+
const parts = text.slice(currentPos, matchPos).split(/(\r?\n)/);
|
|
35939
|
+
for (const part of parts) if (part === "\r\n" || part === "\n") nodes.push(createLineBreakNode());
|
|
35940
|
+
else if (part) nodes.push(...parseTextWithUrls(part));
|
|
35941
|
+
}
|
|
35942
|
+
nodes.push(...buildNodesFromTag(tag));
|
|
36425
35943
|
currentPos = matchPos + matchText.length;
|
|
36426
35944
|
}
|
|
36427
35945
|
if (currentPos < text.length) {
|
|
@@ -36514,10 +36032,15 @@ var parseOpusToRichText = (opus, useDarkTheme) => {
|
|
|
36514
36032
|
flushList();
|
|
36515
36033
|
const pics = paragraph.pic?.pics;
|
|
36516
36034
|
if (Array.isArray(pics)) {
|
|
36517
|
-
for (const pic of pics) if (pic.url) nodes.push(createImageNode(fixImageUrl(pic.url), pic.alt || "专栏图片"));
|
|
36035
|
+
for (const pic of pics) if (pic.url) nodes.push(createImageNode(fixImageUrl(pic.url), pic.alt || "专栏图片", pic.comment));
|
|
36518
36036
|
}
|
|
36519
36037
|
continue;
|
|
36520
36038
|
}
|
|
36039
|
+
if (paraType === 3) {
|
|
36040
|
+
flushList();
|
|
36041
|
+
nodes.push(createHorizontalRuleNode());
|
|
36042
|
+
continue;
|
|
36043
|
+
}
|
|
36521
36044
|
if (paraType === 7) {
|
|
36522
36045
|
flushList();
|
|
36523
36046
|
const linkCard = paragraph.link_card;
|
|
@@ -36544,6 +36067,7 @@ var parseOpusToRichText = (opus, useDarkTheme) => {
|
|
|
36544
36067
|
if (![
|
|
36545
36068
|
1,
|
|
36546
36069
|
2,
|
|
36070
|
+
3,
|
|
36547
36071
|
4,
|
|
36548
36072
|
7,
|
|
36549
36073
|
8,
|
|
@@ -37131,15 +36655,18 @@ var Bilibili = class extends Base {
|
|
|
37131
36655
|
for (const item of temp) await Common.removeFile(item.filepath, true);
|
|
37132
36656
|
}
|
|
37133
36657
|
}
|
|
37134
|
-
|
|
37135
|
-
|
|
37136
|
-
|
|
36658
|
+
const md = dynamicInfo.data.data.item.modules.module_dynamic;
|
|
36659
|
+
if (md.topic) {
|
|
36660
|
+
const { name } = md.topic;
|
|
36661
|
+
const summary = md.major.opus.summary;
|
|
36662
|
+
summary.rich_text_nodes ??= [];
|
|
36663
|
+
summary.rich_text_nodes.unshift({
|
|
37137
36664
|
orig_text: name,
|
|
37138
36665
|
jump_url: "",
|
|
37139
36666
|
text: name,
|
|
37140
36667
|
type: "topic"
|
|
37141
36668
|
});
|
|
37142
|
-
|
|
36669
|
+
summary.text = summary.text ? `${name}\n${summary.text}` : name;
|
|
37143
36670
|
}
|
|
37144
36671
|
this.e.reply(await Render(this.e, "bilibili/dynamic/DYNAMIC_TYPE_DRAW", {
|
|
37145
36672
|
image_url: Object.values(dynamicInfo.data.data.item.modules.module_dynamic.major.opus.pics).filter((item) => typeof item?.url === "string").map((item) => ({ image_src: item.url })),
|
|
@@ -37159,23 +36686,27 @@ var Bilibili = class extends Base {
|
|
|
37159
36686
|
following_count: Count(userProfileData.data.data.card.attention),
|
|
37160
36687
|
decoration_card: generateDecorationCard(dynamicInfo.data.data.item.modules.module_author.decoration_card),
|
|
37161
36688
|
render_time: TimeFormatter.now(),
|
|
37162
|
-
dynamicTYPE: "
|
|
36689
|
+
dynamicTYPE: "图文动态解析",
|
|
37163
36690
|
imageLayout: Config.bilibili.imageLayout,
|
|
37164
|
-
additional: parseAdditionalCard(dynamicInfo.data.data.item.modules.module_dynamic.additional)
|
|
36691
|
+
additional: parseAdditionalCard(dynamicInfo.data.data.item.modules.module_dynamic.additional),
|
|
36692
|
+
dynamic_id: dynamicInfo.data.data.item.id_str
|
|
37165
36693
|
}));
|
|
37166
36694
|
break;
|
|
37167
36695
|
}
|
|
37168
36696
|
/** 纯文 */
|
|
37169
36697
|
case DynamicType.WORD: {
|
|
37170
|
-
|
|
37171
|
-
|
|
37172
|
-
|
|
36698
|
+
const md = dynamicInfo.data.data.item.modules.module_dynamic;
|
|
36699
|
+
if (md.topic) {
|
|
36700
|
+
const { name } = md.topic;
|
|
36701
|
+
const summary = md.major.opus.summary;
|
|
36702
|
+
summary.rich_text_nodes ??= [];
|
|
36703
|
+
summary.rich_text_nodes.unshift({
|
|
37173
36704
|
orig_text: name,
|
|
37174
36705
|
jump_url: "",
|
|
37175
36706
|
text: name,
|
|
37176
36707
|
type: "topic"
|
|
37177
36708
|
});
|
|
37178
|
-
|
|
36709
|
+
summary.text = summary.text ? `${name}\n\n${summary.text}` : name;
|
|
37179
36710
|
}
|
|
37180
36711
|
const text = buildBilibiliDynamicRichText(dynamicInfo.data.data.item.modules.module_dynamic.major.opus?.summary?.text ?? "", dynamicInfo.data.data.item.modules.module_dynamic.major.opus?.summary?.rich_text_nodes ?? []);
|
|
37181
36712
|
this.e.reply(await Render(this.e, "bilibili/dynamic/DYNAMIC_TYPE_WORD", {
|
|
@@ -37194,22 +36725,26 @@ var Bilibili = class extends Base {
|
|
|
37194
36725
|
following_count: Count(userProfileData.data.data.card.attention),
|
|
37195
36726
|
decoration_card: generateDecorationCard(dynamicInfo.data.data.item.modules.module_author.decoration_card),
|
|
37196
36727
|
render_time: TimeFormatter.now(),
|
|
37197
|
-
dynamicTYPE: "
|
|
37198
|
-
additional: parseAdditionalCard(dynamicInfo.data.data.item.modules.module_dynamic.additional)
|
|
36728
|
+
dynamicTYPE: "纯文动态解析",
|
|
36729
|
+
additional: parseAdditionalCard(dynamicInfo.data.data.item.modules.module_dynamic.additional),
|
|
36730
|
+
dynamic_id: dynamicInfo.data.data.item.id_str
|
|
37199
36731
|
}));
|
|
37200
36732
|
break;
|
|
37201
36733
|
}
|
|
37202
36734
|
/** 转发动态 */
|
|
37203
36735
|
case DynamicType.FORWARD: {
|
|
37204
|
-
|
|
37205
|
-
|
|
37206
|
-
|
|
36736
|
+
const md = dynamicInfo.data.data.item.modules.module_dynamic;
|
|
36737
|
+
if (md.topic) {
|
|
36738
|
+
const { name } = md.topic;
|
|
36739
|
+
const desc = md.desc;
|
|
36740
|
+
desc.rich_text_nodes ??= [];
|
|
36741
|
+
desc.rich_text_nodes.unshift({
|
|
37207
36742
|
orig_text: name,
|
|
37208
36743
|
jump_url: "",
|
|
37209
36744
|
text: name,
|
|
37210
36745
|
type: "topic"
|
|
37211
36746
|
});
|
|
37212
|
-
|
|
36747
|
+
desc.text = desc.text ? `${name}\n\n${desc.text}` : name;
|
|
37213
36748
|
}
|
|
37214
36749
|
const text = buildBilibiliDynamicRichText(dynamicInfo.data.data.item.modules.module_dynamic.desc.text, dynamicInfo.data.data.item.modules.module_dynamic.desc.rich_text_nodes);
|
|
37215
36750
|
const imgList = [];
|
|
@@ -37232,13 +36767,14 @@ var Bilibili = class extends Base {
|
|
|
37232
36767
|
frame: dynamicInfo.data.data.item.orig.modules.module_author.pendant.image
|
|
37233
36768
|
};
|
|
37234
36769
|
break;
|
|
37235
|
-
case DynamicType.DRAW:
|
|
37236
|
-
|
|
37237
|
-
|
|
37238
|
-
const
|
|
37239
|
-
|
|
37240
|
-
|
|
37241
|
-
|
|
36770
|
+
case DynamicType.DRAW: {
|
|
36771
|
+
const origMd = dynamicInfo.data.data.item.orig.modules.module_dynamic;
|
|
36772
|
+
if (origMd.topic) {
|
|
36773
|
+
const { name } = origMd.topic;
|
|
36774
|
+
const summary = origMd.major?.opus?.summary;
|
|
36775
|
+
if (summary) {
|
|
36776
|
+
summary.rich_text_nodes ??= [];
|
|
36777
|
+
summary.rich_text_nodes.unshift({
|
|
37242
36778
|
orig_text: name,
|
|
37243
36779
|
jump_url: "",
|
|
37244
36780
|
text: name,
|
|
@@ -37246,7 +36782,7 @@ var Bilibili = class extends Base {
|
|
|
37246
36782
|
rid: "",
|
|
37247
36783
|
style: { "1114514": "1919810" }
|
|
37248
36784
|
});
|
|
37249
|
-
|
|
36785
|
+
summary.text = summary.text ? `${name}\n${summary.text}` : name;
|
|
37250
36786
|
}
|
|
37251
36787
|
}
|
|
37252
36788
|
data = {
|
|
@@ -37260,19 +36796,21 @@ var Bilibili = class extends Base {
|
|
|
37260
36796
|
frame: dynamicInfo.data.data.item.orig.modules.module_author.pendant.image
|
|
37261
36797
|
};
|
|
37262
36798
|
break;
|
|
37263
|
-
|
|
37264
|
-
|
|
37265
|
-
|
|
37266
|
-
|
|
37267
|
-
|
|
37268
|
-
|
|
37269
|
-
|
|
36799
|
+
}
|
|
36800
|
+
case DynamicType.WORD: {
|
|
36801
|
+
const origMd = dynamicInfo.data.data.item.orig.modules.module_dynamic;
|
|
36802
|
+
if (origMd.topic) {
|
|
36803
|
+
const { name } = origMd.topic;
|
|
36804
|
+
const summary = origMd.major?.opus?.summary;
|
|
36805
|
+
if (summary) {
|
|
36806
|
+
summary.rich_text_nodes ??= [];
|
|
36807
|
+
summary.rich_text_nodes.unshift({
|
|
37270
36808
|
orig_text: name,
|
|
37271
36809
|
jump_url: "",
|
|
37272
36810
|
text: name,
|
|
37273
36811
|
type: "topic"
|
|
37274
36812
|
});
|
|
37275
|
-
|
|
36813
|
+
summary.text = summary.text ? `${name}\n${summary.text}` : name;
|
|
37276
36814
|
}
|
|
37277
36815
|
}
|
|
37278
36816
|
data = {
|
|
@@ -37281,9 +36819,11 @@ var Bilibili = class extends Base {
|
|
|
37281
36819
|
avatar_url: dynamicInfo.data.data.item.orig.modules.module_author.face,
|
|
37282
36820
|
text: buildBilibiliDynamicRichText(dynamicInfo.data.data.item.orig.modules.module_dynamic.major.opus.summary.text, dynamicInfo.data.data.item.orig.modules.module_dynamic.major.opus.summary.rich_text_nodes),
|
|
37283
36821
|
decoration_card: generateDecorationCard(dynamicInfo.data.data.item.orig.modules.module_author.decoration_card),
|
|
37284
|
-
frame: dynamicInfo.data.data.item.orig.modules.module_author.pendant.image
|
|
36822
|
+
frame: dynamicInfo.data.data.item.orig.modules.module_author.pendant.image,
|
|
36823
|
+
additional: parseAdditionalCard(dynamicInfo.data.data.item.orig.modules.module_dynamic.additional)
|
|
37285
36824
|
};
|
|
37286
36825
|
break;
|
|
36826
|
+
}
|
|
37287
36827
|
case DynamicType.LIVE_RCMD: {
|
|
37288
36828
|
const liveData = JSON.parse(dynamicInfo.data.data.item.orig.modules.module_dynamic.major.live_rcmd.content);
|
|
37289
36829
|
data = {
|
|
@@ -37322,7 +36862,8 @@ var Bilibili = class extends Base {
|
|
|
37322
36862
|
dynamicTYPE: "转发动态解析",
|
|
37323
36863
|
decoration_card: generateDecorationCard(dynamicInfo.data.data.item.modules.module_author.decoration_card),
|
|
37324
36864
|
render_time: TimeFormatter.now(),
|
|
37325
|
-
original_content: { [dynamicInfo.data.data.item.orig.type]: data }
|
|
36865
|
+
original_content: { [dynamicInfo.data.data.item.orig.type]: data },
|
|
36866
|
+
dynamic_id: dynamicInfo.data.data.item.id_str
|
|
37326
36867
|
}));
|
|
37327
36868
|
break;
|
|
37328
36869
|
}
|
|
@@ -37350,18 +36891,36 @@ var Bilibili = class extends Base {
|
|
|
37350
36891
|
staff.unshift(currentUser);
|
|
37351
36892
|
}
|
|
37352
36893
|
}
|
|
36894
|
+
const md = dynamicInfo.data.data.item.modules.module_dynamic;
|
|
36895
|
+
if (md.topic) {
|
|
36896
|
+
const { name } = md.topic;
|
|
36897
|
+
md.desc ??= {
|
|
36898
|
+
rich_text_nodes: [],
|
|
36899
|
+
text: ""
|
|
36900
|
+
};
|
|
36901
|
+
md.desc.rich_text_nodes.unshift({
|
|
36902
|
+
orig_text: name,
|
|
36903
|
+
jump_url: "",
|
|
36904
|
+
text: name,
|
|
36905
|
+
type: "topic"
|
|
36906
|
+
});
|
|
36907
|
+
md.desc.text = md.desc.text ? `${name}\n\n${md.desc.text}` : name;
|
|
36908
|
+
}
|
|
36909
|
+
const dynamicText = buildBilibiliDynamicRichText(dynamicInfo.data.data.item.modules.module_dynamic.desc?.text ?? "", dynamicInfo.data.data.item.modules.module_dynamic.desc?.rich_text_nodes ?? []);
|
|
37353
36910
|
img$1 = await Render(this.e, "bilibili/dynamic/DYNAMIC_TYPE_AV", {
|
|
37354
36911
|
image_url: INFODATA.data.data.pic,
|
|
37355
36912
|
text: buildBilibiliDynamicRichText(INFODATA.data.data.title, []),
|
|
37356
36913
|
desc: INFODATA.data.data.desc_v2?.length ? buildBilibiliVideoDescRichText(INFODATA.data.data.desc_v2) : buildBilibiliDynamicRichText(INFODATA.data.data.desc || "", []),
|
|
36914
|
+
dynamic_text: dynamicText,
|
|
37357
36915
|
dianzan: Count(INFODATA.data.data.stat.like),
|
|
37358
36916
|
pinglun: Count(INFODATA.data.data.stat.reply),
|
|
37359
36917
|
share: Count(INFODATA.data.data.stat.share),
|
|
37360
36918
|
view: Count(INFODATA.data.data.stat.view),
|
|
37361
36919
|
coin: Count(INFODATA.data.data.stat.coin),
|
|
37362
36920
|
duration_text: dynamicInfo.data.data.item.modules.module_dynamic.major.archive.duration_text,
|
|
37363
|
-
|
|
37364
|
-
|
|
36921
|
+
page_length: INFODATA.data.data.pages.length,
|
|
36922
|
+
create_time: TimeFormatter.toRelative(dynamicInfo.data.data.item.modules.module_author.pub_ts),
|
|
36923
|
+
avatar_url: dynamicInfo.data.data.item.modules.module_author.face,
|
|
37365
36924
|
frame: dynamicInfo.data.data.item.modules.module_author.pendant.image,
|
|
37366
36925
|
share_url: "https://www.bilibili.com/video/" + bvid,
|
|
37367
36926
|
usernameMeta: getUsernameMetadata(userProfileData.data.data.card),
|
|
@@ -37369,8 +36928,9 @@ var Bilibili = class extends Base {
|
|
|
37369
36928
|
user_shortid: userProfileData.data.data.card.mid,
|
|
37370
36929
|
total_favorited: Count(userProfileData.data.data.like_num),
|
|
37371
36930
|
following_count: Count(userProfileData.data.data.card.attention),
|
|
36931
|
+
decoration_card: generateDecorationCard(dynamicInfo.data.data.item.modules.module_author.decoration_card),
|
|
37372
36932
|
render_time: TimeFormatter.now(),
|
|
37373
|
-
dynamicTYPE: "
|
|
36933
|
+
dynamicTYPE: "视频动态解析",
|
|
37374
36934
|
dynamic_id: dynamicInfo.data.data.item.id_str,
|
|
37375
36935
|
staff
|
|
37376
36936
|
});
|
|
@@ -37395,7 +36955,7 @@ var Bilibili = class extends Base {
|
|
|
37395
36955
|
create_time: TimeFormatter.toDateTime(dynamicInfo.data.data.item.modules.module_author.pub_ts),
|
|
37396
36956
|
now_time: TimeFormatter.now(),
|
|
37397
36957
|
share_url: "https://live.bilibili.com/" + liveInfo.live_play_info.room_id,
|
|
37398
|
-
dynamicTYPE: "
|
|
36958
|
+
dynamicTYPE: "直播动态解析"
|
|
37399
36959
|
});
|
|
37400
36960
|
this.e.reply(img$1);
|
|
37401
36961
|
break;
|
|
@@ -37539,7 +37099,7 @@ var Bilibili = class extends Base {
|
|
|
37539
37099
|
create_time: liveInfo.data.data.live_time === "-62170012800" ? "获取失败" : liveInfo.data.data.live_time,
|
|
37540
37100
|
now_time: TimeFormatter.now(),
|
|
37541
37101
|
share_url: "https://live.bilibili.com/" + liveInfo.data.data.room_id,
|
|
37542
|
-
dynamicTYPE: "
|
|
37102
|
+
dynamicTYPE: "直播动态解析"
|
|
37543
37103
|
});
|
|
37544
37104
|
this.e.reply(img);
|
|
37545
37105
|
break;
|
|
@@ -38685,20 +38245,24 @@ var Bilibilipush = class extends Base {
|
|
|
38685
38245
|
render_time: TimeFormatter.now(),
|
|
38686
38246
|
imageLayout: Config.bilibili.imageLayout,
|
|
38687
38247
|
additional: parseAdditionalCard(data[dynamicId].Dynamic_Data.modules.module_dynamic.additional),
|
|
38688
|
-
dynamicTYPE: "图文动态推送"
|
|
38248
|
+
dynamicTYPE: "图文动态推送",
|
|
38249
|
+
dynamic_id: dynamicId
|
|
38689
38250
|
});
|
|
38690
38251
|
break;
|
|
38691
38252
|
/** 处理纯文动态 */
|
|
38692
38253
|
case DynamicType.WORD: {
|
|
38693
38254
|
if ("topic" in data[dynamicId].Dynamic_Data.orig.modules.module_dynamic && data[dynamicId].Dynamic_Data.modules.module_dynamic.topic !== null) {
|
|
38694
|
-
const
|
|
38695
|
-
|
|
38255
|
+
const md = data[dynamicId].Dynamic_Data.modules.module_dynamic;
|
|
38256
|
+
const { name } = md.topic;
|
|
38257
|
+
const summary = md.major.opus.summary;
|
|
38258
|
+
summary.rich_text_nodes ??= [];
|
|
38259
|
+
summary.rich_text_nodes.unshift({
|
|
38696
38260
|
orig_text: name,
|
|
38697
38261
|
text: name,
|
|
38698
38262
|
type: "topic",
|
|
38699
|
-
rid:
|
|
38263
|
+
rid: md.topic.id.toString()
|
|
38700
38264
|
});
|
|
38701
|
-
|
|
38265
|
+
summary.text = summary.text ? `${name}\n\n${summary.text}` : name;
|
|
38702
38266
|
}
|
|
38703
38267
|
const text = buildBilibiliDynamicRichText(data[dynamicId].Dynamic_Data.modules.module_dynamic.major?.opus?.summary?.text ?? "", data[dynamicId].Dynamic_Data.modules.module_dynamic.major?.opus?.summary?.rich_text_nodes ?? []);
|
|
38704
38268
|
img = await Render(this.e, "bilibili/dynamic/DYNAMIC_TYPE_WORD", {
|
|
@@ -38718,7 +38282,8 @@ var Bilibilipush = class extends Base {
|
|
|
38718
38282
|
decoration_card: generateDecorationCard(data[dynamicId].Dynamic_Data.modules.module_author.decoration_card),
|
|
38719
38283
|
render_time: TimeFormatter.now(),
|
|
38720
38284
|
additional: parseAdditionalCard(data[dynamicId].Dynamic_Data.modules.module_dynamic.additional),
|
|
38721
|
-
dynamicTYPE: "纯文动态推送"
|
|
38285
|
+
dynamicTYPE: "纯文动态推送",
|
|
38286
|
+
dynamic_id: dynamicId
|
|
38722
38287
|
});
|
|
38723
38288
|
break;
|
|
38724
38289
|
}
|
|
@@ -38751,16 +38316,34 @@ var Bilibilipush = class extends Base {
|
|
|
38751
38316
|
staff.unshift(currentUser);
|
|
38752
38317
|
}
|
|
38753
38318
|
}
|
|
38319
|
+
const md = data[dynamicId].Dynamic_Data.modules.module_dynamic;
|
|
38320
|
+
if (md.topic) {
|
|
38321
|
+
const { name } = md.topic;
|
|
38322
|
+
md.desc ??= {
|
|
38323
|
+
rich_text_nodes: [],
|
|
38324
|
+
text: ""
|
|
38325
|
+
};
|
|
38326
|
+
md.desc.rich_text_nodes.unshift({
|
|
38327
|
+
orig_text: name,
|
|
38328
|
+
jump_url: "",
|
|
38329
|
+
text: name,
|
|
38330
|
+
type: "topic"
|
|
38331
|
+
});
|
|
38332
|
+
md.desc.text = md.desc.text ? `${name}\n\n${md.desc.text}` : name;
|
|
38333
|
+
}
|
|
38334
|
+
const dynamicText = buildBilibiliDynamicRichText(data[dynamicId].Dynamic_Data.modules.module_dynamic.desc?.text ?? "", data[dynamicId].Dynamic_Data.modules.module_dynamic.desc?.rich_text_nodes ?? []);
|
|
38754
38335
|
img = await Render(this.e, "bilibili/dynamic/DYNAMIC_TYPE_AV", {
|
|
38755
38336
|
image_url: INFODATA.data.data.pic,
|
|
38756
38337
|
text: buildBilibiliDynamicRichText(INFODATA.data.data.title, []),
|
|
38757
38338
|
desc: INFODATA.data.data.desc_v2?.length ? buildBilibiliVideoDescRichText(INFODATA.data.data.desc_v2) : buildBilibiliDynamicRichText(INFODATA.data.data.desc || "", []),
|
|
38339
|
+
dynamic_text: dynamicText,
|
|
38758
38340
|
dianzan: Count(INFODATA.data.data.stat.like),
|
|
38759
38341
|
pinglun: Count(INFODATA.data.data.stat.reply),
|
|
38760
38342
|
share: Count(INFODATA.data.data.stat.share),
|
|
38761
38343
|
view: Count(INFODATA.data.data.stat.view),
|
|
38762
38344
|
coin: Count(INFODATA.data.data.stat.coin),
|
|
38763
38345
|
duration_text: data[dynamicId].Dynamic_Data.modules.module_dynamic.major?.archive?.duration_text ?? "0:00",
|
|
38346
|
+
page_length: INFODATA.data.data.pages.length,
|
|
38764
38347
|
create_time: TimeFormatter.toDateTime(data[dynamicId].Dynamic_Data.modules.module_author.pub_ts),
|
|
38765
38348
|
avatar_url: userINFO.data.data.card.face,
|
|
38766
38349
|
frame: data[dynamicId].Dynamic_Data.modules.module_author.pendant.image,
|
|
@@ -38797,15 +38380,18 @@ var Bilibilipush = class extends Base {
|
|
|
38797
38380
|
}
|
|
38798
38381
|
/** 处理转发动态 */
|
|
38799
38382
|
case DynamicType.FORWARD: {
|
|
38800
|
-
|
|
38801
|
-
|
|
38802
|
-
|
|
38383
|
+
const md = data[dynamicId].Dynamic_Data.modules.module_dynamic;
|
|
38384
|
+
if (md.topic) {
|
|
38385
|
+
const { name } = md.topic;
|
|
38386
|
+
const desc = md.desc;
|
|
38387
|
+
desc.rich_text_nodes ??= [];
|
|
38388
|
+
desc.rich_text_nodes.unshift({
|
|
38803
38389
|
orig_text: name,
|
|
38804
38390
|
jump_url: "",
|
|
38805
38391
|
text: name,
|
|
38806
38392
|
type: "topic"
|
|
38807
38393
|
});
|
|
38808
|
-
|
|
38394
|
+
desc.text = desc.text ? `${name}\n\n${desc.text}` : name;
|
|
38809
38395
|
}
|
|
38810
38396
|
const text = buildBilibiliDynamicRichText(data[dynamicId].Dynamic_Data.modules.module_dynamic.desc.text, data[dynamicId].Dynamic_Data.modules.module_dynamic.desc.rich_text_nodes);
|
|
38811
38397
|
let param = {};
|
|
@@ -38831,21 +38417,22 @@ var Bilibilipush = class extends Base {
|
|
|
38831
38417
|
frame: data[dynamicId].Dynamic_Data.orig.modules.module_author.pendant.image
|
|
38832
38418
|
};
|
|
38833
38419
|
break;
|
|
38834
|
-
case DynamicType.DRAW:
|
|
38835
|
-
|
|
38836
|
-
|
|
38837
|
-
const
|
|
38838
|
-
|
|
38839
|
-
|
|
38840
|
-
|
|
38420
|
+
case DynamicType.DRAW: {
|
|
38421
|
+
const origMd = data[dynamicId].Dynamic_Data.orig.modules.module_dynamic;
|
|
38422
|
+
if (origMd.topic) {
|
|
38423
|
+
const { name } = origMd.topic;
|
|
38424
|
+
const summary = origMd.major?.opus?.summary;
|
|
38425
|
+
if (summary) {
|
|
38426
|
+
summary.rich_text_nodes ??= [];
|
|
38427
|
+
summary.rich_text_nodes.unshift({
|
|
38841
38428
|
orig_text: name,
|
|
38842
38429
|
text: name,
|
|
38843
38430
|
type: "topic",
|
|
38844
|
-
rid:
|
|
38431
|
+
rid: origMd.topic.id.toString(),
|
|
38845
38432
|
jump_url: "114514",
|
|
38846
38433
|
style: { "114514": "1919810" }
|
|
38847
38434
|
});
|
|
38848
|
-
|
|
38435
|
+
summary.text = summary.text ? `${name}\n${summary.text}` : name;
|
|
38849
38436
|
}
|
|
38850
38437
|
}
|
|
38851
38438
|
param = {
|
|
@@ -38859,19 +38446,21 @@ var Bilibilipush = class extends Base {
|
|
|
38859
38446
|
frame: data[dynamicId].Dynamic_Data.orig.modules.module_author.pendant.image
|
|
38860
38447
|
};
|
|
38861
38448
|
break;
|
|
38862
|
-
|
|
38863
|
-
|
|
38864
|
-
|
|
38865
|
-
|
|
38866
|
-
|
|
38867
|
-
|
|
38868
|
-
|
|
38449
|
+
}
|
|
38450
|
+
case DynamicType.WORD: {
|
|
38451
|
+
const origMd = data[dynamicId].Dynamic_Data.orig.modules.module_dynamic;
|
|
38452
|
+
if (origMd.topic) {
|
|
38453
|
+
const { name } = origMd.topic;
|
|
38454
|
+
const summary = origMd.major?.opus?.summary;
|
|
38455
|
+
if (summary) {
|
|
38456
|
+
summary.rich_text_nodes ??= [];
|
|
38457
|
+
summary.rich_text_nodes.unshift({
|
|
38869
38458
|
orig_text: name,
|
|
38870
38459
|
text: name,
|
|
38871
38460
|
type: "topic",
|
|
38872
|
-
rid:
|
|
38461
|
+
rid: origMd.topic.id.toString()
|
|
38873
38462
|
});
|
|
38874
|
-
|
|
38463
|
+
summary.text = summary.text ? `${name}\n${summary.text}` : name;
|
|
38875
38464
|
}
|
|
38876
38465
|
}
|
|
38877
38466
|
param = {
|
|
@@ -38883,6 +38472,7 @@ var Bilibilipush = class extends Base {
|
|
|
38883
38472
|
frame: data[dynamicId].Dynamic_Data.orig.modules.module_author.pendant.image
|
|
38884
38473
|
};
|
|
38885
38474
|
break;
|
|
38475
|
+
}
|
|
38886
38476
|
case DynamicType.LIVE_RCMD: {
|
|
38887
38477
|
const liveData = JSON.parse(data[dynamicId].Dynamic_Data.orig.modules.module_dynamic.major.live_rcmd.content);
|
|
38888
38478
|
param = {
|
|
@@ -38923,7 +38513,8 @@ var Bilibilipush = class extends Base {
|
|
|
38923
38513
|
decoration_card: generateDecorationCard(data[dynamicId].Dynamic_Data.modules.module_author.decoration_card),
|
|
38924
38514
|
render_time: TimeFormatter.now(),
|
|
38925
38515
|
original_content: { [data[dynamicId].Dynamic_Data.orig.type]: param },
|
|
38926
|
-
imgList: imgList.length > 0 ? imgList : null
|
|
38516
|
+
imgList: imgList.length > 0 ? imgList : null,
|
|
38517
|
+
dynamic_id: dynamicId
|
|
38927
38518
|
});
|
|
38928
38519
|
break;
|
|
38929
38520
|
}
|
|
@@ -40550,13 +40141,7 @@ var DouYin = class DouYin extends Base {
|
|
|
40550
40141
|
分享链接:${logger.green(VideoData.data.aweme_detail.share_url)}
|
|
40551
40142
|
`);
|
|
40552
40143
|
video.bit_rate = douyinProcessVideos(video.bit_rate, Config.douyin.videoQuality, Config.douyin.maxAutoVideoSize);
|
|
40553
|
-
g_video_url =
|
|
40554
|
-
url: video.bit_rate[0].play_addr.url_list[2],
|
|
40555
|
-
headers: {
|
|
40556
|
-
...this.headers,
|
|
40557
|
-
Referer: video.bit_rate[0].play_addr.url_list[0]
|
|
40558
|
-
}
|
|
40559
|
-
}).getLongLink();
|
|
40144
|
+
g_video_url = video.bit_rate[0].play_addr.url_list[0] ?? video.bit_rate[0].play_addr.url_list[1] ?? video.bit_rate[0].play_addr.url_list[2];
|
|
40560
40145
|
g_title = VideoData.data.aweme_detail.preview_title.substring(0, 80).replace(/[\\/:*?"<>|\r\n]/g, " ");
|
|
40561
40146
|
mp4size = (video.bit_rate[0].play_addr.data_size / (1024 * 1024)).toFixed(2);
|
|
40562
40147
|
}
|
|
@@ -40641,7 +40226,7 @@ var DouYin = class DouYin extends Base {
|
|
|
40641
40226
|
const img = await Render(this.e, "douyin/comment", {
|
|
40642
40227
|
Type: isArticle ? "文章" : isVideo ? "视频" : this.is_slides ? "合辑" : "图集",
|
|
40643
40228
|
CommentsData: douyinCommentsRes.CommentsData,
|
|
40644
|
-
CommentLength:
|
|
40229
|
+
CommentLength: douyinCommentsRes.CommentsData.length ?? 0,
|
|
40645
40230
|
share_url: isVideo ? `https://aweme.snssdk.com/aweme/v1/play/?video_id=${aweme.video.play_addr.uri}&ratio=1080p&line=0` : aweme.share_url,
|
|
40646
40231
|
VideoSize: mp4size,
|
|
40647
40232
|
VideoFPS: FPS,
|
|
@@ -40649,7 +40234,7 @@ var DouYin = class DouYin extends Base {
|
|
|
40649
40234
|
Region: aweme.region,
|
|
40650
40235
|
suggestWrod: suggest,
|
|
40651
40236
|
Resolution: isVideo && video ? `${video.bit_rate[0].play_addr.width} x ${video.bit_rate[0].play_addr.height}` : null,
|
|
40652
|
-
maxDepth:
|
|
40237
|
+
maxDepth: 6,
|
|
40653
40238
|
Author: aweme.author.nickname,
|
|
40654
40239
|
AuthorAvatar: aweme.author.avatar_thumb.url_list[0],
|
|
40655
40240
|
Statistics: {
|
|
@@ -47011,19 +46596,6 @@ var douyinConfigSchema = {
|
|
|
47011
46596
|
max: 20
|
|
47012
46597
|
}]
|
|
47013
46598
|
},
|
|
47014
|
-
{
|
|
47015
|
-
key: "subCommentDepth",
|
|
47016
|
-
type: "input",
|
|
47017
|
-
inputType: "number",
|
|
47018
|
-
label: "次级评论解析深度",
|
|
47019
|
-
description: "次级评论解析深度",
|
|
47020
|
-
disabled: $or($not("switch"), $not($includes("sendContent", "comment"))),
|
|
47021
|
-
rules: [{
|
|
47022
|
-
min: 1,
|
|
47023
|
-
max: 6,
|
|
47024
|
-
error: "嵌套深度最高只有 6 层,超过 6 层的评论会被强制截断"
|
|
47025
|
-
}]
|
|
47026
|
-
},
|
|
47027
46599
|
{
|
|
47028
46600
|
key: "commentImageCollection",
|
|
47029
46601
|
type: "switch",
|
|
@@ -47031,13 +46603,6 @@ var douyinConfigSchema = {
|
|
|
47031
46603
|
description: "开启后将收集评论区的图片,以合并转发的形式返回",
|
|
47032
46604
|
disabled: $or($not("switch"), $not($includes("sendContent", "comment")))
|
|
47033
46605
|
},
|
|
47034
|
-
{
|
|
47035
|
-
key: "realCommentCount",
|
|
47036
|
-
type: "switch",
|
|
47037
|
-
label: "显示真实评论数量",
|
|
47038
|
-
description: "评论图是否显示真实评论数量,关闭则显示解析到的评论数量",
|
|
47039
|
-
disabled: $or($not("switch"), $not($includes("sendContent", "comment")))
|
|
47040
|
-
},
|
|
47041
46606
|
{
|
|
47042
46607
|
type: "divider",
|
|
47043
46608
|
title: "渲染与画质设置"
|
|
@@ -48212,4 +47777,4 @@ mkdirSync(`${karinPathBase}/${Root.pluginName}/data`);
|
|
|
48212
47777
|
mkdirSync(Common.tempDri.images);
|
|
48213
47778
|
mkdirSync(Common.tempDri.video);
|
|
48214
47779
|
//#endregion
|
|
48215
|
-
export {
|
|
47780
|
+
export { createLinkCardNode as $, xiaohongshuSign as $n, emitLogDebug as $r, CommentType as $t, template_default as A, getHeadersAndData as An, BilibiliBv2AvParamsSchema as Ar, KuaishouApiRoutes as At, DouyinDBBase as B, douyinApiUrls as Bn, BilibiliQrcodeParamsSchema as Br, DouyinInternalMethods as Bt, help as C, qtparam as Cn, BilibiliApplyCaptchaParamsSchema as Cr, CreateApp as Ct, removeOldFiles as D, logger$2 as Dn, BilibiliAv2BvParamsSchema as Dr, BilibiliMethodMapping as Dt, dylogin as E, logMiddleware as En, BilibiliArticleParamsSchema as Er, BilibiliApiRoutes as Et, getBilibiliDB as F, kuaishouFetcher$1 as Fn, BilibiliDynamicParamsSchema as Fr, getEnglishMethodName as Ft, createAtNode as G, createSuccessResponse$1 as Gn, BilibiliVideoDownloadParamsSchema as Gr, MethodMaps as Gt, reactServerRender as H, bilibiliFetcher$1 as Hn, BilibiliUserParamsSchema as Hr, KuaishouFetcherMethods as Ht, getDouyinDB as I, kuaishouSign as In, BilibiliEmojiParamsSchema as Ir, BilibiliFetcherMethods as It, createEmojiNode as J, validateKuaishouParams as Jn, emitApiError as Jr, XiaohongshuMethodToFetcher as Jt, createBlockquoteNode as K, validateBilibiliParams as Kn, BilibiliVideoParamsSchema as Kr, XiaohongshuFetcherMethods as Kt, getStatisticsDB as L, kuaishouApiUrls as Ln, BilibiliLiveParamsSchema as Lr, BilibiliInternalMethods as Lt, bilibiliDBInstance as M, createBoundXiaohongshuFetcher as Mn, BilibiliCommentParamsSchema as Mr, XiaohongshuApiRoutes as Mt, cleanOldDynamicCache as N, xiaohongshuFetcher$1 as Nn, BilibiliCommentReplyParamsSchema as Nr, XiaohongshuMethodMapping as Nt, task as O, fetchData as On, BilibiliBangumiInfoParamsSchema as Or, DouyinApiRoutes as Ot, douyinDBInstance as P, createBoundKuaishouFetcher as Pn, BilibiliDanmakuParamsSchema as Pr, getApiRoute as Pt, createLineBreakNode as Q, xiaohongshuApiUrls as Qn, emitLog as Qr, MajorType as Qt, initAllDatabases as R, douyinFetcher$1 as Rn, BilibiliLoginParamsSchema as Rr, BilibiliMethodToFetcher as Rt, testDouyinPush as S, bv2av as Sn, DouyinWorkParamsSchema as Sr, softFetch as St, biLogin as T, initLogger as Tn, BilibiliArticleInfoParamsSchema as Tr, amagiClient$1 as Tt, renderVideoPreviewPage as U, createBoundBilibiliFetcher as Un, BilibiliValidateCaptchaParamsSchema as Ur, KuaishouInternalMethods as Ut, BilibiliDBBase as V, douyinSign as Vn, BilibiliQrcodeStatusParamsSchema as Vr, DouyinMethodToFetcher as Vt, renderRichTextToReact as W, createErrorResponse as Wn, BilibiliValidationSchemas as Wr, KuaishouMethodToFetcher as Wt, createHorizontalRuleNode as X, XiaohongshuMethodRoutes as Xn, emitHttpRequest as Xr, DynamicType as Xt, createHeadingNode as Y, validateXiaohongshuParams as Yn, emitApiSuccess as Yr, toFetcherMethod as Yt, createImageNode as Z, XiaohongshuValidationSchemas as Zn, emitHttpResponse as Zr, AdditionalType as Zt, douyinPushList as _, handleError as _n, DouyinQrcodeParamsSchema as _r, amagiClient as _t, bilibiliAPP as a, emitNetworkRetry as ai, kuaishouUtils as an, KuaishouUserWorkListParamsSchema as ar, createRichTextDocument as at, setbiliPush as b, parseDmSegMobileReply as bn, DouyinUserParamsSchema as br, kuaishouFetcher as bt, prefix as c, bilibiliApiUrls as ci, kuaishou$1 as cn, DouyinCommentParamsSchema as cr, createTopicNode as ct, groupStatistics as d, getKuaishouData as di, createBoundDouyinApi as dn, DouyinEmojiListParamsSchema as dr, createWebLinkNode as dt, emitLogError as ei, createAmagiClient as en, KuaishouCommentParamsSchema as er, createListItemNode as et, qrLogin as f, Root as fi, douyin$1 as fn, DouyinEmojiProParamsSchema as fr, extractRichTextPlainText as ft, douyinPush as g, ValidationError as gn, DouyinMusicParamsSchema as gr, SOFT_ERROR_CODES as gt, changeBotID as h, ApiError as hn, DouyinMethodRoutes as hr, AmagiError as ht, update as i, emitNetworkError as ii, xiaohongshu$1 as in, KuaishouUserProfileParamsSchema as ir, createParagraphNode as it, webConfig as j, isNetworkErrorResult as jn, BilibiliColumnInfoParamsSchema as jr, KuaishouMethodMapping as jt, testWrapWithErrorHandler as k, fetchResponse as kn, BilibiliBangumiStreamParamsSchema as kr, DouyinMethodMapping as kt, xiaohongshuAPP as l, getBilibiliData as li, douyinUtils as ln, DouyinCommentReplyParamsSchema as lr, createViewPictureNode as lt, bilibiliPushList as m, createBilibiliRoutes as mn, DouyinLiveRoomParamsSchema as mr, AmagiBase as mt, kkkUpdateCommand as n, emitLogMark as ni, createXiaohongshuRoutes as nn, KuaishouLiveRoomInfoParamsSchema as nr, createLotteryNode as nt, douyinAPP as o, bilibili$1 as oi, createKuaishouRoutes as on, KuaishouValidationSchemas as or, createSearchKeywordNode as ot, bilibiliPush as p, bilibiliUtils as pn, DouyinHotWordsParamsSchema as pr, normalizeRichTextNodes as pt, createCodeBlockNode as q, validateDouyinParams as qn, amagiEvents as qr, XiaohongshuInternalMethods as qt, kkkUpdateTest as r, emitLogWarn as ri, createBoundXiaohongshuApi as rn, KuaishouMethodRoutes as rr, createMentionNode as rt, kuaishouAPP as s, createBoundBilibiliApi as si, createBoundKuaishouApi as sn, KuaishouVideoParamsSchema as sr, createTextNode as st, kkkUpdate as t, emitLogInfo as ti, xiaohongshuUtils as tn, KuaishouEmojiParamsSchema as tr, createListNode as tt, globalStatistics as u, getDouyinData as ui, createDouyinRoutes as un, DouyinDanmakuParamsSchema as ur, createVoteNode as ut, forcePush as v, bilibiliErrorCodeMap as vn, DouyinSearchParamsSchema as vr, bilibiliFetcher as vt, version as w, httpLogger as wn, BilibiliArticleCardParamsSchema as wr, amagi as wt, setdyPush as x, av2bv as xn, DouyinValidationSchemas as xr, reloadAmagiConfig as xt, globalIgnore as y, wbi_sign as yn, DouyinUserListParamsSchema as yr, douyinFetcher as yt, StatisticsDBBase as z, createBoundDouyinFetcher as zn, BilibiliMethodRoutes as zr, DouyinFetcherMethods as zt };
|