@funhub/platform 0.1.163 → 0.1.164
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/channel-list/channel-active-indicator.mjs +2 -0
- package/dist/assets/icons/common/header-menu.mjs +2 -0
- package/dist/assets/icons/common/header-search-icon.mjs +2 -0
- package/dist/assets/icons/common/right_arrow_thin.mjs +2 -0
- package/dist/assets/icons/marquee-close.mjs +2 -0
- package/dist/assets/icons/marquee-speaker.mjs +2 -0
- package/dist/assets/images/shortcut-grid/shortcut-grid-card-bg-primary.mjs +2 -0
- package/dist/biz.d.mts +34 -2
- package/dist/biz.mjs +1 -1
- package/dist/common.d.mts +5 -2
- package/dist/common.mjs +1 -1
- package/dist/components/biz/business/advertisement/ad-match.d.mts +98 -0
- package/dist/components/biz/business/advertisement/ad-match.mjs +2 -0
- package/dist/components/biz/business/advertisement/ad-provider.d.mts +39 -0
- package/dist/components/biz/business/advertisement/ad-provider.mjs +2 -0
- package/dist/components/biz/business/advertisement/ad-query.d.mts +29 -0
- package/dist/components/biz/business/advertisement/ad-query.mjs +2 -0
- package/dist/components/biz/business/advertisement/ad-runtime-provider.d.mts +29 -0
- package/dist/components/biz/business/advertisement/ad-runtime-provider.mjs +2 -0
- package/dist/components/biz/business/advertisement/banner-ad/client.d.mts +18 -0
- package/dist/components/biz/business/advertisement/banner-ad/client.mjs +2 -0
- package/dist/components/biz/business/advertisement/banner-ad/index.d.mts +5 -0
- package/dist/components/biz/business/advertisement/banner-ad/material.d.mts +30 -0
- package/dist/components/biz/business/advertisement/banner-ad/material.mjs +2 -0
- package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +84 -0
- package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +2 -0
- package/dist/components/biz/business/advertisement/banner-ad/server.d.mts +11 -0
- package/dist/components/biz/business/advertisement/banner-ad/server.mjs +2 -0
- package/dist/components/biz/business/advertisement/feed-ad/index.d.mts +39 -0
- package/dist/components/biz/business/advertisement/feed-ad/index.mjs +2 -0
- package/dist/components/biz/business/advertisement/floating-ad/client.d.mts +21 -0
- package/dist/components/biz/business/advertisement/floating-ad/client.mjs +2 -0
- package/dist/components/biz/business/advertisement/floating-ad/index.d.mts +5 -0
- package/dist/components/biz/business/advertisement/floating-ad/material.d.mts +25 -0
- package/dist/components/biz/business/advertisement/floating-ad/material.mjs +2 -0
- package/dist/components/biz/business/advertisement/floating-ad/schema.d.mts +84 -0
- package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +2 -0
- package/dist/components/biz/business/advertisement/floating-ad/server.d.mts +11 -0
- package/dist/components/biz/business/advertisement/floating-ad/server.mjs +2 -0
- package/dist/components/biz/business/advertisement/icon-ad/client.d.mts +16 -0
- package/dist/components/biz/business/advertisement/icon-ad/client.mjs +2 -0
- package/dist/components/biz/business/advertisement/icon-ad/index.d.mts +5 -0
- package/dist/components/biz/business/advertisement/icon-ad/material.d.mts +29 -0
- package/dist/components/biz/business/advertisement/icon-ad/material.mjs +2 -0
- package/dist/components/biz/business/advertisement/icon-ad/schema.d.mts +78 -0
- package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +2 -0
- package/dist/components/biz/business/advertisement/icon-ad/server.d.mts +11 -0
- package/dist/components/biz/business/advertisement/icon-ad/server.mjs +2 -0
- package/dist/components/biz/business/advertisement/index.d.mts +31 -0
- package/dist/components/biz/business/advertisement/popup-ad/client.d.mts +14 -0
- package/dist/components/biz/business/advertisement/popup-ad/client.mjs +64 -0
- package/dist/components/biz/business/advertisement/popup-ad/index.d.mts +5 -0
- package/dist/components/biz/business/advertisement/popup-ad/material.d.mts +29 -0
- package/dist/components/biz/business/advertisement/popup-ad/material.mjs +2 -0
- package/dist/components/biz/business/advertisement/popup-ad/schema.d.mts +54 -0
- package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +2 -0
- package/dist/components/biz/business/advertisement/popup-ad/server.d.mts +11 -0
- package/dist/components/biz/business/advertisement/popup-ad/server.mjs +2 -0
- package/dist/components/biz/business/advertisement/text-ad/client.d.mts +15 -0
- package/dist/components/biz/business/advertisement/text-ad/client.mjs +2 -0
- package/dist/components/biz/business/advertisement/text-ad/index.d.mts +5 -0
- package/dist/components/biz/business/advertisement/text-ad/material.d.mts +27 -0
- package/dist/components/biz/business/advertisement/text-ad/material.mjs +2 -0
- package/dist/components/biz/business/advertisement/text-ad/schema.d.mts +62 -0
- package/dist/components/biz/business/advertisement/text-ad/schema.mjs +2 -0
- package/dist/components/biz/business/advertisement/text-ad/server.d.mts +11 -0
- package/dist/components/biz/business/advertisement/text-ad/server.mjs +2 -0
- package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/default-props.mjs +1 -1
- package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -1
- package/dist/components/biz/business/detail/shared/registry.d.mts +36 -1
- package/dist/components/biz/business/detail/shared/registry.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/client.d.mts +1 -13
- package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/shared.mjs +2 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/client.d.mts +8 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/client.mjs +2 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/index.d.mts +5 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/material.d.mts +45 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/material.mjs +2 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/schema.d.mts +9 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/schema.mjs +2 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/server.d.mts +11 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/server.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.d.mts +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +4 -3
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/shared/avatar.mjs +1 -1
- package/dist/components/biz/business/header-search/shared/header-action.mjs +2 -0
- package/dist/components/biz/business/header-search/shared/header-search-icon.mjs +2 -0
- package/dist/components/biz/business/header-search/shared/header-shell.mjs +2 -0
- package/dist/components/biz/business/header-search/shared/logo.mjs +1 -1
- package/dist/components/biz/business/header-search/shared/search.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +3 -0
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +3 -0
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +3 -0
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +3 -0
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -1
- package/dist/components/biz/business/hot-recommend/client.d.mts +17 -0
- package/dist/components/biz/business/hot-recommend/client.mjs +2 -0
- package/dist/components/biz/business/hot-recommend/index.d.mts +5 -0
- package/dist/components/biz/business/hot-recommend/material.d.mts +24 -0
- package/dist/components/biz/business/hot-recommend/material.mjs +2 -0
- package/dist/components/biz/business/hot-recommend/schema.d.mts +23 -0
- package/dist/components/biz/business/hot-recommend/schema.mjs +2 -0
- package/dist/components/biz/business/hot-recommend/server.d.mts +11 -0
- package/dist/components/biz/business/hot-recommend/server.mjs +2 -0
- package/dist/components/biz/business/index.d.mts +36 -1
- package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
- package/dist/components/biz/business/marquee/client.mjs +1 -1
- package/dist/components/biz/business/marquee/marquee.module.mjs +2 -6
- package/dist/components/biz/business/profile/index.d.mts +1 -1
- package/dist/components/biz/business/profile/profile-header/client.d.mts +2 -1
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/index.d.mts +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/video-waterfall.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +5 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/utils.mjs +1 -1
- package/dist/components/biz/business/ranking-recommend/client.d.mts +15 -0
- package/dist/components/biz/business/ranking-recommend/client.mjs +70 -0
- package/dist/components/biz/business/ranking-recommend/material.d.mts +23 -0
- package/dist/components/biz/business/ranking-recommend/material.mjs +2 -0
- package/dist/components/biz/business/ranking-recommend/schema.d.mts +23 -0
- package/dist/components/biz/business/ranking-recommend/schema.mjs +2 -0
- package/dist/components/biz/business/ranking-recommend/server.d.mts +11 -0
- package/dist/components/biz/business/ranking-recommend/server.mjs +2 -0
- package/dist/components/biz/business/ranking-recommend/shared.d.mts +15 -0
- package/dist/components/biz/business/ranking-recommend/shared.mjs +2 -0
- package/dist/components/biz/business/search-history/client.mjs +1 -1
- package/dist/components/biz/business/search-history/schema.mjs +1 -1
- package/dist/components/biz/business/search-input/client.mjs +1 -1
- package/dist/components/biz/business/search-waterfall-recommend/client.d.mts +9 -0
- package/dist/components/biz/business/search-waterfall-recommend/client.mjs +2 -0
- package/dist/components/biz/business/search-waterfall-recommend/index.d.mts +4 -0
- package/dist/components/biz/business/search-waterfall-recommend/material.d.mts +40 -0
- package/dist/components/biz/business/search-waterfall-recommend/material.mjs +2 -0
- package/dist/components/biz/business/search-waterfall-recommend/server.d.mts +8 -0
- package/dist/components/biz/business/search-waterfall-recommend/server.mjs +2 -0
- package/dist/components/biz/business/shortcut-grid/client.mjs +1 -1
- package/dist/components/biz/business/tab-bar/client.mjs +1 -1
- package/dist/components/common/collection-popup/create-collection-sheet.d.mts +41 -0
- package/dist/components/common/collection-popup/create-collection-sheet.mjs +2 -0
- package/dist/components/common/collection-popup/index.d.mts +1 -0
- package/dist/components/common/collection-popup/index.mjs +1 -1
- package/dist/components/common/icons/setting.mjs +1 -1
- package/dist/components/common/list/collection-list/collection-list-item.d.mts +6 -0
- package/dist/components/common/list/collection-list/collection-list-item.mjs +1 -1
- package/dist/components/common/list/collection-list/collection-list.d.mts +6 -0
- package/dist/components/common/list/collection-list/collection-list.mjs +1 -1
- package/dist/components/common/list/collection-list/collection-select-icon.mjs +2 -0
- package/dist/components/common/list/waterfall-recommend/index.d.mts +2 -0
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend.d.mts +99 -0
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend.mjs +2 -0
- package/dist/components/common/series-episodes/index.d.mts +3 -1
- package/dist/components/common/series-episodes/index.mjs +1 -1
- package/dist/components/common/tab-bar/index.mjs +1 -1
- package/dist/components/pages/collection-detail/_components/collection-detail-video-card.mjs +2 -0
- package/dist/components/pages/collection-detail/detail.mjs +1 -1
- package/dist/components/pages/edit/page.mjs +1 -1
- package/dist/components/pages/home/client.mjs +1 -1
- package/dist/components/pages/search/page-client.mjs +1 -1
- package/dist/components/pages/search/search-result/index.mjs +1 -1
- package/dist/components/pages/search/search-result/search-all.mjs +1 -1
- package/dist/components/pages/search/search-result/search-user.mjs +1 -1
- package/dist/components/pages/search/search-result/search-video-info.mjs +1 -1
- package/dist/components/pages/search/search-result/shared.mjs +2 -0
- package/dist/components/pages/search/top-header.mjs +1 -1
- package/dist/components/pages/search-result/page-client.mjs +1 -1
- package/dist/components/pages/search-result/search-all.mjs +1 -1
- package/dist/components/pages/search-result/search-empty.mjs +2 -0
- package/dist/components/pages/search-result/search-tab.mjs +1 -1
- package/dist/components/pages/search-result/search-user.mjs +1 -1
- package/dist/components/pages/search-result/search-video-info.mjs +2 -0
- package/dist/components/pages/search-result/shared.mjs +2 -0
- package/dist/components/pages/search-result/top-header.mjs +2 -0
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/pages/video-list/video-list-client.mjs +1 -1
- package/dist/components/pages/video-list/video-list-recommend-item.mjs +2 -0
- package/dist/components/pages/video-list/video-list-skeleton.d.mts +2 -3
- package/dist/components/pages/video-list/video-list-skeleton.mjs +1 -1
- package/dist/components/ui/avatar.mjs +1 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/box.d.mts +1 -1
- package/dist/components/ui/button.d.mts +2 -2
- package/dist/components/ui/empty.d.mts +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/components/ui/item.d.mts +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/i18n/locales/en.mjs +2 -2
- package/dist/i18n/locales/zh-CN.mjs +2 -2
- package/dist/materials.d.mts +12 -1
- package/dist/materials.mjs +1 -1
- package/dist/service/advertisement.d.mts +176 -0
- package/dist/service/advertisement.mjs +2 -0
- package/dist/service/generated/client.d.mts +30 -2
- package/dist/service/generated/client.mjs +1 -1
- package/dist/service/generated/tanstack.d.mts +37 -2
- package/dist/service/generated/tanstack.mjs +1 -1
- package/dist/service.d.mts +4 -3
- package/dist/service.mjs +1 -1
- package/dist/types.d.mts +437 -7
- package/dist/utils/helper.d.mts +1 -1
- package/dist/utils/helper.mjs +1 -1
- package/dist/utils/schema/inspector.d.mts +2 -2
- package/dist/utils/schema/material.d.mts +1 -0
- package/package.json +1 -1
- package/theme.css +170 -59
- package/dist/assets/icons/detail/collect_nor.mjs +0 -2
- package/dist/assets/icons/detail/collect_sel.mjs +0 -2
- package/dist/assets/icons/detail/share.mjs +0 -2
- package/dist/assets/icons/marquee-enter.mjs +0 -2
- package/dist/assets/icons/right_arrow.mjs +0 -2
- package/dist/assets/icons/search/avatar.mjs +0 -2
- package/dist/assets/images/marquee.mjs +0 -2
- package/dist/components/biz/business/detail/shared/detail-introduction.mjs +0 -2
- package/dist/components/common/collection-popup/collection-create-modal.mjs +0 -2
- package/dist/components/common/skeleton/search-video-card-skeleton.mjs +0 -2
- package/dist/components/pages/search/search-utils.mjs +0 -2
- package/dist/components/pages/search-result/search-result-skeleton.mjs +0 -2
- package/dist/components/pages/search-result/search-video.mjs +0 -2
- package/dist/components/pages/video-list/video-list-item.mjs +0 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
import { BannerAdInspectorProps, BannerAdItem, BannerAdProps, BannerAdStyleSize, bannerAdInspectorDefaultProps, bannerAdInspectorPropsSchema, bannerAdStyleSizeOptions } from "./schema.mjs";
|
|
3
|
+
import { BannerAd } from "./client.mjs";
|
|
4
|
+
import { BannerAdServer } from "./server.mjs";
|
|
5
|
+
import { bannerAdMaterial } from "./material.mjs";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
import { SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import { DefineMaterialOption } from "../../../../../utils/schema/material.mjs";
|
|
4
|
+
import "../../../../../utils.mjs";
|
|
5
|
+
import { BannerAd } from "./client.mjs";
|
|
6
|
+
import { BannerAdServer } from "./server.mjs";
|
|
7
|
+
import * as zod from "zod";
|
|
8
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
9
|
+
|
|
10
|
+
//#region components/biz/business/advertisement/banner-ad/material.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* Banner 广告物料定义。
|
|
13
|
+
*/
|
|
14
|
+
declare const bannerAdMaterial: DefineMaterialOption<typeof BannerAdServer, typeof BannerAd, zod.ZodObject<{
|
|
15
|
+
readonly displayCount: zod.ZodNumber & SchemaHasDefaultValue;
|
|
16
|
+
readonly switchInterval: zod.ZodNumber & SchemaHasDefaultValue;
|
|
17
|
+
readonly styleSize: zod.ZodType<"medium" | "small" | "large", unknown, zod_v4_core0.$ZodTypeInternals<"medium" | "small" | "large", unknown>> & SchemaHasDefaultValue;
|
|
18
|
+
readonly items: zod.ZodArray<zod.ZodObject<{
|
|
19
|
+
coverUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
20
|
+
jumpUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
21
|
+
title: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
22
|
+
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
23
|
+
} & {
|
|
24
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
25
|
+
renderer: "renderer";
|
|
26
|
+
editor: "editor";
|
|
27
|
+
}>>;
|
|
28
|
+
}, zod_v4_core0.$strip>, "banner-ad", "广告组件">;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { bannerAdMaterial };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{BannerAd as t}from"./client.mjs";import{bannerAdInspectorPropsSchema as n}from"./schema.mjs";import{BannerAdServer as r}from"./server.mjs";const i=e({type:`banner-ad`,name:`Banner广告`,icon:`/static/components-thumb/carousel_banner.png`,category:`广告组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as bannerAdMaterial};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
|
|
2
|
+
import { InferSchemaProps, MaterialComponentMode, SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../../utils.mjs";
|
|
4
|
+
import { AdsMatchSceneContext } from "../../../../../service/advertisement.mjs";
|
|
5
|
+
import z$1 from "zod";
|
|
6
|
+
|
|
7
|
+
//#region components/biz/business/advertisement/banner-ad/schema.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Banner 尺寸选项。
|
|
10
|
+
*/
|
|
11
|
+
declare const bannerAdStyleSizeOptions: readonly ["small", "medium", "large"];
|
|
12
|
+
/**
|
|
13
|
+
* Banner 广告样式尺寸。
|
|
14
|
+
*/
|
|
15
|
+
type BannerAdStyleSize = typeof bannerAdStyleSizeOptions[number];
|
|
16
|
+
/**
|
|
17
|
+
* Banner 广告单条数据。
|
|
18
|
+
*/
|
|
19
|
+
interface BannerAdItem {
|
|
20
|
+
/**
|
|
21
|
+
* 封面图地址。
|
|
22
|
+
*/
|
|
23
|
+
coverUrl: string;
|
|
24
|
+
/**
|
|
25
|
+
* 跳转链接。
|
|
26
|
+
*/
|
|
27
|
+
jumpUrl: string;
|
|
28
|
+
/**
|
|
29
|
+
* 标题。
|
|
30
|
+
*/
|
|
31
|
+
title?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Banner 广告物料属性。
|
|
35
|
+
*/
|
|
36
|
+
declare const bannerAdInspectorPropsSchema: z$1.ZodObject<{
|
|
37
|
+
readonly displayCount: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
38
|
+
readonly switchInterval: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
39
|
+
readonly styleSize: z$1.ZodType<"medium" | "small" | "large", unknown, z$1.core.$ZodTypeInternals<"medium" | "small" | "large", unknown>> & SchemaHasDefaultValue;
|
|
40
|
+
readonly items: z$1.ZodArray<z$1.ZodObject<{
|
|
41
|
+
coverUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
42
|
+
jumpUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
43
|
+
title: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
44
|
+
}, z$1.core.$strip>> & SchemaHasDefaultValue;
|
|
45
|
+
} & {
|
|
46
|
+
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
47
|
+
renderer: "renderer";
|
|
48
|
+
editor: "editor";
|
|
49
|
+
}>>;
|
|
50
|
+
}, z$1.core.$strip>;
|
|
51
|
+
declare const bannerAdInspectorDefaultProps: {
|
|
52
|
+
readonly displayCount: number;
|
|
53
|
+
readonly switchInterval: number;
|
|
54
|
+
readonly styleSize: "medium" | "small" | "large";
|
|
55
|
+
readonly items: {
|
|
56
|
+
coverUrl: string;
|
|
57
|
+
jumpUrl: string;
|
|
58
|
+
title?: string | undefined;
|
|
59
|
+
}[];
|
|
60
|
+
};
|
|
61
|
+
type BannerAdInspectorProps<T extends object = object> = InferSchemaProps<typeof bannerAdInspectorPropsSchema> & T;
|
|
62
|
+
/**
|
|
63
|
+
* Banner 广告组件 props。
|
|
64
|
+
*/
|
|
65
|
+
type BannerAdProps = BannerAdInspectorProps<{
|
|
66
|
+
/**
|
|
67
|
+
* 渲染模式。
|
|
68
|
+
*/
|
|
69
|
+
mode?: MaterialComponentMode;
|
|
70
|
+
/**
|
|
71
|
+
* 广告组件唯一标识。
|
|
72
|
+
*/
|
|
73
|
+
componentId?: string;
|
|
74
|
+
/**
|
|
75
|
+
* 广告场景控制对象。
|
|
76
|
+
*/
|
|
77
|
+
sceneContext?: AdsMatchSceneContext;
|
|
78
|
+
/**
|
|
79
|
+
* 编辑态下禁用交互。
|
|
80
|
+
*/
|
|
81
|
+
pointerEventsDisabled?: boolean;
|
|
82
|
+
}>;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { BannerAdInspectorProps, BannerAdItem, BannerAdProps, BannerAdStyleSize, bannerAdInspectorDefaultProps, bannerAdInspectorPropsSchema, bannerAdStyleSizeOptions };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=[`small`,`medium`,`large`],i=e(e=>({displayCount:e.number(1,{label:`轮播数量`,required:!0}).refine(e=>e>=1&&e<=5,`轮播数量必须为 1-5`),switchInterval:e.number(3e3,{label:`轮播切换时间`,required:!0}),styleSize:e.enum(r,`large`,{label:`样式尺寸选择`,required:!0}),items:e.array(n.object({coverUrl:e.string(``,{label:`封面图`,required:!0}),jumpUrl:e.string(``,{label:`跳转链接`,required:!0}),title:e.string(`Banner 广告`,{label:`标题`,required:!1})}),{label:`Banner 列表`,required:!0,defaultValue:[{coverUrl:`/static/components-resource/banner.png`,jumpUrl:`/search`,title:`Banner 广告一`},{coverUrl:`/static/components-resource/banner.png`,jumpUrl:`/search`,title:`Banner 广告二`}]})})),a=t(i);export{a as bannerAdInspectorDefaultProps,i as bannerAdInspectorPropsSchema,r as bannerAdStyleSizeOptions};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { BannerAdProps } from "./schema.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/advertisement/banner-ad/server.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Banner 广告服务端组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function BannerAdServer(props: BannerAdProps): Promise<react_jsx_runtime0.JSX.Element>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { BannerAdServer };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{resolveAdsAppCode as e}from"../ad-match.mjs";import{AdRuntimeProvider as t}from"../ad-runtime-provider.mjs";import{BannerAd as n}from"./client.mjs";import{jsx as r}from"react/jsx-runtime";async function i(i){let{mode:a=`renderer`,componentId:o,sceneContext:s,...c}=i;return r(t,{adType:`banner`,appCode:e(),componentId:o,sceneContext:s,mode:a,children:r(n,{...c,mode:a})})}export{i as BannerAdServer};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region components/biz/business/advertisement/feed-ad/index.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* 信息流广告项最小识别结构。
|
|
7
|
+
*/
|
|
8
|
+
interface FeedAdItemLike {
|
|
9
|
+
/**
|
|
10
|
+
* 是否广告。
|
|
11
|
+
*/
|
|
12
|
+
is_ad?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 广告跳转链接。
|
|
15
|
+
*/
|
|
16
|
+
ad_advertise_url?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 广告素材地址。
|
|
19
|
+
*/
|
|
20
|
+
ad_advertise_icon?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 判断当前信息流项是否为广告。
|
|
24
|
+
*/
|
|
25
|
+
declare function isFeedAdItem(item: FeedAdItemLike | null | undefined): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 读取信息流广告跳转地址。
|
|
28
|
+
*/
|
|
29
|
+
declare function getFeedAdJumpUrl(item: FeedAdItemLike | null | undefined): string;
|
|
30
|
+
/**
|
|
31
|
+
* 读取信息流广告素材地址。
|
|
32
|
+
*/
|
|
33
|
+
declare function getFeedAdIcon(item: FeedAdItemLike | null | undefined): string;
|
|
34
|
+
/**
|
|
35
|
+
* 信息流广告标识。
|
|
36
|
+
*/
|
|
37
|
+
declare function FeedAdBadge(): react_jsx_runtime0.JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { FeedAdBadge, FeedAdItemLike, getFeedAdIcon, getFeedAdJumpUrl, isFeedAdItem };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Text as e}from"../../../../ui/text.mjs";import{jsx as t}from"react/jsx-runtime";function n(e){return e?.is_ad===!0}function r(e){return e?.ad_advertise_url||``}function i(e){return e?.ad_advertise_icon||``}function a(){return t(e,{className:`inline-flex rounded-[10px] bg-black/65 px-[6px] py-[2px] text-[10px] leading-[14px] text-white`,children:`广告`})}export{a as FeedAdBadge,i as getFeedAdIcon,r as getFeedAdJumpUrl,n as isFeedAdItem};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
import { FloatingAdProps } from "./schema.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/advertisement/floating-ad/client.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 悬浮广告组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function FloatingAd({
|
|
10
|
+
mode: _mode,
|
|
11
|
+
ad,
|
|
12
|
+
materialUrl,
|
|
13
|
+
jumpUrl,
|
|
14
|
+
name,
|
|
15
|
+
bottomOffset,
|
|
16
|
+
rightOffset,
|
|
17
|
+
pointerEventsDisabled,
|
|
18
|
+
onClick
|
|
19
|
+
}: FloatingAdProps): react_jsx_runtime0.JSX.Element | null;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { FloatingAd };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Image as e}from"../../../../ui/image.mjs";import{Box as t}from"../../../../ui/box.mjs";import n from"../../../../ui/link.mjs";import{adaptFloatingAdItem as r}from"../ad-match.mjs";import{useAdProvider as i}from"../ad-provider.mjs";import{useMemo as a}from"react";import{jsx as o}from"react/jsx-runtime";function s({mode:s=`renderer`,ad:c,materialUrl:l,jumpUrl:u,name:d,bottomOffset:f=100,rightOffset:p=20,pointerEventsDisabled:m=!1,onClick:h}){let g=i(),_=a(()=>{let e=c??{materialUrl:l||``,jumpUrl:u||``,name:d};return r(g?.matchData)??e},[c,g?.matchData,u,l,d]);if(!_.materialUrl||!_.jumpUrl)return null;let v=o(t,{className:`relative flex h-full w-full overflow-hidden`,style:{borderRadius:`8px`},"aria-label":_.name||`悬浮广告`,children:o(t,{className:`absolute inset-0`,children:o(e,{src:_.materialUrl,alt:_.name||`悬浮广告`,fill:!0,className:`object-cover object-center`,unoptimized:!0})})}),y={bottom:`${f}px`,right:`${p}px`,width:`75px`,height:`75px`,pointerEvents:m?`none`:void 0};return h?o(t,{className:`fixed z-50 block cursor-pointer`,style:y,onClick:h,children:v}):o(n,{href:_.jumpUrl,className:`fixed z-50 block`,style:y,children:v})}export{s as FloatingAd};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
import { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
+
import { FloatingAd } from "./client.mjs";
|
|
4
|
+
import { FloatingAdServer } from "./server.mjs";
|
|
5
|
+
import { floatingAdMaterial } from "./material.mjs";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
import { SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import { DefineMaterialOption } from "../../../../../utils/schema/material.mjs";
|
|
4
|
+
import "../../../../../utils.mjs";
|
|
5
|
+
import { FloatingAd } from "./client.mjs";
|
|
6
|
+
import { FloatingAdServer } from "./server.mjs";
|
|
7
|
+
import * as zod from "zod";
|
|
8
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
9
|
+
|
|
10
|
+
//#region components/biz/business/advertisement/floating-ad/material.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* 悬浮广告物料定义。
|
|
13
|
+
*/
|
|
14
|
+
declare const floatingAdMaterial: DefineMaterialOption<typeof FloatingAdServer, typeof FloatingAd, zod.ZodObject<{
|
|
15
|
+
readonly materialUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
16
|
+
readonly jumpUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
17
|
+
readonly name: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
18
|
+
} & {
|
|
19
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
20
|
+
renderer: "renderer";
|
|
21
|
+
editor: "editor";
|
|
22
|
+
}>>;
|
|
23
|
+
}, zod_v4_core0.$strip>, "floating-ad", "广告组件">;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { floatingAdMaterial };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{FloatingAd as t}from"./client.mjs";import{floatingAdInspectorPropsSchema as n}from"./schema.mjs";import{FloatingAdServer as r}from"./server.mjs";const i=e({type:`floating-ad`,name:`悬浮广告`,icon:`/static/components-thumb/floating_action_button.png`,category:`广告组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as floatingAdMaterial};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
|
|
2
|
+
import { InferSchemaProps, MaterialComponentMode, SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../../utils.mjs";
|
|
4
|
+
import { AdsMatchSceneContext } from "../../../../../service/advertisement.mjs";
|
|
5
|
+
import * as zod from "zod";
|
|
6
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
7
|
+
|
|
8
|
+
//#region components/biz/business/advertisement/floating-ad/schema.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* 悬浮广告单条数据。
|
|
11
|
+
*/
|
|
12
|
+
interface FloatingAdItem {
|
|
13
|
+
/**
|
|
14
|
+
* 广告素材地址。
|
|
15
|
+
*/
|
|
16
|
+
materialUrl: string;
|
|
17
|
+
/**
|
|
18
|
+
* 广告跳转链接。
|
|
19
|
+
*/
|
|
20
|
+
jumpUrl: string;
|
|
21
|
+
/**
|
|
22
|
+
* 广告名称。
|
|
23
|
+
*/
|
|
24
|
+
name?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 悬浮广告物料属性。
|
|
28
|
+
*/
|
|
29
|
+
declare const floatingAdInspectorPropsSchema: zod.ZodObject<{
|
|
30
|
+
readonly materialUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
31
|
+
readonly jumpUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
32
|
+
readonly name: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
33
|
+
} & {
|
|
34
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
35
|
+
renderer: "renderer";
|
|
36
|
+
editor: "editor";
|
|
37
|
+
}>>;
|
|
38
|
+
}, zod_v4_core0.$strip>;
|
|
39
|
+
declare const floatingAdInspectorDefaultProps: {
|
|
40
|
+
readonly materialUrl: string;
|
|
41
|
+
readonly jumpUrl: string;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
};
|
|
44
|
+
type FloatingAdInspectorProps<T extends object = object> = InferSchemaProps<typeof floatingAdInspectorPropsSchema> & T;
|
|
45
|
+
type FloatingAdEditableProps = InferSchemaProps<typeof floatingAdInspectorPropsSchema>;
|
|
46
|
+
/**
|
|
47
|
+
* 悬浮广告组件 props。
|
|
48
|
+
*/
|
|
49
|
+
type FloatingAdProps = Partial<FloatingAdEditableProps> & {
|
|
50
|
+
/**
|
|
51
|
+
* 渲染模式。
|
|
52
|
+
*/
|
|
53
|
+
mode?: MaterialComponentMode;
|
|
54
|
+
/**
|
|
55
|
+
* 广告组件唯一标识。
|
|
56
|
+
*/
|
|
57
|
+
componentId?: string;
|
|
58
|
+
/**
|
|
59
|
+
* 广告场景控制对象。
|
|
60
|
+
*/
|
|
61
|
+
sceneContext?: AdsMatchSceneContext;
|
|
62
|
+
/**
|
|
63
|
+
* 广告数据。
|
|
64
|
+
*/
|
|
65
|
+
ad?: FloatingAdItem;
|
|
66
|
+
/**
|
|
67
|
+
* 距离底部的偏移量。
|
|
68
|
+
*/
|
|
69
|
+
bottomOffset?: number;
|
|
70
|
+
/**
|
|
71
|
+
* 距离右侧的偏移量。
|
|
72
|
+
*/
|
|
73
|
+
rightOffset?: number;
|
|
74
|
+
/**
|
|
75
|
+
* 编辑态下禁用交互。
|
|
76
|
+
*/
|
|
77
|
+
pointerEventsDisabled?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* 自定义点击事件。
|
|
80
|
+
*/
|
|
81
|
+
onClick?: () => void;
|
|
82
|
+
};
|
|
83
|
+
//#endregion
|
|
84
|
+
export { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(e=>({materialUrl:e.string(``,{label:`广告素材`,required:!0}),jumpUrl:e.string(``,{label:`跳转链接`,required:!0}),name:e.string(`悬浮广告`,{label:`广告名称`,required:!1})})),r=t(n);export{r as floatingAdInspectorDefaultProps,n as floatingAdInspectorPropsSchema};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { FloatingAdProps } from "./schema.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/advertisement/floating-ad/server.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 悬浮广告服务端组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function FloatingAdServer(props: FloatingAdProps): Promise<react_jsx_runtime0.JSX.Element>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { FloatingAdServer };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{resolveAdsAppCode as e}from"../ad-match.mjs";import{AdRuntimeProvider as t}from"../ad-runtime-provider.mjs";import{FloatingAd as n}from"./client.mjs";import{jsx as r}from"react/jsx-runtime";async function i(i){let{mode:a=`renderer`,componentId:o,sceneContext:s,...c}=i;return r(t,{adType:`floating`,appCode:e(),componentId:o,sceneContext:s,mode:a,children:r(n,{...c,mode:a})})}export{i as FloatingAdServer};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import { IconAdProps } from "./schema.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/advertisement/icon-ad/client.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 图标广告组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function IconAd({
|
|
10
|
+
mode: _mode,
|
|
11
|
+
displayCount,
|
|
12
|
+
items,
|
|
13
|
+
pointerEventsDisabled
|
|
14
|
+
}: IconAdProps): react_jsx_runtime0.JSX.Element | null;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { IconAd };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Image as e}from"../../../../ui/image.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Text as n}from"../../../../ui/text.mjs";import r from"../../../../ui/link.mjs";import{adaptIconAdProps as i,hasMatchedAds as a}from"../ad-match.mjs";import{useAdProvider as o}from"../ad-provider.mjs";import{useMemo as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({mode:u=`renderer`,displayCount:d,items:f,pointerEventsDisabled:p=!1}){let m=o(),h=s(()=>a(m?.matchData)?i(m?.matchData):{displayCount:d,items:f},[m?.matchData,d,f]),g=Math.min(Math.max(h.displayCount,0),Math.min(h.items.length,5)),_=h.items.slice(0,g);return _.length===0?null:c(t,{as:`section`,className:`w-full`,"aria-label":`图标广告`,style:{pointerEvents:p?`none`:void 0},children:c(t,{className:`flex overflow-x-auto`,style:{gap:`8px`,padding:`16px 24px`,backgroundColor:`#131313`,alignItems:`center`,justifyContent:_.length>=5?`space-between`:`flex-start`},children:_.map((i,a)=>c(r,{href:i.jumpUrl,className:`block shrink-0`,style:{width:`100px`},children:l(t,{className:`flex flex-col items-center`,style:{gap:`12px`},children:[c(t,{className:`relative overflow-hidden`,style:{width:`100px`,height:`61px`,borderRadius:`10px`,backgroundColor:`#616161`},children:c(e,{src:i.icon,alt:i.title||`图标广告`,fill:!0,className:`object-cover object-center`,unoptimized:!0})}),c(n,{className:`truncate text-center text-white`,style:{width:`100px`,fontSize:`12px`,lineHeight:1,fontWeight:500},children:i.title}),c(t,{className:`flex items-center justify-center`,style:{minWidth:`35px`,padding:`2px 8px`,borderRadius:`4px`,backgroundColor:`rgba(255, 255, 255, 0.33)`},children:c(n,{className:`whitespace-nowrap text-white`,style:{fontSize:`10px`,lineHeight:`normal`,fontWeight:400},children:i.badgeText||`广告`})})]})},`${i.jumpUrl}-${a}`))})})}export{u as IconAd};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
import { IconAdInspectorProps, IconAdItem, IconAdProps, iconAdInspectorDefaultProps, iconAdInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
+
import { IconAd } from "./client.mjs";
|
|
4
|
+
import { IconAdServer } from "./server.mjs";
|
|
5
|
+
import { iconAdMaterial } from "./material.mjs";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import { SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import { DefineMaterialOption } from "../../../../../utils/schema/material.mjs";
|
|
4
|
+
import "../../../../../utils.mjs";
|
|
5
|
+
import { IconAd } from "./client.mjs";
|
|
6
|
+
import { IconAdServer } from "./server.mjs";
|
|
7
|
+
import * as zod from "zod";
|
|
8
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
9
|
+
|
|
10
|
+
//#region components/biz/business/advertisement/icon-ad/material.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* 图标广告物料定义。
|
|
13
|
+
*/
|
|
14
|
+
declare const iconAdMaterial: DefineMaterialOption<typeof IconAdServer, typeof IconAd, zod.ZodObject<{
|
|
15
|
+
readonly displayCount: zod.ZodNumber & SchemaHasDefaultValue;
|
|
16
|
+
readonly items: zod.ZodArray<zod.ZodObject<{
|
|
17
|
+
title: zod.ZodString & SchemaHasDefaultValue;
|
|
18
|
+
icon: zod.ZodString & SchemaHasDefaultValue;
|
|
19
|
+
jumpUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
20
|
+
badgeText: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
21
|
+
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
22
|
+
} & {
|
|
23
|
+
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
24
|
+
renderer: "renderer";
|
|
25
|
+
editor: "editor";
|
|
26
|
+
}>>;
|
|
27
|
+
}, zod_v4_core0.$strip>, "icon-ad", "广告组件">;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { iconAdMaterial };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{IconAd as t}from"./client.mjs";import{iconAdInspectorPropsSchema as n}from"./schema.mjs";import{IconAdServer as r}from"./server.mjs";const i=e({type:`icon-ad`,name:`图标广告`,icon:`/static/components-thumb/shortcut_grid_5.png`,category:`广告组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as iconAdMaterial};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
|
|
2
|
+
import { InferSchemaProps, MaterialComponentMode, SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../../utils.mjs";
|
|
4
|
+
import { AdsMatchSceneContext } from "../../../../../service/advertisement.mjs";
|
|
5
|
+
import z$1 from "zod";
|
|
6
|
+
|
|
7
|
+
//#region components/biz/business/advertisement/icon-ad/schema.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* 图标广告单条数据。
|
|
10
|
+
*/
|
|
11
|
+
interface IconAdItem {
|
|
12
|
+
/**
|
|
13
|
+
* 广告标题。
|
|
14
|
+
*/
|
|
15
|
+
title: string;
|
|
16
|
+
/**
|
|
17
|
+
* 广告图标。
|
|
18
|
+
*/
|
|
19
|
+
icon: string;
|
|
20
|
+
/**
|
|
21
|
+
* 广告跳转链接。
|
|
22
|
+
*/
|
|
23
|
+
jumpUrl: string;
|
|
24
|
+
/**
|
|
25
|
+
* 广告标识文案。
|
|
26
|
+
*/
|
|
27
|
+
badgeText?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 图标广告物料属性。
|
|
31
|
+
*/
|
|
32
|
+
declare const iconAdInspectorPropsSchema: z$1.ZodObject<{
|
|
33
|
+
readonly displayCount: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
34
|
+
readonly items: z$1.ZodArray<z$1.ZodObject<{
|
|
35
|
+
title: z$1.ZodString & SchemaHasDefaultValue;
|
|
36
|
+
icon: z$1.ZodString & SchemaHasDefaultValue;
|
|
37
|
+
jumpUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
38
|
+
badgeText: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
39
|
+
}, z$1.core.$strip>> & SchemaHasDefaultValue;
|
|
40
|
+
} & {
|
|
41
|
+
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
42
|
+
renderer: "renderer";
|
|
43
|
+
editor: "editor";
|
|
44
|
+
}>>;
|
|
45
|
+
}, z$1.core.$strip>;
|
|
46
|
+
declare const iconAdInspectorDefaultProps: {
|
|
47
|
+
readonly displayCount: number;
|
|
48
|
+
readonly items: {
|
|
49
|
+
title: string;
|
|
50
|
+
icon: string;
|
|
51
|
+
jumpUrl: string;
|
|
52
|
+
badgeText?: string | undefined;
|
|
53
|
+
}[];
|
|
54
|
+
};
|
|
55
|
+
type IconAdInspectorProps<T extends object = object> = InferSchemaProps<typeof iconAdInspectorPropsSchema> & T;
|
|
56
|
+
/**
|
|
57
|
+
* 图标广告组件 props。
|
|
58
|
+
*/
|
|
59
|
+
type IconAdProps = IconAdInspectorProps<{
|
|
60
|
+
/**
|
|
61
|
+
* 渲染模式。
|
|
62
|
+
*/
|
|
63
|
+
mode?: MaterialComponentMode;
|
|
64
|
+
/**
|
|
65
|
+
* 广告组件唯一标识。
|
|
66
|
+
*/
|
|
67
|
+
componentId?: string;
|
|
68
|
+
/**
|
|
69
|
+
* 广告场景控制对象。
|
|
70
|
+
*/
|
|
71
|
+
sceneContext?: AdsMatchSceneContext;
|
|
72
|
+
/**
|
|
73
|
+
* 编辑态下禁用交互。
|
|
74
|
+
*/
|
|
75
|
+
pointerEventsDisabled?: boolean;
|
|
76
|
+
}>;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { IconAdInspectorProps, IconAdItem, IconAdProps, iconAdInspectorDefaultProps, iconAdInspectorPropsSchema };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({displayCount:e.number(5,{label:`数量选择`,required:!0}).refine(e=>e>=1&&e<=5,`数量选择必须为 1-5`),items:e.array(n.object({title:e.string(`广告标题`,{label:`标题`,required:!0}),icon:e.string(``,{label:`素材`,required:!0}),jumpUrl:e.string(``,{label:`跳转链接`,required:!0}),badgeText:e.string(`广告`,{label:`广告标识`,required:!1})}),{label:`广告列表`,required:!0,defaultValue:[{title:`图标广告1`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`},{title:`图标广告2`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`},{title:`图标广告3`,icon:`/static/components-resource/banner.png`,jumpUrl:`/search`,badgeText:`广告`}]})})),i=t(r);export{i as iconAdInspectorDefaultProps,r as iconAdInspectorPropsSchema};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { IconAdProps } from "./schema.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/advertisement/icon-ad/server.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 图标广告服务端组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function IconAdServer(props: IconAdProps): Promise<react_jsx_runtime0.JSX.Element>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { IconAdServer };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{resolveAdsAppCode as e}from"../ad-match.mjs";import{AdRuntimeProvider as t}from"../ad-runtime-provider.mjs";import{IconAd as n}from"./client.mjs";import{jsx as r}from"react/jsx-runtime";async function i(i){let{mode:a=`renderer`,componentId:o,sceneContext:s,...c}=i;return r(t,{adType:`icon`,appCode:e(),componentId:o,sceneContext:s,mode:a,children:r(n,{...c,mode:a})})}export{i as IconAdServer};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
import { BannerAdInspectorProps, BannerAdItem, BannerAdProps, BannerAdStyleSize, bannerAdInspectorDefaultProps, bannerAdInspectorPropsSchema, bannerAdStyleSizeOptions } from "./banner-ad/schema.mjs";
|
|
3
|
+
import { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./floating-ad/schema.mjs";
|
|
4
|
+
import { IconAdInspectorProps, IconAdItem, IconAdProps, iconAdInspectorDefaultProps, iconAdInspectorPropsSchema } from "./icon-ad/schema.mjs";
|
|
5
|
+
import { TextAdInspectorProps, TextAdItem, TextAdProps, textAdInspectorDefaultProps, textAdInspectorPropsSchema } from "./text-ad/schema.mjs";
|
|
6
|
+
import { AdsMatchExtData, adaptBannerAdProps, adaptFloatingAdItem, adaptIconAdProps, adaptPopupAdMaterials, adaptTextAdProps, buildAdsMatchRequest, getFirstMatchedMaterial, hasMatchedAds, parseAdsMatchExtData, resolveAdsAppCode, sortAdsMatchMaterials } from "./ad-match.mjs";
|
|
7
|
+
import { AdProvider, AdProviderProps, AdProviderValue, useAdProvider } from "./ad-provider.mjs";
|
|
8
|
+
import { AdsMatchQueryOptions, createAdsMatchPrefetchItem, createAdsMatchQueryFn, getAdsMatchQueryKey } from "./ad-query.mjs";
|
|
9
|
+
import { AdRuntimeProvider, AdRuntimeProviderProps } from "./ad-runtime-provider.mjs";
|
|
10
|
+
import { BannerAd } from "./banner-ad/client.mjs";
|
|
11
|
+
import { BannerAdServer } from "./banner-ad/server.mjs";
|
|
12
|
+
import { bannerAdMaterial } from "./banner-ad/material.mjs";
|
|
13
|
+
import "./banner-ad/index.mjs";
|
|
14
|
+
import { FeedAdBadge, FeedAdItemLike, getFeedAdIcon, getFeedAdJumpUrl, isFeedAdItem } from "./feed-ad/index.mjs";
|
|
15
|
+
import { FloatingAd } from "./floating-ad/client.mjs";
|
|
16
|
+
import { FloatingAdServer } from "./floating-ad/server.mjs";
|
|
17
|
+
import { floatingAdMaterial } from "./floating-ad/material.mjs";
|
|
18
|
+
import "./floating-ad/index.mjs";
|
|
19
|
+
import { IconAd } from "./icon-ad/client.mjs";
|
|
20
|
+
import { IconAdServer } from "./icon-ad/server.mjs";
|
|
21
|
+
import { iconAdMaterial } from "./icon-ad/material.mjs";
|
|
22
|
+
import "./icon-ad/index.mjs";
|
|
23
|
+
import { PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema } from "./popup-ad/schema.mjs";
|
|
24
|
+
import { PopupAd } from "./popup-ad/client.mjs";
|
|
25
|
+
import { PopupAdServer } from "./popup-ad/server.mjs";
|
|
26
|
+
import { popupAdMaterial } from "./popup-ad/material.mjs";
|
|
27
|
+
import "./popup-ad/index.mjs";
|
|
28
|
+
import { TextAd } from "./text-ad/client.mjs";
|
|
29
|
+
import { TextAdServer } from "./text-ad/server.mjs";
|
|
30
|
+
import { textAdMaterial } from "./text-ad/material.mjs";
|
|
31
|
+
import "./text-ad/index.mjs";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
import { PopupAdProps } from "./schema.mjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region components/biz/business/advertisement/popup-ad/client.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* 弹窗广告组件。
|
|
8
|
+
*/
|
|
9
|
+
declare function PopupAd({
|
|
10
|
+
items,
|
|
11
|
+
mode: _mode
|
|
12
|
+
}: PopupAdProps): react_jsx_runtime0.JSX.Element | null;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { PopupAd };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Button as e}from"../../../../ui/button.mjs";import{Image as t}from"../../../../ui/image.mjs";import{Box as n}from"../../../../ui/box.mjs";import{Dialog as r,DialogContent as i}from"../../../../ui/dialog.mjs";import a from"../../../../ui/link.mjs";import{adaptPopupAdMaterials as o,hasMatchedAds as s}from"../ad-match.mjs";import{useAdProvider as c}from"../ad-provider.mjs";import{useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";function h({items:h,mode:g=`renderer`}){let _=c(),v=u(()=>s(_?.matchData)?o(_?.matchData):h,[_?.matchData,h]),[y,b]=f(0),[x,S]=f(!1),C=d(null);l(()=>{b(0)},[v]),l(()=>{S(!1)},[y,v]),l(()=>()=>{C.current&&window.clearTimeout(C.current)},[]);let w=v[y];function T(){b(e=>e+1)}function E(){x||(S(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,T()},260))}function D(e){e||E()}return w?p(r,{open:!0,onOpenChange:D,disablePointerDismissal:!0,children:m(i,{showCloseButton:!1,className:`w-[320px] max-w-[calc(100vw-32px)] border-none bg-transparent p-0 shadow-none`,children:[m(n,{className:`flex flex-col items-center gap-[24px]`,style:{animation:x?`funhub-popup-ad-exit 260ms cubic-bezier(0.4, 0, 0.2, 1) both`:`funhub-popup-ad-enter 420ms cubic-bezier(0.2, 0.9, 0.2, 1) both, funhub-popup-ad-float 3.2s ease-in-out 420ms infinite`,transformOrigin:`center bottom`},children:[p(a,{href:w.jumpUrl,className:`block w-full overflow-hidden rounded-[20px] bg-[#434343]`,style:{boxShadow:`0 18px 48px rgba(0, 0, 0, 0.26)`},children:p(n,{className:`w-full overflow-hidden bg-[#434343]`,children:p(t,{src:w.materialUrl,alt:w.title||`弹窗广告`,width:1200,height:1600,className:`block w-full h-auto`,unoptimized:!0})})}),p(e,{type:`button`,"aria-label":`关闭弹窗广告`,variant:`ghost`,size:`icon-lg`,className:`relative h-[54px] w-[54px] rounded-full border-[3px] border-white bg-transparent p-0 text-white hover:bg-white/8`,onClick:E,style:{animation:x?`funhub-popup-ad-close-exit 260ms ease-out both`:`funhub-popup-ad-close-breathe 2.4s ease-in-out 480ms infinite`},children:m(n,{className:`relative h-[24px] w-[24px]`,children:[p(n,{className:`absolute left-1/2 top-1/2 h-[4px] w-full -translate-x-1/2 -translate-y-1/2 rotate-45 rounded-full bg-current`}),p(n,{className:`absolute left-1/2 top-1/2 h-[4px] w-full -translate-x-1/2 -translate-y-1/2 -rotate-45 rounded-full bg-current`})]})})]},w.id),p(`style`,{jsx:!0,children:`
|
|
3
|
+
@keyframes funhub-popup-ad-enter {
|
|
4
|
+
0% {
|
|
5
|
+
opacity: 0;
|
|
6
|
+
transform: translateY(18px) scale(0.92);
|
|
7
|
+
}
|
|
8
|
+
100% {
|
|
9
|
+
opacity: 1;
|
|
10
|
+
transform: translateY(0) scale(1);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@keyframes funhub-popup-ad-float {
|
|
15
|
+
0%, 100% {
|
|
16
|
+
transform: translateY(0);
|
|
17
|
+
}
|
|
18
|
+
50% {
|
|
19
|
+
transform: translateY(-6px);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@keyframes funhub-popup-ad-exit {
|
|
24
|
+
0% {
|
|
25
|
+
opacity: 1;
|
|
26
|
+
transform: translateY(0) scale(1);
|
|
27
|
+
filter: blur(0);
|
|
28
|
+
}
|
|
29
|
+
100% {
|
|
30
|
+
opacity: 0;
|
|
31
|
+
transform: translateY(22px) scale(0.9);
|
|
32
|
+
filter: blur(4px);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes funhub-popup-ad-close-breathe {
|
|
37
|
+
0%, 100% {
|
|
38
|
+
transform: scale(1);
|
|
39
|
+
box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.18);
|
|
40
|
+
}
|
|
41
|
+
50% {
|
|
42
|
+
transform: scale(1.06);
|
|
43
|
+
box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@keyframes funhub-popup-ad-close-exit {
|
|
48
|
+
0% {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
transform: scale(1);
|
|
51
|
+
}
|
|
52
|
+
100% {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transform: scale(0.78) rotate(90deg);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
:global(*) {
|
|
60
|
+
animation-duration: 0ms !important;
|
|
61
|
+
animation-iteration-count: 1 !important;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
`})]})}):null}export{h as PopupAd};
|