@funhub/platform 0.1.38 → 0.1.41

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 (169) hide show
  1. package/README.md +6 -0
  2. package/dist/common.d.mts +1 -2
  3. package/dist/common.mjs +1 -1
  4. package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +4 -0
  5. package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +4 -0
  6. package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.d.mts +6 -1
  7. package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
  8. package/dist/components/biz/business/banner/variants/basic-banner/server.mjs +1 -1
  9. package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
  10. package/dist/components/biz/business/banner-carousel/material.d.mts +4 -0
  11. package/dist/components/biz/business/banner-carousel/schema.d.mts +4 -0
  12. package/dist/components/biz/business/banner-carousel/server.mjs +1 -1
  13. package/dist/components/biz/business/channel-list/client.mjs +1 -1
  14. package/dist/components/biz/business/channel-list/material.d.mts +4 -0
  15. package/dist/components/biz/business/channel-list/schema.d.mts +4 -0
  16. package/dist/components/biz/business/detail/detail-operate.mjs +1 -1
  17. package/dist/components/biz/business/detail/materials/registry.d.mts +30 -3
  18. package/dist/components/biz/business/detail/materials/video-detail-actions/client.d.mts +2 -1
  19. package/dist/components/biz/business/detail/materials/video-detail-actions/client.mjs +1 -1
  20. package/dist/components/biz/business/detail/materials/video-detail-actions/material.d.mts +6 -1
  21. package/dist/components/biz/business/detail/materials/video-detail-actions/schema.d.mts +6 -1
  22. package/dist/components/biz/business/detail/materials/video-detail-actions/server.mjs +1 -1
  23. package/dist/components/biz/business/detail/materials/video-detail-info/client.d.mts +2 -1
  24. package/dist/components/biz/business/detail/materials/video-detail-info/client.mjs +1 -1
  25. package/dist/components/biz/business/detail/materials/video-detail-info/material.d.mts +4 -0
  26. package/dist/components/biz/business/detail/materials/video-detail-info/schema.d.mts +4 -0
  27. package/dist/components/biz/business/detail/materials/video-detail-info/server.mjs +1 -1
  28. package/dist/components/biz/business/detail/materials/video-detail-info-title/client.d.mts +2 -1
  29. package/dist/components/biz/business/detail/materials/video-detail-info-title/client.mjs +1 -1
  30. package/dist/components/biz/business/detail/materials/video-detail-info-title/material.d.mts +6 -1
  31. package/dist/components/biz/business/detail/materials/video-detail-info-title/schema.d.mts +6 -1
  32. package/dist/components/biz/business/detail/materials/video-detail-info-title/server.mjs +1 -1
  33. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.d.mts +2 -1
  34. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/client.mjs +1 -1
  35. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.d.mts +4 -0
  36. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.d.mts +4 -0
  37. package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/server.mjs +1 -1
  38. package/dist/components/biz/business/detail/materials/video-detail-player/client.d.mts +2 -1
  39. package/dist/components/biz/business/detail/materials/video-detail-player/client.mjs +1 -1
  40. package/dist/components/biz/business/detail/materials/video-detail-player/material.d.mts +6 -1
  41. package/dist/components/biz/business/detail/materials/video-detail-player/schema.d.mts +6 -1
  42. package/dist/components/biz/business/detail/materials/video-detail-player/server.mjs +1 -1
  43. package/dist/components/biz/business/detail/materials/video-detail-recommend/client.d.mts +2 -1
  44. package/dist/components/biz/business/detail/materials/video-detail-recommend/client.mjs +1 -1
  45. package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +4 -0
  46. package/dist/components/biz/business/detail/materials/video-detail-recommend/schema.d.mts +4 -0
  47. package/dist/components/biz/business/detail/materials/video-detail-recommend/server.mjs +1 -1
  48. package/dist/components/biz/business/detail/video-hero.mjs +1 -1
  49. package/dist/components/biz/business/floating-ball/client.mjs +1 -1
  50. package/dist/components/biz/business/floating-ball/material.d.mts +4 -0
  51. package/dist/components/biz/business/floating-ball/schema.d.mts +4 -0
  52. package/dist/components/biz/business/floating-ball/server.mjs +1 -1
  53. package/dist/components/biz/business/header-search/header-avatar-icon/client.d.mts +3 -1
  54. package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +1 -1
  55. package/dist/components/biz/business/header-search/header-avatar-icon/material.d.mts +6 -1
  56. package/dist/components/biz/business/header-search/header-avatar-icon/schema.d.mts +6 -1
  57. package/dist/components/biz/business/header-search/header-avatar-icon/server.mjs +1 -1
  58. package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -1
  59. package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +4 -0
  60. package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +4 -0
  61. package/dist/components/biz/business/header-search/header-avatar-logo-search/server.mjs +1 -1
  62. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +1 -1
  63. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +4 -0
  64. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts +4 -0
  65. package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/server.mjs +1 -1
  66. package/dist/components/biz/business/header-search/header-logo-search/client.mjs +1 -1
  67. package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +4 -0
  68. package/dist/components/biz/business/header-search/header-logo-search/schema.d.mts +4 -0
  69. package/dist/components/biz/business/header-search/header-logo-search/server.mjs +1 -1
  70. package/dist/components/biz/business/header-search/header-search/client.d.mts +3 -1
  71. package/dist/components/biz/business/header-search/header-search/client.mjs +1 -1
  72. package/dist/components/biz/business/header-search/header-search/material.d.mts +6 -1
  73. package/dist/components/biz/business/header-search/header-search/schema.d.mts +6 -1
  74. package/dist/components/biz/business/header-search/header-search/server.mjs +1 -1
  75. package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
  76. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/inspector-schema.d.mts +4 -0
  77. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.d.mts +4 -0
  78. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.d.mts +8 -1
  79. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/runtime/client.mjs +1 -1
  80. package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/server.mjs +1 -1
  81. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/inspector-schema.d.mts +4 -0
  82. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.d.mts +4 -0
  83. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.d.mts +8 -1
  84. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/runtime/client.mjs +1 -1
  85. package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/server.mjs +1 -1
  86. package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
  87. package/dist/components/biz/business/large-feature-grid/client.d.mts +15 -0
  88. package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
  89. package/dist/components/biz/business/large-feature-grid/material.d.mts +34 -4
  90. package/dist/components/biz/business/large-feature-grid/schema.d.mts +42 -0
  91. package/dist/components/biz/business/large-feature-grid/server.d.mts +15 -0
  92. package/dist/components/biz/business/large-feature-grid/server.mjs +1 -1
  93. package/dist/components/biz/business/marquee/client.mjs +1 -1
  94. package/dist/components/biz/business/marquee/material.d.mts +4 -0
  95. package/dist/components/biz/business/marquee/schema.d.mts +4 -0
  96. package/dist/components/biz/business/marquee/server.mjs +1 -1
  97. package/dist/components/biz/business/profile/profile-header/client.d.mts +2 -1
  98. package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
  99. package/dist/components/biz/business/profile/profile-header/material.d.mts +18 -2
  100. package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
  101. package/dist/components/biz/business/profile/profile-header/schema.d.mts +7 -2
  102. package/dist/components/biz/business/profile/profile-header/server.d.mts +4 -1
  103. package/dist/components/biz/business/profile/profile-header/server.mjs +1 -1
  104. package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
  105. package/dist/components/biz/business/profile/profile-main/client.d.mts +2 -1
  106. package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
  107. package/dist/components/biz/business/profile/profile-main/material.d.mts +6 -1
  108. package/dist/components/biz/business/profile/profile-main/schema.d.mts +7 -2
  109. package/dist/components/biz/business/profile/profile-main/server.mjs +1 -1
  110. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.d.mts +5 -0
  111. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -1
  112. package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/server.mjs +1 -1
  113. package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.d.mts +5 -0
  114. package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -1
  115. package/dist/components/biz/business/profile/profile-main/tabs/history-tab/server.mjs +1 -1
  116. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +5 -0
  117. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -1
  118. package/dist/components/biz/business/profile/profile-main/tabs/like-tab/server.mjs +1 -1
  119. package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.d.mts +5 -0
  120. package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.mjs +1 -1
  121. package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/server.mjs +1 -1
  122. package/dist/components/biz/business/search-history/client.mjs +1 -1
  123. package/dist/components/biz/business/search-history/material.d.mts +4 -0
  124. package/dist/components/biz/business/search-history/schema.d.mts +4 -0
  125. package/dist/components/biz/business/search-history/server.mjs +1 -1
  126. package/dist/components/biz/business/search-input/client.mjs +1 -1
  127. package/dist/components/biz/business/search-input/material.d.mts +4 -0
  128. package/dist/components/biz/business/search-input/schema.d.mts +4 -0
  129. package/dist/components/biz/business/search-input/server.mjs +1 -1
  130. package/dist/components/biz/business/shortcut-grid/client.mjs +1 -1
  131. package/dist/components/biz/business/shortcut-grid/material.d.mts +4 -0
  132. package/dist/components/biz/business/shortcut-grid/schema.d.mts +4 -0
  133. package/dist/components/biz/business/shortcut-grid/server.mjs +1 -1
  134. package/dist/components/biz/business/tab-bar/client.mjs +1 -1
  135. package/dist/components/biz/business/tab-bar/material.d.mts +9 -1
  136. package/dist/components/biz/business/tab-bar/schema.d.mts +9 -1
  137. package/dist/components/biz/business/tab-bar/server.mjs +1 -1
  138. package/dist/components/biz/business/text-recommend/client.mjs +1 -1
  139. package/dist/components/biz/business/text-recommend/material.d.mts +4 -0
  140. package/dist/components/biz/business/text-recommend/schema.d.mts +4 -0
  141. package/dist/components/biz/business/text-recommend/server.mjs +1 -1
  142. package/dist/components/biz/business/video-horizontal-list/client.mjs +1 -1
  143. package/dist/components/biz/business/video-horizontal-list/material.d.mts +4 -0
  144. package/dist/components/biz/business/video-horizontal-list/schema.d.mts +4 -0
  145. package/dist/components/biz/business/video-horizontal-list/server.mjs +1 -1
  146. package/dist/components/biz/example/button/client.mjs +1 -1
  147. package/dist/components/biz/example/button/material.d.mts +4 -0
  148. package/dist/components/biz/example/button/schema.d.mts +4 -0
  149. package/dist/components/biz/example/button/server.d.mts +4 -1
  150. package/dist/components/biz/example/button/server.mjs +1 -1
  151. package/dist/components/ui/badge.d.mts +1 -1
  152. package/dist/components/ui/button.d.mts +2 -2
  153. package/dist/hooks.d.mts +1 -4
  154. package/dist/hooks.mjs +1 -1
  155. package/dist/utils/schema/index.d.mts +1 -1
  156. package/dist/utils/schema/material.d.mts +3 -2
  157. package/dist/utils/schema/schema.d.mts +18 -3
  158. package/dist/utils/schema/schema.mjs +1 -1
  159. package/dist/utils.d.mts +2 -2
  160. package/package.json +1 -1
  161. package/dist/components/common/app-context/index.d.mts +0 -19
  162. package/dist/components/common/app-context/index.mjs +0 -2
  163. package/dist/components/common/app-context/provider.mjs +0 -2
  164. package/dist/hooks/app-context.d.mts +0 -20
  165. package/dist/hooks/app-context.mjs +0 -2
  166. package/dist/hooks/get-app-context.d.mts +0 -19
  167. package/dist/hooks/get-app-context.mjs +0 -2
  168. package/dist/hooks/use-app-context/index.d.mts +0 -14
  169. package/dist/hooks/use-app-context/index.mjs +0 -2
@@ -1,4 +1,6 @@
1
1
 
2
+ import { MaterialComponentMode } from "../../../../../../../utils/schema/schema.mjs";
3
+ import "../../../../../../../utils/schema/index.mjs";
2
4
  import * as react_jsx_runtime0 from "react/jsx-runtime";
3
5
 
4
6
  //#region components/biz/business/profile/profile-main/tabs/publish-tab/client.d.ts
@@ -9,6 +11,8 @@ interface PublishTabUserInfo {
9
11
  avatar?: string;
10
12
  }
11
13
  interface PublishTabProps {
14
+ /** 渲染模式。 */
15
+ mode?: MaterialComponentMode;
12
16
  /** 目标用户 ID。 */
13
17
  targetUserId?: string;
14
18
  /** Query Key 前缀 */
@@ -22,6 +26,7 @@ interface PublishTabProps {
22
26
  * 发布内容 Tab 页。
23
27
  */
24
28
  declare function PublishTab({
29
+ mode,
25
30
  targetUserId: _targetUserId,
26
31
  queryKeyPrefix,
27
32
  isMine
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{pCommunityDeleteContent as e}from"../../../../../../../service/generated/client.mjs";import{useDeleteRequest as t,useMutation as n,usePaginated as r,useUpdateRequest as i}from"../../../../../../../hooks/query/use-query.mjs";import{useAppContext as a}from"../../../../../../../hooks/use-app-context/index.mjs";import{DeleteConfirmDialog as o}from"../../../../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{UserActivityList as s}from"../../../../../../common/list/user-activity-list/user-activity-list.mjs";import{useState as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";import{toast as f}from"sonner";import{useTranslations as p}from"next-intl";function m(e,t,n){if(!e)return e;let r=0,i=e.pages.map(e=>({page:e,filteredList:(e.data?.list??[]).filter(e=>{let i=n(e)??``,a=t.has(i);return a&&(r+=1),!a})}));return{...e,pages:i.map(({page:e,filteredList:t})=>{if(!e.data)return e;let n=typeof e.data.total==`number`?Math.max(0,e.data.total-r):e.data.total;return{...e,data:{...e.data,list:t,total:n}}})}}function h({targetUserId:h,queryKeyPrefix:g,isMine:_=!1}){let v=p(`components.pages.profile.components.tabs`),y=a()===`renderer`,b=g??[],x=t(),S=i(),[C,w]=c(null),{mutateAsync:T,isPending:E}=n(async t=>await e({content_id:t})),{data:D,isFetching:O,fetchNextPage:k,hasNextPage:A}=r({key:[...b,`user-publish`],initialPageParam:1,async queryFn(e){return{data:{list:[],total:0,has_more:!1}}},options:{staleTime:0,enabled:y},getNextPageParam(e,t){let n=e?.data||{},r=n.list||[];if(typeof n.has_more==`boolean`)return n.has_more?t.length+1:void 0;if(!(r.length===0||n.total===0))return t.length+1}}),j=D?.pages.flatMap(e=>(e?.data||{}).list||[])??[];function M(e){w(e)}function N(){w(null)}async function P(){if(!(!C||E))try{await T(C);let e=new Set([C]);S([...b,`user-publish`],t=>m(t,e,e=>e.content_id)),f.success(v(`publishTab.deleteSuccess`)),w(null)}catch(e){console.error(`删除内容失败`,e),f.error(v(`publishTab.deleteFailed`))}}let F=j.map(e=>({...e,isDeleting:E&&C===e.content_id,onDelete:()=>M(e.content_id??``)})),I=async()=>{y&&await k()};function L(){x([...b,`user-publish`]),x(b)}function R(e){console.log(`分享到微信:`,e)}function z(e){console.log(`分享到QQ:`,e)}function B(e){console.log(`分享到朋友圈:`,e)}return d(l,{children:[u(s,{list:F,loading:O,hasMore:A,loadMore:I,canEdit:_,showGroupHeaders:!1,emptyText:v(`publishTab.emptyText`),onActionSuccess:L,onShareWeChat:R,onShareQQ:z,onShareMoments:B}),u(o,{open:!!C,onOpenChange:e=>!e&&N(),onCancel:N,onConfirm:P,isConfirming:E})]})}export{h as PublishTab};
2
+ "use client";import{pCommunityDeleteContent as e}from"../../../../../../../service/generated/client.mjs";import{useDeleteRequest as t,useMutation as n,usePaginated as r,useUpdateRequest as i}from"../../../../../../../hooks/query/use-query.mjs";import{DeleteConfirmDialog as a}from"../../../../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{UserActivityList as o}from"../../../../../../common/list/user-activity-list/user-activity-list.mjs";import{useState as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";import{toast as d}from"sonner";import{useTranslations as f}from"next-intl";function p(e,t,n){if(!e)return e;let r=0,i=e.pages.map(e=>({page:e,filteredList:(e.data?.list??[]).filter(e=>{let i=n(e)??``,a=t.has(i);return a&&(r+=1),!a})}));return{...e,pages:i.map(({page:e,filteredList:t})=>{if(!e.data)return e;let n=typeof e.data.total==`number`?Math.max(0,e.data.total-r):e.data.total;return{...e,data:{...e.data,list:t,total:n}}})}}function m({mode:m=`renderer`,targetUserId:h,queryKeyPrefix:g,isMine:_=!1}){let v=f(`components.pages.profile.components.tabs`),y=m===`renderer`,b=g??[],x=t(),S=i(),[C,w]=s(null),{mutateAsync:T,isPending:E}=n(async t=>await e({content_id:t})),{data:D,isFetching:O,fetchNextPage:k,hasNextPage:A}=r({key:[...b,`user-publish`],initialPageParam:1,async queryFn(e){return{data:{list:[],total:0,has_more:!1}}},options:{staleTime:0,enabled:y},getNextPageParam(e,t){let n=e?.data||{},r=n.list||[];if(typeof n.has_more==`boolean`)return n.has_more?t.length+1:void 0;if(!(r.length===0||n.total===0))return t.length+1}}),j=D?.pages.flatMap(e=>(e?.data||{}).list||[])??[];function M(e){w(e)}function N(){w(null)}async function P(){if(!(!C||E))try{await T(C);let e=new Set([C]);S([...b,`user-publish`],t=>p(t,e,e=>e.content_id)),d.success(v(`publishTab.deleteSuccess`)),w(null)}catch(e){console.error(`删除内容失败`,e),d.error(v(`publishTab.deleteFailed`))}}let F=j.map(e=>({...e,isDeleting:E&&C===e.content_id,onDelete:()=>M(e.content_id??``)})),I=async()=>{y&&await k()};function L(){x([...b,`user-publish`]),x(b)}function R(e){console.log(`分享到微信:`,e)}function z(e){console.log(`分享到QQ:`,e)}function B(e){console.log(`分享到朋友圈:`,e)}return u(c,{children:[l(o,{list:F,loading:O,hasMore:A,loadMore:I,canEdit:_,showGroupHeaders:!1,emptyText:v(`publishTab.emptyText`),onActionSuccess:L,onShareWeChat:R,onShareQQ:z,onShareMoments:B}),l(a,{open:!!C,onOpenChange:e=>!e&&N(),onCancel:N,onConfirm:P,isConfirming:E})]})}export{m as PublishTab};
@@ -1,2 +1,2 @@
1
1
 
2
- import{HydrationBoundary as e}from"../../../../../../../hooks/query/hydration-boundary.mjs";import{PublishTab as t}from"./client.mjs";import{jsx as n}from"react/jsx-runtime";function r({queryKeyPrefix:e,targetUserId:t}){return t?[{type:`infinite`,queryKey:[...e,`user-publish`],async queryFn(e){return{data:{list:[],total:0,has_more:!1}}},initialPageParam:1,getNextPageParam(){}}]:[]}function i({prefetch:i,...a}){return n(e,{prefetch:i??r({queryKeyPrefix:a.queryKeyPrefix??[],targetUserId:a.targetUserId}),children:n(t,{...a})})}export{i as PublishTabServer,r as buildPublishTabPrefetch};
2
+ import{HydrationBoundary as e}from"../../../../../../../hooks/query/hydration-boundary.mjs";import{PublishTab as t}from"./client.mjs";import{jsx as n}from"react/jsx-runtime";function r({queryKeyPrefix:e,targetUserId:t}){return t?[{type:`infinite`,queryKey:[...e,`user-publish`],async queryFn(e){return{data:{list:[],total:0,has_more:!1}}},initialPageParam:1,getNextPageParam(){}}]:[]}function i({prefetch:i,...a}){let{mode:o=`renderer`,...s}=a;return n(e,{prefetch:i??r({queryKeyPrefix:s.queryKeyPrefix??[],targetUserId:s.targetUserId}),children:n(t,{...s,mode:o})})}export{i as PublishTabServer,r as buildPublishTabPrefetch};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Button as e}from"../../../ui/button.mjs";import t from"../../../../utils/event-bus.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import{useAppContext as i}from"../../../../hooks/use-app-context/index.mjs";import{eventKey as a}from"../../../../constants/event-key.mjs";import{DeleteConfirmDialog as o}from"../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{useCallback as s,useEffect as c,useMemo as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{usePathname as p,useRouter as m,useSearchParams as h}from"next/navigation";const g=[`示例历史1`,`示例历史2`,`示例历史3`];function _(_){let{title:v,rows:y=1,clearText:b=`清理`,confirmDescription:x=`确认删除全部搜索历史吗?`,storageKey:S=`guest`,onHistoryClick:C}=_,w=i(),[T,E]=u([]),[D,O]=u(!1),k=m(),A=p(),j=h(),M=`search_history_${S}`,N=s(()=>{let e=localStorage.getItem(M);if(e)try{E(JSON.parse(e))}catch(e){console.error(`Failed to parse search history`,e)}else E([])},[M]);c(()=>{N()},[N]),c(()=>(t.on(a.SEARCH_HISTORY_UPDATE,N),()=>{t.off(a.SEARCH_HISTORY_UPDATE,N)}),[N]);let P=()=>{E([]),localStorage.removeItem(M),O(!1),t.emit(a.SEARCH_HISTORY_UPDATE)},F=l(()=>{let e=T.length>0?T:w===`editor`?g:[],t=y*10;return e.slice(0,t)},[T,y,w]);if(F.length===0)return null;let I=e=>{if(C)C(e);else{let t=new URLSearchParams(j.toString());t.set(`q`,e);let n=A.includes(`/search`)?A:`/search`;k.push(`${n}?${t.toString()}`)}};return f(n,{className:`px-4 py-2`,children:[f(n,{className:`flex justify-between items-center mb-2`,children:[d(r,{className:`text-[16px] font-bold text-text1`,children:v}),d(e,{variant:`ghost`,size:`sm`,className:`text-text3 text-[12px] p-0 h-auto`,onClick:()=>O(!0),children:b})]}),d(n,{className:`flex flex-wrap gap-2 overflow-hidden`,style:{maxHeight:`${y*40}px`},children:F.map((e,t)=>d(n,{className:`px-3 py-1 bg-bg2 rounded-full cursor-pointer`,onClick:()=>I(e),children:d(r,{className:`text-[14px] text-text2 truncate max-w-[150px]`,children:e})},t))}),d(o,{open:D,onOpenChange:O,onConfirm:()=>{P()},title:``,description:x})]})}export{_ as SearchHistoryClient};
2
+ "use client";import{Button as e}from"../../../ui/button.mjs";import t from"../../../../utils/event-bus.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import{eventKey as i}from"../../../../constants/event-key.mjs";import{DeleteConfirmDialog as a}from"../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{useCallback as o,useEffect as s,useMemo as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{usePathname as f,useRouter as p,useSearchParams as m}from"next/navigation";const h=[`示例历史1`,`示例历史2`,`示例历史3`];function g(g){let{title:_,rows:v=1,clearText:y=`清理`,confirmDescription:b=`确认删除全部搜索历史吗?`,storageKey:x=`guest`,onHistoryClick:S,mode:C=`renderer`}=g,[w,T]=l([]),[E,D]=l(!1),O=p(),k=f(),A=m(),j=`search_history_${x}`,M=o(()=>{let e=localStorage.getItem(j);if(e)try{T(JSON.parse(e))}catch(e){console.error(`Failed to parse search history`,e)}else T([])},[j]);s(()=>{M()},[M]),s(()=>(t.on(i.SEARCH_HISTORY_UPDATE,M),()=>{t.off(i.SEARCH_HISTORY_UPDATE,M)}),[M]);let N=()=>{T([]),localStorage.removeItem(j),D(!1),t.emit(i.SEARCH_HISTORY_UPDATE)},P=c(()=>{let e=w.length>0?w:C===`editor`?h:[],t=v*10;return e.slice(0,t)},[w,C,v]);if(P.length===0)return null;let F=e=>{if(S)S(e);else{let t=new URLSearchParams(A.toString());t.set(`q`,e);let n=k.includes(`/search`)?k:`/search`;O.push(`${n}?${t.toString()}`)}};return d(n,{className:`px-4 py-2`,children:[d(n,{className:`flex justify-between items-center mb-2`,children:[u(r,{className:`text-[16px] font-bold text-text1`,children:_}),u(e,{variant:`ghost`,size:`sm`,className:`text-text3 text-[12px] p-0 h-auto`,onClick:()=>D(!0),children:y})]}),u(n,{className:`flex flex-wrap gap-2 overflow-hidden`,style:{maxHeight:`${v*40}px`},children:P.map((e,t)=>u(n,{className:`px-3 py-1 bg-bg2 rounded-full cursor-pointer`,onClick:()=>F(e),children:u(r,{className:`text-[14px] text-text2 truncate max-w-[150px]`,children:e})},t))}),u(a,{open:E,onOpenChange:D,onConfirm:()=>{N()},title:``,description:b})]})}export{g as SearchHistoryClient};
@@ -11,6 +11,10 @@ import * as zod_v4_core0 from "zod/v4/core";
11
11
  declare const searchHistoryMaterial: DefineMaterialOption<typeof SearchHistoryServer, typeof SearchHistoryClient, zod.ZodObject<{
12
12
  title: zod.ZodString & SchemaHasDefaultValue;
13
13
  rows: zod.ZodNumber & SchemaHasDefaultValue;
14
+ mode: zod.ZodOptional<zod.ZodEnum<{
15
+ renderer: "renderer";
16
+ editor: "editor";
17
+ }>>;
14
18
  }, zod_v4_core0.$strip>, "search-history">;
15
19
  //#endregion
16
20
  export { searchHistoryMaterial };
@@ -11,6 +11,10 @@ import * as zod_v4_core0 from "zod/v4/core";
11
11
  declare const searchHistoryInspectorPropsSchema: zod.ZodObject<{
12
12
  title: zod.ZodString & SchemaHasDefaultValue;
13
13
  rows: zod.ZodNumber & SchemaHasDefaultValue;
14
+ mode: zod.ZodOptional<zod.ZodEnum<{
15
+ renderer: "renderer";
16
+ editor: "editor";
17
+ }>>;
14
18
  }, zod_v4_core0.$strip>;
15
19
  //#endregion
16
20
  export { searchHistoryInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- import{SearchHistoryClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";import{getTranslations as n}from"next-intl/server";async function r(r){let i=await n(`components.biz.business.searchHistory`);return t(e,{...r,title:r.title||`搜索历史`,clearText:i(`clear`)||`清理`,confirmDescription:i(`confirmClearDescription`)||`确认删除全部搜索历史吗?`})}export{r as SearchHistoryServer};
2
+ import{SearchHistoryClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";import{getTranslations as n}from"next-intl/server";async function r(r){let{mode:i=`renderer`,...a}=r,o=await n(`components.biz.business.searchHistory`);return t(e,{...a,mode:i,title:a.title||`搜索历史`,clearText:o(`clear`)||`清理`,confirmDescription:o(`confirmClearDescription`)||`确认删除全部搜索历史吗?`})}export{r as SearchHistoryServer};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import e from"../../../../utils/event-bus.mjs";import{Box as t}from"../../../ui/box.mjs";import{Input as n}from"../../../ui/input.mjs";import{Text as r}from"../../../ui/text.mjs";import{eventKey as i}from"../../../../constants/event-key.mjs";import a from"../../../../assets/icons/left_arrow.mjs";import o from"../../../../assets/icons/search.mjs";import s from"../../../../assets/icons/clear.mjs";import{useCallback as c,useEffect as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{usePathname as p,useRouter as m,useSearchParams as h}from"next/navigation";function g(g){let{placeholder:_,defaultPlaceholder:v=`请输入搜索关键词`,searchLabel:y=`搜索`,storageKey:b=`guest`,onSearch:x}=g,[S,C]=u(``),w=m(),T=p(),E=h(),D=`search_history_${b}`,O=c(t=>{if(t.trim()){try{let n=localStorage.getItem(D),r=n?JSON.parse(n):[];r=[t,...r.filter(e=>e!==t)],localStorage.setItem(D,JSON.stringify(r.slice(0,20))),e.emit(i.SEARCH_HISTORY_UPDATE)}catch(e){console.error(`Failed to save search history`,e)}if(x)x(t);else{let e=new URLSearchParams(E.toString());e.set(`q`,t);let n=T.includes(`/search`)?T:`/search`;w.push(`${n}?${e.toString()}`)}}},[D,x,T,w,E]);l(()=>{let e=E.get(`q`);e&&e!==S&&(C(e),O(e))},[E,O,S]),l(()=>{if(S===``){if(E.has(`q`)){let e=new URLSearchParams(E.toString());e.delete(`q`);let t=T.includes(`/search`)?T:`/search`;w.push(`${t}${e.toString()?`?${e.toString()}`:``}`)}e.emit(i.SEARCH_HISTORY_UPDATE)}},[S,T,w,E]);let k=()=>{O(S)};return f(t,{className:`px-3 py-2 bg-bg1 flex items-center gap-3 w-full`,children:[d(t,{className:`shrink-0 cursor-pointer active:opacity-70`,onClick:()=>{w.back()},children:d(a,{className:`w-4 h-4 text-text1`})}),f(t,{className:`flex-1 flex items-center gap-1 bg-bg2 border border-theme5 rounded-[20px] px-2 py-1.5 overflow-hidden`,children:[d(t,{className:`p-1 shrink-0`,children:d(o,{className:`w-[14px] h-[14px] text-text3`})}),d(n,{className:`flex-1 border-none bg-transparent p-0 h-auto text-[14px] leading-[22px] focus-visible:ring-0 text-text1 placeholder:text-text3`,placeholder:_||v,value:S,onChange:e=>C(e.target.value),onKeyDown:e=>e.key===`Enter`&&k()}),S&&d(s,{className:`w-[15px] h-[15px] text-text3 shrink-0 cursor-pointer active:opacity-70`,onClick:()=>{C(``)}})]}),d(t,{className:`shrink-0 cursor-pointer active:opacity-70`,onClick:k,children:d(r,{className:`text-[16px] text-text1 leading-[24px] font-normal`,children:y})})]})}export{g as SearchInputClient};
2
+ "use client";import e from"../../../../utils/event-bus.mjs";import{Box as t}from"../../../ui/box.mjs";import{Input as n}from"../../../ui/input.mjs";import{Text as r}from"../../../ui/text.mjs";import{eventKey as i}from"../../../../constants/event-key.mjs";import a from"../../../../assets/icons/left_arrow.mjs";import o from"../../../../assets/icons/search.mjs";import s from"../../../../assets/icons/clear.mjs";import{useCallback as c,useEffect as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{usePathname as p,useRouter as m,useSearchParams as h}from"next/navigation";function g(g){let{placeholder:_,defaultPlaceholder:v=`请输入搜索关键词`,searchLabel:y=`搜索`,storageKey:b=`guest`,onSearch:x,mode:S=`renderer`}=g,C=S===`editor`,[w,T]=u(``),E=m(),D=p(),O=h(),k=`search_history_${b}`,A=c(t=>{if(!C&&t.trim()){try{let n=localStorage.getItem(k),r=n?JSON.parse(n):[];r=[t,...r.filter(e=>e!==t)],localStorage.setItem(k,JSON.stringify(r.slice(0,20))),e.emit(i.SEARCH_HISTORY_UPDATE)}catch(e){console.error(`Failed to save search history`,e)}if(x)x(t);else{let e=new URLSearchParams(O.toString());e.set(`q`,t);let n=D.includes(`/search`)?D:`/search`;E.push(`${n}?${e.toString()}`)}}},[k,C,x,D,E,O]);l(()=>{let e=O.get(`q`);e&&e!==w&&(T(e),A(e))},[O,A,w]),l(()=>{if(!C&&w===``){if(O.has(`q`)){let e=new URLSearchParams(O.toString());e.delete(`q`);let t=D.includes(`/search`)?D:`/search`;E.push(`${t}${e.toString()?`?${e.toString()}`:``}`)}e.emit(i.SEARCH_HISTORY_UPDATE)}},[C,w,D,E,O]);let j=()=>{A(w)};return f(t,{className:C?`px-3 py-2 bg-bg1 flex items-center gap-3 w-full pointer-events-none`:`px-3 py-2 bg-bg1 flex items-center gap-3 w-full`,children:[d(t,{className:`shrink-0 cursor-pointer active:opacity-70`,onClick:()=>{C||E.back()},children:d(a,{className:`w-4 h-4 text-text1`})}),f(t,{className:`flex-1 flex items-center gap-1 bg-bg2 border border-theme5 rounded-[20px] px-2 py-1.5 overflow-hidden`,children:[d(t,{className:`p-1 shrink-0`,children:d(o,{className:`w-[14px] h-[14px] text-text3`})}),d(n,{className:`flex-1 border-none bg-transparent p-0 h-auto text-[14px] leading-[22px] focus-visible:ring-0 text-text1 placeholder:text-text3`,placeholder:_||v,value:w,onChange:e=>T(e.target.value),onKeyDown:e=>e.key===`Enter`&&j()}),w&&d(s,{className:`w-[15px] h-[15px] text-text3 shrink-0 cursor-pointer active:opacity-70`,onClick:()=>{T(``)}})]}),d(t,{className:`shrink-0 cursor-pointer active:opacity-70`,onClick:j,children:d(r,{className:`text-[16px] text-text1 leading-[24px] font-normal`,children:y})})]})}export{g as SearchInputClient};
@@ -10,6 +10,10 @@ import * as zod_v4_core0 from "zod/v4/core";
10
10
  //#region components/biz/business/search-input/material.d.ts
11
11
  declare const searchInputMaterial: DefineMaterialOption<typeof SearchInputServer, typeof SearchInputClient, zod.ZodObject<{
12
12
  placeholder: zod.ZodString & SchemaHasDefaultValue;
13
+ mode: zod.ZodOptional<zod.ZodEnum<{
14
+ renderer: "renderer";
15
+ editor: "editor";
16
+ }>>;
13
17
  }, zod_v4_core0.$strip>, "search-input">;
14
18
  //#endregion
15
19
  export { searchInputMaterial };
@@ -10,6 +10,10 @@ import * as zod_v4_core0 from "zod/v4/core";
10
10
  */
11
11
  declare const searchInputInspectorPropsSchema: zod.ZodObject<{
12
12
  placeholder: zod.ZodString & SchemaHasDefaultValue;
13
+ mode: zod.ZodOptional<zod.ZodEnum<{
14
+ renderer: "renderer";
15
+ editor: "editor";
16
+ }>>;
13
17
  }, zod_v4_core0.$strip>;
14
18
  //#endregion
15
19
  export { searchInputInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- import{SearchInputClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";import{getTranslations as n}from"next-intl/server";async function r(r){let i=await n(`components.pages.search`);return t(e,{...r,defaultPlaceholder:i(`topHeader.placeholder`),searchLabel:i(`topHeader.search`)})}export{r as SearchInputServer};
2
+ import{SearchInputClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";import{getTranslations as n}from"next-intl/server";async function r(r){let{mode:i=`renderer`,...a}=r,o=await n(`components.pages.search`);return t(e,{...a,mode:i,defaultPlaceholder:o(`topHeader.placeholder`),searchLabel:o(`topHeader.search`)})}export{r as SearchInputServer};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r from"../../../ui/link.mjs";import{shortcutGridInspectorDefaultProps as i}from"./schema.mjs";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(s){let{title:c,shortcutCount:l,isShortcutTitle:u,shortcuts:d}={...i,...s},f=(()=>{let e=l??d.length??0;return Math.min(Math.max(e,3),5)})(),p=(d??[]).slice(0,f);return o(t,{as:`section`,className:`p-[12px]`,"aria-label":`金刚区`,children:[c?.trim()?a(n,{as:`h2`,className:`font-bold text-[16px] text-text1`,children:c}):null,a(t,{className:`flex justify-around mt-[8px]`,children:p.map((i,s)=>{let c=o(t,{className:`flex flex-col items-center justify-center gap-[10px] w-[52px]`,children:[a(t,{className:`flex h-[39px] w-[52px] items-center justify-center relative`,"aria-hidden":!i.label,children:a(e,{src:i.icon,alt:i.label||`入口图标`,fill:!0,className:`object-cover`})}),u?a(n,{className:`text-[12px] w-[52px] truncate text-center`,title:u?i.label:void 0,children:i.label}):null]});return a(r,{href:i.href,className:`block`,children:c},s)})})]})}export{s as ShortcutGridClient};
2
+ "use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r from"../../../ui/link.mjs";import{shortcutGridInspectorDefaultProps as i}from"./schema.mjs";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(s){let{mode:c=`renderer`,title:l,shortcutCount:u,isShortcutTitle:d,shortcuts:f}={...i,...s},p=c===`editor`,m=(()=>{let e=u??f.length??0;return Math.min(Math.max(e,3),5)})(),h=(f??[]).slice(0,m);return o(t,{as:`section`,className:p?`p-[12px] pointer-events-none`:`p-[12px]`,"aria-label":`金刚区`,children:[l?.trim()?a(n,{as:`h2`,className:`font-bold text-[16px] text-text1`,children:l}):null,a(t,{className:`flex justify-around mt-[8px]`,children:h.map((i,s)=>{let c=o(t,{className:`flex flex-col items-center justify-center gap-[10px] w-[52px]`,children:[a(t,{className:`flex h-[39px] w-[52px] items-center justify-center relative`,"aria-hidden":!i.label,children:a(e,{src:i.icon,alt:i.label||`入口图标`,fill:!0,className:`object-cover`})}),d?a(n,{className:`text-[12px] w-[52px] truncate text-center`,title:d?i.label:void 0,children:i.label}):null]});return a(r,{href:i.href,className:`block`,children:c},s)})})]})}export{s as ShortcutGridClient};
@@ -17,6 +17,10 @@ declare const shortcutGridMaterial: DefineMaterialOption<typeof ShortcutGrid, ty
17
17
  icon: zod.ZodString & SchemaHasDefaultValue;
18
18
  href: zod.ZodString & SchemaHasDefaultValue;
19
19
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
20
+ mode: zod.ZodOptional<zod.ZodEnum<{
21
+ renderer: "renderer";
22
+ editor: "editor";
23
+ }>>;
20
24
  }, zod_v4_core0.$strip>, "shortcut-grid">;
21
25
  //#endregion
22
26
  export { shortcutGridMaterial };
@@ -16,6 +16,10 @@ declare const shortcutGridInspectorPropsSchema: z$1.ZodObject<{
16
16
  icon: z$1.ZodString & SchemaHasDefaultValue;
17
17
  href: z$1.ZodString & SchemaHasDefaultValue;
18
18
  }, z$1.core.$strip>> & SchemaHasDefaultValue;
19
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
20
+ renderer: "renderer";
21
+ editor: "editor";
22
+ }>>;
19
23
  }, z$1.core.$strip>;
20
24
  type ShortcutGridInspectorProps = InferSchemaProps<typeof shortcutGridInspectorPropsSchema>;
21
25
  //#endregion
@@ -1,2 +1,2 @@
1
1
 
2
- import{ShortcutGridClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";function n(n){return t(e,{...n})}export{n as ShortcutGrid};
2
+ import{ShortcutGridClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";function n(n){let{mode:r=`renderer`,...i}=n;return t(e,{...i,mode:r})}export{n as ShortcutGrid};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useAppContext as r}from"../../../../hooks/use-app-context/index.mjs";import{useMemo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{usePathname as s,useRouter as c}from"next/navigation";const l=[];function u(u){let{items:d=l}=u,f=c(),p=s(),m=r(),h=i(()=>m===`editor`?0:d.findIndex(e=>!!(e.domainId===`home`&&p===`/`||e.domainId===`mine`&&p.includes(`/mine`))),[d,p,m]),g=e=>{if(m!==`editor`)if(e.configType===`function`)switch(e.functionPageType){case`search`:f.push(`/search`);break;case`profile`:f.push(`/user/mine`);break;case`detail`:e.selectData&&f.push(`/video/detail/${e.selectData}`);break;case`content_list`:f.push(`/video/list?tag=${e.selectData}`);break;default:f.push(`/`)}else f.push(`/`)};return!d||d.length===0?null:a(t,{className:`fixed bottom-0 left-0 right-0 bg-bg1 border-t border-line safe-area-bottom z-50`,children:a(t,{className:`flex h-[50px] items-center justify-around`,children:d.map((r,i)=>{let s=h===i,c=r.icon;return s&&r.activeIcon&&(c=r.activeIcon),o(t,{className:`flex flex-col items-center justify-center flex-1 cursor-pointer active:opacity-70 transition-opacity`,onClick:()=>g(r),children:[a(t,{className:`relative w-6 h-6`,children:c?a(e,{src:c,alt:r.label,fill:!0,className:`object-contain`}):a(t,{className:`w-full h-full rounded-sm ${s?`bg-theme5`:`bg-text3`}`})}),a(n,{className:`text-[10px] mt-1 truncate max-w-full px-1 ${s?`text-theme5 font-medium`:`text-text3`}`,children:r.label})]},i)})})})}export{u as TabBarClient};
2
+ "use client";import{Image as e}from"../../../ui/image.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useMemo as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{usePathname as o,useRouter as s}from"next/navigation";const c=[];function l(l){let{items:u=c,mode:d=`renderer`}=l,f=s(),p=o(),m=r(()=>d===`editor`?0:u.findIndex(e=>!!(e.domainId===`home`&&p===`/`||e.domainId===`mine`&&p.includes(`/mine`))),[u,p,d]),h=e=>{if(d!==`editor`)if(e.configType===`function`)switch(e.functionPageType){case`search`:f.push(`/search`);break;case`profile`:f.push(`/user/mine`);break;case`detail`:e.selectData&&f.push(`/video/detail/${e.selectData}`);break;case`content_list`:f.push(`/video/list?tag=${e.selectData}`);break;default:f.push(`/`)}else f.push(`/`)};return!u||u.length===0?null:i(t,{className:`fixed bottom-0 left-0 right-0 bg-bg1 border-t border-line safe-area-bottom z-50`,children:i(t,{className:`flex h-[50px] items-center justify-around`,children:u.map((r,o)=>{let s=m===o,c=r.icon;return s&&r.activeIcon&&(c=r.activeIcon),a(t,{className:`flex flex-col items-center justify-center flex-1 cursor-pointer`,onClick:h,children:[i(t,{className:`relative w-6 h-6`,children:c?i(e,{src:c,alt:r.label,fill:!0,className:`object-contain`}):i(t,{className:`w-full h-full rounded-sm ${s?`bg-theme5`:`bg-text3`}`})}),i(n,{className:`text-[10px] mt-1 truncate max-w-full px-1 ${s?`text-theme5 font-medium`:`text-text3`}`,children:r.label})]},o)})})})}export{l as TabBarClient};
@@ -18,9 +18,17 @@ declare const tabBarMaterial: DefineMaterialOption<typeof TabBarServer, typeof T
18
18
  icon: zod.ZodString & SchemaHasDefaultValue;
19
19
  activeIcon: zod.ZodString & SchemaHasDefaultValue;
20
20
  configType: zod.ZodType<"function" | "product", unknown, zod_v4_core0.$ZodTypeInternals<"function" | "product", unknown>> & SchemaHasDefaultValue;
21
- functionPageType: zod.ZodType<"search" | "detail" | "profile" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"search" | "detail" | "profile" | "content_list", unknown>> & SchemaHasDefaultValue;
21
+ functionPageType: zod.ZodType<"search" | "content_list" | "detail" | "profile", unknown, zod_v4_core0.$ZodTypeInternals<"search" | "content_list" | "detail" | "profile", unknown>> & SchemaHasDefaultValue;
22
22
  selectData: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
23
+ mode: zod.ZodOptional<zod.ZodEnum<{
24
+ renderer: "renderer";
25
+ editor: "editor";
26
+ }>>;
23
27
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
28
+ mode: zod.ZodOptional<zod.ZodEnum<{
29
+ renderer: "renderer";
30
+ editor: "editor";
31
+ }>>;
24
32
  }, zod_v4_core0.$strip>, "tab-bar">;
25
33
  //#endregion
26
34
  export { tabBarMaterial };
@@ -15,9 +15,17 @@ declare const tabBarInspectorPropsSchema: zod.ZodObject<{
15
15
  icon: zod.ZodString & SchemaHasDefaultValue;
16
16
  activeIcon: zod.ZodString & SchemaHasDefaultValue;
17
17
  configType: zod.ZodType<"function" | "product", unknown, zod_v4_core0.$ZodTypeInternals<"function" | "product", unknown>> & SchemaHasDefaultValue;
18
- functionPageType: zod.ZodType<"search" | "detail" | "profile" | "content_list", unknown, zod_v4_core0.$ZodTypeInternals<"search" | "detail" | "profile" | "content_list", unknown>> & SchemaHasDefaultValue;
18
+ functionPageType: zod.ZodType<"search" | "content_list" | "detail" | "profile", unknown, zod_v4_core0.$ZodTypeInternals<"search" | "content_list" | "detail" | "profile", unknown>> & SchemaHasDefaultValue;
19
19
  selectData: zod.ZodOptional<zod.ZodString> & SchemaHasDefaultValue;
20
+ mode: zod.ZodOptional<zod.ZodEnum<{
21
+ renderer: "renderer";
22
+ editor: "editor";
23
+ }>>;
20
24
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
25
+ mode: zod.ZodOptional<zod.ZodEnum<{
26
+ renderer: "renderer";
27
+ editor: "editor";
28
+ }>>;
21
29
  }, zod_v4_core0.$strip>;
22
30
  //#endregion
23
31
  export { tabBarInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- import{TabBarClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";async function n(n){return t(e,{...n})}export{n as TabBarServer};
2
+ import{TabBarClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";async function n(n){let{mode:r=`renderer`,...i}=n;return t(e,{...i,mode:r})}export{n as TabBarServer};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{Box as e}from"../../../ui/box.mjs";import{Text as t}from"../../../ui/text.mjs";import n from"../../../../assets/icons/refresh.mjs";import{useMemo as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{usePathname as s,useRouter as c,useSearchParams as l}from"next/navigation";const u=[];function d(d){let{title:f,displayCount:p=6,items:m=u,onItemClick:h}=d,g=c(),_=s(),v=l(),[y,b]=i(0),x=Math.ceil(m.length/p),S=r(()=>{if(m.length<=p)return m;let e=y%x*p;return m.slice(e,e+p)},[m,p,y,x]);if(m.length===0)return null;let C=e=>{e.stopPropagation(),b(e=>e+1)},w=e=>{if(h)h(e);else{let t=new URLSearchParams(v.toString());t.set(`q`,e);let n=_.includes(`/search`)?_:`/search`;g.push(`${n}?${t.toString()}`)}};return o(e,{className:`bg-bg1 p-3 flex flex-col gap-3 w-full`,children:[o(e,{className:`flex items-center justify-between w-full`,children:[a(t,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:f||`推荐搜索`}),m.length>p&&o(e,{className:`flex items-center gap-1 cursor-pointer active:opacity-70 transition-opacity`,onClick:C,children:[a(t,{className:`text-[14px] text-text3 leading-[22px]`,children:`换一批`}),a(n,{className:`w-3 h-3 text-text3`})]})]}),a(e,{className:`grid grid-cols-2 gap-x-1 gap-y-1 w-full`,children:S.map((n,r)=>a(e,{className:`flex items-center h-[32px] cursor-pointer active:opacity-70 transition-opacity overflow-hidden`,onClick:()=>w(n.label),children:a(t,{className:`text-[14px] text-text1 leading-[22px] truncate w-full`,children:n.label})},`${y}-${r}`))})]})}export{d as TextRecommendClient};
2
+ "use client";import{Box as e}from"../../../ui/box.mjs";import{Text as t}from"../../../ui/text.mjs";import n from"../../../../assets/icons/refresh.mjs";import{useMemo as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{usePathname as s,useRouter as c,useSearchParams as l}from"next/navigation";const u=[];function d(d){let{title:f,displayCount:p=6,items:m=u,onItemClick:h,mode:g=`renderer`}=d,_=g===`editor`,v=c(),y=s(),b=l(),[x,S]=i(0),C=Math.ceil(m.length/p),w=r(()=>{if(m.length<=p)return m;let e=x%C*p;return m.slice(e,e+p)},[m,p,x,C]);if(m.length===0)return null;let T=e=>{e.stopPropagation(),S(e=>e+1)},E=e=>{if(h)h(e);else{let t=new URLSearchParams(b.toString());t.set(`q`,e);let n=y.includes(`/search`)?y:`/search`;v.push(`${n}?${t.toString()}`)}};return o(e,{className:_?`bg-bg1 p-3 flex flex-col gap-3 w-full pointer-events-none`:`bg-bg1 p-3 flex flex-col gap-3 w-full`,children:[o(e,{className:`flex items-center justify-between w-full`,children:[a(t,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:f||`推荐搜索`}),m.length>p&&o(e,{className:`flex items-center gap-1 cursor-pointer active:opacity-70 transition-opacity`,onClick:T,children:[a(t,{className:`text-[14px] text-text3 leading-[22px]`,children:`换一批`}),a(n,{className:`w-3 h-3 text-text3`})]})]}),a(e,{className:`grid grid-cols-2 gap-x-1 gap-y-1 w-full`,children:w.map((n,r)=>a(e,{className:`flex items-center h-[32px] cursor-pointer active:opacity-70 transition-opacity overflow-hidden`,onClick:()=>E(n.label),children:a(t,{className:`text-[14px] text-text1 leading-[22px] truncate w-full`,children:n.label})},`${x}-${r}`))})]})}export{d as TextRecommendClient};
@@ -14,6 +14,10 @@ declare const textRecommendMaterial: DefineMaterialOption<typeof TextRecommendSe
14
14
  items: zod.ZodArray<zod.ZodObject<{
15
15
  label: zod.ZodString & SchemaHasDefaultValue;
16
16
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
17
+ mode: zod.ZodOptional<zod.ZodEnum<{
18
+ renderer: "renderer";
19
+ editor: "editor";
20
+ }>>;
17
21
  }, zod_v4_core0.$strip>, "text-recommend">;
18
22
  //#endregion
19
23
  export { textRecommendMaterial };
@@ -13,6 +13,10 @@ declare const textRecommendInspectorPropsSchema: z.ZodObject<{
13
13
  items: z.ZodArray<z.ZodObject<{
14
14
  label: z.ZodString & SchemaHasDefaultValue;
15
15
  }, z.core.$strip>> & SchemaHasDefaultValue;
16
+ mode: z.ZodOptional<z.ZodEnum<{
17
+ renderer: "renderer";
18
+ editor: "editor";
19
+ }>>;
16
20
  }, z.core.$strip>;
17
21
  //#endregion
18
22
  export { textRecommendInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- import{TextRecommendClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";async function n(n){return t(e,{...n})}export{n as TextRecommendServer};
2
+ import{TextRecommendClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";async function n(n){let{mode:r=`renderer`,...i}=n;return t(e,{...i,mode:r})}export{n as TextRecommendServer};
@@ -1,2 +1,2 @@
1
1
 
2
- "use client";import{useAppContext as e}from"../../../../hooks/use-app-context/index.mjs";import t from"../../../../assets/images/frame.mjs";import n from"../../../../assets/images/subscript.mjs";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a from"next/image";const o=[];function s(s){let{title:c,items:l=o,commonPlayCount:u,commonEpisodes:d}=s,f=e();return!l||l.length===0?null:i(`div`,{className:`bg-bg1 px-3 py-3`,children:[c&&r(`div`,{className:`mb-3 flex items-center justify-between`,children:r(`h2`,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:c})}),r(`div`,{className:`flex overflow-x-auto pb-2 scrollbar-hide space-x-2`,children:l.map((e,o)=>{let s=e.showPlayCount??u?.enabled,c=e.playCountDelta||u?.delta,l=e.showEpisodes??d;return i(`div`,{className:`flex-shrink-0 w-[116.67px]`,children:[i(`div`,{className:`relative aspect-[116.67/155.56] rounded-lg overflow-hidden bg-bg2`,children:[f===`editor`||e.cover?r(a,{src:e.cover||t,alt:e.title,fill:!0,sizes:`116.67px`,className:`object-cover text-[10px] text-text3`}):r(`div`,{className:`w-full h-full flex items-center justify-center text-text3 text-xs`,children:`无封面`}),(f===`editor`?!0:!!e.badge)&&r(`div`,{className:`absolute top-0 right-0 w-8 h-8`,children:r(a,{src:e.badge||n,alt:``,fill:!0,sizes:`32px`,className:`object-contain`})}),i(`div`,{className:`absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent pb-1 pt-3 px-1 flex justify-between items-center`,children:[s&&c&&i(`div`,{className:`flex items-center gap-1 rounded bg-overlay px-1 py-0`,children:[r(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`10`,viewBox:`0 0 12 10`,fill:`none`,className:`shrink-0`,"aria-hidden":!0,children:r(`path`,{d:`M7.56 5.18437L5.013 6.56737C4.893 6.63337 4.761 6.66937 4.638 6.66937C4.269 6.66937 4.002 6.38737 4.002 5.99737V3.28237C4.002 2.89237 4.269 2.61037 4.638 2.61037C4.764 2.61037 4.893 2.64637 5.013 2.70937L7.572 4.09237C7.803 4.21837 7.938 4.41637 7.938 4.63237C7.938 4.85137 7.8 5.05537 7.56 5.18437ZM9.807 9.27637L2.133 8.52937C0.954 8.52937 0 7.57537 0 6.39637V2.79937C0 1.62037 0.954 0.666368 2.133 0.666368L9.81 0.000367165C10.989 0.000367165 11.943 0.954367 11.943 2.13337V7.14337C11.9422 7.70935 11.7168 8.25188 11.3163 8.65181C10.9158 9.05174 10.373 9.27637 9.807 9.27637ZM10.875 2.13337C10.875 1.99351 10.8475 1.85502 10.7939 1.72581C10.7404 1.5966 10.662 1.47919 10.5631 1.3803C10.4642 1.2814 10.3468 1.20296 10.2176 1.14944C10.0883 1.09591 9.94986 1.06837 9.81 1.06837L2.133 1.73437C1.99314 1.73437 1.85465 1.76191 1.72544 1.81544C1.59623 1.86896 1.47883 1.9474 1.37993 2.0463C1.28104 2.14519 1.20259 2.2626 1.14907 2.39181C1.09555 2.52102 1.068 2.65951 1.068 2.79937V6.39637C1.068 6.67882 1.1802 6.94971 1.37993 7.14944C1.57966 7.34916 1.85054 7.46137 2.133 7.46137L9.807 8.20837C9.94686 8.20837 10.0853 8.18082 10.2146 8.1273C10.3438 8.07378 10.4612 7.99533 10.5601 7.89644C10.659 7.79754 10.7374 7.68014 10.7909 7.55093C10.8445 7.42171 10.872 7.28323 10.872 7.14337V2.13337H10.875Z`,fill:`white`})}),r(`span`,{className:`text-white text-[12px] leading-[20px]`,children:c})]}),l&&e.contentDescription&&r(`span`,{className:`text-white text-[12px] leading-[20px]`,children:e.contentDescription})]})]}),r(`div`,{className:`mt-2 py-2`,children:r(`h3`,{className:`text-[16px] text-text1 truncate font-bold leading-[24px]`,children:e.title})})]},o)})})]})}export{s as VideoHorizontalListClient};
2
+ "use client";import e from"../../../../assets/images/frame.mjs";import t from"../../../../assets/images/subscript.mjs";import{jsx as n,jsxs as r}from"react/jsx-runtime";import i from"next/image";const a=[];function o(o){let{title:s,items:c=a,commonPlayCount:l,commonEpisodes:u,mode:d=`renderer`}=o,f=d===`editor`;return!c||c.length===0?null:r(`div`,{className:f?`bg-bg1 px-3 py-3 pointer-events-none`:`bg-bg1 px-3 py-3`,children:[s&&n(`div`,{className:`mb-3 flex items-center justify-between`,children:n(`h2`,{className:`text-[18px] font-bold text-text1 leading-[26px]`,children:s})}),n(`div`,{className:`flex overflow-x-auto pb-2 scrollbar-hide space-x-2`,children:c.map((a,o)=>{let s=a.showPlayCount??l?.enabled,c=a.playCountDelta||l?.delta,f=a.showEpisodes??u;return r(`div`,{className:`flex-shrink-0 w-[116.67px]`,children:[r(`div`,{className:`relative aspect-[116.67/155.56] rounded-lg overflow-hidden bg-bg2`,children:[d===`editor`||a.cover?n(i,{src:a.cover||e,alt:a.title,fill:!0,sizes:`116.67px`,className:`object-cover text-[10px] text-text3`}):n(`div`,{className:`w-full h-full flex items-center justify-center text-text3 text-xs`,children:`无封面`}),(d===`editor`?!0:!!a.badge)&&n(`div`,{className:`absolute top-0 right-0 w-8 h-8`,children:n(i,{src:a.badge||t,alt:``,fill:!0,sizes:`32px`,className:`object-contain`})}),r(`div`,{className:`absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent pb-1 pt-3 px-1 flex justify-between items-center`,children:[s&&c&&r(`div`,{className:`flex items-center gap-1 rounded bg-overlay px-1 py-0`,children:[n(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`10`,viewBox:`0 0 12 10`,fill:`none`,className:`shrink-0`,"aria-hidden":!0,children:n(`path`,{d:`M7.56 5.18437L5.013 6.56737C4.893 6.63337 4.761 6.66937 4.638 6.66937C4.269 6.66937 4.002 6.38737 4.002 5.99737V3.28237C4.002 2.89237 4.269 2.61037 4.638 2.61037C4.764 2.61037 4.893 2.64637 5.013 2.70937L7.572 4.09237C7.803 4.21837 7.938 4.41637 7.938 4.63237C7.938 4.85137 7.8 5.05537 7.56 5.18437ZM9.807 9.27637L2.133 8.52937C0.954 8.52937 0 7.57537 0 6.39637V2.79937C0 1.62037 0.954 0.666368 2.133 0.666368L9.81 0.000367165C10.989 0.000367165 11.943 0.954367 11.943 2.13337V7.14337C11.9422 7.70935 11.7168 8.25188 11.3163 8.65181C10.9158 9.05174 10.373 9.27637 9.807 9.27637ZM10.875 2.13337C10.875 1.99351 10.8475 1.85502 10.7939 1.72581C10.7404 1.5966 10.662 1.47919 10.5631 1.3803C10.4642 1.2814 10.3468 1.20296 10.2176 1.14944C10.0883 1.09591 9.94986 1.06837 9.81 1.06837L2.133 1.73437C1.99314 1.73437 1.85465 1.76191 1.72544 1.81544C1.59623 1.86896 1.47883 1.9474 1.37993 2.0463C1.28104 2.14519 1.20259 2.2626 1.14907 2.39181C1.09555 2.52102 1.068 2.65951 1.068 2.79937V6.39637C1.068 6.67882 1.1802 6.94971 1.37993 7.14944C1.57966 7.34916 1.85054 7.46137 2.133 7.46137L9.807 8.20837C9.94686 8.20837 10.0853 8.18082 10.2146 8.1273C10.3438 8.07378 10.4612 7.99533 10.5601 7.89644C10.659 7.79754 10.7374 7.68014 10.7909 7.55093C10.8445 7.42171 10.872 7.28323 10.872 7.14337V2.13337H10.875Z`,fill:`white`})}),n(`span`,{className:`text-white text-[12px] leading-[20px]`,children:c})]}),f&&a.contentDescription&&n(`span`,{className:`text-white text-[12px] leading-[20px]`,children:a.contentDescription})]})]}),n(`div`,{className:`mt-2 py-2`,children:n(`h3`,{className:`text-[16px] text-text1 truncate font-bold leading-[24px]`,children:a.title})})]},o)})})]})}export{o as VideoHorizontalListClient};
@@ -34,6 +34,10 @@ declare const videoHorizontalListMaterial: DefineMaterialOption<typeof VideoHori
34
34
  showEpisodes: zod.ZodBoolean & SchemaHasDefaultValue;
35
35
  badge: zod.ZodString & SchemaHasDefaultValue;
36
36
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
37
+ mode: zod.ZodOptional<zod.ZodEnum<{
38
+ renderer: "renderer";
39
+ editor: "editor";
40
+ }>>;
37
41
  }, zod_v4_core0.$strip>, "video-horizontal-list">;
38
42
  //#endregion
39
43
  export { videoHorizontalListMaterial };
@@ -30,6 +30,10 @@ declare const videoHorizontalListInspectorPropsSchema: z.ZodObject<{
30
30
  showEpisodes: z.ZodBoolean & SchemaHasDefaultValue;
31
31
  badge: z.ZodString & SchemaHasDefaultValue;
32
32
  }, z.core.$strip>> & SchemaHasDefaultValue;
33
+ mode: z.ZodOptional<z.ZodEnum<{
34
+ renderer: "renderer";
35
+ editor: "editor";
36
+ }>>;
33
37
  }, z.core.$strip>;
34
38
  //#endregion
35
39
  export { videoHorizontalListInspectorPropsSchema };
@@ -1,2 +1,2 @@
1
1
 
2
- import{VideoHorizontalListClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";import{getTranslations as n}from"next-intl/server";async function r(r){let i=await n(`components.biz.business.videoHorizontalList`);return t(e,{...r,allEpisodesText:i.raw(`allEpisodes`),updatedToText:i.raw(`updatedTo`)})}export{r as VideoHorizontalListServer};
2
+ import{VideoHorizontalListClient as e}from"./client.mjs";import{jsx as t}from"react/jsx-runtime";import{getTranslations as n}from"next-intl/server";async function r(r){let{mode:i=`renderer`,...a}=r,o=await n(`components.biz.business.videoHorizontalList`);return t(e,{...a,mode:i,allEpisodesText:o.raw(`allEpisodes`),updatedToText:o.raw(`updatedTo`)})}export{r as VideoHorizontalListServer};
@@ -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{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};
2
+ "use client";import{cn as e}from"../../../../utils/cn.mjs";import{useRequest as t}from"../../../../hooks/query/use-query.mjs";import{buttonVariants as n}from"./variants.mjs";import{jsx as r}from"react/jsx-runtime";function i(i){let{text:a,disabled:o,loading:s,variant:c=`default`,mode:l=`renderer`}=i;console.log({clientMode:l,text:a});function u(){l!==`editor`&&console.log(`invoke`)}return t([`demo`],()=>new Promise(e=>{setTimeout(()=>{e({message:`Hello World`})},200)}),{enabled:l===`renderer`}),l===`editor`?r(`div`,{children:`editor preview button`}):r(`button`,{className:e(n({variant:c})),onClick:u,disabled:o||s,children:a})}export{i as ButtonClient};
@@ -19,6 +19,10 @@ declare const exampleButtonMaterial: DefineMaterialOption<typeof Button, typeof
19
19
  info: zod.ZodOptional<zod.ZodObject<{
20
20
  readonly address: zod.ZodOptional<zod.ZodString>;
21
21
  }, zod_v4_core0.$strip>> & SchemaHasDefaultValue;
22
+ mode: zod.ZodOptional<zod.ZodEnum<{
23
+ renderer: "renderer";
24
+ editor: "editor";
25
+ }>>;
22
26
  }, zod_v4_core0.$strip>, "example-button">;
23
27
  //#endregion
24
28
  export { exampleButtonMaterial };
@@ -18,6 +18,10 @@ declare const buttonInspectorPropsSchema: z$1.ZodObject<{
18
18
  info: z$1.ZodOptional<z$1.ZodObject<{
19
19
  readonly address: z$1.ZodOptional<z$1.ZodString>;
20
20
  }, z$1.core.$strip>> & SchemaHasDefaultValue;
21
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
22
+ renderer: "renderer";
23
+ editor: "editor";
24
+ }>>;
21
25
  }, z$1.core.$strip>;
22
26
  declare const buttonInspectorDefaultProps: {
23
27
  text: string;
@@ -3,6 +3,9 @@ import { ButtonProps } from "./schema.mjs";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
4
 
5
5
  //#region components/biz/example/button/server.d.ts
6
- declare function Button(props: ButtonProps): react_jsx_runtime0.JSX.Element;
6
+ declare function Button({
7
+ mode,
8
+ ...props
9
+ }: ButtonProps): react_jsx_runtime0.JSX.Element;
7
10
  //#endregion
8
11
  export { Button };
@@ -1,2 +1,2 @@
1
1
 
2
- import{getAppContext as e}from"../../../../hooks/get-app-context.mjs";import{HydrationBoundary as t}from"../../../../hooks/query/hydration-boundary.mjs";import{ButtonClient as n}from"./client.mjs";import{jsx as r}from"react/jsx-runtime";function i(i){let a=e();return console.log({serverContext:a}),r(t,{prefetch:[{queryKey:[`demo`],queryFn(){return new Promise(e=>{setTimeout(()=>{e({message:`Hello World`})},200)})}}],children:r(n,{...i})})}export{i as Button};
2
+ import{HydrationBoundary as e}from"../../../../hooks/query/hydration-boundary.mjs";import{ButtonClient as t}from"./client.mjs";import{jsx as n}from"react/jsx-runtime";function r({mode:r=`renderer`,...i}){return console.log({serverMode:r}),n(e,{prefetch:[{queryKey:[`demo`],queryFn(){return new Promise(e=>{setTimeout(()=>{e({message:`Hello World`})},200)})}}],children:n(t,{...i,mode:r})})}export{r as Button};
@@ -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" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
9
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
10
10
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
11
11
  /** Badge 组件。 */
12
12
  declare function Badge({
@@ -7,8 +7,8 @@ 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" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
11
- size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
10
+ variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
11
+ size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
12
12
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
13
13
  /** Button 组件属性。 */
14
14
  type ButtonProps = Button.Props & VariantProps<typeof buttonVariants> & {
package/dist/hooks.d.mts CHANGED
@@ -1,9 +1,6 @@
1
1
 
2
- import { AppContextValue, appContextCookieKey, appContextValues, defaultAppContextValue, getLockedAppContext, lockAppContext, normalizeAppContextValue } from "./hooks/app-context.mjs";
3
- import { getAppContext, getAppContextResolved } from "./hooks/get-app-context.mjs";
4
2
  import { HydrationBoundary, PrefetchInfiniteItem, PrefetchItem, PrefetchQueryItem } from "./hooks/query/hydration-boundary.mjs";
5
3
  import { useDeleteRequest, useMutation, usePaginated, usePrefetchQuery, useRefetchQuery, useRequest, useUpdateRequest } from "./hooks/query/use-query.mjs";
6
- import { useAppContext } from "./hooks/use-app-context/index.mjs";
7
4
  import { AuthFields, useAuth, useCloseLogin, useExpireTime, useIsLoggedIn, useLoginModalOpen, useLogout, useOpenLogin, useOpenLoginAsync, useOpenResetPassword, useRequireLogin, useSetAuthFields, useToken, useUserId, useUserInfo } from "./hooks/use-auth.mjs";
8
5
  import { UseBrowseReportOptions, useBrowseReport } from "./hooks/use-browse-report.mjs";
9
6
  import { useFollow } from "./hooks/use-follow.mjs";
@@ -13,4 +10,4 @@ import { LikeableItem, useLikeDislike } from "./hooks/use-like-dislike.mjs";
13
10
  import { useSearchHistory } from "./hooks/use-search-history.mjs";
14
11
  import { useSticky } from "./hooks/use-sticky.mjs";
15
12
  import { useKeepAliveEffect, useKeepAliveState } from "./components/common/keep-scroll-position/index.mjs";
16
- export { AppContextValue, AuthFields, HydrationBoundary, LikeableItem, PrefetchInfiniteItem, PrefetchItem, PrefetchQueryItem, UseBrowseReportOptions, appContextCookieKey, appContextValues, defaultAppContextValue, getAppContext, getAppContextResolved, getLockedAppContext, lockAppContext, normalizeAppContextValue, useAppContext, useAuth, useBrowseReport, useCloseLogin, useDeleteRequest, useExpireTime, useFollow, useFullscreenGestures, useIsLoggedIn, useKeepAliveEffect, useKeepAliveState, useKeyboardOpen, useLikeDislike, useLoginModalOpen, useLogout, useMutation, useOpenLogin, useOpenLoginAsync, useOpenResetPassword, usePaginated, usePrefetchQuery, useRefetchQuery, useRequest, useRequireLogin, useSearchHistory, useSetAuthFields, useSticky, useToken, useUpdateRequest, useUserId, useUserInfo };
13
+ export { AuthFields, HydrationBoundary, LikeableItem, PrefetchInfiniteItem, PrefetchItem, PrefetchQueryItem, UseBrowseReportOptions, useAuth, useBrowseReport, useCloseLogin, useDeleteRequest, useExpireTime, useFollow, useFullscreenGestures, useIsLoggedIn, useKeepAliveEffect, useKeepAliveState, useKeyboardOpen, useLikeDislike, useLoginModalOpen, useLogout, useMutation, useOpenLogin, useOpenLoginAsync, useOpenResetPassword, usePaginated, usePrefetchQuery, useRefetchQuery, useRequest, useRequireLogin, useSearchHistory, useSetAuthFields, useSticky, useToken, useUpdateRequest, useUserId, useUserInfo };
package/dist/hooks.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- import{appContextCookieKey as e,appContextValues as t,defaultAppContextValue as n,getLockedAppContext as r,lockAppContext as i,normalizeAppContextValue as a}from"./hooks/app-context.mjs";import{getAppContext as o,getAppContextResolved as s}from"./hooks/get-app-context.mjs";import{HydrationBoundary as c}from"./hooks/query/hydration-boundary.mjs";import{useDeleteRequest as l,useMutation as u,usePaginated as d,usePrefetchQuery as f,useRefetchQuery as p,useRequest as m,useUpdateRequest as h}from"./hooks/query/use-query.mjs";import{useAppContext as g}from"./hooks/use-app-context/index.mjs";import{useAuth as _,useCloseLogin as v,useExpireTime as y,useIsLoggedIn as b,useLoginModalOpen as x,useLogout as S,useOpenLogin as C,useOpenLoginAsync as w,useOpenResetPassword as T,useRequireLogin as E,useSetAuthFields as D,useToken as O,useUserId as k,useUserInfo as A}from"./hooks/use-auth.mjs";import{useBrowseReport as j}from"./hooks/use-browse-report.mjs";import{useFollow as M}from"./hooks/use-follow.mjs";import{useFullscreenGestures as N}from"./hooks/use-fullscreen-gestures.mjs";import{useKeyboardOpen as P}from"./hooks/use-keyboard-open.mjs";import{useLikeDislike as F}from"./hooks/use-like-dislike.mjs";import{useSearchHistory as I}from"./hooks/use-search-history.mjs";import{useSticky as L}from"./hooks/use-sticky.mjs";import{useKeepAliveEffect as R,useKeepAliveState as z}from"./components/common/keep-scroll-position/index.mjs";export{c as HydrationBoundary,e as appContextCookieKey,t as appContextValues,n as defaultAppContextValue,o as getAppContext,s as getAppContextResolved,r as getLockedAppContext,i as lockAppContext,a as normalizeAppContextValue,g as useAppContext,_ as useAuth,j as useBrowseReport,v as useCloseLogin,l as useDeleteRequest,y as useExpireTime,M as useFollow,N as useFullscreenGestures,b as useIsLoggedIn,R as useKeepAliveEffect,z as useKeepAliveState,P as useKeyboardOpen,F as useLikeDislike,x as useLoginModalOpen,S as useLogout,u as useMutation,C as useOpenLogin,w as useOpenLoginAsync,T as useOpenResetPassword,d as usePaginated,f as usePrefetchQuery,p as useRefetchQuery,m as useRequest,E as useRequireLogin,I as useSearchHistory,D as useSetAuthFields,L as useSticky,O as useToken,h as useUpdateRequest,k as useUserId,A as useUserInfo};
2
+ import{HydrationBoundary as e}from"./hooks/query/hydration-boundary.mjs";import{useDeleteRequest as t,useMutation as n,usePaginated as r,usePrefetchQuery as i,useRefetchQuery as a,useRequest as o,useUpdateRequest as s}from"./hooks/query/use-query.mjs";import{useAuth as c,useCloseLogin as l,useExpireTime as u,useIsLoggedIn as d,useLoginModalOpen as f,useLogout as p,useOpenLogin as m,useOpenLoginAsync as h,useOpenResetPassword as g,useRequireLogin as _,useSetAuthFields as v,useToken as y,useUserId as b,useUserInfo as x}from"./hooks/use-auth.mjs";import{useBrowseReport as S}from"./hooks/use-browse-report.mjs";import{useFollow as C}from"./hooks/use-follow.mjs";import{useFullscreenGestures as w}from"./hooks/use-fullscreen-gestures.mjs";import{useKeyboardOpen as T}from"./hooks/use-keyboard-open.mjs";import{useLikeDislike as E}from"./hooks/use-like-dislike.mjs";import{useSearchHistory as D}from"./hooks/use-search-history.mjs";import{useSticky as O}from"./hooks/use-sticky.mjs";import{useKeepAliveEffect as k,useKeepAliveState as A}from"./components/common/keep-scroll-position/index.mjs";export{e as HydrationBoundary,c as useAuth,S as useBrowseReport,l as useCloseLogin,t as useDeleteRequest,u as useExpireTime,C as useFollow,w as useFullscreenGestures,d as useIsLoggedIn,k as useKeepAliveEffect,A as useKeepAliveState,T as useKeyboardOpen,E as useLikeDislike,f as useLoginModalOpen,p as useLogout,n as useMutation,m as useOpenLogin,h as useOpenLoginAsync,g as useOpenResetPassword,r as usePaginated,i as usePrefetchQuery,a as useRefetchQuery,o as useRequest,_ as useRequireLogin,D as useSearchHistory,v as useSetAuthFields,O as useSticky,y as useToken,s as useUpdateRequest,b as useUserId,x as useUserInfo};
@@ -1,4 +1,4 @@
1
1
 
2
- import { INSPECTOR_META_KEY, InferSchemaProps, MaterialComponentProps, SchemaHasDefaultValue, defineArrayItemPropSchema, defineCheckboxPropSchema, defineColorPropSchema, defineComponentPropsSchema, defineDatetimePropSchema, defineNumberPropSchema, defineObjectPropSchema, defineSelectEnumPropSchema, defineSelectPropSchema, defineSwitchPropSchema, defineTextPropSchema, defineTextareaPropSchema, defineTimeRangePropSchema, getSchemaDefaultProps, withInspectorMeta } from "./schema.mjs";
2
+ import { INSPECTOR_META_KEY, InferSchemaProps, MaterialComponentMode, MaterialComponentProps, SchemaHasDefaultValue, defineArrayItemPropSchema, defineCheckboxPropSchema, defineColorPropSchema, defineComponentPropsSchema, defineDatetimePropSchema, defineNumberPropSchema, defineObjectPropSchema, defineSelectEnumPropSchema, defineSelectPropSchema, defineSwitchPropSchema, defineTextPropSchema, defineTextareaPropSchema, defineTimeRangePropSchema, getSchemaDefaultProps, withInspectorMeta } from "./schema.mjs";
3
3
  import { defineMaterial, overwriteMaterial } from "./material.mjs";
4
4
  import { MaterialMap, generateMaterialMap } from "./utils.mjs";
@@ -21,8 +21,9 @@ declare const MATERIAL_CATEGORY: {
21
21
  };
22
22
  type MaterialPropsSchema = z$1.ZodObject<z$1.ZodRawShape>;
23
23
  type MaterialSchemaProps<TSchema extends MaterialPropsSchema> = InferSchemaProps<TSchema>;
24
- type SchemaExtraKeys<TSchemaProps, TComponentProps> = Exclude<keyof TSchemaProps, keyof TComponentProps>;
25
- type SchemaIncompatibleKeys<TSchemaProps, TComponentProps> = { [Key in keyof TSchemaProps]-?: Key extends keyof TComponentProps ? TSchemaProps[Key] extends TComponentProps[Key] ? never : Key : Key }[keyof TSchemaProps];
24
+ type InternalMaterialSchemaKey = 'mode';
25
+ type SchemaExtraKeys<TSchemaProps, TComponentProps> = Exclude<keyof TSchemaProps, keyof TComponentProps | InternalMaterialSchemaKey>;
26
+ type SchemaIncompatibleKeys<TSchemaProps, TComponentProps> = { [Key in keyof TSchemaProps]-?: Key extends InternalMaterialSchemaKey ? never : Key extends keyof TComponentProps ? TSchemaProps[Key] extends TComponentProps[Key] ? never : Key : Key }[keyof TSchemaProps];
26
27
  type EnsurePropsSchemaSubset<TComponent extends ComponentType<any>, TPropsSchema extends MaterialPropsSchema> = [SchemaExtraKeys<MaterialSchemaProps<TPropsSchema>, ComponentProps<TComponent>>] extends [never] ? [SchemaIncompatibleKeys<MaterialSchemaProps<TPropsSchema>, ComponentProps<TComponent>>] extends [never] ? TPropsSchema : never : never;
27
28
  type EnsureComponentCompatibleWithSchema<TComponent extends ComponentType<any>, TPropsSchema extends MaterialPropsSchema> = EnsurePropsSchemaSubset<TComponent, TPropsSchema> extends never ? never : TComponent;
28
29
  interface DefineMaterialOption<TServerComponent extends ComponentType<any>, TClientComponent extends ComponentType<any>, TPropsSchema extends MaterialPropsSchema, TType extends string = string> {
@@ -4,8 +4,13 @@ import z$1 from "zod";
4
4
 
5
5
  //#region utils/schema/schema.d.ts
6
6
  declare const INSPECTOR_META_KEY = "inspector";
7
+ declare const materialComponentModeSchema: z$1.ZodEnum<{
8
+ renderer: "renderer";
9
+ editor: "editor";
10
+ }>;
11
+ type MaterialComponentMode = z$1.infer<typeof materialComponentModeSchema>;
7
12
  type MaterialComponentProps<T = object> = {
8
- context: 'editor' | 'renderer';
13
+ mode: MaterialComponentMode;
9
14
  } & T;
10
15
  /**
11
16
  * 关联inspector meta
@@ -20,7 +25,17 @@ declare function withInspectorMeta<T extends z$1.ZodTypeAny>(schema: T, inspecto
20
25
  * @param shape
21
26
  * @returns
22
27
  */
23
- declare function defineComponentPropsSchema<const TShape extends z$1.ZodRawShape>(shape: TShape): z$1.ZodObject<{ -readonly [P in keyof TShape]: TShape[P] }, z$1.core.$strip>;
28
+ declare function defineComponentPropsSchema<const TShape extends z$1.ZodRawShape>(shape: TShape): z$1.ZodObject<(keyof TShape & "mode" extends never ? { -readonly [P in keyof TShape]: TShape[P] } & {
29
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
30
+ renderer: "renderer";
31
+ editor: "editor";
32
+ }>>;
33
+ } : { [K in keyof { -readonly [P in keyof TShape]: TShape[P] } as K extends "mode" ? never : K]: { -readonly [P in keyof TShape]: TShape[P] }[K] } & {
34
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
35
+ renderer: "renderer";
36
+ editor: "editor";
37
+ }>>;
38
+ }) extends infer T ? { [k in keyof T]: T[k] } : never, z$1.core.$strip>;
24
39
  interface SchemaHasDefaultValue {
25
40
  readonly __schemaHasDefaultValueBrand: never;
26
41
  }
@@ -131,4 +146,4 @@ declare function defineObjectPropSchema<const TShape extends z$1.ZodRawShape, co
131
146
  required?: boolean;
132
147
  }>(shape: TShape, option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z$1.ZodObject<TShape>, TOption['required']>, TOption>;
133
148
  //#endregion
134
- export { INSPECTOR_META_KEY, InferSchemaProps, MaterialComponentProps, SchemaHasDefaultValue, defineArrayItemPropSchema, defineCheckboxPropSchema, defineColorPropSchema, defineComponentPropsSchema, defineDatetimePropSchema, defineNumberPropSchema, defineObjectPropSchema, defineSelectEnumPropSchema, defineSelectPropSchema, defineSwitchPropSchema, defineTextPropSchema, defineTextareaPropSchema, defineTimeRangePropSchema, getSchemaDefaultProps, withInspectorMeta };
149
+ export { INSPECTOR_META_KEY, InferSchemaProps, MaterialComponentMode, MaterialComponentProps, SchemaHasDefaultValue, defineArrayItemPropSchema, defineCheckboxPropSchema, defineColorPropSchema, defineComponentPropsSchema, defineDatetimePropSchema, defineNumberPropSchema, defineObjectPropSchema, defineSelectEnumPropSchema, defineSelectPropSchema, defineSwitchPropSchema, defineTextPropSchema, defineTextareaPropSchema, defineTimeRangePropSchema, getSchemaDefaultProps, withInspectorMeta };
@@ -1,2 +1,2 @@
1
1
 
2
- import e from"zod";const t=`inspector`;function n(e,n){return e.meta({...e.meta()??{},[t]:n})}function r(t){return e.object(t)}function i(e,t){return t===!1?e.optional():e}function a(e,t){return t.defaultValue,e}function o(t){let{required:r=!0,...o}=t;return a(n(i(e.string(),r),{type:`text`,...o}),t)}function s(t){let{required:r=!0,...o}=t;return a(n(i(e.string(),r),{type:`textarea`,...o}),t)}function c(t){let{required:r=!0,...o}=t;return a(n(i(e.number(),r),{type:`number`,...o}),t)}function l(t){let{required:r=!0,...o}=t;return a(n(i(e.string(),r),{type:`color`,...o}),t)}function u(t){let{required:r=!0,...o}=t;return a(n(i(e.string(),r),{type:`datetime`,...o}),t)}const d={start:e.string(),end:e.string()};function f(t){let{required:r=!0,...o}=t;return a(n(i(e.object(d),r),{type:`timeRange`,...o}),t)}function p(t){let{required:r=!0,...o}=t;return a(n(i(e.string(),r),{type:`select`,...o}),t)}function m(t,r){let{required:o=!0,...s}=r;return a(n(i(e.enum(t),o),{type:`select`,...s}),r)}function h(t){let{required:r=!0,...o}=t;return a(n(i(e.boolean(),r),{type:`checkbox`,...o}),t)}function g(t){let{required:r=!0,...o}=t;return a(n(i(e.boolean(),r),{type:`switch`,...o}),t)}function _(e){let n=e,r=new Set;for(;n&&!r.has(n);){r.add(n);let e=n.meta()?.[t];if(e)return e;let i=n.unwrap;if(typeof i!=`function`)break;let a=i.call(n);if(!a||a===n)break;n=a}}function v(e){let t={};for(let[n,r]of Object.entries(e.shape)){let e=_(r);e?.defaultValue!==void 0&&(t[n]=e.defaultValue)}return t}function y(t,r){let{required:o=!0,...s}=r;return a(n(i(e.array(t),o),{type:`array`,...s}),r)}function b(t,r){let{required:o=!0,...s}=r;return a(n(i(e.object(t),o),{type:`object`,...s}),r)}export{t as INSPECTOR_META_KEY,y as defineArrayItemPropSchema,h as defineCheckboxPropSchema,l as defineColorPropSchema,r as defineComponentPropsSchema,u as defineDatetimePropSchema,c as defineNumberPropSchema,b as defineObjectPropSchema,m as defineSelectEnumPropSchema,p as defineSelectPropSchema,g as defineSwitchPropSchema,o as defineTextPropSchema,s as defineTextareaPropSchema,f as defineTimeRangePropSchema,v as getSchemaDefaultProps,n as withInspectorMeta};
2
+ import e from"zod";const t=`inspector`,n=e.enum([`renderer`,`editor`]);function r(e,n){return e.meta({...e.meta()??{},[t]:n})}function i(t){return e.object(t).extend({mode:n.optional()})}function a(e,t){return t===!1?e.optional():e}function o(e,t){return t.defaultValue,e}function s(t){let{required:n=!0,...i}=t;return o(r(a(e.string(),n),{type:`text`,...i}),t)}function c(t){let{required:n=!0,...i}=t;return o(r(a(e.string(),n),{type:`textarea`,...i}),t)}function l(t){let{required:n=!0,...i}=t;return o(r(a(e.number(),n),{type:`number`,...i}),t)}function u(t){let{required:n=!0,...i}=t;return o(r(a(e.string(),n),{type:`color`,...i}),t)}function d(t){let{required:n=!0,...i}=t;return o(r(a(e.string(),n),{type:`datetime`,...i}),t)}const f={start:e.string(),end:e.string()};function p(t){let{required:n=!0,...i}=t;return o(r(a(e.object(f),n),{type:`timeRange`,...i}),t)}function m(t){let{required:n=!0,...i}=t;return o(r(a(e.string(),n),{type:`select`,...i}),t)}function h(t,n){let{required:i=!0,...s}=n;return o(r(a(e.enum(t),i),{type:`select`,...s}),n)}function g(t){let{required:n=!0,...i}=t;return o(r(a(e.boolean(),n),{type:`checkbox`,...i}),t)}function _(t){let{required:n=!0,...i}=t;return o(r(a(e.boolean(),n),{type:`switch`,...i}),t)}function v(e){let n=e,r=new Set;for(;n&&!r.has(n);){r.add(n);let e=n.meta()?.[t];if(e)return e;let i=n.unwrap;if(typeof i!=`function`)break;let a=i.call(n);if(!a||a===n)break;n=a}}function y(e){let t={};for(let[n,r]of Object.entries(e.shape)){let e=v(r);e?.defaultValue!==void 0&&(t[n]=e.defaultValue)}return t}function b(t,n){let{required:i=!0,...s}=n;return o(r(a(e.array(t),i),{type:`array`,...s}),n)}function x(t,n){let{required:i=!0,...s}=n;return o(r(a(e.object(t),i),{type:`object`,...s}),n)}export{t as INSPECTOR_META_KEY,b as defineArrayItemPropSchema,g as defineCheckboxPropSchema,u as defineColorPropSchema,i as defineComponentPropsSchema,d as defineDatetimePropSchema,l as defineNumberPropSchema,x as defineObjectPropSchema,h as defineSelectEnumPropSchema,m as defineSelectPropSchema,_ as defineSwitchPropSchema,s as defineTextPropSchema,c as defineTextareaPropSchema,p as defineTimeRangePropSchema,y as getSchemaDefaultProps,r as withInspectorMeta};
package/dist/utils.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { INSPECTOR_META_KEY, InferSchemaProps, MaterialComponentProps, SchemaHasDefaultValue, defineArrayItemPropSchema, defineCheckboxPropSchema, defineColorPropSchema, defineComponentPropsSchema, defineDatetimePropSchema, defineNumberPropSchema, defineObjectPropSchema, defineSelectEnumPropSchema, defineSelectPropSchema, defineSwitchPropSchema, defineTextPropSchema, defineTextareaPropSchema, defineTimeRangePropSchema, getSchemaDefaultProps, withInspectorMeta } from "./utils/schema/schema.mjs";
2
+ import { INSPECTOR_META_KEY, InferSchemaProps, MaterialComponentMode, MaterialComponentProps, SchemaHasDefaultValue, defineArrayItemPropSchema, defineCheckboxPropSchema, defineColorPropSchema, defineComponentPropsSchema, defineDatetimePropSchema, defineNumberPropSchema, defineObjectPropSchema, defineSelectEnumPropSchema, defineSelectPropSchema, defineSwitchPropSchema, defineTextPropSchema, defineTextareaPropSchema, defineTimeRangePropSchema, getSchemaDefaultProps, withInspectorMeta } from "./utils/schema/schema.mjs";
3
3
  import { defineMaterial, overwriteMaterial } from "./utils/schema/material.mjs";
4
4
  import { MaterialMap, generateMaterialMap } from "./utils/schema/utils.mjs";
5
5
  import "./utils/schema/index.mjs";
@@ -18,4 +18,4 @@ import { createInputAndSelectFile, getCoverImage, getImageResolutionFromFile } f
18
18
  import { PresignedUploadInfo, UploadToS3Options, UploadToS3Result, uploadToS3WithPresignedUrl } from "./utils/s3-uploader.mjs";
19
19
  import { base64ToUint8Array, uint8ArrayToBase64, uint8ArrayToNumberArray } from "./utils/uint8.mjs";
20
20
  import { UploadFileResult, encryptBncBuffer, uploadFile } from "./utils/upload-file.mjs";
21
- export { eventBus as EventBus, HttpClient, HttpError, INSPECTOR_META_KEY, ImageCompressionQualityRule, InferSchemaProps, MaterialComponentProps, MaterialMap, PresignedUploadInfo, RequestConfig, RequestMethod, ResponseData, SchemaHasDefaultValue, UploadFileResult, UploadToS3Options, UploadToS3Result, base64ToUint8Array, checkFollowStatus, clearMyChannelsFromStorage, cn, components, compressImage, createInputAndSelectFile, debounceFun, decryptImageToArrayBuffer, decryptImageToUint8Array, decryptImageUrl, defaultImageCompressionMaxSizeMB, defaultImageCompressionQuality, defineArrayItemPropSchema, defineCheckboxPropSchema, defineColorPropSchema, defineComponentPropsSchema, defineDatetimePropSchema, defineMaterial, defineNumberPropSchema, defineObjectPropSchema, defineSelectEnumPropSchema, defineSelectPropSchema, defineSwitchPropSchema, defineTextPropSchema, defineTextareaPropSchema, defineTimeRangePropSchema, disablePageScroll, enablePageScroll, encryptBncBuffer, followUser, formatVideoDuration, generateDynamicSign, generateMaterialMap, generateUUID, getAppId, getAtUserElement, getCookie, getCoverImage, getCurrentSecondTime, getCurrentUserId, getImageCompressionQuality, getImageResolutionFromFile, getResUrl, getSchemaDefaultProps, getUserId, guessImageContentTypeFromUrl, hashPassword, httpClient, imageCompressionQualityRules, isClient, isEncryptedImageUrl, isMobileDevice, loadComponent, loadHiddenChannelIdsFromStorage, loadMyChannelsFromStorage, normalizeClassName, numToString, overwriteMaterial, parseResolution, parseTextAtUserIds, pxToVw, randomString, removeCookie, replaceAtUserElement, replaceAtUserElementHtmlStr, rewriteComponent, saveHiddenChannelIdsToStorage, secondToTime, setCookie, stringToNumber, stripHtmlTags, uint8ArrayToBase64, uint8ArrayToNumberArray, unfollowUser, updateUrlParams, uploadFile, uploadToS3WithPresignedUrl, withInspectorMeta };
21
+ export { eventBus as EventBus, HttpClient, HttpError, INSPECTOR_META_KEY, ImageCompressionQualityRule, InferSchemaProps, MaterialComponentMode, MaterialComponentProps, MaterialMap, PresignedUploadInfo, RequestConfig, RequestMethod, ResponseData, SchemaHasDefaultValue, UploadFileResult, UploadToS3Options, UploadToS3Result, base64ToUint8Array, checkFollowStatus, clearMyChannelsFromStorage, cn, components, compressImage, createInputAndSelectFile, debounceFun, decryptImageToArrayBuffer, decryptImageToUint8Array, decryptImageUrl, defaultImageCompressionMaxSizeMB, defaultImageCompressionQuality, defineArrayItemPropSchema, defineCheckboxPropSchema, defineColorPropSchema, defineComponentPropsSchema, defineDatetimePropSchema, defineMaterial, defineNumberPropSchema, defineObjectPropSchema, defineSelectEnumPropSchema, defineSelectPropSchema, defineSwitchPropSchema, defineTextPropSchema, defineTextareaPropSchema, defineTimeRangePropSchema, disablePageScroll, enablePageScroll, encryptBncBuffer, followUser, formatVideoDuration, generateDynamicSign, generateMaterialMap, generateUUID, getAppId, getAtUserElement, getCookie, getCoverImage, getCurrentSecondTime, getCurrentUserId, getImageCompressionQuality, getImageResolutionFromFile, getResUrl, getSchemaDefaultProps, getUserId, guessImageContentTypeFromUrl, hashPassword, httpClient, imageCompressionQualityRules, isClient, isEncryptedImageUrl, isMobileDevice, loadComponent, loadHiddenChannelIdsFromStorage, loadMyChannelsFromStorage, normalizeClassName, numToString, overwriteMaterial, parseResolution, parseTextAtUserIds, pxToVw, randomString, removeCookie, replaceAtUserElement, replaceAtUserElementHtmlStr, rewriteComponent, saveHiddenChannelIdsToStorage, secondToTime, setCookie, stringToNumber, stripHtmlTags, uint8ArrayToBase64, uint8ArrayToNumberArray, unfollowUser, updateUrlParams, uploadFile, uploadToS3WithPresignedUrl, withInspectorMeta };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funhub/platform",
3
3
  "type": "module",
4
- "version": "0.1.38",
4
+ "version": "0.1.41",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "**/*.css"