@funhub/platform 0.1.89 → 0.1.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/biz.d.mts CHANGED
@@ -138,7 +138,7 @@ import { SearchInputClient, SearchInputProps } from "./components/biz/business/s
138
138
  import { SearchInputServer } from "./components/biz/business/search-input/server.mjs";
139
139
  import { searchInputMaterial } from "./components/biz/business/search-input/material.mjs";
140
140
  import { TabBarInspectorProps, tabBarInspectorDefaultProps, tabBarInspectorPropsSchema } from "./components/biz/business/tab-bar/schema.mjs";
141
- import { TabBarClient, TabBarProps } from "./components/biz/business/tab-bar/client.mjs";
141
+ import { TabBarClient, TabBarItem, TabBarItemConfigType, TabBarProps } from "./components/biz/business/tab-bar/client.mjs";
142
142
  import { TabBarServer } from "./components/biz/business/tab-bar/server.mjs";
143
143
  import { tabBarMaterial } from "./components/biz/business/tab-bar/material.mjs";
144
144
  import { textRecommendInspectorPropsSchema } from "./components/biz/business/text-recommend/schema.mjs";
@@ -153,4 +153,4 @@ import { exampleButtonMaterial } from "./components/biz/example/button/material.
153
153
  import "./components/biz/example/button/index.mjs";
154
154
  import { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps } from "./components/biz/renderer/renderer.mjs";
155
155
  import "./components/biz/renderer/index.mjs";
156
- export { BaseComponentProps, BasicBannerClient as BasicBanner, defaultProps as BasicBannerDefaultData, BasicBanner as BasicBannerMaterialComponent, schema as BasicBannerSchema, BasicFeatureGridClient as BasicFeatureGrid, defaultProps$1 as BasicFeatureGridDefaultData, schema$1 as BasicFeatureGridSchema, BasicFullscreen, FullscreenFeedClient as BasicFullscreenFeed, defaultProps$2 as BasicFullscreenFeedDefaultData, schema$2 as BasicFullscreenFeedSchema, BasicLogoClient as BasicLogo, defaultProps$3 as BasicLogoDefaultData, schema$3 as BasicLogoSchema, BasicNavBarClient as BasicNavBar, defaultProps$4 as BasicNavBarDefaultData, schema$4 as BasicNavBarSchema, BasicPostCardClient as BasicPostCard, defaultProps$5 as BasicPostCardDefaultData, schema$5 as BasicPostCardSchema, BasicRecommendedUsersClient as BasicRecommendedUsers, defaultProps$6 as BasicRecommendedUsersDefaultData, schema$6 as BasicRecommendedUsersSchema, BasicSearchClient as BasicSearch, BasicSearchBarClient as BasicSearchBar, defaultProps$7 as BasicSearchBarDefaultData, schema$7 as BasicSearchBarSchema, defaultProps$8 as BasicSearchDefaultData, schema$8 as BasicSearchSchema, Button, ButtonClient, ButtonInspectorProps, ButtonProps, CARD_SPEC_MAP, CardCornerMode, CardGrid2x3Client as CardGrid2x3, defaultProps$9 as CardGrid2x3DefaultData, CardGrid2x3InfiniteClient as CardGrid2x3Infinite, defaultProps$10 as CardGrid2x3InfiniteDefaultData, schema$9 as CardGrid2x3InfiniteSchema, schema$10 as CardGrid2x3Schema, CardGrid2x4Client as CardGrid2x4, defaultProps$11 as CardGrid2x4DefaultData, schema$11 as CardGrid2x4Schema, CardGrid3x3Client as CardGrid3x3, defaultProps$12 as CardGrid3x3DefaultData, CardGrid3x3InfiniteClient as CardGrid3x3Infinite, defaultProps$13 as CardGrid3x3InfiniteDefaultData, schema$12 as CardGrid3x3InfiniteSchema, schema$13 as CardGrid3x3Schema, defaultProps$14 as CardItemDefaultData, schema$14 as CardItemSchema, defaultProps$15 as CardLayoutDefaultData, schema$15 as CardLayoutSchema, CardSpec, ChannelDataItem, CollectTab, CollectTabProps, CollectTabServer, CommonStyleSchema, ComponentMaterial, ComponentSchema, ComponentType, ContentBlockItem, DataBinding, DataBindingField, DataBindingSourceType, DataBindingUIMode, DataSchema, DataSlot, DataSourceType, DetailSearchBarClient as DetailSearchBar, defaultProps$16 as DetailSearchBarDefaultData, schema$16 as DetailSearchBarSchema, EventDefinition, EventSchema, ExtractedDataItem, FieldSchema, FieldType, FilterSearchClient as FilterSearch, FilterSearchBarClient as FilterSearchBar, defaultProps$17 as FilterSearchBarDefaultData, schema$17 as FilterSearchBarSchema, defaultProps$18 as FilterSearchDefaultData, schema$18 as FilterSearchSchema, FloatingBall, FloatingBallClient, FloatingBallClientProps, FloatingBallInspectorProps, FullscreenPostFeedClient as FullscreenFeedClient, defaultProps$19 as FullscreenPostFeedDefaultData, schema$19 as FullscreenPostFeedSchema, FullscreenVideoFeedClient as FullscreenVideoClient, defaultProps$20 as FullscreenVideoFeedDefaultData, schema$20 as FullscreenVideoFeedSchema, HistoryTab, HistoryTabProps, HistoryTabServer, HomeRecommendGridClient as HomeRecommendGrid, homeRecommendGridInspectorDefaultProps as HomeRecommendGridDefaultData, HomeRecommendGrid as HomeRecommendGridMaterialComponent, schema$21 as HomeRecommendGridSchema, HomeRecommendWaterfallClient as HomeRecommendWaterfall, homeRecommendWaterfallInspectorDefaultProps as HomeRecommendWaterfallDefaultData, HomeRecommendWaterfall as HomeRecommendWaterfallMaterialComponent, schema$22 as HomeRecommendWaterfallSchema, ImageTextRecommendClient, ImageTextRecommendProps, ImageTextRecommendServer, LikeDetailItem, LikeTab, LikeTabProps, LikeTabServer, MarqueeClient, MarqueeProps, MarqueeServer, MaterialRegistry, NodeDocument, PageDocument, PageMeta, ProfileHeaderInspectorProps, ProfileMainInspectorProps, PropDefinition, PropSchema, PublishTab, PublishTabProps, PublishTabServer, PublishTabUserInfo, RawContentData, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps, SearchHistoryClient, SearchHistoryProps, SearchHistoryServer, SearchInputClient, SearchInputInspectorProps, SearchInputProps, SearchInputServer, SimpleSearchClient as SimpleSearch, defaultProps$21 as SimpleSearchDefaultData, schema$23 as SimpleSearchSchema, StylePropDefinition, StyleSchema, TabBarClient, TabBarInspectorProps, TabBarProps, TabBarServer, TagSearchClient as TagSearch, TagSearchBarClient as TagSearchBar, defaultProps$22 as TagSearchBarDefaultData, schema$24 as TagSearchBarSchema, defaultProps$23 as TagSearchDefaultData, schema$25 as TagSearchSchema, TextRecommendClient, TextRecommendProps, TextRecommendServer, UserProfileHeaderAuthConfig, UserProfileHeaderClient, UserProfileHeaderClientProps, UserProfileMain, UserProfileMainClient, UserProfileMainProps, UserProfileMainRenderMode, UserProfileMainShell, UserProfileMainShellProps, basicBannerInspectorDefaultProps, basicBannerInspectorPropsSchema, basicBannerMaterial, buildContentUrl, buttonInspectorDefaultProps, buttonInspectorPropsSchema, commonStyleSchema, commonStylesToInline, customStylesToInline, defaultMarqueePeriod, exampleButtonMaterial, extractDataByComponentType, floatingBallInspectorDefaultProps, floatingBallInspectorPropsSchema, floatingBallMaterial, getCardSpecConfig, getChannelList, getDefaultMarqueePeriod, homeRecommendGridInspectorDefaultProps, homeRecommendGridInspectorPropsSchema, homeRecommendGridMaterial, homeRecommendWaterfallInspectorDefaultProps, homeRecommendWaterfallInspectorPropsSchema, homeRecommendWaterfallMaterial, imageTextRecommendInspectorPropsSchema, imageTextRecommendMaterial, marqueeInspectorPropsSchema, marqueeMaterial, mergeStyles, profileHeaderInspectorDefaultProps, profileHeaderInspectorPropsSchema, profileHeaderMaterial, profileHeaderMaterialWithDisabledBackground, profileMainCollectCollectionTabOptions, profileMainCollectTabOptions, profileMainHistoryTabOptions, profileMainInspectorDefaultProps, profileMainInspectorPropsSchema, profileMainLikeTabOptions, profileMainMaterial, profileMainMineTabOptions, profileMainProfileTabOptions, profileMainTabOptions, searchHistoryInspectorPropsSchema, searchHistoryMaterial, searchInputInspectorDefaultProps, searchInputInspectorPropsSchema, searchInputMaterial, tabBarInspectorDefaultProps, tabBarInspectorPropsSchema, tabBarMaterial, textRecommendInspectorPropsSchema, textRecommendMaterial, transformContentListToCardItems, transformContentToCardItem };
156
+ export { BaseComponentProps, BasicBannerClient as BasicBanner, defaultProps as BasicBannerDefaultData, BasicBanner as BasicBannerMaterialComponent, schema as BasicBannerSchema, BasicFeatureGridClient as BasicFeatureGrid, defaultProps$1 as BasicFeatureGridDefaultData, schema$1 as BasicFeatureGridSchema, BasicFullscreen, FullscreenFeedClient as BasicFullscreenFeed, defaultProps$2 as BasicFullscreenFeedDefaultData, schema$2 as BasicFullscreenFeedSchema, BasicLogoClient as BasicLogo, defaultProps$3 as BasicLogoDefaultData, schema$3 as BasicLogoSchema, BasicNavBarClient as BasicNavBar, defaultProps$4 as BasicNavBarDefaultData, schema$4 as BasicNavBarSchema, BasicPostCardClient as BasicPostCard, defaultProps$5 as BasicPostCardDefaultData, schema$5 as BasicPostCardSchema, BasicRecommendedUsersClient as BasicRecommendedUsers, defaultProps$6 as BasicRecommendedUsersDefaultData, schema$6 as BasicRecommendedUsersSchema, BasicSearchClient as BasicSearch, BasicSearchBarClient as BasicSearchBar, defaultProps$7 as BasicSearchBarDefaultData, schema$7 as BasicSearchBarSchema, defaultProps$8 as BasicSearchDefaultData, schema$8 as BasicSearchSchema, Button, ButtonClient, ButtonInspectorProps, ButtonProps, CARD_SPEC_MAP, CardCornerMode, CardGrid2x3Client as CardGrid2x3, defaultProps$9 as CardGrid2x3DefaultData, CardGrid2x3InfiniteClient as CardGrid2x3Infinite, defaultProps$10 as CardGrid2x3InfiniteDefaultData, schema$9 as CardGrid2x3InfiniteSchema, schema$10 as CardGrid2x3Schema, CardGrid2x4Client as CardGrid2x4, defaultProps$11 as CardGrid2x4DefaultData, schema$11 as CardGrid2x4Schema, CardGrid3x3Client as CardGrid3x3, defaultProps$12 as CardGrid3x3DefaultData, CardGrid3x3InfiniteClient as CardGrid3x3Infinite, defaultProps$13 as CardGrid3x3InfiniteDefaultData, schema$12 as CardGrid3x3InfiniteSchema, schema$13 as CardGrid3x3Schema, defaultProps$14 as CardItemDefaultData, schema$14 as CardItemSchema, defaultProps$15 as CardLayoutDefaultData, schema$15 as CardLayoutSchema, CardSpec, ChannelDataItem, CollectTab, CollectTabProps, CollectTabServer, CommonStyleSchema, ComponentMaterial, ComponentSchema, ComponentType, ContentBlockItem, DataBinding, DataBindingField, DataBindingSourceType, DataBindingUIMode, DataSchema, DataSlot, DataSourceType, DetailSearchBarClient as DetailSearchBar, defaultProps$16 as DetailSearchBarDefaultData, schema$16 as DetailSearchBarSchema, EventDefinition, EventSchema, ExtractedDataItem, FieldSchema, FieldType, FilterSearchClient as FilterSearch, FilterSearchBarClient as FilterSearchBar, defaultProps$17 as FilterSearchBarDefaultData, schema$17 as FilterSearchBarSchema, defaultProps$18 as FilterSearchDefaultData, schema$18 as FilterSearchSchema, FloatingBall, FloatingBallClient, FloatingBallClientProps, FloatingBallInspectorProps, FullscreenPostFeedClient as FullscreenFeedClient, defaultProps$19 as FullscreenPostFeedDefaultData, schema$19 as FullscreenPostFeedSchema, FullscreenVideoFeedClient as FullscreenVideoClient, defaultProps$20 as FullscreenVideoFeedDefaultData, schema$20 as FullscreenVideoFeedSchema, HistoryTab, HistoryTabProps, HistoryTabServer, HomeRecommendGridClient as HomeRecommendGrid, homeRecommendGridInspectorDefaultProps as HomeRecommendGridDefaultData, HomeRecommendGrid as HomeRecommendGridMaterialComponent, schema$21 as HomeRecommendGridSchema, HomeRecommendWaterfallClient as HomeRecommendWaterfall, homeRecommendWaterfallInspectorDefaultProps as HomeRecommendWaterfallDefaultData, HomeRecommendWaterfall as HomeRecommendWaterfallMaterialComponent, schema$22 as HomeRecommendWaterfallSchema, ImageTextRecommendClient, ImageTextRecommendProps, ImageTextRecommendServer, LikeDetailItem, LikeTab, LikeTabProps, LikeTabServer, MarqueeClient, MarqueeProps, MarqueeServer, MaterialRegistry, NodeDocument, PageDocument, PageMeta, ProfileHeaderInspectorProps, ProfileMainInspectorProps, PropDefinition, PropSchema, PublishTab, PublishTabProps, PublishTabServer, PublishTabUserInfo, RawContentData, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps, SearchHistoryClient, SearchHistoryProps, SearchHistoryServer, SearchInputClient, SearchInputInspectorProps, SearchInputProps, SearchInputServer, SimpleSearchClient as SimpleSearch, defaultProps$21 as SimpleSearchDefaultData, schema$23 as SimpleSearchSchema, StylePropDefinition, StyleSchema, TabBarClient, TabBarInspectorProps, TabBarItem, TabBarItemConfigType, TabBarProps, TabBarServer, TagSearchClient as TagSearch, TagSearchBarClient as TagSearchBar, defaultProps$22 as TagSearchBarDefaultData, schema$24 as TagSearchBarSchema, defaultProps$23 as TagSearchDefaultData, schema$25 as TagSearchSchema, TextRecommendClient, TextRecommendProps, TextRecommendServer, UserProfileHeaderAuthConfig, UserProfileHeaderClient, UserProfileHeaderClientProps, UserProfileMain, UserProfileMainClient, UserProfileMainProps, UserProfileMainRenderMode, UserProfileMainShell, UserProfileMainShellProps, basicBannerInspectorDefaultProps, basicBannerInspectorPropsSchema, basicBannerMaterial, buildContentUrl, buttonInspectorDefaultProps, buttonInspectorPropsSchema, commonStyleSchema, commonStylesToInline, customStylesToInline, defaultMarqueePeriod, exampleButtonMaterial, extractDataByComponentType, floatingBallInspectorDefaultProps, floatingBallInspectorPropsSchema, floatingBallMaterial, getCardSpecConfig, getChannelList, getDefaultMarqueePeriod, homeRecommendGridInspectorDefaultProps, homeRecommendGridInspectorPropsSchema, homeRecommendGridMaterial, homeRecommendWaterfallInspectorDefaultProps, homeRecommendWaterfallInspectorPropsSchema, homeRecommendWaterfallMaterial, imageTextRecommendInspectorPropsSchema, imageTextRecommendMaterial, marqueeInspectorPropsSchema, marqueeMaterial, mergeStyles, profileHeaderInspectorDefaultProps, profileHeaderInspectorPropsSchema, profileHeaderMaterial, profileHeaderMaterialWithDisabledBackground, profileMainCollectCollectionTabOptions, profileMainCollectTabOptions, profileMainHistoryTabOptions, profileMainInspectorDefaultProps, profileMainInspectorPropsSchema, profileMainLikeTabOptions, profileMainMaterial, profileMainMineTabOptions, profileMainProfileTabOptions, profileMainTabOptions, searchHistoryInspectorPropsSchema, searchHistoryMaterial, searchInputInspectorDefaultProps, searchInputInspectorPropsSchema, searchInputMaterial, tabBarInspectorDefaultProps, tabBarInspectorPropsSchema, tabBarMaterial, textRecommendInspectorPropsSchema, textRecommendMaterial, transformContentListToCardItems, transformContentToCardItem };
@@ -1,2 +1,2 @@
1
1
 
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/legacy/button.mjs";import c from"../../../ui/link.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({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*1e3),()=>{P.current&&=(clearInterval(P.current),null)}),[C,k,w,T,O.length]),!O||O.length===0)return null;let F=O[j],I=b?e(b,{}):void 0;return g(n,{className:S?`relative w-full pointer-events-none`:`relative w-full`,style:I,children:[h(r,{setApi:A,opts:{align:`start`,loop:T,skipSnaps:!1,dragFree:!1},className:`w-full`,children:h(i,{className:`ml-0`,children:O.map((e,n)=>h(a,{className:`pl-0`,children:h(c,{href:e.target,className:`block relative w-full h-[242px] overflow-hidden touch-manipulation`,children:h(t,{src:e.coverUrl,alt:e.title||`Banner ${n+1}`,fill:!0,objectFit:`cover`,unoptimized:!0})})},n))})}),E&&F?.title&&h(n,{className:`absolute bottom-[8px] left-[8px]`,children:h(o,{as:`p`,className:`text-white text-[16px] line-clamp-1`,children:F.title})}),D&&O.length>1&&h(n,{className:`absolute bottom-[16px] right-[8px] flex items-center gap-[4px]`,children:O.map((e,t)=>h(s,{type:`button`,className:u(`transition-all duration-300 rounded-full !p-0`,t===j?`w-[10px] h-[6px] bg-black`:`w-[6px] h-[6px] bg-white/50`),style:{padding:`0 !important`},"aria-label":`跳转到第 ${t+1} 个 Banner`},t))})]})}export{v as default};
2
+ "use client";import{mergeStyles as e}from"../../utils/styles/helpers.mjs";import{Button as t}from"../../../ui/button.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"./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*1e3),()=>{P.current&&=(clearInterval(P.current),null)}),[C,k,w,T,O.length]),!O||O.length===0)return null;let F=O[j],I=b?e(b,{}):void 0;return g(r,{className:S?`relative w-full pointer-events-none`:`relative w-full`,style:I,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((e,t)=>h(o,{className:`pl-0`,children:h(c,{href:e.target,className:`block relative w-full h-[242px] overflow-hidden touch-manipulation`,children:h(n,{src:e.coverUrl,alt:e.title||`Banner ${t+1}`,fill:!0,objectFit:`cover`,unoptimized:!0})})},t))})}),E&&F?.title&&h(r,{className:`absolute bottom-[8px] left-[8px]`,children:h(s,{as:`p`,className:`text-white text-[16px] line-clamp-1`,children:F.title})}),D&&O.length>1&&h(r,{className:`absolute bottom-[16px] right-[8px] flex items-center gap-[4px]`,children:O.map((e,n)=>h(t,{type:`button`,size:`xs`,className:u(`transition-all duration-300 rounded-full !p-0 px-0`,n===j?`w-[10px] h-[6px] bg-black`:`w-[6px] h-[6px] bg-white/50`),style:{padding:`0 !important`},"aria-label":`跳转到第 ${n+1} 个 Banner`},n))})]})}export{v as default};
@@ -66,13 +66,13 @@ declare const videoDetailMaterials: MaterialMap<readonly [DefineMaterialOption<t
66
66
  items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
67
67
  contentId: z$1.ZodString;
68
68
  coverMode: z$1.ZodOptional<z$1.ZodEnum<{
69
- content: "content";
70
69
  upload: "upload";
70
+ content: "content";
71
71
  }>>;
72
72
  coverUrl: z$1.ZodOptional<z$1.ZodString>;
73
73
  titleMode: z$1.ZodOptional<z$1.ZodEnum<{
74
- content: "content";
75
74
  custom: "custom";
75
+ content: "content";
76
76
  }>>;
77
77
  title: z$1.ZodOptional<z$1.ZodString>;
78
78
  description: z$1.ZodOptional<z$1.ZodString>;
@@ -21,13 +21,13 @@ declare const videoDetailRecommendMaterial: DefineMaterialOption<typeof VideoDet
21
21
  items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
22
22
  contentId: zod.ZodString;
23
23
  coverMode: zod.ZodOptional<zod.ZodEnum<{
24
- content: "content";
25
24
  upload: "upload";
25
+ content: "content";
26
26
  }>>;
27
27
  coverUrl: zod.ZodOptional<zod.ZodString>;
28
28
  titleMode: zod.ZodOptional<zod.ZodEnum<{
29
- content: "content";
30
29
  custom: "custom";
30
+ content: "content";
31
31
  }>>;
32
32
  title: zod.ZodOptional<zod.ZodString>;
33
33
  description: zod.ZodOptional<zod.ZodString>;
@@ -17,13 +17,13 @@ declare const videoDetailRecommendInspectorPropsSchema: z$1.ZodObject<{
17
17
  items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
18
18
  contentId: z$1.ZodString;
19
19
  coverMode: z$1.ZodOptional<z$1.ZodEnum<{
20
- content: "content";
21
20
  upload: "upload";
21
+ content: "content";
22
22
  }>>;
23
23
  coverUrl: z$1.ZodOptional<z$1.ZodString>;
24
24
  titleMode: z$1.ZodOptional<z$1.ZodEnum<{
25
- content: "content";
26
25
  custom: "custom";
26
+ content: "content";
27
27
  }>>;
28
28
  title: z$1.ZodOptional<z$1.ZodString>;
29
29
  description: z$1.ZodOptional<z$1.ZodString>;
@@ -23,14 +23,14 @@ declare const homeRecommendGridInspectorPropsSchema: z$1.ZodObject<{
23
23
  items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
24
24
  contentId: z$1.ZodString;
25
25
  coverMode: z$1.ZodOptional<z$1.ZodEnum<{
26
- content: "content";
27
26
  upload: "upload";
27
+ content: "content";
28
28
  }>>;
29
29
  coverUrl: z$1.ZodOptional<z$1.ZodString>;
30
30
  badge_url: z$1.ZodOptional<z$1.ZodString>;
31
31
  titleMode: z$1.ZodOptional<z$1.ZodEnum<{
32
- content: "content";
33
32
  custom: "custom";
33
+ content: "content";
34
34
  }>>;
35
35
  title: z$1.ZodOptional<z$1.ZodString>;
36
36
  description: z$1.ZodOptional<z$1.ZodString>;
@@ -23,14 +23,14 @@ declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecomme
23
23
  items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
24
24
  contentId: zod.ZodString;
25
25
  coverMode: zod.ZodOptional<zod.ZodEnum<{
26
- content: "content";
27
26
  upload: "upload";
27
+ content: "content";
28
28
  }>>;
29
29
  coverUrl: zod.ZodOptional<zod.ZodString>;
30
30
  badge_url: zod.ZodOptional<zod.ZodString>;
31
31
  titleMode: zod.ZodOptional<zod.ZodEnum<{
32
- content: "content";
33
32
  custom: "custom";
33
+ content: "content";
34
34
  }>>;
35
35
  title: zod.ZodOptional<zod.ZodString>;
36
36
  description: zod.ZodOptional<zod.ZodString>;
@@ -21,14 +21,14 @@ declare const homeRecommendWaterfallInspectorPropsSchema: z$1.ZodObject<{
21
21
  items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
22
22
  contentId: z$1.ZodString;
23
23
  coverMode: z$1.ZodOptional<z$1.ZodEnum<{
24
- content: "content";
25
24
  upload: "upload";
25
+ content: "content";
26
26
  }>>;
27
27
  coverUrl: z$1.ZodOptional<z$1.ZodString>;
28
28
  badge_url: z$1.ZodOptional<z$1.ZodString>;
29
29
  titleMode: z$1.ZodOptional<z$1.ZodEnum<{
30
- content: "content";
31
30
  custom: "custom";
31
+ content: "content";
32
32
  }>>;
33
33
  title: z$1.ZodOptional<z$1.ZodString>;
34
34
  showPlayCount: z$1.ZodOptional<z$1.ZodBoolean>;
@@ -21,14 +21,14 @@ declare const homeRecommendWaterfallMaterial: DefineMaterialOption<typeof HomeRe
21
21
  items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
22
22
  contentId: zod.ZodString;
23
23
  coverMode: zod.ZodOptional<zod.ZodEnum<{
24
- content: "content";
25
24
  upload: "upload";
25
+ content: "content";
26
26
  }>>;
27
27
  coverUrl: zod.ZodOptional<zod.ZodString>;
28
28
  badge_url: zod.ZodOptional<zod.ZodString>;
29
29
  titleMode: zod.ZodOptional<zod.ZodEnum<{
30
- content: "content";
31
30
  custom: "custom";
31
+ content: "content";
32
32
  }>>;
33
33
  title: zod.ZodOptional<zod.ZodString>;
34
34
  showPlayCount: zod.ZodOptional<zod.ZodBoolean>;
@@ -116,7 +116,7 @@ import { SearchInputServer } from "./search-input/server.mjs";
116
116
  import { searchInputMaterial } from "./search-input/material.mjs";
117
117
  import "./search-input/index.mjs";
118
118
  import { TabBarInspectorProps, tabBarInspectorDefaultProps, tabBarInspectorPropsSchema } from "./tab-bar/schema.mjs";
119
- import { TabBarClient, TabBarProps } from "./tab-bar/client.mjs";
119
+ import { TabBarClient, TabBarItem, TabBarItemConfigType, TabBarProps } from "./tab-bar/client.mjs";
120
120
  import { TabBarServer } from "./tab-bar/server.mjs";
121
121
  import { tabBarMaterial } from "./tab-bar/material.mjs";
122
122
  import "./tab-bar/index.mjs";
@@ -18,7 +18,7 @@ declare const marqueeMaterial: DefineMaterialOption<typeof MarqueeServer, typeof
18
18
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
19
19
  click: zod.ZodObject<{
20
20
  readonly enabled: zod.ZodBoolean & SchemaHasDefaultValue;
21
- readonly redirectType: zod.ZodOptional<zod.ZodType<"content" | "link" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"content" | "link" | "content_list", unknown>>> & SchemaHasDefaultValue;
21
+ readonly redirectType: zod.ZodOptional<zod.ZodType<"link" | "content" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"link" | "content" | "content_list", unknown>>> & SchemaHasDefaultValue;
22
22
  readonly link: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
23
23
  }, zod_v4_core0.$strip> & SchemaHasDefaultValue;
24
24
  close: zod.ZodObject<{
@@ -22,7 +22,7 @@ declare const marqueeInspectorPropsSchema: z.ZodObject<{
22
22
  }, z.core.$strip>> & SchemaHasDefaultValue;
23
23
  click: z.ZodObject<{
24
24
  readonly enabled: z.ZodBoolean & SchemaHasDefaultValue;
25
- readonly redirectType: z.ZodOptional<z.ZodType<"content" | "link" | "content_list", unknown, z.core.$ZodTypeInternals<"content" | "link" | "content_list", unknown>>> & SchemaHasDefaultValue;
25
+ readonly redirectType: z.ZodOptional<z.ZodType<"link" | "content" | "content_list", unknown, z.core.$ZodTypeInternals<"link" | "content" | "content_list", unknown>>> & SchemaHasDefaultValue;
26
26
  readonly link: z.ZodOptional<z.ZodString> & SchemaHasDefaultValue;
27
27
  }, z.core.$strip> & SchemaHasDefaultValue;
28
28
  close: z.ZodObject<{
@@ -3,12 +3,23 @@ import { TabBarInspectorProps } from "./schema.mjs";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
5
5
  //#region components/biz/business/tab-bar/client.d.ts
6
+ type TabBarItemConfigType = 1 | 2;
7
+ interface TabBarItem {
8
+ domainId: string;
9
+ icon: string;
10
+ activeIcon: string;
11
+ configType: TabBarItemConfigType;
12
+ functionPageType: string;
13
+ selectData: unknown;
14
+ tags: string;
15
+ title: string;
16
+ }
6
17
  type TabBarProps = TabBarInspectorProps & {
7
- items?: Array<Record<string, unknown>>;
18
+ items?: TabBarItem[];
8
19
  };
9
20
  /**
10
21
  * TabBar 物料组件
11
22
  */
12
23
  declare function TabBarClient(props: TabBarProps): react_jsx_runtime0.JSX.Element | null;
13
24
  //#endregion
14
- export { TabBarClient, TabBarProps };
25
+ export { TabBarClient, TabBarItem, TabBarItemConfigType, TabBarProps };
@@ -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{useEffect as r,useMemo as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import l from"next/link";import{usePathname as u}from"next/navigation";const d=[];function f(e){return e.split(`?`)[0].replace(/\/+$/,``)||`/`}function p(e){let t=typeof e.path==`string`?e.path.trim():``;if(t)return t;if(e.configType===1)switch(e.functionPageType){case`搜索`:return`/search`;case`个人中心`:return`/user/mine`;case`内容列表`:return`/video-list?tags=${e.tags}&title=${e.title}`;default:return`/`}let n=(e.domainId??``).toString().trim();return n?`/domain/${n}`:`/`}function m(e,t){let n=f(t),r=typeof e.path==`string`?e.path.trim():``;if(r){let e=f(r.split(`?`)[0]);return e===`/`?n===`/`:n===e||n.startsWith(`${e}/`)}let i=(e.domainId??``).toString().trim();if(!i)return n===`/`||n.startsWith(`/category/`);let a=`/domain/${i}`;return n===a||n.startsWith(`${a}/`)}function h(e,t){return e.findIndex(e=>m(e,t))}function g(f){let{items:m=d,mode:g=`renderer`}=f,_=u(),[v,y]=o(()=>{if(g===`editor`)return 0;let e=h(m??[],_);return e>=0?e:0}),b=a(!1);r(()=>{if(g===`editor`||b.current||!m?.length)return;let e=h(m,_);y(e>=0?e:0),b.current=!0},[m,_,g]);let x=g===`editor`?0:v,S=i(()=>(m??[]).some(e=>e.label!=null&&String(e.label).trim()!==``),[m]);if(!m?.length)return null;function C(e){if(g===`editor`){e.preventDefault();return}let t=Number(e.currentTarget.dataset.index);Number.isNaN(t)||y(t)}let w=`flex min-w-0 flex-1 cursor-pointer flex-col items-center justify-center ${S?`gap-1`:``}`;return s(t,{className:`fixed bottom-0 left-0 right-0 z-50 safe-area-bottom bg-bg1 border-t border-line1 backdrop-blur-[2px] py-3 shadow-[0px_-4px_10px_0px_rgba(0,0,0,0.02)]`,children:s(t,{className:`flex w-full items-center`,children:m.map((r,i)=>{let a=x===i,o=a&&r.activeIcon?r.activeIcon:r.icon,u=typeof r.label==`string`?r.label:String(r.label??``);return c(l,{href:p(r),className:w,"data-index":i,onClick:C,children:[s(t,{className:`relative size-[22px] shrink-0`,children:o?s(e,{src:o,alt:u,fill:!0,className:`object-contain`}):s(t,{"data-active":a,className:`size-full rounded-sm bg-text3 data-[active=true]:bg-theme5`})}),S&&s(n,{"data-active":a,className:`truncate text-center text-[10px] leading-[10px] font-medium min-w-0 max-w-full px-0.5 text-text2 data-[active=true]:text-theme5`,children:u})]},i)})})})}export{g as TabBarClient};
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{useEffect as r,useMemo as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import l from"next/link";import{usePathname as u}from"next/navigation";const d=[];function f(e){return e.split(`?`)[0].replace(/\/+$/,``)||`/`}function p(e){if(e.configType===1)switch(e.functionPageType){case`搜索`:return`/search`;case`个人中心`:return`/user/mine`;case`内容列表`:return`/video-list?tags=${e.tags}&title=${e.title}`;default:return`/`}let t=(e.domainId??``).toString().trim();return t?`/domain/${t}`:`/`}function m(e,t){let n=f(t),r=e.domainId.trim();if(!r)return n===`/`||n.startsWith(`/category/`);let i=`/domain/${r}`;return n===i||n.startsWith(`${i}/`)}function h(e,t){return e.findIndex(e=>m(e,t))}function g(f){let{items:m=d,mode:g=`renderer`}=f,_=u(),[v,y]=o(()=>{if(g===`editor`)return 0;let e=h(m??[],_);return e>=0?e:0}),b=a(!1);r(()=>{if(g===`editor`||b.current||!m?.length)return;let e=h(m,_);y(e>=0?e:0),b.current=!0},[m,_,g]);let x=g===`editor`?0:v,S=i(()=>(m??[]).some(e=>e.title.trim()!==``),[m]);if(!m?.length)return null;function C(e){if(g===`editor`){e.preventDefault();return}let t=Number(e.currentTarget.dataset.index);Number.isNaN(t)||y(t)}let w=`flex min-w-0 flex-1 cursor-pointer flex-col items-center justify-center ${S?`gap-1`:``}`;return s(t,{className:`fixed bottom-0 left-0 right-0 z-50 safe-area-bottom bg-bg1 border-t border-line1 backdrop-blur-[2px] py-3 shadow-[0px_-4px_10px_0px_rgba(0,0,0,0.02)]`,children:s(t,{className:`flex w-full items-center`,children:m.map((r,i)=>{let a=x===i,o=a?r.activeIcon:r.icon,u=r.title;return c(l,{href:p(r),className:w,"data-index":i,onClick:C,children:[s(t,{className:`relative size-[22px] shrink-0`,children:o?s(e,{src:o,alt:u,fill:!0,className:`object-contain`}):s(t,{"data-active":a,className:`size-full rounded-sm bg-text3 data-[active=true]:bg-theme5`})}),S&&s(n,{"data-active":a,className:`truncate text-center text-[10px] leading-[10px] font-medium min-w-0 max-w-full px-0.5 text-text2 data-[active=true]:text-theme5`,children:u})]},i)})})})}export{g as TabBarClient};
@@ -1,5 +1,5 @@
1
1
 
2
2
  import { TabBarInspectorProps, tabBarInspectorDefaultProps, tabBarInspectorPropsSchema } from "./schema.mjs";
3
- import { TabBarClient, TabBarProps } from "./client.mjs";
3
+ import { TabBarClient, TabBarItem, TabBarItemConfigType, TabBarProps } from "./client.mjs";
4
4
  import { TabBarServer } from "./server.mjs";
5
5
  import { tabBarMaterial } from "./material.mjs";
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{updateUrlParams as e}from"../../../utils/common.mjs";import t from"../../../utils/event-bus.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{Box as r}from"../../ui/box.mjs";import{eventKey as i}from"../../../constants/event-key.mjs";import{useSearchHistory as a}from"../../../hooks/use-search-history.mjs";import o from"../search/top-header.mjs";import s from"./search-user.mjs";import c from"./search-video.mjs";import l from"./search-all.mjs";import{SORT_OPTIONS as u,SearchTab as d}from"./search-tab.mjs";import{useEffect as f,useMemo as p,useState as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{useRouter as v,useSearchParams as y}from"next/navigation";const b=[{label:`综合`,value:`all`},{label:`视频`,value:`video`},{label:`用户`,value:`user`}];function x(){let x=v(),{userInfo:S}=n(),C=S?.user_id||`guest`,w=y().get(`q`)?.toString()||``,T=w?decodeURIComponent(w):``,[E,D]=m(T),[O,k]=m(0);f(()=>{D(T),k(e=>e+1)},[T]);let[A,j]=m(b[0].value),[M,N]=m(u[0].value),[P,F]=m(0),[,I]=m([]),{addHistory:L}=a({storageKey:C}),R=p(()=>E.trim()!==``,[E]);f(()=>(t.on(i.EXCHANGE_SEARCH_TYPE,j),()=>{t.off(i.EXCHANGE_SEARCH_TYPE,j)}),[j]);function z(){x.push(`/search`)}return _(r,{className:`w-full min-h-screen bg-bg1 pb-[12px] overscroll-y-none`,children:[g(o,{setSearchInputVal:t=>{t!==E&&(I([]),D(t),e({q:t}))},initInputVal:T,initInputVersion:O,addSearchHistory:L,clearCallback:z}),g(d,{searchType:A,tabList:b,onChange:e=>{j(e),I([])},sort:M,onSortChange:e=>{N(e),F(e=>e+1)}}),R&&_(h,{children:[A===`user`&&g(s,{mode:`user`,inputVal:E,sort:M,refreshVersion:P}),A===`all`&&g(l,{searchInputVal:E,sort:M,refreshVersion:P}),A===`video`&&g(c,{mode:`video`,inputVal:E,sort:M,refreshVersion:P})]}),!R&&g(r,{className:`w-full pt-[12px]`})]})}export{x as default};
2
+ "use client";import{updateUrlParams as e}from"../../../utils/common.mjs";import t from"../../../utils/event-bus.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{Box as r}from"../../ui/box.mjs";import{eventKey as i}from"../../../constants/event-key.mjs";import{useSearchHistory as a}from"../../../hooks/use-search-history.mjs";import o from"../search/top-header.mjs";import s from"./search-user.mjs";import c from"./search-video.mjs";import l from"./search-all.mjs";import{SORT_OPTIONS as u,SearchTab as d}from"./search-tab.mjs";import{useEffect as f,useMemo as p,useState as m}from"react";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{useRouter as v,useSearchParams as y}from"next/navigation";const b=[{label:`综合`,value:`all`},{label:`视频`,value:`video`},{label:`用户`,value:`user`}];function x(){let x=v(),{userInfo:S}=n(),C=S?.user_id||`guest`,w=y().get(`q`)?.toString()||``,T=w?decodeURIComponent(w):``,[E,D]=m(T),[O,k]=m(0);f(()=>{D(T),k(e=>e+1)},[T]);let[A,j]=m(b[0].value),[M,N]=m(u[0].value),[P,F]=m(0),[,I]=m([]),{addHistory:L}=a({storageKey:C}),R=p(()=>E.trim()!==``,[E]);f(()=>(t.on(i.EXCHANGE_SEARCH_TYPE,j),()=>{t.off(i.EXCHANGE_SEARCH_TYPE,j)}),[j]);function z(){x.back()}return _(r,{className:`w-full min-h-screen bg-bg1 pb-[12px] overscroll-y-none`,children:[g(o,{setSearchInputVal:t=>{t!==E&&(I([]),D(t),e({q:t}))},initInputVal:T,initInputVersion:O,addSearchHistory:L,clearCallback:z}),g(d,{searchType:A,tabList:b,onChange:e=>{j(e),I([])},sort:M,onSortChange:e=>{N(e),F(e=>e+1)}}),R&&_(h,{children:[A===`user`&&g(s,{mode:`user`,inputVal:E,sort:M,refreshVersion:P}),A===`all`&&g(l,{searchInputVal:E,sort:M,refreshVersion:P}),A===`video`&&g(c,{mode:`video`,inputVal:E,sort:M,refreshVersion:P})]}),!R&&g(r,{className:`w-full pt-[12px]`})]})}export{x as default};
@@ -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" | "destructive" | "secondary" | "outline" | "ghost" | "link" | null | undefined;
9
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "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" | "destructive" | "secondary" | "outline" | "ghost" | "link" | null | undefined;
10
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
11
11
  size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
12
12
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
13
13
  /** Button 组件属性。 */
@@ -1,11 +1,11 @@
1
1
 
2
2
  import * as React from "react";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
- import Image from "next/image";
4
+ import NextImage from "next/image";
5
5
 
6
6
  //#region components/ui/image.d.ts
7
7
  /** BaseImageProps 属性定义。 */
8
- type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof Image>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
8
+ type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof NextImage>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
9
9
  type CommonImageProps = BaseImageProps & {
10
10
  /** 图片地址,支持普通 URL、默认资源路径和加密地址。 */src: string; /** 图片替代文本。 */
11
11
  alt?: string; /** 图片类名。 */
@@ -27,6 +27,6 @@ type ImagePropsWithSize = CommonImageProps & {
27
27
  /** ImageProps 属性定义。 */
28
28
  type ImageProps = ImagePropsWithFill | ImagePropsWithSize;
29
29
  /** 图片组件:支持 bnc 解密、默认资源域名拼接与错误占位。 */
30
- declare function Image$1(props: ImageProps): react_jsx_runtime0.JSX.Element;
30
+ declare function Image(props: ImageProps): react_jsx_runtime0.JSX.Element;
31
31
  //#endregion
32
- export { BaseImageProps, CommonImageProps, Image$1 as Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
32
+ export { BaseImageProps, CommonImageProps, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funhub/platform",
3
3
  "type": "module",
4
- "version": "0.1.89",
4
+ "version": "0.1.91",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "**/*.css"