@funhub/platform 0.1.134 → 0.1.136

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 (195) hide show
  1. package/dist/biz.d.mts +12 -12
  2. package/dist/cli/init/create-client.mjs +2 -0
  3. package/dist/cli/init/create-sdk.mjs +2 -0
  4. package/dist/cli/init/shared/command.mjs +2 -0
  5. package/dist/cli/init/shared/constants.mjs +2 -0
  6. package/dist/cli/init/shared/create-project.mjs +3 -0
  7. package/dist/cli/init/shared/file.mjs +2 -0
  8. package/dist/cli/init/shared/package-manager.mjs +2 -0
  9. package/dist/cli/init/shared/prompts.mjs +2 -0
  10. package/dist/cli/init/shared/template.mjs +2 -0
  11. package/dist/cli.d.mts +2 -0
  12. package/dist/cli.mjs +4 -0
  13. package/dist/components/biz/business/banner/index.d.mts +1 -1
  14. package/dist/components/biz/business/banner/variants/basic-banner/index.d.mts +2 -2
  15. package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +25 -3
  16. package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -1
  17. package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +20 -1
  18. package/dist/components/biz/business/banner/variants/basic-banner/material.mjs +1 -1
  19. package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.d.mts +2 -1
  20. package/dist/components/biz/business/banner-carousel/material.d.mts +23 -1
  21. package/dist/components/biz/business/banner-carousel/material.mjs +1 -1
  22. package/dist/components/biz/business/banner-carousel/schema.d.mts +28 -0
  23. package/dist/components/biz/business/banner-carousel/schema.mjs +1 -1
  24. package/dist/components/biz/business/banner-carousel/server.d.mts +18 -0
  25. package/dist/components/biz/business/channel-list/client.d.mts +8 -0
  26. package/dist/components/biz/business/channel-list/material.d.mts +19 -1
  27. package/dist/components/biz/business/channel-list/material.mjs +1 -1
  28. package/dist/components/biz/business/channel-list/schema.d.mts +30 -0
  29. package/dist/components/biz/business/channel-list/schema.mjs +1 -1
  30. package/dist/components/biz/business/detail/shared/registry.d.mts +75 -2
  31. package/dist/components/biz/business/detail/shared/registry.mjs +1 -1
  32. package/dist/components/biz/business/detail/video-detail-actions/client.d.mts +12 -2
  33. package/dist/components/biz/business/detail/video-detail-actions/index.d.mts +4 -4
  34. package/dist/components/biz/business/detail/video-detail-actions/material.d.mts +13 -1
  35. package/dist/components/biz/business/detail/video-detail-actions/material.mjs +1 -1
  36. package/dist/components/biz/business/detail/video-detail-actions/schema.d.mts +20 -1
  37. package/dist/components/biz/business/detail/video-detail-actions/schema.mjs +1 -1
  38. package/dist/components/biz/business/detail/video-detail-actions/server.d.mts +15 -2
  39. package/dist/components/biz/business/detail/video-detail-info/client.d.mts +14 -2
  40. package/dist/components/biz/business/detail/video-detail-info/index.d.mts +4 -4
  41. package/dist/components/biz/business/detail/video-detail-info/material.d.mts +16 -1
  42. package/dist/components/biz/business/detail/video-detail-info/material.mjs +1 -1
  43. package/dist/components/biz/business/detail/video-detail-info/schema.d.mts +22 -1
  44. package/dist/components/biz/business/detail/video-detail-info/schema.mjs +1 -1
  45. package/dist/components/biz/business/detail/video-detail-info/server.d.mts +15 -2
  46. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/client.d.mts +14 -2
  47. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/index.d.mts +4 -4
  48. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.d.mts +16 -1
  49. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.mjs +1 -1
  50. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.d.mts +22 -1
  51. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.mjs +1 -1
  52. package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/server.d.mts +15 -2
  53. package/dist/components/biz/business/detail/video-detail-player/client.d.mts +13 -2
  54. package/dist/components/biz/business/detail/video-detail-player/index.d.mts +4 -4
  55. package/dist/components/biz/business/detail/video-detail-player/material.d.mts +13 -1
  56. package/dist/components/biz/business/detail/video-detail-player/material.mjs +1 -1
  57. package/dist/components/biz/business/detail/video-detail-player/schema.d.mts +22 -1
  58. package/dist/components/biz/business/detail/video-detail-player/schema.mjs +1 -1
  59. package/dist/components/biz/business/detail/video-detail-player/server.d.mts +10 -2
  60. package/dist/components/biz/business/detail/video-detail-recommend/client.d.mts +22 -2
  61. package/dist/components/biz/business/detail/video-detail-recommend/index.d.mts +4 -4
  62. package/dist/components/biz/business/detail/video-detail-recommend/material.d.mts +40 -1
  63. package/dist/components/biz/business/detail/video-detail-recommend/material.mjs +1 -1
  64. package/dist/components/biz/business/detail/video-detail-recommend/schema.d.mts +42 -1
  65. package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +1 -1
  66. package/dist/components/biz/business/detail/video-detail-recommend/server.d.mts +10 -2
  67. package/dist/components/biz/business/floating-ball/index.d.mts +2 -2
  68. package/dist/components/biz/business/floating-ball/material.d.mts +16 -1
  69. package/dist/components/biz/business/floating-ball/material.mjs +1 -1
  70. package/dist/components/biz/business/floating-ball/schema.d.mts +16 -3
  71. package/dist/components/biz/business/floating-ball/schema.mjs +1 -1
  72. package/dist/components/biz/business/header-search/header-avatar-icon/client.d.mts +13 -2
  73. package/dist/components/biz/business/header-search/header-avatar-icon/index.d.mts +4 -4
  74. package/dist/components/biz/business/header-search/header-avatar-icon/material.d.mts +13 -1
  75. package/dist/components/biz/business/header-search/header-avatar-icon/material.mjs +1 -1
  76. package/dist/components/biz/business/header-search/header-avatar-icon/schema.d.mts +18 -1
  77. package/dist/components/biz/business/header-search/header-avatar-icon/schema.mjs +1 -1
  78. package/dist/components/biz/business/header-search/header-avatar-icon/server.d.mts +10 -2
  79. package/dist/components/biz/business/header-search/header-avatar-logo-search/client.d.mts +11 -2
  80. package/dist/components/biz/business/header-search/header-avatar-logo-search/index.d.mts +4 -4
  81. package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +16 -1
  82. package/dist/components/biz/business/header-search/header-avatar-logo-search/material.mjs +1 -1
  83. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +22 -1
  84. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
  85. package/dist/components/biz/business/header-search/header-avatar-logo-search/server.d.mts +10 -2
  86. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.d.mts +11 -2
  87. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/index.d.mts +4 -4
  88. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +16 -1
  89. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs +1 -1
  90. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts +20 -1
  91. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +1 -1
  92. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.d.mts +10 -2
  93. package/dist/components/biz/business/header-search/header-logo-search/client.d.mts +13 -2
  94. package/dist/components/biz/business/header-search/header-logo-search/index.d.mts +4 -4
  95. package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +16 -1
  96. package/dist/components/biz/business/header-search/header-logo-search/material.mjs +1 -1
  97. package/dist/components/biz/business/header-search/header-logo-search/schema.d.mts +22 -1
  98. package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +1 -1
  99. package/dist/components/biz/business/header-search/header-logo-search/server.d.mts +10 -2
  100. package/dist/components/biz/business/header-search/header-search/client.d.mts +13 -2
  101. package/dist/components/biz/business/header-search/header-search/index.d.mts +4 -4
  102. package/dist/components/biz/business/header-search/header-search/material.d.mts +13 -1
  103. package/dist/components/biz/business/header-search/header-search/material.mjs +1 -1
  104. package/dist/components/biz/business/header-search/header-search/schema.d.mts +18 -1
  105. package/dist/components/biz/business/header-search/header-search/schema.mjs +1 -1
  106. package/dist/components/biz/business/header-search/header-search/server.d.mts +10 -2
  107. package/dist/components/biz/business/home-recommend/home-recommend-grid/client.d.mts +2 -1
  108. package/dist/components/biz/business/home-recommend/home-recommend-grid/index.d.mts +2 -2
  109. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +52 -3
  110. package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
  111. package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +43 -1
  112. package/dist/components/biz/business/home-recommend/home-recommend-grid/material.mjs +1 -1
  113. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.d.mts +2 -1
  114. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/index.d.mts +2 -2
  115. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +47 -3
  116. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
  117. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +40 -1
  118. package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.mjs +1 -1
  119. package/dist/components/biz/business/home-recommend/index.d.mts +2 -2
  120. package/dist/components/biz/business/image-text-recommend/client.d.mts +2 -1
  121. package/dist/components/biz/business/image-text-recommend/index.d.mts +2 -2
  122. package/dist/components/biz/business/image-text-recommend/material.d.mts +35 -1
  123. package/dist/components/biz/business/image-text-recommend/material.mjs +1 -1
  124. package/dist/components/biz/business/image-text-recommend/schema.d.mts +31 -1
  125. package/dist/components/biz/business/image-text-recommend/schema.mjs +1 -1
  126. package/dist/components/biz/business/index.d.mts +11 -11
  127. package/dist/components/biz/business/large-feature-grid/material.d.mts +9 -1
  128. package/dist/components/biz/business/large-feature-grid/material.mjs +1 -1
  129. package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
  130. package/dist/components/biz/business/marquee/client.d.mts +2 -1
  131. package/dist/components/biz/business/marquee/index.d.mts +2 -2
  132. package/dist/components/biz/business/marquee/material.d.mts +34 -1
  133. package/dist/components/biz/business/marquee/material.mjs +1 -1
  134. package/dist/components/biz/business/marquee/schema.d.mts +30 -1
  135. package/dist/components/biz/business/marquee/schema.mjs +1 -1
  136. package/dist/components/biz/business/profile/index.d.mts +1 -1
  137. package/dist/components/biz/business/profile/profile-header/material.d.mts +31 -2
  138. package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
  139. package/dist/components/biz/business/profile/profile-header/schema.d.mts +11 -3
  140. package/dist/components/biz/business/profile/profile-header/schema.mjs +1 -1
  141. package/dist/components/biz/business/profile/profile-main/index.d.mts +1 -1
  142. package/dist/components/biz/business/profile/profile-main/material.d.mts +13 -1
  143. package/dist/components/biz/business/profile/profile-main/material.mjs +1 -1
  144. package/dist/components/biz/business/profile/profile-main/schema.d.mts +11 -3
  145. package/dist/components/biz/business/profile/profile-main/schema.mjs +1 -1
  146. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.d.mts +2 -1
  147. package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.d.mts +2 -1
  148. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +2 -1
  149. package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.d.mts +2 -1
  150. package/dist/components/biz/business/search-history/client.d.mts +2 -1
  151. package/dist/components/biz/business/search-history/index.d.mts +2 -2
  152. package/dist/components/biz/business/search-history/material.d.mts +16 -1
  153. package/dist/components/biz/business/search-history/material.mjs +1 -1
  154. package/dist/components/biz/business/search-history/schema.d.mts +13 -1
  155. package/dist/components/biz/business/search-history/schema.mjs +1 -1
  156. package/dist/components/biz/business/search-input/index.d.mts +2 -2
  157. package/dist/components/biz/business/search-input/material.d.mts +13 -1
  158. package/dist/components/biz/business/search-input/material.mjs +1 -1
  159. package/dist/components/biz/business/search-input/schema.d.mts +11 -3
  160. package/dist/components/biz/business/search-input/schema.mjs +1 -1
  161. package/dist/components/biz/business/shortcut-grid/client.d.mts +12 -0
  162. package/dist/components/biz/business/shortcut-grid/material.d.mts +22 -1
  163. package/dist/components/biz/business/shortcut-grid/material.mjs +1 -1
  164. package/dist/components/biz/business/shortcut-grid/schema.d.mts +26 -0
  165. package/dist/components/biz/business/shortcut-grid/schema.mjs +1 -1
  166. package/dist/components/biz/business/shortcut-grid/server.d.mts +11 -0
  167. package/dist/components/biz/business/tab-bar/index.d.mts +2 -2
  168. package/dist/components/biz/business/tab-bar/material.d.mts +13 -1
  169. package/dist/components/biz/business/tab-bar/material.mjs +1 -1
  170. package/dist/components/biz/business/tab-bar/schema.d.mts +11 -3
  171. package/dist/components/biz/business/tab-bar/schema.mjs +1 -1
  172. package/dist/components/biz/business/text-recommend/client.d.mts +2 -1
  173. package/dist/components/biz/business/text-recommend/index.d.mts +2 -2
  174. package/dist/components/biz/business/text-recommend/material.d.mts +19 -1
  175. package/dist/components/biz/business/text-recommend/material.mjs +1 -1
  176. package/dist/components/biz/business/text-recommend/schema.d.mts +15 -1
  177. package/dist/components/biz/business/text-recommend/schema.mjs +1 -1
  178. package/dist/components/biz/example/button/index.d.mts +2 -2
  179. package/dist/components/biz/example/button/material.d.mts +24 -1
  180. package/dist/components/biz/example/button/material.mjs +1 -1
  181. package/dist/components/biz/example/button/schema.d.mts +30 -3
  182. package/dist/components/biz/example/button/schema.mjs +1 -1
  183. package/dist/components/biz/renderer/renderer.d.mts +2 -1
  184. package/dist/components/biz/renderer/renderer.mjs +1 -1
  185. package/dist/components/pages/settings/_components/reset-password-drawer.mjs +1 -1
  186. package/dist/components/ui/badge.d.mts +1 -1
  187. package/dist/components/ui/button.d.mts +2 -2
  188. package/dist/components/ui/empty.d.mts +1 -1
  189. package/dist/components/ui/item.d.mts +1 -1
  190. package/dist/materials.d.mts +10 -10
  191. package/dist/utils/schema/index.d.mts +1 -1
  192. package/dist/utils/schema/material.d.mts +1 -1
  193. package/dist/utils/schema/schema.d.mts +35 -0
  194. package/dist/utils.d.mts +3 -3
  195. package/package.json +8 -3
package/dist/biz.d.mts CHANGED
@@ -43,8 +43,8 @@ import { defaultProps } from "./components/biz/business/banner/variants/basic-ba
43
43
  import { BasicBannerClient } from "./components/biz/business/banner/variants/basic-banner/runtime/client.mjs";
44
44
  import { schema } from "./components/biz/business/banner/variants/basic-banner/schema/index.mjs";
45
45
  import { basicBannerInspectorDefaultProps, basicBannerInspectorPropsSchema } from "./components/biz/business/banner/variants/basic-banner/inspector-schema.mjs";
46
- import { basicBannerMaterial } from "./components/biz/business/banner/variants/basic-banner/material.mjs";
47
46
  import { BasicBanner } from "./components/biz/business/banner/variants/basic-banner/server.mjs";
47
+ import { basicBannerMaterial } from "./components/biz/business/banner/variants/basic-banner/material.mjs";
48
48
  import { defaultProps as defaultProps$9 } from "./components/biz/business/card-grid/variants/card-grid-2x3/defaults/default-props.mjs";
49
49
  import { CardGrid2x3Client } from "./components/biz/business/card-grid/variants/card-grid-2x3/runtime/client.mjs";
50
50
  import { schema as schema$10 } from "./components/biz/business/card-grid/variants/card-grid-2x3/schema/index.mjs";
@@ -65,8 +65,8 @@ import { BasicFeatureGridClient } from "./components/biz/business/feature-grid/v
65
65
  import { schema as schema$1 } from "./components/biz/business/feature-grid/variants/basic-feature-grid/schema/index.mjs";
66
66
  import { FloatingBallInspectorProps, floatingBallInspectorDefaultProps, floatingBallInspectorPropsSchema } from "./components/biz/business/floating-ball/schema.mjs";
67
67
  import { FloatingBallClient, FloatingBallClientProps } from "./components/biz/business/floating-ball/client.mjs";
68
- import { floatingBallMaterial } from "./components/biz/business/floating-ball/material.mjs";
69
68
  import { FloatingBall } from "./components/biz/business/floating-ball/server.mjs";
69
+ import { floatingBallMaterial } from "./components/biz/business/floating-ball/material.mjs";
70
70
  import { defaultProps as defaultProps$19 } from "./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/defaults/default-props.mjs";
71
71
  import { FullscreenPostFeedClient } from "./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/runtime/client.mjs";
72
72
  import { schema as schema$19 } from "./components/biz/business/fullscreen-feed/variants/fullscreen-post-feed/schema/index.mjs";
@@ -76,21 +76,21 @@ import { schema as schema$20 } from "./components/biz/business/fullscreen-feed/v
76
76
  import { homeRecommendGridInspectorDefaultProps, homeRecommendGridInspectorPropsSchema } from "./components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs";
77
77
  import { HomeRecommendGridClient } from "./components/biz/business/home-recommend/home-recommend-grid/client.mjs";
78
78
  import { schema as schema$21 } from "./components/biz/business/home-recommend/home-recommend-grid/schema.mjs";
79
- import { homeRecommendGridMaterial } from "./components/biz/business/home-recommend/home-recommend-grid/material.mjs";
80
79
  import { HomeRecommendGrid } from "./components/biz/business/home-recommend/home-recommend-grid/server.mjs";
80
+ import { homeRecommendGridMaterial } from "./components/biz/business/home-recommend/home-recommend-grid/material.mjs";
81
81
  import { homeRecommendWaterfallInspectorDefaultProps, homeRecommendWaterfallInspectorPropsSchema } from "./components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs";
82
82
  import { HomeRecommendWaterfallClient } from "./components/biz/business/home-recommend/home-recommend-waterfall/client.mjs";
83
83
  import { schema as schema$22 } from "./components/biz/business/home-recommend/home-recommend-waterfall/schema.mjs";
84
- import { homeRecommendWaterfallMaterial } from "./components/biz/business/home-recommend/home-recommend-waterfall/material.mjs";
85
84
  import { HomeRecommendWaterfall } from "./components/biz/business/home-recommend/home-recommend-waterfall/server.mjs";
85
+ import { homeRecommendWaterfallMaterial } from "./components/biz/business/home-recommend/home-recommend-waterfall/material.mjs";
86
86
  import { imageTextRecommendInspectorPropsSchema } from "./components/biz/business/image-text-recommend/schema.mjs";
87
87
  import { ImageTextRecommendClient, ImageTextRecommendProps } from "./components/biz/business/image-text-recommend/client.mjs";
88
- import { imageTextRecommendMaterial } from "./components/biz/business/image-text-recommend/material.mjs";
89
88
  import { ImageTextRecommendServer } from "./components/biz/business/image-text-recommend/server.mjs";
89
+ import { imageTextRecommendMaterial } from "./components/biz/business/image-text-recommend/material.mjs";
90
90
  import { defaultMarqueePeriod, getDefaultMarqueePeriod, marqueeInspectorPropsSchema } from "./components/biz/business/marquee/schema.mjs";
91
91
  import { MarqueeClient, MarqueeProps } from "./components/biz/business/marquee/client.mjs";
92
- import { marqueeMaterial } from "./components/biz/business/marquee/material.mjs";
93
92
  import { MarqueeServer } from "./components/biz/business/marquee/server.mjs";
93
+ import { marqueeMaterial } from "./components/biz/business/marquee/material.mjs";
94
94
  import { defaultProps as defaultProps$4 } from "./components/biz/business/nav-bar/variants/basic-nav-bar/defaults/default-props.mjs";
95
95
  import { BasicNavBarClient } from "./components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs";
96
96
  import { schema as schema$4 } from "./components/biz/business/nav-bar/variants/basic-nav-bar/schema/index.mjs";
@@ -102,8 +102,8 @@ import { UserProfileHeaderClient } from "./components/biz/business/profile/profi
102
102
  import { profileHeaderMaterial, profileHeaderMaterialWithDisabledBackground } from "./components/biz/business/profile/profile-header/material.mjs";
103
103
  import { ProfileMainInspectorProps, UserProfileMainProps, profileMainInspectorDefaultProps, profileMainInspectorPropsSchema } from "./components/biz/business/profile/profile-main/schema.mjs";
104
104
  import { UserProfileMainClient } from "./components/biz/business/profile/profile-main/client.mjs";
105
- import { profileMainMaterial } from "./components/biz/business/profile/profile-main/material.mjs";
106
105
  import { UserProfileMain } from "./components/biz/business/profile/profile-main/server.mjs";
106
+ import { profileMainMaterial } from "./components/biz/business/profile/profile-main/material.mjs";
107
107
  import { UserProfileMainRenderMode, UserProfileMainShell, UserProfileMainShellProps } from "./components/biz/business/profile/profile-main/shell.mjs";
108
108
  import { CollectTab, CollectTabProps } from "./components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs";
109
109
  import { CollectTabServer } from "./components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs";
@@ -131,25 +131,25 @@ import { TagSearchBarClient } from "./components/biz/business/search-bar/variant
131
131
  import { schema as schema$24 } from "./components/biz/business/search-bar/variants/tag-search-bar/schema/index.mjs";
132
132
  import { searchHistoryInspectorPropsSchema } from "./components/biz/business/search-history/schema.mjs";
133
133
  import { SearchHistoryClient, SearchHistoryProps } from "./components/biz/business/search-history/client.mjs";
134
- import { searchHistoryMaterial } from "./components/biz/business/search-history/material.mjs";
135
134
  import { SearchHistoryServer } from "./components/biz/business/search-history/server.mjs";
135
+ import { searchHistoryMaterial } from "./components/biz/business/search-history/material.mjs";
136
136
  import { SearchInputInspectorProps, searchInputInspectorDefaultProps, searchInputInspectorPropsSchema } from "./components/biz/business/search-input/schema.mjs";
137
137
  import { SearchInputClient, SearchInputProps } from "./components/biz/business/search-input/client.mjs";
138
- import { searchInputMaterial } from "./components/biz/business/search-input/material.mjs";
139
138
  import { SearchInputServer } from "./components/biz/business/search-input/server.mjs";
139
+ import { searchInputMaterial } from "./components/biz/business/search-input/material.mjs";
140
140
  import { TabBarInspectorProps, tabBarInspectorDefaultProps, tabBarInspectorPropsSchema } from "./components/biz/business/tab-bar/schema.mjs";
141
141
  import { TabBarClient, TabBarItem, TabBarItemConfigType, TabBarProps } from "./components/biz/business/tab-bar/client.mjs";
142
- import { tabBarMaterial } from "./components/biz/business/tab-bar/material.mjs";
143
142
  import { TabBarServer } from "./components/biz/business/tab-bar/server.mjs";
143
+ import { tabBarMaterial } from "./components/biz/business/tab-bar/material.mjs";
144
144
  import { textRecommendInspectorPropsSchema } from "./components/biz/business/text-recommend/schema.mjs";
145
145
  import { TextRecommendClient, TextRecommendProps } from "./components/biz/business/text-recommend/client.mjs";
146
- import { textRecommendMaterial } from "./components/biz/business/text-recommend/material.mjs";
147
146
  import { TextRecommendServer } from "./components/biz/business/text-recommend/server.mjs";
147
+ import { textRecommendMaterial } from "./components/biz/business/text-recommend/material.mjs";
148
148
  import "./components/biz/business/index.mjs";
149
149
  import { ButtonInspectorProps, ButtonProps, buttonInspectorDefaultProps, buttonInspectorPropsSchema } from "./components/biz/example/button/schema.mjs";
150
150
  import { ButtonClient } from "./components/biz/example/button/client.mjs";
151
- import { exampleButtonMaterial } from "./components/biz/example/button/material.mjs";
152
151
  import { Button } from "./components/biz/example/button/server.mjs";
152
+ import { exampleButtonMaterial } from "./components/biz/example/button/material.mjs";
153
153
  import "./components/biz/example/button/index.mjs";
154
154
  import { NodeDocument, PageDocument, PageMeta, Renderer, RendererDocument, RendererMaterial, RendererMode, RendererProps } from "./components/biz/renderer/renderer.mjs";
155
155
  import "./components/biz/renderer/index.mjs";
@@ -0,0 +1,2 @@
1
+
2
+ import{createProject as e}from"./shared/create-project.mjs";async function t(t){await e(`client`,t)}export{t as createClient};
@@ -0,0 +1,2 @@
1
+
2
+ import{createProject as e}from"./shared/create-project.mjs";async function t(t){await e(`sdk`,t)}export{t as createSdk};
@@ -0,0 +1,2 @@
1
+
2
+ import e from"node:process";import{spawn as t}from"node:child_process";function n(t){return e.platform===`win32`?`${t}.cmd`:t}function r(e,r,i){return new Promise((a,o)=>{t(n(e),r,{cwd:i,stdio:`inherit`,shell:!1}).on(`close`,t=>{if(t===0){a();return}o(Error(`${e} ${r.join(` `)} 执行失败,退出码 ${t??`unknown`}`))})})}export{r as runCommand};
@@ -0,0 +1,2 @@
1
+
2
+ const e=`funhub-app`,t=`client`,n=`public-groups/funhub-template`,r=`main`,i=`https://gitlab.quguazhan.com`;export{e as DEFAULT_PROJECT_NAME,t as DEFAULT_TEMPLATE_TYPE,r as TEMPLATE_BRANCH,i as TEMPLATE_HOST,n as TEMPLATE_REPO};
@@ -0,0 +1,3 @@
1
+
2
+ import{runCommand as e}from"./command.mjs";import{isEmptyDirectory as t}from"./file.mjs";import{getInstallCommand as n}from"./package-manager.mjs";import{pullTemplate as r}from"./template.mjs";import{log as i,outro as a,spinner as o}from"@clack/prompts";import{existsSync as s,rmSync as c}from"node:fs";import l from"node:path";import u from"node:process";async function d(s,d){let f=u.cwd(),p=l.resolve(f,d.projectName),m=d.projectName===`.`?l.basename(f):l.basename(p),h=o();if(!t(p)){if(!d.force)throw Error(`目标目录 ${p} 非空,请使用 --force 或选择空目录。`);h.start(`正在清理目标目录`),c(p,{recursive:!0,force:!0}),h.stop(`目标目录已清理`)}h.start(`正在拉取远程模板`);let g=await r(s,p,d.force,f);if(h.stop(`模板拉取完成`),d.git&&(h.start(`正在初始化 Git 仓库`),await e(`git`,[`init`],p),h.stop(`Git 仓库初始化完成`)),d.install){let t=n(d.packageManager);h.start(`正在安装依赖 (${d.packageManager})`),await e(t.command,t.args,p),h.stop(`依赖安装完成`)}let _=l.relative(f,p)||`.`,v=n(d.packageManager);i.success(`已创建 Funhub 项目: ${m}`),i.message(`来源: ${g.source}`),i.message(`类型: ${s}`),i.message(`目录: ${p}`),d.install||i.message(`安装依赖: ${v.command} ${v.args.join(` `)}`.trim()),a([`下一步:`,_===`.`?``:` cd ${_}`,d.install?``:` ${v.command} ${v.args.join(` `)}`.trimEnd(),s===`client`?` ${d.packageManager} dev`:``].filter(Boolean).join(`
3
+ `))}export{d as createProject};
@@ -0,0 +1,2 @@
1
+
2
+ import{existsSync as e,readdirSync as t}from"node:fs";function n(e){if(!e)return`项目名不能为空。`;if(!(e===`.`||e===`..`)&&!/^[\w.-]+$/.test(e))return`项目目录名仅支持字母、数字、点、中划线和下划线。`}function r(n){return e(n)?t(n).length===0:!0}export{r as isEmptyDirectory,n as validateProjectName};
@@ -0,0 +1,2 @@
1
+
2
+ import e from"node:process";import{detect as t}from"package-manager-detector";function n(e){switch(e){case`npm`:return{command:`npm`,args:[`install`]};case`yarn`:return{command:`yarn`,args:[`install`]};case`bun`:return{command:`bun`,args:[`install`]};default:return{command:`pnpm`,args:[`install`]}}}async function r(){let n=await t();if(n?.name===`npm`||n?.name===`pnpm`||n?.name===`yarn`||n?.name===`bun`)return n.name;let r=e.env.npm_config_user_agent||``;return r.startsWith(`npm/`)?`npm`:r.startsWith(`yarn/`)?`yarn`:r.startsWith(`bun/`)?`bun`:`pnpm`}export{r as detectPackageManager,n as getInstallCommand};
@@ -0,0 +1,2 @@
1
+
2
+ import{isEmptyDirectory as e,validateProjectName as t}from"./file.mjs";import{detectPackageManager as n}from"./package-manager.mjs";import{DEFAULT_PROJECT_NAME as r,DEFAULT_TEMPLATE_TYPE as i}from"./constants.mjs";import{validateTemplateType as a}from"./template.mjs";import{cancel as o,confirm as s,isCancel as c,select as l,text as u}from"@clack/prompts";import d from"node:process";function f(e){return c(e)&&(o(`已取消创建。`),d.exit(0)),e}async function p(e){return e||f(await l({message:`选择包管理器`,options:[{value:`pnpm`,label:`pnpm`},{value:`npm`,label:`npm`},{value:`yarn`,label:`yarn`},{value:`bun`,label:`bun`}],initialValue:await n()}))}async function m(e){if(e){let t=a(e);if(t)throw Error(t);return e}return f(await l({message:`选择创建类型`,options:[{value:`client`,label:`client`},{value:`sdk`,label:`sdk`}],initialValue:i}))}async function h(e){if(e){let n=e.trim(),r=t(n);if(r)throw Error(r);return n}return f(await u({message:`请输入项目目录名`,placeholder:r,defaultValue:r,validate(e){return t(e||``)}})).trim()}async function g(t,n=!1){if(t===`.`){if(e(t))return n;throw Error(`当前目录非空,暂不支持直接覆盖当前目录,请指定新的项目目录名或切换到空目录。`)}return e(t)||n?n:(f(await s({message:`目录 ${t} 已存在且非空,是否覆盖?`,initialValue:!1}))||(o(`已取消创建。`),d.exit(0)),!0)}export{g as resolveForceOverwrite,p as resolvePackageManager,h as resolveProjectName,m as resolveTemplateType};
@@ -0,0 +1,2 @@
1
+
2
+ import{TEMPLATE_BRANCH as e,TEMPLATE_HOST as t,TEMPLATE_REPO as n}from"./constants.mjs";import{downloadTemplate as r}from"giget";function i(e){if(!(e===`client`||e===`sdk`))return`创建类型仅支持 client 或 sdk。`}function a(e){return e}function o(t){return`funhub:${n}/${a(t)}#${e}`}function s(){return async n=>{let r=n.match(/^([\w.-]+\/[\w.-]+)(\/[^#]+)?(?:#([\w./@-]+))?$/),i=r?.[1]||``,a=r?.[2]||`/`,o=r?.[3]||e;if(!i)throw Error(`模板仓库配置无效。`);return{name:i.replace(`/`,`-`),version:o,subdir:a,url:`${t}/${i}/-/tree/${o}${a}`,tar:`${t}/${i}/-/archive/${o}.tar.gz`,headers:{"sec-fetch-mode":`same-origin`}}}}async function c(e,t,n,i){return r(o(e),{dir:t,force:n,forceClean:n,cwd:i,providers:{funhub:s()},registry:!1})}export{c as pullTemplate,i as validateTemplateType};
package/dist/cli.d.mts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { };
package/dist/cli.mjs ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+
3
+ import{createClient as e}from"./cli/init/create-client.mjs";import{createSdk as t}from"./cli/init/create-sdk.mjs";import{resolveForceOverwrite as n,resolvePackageManager as r,resolveProjectName as i,resolveTemplateType as a}from"./cli/init/shared/prompts.mjs";import{intro as o,log as s,outro as c}from"@clack/prompts";function l(e){let t={};for(let n=0;n<e.length;n+=1){let r=e[n];if(!r.startsWith(`-`)&&!t.projectName){t.projectName=r;continue}if(r===`--type`){t.templateType=e[n+1],n+=1;continue}if(r.startsWith(`--type=`)){t.templateType=r.split(`=`)[1];continue}if(r===`--pm`){t.packageManager=e[n+1],n+=1;continue}if(r.startsWith(`--pm=`)){t.packageManager=r.split(`=`)[1];continue}if(r===`--no-install`){t.install=!1;continue}if(r===`--install`){t.install=!0;continue}if(r===`--no-git`){t.git=!1;continue}if(r===`--git`){t.git=!0;continue}if(r===`--force`){t.force=!0;continue}(r===`-h`||r===`--help`)&&(t.help=!0)}return t}function u(){c([`用法:`,` npx @funhub/platform init [project-name] [options]`,``,`选项:`,` --type <client|sdk> 指定模板类型`,` --pm <pnpm|npm|yarn|bun> 指定包管理器`,` --install / --no-install 是否自动安装依赖`,` --git / --no-git 是否初始化 Git 仓库`,` --force 覆盖非空目录`].join(`
4
+ `))}async function d(o){let s=l(o);if(s.help){u();return}let c=await i(s.projectName),d=await n(c,s.force??!1),f=await a(s.templateType),p=await r(s.packageManager),m=s.install??!0,h=s.git??!0;if(f===`client`){await e({projectName:c,packageManager:p,install:m,git:h,force:d});return}await t({projectName:c,packageManager:p,install:m,git:h,force:d})}async function f(){let[e,...t]=process.argv.slice(2);if(!e||e===`-h`||e===`--help`||e===`help`){u();return}if(e!==`init`)throw Error(`暂不支持命令 ${e},请使用 init。`);o(`@funhub/platform`),await d(t)}f().catch(e=>{let t=e instanceof Error?e.message:`创建失败`;s.error(t),process.exit(1)});
@@ -3,6 +3,6 @@ import { defaultProps } from "./variants/basic-banner/defaults/default-props.mjs
3
3
  import { BasicBannerClient } from "./variants/basic-banner/runtime/client.mjs";
4
4
  import { schema } from "./variants/basic-banner/schema/index.mjs";
5
5
  import { basicBannerInspectorDefaultProps, basicBannerInspectorPropsSchema } from "./variants/basic-banner/inspector-schema.mjs";
6
- import { basicBannerMaterial } from "./variants/basic-banner/material.mjs";
7
6
  import { BasicBanner } from "./variants/basic-banner/server.mjs";
7
+ import { basicBannerMaterial } from "./variants/basic-banner/material.mjs";
8
8
  import "./variants/basic-banner/index.mjs";
@@ -3,5 +3,5 @@ import { defaultProps } from "./defaults/default-props.mjs";
3
3
  import { BasicBannerClient } from "./runtime/client.mjs";
4
4
  import { schema } from "./schema/index.mjs";
5
5
  import { basicBannerInspectorDefaultProps, basicBannerInspectorPropsSchema } from "./inspector-schema.mjs";
6
- import { basicBannerMaterial } from "./material.mjs";
7
- import { BasicBanner } from "./server.mjs";
6
+ import { BasicBanner } from "./server.mjs";
7
+ import { basicBannerMaterial } from "./material.mjs";
@@ -1,12 +1,34 @@
1
1
 
2
- import { InferSchemaProps } from "create-funhub/sdk";
2
+ import { InferSchemaProps, SchemaHasDefaultValue } from "../../../../../../utils/schema/schema.mjs";
3
+ import "../../../../../../utils.mjs";
4
+ import z$1 from "zod";
3
5
 
4
6
  //#region components/biz/business/banner/variants/basic-banner/inspector-schema.d.ts
5
7
  /**
6
8
  * 定义可以被低代码右侧 inspector 编辑的 props
7
9
  */
8
- declare const basicBannerInspectorPropsSchema: any;
9
- declare const basicBannerInspectorDefaultProps: any;
10
+ declare const basicBannerInspectorPropsSchema: z$1.ZodObject<{
11
+ interval: z$1.ZodNumber & SchemaHasDefaultValue;
12
+ list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
13
+ contentId: z$1.ZodOptional<z$1.ZodNumber>;
14
+ title: z$1.ZodOptional<z$1.ZodString>;
15
+ coverUrl: z$1.ZodOptional<z$1.ZodString>;
16
+ showViewCount: z$1.ZodOptional<z$1.ZodBoolean>;
17
+ }, z$1.core.$strip>>> & SchemaHasDefaultValue;
18
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
19
+ renderer: "renderer";
20
+ editor: "editor";
21
+ }>>;
22
+ }, z$1.core.$strip>;
23
+ declare const basicBannerInspectorDefaultProps: {
24
+ interval: number;
25
+ list: {
26
+ contentId?: number | undefined;
27
+ title?: string | undefined;
28
+ coverUrl?: string | undefined;
29
+ showViewCount?: boolean | undefined;
30
+ }[];
31
+ };
10
32
  type BasicBannerInspectorProps<T extends object = object> = InferSchemaProps<typeof basicBannerInspectorPropsSchema> & T;
11
33
  //#endregion
12
34
  export { BasicBannerInspectorProps, basicBannerInspectorDefaultProps, basicBannerInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- import{defaultProps as e}from"./defaults/default-props.mjs";import t from"zod";import{defineArrayItemPropSchema as n,defineComponentPropsSchema as r,defineNumberPropSchema as i,defineSwitchPropSchema as a,defineTextPropSchema as o,getSchemaDefaultProps as s}from"create-funhub/sdk";const c=r({interval:i({label:`播放间隔`,defaultValue:e.interval}),list:n(t.object({contentId:i({label:`内容ID`,required:!1}),title:o({label:`内容标题`,required:!1}),coverUrl:o({label:`封面`,required:!1}),showViewCount:a({label:`角标`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题一`,desc:`视频描述`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:2,title:`视频标题二`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:3,title:`视频标题三`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1}]})}),l=s(c);export{l as basicBannerInspectorDefaultProps,c as basicBannerInspectorPropsSchema};
2
+ import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineSwitchPropSchema as r,defineTextPropSchema as i,getSchemaDefaultProps as a}from"../../../../../../utils/schema/schema.mjs";import{defaultProps as o}from"./defaults/default-props.mjs";import s from"zod";const c=t({interval:n({label:`播放间隔`,defaultValue:o.interval}),list:e(s.object({contentId:n({label:`内容ID`,required:!1}),title:i({label:`内容标题`,required:!1}),coverUrl:i({label:`封面`,required:!1}),showViewCount:r({label:`角标`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题一`,desc:`视频描述`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:2,title:`视频标题二`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1},{contentId:3,title:`视频标题三`,coverUrl:`/static/components-resource/banner.png`,showViewCount:!1}]})}),l=a(c);export{l as basicBannerInspectorDefaultProps,c as basicBannerInspectorPropsSchema};
@@ -1,5 +1,24 @@
1
1
 
2
+ import { SchemaHasDefaultValue } from "../../../../../../utils/schema/schema.mjs";
3
+ import { DefineMaterialOption } from "../../../../../../utils/schema/material.mjs";
4
+ import "../../../../../../utils.mjs";
5
+ import { BasicBanner } from "./server.mjs";
6
+ import * as zod from "zod";
7
+ import * as zod_v4_core0 from "zod/v4/core";
8
+
2
9
  //#region components/biz/business/banner/variants/basic-banner/material.d.ts
3
- declare const basicBannerMaterial: any;
10
+ declare const basicBannerMaterial: DefineMaterialOption<typeof BasicBanner, typeof BasicBanner, zod.ZodObject<{
11
+ interval: zod.ZodNumber & SchemaHasDefaultValue;
12
+ list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
13
+ contentId: zod.ZodOptional<zod.ZodNumber>;
14
+ title: zod.ZodOptional<zod.ZodString>;
15
+ coverUrl: zod.ZodOptional<zod.ZodString>;
16
+ showViewCount: zod.ZodOptional<zod.ZodBoolean>;
17
+ }, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
18
+ mode: zod.ZodOptional<zod.ZodEnum<{
19
+ renderer: "renderer";
20
+ editor: "editor";
21
+ }>>;
22
+ }, zod_v4_core0.$strip>, "basic-banner", "内容组件">;
4
23
  //#endregion
5
24
  export { basicBannerMaterial };
@@ -1,2 +1,2 @@
1
1
 
2
- import{basicBannerInspectorPropsSchema as e}from"./inspector-schema.mjs";import{BasicBanner as t}from"./server.mjs";import{defineMaterial as n}from"create-funhub/sdk";const r=n({type:`basic-banner`,name:`基础轮播图`,icon:`/static/components-thumb/carousel_banner.png`,category:`内容组件`,serverComponent:t,clientComponent:t,propsSchema:e});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/carousel_banner.png`,category:`内容组件`,serverComponent:n,clientComponent:n,propsSchema:t});export{r as basicBannerMaterial};
@@ -1,8 +1,9 @@
1
1
 
2
2
  import { BaseComponentProps } from "../../../../../utils/types/component.mjs";
3
3
  import "../../../../../utils/index.mjs";
4
+ import { MaterialComponentMode } from "../../../../../../../utils/schema/schema.mjs";
5
+ import "../../../../../../../utils.mjs";
4
6
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
- import { MaterialComponentMode } from "create-funhub/sdk";
6
7
 
7
8
  //#region components/biz/business/banner/variants/basic-banner/runtime/client.d.ts
8
9
  declare function BasicBannerClient({
@@ -1,5 +1,27 @@
1
1
 
2
+ import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
3
+ import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
4
+ import "../../../../utils.mjs";
5
+ import { BannerCarousel } from "./server.mjs";
6
+ import * as zod from "zod";
7
+ import * as zod_v4_core0 from "zod/v4/core";
8
+
2
9
  //#region components/biz/business/banner-carousel/material.d.ts
3
- declare const BannerCarouselMaterial: any;
10
+ declare const BannerCarouselMaterial: DefineMaterialOption<typeof BannerCarousel, typeof BannerCarousel, zod.ZodObject<{
11
+ interval: zod.ZodNumber & SchemaHasDefaultValue;
12
+ list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
13
+ contentId: zod.ZodOptional<zod.ZodNumber>;
14
+ title: zod.ZodOptional<zod.ZodString>;
15
+ coverUrl: zod.ZodOptional<zod.ZodString>;
16
+ badgeUrl: zod.ZodOptional<zod.ZodString>;
17
+ showPlayCount: zod.ZodOptional<zod.ZodBoolean>;
18
+ showEpisodeCount: zod.ZodOptional<zod.ZodBoolean>;
19
+ target: zod.ZodOptional<zod.ZodString>;
20
+ }, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
21
+ mode: zod.ZodOptional<zod.ZodEnum<{
22
+ renderer: "renderer";
23
+ editor: "editor";
24
+ }>>;
25
+ }, zod_v4_core0.$strip>, "banner-carousel", "内容组件">;
4
26
  //#endregion
5
27
  export { BannerCarouselMaterial };
@@ -1,2 +1,2 @@
1
1
 
2
- import{basicBannerInspectorPropsSchema as e}from"./schema.mjs";import{BannerCarousel as t}from"./server.mjs";import{defineMaterial as n}from"create-funhub/sdk";const r=n({type:`banner-carousel`,name:`基础轮播图`,icon:`/static/components-thumb/carousel_banner.png`,category:`内容组件`,serverComponent:t,clientComponent:t,propsSchema:e});export{r as BannerCarouselMaterial};
2
+ import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import{basicBannerInspectorPropsSchema as t}from"./schema.mjs";import{BannerCarousel as n}from"./server.mjs";const r=e({type:`banner-carousel`,name:`基础轮播图`,icon:`/static/components-thumb/carousel_banner.png`,category:`内容组件`,serverComponent:n,clientComponent:n,propsSchema:t});export{r as BannerCarouselMaterial};
@@ -0,0 +1,28 @@
1
+
2
+ import { InferSchemaProps, SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
3
+ import "../../../../utils.mjs";
4
+ import z$1 from "zod";
5
+
6
+ //#region components/biz/business/banner-carousel/schema.d.ts
7
+ /**
8
+ * 定义可以被低代码右侧 inspector 编辑的 props
9
+ */
10
+ declare const basicBannerInspectorPropsSchema: z$1.ZodObject<{
11
+ interval: z$1.ZodNumber & SchemaHasDefaultValue;
12
+ list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
13
+ contentId: z$1.ZodOptional<z$1.ZodNumber>;
14
+ title: z$1.ZodOptional<z$1.ZodString>;
15
+ coverUrl: z$1.ZodOptional<z$1.ZodString>;
16
+ badgeUrl: z$1.ZodOptional<z$1.ZodString>;
17
+ showPlayCount: z$1.ZodOptional<z$1.ZodBoolean>;
18
+ showEpisodeCount: z$1.ZodOptional<z$1.ZodBoolean>;
19
+ target: z$1.ZodOptional<z$1.ZodString>;
20
+ }, z$1.core.$strip>>> & SchemaHasDefaultValue;
21
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
22
+ renderer: "renderer";
23
+ editor: "editor";
24
+ }>>;
25
+ }, z$1.core.$strip>;
26
+ type BasicBannerInspectorProps<T extends object = object> = InferSchemaProps<typeof basicBannerInspectorPropsSchema> & T;
27
+ //#endregion
28
+ export { BasicBannerInspectorProps };
@@ -1,2 +1,2 @@
1
1
 
2
- import{defaultProps as e}from"./default-props.mjs";import t from"zod";import{defineArrayItemPropSchema as n,defineComponentPropsSchema as r,defineNumberPropSchema as i,defineSwitchPropSchema as a,defineTextPropSchema as o,getSchemaDefaultProps as s}from"create-funhub/sdk";const c=r({interval:i({label:`播放间隔`,defaultValue:e.interval}),list:n(t.object({contentId:i({label:`内容ID`,required:!1}),title:o({label:`内容标题`,required:!1}),coverUrl:o({label:`封面`,required:!1}),badgeUrl:o({label:`角标`,required:!1}),showPlayCount:a({label:`展示播放量`,required:!1}),showEpisodeCount:a({label:`展示集数`,required:!1}),target:o({label:`跳转地址`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题一`,desc:`视频描述`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``},{contentId:2,title:`视频标题二`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``},{contentId:3,title:`视频标题三`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``}]})});s(c);export{c as basicBannerInspectorPropsSchema};
2
+ import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineNumberPropSchema as n,defineSwitchPropSchema as r,defineTextPropSchema as i,getSchemaDefaultProps as a}from"../../../../utils/schema/schema.mjs";import{defaultProps as o}from"./default-props.mjs";import s from"zod";const c=t({interval:n({label:`播放间隔`,defaultValue:o.interval}),list:e(s.object({contentId:n({label:`内容ID`,required:!1}),title:i({label:`内容标题`,required:!1}),coverUrl:i({label:`封面`,required:!1}),badgeUrl:i({label:`角标`,required:!1}),showPlayCount:r({label:`展示播放量`,required:!1}),showEpisodeCount:r({label:`展示集数`,required:!1}),target:i({label:`跳转地址`,required:!1})}),{required:!1,label:`list`,defaultValue:[{contentId:1,title:`视频标题一`,desc:`视频描述`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``},{contentId:2,title:`视频标题二`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``},{contentId:3,title:`视频标题三`,coverUrl:`/static/components-resource/banner.png`,badgeUrl:``,showPlayCount:!1,showEpisodeCount:!1,target:``}]})});a(c);export{c as basicBannerInspectorPropsSchema};
@@ -0,0 +1,18 @@
1
+
2
+ import { BasicBannerInspectorProps } from "./schema.mjs";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region components/biz/business/banner-carousel/server.d.ts
6
+ /** BasicBanner 物料组件 props(inspector 可编辑字段 + 可选数据) */
7
+ type BasicBannerProps = BasicBannerInspectorProps & {
8
+ /** 轮播数据,未传入时使用 mock 数据 */data?: {
9
+ list: Array<Record<string, unknown>>;
10
+ };
11
+ };
12
+ /**
13
+ * BasicBanner 物料组件
14
+ * 接收 inspector 可编辑的 props,转换为 BaseComponentProps 传给 runtime client
15
+ */
16
+ declare function BannerCarousel(props: BasicBannerProps): react_jsx_runtime0.JSX.Element;
17
+ //#endregion
18
+ export { BannerCarousel };
@@ -0,0 +1,8 @@
1
+
2
+ import { ChannelListProps } from "./schema.mjs";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region components/biz/business/channel-list/client.d.ts
6
+ declare function BasicChannelListClient(props: ChannelListProps): react_jsx_runtime0.JSX.Element;
7
+ //#endregion
8
+ export { BasicChannelListClient };
@@ -1,5 +1,23 @@
1
1
 
2
+ import { SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
3
+ import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
4
+ import "../../../../utils.mjs";
5
+ import { BasicChannelListClient } from "./client.mjs";
6
+ import * as zod from "zod";
7
+ import * as zod_v4_core0 from "zod/v4/core";
8
+
2
9
  //#region components/biz/business/channel-list/material.d.ts
3
- declare const channelListMaterial: any;
10
+ declare const channelListMaterial: DefineMaterialOption<typeof BasicChannelListClient, typeof BasicChannelListClient, zod.ZodObject<{
11
+ modifiable: zod.ZodBoolean & SchemaHasDefaultValue;
12
+ list: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
13
+ name: zod.ZodOptional<zod.ZodString>;
14
+ icon: zod.ZodOptional<zod.ZodString>;
15
+ isDefault: zod.ZodOptional<zod.ZodBoolean>;
16
+ }, zod_v4_core0.$strip>>> & SchemaHasDefaultValue;
17
+ mode: zod.ZodOptional<zod.ZodEnum<{
18
+ renderer: "renderer";
19
+ editor: "editor";
20
+ }>>;
21
+ }, zod_v4_core0.$strip>, "channel-list", "内容组件">;
4
22
  //#endregion
5
23
  export { channelListMaterial };
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"./client.mjs";import{channelListInspectorPropsSchema as t}from"./schema.mjs";import{defineMaterial as n}from"create-funhub/sdk";const r=n({type:`channel-list`,name:`频道`,icon:`/static/components-thumb/channel_list_editable.png`,category:`内容组件`,serverComponent:e,clientComponent:e,propsSchema:t});export{r as channelListMaterial};
2
+ import{defineMaterial as e}from"../../../../utils/schema/material.mjs";import t from"./client.mjs";import{channelListInspectorPropsSchema as n}from"./schema.mjs";const r=e({type:`channel-list`,name:`频道`,icon:`/static/components-thumb/channel_list_editable.png`,category:`内容组件`,serverComponent:t,clientComponent:t,propsSchema:n});export{r as channelListMaterial};
@@ -0,0 +1,30 @@
1
+
2
+ import { BaseComponentProps } from "../../utils/types/component.mjs";
3
+ import "../../utils/index.mjs";
4
+ import { InferSchemaProps, SchemaHasDefaultValue } from "../../../../utils/schema/schema.mjs";
5
+ import "../../../../utils.mjs";
6
+ import z$1 from "zod";
7
+
8
+ //#region components/biz/business/channel-list/schema.d.ts
9
+ /**
10
+ * 定义可以被低代码右侧inspector编辑的props
11
+ */
12
+ declare const channelListInspectorPropsSchema: z$1.ZodObject<{
13
+ modifiable: z$1.ZodBoolean & SchemaHasDefaultValue;
14
+ list: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
15
+ name: z$1.ZodOptional<z$1.ZodString>;
16
+ icon: z$1.ZodOptional<z$1.ZodString>;
17
+ isDefault: z$1.ZodOptional<z$1.ZodBoolean>;
18
+ }, z$1.core.$strip>>> & SchemaHasDefaultValue;
19
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
20
+ renderer: "renderer";
21
+ editor: "editor";
22
+ }>>;
23
+ }, z$1.core.$strip>;
24
+ type ChannelListInspectorProps<T extends object = object> = InferSchemaProps<typeof channelListInspectorPropsSchema> & BaseComponentProps;
25
+ /**
26
+ * 基于ButtonInspectorProps再派生出组件真正的props(因为不是所有props都需要被编辑,比如说下面的children就不需要,但是button组件又需要传入children)
27
+ */
28
+ type ChannelListProps = ChannelListInspectorProps;
29
+ //#endregion
30
+ export { ChannelListProps };
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"zod";import{defineArrayItemPropSchema as t,defineComponentPropsSchema as n,defineSwitchPropSchema as r,defineTextPropSchema as i,getSchemaDefaultProps as a}from"create-funhub/sdk";const o=n({modifiable:r({label:`自定义频道`,defaultValue:!0}),list:t(e.object({name:i({label:`内容标题`,required:!1}),icon:i({label:`图标`,required:!1}),isDefault:r({label:`是否默认频道`,required:!1})}),{required:!1,label:`list`,defaultValue:[{name:`频道名称`,icon:``,isDefault:!0}]})});a(o);export{o as channelListInspectorPropsSchema};
2
+ import{defineArrayItemPropSchema as e,defineComponentPropsSchema as t,defineSwitchPropSchema as n,defineTextPropSchema as r,getSchemaDefaultProps as i}from"../../../../utils/schema/schema.mjs";import a from"zod";const o=t({modifiable:n({label:`自定义频道`,defaultValue:!0}),list:e(a.object({name:r({label:`内容标题`,required:!1}),icon:r({label:`图标`,required:!1}),isDefault:n({label:`是否默认频道`,required:!1})}),{required:!1,label:`list`,defaultValue:[{name:`频道名称`,icon:``,isDefault:!0}]})});i(o);export{o as channelListInspectorPropsSchema};
@@ -1,8 +1,81 @@
1
1
 
2
+ import { VideoDetailPlayerClient } from "../video-detail-player/client.mjs";
3
+ import { VideoDetailPlayer } from "../video-detail-player/server.mjs";
4
+ import "../video-detail-player/index.mjs";
5
+ import { VideoDetailInfoClient } from "../video-detail-info/client.mjs";
6
+ import { VideoDetailInfo } from "../video-detail-info/server.mjs";
7
+ import "../video-detail-info/index.mjs";
8
+ import { VideoDetailInfoTitleTagsEpisodesClient } from "../video-detail-info-title-tags-episodes/client.mjs";
9
+ import { VideoDetailInfoTitleTagsEpisodes } from "../video-detail-info-title-tags-episodes/server.mjs";
10
+ import "../video-detail-info-title-tags-episodes/index.mjs";
11
+ import { VideoDetailActionsClient } from "../video-detail-actions/client.mjs";
12
+ import { VideoDetailActions } from "../video-detail-actions/server.mjs";
13
+ import "../video-detail-actions/index.mjs";
14
+ import { VideoDetailRecommendClient } from "../video-detail-recommend/client.mjs";
15
+ import { VideoDetailRecommend } from "../video-detail-recommend/server.mjs";
16
+ import "../video-detail-recommend/index.mjs";
17
+ import { SchemaHasDefaultValue } from "../../../../../utils/schema/schema.mjs";
18
+ import { DefineMaterialOption } from "../../../../../utils/schema/material.mjs";
19
+ import { MaterialMap } from "../../../../../utils/schema/utils.mjs";
20
+ import "../../../../../utils.mjs";
2
21
  import z$1 from "zod";
3
- import { InferSchemaProps } from "create-funhub/sdk";
4
22
 
5
23
  //#region components/biz/business/detail/shared/registry.d.ts
6
- declare const videoDetailMaterials: any;
24
+ declare const videoDetailMaterials: MaterialMap<readonly [DefineMaterialOption<typeof VideoDetailPlayer, typeof VideoDetailPlayerClient, z$1.ZodObject<{
25
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
26
+ renderer: "renderer";
27
+ editor: "editor";
28
+ }>>;
29
+ }, z$1.core.$strip>, "video-detail-player", "视频模块">, DefineMaterialOption<typeof VideoDetailInfo, typeof VideoDetailInfoClient, z$1.ZodObject<{
30
+ showTags: z$1.ZodBoolean & SchemaHasDefaultValue;
31
+ showEpisodes: z$1.ZodBoolean & SchemaHasDefaultValue;
32
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
33
+ renderer: "renderer";
34
+ editor: "editor";
35
+ }>>;
36
+ }, z$1.core.$strip>, "video-detail-info", "内容组件">, DefineMaterialOption<typeof VideoDetailInfoTitleTagsEpisodes, typeof VideoDetailInfoTitleTagsEpisodesClient, z$1.ZodObject<{
37
+ showTags: z$1.ZodBoolean & SchemaHasDefaultValue;
38
+ showEpisodes: z$1.ZodBoolean & SchemaHasDefaultValue;
39
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
40
+ renderer: "renderer";
41
+ editor: "editor";
42
+ }>>;
43
+ }, z$1.core.$strip>, "video-detail-info-title-tags-episodes", "内容组件">, DefineMaterialOption<typeof VideoDetailActions, typeof VideoDetailActionsClient, z$1.ZodObject<{
44
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
45
+ renderer: "renderer";
46
+ editor: "editor";
47
+ }>>;
48
+ }, z$1.core.$strip>, "video-detail-actions", "行为组件">, DefineMaterialOption<typeof VideoDetailRecommend, typeof VideoDetailRecommendClient, z$1.ZodObject<{
49
+ rows: z$1.ZodNumber & SchemaHasDefaultValue;
50
+ columns: z$1.ZodNumber & SchemaHasDefaultValue;
51
+ smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
52
+ title: z$1.ZodString & SchemaHasDefaultValue;
53
+ showPlayCount: z$1.ZodBoolean & SchemaHasDefaultValue;
54
+ playCountDelta: z$1.ZodNumber & SchemaHasDefaultValue;
55
+ showEpisode: z$1.ZodBoolean & SchemaHasDefaultValue;
56
+ enableInfinite: z$1.ZodBoolean & SchemaHasDefaultValue;
57
+ smartTagIds: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
58
+ items: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
59
+ contentId: z$1.ZodString;
60
+ coverMode: z$1.ZodOptional<z$1.ZodEnum<{
61
+ content: "content";
62
+ upload: "upload";
63
+ }>>;
64
+ coverUrl: z$1.ZodOptional<z$1.ZodString>;
65
+ titleMode: z$1.ZodOptional<z$1.ZodEnum<{
66
+ content: "content";
67
+ custom: "custom";
68
+ }>>;
69
+ title: z$1.ZodOptional<z$1.ZodString>;
70
+ description: z$1.ZodOptional<z$1.ZodString>;
71
+ showPlayCount: z$1.ZodOptional<z$1.ZodBoolean>;
72
+ playCountDelta: z$1.ZodOptional<z$1.ZodNumber>;
73
+ showEpisode: z$1.ZodOptional<z$1.ZodBoolean>;
74
+ }, z$1.core.$strip>>>;
75
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
76
+ renderer: "renderer";
77
+ editor: "editor";
78
+ }>>;
79
+ }, z$1.core.$strip>, "video-detail-recommend", "详情页">]>;
7
80
  //#endregion
8
81
  export { videoDetailMaterials };
@@ -1,2 +1,2 @@
1
1
 
2
- import{videoDetailInfoMaterial as e}from"../video-detail-info/material.mjs";import{videoDetailInfoTitleTagsEpisodesMaterial as t}from"../video-detail-info-title-tags-episodes/material.mjs";import{videoDetailPlayerMaterial as n}from"../video-detail-player/material.mjs";import{videoDetailRecommendMaterial as r}from"../video-detail-recommend/material.mjs";import{videoDetailActionsMaterial as i}from"../video-detail-actions/material.mjs";import{generateMaterialMap as a,getSchemaDefaultProps as o}from"create-funhub/sdk";function s(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>typeof t==`number`&&Number.isFinite(t)?[e,String(t)]:[e,t]))}function c(e,t){let n={...o(e.propsSchema),...t??{}},r=e.propsSchema.safeParse(n);if(r.success)return{isValid:!0,props:r.data};let i=s(n),a=e.propsSchema.safeParse(i);return a.success?{isValid:!0,props:a.data}:{isValid:!1,props:n}}const l=a([n,e,t,i,r]);export{c as resolveMaterialProps,l as videoDetailMaterials};
2
+ import{getSchemaDefaultProps as e}from"../../../../../utils/schema/schema.mjs";import{generateMaterialMap as t}from"../../../../../utils/schema/utils.mjs";import{videoDetailInfoMaterial as n}from"../video-detail-info/material.mjs";import{videoDetailInfoTitleTagsEpisodesMaterial as r}from"../video-detail-info-title-tags-episodes/material.mjs";import{videoDetailPlayerMaterial as i}from"../video-detail-player/material.mjs";import{videoDetailRecommendMaterial as a}from"../video-detail-recommend/material.mjs";import{videoDetailActionsMaterial as o}from"../video-detail-actions/material.mjs";function s(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>typeof t==`number`&&Number.isFinite(t)?[e,String(t)]:[e,t]))}function c(t,n){let r={...e(t.propsSchema),...n??{}},i=t.propsSchema.safeParse(r);if(i.success)return{isValid:!0,props:i.data};let a=s(r),o=t.propsSchema.safeParse(a);return o.success?{isValid:!0,props:o.data}:{isValid:!1,props:r}}const l=t([i,n,r,o,a]);export{c as resolveMaterialProps,l as videoDetailMaterials};
@@ -1,3 +1,13 @@
1
1
 
2
- import "./schema.mjs";
3
- import "react/jsx-runtime";
2
+ import { VideoDetailActionsProps } from "./schema.mjs";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region components/biz/business/detail/video-detail-actions/client.d.ts
6
+ /**
7
+ * 视频详情行为模块客户端组件。
8
+ */
9
+ declare function VideoDetailActionsClient({
10
+ mode
11
+ }: VideoDetailActionsProps): react_jsx_runtime0.JSX.Element | null;
12
+ //#endregion
13
+ export { VideoDetailActionsClient };
@@ -1,5 +1,5 @@
1
1
 
2
- import "./schema.mjs";
3
- import "./client.mjs";
4
- import { videoDetailActionsMaterial } from "./material.mjs";
5
- import "./server.mjs";
2
+ import { VideoDetailActionsInspectorProps, VideoDetailActionsProps, videoDetailActionsInspectorPropsSchema } from "./schema.mjs";
3
+ import { VideoDetailActionsClient } from "./client.mjs";
4
+ import { VideoDetailActions } from "./server.mjs";
5
+ import { videoDetailActionsMaterial } from "./material.mjs";
@@ -1,5 +1,17 @@
1
1
 
2
+ import { VideoDetailActionsClient } from "./client.mjs";
3
+ import { VideoDetailActions } from "./server.mjs";
4
+ import { DefineMaterialOption } from "../../../../../utils/schema/material.mjs";
5
+ import "../../../../../utils.mjs";
6
+ import * as zod from "zod";
7
+ import * as zod_v4_core0 from "zod/v4/core";
8
+
2
9
  //#region components/biz/business/detail/video-detail-actions/material.d.ts
3
- declare const videoDetailActionsMaterial: any;
10
+ declare const videoDetailActionsMaterial: DefineMaterialOption<typeof VideoDetailActions, typeof VideoDetailActionsClient, zod.ZodObject<{
11
+ mode: zod.ZodOptional<zod.ZodEnum<{
12
+ renderer: "renderer";
13
+ editor: "editor";
14
+ }>>;
15
+ }, zod_v4_core0.$strip>, "video-detail-actions", "行为组件">;
4
16
  //#endregion
5
17
  export { videoDetailActionsMaterial };
@@ -1,2 +1,2 @@
1
1
 
2
- import{VideoDetailActionsClient as e}from"./client.mjs";import{videoDetailActionsInspectorPropsSchema as t}from"./schema.mjs";import{VideoDetailActions as n}from"./server.mjs";import{defineMaterial as r}from"create-funhub/sdk";const i=r({type:`video-detail-actions`,name:`行为模块`,icon:`/static/components-thumb/interaction_actions_default.png`,category:`行为组件`,serverComponent:n,clientComponent:e,propsSchema:t});export{i 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:`行为模块`,icon:`/static/components-thumb/interaction_actions_default.png`,category:`行为组件`,serverComponent:r,clientComponent:t,propsSchema:n});export{i as videoDetailActionsMaterial};