@funhub/platform 0.2.4-beta.4 → 0.2.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.
- 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/eye-off-icon.mjs +1 -1
- 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 +10 -6
- package/dist/biz.mjs +1 -1
- package/dist/common.d.mts +5 -2
- package/dist/common.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/user-action.mjs +1 -1
- package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/ad-match.d.mts +7 -3
- package/dist/components/biz/business/advertisement/ad-match.mjs +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/material.d.mts +2 -2
- package/dist/components/biz/business/advertisement/banner-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +9 -4
- package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/feed-ad/index.d.mts +1 -31
- package/dist/components/biz/business/advertisement/feed-ad/index.mjs +1 -1
- package/dist/components/biz/business/advertisement/floating-ad/client.d.mts +4 -3
- package/dist/components/biz/business/advertisement/floating-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/floating-ad/index.d.mts +1 -1
- package/dist/components/biz/business/advertisement/floating-ad/material.d.mts +5 -0
- package/dist/components/biz/business/advertisement/floating-ad/schema.d.mts +21 -6
- package/dist/components/biz/business/advertisement/floating-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/material.d.mts +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/schema.d.mts +7 -1
- package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/index.d.mts +4 -4
- package/dist/components/biz/business/advertisement/popup-ad/client.mjs +2 -2
- package/dist/components/biz/business/advertisement/popup-ad/index.d.mts +1 -1
- package/dist/components/biz/business/advertisement/popup-ad/material.d.mts +2 -2
- package/dist/components/biz/business/advertisement/popup-ad/schema.d.mts +14 -15
- package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/text-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/text-ad/material.d.mts +1 -1
- package/dist/components/biz/business/advertisement/text-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/text-ad/schema.d.mts +5 -1
- package/dist/components/biz/business/advertisement/text-ad/schema.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/client.d.mts +2 -1
- 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/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/editor-preview.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-actions/client.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/material.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/shared.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 +0 -8
- 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 +0 -8
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +0 -8
- 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 +0 -8
- 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 +10 -5
- 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/nav-bar/variants/basic-nav-bar/runtime/client.mjs +1 -1
- 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/empty-state.mjs +2 -0
- 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 +17 -0
- package/dist/components/biz/business/ranking-recommend/client.mjs +70 -0
- package/dist/components/biz/business/ranking-recommend/material.d.mts +35 -0
- package/dist/components/biz/business/ranking-recommend/material.mjs +2 -0
- package/dist/components/biz/business/ranking-recommend/schema.d.mts +35 -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/query.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/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 +8 -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 +116 -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/feedback/_components/feedback-form.mjs +1 -1
- package/dist/components/pages/home/client.mjs +1 -1
- package/dist/components/pages/login/auth-page-styles.mjs +6 -0
- package/dist/components/pages/login/login-client.mjs +1 -1
- package/dist/components/pages/login/register.mjs +1 -1
- package/dist/components/pages/login/verify.mjs +1 -4
- package/dist/components/pages/publish/components/collection.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/reset-password-drawer.mjs +2 -2
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/pages/user-follow/_components/follow-no-login.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/box.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 +3 -1
- package/dist/materials.mjs +1 -1
- package/dist/service/generated/client.d.mts +38 -2
- package/dist/service/generated/client.mjs +1 -1
- package/dist/service/generated/tanstack.d.mts +47 -2
- package/dist/service/generated/tanstack.mjs +1 -1
- package/dist/service.d.mts +3 -3
- package/dist/service.mjs +1 -1
- package/dist/theme-tokens.d.mts +9 -0
- package/dist/theme-tokens.mjs +2 -0
- package/dist/types.d.mts +662 -9
- package/dist/utils/helper.d.mts +1 -1
- package/dist/utils/helper.mjs +1 -1
- package/package.json +8 -2
- 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
|
@@ -5,41 +5,11 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
5
5
|
/**
|
|
6
6
|
* 信息流广告项最小识别结构。
|
|
7
7
|
*/
|
|
8
|
-
interface FeedAdPayloadLike {
|
|
9
|
-
/**
|
|
10
|
-
* 广告业务编码。
|
|
11
|
-
*/
|
|
12
|
-
ad_code?: string;
|
|
13
|
-
/**
|
|
14
|
-
* 广告跳转链接。
|
|
15
|
-
*/
|
|
16
|
-
ad_advertise_url?: string;
|
|
17
|
-
/**
|
|
18
|
-
* 广告素材地址。
|
|
19
|
-
*/
|
|
20
|
-
ad_advertise_icon?: string;
|
|
21
|
-
/**
|
|
22
|
-
* 广告类型。
|
|
23
|
-
*/
|
|
24
|
-
ad_advertise_type?: number;
|
|
25
|
-
/**
|
|
26
|
-
* 广告文案描述。
|
|
27
|
-
*/
|
|
28
|
-
ad_advertise_desc?: string;
|
|
29
|
-
/**
|
|
30
|
-
* 广告扩展字段。
|
|
31
|
-
*/
|
|
32
|
-
ad_ext_data?: string;
|
|
33
|
-
}
|
|
34
8
|
interface FeedAdItemLike {
|
|
35
9
|
/**
|
|
36
10
|
* 是否广告。
|
|
37
11
|
*/
|
|
38
12
|
is_ad?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* 新版广告对象。
|
|
41
|
-
*/
|
|
42
|
-
ad?: FeedAdPayloadLike;
|
|
43
13
|
/**
|
|
44
14
|
* 广告跳转链接。
|
|
45
15
|
*/
|
|
@@ -66,4 +36,4 @@ declare function getFeedAdIcon(item: FeedAdItemLike | null | undefined): string;
|
|
|
66
36
|
*/
|
|
67
37
|
declare function FeedAdBadge(): react_jsx_runtime0.JSX.Element;
|
|
68
38
|
//#endregion
|
|
69
|
-
export { FeedAdBadge, FeedAdItemLike,
|
|
39
|
+
export { FeedAdBadge, FeedAdItemLike, getFeedAdIcon, getFeedAdJumpUrl, isFeedAdItem };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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?.
|
|
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};
|
|
@@ -5,12 +5,13 @@ 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 变为画布容器本身,因此固定定位会锁定在画布右下角。
|
|
11
8
|
*/
|
|
12
9
|
declare function FloatingAd({
|
|
13
10
|
mode: _mode,
|
|
11
|
+
ad,
|
|
12
|
+
materialUrl,
|
|
13
|
+
jumpUrl,
|
|
14
|
+
name,
|
|
14
15
|
bottomOffset,
|
|
15
16
|
rightOffset,
|
|
16
17
|
pointerEventsDisabled,
|
|
@@ -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{
|
|
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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./schema.mjs";
|
|
2
|
+
import { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./schema.mjs";
|
|
3
3
|
import { FloatingAd } from "./client.mjs";
|
|
4
4
|
import { FloatingAdServer } from "./server.mjs";
|
|
5
5
|
import { floatingAdMaterial } from "./material.mjs";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
import { SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
2
3
|
import { DefineMaterialOption } from "../../../../../utils/schema/material.mjs";
|
|
3
4
|
import "../../../../../utils.mjs";
|
|
4
5
|
import { FloatingAd } from "./client.mjs";
|
|
@@ -11,6 +12,10 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
11
12
|
* 悬浮广告物料定义。
|
|
12
13
|
*/
|
|
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
|
+
} & {
|
|
14
19
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
15
20
|
renderer: "renderer";
|
|
16
21
|
editor: "editor";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { MaterialComponentMode } from "../../../../../utils/schema/schema.mjs";
|
|
2
|
+
import { InferSchemaProps, MaterialComponentMode, SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
|
+
import "../../../../../utils.mjs";
|
|
3
4
|
import { AdsMatchSceneContext } from "../../../../../service/advertisement.mjs";
|
|
4
5
|
import * as zod from "zod";
|
|
5
6
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
@@ -23,19 +24,29 @@ interface FloatingAdItem {
|
|
|
23
24
|
name?: string;
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
|
-
*
|
|
27
|
+
* 悬浮广告物料属性。
|
|
27
28
|
*/
|
|
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
|
+
} & {
|
|
29
34
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
30
35
|
renderer: "renderer";
|
|
31
36
|
editor: "editor";
|
|
32
37
|
}>>;
|
|
33
38
|
}, zod_v4_core0.$strip>;
|
|
34
|
-
declare const floatingAdInspectorDefaultProps: {
|
|
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>;
|
|
35
46
|
/**
|
|
36
47
|
* 悬浮广告组件 props。
|
|
37
48
|
*/
|
|
38
|
-
|
|
49
|
+
type FloatingAdProps = Partial<FloatingAdEditableProps> & {
|
|
39
50
|
/**
|
|
40
51
|
* 渲染模式。
|
|
41
52
|
*/
|
|
@@ -48,6 +59,10 @@ interface FloatingAdProps {
|
|
|
48
59
|
* 广告场景控制对象。
|
|
49
60
|
*/
|
|
50
61
|
sceneContext?: AdsMatchSceneContext;
|
|
62
|
+
/**
|
|
63
|
+
* 广告数据。
|
|
64
|
+
*/
|
|
65
|
+
ad?: FloatingAdItem;
|
|
51
66
|
/**
|
|
52
67
|
* 距离底部的偏移量。
|
|
53
68
|
*/
|
|
@@ -64,6 +79,6 @@ interface FloatingAdProps {
|
|
|
64
79
|
* 自定义点击事件。
|
|
65
80
|
*/
|
|
66
81
|
onClick?: () => void;
|
|
67
|
-
}
|
|
82
|
+
};
|
|
68
83
|
//#endregion
|
|
69
|
-
export { FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema };
|
|
84
|
+
export { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";const n=e(()
|
|
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,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{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{
|
|
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};
|
|
@@ -18,7 +18,7 @@ declare const iconAdMaterial: DefineMaterialOption<typeof IconAdServer, typeof I
|
|
|
18
18
|
icon: zod.ZodString & SchemaHasDefaultValue;
|
|
19
19
|
jumpUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
20
20
|
badgeText: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
21
|
-
}, zod_v4_core0.$strip
|
|
21
|
+
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
22
22
|
} & {
|
|
23
23
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
24
24
|
renderer: "renderer";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{
|
|
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};
|
|
@@ -36,7 +36,7 @@ declare const iconAdInspectorPropsSchema: z$1.ZodObject<{
|
|
|
36
36
|
icon: z$1.ZodString & SchemaHasDefaultValue;
|
|
37
37
|
jumpUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
38
38
|
badgeText: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
39
|
-
}, z$1.core.$strip
|
|
39
|
+
}, z$1.core.$strip>> & SchemaHasDefaultValue;
|
|
40
40
|
} & {
|
|
41
41
|
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
42
42
|
renderer: "renderer";
|
|
@@ -45,6 +45,12 @@ declare const iconAdInspectorPropsSchema: z$1.ZodObject<{
|
|
|
45
45
|
}, z$1.core.$strip>;
|
|
46
46
|
declare const iconAdInspectorDefaultProps: {
|
|
47
47
|
readonly displayCount: number;
|
|
48
|
+
readonly items: {
|
|
49
|
+
title: string;
|
|
50
|
+
icon: string;
|
|
51
|
+
jumpUrl: string;
|
|
52
|
+
badgeText?: string | undefined;
|
|
53
|
+
}[];
|
|
48
54
|
};
|
|
49
55
|
type IconAdInspectorProps<T extends object = object> = InferSchemaProps<typeof iconAdInspectorPropsSchema> & T;
|
|
50
56
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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})})),i=t(r);export{i as iconAdInspectorDefaultProps,r as iconAdInspectorPropsSchema};
|
|
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,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import { BannerAdInspectorProps, BannerAdItem, BannerAdProps, BannerAdStyleSize, bannerAdInspectorDefaultProps, bannerAdInspectorPropsSchema, bannerAdStyleSizeOptions } from "./banner-ad/schema.mjs";
|
|
3
|
-
import { FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./floating-ad/schema.mjs";
|
|
3
|
+
import { FloatingAdEditableProps, FloatingAdInspectorProps, FloatingAdItem, FloatingAdProps, floatingAdInspectorDefaultProps, floatingAdInspectorPropsSchema } from "./floating-ad/schema.mjs";
|
|
4
4
|
import { IconAdInspectorProps, IconAdItem, IconAdProps, iconAdInspectorDefaultProps, iconAdInspectorPropsSchema } from "./icon-ad/schema.mjs";
|
|
5
5
|
import { TextAdInspectorProps, TextAdItem, TextAdProps, textAdInspectorDefaultProps, textAdInspectorPropsSchema } from "./text-ad/schema.mjs";
|
|
6
|
-
import { AdsMatchExtData, adaptBannerAdProps,
|
|
6
|
+
import { AdsMatchExtData, adaptBannerAdProps, adaptFloatingAdItem, adaptIconAdProps, adaptPopupAdMaterials, adaptTextAdProps, buildAdsMatchRequest, getFirstMatchedMaterial, hasMatchedAds, parseAdsMatchExtData, resolveAdsAppCode, sortAdsMatchMaterials } from "./ad-match.mjs";
|
|
7
7
|
import { AdProvider, AdProviderProps, AdProviderValue, useAdProvider } from "./ad-provider.mjs";
|
|
8
8
|
import { AdsMatchQueryOptions, createAdsMatchPrefetchItem, createAdsMatchQueryFn, getAdsMatchQueryKey } from "./ad-query.mjs";
|
|
9
9
|
import { AdRuntimeProvider, AdRuntimeProviderProps } from "./ad-runtime-provider.mjs";
|
|
@@ -11,7 +11,7 @@ import { BannerAd } from "./banner-ad/client.mjs";
|
|
|
11
11
|
import { BannerAdServer } from "./banner-ad/server.mjs";
|
|
12
12
|
import { bannerAdMaterial } from "./banner-ad/material.mjs";
|
|
13
13
|
import "./banner-ad/index.mjs";
|
|
14
|
-
import { FeedAdBadge, FeedAdItemLike,
|
|
14
|
+
import { FeedAdBadge, FeedAdItemLike, getFeedAdIcon, getFeedAdJumpUrl, isFeedAdItem } from "./feed-ad/index.mjs";
|
|
15
15
|
import { FloatingAd } from "./floating-ad/client.mjs";
|
|
16
16
|
import { FloatingAdServer } from "./floating-ad/server.mjs";
|
|
17
17
|
import { floatingAdMaterial } from "./floating-ad/material.mjs";
|
|
@@ -20,7 +20,7 @@ import { IconAd } from "./icon-ad/client.mjs";
|
|
|
20
20
|
import { IconAdServer } from "./icon-ad/server.mjs";
|
|
21
21
|
import { iconAdMaterial } from "./icon-ad/material.mjs";
|
|
22
22
|
import "./icon-ad/index.mjs";
|
|
23
|
-
import {
|
|
23
|
+
import { PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema } from "./popup-ad/schema.mjs";
|
|
24
24
|
import { PopupAd } from "./popup-ad/client.mjs";
|
|
25
25
|
import { PopupAdServer } from "./popup-ad/server.mjs";
|
|
26
26
|
import { popupAdMaterial } from "./popup-ad/material.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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";
|
|
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
3
|
@keyframes funhub-popup-ad-enter {
|
|
4
4
|
0% {
|
|
5
5
|
opacity: 0;
|
|
@@ -61,4 +61,4 @@
|
|
|
61
61
|
animation-iteration-count: 1 !important;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
`})]})}):null}export{
|
|
64
|
+
`})]})}):null}export{h as PopupAd};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema } from "./schema.mjs";
|
|
3
3
|
import { PopupAd } from "./client.mjs";
|
|
4
4
|
import { PopupAdServer } from "./server.mjs";
|
|
5
5
|
import { popupAdMaterial } from "./material.mjs";
|
|
@@ -12,13 +12,13 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
12
12
|
* 弹窗广告物料定义。
|
|
13
13
|
*/
|
|
14
14
|
declare const popupAdMaterial: DefineMaterialOption<typeof PopupAdServer, typeof PopupAd, zod.ZodObject<{
|
|
15
|
-
readonly items: zod.
|
|
15
|
+
readonly items: zod.ZodArray<zod.ZodObject<{
|
|
16
16
|
id: zod.ZodString & SchemaHasDefaultValue;
|
|
17
17
|
title: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
18
18
|
jumpUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
19
19
|
materialUrl: zod.ZodString & SchemaHasDefaultValue;
|
|
20
20
|
desc: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
21
|
-
}, zod_v4_core0.$strip
|
|
21
|
+
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
22
22
|
} & {
|
|
23
23
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
24
24
|
renderer: "renderer";
|
|
@@ -19,37 +19,36 @@ interface PopupAdItem {
|
|
|
19
19
|
* 弹窗广告物料属性。
|
|
20
20
|
*/
|
|
21
21
|
declare const popupAdInspectorPropsSchema: z$1.ZodObject<{
|
|
22
|
-
readonly items: z$1.
|
|
22
|
+
readonly items: z$1.ZodArray<z$1.ZodObject<{
|
|
23
23
|
id: z$1.ZodString & SchemaHasDefaultValue;
|
|
24
24
|
title: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
25
25
|
jumpUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
26
26
|
materialUrl: z$1.ZodString & SchemaHasDefaultValue;
|
|
27
27
|
desc: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
28
|
-
}, z$1.core.$strip
|
|
28
|
+
}, z$1.core.$strip>> & SchemaHasDefaultValue;
|
|
29
29
|
} & {
|
|
30
30
|
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
31
31
|
renderer: "renderer";
|
|
32
32
|
editor: "editor";
|
|
33
33
|
}>>;
|
|
34
34
|
}, z$1.core.$strip>;
|
|
35
|
-
declare const popupAdInspectorDefaultProps: {
|
|
35
|
+
declare const popupAdInspectorDefaultProps: {
|
|
36
|
+
readonly items: {
|
|
37
|
+
id: string;
|
|
38
|
+
jumpUrl: string;
|
|
39
|
+
materialUrl: string;
|
|
40
|
+
title?: string | undefined;
|
|
41
|
+
desc?: string | undefined;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
36
44
|
type PopupAdInspectorProps<T extends object = object> = InferSchemaProps<typeof popupAdInspectorPropsSchema> & T;
|
|
37
45
|
/**
|
|
38
46
|
* 弹窗广告组件 props。
|
|
39
47
|
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* 广告列表。
|
|
43
|
-
*/
|
|
44
|
-
items?: PopupAdItem[];
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* 弹窗广告组件 props。
|
|
48
|
-
*/
|
|
49
|
-
type PopupAdProps = Omit<PopupAdInspectorProps<{
|
|
48
|
+
type PopupAdProps = PopupAdInspectorProps<{
|
|
50
49
|
mode?: MaterialComponentMode;
|
|
51
50
|
componentId?: string;
|
|
52
51
|
sceneContext?: AdsMatchSceneContext;
|
|
53
|
-
}
|
|
52
|
+
}>;
|
|
54
53
|
//#endregion
|
|
55
|
-
export {
|
|
54
|
+
export { PopupAdInspectorProps, PopupAdItem, PopupAdProps, popupAdInspectorDefaultProps, popupAdInspectorPropsSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({items:e.array(n.object({id:e.string(`popup-ad-1`,{label:`广告 ID`,required:!0}),title:e.string(`弹窗广告标题`,{label:`标题`,required:!1}),jumpUrl:e.string(`/search`,{label:`跳转链接`,required:!0}),materialUrl:e.string(`/static/components-resource/banner.png`,{label:`素材地址`,required:!0}),desc:e.string(`这里是弹窗广告描述`,{label:`描述`,required:!1})}),{label:`广告列表`,required:!1})})),i=t(r);export{i as popupAdInspectorDefaultProps,r as popupAdInspectorPropsSchema};
|
|
2
|
+
import{defineComponentPropsSchema as e,getSchemaDefaultProps as t}from"../../../../../utils/schema/schema.mjs";import n from"zod";const r=e(e=>({items:e.array(n.object({id:e.string(`popup-ad-1`,{label:`广告 ID`,required:!0}),title:e.string(`弹窗广告标题`,{label:`标题`,required:!1}),jumpUrl:e.string(`/search`,{label:`跳转链接`,required:!0}),materialUrl:e.string(`/static/components-resource/banner.png`,{label:`素材地址`,required:!0}),desc:e.string(`这里是弹窗广告描述`,{label:`描述`,required:!1})}),{label:`广告列表`,required:!0,defaultValue:[{id:`popup-ad-1`,title:`弹窗广告标题`,jumpUrl:`/search`,materialUrl:`/static/components-resource/banner.png`,desc:`这里是弹窗广告描述`}]})})),i=t(r);export{i as popupAdInspectorDefaultProps,r as popupAdInspectorPropsSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useRouter as e}from"../../../../../utils/use-compatible-router.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Text as n}from"../../../../ui/text.mjs";import{adaptTextAdProps as r,hasMatchedAds as i}from"../ad-match.mjs";import{useAdProvider as a}from"../ad-provider.mjs";import{
|
|
2
|
+
"use client";import{useRouter as e}from"../../../../../utils/use-compatible-router.mjs";import{Box as t}from"../../../../ui/box.mjs";import{Text as n}from"../../../../ui/text.mjs";import{adaptTextAdProps as r,hasMatchedAds as i}from"../ad-match.mjs";import{useAdProvider as a}from"../ad-provider.mjs";import{useEffect as o,useMemo as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";const d=`text_ad_list`;let f=null;function p(e,t){if(!e)return!1;if(t===`once`)return!0;let n=new Date(e),r=new Date;return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}function m(e,t){return p(e.closedAt,t)}function h(){if(f)return f;if(typeof window>`u`)return{};let e=window.localStorage.getItem(d);if(!e)return f={},{};try{let t=JSON.parse(e);return f=t&&typeof t==`object`?t:{},f}catch{return f={},{}}}function g(e){f=e,!(typeof window>`u`)&&window.localStorage.setItem(d,JSON.stringify(e))}function _(e){return h()[e]??{}}function v(e,t){g({...h(),[e]:t})}function y({displayCount:d,items:f,mode:p=`renderer`}){let h=a(),g=e(),y=p===`editor`,[b,x]=c(!1),[S,C]=c(y),[w,T]=c(y),E=s(()=>i(h?.matchData)?r(h?.matchData):{displayCount:d,items:f},[h?.matchData,d,f]),D=s(()=>{let e=E.items.filter(e=>e.text?.trim());return typeof E.displayCount==`number`?e.slice(0,Math.max(E.displayCount,0)):e},[E]),O=D[0],k=s(()=>D.map(e=>`${e.text}:${e.jumpUrl||``}`).join(`|`),[D]);if(o(()=>{x(!0)},[]),o(()=>{if(b){if(y){C(!0),T(!0);return}if(!k||!O){C(!1),T(!0);return}C(!m(_(k),`daily`)),T(!0)}},[O,y,b,k]),!O||!y&&(!b||!w||!S))return null;function A(){k&&v(k,{..._(k),closedAt:Date.now()})}function j(e){e.jumpUrl&&g.push(e.jumpUrl)}function M(e){e.stopPropagation(),C(!1),A()}function N(){y||(C(!1),A(),j(O))}return l(t,{className:`w-full`,style:{backgroundColor:`#131313`,padding:`8px 16px`},children:u(t,{className:`relative flex w-full items-center justify-between overflow-hidden cursor-pointer`,style:{minHeight:`40px`,backgroundColor:`#FFE7E7`,padding:`0 8px`},onClick:N,children:[u(t,{className:`flex min-w-0 items-center`,style:{gap:`8px`,width:`280px`},children:[l(t,{className:`shrink-0`,style:{padding:`4px 8px`,borderRadius:`8px`,backgroundColor:`rgba(0, 0, 0, 0.33)`},children:l(n,{className:`flex h-full items-center justify-center text-white`,style:{fontSize:`12px`,lineHeight:`normal`,fontWeight:400},children:`广告`})}),l(n,{className:`truncate`,style:{flex:`1 0 0`,color:`#FD4C5E`,fontSize:`14px`,lineHeight:`normal`,fontWeight:400},children:O.text})]}),u(t,{className:`flex shrink-0 items-center`,style:{gap:`6px`,width:`54px`},children:[l(t,{className:`flex shrink-0 items-center justify-center`,style:{width:`20px`,height:`34px`},children:l(`svg`,{width:`10`,height:`17`,viewBox:`0 0 10 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,children:l(`path`,{d:`M1 1L8.5 8.5L1 16`,stroke:`#FD4C5E`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})}),u(`button`,{type:`button`,"aria-label":`关闭文字广告`,className:`relative shrink-0 border-none p-0`,style:{width:`17px`,height:`17px`,borderRadius:`999px`,backgroundColor:`#F9A9AE`},onClick:M,children:[l(t,{className:`absolute left-1/2 top-1/2`,style:{width:`9px`,height:`2px`,borderRadius:`999px`,backgroundColor:`#FFFFFF`,transform:`translate(-50%, -50%) rotate(45deg)`}}),l(t,{className:`absolute left-1/2 top-1/2`,style:{width:`9px`,height:`2px`,borderRadius:`999px`,backgroundColor:`#FFFFFF`,transform:`translate(-50%, -50%) rotate(-45deg)`}})]})]})]})})}export{y as TextAd};
|
|
@@ -16,7 +16,7 @@ declare const textAdMaterial: DefineMaterialOption<typeof TextAdServer, typeof T
|
|
|
16
16
|
readonly items: zod.ZodArray<zod.ZodObject<{
|
|
17
17
|
text: zod.ZodString & SchemaHasDefaultValue;
|
|
18
18
|
jumpUrl: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
|
|
19
|
-
}, zod_v4_core0.$strip
|
|
19
|
+
}, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
|
|
20
20
|
} & {
|
|
21
21
|
mode: zod.ZodOptional<zod.ZodEnum<{
|
|
22
22
|
renderer: "renderer";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineMaterial as e}from"../../../../../utils/schema/material.mjs";import{
|
|
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};
|
|
@@ -26,7 +26,7 @@ declare const textAdInspectorPropsSchema: z$1.ZodObject<{
|
|
|
26
26
|
readonly items: z$1.ZodArray<z$1.ZodObject<{
|
|
27
27
|
text: z$1.ZodString & SchemaHasDefaultValue;
|
|
28
28
|
jumpUrl: z$1.ZodOptional<z$1.ZodString> & SchemaHasDefaultValue;
|
|
29
|
-
}, z$1.core.$strip
|
|
29
|
+
}, z$1.core.$strip>> & SchemaHasDefaultValue;
|
|
30
30
|
} & {
|
|
31
31
|
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
32
32
|
renderer: "renderer";
|
|
@@ -35,6 +35,10 @@ declare const textAdInspectorPropsSchema: z$1.ZodObject<{
|
|
|
35
35
|
}, z$1.core.$strip>;
|
|
36
36
|
declare const textAdInspectorDefaultProps: {
|
|
37
37
|
readonly displayCount: number;
|
|
38
|
+
readonly items: {
|
|
39
|
+
text: string;
|
|
40
|
+
jumpUrl?: string | undefined;
|
|
41
|
+
}[];
|
|
38
42
|
};
|
|
39
43
|
type TextAdInspectorProps<T extends object = object> = InferSchemaProps<typeof textAdInspectorPropsSchema> & T;
|
|
40
44
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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})})),i=t(r);export{i as textAdInspectorDefaultProps,r as textAdInspectorPropsSchema};
|
|
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,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{buildContentUrl as e}from"../../../../../utils/helpers/url.mjs";import{mergeStyles as t}from"../../../../../utils/styles/helpers.mjs";import{Image as n}from"../../../../../../ui/image.mjs";import{Box as r}from"../../../../../../ui/box.mjs";import{Carousel as i,CarouselContent as a,CarouselItem as o}from"../../../../../../ui/carousel.mjs";import{Text as s}from"../../../../../../ui/text.mjs";import c from"../../../../../../ui/
|
|
2
|
+
"use client";import{buildContentUrl as e}from"../../../../../utils/helpers/url.mjs";import{mergeStyles as t}from"../../../../../utils/styles/helpers.mjs";import{Image as n}from"../../../../../../ui/image.mjs";import{Box as r}from"../../../../../../ui/box.mjs";import{Carousel as i,CarouselContent as a,CarouselItem as o}from"../../../../../../ui/carousel.mjs";import{Text as s}from"../../../../../../ui/text.mjs";import c from"../../../../../../ui/link.mjs";import{defaultProps as l}from"../defaults/default-props.mjs";import u from"clsx";import{useIsClient as d}from"foxact/use-is-client";import{useEffect as f,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";const _={list:[]};function v({mode:v=`renderer`,props:y=_,styles:b,events:x}){let S=v===`editor`,{autoplay:C=l.autoplay,interval:w=l.interval,loop:T=l.loop,showTitle:E=l.showTitle,showIndicator:D=l.showIndicator,list:O=[]}={...l,...y},[k,A]=m(),[j,M]=m(0),N=d(),P=p(null);if(f(()=>{if(!k||!N)return;let e=()=>{M(k.selectedScrollSnap())};return k.on(`select`,e),e(),()=>{k.off(`select`,e)}},[k,x,N]),f(()=>!C||!k||O.length<=1?void 0:(P.current=setInterval(()=>{k.canScrollNext()?k.scrollNext():T&&k.scrollTo(0)},w),()=>{P.current&&=(clearInterval(P.current),null)}),[C,k,w,T,O.length]),!O||O.length===0)return null;let F=O[j],I=b?t(b,{}):void 0;return h(r,{className:u(`w-full px-[16px]`,S&&`pointer-events-none`),style:I,children:g(r,{className:`relative w-full`,children:[h(i,{setApi:A,opts:{align:`start`,loop:T,skipSnaps:!1,dragFree:!1},className:`w-full`,children:h(a,{className:`ml-0`,children:O.map((t,r)=>h(o,{className:`pl-0`,children:h(c,{href:e({url:``,contentId:t.contentId,contentType:1,title:t.title}),className:u(`block relative w-full overflow-hidden touch-manipulation`,`aspect-[358/166]`),children:h(n,{src:t.coverUrl,alt:t.title||`Banner ${r+1}`,fill:!0,objectFit:`cover`,unoptimized:!0})})},r))})}),(E||D&&O.length>1)&&h(r,{className:`absolute inset-x-0 bottom-0 h-[72px] pointer-events-none`,style:{background:`linear-gradient(180deg, rgba(8, 2, 17, 0) 0%, rgba(8, 2, 17, 0.28) 55%, rgba(8, 2, 17, 0.4) 100%)`}}),E&&F?.title&&h(r,{className:`absolute left-[12px] right-[12px] bottom-[34px] pointer-events-none`,children:h(s,{as:`p`,className:`text-white text-[16px] leading-[22px] font-medium line-clamp-1`,children:F.title})}),D&&O.length>1&&h(r,{className:`absolute left-1/2 -translate-x-1/2 bottom-[16px] flex items-center gap-[4px] pointer-events-auto`,children:O.map((e,t)=>h(`button`,{type:`button`,className:u(`block size-[6px] rounded-full`,t===j?`bg-theme5`:`bg-[rgba(0,0,0,0.6)]`),"aria-label":`跳转到第 ${t+1} 个 Banner`},t))})]})})}export{v as default};
|
|
@@ -9,9 +9,10 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
9
9
|
//#region components/biz/business/banner-carousel/client.d.ts
|
|
10
10
|
declare function BannerCarouselClient({
|
|
11
11
|
mode,
|
|
12
|
+
props: nestedPropsConfig,
|
|
12
13
|
styles,
|
|
13
14
|
events,
|
|
14
|
-
...
|
|
15
|
+
...directPropsConfig
|
|
15
16
|
}: BaseComponentProps<any> & {
|
|
16
17
|
mode?: MaterialComponentMode;
|
|
17
18
|
} & BasicBannerProps): react_jsx_runtime0.JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{
|
|
2
|
+
"use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Image as t}from"../../../ui/image.mjs";import{Box as n}from"../../../ui/box.mjs";import{Carousel as r,CarouselContent as i,CarouselItem as a}from"../../../ui/carousel.mjs";import{Text as o}from"../../../ui/text.mjs";import s from"../../../ui/link.mjs";import c from"../../../../assets/icons/detail/video_flag.mjs";import{defaultProps as l}from"./default-props.mjs";import u from"clsx";import{useIsClient as d}from"foxact/use-is-client";import{useEffect as f,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";const _={list:[]};function v(e){let t=Number(e||0);if(!Number.isFinite(t)||t<=0)return`0`;if(t>=1e4){let e=t/1e4;return`${e%1==0?e:e.toFixed(1)}万`}if(t>=1e3){let e=t/1e3;return`${e%1==0?e:e.toFixed(1)}千`}return String(Math.floor(t))}function y(e){let t=e.playCount;if(typeof t==`number`&&Number.isFinite(t))return t;let n=e.video;if(!n||typeof n!=`object`)return 0;let r=n;return Number(r.static?.browse_cnt??r.play_count??0)||0}function b({mode:b=`renderer`,props:x=_,styles:S,events:C,...w}){let T=b===`editor`,{autoplay:E=l.autoplay,interval:D=l.interval,loop:O=l.loop,showTitle:k=l.showTitle,showIndicator:A=l.showIndicator,list:j=[]}={...l,...x,...w},[M,N]=m(),[P,F]=m(0),I=d(),L=p(null);if(f(()=>{if(!M||!I)return;let e=()=>{F(M.selectedScrollSnap())};return M.on(`select`,e),e(),()=>{M.off(`select`,e)}},[M,C,I]),f(()=>{if(!(!E||!M||j.length<=1))return L.current=setInterval(()=>{M.canScrollNext()?M.scrollNext():O&&M.scrollTo(0)},D*1e3),()=>{L.current&&=(clearInterval(L.current),null)}},[E,M,D,O,j.length]),!j||j.length===0)return null;let R=j[P],z=S?e(S,{}):void 0,B=R?.badgeUrl||``,V=R?.showPlayCount??!0,H=R?.showEpisodeCount??!0,U=y(R),W=typeof R?.episodeInfo==`string`?R.episodeInfo.trim():``;return h(n,{className:u(`w-full px-[16px]`,T&&`pointer-events-none`),style:z,children:g(n,{className:`relative w-full overflow-hidden rounded-[8px]`,children:[h(r,{setApi:N,opts:{align:`start`,loop:O,skipSnaps:!1,dragFree:!1},className:`w-full`,children:h(i,{className:`ml-0`,children:j.map((e,n)=>h(a,{className:`pl-0`,children:h(s,{href:e.target,className:u(`block relative w-full overflow-hidden touch-manipulation`,`aspect-[358/166]`),children:h(t,{src:e.coverUrl,alt:e.title||`Banner ${n+1}`,fill:!0,objectFit:`cover`,unoptimized:!0})})},n))})}),h(n,{className:`absolute inset-0 pointer-events-none flex flex-col justify-end`,style:{background:`linear-gradient(180deg, rgba(8, 2, 17, 0) 0%, rgba(8, 2, 17, 0.28) 55%, rgba(8, 2, 17, 0.4) 100%)`},children:h(n,{className:`flex items-end px-[12px] pb-[32px] pt-[36px]`,children:g(n,{className:`flex-1 min-w-0 flex flex-col gap-[4px]`,children:[k&&R?.title!=null&&h(o,{as:`p`,className:`text-white text-[16px] leading-[22px] font-semibold line-clamp-1`,children:String(R.title)}),g(n,{className:`flex items-center gap-[8px]`,children:[V&&g(n,{className:`flex items-center gap-[4px] px-[4px] py-0 rounded-[4px] bg-white/10 shrink-0`,children:[h(c,{className:`w-[12px] h-[12px] text-white shrink-0`}),h(o,{as:`span`,className:`text-white text-[12px] leading-[20px]`,children:v(U)})]}),H&&W&&h(o,{as:`span`,className:`text-white text-[12px] leading-[20px] shrink-0`,children:W})]})]})})}),A&&j.length>1&&h(n,{className:`absolute left-1/2 -translate-x-1/2 bottom-[16px] flex items-center gap-[4px] pointer-events-auto`,children:j.map((e,t)=>h(`button`,{type:`button`,className:u(`block size-[6px] rounded-full`,t===P?`bg-theme5`:`bg-[rgba(0,0,0,0.6)]`),"aria-label":`跳转到第 ${t+1} 个 Banner`,onClick:()=>M?.scrollTo(t)},t))}),B&&h(n,{className:`absolute top-0 right-0 overflow-hidden rounded-bl-[8px] pointer-events-none`,children:h(t,{src:B,alt:``,width:37,height:20,className:`object-contain`,unoptimized:!0})})]})})}export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
const e={autoplay:!0,interval:3,loop:!0,showTitle:!
|
|
2
|
+
const e={autoplay:!0,interval:3,loop:!0,showTitle:!1,showIndicator:!0,list:[]};export{e as defaultProps};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Box as t}from"../../../ui/box.mjs";import n from"../../../ui/link.mjs";import{urlPrefix as r}from"../../../../constants/url-prefix.mjs";import{useSticky as i}from"../../../../hooks/use-sticky.mjs";import a from"../../../../assets/icons/
|
|
2
|
+
"use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Box as t}from"../../../ui/box.mjs";import n from"../../../ui/link.mjs";import{urlPrefix as r}from"../../../../constants/url-prefix.mjs";import{useSticky as i}from"../../../../hooks/use-sticky.mjs";import a from"../../../../assets/icons/channel-list/channel-active-indicator.mjs";import o from"../../../../assets/icons/common/header-menu.mjs";import s,{loadHiddenChannelIdsFromStorage as c}from"./channel-filter-dialog.mjs";import{defaultProps as l}from"./default-props.mjs";import{clsx as u}from"clsx";import{useEffect as d,useMemo as f,useState as p}from"react";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import{usePathname as _}from"next/navigation";import{useTranslations as v}from"next-intl";const y={},b=`h-[26px]`;function x(e,t){let n=`${r.DOMAIN}/`,i=t.indexOf(n),a=i!==-1,o=a?t.slice(i+n.length).split(`/`)[0]:void 0;return e.isDefault?a&&o?`${r.DOMAIN}/${o}`:`/`:a&&o?`${r.DOMAIN}/${o}/${encodeURIComponent(e.name)}`:`${r.CHANNEL}/${encodeURIComponent(e.name)}`}function S(r){let S=v(`components.biz.business.navBar.variants.basicNavBar.runtime`),{mode:C=`renderer`,styles:w,events:T,...E}=r,D=_()??`/`,O=C===`editor`,k=E||y,A={...l,...k},[j,M]=p(!1),{isSticky:N,ref:P}=i(),[F,I]=p(!1),[L,R]=p(A.list),z=f(()=>A.list.find(e=>e.isDefault)?.name??null,[A.list]),B=f(()=>A.currentChannelId??z,[A.currentChannelId,z]);d(()=>{let e=c();R(e?.length?A.list.filter(t=>!e.includes(t.name)):A.list)},[A.list]);let V=e=>{R(e)},H=(e,t)=>{T?.onChannelChange?.(e,t)},U=w?e(w,{}):void 0,W=()=>{M(!0),T?.onFilterClick?.()};return d(()=>{let e=()=>{let e=window.scrollY??document.documentElement.scrollTop??0,t=window.innerHeight,n=document.documentElement.scrollHeight;I(e+t>=n-1)};return window.addEventListener(`scroll`,e,{passive:!0}),e(),()=>{window.removeEventListener(`scroll`,e)}},[]),g(m,{children:[N&&h(t,{className:u(`w-full`,b)}),h(t,{as:`nav`,ref:P,className:u(`w-full bg-transparent transition-all duration-200`,O&&`pointer-events-none`,N&&`fixed top-0 left-0 right-0 z-50`),style:U,children:g(t,{className:u(`relative flex w-full items-center px-4`,b,A.modifiable&&`gap-2`),children:[h(t,{className:`[-webkit-overflow-scrolling:touch] [-ms-overflow-style:none] [scrollbar-width:none] flex h-full min-w-0 flex-1 items-center overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:hidden`,children:h(t,{className:`inline-flex h-full min-w-full items-center gap-[23.8px]`,children:L.map((e,r)=>{let i=B===e.name||B===null&&r===0;return h(n,{href:x(e,D),webviewNavMode:`spa`,className:u(`group relative inline-flex h-full shrink-0 cursor-pointer whitespace-nowrap transition-all duration-200`,i?`text-white`:`text-white/70`),onClick:()=>H(e,r),children:i?g(t,{className:u(`inline-grid grid-cols-1 grid-rows-1 place-items-start`,b),children:[h(t,{as:`span`,className:`relative z-[1] block h-[24px] text-center text-[20px] font-['PingFang_SC'] font-semibold leading-[24px] text-white transition-all duration-200`,children:e.name}),h(t,{"aria-hidden":`true`,className:`col-start-1 row-start-1 ml-px mt-[15px] h-[11px] w-[39px]`,children:h(a,{className:`block h-full w-full`})})]}):h(t,{className:`inline-flex h-full items-center`,children:h(t,{as:`span`,className:`block h-[24px] text-center text-[16px] font-['PingFang_SC'] font-normal leading-[24px] transition-all duration-200`,children:e.name})})},e.name||`channel-${r}`)})})}),A.modifiable?h(`button`,{type:`button`,"aria-label":S(`moreChannelEntry`),className:`relative flex size-6 shrink-0 items-center justify-center border-0 bg-transparent p-0`,onClick:W,children:h(o,{"aria-hidden":`true`,className:`h-[24px] w-[24px] text-white`})}):null]})}),h(s,{open:j,onOpenChange:M,channels:A.list,currentChannelId:B,onChannelClick:H,onChannelsChange:V})]})}export{S as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
const e={currentChannelId:null,isFullfeed:!1,list:[]};export{e as defaultProps};
|
|
2
|
+
const e={currentChannelId:null,isFullfeed:!1,modifiable:!0,list:[]};export{e as defaultProps};
|