@funhub/platform 0.2.4-beta.2 → 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:`/feedback.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},v=l===`editor`?`absolute z-50 block`:`fixed z-50 block`;return p?s(t,{className:`${v} cursor-pointer`,style:_,onClick:p,children:g}):s(n,{href:h.jumpUrl,className:v,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};
@@ -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" | "secondary" | "destructive" | "outline" | "ghost" | "link" | 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,8 +7,8 @@ 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" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
11
- size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
10
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
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 组件属性。 */
14
14
  type ButtonProps = Button.Props & VariantProps<typeof buttonVariants> & {
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.2",
4
+ "version": "0.2.4-beta.4",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "**/*.css"