@funhub/platform 0.1.160-beta.0 → 0.1.160
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/biz.d.mts +1 -22
- package/dist/biz.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/client.d.mts +19 -0
- package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/default-props.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/material.d.mts +4 -1
- package/dist/components/biz/business/banner-carousel/material.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/schema.d.mts +2 -0
- package/dist/components/biz/business/banner-carousel/schema.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/server.d.mts +4 -2
- package/dist/components/biz/business/banner-carousel/server.mjs +1 -1
- package/dist/components/biz/business/channel-list/client.mjs +1 -1
- package/dist/components/biz/business/detail/shared/detail-follow-action.mjs +1 -1
- package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
- package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/index.d.mts +0 -22
- 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/common/series-episodes/index.mjs +1 -1
- package/dist/components/pages/home/client.mjs +1 -1
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/pages/video-list/index.mjs +1 -1
- package/dist/components/pages/video-list/video-list-client.mjs +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/hooks.d.mts +1 -1
- package/dist/materials.d.mts +1 -6
- package/dist/materials.mjs +1 -1
- package/dist/service.d.mts +1 -2
- package/dist/service.mjs +1 -1
- package/dist/utils/schema/inspector.d.mts +2 -2
- package/dist/utils/schema/material.d.mts +0 -1
- package/package.json +1 -1
- package/dist/components/biz/business/advertisement/ad-match.d.mts +0 -98
- package/dist/components/biz/business/advertisement/ad-match.mjs +0 -2
- package/dist/components/biz/business/advertisement/ad-provider.d.mts +0 -33
- package/dist/components/biz/business/advertisement/ad-provider.mjs +0 -2
- package/dist/components/biz/business/advertisement/ad-query.d.mts +0 -27
- package/dist/components/biz/business/advertisement/ad-query.mjs +0 -2
- package/dist/components/biz/business/advertisement/ad-runtime-provider.d.mts +0 -25
- package/dist/components/biz/business/advertisement/ad-runtime-provider.mjs +0 -2
- package/dist/components/biz/business/advertisement/banner-ad/client.d.mts +0 -18
- package/dist/components/biz/business/advertisement/banner-ad/client.mjs +0 -2
- package/dist/components/biz/business/advertisement/banner-ad/index.d.mts +0 -5
- package/dist/components/biz/business/advertisement/banner-ad/material.d.mts +0 -30
- package/dist/components/biz/business/advertisement/banner-ad/material.mjs +0 -2
- package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +0 -75
- package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +0 -2
- package/dist/components/biz/business/advertisement/banner-ad/server.d.mts +0 -11
- package/dist/components/biz/business/advertisement/banner-ad/server.mjs +0 -2
- package/dist/components/biz/business/advertisement/feed-ad/index.d.mts +0 -39
- package/dist/components/biz/business/advertisement/feed-ad/index.mjs +0 -2
- package/dist/components/biz/business/advertisement/floating-ad/client.d.mts +0 -21
- package/dist/components/biz/business/advertisement/floating-ad/client.mjs +0 -2
- package/dist/components/biz/business/advertisement/floating-ad/index.d.mts +0 -5
- package/dist/components/biz/business/advertisement/floating-ad/material.d.mts +0 -25
- package/dist/components/biz/business/advertisement/floating-ad/material.mjs +0 -2
- package/dist/components/biz/business/advertisement/floating-ad/schema.d.mts +0 -75
- package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +0 -2
- package/dist/components/biz/business/advertisement/floating-ad/server.d.mts +0 -11
- package/dist/components/biz/business/advertisement/floating-ad/server.mjs +0 -2
- package/dist/components/biz/business/advertisement/icon-ad/client.d.mts +0 -16
- package/dist/components/biz/business/advertisement/icon-ad/client.mjs +0 -2
- package/dist/components/biz/business/advertisement/icon-ad/index.d.mts +0 -5
- package/dist/components/biz/business/advertisement/icon-ad/material.d.mts +0 -29
- package/dist/components/biz/business/advertisement/icon-ad/material.mjs +0 -2
- package/dist/components/biz/business/advertisement/icon-ad/schema.d.mts +0 -69
- package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +0 -2
- package/dist/components/biz/business/advertisement/icon-ad/server.d.mts +0 -11
- package/dist/components/biz/business/advertisement/icon-ad/server.mjs +0 -2
- package/dist/components/biz/business/advertisement/index.d.mts +0 -26
- package/dist/components/biz/business/advertisement/text-ad/client.d.mts +0 -15
- package/dist/components/biz/business/advertisement/text-ad/client.mjs +0 -2
- package/dist/components/biz/business/advertisement/text-ad/index.d.mts +0 -5
- package/dist/components/biz/business/advertisement/text-ad/material.d.mts +0 -27
- package/dist/components/biz/business/advertisement/text-ad/material.mjs +0 -2
- package/dist/components/biz/business/advertisement/text-ad/schema.d.mts +0 -53
- package/dist/components/biz/business/advertisement/text-ad/schema.mjs +0 -2
- package/dist/components/biz/business/advertisement/text-ad/server.d.mts +0 -11
- package/dist/components/biz/business/advertisement/text-ad/server.mjs +0 -2
- package/dist/service/advertisement.d.mts +0 -172
- package/dist/service/advertisement.mjs +0 -2
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { MaterialComponentMode } from "../../../../utils/schema/schema.mjs";
|
|
3
|
-
import { AdsMatchAdType, AdsMatchResponseData } from "../../../../service/advertisement.mjs";
|
|
4
|
-
import { PropsWithChildren } from "react";
|
|
5
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region components/biz/business/advertisement/ad-provider.d.ts
|
|
8
|
-
interface AdProviderProps extends PropsWithChildren {
|
|
9
|
-
adType: AdsMatchAdType;
|
|
10
|
-
appCode?: string;
|
|
11
|
-
mode?: MaterialComponentMode;
|
|
12
|
-
}
|
|
13
|
-
interface AdProviderValue {
|
|
14
|
-
adType: AdsMatchAdType;
|
|
15
|
-
appCode?: string;
|
|
16
|
-
mode?: MaterialComponentMode;
|
|
17
|
-
matchData?: AdsMatchResponseData;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* 广告运行时 Provider。
|
|
21
|
-
*/
|
|
22
|
-
declare function AdProvider({
|
|
23
|
-
adType,
|
|
24
|
-
appCode,
|
|
25
|
-
mode,
|
|
26
|
-
children
|
|
27
|
-
}: AdProviderProps): react_jsx_runtime0.JSX.Element;
|
|
28
|
-
/**
|
|
29
|
-
* 获取广告运行时上下文。
|
|
30
|
-
*/
|
|
31
|
-
declare function useAdProvider(): AdProviderValue | undefined;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { AdProvider, AdProviderProps, AdProviderValue, useAdProvider };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{useRequest as e}from"../../../../hooks/query/use-query.mjs";import{createAdsMatchQueryFn as t,getAdsMatchQueryKey as n}from"./ad-query.mjs";import{createContext as r,use as i,useMemo as a}from"react";import{jsx as o}from"react/jsx-runtime";const s=r(void 0);function c({adType:r,appCode:i,mode:c=`renderer`,children:l}){let{data:u}=e(n({adType:r,appCode:i}),t({adType:r,appCode:i}),{enabled:c===`renderer`});return o(s,{value:a(()=>({adType:r,appCode:i,mode:c,matchData:u?.data}),[r,u?.data,i,c]),children:l})}function l(){return i(s)}export{c as AdProvider,l as useAdProvider};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { ResponseData } from "../../../../utils/http.mjs";
|
|
3
|
-
import "../../../../utils.mjs";
|
|
4
|
-
import { AdsMatchAdType, AdsMatchResponseData, AdsMatchSceneContext } from "../../../../service/advertisement.mjs";
|
|
5
|
-
import { PrefetchQueryItem } from "../../../../hooks/query/hydration-boundary.mjs";
|
|
6
|
-
|
|
7
|
-
//#region components/biz/business/advertisement/ad-query.d.ts
|
|
8
|
-
interface AdsMatchQueryOptions {
|
|
9
|
-
adType: AdsMatchAdType;
|
|
10
|
-
appCode?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* 获取广告查询 key。
|
|
14
|
-
*/
|
|
15
|
-
declare function getAdsMatchQueryKey(options: AdsMatchQueryOptions): (string | AdsMatchSceneContext)[];
|
|
16
|
-
/**
|
|
17
|
-
* 获取广告查询函数。
|
|
18
|
-
*/
|
|
19
|
-
declare function createAdsMatchQueryFn(options: AdsMatchQueryOptions): () => Promise<ResponseData<AdsMatchResponseData>>;
|
|
20
|
-
/**
|
|
21
|
-
* 获取广告预取配置。
|
|
22
|
-
*/
|
|
23
|
-
declare function createAdsMatchPrefetchItem(options: AdsMatchQueryOptions): PrefetchQueryItem<{
|
|
24
|
-
data?: AdsMatchResponseData;
|
|
25
|
-
}>;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { AdsMatchQueryOptions, createAdsMatchPrefetchItem, createAdsMatchQueryFn, getAdsMatchQueryKey };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{pContentAdsMatch as e,pContentAdsMatchKey as t}from"../../../../service/advertisement.mjs";import{buildAdsMatchRequest as n,resolveAdsAppCode as r}from"./ad-match.mjs";function i(e){let n=r(e.appCode);return t({adType:e.adType,appCode:n})}function a(t){let i=r(t.appCode);return async()=>e(await n({adType:t.adType,appCode:i}),{revalidate:!1})}function o(e){return{type:`query`,queryKey:i(e),queryFn:a(e)}}export{o as createAdsMatchPrefetchItem,a as createAdsMatchQueryFn,i as getAdsMatchQueryKey};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { MaterialComponentMode } from "../../../../utils/schema/schema.mjs";
|
|
3
|
-
import { AdsMatchAdType } from "../../../../service/advertisement.mjs";
|
|
4
|
-
import { PropsWithChildren } from "react";
|
|
5
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
-
//#region components/biz/business/advertisement/ad-runtime-provider.d.ts
|
|
8
|
-
interface AdRuntimeProviderProps extends PropsWithChildren {
|
|
9
|
-
adType: AdsMatchAdType;
|
|
10
|
-
appCode?: string;
|
|
11
|
-
mode?: MaterialComponentMode;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 广告运行时 Provider。
|
|
15
|
-
*
|
|
16
|
-
* 在服务端统一完成预取与 Hydration,再由客户端 Provider 负责消费。
|
|
17
|
-
*/
|
|
18
|
-
declare function AdRuntimeProvider({
|
|
19
|
-
adType,
|
|
20
|
-
appCode,
|
|
21
|
-
mode,
|
|
22
|
-
children
|
|
23
|
-
}: AdRuntimeProviderProps): Promise<react_jsx_runtime0.JSX.Element>;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { AdRuntimeProvider, AdRuntimeProviderProps };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import{HydrationBoundary as e}from"../../../../hooks/query/hydration-boundary.mjs";import{createAdsMatchPrefetchItem as t}from"./ad-query.mjs";import{AdProvider as n}from"./ad-provider.mjs";import{jsx as r}from"react/jsx-runtime";async function i({adType:i,appCode:a,mode:o=`renderer`,children:s}){return r(e,{prefetch:o===`renderer`?[t({adType:i,appCode:a})]:[],children:r(n,{adType:i,appCode:a,mode:o,children:s})})}export{i as AdRuntimeProvider};
|
|
@@ -1,18 +0,0 @@
|
|
|
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/client.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Banner 广告组件。
|
|
8
|
-
*/
|
|
9
|
-
declare function BannerAd({
|
|
10
|
-
mode: _mode,
|
|
11
|
-
displayCount,
|
|
12
|
-
switchInterval,
|
|
13
|
-
styleSize,
|
|
14
|
-
items,
|
|
15
|
-
pointerEventsDisabled
|
|
16
|
-
}: BannerAdProps): react_jsx_runtime0.JSX.Element | null;
|
|
17
|
-
//#endregion
|
|
18
|
-
export { BannerAd };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";import{Image as e}from"../../../../ui/image.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Carousel as n,CarouselContent as r,CarouselItem as i}from"../../../../ui/carousel.mjs";import{Text as a}from"../../../../ui/text.mjs";import o from"../../../../ui/link.mjs";import{adaptBannerAdProps as s,hasMatchedAds as c}from"../ad-match.mjs";import{useAdProvider as l}from"../ad-provider.mjs";import u from"clsx";import{useEffect as d,useMemo as f,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";const _={small:`h-[140px]`,medium:`h-[180px]`,large:`h-[242px]`};function v({mode:v=`renderer`,displayCount:y,switchInterval:b=3e3,styleSize:x=`large`,items:S,pointerEventsDisabled:C=!1}){let w=l(),T=f(()=>c(w?.matchData)?s(w?.matchData):{displayCount:y,switchInterval:b,styleSize:x,items:S},[w?.matchData,y,S,x,b]),[E,D]=m(),[O,k]=m(0),A=p(null),j=f(()=>typeof T.displayCount==`number`?T.items.slice(0,Math.max(T.displayCount,0)):T.items,[T]);return d(()=>{if(!E||j.length<=1)return;let e=()=>{k(E.selectedScrollSnap())};return E.on(`select`,e),e(),()=>{E.off(`select`,e)}},[E,j.length]),d(()=>{if(!(!E||j.length<=1))return A.current=setInterval(()=>{if(E.canScrollNext()){E.scrollNext();return}E.scrollTo(0)},T.switchInterval??3e3),()=>{A.current&&=(clearInterval(A.current),null)}},[E,T.switchInterval,j.length]),j.length===0?null:g(t,{as:`section`,className:`w-full px-[12px] py-[12px]`,"aria-label":`Banner 广告`,style:{pointerEvents:C?`none`:void 0},children:[h(n,{setApi:D,opts:{align:`start`,loop:j.length>1},className:`w-full`,children:h(r,{className:`ml-0`,children:j.map((n,r)=>h(i,{className:`pl-0`,children:g(o,{href:n.jumpUrl,className:u(`relative block w-full overflow-hidden rounded-[16px]`,_[T.styleSize??`large`]),children:[h(e,{src:n.coverUrl,alt:n.title||`Banner 广告`,fill:!0,className:`object-cover`,unoptimized:!0}),g(t,{className:`absolute left-[12px] bottom-[12px] flex items-center gap-[6px]`,children:[h(a,{className:`rounded-[10px] bg-black/60 px-[6px] py-[2px] text-[10px] leading-[14px] text-white`,children:`广告`}),n.title?h(a,{className:`max-w-[220px] truncate text-[14px] font-medium leading-[20px] text-white`,children:n.title}):null]})]})},`${n.jumpUrl}-${r}`))})}),j.length>1?h(t,{className:`mt-[8px] flex items-center justify-center gap-[4px]`,children:j.map((e,n)=>h(t,{className:u(`h-[6px] rounded-full transition-all duration-300`,n===O?`w-[12px] bg-black`:`w-[6px] bg-black/20`)},n))}):null]})}export{v as BannerAd};
|
|
@@ -1,5 +0,0 @@
|
|
|
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";
|
|
@@ -1,30 +0,0 @@
|
|
|
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 };
|
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { InferSchemaProps, MaterialComponentMode, SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
-
import "../../../../../utils.mjs";
|
|
4
|
-
import z$1 from "zod";
|
|
5
|
-
|
|
6
|
-
//#region components/biz/business/advertisement/banner-ad/schema.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Banner 尺寸选项。
|
|
9
|
-
*/
|
|
10
|
-
declare const bannerAdStyleSizeOptions: readonly ["small", "medium", "large"];
|
|
11
|
-
/**
|
|
12
|
-
* Banner 广告样式尺寸。
|
|
13
|
-
*/
|
|
14
|
-
type BannerAdStyleSize = typeof bannerAdStyleSizeOptions[number];
|
|
15
|
-
/**
|
|
16
|
-
* Banner 广告单条数据。
|
|
17
|
-
*/
|
|
18
|
-
interface BannerAdItem {
|
|
19
|
-
/**
|
|
20
|
-
* 封面图地址。
|
|
21
|
-
*/
|
|
22
|
-
coverUrl: string;
|
|
23
|
-
/**
|
|
24
|
-
* 跳转链接。
|
|
25
|
-
*/
|
|
26
|
-
jumpUrl: string;
|
|
27
|
-
/**
|
|
28
|
-
* 标题。
|
|
29
|
-
*/
|
|
30
|
-
title?: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Banner 广告物料属性。
|
|
34
|
-
*/
|
|
35
|
-
declare const bannerAdInspectorPropsSchema: z$1.ZodObject<{
|
|
36
|
-
readonly displayCount: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
37
|
-
readonly switchInterval: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
38
|
-
readonly styleSize: z$1.ZodType<"medium" | "small" | "large", unknown, z$1.core.$ZodTypeInternals<"medium" | "small" | "large", unknown>> & SchemaHasDefaultValue;
|
|
39
|
-
readonly items: z$1.ZodArray<z$1.ZodObject<{
|
|
40
|
-
coverUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
41
|
-
jumpUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
42
|
-
title: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
43
|
-
}, z$1.core.$strip>> & SchemaHasDefaultValue;
|
|
44
|
-
} & {
|
|
45
|
-
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
46
|
-
renderer: "renderer";
|
|
47
|
-
editor: "editor";
|
|
48
|
-
}>>;
|
|
49
|
-
}, z$1.core.$strip>;
|
|
50
|
-
declare const bannerAdInspectorDefaultProps: {
|
|
51
|
-
readonly displayCount: number;
|
|
52
|
-
readonly switchInterval: number;
|
|
53
|
-
readonly styleSize: "medium" | "small" | "large";
|
|
54
|
-
readonly items: {
|
|
55
|
-
coverUrl: string;
|
|
56
|
-
jumpUrl: string;
|
|
57
|
-
title?: string | undefined;
|
|
58
|
-
}[];
|
|
59
|
-
};
|
|
60
|
-
type BannerAdInspectorProps<T extends object = object> = InferSchemaProps<typeof bannerAdInspectorPropsSchema> & T;
|
|
61
|
-
/**
|
|
62
|
-
* Banner 广告组件 props。
|
|
63
|
-
*/
|
|
64
|
-
type BannerAdProps = BannerAdInspectorProps<{
|
|
65
|
-
/**
|
|
66
|
-
* 渲染模式。
|
|
67
|
-
*/
|
|
68
|
-
mode?: MaterialComponentMode;
|
|
69
|
-
/**
|
|
70
|
-
* 编辑态下禁用交互。
|
|
71
|
-
*/
|
|
72
|
-
pointerEventsDisabled?: boolean;
|
|
73
|
-
}>;
|
|
74
|
-
//#endregion
|
|
75
|
-
export { BannerAdInspectorProps, BannerAdItem, BannerAdProps, BannerAdStyleSize, bannerAdInspectorDefaultProps, bannerAdInspectorPropsSchema, bannerAdStyleSizeOptions };
|
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
|
@@ -1,11 +0,0 @@
|
|
|
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 };
|
|
@@ -1,2 +0,0 @@
|
|
|
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`,...o}=i;return r(t,{adType:`banner`,appCode:e(),mode:a,children:r(n,{...o,mode:a})})}export{i as BannerAdServer};
|
|
@@ -1,39 +0,0 @@
|
|
|
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 };
|
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
|
@@ -1,21 +0,0 @@
|
|
|
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 };
|
|
@@ -1,2 +0,0 @@
|
|
|
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 shadow-lg`,"aria-label":_.name||`悬浮广告`,children:o(e,{src:_.materialUrl,alt:_.name||`悬浮广告`,fill:!0,className:`object-cover`})}),y={bottom:`${f}px`,right:`${p}px`,pointerEvents:m?`none`:void 0};return h?o(t,{className:`fixed z-50 block h-[50px] w-[50px] overflow-hidden rounded-[16px] cursor-pointer`,style:y,onClick:h,children:v}):o(n,{href:_.jumpUrl,className:`fixed z-50 block h-[50px] w-[50px] overflow-hidden rounded-[16px]`,style:y,children:v})}export{s as FloatingAd};
|
|
@@ -1,5 +0,0 @@
|
|
|
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";
|
|
@@ -1,25 +0,0 @@
|
|
|
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 };
|
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { InferSchemaProps, MaterialComponentMode, SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
-
import "../../../../../utils.mjs";
|
|
4
|
-
import * as zod from "zod";
|
|
5
|
-
import * as zod_v4_core0 from "zod/v4/core";
|
|
6
|
-
|
|
7
|
-
//#region components/biz/business/advertisement/floating-ad/schema.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* 悬浮广告单条数据。
|
|
10
|
-
*/
|
|
11
|
-
interface FloatingAdItem {
|
|
12
|
-
/**
|
|
13
|
-
* 广告素材地址。
|
|
14
|
-
*/
|
|
15
|
-
materialUrl: string;
|
|
16
|
-
/**
|
|
17
|
-
* 广告跳转链接。
|
|
18
|
-
*/
|
|
19
|
-
jumpUrl: string;
|
|
20
|
-
/**
|
|
21
|
-
* 广告名称。
|
|
22
|
-
*/
|
|
23
|
-
name?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* 悬浮广告物料属性。
|
|
27
|
-
*/
|
|
28
|
-
declare const floatingAdInspectorPropsSchema: zod.ZodObject<{
|
|
29
|
-
readonly materialUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
30
|
-
readonly jumpUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
31
|
-
readonly name: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
32
|
-
} & {
|
|
33
|
-
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
34
|
-
renderer: "renderer";
|
|
35
|
-
editor: "editor";
|
|
36
|
-
}>>;
|
|
37
|
-
}, zod_v4_core0.$strip>;
|
|
38
|
-
declare const floatingAdInspectorDefaultProps: {
|
|
39
|
-
readonly materialUrl: string;
|
|
40
|
-
readonly jumpUrl: string;
|
|
41
|
-
readonly name: string;
|
|
42
|
-
};
|
|
43
|
-
type FloatingAdInspectorProps<T extends object = object> = InferSchemaProps<typeof floatingAdInspectorPropsSchema> & T;
|
|
44
|
-
type FloatingAdEditableProps = InferSchemaProps<typeof floatingAdInspectorPropsSchema>;
|
|
45
|
-
/**
|
|
46
|
-
* 悬浮广告组件 props。
|
|
47
|
-
*/
|
|
48
|
-
type FloatingAdProps = Partial<FloatingAdEditableProps> & {
|
|
49
|
-
/**
|
|
50
|
-
* 渲染模式。
|
|
51
|
-
*/
|
|
52
|
-
mode?: MaterialComponentMode;
|
|
53
|
-
/**
|
|
54
|
-
* 广告数据。
|
|
55
|
-
*/
|
|
56
|
-
ad?: FloatingAdItem;
|
|
57
|
-
/**
|
|
58
|
-
* 距离底部的偏移量。
|
|
59
|
-
*/
|
|
60
|
-
bottomOffset?: number;
|
|
61
|
-
/**
|
|
62
|
-
* 距离右侧的偏移量。
|
|
63
|
-
*/
|
|
64
|
-
rightOffset?: number;
|
|
65
|
-
/**
|
|
66
|
-
* 编辑态下禁用交互。
|
|
67
|
-
*/
|
|
68
|
-
pointerEventsDisabled?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* 自定义点击事件。
|
|
71
|
-
*/
|
|
72
|
-
onClick?: () => void;
|
|
73
|
-
};
|
|
74
|
-
//#endregion
|
|
75
|
-
export { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema };
|
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
|
@@ -1,11 +0,0 @@
|
|
|
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 };
|
|
@@ -1,2 +0,0 @@
|
|
|
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`,...o}=i;return r(t,{adType:`floating`,appCode:e(),mode:a,children:r(n,{...o,mode:a})})}export{i as FloatingAdServer};
|
|
@@ -1,16 +0,0 @@
|
|
|
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 };
|
|
@@ -1,2 +0,0 @@
|
|
|
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 px-[12px] py-[12px]`,"aria-label":`图标广告`,style:{pointerEvents:p?`none`:void 0},children:c(t,{className:`flex justify-around gap-[8px]`,children:_.map((i,a)=>c(r,{href:i.jumpUrl,className:`block flex-1`,children:l(t,{className:`flex flex-col items-center gap-[8px]`,children:[c(t,{className:`relative h-[52px] w-[52px] overflow-hidden rounded-[12px] bg-bg2`,children:c(e,{src:i.icon,alt:i.title||`图标广告`,fill:!0,className:`object-cover`,unoptimized:!0})}),c(n,{className:`w-full truncate text-center text-[12px] leading-[18px] text-text1`,children:i.title}),c(n,{className:`text-[10px] leading-[14px] text-text3`,children:i.badgeText||`广告`})]})},`${i.jumpUrl}-${a}`))})})}export{u as IconAd};
|
|
@@ -1,5 +0,0 @@
|
|
|
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";
|
|
@@ -1,29 +0,0 @@
|
|
|
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 };
|
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { InferSchemaProps, MaterialComponentMode, SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
-
import "../../../../../utils.mjs";
|
|
4
|
-
import z$1 from "zod";
|
|
5
|
-
|
|
6
|
-
//#region components/biz/business/advertisement/icon-ad/schema.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* 图标广告单条数据。
|
|
9
|
-
*/
|
|
10
|
-
interface IconAdItem {
|
|
11
|
-
/**
|
|
12
|
-
* 广告标题。
|
|
13
|
-
*/
|
|
14
|
-
title: string;
|
|
15
|
-
/**
|
|
16
|
-
* 广告图标。
|
|
17
|
-
*/
|
|
18
|
-
icon: string;
|
|
19
|
-
/**
|
|
20
|
-
* 广告跳转链接。
|
|
21
|
-
*/
|
|
22
|
-
jumpUrl: string;
|
|
23
|
-
/**
|
|
24
|
-
* 广告标识文案。
|
|
25
|
-
*/
|
|
26
|
-
badgeText?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* 图标广告物料属性。
|
|
30
|
-
*/
|
|
31
|
-
declare const iconAdInspectorPropsSchema: z$1.ZodObject<{
|
|
32
|
-
readonly displayCount: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
33
|
-
readonly items: z$1.ZodArray<z$1.ZodObject<{
|
|
34
|
-
title: z$1.ZodString & SchemaHasDefaultValue;
|
|
35
|
-
icon: z$1.ZodString & SchemaHasDefaultValue;
|
|
36
|
-
jumpUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
37
|
-
badgeText: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
38
|
-
}, z$1.core.$strip>> & SchemaHasDefaultValue;
|
|
39
|
-
} & {
|
|
40
|
-
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
41
|
-
renderer: "renderer";
|
|
42
|
-
editor: "editor";
|
|
43
|
-
}>>;
|
|
44
|
-
}, z$1.core.$strip>;
|
|
45
|
-
declare const iconAdInspectorDefaultProps: {
|
|
46
|
-
readonly displayCount: number;
|
|
47
|
-
readonly items: {
|
|
48
|
-
title: string;
|
|
49
|
-
icon: string;
|
|
50
|
-
jumpUrl: string;
|
|
51
|
-
badgeText?: string | undefined;
|
|
52
|
-
}[];
|
|
53
|
-
};
|
|
54
|
-
type IconAdInspectorProps<T extends object = object> = InferSchemaProps<typeof iconAdInspectorPropsSchema> & T;
|
|
55
|
-
/**
|
|
56
|
-
* 图标广告组件 props。
|
|
57
|
-
*/
|
|
58
|
-
type IconAdProps = IconAdInspectorProps<{
|
|
59
|
-
/**
|
|
60
|
-
* 渲染模式。
|
|
61
|
-
*/
|
|
62
|
-
mode?: MaterialComponentMode;
|
|
63
|
-
/**
|
|
64
|
-
* 编辑态下禁用交互。
|
|
65
|
-
*/
|
|
66
|
-
pointerEventsDisabled?: boolean;
|
|
67
|
-
}>;
|
|
68
|
-
//#endregion
|
|
69
|
-
export { IconAdInspectorProps, IconAdItem, IconAdProps, iconAdInspectorDefaultProps, iconAdInspectorPropsSchema };
|
|
@@ -1,2 +0,0 @@
|
|
|
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};
|
|
@@ -1,11 +0,0 @@
|
|
|
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 };
|
|
@@ -1,2 +0,0 @@
|
|
|
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`,...o}=i;return r(t,{adType:`icon`,appCode:e(),mode:a,children:r(n,{...o,mode:a})})}export{i as IconAdServer};
|