@funhub/platform 0.1.18 → 0.1.21
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 +4 -2
- package/dist/biz.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/defaults/default-props.d.mts +7 -0
- package/dist/components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +5 -5
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +5 -5
- package/dist/components/biz/business/banner/variants/basic-banner/material.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.d.mts +1 -2
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/server.mjs +1 -1
- package/dist/components/biz/business/detail/materials/registry.d.mts +12 -12
- package/dist/components/biz/business/detail/materials/video-detail-actions/client.d.mts +9 -2
- package/dist/components/biz/business/detail/materials/video-detail-actions/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-actions/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/material.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-actions/server.d.mts +2 -10
- package/dist/components/biz/business/detail/materials/video-detail-info/client.d.mts +13 -2
- package/dist/components/biz/business/detail/materials/video-detail-info/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-info/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/material.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/server.d.mts +2 -10
- package/dist/components/biz/business/detail/materials/video-detail-info-title/client.d.mts +8 -2
- package/dist/components/biz/business/detail/materials/video-detail-info-title/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-info-title/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/material.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/server.d.mts +2 -10
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.mts +12 -2
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.d.mts +2 -10
- package/dist/components/biz/business/detail/materials/video-detail-player/client.d.mts +10 -2
- package/dist/components/biz/business/detail/materials/video-detail-player/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-player/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/material.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/server.d.mts +2 -10
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.d.mts +18 -2
- package/dist/components/biz/business/detail/materials/video-detail-recommend/index.d.mts +3 -3
- package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/material.mjs +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/server.d.mts +2 -10
- package/dist/components/biz/example/button/client.mjs +1 -1
- package/dist/components/biz/example/button/index.d.mts +2 -2
- package/dist/components/biz/example/button/material.d.mts +5 -4
- package/dist/components/biz/example/button/material.mjs +1 -1
- package/dist/components/biz/example/button/schema.d.mts +5 -4
- package/dist/components/biz/example/button/schema.mjs +1 -1
- package/dist/components/biz/renderer/index.d.mts +2 -0
- package/dist/components/biz/renderer/renderer.d.mts +74 -0
- package/dist/components/biz/renderer/renderer.mjs +2 -0
- package/dist/components/biz/utils/helpers/url.d.mts +1 -1
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/materials.mjs +1 -1
- package/dist/utils/schema/material.d.mts +6 -4
- package/package.json +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/defaults/mock-data.mjs +0 -2
package/dist/biz.d.mts
CHANGED
|
@@ -92,7 +92,9 @@ import { schema as schema$22 } from "./components/biz/business/search-bar/varian
|
|
|
92
92
|
import "./components/biz/business/index.mjs";
|
|
93
93
|
import { ButtonInspectorProps, ButtonProps, buttonInspectorDefaultProps, buttonInspectorPropsSchema } from "./components/biz/example/button/schema.mjs";
|
|
94
94
|
import { ButtonClient } from "./components/biz/example/button/client.mjs";
|
|
95
|
-
import { Button } from "./components/biz/example/button/server.mjs";
|
|
96
95
|
import { exampleButtonMaterial } from "./components/biz/example/button/material.mjs";
|
|
96
|
+
import { Button } from "./components/biz/example/button/server.mjs";
|
|
97
97
|
import "./components/biz/example/button/index.mjs";
|
|
98
|
-
|
|
98
|
+
import { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps } from "./components/biz/renderer/renderer.mjs";
|
|
99
|
+
import "./components/biz/renderer/index.mjs";
|
|
100
|
+
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, 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, FullscreenPostFeedClient as FullscreenFeedClient, defaultProps$19 as FullscreenPostFeedDefaultData, schema$19 as FullscreenPostFeedSchema, FullscreenVideoFeedClient as FullscreenVideoClient, defaultProps$20 as FullscreenVideoFeedDefaultData, schema$20 as FullscreenVideoFeedSchema, MaterialRegistry, NodeDocument, PageDocument, PageMeta, PropDefinition, PropSchema, RawContentData, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps, SimpleSearchClient as SimpleSearch, defaultProps$21 as SimpleSearchDefaultData, schema$21 as SimpleSearchSchema, StylePropDefinition, StyleSchema, TagSearchClient as TagSearch, TagSearchBarClient as TagSearchBar, defaultProps$22 as TagSearchBarDefaultData, schema$22 as TagSearchBarSchema, defaultProps$23 as TagSearchDefaultData, schema$23 as TagSearchSchema, basicBannerInspectorDefaultProps, basicBannerInspectorPropsSchema, basicBannerMaterial, buildContentUrl, buttonInspectorDefaultProps, buttonInspectorPropsSchema, commonStyleSchema, commonStylesToInline, customStylesToInline, exampleButtonMaterial, extractDataByComponentType, getCardSpecConfig, mergeStyles, transformContentListToCardItems, transformContentToCardItem };
|
package/dist/biz.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{CARD_SPEC_MAP as e,CardSpec as t,getCardSpecConfig as n}from"./components/biz/utils/constants/card-spec.mjs";import{buildContentUrl as r}from"./components/biz/utils/helpers/url.mjs";import{DataBindingUIMode as i,DataSourceType as a}from"./components/biz/utils/schema/data.mjs";import{commonStylesToInline as o,customStylesToInline as s,mergeStyles as c}from"./components/biz/utils/styles/helpers.mjs";import{commonStyleSchema as l}from"./components/biz/utils/styles/schema.mjs";import{transformContentListToCardItems as u,transformContentToCardItem as d}from"./components/biz/utils/transformers/card-grid.mjs";import{defaultProps as f}from"./components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs";import{schema as p}from"./components/biz/business/banner/variants/basic-banner/schema/index.mjs";import{basicBannerInspectorDefaultProps as m,basicBannerInspectorPropsSchema as h}from"./components/biz/business/banner/variants/basic-banner/inspector-schema.mjs";import{BasicBanner as g}from"./components/biz/business/banner/variants/basic-banner/server.mjs";import{basicBannerMaterial as _}from"./components/biz/business/banner/variants/basic-banner/material.mjs";import v from"./components/biz/business/banner/variants/basic-banner/index.mjs";import{defaultProps as y}from"./components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs";import{schema as b}from"./components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs";import x from"./components/biz/business/card-grid/variants/card-grid-2x3/index.mjs";import{defaultProps as S}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs";import{schema as C}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/index.mjs";import w from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/index.mjs";import{defaultProps as T}from"./components/biz/business/card-grid/variants/card-grid-2x4/defaults/default-props.mjs";import{schema as E}from"./components/biz/business/card-grid/variants/card-grid-2x4/schema/index.mjs";import D from"./components/biz/business/card-grid/variants/card-grid-2x4/index.mjs";import{defaultProps as O}from"./components/biz/business/card-grid/variants/card-grid-3x3/defaults/default-props.mjs";import{schema as k}from"./components/biz/business/card-grid/variants/card-grid-3x3/schema/index.mjs";import A from"./components/biz/business/card-grid/variants/card-grid-3x3/index.mjs";import{defaultProps as j}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs";import{schema as M}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/index.mjs";import N from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/index.mjs";import{defaultProps as P}from"./components/biz/business/feature-grid/variants/basic-feature-grid/defaults/default-props.mjs";import{schema as F}from"./components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs";import I from"./components/biz/business/feature-grid/variants/basic-feature-grid/index.mjs";import{defaultProps as L}from"./components/biz/basics/fullscreen-feed/defaults/default-props.mjs";import{BasicFullscreen as R}from"./components/biz/basics/fullscreen-feed/basic-fullscreen.mjs";import{schema as z}from"./components/biz/basics/fullscreen-feed/schema/index.mjs";import B from"./components/biz/basics/fullscreen-feed/index.mjs";import{defaultProps as V}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";import{schema as H}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import U from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs";import{defaultProps as W}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs";import{schema as G}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import K from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs";import{defaultProps as q}from"./components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";import{schema as J}from"./components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs";import Y from"./components/biz/business/nav-bar/variants/basic-nav-bar/index.mjs";import{defaultProps as X}from"./components/biz/business/post-card/variants/basic-post-card/defaults/default-props.mjs";import{defaultProps as Z}from"./components/biz/basics/logo/variants/basic-logo/defaults/default-props.mjs";import{defaultProps as Q}from"./components/biz/basics/search/variants/basic-search/defaults/default-props.mjs";import{defaultProps as $}from"./components/biz/business/search-bar/variants/detail-search-bar/defaults/default-props.mjs";import{schema as ee}from"./components/biz/basics/logo/variants/basic-logo/schema/index.mjs";import te from"./components/biz/basics/logo/variants/basic-logo/index.mjs";import{defaultProps as ne}from"./components/biz/basics/search/variants/simple-search/defaults/default-props.mjs";import{schema as re}from"./components/biz/basics/search/variants/simple-search/schema/index.mjs";import ie from"./components/biz/basics/search/variants/simple-search/index.mjs";import{schema as ae}from"./components/biz/business/search-bar/variants/detail-search-bar/schema/index.mjs";import oe from"./components/biz/business/search-bar/variants/detail-search-bar/index.mjs";import{schema as se}from"./components/biz/business/post-card/variants/basic-post-card/schema/index.mjs";import ce from"./components/biz/business/post-card/variants/basic-post-card/index.mjs";import{defaultProps as le}from"./components/biz/business/recommended-users/variants/basic-recommended-users/defaults/default-props.mjs";import{schema as ue}from"./components/biz/business/recommended-users/variants/basic-recommended-users/schema/index.mjs";import de from"./components/biz/business/recommended-users/variants/basic-recommended-users/index.mjs";import{defaultProps as fe}from"./components/biz/business/search-bar/variants/basic-search-bar/defaults/default-props.mjs";import{schema as pe}from"./components/biz/basics/search/variants/basic-search/schema/index.mjs";import me from"./components/biz/basics/search/variants/basic-search/index.mjs";import{schema as he}from"./components/biz/business/search-bar/variants/basic-search-bar/schema/index.mjs";import ge from"./components/biz/business/search-bar/variants/basic-search-bar/index.mjs";import{defaultProps as _e}from"./components/biz/basics/search/variants/filter-search/defaults/default-props.mjs";import{defaultProps as ve}from"./components/biz/business/search-bar/variants/filter-search-bar/defaults/default-props.mjs";import{schema as ye}from"./components/biz/basics/search/variants/filter-search/schema/index.mjs";import be from"./components/biz/basics/search/variants/filter-search/index.mjs";import{schema as xe}from"./components/biz/business/search-bar/variants/filter-search-bar/schema/index.mjs";import Se from"./components/biz/business/search-bar/variants/filter-search-bar/index.mjs";import{defaultProps as Ce}from"./components/biz/basics/search/variants/tag-search/defaults/default-props.mjs";import{defaultProps as we}from"./components/biz/business/search-bar/variants/tag-search-bar/defaults/default-props.mjs";import{schema as Te}from"./components/biz/basics/search/variants/tag-search/schema/index.mjs";import Ee from"./components/biz/basics/search/variants/tag-search/index.mjs";import{schema as De}from"./components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs";import Oe from"./components/biz/business/search-bar/variants/tag-search-bar/index.mjs";import{ComponentType as ke,extractDataByComponentType as Ae}from"./components/biz/utils/transformers/data.mjs";import{defaultProps as je}from"./components/biz/basics/card-item/defaults/default-props.mjs";import{schema as Me}from"./components/biz/basics/card-item/schema/index.mjs";import{defaultProps as Ne}from"./components/biz/basics/card-layout/defaults/default-props.mjs";import{schema as Pe}from"./components/biz/basics/card-layout/schema/index.mjs";import{ButtonClient as Fe}from"./components/biz/example/button/client.mjs";import{buttonInspectorDefaultProps as Ie,buttonInspectorPropsSchema as Le}from"./components/biz/example/button/schema.mjs";import{Button as Re}from"./components/biz/example/button/server.mjs";import{exampleButtonMaterial as ze}from"./components/biz/example/button/material.mjs";export{v as BasicBanner,f as BasicBannerDefaultData,g as BasicBannerMaterialComponent,p as BasicBannerSchema,I as BasicFeatureGrid,P as BasicFeatureGridDefaultData,F as BasicFeatureGridSchema,R as BasicFullscreen,B as BasicFullscreenFeed,L as BasicFullscreenFeedDefaultData,z as BasicFullscreenFeedSchema,te as BasicLogo,Z as BasicLogoDefaultData,ee as BasicLogoSchema,Y as BasicNavBar,q as BasicNavBarDefaultData,J as BasicNavBarSchema,ce as BasicPostCard,X as BasicPostCardDefaultData,se as BasicPostCardSchema,de as BasicRecommendedUsers,le as BasicRecommendedUsersDefaultData,ue as BasicRecommendedUsersSchema,me as BasicSearch,ge as BasicSearchBar,fe as BasicSearchBarDefaultData,he as BasicSearchBarSchema,Q as BasicSearchDefaultData,pe as BasicSearchSchema,Re as Button,Fe as ButtonClient,e as CARD_SPEC_MAP,x as CardGrid2x3,y as CardGrid2x3DefaultData,w as CardGrid2x3Infinite,S as CardGrid2x3InfiniteDefaultData,C as CardGrid2x3InfiniteSchema,b as CardGrid2x3Schema,D as CardGrid2x4,T as CardGrid2x4DefaultData,E as CardGrid2x4Schema,A as CardGrid3x3,O as CardGrid3x3DefaultData,N as CardGrid3x3Infinite,j as CardGrid3x3InfiniteDefaultData,M as CardGrid3x3InfiniteSchema,k as CardGrid3x3Schema,je as CardItemDefaultData,Me as CardItemSchema,Ne as CardLayoutDefaultData,Pe as CardLayoutSchema,t as CardSpec,ke as ComponentType,i as DataBindingUIMode,a as DataSourceType,oe as DetailSearchBar,$ as DetailSearchBarDefaultData,ae as DetailSearchBarSchema,be as FilterSearch,Se as FilterSearchBar,ve as FilterSearchBarDefaultData,xe as FilterSearchBarSchema,_e as FilterSearchDefaultData,ye as FilterSearchSchema,U as FullscreenFeedClient,V as FullscreenPostFeedDefaultData,H as FullscreenPostFeedSchema,K as FullscreenVideoClient,W as FullscreenVideoFeedDefaultData,G as FullscreenVideoFeedSchema,ie as SimpleSearch,ne as SimpleSearchDefaultData,re as SimpleSearchSchema,Ee as TagSearch,Oe as TagSearchBar,we as TagSearchBarDefaultData,De as TagSearchBarSchema,Ce as TagSearchDefaultData,Te as TagSearchSchema,m as basicBannerInspectorDefaultProps,h as basicBannerInspectorPropsSchema,_ as basicBannerMaterial,r as buildContentUrl,Ie as buttonInspectorDefaultProps,Le as buttonInspectorPropsSchema,l as commonStyleSchema,o as commonStylesToInline,s as customStylesToInline,ze as exampleButtonMaterial,Ae as extractDataByComponentType,n as getCardSpecConfig,c as mergeStyles,u as transformContentListToCardItems,d as transformContentToCardItem};
|
|
2
|
+
import{CARD_SPEC_MAP as e,CardSpec as t,getCardSpecConfig as n}from"./components/biz/utils/constants/card-spec.mjs";import{buildContentUrl as r}from"./components/biz/utils/helpers/url.mjs";import{DataBindingUIMode as i,DataSourceType as a}from"./components/biz/utils/schema/data.mjs";import{commonStylesToInline as o,customStylesToInline as s,mergeStyles as c}from"./components/biz/utils/styles/helpers.mjs";import{commonStyleSchema as l}from"./components/biz/utils/styles/schema.mjs";import{transformContentListToCardItems as u,transformContentToCardItem as d}from"./components/biz/utils/transformers/card-grid.mjs";import{defaultProps as f}from"./components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs";import{schema as p}from"./components/biz/business/banner/variants/basic-banner/schema/index.mjs";import{basicBannerInspectorDefaultProps as m,basicBannerInspectorPropsSchema as h}from"./components/biz/business/banner/variants/basic-banner/inspector-schema.mjs";import{BasicBanner as g}from"./components/biz/business/banner/variants/basic-banner/server.mjs";import{basicBannerMaterial as _}from"./components/biz/business/banner/variants/basic-banner/material.mjs";import v from"./components/biz/business/banner/variants/basic-banner/index.mjs";import{defaultProps as y}from"./components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs";import{schema as b}from"./components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs";import x from"./components/biz/business/card-grid/variants/card-grid-2x3/index.mjs";import{defaultProps as S}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/defaults/default-props.mjs";import{schema as C}from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/schema/index.mjs";import w from"./components/biz/business/card-grid/variants/card-grid-2x3-infinite/index.mjs";import{defaultProps as T}from"./components/biz/business/card-grid/variants/card-grid-2x4/defaults/default-props.mjs";import{schema as E}from"./components/biz/business/card-grid/variants/card-grid-2x4/schema/index.mjs";import D from"./components/biz/business/card-grid/variants/card-grid-2x4/index.mjs";import{defaultProps as O}from"./components/biz/business/card-grid/variants/card-grid-3x3/defaults/default-props.mjs";import{schema as k}from"./components/biz/business/card-grid/variants/card-grid-3x3/schema/index.mjs";import A from"./components/biz/business/card-grid/variants/card-grid-3x3/index.mjs";import{defaultProps as j}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/defaults/default-props.mjs";import{schema as M}from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/schema/index.mjs";import N from"./components/biz/business/card-grid/variants/card-grid-3x3-infinite/index.mjs";import{defaultProps as P}from"./components/biz/business/feature-grid/variants/basic-feature-grid/defaults/default-props.mjs";import{schema as F}from"./components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs";import I from"./components/biz/business/feature-grid/variants/basic-feature-grid/index.mjs";import{defaultProps as L}from"./components/biz/basics/fullscreen-feed/defaults/default-props.mjs";import{BasicFullscreen as R}from"./components/biz/basics/fullscreen-feed/basic-fullscreen.mjs";import{schema as z}from"./components/biz/basics/fullscreen-feed/schema/index.mjs";import B from"./components/biz/basics/fullscreen-feed/index.mjs";import{defaultProps as V}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";import{schema as H}from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";import U from"./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/index.mjs";import{defaultProps as W}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/defaults/default-props.mjs";import{schema as G}from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/schema/index.mjs";import K from"./components/biz/business/fullscreen-feed/variants/fullscreen-video-feed/index.mjs";import{defaultProps as q}from"./components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";import{schema as J}from"./components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs";import Y from"./components/biz/business/nav-bar/variants/basic-nav-bar/index.mjs";import{defaultProps as X}from"./components/biz/business/post-card/variants/basic-post-card/defaults/default-props.mjs";import{defaultProps as Z}from"./components/biz/basics/logo/variants/basic-logo/defaults/default-props.mjs";import{defaultProps as Q}from"./components/biz/basics/search/variants/basic-search/defaults/default-props.mjs";import{defaultProps as $}from"./components/biz/business/search-bar/variants/detail-search-bar/defaults/default-props.mjs";import{schema as ee}from"./components/biz/basics/logo/variants/basic-logo/schema/index.mjs";import te from"./components/biz/basics/logo/variants/basic-logo/index.mjs";import{defaultProps as ne}from"./components/biz/basics/search/variants/simple-search/defaults/default-props.mjs";import{schema as re}from"./components/biz/basics/search/variants/simple-search/schema/index.mjs";import ie from"./components/biz/basics/search/variants/simple-search/index.mjs";import{schema as ae}from"./components/biz/business/search-bar/variants/detail-search-bar/schema/index.mjs";import oe from"./components/biz/business/search-bar/variants/detail-search-bar/index.mjs";import{schema as se}from"./components/biz/business/post-card/variants/basic-post-card/schema/index.mjs";import ce from"./components/biz/business/post-card/variants/basic-post-card/index.mjs";import{defaultProps as le}from"./components/biz/business/recommended-users/variants/basic-recommended-users/defaults/default-props.mjs";import{schema as ue}from"./components/biz/business/recommended-users/variants/basic-recommended-users/schema/index.mjs";import de from"./components/biz/business/recommended-users/variants/basic-recommended-users/index.mjs";import{defaultProps as fe}from"./components/biz/business/search-bar/variants/basic-search-bar/defaults/default-props.mjs";import{schema as pe}from"./components/biz/basics/search/variants/basic-search/schema/index.mjs";import me from"./components/biz/basics/search/variants/basic-search/index.mjs";import{schema as he}from"./components/biz/business/search-bar/variants/basic-search-bar/schema/index.mjs";import ge from"./components/biz/business/search-bar/variants/basic-search-bar/index.mjs";import{defaultProps as _e}from"./components/biz/basics/search/variants/filter-search/defaults/default-props.mjs";import{defaultProps as ve}from"./components/biz/business/search-bar/variants/filter-search-bar/defaults/default-props.mjs";import{schema as ye}from"./components/biz/basics/search/variants/filter-search/schema/index.mjs";import be from"./components/biz/basics/search/variants/filter-search/index.mjs";import{schema as xe}from"./components/biz/business/search-bar/variants/filter-search-bar/schema/index.mjs";import Se from"./components/biz/business/search-bar/variants/filter-search-bar/index.mjs";import{defaultProps as Ce}from"./components/biz/basics/search/variants/tag-search/defaults/default-props.mjs";import{defaultProps as we}from"./components/biz/business/search-bar/variants/tag-search-bar/defaults/default-props.mjs";import{schema as Te}from"./components/biz/basics/search/variants/tag-search/schema/index.mjs";import Ee from"./components/biz/basics/search/variants/tag-search/index.mjs";import{schema as De}from"./components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs";import Oe from"./components/biz/business/search-bar/variants/tag-search-bar/index.mjs";import{ComponentType as ke,extractDataByComponentType as Ae}from"./components/biz/utils/transformers/data.mjs";import{defaultProps as je}from"./components/biz/basics/card-item/defaults/default-props.mjs";import{schema as Me}from"./components/biz/basics/card-item/schema/index.mjs";import{defaultProps as Ne}from"./components/biz/basics/card-layout/defaults/default-props.mjs";import{schema as Pe}from"./components/biz/basics/card-layout/schema/index.mjs";import{ButtonClient as Fe}from"./components/biz/example/button/client.mjs";import{buttonInspectorDefaultProps as Ie,buttonInspectorPropsSchema as Le}from"./components/biz/example/button/schema.mjs";import{Button as Re}from"./components/biz/example/button/server.mjs";import{exampleButtonMaterial as ze}from"./components/biz/example/button/material.mjs";import{Renderer as Be}from"./components/biz/renderer/renderer.mjs";export{v as BasicBanner,f as BasicBannerDefaultData,g as BasicBannerMaterialComponent,p as BasicBannerSchema,I as BasicFeatureGrid,P as BasicFeatureGridDefaultData,F as BasicFeatureGridSchema,R as BasicFullscreen,B as BasicFullscreenFeed,L as BasicFullscreenFeedDefaultData,z as BasicFullscreenFeedSchema,te as BasicLogo,Z as BasicLogoDefaultData,ee as BasicLogoSchema,Y as BasicNavBar,q as BasicNavBarDefaultData,J as BasicNavBarSchema,ce as BasicPostCard,X as BasicPostCardDefaultData,se as BasicPostCardSchema,de as BasicRecommendedUsers,le as BasicRecommendedUsersDefaultData,ue as BasicRecommendedUsersSchema,me as BasicSearch,ge as BasicSearchBar,fe as BasicSearchBarDefaultData,he as BasicSearchBarSchema,Q as BasicSearchDefaultData,pe as BasicSearchSchema,Re as Button,Fe as ButtonClient,e as CARD_SPEC_MAP,x as CardGrid2x3,y as CardGrid2x3DefaultData,w as CardGrid2x3Infinite,S as CardGrid2x3InfiniteDefaultData,C as CardGrid2x3InfiniteSchema,b as CardGrid2x3Schema,D as CardGrid2x4,T as CardGrid2x4DefaultData,E as CardGrid2x4Schema,A as CardGrid3x3,O as CardGrid3x3DefaultData,N as CardGrid3x3Infinite,j as CardGrid3x3InfiniteDefaultData,M as CardGrid3x3InfiniteSchema,k as CardGrid3x3Schema,je as CardItemDefaultData,Me as CardItemSchema,Ne as CardLayoutDefaultData,Pe as CardLayoutSchema,t as CardSpec,ke as ComponentType,i as DataBindingUIMode,a as DataSourceType,oe as DetailSearchBar,$ as DetailSearchBarDefaultData,ae as DetailSearchBarSchema,be as FilterSearch,Se as FilterSearchBar,ve as FilterSearchBarDefaultData,xe as FilterSearchBarSchema,_e as FilterSearchDefaultData,ye as FilterSearchSchema,U as FullscreenFeedClient,V as FullscreenPostFeedDefaultData,H as FullscreenPostFeedSchema,K as FullscreenVideoClient,W as FullscreenVideoFeedDefaultData,G as FullscreenVideoFeedSchema,Be as Renderer,ie as SimpleSearch,ne as SimpleSearchDefaultData,re as SimpleSearchSchema,Ee as TagSearch,Oe as TagSearchBar,we as TagSearchBarDefaultData,De as TagSearchBarSchema,Ce as TagSearchDefaultData,Te as TagSearchSchema,m as basicBannerInspectorDefaultProps,h as basicBannerInspectorPropsSchema,_ as basicBannerMaterial,r as buildContentUrl,Ie as buttonInspectorDefaultProps,Le as buttonInspectorPropsSchema,l as commonStyleSchema,o as commonStylesToInline,s as customStylesToInline,ze as exampleButtonMaterial,Ae as extractDataByComponentType,n as getCardSpecConfig,c as mergeStyles,u as transformContentListToCardItems,d as transformContentToCardItem};
|
package/dist/components/biz/business/banner/variants/basic-banner/defaults/default-props.d.mts
CHANGED
|
@@ -9,6 +9,13 @@ declare const defaultProps: {
|
|
|
9
9
|
loop: boolean; /** 是否显示标题 */
|
|
10
10
|
showTitle: boolean; /** 是否显示指示器 */
|
|
11
11
|
showIndicator: boolean;
|
|
12
|
+
list: Array<{
|
|
13
|
+
contentId: number;
|
|
14
|
+
title: string;
|
|
15
|
+
desc: string;
|
|
16
|
+
coverUrl: string;
|
|
17
|
+
showViewCount: boolean;
|
|
18
|
+
}>;
|
|
12
19
|
};
|
|
13
20
|
//#endregion
|
|
14
21
|
export { defaultProps };
|
package/dist/components/biz/business/banner/variants/basic-banner/defaults/default-props.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
const e={autoplay:!0,interval:3e3,loop:!0,showTitle:!1,showIndicator:!0};export{e as defaultProps};
|
|
2
|
+
const e={autoplay:!0,interval:3e3,loop:!0,showTitle:!1,showIndicator:!0,list:[]};export{e as defaultProps};
|
|
@@ -10,11 +10,11 @@ import z from "zod";
|
|
|
10
10
|
declare const basicBannerInspectorPropsSchema: z.ZodObject<{
|
|
11
11
|
interval: z.ZodNumber & SchemaHasDefaultValue;
|
|
12
12
|
list: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
|
-
contentId: z.ZodOptional<z.ZodNumber
|
|
14
|
-
title: z.ZodOptional<z.ZodString
|
|
15
|
-
desc: z.ZodOptional<z.ZodString
|
|
16
|
-
coverUrl: z.ZodOptional<z.ZodString
|
|
17
|
-
showViewCount: z.ZodOptional<z.ZodBoolean
|
|
13
|
+
contentId: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
title: z.ZodOptional<z.ZodString>;
|
|
15
|
+
desc: z.ZodOptional<z.ZodString>;
|
|
16
|
+
coverUrl: z.ZodOptional<z.ZodString>;
|
|
17
|
+
showViewCount: z.ZodOptional<z.ZodBoolean>;
|
|
18
18
|
}, z.core.$strip>>> & SchemaHasDefaultValue;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
declare const basicBannerInspectorDefaultProps: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defaultProps as e}from"./defaults/default-props.mjs";import{defineArrayItemPropSchema as t,defineComponentPropsSchema as n,defineNumberPropSchema as r,defineSwitchPropSchema as i,defineTextPropSchema as a,getSchemaDefaultProps as o}from"../../../../../../utils/schema/schema.mjs";import s from"zod";const c=n({interval:r({label:`播放间隔`,defaultValue:e.interval}),list:t(s.object({contentId:r({label:`内容ID`,required:!1
|
|
2
|
+
import{defaultProps as e}from"./defaults/default-props.mjs";import{defineArrayItemPropSchema as t,defineComponentPropsSchema as n,defineNumberPropSchema as r,defineSwitchPropSchema as i,defineTextPropSchema as a,getSchemaDefaultProps as o}from"../../../../../../utils/schema/schema.mjs";import s from"zod";const c=n({interval:r({label:`播放间隔`,defaultValue:e.interval}),list:t(s.object({contentId:r({label:`内容ID`,required:!1}),title:a({label:`内容标题`,required:!1}),desc:a({label:`内容简介`,required:!1}),coverUrl:a({label:`封面`,required:!1}),showViewCount:i({label:`角标`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题`,desc:`视频描述`,coverUrl:`/banner/banner1.png`,showViewCount:!1}]})}),l=o(c);export{l as basicBannerInspectorDefaultProps,c as basicBannerInspectorPropsSchema};
|
|
@@ -10,11 +10,11 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
10
10
|
declare const basicBannerMaterial: DefineMaterialOption<typeof BasicBanner, zod.ZodObject<{
|
|
11
11
|
interval: zod.ZodNumber & SchemaHasDefaultValue;
|
|
12
12
|
list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
13
|
-
contentId: zod.ZodOptional<zod.ZodNumber
|
|
14
|
-
title: zod.ZodOptional<zod.ZodString
|
|
15
|
-
desc: zod.ZodOptional<zod.ZodString
|
|
16
|
-
coverUrl: zod.ZodOptional<zod.ZodString
|
|
17
|
-
showViewCount: zod.ZodOptional<zod.ZodBoolean
|
|
13
|
+
contentId: zod.ZodOptional<zod.ZodNumber>;
|
|
14
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
15
|
+
desc: zod.ZodOptional<zod.ZodString>;
|
|
16
|
+
coverUrl: zod.ZodOptional<zod.ZodString>;
|
|
17
|
+
showViewCount: zod.ZodOptional<zod.ZodBoolean>;
|
|
18
18
|
}, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
|
|
19
19
|
}, zod_v4_core0.$strip>, "basic-banner">;
|
|
20
20
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{basicBannerInspectorPropsSchema as t}from"./inspector-schema.mjs";import{BasicBanner as n}from"./server.mjs";const r=e({type:`basic-banner`,name:`基础轮播图`,icon:`/
|
|
2
|
+
import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{basicBannerInspectorPropsSchema as t}from"./inspector-schema.mjs";import{BasicBanner as n}from"./server.mjs";const r=e({type:`basic-banner`,name:`基础轮播图`,icon:`/static/components-thumb/banner.png`,category:`CENTER`,serverComponent:n,clientComponent:n,propsSchema:t});export{r as basicBannerMaterial};
|
|
@@ -7,8 +7,7 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
7
7
|
declare function BasicBannerClient({
|
|
8
8
|
props: propsConfig,
|
|
9
9
|
styles,
|
|
10
|
-
events
|
|
11
|
-
data
|
|
10
|
+
events
|
|
12
11
|
}: BaseComponentProps<any>): react_jsx_runtime0.JSX.Element | null;
|
|
13
12
|
//#endregion
|
|
14
13
|
export { BasicBannerClient };
|
|
@@ -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{defaultProps as n}from"../defaults/default-props.mjs";import{Image as r}from"../../../../../../ui/image.mjs";import{Box as i}from"../../../../../../ui/box.mjs";import{Carousel as a,CarouselContent as o,CarouselItem as s}from"../../../../../../ui/carousel.mjs";import{Text as c}from"../../../../../../ui/text.mjs";import l from"../../../../../../ui/legacy/button.mjs";import u from"../../../../../../ui/link.mjs";import d from"clsx";import{useIsClient as f}from"foxact/use-is-client";import{useEffect as p,useRef as m,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v={
|
|
2
|
+
"use client";import{buildContentUrl as e}from"../../../../../utils/helpers/url.mjs";import{mergeStyles as t}from"../../../../../utils/styles/helpers.mjs";import{defaultProps as n}from"../defaults/default-props.mjs";import{Image as r}from"../../../../../../ui/image.mjs";import{Box as i}from"../../../../../../ui/box.mjs";import{Carousel as a,CarouselContent as o,CarouselItem as s}from"../../../../../../ui/carousel.mjs";import{Text as c}from"../../../../../../ui/text.mjs";import l from"../../../../../../ui/legacy/button.mjs";import u from"../../../../../../ui/link.mjs";import d from"clsx";import{useIsClient as f}from"foxact/use-is-client";import{useEffect as p,useRef as m,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v={list:[]};function y({props:y=v,styles:b,events:x}){let{autoplay:S=n.autoplay,interval:C=n.interval,loop:w=n.loop,showTitle:T=n.showTitle,showIndicator:E=n.showIndicator,list:D=[]}={...n,...y},[O,k]=h(),[A,j]=h(0),M=f(),N=m(null);if(p(()=>{if(!O||!M)return;let e=()=>{j(O.selectedScrollSnap())};return O.on(`select`,e),e(),()=>{O.off(`select`,e)}},[O,x,M]),p(()=>!S||!O||D.length<=1?void 0:(N.current=setInterval(()=>{O.canScrollNext()?O.scrollNext():w&&O.scrollTo(0)},C),()=>{N.current&&=(clearInterval(N.current),null)}),[S,O,C,w,D.length]),!D||D.length===0)return null;let P=D[A];return _(i,{className:`relative w-full`,style:b?t(b,{}):void 0,children:[g(a,{setApi:k,opts:{align:`start`,loop:w,skipSnaps:!1,dragFree:!1},className:`w-full`,children:g(o,{className:`ml-0`,children:D.map((t,n)=>g(s,{className:`pl-0`,children:g(u,{href:e({url:``,contentId:t.contentId,contentType:1,title:t.title}),className:`block relative w-full h-[242px] overflow-hidden touch-manipulation`,children:g(r,{src:t.coverUrl,alt:t.title||`Banner ${n+1}`,fill:!0,objectFit:`cover`,unoptimized:!0})})},n))})}),T&&P?.title&&g(i,{className:`absolute bottom-[8px] left-[8px]`,children:g(c,{as:`p`,className:`text-white text-[16px] line-clamp-1`,children:P.title})}),E&&D.length>1&&g(i,{className:`absolute bottom-[16px] right-[8px] flex items-center gap-[4px]`,children:D.map((e,t)=>g(l,{type:`button`,className:d(`transition-all duration-300 rounded-full !p-0`,t===A?`w-[10px] h-[6px] bg-black`:`w-[6px] h-[6px] bg-white/50`),"aria-label":`跳转到第 ${t+1} 个 Banner`},t))})]})}export{y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defaultProps as e}from"./defaults/default-props.mjs";import
|
|
2
|
+
import{defaultProps as e}from"./defaults/default-props.mjs";import t from"./runtime/client.mjs";import{jsx as n}from"react/jsx-runtime";function r(r){let{interval:i,list:a}=r,o=typeof i==`string`?Number(i)||e.interval:i??e.interval;return n(t,{props:{autoplay:e.autoplay,interval:o,loop:e.loop,list:a}})}export{r as BasicBanner};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
|
|
3
3
|
import { DefineMaterialOption } from "../../../../../utils/schema/material.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { VideoDetailPlayerClient } from "./video-detail-player/client.mjs";
|
|
5
5
|
import "./video-detail-player/index.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { VideoDetailInfoClient } from "./video-detail-info/client.mjs";
|
|
7
7
|
import "./video-detail-info/index.mjs";
|
|
8
8
|
import "../../../../../utils.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { VideoDetailInfoTitleClient } from "./video-detail-info-title/client.mjs";
|
|
10
10
|
import "./video-detail-info-title/index.mjs";
|
|
11
|
-
import {
|
|
11
|
+
import { VideoDetailInfoTitleTagsEpisodesClient } from "./video-detail-info-title-tags-episodes/client.mjs";
|
|
12
12
|
import "./video-detail-info-title-tags-episodes/index.mjs";
|
|
13
|
-
import {
|
|
13
|
+
import { VideoDetailActionsClient } from "./video-detail-actions/client.mjs";
|
|
14
14
|
import "./video-detail-actions/index.mjs";
|
|
15
|
-
import {
|
|
15
|
+
import { VideoDetailRecommendClient } from "./video-detail-recommend/client.mjs";
|
|
16
16
|
import "./video-detail-recommend/index.mjs";
|
|
17
17
|
import z from "zod";
|
|
18
18
|
|
|
19
19
|
//#region components/biz/business/detail/materials/registry.d.ts
|
|
20
20
|
declare const videoDetailMaterials: {
|
|
21
|
-
'video-detail-player': DefineMaterialOption<typeof
|
|
22
|
-
'video-detail-info': DefineMaterialOption<typeof
|
|
21
|
+
'video-detail-player': DefineMaterialOption<typeof VideoDetailPlayerClient, z.ZodObject<{}, z.core.$strip>, "video-detail-player">;
|
|
22
|
+
'video-detail-info': DefineMaterialOption<typeof VideoDetailInfoClient, z.ZodObject<{
|
|
23
23
|
showTags: z.ZodBoolean & SchemaHasDefaultValue;
|
|
24
24
|
showEpisodes: z.ZodBoolean & SchemaHasDefaultValue;
|
|
25
25
|
}, z.core.$strip>, "video-detail-info">;
|
|
26
|
-
'video-detail-info-title': DefineMaterialOption<typeof
|
|
27
|
-
'video-detail-info-title-tags-episodes': DefineMaterialOption<typeof
|
|
26
|
+
'video-detail-info-title': DefineMaterialOption<typeof VideoDetailInfoTitleClient, z.ZodObject<{}, z.core.$strip>, "video-detail-info-title">;
|
|
27
|
+
'video-detail-info-title-tags-episodes': DefineMaterialOption<typeof VideoDetailInfoTitleTagsEpisodesClient, z.ZodObject<{
|
|
28
28
|
showTags: z.ZodBoolean & SchemaHasDefaultValue;
|
|
29
29
|
showEpisodes: z.ZodBoolean & SchemaHasDefaultValue;
|
|
30
30
|
}, z.core.$strip>, "video-detail-info-title-tags-episodes">;
|
|
31
|
-
'video-detail-actions': DefineMaterialOption<typeof
|
|
32
|
-
'video-detail-recommend': DefineMaterialOption<typeof
|
|
31
|
+
'video-detail-actions': DefineMaterialOption<typeof VideoDetailActionsClient, z.ZodObject<{}, z.core.$strip>, "video-detail-actions">;
|
|
32
|
+
'video-detail-recommend': DefineMaterialOption<typeof VideoDetailRecommendClient, z.ZodObject<{
|
|
33
33
|
rows: z.ZodNumber & SchemaHasDefaultValue;
|
|
34
34
|
columns: z.ZodNumber & SchemaHasDefaultValue;
|
|
35
35
|
smartTagEnabled: z.ZodBoolean & SchemaHasDefaultValue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { SafeInformationType } from "../../../../../../types/safe-information.mjs";
|
|
3
3
|
import { VideoDetailActionsInspectorProps } from "./schema.mjs";
|
|
4
|
-
import "react/jsx-runtime";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region components/biz/business/detail/materials/video-detail-actions/client.d.ts
|
|
7
7
|
interface VideoDetailActionsProps extends VideoDetailActionsInspectorProps {
|
|
@@ -10,5 +10,12 @@ interface VideoDetailActionsProps extends VideoDetailActionsInspectorProps {
|
|
|
10
10
|
/** 操作回写。 */
|
|
11
11
|
onUpdate: (data: Partial<SafeInformationType>) => void;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* 视频详情行为模块客户端组件。
|
|
15
|
+
*/
|
|
16
|
+
declare function VideoDetailActionsClient({
|
|
17
|
+
information,
|
|
18
|
+
onUpdate
|
|
19
|
+
}: VideoDetailActionsProps): react_jsx_runtime0.JSX.Element | null;
|
|
13
20
|
//#endregion
|
|
14
|
-
export { VideoDetailActionsProps };
|
|
21
|
+
export { VideoDetailActionsClient, VideoDetailActionsProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { VideoDetailActionsInspectorProps, videoDetailActionsInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
-
import { VideoDetailActionsProps } from "./client.mjs";
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
3
|
+
import { VideoDetailActionsClient, VideoDetailActionsProps } from "./client.mjs";
|
|
4
|
+
import "./material.mjs";
|
|
5
|
+
import "./server.mjs";
|
|
@@ -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{VideoDetailActionsClient as t}from"./client.mjs";import{videoDetailActionsInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailActions as r}from"./server.mjs";const i=e({type:`video-detail-actions`,name:`video-detail-actions`,icon:`/icon/video-detail-actions.png`,category:`CENTER`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailActionsMaterial};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/detail/materials/video-detail-actions/server.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* 视频详情行为模块服务端组件。
|
|
8
|
-
*/
|
|
9
|
-
declare function VideoDetailActions(props: VideoDetailActionsProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { VideoDetailActions };
|
|
2
|
+
import "./client.mjs";
|
|
3
|
+
import "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { SafeInformationType } from "../../../../../../types/safe-information.mjs";
|
|
3
3
|
import { VideoDetailInfoInspectorProps } from "./schema.mjs";
|
|
4
|
-
import "react/jsx-runtime";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region components/biz/business/detail/materials/video-detail-info/client.d.ts
|
|
7
7
|
interface VideoDetailInfoProps extends VideoDetailInfoInspectorProps {
|
|
@@ -14,5 +14,16 @@ interface VideoDetailInfoProps extends VideoDetailInfoInspectorProps {
|
|
|
14
14
|
/** 是否展示。 */
|
|
15
15
|
isShow?: boolean;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* 视频详情信息模块客户端组件。
|
|
19
|
+
*/
|
|
20
|
+
declare function VideoDetailInfoClient({
|
|
21
|
+
information,
|
|
22
|
+
currentSeriesNum,
|
|
23
|
+
onEpisodeChange,
|
|
24
|
+
showTags,
|
|
25
|
+
showEpisodes,
|
|
26
|
+
isShow
|
|
27
|
+
}: VideoDetailInfoProps): react_jsx_runtime0.JSX.Element | null;
|
|
17
28
|
//#endregion
|
|
18
|
-
export { VideoDetailInfoProps };
|
|
29
|
+
export { VideoDetailInfoClient, VideoDetailInfoProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { VideoDetailInfoInspectorProps, videoDetailInfoInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
-
import { VideoDetailInfoProps } from "./client.mjs";
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
3
|
+
import { VideoDetailInfoClient, VideoDetailInfoProps } from "./client.mjs";
|
|
4
|
+
import "./material.mjs";
|
|
5
|
+
import "./server.mjs";
|
|
@@ -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{VideoDetailInfoClient as t}from"./client.mjs";import{videoDetailInfoInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailInfo as r}from"./server.mjs";const i=e({type:`video-detail-info`,name:`video-detail-info`,icon:`/icon/video-detail-info.png`,category:`CENTER`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailInfoMaterial};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/detail/materials/video-detail-info/server.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* 视频详情信息模块服务端组件。
|
|
8
|
-
*/
|
|
9
|
-
declare function VideoDetailInfo(props: VideoDetailInfoProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { VideoDetailInfo };
|
|
2
|
+
import "./client.mjs";
|
|
3
|
+
import "react/jsx-runtime";
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
|
|
2
2
|
import { SafeInformationType } from "../../../../../../types/safe-information.mjs";
|
|
3
3
|
import { VideoDetailInfoTitleInspectorProps } from "./schema.mjs";
|
|
4
|
-
import "react/jsx-runtime";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region components/biz/business/detail/materials/video-detail-info-title/client.d.ts
|
|
7
7
|
interface VideoDetailInfoTitleProps extends VideoDetailInfoTitleInspectorProps {
|
|
8
8
|
/** 视频详情信息。 */
|
|
9
9
|
information: SafeInformationType;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* 标题变体物料客户端组件。
|
|
13
|
+
*/
|
|
14
|
+
declare function VideoDetailInfoTitleClient({
|
|
15
|
+
information
|
|
16
|
+
}: VideoDetailInfoTitleProps): react_jsx_runtime0.JSX.Element | null;
|
|
11
17
|
//#endregion
|
|
12
|
-
export { VideoDetailInfoTitleProps };
|
|
18
|
+
export { VideoDetailInfoTitleClient, VideoDetailInfoTitleProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { VideoDetailInfoTitleInspectorProps, videoDetailInfoTitleInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
-
import { VideoDetailInfoTitleProps } from "./client.mjs";
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
3
|
+
import { VideoDetailInfoTitleClient, VideoDetailInfoTitleProps } from "./client.mjs";
|
|
4
|
+
import "./material.mjs";
|
|
5
|
+
import "./server.mjs";
|
|
@@ -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{VideoDetailInfoTitleClient as t}from"./client.mjs";import{videoDetailInfoTitleInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailInfoTitle as r}from"./server.mjs";const i=e({type:`video-detail-info-title`,name:`video-detail-info-title`,icon:`/icon/video-detail-info.png`,category:`CENTER`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailInfoTitleMaterial};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/detail/materials/video-detail-info-title/server.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* 标题变体物料服务端组件。
|
|
8
|
-
*/
|
|
9
|
-
declare function VideoDetailInfoTitle(props: VideoDetailInfoTitleProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { VideoDetailInfoTitle };
|
|
2
|
+
import "./client.mjs";
|
|
3
|
+
import "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { SafeInformationType } from "../../../../../../types/safe-information.mjs";
|
|
3
3
|
import { VideoDetailInfoTitleTagsEpisodesInspectorProps } from "./schema.mjs";
|
|
4
|
-
import "react/jsx-runtime";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.ts
|
|
7
7
|
interface VideoDetailInfoTitleTagsEpisodesProps extends VideoDetailInfoTitleTagsEpisodesInspectorProps {
|
|
@@ -12,5 +12,15 @@ interface VideoDetailInfoTitleTagsEpisodesProps extends VideoDetailInfoTitleTags
|
|
|
12
12
|
/** 选集变更回调。 */
|
|
13
13
|
onEpisodeChange: (nextSeriesNum: number) => void;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* 标题+标签+选集变体物料客户端组件。
|
|
17
|
+
*/
|
|
18
|
+
declare function VideoDetailInfoTitleTagsEpisodesClient({
|
|
19
|
+
information,
|
|
20
|
+
currentSeriesNum,
|
|
21
|
+
onEpisodeChange,
|
|
22
|
+
showTags,
|
|
23
|
+
showEpisodes
|
|
24
|
+
}: VideoDetailInfoTitleTagsEpisodesProps): react_jsx_runtime0.JSX.Element | null;
|
|
15
25
|
//#endregion
|
|
16
|
-
export { VideoDetailInfoTitleTagsEpisodesProps };
|
|
26
|
+
export { VideoDetailInfoTitleTagsEpisodesClient, VideoDetailInfoTitleTagsEpisodesProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { VideoDetailInfoTitleTagsEpisodesInspectorProps, videoDetailInfoTitleTagsEpisodesInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
-
import { VideoDetailInfoTitleTagsEpisodesProps } from "./client.mjs";
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
3
|
+
import { VideoDetailInfoTitleTagsEpisodesClient, VideoDetailInfoTitleTagsEpisodesProps } from "./client.mjs";
|
|
4
|
+
import "./material.mjs";
|
|
5
|
+
import "./server.mjs";
|
|
@@ -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{VideoDetailInfoTitleTagsEpisodesClient as t}from"./client.mjs";import{videoDetailInfoTitleTagsEpisodesInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailInfoTitleTagsEpisodes as r}from"./server.mjs";const i=e({type:`video-detail-info-title-tags-episodes`,name:`video-detail-info-title-tags-episodes`,icon:`/icon/video-detail-info.png`,category:`CENTER`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailInfoTitleTagsEpisodesMaterial};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* 标题+标签+选集变体物料服务端组件。
|
|
8
|
-
*/
|
|
9
|
-
declare function VideoDetailInfoTitleTagsEpisodes(props: VideoDetailInfoTitleTagsEpisodesProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { VideoDetailInfoTitleTagsEpisodes };
|
|
2
|
+
import "./client.mjs";
|
|
3
|
+
import "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { SafeInformationType } from "../../../../../../types/safe-information.mjs";
|
|
3
3
|
import { VideoDetailPlayerInspectorProps } from "./schema.mjs";
|
|
4
|
-
import "react/jsx-runtime";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region components/biz/business/detail/materials/video-detail-player/client.d.ts
|
|
7
7
|
interface VideoDetailPlayerProps extends VideoDetailPlayerInspectorProps {
|
|
@@ -12,5 +12,13 @@ interface VideoDetailPlayerProps extends VideoDetailPlayerInspectorProps {
|
|
|
12
12
|
/** 续播秒数。 */
|
|
13
13
|
resumeProgressSeconds: number;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* 视频播放器物料客户端组件。
|
|
17
|
+
*/
|
|
18
|
+
declare function VideoDetailPlayerClient({
|
|
19
|
+
information,
|
|
20
|
+
episodeIndex,
|
|
21
|
+
resumeProgressSeconds
|
|
22
|
+
}: VideoDetailPlayerProps): react_jsx_runtime0.JSX.Element | null;
|
|
15
23
|
//#endregion
|
|
16
|
-
export { VideoDetailPlayerProps };
|
|
24
|
+
export { VideoDetailPlayerClient, VideoDetailPlayerProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { VideoDetailPlayerInspectorProps, videoDetailPlayerInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
-
import { VideoDetailPlayerProps } from "./client.mjs";
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
3
|
+
import { VideoDetailPlayerClient, VideoDetailPlayerProps } from "./client.mjs";
|
|
4
|
+
import "./material.mjs";
|
|
5
|
+
import "./server.mjs";
|
|
@@ -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{VideoDetailPlayerClient as t}from"./client.mjs";import{videoDetailPlayerInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailPlayer as r}from"./server.mjs";const i=e({type:`video-detail-player`,name:`video-detail-player`,icon:`/icon/video-detail-player.png`,category:`CENTER`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailPlayerMaterial};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/detail/materials/video-detail-player/server.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* 视频播放器物料服务端组件。
|
|
8
|
-
*/
|
|
9
|
-
declare function VideoDetailPlayer(props: VideoDetailPlayerProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { VideoDetailPlayer };
|
|
2
|
+
import "./client.mjs";
|
|
3
|
+
import "react/jsx-runtime";
|
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
|
|
2
2
|
import { VideoDetailRecommendInspectorProps } from "./schema.mjs";
|
|
3
|
-
import "react/jsx-runtime";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region components/biz/business/detail/materials/video-detail-recommend/client.d.ts
|
|
6
6
|
interface VideoDetailRecommendProps extends VideoDetailRecommendInspectorProps {
|
|
7
7
|
/** 当前视频 id,用于过滤。 */
|
|
8
8
|
detailId: string;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* 推荐模块客户端组件。
|
|
12
|
+
*/
|
|
13
|
+
declare function VideoDetailRecommendClient({
|
|
14
|
+
detailId,
|
|
15
|
+
rows,
|
|
16
|
+
columns,
|
|
17
|
+
smartTagEnabled,
|
|
18
|
+
smartTagIds,
|
|
19
|
+
title,
|
|
20
|
+
showPlayCount,
|
|
21
|
+
playCountDelta,
|
|
22
|
+
showEpisode,
|
|
23
|
+
enableInfinite,
|
|
24
|
+
items
|
|
25
|
+
}: VideoDetailRecommendProps): react_jsx_runtime0.JSX.Element | null;
|
|
10
26
|
//#endregion
|
|
11
|
-
export { VideoDetailRecommendProps };
|
|
27
|
+
export { VideoDetailRecommendClient, VideoDetailRecommendProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { VideoDetailRecommendInspectorProps, videoDetailRecommendInspectorPropsSchema } from "./schema.mjs";
|
|
3
|
-
import { VideoDetailRecommendProps } from "./client.mjs";
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
3
|
+
import { VideoDetailRecommendClient, VideoDetailRecommendProps } from "./client.mjs";
|
|
4
|
+
import "./material.mjs";
|
|
5
|
+
import "./server.mjs";
|
|
@@ -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{VideoDetailRecommendClient as t}from"./client.mjs";import{videoDetailRecommendInspectorPropsSchema as n}from"./schema.mjs";import{VideoDetailRecommend as r}from"./server.mjs";const i=e({type:`video-detail-recommend`,name:`video-detail-recommend`,icon:`/icon/video-detail-recommend.png`,category:`CENTER`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailRecommendMaterial};
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
//#region components/biz/business/detail/materials/video-detail-recommend/server.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* 推荐模块服务端组件。
|
|
8
|
-
*/
|
|
9
|
-
declare function VideoDetailRecommend(props: VideoDetailRecommendProps): react_jsx_runtime0.JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { VideoDetailRecommend };
|
|
2
|
+
import "./client.mjs";
|
|
3
|
+
import "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{useRequest as t}from"../../../../hooks/query/use-query.mjs";import{useAppContext as n}from"../../../../hooks/use-app-context/index.mjs";import{buttonVariants as r}from"./variants.mjs";import{jsx as i}from"react/jsx-runtime";function a(a){let{
|
|
2
|
+
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{useRequest as t}from"../../../../hooks/query/use-query.mjs";import{useAppContext as n}from"../../../../hooks/use-app-context/index.mjs";import{buttonVariants as r}from"./variants.mjs";import{jsx as i}from"react/jsx-runtime";function a(a){let{text:o,disabled:s,loading:c,variant:l=`default`}=a,u=n();console.log({clientContext:u,text:o});function d(){u!==`editor`&&console.log(`invoke`)}return t([`demo`],()=>new Promise(e=>{setTimeout(()=>{e({message:`Hello World`})},200)}),{enabled:u===`renderer`}),u===`editor`?i(`div`,{children:`editor preview button`}):i(`button`,{className:e(r({variant:l})),onClick:d,disabled:s||c,children:o})}export{a as ButtonClient};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import { ButtonInspectorProps, ButtonProps, buttonInspectorDefaultProps, buttonInspectorPropsSchema } from "./schema.mjs";
|
|
3
3
|
import { ButtonClient } from "./client.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { exampleButtonMaterial } from "./material.mjs";
|
|
5
|
+
import { Button } from "./server.mjs";
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
4
4
|
import "../../../../utils/schema/index.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { ButtonClient } from "./client.mjs";
|
|
6
6
|
import * as zod from "zod";
|
|
7
7
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
8
8
|
|
|
9
9
|
//#region components/biz/example/button/material.d.ts
|
|
10
|
-
declare const exampleButtonMaterial: DefineMaterialOption<typeof
|
|
10
|
+
declare const exampleButtonMaterial: DefineMaterialOption<typeof ButtonClient, zod.ZodObject<{
|
|
11
|
+
text: zod.ZodString & SchemaHasDefaultValue;
|
|
11
12
|
variant: zod.ZodType<"default" | "blue" | "red", unknown, zod_v4_core0.$ZodTypeInternals<"default" | "blue" | "red", unknown>> & SchemaHasDefaultValue;
|
|
12
|
-
disabled: zod.ZodBoolean & SchemaHasDefaultValue;
|
|
13
|
+
disabled: zod.ZodOptional<zod.ZodBoolean> & SchemaHasDefaultValue;
|
|
13
14
|
loading: zod.ZodOptional<zod.ZodBoolean>;
|
|
14
15
|
items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
15
|
-
name: zod.ZodOptional<zod.ZodString
|
|
16
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
16
17
|
}, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
|
|
17
18
|
info: zod.ZodOptional<zod.ZodObject<{
|
|
18
19
|
readonly address: zod.ZodOptional<zod.ZodString>;
|
|
@@ -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{ButtonClient as t}from"./client.mjs";import{buttonInspectorPropsSchema as n}from"./schema.mjs";import{Button as r}from"./server.mjs";const i=e({type:`example-button`,name:`按钮`,icon:`/icon/button.png`,category:`TOP`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as exampleButtonMaterial};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
|
|
3
3
|
import "../../../../utils/schema/index.mjs";
|
|
4
|
-
import { PropsWithChildren } from "react";
|
|
5
4
|
import z from "zod";
|
|
6
5
|
|
|
7
6
|
//#region components/biz/example/button/schema.d.ts
|
|
@@ -9,17 +8,19 @@ import z from "zod";
|
|
|
9
8
|
* 定义可以被低代码右侧inspector编辑的props
|
|
10
9
|
*/
|
|
11
10
|
declare const buttonInspectorPropsSchema: z.ZodObject<{
|
|
11
|
+
text: z.ZodString & SchemaHasDefaultValue;
|
|
12
12
|
variant: z.ZodType<"default" | "blue" | "red", unknown, z.core.$ZodTypeInternals<"default" | "blue" | "red", unknown>> & SchemaHasDefaultValue;
|
|
13
|
-
disabled: z.ZodBoolean & SchemaHasDefaultValue;
|
|
13
|
+
disabled: z.ZodOptional<z.ZodBoolean> & SchemaHasDefaultValue;
|
|
14
14
|
loading: z.ZodOptional<z.ZodBoolean>;
|
|
15
15
|
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
|
-
name: z.ZodOptional<z.ZodString
|
|
16
|
+
name: z.ZodOptional<z.ZodString>;
|
|
17
17
|
}, z.core.$strip>>> & SchemaHasDefaultValue;
|
|
18
18
|
info: z.ZodOptional<z.ZodObject<{
|
|
19
19
|
readonly address: z.ZodOptional<z.ZodString>;
|
|
20
20
|
}, z.core.$strip>> & SchemaHasDefaultValue;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
22
|
declare const buttonInspectorDefaultProps: {
|
|
23
|
+
text: string;
|
|
23
24
|
variant: "default" | "blue" | "red";
|
|
24
25
|
disabled: boolean;
|
|
25
26
|
items: {
|
|
@@ -33,6 +34,6 @@ type ButtonInspectorProps<T extends object = object> = z.infer<typeof buttonInsp
|
|
|
33
34
|
/**
|
|
34
35
|
* 基于ButtonInspectorProps再派生出组件真正的props(因为不是所有props都需要被编辑,比如说下面的children就不需要,但是button组件又需要传入children)
|
|
35
36
|
*/
|
|
36
|
-
type ButtonProps = ButtonInspectorProps
|
|
37
|
+
type ButtonProps = ButtonInspectorProps;
|
|
37
38
|
//#endregion
|
|
38
39
|
export { ButtonInspectorProps, ButtonProps, buttonInspectorDefaultProps, buttonInspectorPropsSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{defineArrayItemPropSchema as e,defineCheckboxPropSchema as t,defineComponentPropsSchema as n,defineObjectPropSchema as r,defineSelectEnumPropSchema as i,defineSwitchPropSchema as a,defineTextPropSchema as o,getSchemaDefaultProps as s}from"../../../../utils/schema/schema.mjs";import{buttonVariantOptions as c}from"./variants.mjs";import l from"zod";const u=n({variant:i(c,{label:`变体`,defaultValue:`red`}),disabled:t({label:`禁用`,defaultValue:!1}),loading:a({label:`加载`,required:!1}),items:e(l.object({name:o({label:`名称`,required:!1
|
|
2
|
+
import{defineArrayItemPropSchema as e,defineCheckboxPropSchema as t,defineComponentPropsSchema as n,defineObjectPropSchema as r,defineSelectEnumPropSchema as i,defineSwitchPropSchema as a,defineTextPropSchema as o,getSchemaDefaultProps as s}from"../../../../utils/schema/schema.mjs";import{buttonVariantOptions as c}from"./variants.mjs";import l from"zod";const u=n({text:o({label:`文本`,defaultValue:`example button`}),variant:i(c,{label:`变体`,defaultValue:`red`}),disabled:t({label:`禁用`,defaultValue:!1,required:!1}),loading:a({label:`加载`,required:!1}),items:e(l.object({name:o({label:`名称`,required:!1})}),{required:!1,label:`items`,defaultValue:[{name:`string`}]}),info:r({address:o({label:`地址`,required:!1})},{label:`info`,required:!1,defaultValue:{address:`SHENZHEN`}})}),d=s(u);export{d as buttonInspectorDefaultProps,u as buttonInspectorPropsSchema};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentType, ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import z from "zod";
|
|
5
|
+
|
|
6
|
+
//#region components/biz/renderer/renderer.d.ts
|
|
7
|
+
type NodeInspectorProps = Record<string, unknown>;
|
|
8
|
+
type NodeId = string;
|
|
9
|
+
type MaterialType = string;
|
|
10
|
+
type MaterialPropsSchema = z.ZodObject<z.ZodRawShape>;
|
|
11
|
+
type MaterialCategory = 'TOP' | 'CENTER' | 'BOTTOM';
|
|
12
|
+
type RendererMode = 'server' | 'client';
|
|
13
|
+
interface RendererMaterial<TSchema extends MaterialPropsSchema = MaterialPropsSchema> {
|
|
14
|
+
type: MaterialType;
|
|
15
|
+
name: string;
|
|
16
|
+
icon: ReactNode;
|
|
17
|
+
category: MaterialCategory;
|
|
18
|
+
serverComponent: ComponentType<any>;
|
|
19
|
+
clientComponent: ComponentType<any>;
|
|
20
|
+
propsSchema: TSchema;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 页面节点 JSON。
|
|
24
|
+
*/
|
|
25
|
+
interface NodeDocument {
|
|
26
|
+
id: NodeId;
|
|
27
|
+
type: MaterialType;
|
|
28
|
+
parentId: NodeId | null;
|
|
29
|
+
props: NodeInspectorProps;
|
|
30
|
+
children: NodeId[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 页面元信息。
|
|
34
|
+
*/
|
|
35
|
+
interface PageMeta {
|
|
36
|
+
type: 'category' | 'detail' | 'profile';
|
|
37
|
+
path: string;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 页面结构 JSON。
|
|
42
|
+
*/
|
|
43
|
+
interface PageDocument {
|
|
44
|
+
rootId: NodeId;
|
|
45
|
+
nodes: Record<NodeId, NodeDocument>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 编辑器输出文档。
|
|
49
|
+
*/
|
|
50
|
+
interface RendererDocument {
|
|
51
|
+
global?: {
|
|
52
|
+
theme?: Record<string, unknown>;
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
};
|
|
55
|
+
layout?: {
|
|
56
|
+
top?: Record<string, unknown>;
|
|
57
|
+
bottom?: Record<string, unknown>;
|
|
58
|
+
[key: string]: unknown;
|
|
59
|
+
};
|
|
60
|
+
meta: PageMeta;
|
|
61
|
+
page: PageDocument;
|
|
62
|
+
}
|
|
63
|
+
interface RendererProps {
|
|
64
|
+
className?: string;
|
|
65
|
+
document: RendererDocument;
|
|
66
|
+
materials?: readonly RendererMaterial[];
|
|
67
|
+
mode?: RendererMode;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* 页面渲染器(服务端组件)。
|
|
71
|
+
*/
|
|
72
|
+
declare function Renderer(props: RendererProps): react_jsx_runtime0.JSX.Element;
|
|
73
|
+
//#endregion
|
|
74
|
+
export { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{cn as e}from"../../../utils/cn.mjs";import{generateMaterialMap as t}from"../../../utils/schema/utils.mjs";import{materials_exports as n}from"../../../materials.mjs";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";function o(e,t){let n=t.props,r=e.propsSchema.safeParse(n);return r.success?{isValid:!0,props:r.data}:{isValid:!1,props:n,message:r.error?.message}}function s(e){let{document:t,materialMap:n,nodeId:c,ancestors:l,mode:u}=e;if(l.has(c))return null;let d=t.page.nodes[c];if(!d)return null;let f=new Set(l);f.add(c);let p=d.children.map(e=>i(s,{document:t,materialMap:n,nodeId:e,ancestors:f,mode:u},e)),m=n[d.type];if(!m)return p.length===0?null:i(r,{children:p});let h=o(m,d);return h.isValid?i(u===`client`?m.clientComponent:m.serverComponent,{...h.props,children:p}):a(`div`,{children:[`组件配置错误`,h.message]})}function c(r){let{className:a,document:o,materials:c,mode:l=`server`}=r,u=o.page.nodes[o.page.rootId];if(!u)return i(`div`,{className:e(`funhub-renderer`,a)});let d=t(c??Object.values(n));return i(`div`,{className:e(`funhub-renderer`,a),children:i(s,{document:o,materialMap:d,nodeId:u.id,ancestors:new Set,mode:l})})}export{c as Renderer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../../utils/cn.mjs";import t from"../../../utils/get-res-url.mjs";import{decryptImageToUint8Array as n}from"../../../utils/decrypt-image-client.mjs";import{gContentGetAppChannels as r,gContentGetVideoDetail as i,pInteractionBrowse as a}from"../../../service/generated/client.mjs";import{uint8ArrayToBase64 as o}from"../../../utils/uint8.mjs";import{EmptyState as s}from"../../ui/empty.mjs";import{useRequest as c}from"../../../hooks/query/use-query.mjs";import{useKeepAliveEffect as l,useKeepAliveState as u}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as d}from"../../../utils/api-collect.mjs";import{batchQueryContentInteractions as f}from"../../../hooks/use-content-operate.mjs";import{queryKey as ee}from"../../../constants/query-key.mjs";import te from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{resolveMaterialProps as p,videoDetailMaterials as m}from"../../biz/business/detail/materials/registry.mjs";import{DetailHero as ne}from"../../biz/business/detail/video-hero.mjs";import{Fragment as re,useCallback as h,useEffect as g,useMemo as _}from"react";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";import{useTranslations as x}from"next-intl";import{useParams as ie,useSearchParams as S}from"next/navigation";const C=[{id:`detail-info`,componentName:`video-detail-info`,props:{}},{id:`detail-actions`,componentName:`video-detail-actions`,props:{}},{id:`detail-recommend`,componentName:`video-detail-recommend`,props:{rows:2}}];function w({detailId:d,initialInformation:w,isWebView:T=!1,materialConfig:E}){let D=x(`components.pages.videoDetail`),O=ie(),ae=S(),k=O.level,A=Array.isArray(k)?k:typeof k==`string`?[k]:[],j=A.findIndex(e=>e===`episode`),M=j>=0?A[j+1]:A[2],N=Math.max(1,Number(M)||1),[P,F]=u(`detail-current-series-num-${d}`,N);g(()=>{F(N)},[d,N,F]);let I=Math.max(0,P-1),{data:L}=c(_(()=>[`video-detail`,d],[d]),async()=>d?await i({id:d}):null,{enabled:!!d}),R=_(()=>{let e=L?.data?.video;return!e||typeof e!=`object`?null:{...e,content_type:1,episode_cnt:e.links?.length||0}},[L?.data?.video]),oe=w??R??null,[z,B]=u(`detail-information-${d}`,oe),V=z?.links?.[I]?.id||``,{data:H,isFetching:U,isFetchedAfterMount:W,isSuccess:G}=c(_(()=>[`detail-interaction`,z?.id,z?.content_type,V,P],[V,P,z?.content_type,z?.id]),async()=>!z?.id||typeof z.content_type!=`number`?null:await f([z.id],1),{enabled:T?!1:!!z?.id,staleTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1}),K=_(()=>{if(!W||U||!G)return 0;let e=H?.interaction_list?.[0]?.browse_record,t=Number(e?.browse_duration||0);if(!Number.isFinite(t)||t<=0)return 0;let n=String(e?.browse_episode||``).trim();if(!n)return t;let r=Number.parseInt(n,10);return Number.isNaN(r)?0:r===P?t:0},[P,H,W,U,G]),[se,ce]=u(`info-detail-active-tab-${d}`,`video`),[q,J]=u(`info-detail-comment-add-count-${d}`,0),[Y,le]=u(`info-detail-comment-total-${d}`,void 0),X=h(async e=>{let t=String(d||``).trim();if(!t)return;let n=e.browse_episode||P,r=Date.now(),i=String(e.browse_key||r);try{await a({app_id:0,content_type:1,content_id:t,browse_duration:Number(e.browse_duration||0),browse_episode:String(n),browse_key:i,browse_page_ts:r})}catch(e){console.error(`上报播放进度失败:`,e)}},[P,d]);g(()=>{!z&&R&&B(R),window.video={[d]:z},window.getVideoInfoAsync=async()=>{let e=z?.links?.[I]?.m3u8_url||``,r=e?`${process.env.NEXT_PUBLIC_API_BASE}/api/content/processM3u8?url=${encodeURIComponent(`${t()}/m3f/${e}`)}`:``,i=z?.img_y||z?.img_x||z?.preview_images?.[0]||``,a=``,s=await n(i);return s&&(a=o(s.bytes)),{poster:a,src:r,title:z?.name||``}},window.getVideoBrowseRecordAsync=async()=>{let e=await f([d],1);return e?.interaction_list?.[0]?e.interaction_list[0].browse_record:null},window.reportVideoBrowse=X},[d,I,z,R,B,X]),g(()=>{if(!H?.interaction_list?.[0])return;let e=H.interaction_list[0];B(t=>{if(!t)return t;let n=t.static?.like_cnt,r=typeof n==`number`?n:Number(n||0),i=!!e.is_liked&&r===0;return{...t,like:e.is_liked||!1,dislike:e.is_disliked||!1,collect:e.is_collected||!1,static:i?{...t.static||{},like_cnt:1}:t.static}})},[H,B]);let Z=h(e=>{B(t=>t&&{...t,...e})},[B]);l(()=>{z?.id&&z.id},[z?.id],`detail-page-report-${d}`),g(()=>{!z||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:z.id||d,author_id:z.up_user,object_type:z.content_type,object_category:z.content_type,object_tags:z.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[d,z]),g(()=>{J(0)},[V,J]),_(()=>(typeof Y==`number`?Y:0)+q,[q,Y]);let ue=h(()=>{},[!1,ce]);h(()=>{J(e=>e+1)},[J]),g(()=>{},[!1,ue,z?.id,ae]);let Q=h(e=>{if(T){let t=encodeURIComponent(z?.name||``),n=`/webview/${z?.id}/${t}/episode/${e}`;window.location.href=n}else F(e)},[z?.id,z?.name,T,F]),$=z?.status===`1`,{data:de}=c([ee.CHANNEL],()=>r()),fe=de?.data?.list||[],pe=_(()=>{if(E!==void 0){let e=new Map(C.map(e=>[e.componentName,e]));return E.map(t=>{let n=e.get(t.componentName);return{...n,...t,props:{...n?.props??{},...t.props??{}}}})}return C},[E]),me=h(e=>{if(!z)return null;let t=m[e.componentName];if(!t)return null;let n=t.
|
|
2
|
+
"use client";import{cn as e}from"../../../utils/cn.mjs";import t from"../../../utils/get-res-url.mjs";import{decryptImageToUint8Array as n}from"../../../utils/decrypt-image-client.mjs";import{gContentGetAppChannels as r,gContentGetVideoDetail as i,pInteractionBrowse as a}from"../../../service/generated/client.mjs";import{uint8ArrayToBase64 as o}from"../../../utils/uint8.mjs";import{EmptyState as s}from"../../ui/empty.mjs";import{useRequest as c}from"../../../hooks/query/use-query.mjs";import{useKeepAliveEffect as l,useKeepAliveState as u}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as d}from"../../../utils/api-collect.mjs";import{batchQueryContentInteractions as f}from"../../../hooks/use-content-operate.mjs";import{queryKey as ee}from"../../../constants/query-key.mjs";import te from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{resolveMaterialProps as p,videoDetailMaterials as m}from"../../biz/business/detail/materials/registry.mjs";import{DetailHero as ne}from"../../biz/business/detail/video-hero.mjs";import{Fragment as re,useCallback as h,useEffect as g,useMemo as _}from"react";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";import{useTranslations as x}from"next-intl";import{useParams as ie,useSearchParams as S}from"next/navigation";const C=[{id:`detail-info`,componentName:`video-detail-info`,props:{}},{id:`detail-actions`,componentName:`video-detail-actions`,props:{}},{id:`detail-recommend`,componentName:`video-detail-recommend`,props:{rows:2}}];function w({detailId:d,initialInformation:w,isWebView:T=!1,materialConfig:E}){let D=x(`components.pages.videoDetail`),O=ie(),ae=S(),k=O.level,A=Array.isArray(k)?k:typeof k==`string`?[k]:[],j=A.findIndex(e=>e===`episode`),M=j>=0?A[j+1]:A[2],N=Math.max(1,Number(M)||1),[P,F]=u(`detail-current-series-num-${d}`,N);g(()=>{F(N)},[d,N,F]);let I=Math.max(0,P-1),{data:L}=c(_(()=>[`video-detail`,d],[d]),async()=>d?await i({id:d}):null,{enabled:!!d}),R=_(()=>{let e=L?.data?.video;return!e||typeof e!=`object`?null:{...e,content_type:1,episode_cnt:e.links?.length||0}},[L?.data?.video]),oe=w??R??null,[z,B]=u(`detail-information-${d}`,oe),V=z?.links?.[I]?.id||``,{data:H,isFetching:U,isFetchedAfterMount:W,isSuccess:G}=c(_(()=>[`detail-interaction`,z?.id,z?.content_type,V,P],[V,P,z?.content_type,z?.id]),async()=>!z?.id||typeof z.content_type!=`number`?null:await f([z.id],1),{enabled:T?!1:!!z?.id,staleTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1}),K=_(()=>{if(!W||U||!G)return 0;let e=H?.interaction_list?.[0]?.browse_record,t=Number(e?.browse_duration||0);if(!Number.isFinite(t)||t<=0)return 0;let n=String(e?.browse_episode||``).trim();if(!n)return t;let r=Number.parseInt(n,10);return Number.isNaN(r)?0:r===P?t:0},[P,H,W,U,G]),[se,ce]=u(`info-detail-active-tab-${d}`,`video`),[q,J]=u(`info-detail-comment-add-count-${d}`,0),[Y,le]=u(`info-detail-comment-total-${d}`,void 0),X=h(async e=>{let t=String(d||``).trim();if(!t)return;let n=e.browse_episode||P,r=Date.now(),i=String(e.browse_key||r);try{await a({app_id:0,content_type:1,content_id:t,browse_duration:Number(e.browse_duration||0),browse_episode:String(n),browse_key:i,browse_page_ts:r})}catch(e){console.error(`上报播放进度失败:`,e)}},[P,d]);g(()=>{!z&&R&&B(R),window.video={[d]:z},window.getVideoInfoAsync=async()=>{let e=z?.links?.[I]?.m3u8_url||``,r=e?`${process.env.NEXT_PUBLIC_API_BASE}/api/content/processM3u8?url=${encodeURIComponent(`${t()}/m3f/${e}`)}`:``,i=z?.img_y||z?.img_x||z?.preview_images?.[0]||``,a=``,s=await n(i);return s&&(a=o(s.bytes)),{poster:a,src:r,title:z?.name||``}},window.getVideoBrowseRecordAsync=async()=>{let e=await f([d],1);return e?.interaction_list?.[0]?e.interaction_list[0].browse_record:null},window.reportVideoBrowse=X},[d,I,z,R,B,X]),g(()=>{if(!H?.interaction_list?.[0])return;let e=H.interaction_list[0];B(t=>{if(!t)return t;let n=t.static?.like_cnt,r=typeof n==`number`?n:Number(n||0),i=!!e.is_liked&&r===0;return{...t,like:e.is_liked||!1,dislike:e.is_disliked||!1,collect:e.is_collected||!1,static:i?{...t.static||{},like_cnt:1}:t.static}})},[H,B]);let Z=h(e=>{B(t=>t&&{...t,...e})},[B]);l(()=>{z?.id&&z.id},[z?.id],`detail-page-report-${d}`),g(()=>{!z||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:z.id||d,author_id:z.up_user,object_type:z.content_type,object_category:z.content_type,object_tags:z.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[d,z]),g(()=>{J(0)},[V,J]),_(()=>(typeof Y==`number`?Y:0)+q,[q,Y]);let ue=h(()=>{},[!1,ce]);h(()=>{J(e=>e+1)},[J]),g(()=>{},[!1,ue,z?.id,ae]);let Q=h(e=>{if(T){let t=encodeURIComponent(z?.name||``),n=`/webview/${z?.id}/${t}/episode/${e}`;window.location.href=n}else F(e)},[z?.id,z?.name,T,F]),$=z?.status===`1`,{data:de}=c([ee.CHANNEL],()=>r()),fe=de?.data?.list||[],pe=_(()=>{if(E!==void 0){let e=new Map(C.map(e=>[e.componentName,e]));return E.map(t=>{let n=e.get(t.componentName);return{...n,...t,props:{...n?.props??{},...t.props??{}}}})}return C},[E]),me=h(e=>{if(!z)return null;let t=m[e.componentName];if(!t)return null;let n=t.clientComponent,r=p(t,e.props);if(!r.isValid)return y(`div`,{children:`组件配置错误`});let i={};return e.componentName.startsWith(`video-detail-info`)&&(i.information=z,i.currentSeriesNum=P,i.onEpisodeChange=Q,i.isShow=!0),e.componentName===`video-detail-actions`&&(i.information=z,i.onUpdate=Z),e.componentName===`video-detail-recommend`&&(i.detailId=d),y(n,{...r.props,...i})},[P,d,Q,Z,z,!0]);return b(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 ${T?``:`pt-11`}`,children:[!T&&y(`div`,{className:`fixed bg-black top-0 left-0 right-0 z-[1000]`,children:y(te,{data:{list:fe}})}),y(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:b(v,{children:[z&&!$&&y(s,{type:`no-content`,text:D(`videoDetailClient.videoUnavailable`)}),z&&$&&b(v,{children:[!T&&y(ne,{isVideo:!0,information:z,episodeIndex:I,resumeProgressSeconds:K}),y(`div`,{id:`selectPopupPosition`,className:`w-full`}),!1,b(`div`,{className:e(`w-full`,!1),children:[pe.map(e=>y(re,{children:me(e)},e.id)),!1]}),!1]}),!z&&y(s,{type:`no-content`,text:D(`videoDetailClient.videoDeleted`)})]})})]})}export{w 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?: "link" | "default" | "destructive" | "
|
|
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?: "link" | "default" | "destructive" | "
|
|
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
|
|
4
|
+
import Image from "next/image";
|
|
5
5
|
|
|
6
6
|
//#region components/ui/image.d.ts
|
|
7
7
|
/** BaseImageProps 属性定义。 */
|
|
8
|
-
type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof
|
|
8
|
+
type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof Image>, '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(props: ImageProps): react_jsx_runtime0.JSX.Element;
|
|
30
|
+
declare function Image$1(props: ImageProps): react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { BaseImageProps, CommonImageProps, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
|
|
32
|
+
export { BaseImageProps, CommonImageProps, Image$1 as Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
|
package/dist/materials.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{
|
|
2
|
+
import{__exportAll as e}from"./_virtual/_rolldown/runtime.mjs";import{basicBannerMaterial as t}from"./components/biz/business/banner/variants/basic-banner/material.mjs";import{exampleButtonMaterial as n}from"./components/biz/example/button/material.mjs";var r=e({basicBannerMaterial:()=>t,exampleButtonMaterial:()=>n});export{t as basicBannerMaterial,n as exampleButtonMaterial,r as materials_exports};
|
|
@@ -22,21 +22,23 @@ interface DefineMaterialOption<TComponent extends ComponentType<any>, TPropsSche
|
|
|
22
22
|
type: TType;
|
|
23
23
|
name: string;
|
|
24
24
|
icon: ReactNode;
|
|
25
|
-
|
|
25
|
+
serverComponent: TComponent;
|
|
26
|
+
clientComponent: TComponent;
|
|
26
27
|
propsSchema: EnsurePropsSchemaSubset<TComponent, TPropsSchema>;
|
|
27
28
|
category: typeof MATERIAL_CATEGORY[keyof typeof MATERIAL_CATEGORY];
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
|
-
* 定义物料,约束propsSchema是component props的子集。
|
|
31
|
+
* 定义物料,约束propsSchema是server/client component props的子集。
|
|
31
32
|
* @param option 物料配置
|
|
32
33
|
* @returns 物料配置
|
|
33
34
|
*/
|
|
34
35
|
declare function defineMaterial<TComponent extends ComponentType<any>, TPropsSchema extends MaterialPropsSchema, const TType extends string>(option: DefineMaterialOption<TComponent, TPropsSchema, TType>): DefineMaterialOption<TComponent, TPropsSchema, TType>;
|
|
35
36
|
interface OverwriteMaterialOption<TComponent extends ComponentType<any>, TPropsSchema extends MaterialPropsSchema> {
|
|
36
|
-
|
|
37
|
+
serverComponent?: EnsureComponentCompatibleWithSchema<TComponent, TPropsSchema>;
|
|
38
|
+
clientComponent?: EnsureComponentCompatibleWithSchema<TComponent, TPropsSchema>;
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
|
-
*
|
|
41
|
+
* 基于已有物料重写配置,当前支持重写server/client component。
|
|
40
42
|
* @param rawMaterial 原始物料配置
|
|
41
43
|
* @param option 重写配置
|
|
42
44
|
* @returns 重写后的物料配置
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const e=[{url:`/`,cover:`/images/home/banner1.png`,cn_name:`Banner 标题 1`,en_name:`Banner Title 1`,content_id:`1`,content_type:0,type:1},{url:`/`,cover:`/images/home/banner2.png`,cn_name:`Banner 标题 2`,en_name:`Banner Title 2`,content_id:`2`,content_type:1,type:1},{url:`/`,cover:`/images/home/banner3.png`,cn_name:`Banner 标题 3`,en_name:`Banner Title 3`,content_id:`3`,content_type:2,type:2}];export{e as mockData};
|