koishi-plugin-kkk 1.0.0
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 +57 -0
- package/LICENSE +674 -0
- package/README.md +98 -0
- package/assets/web/assets/CronEditor-CYgFpX-g.js +1 -0
- package/assets/web/assets/DesktopLayout-iI43ij11.js +1 -0
- package/assets/web/assets/MobileLayout-CziU8MCR.js +1 -0
- package/assets/web/assets/ThemeSwitch-DFohhwd9.js +1 -0
- package/assets/web/assets/index-BRROK0vh.js +47 -0
- package/assets/web/assets/index-Dj-StEiS.css +2 -0
- package/assets/web/assets/separator-CxcFlCzz.js +1 -0
- package/assets/web/favicon.svg +1 -0
- package/assets/web/icons.svg +24 -0
- package/assets/web/index.html +15 -0
- package/assets/webui.html +115 -0
- package/client/index.ts +63 -0
- package/config/default_config/app.yaml +64 -0
- package/config/default_config/bilibili.yaml +116 -0
- package/config/default_config/config.json +157 -0
- package/config/default_config/cookies.yaml +11 -0
- package/config/default_config/douyin.yaml +99 -0
- package/config/default_config/kuaishou.yaml +8 -0
- package/config/default_config/pushlist.yaml +37 -0
- package/config/default_config/request.yaml +22 -0
- package/config/default_config/upload.yaml +50 -0
- package/config/default_config/xiaohongshu.yaml +23 -0
- package/dist/index.js +1 -0
- package/lib/compat/axios.js +23 -0
- package/lib/compat/cron.js +77 -0
- package/lib/compat/esm.js +15 -0
- package/lib/compat/express.js +23 -0
- package/lib/compat/heroui.js +12 -0
- package/lib/compat/lodash.js +33 -0
- package/lib/compat/logger.js +118 -0
- package/lib/compat/node-karin.js +1053 -0
- package/lib/compat/phosphor-icons.js +27 -0
- package/lib/compat/qqcard.js +256 -0
- package/lib/compat/root.js +44 -0
- package/lib/compat/runtime.js +87 -0
- package/lib/compat/segment.js +167 -0
- package/lib/compat/sqlite3.js +117 -0
- package/lib/compat/start.js +7 -0
- package/lib/compat/syncConfig.js +65 -0
- package/lib/compat/template-react.js +30 -0
- package/lib/compat/text.js +65 -0
- package/lib/compat/yaml.js +13 -0
- package/lib/configBridge.js +91 -0
- package/lib/index.js +775 -0
- package/lib/karin/app.js +34 -0
- package/lib/karin/apps/__ready.js +9 -0
- package/lib/karin/apps/admin.js +136 -0
- package/lib/karin/apps/help.js +233 -0
- package/lib/karin/apps/push.js +291 -0
- package/lib/karin/apps/qrlogin.js +176 -0
- package/lib/karin/apps/statistics.js +209 -0
- package/lib/karin/apps/testPush.js +247 -0
- package/lib/karin/apps/tools.js +473 -0
- package/lib/karin/apps/update.js +252 -0
- package/lib/karin/index.js +37 -0
- package/lib/karin/module/db/bilibili.js +831 -0
- package/lib/karin/module/db/douyin.js +918 -0
- package/lib/karin/module/db/index.js +165 -0
- package/lib/karin/module/db/migration.js +199 -0
- package/lib/karin/module/db/statistics.js +559 -0
- package/lib/karin/module/index.js +94 -0
- package/lib/karin/module/server/constants/routes.js +48 -0
- package/lib/karin/module/server/controllers/bots.js +230 -0
- package/lib/karin/module/server/controllers/config.js +75 -0
- package/lib/karin/module/server/controllers/video.js +208 -0
- package/lib/karin/module/server/index.js +26 -0
- package/lib/karin/module/server/middlewares/auth.js +133 -0
- package/lib/karin/module/server/routes/amagi.js +57 -0
- package/lib/karin/module/server/routes/api.js +40 -0
- package/lib/karin/module/server/routes/index.js +97 -0
- package/lib/karin/module/server/routes/ssr.js +16 -0
- package/lib/karin/module/server/routes/static.js +43 -0
- package/lib/karin/module/utils/Base.js +403 -0
- package/lib/karin/module/utils/CardParser.js +487 -0
- package/lib/karin/module/utils/Common.js +418 -0
- package/lib/karin/module/utils/Config.js +434 -0
- package/lib/karin/module/utils/EmojiReaction.js +242 -0
- package/lib/karin/module/utils/ErrorHandler/handler.js +114 -0
- package/lib/karin/module/utils/ErrorHandler/index.js +55 -0
- package/lib/karin/module/utils/ErrorHandler/render.js +182 -0
- package/lib/karin/module/utils/ErrorHandler/sender.js +206 -0
- package/lib/karin/module/utils/ErrorHandler/strategy.js +41 -0
- package/lib/karin/module/utils/ErrorHandler/types.js +2 -0
- package/lib/karin/module/utils/ErrorHandler/utils.js +108 -0
- package/lib/karin/module/utils/FFmpeg.js +298 -0
- package/lib/karin/module/utils/ImageHelper.js +91 -0
- package/lib/karin/module/utils/ImageSlice.js +429 -0
- package/lib/karin/module/utils/MotionPhoto.js +250 -0
- package/lib/karin/module/utils/Network/Downloader.js +413 -0
- package/lib/karin/module/utils/Network/ImageDownloader.js +250 -0
- package/lib/karin/module/utils/Network/Network.js +332 -0
- package/lib/karin/module/utils/Network/ThrottleStream.js +71 -0
- package/lib/karin/module/utils/Network/constants.js +129 -0
- package/lib/karin/module/utils/Network/helpers.js +174 -0
- package/lib/karin/module/utils/Network/index.js +34 -0
- package/lib/karin/module/utils/Network/types.js +12 -0
- package/lib/karin/module/utils/Networks.js +17 -0
- package/lib/karin/module/utils/ParseLock.js +34 -0
- package/lib/karin/module/utils/ParseOverride.js +88 -0
- package/lib/karin/module/utils/QqCardResolve.js +114 -0
- package/lib/karin/module/utils/QqPanel.js +879 -0
- package/lib/karin/module/utils/Render/coverTheme.js +256 -0
- package/lib/karin/module/utils/Render/index.js +582 -0
- package/lib/karin/module/utils/amagiClient.js +338 -0
- package/lib/karin/module/utils/avatar.js +201 -0
- package/lib/karin/module/utils/bot.js +141 -0
- package/lib/karin/module/utils/build-metadata.js +50 -0
- package/lib/karin/module/utils/changelog.js +166 -0
- package/lib/karin/module/utils/index.js +26 -0
- package/lib/karin/module/utils/loginSession.js +259 -0
- package/lib/karin/module/utils/parseTip.js +93 -0
- package/lib/karin/module/utils/runtime-report.js +140 -0
- package/lib/karin/module/utils/semver.js +72 -0
- package/lib/karin/module/utils/statisticsAggregate.js +415 -0
- package/lib/karin/platform/bilibili/bilibili.js +1805 -0
- package/lib/karin/platform/bilibili/comments.js +294 -0
- package/lib/karin/platform/bilibili/danmaku.js +555 -0
- package/lib/karin/platform/bilibili/dynamic-text.js +827 -0
- package/lib/karin/platform/bilibili/genParams.js +37 -0
- package/lib/karin/platform/bilibili/getID.js +159 -0
- package/lib/karin/platform/bilibili/index.js +24 -0
- package/lib/karin/platform/bilibili/live-status.js +40 -0
- package/lib/karin/platform/bilibili/login.js +132 -0
- package/lib/karin/platform/bilibili/push.js +1397 -0
- package/lib/karin/platform/bilibili/riskControl.js +133 -0
- package/lib/karin/platform/bilibili/search.js +299 -0
- package/lib/karin/platform/common/danmaku-types.js +12 -0
- package/lib/karin/platform/douyin/comments.js +310 -0
- package/lib/karin/platform/douyin/danmaku.js +893 -0
- package/lib/karin/platform/douyin/douyin.js +1145 -0
- package/lib/karin/platform/douyin/getID.js +94 -0
- package/lib/karin/platform/douyin/index.js +24 -0
- package/lib/karin/platform/douyin/login.js +230 -0
- package/lib/karin/platform/douyin/push/favorite.js +75 -0
- package/lib/karin/platform/douyin/push/index.js +21 -0
- package/lib/karin/platform/douyin/push/live.js +69 -0
- package/lib/karin/platform/douyin/push/post.js +60 -0
- package/lib/karin/platform/douyin/push/recommend.js +74 -0
- package/lib/karin/platform/douyin/push/render.js +621 -0
- package/lib/karin/platform/douyin/push/types.js +2 -0
- package/lib/karin/platform/douyin/push.js +1128 -0
- package/lib/karin/platform/douyin/types.js +13 -0
- package/lib/karin/platform/douyin/videoQuality.js +222 -0
- package/lib/karin/platform/douyin/workType.js +182 -0
- package/lib/karin/platform/index.js +20 -0
- package/lib/karin/platform/kuaishou/comments.js +91 -0
- package/lib/karin/platform/kuaishou/getID.js +43 -0
- package/lib/karin/platform/kuaishou/getdata.js +41 -0
- package/lib/karin/platform/kuaishou/index.js +20 -0
- package/lib/karin/platform/kuaishou/kuaishou.js +122 -0
- package/lib/karin/platform/xiaohongshu/comments.js +162 -0
- package/lib/karin/platform/xiaohongshu/getID.js +129 -0
- package/lib/karin/platform/xiaohongshu/index.js +18 -0
- package/lib/karin/platform/xiaohongshu/xiaohongshu.js +643 -0
- package/lib/karin/root.js +73 -0
- package/lib/karin/setup.js +99 -0
- package/lib/karin/types/config/amagi.js +2 -0
- package/lib/karin/types/config/app.js +2 -0
- package/lib/karin/types/config/bilibili.js +2 -0
- package/lib/karin/types/config/cookies.js +2 -0
- package/lib/karin/types/config/douyin.js +2 -0
- package/lib/karin/types/config/index.js +2 -0
- package/lib/karin/types/config/kuaishou.js +2 -0
- package/lib/karin/types/config/pushlist.js +2 -0
- package/lib/karin/types/config/request.js +2 -0
- package/lib/karin/types/config/upload.js +2 -0
- package/lib/karin/types/config/xiaohongshu.js +2 -0
- package/lib/karin/types/datatypes.js +2 -0
- package/lib/karin/types/index.js +18 -0
- package/lib/karin/types/netrorks/NetworksConfigType.js +2 -0
- package/lib/karin/types/netrorks/index.js +17 -0
- package/lib/karin/web.config.js +49 -0
- package/lib/ktr/registry.js +82 -0
- package/lib/ktr/template/_preview/components/PreviewInfoCard.js +10 -0
- package/lib/ktr/template/_preview/components/PreviewLayout.js +10 -0
- package/lib/ktr/template/_preview/components/PreviewVideoCard.js +8 -0
- package/lib/ktr/template/_preview/render.js +142 -0
- package/lib/ktr/template/_preview/types.js +2 -0
- package/lib/ktr/template/_preview/utils/status.js +31 -0
- package/lib/ktr/template/_preview/utils/time.js +12 -0
- package/lib/ktr/template/bilibili/bangumi/components/bangumi.js +127 -0
- package/lib/ktr/template/bilibili/bangumi/components/types.js +2 -0
- package/lib/ktr/template/bilibili/bangumi/index.js +12 -0
- package/lib/ktr/template/bilibili/comment/components/Comment.js +193 -0
- package/lib/ktr/template/bilibili/comment/components/types.js +2 -0
- package/lib/ktr/template/bilibili/comment/index.js +10 -0
- package/lib/ktr/template/bilibili/components/Icons.js +66 -0
- package/lib/ktr/template/bilibili/components/shared.js +93 -0
- package/lib/ktr/template/bilibili/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/components/DYNAMIC_TYPE_ARTICLE.js +66 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/components/DYNAMIC_TYPE_AV.js +87 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/components/DYNAMIC_TYPE_DRAW.js +93 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/components/DYNAMIC_TYPE_FORWARD.js +132 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/components/DYNAMIC_TYPE_LIVE_RCMD.js +84 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/components/DYNAMIC_TYPE_WORD.js +38 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/components/types.js +2 -0
- package/lib/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/index.js +10 -0
- package/lib/ktr/template/bilibili/dynamic/components/AdditionalCard.js +59 -0
- package/lib/ktr/template/bilibili/dynamic/components/CommonComponents.js +30 -0
- package/lib/ktr/template/bilibili/dynamic/types.js +2 -0
- package/lib/ktr/template/bilibili/qrcodeImg/components/qrcodeImg.js +48 -0
- package/lib/ktr/template/bilibili/qrcodeImg/components/types.js +3 -0
- package/lib/ktr/template/bilibili/qrcodeImg/index.js +10 -0
- package/lib/ktr/template/bilibili/userlist/components/UserList.js +53 -0
- package/lib/ktr/template/bilibili/userlist/components/types.js +3 -0
- package/lib/ktr/template/bilibili/userlist/index.js +13 -0
- package/lib/ktr/template/bilibili/videoInfo/components/types.js +2 -0
- package/lib/ktr/template/bilibili/videoInfo/components/videoInfo.js +62 -0
- package/lib/ktr/template/bilibili/videoInfo/index.js +10 -0
- package/lib/ktr/template/components/AmbientCover.js +36 -0
- package/lib/ktr/template/components/DefaultLayout.js +33 -0
- package/lib/ktr/template/components/GlowImage.js +276 -0
- package/lib/ktr/template/components/QRCodeWithAvatar.js +34 -0
- package/lib/ktr/template/components/RolldownLogo.js +6 -0
- package/lib/ktr/template/components/ViteLogo.js +6 -0
- package/lib/ktr/template/components/iconRegistry.js +173 -0
- package/lib/ktr/template/douyin/article-work/components/ArticleWork.js +99 -0
- package/lib/ktr/template/douyin/article-work/components/types.js +3 -0
- package/lib/ktr/template/douyin/article-work/index.js +10 -0
- package/lib/ktr/template/douyin/comment/components/Comment.js +189 -0
- package/lib/ktr/template/douyin/comment/components/types.js +2 -0
- package/lib/ktr/template/douyin/comment/index.js +10 -0
- package/lib/ktr/template/douyin/components/Icons.js +29 -0
- package/lib/ktr/template/douyin/components/types.js +3 -0
- package/lib/ktr/template/douyin/dynamic/components/Dynamic.js +90 -0
- package/lib/ktr/template/douyin/dynamic/components/types.js +3 -0
- package/lib/ktr/template/douyin/dynamic/index.js +10 -0
- package/lib/ktr/template/douyin/favorite-list/components/FavoriteList.js +30 -0
- package/lib/ktr/template/douyin/favorite-list/components/types.js +3 -0
- package/lib/ktr/template/douyin/favorite-list/index.js +10 -0
- package/lib/ktr/template/douyin/image-work/components/ImageWork.js +136 -0
- package/lib/ktr/template/douyin/image-work/components/types.js +2 -0
- package/lib/ktr/template/douyin/image-work/index.js +10 -0
- package/lib/ktr/template/douyin/live/components/Live.js +51 -0
- package/lib/ktr/template/douyin/live/components/types.js +3 -0
- package/lib/ktr/template/douyin/live/index.js +10 -0
- package/lib/ktr/template/douyin/musicinfo/components/MusicInfo.js +60 -0
- package/lib/ktr/template/douyin/musicinfo/components/types.js +3 -0
- package/lib/ktr/template/douyin/musicinfo/index.js +10 -0
- package/lib/ktr/template/douyin/qrcodeImg/components/qrcodeImg.js +39 -0
- package/lib/ktr/template/douyin/qrcodeImg/components/types.js +3 -0
- package/lib/ktr/template/douyin/qrcodeImg/index.js +9 -0
- package/lib/ktr/template/douyin/recommend-list/components/RecommendList.js +30 -0
- package/lib/ktr/template/douyin/recommend-list/components/types.js +3 -0
- package/lib/ktr/template/douyin/recommend-list/index.js +10 -0
- package/lib/ktr/template/douyin/user_profile/components/UserVideoList.js +54 -0
- package/lib/ktr/template/douyin/user_profile/components/types.js +3 -0
- package/lib/ktr/template/douyin/user_profile/index.js +9 -0
- package/lib/ktr/template/douyin/userlist/components/UserList.js +50 -0
- package/lib/ktr/template/douyin/userlist/components/types.js +3 -0
- package/lib/ktr/template/douyin/userlist/index.js +13 -0
- package/lib/ktr/template/douyin/video-work/components/VideoWork.js +127 -0
- package/lib/ktr/template/douyin/video-work/components/types.js +2 -0
- package/lib/ktr/template/douyin/video-work/index.js +10 -0
- package/lib/ktr/template/kuaishou/comment/components/Comment.js +88 -0
- package/lib/ktr/template/kuaishou/comment/components/types.js +2 -0
- package/lib/ktr/template/kuaishou/comment/index.js +10 -0
- package/lib/ktr/template/other/changelog/components/changelog.js +117 -0
- package/lib/ktr/template/other/changelog/components/types.js +3 -0
- package/lib/ktr/template/other/changelog/index.js +9 -0
- package/lib/ktr/template/other/handlerError/components/errorTitles.js +227 -0
- package/lib/ktr/template/other/handlerError/components/handlerError.js +392 -0
- package/lib/ktr/template/other/handlerError/components/stackHighlight.js +109 -0
- package/lib/ktr/template/other/handlerError/components/types.js +2 -0
- package/lib/ktr/template/other/handlerError/index.js +9 -0
- package/lib/ktr/template/other/help/components/Help.js +79 -0
- package/lib/ktr/template/other/help/components/types.js +3 -0
- package/lib/ktr/template/other/help/index.js +12 -0
- package/lib/ktr/template/other/live-photo-tip/components/LivePhotoTip.js +80 -0
- package/lib/ktr/template/other/live-photo-tip/components/types.js +3 -0
- package/lib/ktr/template/other/live-photo-tip/index.js +9 -0
- package/lib/ktr/template/other/qrlogin/components/qrlogin.js +58 -0
- package/lib/ktr/template/other/qrlogin/components/types.js +3 -0
- package/lib/ktr/template/other/qrlogin/index.js +9 -0
- package/lib/ktr/template/other/runtime/components/runtime.js +101 -0
- package/lib/ktr/template/other/runtime/components/types.js +3 -0
- package/lib/ktr/template/other/runtime/index.js +9 -0
- package/lib/ktr/template/other/version_warning/components/VersionWarning.js +38 -0
- package/lib/ktr/template/other/version_warning/components/types.js +3 -0
- package/lib/ktr/template/other/version_warning/index.js +9 -0
- package/lib/ktr/template/statistics/components/BoxplotGuide.js +17 -0
- package/lib/ktr/template/statistics/components/ChartCard.js +15 -0
- package/lib/ktr/template/statistics/components/KpiCard.js +14 -0
- package/lib/ktr/template/statistics/components/PlatformTable.js +20 -0
- package/lib/ktr/template/statistics/components/RankList.js +61 -0
- package/lib/ktr/template/statistics/components/SSRChart.js +22 -0
- package/lib/ktr/template/statistics/components/chartPresets.js +630 -0
- package/lib/ktr/template/statistics/components/chartTheme.js +226 -0
- package/lib/ktr/template/statistics/components/format.js +38 -0
- package/lib/ktr/template/statistics/components/types.js +9 -0
- package/lib/ktr/template/statistics/global/components/GlobalStatistics.js +246 -0
- package/lib/ktr/template/statistics/global/components/types.js +3 -0
- package/lib/ktr/template/statistics/global/index.js +9 -0
- package/lib/ktr/template/statistics/group/components/GroupStatistics.js +181 -0
- package/lib/ktr/template/statistics/group/components/types.js +3 -0
- package/lib/ktr/template/statistics/group/index.js +9 -0
- package/lib/ktr/template/types/ctx.js +2 -0
- package/lib/ktr/template/xiaohongshu/comment/components/Comment.js +99 -0
- package/lib/ktr/template/xiaohongshu/comment/components/types.js +3 -0
- package/lib/ktr/template/xiaohongshu/comment/index.js +9 -0
- package/lib/ktr/template/xiaohongshu/noteInfo/components/noteInfo.js +93 -0
- package/lib/ktr/template/xiaohongshu/noteInfo/components/types.js +2 -0
- package/lib/ktr/template/xiaohongshu/noteInfo/index.js +9 -0
- package/lib/ktr/utils/QRCodeAvatar.js +99 -0
- package/lib/ktr/utils/QRcode.js +56 -0
- package/lib/ktr/utils/avatarProxy.js +45 -0
- package/lib/ktr/utils/cn.js +11 -0
- package/lib/ktr/utils/theme.js +12 -0
- package/lib/qqFields.json +75 -0
- package/lib/qqOptions.js +44 -0
- package/lib/richtext/index.js +25 -0
- package/lib/richtext/parse/index.js +232 -0
- package/lib/richtext/react/cn.js +11 -0
- package/lib/richtext/react/index.js +221 -0
- package/lib/richtext/types.js +2 -0
- package/lib/schema.js +352 -0
- package/lib/webui.js +341 -0
- package/package.json +88 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_BV.svg +1 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_GOODS.svg +1 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_LOTTERY.svg +1 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_VIEW_PICTURE.svg +1 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_VOTE.svg +1 -0
- package/resources/image/bilibili/RICH_TEXT_NODE_TYPE/RICH_TEXT_NODE_TYPE_WEB.svg +1 -0
- package/resources/image/bilibili/bilibili-dark.png +0 -0
- package/resources/image/bilibili/bilibili-light.png +0 -0
- package/resources/image/bilibili/bilibili.png +0 -0
- package/resources/image/bilibili/id-dark.svg +1 -0
- package/resources/image/bilibili/id-light.svg +1 -0
- package/resources/image/bilibili/level/lv0.svg +1 -0
- package/resources/image/bilibili/level/lv1.svg +1 -0
- package/resources/image/bilibili/level/lv2.svg +1 -0
- package/resources/image/bilibili/level/lv3.svg +1 -0
- package/resources/image/bilibili/level/lv4.svg +1 -0
- package/resources/image/bilibili/level/lv5.svg +1 -0
- package/resources/image/bilibili/level/lv6.svg +1 -0
- package/resources/image/bilibili/level/lv7.svg +1 -0
- package/resources/image/bilibili/like-dark.svg +6 -0
- package/resources/image/bilibili/like-light.svg +6 -0
- package/resources/image/bilibili/play.svg +28 -0
- package/resources/image/bilibili/res-local1.png +0 -0
- package/resources/image/bilibili/up_pb.svg +1 -0
- package/resources/image/bilibili//347/233/264/346/222/255/344/270/255.png +0 -0
- package/resources/image/douyin/douyin.png +0 -0
- package/resources/image/douyin/dylogo-dark.svg +23 -0
- package/resources/image/douyin/dylogo-light.svg +38 -0
- package/resources/image/douyin/search-dark.svg +1 -0
- package/resources/image/douyin/search-light.svg +3 -0
- package/resources/image/douyin//346/212/226/351/237/263-/347/233/264/346/222/255/344/270/255.png +0 -0
- package/resources/image/frame-logo.png +0 -0
- package/resources/image/kuaishou/logo.png +0 -0
- package/resources/image/other/handlerError/Milky.png +0 -0
- package/resources/image/other/handlerError/chronocat.svg +43 -0
- package/resources/image/other/handlerError/conwechat.webp +0 -0
- package/resources/image/other/handlerError/gocq-http.webp +0 -0
- package/resources/image/other/handlerError/lagrange.webp +0 -0
- package/resources/image/other/handlerError/llonebot.webp +0 -0
- package/resources/image/other/handlerError/napcat.webp +0 -0
- package/resources/image/other/handlerError/onebot.png +0 -0
- package/resources/image/other/handlerError/satori.png +0 -0
- package/resources/image/xiaohongshu/logo.png +0 -0
- package/resources/template/style.css +23708 -0
- package/resources/vite.svg +130 -0
- package/scripts/build.mjs +129 -0
- package/scripts/check-schema.cjs +55 -0
- package/scripts/deploy.mjs +78 -0
- package/scripts/make-demo-placeholders.mjs +112 -0
- package/scripts/patch-deps.mjs +46 -0
- package/scripts/patch-webui.mjs +112 -0
- package/scripts/smoke-commands.cjs +39 -0
- package/scripts/smoke-config.cjs +122 -0
- package/scripts/smoke-douyin.cjs +170 -0
- package/scripts/smoke-koishi-commands.cjs +210 -0
- package/scripts/smoke-login.cjs +110 -0
- package/scripts/smoke-parse.cjs +54 -0
- package/scripts/smoke-push-mock.cjs +114 -0
- package/scripts/smoke-push.cjs +104 -0
- package/scripts/smoke-qq.cjs +147 -0
- package/scripts/smoke-qqcard.cjs +108 -0
- package/scripts/smoke-qqpanel.cjs +205 -0
- package/scripts/smoke-render.cjs +106 -0
- package/scripts/smoke-server.cjs +94 -0
- package/src/compat/axios.ts +5 -0
- package/src/compat/cron.ts +86 -0
- package/src/compat/esm.ts +13 -0
- package/src/compat/express.ts +5 -0
- package/src/compat/heroui.tsx +53 -0
- package/src/compat/lodash.ts +32 -0
- package/src/compat/logger.ts +121 -0
- package/src/compat/node-karin.ts +1064 -0
- package/src/compat/phosphor-icons.tsx +25 -0
- package/src/compat/qqcard.ts +251 -0
- package/src/compat/root.ts +44 -0
- package/src/compat/runtime.ts +120 -0
- package/src/compat/segment.ts +161 -0
- package/src/compat/sqlite3.ts +123 -0
- package/src/compat/start.ts +3 -0
- package/src/compat/syncConfig.ts +64 -0
- package/src/compat/template-react.ts +54 -0
- package/src/compat/text.ts +58 -0
- package/src/compat/yaml.ts +6 -0
- package/src/configBridge.ts +94 -0
- package/src/index.ts +769 -0
- package/src/karin/app.ts +1 -0
- package/src/karin/apps/__ready.ts +14 -0
- package/src/karin/apps/admin.ts +127 -0
- package/src/karin/apps/help.ts +228 -0
- package/src/karin/apps/push.ts +327 -0
- package/src/karin/apps/qrlogin.ts +160 -0
- package/src/karin/apps/statistics.ts +203 -0
- package/src/karin/apps/testPush.ts +226 -0
- package/src/karin/apps/tools.ts +510 -0
- package/src/karin/apps/update.ts +239 -0
- package/src/karin/index.ts +9 -0
- package/src/karin/module/db/bilibili.ts +1089 -0
- package/src/karin/module/db/douyin.ts +1218 -0
- package/src/karin/module/db/index.ts +159 -0
- package/src/karin/module/db/migration.ts +249 -0
- package/src/karin/module/db/statistics.ts +817 -0
- package/src/karin/module/index.ts +37 -0
- package/src/karin/module/server/constants/routes.ts +53 -0
- package/src/karin/module/server/controllers/bots.ts +289 -0
- package/src/karin/module/server/controllers/config.ts +85 -0
- package/src/karin/module/server/controllers/video.ts +212 -0
- package/src/karin/module/server/index.ts +11 -0
- package/src/karin/module/server/middlewares/auth.ts +147 -0
- package/src/karin/module/server/routes/amagi.ts +57 -0
- package/src/karin/module/server/routes/api.ts +42 -0
- package/src/karin/module/server/routes/index.ts +68 -0
- package/src/karin/module/server/routes/ssr.ts +14 -0
- package/src/karin/module/server/routes/static.ts +43 -0
- package/src/karin/module/utils/Base.ts +497 -0
- package/src/karin/module/utils/CardParser.ts +503 -0
- package/src/karin/module/utils/Common.ts +448 -0
- package/src/karin/module/utils/Config.ts +443 -0
- package/src/karin/module/utils/EmojiReaction.ts +268 -0
- package/src/karin/module/utils/ErrorHandler/handler.ts +124 -0
- package/src/karin/module/utils/ErrorHandler/index.ts +48 -0
- package/src/karin/module/utils/ErrorHandler/render.ts +180 -0
- package/src/karin/module/utils/ErrorHandler/sender.ts +192 -0
- package/src/karin/module/utils/ErrorHandler/strategy.ts +41 -0
- package/src/karin/module/utils/ErrorHandler/types.ts +122 -0
- package/src/karin/module/utils/ErrorHandler/utils.ts +108 -0
- package/src/karin/module/utils/FFmpeg.ts +357 -0
- package/src/karin/module/utils/ImageHelper.ts +90 -0
- package/src/karin/module/utils/ImageSlice.ts +383 -0
- package/src/karin/module/utils/MotionPhoto.ts +297 -0
- package/src/karin/module/utils/Network/Downloader.ts +481 -0
- package/src/karin/module/utils/Network/ImageDownloader.ts +291 -0
- package/src/karin/module/utils/Network/Network.ts +344 -0
- package/src/karin/module/utils/Network/ThrottleStream.ts +76 -0
- package/src/karin/module/utils/Network/constants.ts +135 -0
- package/src/karin/module/utils/Network/helpers.ts +183 -0
- package/src/karin/module/utils/Network/index.ts +28 -0
- package/src/karin/module/utils/Network/types.ts +46 -0
- package/src/karin/module/utils/Networks.ts +20 -0
- package/src/karin/module/utils/ParseLock.ts +33 -0
- package/src/karin/module/utils/ParseOverride.ts +128 -0
- package/src/karin/module/utils/QqCardResolve.ts +116 -0
- package/src/karin/module/utils/QqPanel.ts +880 -0
- package/src/karin/module/utils/Render/coverTheme.ts +294 -0
- package/src/karin/module/utils/Render/index.ts +574 -0
- package/src/karin/module/utils/amagiClient.ts +368 -0
- package/src/karin/module/utils/avatar.ts +220 -0
- package/src/karin/module/utils/bot.ts +115 -0
- package/src/karin/module/utils/build-metadata.ts +60 -0
- package/src/karin/module/utils/changelog.ts +175 -0
- package/src/karin/module/utils/index.ts +10 -0
- package/src/karin/module/utils/loginSession.ts +291 -0
- package/src/karin/module/utils/parseTip.ts +59 -0
- package/src/karin/module/utils/runtime-report.ts +142 -0
- package/src/karin/module/utils/semver.ts +60 -0
- package/src/karin/module/utils/statisticsAggregate.ts +507 -0
- package/src/karin/platform/bilibili/bilibili.ts +2004 -0
- package/src/karin/platform/bilibili/comments.ts +397 -0
- package/src/karin/platform/bilibili/danmaku.ts +653 -0
- package/src/karin/platform/bilibili/dynamic-text.ts +926 -0
- package/src/karin/platform/bilibili/genParams.ts +30 -0
- package/src/karin/platform/bilibili/getID.ts +163 -0
- package/src/karin/platform/bilibili/index.ts +8 -0
- package/src/karin/platform/bilibili/live-status.ts +36 -0
- package/src/karin/platform/bilibili/login.ts +130 -0
- package/src/karin/platform/bilibili/push.ts +1615 -0
- package/src/karin/platform/bilibili/riskControl.ts +114 -0
- package/src/karin/platform/bilibili/search.ts +305 -0
- package/src/karin/platform/common/danmaku-types.ts +18 -0
- package/src/karin/platform/douyin/comments.ts +404 -0
- package/src/karin/platform/douyin/danmaku.ts +1187 -0
- package/src/karin/platform/douyin/douyin.ts +1244 -0
- package/src/karin/platform/douyin/getID.ts +101 -0
- package/src/karin/platform/douyin/index.ts +8 -0
- package/src/karin/platform/douyin/login.ts +251 -0
- package/src/karin/platform/douyin/push/favorite.ts +97 -0
- package/src/karin/platform/douyin/push/index.ts +5 -0
- package/src/karin/platform/douyin/push/live.ts +86 -0
- package/src/karin/platform/douyin/push/post.ts +75 -0
- package/src/karin/platform/douyin/push/recommend.ts +96 -0
- package/src/karin/platform/douyin/push/render.ts +768 -0
- package/src/karin/platform/douyin/push/types.ts +41 -0
- package/src/karin/platform/douyin/push.ts +1241 -0
- package/src/karin/platform/douyin/types.ts +151 -0
- package/src/karin/platform/douyin/videoQuality.ts +234 -0
- package/src/karin/platform/douyin/workType.ts +238 -0
- package/src/karin/platform/index.ts +4 -0
- package/src/karin/platform/kuaishou/comments.ts +114 -0
- package/src/karin/platform/kuaishou/getID.ts +48 -0
- package/src/karin/platform/kuaishou/getdata.ts +78 -0
- package/src/karin/platform/kuaishou/index.ts +4 -0
- package/src/karin/platform/kuaishou/kuaishou.ts +130 -0
- package/src/karin/platform/xiaohongshu/comments.ts +227 -0
- package/src/karin/platform/xiaohongshu/getID.ts +127 -0
- package/src/karin/platform/xiaohongshu/index.ts +2 -0
- package/src/karin/platform/xiaohongshu/xiaohongshu.ts +733 -0
- package/src/karin/root.ts +78 -0
- package/src/karin/setup.ts +77 -0
- package/src/karin/types/config/amagi.ts +46 -0
- package/src/karin/types/config/app.ts +129 -0
- package/src/karin/types/config/bilibili.ts +121 -0
- package/src/karin/types/config/cookies.ts +11 -0
- package/src/karin/types/config/douyin.ts +93 -0
- package/src/karin/types/config/index.ts +41 -0
- package/src/karin/types/config/kuaishou.ts +10 -0
- package/src/karin/types/config/pushlist.ts +55 -0
- package/src/karin/types/config/request.ts +27 -0
- package/src/karin/types/config/upload.ts +49 -0
- package/src/karin/types/config/xiaohongshu.ts +24 -0
- package/src/karin/types/datatypes.ts +42 -0
- package/src/karin/types/index.ts +4 -0
- package/src/karin/types/netrorks/NetworksConfigType.ts +61 -0
- package/src/karin/types/netrorks/index.ts +1 -0
- package/src/karin/web.config.ts +48 -0
- package/src/ktr/registry.ts +55 -0
- package/src/ktr/template/_preview/components/PreviewInfoCard.tsx +33 -0
- package/src/ktr/template/_preview/components/PreviewLayout.tsx +65 -0
- package/src/ktr/template/_preview/components/PreviewVideoCard.tsx +22 -0
- package/src/ktr/template/_preview/render.ts +158 -0
- package/src/ktr/template/_preview/types.ts +15 -0
- package/src/ktr/template/_preview/utils/status.ts +29 -0
- package/src/ktr/template/_preview/utils/time.ts +8 -0
- package/src/ktr/template/bilibili/bangumi/components/bangumi.tsx +462 -0
- package/src/ktr/template/bilibili/bangumi/components/types.ts +36 -0
- package/src/ktr/template/bilibili/bangumi/index.tsx +9 -0
- package/src/ktr/template/bilibili/comment/components/Comment.tsx +657 -0
- package/src/ktr/template/bilibili/comment/components/types.ts +26 -0
- package/src/ktr/template/bilibili/comment/index.tsx +11 -0
- package/src/ktr/template/bilibili/components/Icons.tsx +209 -0
- package/src/ktr/template/bilibili/components/shared.tsx +162 -0
- package/src/ktr/template/bilibili/components/types.ts +388 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/components/DYNAMIC_TYPE_ARTICLE.tsx +251 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/components/types.ts +67 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_ARTICLE/index.tsx +12 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/components/DYNAMIC_TYPE_AV.tsx +238 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/components/types.ts +39 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_AV/index.tsx +12 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/components/DYNAMIC_TYPE_DRAW.tsx +205 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/components/types.ts +20 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_DRAW/index.tsx +11 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/components/DYNAMIC_TYPE_FORWARD.tsx +348 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/components/types.ts +16 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_FORWARD/index.tsx +12 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/components/DYNAMIC_TYPE_LIVE_RCMD.tsx +264 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/components/types.ts +32 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_LIVE_RCMD/index.tsx +12 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/components/DYNAMIC_TYPE_WORD.tsx +68 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/components/types.ts +14 -0
- package/src/ktr/template/bilibili/dynamic/DYNAMIC_TYPE_WORD/index.tsx +12 -0
- package/src/ktr/template/bilibili/dynamic/components/AdditionalCard.tsx +165 -0
- package/src/ktr/template/bilibili/dynamic/components/CommonComponents.tsx +142 -0
- package/src/ktr/template/bilibili/dynamic/types.ts +382 -0
- package/src/ktr/template/bilibili/qrcodeImg/components/qrcodeImg.tsx +179 -0
- package/src/ktr/template/bilibili/qrcodeImg/components/types.ts +9 -0
- package/src/ktr/template/bilibili/qrcodeImg/index.tsx +12 -0
- package/src/ktr/template/bilibili/userlist/components/UserList.tsx +246 -0
- package/src/ktr/template/bilibili/userlist/components/types.ts +35 -0
- package/src/ktr/template/bilibili/userlist/index.tsx +11 -0
- package/src/ktr/template/bilibili/videoInfo/components/types.ts +28 -0
- package/src/ktr/template/bilibili/videoInfo/components/videoInfo.tsx +217 -0
- package/src/ktr/template/bilibili/videoInfo/index.tsx +12 -0
- package/src/ktr/template/components/AmbientCover.tsx +50 -0
- package/src/ktr/template/components/DefaultLayout.tsx +166 -0
- package/src/ktr/template/components/GlowImage.tsx +572 -0
- package/src/ktr/template/components/QRCodeWithAvatar.tsx +52 -0
- package/src/ktr/template/components/RolldownLogo.tsx +110 -0
- package/src/ktr/template/components/ViteLogo.tsx +134 -0
- package/src/ktr/template/components/iconRegistry.ts +294 -0
- package/src/ktr/template/douyin/article-work/components/ArticleWork.tsx +301 -0
- package/src/ktr/template/douyin/article-work/components/types.ts +53 -0
- package/src/ktr/template/douyin/article-work/index.tsx +12 -0
- package/src/ktr/template/douyin/comment/components/Comment.tsx +612 -0
- package/src/ktr/template/douyin/comment/components/types.ts +85 -0
- package/src/ktr/template/douyin/comment/index.tsx +11 -0
- package/src/ktr/template/douyin/components/Icons.tsx +75 -0
- package/src/ktr/template/douyin/components/types.ts +83 -0
- package/src/ktr/template/douyin/dynamic/components/Dynamic.tsx +283 -0
- package/src/ktr/template/douyin/dynamic/components/types.ts +46 -0
- package/src/ktr/template/douyin/dynamic/index.tsx +11 -0
- package/src/ktr/template/douyin/favorite-list/components/FavoriteList.tsx +201 -0
- package/src/ktr/template/douyin/favorite-list/components/types.ts +38 -0
- package/src/ktr/template/douyin/favorite-list/index.tsx +12 -0
- package/src/ktr/template/douyin/image-work/components/ImageWork.tsx +437 -0
- package/src/ktr/template/douyin/image-work/components/types.ts +78 -0
- package/src/ktr/template/douyin/image-work/index.tsx +11 -0
- package/src/ktr/template/douyin/live/components/Live.tsx +229 -0
- package/src/ktr/template/douyin/live/components/types.ts +47 -0
- package/src/ktr/template/douyin/live/index.tsx +11 -0
- package/src/ktr/template/douyin/musicinfo/components/MusicInfo.tsx +187 -0
- package/src/ktr/template/douyin/musicinfo/components/types.ts +31 -0
- package/src/ktr/template/douyin/musicinfo/index.tsx +11 -0
- package/src/ktr/template/douyin/qrcodeImg/components/qrcodeImg.tsx +170 -0
- package/src/ktr/template/douyin/qrcodeImg/components/types.ts +9 -0
- package/src/ktr/template/douyin/qrcodeImg/index.tsx +9 -0
- package/src/ktr/template/douyin/recommend-list/components/RecommendList.tsx +201 -0
- package/src/ktr/template/douyin/recommend-list/components/types.ts +37 -0
- package/src/ktr/template/douyin/recommend-list/index.tsx +12 -0
- package/src/ktr/template/douyin/user_profile/components/UserVideoList.tsx +225 -0
- package/src/ktr/template/douyin/user_profile/components/types.ts +71 -0
- package/src/ktr/template/douyin/user_profile/index.tsx +9 -0
- package/src/ktr/template/douyin/userlist/components/UserList.tsx +229 -0
- package/src/ktr/template/douyin/userlist/components/types.ts +35 -0
- package/src/ktr/template/douyin/userlist/index.tsx +11 -0
- package/src/ktr/template/douyin/video-work/components/VideoWork.tsx +398 -0
- package/src/ktr/template/douyin/video-work/components/types.ts +80 -0
- package/src/ktr/template/douyin/video-work/index.tsx +11 -0
- package/src/ktr/template/font.css +6071 -0
- package/src/ktr/template/global.d.ts +69 -0
- package/src/ktr/template/kuaishou/comment/components/Comment.tsx +207 -0
- package/src/ktr/template/kuaishou/comment/components/types.ts +47 -0
- package/src/ktr/template/kuaishou/comment/index.tsx +11 -0
- package/src/ktr/template/other/changelog/components/changelog.tsx +411 -0
- package/src/ktr/template/other/changelog/components/types.ts +21 -0
- package/src/ktr/template/other/changelog/index.tsx +9 -0
- package/src/ktr/template/other/handlerError/components/errorTitles.ts +224 -0
- package/src/ktr/template/other/handlerError/components/handlerError.tsx +1076 -0
- package/src/ktr/template/other/handlerError/components/stackHighlight.ts +127 -0
- package/src/ktr/template/other/handlerError/components/types.ts +124 -0
- package/src/ktr/template/other/handlerError/index.tsx +9 -0
- package/src/ktr/template/other/help/components/Help.tsx +249 -0
- package/src/ktr/template/other/help/components/types.ts +47 -0
- package/src/ktr/template/other/help/index.tsx +9 -0
- package/src/ktr/template/other/live-photo-tip/components/LivePhotoTip.tsx +295 -0
- package/src/ktr/template/other/live-photo-tip/components/types.ts +8 -0
- package/src/ktr/template/other/live-photo-tip/index.tsx +9 -0
- package/src/ktr/template/other/qrlogin/components/qrlogin.tsx +295 -0
- package/src/ktr/template/other/qrlogin/components/types.ts +11 -0
- package/src/ktr/template/other/qrlogin/index.tsx +9 -0
- package/src/ktr/template/other/runtime/components/runtime.tsx +347 -0
- package/src/ktr/template/other/runtime/components/types.ts +75 -0
- package/src/ktr/template/other/runtime/index.tsx +9 -0
- package/src/ktr/template/other/version_warning/components/VersionWarning.tsx +392 -0
- package/src/ktr/template/other/version_warning/components/types.ts +8 -0
- package/src/ktr/template/other/version_warning/index.tsx +9 -0
- package/src/ktr/template/statistics/components/BoxplotGuide.tsx +57 -0
- package/src/ktr/template/statistics/components/ChartCard.tsx +40 -0
- package/src/ktr/template/statistics/components/KpiCard.tsx +39 -0
- package/src/ktr/template/statistics/components/PlatformTable.tsx +83 -0
- package/src/ktr/template/statistics/components/RankList.tsx +127 -0
- package/src/ktr/template/statistics/components/SSRChart.tsx +41 -0
- package/src/ktr/template/statistics/components/chartPresets.ts +700 -0
- package/src/ktr/template/statistics/components/chartTheme.ts +234 -0
- package/src/ktr/template/statistics/components/format.ts +33 -0
- package/src/ktr/template/statistics/components/types.ts +92 -0
- package/src/ktr/template/statistics/global/components/GlobalStatistics.tsx +597 -0
- package/src/ktr/template/statistics/global/components/types.ts +138 -0
- package/src/ktr/template/statistics/global/index.tsx +9 -0
- package/src/ktr/template/statistics/group/components/GroupStatistics.tsx +468 -0
- package/src/ktr/template/statistics/group/components/types.ts +113 -0
- package/src/ktr/template/statistics/group/index.tsx +9 -0
- package/src/ktr/template/style.css +65 -0
- package/src/ktr/template/types/ctx.ts +42 -0
- package/src/ktr/template/xiaohongshu/comment/components/Comment.tsx +264 -0
- package/src/ktr/template/xiaohongshu/comment/components/types.ts +119 -0
- package/src/ktr/template/xiaohongshu/comment/index.tsx +9 -0
- package/src/ktr/template/xiaohongshu/noteInfo/components/noteInfo.tsx +271 -0
- package/src/ktr/template/xiaohongshu/noteInfo/components/types.ts +66 -0
- package/src/ktr/template/xiaohongshu/noteInfo/index.tsx +9 -0
- package/src/ktr/utils/QRCodeAvatar.ts +102 -0
- package/src/ktr/utils/QRcode.ts +65 -0
- package/src/ktr/utils/avatarProxy.ts +42 -0
- package/src/ktr/utils/cn.ts +6 -0
- package/src/ktr/utils/theme.ts +10 -0
- package/src/qqFields.json +75 -0
- package/src/qqOptions.ts +64 -0
- package/src/richtext/index.ts +9 -0
- package/src/richtext/parse/index.ts +271 -0
- package/src/richtext/react/cn.ts +6 -0
- package/src/richtext/react/index.tsx +582 -0
- package/src/richtext/types.ts +320 -0
- package/src/schema.ts +372 -0
- package/src/webui.ts +352 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DouyinImageWork = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const richtext_1 = require("../../../../../richtext");
|
|
9
|
+
const react_1 = require("../../../../../compat/phosphor-icons.js");
|
|
10
|
+
const date_fns_1 = require("date-fns");
|
|
11
|
+
const locale_1 = require("date-fns/locale");
|
|
12
|
+
const lucide_react_1 = require("lucide-react");
|
|
13
|
+
const react_2 = __importDefault(require("react"));
|
|
14
|
+
const DefaultLayout_1 = require("../../../components/DefaultLayout");
|
|
15
|
+
const AmbientCover_1 = require("../../../components/AmbientCover");
|
|
16
|
+
const GlowImage_1 = require("../../../components/GlowImage");
|
|
17
|
+
const QRCodeWithAvatar_1 = require("../../../components/QRCodeWithAvatar");
|
|
18
|
+
const cn_1 = require("../../../../utils/cn");
|
|
19
|
+
const theme_1 = require("../../../../utils/theme");
|
|
20
|
+
const Icons_1 = require("../../components/Icons");
|
|
21
|
+
const LivePhotoIcon = ({ size = 28, className }) => ((0, jsx_runtime_1.jsxs)("svg", { width: size, height: size, viewBox: "0 0 100 100", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "50", r: "37", stroke: "currentColor", strokeWidth: "6", strokeDasharray: "2 9", strokeLinecap: "round" }), (0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "50", r: "25", stroke: "currentColor", strokeWidth: "6" }), (0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "50", r: "10", fill: "currentColor" })] }));
|
|
22
|
+
const imageMediaTypeMeta = {
|
|
23
|
+
static: { label: '图片', icon: react_1.ImageIcon },
|
|
24
|
+
live: { label: '实况', icon: LivePhotoIcon },
|
|
25
|
+
clip: { label: '短片', icon: react_1.VideoCameraIcon }
|
|
26
|
+
};
|
|
27
|
+
const getTitleClassName = (titleLength) => {
|
|
28
|
+
if (titleLength > 96)
|
|
29
|
+
return 'text-[42px] leading-[1.34]';
|
|
30
|
+
if (titleLength > 72)
|
|
31
|
+
return 'text-[48px] leading-[1.3]';
|
|
32
|
+
if (titleLength > 48)
|
|
33
|
+
return 'text-[54px] leading-[1.26]';
|
|
34
|
+
return 'text-[62px] leading-[1.18]';
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 多段透明度停靠点用于模拟 smoothstep,让封面从环境柔光进入清晰主体时没有明显的线性渐变拐点。
|
|
38
|
+
*/
|
|
39
|
+
const ambientCoverMask = 'linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.08) 6%, rgba(0,0,0,0.32) 16%, rgba(0,0,0,0.68) 28%, black 42%, black 58%, rgba(0,0,0,0.68) 72%, rgba(0,0,0,0.32) 84%, rgba(0,0,0,0.08) 94%, transparent 100%)';
|
|
40
|
+
const foregroundCoverMask = 'linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 4%, rgba(0,0,0,0.35) 10%, rgba(0,0,0,0.68) 17%, rgba(0,0,0,0.9) 23%, black 30%, black 70%, rgba(0,0,0,0.9) 77%, rgba(0,0,0,0.68) 83%, rgba(0,0,0,0.35) 90%, rgba(0,0,0,0.1) 96%, transparent 100%)';
|
|
41
|
+
const getCoverUrl = (data) => data.image_list.images[0]?.url;
|
|
42
|
+
const DouyinDiffuseBackground = ({ data, ctx }) => {
|
|
43
|
+
const coverUrl = getCoverUrl(data);
|
|
44
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "pointer-events-none absolute inset-0 overflow-hidden select-none", children: [coverUrl && (0, jsx_runtime_1.jsx)(AmbientCover_1.AmbientCover, { src: coverUrl, ctx: ctx }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-[0.35] mix-blend-overlay dark:mix-blend-soft-light", children: (0, jsx_runtime_1.jsxs)("svg", { className: "h-full w-full", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsxs)("filter", { id: "douyinImageWorkNoise", children: [(0, jsx_runtime_1.jsx)("feTurbulence", { type: "fractalNoise", baseFrequency: "0.8", numOctaves: "2", stitchTiles: "stitch" }), (0, jsx_runtime_1.jsx)("feColorMatrix", { type: "saturate", values: "0", result: "gray" }), (0, jsx_runtime_1.jsxs)("feComponentTransfer", { children: [(0, jsx_runtime_1.jsx)("feFuncR", { type: "discrete", tableValues: "0 1" }), (0, jsx_runtime_1.jsx)("feFuncG", { type: "discrete", tableValues: "0 1" }), (0, jsx_runtime_1.jsx)("feFuncB", { type: "discrete", tableValues: "0 1" })] }), (0, jsx_runtime_1.jsx)("feComponentTransfer", { children: (0, jsx_runtime_1.jsx)("feFuncA", { type: "linear", slope: "2", intercept: "-0.5" }) })] }) }), (0, jsx_runtime_1.jsx)("rect", { width: "100%", height: "100%", filter: "url(#douyinImageWorkNoise)", mask: "url(#douyinImageWorkNoiseMask)", fill: "white" })] }) })] }));
|
|
45
|
+
};
|
|
46
|
+
const DouyinPosterHeader = ({ data, ctx }) => {
|
|
47
|
+
const { avater_url, username, create_time, ip_location } = data;
|
|
48
|
+
const dark = (0, theme_1.isDark)(ctx);
|
|
49
|
+
const publishTime = (0, date_fns_1.formatDistanceToNow)((0, date_fns_1.fromUnixTime)(create_time), {
|
|
50
|
+
addSuffix: true,
|
|
51
|
+
locale: locale_1.zhCN
|
|
52
|
+
});
|
|
53
|
+
return ((0, jsx_runtime_1.jsxs)("header", { className: "flex items-start justify-between gap-14", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 items-center gap-6", children: [(0, jsx_runtime_1.jsx)("img", { src: avater_url, alt: "\u5934\u50CF", className: "h-24 w-24 shrink-0 rounded-full object-cover shadow-2xl", referrerPolicy: "no-referrer", crossOrigin: "anonymous" }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "max-w-165 truncate text-[44px] font-black leading-tight text-foreground select-text", children: username }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-3 flex flex-wrap items-center gap-x-5 gap-y-2 text-[30px] text-muted", children: [(0, jsx_runtime_1.jsxs)("span", { className: "inline-flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Clock3, { size: 28 }), (0, jsx_runtime_1.jsx)("span", { className: "select-text", children: publishTime })] }), ip_location && ((0, jsx_runtime_1.jsxs)("span", { className: "inline-flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(react_1.MapPinIcon, { size: 30, weight: "fill" }), (0, jsx_runtime_1.jsx)("span", { className: "select-text", children: ip_location })] }))] })] })] }), (0, jsx_runtime_1.jsx)("img", { src: dark ? '/image/douyin/dylogo-light.svg' : '/image/douyin/dylogo-dark.svg', alt: "\u6296\u97F3", className: "mt-2 h-17 w-auto shrink-0 object-contain opacity-90" })] }));
|
|
54
|
+
};
|
|
55
|
+
const DouyinPosterTitle = ({ data }) => {
|
|
56
|
+
const { title, desc } = data;
|
|
57
|
+
const hasTitle = Boolean(title?.nodes.length);
|
|
58
|
+
const hasDesc = Boolean(desc?.nodes.length);
|
|
59
|
+
const titleLength = title ? (0, richtext_1.extractRichTextPlainText)(title).length : 0;
|
|
60
|
+
const titleClassName = getTitleClassName(titleLength);
|
|
61
|
+
const richTextOptions = {
|
|
62
|
+
hashtag: {
|
|
63
|
+
className: (0, cn_1.cn)('text-inherit opacity-60', !hasTitle && 'text-6xl')
|
|
64
|
+
},
|
|
65
|
+
mention: {
|
|
66
|
+
className: 'text-inherit'
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
if (!hasTitle && !hasDesc) {
|
|
70
|
+
return (0, jsx_runtime_1.jsx)("h1", { className: "mt-14 text-[68px] font-black leading-[1.16] text-foreground select-text", children: "\u6296\u97F3\u56FE\u6587\u4F5C\u54C1" });
|
|
71
|
+
}
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: "mt-13", children: [hasTitle && title && ((0, jsx_runtime_1.jsx)("h1", { className: `${titleClassName} font-bold text-foreground select-text`, style: { wordBreak: 'break-word', overflowWrap: 'break-word' }, children: (0, richtext_1.renderRichTextToReact)(title, richTextOptions) })), hasDesc && ((0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.cn)('mt-7 whitespace-pre-wrap select-text', !hasTitle ? 'text-6xl font-bold' : 'text-5xl font-medium', 'leading-tight'), style: { wordBreak: 'break-word', overflowWrap: 'break-word' }, children: (0, richtext_1.renderRichTextToReact)(desc, richTextOptions) }))] }));
|
|
73
|
+
};
|
|
74
|
+
const DouyinImageCover = ({ data }) => {
|
|
75
|
+
const { image_list, music } = data;
|
|
76
|
+
const cover = image_list.images[0];
|
|
77
|
+
if (!cover?.url)
|
|
78
|
+
return null;
|
|
79
|
+
const totalCount = image_list.total_count || image_list.images.length;
|
|
80
|
+
const mediaType = cover.media_type ?? 'static';
|
|
81
|
+
const mediaMeta = imageMediaTypeMeta[mediaType];
|
|
82
|
+
const MediaIcon = mediaMeta.icon;
|
|
83
|
+
const previewImages = image_list.images.slice(1, 4).filter((image) => image.url);
|
|
84
|
+
const remainingPreviewCount = Math.max(totalCount - previewImages.length - 1, 0);
|
|
85
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: "relative -mx-20 mt-12 overflow-visible", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute -inset-x-20 -inset-y-32 z-0 overflow-hidden", style: {
|
|
86
|
+
maskImage: ambientCoverMask,
|
|
87
|
+
WebkitMaskImage: ambientCoverMask
|
|
88
|
+
}, children: (0, jsx_runtime_1.jsx)("img", { src: cover.url, alt: "", className: "h-full w-full scale-[1.16] object-cover opacity-48 blur-[72px] saturate-[1.2]", referrerPolicy: "no-referrer", crossOrigin: "anonymous" }) }), (0, jsx_runtime_1.jsx)("img", { src: cover.url, alt: "\u56FE\u6587\u5C01\u9762", className: "relative z-10 block h-auto w-full drop-shadow-xl", style: {
|
|
89
|
+
maskImage: foregroundCoverMask,
|
|
90
|
+
WebkitMaskImage: foregroundCoverMask
|
|
91
|
+
}, referrerPolicy: "no-referrer", crossOrigin: "anonymous" }), (0, jsx_runtime_1.jsxs)("div", { className: "absolute left-24 top-12 z-30 flex items-center gap-4 text-foreground/85", children: [(0, jsx_runtime_1.jsx)(MediaIcon, { size: 72, weight: "fill" }), (0, jsx_runtime_1.jsx)("span", { className: "text-[34px] font-black select-text", children: mediaMeta.label })] }), previewImages.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "absolute right-24 top-8 z-30 flex items-center -space-x-5 drop-shadow-2xl", children: [previewImages.map((image, index) => ((0, jsx_runtime_1.jsx)("img", { src: image.url, alt: "\u56FE\u6587\u9884\u89C8", className: "h-28 w-28 rounded-3xl object-cover ring-2 ring-white/25", style: { transform: `rotate(${(index - 1) * 8}deg)` }, referrerPolicy: "no-referrer", crossOrigin: "anonymous" }, `${image.url}-${index}`))), remainingPreviewCount > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "flex h-28 w-28 items-center justify-center rounded-3xl backdrop-blur-xs bg-black/50 px-5 text-[32px] font-black text-white ring-2 ring-white/25", children: ["+", remainingPreviewCount] }))] })), (0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-12 right-24 z-30 flex items-center gap-5 text-foreground/85", children: (0, jsx_runtime_1.jsxs)("span", { className: "text-[34px] font-black tabular-nums", children: ["\u5171 ", totalCount, " \u5F20"] }) }), music && ((0, jsx_runtime_1.jsxs)("div", { className: "absolute bottom-12 left-24 z-30 flex max-w-212.5 items-center gap-5 text-foreground/85", children: [music.cover ? ((0, jsx_runtime_1.jsx)("div", { className: "relative h-20 w-20 shrink-0", children: (0, jsx_runtime_1.jsx)(GlowImage_1.GlowImage, { glowStrength: 1, blurRadius: 20, children: (0, jsx_runtime_1.jsx)("img", { src: music.cover, alt: "BGM\u5C01\u9762", className: "relative z-10 h-full w-full rounded-2xl object-cover", referrerPolicy: "no-referrer", crossOrigin: "anonymous" }) }) })) : ((0, jsx_runtime_1.jsx)(react_1.MusicNoteIcon, { size: 44, weight: "fill", className: "shrink-0" })), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "truncate text-[36px] font-black leading-tight select-text", children: music.title }), (0, jsx_runtime_1.jsx)("div", { className: "truncate text-[27px] font-semibold text-foreground/60 select-text", children: music.author })] })] }))] }));
|
|
92
|
+
};
|
|
93
|
+
const DouyinSignalLine = ({ data }) => {
|
|
94
|
+
const { dianzan, pinglun, shouchang, share, suggest_word } = data;
|
|
95
|
+
const renderTime = (0, date_fns_1.format)(new Date(), 'yyyy-MM-dd HH:mm:ss');
|
|
96
|
+
const stats = [
|
|
97
|
+
{ icon: Icons_1.DouyinLikeIcon, value: dianzan, label: '点赞' },
|
|
98
|
+
{ icon: Icons_1.DouyinCommentIcon, value: pinglun, label: '评论' },
|
|
99
|
+
{ icon: Icons_1.DouyinFavoriteIcon, value: shouchang, label: '收藏' },
|
|
100
|
+
{ icon: Icons_1.DouyinShareIcon, value: share, label: '分享' }
|
|
101
|
+
];
|
|
102
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: "mt-12", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex flex-wrap items-end gap-x-16 gap-y-8", children: stats.map((stat) => {
|
|
103
|
+
const Icon = stat.icon;
|
|
104
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "min-w-37.5", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 text-[28px] font-semibold text-muted", children: [(0, jsx_runtime_1.jsx)(Icon, { size: 36, weight: "fill", className: "text-foreground/80" }), (0, jsx_runtime_1.jsx)("span", { children: stat.label })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-2 text-[64px] font-black leading-none text-foreground tabular-nums select-text", children: stat.value })] }, stat.label));
|
|
105
|
+
}) }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-8 flex min-w-0 flex-col gap-3 text-[29px] leading-[1.45] text-muted", children: [suggest_word && ((0, jsx_runtime_1.jsxs)("div", { className: "min-w-0 truncate select-text", children: [(0, jsx_runtime_1.jsx)("span", { children: suggest_word.hint_text }), (0, jsx_runtime_1.jsx)("span", { className: "ml-2 font-black text-foreground", children: suggest_word.word })] })), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-3", children: (0, jsx_runtime_1.jsxs)("span", { className: "select-text", children: ["\u56FE\u7247\u751F\u6210\u4E8E: ", renderTime] }) })] })] }));
|
|
106
|
+
};
|
|
107
|
+
const DouyinCoCreatorList = ({ data, coCreatorCount }) => {
|
|
108
|
+
const allCreators = data.cooperation_info?.co_creators ?? [];
|
|
109
|
+
const creators = allCreators.filter((creator) => creator.nickname !== data.username);
|
|
110
|
+
if (creators.length === 0)
|
|
111
|
+
return null;
|
|
112
|
+
const visibleCreators = creators.slice(0, 8);
|
|
113
|
+
const hasSubscriberInList = allCreators.some((creator) => creator.nickname === data.username);
|
|
114
|
+
const remainingCount = Math.max(coCreatorCount - visibleCreators.length - (hasSubscriberInList ? 1 : 0), 0);
|
|
115
|
+
return ((0, jsx_runtime_1.jsxs)("section", { className: "mt-16", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 text-[34px] font-black text-foreground", children: [(0, jsx_runtime_1.jsx)(react_1.UsersIcon, { size: 42, weight: "fill", className: "text-foreground/80" }), (0, jsx_runtime_1.jsxs)("span", { children: ["\u5171 ", coCreatorCount, " \u4EBA\u5171\u521B"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-6 flex min-w-0 flex-wrap items-center gap-x-10 gap-y-6 overflow-hidden", children: [visibleCreators.map((creator, index) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex min-w-0 max-w-77.5 items-center gap-4", children: [(0, jsx_runtime_1.jsx)("img", { src: creator.avatar_url || data.avater_url, alt: "\u5171\u521B\u8005\u5934\u50CF", className: "h-18 w-18 shrink-0 rounded-full object-cover shadow-xl", referrerPolicy: "no-referrer", crossOrigin: "anonymous" }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "truncate text-[28px] font-black leading-tight text-foreground select-text", children: creator.nickname || '未提供' }), (0, jsx_runtime_1.jsx)("div", { className: "mt-1 truncate text-[23px] font-semibold text-muted select-text", children: creator.role_title || '共创者' })] })] }, `${creator.nickname || 'creator'}-${index}`))), remainingCount > 0 && (0, jsx_runtime_1.jsxs)("div", { className: "text-[32px] font-black text-muted", children: ["\u5269\u4F59 ", remainingCount, " \u4E2A..."] })] })] }));
|
|
116
|
+
};
|
|
117
|
+
const DouyinPosterFooter = ({ data, ctx }) => {
|
|
118
|
+
const { avater_url, username, 抖音号, 获赞, 关注, 粉丝, share_url } = data;
|
|
119
|
+
const dark = (0, theme_1.isDark)(ctx);
|
|
120
|
+
const stats = [
|
|
121
|
+
{ icon: Icons_1.DouyinLikeIcon, iconSize: 26, label: '获赞', value: 获赞 },
|
|
122
|
+
{ icon: react_1.UserPlusIcon, iconSize: 32, label: '关注', value: 关注 },
|
|
123
|
+
{ icon: react_1.UsersThreeIcon, iconSize: 32, label: '粉丝', value: 粉丝 }
|
|
124
|
+
];
|
|
125
|
+
return ((0, jsx_runtime_1.jsxs)("footer", { className: "mt-10 flex items-start justify-between gap-16", children: [(0, jsx_runtime_1.jsxs)("div", { className: "min-w-0 flex-1 pt-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-6", children: [(0, jsx_runtime_1.jsx)("img", { src: avater_url, alt: "\u5934\u50CF", className: "h-26 w-26 shrink-0 rounded-full object-cover shadow-xl", referrerPolicy: "no-referrer", crossOrigin: "anonymous" }), (0, jsx_runtime_1.jsxs)("div", { className: "min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "max-w-162.5 truncate text-[48px] font-black leading-tight text-foreground select-text", children: username }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-3 flex items-center gap-2 text-[30px] text-muted", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Hash, { size: 28 }), (0, jsx_runtime_1.jsxs)("span", { className: "truncate select-text", children: ["\u6296\u97F3\u53F7: ", 抖音号] })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-10 flex flex-wrap gap-x-14 gap-y-6", children: stats.map((stat) => {
|
|
126
|
+
const Icon = stat.icon;
|
|
127
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "min-w-37.5", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 text-[25px] font-semibold text-muted", children: [(0, jsx_runtime_1.jsx)(Icon, { size: stat.iconSize, weight: "fill", className: "text-foreground/80" }), (0, jsx_runtime_1.jsx)("span", { children: stat.label })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-2 text-[32px] font-black leading-none text-foreground select-text", children: stat.value })] }, stat.label));
|
|
128
|
+
}) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "shrink-0 text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "drop-shadow-2xl", children: (0, jsx_runtime_1.jsx)(QRCodeWithAvatar_1.QRCodeWithAvatar, { value: share_url, avatarUrl: avater_url, useDarkTheme: dark, alt: "\u4E8C\u7EF4\u7801", className: "h-75 w-75" }) }), (0, jsx_runtime_1.jsx)("div", { className: "mt-2 text-[28px] font-black text-foreground/80", children: "\u626B\u7801\u67E5\u770B\u4F5C\u54C1\u8BE6\u60C5" })] })] }));
|
|
129
|
+
};
|
|
130
|
+
exports.DouyinImageWork = react_2.default.memo((props) => {
|
|
131
|
+
const coCreatorCount = props.data.cooperation_info?.co_creator_nums ?? props.data.cooperation_info?.co_creators?.length ?? undefined;
|
|
132
|
+
const hasCoCreators = !!coCreatorCount && coCreatorCount > 0;
|
|
133
|
+
return ((0, jsx_runtime_1.jsxs)(DefaultLayout_1.DefaultLayout, { ...props, className: "relative overflow-hidden", children: [(0, jsx_runtime_1.jsx)(DouyinDiffuseBackground, { ...props }), (0, jsx_runtime_1.jsxs)("section", { className: "relative z-10 px-20 pt-18", children: [(0, jsx_runtime_1.jsx)(DouyinPosterHeader, { ...props }), (0, jsx_runtime_1.jsx)(DouyinPosterTitle, { ...props }), (0, jsx_runtime_1.jsx)(DouyinImageCover, { ...props }), (0, jsx_runtime_1.jsx)(DouyinSignalLine, { ...props }), hasCoCreators && (0, jsx_runtime_1.jsx)(DouyinCoCreatorList, { ...props, coCreatorCount: coCreatorCount }), (0, jsx_runtime_1.jsx)(DouyinPosterFooter, { ...props })] })] }));
|
|
134
|
+
});
|
|
135
|
+
exports.DouyinImageWork.displayName = 'DouyinImageWork';
|
|
136
|
+
exports.default = exports.DouyinImageWork;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const template_react_1 = require("../../../../compat/template-react.js");
|
|
4
|
+
const ImageWork_1 = require("./components/ImageWork");
|
|
5
|
+
exports.default = (0, template_react_1.defineTemplate)({
|
|
6
|
+
name: '图文作品',
|
|
7
|
+
description: '抖音图文作品解析与推送模板',
|
|
8
|
+
component: ImageWork_1.DouyinImageWork,
|
|
9
|
+
validate: (data) => typeof data === 'object' && data !== null && typeof data.share_url === 'string'
|
|
10
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DouyinLive = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const lucide_react_1 = require("lucide-react");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
const theme_1 = require("../../../../utils/theme");
|
|
11
|
+
const AmbientCover_1 = require("../../../components/AmbientCover");
|
|
12
|
+
const DefaultLayout_1 = require("../../../components/DefaultLayout");
|
|
13
|
+
const QRCodeWithAvatar_1 = require("../../../components/QRCodeWithAvatar");
|
|
14
|
+
const Icons_1 = require("../../components/Icons");
|
|
15
|
+
const coverMaskStyle = {
|
|
16
|
+
maskImage: 'linear-gradient(to bottom, transparent 0%, black 0, black 28%, transparent 100%)',
|
|
17
|
+
WebkitMaskImage: 'linear-gradient(to bottom, transparent 0%, black 0, black 28%, transparent 100%)'
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 全局氛围背景层:模糊封面 + 渐变遮罩 + 高对比杂色纹理
|
|
21
|
+
*/
|
|
22
|
+
const AmbientBackground = react_1.default.memo(({ pic, ctx }) => ((0, jsx_runtime_1.jsxs)("div", { className: "absolute inset-0 overflow-hidden", children: [(0, jsx_runtime_1.jsx)(AmbientCover_1.AmbientCover, { src: pic, ctx: ctx }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 pointer-events-none opacity-[0.45] mix-blend-overlay dark:mix-blend-soft-light", children: (0, jsx_runtime_1.jsxs)("svg", { className: "w-full h-full", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsxs)("defs", { children: [(0, jsx_runtime_1.jsxs)("filter", { id: "douyinNoise", children: [(0, jsx_runtime_1.jsx)("feTurbulence", { type: "fractalNoise", baseFrequency: "1.4", numOctaves: "3", stitchTiles: "stitch" }), (0, jsx_runtime_1.jsx)("feColorMatrix", { type: "saturate", values: "0" }), (0, jsx_runtime_1.jsxs)("feComponentTransfer", { children: [(0, jsx_runtime_1.jsx)("feFuncR", { type: "discrete", tableValues: "0 1" }), (0, jsx_runtime_1.jsx)("feFuncG", { type: "discrete", tableValues: "0 1" }), (0, jsx_runtime_1.jsx)("feFuncB", { type: "discrete", tableValues: "0 1" })] }), (0, jsx_runtime_1.jsx)("feComponentTransfer", { children: (0, jsx_runtime_1.jsx)("feFuncA", { type: "linear", slope: "2.5", intercept: "-0.6" }) })] }), (0, jsx_runtime_1.jsxs)("mask", { id: "noiseMask", children: [(0, jsx_runtime_1.jsxs)("linearGradient", { id: "noiseGradient", x1: "0%", y1: "0%", x2: "0%", y2: "100%", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "0%", stopColor: "white", stopOpacity: "0.85" }), (0, jsx_runtime_1.jsx)("stop", { offset: "25%", stopColor: "white", stopOpacity: "0.4" }), (0, jsx_runtime_1.jsx)("stop", { offset: "50%", stopColor: "white", stopOpacity: "0.08" }), (0, jsx_runtime_1.jsx)("stop", { offset: "75%", stopColor: "white", stopOpacity: "0.4" }), (0, jsx_runtime_1.jsx)("stop", { offset: "100%", stopColor: "white", stopOpacity: "0.85" })] }), (0, jsx_runtime_1.jsx)("rect", { width: "100%", height: "100%", fill: "url(#noiseGradient)" })] })] }), (0, jsx_runtime_1.jsx)("rect", { width: "100%", height: "100%", filter: "url(#douyinNoise)", mask: "url(#noiseMask)", fill: "white" })] }) })] })));
|
|
23
|
+
AmbientBackground.displayName = 'AmbientBackground';
|
|
24
|
+
/**
|
|
25
|
+
* 封面组件 - 全宽铺满 + 双向渐变溶解 + LIVE大字
|
|
26
|
+
*/
|
|
27
|
+
const CoverSection = ({ imageUrl }) => {
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("div", { style: coverMaskStyle, children: (0, jsx_runtime_1.jsx)("img", { className: "object-cover w-full", src: imageUrl, alt: "\u76F4\u64AD\u5C01\u9762" }) }), (0, jsx_runtime_1.jsx)("div", { className: "absolute right-20 top-20 pointer-events-none select-none", children: (0, jsx_runtime_1.jsx)("span", { className: "text-7xl font-black tracking-[0.15em] uppercase text-white/20", children: "\u76F4\u64AD\u4E2D" }) })] }));
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 直播信息组件
|
|
32
|
+
*/
|
|
33
|
+
const InfoSection = ({ data }) => {
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-8 px-16 pt-12", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-[80px] font-black leading-tight text-foreground tracking-tight select-text", children: data.text }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4 text-3xl text-foreground/30", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-danger/60 font-black tracking-wider text-[32px]", children: "\u76F4\u64AD\u4E2D" }), (0, jsx_runtime_1.jsx)("span", { children: "/" }), (0, jsx_runtime_1.jsx)("span", { children: data.partition_title }), (0, jsx_runtime_1.jsx)("span", { children: "/" }), (0, jsx_runtime_1.jsxs)("span", { children: ["\u623F\u95F4\u53F7 ", data.room_id] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap items-center gap-6 text-3xl text-foreground/30", children: [(0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 28, className: "text-foreground/20" }), data.online_viewers, "\u5728\u7EBF"] }), (0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Eye, { size: 28, className: "text-foreground/20" }), data.total_viewers, "\u89C2\u770B"] }), (0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)(Icons_1.DouyinLikeIcon, { size: 28 }), data.like_count, "\u70B9\u8D5E"] }), data.resolution && ((0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Monitor, { size: 28, className: "text-foreground/20" }), data.resolution] })), data.has_commerce_goods && ((0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ShoppingBag, { size: 28, className: "text-foreground/20" }), "\u5E26\u8D27\u4E2D"] }))] }), data.signature && (0, jsx_runtime_1.jsx)("div", { className: "text-5xl leading-relaxed text-foreground/75 select-text", children: data.signature }), data.city && ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 text-3xl text-foreground/30", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.MapPin, { size: 28, className: "text-foreground/20" }), (0, jsx_runtime_1.jsx)("span", { children: data.city })] }))] }));
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 底部区域 - 主播信息 + 二维码 + 抖音Logo
|
|
38
|
+
*/
|
|
39
|
+
const BottomSection = ({ data, ctx }) => {
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-end px-16 pt-24 pb-16", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex gap-10 items-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "relative shrink-0", children: (0, jsx_runtime_1.jsx)("div", { className: "flex justify-center items-center bg-white rounded-full w-35 h-35", children: (0, jsx_runtime_1.jsx)("img", { src: data.avater_url, alt: "\u5934\u50CF", className: "rounded-full w-33 h-33" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-7xl font-bold text-foreground select-text", children: ["@", data.username] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 text-4xl text-foreground/50", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-foreground/50 font-black tracking-wider text-3xl", children: "\u76F4\u64AD\u4E2D" }), (0, jsx_runtime_1.jsx)("span", { className: "text-foreground/40", children: "\u00B7" }), (0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 32 }), (0, jsx_runtime_1.jsxs)("span", { className: "select-text", children: [data.fans, "\u7C89\u4E1D"] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-6 text-3xl text-foreground/70", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 px-6 py-3 rounded-2xl bg-default/45", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.FileVideo, { size: 28 }), (0, jsx_runtime_1.jsx)("span", { className: "text-foreground/40", children: "\u4F5C\u54C1" })] }), (0, jsx_runtime_1.jsx)("span", { className: "font-medium text-4xl select-text", children: data.aweme_count })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 px-6 py-3 rounded-2xl bg-default/45", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.UserPlus, { size: 28 }), (0, jsx_runtime_1.jsx)("span", { className: "text-foreground/40", children: "\u5173\u6CE8" })] }), (0, jsx_runtime_1.jsx)("span", { className: "font-medium text-4xl select-text", children: data.following_count })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 px-6 py-3 rounded-2xl bg-default/45", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(Icons_1.DouyinLikeIcon, { size: 28 }), (0, jsx_runtime_1.jsx)("span", { className: "text-foreground/40", children: "\u83B7\u8D5E" })] }), (0, jsx_runtime_1.jsx)("span", { className: "font-medium text-4xl select-text", children: data.total_favorited })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-end gap-6", children: [(0, jsx_runtime_1.jsx)("img", { src: (0, theme_1.isDark)(ctx) ? '/image/douyin/dylogo-light.svg' : '/image/douyin/dylogo-dark.svg', alt: "\u6296\u97F3", className: "w-60 h-auto opacity-80 dark:opacity-70" }), data.share_url ? ((0, jsx_runtime_1.jsx)(QRCodeWithAvatar_1.QRCodeWithAvatar, { value: data.share_url, avatarUrl: data.avater_url, useDarkTheme: (0, theme_1.isDark)(ctx), alt: "\u4E8C\u7EF4\u7801", className: "h-auto w-75" })) : ((0, jsx_runtime_1.jsx)("div", { className: "flex justify-center items-center bg-surface w-75 h-75", children: (0, jsx_runtime_1.jsx)("span", { className: "text-foreground/50", children: "\u4E8C\u7EF4\u7801" }) })), (0, jsx_runtime_1.jsx)("span", { className: "text-2xl text-foreground/50 select-text", children: "\u626B\u7801\u8FDB\u5165\u76F4\u64AD\u95F4" })] })] }));
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* 抖音直播组件
|
|
44
|
+
*/
|
|
45
|
+
const DouyinLive = (props) => {
|
|
46
|
+
const d = props.data;
|
|
47
|
+
const { ctx } = props;
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)(DefaultLayout_1.DefaultLayout, { ...props, className: "relative overflow-hidden", children: [(0, jsx_runtime_1.jsx)(AmbientBackground, { pic: d.image_url, ctx: ctx }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(CoverSection, { imageUrl: d.image_url }), (0, jsx_runtime_1.jsx)(InfoSection, { data: d }), (0, jsx_runtime_1.jsx)(BottomSection, { data: d, ctx: ctx })] })] }));
|
|
49
|
+
};
|
|
50
|
+
exports.DouyinLive = DouyinLive;
|
|
51
|
+
exports.default = exports.DouyinLive;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const template_react_1 = require("../../../../compat/template-react.js");
|
|
4
|
+
const Live_1 = require("./components/Live");
|
|
5
|
+
exports.default = (0, template_react_1.defineTemplate)({
|
|
6
|
+
name: '直播状态',
|
|
7
|
+
description: '抖音直播状态推送模板',
|
|
8
|
+
component: Live_1.DouyinLive,
|
|
9
|
+
validate: (data) => typeof data === 'object' && data !== null && typeof data.share_url === 'string'
|
|
10
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DouyinMusicInfo = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const lucide_react_1 = require("lucide-react");
|
|
6
|
+
const theme_1 = require("../../../../utils/theme");
|
|
7
|
+
const DefaultLayout_1 = require("../../../components/DefaultLayout");
|
|
8
|
+
const QRCodeWithAvatar_1 = require("../../../components/QRCodeWithAvatar");
|
|
9
|
+
const Icons_1 = require("../../components/Icons");
|
|
10
|
+
/**
|
|
11
|
+
* 抖音Logo头部组件
|
|
12
|
+
* @param props 组件属性
|
|
13
|
+
* @returns JSX元素
|
|
14
|
+
*/
|
|
15
|
+
const DouyinHeader = ({ useDarkTheme }) => {
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center px-12 py-15", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-[39%] h-50 bg-cover bg-center bg-fixed", children: (0, jsx_runtime_1.jsx)("img", { src: useDarkTheme ? '/image/douyin/dylogo-light.svg' : '/image/douyin/dylogo-dark.svg', alt: "\u6296\u97F3Logo", className: "object-contain w-full h-full select-text" }) }), (0, jsx_runtime_1.jsx)("span", { className: "text-[65px] ml-4 text-foreground select-text", children: "\u8BB0\u5F55\u7F8E\u597D\u751F\u6D3B" })] }));
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 音乐封面组件
|
|
20
|
+
* @param props 组件属性
|
|
21
|
+
* @returns JSX元素
|
|
22
|
+
*/
|
|
23
|
+
const MusicCoverSection = ({ imageUrl }) => {
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-col items-center my-5", children: (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col items-center overflow-hidden shadow-large rounded-[25px] w-[90%] relative", children: (0, jsx_runtime_1.jsx)("img", { className: "rounded-[25px] object-contain w-full h-full select-text", src: imageUrl, alt: "\u97F3\u4E50\u5C01\u9762" }) }) }));
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 音乐信息组件
|
|
28
|
+
* @param props 组件属性
|
|
29
|
+
* @returns JSX元素
|
|
30
|
+
*/
|
|
31
|
+
const MusicInfoSection = ({ desc, musicId, userCount, createTime }) => {
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col px-16 py-5", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-[70px] font-bold leading-relaxed mb-9 text-foreground select-text", style: { letterSpacing: '1.5px', wordWrap: 'break-word' }, dangerouslySetInnerHTML: { __html: desc } }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 text-[45px] text-muted font-light mb-2.5", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 items-center select-text", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Music, { className: "w-11 h-11" }), (0, jsx_runtime_1.jsxs)("span", { children: ["\u97F3\u4E50ID: ", musicId] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 items-center select-text", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { className: "w-11 h-11" }), (0, jsx_runtime_1.jsxs)("span", { children: [userCount, " \u4EBA\u4F7F\u7528\u8FC7"] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 text-[45px] text-muted font-light select-text", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Maximize, { className: "w-11 h-11 text-muted" }), (0, jsx_runtime_1.jsxs)("span", { children: ["\u56FE\u7247\u751F\u6210\u4E8E: ", createTime] })] })] }));
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* 音乐作者信息组件
|
|
36
|
+
* @param props 组件属性
|
|
37
|
+
* @returns JSX元素
|
|
38
|
+
*/
|
|
39
|
+
const MusicAuthorInfoSection = ({ avatarUrl, username, userShortId, totalFavorited, followingCount, fans }) => {
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col pl-16", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center mb-6", children: [(0, jsx_runtime_1.jsx)("img", { src: avatarUrl, alt: "\u5934\u50CF", className: "w-50 h-50 rounded-full mr-7 shadow-large select-text" }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col", children: (0, jsx_runtime_1.jsx)("span", { className: "text-[80px] font-bold text-foreground select-text", children: username }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col text-[35px] mt-6 space-y-1 text-foreground select-text", style: { letterSpacing: '2.5px' }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Hash, { className: "w-8 h-8" }), (0, jsx_runtime_1.jsxs)("span", { children: ["ID: ", userShortId] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Icons_1.DouyinLikeIcon, { size: 32 }), (0, jsx_runtime_1.jsxs)("span", { children: ["\u83B7\u8D5E: ", totalFavorited] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.UserPlus, { className: "w-8 h-8" }), (0, jsx_runtime_1.jsxs)("span", { children: ["\u5173\u6CE8: ", followingCount] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { className: "w-8 h-" }), (0, jsx_runtime_1.jsxs)("span", { children: ["\u7C89\u4E1D: ", fans] })] })] })] }));
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* 音乐二维码组件
|
|
44
|
+
* @param props 组件属性
|
|
45
|
+
* @returns JSX元素
|
|
46
|
+
*/
|
|
47
|
+
const MusicQRCodeSection = ({ share_url, avatarUrl, useDarkTheme }) => {
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col-reverse items-center -mb-12 mr-18", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 text-[45px] text-right mt-5 text-muted select-text", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.QrCode, { className: "w-11 h-11" }), (0, jsx_runtime_1.jsx)("span", { children: "\u6587\u4EF6\u76F4\u94FE\uFF1A\u6C38\u4E45\u6709\u6548" })] }), (0, jsx_runtime_1.jsx)("div", { className: "p-2.5 rounded-sm border-[7px] border-dashed border-border", children: (0, jsx_runtime_1.jsx)(QRCodeWithAvatar_1.QRCodeWithAvatar, { value: share_url, avatarUrl: avatarUrl, useDarkTheme: useDarkTheme, alt: "\u4E8C\u7EF4\u7801", className: "w-87.5 h-87.5 select-text" }) })] }));
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* 抖音音乐信息组件
|
|
52
|
+
* @param props 组件属性
|
|
53
|
+
* @returns JSX元素
|
|
54
|
+
*/
|
|
55
|
+
const DouyinMusicInfo = (props) => {
|
|
56
|
+
const { data } = props;
|
|
57
|
+
return ((0, jsx_runtime_1.jsx)(DefaultLayout_1.DefaultLayout, { ...props, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(DouyinHeader, { useDarkTheme: (0, theme_1.isDark)(props.ctx) }), (0, jsx_runtime_1.jsx)(MusicCoverSection, { imageUrl: data.image_url, description: data.desc }), (0, jsx_runtime_1.jsx)("div", { className: "h-22.5" }), (0, jsx_runtime_1.jsx)(MusicInfoSection, { desc: data.desc, musicId: data.music_id, userCount: data.user_count, createTime: data.create_time }), (0, jsx_runtime_1.jsx)("div", { className: "h-25" }), (0, jsx_runtime_1.jsx)("div", { className: "text-[70px] text-right mr-21 -mb-11 z-[-1] text-muted select-text", children: "\u6296\u97F3\u97F3\u4E50\u4FE1\u606F" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center px-0 pt-25", children: [(0, jsx_runtime_1.jsx)(MusicAuthorInfoSection, { avatarUrl: data.avater_url, username: data.username, userShortId: data.user_shortid, totalFavorited: data.total_favorited, followingCount: data.following_count, fans: data.fans }), (0, jsx_runtime_1.jsx)(MusicQRCodeSection, { share_url: data.share_url, avatarUrl: data.avater_url, useDarkTheme: (0, theme_1.isDark)(props.ctx) })] })] }) }));
|
|
58
|
+
};
|
|
59
|
+
exports.DouyinMusicInfo = DouyinMusicInfo;
|
|
60
|
+
exports.default = exports.DouyinMusicInfo;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const template_react_1 = require("../../../../compat/template-react.js");
|
|
4
|
+
const MusicInfo_1 = require("./components/MusicInfo");
|
|
5
|
+
exports.default = (0, template_react_1.defineTemplate)({
|
|
6
|
+
name: '音乐信息',
|
|
7
|
+
description: '抖音音乐信息展示模板',
|
|
8
|
+
component: MusicInfo_1.DouyinMusicInfo,
|
|
9
|
+
validate: (data) => typeof data === 'object' && data !== null && typeof data.share_url === 'string'
|
|
10
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DouyinQrcodeImg = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const lucide_react_1 = require("lucide-react");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
const ri_1 = require("react-icons/ri");
|
|
11
|
+
const theme_1 = require("../../../../utils/theme");
|
|
12
|
+
const DefaultLayout_1 = require("../../../components/DefaultLayout");
|
|
13
|
+
const QRCodeWithAvatar_1 = require("../../../components/QRCodeWithAvatar");
|
|
14
|
+
/**
|
|
15
|
+
* 抖音二维码登录组件
|
|
16
|
+
* @param props 组件属性
|
|
17
|
+
* @returns JSX元素
|
|
18
|
+
*/
|
|
19
|
+
exports.DouyinQrcodeImg = react_1.default.memo((props) => {
|
|
20
|
+
const dark = (0, theme_1.isDark)(props.ctx);
|
|
21
|
+
const theme = {
|
|
22
|
+
bg: dark ? '#000000' : '#FFFFFF',
|
|
23
|
+
text: dark ? '#FFFFFF' : '#000000',
|
|
24
|
+
subText: dark ? '#888888' : '#666666',
|
|
25
|
+
accent: '#FF2C55',
|
|
26
|
+
// 双色弥散
|
|
27
|
+
gradientTL: '#fe1700', // 左上
|
|
28
|
+
gradientBR: '#0fffff' // 右下
|
|
29
|
+
};
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)(DefaultLayout_1.DefaultLayout, { ...props, className: "relative overflow-hidden font-sans", style: {
|
|
31
|
+
background: theme.bg,
|
|
32
|
+
color: theme.text
|
|
33
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { className: "absolute inset-0 overflow-hidden pointer-events-none", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute top-[-40%] left-[-50%] w-400 h-600 rounded-full blur-[200px] opacity-25", style: { background: theme.gradientTL } }), (0, jsx_runtime_1.jsx)("div", { className: "absolute top-[80%] right-[-50%] w-400 h-600 rounded-full blur-[200px] opacity-25", style: { background: theme.gradientBR } })] }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 pointer-events-none", style: { opacity: dark ? 0.16 : 0.2 }, children: (0, jsx_runtime_1.jsxs)("svg", { className: "w-full h-full", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsxs)("filter", { id: "pixelNoise", x: "0%", y: "0%", width: "100%", height: "100%", children: [(0, jsx_runtime_1.jsx)("feTurbulence", { type: "fractalNoise", baseFrequency: "0.8", numOctaves: "2", stitchTiles: "stitch", result: "noise" }), (0, jsx_runtime_1.jsx)("feColorMatrix", { type: "saturate", values: "0", result: "gray" }), (0, jsx_runtime_1.jsxs)("feComponentTransfer", { children: [(0, jsx_runtime_1.jsx)("feFuncR", { type: "discrete", tableValues: "0 1" }), (0, jsx_runtime_1.jsx)("feFuncG", { type: "discrete", tableValues: "0 1" }), (0, jsx_runtime_1.jsx)("feFuncB", { type: "discrete", tableValues: "0 1" })] })] }), (0, jsx_runtime_1.jsx)("rect", { width: "100%", height: "100%", filter: "url(#pixelNoise)" })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10 flex flex-col items-center justify-center h-full py-40 px-24 space-y-32", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center space-y-12", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-8xl font-bold tracking-tight", children: (0, jsx_runtime_1.jsx)("span", { className: "bg-linear-to-r from-foreground to-muted bg-clip-text text-transparent", children: "\u626B\u7801\u767B\u5F55" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start justify-center gap-10 opacity-90", style: { color: theme.text }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "p-5 rounded-3xl bg-surface/50 backdrop-blur-md", children: (0, jsx_runtime_1.jsx)(ri_1.RiTiktokFill, { size: 64 }) }), (0, jsx_runtime_1.jsx)("span", { className: "text-[28px] font-medium tracking-wide", children: "\u6253\u5F00\u6296\u97F3" })] }), (0, jsx_runtime_1.jsx)(ri_1.RiArrowRightFill, { size: 40, className: "mt-8 opacity-40" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "p-5 rounded-3xl bg-surface/50 backdrop-blur-md", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Menu, { size: 64 }) }), (0, jsx_runtime_1.jsx)("span", { className: "text-[28px] font-medium tracking-wide", children: "\u5DE6\u4E0A\u89D2\u83DC\u5355" })] }), (0, jsx_runtime_1.jsx)(ri_1.RiArrowRightFill, { size: 40, className: "mt-8 opacity-40" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "p-5 rounded-3xl bg-surface/50 backdrop-blur-md", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ScanLine, { size: 64 }) }), (0, jsx_runtime_1.jsx)("span", { className: "text-[28px] font-medium tracking-wide", children: "\u9876\u90E8\u626B\u4E00\u626B" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "relative group", children: [(0, jsx_runtime_1.jsx)("div", { className: "relative p-4", style: {
|
|
34
|
+
width: '800px',
|
|
35
|
+
height: '800px'
|
|
36
|
+
}, children: props.data.share_url ? ((0, jsx_runtime_1.jsx)(QRCodeWithAvatar_1.QRCodeWithAvatar, { value: props.data.share_url, avatarUrl: props.data.avatarUrl, useDarkTheme: dark, alt: "QR Code", className: "w-full h-full object-contain" })) : ((0, jsx_runtime_1.jsx)("div", { className: "w-full h-full flex flex-col items-center justify-center gap-8", children: (0, jsx_runtime_1.jsx)("div", { className: "w-24 h-24 border-4 border-gray-200 border-t-black rounded-full animate-spin" }) })) }), (0, jsx_runtime_1.jsx)("div", { className: "absolute -bottom-24 left-0 right-0 text-center", children: (0, jsx_runtime_1.jsxs)("p", { className: "text-[28px] font-medium tracking-wide flex items-center justify-center gap-3", style: { color: theme.subText }, children: [(0, jsx_runtime_1.jsx)("span", { className: "h-6 w-1.5 rounded-full bg-danger shadow-[0_0_8px_rgba(255,44,85,0.8)]" }), "\u6B64\u4E8C\u7EF4\u7801 120 \u79D2\u5185\u6709\u6548\uFF0C\u8BF7\u53CA\u65F6\u626B\u7801\u767B\u5F55\u3002"] }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "w-full max-w-225 grid grid-cols-2 gap-24 pt-20", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-start space-y-6 mt-1.5", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center w-16 h-16 mb-2", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Smartphone, { size: 64, style: { color: theme.text }, strokeWidth: 1 }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-[40px] font-bold", style: { color: theme.text }, children: "\u626B\u7801\u767B\u5F55\u8BF4\u660E" }), (0, jsx_runtime_1.jsx)("p", { className: "text-[24px] leading-relaxed opacity-60", style: { color: theme.text }, children: "\u6296\u97F3\u76EE\u524D\u4EC5\u7981\u6B62\u76F8\u518C\u626B\u7801\uFF0C\u65E0\u6CD5\u901A\u8FC7\u622A\u56FE\u5728\u672C\u673A\u81EA\u52A9\u767B\u5F55\uFF0C\u8BF7\u5728\u53E6\u4E00\u53F0\u8BBE\u5907\u4E0A\u5C55\u793A\u4E8C\u7EF4\u7801\uFF0C\u5E76\u4F7F\u7528\u624B\u673A\u6296\u97F3\u626B\u7801\u5B8C\u6210\u767B\u5F55\u3002" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-start space-y-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex items-center justify-center w-16 h-16 mb-2", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ShieldCheck, { size: 64, style: { color: theme.text }, strokeWidth: 1 }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-[40px] font-bold", style: { color: theme.text }, children: "\u5B89\u5168\u627F\u8BFA" }), (0, jsx_runtime_1.jsx)("p", { className: "text-[24px] leading-relaxed opacity-60", style: { color: theme.text }, children: "\u626B\u7801\u540E\u4EC5\u4F1A\u5728\u672C\u5730\u83B7\u53D6\u60A8\u7684\u767B\u5F55\u51ED\u636E\uFF08CK\uFF09\uFF0C\u7528\u4E8E\u89C6\u9891\u89E3\u6790\u7B49\u76F8\u5173\u4E1A\u52A1\uFF0C\u4E0D\u4F1A\u4E0A\u4F20\u81F3\u4EFB\u4F55\u7B2C\u4E09\u65B9\uFF0C\u4E5F\u4E0D\u4F1A\u7528\u4E8E\u4E0E\u672C\u5DE5\u5177\u65E0\u5173\u7684\u64CD\u4F5C\uFF0C\u8BF7\u5728\u53EF\u4FE1\u73AF\u5883\u4E0B\u4F7F\u7528\u672C\u529F\u80FD\u3002" })] })] })] })] }));
|
|
37
|
+
});
|
|
38
|
+
exports.DouyinQrcodeImg.displayName = 'DouyinQrcodeImg';
|
|
39
|
+
exports.default = exports.DouyinQrcodeImg;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const template_react_1 = require("../../../../compat/template-react.js");
|
|
4
|
+
const qrcodeImg_1 = require("./components/qrcodeImg");
|
|
5
|
+
exports.default = (0, template_react_1.defineTemplate)({
|
|
6
|
+
name: '登录二维码',
|
|
7
|
+
description: '抖音登录二维码展示模板',
|
|
8
|
+
component: qrcodeImg_1.DouyinQrcodeImg
|
|
9
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DouyinRecommendList = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const date_fns_1 = require("date-fns");
|
|
6
|
+
const lucide_react_1 = require("lucide-react");
|
|
7
|
+
const theme_1 = require("../../../../utils/theme");
|
|
8
|
+
const DefaultLayout_1 = require("../../../components/DefaultLayout");
|
|
9
|
+
const QRCodeWithAvatar_1 = require("../../../components/QRCodeWithAvatar");
|
|
10
|
+
const Icons_1 = require("../../components/Icons");
|
|
11
|
+
/**
|
|
12
|
+
* 抖音推荐列表组件
|
|
13
|
+
*/
|
|
14
|
+
const DouyinRecommendList = (props) => {
|
|
15
|
+
const dark = (0, theme_1.isDark)(props.ctx);
|
|
16
|
+
// 弥散光颜色配置 - 绿色 + 蓝色
|
|
17
|
+
const glowColors = dark
|
|
18
|
+
? {
|
|
19
|
+
primary: 'rgba(16, 185, 129, 0.15)', // Emerald-500 (Green)
|
|
20
|
+
secondary: 'rgba(59, 130, 246, 0.15)' // Blue-500 (Blue)
|
|
21
|
+
}
|
|
22
|
+
: {
|
|
23
|
+
primary: 'rgba(34, 197, 94, 0.25)', // Green-500
|
|
24
|
+
secondary: 'rgba(59, 130, 246, 0.25)' // Blue-500
|
|
25
|
+
};
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(DefaultLayout_1.DefaultLayout, { ...props, className: "relative overflow-hidden bg-surface", children: [(0, jsx_runtime_1.jsxs)("div", { className: "absolute inset-0 pointer-events-none z-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute rounded-full w-full h-[60%] top-[-20%] left-[-20%] blur-[150px]", style: { background: glowColors.primary } }), (0, jsx_runtime_1.jsx)("div", { className: "absolute rounded-full w-full h-[60%] bottom-[-20%] right-[-20%] blur-[180px]", style: { background: glowColors.secondary } })] }), (0, jsx_runtime_1.jsx)("div", { className: 'absolute inset-0 pointer-events-none z-10 mix-blend-overlay', children: (0, jsx_runtime_1.jsxs)("svg", { className: "w-full h-full", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsxs)("filter", { id: "noiseFilter", children: [(0, jsx_runtime_1.jsx)("feTurbulence", { type: "fractalNoise", baseFrequency: "0.8", numOctaves: "3", stitchTiles: "stitch" }), (0, jsx_runtime_1.jsx)("feColorMatrix", { type: "saturate", values: "0" })] }), (0, jsx_runtime_1.jsx)("rect", { width: "100%", height: "100%", filter: "url(#noiseFilter)" })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-20 p-12 pb-0 grid grid-cols-12 gap-12 min-h-150 items-stretch", children: [(0, jsx_runtime_1.jsxs)("div", { className: "col-span-4 flex flex-col justify-between py-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-1 select-none", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-6xl font-black text-foreground/10 tracking-tighter leading-none", children: "DOUYIN" }), (0, jsx_runtime_1.jsx)("span", { className: "text-6xl font-black text-emerald-500/20 tracking-tighter leading-none", children: "RECOMMEND" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 mt-2", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-1.5 w-16 bg-emerald-500 rounded-full" }), (0, jsx_runtime_1.jsx)("span", { className: "text-base text-muted font-mono tracking-widest uppercase", children: "Push Notification" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-10 relative", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute -left-8 top-10 w-16 h-16 rounded-full border-4 border-emerald-300/30 animate-[bounce_4s_infinite]" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute right-10 -top-4 w-6 h-6 rounded-full bg-blue-300/40" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative w-fit self-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute -inset-8 bg-linear-to-br from-emerald-400 to-blue-400 rounded-full blur-2xl opacity-40 animate-pulse" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute -inset-4 rounded-full border-2 border-dashed border-emerald-400/30 animate-[spin_10s_linear_infinite]" }), (0, jsx_runtime_1.jsx)("img", { src: props.data.recommender_avatar, className: "relative w-64 h-64 rounded-full border-[6px] border-white object-cover shadow-2xl", alt: "Recommender" }), (0, jsx_runtime_1.jsxs)("div", { className: "absolute -bottom-3 -right-3 bg-emerald-500 text-white px-5 py-2 rounded-full border-[5px] border-white font-bold text-xl shadow-xl flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(Icons_1.DouyinRecommendIcon, { size: 20 }), (0, jsx_runtime_1.jsx)("span", { children: "\u63A8\u8350" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center text-center", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-6xl font-black text-foreground leading-tight relative", children: [props.data.recommender_username, (0, jsx_runtime_1.jsx)("svg", { className: "absolute -right-8 -top-2 text-blue-400 w-8 h-8 opacity-60", viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2l2.4 7.2h7.6l-6 4.8 2.4 7.2-6-4.8-6 4.8 2.4-7.2-6-4.8h7.6z" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "px-6 py-6 pt-0 rounded-full text-2xl text-muted font-mono", children: ["@", props.data.recommender_douyin_id] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-6 flex flex-col items-center gap-2 text-emerald-500", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)(Icons_1.DouyinRecommendIcon, { size: 40 }), (0, jsx_runtime_1.jsx)("span", { className: "text-4xl font-bold", children: "\u521A\u521A\u63A8\u8350\u4E86\u8FD9\u4E2A\u4F5C\u54C1" })] }), (0, jsx_runtime_1.jsx)("svg", { width: "200", height: "20", viewBox: "0 0 200 20", className: "opacity-60", children: (0, jsx_runtime_1.jsx)("path", { d: "M0 10 Q 50 20, 100 10 T 200 10", stroke: "currentColor", strokeWidth: "3", fill: "none", strokeLinecap: "round" }) })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-8 relative", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute left-4 bottom-4 w-32 h-32 bg-emerald-500/5 rounded-2xl -z-10 rotate-12" }), (0, jsx_runtime_1.jsx)("div", { className: "h-px w-full bg-linear-to-r from-surface-secondary via-border to-transparent" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-end gap-6", children: [(0, jsx_runtime_1.jsx)(QRCodeWithAvatar_1.QRCodeWithAvatar, { value: props.data.share_url, avatarUrl: props.data.author_avatar, useDarkTheme: dark, className: "w-65 h-auto rounded-2xl mix-blend-multiply", alt: "QR" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col justify-end h-56 pb-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-muted text-sm font-mono mb-2", children: "SCAN TO VIEW" }), (0, jsx_runtime_1.jsx)("span", { className: "text-3xl font-bold text-foreground/80 leading-none", children: (0, date_fns_1.format)(new Date(), 'HH:mm') }), (0, jsx_runtime_1.jsx)("span", { className: "text-lg text-muted font-medium", children: (0, date_fns_1.format)(new Date(), 'yyyy.MM.dd') })] })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "col-span-8 h-full", children: (0, jsx_runtime_1.jsxs)("div", { className: "h-full bg-surface/60 backdrop-blur-xl rounded-[3rem] p-10 border border-border flex flex-col gap-8 shadow-2xl relative overflow-hidden", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-6 flex-1 min-w-0 mr-6", children: [(0, jsx_runtime_1.jsx)("img", { src: props.data.author_avatar, className: "w-24 h-24 rounded-full border-2 border-surface shadow-md shrink-0", alt: "Author" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-1 min-w-0", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-4xl font-bold text-foreground/90 truncate", title: props.data.author_username, children: props.data.author_username }), (0, jsx_runtime_1.jsxs)("span", { className: "text-xl text-muted font-mono truncate", children: ["\u6296\u97F3\u53F7: ", props.data.author_douyin_id] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "px-6 py-3 bg-surface/80 backdrop-blur-md rounded-full text-muted font-medium text-lg shrink-0", children: ["\u53D1\u5E03\u4E8E ", props.data.create_time.split(' ')[0]] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1 relative rounded-[2.5rem] overflow-hidden group shadow-inner bg-black/5", children: [(0, jsx_runtime_1.jsx)("img", { src: props.data.image_url, className: "w-full h-full object-cover transition-transform duration-700", alt: "Cover" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-x-0 bottom-0 pt-40 pb-12 px-12 bg-linear-to-t from-black/90 via-black/50 to-transparent", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-6 items-start", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Quote, { size: 48, className: "text-emerald-500/90 shrink-0 rotate-180 mt-2" }), (0, jsx_runtime_1.jsx)("div", { className: "text-white text-4xl font-medium leading-relaxed line-clamp-3 drop-shadow-lg tracking-wide", dangerouslySetInnerHTML: { __html: props.data.desc || '分享视频' } })] }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-5 gap-6 z-10", children: [(0, jsx_runtime_1.jsx)(StatItem, { icon: Icons_1.DouyinLikeIcon, value: props.data.dianzan }), (0, jsx_runtime_1.jsx)(StatItem, { icon: Icons_1.DouyinRecommendIcon, value: props.data.tuijian, iconColor: "#13C15A" }), (0, jsx_runtime_1.jsx)(StatItem, { icon: Icons_1.DouyinCommentIcon, value: props.data.pinglun }), (0, jsx_runtime_1.jsx)(StatItem, { icon: Icons_1.DouyinFavoriteIcon, value: props.data.shouchang }), (0, jsx_runtime_1.jsx)(StatItem, { icon: Icons_1.DouyinShareIcon, value: props.data.share })] })] }) })] })] }));
|
|
27
|
+
};
|
|
28
|
+
exports.DouyinRecommendList = DouyinRecommendList;
|
|
29
|
+
/** 统计项小组件 */
|
|
30
|
+
const StatItem = ({ icon: IconComponent, value, iconColor }) => ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center justify-center gap-2 py-6 rounded-3xl bg-surface", children: [(0, jsx_runtime_1.jsx)(IconComponent, { size: 48, color: iconColor, className: "opacity-90" }), (0, jsx_runtime_1.jsx)("span", { className: "text-2xl font-bold text-foreground/70 mt-1", children: value })] }));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const template_react_1 = require("../../../../compat/template-react.js");
|
|
4
|
+
const RecommendList_1 = require("./components/RecommendList");
|
|
5
|
+
exports.default = (0, template_react_1.defineTemplate)({
|
|
6
|
+
name: '推荐列表',
|
|
7
|
+
description: '抖音推荐列表推送模板',
|
|
8
|
+
component: RecommendList_1.DouyinRecommendList,
|
|
9
|
+
validate: (data) => typeof data === 'object' && data !== null && typeof data.share_url === 'string'
|
|
10
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DouyinUserVideoList = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const date_fns_1 = require("date-fns");
|
|
9
|
+
const locale_1 = require("date-fns/locale");
|
|
10
|
+
const react_1 = __importDefault(require("react"));
|
|
11
|
+
const ai_1 = require("react-icons/ai");
|
|
12
|
+
const bi_1 = require("react-icons/bi");
|
|
13
|
+
const fa6_1 = require("react-icons/fa6");
|
|
14
|
+
const md_1 = require("react-icons/md");
|
|
15
|
+
const ri_1 = require("react-icons/ri");
|
|
16
|
+
const DefaultLayout_1 = require("../../../components/DefaultLayout");
|
|
17
|
+
const Icons_1 = require("../../components/Icons");
|
|
18
|
+
/**
|
|
19
|
+
* 格式化数字显示 (使用中文单位:万、亿)
|
|
20
|
+
*/
|
|
21
|
+
const formatCount = (count) => {
|
|
22
|
+
if (count >= 100000000)
|
|
23
|
+
return (count / 100000000).toFixed(1) + '亿';
|
|
24
|
+
if (count >= 10000)
|
|
25
|
+
return (count / 10000).toFixed(1) + '万';
|
|
26
|
+
return count.toString();
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 格式化视频时长显示 (如: 6:20)
|
|
30
|
+
* @param milliseconds 毫秒数
|
|
31
|
+
*/
|
|
32
|
+
const formatDuration = (milliseconds) => {
|
|
33
|
+
const seconds = Math.floor(milliseconds / 1000);
|
|
34
|
+
const mins = Math.floor(seconds / 60);
|
|
35
|
+
const secs = seconds % 60;
|
|
36
|
+
return `${mins}:${secs.toString().padStart(2, '0')}`;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 单个视频卡片组件
|
|
40
|
+
*/
|
|
41
|
+
const VideoCard = ({ video }) => {
|
|
42
|
+
const titleRef = react_1.default.useRef(null);
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "bg-surface rounded-3xl overflow-hidden flex flex-col h-full", children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative bg-foreground overflow-hidden", style: { aspectRatio: '3 / 4' }, children: [(0, jsx_runtime_1.jsx)("img", { src: video.cover, alt: video.title, className: "w-full h-full object-cover" }), video.index && ((0, jsx_runtime_1.jsx)("div", { className: "absolute top-4 left-4 px-6 py-4 rounded-2xl text-4xl font-bold bg-black/40 text-white backdrop-blur-md shadow-lg border border-white/10 z-10", children: video.index })), (0, jsx_runtime_1.jsxs)("div", { className: "absolute top-4 right-4 flex flex-col gap-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "px-6 py-4 rounded-2xl text-4xl bg-white/50 text-black backdrop-blur-xs shadow-lg flex items-center gap-2", children: [video.is_video ? (0, jsx_runtime_1.jsx)(ai_1.AiOutlineVideoCamera, { size: 34 }) : (0, jsx_runtime_1.jsx)(bi_1.BiImage, { size: 34 }), (0, jsx_runtime_1.jsx)("span", { children: video.is_video ? '视频' : '图集' })] }), video.is_top && ((0, jsx_runtime_1.jsxs)("div", { className: "px-6 py-4 rounded-2xl text-4xl bg-warning text-black backdrop-blur-xs shadow-lg flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(ai_1.AiFillPushpin, { size: 34 }), (0, jsx_runtime_1.jsx)("span", { children: "\u7F6E\u9876" })] }))] }), video.is_video && ((0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-4 right-4 px-8 py-3 rounded-2xl text-4xl bg-white/50 text-black backdrop-blur-xs shadow-lg", children: formatDuration(video.duration) })), video.music && ((0, jsx_runtime_1.jsxs)("div", { className: "absolute bottom-4 left-4 flex items-center gap-2 px-6 py-3 rounded-2xl text-xl bg-white/50 text-black backdrop-blur-xs shadow-lg", children: [(0, jsx_runtime_1.jsx)(fa6_1.FaMusic, { size: 34 }), (0, jsx_runtime_1.jsx)("span", { className: "max-w-80 truncate", children: video.music.title })] }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-4 px-8 pb-8 flex flex-col flex-1", children: [(0, jsx_runtime_1.jsx)("h3", { ref: titleRef, className: "text-4xl font-semibold text-foreground line-clamp-2 my-2", children: video.title || '无标题' }), (0, jsx_runtime_1.jsx)("p", { className: "text-3xl text-foreground/70 mb-8", children: (0, date_fns_1.formatDistanceToNow)(new Date(video.create_time * 1000), {
|
|
44
|
+
locale: locale_1.zhCN,
|
|
45
|
+
addSuffix: true
|
|
46
|
+
}) }), (0, jsx_runtime_1.jsx)("div", { className: "mt-auto", children: (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-2 gap-3 text-3xl", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 text-foreground/70", children: [(0, jsx_runtime_1.jsx)(Icons_1.DouyinLikeIcon, { size: 34 }), (0, jsx_runtime_1.jsx)("span", { children: formatCount(video.statistics.like_count) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 text-foreground/70", children: [(0, jsx_runtime_1.jsx)(Icons_1.DouyinCommentIcon, { size: 34 }), (0, jsx_runtime_1.jsx)("span", { children: formatCount(video.statistics.comment_count) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 text-foreground/70", children: [(0, jsx_runtime_1.jsx)(Icons_1.DouyinFavoriteIcon, { size: 34 }), (0, jsx_runtime_1.jsx)("span", { children: formatCount(video.statistics.collect_count) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 text-foreground/70", children: [(0, jsx_runtime_1.jsx)(Icons_1.DouyinShareIcon, { size: 34 }), (0, jsx_runtime_1.jsx)("span", { children: formatCount(video.statistics.share_count) })] })] }) })] })] }));
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* 抖音用户视频列表页面组件
|
|
50
|
+
*/
|
|
51
|
+
const DouyinUserVideoList = (prpos) => {
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(DefaultLayout_1.DefaultLayout, { ...prpos, children: [prpos.data.user.head_image && ((0, jsx_runtime_1.jsxs)("div", { className: "relative w-full overflow-hidden", children: [(0, jsx_runtime_1.jsx)("img", { src: prpos.data.user.head_image, alt: "\u5934\u90E8\u80CC\u666F", className: "w-full h-auto object-cover" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-linear-to-b from-transparent via-surface/40 to-surface" })] })), (0, jsx_runtime_1.jsx)("div", { className: "flex justify-center", children: (0, jsx_runtime_1.jsxs)("div", { className: "px-20", children: [(0, jsx_runtime_1.jsxs)("div", { className: `bg-surface/60 backdrop-blur-xl mb-30 rounded-4xl p-10 relative ${prpos.data.user.head_image ? '-mt-170' : 'mt-35'}`, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-8 pb-8 border-b border-border mb-8", children: [(0, jsx_runtime_1.jsx)("img", { src: prpos.data.user.avatar, alt: prpos.data.user.nickname, className: "w-45 h-auto rounded-2xl object-cover shrink-0" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-6xl font-bold text-foreground", children: prpos.data.user.nickname }), prpos.data.user.verified && (0, jsx_runtime_1.jsx)(ri_1.RiVerifiedBadgeFill, { size: 40, className: "text-accent" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-6 mb-6 text-2xl text-muted", children: [(0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(fa6_1.FaTiktok, { size: 24 }), " \u6296\u97F3\u53F7\uFF1A", prpos.data.user.short_id] }), prpos.data.user.ip_location && ((0, jsx_runtime_1.jsxs)("span", { className: "flex items-center gap-1", children: [(0, jsx_runtime_1.jsx)(md_1.MdLocationOn, { size: 28 }), " ", prpos.data.user.ip_location] }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-8 text-3xl", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(ri_1.RiUserFollowLine, { size: 28, className: "text-muted" }), (0, jsx_runtime_1.jsx)("span", { className: "text-muted", children: "\u5173\u6CE8" }), (0, jsx_runtime_1.jsxs)("span", { className: "font-medium text-4xl text-foreground", children: [" ", formatCount(prpos.data.user.following_count)] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(fa6_1.FaUserGroup, { size: 28, className: "text-muted" }), (0, jsx_runtime_1.jsx)("span", { className: "text-muted", children: "\u7C89\u4E1D" }), (0, jsx_runtime_1.jsxs)("span", { className: "font-medium text-4xl text-foreground", children: [" ", formatCount(prpos.data.user.follower_count)] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(Icons_1.DouyinLikeIcon, { size: 28 }), (0, jsx_runtime_1.jsx)("span", { className: "text-muted", children: "\u83B7\u8D5E" }), (0, jsx_runtime_1.jsxs)("span", { className: "font-medium text-4xl text-foreground", children: [" ", formatCount(prpos.data.user.total_favorited)] })] })] })] })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-3xl text-foreground/80 line-clamp-3", children: prpos.data.user.signature || '这个用户很懒,还没有签名' })] }), prpos.data.timeoutSeconds && ((0, jsx_runtime_1.jsx)("div", { className: "bg-surface/60 backdrop-blur-xl mb-8 rounded-4xl p-6 border border-border/50 shadow-sm flex justify-center items-center", children: (0, jsx_runtime_1.jsxs)("p", { className: "text-3xl text-foreground/80 font-medium flex items-center gap-3", children: [(0, jsx_runtime_1.jsx)(md_1.MdLightbulbOutline, { size: 40, className: "text-warning" }), (0, jsx_runtime_1.jsxs)("span", { children: ["\u8BF7\u5728 ", prpos.data.timeoutSeconds, " \u79D2\u5185\u53D1\u9001 ", (0, jsx_runtime_1.jsxs)("span", { className: "text-accent font-bold", children: ["1~", prpos.data.videos.length] }), ' ', "\u4E4B\u95F4\u7684\u6570\u5B57\u89E3\u6790\u5BF9\u5E94\u4F5C\u54C1\u3002\u4F8B\u5982\u53D1\u9001\u201C1\u201D\u89E3\u6790\u7B2C\u4E00\u4E2A\u4F5C\u54C1"] })] }) })), prpos.data.videos.length > 0 ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { className: "grid grid-cols-2 gap-6 mb-8", children: prpos.data.videos.map((video) => ((0, jsx_runtime_1.jsx)(VideoCard, { video: video }, video.aweme_id))) }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "text-center py-20", children: (0, jsx_runtime_1.jsx)("p", { className: "text-[32px] text-muted", children: "\u6682\u65E0\u89C6\u9891\u5185\u5BB9" }) }))] }) })] }));
|
|
53
|
+
};
|
|
54
|
+
exports.DouyinUserVideoList = DouyinUserVideoList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const template_react_1 = require("../../../../compat/template-react.js");
|
|
4
|
+
const UserVideoList_1 = require("./components/UserVideoList");
|
|
5
|
+
exports.default = (0, template_react_1.defineTemplate)({
|
|
6
|
+
name: '用户主页',
|
|
7
|
+
description: '抖音用户主页信息模板',
|
|
8
|
+
component: UserVideoList_1.DouyinUserVideoList
|
|
9
|
+
});
|