@funhub/platform 0.1.28 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/biz.d.mts +28 -10
- package/dist/biz.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +11 -11
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +1 -1
- package/dist/components/biz/business/banner-carousel/client.mjs +2 -0
- package/dist/components/biz/business/banner-carousel/default-props.mjs +2 -0
- package/dist/components/biz/business/banner-carousel/material.d.mts +22 -0
- package/dist/components/biz/business/banner-carousel/material.mjs +2 -0
- package/dist/components/biz/business/banner-carousel/schema.d.mts +23 -0
- package/dist/components/biz/business/banner-carousel/schema.mjs +2 -0
- package/dist/components/biz/business/banner-carousel/server.d.mts +18 -0
- package/dist/components/biz/business/banner-carousel/server.mjs +2 -0
- package/dist/components/biz/business/channel-list/channel-filter-dialog.mjs +1 -1
- package/dist/components/biz/business/channel-list/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/material.d.mts +4 -2
- package/dist/components/biz/business/channel-list/schema.d.mts +9 -7
- package/dist/components/biz/business/channel-list/schema.mjs +1 -1
- package/dist/components/biz/business/detail/materials/registry.d.mts +34 -28
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/index.d.mts +2 -2
- package/dist/components/biz/business/detail/materials/video-detail-actions/material.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/material.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/server.d.mts +10 -2
- package/dist/components/biz/business/detail/materials/video-detail-info/client.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/index.d.mts +2 -2
- package/dist/components/biz/business/detail/materials/video-detail-info/material.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/server.d.mts +10 -2
- package/dist/components/biz/business/detail/materials/video-detail-info-title/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/index.d.mts +2 -2
- package/dist/components/biz/business/detail/materials/video-detail-info-title/material.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/server.d.mts +10 -2
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/index.d.mts +2 -2
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.d.mts +10 -2
- package/dist/components/biz/business/detail/materials/video-detail-player/client.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/index.d.mts +2 -2
- package/dist/components/biz/business/detail/materials/video-detail-player/material.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/material.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/server.d.mts +10 -2
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/index.d.mts +2 -2
- package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +2 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.d.mts +23 -23
- package/dist/components/biz/business/detail/materials/video-detail-recommend/server.d.mts +10 -2
- package/dist/components/biz/business/floating-ball/client.d.mts +1 -1
- package/dist/components/biz/business/floating-ball/material.d.mts +2 -1
- package/dist/components/biz/business/floating-ball/server.d.mts +11 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/index.d.mts +2 -2
- package/dist/components/biz/business/header-search/header-avatar-icon/material.d.mts +2 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/material.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/server.d.mts +10 -2
- package/dist/components/biz/business/header-search/header-avatar-logo-search/index.d.mts +2 -2
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +2 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/server.d.mts +10 -2
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/index.d.mts +2 -2
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +2 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.d.mts +10 -2
- package/dist/components/biz/business/header-search/header-logo-search/index.d.mts +2 -2
- package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +2 -1
- package/dist/components/biz/business/header-search/header-logo-search/material.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/server.d.mts +10 -2
- package/dist/components/biz/business/header-search/header-search/index.d.mts +2 -2
- package/dist/components/biz/business/header-search/header-search/material.d.mts +2 -1
- package/dist/components/biz/business/header-search/header-search/material.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/server.d.mts +10 -2
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/inspector-schema.d.mts +5 -5
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.d.mts +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/schema/component.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.d.mts +5 -5
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.d.mts +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.mjs +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.mjs +1 -1
- package/dist/components/biz/business/index.d.mts +27 -8
- package/dist/components/biz/business/index.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.d.mts +1 -1
- package/dist/components/biz/business/large-feature-grid/material.d.mts +2 -1
- package/dist/components/biz/business/large-feature-grid/server.d.mts +11 -0
- package/dist/components/biz/business/marquee/index.d.mts +2 -2
- package/dist/components/biz/business/marquee/material.d.mts +2 -1
- package/dist/components/biz/business/marquee/material.mjs +1 -1
- package/dist/components/biz/business/marquee/schema.d.mts +14 -14
- package/dist/components/biz/business/profile/index.d.mts +21 -0
- package/dist/components/biz/business/profile/profile-header/client.d.mts +19 -0
- package/dist/components/biz/business/profile/profile-header/client.mjs +2 -0
- package/dist/components/biz/business/profile/profile-header/index.d.mts +5 -0
- package/dist/components/biz/business/profile/profile-header/material.d.mts +9 -1
- package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/schema.d.mts +40 -0
- package/dist/components/biz/business/profile/profile-header/schema.mjs +2 -0
- package/dist/components/biz/business/profile/profile-header/server.d.mts +33 -0
- package/dist/components/{pages/profile/_components/user-profile-header → biz/business/profile/profile-header}/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +2 -0
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/client.d.mts +17 -0
- package/dist/components/biz/business/profile/profile-main/client.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/index.d.mts +16 -0
- package/dist/components/biz/business/profile/profile-main/material.d.mts +14 -1
- package/dist/components/biz/business/profile/profile-main/material.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/schema.d.mts +55 -0
- package/dist/components/biz/business/profile/profile-main/schema.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/server.d.mts +11 -0
- package/dist/components/biz/business/profile/profile-main/server.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/shell.d.mts +25 -0
- package/dist/components/biz/business/profile/profile-main/shell.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.d.mts +25 -0
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/index.d.mts +3 -0
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.d.mts +54 -0
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.d.mts +19 -0
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/index.d.mts +3 -0
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/server.d.mts +48 -0
- package/dist/components/{pages/profile/_components → biz/business/profile/profile-main}/tabs/history-tab/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/index.d.mts +13 -0
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +76 -0
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/index.d.mts +3 -0
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/server.d.mts +39 -0
- package/dist/components/{pages/profile/_components → biz/business/profile/profile-main}/tabs/like-tab/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.d.mts +30 -0
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/index.d.mts +3 -0
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/server.d.mts +33 -0
- package/dist/components/{pages/profile/_components → biz/business/profile/profile-main}/tabs/publish-tab/server.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/utils.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/variants.d.mts +32 -0
- package/dist/components/biz/business/profile/profile-main/variants.mjs +2 -0
- package/dist/components/biz/business/search-history/client.d.mts +7 -7
- package/dist/components/biz/business/search-history/client.mjs +1 -1
- package/dist/components/biz/business/search-history/index.d.mts +4 -4
- package/dist/components/biz/business/search-history/material.d.mts +3 -2
- package/dist/components/biz/business/search-history/material.mjs +1 -1
- package/dist/components/biz/business/search-history/schema.d.mts +8 -8
- package/dist/components/biz/business/search-history/server.d.mts +4 -4
- package/dist/components/biz/business/search-history/server.mjs +1 -1
- package/dist/components/biz/business/search-input/client.d.mts +2 -2
- package/dist/components/biz/business/search-input/client.mjs +1 -1
- package/dist/components/biz/business/search-input/index.d.mts +2 -2
- package/dist/components/biz/business/search-input/material.d.mts +2 -1
- package/dist/components/biz/business/search-input/material.mjs +1 -1
- package/dist/components/biz/business/search-input/schema.d.mts +5 -5
- package/dist/components/biz/business/shortcut-grid/client.d.mts +1 -1
- package/dist/components/biz/business/shortcut-grid/material.d.mts +2 -1
- package/dist/components/biz/business/shortcut-grid/schema.d.mts +11 -11
- package/dist/components/biz/business/shortcut-grid/server.d.mts +11 -0
- package/dist/components/biz/business/tab-bar/index.d.mts +2 -2
- package/dist/components/biz/business/tab-bar/material.d.mts +2 -1
- package/dist/components/biz/business/tab-bar/material.mjs +1 -1
- package/dist/components/biz/business/tab-bar/schema.d.mts +9 -9
- package/dist/components/biz/business/text-recommend/client.d.mts +2 -2
- package/dist/components/biz/business/text-recommend/client.mjs +1 -1
- package/dist/components/biz/business/text-recommend/index.d.mts +2 -2
- package/dist/components/biz/business/text-recommend/material.d.mts +2 -1
- package/dist/components/biz/business/text-recommend/material.mjs +1 -1
- package/dist/components/biz/business/text-recommend/schema.d.mts +6 -6
- package/dist/components/biz/business/video-horizontal-list/client.d.mts +5 -14
- package/dist/components/biz/business/video-horizontal-list/client.mjs +1 -1
- package/dist/components/biz/business/video-horizontal-list/index.d.mts +2 -2
- package/dist/components/biz/business/video-horizontal-list/material.d.mts +12 -2
- package/dist/components/biz/business/video-horizontal-list/material.mjs +1 -1
- package/dist/components/biz/business/video-horizontal-list/schema.d.mts +21 -3
- package/dist/components/biz/business/video-horizontal-list/schema.mjs +1 -1
- package/dist/components/biz/business/video-horizontal-list/server.d.mts +1 -1
- package/dist/components/biz/business/video-horizontal-list/server.mjs +1 -1
- package/dist/components/biz/example/button/index.d.mts +2 -2
- package/dist/components/biz/example/button/material.d.mts +2 -1
- package/dist/components/biz/example/button/schema.d.mts +14 -14
- package/dist/components/biz/renderer/renderer.d.mts +3 -3
- package/dist/components/biz/renderer/renderer.mjs +1 -1
- package/dist/components/pages/profile/page.mjs +1 -1
- package/dist/components/pages/search/page-client.mjs +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/materials.d.mts +4 -4
- package/dist/materials.mjs +1 -1
- package/dist/utils/schema/inspector.d.mts +111 -111
- package/dist/utils/schema/material.d.mts +13 -11
- package/dist/utils/schema/schema.d.mts +26 -26
- package/dist/utils/schema/utils.d.mts +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +1 -1
- package/dist/assets/images/Frame.mjs +0 -2
- package/dist/components/pages/profile/_components/tabs/collect-tab/client.mjs +0 -2
- package/dist/components/pages/profile/_components/tabs/collect-tab/server.mjs +0 -2
- package/dist/components/pages/profile/_components/tabs/history-tab/client.mjs +0 -2
- package/dist/components/pages/profile/_components/tabs/like-tab/client.mjs +0 -2
- package/dist/components/pages/profile/_components/tabs/publish-tab/client.mjs +0 -2
- package/dist/components/pages/profile/_components/user-profile-header/client.mjs +0 -2
- package/dist/components/pages/profile/_components/user-profile-header/user-profile-avatar.mjs +0 -2
- package/dist/components/pages/profile/_components/user-profile-header/user-profile-cover-background.mjs +0 -2
- package/dist/components/pages/profile/_components/user-profile-main/server.mjs +0 -2
- package/dist/components/pages/profile/_components/user-profile-main/shell.mjs +0 -2
- package/dist/components/pages/profile/utils.mjs +0 -2
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
import { PrefetchItem } from "../../../../../../../hooks/query/hydration-boundary.mjs";
|
|
3
|
+
import "../../../../../../../hooks.mjs";
|
|
4
|
+
import { LikeTabProps } from "./client.mjs";
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region components/biz/business/profile/profile-main/tabs/like-tab/server.d.ts
|
|
8
|
+
interface BuildLikeTabPrefetchParams {
|
|
9
|
+
/** Query Key 前缀。 */
|
|
10
|
+
queryKeyPrefix: Array<string | number | undefined>;
|
|
11
|
+
/** 目标用户 ID。 */
|
|
12
|
+
targetUserId?: string;
|
|
13
|
+
/** 当前激活的点赞子 Tab。 */
|
|
14
|
+
resolvedLikeTab: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 构建点赞 Tab 首屏预取任务。
|
|
18
|
+
*/
|
|
19
|
+
declare function buildLikeTabPrefetch({
|
|
20
|
+
queryKeyPrefix,
|
|
21
|
+
targetUserId,
|
|
22
|
+
resolvedLikeTab
|
|
23
|
+
}: BuildLikeTabPrefetchParams): PrefetchItem[];
|
|
24
|
+
interface LikeTabServerProps extends LikeTabProps {
|
|
25
|
+
/** 外部透传的预取任务。 */
|
|
26
|
+
prefetch?: PrefetchItem[];
|
|
27
|
+
/** 当前激活的点赞子 Tab。 */
|
|
28
|
+
resolvedLikeTab?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 点赞 Tab 服务端包装组件。
|
|
32
|
+
*/
|
|
33
|
+
declare function LikeTabServer({
|
|
34
|
+
prefetch,
|
|
35
|
+
resolvedLikeTab,
|
|
36
|
+
...props
|
|
37
|
+
}: LikeTabServerProps): react_jsx_runtime0.JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { BuildLikeTabPrefetchParams, LikeTabServer, buildLikeTabPrefetch };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{HydrationBoundary as e}from"
|
|
2
|
+
import{HydrationBoundary as e}from"../../../../../../../hooks/query/hydration-boundary.mjs";import{getLikeData as t,likeContentType as n}from"../../utils.mjs";import{LikeTab as r}from"./client.mjs";import{jsx as i}from"react/jsx-runtime";function a({queryKeyPrefix:e,targetUserId:r,resolvedLikeTab:i}){if(!r)return[];let a=i===`post`;return[{type:`infinite`,queryKey:a?[...e,`user-like-post`]:[...e,`user-like-video`],async queryFn(e){return t({targetUserId:r,page:e,contentType:a?n.post:n.video})},initialPageParam:1,getNextPageParam(){}}]}function o({prefetch:t,resolvedLikeTab:n=`video`,...o}){return i(e,{prefetch:t??a({queryKeyPrefix:o.queryKeyPrefix??[],targetUserId:o.targetUserId,resolvedLikeTab:n}),children:i(r,{...o})})}export{o as LikeTabServer,a as buildLikeTabPrefetch};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region components/biz/business/profile/profile-main/tabs/publish-tab/client.d.ts
|
|
5
|
+
interface PublishTabUserInfo {
|
|
6
|
+
/** 用户名 */
|
|
7
|
+
name?: string;
|
|
8
|
+
/** 头像 */
|
|
9
|
+
avatar?: string;
|
|
10
|
+
}
|
|
11
|
+
interface PublishTabProps {
|
|
12
|
+
/** 目标用户 ID。 */
|
|
13
|
+
targetUserId?: string;
|
|
14
|
+
/** Query Key 前缀 */
|
|
15
|
+
queryKeyPrefix?: Array<string | number | undefined>;
|
|
16
|
+
/** 内容缺少用户信息时的兜底数据 */
|
|
17
|
+
fallbackUserInfo?: PublishTabUserInfo;
|
|
18
|
+
/** 是否为本人视角。 */
|
|
19
|
+
isMine?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 发布内容 Tab 页。
|
|
23
|
+
*/
|
|
24
|
+
declare function PublishTab({
|
|
25
|
+
targetUserId,
|
|
26
|
+
queryKeyPrefix,
|
|
27
|
+
isMine
|
|
28
|
+
}: PublishTabProps): react_jsx_runtime0.JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { PublishTab, PublishTabProps, PublishTabUserInfo };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{pCommunityDeleteContent as e}from"../../../../../../../service/generated/client.mjs";import{DeleteConfirmDialog as t}from"../../../../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{useDeleteRequest as n,useMutation as r,usePaginated as i,useUpdateRequest as a}from"../../../../../../../hooks/query/use-query.mjs";import{useAppContext as o}from"../../../../../../../hooks/use-app-context/index.mjs";import{UserActivityList as s}from"../../../../../../common/list/user-activity-list/user-activity-list.mjs";import{getPublishData as c}from"../../utils.mjs";import{useState as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{toast as p}from"sonner";import{useTranslations as m}from"next-intl";function h(e,t,n){if(!e)return e;let r=0,i=e.pages.map(e=>({page:e,filteredList:(e.data?.list??[]).filter(e=>{let i=n(e)??``,a=t.has(i);return a&&(r+=1),!a})}));return{...e,pages:i.map(({page:e,filteredList:t})=>{if(!e.data)return e;let n=typeof e.data.total==`number`?Math.max(0,e.data.total-r):e.data.total;return{...e,data:{...e.data,list:t,total:n}}})}}function g({targetUserId:g,queryKeyPrefix:_,isMine:v=!1}){let y=m(`components.pages.profile.components.tabs`),b=o()===`renderer`,x=_??[],S=n(),C=a(),[w,T]=l(null),{mutateAsync:E,isPending:D}=r(async t=>await e({content_id:t})),{data:O,isFetching:k,fetchNextPage:A,hasNextPage:j}=i({key:[...x,`user-publish`],initialPageParam:1,async queryFn(e){return c({targetUserId:g,page:e})},options:{staleTime:0,enabled:b},getNextPageParam(e,t){let n=e?.data||{},r=n.list||[];if(typeof n.has_more==`boolean`)return n.has_more?t.length+1:void 0;if(!(r.length===0||n.total===0))return t.length+1}}),M=O?.pages.flatMap(e=>(e?.data||{}).list||[])??[];function N(e){T(e)}function P(){T(null)}async function F(){if(!(!w||D))try{await E(w);let e=new Set([w]);C([...x,`user-publish`],t=>h(t,e,e=>e.content_id)),p.success(y(`publishTab.deleteSuccess`)),T(null)}catch(e){console.error(`删除内容失败`,e),p.error(y(`publishTab.deleteFailed`))}}let I=M.map(e=>({...e,isDeleting:D&&w===e.content_id,onDelete:()=>N(e.content_id??``)})),L=async()=>{b&&await A()};function R(){S([...x,`user-publish`]),S(x)}function z(e){console.log(`分享到微信:`,e)}function B(e){console.log(`分享到QQ:`,e)}function V(e){console.log(`分享到朋友圈:`,e)}return f(u,{children:[d(s,{list:I,loading:k,hasMore:j,loadMore:L,canEdit:v,showGroupHeaders:!1,emptyText:y(`publishTab.emptyText`),onActionSuccess:R,onShareWeChat:z,onShareQQ:B,onShareMoments:V}),d(t,{open:!!w,onOpenChange:e=>!e&&P(),onCancel:P,onConfirm:F,isConfirming:D})]})}export{g as PublishTab};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
import { PrefetchItem } from "../../../../../../../hooks/query/hydration-boundary.mjs";
|
|
3
|
+
import "../../../../../../../hooks.mjs";
|
|
4
|
+
import { PublishTabProps } from "./client.mjs";
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region components/biz/business/profile/profile-main/tabs/publish-tab/server.d.ts
|
|
8
|
+
interface BuildPublishTabPrefetchParams {
|
|
9
|
+
/** Query Key 前缀。 */
|
|
10
|
+
queryKeyPrefix: Array<string | number | undefined>;
|
|
11
|
+
/** 目标用户 ID。 */
|
|
12
|
+
targetUserId?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 构建发布 Tab 首屏预取任务。
|
|
16
|
+
*/
|
|
17
|
+
declare function buildPublishTabPrefetch({
|
|
18
|
+
queryKeyPrefix,
|
|
19
|
+
targetUserId
|
|
20
|
+
}: BuildPublishTabPrefetchParams): PrefetchItem[];
|
|
21
|
+
interface PublishTabServerProps extends PublishTabProps {
|
|
22
|
+
/** 外部透传的预取任务。 */
|
|
23
|
+
prefetch?: PrefetchItem[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 发布 Tab 服务端包装组件。
|
|
27
|
+
*/
|
|
28
|
+
declare function PublishTabServer({
|
|
29
|
+
prefetch,
|
|
30
|
+
...props
|
|
31
|
+
}: PublishTabServerProps): react_jsx_runtime0.JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { BuildPublishTabPrefetchParams, PublishTabServer, buildPublishTabPrefetch };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{HydrationBoundary as e}from"
|
|
2
|
+
import{HydrationBoundary as e}from"../../../../../../../hooks/query/hydration-boundary.mjs";import{getPublishData as t}from"../../utils.mjs";import{PublishTab as n}from"./client.mjs";import{jsx as r}from"react/jsx-runtime";function i({queryKeyPrefix:e,targetUserId:n}){return n?[{type:`infinite`,queryKey:[...e,`user-publish`],async queryFn(e){return t({targetUserId:n,page:e})},initialPageParam:1,getNextPageParam(){}}]:[]}function a({prefetch:t,...a}){return r(e,{prefetch:t??i({queryKeyPrefix:a.queryKeyPrefix??[],targetUserId:a.targetUserId}),children:r(n,{...a})})}export{a as PublishTabServer,i as buildPublishTabPrefetch};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{gCommunityGetContentList as e,gInteractionGetBrowseList as t,gInteractionGetLikeList as n}from"../../../../../service/generated/client.mjs";import r from"dayjs";const i=10,a={video:1,post:2};function o(e){if(e.cover_image)return e.cover_image;let t=``;return e.medias?.find(e=>e?(!e.is_video&&!t&&e.media_url&&(t=e.media_url),!!e.cover_image):!1)?.cover_image||t}function s(e,t){let n=e.name,i=r(t?t?.[e.content_id||``]?.create_time:e.create_time).toDate().getTime(),a=o(e);return{id:e.content_id||``,content_play_progress:{percent:0,series_num:0},detail:{user_info:{name:e.author?.nickname,avatar:e.author?.avatar},info:{name:n,content_id:e.content_id,user_id:e.user_id,content:e.content,tags:e.tags,cover_image:a,like_count:e.like_count,dislike_count:e.dislike_count,comment_count:e.comment_count,share_count:e.share_count,view_count:e.view_count,create_time:e.create_time,update_time:e.update_time,author:e.author?{user_id:e.author.user_id,username:e.author.username,nickname:e.author.nickname,avatar_url:e.author.avatar}:void 0},statics_cnt:{browse_cnt:e.view_count||0},publish_time:i,parent_content_info:{type:0}}}}function c(e,t){let n=e.is_more_link,i=r(t?t?.[e.id||``]?.create_time:e.show_at).toDate().getTime(),a=Number(e.duration??0),o=Number.isFinite(a)?Math.max(0,Math.floor(a)):0;return{id:e.id||``,content_play_progress:{percent:0,series_num:0},detail:{user_info:{name:e.source_username||e.up_user||e.director||e.actor,avatar:void 0},info:{is_more_link:n,name:e.name,content_id:e.id,content:e.description,tags:e.tags?.map(e=>e.name).filter(e=>!!e),cover_image:e.img_y||e.img_x,create_time:e.show_at,video_duration:o},statics_cnt:{browse_cnt:e.play_count||0},publish_time:i,parent_content_info:{type:0}}}}function l(e,t){let n=e.name,i=e.is_more_link,a=t[e.content_id||``].browse_time,s=r(a).toDate().getTime(),c=o(e);return{id:e.content_id||``,content_play_progress:{percent:0,series_num:0},detail:{user_info:{name:e.author?.nickname,avatar:e.author?.avatar},info:{is_more_link:i,name:n||e.content,title:n||e.content,content_id:e.content_id,user_id:e.user_id,content:e.content,tags:e.tags,cover_image:c,like_count:e.like_count,dislike_count:e.dislike_count,comment_count:e.comment_count,share_count:e.share_count,view_count:e.view_count,create_time:e.create_time,update_time:e.update_time,author:e.author?{user_id:e.author.user_id,username:e.author.username,nickname:e.author.nickname,avatar_url:e.author.avatar}:void 0},statics_cnt:{browse_cnt:e.view_count||0},publish_time:s,parent_content_info:{type:0}}}}function u(e,t){let n=e.is_more_link,i=t[e.id||``].browse_time,a=r(i).toDate().getTime(),o=Number(e.duration??0),s=Number.isFinite(o)?Math.max(0,Math.floor(o)):0,c=t[e.id||``]?.browse_duration||0,l=Number(t[e.id||``]?.browse_episode),u=0,d=0;return Number.isNaN(l)||(u=l),s&&c&&(d=Math.min(100,Math.floor(c/s*100))),{id:e.id||``,content_play_progress:{percent:d,series_num:u},detail:{user_info:{name:e.source_username||e.up_user||e.director||e.actor,avatar:void 0},info:{is_more_link:n,name:e.name,content_id:e.id,content:e.description,tags:e.tags?.map(e=>e.name).filter(e=>!!e),cover_image:e.img_y||e.img_x,create_time:e.show_at,video_duration:s},statics_cnt:{browse_cnt:e.play_count||0},publish_time:a,parent_content_info:{type:0}}}}async function d({targetUserId:t,page:n,pageSize:r=10}){if(!t)return{data:{list:[],total:0}};let i=await e({user_id:t,page:n,page_size:r}),a=i.data?.data?.contents??[];return{data:{list:a,total:i.data?.data?.total??a.length,has_more:i.data?.data?.has_more?!0:void 0}}}async function f({targetUserId:e,page:t,contentType:r,pageSize:i=10}){if(!e)return{data:{list:[],total:0}};let o=await n({user_id:e,page:t,content_type:r,page_size:i}),l=o.data.like_infos?.reduce((e,t)=>(t.content_id&&(e[t.content_id]=t),e),{})||{},u=r===a.post?(o.data?.post_infos??[]).map(e=>s(e,l)):(o.data?.video_infos??[]).map(e=>c(e,l)),d=o.data?.has_more,f=typeof d==`boolean`?d:void 0;return{data:{list:u,total:o.data?.total??u.length,has_more:f}}}async function p({targetUserId:e,page:n,contentType:r,pageSize:i=10,authConfig:o}){if(!e)return{data:{list:[],total:0}};let s=await t({user_id:e,page:n,page_size:i,content_type:r},o),c=s.data.records?.reduce((e,t)=>(t.content_id&&(e[t.content_id]=t),e),{})||{},d=r===a.post?(s.data?.post_infos??[]).map(e=>l(e,c)):(s.data?.video_infos??[]).map(e=>u(e,c)),f=s.data?.has_more?!0:void 0;return{data:{list:d,total:s.data?.total??d.length,has_more:f}}}export{i as defaultPageSize,p as getHistoryData,f as getLikeData,d as getPublishData,a as likeContentType};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
//#region components/biz/business/profile/profile-main/variants.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* 个人主页主 Tab(本人视角)。
|
|
5
|
+
*/
|
|
6
|
+
declare const profileMainMineTabOptions: readonly ["collect", "publish", "like", "history"];
|
|
7
|
+
/**
|
|
8
|
+
* 个人主页主 Tab(他人视角)。
|
|
9
|
+
*/
|
|
10
|
+
declare const profileMainProfileTabOptions: readonly ["collect", "publish", "like"];
|
|
11
|
+
/**
|
|
12
|
+
* 物料主 Tab 可选项。
|
|
13
|
+
*/
|
|
14
|
+
declare const profileMainTabOptions: readonly ["collect", "publish", "like", "history"];
|
|
15
|
+
/**
|
|
16
|
+
* 点赞子 Tab 可选项。
|
|
17
|
+
*/
|
|
18
|
+
declare const profileMainLikeTabOptions: readonly ["video", "post"];
|
|
19
|
+
/**
|
|
20
|
+
* 历史子 Tab 可选项。
|
|
21
|
+
*/
|
|
22
|
+
declare const profileMainHistoryTabOptions: readonly ["video", "post"];
|
|
23
|
+
/**
|
|
24
|
+
* 收藏子 Tab 可选项。
|
|
25
|
+
*/
|
|
26
|
+
declare const profileMainCollectTabOptions: readonly ["video", "post", "collection"];
|
|
27
|
+
/**
|
|
28
|
+
* 收藏合集子 Tab 可选项。
|
|
29
|
+
*/
|
|
30
|
+
declare const profileMainCollectCollectionTabOptions: readonly ["created", "subscribed"];
|
|
31
|
+
//#endregion
|
|
32
|
+
export { profileMainCollectCollectionTabOptions, profileMainCollectTabOptions, profileMainHistoryTabOptions, profileMainLikeTabOptions, profileMainMineTabOptions, profileMainProfileTabOptions, profileMainTabOptions };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
const e=[`collect`,`publish`,`like`,`history`],t=[`collect`,`publish`,`like`],n=e,r=[`video`,`post`],i=[`video`,`post`],a=[`video`,`post`,`collection`],o=[`created`,`subscribed`];export{o as profileMainCollectCollectionTabOptions,a as profileMainCollectTabOptions,i as profileMainHistoryTabOptions,r as profileMainLikeTabOptions,e as profileMainMineTabOptions,t as profileMainProfileTabOptions,n as profileMainTabOptions};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { SearchHistoryProps } from "./schema.mjs";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region components/biz/business/search-history/client.d.ts
|
|
6
|
-
interface
|
|
7
|
-
clearText
|
|
8
|
-
confirmDescription
|
|
6
|
+
interface SearchHistoryClientProps extends SearchHistoryProps {
|
|
7
|
+
clearText?: string;
|
|
8
|
+
confirmDescription?: string;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* 搜索历史物料组件 - 客户端交互部分
|
|
12
12
|
*/
|
|
13
|
-
declare function
|
|
13
|
+
declare function SearchHistoryClient({
|
|
14
14
|
rows,
|
|
15
15
|
title,
|
|
16
16
|
clearText,
|
|
17
17
|
confirmDescription,
|
|
18
18
|
storageKey,
|
|
19
19
|
onHistoryClick
|
|
20
|
-
}:
|
|
20
|
+
}: SearchHistoryClientProps): react_jsx_runtime0.JSX.Element | null;
|
|
21
21
|
//#endregion
|
|
22
|
-
export {
|
|
22
|
+
export { SearchHistoryClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{updateUrlParams as e}from"../../../../utils/common.mjs";import{useUserStore as t}from"../../../../store/modules/user-store.mjs";import{DeleteConfirmDialog as n}from"../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{useSearchHistory as r}from"../../../../hooks/use-search-history.mjs";import{useRouter as i}from"next/navigation";import{useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({rows:c,title:l,clearText:u
|
|
2
|
+
"use client";import{updateUrlParams as e}from"../../../../utils/common.mjs";import{useUserStore as t}from"../../../../store/modules/user-store.mjs";import{DeleteConfirmDialog as n}from"../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{useSearchHistory as r}from"../../../../hooks/use-search-history.mjs";import{useRouter as i}from"next/navigation";import{useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({rows:c,title:l,clearText:u=`清理`,confirmDescription:d=`确认删除全部搜索历史吗?`,storageKey:f,onHistoryClick:p}){let{userInfo:m}=t(),h=f||m?.user_id||`guest`,g=i(),[_,v]=a(!1),{history:y,clearHistory:b}=r({storageKey:h});return y.length===0?null:s(`div`,{className:`w-full bg-transparent pt-[12px] px-[12px] relative z-0`,children:[s(`div`,{className:`w-full flex items-center justify-between mb-[12px]`,children:[o(`span`,{className:`text-[16px] font-bold text-text1`,children:l}),s(`div`,{onClick:()=>v(!0),className:`cursor-pointer flex items-center gap-[4px]`,children:[o(`span`,{className:`text-text2 text-[14px] font-normal leading-[22px] text-right`,style:{fontFamily:`"Source Code Pro"`},children:u}),o(`svg`,{className:`w-[12px] h-[12px] text-text3`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:o(`path`,{d:`M4.8295 0C4.71306 0 4.60139 0.0511359 4.51905 0.142158C4.43671 0.233181 4.39046 0.356633 4.39046 0.485358V2.5889H0.439046C0.322604 2.5889 0.210931 2.64004 0.128594 2.73106C0.0462565 2.82208 0 2.94553 0 3.07426V5.66316C0 5.79189 0.0462565 5.91534 0.128594 6.00636C0.210931 6.09738 0.322604 6.14852 0.439046 6.14852H0.878092V11.5146C0.878092 11.6434 0.924348 11.7668 1.00669 11.8578C1.08902 11.9489 1.2007 12 1.31714 12H10.6829C10.7993 12 10.911 11.9489 10.9933 11.8578C11.0757 11.7668 11.1219 11.6434 11.1219 11.5146V6.14852H11.561C11.6774 6.14852 11.7891 6.09738 11.8714 6.00636C11.9537 5.91534 12 5.79189 12 5.66316V3.07426C12 2.94553 11.9537 2.82208 11.8714 2.73106C11.7891 2.64004 11.6774 2.5889 11.561 2.5889H7.60954V0.485358C7.60954 0.356633 7.56328 0.233181 7.48095 0.142158C7.39861 0.0511359 7.28694 0 7.1705 0H4.8295ZM10.2438 11.0293H8.78092V9.54603C8.78092 9.4173 8.73466 9.29385 8.65232 9.20283C8.56999 9.1118 8.45831 9.06067 8.34187 9.06067C8.22543 9.06067 8.11376 9.1118 8.03142 9.20283C7.94908 9.29385 7.90282 9.4173 7.90282 9.54603V11.0293H6.43905V9.54117C6.43905 9.41245 6.39279 9.289 6.31045 9.19797C6.22812 9.10695 6.11644 9.05582 6 9.05582C5.88356 9.05582 5.77188 9.10695 5.68955 9.19797C5.60721 9.289 5.56095 9.41245 5.56095 9.54117V11.0303H4.09718V9.547C4.09718 9.41827 4.05092 9.29482 3.96858 9.2038C3.88624 9.11278 3.77457 9.06164 3.65813 9.06164C3.54169 9.06164 3.43001 9.11278 3.34768 9.2038C3.26534 9.29482 3.21908 9.41827 3.21908 9.547V11.0303H1.75618V6.17667H10.2438V11.0303V11.0293ZM5.26855 3.07426V0.970717H6.73145V3.07426C6.73145 3.20298 6.77771 3.32644 6.86004 3.41746C6.94238 3.50848 7.05405 3.55962 7.1705 3.55962H11.1219V5.1778H0.878092V3.55962H4.8295C4.94595 3.55962 5.05762 3.50848 5.13996 3.41746C5.22229 3.32644 5.26855 3.20298 5.26855 3.07426Z`,fill:`currentColor`})})]})]}),o(`div`,{className:`w-full overflow-hidden ${c===`1`?`h-[30px]`:c===`2`?`h-[72px]`:`h-[114px]`}`,children:o(`ul`,{className:`list-none m-0 p-0 w-full flex flex-wrap gap-[12px]`,children:y.map((t,n)=>o(`li`,{className:`h-[30px] px-[12px] bg-bg2 rounded-[4px] flex items-center justify-center cursor-pointer`,onClick:()=>{p?p(t):(e({q:t}),g.push(`${window.location.pathname}?q=${encodeURIComponent(t)}`))},children:o(`div`,{className:`text-text1 text-[14px] max-w-[124px] truncate`,children:t.length>8?`${t.slice(0,8)}...`:t})},`${t}-${n}`))})}),o(n,{open:_,onOpenChange:v,onConfirm:()=>{b(),v(!1)},title:``,description:d})]})}export{c as SearchHistoryClient};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { SearchHistoryInspectorProps, SearchHistoryProps, searchHistoryInspectorDefaultProps, searchHistoryInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
+
import { SearchHistoryClient } from "./client.mjs";
|
|
4
|
+
import { SearchHistoryServer } from "./server.mjs";
|
|
5
|
+
import { searchHistoryMaterial } from "./material.mjs";
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
4
4
|
import "../../../../utils.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { SearchHistoryClient } from "./client.mjs";
|
|
6
|
+
import { SearchHistoryServer } from "./server.mjs";
|
|
6
7
|
import * as zod from "zod";
|
|
7
8
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
8
9
|
|
|
9
10
|
//#region components/biz/business/search-history/material.d.ts
|
|
10
|
-
declare const searchHistoryMaterial: DefineMaterialOption<typeof
|
|
11
|
+
declare const searchHistoryMaterial: DefineMaterialOption<typeof SearchHistoryServer, typeof SearchHistoryClient, zod.ZodObject<{
|
|
11
12
|
title: zod.ZodString & SchemaHasDefaultValue;
|
|
12
13
|
rows: zod.ZodType<"2" | "1" | "3", unknown, zod_v4_core0.$ZodTypeInternals<"2" | "1" | "3", unknown>> & SchemaHasDefaultValue;
|
|
13
14
|
}, zod_v4_core0.$strip>, "search-history">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{
|
|
2
|
+
import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{SearchHistoryClient as t}from"./client.mjs";import{searchHistoryInspectorPropsSchema as n}from"./schema.mjs";import{SearchHistoryServer as r}from"./server.mjs";const i=e({type:`search-history`,name:`搜索历史`,icon:`/static/components-thumb/search_history.png`,category:`行为组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as searchHistoryMaterial};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import "../../../../utils.mjs";
|
|
4
|
-
import z from "zod";
|
|
4
|
+
import z$1 from "zod";
|
|
5
5
|
|
|
6
6
|
//#region components/biz/business/search-history/schema.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* 搜索历史物料属性定义
|
|
9
9
|
*/
|
|
10
|
-
declare const searchHistoryInspectorPropsSchema: z.ZodObject<{
|
|
11
|
-
title: z.ZodString & SchemaHasDefaultValue;
|
|
12
|
-
rows: z.ZodType<"2" | "1" | "3", unknown, z.core.$ZodTypeInternals<"2" | "1" | "3", unknown>> & SchemaHasDefaultValue;
|
|
13
|
-
}, z.core.$strip>;
|
|
10
|
+
declare const searchHistoryInspectorPropsSchema: z$1.ZodObject<{
|
|
11
|
+
title: z$1.ZodString & SchemaHasDefaultValue;
|
|
12
|
+
rows: z$1.ZodType<"2" | "1" | "3", unknown, z$1.core.$ZodTypeInternals<"2" | "1" | "3", unknown>> & SchemaHasDefaultValue;
|
|
13
|
+
}, z$1.core.$strip>;
|
|
14
14
|
declare const searchHistoryInspectorDefaultProps: {
|
|
15
15
|
title: string;
|
|
16
16
|
rows: "2" | "1" | "3";
|
|
17
17
|
};
|
|
18
|
-
type
|
|
19
|
-
type
|
|
18
|
+
type SearchHistoryInspectorProps = z$1.infer<typeof searchHistoryInspectorPropsSchema>;
|
|
19
|
+
type SearchHistoryProps = SearchHistoryInspectorProps & {
|
|
20
20
|
storageKey?: string;
|
|
21
21
|
onHistoryClick?: (keyword: string) => void;
|
|
22
22
|
};
|
|
23
23
|
//#endregion
|
|
24
|
-
export {
|
|
24
|
+
export { SearchHistoryInspectorProps, SearchHistoryProps, searchHistoryInspectorDefaultProps, searchHistoryInspectorPropsSchema };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { SearchHistoryProps } from "./schema.mjs";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region components/biz/business/search-history/server.d.ts
|
|
6
6
|
/**
|
|
7
|
-
* 搜索历史物料组件 (search-
|
|
7
|
+
* 搜索历史物料组件 (search-history) - 服务端部分
|
|
8
8
|
*/
|
|
9
|
-
declare function
|
|
9
|
+
declare function SearchHistoryServer(props: SearchHistoryProps): Promise<react_jsx_runtime0.JSX.Element>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export {
|
|
11
|
+
export { SearchHistoryServer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{
|
|
2
|
+
import{SearchHistoryClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";import{getTranslations as n}from"next-intl/server";async function r(r){let i=await n(`components.biz.business.searchHistory`);return t(e,{...r,title:r.title||`搜索历史`,clearText:i(`clear`)||`清理`,confirmDescription:i(`confirmClearDescription`)||`确认删除全部搜索历史吗?`})}export{r as SearchHistoryServer};
|
|
@@ -4,8 +4,8 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
4
4
|
//#region components/biz/business/search-input/client.d.ts
|
|
5
5
|
interface SearchInputClientProps {
|
|
6
6
|
placeholder?: string;
|
|
7
|
-
defaultPlaceholder
|
|
8
|
-
searchLabel
|
|
7
|
+
defaultPlaceholder?: string;
|
|
8
|
+
searchLabel?: string;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* 搜索输入框物料组件 - 客户端交互部分
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import e from"../../../../assets/icons/clear.mjs";import{updateUrlParams as t}from"../../../../utils/common.mjs";import{useUserStore as n}from"../../../../store/modules/user-store.mjs";import{Input as r}from"../../../ui/input.mjs";import{useSearchHistory as i}from"../../../../hooks/use-search-history.mjs";import a from"../../../../assets/icons/search.mjs";import{isPCEnv as o}from"../../../../utils/tools.mjs";import{HeaderNav as s}from"../../../common/header-nav/client.mjs";import c from"../../../pages/search/style.module.mjs";import{useRouter as l}from"next/navigation";import{useCallback as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";function m({placeholder:m,defaultPlaceholder:h
|
|
2
|
+
"use client";import e from"../../../../assets/icons/clear.mjs";import{updateUrlParams as t}from"../../../../utils/common.mjs";import{useUserStore as n}from"../../../../store/modules/user-store.mjs";import{Input as r}from"../../../ui/input.mjs";import{useSearchHistory as i}from"../../../../hooks/use-search-history.mjs";import a from"../../../../assets/icons/search.mjs";import{isPCEnv as o}from"../../../../utils/tools.mjs";import{HeaderNav as s}from"../../../common/header-nav/client.mjs";import c from"../../../pages/search/style.module.mjs";import{useRouter as l}from"next/navigation";import{useCallback as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";function m({placeholder:m,defaultPlaceholder:h=`搜索视频`,searchLabel:g=`搜索`}){let[_,v]=d(``),y=l(),{userInfo:b}=n(),{addHistory:x}=i({storageKey:b?.user_id||`guest`}),S=u(e=>{let n=e||_||h;n.trim()&&(x(n),t({q:n}),y.push(`${window.location.pathname}?q=${encodeURIComponent(n)}`))},[_,h,y,x]);return f(s,{className:`h-[55px]`,rightChild:f(`div`,{className:`cursor-pointer w-[52px] flex items-center justify-center`,onClick:()=>S(_),children:f(`span`,{className:`text-[16px] text-text1`,children:g})}),centerChild:p(`header`,{className:`w-[calc(100%-52px-48px)] ml-[-15px] h-[35px] rounded-[20px] flex items-center justify-center relative overflow-hidden border-line1 border-[1px]`,children:[f(`div`,{className:`absolute left-0 top-0 w-full h-full bg-bg2 opacity-50`}),f(a,{className:`w-[16px] h-[16px] text-text3 absolute left-[12px] top-[9px] z-[1]`}),f(r,{id:`search-input-field`,placeholder:m||h,maxLength:20,value:_,className:c.searchInput,onChange:e=>v(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),S(_))}}),_&&f(e,{className:`w-[15px] h-[15px] text-text3 z-10 absolute right-[12px] cursor-pointer`,onClick:()=>{o()||(v(``),t({q:``}),y.push(window.location.pathname))}})]})})}export{m as SearchInputClient};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
import { SearchInputClient } from "./client.mjs";
|
|
2
3
|
import { SearchInputInspectorProps, SearchInputProps, searchInputInspectorDefaultProps, searchInputInspectorPropsSchema } from "./schema.mjs";
|
|
3
4
|
import { SearchInputServer } from "./server.mjs";
|
|
4
|
-
import { searchInputMaterial } from "./material.mjs";
|
|
5
|
-
import { SearchInputClient } from "./client.mjs";
|
|
5
|
+
import { searchInputMaterial } from "./material.mjs";
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
4
4
|
import "../../../../utils.mjs";
|
|
5
|
+
import { SearchInputClient } from "./client.mjs";
|
|
5
6
|
import { SearchInputServer } from "./server.mjs";
|
|
6
7
|
import * as zod from "zod";
|
|
7
8
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
8
9
|
|
|
9
10
|
//#region components/biz/business/search-input/material.d.ts
|
|
10
|
-
declare const searchInputMaterial: DefineMaterialOption<typeof SearchInputServer, zod.ZodObject<{
|
|
11
|
+
declare const searchInputMaterial: DefineMaterialOption<typeof SearchInputServer, typeof SearchInputClient, zod.ZodObject<{
|
|
11
12
|
placeholder: zod.ZodString & SchemaHasDefaultValue;
|
|
12
13
|
}, zod_v4_core0.$strip>, "search-input">;
|
|
13
14
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{
|
|
2
|
+
import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{SearchInputClient as t}from"./client.mjs";import{searchInputInspectorPropsSchema as n}from"./schema.mjs";import{SearchInputServer as r}from"./server.mjs";const i=e({type:`search-input`,name:`搜索输入框`,icon:`/static/components-thumb/search_input.png`,category:`行为组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as searchInputMaterial};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import "../../../../utils.mjs";
|
|
4
|
-
import z from "zod";
|
|
4
|
+
import z$1 from "zod";
|
|
5
5
|
|
|
6
6
|
//#region components/biz/business/search-input/schema.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* 搜索输入框物料属性定义
|
|
9
9
|
*/
|
|
10
|
-
declare const searchInputInspectorPropsSchema: z.ZodObject<{
|
|
11
|
-
placeholder: z.ZodString & SchemaHasDefaultValue;
|
|
12
|
-
}, z.core.$strip>;
|
|
10
|
+
declare const searchInputInspectorPropsSchema: z$1.ZodObject<{
|
|
11
|
+
placeholder: z$1.ZodString & SchemaHasDefaultValue;
|
|
12
|
+
}, z$1.core.$strip>;
|
|
13
13
|
declare const searchInputInspectorDefaultProps: {
|
|
14
14
|
placeholder: string;
|
|
15
15
|
};
|
|
16
|
-
type SearchInputInspectorProps = z.infer<typeof searchInputInspectorPropsSchema>;
|
|
16
|
+
type SearchInputInspectorProps = z$1.infer<typeof searchInputInspectorPropsSchema>;
|
|
17
17
|
type SearchInputProps = SearchInputInspectorProps;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { SearchInputInspectorProps, SearchInputProps, searchInputInspectorDefaultProps, searchInputInspectorPropsSchema };
|
|
@@ -9,4 +9,4 @@ type ShortcutGridClientProps = ShortcutGridInspectorProps;
|
|
|
9
9
|
*/
|
|
10
10
|
declare function ShortcutGridClient(props: ShortcutGridClientProps): react_jsx_runtime0.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { ShortcutGridClient };
|
|
12
|
+
export { ShortcutGridClient, ShortcutGridClientProps };
|
|
@@ -3,11 +3,12 @@ import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
|
3
3
|
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
4
4
|
import "../../../../utils/schema/index.mjs";
|
|
5
5
|
import { ShortcutGridClient } from "./client.mjs";
|
|
6
|
+
import { ShortcutGrid } from "./server.mjs";
|
|
6
7
|
import * as zod from "zod";
|
|
7
8
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
8
9
|
|
|
9
10
|
//#region components/biz/business/shortcut-grid/material.d.ts
|
|
10
|
-
declare const shortcutGridMaterial: DefineMaterialOption<typeof ShortcutGridClient, zod.ZodObject<{
|
|
11
|
+
declare const shortcutGridMaterial: DefineMaterialOption<typeof ShortcutGrid, typeof ShortcutGridClient, zod.ZodObject<{
|
|
11
12
|
title: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
12
13
|
shortcutCount: zod.ZodNumber & SchemaHasDefaultValue;
|
|
13
14
|
isShortcutTitle: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
import { InferSchemaProps, SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import "../../../../utils/schema/index.mjs";
|
|
4
|
-
import z from "zod";
|
|
4
|
+
import z$1 from "zod";
|
|
5
5
|
|
|
6
6
|
//#region components/biz/business/shortcut-grid/schema.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* 金刚区物料可配置字段:
|
|
9
9
|
*/
|
|
10
|
-
declare const shortcutGridInspectorPropsSchema: z.ZodObject<{
|
|
11
|
-
title: z.ZodOptional<z.ZodString> & SchemaHasDefaultValue;
|
|
12
|
-
shortcutCount: z.ZodNumber & SchemaHasDefaultValue;
|
|
13
|
-
isShortcutTitle: z.ZodBoolean & SchemaHasDefaultValue;
|
|
14
|
-
shortcuts: z.ZodArray<z.ZodObject<{
|
|
15
|
-
label: z.ZodOptional<z.ZodString> & SchemaHasDefaultValue;
|
|
16
|
-
icon: z.ZodString & SchemaHasDefaultValue;
|
|
17
|
-
href: z.ZodString & SchemaHasDefaultValue;
|
|
18
|
-
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
19
|
-
}, z.core.$strip>;
|
|
10
|
+
declare const shortcutGridInspectorPropsSchema: z$1.ZodObject<{
|
|
11
|
+
title: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
12
|
+
shortcutCount: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
13
|
+
isShortcutTitle: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
14
|
+
shortcuts: z$1.ZodArray<z$1.ZodObject<{
|
|
15
|
+
label: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
16
|
+
icon: z$1.ZodString & SchemaHasDefaultValue;
|
|
17
|
+
href: z$1.ZodString & SchemaHasDefaultValue;
|
|
18
|
+
}, z$1.core.$strip>> & SchemaHasDefaultValue;
|
|
19
|
+
}, z$1.core.$strip>;
|
|
20
20
|
type ShortcutGridInspectorProps = InferSchemaProps<typeof shortcutGridInspectorPropsSchema>;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { ShortcutGridInspectorProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { ShortcutGridClientProps } from "./client.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/shortcut-grid/server.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 金刚区服务端组件,直接渲染客户端组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function ShortcutGrid(props: ShortcutGridClientProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ShortcutGrid };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { TabBarInspectorProps, TabBarProps, tabBarInspectorDefaultProps, tabBarInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
+
import { TabBarClient } from "./client.mjs";
|
|
3
4
|
import { TabBarServer } from "./server.mjs";
|
|
4
|
-
import { tabBarMaterial } from "./material.mjs";
|
|
5
|
-
import { TabBarClient } from "./client.mjs";
|
|
5
|
+
import { tabBarMaterial } from "./material.mjs";
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
4
4
|
import "../../../../utils.mjs";
|
|
5
|
+
import { TabBarClient } from "./client.mjs";
|
|
5
6
|
import { TabBarServer } from "./server.mjs";
|
|
6
7
|
import * as zod from "zod";
|
|
7
8
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
@@ -10,7 +11,7 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
10
11
|
/**
|
|
11
12
|
* TabBar 物料定义
|
|
12
13
|
*/
|
|
13
|
-
declare const tabBarMaterial: DefineMaterialOption<typeof TabBarServer, zod.ZodObject<{
|
|
14
|
+
declare const tabBarMaterial: DefineMaterialOption<typeof TabBarServer, typeof TabBarClient, zod.ZodObject<{
|
|
14
15
|
items: zod.ZodArray<zod.ZodObject<{
|
|
15
16
|
label: zod.ZodString & SchemaHasDefaultValue;
|
|
16
17
|
path: zod.ZodString & SchemaHasDefaultValue;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{
|
|
2
|
+
import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{TabBarClient as t}from"./client.mjs";import{tabBarInspectorPropsSchema as n}from"./schema.mjs";import{TabBarServer as r}from"./server.mjs";const i=e({type:`tab-bar`,name:`底部导航栏`,icon:``,category:`行为组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as tabBarMaterial};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import "../../../../utils.mjs";
|
|
4
|
-
import z from "zod";
|
|
4
|
+
import z$1 from "zod";
|
|
5
5
|
|
|
6
6
|
//#region components/biz/business/tab-bar/schema.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* TabBar 物料属性定义
|
|
9
9
|
*/
|
|
10
|
-
declare const tabBarInspectorPropsSchema: z.ZodObject<{
|
|
11
|
-
items: z.ZodArray<z.ZodObject<{
|
|
12
|
-
label: z.ZodString & SchemaHasDefaultValue;
|
|
13
|
-
path: z.ZodString & SchemaHasDefaultValue;
|
|
14
|
-
iconType: z.ZodString & SchemaHasDefaultValue;
|
|
15
|
-
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
16
|
-
}, z.core.$strip>;
|
|
10
|
+
declare const tabBarInspectorPropsSchema: z$1.ZodObject<{
|
|
11
|
+
items: z$1.ZodArray<z$1.ZodObject<{
|
|
12
|
+
label: z$1.ZodString & SchemaHasDefaultValue;
|
|
13
|
+
path: z$1.ZodString & SchemaHasDefaultValue;
|
|
14
|
+
iconType: z$1.ZodString & SchemaHasDefaultValue;
|
|
15
|
+
}, z$1.core.$strip>> & SchemaHasDefaultValue;
|
|
16
|
+
}, z$1.core.$strip>;
|
|
17
17
|
declare const tabBarInspectorDefaultProps: {
|
|
18
18
|
items: {
|
|
19
19
|
label: string;
|
|
@@ -21,7 +21,7 @@ declare const tabBarInspectorDefaultProps: {
|
|
|
21
21
|
iconType: string;
|
|
22
22
|
}[];
|
|
23
23
|
};
|
|
24
|
-
type TabBarInspectorProps = z.infer<typeof tabBarInspectorPropsSchema>;
|
|
24
|
+
type TabBarInspectorProps = z$1.infer<typeof tabBarInspectorPropsSchema>;
|
|
25
25
|
type TabBarProps = TabBarInspectorProps;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { TabBarInspectorProps, TabBarProps, tabBarInspectorDefaultProps, tabBarInspectorPropsSchema };
|
|
@@ -6,8 +6,8 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
6
6
|
interface TextRecommendClientProps {
|
|
7
7
|
title?: string;
|
|
8
8
|
count?: string;
|
|
9
|
-
initialList
|
|
10
|
-
defaultTitle
|
|
9
|
+
initialList?: ContentRecommendInfo[];
|
|
10
|
+
defaultTitle?: string;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* 文字推荐物料组件 - 客户端交互部分
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{updateUrlParams as e}from"../../../../utils/common.mjs";import{useUserStore as t}from"../../../../store/modules/user-store.mjs";import{gContentGetRecommendSearchList as n}from"../../../../service/generated/client.mjs";import{useRequest as r}from"../../../../hooks/query/use-query.mjs";import i from"../../../../assets/icons/refresh.mjs";import{useRouter as a}from"next/navigation";import{useMemo as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({title:u,count:d,initialList:f,defaultTitle:p}){let{userInfo:m}=t(),h=m?.user_id||`guest`,g=a(),[_,v]=s(null),{data:y,refetch:b,isFetching:x}=r([`hotSearchKey`,h],()=>n({user_id:h}),{enabled:!1}),S=o(()=>_||(y?.data?.recommend_list??f).slice(0,Number(d||6)),[y,_,f,d]),C=async()=>{let e=await b();e.data?.data?.recommend_list&&v(e.data.data.recommend_list)},w=t=>{e({q:t}),g.push(`${window.location.pathname}?q=${encodeURIComponent(t)}`)};return l(`div`,{className:`w-full mb-[24px] pt-[8px]`,children:[l(`div`,{className:`w-full px-[12px] h-[24px] mb-[12px] flex items-center justify-between`,children:[c(`span`,{className:`leading-[24px] text-[16px] text-text1 font-semibold`,children:u||p}),c(`div`,{className:`h-full px-[12px] flex items-center cursor-pointer`,onClick:C,children:c(i,{className:`w-[16px] h-[16px] text-text2 ${x?`animate-spin`:``}`})})]}),c(`div`,{className:`w-full px-[12px] flex gap-y-[16px] flex-wrap`,children:x&&!_?Array.from({length:Number(d||6)}).map((e,t)=>c(`div`,{className:`w-[50%] ${t%2==0?`pr-[4px]`:`pl-[4px]`}`,children:c(`div`,{className:`w-[70%] h-[22px] bg-bg2 animate-pulse rounded`})},`skeleton-${t}`)):S.map((e,t)=>c(`div`,{className:`w-[50%] ${t%2==0?`pr-[4px]`:`pl-[4px]`} cursor-pointer`,onClick:()=>w(e.title||``),children:c(`span`,{className:`text-text1 text-[14px] leading-[22px] max-w-[90%] line-clamp-1`,children:e.title})},String(e.title??t)))})]})}export{u as TextRecommendClient};
|
|
2
|
+
"use client";import{updateUrlParams as e}from"../../../../utils/common.mjs";import{useUserStore as t}from"../../../../store/modules/user-store.mjs";import{gContentGetRecommendSearchList as n}from"../../../../service/generated/client.mjs";import{useRequest as r}from"../../../../hooks/query/use-query.mjs";import i from"../../../../assets/icons/refresh.mjs";import{useRouter as a}from"next/navigation";import{useMemo as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({title:u,count:d,initialList:f=[],defaultTitle:p=`推荐搜索`}){let{userInfo:m}=t(),h=m?.user_id||`guest`,g=a(),[_,v]=s(null),{data:y,refetch:b,isFetching:x}=r([`hotSearchKey`,h],()=>n({user_id:h}),{enabled:!1}),S=o(()=>_||(y?.data?.recommend_list??f).slice(0,Number(d||6)),[y,_,f,d]),C=async()=>{let e=await b();e.data?.data?.recommend_list&&v(e.data.data.recommend_list)},w=t=>{e({q:t}),g.push(`${window.location.pathname}?q=${encodeURIComponent(t)}`)};return l(`div`,{className:`w-full mb-[24px] pt-[8px]`,children:[l(`div`,{className:`w-full px-[12px] h-[24px] mb-[12px] flex items-center justify-between`,children:[c(`span`,{className:`leading-[24px] text-[16px] text-text1 font-semibold`,children:u||p}),c(`div`,{className:`h-full px-[12px] flex items-center cursor-pointer`,onClick:C,children:c(i,{className:`w-[16px] h-[16px] text-text2 ${x?`animate-spin`:``}`})})]}),c(`div`,{className:`w-full px-[12px] flex gap-y-[16px] flex-wrap`,children:x&&!_?Array.from({length:Number(d||6)}).map((e,t)=>c(`div`,{className:`w-[50%] ${t%2==0?`pr-[4px]`:`pl-[4px]`}`,children:c(`div`,{className:`w-[70%] h-[22px] bg-bg2 animate-pulse rounded`})},`skeleton-${t}`)):S.map((e,t)=>c(`div`,{className:`w-[50%] ${t%2==0?`pr-[4px]`:`pl-[4px]`} cursor-pointer`,onClick:()=>w(e.title||``),children:c(`span`,{className:`text-text1 text-[14px] leading-[22px] max-w-[90%] line-clamp-1`,children:e.title})},String(e.title??t)))})]})}export{u as TextRecommendClient};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
import { TextRecommendClient } from "./client.mjs";
|
|
2
3
|
import { TextRecommendInspectorProps, TextRecommendProps, textRecommendInspectorDefaultProps, textRecommendInspectorPropsSchema } from "./schema.mjs";
|
|
3
4
|
import { TextRecommendServer } from "./server.mjs";
|
|
4
|
-
import { textRecommendMaterial } from "./material.mjs";
|
|
5
|
-
import { TextRecommendClient } from "./client.mjs";
|
|
5
|
+
import { textRecommendMaterial } from "./material.mjs";
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
4
4
|
import "../../../../utils.mjs";
|
|
5
|
+
import { TextRecommendClient } from "./client.mjs";
|
|
5
6
|
import { TextRecommendServer } from "./server.mjs";
|
|
6
7
|
import * as zod from "zod";
|
|
7
8
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
8
9
|
|
|
9
10
|
//#region components/biz/business/text-recommend/material.d.ts
|
|
10
|
-
declare const textRecommendMaterial: DefineMaterialOption<typeof TextRecommendServer, zod.ZodObject<{
|
|
11
|
+
declare const textRecommendMaterial: DefineMaterialOption<typeof TextRecommendServer, typeof TextRecommendClient, zod.ZodObject<{
|
|
11
12
|
title: zod.ZodString & SchemaHasDefaultValue;
|
|
12
13
|
count: zod.ZodType<"4" | "6" | "8" | "10", unknown, zod_v4_core0.$ZodTypeInternals<"4" | "6" | "8" | "10", unknown>> & SchemaHasDefaultValue;
|
|
13
14
|
}, zod_v4_core0.$strip>, "text-recommend">;
|