@funhub/platform 0.1.160-beta.0 → 0.1.161

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.
Files changed (87) hide show
  1. package/dist/biz.d.mts +1 -22
  2. package/dist/biz.mjs +1 -1
  3. package/dist/components/biz/business/banner-carousel/client.d.mts +19 -0
  4. package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
  5. package/dist/components/biz/business/banner-carousel/default-props.mjs +1 -1
  6. package/dist/components/biz/business/banner-carousel/material.d.mts +4 -1
  7. package/dist/components/biz/business/banner-carousel/material.mjs +1 -1
  8. package/dist/components/biz/business/banner-carousel/schema.d.mts +2 -0
  9. package/dist/components/biz/business/banner-carousel/schema.mjs +1 -1
  10. package/dist/components/biz/business/banner-carousel/server.d.mts +4 -2
  11. package/dist/components/biz/business/banner-carousel/server.mjs +1 -1
  12. package/dist/components/biz/business/channel-list/client.mjs +1 -1
  13. package/dist/components/biz/business/detail/shared/detail-follow-action.mjs +1 -1
  14. package/dist/components/biz/business/detail/shared/runtime-context-provider.mjs +1 -1
  15. package/dist/components/biz/business/detail/shared/use-video-detail-webview-bridge.mjs +1 -1
  16. package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -1
  17. package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
  18. package/dist/components/biz/business/index.d.mts +0 -22
  19. package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
  20. package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
  21. package/dist/components/common/series-episodes/index.mjs +1 -1
  22. package/dist/components/common/video-player/index.mjs +4 -4
  23. package/dist/components/common/video-player/process-m3u8-cache.mjs +1 -1
  24. package/dist/components/pages/home/client.mjs +1 -1
  25. package/dist/components/pages/login/verify.mjs +1 -1
  26. package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
  27. package/dist/components/pages/video-list/index.mjs +1 -1
  28. package/dist/components/pages/video-list/video-list-client.mjs +1 -1
  29. package/dist/components/ui/badge.d.mts +1 -1
  30. package/dist/components/ui/button.d.mts +2 -2
  31. package/dist/hooks.d.mts +1 -1
  32. package/dist/materials.d.mts +1 -6
  33. package/dist/materials.mjs +1 -1
  34. package/dist/service.d.mts +1 -2
  35. package/dist/service.mjs +1 -1
  36. package/dist/utils/schema/inspector.d.mts +2 -2
  37. package/dist/utils/schema/material.d.mts +0 -1
  38. package/package.json +1 -1
  39. package/dist/components/biz/business/advertisement/ad-match.d.mts +0 -98
  40. package/dist/components/biz/business/advertisement/ad-match.mjs +0 -2
  41. package/dist/components/biz/business/advertisement/ad-provider.d.mts +0 -33
  42. package/dist/components/biz/business/advertisement/ad-provider.mjs +0 -2
  43. package/dist/components/biz/business/advertisement/ad-query.d.mts +0 -27
  44. package/dist/components/biz/business/advertisement/ad-query.mjs +0 -2
  45. package/dist/components/biz/business/advertisement/ad-runtime-provider.d.mts +0 -25
  46. package/dist/components/biz/business/advertisement/ad-runtime-provider.mjs +0 -2
  47. package/dist/components/biz/business/advertisement/banner-ad/client.d.mts +0 -18
  48. package/dist/components/biz/business/advertisement/banner-ad/client.mjs +0 -2
  49. package/dist/components/biz/business/advertisement/banner-ad/index.d.mts +0 -5
  50. package/dist/components/biz/business/advertisement/banner-ad/material.d.mts +0 -30
  51. package/dist/components/biz/business/advertisement/banner-ad/material.mjs +0 -2
  52. package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +0 -75
  53. package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +0 -2
  54. package/dist/components/biz/business/advertisement/banner-ad/server.d.mts +0 -11
  55. package/dist/components/biz/business/advertisement/banner-ad/server.mjs +0 -2
  56. package/dist/components/biz/business/advertisement/feed-ad/index.d.mts +0 -39
  57. package/dist/components/biz/business/advertisement/feed-ad/index.mjs +0 -2
  58. package/dist/components/biz/business/advertisement/floating-ad/client.d.mts +0 -21
  59. package/dist/components/biz/business/advertisement/floating-ad/client.mjs +0 -2
  60. package/dist/components/biz/business/advertisement/floating-ad/index.d.mts +0 -5
  61. package/dist/components/biz/business/advertisement/floating-ad/material.d.mts +0 -25
  62. package/dist/components/biz/business/advertisement/floating-ad/material.mjs +0 -2
  63. package/dist/components/biz/business/advertisement/floating-ad/schema.d.mts +0 -75
  64. package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +0 -2
  65. package/dist/components/biz/business/advertisement/floating-ad/server.d.mts +0 -11
  66. package/dist/components/biz/business/advertisement/floating-ad/server.mjs +0 -2
  67. package/dist/components/biz/business/advertisement/icon-ad/client.d.mts +0 -16
  68. package/dist/components/biz/business/advertisement/icon-ad/client.mjs +0 -2
  69. package/dist/components/biz/business/advertisement/icon-ad/index.d.mts +0 -5
  70. package/dist/components/biz/business/advertisement/icon-ad/material.d.mts +0 -29
  71. package/dist/components/biz/business/advertisement/icon-ad/material.mjs +0 -2
  72. package/dist/components/biz/business/advertisement/icon-ad/schema.d.mts +0 -69
  73. package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +0 -2
  74. package/dist/components/biz/business/advertisement/icon-ad/server.d.mts +0 -11
  75. package/dist/components/biz/business/advertisement/icon-ad/server.mjs +0 -2
  76. package/dist/components/biz/business/advertisement/index.d.mts +0 -26
  77. package/dist/components/biz/business/advertisement/text-ad/client.d.mts +0 -15
  78. package/dist/components/biz/business/advertisement/text-ad/client.mjs +0 -2
  79. package/dist/components/biz/business/advertisement/text-ad/index.d.mts +0 -5
  80. package/dist/components/biz/business/advertisement/text-ad/material.d.mts +0 -27
  81. package/dist/components/biz/business/advertisement/text-ad/material.mjs +0 -2
  82. package/dist/components/biz/business/advertisement/text-ad/schema.d.mts +0 -53
  83. package/dist/components/biz/business/advertisement/text-ad/schema.mjs +0 -2
  84. package/dist/components/biz/business/advertisement/text-ad/server.d.mts +0 -11
  85. package/dist/components/biz/business/advertisement/text-ad/server.mjs +0 -2
  86. package/dist/service/advertisement.d.mts +0 -172
  87. package/dist/service/advertisement.mjs +0 -2
@@ -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};
@@ -1,26 +0,0 @@
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 { TextAd } from "./text-ad/client.mjs";
24
- import { TextAdServer } from "./text-ad/server.mjs";
25
- import { textAdMaterial } from "./text-ad/material.mjs";
26
- import "./text-ad/index.mjs";
@@ -1,15 +0,0 @@
1
-
2
- import { TextAdProps } from "./schema.mjs";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
-
5
- //#region components/biz/business/advertisement/text-ad/client.d.ts
6
- /**
7
- * 文字广告组件。
8
- */
9
- declare function TextAd({
10
- displayCount,
11
- items,
12
- mode: _mode
13
- }: TextAdProps): react_jsx_runtime0.JSX.Element | null;
14
- //#endregion
15
- export { TextAd };
@@ -1,2 +0,0 @@
1
-
2
- "use client";import{adaptTextAdProps as e,hasMatchedAds as t}from"../ad-match.mjs";import{useAdProvider as n}from"../ad-provider.mjs";import{MarqueeClient as r}from"../../marquee/client.mjs";import{useMemo as i}from"react";import{jsx as a}from"react/jsx-runtime";function o({displayCount:o,items:s,mode:c=`renderer`}){let l=n(),u=i(()=>t(l?.matchData)?e(l?.matchData):{displayCount:o,items:s},[l?.matchData,o,s]),d=i(()=>{let e=u.items.filter(e=>e.text?.trim());return typeof u.displayCount==`number`?e.slice(0,Math.max(u.displayCount,0)):e},[u]),f=i(()=>d.map(e=>`${e.text}:${e.jumpUrl||``}`).join(`|`),[d]);return d.length===0?null:a(r,{marqueeKey:f||`text-ad`,mode,contents:d.map(e=>({text:e.text,link:e.jumpUrl||``})),click:{enabled:!0,redirectType:`link`,link:``},close:{enabled:!0},displayStrategy:{rule:`daily`}})}export{o as TextAd};
@@ -1,5 +0,0 @@
1
-
2
- import { TextAdInspectorProps, TextAdItem, TextAdProps, textAdInspectorDefaultProps, textAdInspectorPropsSchema } from "./schema.mjs";
3
- import { TextAd } from "./client.mjs";
4
- import { TextAdServer } from "./server.mjs";
5
- import { textAdMaterial } from "./material.mjs";
@@ -1,27 +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 { TextAd } from "./client.mjs";
6
- import { TextAdServer } 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/text-ad/material.d.ts
11
- /**
12
- * 文字广告物料定义。
13
- */
14
- declare const textAdMaterial: DefineMaterialOption<typeof TextAdServer, typeof TextAd, zod.ZodObject<{
15
- readonly displayCount: zod.ZodNumber & SchemaHasDefaultValue;
16
- readonly items: zod.ZodArray<zod.ZodObject<{
17
- text: zod.ZodString & SchemaHasDefaultValue;
18
- jumpUrl: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
19
- }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
20
- } & {
21
- mode: zod.ZodOptional<zod.ZodEnum<{
22
- renderer: "renderer";
23
- editor: "editor";
24
- }>>;
25
- }, zod_v4_core0.$strip>, "text-ad", "广告组件">;
26
- //#endregion
27
- export { textAdMaterial };
@@ -1,2 +0,0 @@
1
-
2
- import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{TextAd as t}from"./client.mjs";import{textAdInspectorPropsSchema as n}from"./schema.mjs";import{TextAdServer as r}from"./server.mjs";const i=e({type:`text-ad`,name:`文字广告`,icon:`/static/components-thumb/marquee_clickable_closable.png`,category:`广告组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as textAdMaterial};
@@ -1,53 +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/text-ad/schema.d.ts
7
- /**
8
- * 文字广告单条数据。
9
- */
10
- interface TextAdItem {
11
- /**
12
- * 广告文案。
13
- */
14
- text: string;
15
- /**
16
- * 跳转链接。
17
- */
18
- jumpUrl?: string;
19
- }
20
- /**
21
- * 文字广告物料属性。
22
- */
23
- declare const textAdInspectorPropsSchema: z$1.ZodObject<{
24
- readonly displayCount: z$1.ZodNumber & SchemaHasDefaultValue;
25
- readonly items: z$1.ZodArray<z$1.ZodObject<{
26
- text: z$1.ZodString & SchemaHasDefaultValue;
27
- jumpUrl: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
28
- }, z$1.core.$strip>> & SchemaHasDefaultValue;
29
- } & {
30
- mode: z$1.ZodOptional<z$1.ZodEnum<{
31
- renderer: "renderer";
32
- editor: "editor";
33
- }>>;
34
- }, z$1.core.$strip>;
35
- declare const textAdInspectorDefaultProps: {
36
- readonly displayCount: number;
37
- readonly items: {
38
- text: string;
39
- jumpUrl?: string | undefined;
40
- }[];
41
- };
42
- type TextAdInspectorProps<T extends object = object> = InferSchemaProps<typeof textAdInspectorPropsSchema> & T;
43
- /**
44
- * 文字广告组件 props。
45
- */
46
- type TextAdProps = TextAdInspectorProps<{
47
- /**
48
- * 渲染模式。
49
- */
50
- mode?: MaterialComponentMode;
51
- }>;
52
- //#endregion
53
- export { TextAdInspectorProps, TextAdItem, TextAdProps, textAdInspectorDefaultProps, textAdInspectorPropsSchema };
@@ -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(1,{label:`广告展示数量选择`,required:!0}).refine(e=>e>=1&&e<=5,`广告展示数量必须为 1-5`),items:e.array(n.object({text:e.string(`请输入广告文案`,{label:`广告文案`,required:!0}),jumpUrl:e.string(``,{label:`跳转链接`,required:!1})}),{label:`广告列表`,required:!0,defaultValue:[{text:`这是第一条文字广告`,jumpUrl:`/search`},{text:`这是第二条文字广告`,jumpUrl:`/search`}]})})),i=t(r);export{i as textAdInspectorDefaultProps,r as textAdInspectorPropsSchema};
@@ -1,11 +0,0 @@
1
-
2
- import { TextAdProps } from "./schema.mjs";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
-
5
- //#region components/biz/business/advertisement/text-ad/server.d.ts
6
- /**
7
- * 文字广告服务端组件。
8
- */
9
- declare function TextAdServer(props: TextAdProps): Promise<react_jsx_runtime0.JSX.Element>;
10
- //#endregion
11
- export { TextAdServer };
@@ -1,2 +0,0 @@
1
-
2
- import{resolveAdsAppCode as e}from"../ad-match.mjs";import{AdRuntimeProvider as t}from"../ad-runtime-provider.mjs";import{TextAd 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:`text`,appCode:e(),mode:a,children:r(n,{...o,mode:a})})}export{i as TextAdServer};
@@ -1,172 +0,0 @@
1
-
2
- import { RequestConfig, ResponseData } from "../utils/http.mjs";
3
-
4
- //#region service/advertisement.d.ts
5
- type ExtraRequestConfig = Omit<RequestConfig, 'url' | 'method' | 'params' | 'data'>;
6
- /**
7
- * 广告匹配请求场景上下文。
8
- */
9
- interface AdsMatchSceneContext {
10
- /**
11
- * 开屏广告启动类型:cold | hot。
12
- */
13
- startupType?: 'cold' | 'hot';
14
- /**
15
- * 是否为热启动。
16
- */
17
- isStartupHot?: boolean;
18
- /**
19
- * 热启动距离上次退后台的分钟数。
20
- */
21
- backgroundDurationMin?: number;
22
- /**
23
- * 当前视频已播放秒数,盲点广告使用。
24
- */
25
- videoPlayedSeconds?: number;
26
- }
27
- /**
28
- * 广告匹配请求类型。
29
- */
30
- type AdsMatchAdType = 'splash' | 'popup' | 'floating' | 'icon' | 'text' | 'banner' | 'preroll' | 'blind';
31
- /**
32
- * 广告匹配请求体。
33
- */
34
- interface AdsMatchRequest {
35
- /**
36
- * 广告类型。
37
- */
38
- adType: AdsMatchAdType;
39
- /**
40
- * 登录用户 ID,已登录时优先传。
41
- */
42
- userId?: string;
43
- /**
44
- * 设备 ID,游客场景建议传。
45
- */
46
- deviceId?: string;
47
- /**
48
- * 应用 code。
49
- */
50
- appCode: string;
51
- /**
52
- * 场景上下文。
53
- */
54
- sceneContext?: AdsMatchSceneContext;
55
- }
56
- /**
57
- * 广告匹配返回配置。
58
- */
59
- interface AdsMatchConfig {
60
- /**
61
- * 跳过时间,开屏 / 贴片类广告使用。
62
- */
63
- skipSeconds?: number;
64
- /**
65
- * 弹窗广告连续展示条数。
66
- */
67
- popupCount?: number;
68
- /**
69
- * 单用户单日最大展示次数,-1 表示不限制。
70
- */
71
- dailyMaxShow?: number;
72
- /**
73
- * 盲点广告触发分钟数。
74
- */
75
- triggerVideoProgressMin?: number;
76
- /**
77
- * 轮播切换时间。
78
- */
79
- switchInterval?: number;
80
- /**
81
- * 组件展示数量。
82
- */
83
- displayCount?: number;
84
- /**
85
- * Banner 样式尺寸。
86
- */
87
- styleSize?: string;
88
- }
89
- /**
90
- * 广告素材原始项。
91
- */
92
- interface AdsMatchMaterial {
93
- /**
94
- * 广告业务编码。
95
- */
96
- advertiseCode?: string;
97
- /**
98
- * 广告名称。
99
- */
100
- advertiseName?: string;
101
- /**
102
- * 跳转地址。
103
- */
104
- advertiseUrl?: string;
105
- /**
106
- * 图片素材地址。
107
- */
108
- advertiseIcon?: string;
109
- /**
110
- * PC 图片素材地址。
111
- */
112
- adPcAdvertiseIcon?: string;
113
- /**
114
- * 第三方广告类型枚举。
115
- */
116
- advertiseType?: number;
117
- /**
118
- * 广告文案描述。
119
- */
120
- advertiseDesc?: string;
121
- /**
122
- * 排序值。
123
- */
124
- sort?: number;
125
- /**
126
- * 投放开始时间。
127
- */
128
- startTimeStamp?: number;
129
- /**
130
- * 投放结束时间。
131
- */
132
- endTimeStamp?: number;
133
- /**
134
- * 扩展展示信息。
135
- */
136
- adExtData?: string;
137
- }
138
- /**
139
- * 广告匹配响应 data。
140
- */
141
- interface AdsMatchResponseData {
142
- /**
143
- * 是否命中广告。
144
- */
145
- hit?: boolean;
146
- /**
147
- * 本次返回的广告类型。
148
- */
149
- adType?: AdsMatchAdType;
150
- /**
151
- * 命中的第三方广告位编码。
152
- */
153
- advertiseLocationCode?: string;
154
- /**
155
- * 服务端配置。
156
- */
157
- config?: AdsMatchConfig;
158
- /**
159
- * 广告素材列表。
160
- */
161
- materials?: AdsMatchMaterial[];
162
- }
163
- /**
164
- * 广告匹配接口。
165
- */
166
- declare function pContentAdsMatch(data: AdsMatchRequest, config?: ExtraRequestConfig): Promise<ResponseData<AdsMatchResponseData>>;
167
- /**
168
- * 广告匹配接口缓存 key。
169
- */
170
- declare function pContentAdsMatchKey(data: Pick<AdsMatchRequest, 'adType' | 'appCode' | 'sceneContext'>): (string | AdsMatchSceneContext)[];
171
- //#endregion
172
- export { AdsMatchAdType, AdsMatchConfig, AdsMatchMaterial, AdsMatchRequest, AdsMatchResponseData, AdsMatchSceneContext, pContentAdsMatch, pContentAdsMatchKey };
@@ -1,2 +0,0 @@
1
-
2
- import e from"../utils/http.mjs";async function t(t,n){let i=await e.request({...n??{},url:`/api/content/ads/match`,method:`POST`,data:t});return{...i,data:r(i.data)}}function n(e){return[`content-ads-match`,e.adType,e.appCode,e.sceneContext??{}]}function r(e){if(e)return{hit:e.hit,adType:e.adType??e.ad_type,advertiseLocationCode:e.advertiseLocationCode??e.advertise_location_code,config:i(e.config),materials:e.materials?.map(a)??[]}}function i(e){if(e)return{skipSeconds:e.skipSeconds??e.skip_seconds,popupCount:e.popupCount??e.popup_count,dailyMaxShow:e.dailyMaxShow??e.daily_max_show,triggerVideoProgressMin:e.triggerVideoProgressMin??e.trigger_video_progress_min,switchInterval:e.switchInterval??e.switch_interval,displayCount:e.displayCount??e.display_count,styleSize:e.styleSize??e.style_size}}function a(e){return{advertiseCode:e.advertiseCode??e.advertise_code,advertiseName:e.advertiseName??e.advertise_name,advertiseUrl:e.advertiseUrl??e.advertise_url,advertiseIcon:e.advertiseIcon??e.advertise_icon,adPcAdvertiseIcon:e.adPcAdvertiseIcon??e.pc_advertise_icon,advertiseType:e.advertiseType??e.advertise_type,advertiseDesc:e.advertiseDesc??e.advertise_desc,sort:e.sort,startTimeStamp:e.startTimeStamp??e.start_timestamp,endTimeStamp:e.endTimeStamp??e.end_timestamp,adExtData:e.adExtData??e.ad_ext_data}}export{t as pContentAdsMatch,n as pContentAdsMatchKey};