@funhub/platform 0.2.4-beta.3 → 0.2.4-beta.4

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.
@@ -5,6 +5,9 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
  //#region components/biz/business/advertisement/floating-ad/client.d.ts
6
6
  /**
7
7
  * 悬浮广告组件。
8
+ *
9
+ * 编辑态下,画布容器设有 `transform: translateZ(0)`,使 `position: fixed`
10
+ * 的 containing block 变为画布容器本身,因此固定定位会锁定在画布右下角。
8
11
  */
9
12
  declare function FloatingAd({
10
13
  mode: _mode,
@@ -1,2 +1,2 @@
1
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{adaptFloatingAdItems as r,hasMatchedAds as i}from"../ad-match.mjs";import{useAdProvider as a}from"../ad-provider.mjs";import{useMemo as o}from"react";import{jsx as s}from"react/jsx-runtime";const c={materialUrl:`/static/components-resource/banner.png`,jumpUrl:`/search`,name:`悬浮广告`};function l({mode:l=`renderer`,bottomOffset:u=100,rightOffset:d=20,pointerEventsDisabled:f=!1,onClick:p}){let m=a(),h=o(()=>l===`editor`?c:i(m?.matchData)?r(m?.matchData)[0]??null:null,[l,m?.matchData]);if(!h?.materialUrl||!h?.jumpUrl)return null;let g=s(t,{className:`relative flex h-full w-full overflow-hidden`,style:{borderRadius:`8px`},"aria-label":h.name||`悬浮广告`,children:s(t,{className:`absolute inset-0`,children:s(e,{src:h.materialUrl,alt:h.name||`悬浮广告`,fill:!0,className:`object-cover object-center`,unoptimized:!0})})});if(l===`editor`){let e={position:`sticky`,bottom:`${u}px`,zIndex:50,display:`flex`,justifyContent:`flex-end`,paddingRight:`${d}px`,pointerEvents:f?`none`:void 0},r={width:`75px`,height:`75px`,flexShrink:0};return p?s(t,{style:e,children:s(t,{className:`cursor-pointer`,style:r,onClick:p,children:g})}):s(t,{style:e,children:s(n,{href:h.jumpUrl,className:`block`,style:r,children:g})})}let _={bottom:`${u}px`,right:`${d}px`,width:`75px`,height:`75px`,pointerEvents:f?`none`:void 0};return p?s(t,{className:`fixed z-50 block cursor-pointer`,style:_,onClick:p,children:g}):s(n,{href:h.jumpUrl,className:`fixed z-50 block`,style:_,children:g})}export{l as FloatingAd};
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{adaptFloatingAdItems as r,hasMatchedAds as i}from"../ad-match.mjs";import{useAdProvider as a}from"../ad-provider.mjs";import{useMemo as o}from"react";import{jsx as s}from"react/jsx-runtime";const c={materialUrl:`/static/components-resource/banner.png`,jumpUrl:`/search`,name:`悬浮广告`};function l({mode:l=`renderer`,bottomOffset:u=100,rightOffset:d=20,pointerEventsDisabled:f=!1,onClick:p}){let m=a(),h=o(()=>l===`editor`?c:i(m?.matchData)?r(m?.matchData)[0]??null:null,[l,m?.matchData]);if(!h?.materialUrl||!h?.jumpUrl)return null;let g=s(t,{className:`relative flex h-full w-full overflow-hidden`,style:{borderRadius:`8px`},"aria-label":h.name||`悬浮广告`,children:s(t,{className:`absolute inset-0`,children:s(e,{src:h.materialUrl,alt:h.name||`悬浮广告`,fill:!0,className:`object-cover object-center`,unoptimized:!0})})}),_={bottom:`${u}px`,right:`${d}px`,width:`75px`,height:`75px`,pointerEvents:f?`none`:void 0};return p?s(t,{className:`fixed z-50 block cursor-pointer`,style:_,onClick:p,children:g}):s(n,{href:h.jumpUrl,className:`fixed z-50 block`,style:_,children:g})}export{l as FloatingAd};
@@ -73,8 +73,8 @@ declare const videoDetailMaterials: MaterialMap<readonly [DefineMaterialOption<t
73
73
  }>>;
74
74
  coverUrl: z$1.ZodOptional<z$1.ZodString>;
75
75
  titleMode: z$1.ZodOptional<z$1.ZodEnum<{
76
- custom: "custom";
77
76
  content: "content";
77
+ custom: "custom";
78
78
  }>>;
79
79
  title: z$1.ZodOptional<z$1.ZodString>;
80
80
  description: z$1.ZodOptional<z$1.ZodString>;
@@ -26,8 +26,8 @@ declare const videoDetailRecommendMaterial: DefineMaterialOption<typeof VideoDet
26
26
  }>>;
27
27
  coverUrl: zod.ZodOptional<zod.ZodString>;
28
28
  titleMode: zod.ZodOptional<zod.ZodEnum<{
29
- custom: "custom";
30
29
  content: "content";
30
+ custom: "custom";
31
31
  }>>;
32
32
  title: zod.ZodOptional<zod.ZodString>;
33
33
  description: zod.ZodOptional<zod.ZodString>;
@@ -22,8 +22,8 @@ declare const videoDetailRecommendInspectorPropsSchema: z$1.ZodObject<{
22
22
  }>>;
23
23
  coverUrl: z$1.ZodOptional<z$1.ZodString>;
24
24
  titleMode: z$1.ZodOptional<z$1.ZodEnum<{
25
- custom: "custom";
26
25
  content: "content";
26
+ custom: "custom";
27
27
  }>>;
28
28
  title: z$1.ZodOptional<z$1.ZodString>;
29
29
  description: z$1.ZodOptional<z$1.ZodString>;
@@ -40,8 +40,8 @@ declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
40
40
  ad_advertise_icon: z$1.ZodOptional<z$1.ZodString>;
41
41
  badge_url: z$1.ZodOptional<z$1.ZodString>;
42
42
  titleMode: z$1.ZodOptional<z$1.ZodEnum<{
43
- custom: "custom";
44
43
  content: "content";
44
+ custom: "custom";
45
45
  }>>;
46
46
  title: z$1.ZodOptional<z$1.ZodString>;
47
47
  description: z$1.ZodOptional<z$1.ZodString>;
@@ -40,8 +40,8 @@ declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecomme
40
40
  ad_advertise_icon: zod.ZodOptional<zod.ZodString>;
41
41
  badge_url: zod.ZodOptional<zod.ZodString>;
42
42
  titleMode: zod.ZodOptional<zod.ZodEnum<{
43
- custom: "custom";
44
43
  content: "content";
44
+ custom: "custom";
45
45
  }>>;
46
46
  title: zod.ZodOptional<zod.ZodString>;
47
47
  description: zod.ZodOptional<zod.ZodString>;
@@ -38,8 +38,8 @@ declare const homeRecommendWaterfallInspectorPropsSchema: z$1.ZodObject<{
38
38
  ad_advertise_icon: z$1.ZodOptional<z$1.ZodString>;
39
39
  badge_url: z$1.ZodOptional<z$1.ZodString>;
40
40
  titleMode: z$1.ZodOptional<z$1.ZodEnum<{
41
- custom: "custom";
42
41
  content: "content";
42
+ custom: "custom";
43
43
  }>>;
44
44
  title: z$1.ZodOptional<z$1.ZodString>;
45
45
  showPlayCount: z$1.ZodOptional<z$1.ZodBoolean>;
@@ -38,8 +38,8 @@ declare const homeRecommendWaterfallMaterial: DefineMaterialOption<typeof HomeRe
38
38
  ad_advertise_icon: zod.ZodOptional<zod.ZodString>;
39
39
  badge_url: zod.ZodOptional<zod.ZodString>;
40
40
  titleMode: zod.ZodOptional<zod.ZodEnum<{
41
- custom: "custom";
42
41
  content: "content";
42
+ custom: "custom";
43
43
  }>>;
44
44
  title: zod.ZodOptional<zod.ZodString>;
45
45
  showPlayCount: zod.ZodOptional<zod.ZodBoolean>;
@@ -19,7 +19,7 @@ declare const marqueeMaterial: DefineMaterialOption<typeof MarqueeServer, typeof
19
19
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
20
20
  readonly click: zod.ZodObject<{
21
21
  readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
22
- readonly redirectType: zod.ZodOptional<zod.ZodType<"link" | "content" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"link" | "content" | "content_list", unknown>>> & SchemaHasDefaultValue;
22
+ readonly redirectType: zod.ZodOptional<zod.ZodType<"content" | "link" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"content" | "link" | "content_list", unknown>>> & SchemaHasDefaultValue;
23
23
  readonly link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
24
24
  }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
25
25
  readonly close: zod.ZodObject<{
@@ -24,7 +24,7 @@ declare const marqueeInspectorPropsSchema: zod.ZodObject<{
24
24
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
25
25
  readonly click: zod.ZodObject<{
26
26
  readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
27
- readonly redirectType: zod.ZodOptional<zod.ZodType<"link" | "content" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"link" | "content" | "content_list", unknown>>> & SchemaHasDefaultValue;
27
+ readonly redirectType: zod.ZodOptional<zod.ZodType<"content" | "link" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"content" | "link" | "content_list", unknown>>> & SchemaHasDefaultValue;
28
28
  readonly link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
29
29
  }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
30
30
  readonly close: zod.ZodObject<{
@@ -6,7 +6,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
6
6
  //#region components/ui/badge.d.ts
7
7
  /** badgeVariants 工具定义。 */
8
8
  declare const badgeVariants: (props?: ({
9
- variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
9
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
10
10
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
11
11
  /** Badge 组件。 */
12
12
  declare function Badge({
@@ -7,7 +7,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
7
7
  //#region components/ui/button.d.ts
8
8
  /** buttonVariants 工具定义。 */
9
9
  declare const buttonVariants: (props?: ({
10
- variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
10
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
11
11
  size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
12
12
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
13
13
  /** Button 组件属性。 */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funhub/platform",
3
3
  "type": "module",
4
- "version": "0.2.4-beta.3",
4
+ "version": "0.2.4-beta.4",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "**/*.css"