@funhub/platform 0.1.19 → 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.
Files changed (48) hide show
  1. package/dist/biz.d.mts +3 -3
  2. package/dist/components/biz/business/banner/variants/basic-banner/material.mjs +1 -1
  3. package/dist/components/biz/business/detail/materials/registry.d.mts +12 -12
  4. package/dist/components/biz/business/detail/materials/video-detail-actions/client.d.mts +9 -2
  5. package/dist/components/biz/business/detail/materials/video-detail-actions/index.d.mts +3 -3
  6. package/dist/components/biz/business/detail/materials/video-detail-actions/material.d.mts +1 -1
  7. package/dist/components/biz/business/detail/materials/video-detail-actions/material.mjs +1 -1
  8. package/dist/components/biz/business/detail/materials/video-detail-actions/server.d.mts +2 -10
  9. package/dist/components/biz/business/detail/materials/video-detail-info/client.d.mts +13 -2
  10. package/dist/components/biz/business/detail/materials/video-detail-info/index.d.mts +3 -3
  11. package/dist/components/biz/business/detail/materials/video-detail-info/material.d.mts +1 -1
  12. package/dist/components/biz/business/detail/materials/video-detail-info/material.mjs +1 -1
  13. package/dist/components/biz/business/detail/materials/video-detail-info/server.d.mts +2 -10
  14. package/dist/components/biz/business/detail/materials/video-detail-info-title/client.d.mts +8 -2
  15. package/dist/components/biz/business/detail/materials/video-detail-info-title/index.d.mts +3 -3
  16. package/dist/components/biz/business/detail/materials/video-detail-info-title/material.d.mts +1 -1
  17. package/dist/components/biz/business/detail/materials/video-detail-info-title/material.mjs +1 -1
  18. package/dist/components/biz/business/detail/materials/video-detail-info-title/server.d.mts +2 -10
  19. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.mts +12 -2
  20. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/index.d.mts +3 -3
  21. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.d.mts +1 -1
  22. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.mjs +1 -1
  23. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.d.mts +2 -10
  24. package/dist/components/biz/business/detail/materials/video-detail-player/client.d.mts +10 -2
  25. package/dist/components/biz/business/detail/materials/video-detail-player/index.d.mts +3 -3
  26. package/dist/components/biz/business/detail/materials/video-detail-player/material.d.mts +1 -1
  27. package/dist/components/biz/business/detail/materials/video-detail-player/material.mjs +1 -1
  28. package/dist/components/biz/business/detail/materials/video-detail-player/server.d.mts +2 -10
  29. package/dist/components/biz/business/detail/materials/video-detail-recommend/client.d.mts +18 -2
  30. package/dist/components/biz/business/detail/materials/video-detail-recommend/index.d.mts +3 -3
  31. package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +1 -1
  32. package/dist/components/biz/business/detail/materials/video-detail-recommend/material.mjs +1 -1
  33. package/dist/components/biz/business/detail/materials/video-detail-recommend/server.d.mts +2 -10
  34. package/dist/components/biz/example/button/client.mjs +1 -1
  35. package/dist/components/biz/example/button/index.d.mts +2 -2
  36. package/dist/components/biz/example/button/material.d.mts +5 -4
  37. package/dist/components/biz/example/button/material.mjs +1 -1
  38. package/dist/components/biz/example/button/schema.d.mts +5 -4
  39. package/dist/components/biz/example/button/schema.mjs +1 -1
  40. package/dist/components/biz/renderer/index.d.mts +1 -1
  41. package/dist/components/biz/renderer/renderer.d.mts +5 -2
  42. package/dist/components/biz/renderer/renderer.mjs +1 -1
  43. package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
  44. package/dist/components/ui/badge.d.mts +1 -1
  45. package/dist/components/ui/button.d.mts +1 -1
  46. package/dist/components/ui/image.d.mts +4 -4
  47. package/dist/utils/schema/material.d.mts +6 -4
  48. package/package.json +1 -1
package/dist/biz.d.mts CHANGED
@@ -92,9 +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
- import { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererProps } from "./components/biz/renderer/renderer.mjs";
98
+ import { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps } from "./components/biz/renderer/renderer.mjs";
99
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, 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 };
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 };
@@ -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:`/static/components-thumb/banner.png`,category:`CENTER`,component:n,propsSchema:t});export{r as basicBannerMaterial};
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};
@@ -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 { VideoDetailPlayer } from "./video-detail-player/server.mjs";
4
+ import { VideoDetailPlayerClient } from "./video-detail-player/client.mjs";
5
5
  import "./video-detail-player/index.mjs";
6
- import { VideoDetailInfo } from "./video-detail-info/server.mjs";
6
+ import { VideoDetailInfoClient } from "./video-detail-info/client.mjs";
7
7
  import "./video-detail-info/index.mjs";
8
8
  import "../../../../../utils.mjs";
9
- import { VideoDetailInfoTitle } from "./video-detail-info-title/server.mjs";
9
+ import { VideoDetailInfoTitleClient } from "./video-detail-info-title/client.mjs";
10
10
  import "./video-detail-info-title/index.mjs";
11
- import { VideoDetailInfoTitleTagsEpisodes } from "./video-detail-info-title-tags-episodes/server.mjs";
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 { VideoDetailActions } from "./video-detail-actions/server.mjs";
13
+ import { VideoDetailActionsClient } from "./video-detail-actions/client.mjs";
14
14
  import "./video-detail-actions/index.mjs";
15
- import { VideoDetailRecommend } from "./video-detail-recommend/server.mjs";
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 VideoDetailPlayer, z.ZodObject<{}, z.core.$strip>, "video-detail-player">;
22
- 'video-detail-info': DefineMaterialOption<typeof VideoDetailInfo, z.ZodObject<{
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 VideoDetailInfoTitle, z.ZodObject<{}, z.core.$strip>, "video-detail-info-title">;
27
- 'video-detail-info-title-tags-episodes': DefineMaterialOption<typeof VideoDetailInfoTitleTagsEpisodes, z.ZodObject<{
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 VideoDetailActions, z.ZodObject<{}, z.core.$strip>, "video-detail-actions">;
32
- 'video-detail-recommend': DefineMaterialOption<typeof VideoDetailRecommend, z.ZodObject<{
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 { VideoDetailActions } from "./server.mjs";
5
- import "./material.mjs";
3
+ import { VideoDetailActionsClient, VideoDetailActionsProps } from "./client.mjs";
4
+ import "./material.mjs";
5
+ import "./server.mjs";
@@ -1,4 +1,4 @@
1
1
 
2
2
  import "../../../../../../utils/schema/material.mjs";
3
- import "./server.mjs";
3
+ import "./client.mjs";
4
4
  import "zod";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailActionsInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailActions as n}from"./server.mjs";const r=e({type:`video-detail-actions`,name:`video-detail-actions`,icon:`/icon/video-detail-actions.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailActionsMaterial};
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 { VideoDetailActionsProps } from "./client.mjs";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
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 { VideoDetailInfo } from "./server.mjs";
5
- import "./material.mjs";
3
+ import { VideoDetailInfoClient, VideoDetailInfoProps } from "./client.mjs";
4
+ import "./material.mjs";
5
+ import "./server.mjs";
@@ -1,5 +1,5 @@
1
1
 
2
2
  import "../../../../../../utils/schema/material.mjs";
3
3
  import "../../../../../../utils/schema/index.mjs";
4
- import "./server.mjs";
4
+ import "./client.mjs";
5
5
  import "zod";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailInfoInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailInfo as n}from"./server.mjs";const r=e({type:`video-detail-info`,name:`video-detail-info`,icon:`/icon/video-detail-info.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailInfoMaterial};
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 { VideoDetailInfoProps } from "./client.mjs";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
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 { VideoDetailInfoTitle } from "./server.mjs";
5
- import "./material.mjs";
3
+ import { VideoDetailInfoTitleClient, VideoDetailInfoTitleProps } from "./client.mjs";
4
+ import "./material.mjs";
5
+ import "./server.mjs";
@@ -1,4 +1,4 @@
1
1
 
2
2
  import "../../../../../../utils/schema/material.mjs";
3
- import "./server.mjs";
3
+ import "./client.mjs";
4
4
  import "zod";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailInfoTitleInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailInfoTitle as n}from"./server.mjs";const r=e({type:`video-detail-info-title`,name:`video-detail-info-title`,icon:`/icon/video-detail-info.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailInfoTitleMaterial};
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 { VideoDetailInfoTitleProps } from "./client.mjs";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
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 { VideoDetailInfoTitleTagsEpisodes } from "./server.mjs";
5
- import "./material.mjs";
3
+ import { VideoDetailInfoTitleTagsEpisodesClient, VideoDetailInfoTitleTagsEpisodesProps } from "./client.mjs";
4
+ import "./material.mjs";
5
+ import "./server.mjs";
@@ -1,5 +1,5 @@
1
1
 
2
2
  import "../../../../../../utils/schema/material.mjs";
3
3
  import "../../../../../../utils/schema/index.mjs";
4
- import "./server.mjs";
4
+ import "./client.mjs";
5
5
  import "zod";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailInfoTitleTagsEpisodesInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailInfoTitleTagsEpisodes as n}from"./server.mjs";const r=e({type:`video-detail-info-title-tags-episodes`,name:`video-detail-info-title-tags-episodes`,icon:`/icon/video-detail-info.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailInfoTitleTagsEpisodesMaterial};
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 { VideoDetailInfoTitleTagsEpisodesProps } from "./client.mjs";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
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 { VideoDetailPlayer } from "./server.mjs";
5
- import "./material.mjs";
3
+ import { VideoDetailPlayerClient, VideoDetailPlayerProps } from "./client.mjs";
4
+ import "./material.mjs";
5
+ import "./server.mjs";
@@ -1,4 +1,4 @@
1
1
 
2
2
  import "../../../../../../utils/schema/material.mjs";
3
- import "./server.mjs";
3
+ import "./client.mjs";
4
4
  import "zod";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailPlayerInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailPlayer as n}from"./server.mjs";const r=e({type:`video-detail-player`,name:`video-detail-player`,icon:`/icon/video-detail-player.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailPlayerMaterial};
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 { VideoDetailPlayerProps } from "./client.mjs";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
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 { VideoDetailRecommend } from "./server.mjs";
5
- import "./material.mjs";
3
+ import { VideoDetailRecommendClient, VideoDetailRecommendProps } from "./client.mjs";
4
+ import "./material.mjs";
5
+ import "./server.mjs";
@@ -1,5 +1,5 @@
1
1
 
2
2
  import "../../../../../../utils/schema/material.mjs";
3
3
  import "../../../../../../utils/schema/index.mjs";
4
- import "./server.mjs";
4
+ import "./client.mjs";
5
5
  import "zod";
@@ -1,2 +1,2 @@
1
1
 
2
- import{defineMaterial as e}from"../../../../../../utils/schema/material.mjs";import{videoDetailRecommendInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailRecommend as n}from"./server.mjs";const r=e({type:`video-detail-recommend`,name:`video-detail-recommend`,icon:`/icon/video-detail-recommend.png`,category:`CENTER`,component:n,propsSchema:t});export{r as videoDetailRecommendMaterial};
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 { VideoDetailRecommendProps } from "./client.mjs";
3
- import * as react_jsx_runtime0 from "react/jsx-runtime";
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{children:o,disabled:s,loading:c,variant:l=`default`}=a,u=n();console.log({clientContext:u});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};
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 { Button } from "./server.mjs";
5
- import { exampleButtonMaterial } from "./material.mjs";
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 { Button } from "./server.mjs";
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 Button, zod.ZodObject<{
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> & SchemaHasDefaultValue;
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{buttonInspectorPropsSchema as t}from"./schema.mjs";import{Button as n}from"./server.mjs";const r=e({type:`example-button`,name:`按钮`,icon:`/icon/button.png`,category:`TOP`,component:n,propsSchema:t});export{r as exampleButtonMaterial};
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> & SchemaHasDefaultValue;
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<PropsWithChildren>;
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,defaultValue:`wuhu`})}),{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};
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};
@@ -1,2 +1,2 @@
1
1
 
2
- import { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererProps } from "./renderer.mjs";
2
+ import { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps } from "./renderer.mjs";
@@ -9,12 +9,14 @@ type NodeId = string;
9
9
  type MaterialType = string;
10
10
  type MaterialPropsSchema = z.ZodObject<z.ZodRawShape>;
11
11
  type MaterialCategory = 'TOP' | 'CENTER' | 'BOTTOM';
12
+ type RendererMode = 'server' | 'client';
12
13
  interface RendererMaterial<TSchema extends MaterialPropsSchema = MaterialPropsSchema> {
13
14
  type: MaterialType;
14
15
  name: string;
15
16
  icon: ReactNode;
16
17
  category: MaterialCategory;
17
- component: ComponentType<any>;
18
+ serverComponent: ComponentType<any>;
19
+ clientComponent: ComponentType<any>;
18
20
  propsSchema: TSchema;
19
21
  }
20
22
  /**
@@ -62,10 +64,11 @@ interface RendererProps {
62
64
  className?: string;
63
65
  document: RendererDocument;
64
66
  materials?: readonly RendererMaterial[];
67
+ mode?: RendererMode;
65
68
  }
66
69
  /**
67
70
  * 页面渲染器(服务端组件)。
68
71
  */
69
72
  declare function Renderer(props: RendererProps): react_jsx_runtime0.JSX.Element;
70
73
  //#endregion
71
- export { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererProps };
74
+ export { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps };
@@ -1,2 +1,2 @@
1
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}from"react/jsx-runtime";function a(e,t){let n=t.props,r=e.propsSchema.safeParse(n);return r.success?{isValid:!0,props:r.data}:{isValid:!1,props:n}}function o(e){let{document:t,materialMap:n,nodeId:s,ancestors:c}=e;if(c.has(s))return null;let l=t.page.nodes[s];if(!l)return null;let u=new Set(c);u.add(s);let d=l.children.map(e=>i(o,{document:t,materialMap:n,nodeId:e,ancestors:u},e)),f=n[l.type];if(!f)return d.length===0?null:i(r,{children:d});let p=a(f,l);if(!p.isValid)return i(`div`,{children:`组件配置错误`});let m=f.component;return i(m,{...p.props,children:d})}function s(r){let{className:a,document:s,materials:c}=r,l=s.page.nodes[s.page.rootId];if(!l)return i(`div`,{className:e(`funhub-renderer`,a)});let u=t(c??Object.values(n));return i(`div`,{className:e(`funhub-renderer`,a),children:i(o,{document:s,materialMap:u,nodeId:l.id,ancestors:new Set})})}export{s as Renderer};
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.component,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};
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?: "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 NextImage from "next/image";
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 NextImage>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
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 };
@@ -22,21 +22,23 @@ interface DefineMaterialOption<TComponent extends ComponentType<any>, TPropsSche
22
22
  type: TType;
23
23
  name: string;
24
24
  icon: ReactNode;
25
- component: TComponent;
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
- component?: EnsureComponentCompatibleWithSchema<TComponent, TPropsSchema>;
37
+ serverComponent?: EnsureComponentCompatibleWithSchema<TComponent, TPropsSchema>;
38
+ clientComponent?: EnsureComponentCompatibleWithSchema<TComponent, TPropsSchema>;
37
39
  }
38
40
  /**
39
- * 基于已有物料重写配置,当前仅支持重写component。
41
+ * 基于已有物料重写配置,当前支持重写server/client component。
40
42
  * @param rawMaterial 原始物料配置
41
43
  * @param option 重写配置
42
44
  * @returns 重写后的物料配置
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funhub/platform",
3
3
  "type": "module",
4
- "version": "0.1.19",
4
+ "version": "0.1.21",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "**/*.css"