@funhub/platform 0.1.13 → 0.1.15
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/assets/icons/detail/check-ok.mjs +2 -0
- package/dist/assets/icons/share/share-link.mjs +2 -0
- package/dist/biz.d.mts +9 -1
- package/dist/biz.mjs +1 -1
- package/dist/common.d.mts +3 -1
- package/dist/common.mjs +1 -1
- package/dist/components/biz/business/banner/index.d.mts +3 -0
- package/dist/components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/defaults/mock-data.mjs +2 -0
- package/dist/components/biz/business/banner/variants/basic-banner/index.d.mts +4 -1
- package/dist/components/biz/business/banner/variants/basic-banner/index.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +32 -0
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +2 -0
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +21 -0
- package/dist/components/biz/business/banner/variants/basic-banner/material.mjs +2 -0
- package/dist/components/biz/business/banner/variants/basic-banner/server.d.mts +19 -0
- package/dist/components/biz/business/banner/variants/basic-banner/server.mjs +2 -0
- package/dist/components/biz/business/comment/comment-input.mjs +1 -1
- package/dist/components/biz/business/detail/detail-info-tags.mjs +2 -0
- package/dist/components/biz/business/detail/detail-info-title.mjs +2 -0
- package/dist/components/biz/business/detail/detail-introduction.mjs +1 -1
- package/dist/components/biz/business/detail/detail-operate.mjs +1 -1
- package/dist/components/biz/business/detail/materials/registry.d.mts +61 -0
- package/dist/components/biz/business/detail/materials/registry.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.d.mts +14 -0
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-actions/index.d.mts +5 -0
- package/dist/components/biz/business/detail/materials/video-detail-actions/material.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-actions/material.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-actions/schema.d.mts +14 -0
- package/dist/components/biz/business/detail/materials/video-detail-actions/schema.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-actions/server.d.mts +11 -0
- package/dist/components/biz/business/detail/materials/video-detail-actions/server.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/client.d.mts +18 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/client.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/index.d.mts +5 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/material.d.mts +5 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/material.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/schema.d.mts +17 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/schema.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/server.d.mts +11 -0
- package/dist/components/biz/business/detail/materials/video-detail-info/server.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title/client.d.mts +12 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title/client.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title/index.d.mts +5 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title/material.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title/material.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title/schema.d.mts +14 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title/schema.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title/server.d.mts +11 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title/server.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.mts +16 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/index.d.mts +5 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.d.mts +5 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.d.mts +17 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.d.mts +11 -0
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-player/client.d.mts +16 -0
- package/dist/components/biz/business/detail/materials/video-detail-player/client.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-player/index.d.mts +5 -0
- package/dist/components/biz/business/detail/materials/video-detail-player/material.d.mts +4 -0
- package/dist/components/biz/business/detail/materials/video-detail-player/material.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-player/schema.d.mts +14 -0
- package/dist/components/biz/business/detail/materials/video-detail-player/schema.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-player/server.d.mts +11 -0
- package/dist/components/biz/business/detail/materials/video-detail-player/server.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.d.mts +11 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/index.d.mts +5 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +5 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/material.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.d.mts +36 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/server.d.mts +11 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/server.mjs +2 -0
- package/dist/components/biz/business/detail/materials/video-detail-recommend/utils.mjs +2 -0
- package/dist/components/biz/business/index.d.mts +3 -0
- package/dist/components/biz/business/index.mjs +1 -1
- package/dist/components/biz/example/button/client.d.mts +8 -0
- package/dist/components/biz/example/button/client.mjs +2 -0
- package/dist/components/biz/example/button/index.d.mts +5 -0
- package/dist/components/biz/example/button/material.d.mts +22 -0
- package/dist/components/biz/example/button/material.mjs +2 -0
- package/dist/components/biz/example/button/schema.d.mts +38 -0
- package/dist/components/biz/example/button/schema.mjs +2 -0
- package/dist/components/biz/example/button/server.d.mts +8 -0
- package/dist/components/biz/example/button/server.mjs +2 -0
- package/dist/components/biz/example/button/variants.mjs +2 -0
- package/dist/components/biz/utils/transformers/data.d.mts +3 -3
- package/dist/components/common/app-context/index.d.mts +19 -0
- package/dist/components/common/app-context/index.mjs +2 -0
- package/dist/components/common/app-context/provider.mjs +2 -0
- package/dist/components/common/cards/mini-three-card.d.mts +4 -1
- package/dist/components/common/cards/mini-three-card.mjs +1 -1
- package/dist/components/common/collection-popup/collection-create-modal.mjs +2 -0
- package/dist/components/common/collection-popup/index.mjs +1 -1
- package/dist/components/common/image-crop-modal/image-crop-modal.mjs +2 -2
- package/dist/components/common/intl-provider.d.mts +25 -0
- package/dist/components/common/intl-provider.mjs +2 -0
- package/dist/components/common/list/post-list/post-list.mjs +1 -1
- package/dist/components/common/list/video-list/video-list.mjs +1 -1
- package/dist/components/common/picker/gender-picker/gender-picker.d.mts +8 -2
- package/dist/components/common/picker/gender-picker/gender-picker.mjs +1 -1
- package/dist/components/common/picker/picker-drawer/picker-drawer.mjs +1 -1
- package/dist/components/common/share-popup/share-popup.d.mts +42 -0
- package/dist/components/common/share-popup/share-popup.mjs +1 -1
- package/dist/components/pages/edit/page.mjs +1 -1
- package/dist/components/pages/feedback/_components/feedback-form.mjs +1 -1
- package/dist/components/pages/login/agreement-dialog.mjs +2 -0
- package/dist/components/pages/login/forgot.mjs +1 -1
- package/dist/components/pages/login/login-client.mjs +1 -1
- package/dist/components/pages/login/password.mjs +1 -1
- package/dist/components/pages/login/register.mjs +1 -1
- package/dist/components/pages/login/reset-password.mjs +1 -1
- package/dist/components/pages/login/verify.mjs +2 -2
- package/dist/components/pages/profile/_components/tabs/collect-tab/client.mjs +2 -0
- package/dist/components/pages/profile/_components/tabs/collect-tab/server.mjs +2 -0
- package/dist/components/pages/profile/_components/tabs/history-tab/client.mjs +2 -0
- package/dist/components/pages/profile/_components/tabs/history-tab/server.mjs +2 -0
- package/dist/components/pages/profile/_components/tabs/like-tab/client.mjs +2 -0
- package/dist/components/pages/profile/_components/tabs/like-tab/server.mjs +2 -0
- package/dist/components/pages/profile/_components/tabs/publish-tab/client.mjs +2 -0
- package/dist/components/pages/profile/_components/tabs/publish-tab/server.mjs +2 -0
- package/dist/components/pages/profile/_components/user-profile-container/client.mjs +2 -0
- package/dist/components/pages/profile/_components/user-profile-header/client.mjs +2 -0
- package/dist/components/pages/profile/_components/user-profile-header/server.mjs +2 -0
- package/dist/components/pages/profile/_components/user-profile-header/user-profile-avatar.mjs +2 -0
- package/dist/components/pages/profile/_components/user-profile-header/user-profile-cover-background.mjs +2 -0
- package/dist/components/pages/profile/_components/user-profile-main/server.mjs +2 -0
- package/dist/components/pages/profile/_components/user-profile-main/shell.mjs +2 -0
- package/dist/components/pages/profile/{client.d.mts → layout.d.mts} +4 -3
- package/dist/components/pages/profile/layout.mjs +2 -0
- package/dist/components/pages/profile/page.d.mts +3 -3
- package/dist/components/pages/profile/page.mjs +1 -1
- package/dist/components/pages/profile/utils.mjs +1 -1
- package/dist/components/pages/settings/_components/reset-password-drawer.mjs +1 -1
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/pages/video-detail/index.d.mts +1 -0
- package/dist/components/pages/video-detail/page.d.mts +4 -1
- package/dist/components/pages/video-detail/page.mjs +1 -1
- package/dist/components/pages/video-detail/video-detail-client.d.mts +13 -0
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/ui/alert-dialog.mjs +1 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/components/ui/popup.mjs +1 -1
- package/dist/components/ui/sheet.d.mts +7 -1
- package/dist/components/ui/sheet.mjs +1 -1
- package/dist/hooks/app-context.d.mts +20 -0
- package/dist/hooks/app-context.mjs +2 -0
- package/dist/hooks/get-app-context.d.mts +19 -0
- package/dist/hooks/get-app-context.mjs +2 -0
- package/dist/hooks/use-app-context/index.d.mts +14 -0
- package/dist/hooks/use-app-context/index.mjs +2 -0
- package/dist/hooks/use-content-operate.mjs +1 -1
- package/dist/hooks.d.mts +4 -1
- package/dist/hooks.mjs +1 -1
- package/dist/i18n/locales/en.mjs +1 -1
- package/dist/i18n/locales/zh-CN.mjs +1 -1
- package/dist/i18n.d.mts +5 -1
- package/dist/i18n.mjs +1 -1
- package/dist/materials.d.mts +4 -0
- package/dist/materials.mjs +2 -0
- package/dist/pages.d.mts +2 -1
- package/dist/service/generated/client.d.mts +1 -1
- package/dist/service/generated/tanstack.d.mts +1 -1
- package/dist/utils/schema/index.d.mts +4 -0
- package/dist/utils/schema/inspector.d.mts +117 -0
- package/dist/utils/schema/material.d.mts +46 -0
- package/dist/utils/schema/material.mjs +2 -0
- package/dist/utils/schema/schema.d.mts +105 -0
- package/dist/utils/schema/schema.mjs +2 -0
- package/dist/utils/schema/utils.d.mts +17 -0
- package/dist/utils/schema/utils.mjs +2 -0
- package/dist/utils/share-manager.mjs +1 -1
- package/dist/utils.d.mts +6 -2
- package/dist/utils.mjs +1 -1
- package/package.json +5 -1
- package/dist/assets/icons/share/share-collect-sel.mjs +0 -2
- package/dist/assets/icons/share/share-collect.mjs +0 -2
- package/dist/assets/icons/share/share-qq.mjs +0 -2
- package/dist/assets/icons/share/share-wechat.mjs +0 -2
- package/dist/assets/icons/share/share-wecircle.mjs +0 -2
- package/dist/components/biz/business/detail/detail-guess-like.mjs +0 -2
- package/dist/components/biz/business/detail/detail-popular-comments.mjs +0 -2
- package/dist/components/biz/business/detail/detail-tabs.mjs +0 -2
- package/dist/components/pages/profile/_components/tabs/collect-tab/collect-tab.mjs +0 -2
- package/dist/components/pages/profile/_components/tabs/history-tab/history-tab.mjs +0 -2
- package/dist/components/pages/profile/_components/tabs/like-tab/like-tab.mjs +0 -2
- package/dist/components/pages/profile/_components/tabs/publish-tab/publish-tab.mjs +0 -2
- package/dist/components/pages/profile/_components/user-profile-cover-background.mjs +0 -2
- package/dist/components/pages/profile/_components/user-profile-header.mjs +0 -2
- package/dist/components/pages/profile/_components/user-profile-main.mjs +0 -2
- package/dist/components/pages/profile/client.mjs +0 -2
- package/dist/components/ui/legacy/avatar.mjs +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{useAppContext as e}from"../../../../../../hooks/use-app-context/index.mjs";import{SeriesEpisodes as t}from"../../../../../common/series-episodes/index.mjs";import{DetailIntroduction as n}from"../../detail-introduction.mjs";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";function o({information:o,currentSeriesNum:s,onEpisodeChange:c,showTags:l=!1,showEpisodes:u=!1,isShow:d=!0}){let f=e(),p=o?.is_more_link===`y`&&(o?.links?.length??0)>0;return f===`editor`?null:a(r,{children:[i(n,{information:o,isShow:d,showTags:l}),u&&p&&i(t,{mode:`detail`,series_num:s,information:o,onEpisodeChange:c})]})}export{o as VideoDetailInfoClient};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailInfoInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailInfo as n}from"./server.mjs";const r=e({type:`video-detail-info`,name:`video-detail-info`,icon:`/icon/video-detail-info.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailInfoMaterial};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { InferSchemaProps, SchemaHasDefaultValue } from "../../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../../../utils/schema/index.mjs";
|
|
4
|
+
import * as zod from "zod";
|
|
5
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
6
|
+
|
|
7
|
+
//#region components/biz/business/detail/materials/video-detail-info/schema.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* 信息模块物料暂不对外开放配置。
|
|
10
|
+
*/
|
|
11
|
+
declare const videoDetailInfoInspectorPropsSchema: zod.ZodObject<{
|
|
12
|
+
showTags: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
13
|
+
showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
14
|
+
}, zod_v4_core0.$strip>;
|
|
15
|
+
type VideoDetailInfoInspectorProps = InferSchemaProps<typeof videoDetailInfoInspectorPropsSchema>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { VideoDetailInfoInspectorProps, videoDetailInfoInspectorPropsSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineComponentPropsSchema as e,defineSwitchPropSchema as t,getSchemaDefaultProps as n}from"../../../../../../utils/schema/schema.mjs";const r=e({showTags:t({label:`显示标签`,defaultValue:!1}),showEpisodes:t({label:`显示选集`,defaultValue:!1})});n(r);export{r as videoDetailInfoInspectorPropsSchema};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { VideoDetailInfoProps } from "./client.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/detail/materials/video-detail-info/server.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 视频详情信息模块服务端组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function VideoDetailInfo(props: VideoDetailInfoProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { VideoDetailInfo };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
import { SafeInformationType } from "../../../../../../types/safe-information.mjs";
|
|
3
|
+
import { VideoDetailInfoTitleInspectorProps } from "./schema.mjs";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region components/biz/business/detail/materials/video-detail-info-title/client.d.ts
|
|
7
|
+
interface VideoDetailInfoTitleProps extends VideoDetailInfoTitleInspectorProps {
|
|
8
|
+
/** 视频详情信息。 */
|
|
9
|
+
information: SafeInformationType;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { VideoDetailInfoTitleProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Box as e}from"../../../../../ui/box.mjs";import{useAppContext as t}from"../../../../../../hooks/use-app-context/index.mjs";import{useCardDecoration as n}from"../../../../../../hooks/use-card-decoration.mjs";import{DetailInfoTitle as r}from"../../detail-info-title.mjs";import{jsx as i}from"react/jsx-runtime";function a({information:a}){let o=t(),{getTitleText:s}=n();if(o===`editor`)return null;let c=s(a);return c?i(e,{className:`w-full mt-[16px] px-[12px]`,children:i(r,{title:c})}):null}export{a as VideoDetailInfoTitleClient};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailInfoTitleInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailInfoTitle as n}from"./server.mjs";const r=e({type:`video-detail-info-title`,name:`video-detail-info-title`,icon:`/icon/video-detail-info.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailInfoTitleMaterial};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
import { InferSchemaProps } from "../../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../../../utils/schema/index.mjs";
|
|
4
|
+
import * as zod from "zod";
|
|
5
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
6
|
+
|
|
7
|
+
//#region components/biz/business/detail/materials/video-detail-info-title/schema.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* 标题变体物料暂不对外开放配置。
|
|
10
|
+
*/
|
|
11
|
+
declare const videoDetailInfoTitleInspectorPropsSchema: zod.ZodObject<{}, zod_v4_core0.$strip>;
|
|
12
|
+
type VideoDetailInfoTitleInspectorProps = InferSchemaProps<typeof videoDetailInfoTitleInspectorPropsSchema>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { VideoDetailInfoTitleInspectorProps, videoDetailInfoTitleInspectorPropsSchema };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { VideoDetailInfoTitleProps } from "./client.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/detail/materials/video-detail-info-title/server.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 标题变体物料服务端组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function VideoDetailInfoTitle(props: VideoDetailInfoTitleProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { VideoDetailInfoTitle };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import { SafeInformationType } from "../../../../../../types/safe-information.mjs";
|
|
3
|
+
import { VideoDetailInfoTitleTagsEpisodesInspectorProps } from "./schema.mjs";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.ts
|
|
7
|
+
interface VideoDetailInfoTitleTagsEpisodesProps extends VideoDetailInfoTitleTagsEpisodesInspectorProps {
|
|
8
|
+
/** 视频详情信息。 */
|
|
9
|
+
information: SafeInformationType;
|
|
10
|
+
/** 当前选集数。 */
|
|
11
|
+
currentSeriesNum: number;
|
|
12
|
+
/** 选集变更回调。 */
|
|
13
|
+
onEpisodeChange: (nextSeriesNum: number) => void;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { VideoDetailInfoTitleTagsEpisodesProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Box as e}from"../../../../../ui/box.mjs";import{useAppContext as t}from"../../../../../../hooks/use-app-context/index.mjs";import{useCardDecoration as n}from"../../../../../../hooks/use-card-decoration.mjs";import{SeriesEpisodes as r}from"../../../../../common/series-episodes/index.mjs";import{DetailInfoTags as i}from"../../detail-info-tags.mjs";import{DetailInfoTitle as a}from"../../detail-info-title.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c({information:c,currentSeriesNum:l,onEpisodeChange:u,showTags:d=!0,showEpisodes:f=!0}){let p=t(),{getTitleText:m}=n();if(p===`editor`)return null;let h=m(c),g=c?.is_more_link===`y`&&(c?.links?.length??0)>0,_=d&&(c.tags?.length??0)>0,v=f&&g;return!h&&!_&&!v?null:s(e,{className:`w-full mt-[16px]`,children:[s(e,{className:`px-[12px]`,children:[h&&o(a,{title:h}),_&&o(i,{tags:c.tags||[],className:`mt-[12px]`})]}),v&&o(r,{mode:`detail`,series_num:l,information:c,onEpisodeChange:u})]})}export{c as VideoDetailInfoTitleTagsEpisodesClient};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
import { VideoDetailInfoTitleTagsEpisodesInspectorProps, videoDetailInfoTitleTagsEpisodesInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
+
import { VideoDetailInfoTitleTagsEpisodesProps } from "./client.mjs";
|
|
4
|
+
import { VideoDetailInfoTitleTagsEpisodes } from "./server.mjs";
|
|
5
|
+
import "./material.mjs";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailInfoTitleTagsEpisodesInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailInfoTitleTagsEpisodes as n}from"./server.mjs";const r=e({type:`video-detail-info-title-tags-episodes`,name:`video-detail-info-title-tags-episodes`,icon:`/icon/video-detail-info.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailInfoTitleTagsEpisodesMaterial};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { InferSchemaProps, SchemaHasDefaultValue } from "../../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../../../utils/schema/index.mjs";
|
|
4
|
+
import * as zod from "zod";
|
|
5
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
6
|
+
|
|
7
|
+
//#region components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* 标题+标签+选集变体物料暂不对外开放配置。
|
|
10
|
+
*/
|
|
11
|
+
declare const videoDetailInfoTitleTagsEpisodesInspectorPropsSchema: zod.ZodObject<{
|
|
12
|
+
showTags: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
13
|
+
showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
14
|
+
}, zod_v4_core0.$strip>;
|
|
15
|
+
type VideoDetailInfoTitleTagsEpisodesInspectorProps = InferSchemaProps<typeof videoDetailInfoTitleTagsEpisodesInspectorPropsSchema>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { VideoDetailInfoTitleTagsEpisodesInspectorProps, videoDetailInfoTitleTagsEpisodesInspectorPropsSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineComponentPropsSchema as e,defineSwitchPropSchema as t,getSchemaDefaultProps as n}from"../../../../../../utils/schema/schema.mjs";const r=e({showTags:t({label:`显示标签`,defaultValue:!0}),showEpisodes:t({label:`显示选集`,defaultValue:!0})});n(r);export{r as videoDetailInfoTitleTagsEpisodesInspectorPropsSchema};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { VideoDetailInfoTitleTagsEpisodesProps } from "./client.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 标题+标签+选集变体物料服务端组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function VideoDetailInfoTitleTagsEpisodes(props: VideoDetailInfoTitleTagsEpisodesProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { VideoDetailInfoTitleTagsEpisodes };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import { SafeInformationType } from "../../../../../../types/safe-information.mjs";
|
|
3
|
+
import { VideoDetailPlayerInspectorProps } from "./schema.mjs";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region components/biz/business/detail/materials/video-detail-player/client.d.ts
|
|
7
|
+
interface VideoDetailPlayerProps extends VideoDetailPlayerInspectorProps {
|
|
8
|
+
/** 视频详情信息。 */
|
|
9
|
+
information: SafeInformationType;
|
|
10
|
+
/** 分集下标。 */
|
|
11
|
+
episodeIndex: number;
|
|
12
|
+
/** 续播秒数。 */
|
|
13
|
+
resumeProgressSeconds: number;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { VideoDetailPlayerProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{useAppContext as e}from"../../../../../../hooks/use-app-context/index.mjs";import{DetailHero as t}from"../../video-hero.mjs";import{jsx as n}from"react/jsx-runtime";function r({information:r,episodeIndex:i,resumeProgressSeconds:a}){return e()===`editor`?null:n(t,{isVideo:!0,information:r,episodeIndex:i,resumeProgressSeconds:a})}export{r as VideoDetailPlayerClient};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailPlayerInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailPlayer as n}from"./server.mjs";const r=e({type:`video-detail-player`,name:`video-detail-player`,icon:`/icon/video-detail-player.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailPlayerMaterial};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
import { InferSchemaProps } from "../../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../../../utils/schema/index.mjs";
|
|
4
|
+
import * as zod from "zod";
|
|
5
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
6
|
+
|
|
7
|
+
//#region components/biz/business/detail/materials/video-detail-player/schema.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* 播放器物料暂不对外开放配置。
|
|
10
|
+
*/
|
|
11
|
+
declare const videoDetailPlayerInspectorPropsSchema: zod.ZodObject<{}, zod_v4_core0.$strip>;
|
|
12
|
+
type VideoDetailPlayerInspectorProps = InferSchemaProps<typeof videoDetailPlayerInspectorPropsSchema>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { VideoDetailPlayerInspectorProps, videoDetailPlayerInspectorPropsSchema };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { VideoDetailPlayerProps } from "./client.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/detail/materials/video-detail-player/server.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 视频播放器物料服务端组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function VideoDetailPlayer(props: VideoDetailPlayerProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { VideoDetailPlayer };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { VideoDetailRecommendInspectorProps } from "./schema.mjs";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/detail/materials/video-detail-recommend/client.d.ts
|
|
6
|
+
interface VideoDetailRecommendProps extends VideoDetailRecommendInspectorProps {
|
|
7
|
+
/** 当前视频 id,用于过滤。 */
|
|
8
|
+
detailId: string;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { VideoDetailRecommendProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{gContentGetGuessYouLikeVideos as e}from"../../../../../../service/generated/client.mjs";import{Box as t}from"../../../../../ui/box.mjs";import{Text as n}from"../../../../../ui/text.mjs";import{useRequest as r}from"../../../../../../hooks/query/use-query.mjs";import{useAppContext as i}from"../../../../../../hooks/use-app-context/index.mjs";import{MiniThreeCard as a}from"../../../../../common/cards/mini-three-card.mjs";import{useCardDecoration as o}from"../../../../../../hooks/use-card-decoration.mjs";import s from"../../../../../../assets/icons/detail/video_flag.mjs";import{applyPlayCountDelta as ee,buildEpisodeLabel as c,clampColumns as l,mergeManualAndPool as u,mockPagedList as d,resolveRows as f}from"./utils.mjs";import{useEffect as p,useMemo as m,useRef as h,useState as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{useTranslations as y}from"next-intl";function b({detailId:b,rows:w,columns:T,smartTagEnabled:E,smartTagIds:D,title:O,showPlayCount:k,playCountDelta:A,showEpisode:j,enableInfinite:M,items:N}){let P=i(),te=y(`components.biz.business.detail`),{getVerticalHoCoverImageUrl:F,getTitleText:I}=o(),[L,R]=g(1),z=h(null),B=m(()=>D??[],[D]),V=m(()=>N??[],[N]),{data:H}=r([`video-detail-recommend`,b],async()=>!b||P===`editor`?null:await e(),{enabled:P===`renderer`&&!!b}),U=m(()=>{let e=H?.data?.videos;return Array.isArray(e)?e.map(e=>x(e)).filter(e=>!b||!e.id||e.id!==b):[]},[H?.data?.videos,b]),W=f(w,M),G=l(T),K=W*G,q=m(()=>new Set(V.map(e=>e.contentId)),[V]),J=m(()=>{let e=U.filter(e=>!q.has(e.id));if(!E||B.length===0)return e;let t=new Set(B.map(String));return e.filter(e=>(Array.isArray(e.source_tags)?e.source_tags:String(e.source_tags||``).split(`,`).filter(Boolean)).some(e=>t.has(String(e?.id??e))))},[q,U,E,B]),Y=m(()=>{if(!V.length)return[];let e=new Map(J.map(e=>[e.id,e]));return V.map(t=>{let n=e.get(t.contentId);if(!n)return null;let r=t.titleMode===`custom`?t.title:I(n),i=t.coverMode===`upload`?t.coverUrl:F(n);return{info:{...n,name:r||n.name,img_y:i||n.img_y,img_x:i||n.img_x},config:{showPlayCount:t.showPlayCount,playCountDelta:t.playCountDelta,showEpisode:t.showEpisode}}}).filter(Boolean)},[J,I,F,V]),X=m(()=>J.map(e=>({info:e})),[J]),Z=m(()=>u(Y,X,K),[Y,K,X]),Q=m(()=>{if(!M)return Z;let e=d(X,L,K,5);return L===1?Z:Z.concat(e)},[Z,M,L,K,X]),$=M&&L<5&&X.length>0;return p(()=>{M&&R(1)},[b,M]),p(()=>{if(!M)return;let e=z.current;if(!e||!$)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&R(e=>Math.min(e+1,5))});return t.observe(e),()=>{t.disconnect()}},[M,$]),Q.length?v(t,{className:`w-full mt-[16px]`,children:[_(n,{className:`block pl-[12px] mb-[8px] text-text1 text-[18px] leading-[26px] font-bold`,children:O||te(`detailGuessLike.title`)}),_(t,{className:`w-full flex flex-wrap px-[12px]`,children:Q.map((e,t)=>{let n=e.config?.showPlayCount??k,r=e.config?.playCountDelta??A,i=e.config?.showEpisode??j,o=S(ee(e.info.play_count||0,r)),l=c(Number(e.info.update_status)===1?`done`:`updating`,e.info.episode_cnt||e.info.links?.length,e.info.episode_cnt||e.info.links?.length),u=Number.isFinite(G)&&G>0?`${100/G}%`:`33.333333%`;return _(a,{url:F(e.info),text:I(e.info),style:{width:u},bottomLeftChild:n?v(`div`,{className:`h-[20px] leading-[20px] text-[#fff] text-[12px] px-[4px] rounded-[4px] bg-[#333] ml-[4px] flex items-center`,children:[_(s,{className:`w-[16px] h-[auto] text-[#fff] mr-[4px]`}),o]}):null,bottomRightChild:i&&l?_(`div`,{className:`text-[#F59E0B] text-[12px] font-bold leading-[20px] pr-[8px]`,children:l}):null,linkPath:C(e.info)},`guess-like-${t}`)})}),M&&_(`div`,{ref:z,className:`h-[1px] w-full`})]}):null}function x(e){return{id:e.video_id||``,mid:``,name:e.name||``,cat_id:``,cat_name:``,status:`1`,status_text:``,create_time:``,content_type:0,episode_cnt:e.episode_count||0,show_at:e.show_at??``,position:``,img_type:e.img_type??``,img_x:e.img_x??``,img_y:e.img_y??``,img_width:``,img_height:``,play_count:e.play_count,preview_images:[],duration:String(e.duration??``),score:String(e.score??``),is_more_link:e.is_more_link?`y`:`n`,update_status:String(e.update_status??``),description:e.description??``,language:``,director:``,actor:``,area:``,issue_date:``,publisher:``,series:``,number:``,tags:[],source_tags:e.source_tags??``,source_actor:[],links:Array.isArray(e.episodes)?e.episodes.map(e=>({id:e.id??``,name:e.name??``,preview_m3u8_url:e.preview_m3u8_url??``,m3u8_url:e.m3u8_url??``})):[],money:``,up_user:``,source_username:``,task_id:``,file_status:``}}function S(e){let t=Number(e||`0`);return Number.isNaN(t)||t<=0?`0`:t>=1e4?`${(t/1e4).toFixed(1)}w`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function C(e){if(e.content_type===0){let t=encodeURIComponent(e.name||``);return`/video/${e.id}/${t}/episode/1`}return`/post/${e.id}`}export{b as VideoDetailRecommendClient};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailRecommendInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailRecommend as n}from"./server.mjs";const r=e({type:`video-detail-recommend`,name:`video-detail-recommend`,icon:`/icon/video-detail-recommend.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailRecommendMaterial};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
import { SchemaHasDefaultValue } from "../../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../../../utils/schema/index.mjs";
|
|
4
|
+
import z from "zod";
|
|
5
|
+
|
|
6
|
+
//#region components/biz/business/detail/materials/video-detail-recommend/schema.d.ts
|
|
7
|
+
declare const videoDetailRecommendInspectorPropsSchema: z.ZodObject<{
|
|
8
|
+
rows: z.ZodNumber & SchemaHasDefaultValue;
|
|
9
|
+
columns: z.ZodNumber & SchemaHasDefaultValue;
|
|
10
|
+
smartTagEnabled: z.ZodBoolean & SchemaHasDefaultValue;
|
|
11
|
+
title: z.ZodString & SchemaHasDefaultValue;
|
|
12
|
+
showPlayCount: z.ZodBoolean & SchemaHasDefaultValue;
|
|
13
|
+
playCountDelta: z.ZodNumber & SchemaHasDefaultValue;
|
|
14
|
+
showEpisode: z.ZodBoolean & SchemaHasDefaultValue;
|
|
15
|
+
enableInfinite: z.ZodBoolean & SchemaHasDefaultValue;
|
|
16
|
+
smartTagIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
18
|
+
contentId: z.ZodString;
|
|
19
|
+
coverMode: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
content: "content";
|
|
21
|
+
upload: "upload";
|
|
22
|
+
}>>;
|
|
23
|
+
coverUrl: z.ZodOptional<z.ZodString>;
|
|
24
|
+
titleMode: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
content: "content";
|
|
26
|
+
custom: "custom";
|
|
27
|
+
}>>;
|
|
28
|
+
title: z.ZodOptional<z.ZodString>;
|
|
29
|
+
showPlayCount: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
playCountDelta: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
showEpisode: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
type VideoDetailRecommendInspectorProps = z.infer<typeof videoDetailRecommendInspectorPropsSchema>;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { VideoDetailRecommendInspectorProps, videoDetailRecommendInspectorPropsSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineComponentPropsSchema as e,defineNumberPropSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../../../utils/schema/schema.mjs";import a from"zod";const o=e({rows:t({label:`行数`,defaultValue:2}),columns:t({label:`列数`,defaultValue:3}),smartTagEnabled:n({label:`智能铺设`,defaultValue:!1}),title:r({label:`推荐位名称`,defaultValue:`猜你喜欢`}),showPlayCount:n({label:`显示播放量`,defaultValue:!0}),playCountDelta:t({label:`播放量浮动`,defaultValue:0}),showEpisode:n({label:`显示集数`,defaultValue:!0}),enableInfinite:n({label:`无限下拉`,defaultValue:!1}),smartTagIds:a.array(a.string()).optional(),items:a.array(a.object({contentId:a.string(),coverMode:a.enum([`upload`,`content`]).optional(),coverUrl:a.string().optional(),titleMode:a.enum([`custom`,`content`]).optional(),title:a.string().optional(),showPlayCount:a.boolean().optional(),playCountDelta:a.number().optional(),showEpisode:a.boolean().optional()})).optional()});({...i(o)});export{o as videoDetailRecommendInspectorPropsSchema};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { VideoDetailRecommendProps } from "./client.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/detail/materials/video-detail-recommend/server.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 推荐模块服务端组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function VideoDetailRecommend(props: VideoDetailRecommendProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { VideoDetailRecommend };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
function e(e,t){let n=Number(e||1);if(!Number.isFinite(n))return 1;let r=Math.max(1,Math.floor(n));return t?r:Math.min(10,r)}function t(e){let t=Number(e??3);return Number.isFinite(t)?Math.min(6,Math.max(1,Math.floor(t))):3}function n(e,t){let n=Number(e||0),r=Number(t||0);return!Number.isFinite(n)||!Number.isFinite(r)?0:Math.max(0,n+r)}function r(e,t,n){return e===`done`?`全集${Number(t||0)}`:e===`updating`?`更新至${Number(n||0)}`:``}function i(e,t,n){let r=Math.max(0,n),i=e.slice(0,r);return i.length>=r?i:i.concat(t.slice(0,r-i.length))}function a(e,t,n,r){if(!e.length||t<1||t>r)return[];let i=Math.max(0,n);if(!i)return[];let a=(t-1)*i%e.length,o=a+i;return o<=e.length?e.slice(a,o):e.slice(a).concat(e.slice(0,o-e.length))}export{n as applyPlayCountDelta,r as buildEpisodeLabel,t as clampColumns,i as mergeManualAndPool,a as mockPagedList,e as resolveRows};
|
|
@@ -5,6 +5,9 @@ import { schema } from "../basics/fullscreen-feed/schema/index.mjs";
|
|
|
5
5
|
import { defaultProps as defaultProps$1 } from "./banner/variants/basic-banner/defaults/default-props.mjs";
|
|
6
6
|
import { BasicBannerClient } from "./banner/variants/basic-banner/runtime/client.mjs";
|
|
7
7
|
import { schema as schema$1 } from "./banner/variants/basic-banner/schema/index.mjs";
|
|
8
|
+
import { basicBannerInspectorDefaultProps, basicBannerInspectorPropsSchema } from "./banner/variants/basic-banner/inspector-schema.mjs";
|
|
9
|
+
import { BasicBanner } from "./banner/variants/basic-banner/server.mjs";
|
|
10
|
+
import { basicBannerMaterial } from "./banner/variants/basic-banner/material.mjs";
|
|
8
11
|
import "./banner/index.mjs";
|
|
9
12
|
import { defaultProps as defaultProps$2 } from "./card-grid/variants/card-grid-2x3/defaults/default-props.mjs";
|
|
10
13
|
import { CardGrid2x3Client } from "./card-grid/variants/card-grid-2x3/runtime/client.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{__exportAll as e}from"../../../_virtual/_rolldown/runtime.mjs";import{defaultProps as t}from"./banner/variants/basic-banner/defaults/default-props.mjs";import{schema as n}from"./banner/variants/basic-banner/schema/index.mjs";import r from"./banner/variants/basic-banner/index.mjs";import{defaultProps as
|
|
2
|
+
import{__exportAll as e}from"../../../_virtual/_rolldown/runtime.mjs";import{defaultProps as t}from"./banner/variants/basic-banner/defaults/default-props.mjs";import{schema as n}from"./banner/variants/basic-banner/schema/index.mjs";import{basicBannerInspectorDefaultProps as r,basicBannerInspectorPropsSchema as i}from"./banner/variants/basic-banner/inspector-schema.mjs";import{BasicBanner as a}from"./banner/variants/basic-banner/server.mjs";import{basicBannerMaterial as o}from"./banner/variants/basic-banner/material.mjs";import s from"./banner/variants/basic-banner/index.mjs";import{defaultProps as c}from"./card-grid/variants/card-grid-2x3/defaults/default-props.mjs";import{schema as l}from"./card-grid/variants/card-grid-2x3/schema/index.mjs";import u from"./card-grid/variants/card-grid-2x3/index.mjs";import{defaultProps as d}from"./card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs";import{schema as f}from"./card-grid/variants/card-grid-2x3-infinite/schema/index.mjs";import p from"./card-grid/variants/card-grid-2x3-infinite/index.mjs";import{defaultProps as m}from"./card-grid/variants/card-grid-2x4/defaults/default-props.mjs";import{schema as h}from"./card-grid/variants/card-grid-2x4/schema/index.mjs";import g from"./card-grid/variants/card-grid-2x4/index.mjs";import{defaultProps as _}from"./card-grid/variants/card-grid-3x3/defaults/default-props.mjs";import{schema as v}from"./card-grid/variants/card-grid-3x3/schema/index.mjs";import y from"./card-grid/variants/card-grid-3x3/index.mjs";import{defaultProps as b}from"./card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs";import{schema as x}from"./card-grid/variants/card-grid-3x3-infinite/schema/index.mjs";import S from"./card-grid/variants/card-grid-3x3-infinite/index.mjs";import{defaultProps as C}from"./feature-grid/variants/basic-feature-grid/defaults/default-props.mjs";import{schema as w}from"./feature-grid/variants/basic-feature-grid/schema/index.mjs";import T from"./feature-grid/variants/basic-feature-grid/index.mjs";import{defaultProps as E}from"../basics/fullscreen-feed/defaults/default-props.mjs";import{schema as D}from"../basics/fullscreen-feed/schema/index.mjs";import O from"../basics/fullscreen-feed/index.mjs";import{defaultProps as k}from"./fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";import{schema as A}from"./fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import j from"./fullscreen-feed/variants/fullscreen-post-feed/index.mjs";import{defaultProps as M}from"./fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs";import{schema as N}from"./fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import P from"./fullscreen-feed/variants/fullscreen-video-feed/index.mjs";import{defaultProps as F}from"./nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";import{schema as I}from"./nav-bar/variants/basic-nav-bar/schema/index.mjs";import L from"./nav-bar/variants/basic-nav-bar/index.mjs";import{defaultProps as R}from"./post-card/variants/basic-post-card/defaults/default-props.mjs";import{defaultProps as z}from"./search-bar/variants/detail-search-bar/defaults/default-props.mjs";import{schema as B}from"./search-bar/variants/detail-search-bar/schema/index.mjs";import V from"./search-bar/variants/detail-search-bar/index.mjs";import{schema as H}from"./post-card/variants/basic-post-card/schema/index.mjs";import U from"./post-card/variants/basic-post-card/index.mjs";import{defaultProps as W}from"./recommended-users/variants/basic-recommended-users/defaults/default-props.mjs";import{schema as G}from"./recommended-users/variants/basic-recommended-users/schema/index.mjs";import K from"./recommended-users/variants/basic-recommended-users/index.mjs";import{defaultProps as q}from"./search-bar/variants/basic-search-bar/defaults/default-props.mjs";import{schema as J}from"./search-bar/variants/basic-search-bar/schema/index.mjs";import Y from"./search-bar/variants/basic-search-bar/index.mjs";import{defaultProps as X}from"./search-bar/variants/filter-search-bar/defaults/default-props.mjs";import{schema as Z}from"./search-bar/variants/filter-search-bar/schema/index.mjs";import Q from"./search-bar/variants/filter-search-bar/index.mjs";import{defaultProps as $}from"./search-bar/variants/tag-search-bar/defaults/default-props.mjs";import{schema as ee}from"./search-bar/variants/tag-search-bar/schema/index.mjs";import te from"./search-bar/variants/tag-search-bar/index.mjs";var ne=e({BasicBanner:()=>s,BasicBannerDefaultData:()=>t,BasicBannerMaterialComponent:()=>a,BasicBannerSchema:()=>n,BasicFeatureGrid:()=>T,BasicFeatureGridDefaultData:()=>C,BasicFeatureGridSchema:()=>w,BasicFullscreenFeed:()=>O,BasicFullscreenFeedDefaultData:()=>E,BasicFullscreenFeedSchema:()=>D,BasicNavBar:()=>L,BasicNavBarDefaultData:()=>F,BasicNavBarSchema:()=>I,BasicPostCard:()=>U,BasicPostCardDefaultData:()=>R,BasicPostCardSchema:()=>H,BasicRecommendedUsers:()=>K,BasicRecommendedUsersDefaultData:()=>W,BasicRecommendedUsersSchema:()=>G,BasicSearchBar:()=>Y,BasicSearchBarDefaultData:()=>q,BasicSearchBarSchema:()=>J,CardGrid2x3:()=>u,CardGrid2x3DefaultData:()=>c,CardGrid2x3Infinite:()=>p,CardGrid2x3InfiniteDefaultData:()=>d,CardGrid2x3InfiniteSchema:()=>f,CardGrid2x3Schema:()=>l,CardGrid2x4:()=>g,CardGrid2x4DefaultData:()=>m,CardGrid2x4Schema:()=>h,CardGrid3x3:()=>y,CardGrid3x3DefaultData:()=>_,CardGrid3x3Infinite:()=>S,CardGrid3x3InfiniteDefaultData:()=>b,CardGrid3x3InfiniteSchema:()=>x,CardGrid3x3Schema:()=>v,DetailSearchBar:()=>V,DetailSearchBarDefaultData:()=>z,DetailSearchBarSchema:()=>B,FilterSearchBar:()=>Q,FilterSearchBarDefaultData:()=>X,FilterSearchBarSchema:()=>Z,FullscreenFeedClient:()=>j,FullscreenPostFeedDefaultData:()=>k,FullscreenPostFeedSchema:()=>A,FullscreenVideoClient:()=>P,FullscreenVideoFeedDefaultData:()=>M,FullscreenVideoFeedSchema:()=>N,TagSearchBar:()=>te,TagSearchBarDefaultData:()=>$,TagSearchBarSchema:()=>ee,basicBannerInspectorDefaultProps:()=>r,basicBannerInspectorPropsSchema:()=>i,basicBannerMaterial:()=>o});export{ne as business_exports};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
import { ButtonProps } from "./schema.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/example/button/client.d.ts
|
|
6
|
+
declare function ButtonClient(props: ButtonProps): react_jsx_runtime0.JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ButtonClient };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{useRequest as t}from"../../../../hooks/query/use-query.mjs";import{useAppContext as n}from"../../../../hooks/use-app-context/index.mjs";import{buttonVariants as r}from"./variants.mjs";import{jsx as i}from"react/jsx-runtime";function a(a){let{children:o,disabled:s,loading:c,variant:l=`default`}=a,u=n();console.log({clientContext:u});function d(){u!==`editor`&&console.log(`invoke`)}return t([`demo`],()=>new Promise(e=>{setTimeout(()=>{e({message:`Hello World`})},200)}),{enabled:u===`renderer`}),u===`editor`?i(`div`,{children:`editor preview button`}):i(`button`,{className:e(r({variant:l})),onClick:d,disabled:s||c,children:o})}export{a as ButtonClient};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
|
+
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
4
|
+
import "../../../../utils/schema/index.mjs";
|
|
5
|
+
import { Button } from "./server.mjs";
|
|
6
|
+
import * as zod from "zod";
|
|
7
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
8
|
+
|
|
9
|
+
//#region components/biz/example/button/material.d.ts
|
|
10
|
+
declare const exampleButtonMaterial: DefineMaterialOption<typeof Button, zod.ZodObject<{
|
|
11
|
+
variant: zod.ZodType<"default" | "blue" | "red", unknown, zod_v4_core0.$ZodTypeInternals<"default" | "blue" | "red", unknown>> & SchemaHasDefaultValue;
|
|
12
|
+
disabled: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
13
|
+
loading: zod.ZodOptional<zod.ZodBoolean>;
|
|
14
|
+
items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
15
|
+
name: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
16
|
+
}, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
|
|
17
|
+
info: zod.ZodOptional<zod.ZodObject<{
|
|
18
|
+
readonly address: zod.ZodOptional<zod.ZodString>;
|
|
19
|
+
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
20
|
+
}, zod_v4_core0.$strip>, "example-button">;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { exampleButtonMaterial };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{buttonInspectorPropsSchema as t}from"./schema.mjs";import{Button as n}from"./server.mjs";const r=e({type:`example-button`,name:`按钮`,icon:`/icon/button.png`,category:`TOP`,component:n,propsSchema:t});export{r as exampleButtonMaterial};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../utils/schema/index.mjs";
|
|
4
|
+
import { PropsWithChildren } from "react";
|
|
5
|
+
import z from "zod";
|
|
6
|
+
|
|
7
|
+
//#region components/biz/example/button/schema.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* 定义可以被低代码右侧inspector编辑的props
|
|
10
|
+
*/
|
|
11
|
+
declare const buttonInspectorPropsSchema: z.ZodObject<{
|
|
12
|
+
variant: z.ZodType<"default" | "blue" | "red", unknown, z.core.$ZodTypeInternals<"default" | "blue" | "red", unknown>> & SchemaHasDefaultValue;
|
|
13
|
+
disabled: z.ZodBoolean & SchemaHasDefaultValue;
|
|
14
|
+
loading: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
|
+
name: z.ZodOptional<z.ZodString> & SchemaHasDefaultValue;
|
|
17
|
+
}, z.core.$strip>>> & SchemaHasDefaultValue;
|
|
18
|
+
info: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
readonly address: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
declare const buttonInspectorDefaultProps: {
|
|
23
|
+
variant: "default" | "blue" | "red";
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
items: {
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
}[];
|
|
28
|
+
info: {
|
|
29
|
+
address?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
type ButtonInspectorProps<T extends object = object> = z.infer<typeof buttonInspectorPropsSchema> & T;
|
|
33
|
+
/**
|
|
34
|
+
* 基于ButtonInspectorProps再派生出组件真正的props(因为不是所有props都需要被编辑,比如说下面的children就不需要,但是button组件又需要传入children)
|
|
35
|
+
*/
|
|
36
|
+
type ButtonProps = ButtonInspectorProps<PropsWithChildren>;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { ButtonInspectorProps, ButtonProps, buttonInspectorDefaultProps, buttonInspectorPropsSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineArrayItemPropSchema as e,defineCheckboxPropSchema as t,defineComponentPropsSchema as n,defineObjectPropSchema as r,defineSelectEnumPropSchema as i,defineSwitchPropSchema as a,defineTextPropSchema as o,getSchemaDefaultProps as s}from"../../../../utils/schema/schema.mjs";import{buttonVariantOptions as c}from"./variants.mjs";import l from"zod";const u=n({variant:i(c,{label:`变体`,defaultValue:`red`}),disabled:t({label:`禁用`,defaultValue:!1}),loading:a({label:`加载`,required:!1}),items:e(l.object({name:o({label:`名称`,required:!1,defaultValue:`wuhu`})}),{required:!1,label:`items`,defaultValue:[{name:`string`}]}),info:r({address:o({label:`地址`,required:!1})},{label:`info`,required:!1,defaultValue:{address:`SHENZHEN`}})}),d=s(u);export{d as buttonInspectorDefaultProps,u as buttonInspectorPropsSchema};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
import { ButtonProps } from "./schema.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/example/button/server.d.ts
|
|
6
|
+
declare function Button(props: ButtonProps): react_jsx_runtime0.JSX.Element;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Button };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{getAppContext as e}from"../../../../hooks/get-app-context.mjs";import{HydrationBoundary as t}from"../../../../hooks/query/hydration-boundary.mjs";import{ButtonClient as n}from"./client.mjs";import{jsx as r}from"react/jsx-runtime";function i(i){let a=e();return console.log({serverContext:a}),r(t,{prefetch:[{queryKey:[`demo`],queryFn(){return new Promise(e=>{setTimeout(()=>{e({message:`Hello World`})},200)})}}],children:r(n,{...i})})}export{i as Button};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{cva as e}from"class-variance-authority";const t=e(`transition-colors duration-150 active:opacity-50 border p-2 rounded-md`,{variants:{variant:{default:`bg-white text-white`,blue:`bg-blue-400 text-white`,red:`bg-red-600 text-white`}},defaultVariants:{variant:`default`}}),n=[`default`,`blue`,`red`];export{n as buttonVariantOptions,t as buttonVariants};
|