@funhub/platform 0.1.124 → 0.1.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +5 -5
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +4 -6
- package/dist/components/biz/business/banner/variants/basic-banner/material.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.d.mts +1 -2
- package/dist/components/biz/business/banner-carousel/material.d.mts +4 -6
- package/dist/components/biz/business/banner-carousel/material.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/schema.d.mts +5 -5
- package/dist/components/biz/business/banner-carousel/schema.mjs +1 -1
- package/dist/components/biz/business/channel-list/material.d.mts +4 -6
- package/dist/components/biz/business/channel-list/material.mjs +1 -1
- package/dist/components/biz/business/channel-list/schema.d.mts +5 -5
- package/dist/components/biz/business/channel-list/schema.mjs +1 -1
- package/dist/components/biz/business/detail/shared/registry.d.mts +25 -27
- package/dist/components/biz/business/detail/shared/registry.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-actions/material.d.mts +2 -2
- package/dist/components/biz/business/detail/video-detail-actions/material.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-actions/schema.d.mts +1 -2
- package/dist/components/biz/business/detail/video-detail-actions/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info/material.d.mts +4 -6
- package/dist/components/biz/business/detail/video-detail-info/material.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info/schema.d.mts +4 -4
- package/dist/components/biz/business/detail/video-detail-info/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.d.mts +4 -6
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/material.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.d.mts +4 -4
- package/dist/components/biz/business/detail/video-detail-info-title-tags-episodes/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-player/material.d.mts +2 -2
- package/dist/components/biz/business/detail/video-detail-player/material.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-player/schema.d.mts +1 -2
- package/dist/components/biz/business/detail/video-detail-player/schema.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/material.d.mts +10 -12
- package/dist/components/biz/business/detail/video-detail-recommend/material.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/schema.d.mts +11 -11
- package/dist/components/biz/business/detail/video-detail-recommend/schema.mjs +1 -1
- package/dist/components/biz/business/floating-ball/material.d.mts +4 -6
- package/dist/components/biz/business/floating-ball/material.mjs +1 -1
- package/dist/components/biz/business/floating-ball/schema.d.mts +4 -4
- package/dist/components/biz/business/floating-ball/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/material.d.mts +2 -2
- package/dist/components/biz/business/header-search/header-avatar-icon/material.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/schema.d.mts +1 -2
- package/dist/components/biz/business/header-search/header-avatar-icon/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +4 -6
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +4 -4
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +4 -6
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.d.mts +4 -4
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +4 -6
- package/dist/components/biz/business/header-search/header-logo-search/material.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/schema.d.mts +4 -4
- package/dist/components/biz/business/header-search/header-logo-search/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/material.d.mts +2 -2
- package/dist/components/biz/business/header-search/header-search/material.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/schema.d.mts +1 -2
- package/dist/components/biz/business/header-search/header-search/schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/client.d.mts +1 -2
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +13 -13
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +12 -14
- package/dist/components/biz/business/home-recommend/home-recommend-grid/material.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/client.d.mts +1 -2
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +11 -11
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +10 -12
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.mjs +1 -1
- package/dist/components/biz/business/image-text-recommend/client.d.mts +1 -2
- package/dist/components/biz/business/image-text-recommend/material.d.mts +19 -21
- package/dist/components/biz/business/image-text-recommend/material.mjs +1 -1
- package/dist/components/biz/business/image-text-recommend/schema.d.mts +18 -19
- package/dist/components/biz/business/image-text-recommend/schema.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/material.d.mts +3 -3
- package/dist/components/biz/business/large-feature-grid/material.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
- package/dist/components/biz/business/marquee/client.d.mts +1 -2
- package/dist/components/biz/business/marquee/material.d.mts +15 -17
- package/dist/components/biz/business/marquee/material.mjs +1 -1
- package/dist/components/biz/business/marquee/schema.d.mts +14 -15
- package/dist/components/biz/business/marquee/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/material.d.mts +3 -3
- package/dist/components/biz/business/profile/profile-header/material.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/schema.d.mts +1 -2
- package/dist/components/biz/business/profile/profile-header/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/material.d.mts +2 -2
- package/dist/components/biz/business/profile/profile-main/material.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/schema.d.mts +1 -2
- package/dist/components/biz/business/profile/profile-main/schema.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.d.mts +1 -2
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.d.mts +1 -2
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +1 -2
- package/dist/components/biz/business/profile/profile-main/tabs/publish-tab/client.d.mts +1 -2
- package/dist/components/biz/business/search-history/client.d.mts +1 -2
- package/dist/components/biz/business/search-history/material.d.mts +4 -6
- package/dist/components/biz/business/search-history/material.mjs +1 -1
- package/dist/components/biz/business/search-history/schema.d.mts +3 -4
- package/dist/components/biz/business/search-history/schema.mjs +1 -1
- package/dist/components/biz/business/search-input/material.d.mts +2 -2
- package/dist/components/biz/business/search-input/material.mjs +1 -1
- package/dist/components/biz/business/search-input/schema.d.mts +1 -2
- package/dist/components/biz/business/search-input/schema.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/material.d.mts +9 -11
- package/dist/components/biz/business/shortcut-grid/material.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/schema.d.mts +9 -9
- package/dist/components/biz/business/shortcut-grid/schema.mjs +1 -1
- package/dist/components/biz/business/tab-bar/material.d.mts +2 -2
- package/dist/components/biz/business/tab-bar/material.mjs +1 -1
- package/dist/components/biz/business/tab-bar/schema.d.mts +1 -2
- package/dist/components/biz/business/tab-bar/schema.mjs +1 -1
- package/dist/components/biz/business/text-recommend/client.d.mts +1 -2
- package/dist/components/biz/business/text-recommend/material.d.mts +6 -8
- package/dist/components/biz/business/text-recommend/material.mjs +1 -1
- package/dist/components/biz/business/text-recommend/schema.d.mts +5 -6
- package/dist/components/biz/business/text-recommend/schema.mjs +1 -1
- package/dist/components/biz/example/button/material.d.mts +7 -9
- package/dist/components/biz/example/button/material.mjs +1 -1
- package/dist/components/biz/example/button/schema.d.mts +8 -8
- package/dist/components/biz/example/button/schema.mjs +1 -1
- package/dist/components/biz/renderer/renderer.d.mts +1 -1
- package/dist/components/biz/renderer/renderer.mjs +1 -1
- package/dist/components/pages/login/verify.mjs +3 -3
- package/dist/components/pages/search/search-result/search-video-info.mjs +1 -1
- package/dist/components/pages/settings/_components/reset-password-drawer.mjs +4 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/materials.d.mts +10 -10
- package/dist/service/register-by-verify-email-code.d.mts +15 -0
- package/dist/service/register-by-verify-email-code.mjs +2 -0
- package/dist/service.d.mts +2 -1
- package/dist/service.mjs +1 -1
- package/dist/utils/schema/inspector.d.mts +141 -141
- package/dist/utils/schema/material.d.mts +2 -2
- package/dist/utils/schema/schema.d.mts +35 -70
- package/dist/utils/schema/schema.mjs +1 -1
- package/dist/utils/schema/utils.d.mts +0 -6
- package/dist/utils.d.mts +5 -5
- package/package.json +2 -1
package/dist/service.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{gCommunityGetCollectionInfo as e,gCommunityGetComments as t,gCommunityGetContentInfo as n,gCommunityGetContentList as r,gCommunityGetHotContentList as i,gCommunityGetSubscribedCollections as a,gCommunityGetUserCollections as o,gContentGetAdvertiseByCode as s,gContentGetAppChannelBlock as c,gContentGetAppChannelBlockData as l,gContentGetAppChannels as u,gContentGetAppComponent as d,gContentGetGuessYouLikeVideos as f,gContentGetHotVideoList as p,gContentGetRecommendSearchList as m,gContentGetRecommendVideoList as h,gContentGetVideoDetail as g,gContentGetVideoDetailByApi as _,gContentListVisibleFloatingBall as v,gContentProcessM3u8 as y,gInteractionCheckMutualFollow as b,gInteractionGetBrowseList as x,gInteractionGetContentDislikeList as S,gInteractionGetContentLikeList as C,gInteractionGetDislikeList as w,gInteractionGetFolder as T,gInteractionGetFolderStats as E,gInteractionGetFollowStats as D,gInteractionGetFollowerList as O,gInteractionGetFollowingContentList as k,gInteractionGetFollowingList as A,gInteractionGetFollowingUserUpdates as j,gInteractionGetLikeList as M,gInteractionListCollects as N,gInteractionListFolders as P,gUserGetGuestIdentity as F,gUserGetUserEditInfo as I,gUserGetUserInfo as L,gUserGetUserPrivacySettings as R,gUserViewUserInfo as z,pCommunityAddContentToCollection as B,pCommunityCreateCollection as V,pCommunityCreateComment as H,pCommunityDeleteCollection as U,pCommunityDeleteComment as W,pCommunityDeleteContent as G,pCommunityDislikeComment as K,pCommunityGetUploadPresignedURL as q,pCommunityLikeComment as J,pCommunityMoveCollectionContent as Y,pCommunityPublishContent as X,pCommunityRemoveContentFromCollection as Z,pCommunitySearchCurAccountFollowingUsersInfo as Q,pCommunityShareContent as $,pCommunitySubscribeCollection as ee,pCommunityUpdateCollection as te,pCommunityUpdateContent as ne,pCommunityUploadMedia as re,pContentBatchGetVideoDetail as ie,pContentGetNewstVideoList as ae,pContentGetPopularVideoList as oe,pInteractionAddCollect as se,pInteractionBatchClearBrowse as ce,pInteractionBatchDeleteCollects as le,pInteractionBatchGetCommentLikeStatus as ue,pInteractionBatchGetFollowStats as de,pInteractionBatchGetLikeStatus as fe,pInteractionBatchQueryContentInteractions as pe,pInteractionBrowse as me,pInteractionCancelDislike as he,pInteractionCancelLike as ge,pInteractionCheckCollect as _e,pInteractionCheckFollow as ve,pInteractionClearBrowseHistory as ye,pInteractionCreateFolder as be,pInteractionDeleteBrowseRecord as xe,pInteractionDeleteFolder as Se,pInteractionDislike as Ce,pInteractionDislikeComment as we,pInteractionFollow as Te,pInteractionLike as Ee,pInteractionLikeComment as De,pInteractionMoveCollects as Oe,pInteractionRemoveCollect as ke,pInteractionTrackEventsBatch as Ae,pInteractionUnfollow as je,pInteractionUnifiedBatchLikeDislike as Me,pInteractionUpdateFolder as Ne,pInteractionUpdateFollowingContentUpdateTime as Pe,pUserEditUserInfo as Fe,pUserLogin as Ie,pUserRegister as Le,pUserResetForgetPassword as Re,pUserResetPassword as ze,pUserSendEmailCode as Be,pUserSendForgetEmailCode as Ve,pUserSendResetPasswordEmailCode as He,pUserUploadUserBgImage as Ue,pUserUserFeedback as We,pUserUserPrivacySettings as Ge,pUserVerifyEmailCode as Ke,pUserVerifyForgetEmailCode as qe,pUserVerifyResetPasswordEmailCode as Je}from"./service/generated/client.mjs";import{createQueryKey as Ye,gCommunityGetCollectionInfoKey as Xe,gCommunityGetCommentsKey as Ze,gCommunityGetContentInfoKey as Qe,gCommunityGetContentListKey as $e,gCommunityGetHotContentListKey as et,gCommunityGetSubscribedCollectionsKey as tt,gCommunityGetUserCollectionsKey as nt,gContentGetAdvertiseByCodeKey as rt,gContentGetAppChannelBlockDataKey as it,gContentGetAppChannelBlockKey as at,gContentGetAppChannelsKey as ot,gContentGetAppComponentKey as st,gContentGetGuessYouLikeVideosKey as ct,gContentGetHotVideoListKey as lt,gContentGetRecommendSearchListKey as ut,gContentGetRecommendVideoListKey as dt,gContentGetVideoDetailByApiKey as ft,gContentGetVideoDetailKey as pt,gContentListVisibleFloatingBallKey as mt,gContentProcessM3u8Key as ht,gInteractionCheckMutualFollowKey as gt,gInteractionGetBrowseListKey as _t,gInteractionGetContentDislikeListKey as vt,gInteractionGetContentLikeListKey as yt,gInteractionGetDislikeListKey as bt,gInteractionGetFolderKey as xt,gInteractionGetFolderStatsKey as St,gInteractionGetFollowStatsKey as Ct,gInteractionGetFollowerListKey as wt,gInteractionGetFollowingContentListKey as Tt,gInteractionGetFollowingListKey as Et,gInteractionGetFollowingUserUpdatesKey as Dt,gInteractionGetLikeListKey as Ot,gInteractionListCollectsKey as kt,gInteractionListFoldersKey as At,gUserGetGuestIdentityKey as jt,gUserGetUserEditInfoKey as Mt,gUserGetUserInfoKey as Nt,gUserGetUserPrivacySettingsKey as Pt,gUserViewUserInfoKey as Ft,pCommunityAddContentToCollectionKey as It,pCommunityCreateCollectionKey as Lt,pCommunityCreateCommentKey as Rt,pCommunityDeleteCollectionKey as zt,pCommunityDeleteCommentKey as Bt,pCommunityDeleteContentKey as Vt,pCommunityDislikeCommentKey as Ht,pCommunityGetUploadPresignedURLKey as Ut,pCommunityLikeCommentKey as Wt,pCommunityMoveCollectionContentKey as Gt,pCommunityPublishContentKey as Kt,pCommunityRemoveContentFromCollectionKey as qt,pCommunitySearchCurAccountFollowingUsersInfoKey as Jt,pCommunityShareContentKey as Yt,pCommunitySubscribeCollectionKey as Xt,pCommunityUpdateCollectionKey as Zt,pCommunityUpdateContentKey as Qt,pCommunityUploadMediaKey as $t,pContentBatchGetVideoDetailKey as en,pContentGetNewstVideoListKey as tn,pContentGetPopularVideoListKey as nn,pInteractionAddCollectKey as rn,pInteractionBatchClearBrowseKey as an,pInteractionBatchDeleteCollectsKey as on,pInteractionBatchGetCommentLikeStatusKey as sn,pInteractionBatchGetFollowStatsKey as cn,pInteractionBatchGetLikeStatusKey as ln,pInteractionBatchQueryContentInteractionsKey as un,pInteractionBrowseKey as dn,pInteractionCancelDislikeKey as fn,pInteractionCancelLikeKey as pn,pInteractionCheckCollectKey as mn,pInteractionCheckFollowKey as hn,pInteractionClearBrowseHistoryKey as gn,pInteractionCreateFolderKey as _n,pInteractionDeleteBrowseRecordKey as vn,pInteractionDeleteFolderKey as yn,pInteractionDislikeCommentKey as bn,pInteractionDislikeKey as xn,pInteractionFollowKey as Sn,pInteractionLikeCommentKey as Cn,pInteractionLikeKey as wn,pInteractionMoveCollectsKey as Tn,pInteractionRemoveCollectKey as En,pInteractionTrackEventsBatchKey as Dn,pInteractionUnfollowKey as On,pInteractionUnifiedBatchLikeDislikeKey as kn,pInteractionUpdateFolderKey as An,pInteractionUpdateFollowingContentUpdateTimeKey as jn,pUserEditUserInfoKey as Mn,pUserLoginKey as Nn,pUserRegisterKey as Pn,pUserResetForgetPasswordKey as Fn,pUserResetPasswordKey as In,pUserSendEmailCodeKey as Ln,pUserSendForgetEmailCodeKey as Rn,pUserSendResetPasswordEmailCodeKey as zn,pUserUploadUserBgImageKey as Bn,pUserUserFeedbackKey as Vn,pUserUserPrivacySettingsKey as Hn,pUserVerifyEmailCodeKey as Un,pUserVerifyForgetEmailCodeKey as Wn,pUserVerifyResetPasswordEmailCodeKey as Gn}from"./service/generated/tanstack.mjs";export{Ye as createQueryKey,e as gCommunityGetCollectionInfo,Xe as gCommunityGetCollectionInfoKey,t as gCommunityGetComments,Ze as gCommunityGetCommentsKey,n as gCommunityGetContentInfo,Qe as gCommunityGetContentInfoKey,r as gCommunityGetContentList,$e as gCommunityGetContentListKey,i as gCommunityGetHotContentList,et as gCommunityGetHotContentListKey,a as gCommunityGetSubscribedCollections,tt as gCommunityGetSubscribedCollectionsKey,o as gCommunityGetUserCollections,nt as gCommunityGetUserCollectionsKey,s as gContentGetAdvertiseByCode,rt as gContentGetAdvertiseByCodeKey,c as gContentGetAppChannelBlock,l as gContentGetAppChannelBlockData,it as gContentGetAppChannelBlockDataKey,at as gContentGetAppChannelBlockKey,u as gContentGetAppChannels,ot as gContentGetAppChannelsKey,d as gContentGetAppComponent,st as gContentGetAppComponentKey,f as gContentGetGuessYouLikeVideos,ct as gContentGetGuessYouLikeVideosKey,p as gContentGetHotVideoList,lt as gContentGetHotVideoListKey,m as gContentGetRecommendSearchList,ut as gContentGetRecommendSearchListKey,h as gContentGetRecommendVideoList,dt as gContentGetRecommendVideoListKey,g as gContentGetVideoDetail,_ as gContentGetVideoDetailByApi,ft as gContentGetVideoDetailByApiKey,pt as gContentGetVideoDetailKey,v as gContentListVisibleFloatingBall,mt as gContentListVisibleFloatingBallKey,y as gContentProcessM3u8,ht as gContentProcessM3u8Key,b as gInteractionCheckMutualFollow,gt as gInteractionCheckMutualFollowKey,x as gInteractionGetBrowseList,_t as gInteractionGetBrowseListKey,S as gInteractionGetContentDislikeList,vt as gInteractionGetContentDislikeListKey,C as gInteractionGetContentLikeList,yt as gInteractionGetContentLikeListKey,w as gInteractionGetDislikeList,bt as gInteractionGetDislikeListKey,T as gInteractionGetFolder,xt as gInteractionGetFolderKey,E as gInteractionGetFolderStats,St as gInteractionGetFolderStatsKey,D as gInteractionGetFollowStats,Ct as gInteractionGetFollowStatsKey,O as gInteractionGetFollowerList,wt as gInteractionGetFollowerListKey,k as gInteractionGetFollowingContentList,Tt as gInteractionGetFollowingContentListKey,A as gInteractionGetFollowingList,Et as gInteractionGetFollowingListKey,j as gInteractionGetFollowingUserUpdates,Dt as gInteractionGetFollowingUserUpdatesKey,M as gInteractionGetLikeList,Ot as gInteractionGetLikeListKey,N as gInteractionListCollects,kt as gInteractionListCollectsKey,P as gInteractionListFolders,At as gInteractionListFoldersKey,F as gUserGetGuestIdentity,jt as gUserGetGuestIdentityKey,I as gUserGetUserEditInfo,Mt as gUserGetUserEditInfoKey,L as gUserGetUserInfo,Nt as gUserGetUserInfoKey,R as gUserGetUserPrivacySettings,Pt as gUserGetUserPrivacySettingsKey,z as gUserViewUserInfo,Ft as gUserViewUserInfoKey,B as pCommunityAddContentToCollection,It as pCommunityAddContentToCollectionKey,V as pCommunityCreateCollection,Lt as pCommunityCreateCollectionKey,H as pCommunityCreateComment,Rt as pCommunityCreateCommentKey,U as pCommunityDeleteCollection,zt as pCommunityDeleteCollectionKey,W as pCommunityDeleteComment,Bt as pCommunityDeleteCommentKey,G as pCommunityDeleteContent,Vt as pCommunityDeleteContentKey,K as pCommunityDislikeComment,Ht as pCommunityDislikeCommentKey,q as pCommunityGetUploadPresignedURL,Ut as pCommunityGetUploadPresignedURLKey,J as pCommunityLikeComment,Wt as pCommunityLikeCommentKey,Y as pCommunityMoveCollectionContent,Gt as pCommunityMoveCollectionContentKey,X as pCommunityPublishContent,Kt as pCommunityPublishContentKey,Z as pCommunityRemoveContentFromCollection,qt as pCommunityRemoveContentFromCollectionKey,Q as pCommunitySearchCurAccountFollowingUsersInfo,Jt as pCommunitySearchCurAccountFollowingUsersInfoKey,$ as pCommunityShareContent,Yt as pCommunityShareContentKey,ee as pCommunitySubscribeCollection,Xt as pCommunitySubscribeCollectionKey,te as pCommunityUpdateCollection,Zt as pCommunityUpdateCollectionKey,ne as pCommunityUpdateContent,Qt as pCommunityUpdateContentKey,re as pCommunityUploadMedia,$t as pCommunityUploadMediaKey,ie as pContentBatchGetVideoDetail,en as pContentBatchGetVideoDetailKey,ae as pContentGetNewstVideoList,tn as pContentGetNewstVideoListKey,oe as pContentGetPopularVideoList,nn as pContentGetPopularVideoListKey,se as pInteractionAddCollect,rn as pInteractionAddCollectKey,ce as pInteractionBatchClearBrowse,an as pInteractionBatchClearBrowseKey,le as pInteractionBatchDeleteCollects,on as pInteractionBatchDeleteCollectsKey,ue as pInteractionBatchGetCommentLikeStatus,sn as pInteractionBatchGetCommentLikeStatusKey,de as pInteractionBatchGetFollowStats,cn as pInteractionBatchGetFollowStatsKey,fe as pInteractionBatchGetLikeStatus,ln as pInteractionBatchGetLikeStatusKey,pe as pInteractionBatchQueryContentInteractions,un as pInteractionBatchQueryContentInteractionsKey,me as pInteractionBrowse,dn as pInteractionBrowseKey,he as pInteractionCancelDislike,fn as pInteractionCancelDislikeKey,ge as pInteractionCancelLike,pn as pInteractionCancelLikeKey,_e as pInteractionCheckCollect,mn as pInteractionCheckCollectKey,ve as pInteractionCheckFollow,hn as pInteractionCheckFollowKey,ye as pInteractionClearBrowseHistory,gn as pInteractionClearBrowseHistoryKey,be as pInteractionCreateFolder,_n as pInteractionCreateFolderKey,xe as pInteractionDeleteBrowseRecord,vn as pInteractionDeleteBrowseRecordKey,Se as pInteractionDeleteFolder,yn as pInteractionDeleteFolderKey,Ce as pInteractionDislike,we as pInteractionDislikeComment,bn as pInteractionDislikeCommentKey,xn as pInteractionDislikeKey,Te as pInteractionFollow,Sn as pInteractionFollowKey,Ee as pInteractionLike,De as pInteractionLikeComment,Cn as pInteractionLikeCommentKey,wn as pInteractionLikeKey,Oe as pInteractionMoveCollects,Tn as pInteractionMoveCollectsKey,ke as pInteractionRemoveCollect,En as pInteractionRemoveCollectKey,Ae as pInteractionTrackEventsBatch,Dn as pInteractionTrackEventsBatchKey,je as pInteractionUnfollow,On as pInteractionUnfollowKey,Me as pInteractionUnifiedBatchLikeDislike,kn as pInteractionUnifiedBatchLikeDislikeKey,Ne as pInteractionUpdateFolder,An as pInteractionUpdateFolderKey,Pe as pInteractionUpdateFollowingContentUpdateTime,jn as pInteractionUpdateFollowingContentUpdateTimeKey,Fe as pUserEditUserInfo,Mn as pUserEditUserInfoKey,Ie as pUserLogin,Nn as pUserLoginKey,Le as pUserRegister,Pn as pUserRegisterKey,Re as pUserResetForgetPassword,Fn as pUserResetForgetPasswordKey,ze as pUserResetPassword,In as pUserResetPasswordKey,Be as pUserSendEmailCode,Ln as pUserSendEmailCodeKey,Ve as pUserSendForgetEmailCode,Rn as pUserSendForgetEmailCodeKey,He as pUserSendResetPasswordEmailCode,zn as pUserSendResetPasswordEmailCodeKey,Ue as pUserUploadUserBgImage,Bn as pUserUploadUserBgImageKey,We as pUserUserFeedback,Vn as pUserUserFeedbackKey,Ge as pUserUserPrivacySettings,Hn as pUserUserPrivacySettingsKey,Ke as pUserVerifyEmailCode,Un as pUserVerifyEmailCodeKey,qe as pUserVerifyForgetEmailCode,Wn as pUserVerifyForgetEmailCodeKey,Je as pUserVerifyResetPasswordEmailCode,Gn as pUserVerifyResetPasswordEmailCodeKey};
|
|
2
|
+
import{gCommunityGetCollectionInfo as e,gCommunityGetComments as t,gCommunityGetContentInfo as n,gCommunityGetContentList as r,gCommunityGetHotContentList as i,gCommunityGetSubscribedCollections as a,gCommunityGetUserCollections as o,gContentGetAdvertiseByCode as s,gContentGetAppChannelBlock as c,gContentGetAppChannelBlockData as l,gContentGetAppChannels as u,gContentGetAppComponent as d,gContentGetGuessYouLikeVideos as f,gContentGetHotVideoList as p,gContentGetRecommendSearchList as m,gContentGetRecommendVideoList as h,gContentGetVideoDetail as g,gContentGetVideoDetailByApi as _,gContentListVisibleFloatingBall as v,gContentProcessM3u8 as y,gInteractionCheckMutualFollow as b,gInteractionGetBrowseList as x,gInteractionGetContentDislikeList as S,gInteractionGetContentLikeList as C,gInteractionGetDislikeList as w,gInteractionGetFolder as T,gInteractionGetFolderStats as E,gInteractionGetFollowStats as D,gInteractionGetFollowerList as O,gInteractionGetFollowingContentList as k,gInteractionGetFollowingList as A,gInteractionGetFollowingUserUpdates as j,gInteractionGetLikeList as M,gInteractionListCollects as N,gInteractionListFolders as P,gUserGetGuestIdentity as F,gUserGetUserEditInfo as I,gUserGetUserInfo as L,gUserGetUserPrivacySettings as R,gUserViewUserInfo as z,pCommunityAddContentToCollection as B,pCommunityCreateCollection as V,pCommunityCreateComment as H,pCommunityDeleteCollection as U,pCommunityDeleteComment as W,pCommunityDeleteContent as G,pCommunityDislikeComment as K,pCommunityGetUploadPresignedURL as q,pCommunityLikeComment as J,pCommunityMoveCollectionContent as Y,pCommunityPublishContent as X,pCommunityRemoveContentFromCollection as Z,pCommunitySearchCurAccountFollowingUsersInfo as Q,pCommunityShareContent as $,pCommunitySubscribeCollection as ee,pCommunityUpdateCollection as te,pCommunityUpdateContent as ne,pCommunityUploadMedia as re,pContentBatchGetVideoDetail as ie,pContentGetNewstVideoList as ae,pContentGetPopularVideoList as oe,pInteractionAddCollect as se,pInteractionBatchClearBrowse as ce,pInteractionBatchDeleteCollects as le,pInteractionBatchGetCommentLikeStatus as ue,pInteractionBatchGetFollowStats as de,pInteractionBatchGetLikeStatus as fe,pInteractionBatchQueryContentInteractions as pe,pInteractionBrowse as me,pInteractionCancelDislike as he,pInteractionCancelLike as ge,pInteractionCheckCollect as _e,pInteractionCheckFollow as ve,pInteractionClearBrowseHistory as ye,pInteractionCreateFolder as be,pInteractionDeleteBrowseRecord as xe,pInteractionDeleteFolder as Se,pInteractionDislike as Ce,pInteractionDislikeComment as we,pInteractionFollow as Te,pInteractionLike as Ee,pInteractionLikeComment as De,pInteractionMoveCollects as Oe,pInteractionRemoveCollect as ke,pInteractionTrackEventsBatch as Ae,pInteractionUnfollow as je,pInteractionUnifiedBatchLikeDislike as Me,pInteractionUpdateFolder as Ne,pInteractionUpdateFollowingContentUpdateTime as Pe,pUserEditUserInfo as Fe,pUserLogin as Ie,pUserRegister as Le,pUserResetForgetPassword as Re,pUserResetPassword as ze,pUserSendEmailCode as Be,pUserSendForgetEmailCode as Ve,pUserSendResetPasswordEmailCode as He,pUserUploadUserBgImage as Ue,pUserUserFeedback as We,pUserUserPrivacySettings as Ge,pUserVerifyEmailCode as Ke,pUserVerifyForgetEmailCode as qe,pUserVerifyResetPasswordEmailCode as Je}from"./service/generated/client.mjs";import{createQueryKey as Ye,gCommunityGetCollectionInfoKey as Xe,gCommunityGetCommentsKey as Ze,gCommunityGetContentInfoKey as Qe,gCommunityGetContentListKey as $e,gCommunityGetHotContentListKey as et,gCommunityGetSubscribedCollectionsKey as tt,gCommunityGetUserCollectionsKey as nt,gContentGetAdvertiseByCodeKey as rt,gContentGetAppChannelBlockDataKey as it,gContentGetAppChannelBlockKey as at,gContentGetAppChannelsKey as ot,gContentGetAppComponentKey as st,gContentGetGuessYouLikeVideosKey as ct,gContentGetHotVideoListKey as lt,gContentGetRecommendSearchListKey as ut,gContentGetRecommendVideoListKey as dt,gContentGetVideoDetailByApiKey as ft,gContentGetVideoDetailKey as pt,gContentListVisibleFloatingBallKey as mt,gContentProcessM3u8Key as ht,gInteractionCheckMutualFollowKey as gt,gInteractionGetBrowseListKey as _t,gInteractionGetContentDislikeListKey as vt,gInteractionGetContentLikeListKey as yt,gInteractionGetDislikeListKey as bt,gInteractionGetFolderKey as xt,gInteractionGetFolderStatsKey as St,gInteractionGetFollowStatsKey as Ct,gInteractionGetFollowerListKey as wt,gInteractionGetFollowingContentListKey as Tt,gInteractionGetFollowingListKey as Et,gInteractionGetFollowingUserUpdatesKey as Dt,gInteractionGetLikeListKey as Ot,gInteractionListCollectsKey as kt,gInteractionListFoldersKey as At,gUserGetGuestIdentityKey as jt,gUserGetUserEditInfoKey as Mt,gUserGetUserInfoKey as Nt,gUserGetUserPrivacySettingsKey as Pt,gUserViewUserInfoKey as Ft,pCommunityAddContentToCollectionKey as It,pCommunityCreateCollectionKey as Lt,pCommunityCreateCommentKey as Rt,pCommunityDeleteCollectionKey as zt,pCommunityDeleteCommentKey as Bt,pCommunityDeleteContentKey as Vt,pCommunityDislikeCommentKey as Ht,pCommunityGetUploadPresignedURLKey as Ut,pCommunityLikeCommentKey as Wt,pCommunityMoveCollectionContentKey as Gt,pCommunityPublishContentKey as Kt,pCommunityRemoveContentFromCollectionKey as qt,pCommunitySearchCurAccountFollowingUsersInfoKey as Jt,pCommunityShareContentKey as Yt,pCommunitySubscribeCollectionKey as Xt,pCommunityUpdateCollectionKey as Zt,pCommunityUpdateContentKey as Qt,pCommunityUploadMediaKey as $t,pContentBatchGetVideoDetailKey as en,pContentGetNewstVideoListKey as tn,pContentGetPopularVideoListKey as nn,pInteractionAddCollectKey as rn,pInteractionBatchClearBrowseKey as an,pInteractionBatchDeleteCollectsKey as on,pInteractionBatchGetCommentLikeStatusKey as sn,pInteractionBatchGetFollowStatsKey as cn,pInteractionBatchGetLikeStatusKey as ln,pInteractionBatchQueryContentInteractionsKey as un,pInteractionBrowseKey as dn,pInteractionCancelDislikeKey as fn,pInteractionCancelLikeKey as pn,pInteractionCheckCollectKey as mn,pInteractionCheckFollowKey as hn,pInteractionClearBrowseHistoryKey as gn,pInteractionCreateFolderKey as _n,pInteractionDeleteBrowseRecordKey as vn,pInteractionDeleteFolderKey as yn,pInteractionDislikeCommentKey as bn,pInteractionDislikeKey as xn,pInteractionFollowKey as Sn,pInteractionLikeCommentKey as Cn,pInteractionLikeKey as wn,pInteractionMoveCollectsKey as Tn,pInteractionRemoveCollectKey as En,pInteractionTrackEventsBatchKey as Dn,pInteractionUnfollowKey as On,pInteractionUnifiedBatchLikeDislikeKey as kn,pInteractionUpdateFolderKey as An,pInteractionUpdateFollowingContentUpdateTimeKey as jn,pUserEditUserInfoKey as Mn,pUserLoginKey as Nn,pUserRegisterKey as Pn,pUserResetForgetPasswordKey as Fn,pUserResetPasswordKey as In,pUserSendEmailCodeKey as Ln,pUserSendForgetEmailCodeKey as Rn,pUserSendResetPasswordEmailCodeKey as zn,pUserUploadUserBgImageKey as Bn,pUserUserFeedbackKey as Vn,pUserUserPrivacySettingsKey as Hn,pUserVerifyEmailCodeKey as Un,pUserVerifyForgetEmailCodeKey as Wn,pUserVerifyResetPasswordEmailCodeKey as Gn}from"./service/generated/tanstack.mjs";import{pUserRegisterByVerifyEmailCode as Kn}from"./service/register-by-verify-email-code.mjs";export{Ye as createQueryKey,e as gCommunityGetCollectionInfo,Xe as gCommunityGetCollectionInfoKey,t as gCommunityGetComments,Ze as gCommunityGetCommentsKey,n as gCommunityGetContentInfo,Qe as gCommunityGetContentInfoKey,r as gCommunityGetContentList,$e as gCommunityGetContentListKey,i as gCommunityGetHotContentList,et as gCommunityGetHotContentListKey,a as gCommunityGetSubscribedCollections,tt as gCommunityGetSubscribedCollectionsKey,o as gCommunityGetUserCollections,nt as gCommunityGetUserCollectionsKey,s as gContentGetAdvertiseByCode,rt as gContentGetAdvertiseByCodeKey,c as gContentGetAppChannelBlock,l as gContentGetAppChannelBlockData,it as gContentGetAppChannelBlockDataKey,at as gContentGetAppChannelBlockKey,u as gContentGetAppChannels,ot as gContentGetAppChannelsKey,d as gContentGetAppComponent,st as gContentGetAppComponentKey,f as gContentGetGuessYouLikeVideos,ct as gContentGetGuessYouLikeVideosKey,p as gContentGetHotVideoList,lt as gContentGetHotVideoListKey,m as gContentGetRecommendSearchList,ut as gContentGetRecommendSearchListKey,h as gContentGetRecommendVideoList,dt as gContentGetRecommendVideoListKey,g as gContentGetVideoDetail,_ as gContentGetVideoDetailByApi,ft as gContentGetVideoDetailByApiKey,pt as gContentGetVideoDetailKey,v as gContentListVisibleFloatingBall,mt as gContentListVisibleFloatingBallKey,y as gContentProcessM3u8,ht as gContentProcessM3u8Key,b as gInteractionCheckMutualFollow,gt as gInteractionCheckMutualFollowKey,x as gInteractionGetBrowseList,_t as gInteractionGetBrowseListKey,S as gInteractionGetContentDislikeList,vt as gInteractionGetContentDislikeListKey,C as gInteractionGetContentLikeList,yt as gInteractionGetContentLikeListKey,w as gInteractionGetDislikeList,bt as gInteractionGetDislikeListKey,T as gInteractionGetFolder,xt as gInteractionGetFolderKey,E as gInteractionGetFolderStats,St as gInteractionGetFolderStatsKey,D as gInteractionGetFollowStats,Ct as gInteractionGetFollowStatsKey,O as gInteractionGetFollowerList,wt as gInteractionGetFollowerListKey,k as gInteractionGetFollowingContentList,Tt as gInteractionGetFollowingContentListKey,A as gInteractionGetFollowingList,Et as gInteractionGetFollowingListKey,j as gInteractionGetFollowingUserUpdates,Dt as gInteractionGetFollowingUserUpdatesKey,M as gInteractionGetLikeList,Ot as gInteractionGetLikeListKey,N as gInteractionListCollects,kt as gInteractionListCollectsKey,P as gInteractionListFolders,At as gInteractionListFoldersKey,F as gUserGetGuestIdentity,jt as gUserGetGuestIdentityKey,I as gUserGetUserEditInfo,Mt as gUserGetUserEditInfoKey,L as gUserGetUserInfo,Nt as gUserGetUserInfoKey,R as gUserGetUserPrivacySettings,Pt as gUserGetUserPrivacySettingsKey,z as gUserViewUserInfo,Ft as gUserViewUserInfoKey,B as pCommunityAddContentToCollection,It as pCommunityAddContentToCollectionKey,V as pCommunityCreateCollection,Lt as pCommunityCreateCollectionKey,H as pCommunityCreateComment,Rt as pCommunityCreateCommentKey,U as pCommunityDeleteCollection,zt as pCommunityDeleteCollectionKey,W as pCommunityDeleteComment,Bt as pCommunityDeleteCommentKey,G as pCommunityDeleteContent,Vt as pCommunityDeleteContentKey,K as pCommunityDislikeComment,Ht as pCommunityDislikeCommentKey,q as pCommunityGetUploadPresignedURL,Ut as pCommunityGetUploadPresignedURLKey,J as pCommunityLikeComment,Wt as pCommunityLikeCommentKey,Y as pCommunityMoveCollectionContent,Gt as pCommunityMoveCollectionContentKey,X as pCommunityPublishContent,Kt as pCommunityPublishContentKey,Z as pCommunityRemoveContentFromCollection,qt as pCommunityRemoveContentFromCollectionKey,Q as pCommunitySearchCurAccountFollowingUsersInfo,Jt as pCommunitySearchCurAccountFollowingUsersInfoKey,$ as pCommunityShareContent,Yt as pCommunityShareContentKey,ee as pCommunitySubscribeCollection,Xt as pCommunitySubscribeCollectionKey,te as pCommunityUpdateCollection,Zt as pCommunityUpdateCollectionKey,ne as pCommunityUpdateContent,Qt as pCommunityUpdateContentKey,re as pCommunityUploadMedia,$t as pCommunityUploadMediaKey,ie as pContentBatchGetVideoDetail,en as pContentBatchGetVideoDetailKey,ae as pContentGetNewstVideoList,tn as pContentGetNewstVideoListKey,oe as pContentGetPopularVideoList,nn as pContentGetPopularVideoListKey,se as pInteractionAddCollect,rn as pInteractionAddCollectKey,ce as pInteractionBatchClearBrowse,an as pInteractionBatchClearBrowseKey,le as pInteractionBatchDeleteCollects,on as pInteractionBatchDeleteCollectsKey,ue as pInteractionBatchGetCommentLikeStatus,sn as pInteractionBatchGetCommentLikeStatusKey,de as pInteractionBatchGetFollowStats,cn as pInteractionBatchGetFollowStatsKey,fe as pInteractionBatchGetLikeStatus,ln as pInteractionBatchGetLikeStatusKey,pe as pInteractionBatchQueryContentInteractions,un as pInteractionBatchQueryContentInteractionsKey,me as pInteractionBrowse,dn as pInteractionBrowseKey,he as pInteractionCancelDislike,fn as pInteractionCancelDislikeKey,ge as pInteractionCancelLike,pn as pInteractionCancelLikeKey,_e as pInteractionCheckCollect,mn as pInteractionCheckCollectKey,ve as pInteractionCheckFollow,hn as pInteractionCheckFollowKey,ye as pInteractionClearBrowseHistory,gn as pInteractionClearBrowseHistoryKey,be as pInteractionCreateFolder,_n as pInteractionCreateFolderKey,xe as pInteractionDeleteBrowseRecord,vn as pInteractionDeleteBrowseRecordKey,Se as pInteractionDeleteFolder,yn as pInteractionDeleteFolderKey,Ce as pInteractionDislike,we as pInteractionDislikeComment,bn as pInteractionDislikeCommentKey,xn as pInteractionDislikeKey,Te as pInteractionFollow,Sn as pInteractionFollowKey,Ee as pInteractionLike,De as pInteractionLikeComment,Cn as pInteractionLikeCommentKey,wn as pInteractionLikeKey,Oe as pInteractionMoveCollects,Tn as pInteractionMoveCollectsKey,ke as pInteractionRemoveCollect,En as pInteractionRemoveCollectKey,Ae as pInteractionTrackEventsBatch,Dn as pInteractionTrackEventsBatchKey,je as pInteractionUnfollow,On as pInteractionUnfollowKey,Me as pInteractionUnifiedBatchLikeDislike,kn as pInteractionUnifiedBatchLikeDislikeKey,Ne as pInteractionUpdateFolder,An as pInteractionUpdateFolderKey,Pe as pInteractionUpdateFollowingContentUpdateTime,jn as pInteractionUpdateFollowingContentUpdateTimeKey,Fe as pUserEditUserInfo,Mn as pUserEditUserInfoKey,Ie as pUserLogin,Nn as pUserLoginKey,Le as pUserRegister,Kn as pUserRegisterByVerifyEmailCode,Pn as pUserRegisterKey,Re as pUserResetForgetPassword,Fn as pUserResetForgetPasswordKey,ze as pUserResetPassword,In as pUserResetPasswordKey,Be as pUserSendEmailCode,Ln as pUserSendEmailCodeKey,Ve as pUserSendForgetEmailCode,Rn as pUserSendForgetEmailCodeKey,He as pUserSendResetPasswordEmailCode,zn as pUserSendResetPasswordEmailCodeKey,Ue as pUserUploadUserBgImage,Bn as pUserUploadUserBgImageKey,We as pUserUserFeedback,Vn as pUserUserFeedbackKey,Ge as pUserUserPrivacySettings,Hn as pUserUserPrivacySettingsKey,Ke as pUserVerifyEmailCode,Un as pUserVerifyEmailCodeKey,qe as pUserVerifyForgetEmailCode,Wn as pUserVerifyForgetEmailCodeKey,Je as pUserVerifyResetPasswordEmailCode,Gn as pUserVerifyResetPasswordEmailCodeKey};
|
|
@@ -1,147 +1,147 @@
|
|
|
1
1
|
|
|
2
|
-
import z
|
|
2
|
+
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region utils/schema/inspector.d.ts
|
|
5
5
|
type InspectorFieldOption<T> = Omit<T, 'type'>;
|
|
6
|
-
declare const textInspectorFieldSchema: z
|
|
7
|
-
type: z
|
|
8
|
-
defaultValue: z
|
|
9
|
-
label: z
|
|
10
|
-
description: z
|
|
11
|
-
}, z
|
|
12
|
-
type TextInspectorFieldOption = InspectorFieldOption<z
|
|
13
|
-
declare const textareaInspectorFieldSchema: z
|
|
14
|
-
type: z
|
|
15
|
-
defaultValue: z
|
|
16
|
-
label: z
|
|
17
|
-
description: z
|
|
18
|
-
}, z
|
|
19
|
-
type TextareaInspectorFieldOption = InspectorFieldOption<z
|
|
20
|
-
declare const numberInspectorFieldSchema: z
|
|
21
|
-
type: z
|
|
22
|
-
defaultValue: z
|
|
23
|
-
label: z
|
|
24
|
-
description: z
|
|
25
|
-
}, z
|
|
26
|
-
type NumberInspectorFieldOption = InspectorFieldOption<z
|
|
27
|
-
declare const colorInspectorFieldSchema: z
|
|
28
|
-
type: z
|
|
29
|
-
defaultValue: z
|
|
30
|
-
label: z
|
|
31
|
-
description: z
|
|
32
|
-
}, z
|
|
33
|
-
type ColorInspectorFieldOption = InspectorFieldOption<z
|
|
34
|
-
declare const datetimeInspectorFieldSchema: z
|
|
35
|
-
type: z
|
|
36
|
-
defaultValue: z
|
|
37
|
-
label: z
|
|
38
|
-
description: z
|
|
39
|
-
}, z
|
|
40
|
-
type DatetimeInspectorFieldOption = InspectorFieldOption<z
|
|
41
|
-
declare const timeRangeInspectorFieldSchema: z
|
|
42
|
-
type: z
|
|
43
|
-
defaultValue: z
|
|
44
|
-
start: z
|
|
45
|
-
end: z
|
|
46
|
-
}, z
|
|
47
|
-
label: z
|
|
48
|
-
description: z
|
|
49
|
-
}, z
|
|
50
|
-
type TimeRangeInspectorFieldOption = InspectorFieldOption<z
|
|
51
|
-
declare const selectInspectorFieldSchema: z
|
|
52
|
-
type: z
|
|
53
|
-
defaultValue: z
|
|
54
|
-
label: z
|
|
55
|
-
description: z
|
|
56
|
-
}, z
|
|
57
|
-
type SelectInspectorFieldOption = InspectorFieldOption<z
|
|
58
|
-
declare const checkboxInspectorFieldSchema: z
|
|
59
|
-
type: z
|
|
60
|
-
defaultValue: z
|
|
61
|
-
label: z
|
|
62
|
-
description: z
|
|
63
|
-
}, z
|
|
64
|
-
type CheckboxInspectorFieldOption = InspectorFieldOption<z
|
|
65
|
-
declare const switchInspectorFieldSchema: z
|
|
66
|
-
type: z
|
|
67
|
-
defaultValue: z
|
|
68
|
-
label: z
|
|
69
|
-
description: z
|
|
70
|
-
}, z
|
|
71
|
-
type SwitchInspectorFieldOption = InspectorFieldOption<z
|
|
72
|
-
declare const arrayInspectorFieldSchema: z
|
|
73
|
-
type: z
|
|
74
|
-
defaultValue: z
|
|
75
|
-
label: z
|
|
76
|
-
description: z
|
|
77
|
-
}, z
|
|
78
|
-
type ArrayInspectorFieldOption = InspectorFieldOption<z
|
|
79
|
-
declare const objectInspectorFieldSchema: z
|
|
80
|
-
type: z
|
|
81
|
-
defaultValue: z
|
|
82
|
-
label: z
|
|
83
|
-
description: z
|
|
84
|
-
}, z
|
|
85
|
-
type ObjectInspectorFieldOption = InspectorFieldOption<z
|
|
86
|
-
declare const componentInspectorFieldMetaSchema: z
|
|
87
|
-
type: z
|
|
88
|
-
defaultValue: z
|
|
89
|
-
label: z
|
|
90
|
-
description: z
|
|
91
|
-
}, z
|
|
92
|
-
type: z
|
|
93
|
-
defaultValue: z
|
|
94
|
-
label: z
|
|
95
|
-
description: z
|
|
96
|
-
}, z
|
|
97
|
-
type: z
|
|
98
|
-
defaultValue: z
|
|
99
|
-
label: z
|
|
100
|
-
description: z
|
|
101
|
-
}, z
|
|
102
|
-
type: z
|
|
103
|
-
defaultValue: z
|
|
104
|
-
label: z
|
|
105
|
-
description: z
|
|
106
|
-
}, z
|
|
107
|
-
type: z
|
|
108
|
-
defaultValue: z
|
|
109
|
-
label: z
|
|
110
|
-
description: z
|
|
111
|
-
}, z
|
|
112
|
-
type: z
|
|
113
|
-
defaultValue: z
|
|
114
|
-
start: z
|
|
115
|
-
end: z
|
|
116
|
-
}, z
|
|
117
|
-
label: z
|
|
118
|
-
description: z
|
|
119
|
-
}, z
|
|
120
|
-
type: z
|
|
121
|
-
defaultValue: z
|
|
122
|
-
label: z
|
|
123
|
-
description: z
|
|
124
|
-
}, z
|
|
125
|
-
type: z
|
|
126
|
-
defaultValue: z
|
|
127
|
-
label: z
|
|
128
|
-
description: z
|
|
129
|
-
}, z
|
|
130
|
-
type: z
|
|
131
|
-
defaultValue: z
|
|
132
|
-
label: z
|
|
133
|
-
description: z
|
|
134
|
-
}, z
|
|
135
|
-
type: z
|
|
136
|
-
defaultValue: z
|
|
137
|
-
label: z
|
|
138
|
-
description: z
|
|
139
|
-
}, z
|
|
140
|
-
type: z
|
|
141
|
-
defaultValue: z
|
|
142
|
-
label: z
|
|
143
|
-
description: z
|
|
144
|
-
}, z
|
|
145
|
-
type ComponentInspectorFieldMeta = z
|
|
6
|
+
declare const textInspectorFieldSchema: z.ZodObject<{
|
|
7
|
+
type: z.ZodLiteral<"text">;
|
|
8
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
9
|
+
label: z.ZodString;
|
|
10
|
+
description: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
type TextInspectorFieldOption = InspectorFieldOption<z.infer<typeof textInspectorFieldSchema>>;
|
|
13
|
+
declare const textareaInspectorFieldSchema: z.ZodObject<{
|
|
14
|
+
type: z.ZodLiteral<"textarea">;
|
|
15
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
16
|
+
label: z.ZodString;
|
|
17
|
+
description: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
type TextareaInspectorFieldOption = InspectorFieldOption<z.infer<typeof textareaInspectorFieldSchema>>;
|
|
20
|
+
declare const numberInspectorFieldSchema: z.ZodObject<{
|
|
21
|
+
type: z.ZodLiteral<"number">;
|
|
22
|
+
defaultValue: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
label: z.ZodString;
|
|
24
|
+
description: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
type NumberInspectorFieldOption = InspectorFieldOption<z.infer<typeof numberInspectorFieldSchema>>;
|
|
27
|
+
declare const colorInspectorFieldSchema: z.ZodObject<{
|
|
28
|
+
type: z.ZodLiteral<"color">;
|
|
29
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
30
|
+
label: z.ZodString;
|
|
31
|
+
description: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
type ColorInspectorFieldOption = InspectorFieldOption<z.infer<typeof colorInspectorFieldSchema>>;
|
|
34
|
+
declare const datetimeInspectorFieldSchema: z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"datetime">;
|
|
36
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
37
|
+
label: z.ZodString;
|
|
38
|
+
description: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
type DatetimeInspectorFieldOption = InspectorFieldOption<z.infer<typeof datetimeInspectorFieldSchema>>;
|
|
41
|
+
declare const timeRangeInspectorFieldSchema: z.ZodObject<{
|
|
42
|
+
type: z.ZodLiteral<"timeRange">;
|
|
43
|
+
defaultValue: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
start: z.ZodString;
|
|
45
|
+
end: z.ZodString;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
label: z.ZodString;
|
|
48
|
+
description: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
type TimeRangeInspectorFieldOption = InspectorFieldOption<z.infer<typeof timeRangeInspectorFieldSchema>>;
|
|
51
|
+
declare const selectInspectorFieldSchema: z.ZodObject<{
|
|
52
|
+
type: z.ZodLiteral<"select">;
|
|
53
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
54
|
+
label: z.ZodString;
|
|
55
|
+
description: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
type SelectInspectorFieldOption = InspectorFieldOption<z.infer<typeof selectInspectorFieldSchema>>;
|
|
58
|
+
declare const checkboxInspectorFieldSchema: z.ZodObject<{
|
|
59
|
+
type: z.ZodLiteral<"checkbox">;
|
|
60
|
+
defaultValue: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
label: z.ZodString;
|
|
62
|
+
description: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
type CheckboxInspectorFieldOption = InspectorFieldOption<z.infer<typeof checkboxInspectorFieldSchema>>;
|
|
65
|
+
declare const switchInspectorFieldSchema: z.ZodObject<{
|
|
66
|
+
type: z.ZodLiteral<"switch">;
|
|
67
|
+
defaultValue: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
label: z.ZodString;
|
|
69
|
+
description: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
type SwitchInspectorFieldOption = InspectorFieldOption<z.infer<typeof switchInspectorFieldSchema>>;
|
|
72
|
+
declare const arrayInspectorFieldSchema: z.ZodObject<{
|
|
73
|
+
type: z.ZodLiteral<"array">;
|
|
74
|
+
defaultValue: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
75
|
+
label: z.ZodString;
|
|
76
|
+
description: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
type ArrayInspectorFieldOption = InspectorFieldOption<z.infer<typeof arrayInspectorFieldSchema>>;
|
|
79
|
+
declare const objectInspectorFieldSchema: z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"object">;
|
|
81
|
+
defaultValue: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
82
|
+
label: z.ZodString;
|
|
83
|
+
description: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
type ObjectInspectorFieldOption = InspectorFieldOption<z.infer<typeof objectInspectorFieldSchema>>;
|
|
86
|
+
declare const componentInspectorFieldMetaSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
87
|
+
type: z.ZodLiteral<"text">;
|
|
88
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
89
|
+
label: z.ZodString;
|
|
90
|
+
description: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
92
|
+
type: z.ZodLiteral<"textarea">;
|
|
93
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
94
|
+
label: z.ZodString;
|
|
95
|
+
description: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
+
type: z.ZodLiteral<"number">;
|
|
98
|
+
defaultValue: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
label: z.ZodString;
|
|
100
|
+
description: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
+
type: z.ZodLiteral<"color">;
|
|
103
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
104
|
+
label: z.ZodString;
|
|
105
|
+
description: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"datetime">;
|
|
108
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
109
|
+
label: z.ZodString;
|
|
110
|
+
description: z.ZodOptional<z.ZodString>;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
type: z.ZodLiteral<"timeRange">;
|
|
113
|
+
defaultValue: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
start: z.ZodString;
|
|
115
|
+
end: z.ZodString;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
label: z.ZodString;
|
|
118
|
+
description: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
+
type: z.ZodLiteral<"select">;
|
|
121
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
122
|
+
label: z.ZodString;
|
|
123
|
+
description: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
type: z.ZodLiteral<"checkbox">;
|
|
126
|
+
defaultValue: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
label: z.ZodString;
|
|
128
|
+
description: z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
130
|
+
type: z.ZodLiteral<"switch">;
|
|
131
|
+
defaultValue: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
label: z.ZodString;
|
|
133
|
+
description: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
+
type: z.ZodLiteral<"array">;
|
|
136
|
+
defaultValue: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
137
|
+
label: z.ZodString;
|
|
138
|
+
description: z.ZodOptional<z.ZodString>;
|
|
139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"object">;
|
|
141
|
+
defaultValue: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
142
|
+
label: z.ZodString;
|
|
143
|
+
description: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$strip>], "type">;
|
|
145
|
+
type ComponentInspectorFieldMeta = z.infer<typeof componentInspectorFieldMetaSchema>;
|
|
146
146
|
//#endregion
|
|
147
147
|
export { ArrayInspectorFieldOption, CheckboxInspectorFieldOption, ColorInspectorFieldOption, ComponentInspectorFieldMeta, DatetimeInspectorFieldOption, NumberInspectorFieldOption, ObjectInspectorFieldOption, SelectInspectorFieldOption, SwitchInspectorFieldOption, TextInspectorFieldOption, TextareaInspectorFieldOption, TimeRangeInspectorFieldOption };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { InferSchemaProps } from "./schema.mjs";
|
|
3
3
|
import { ComponentProps, ComponentType, ReactNode } from "react";
|
|
4
|
-
import z
|
|
4
|
+
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region utils/schema/material.d.ts
|
|
7
7
|
/**
|
|
@@ -17,7 +17,7 @@ declare const MATERIAL_CATEGORY: {
|
|
|
17
17
|
readonly 详情页: "详情页";
|
|
18
18
|
};
|
|
19
19
|
type MaterialCategory = typeof MATERIAL_CATEGORY[keyof typeof MATERIAL_CATEGORY];
|
|
20
|
-
type MaterialPropsSchema = z
|
|
20
|
+
type MaterialPropsSchema = z.ZodObject<z.ZodRawShape>;
|
|
21
21
|
type MaterialSchemaProps<TSchema extends MaterialPropsSchema> = InferSchemaProps<TSchema>;
|
|
22
22
|
type InternalMaterialSchemaKey = 'mode';
|
|
23
23
|
type SchemaExtraKeys<TSchemaProps, TComponentProps> = Exclude<keyof TSchemaProps, keyof TComponentProps | InternalMaterialSchemaKey>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import { ArrayInspectorFieldOption, CheckboxInspectorFieldOption, ColorInspectorFieldOption, ComponentInspectorFieldMeta, DatetimeInspectorFieldOption, NumberInspectorFieldOption, ObjectInspectorFieldOption, SelectInspectorFieldOption, SwitchInspectorFieldOption, TextInspectorFieldOption, TextareaInspectorFieldOption, TimeRangeInspectorFieldOption } from "./inspector.mjs";
|
|
3
|
-
import z
|
|
3
|
+
import { z } 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
|
|
7
|
+
declare const materialComponentModeSchema: z.ZodEnum<{
|
|
8
8
|
renderer: "renderer";
|
|
9
9
|
editor: "editor";
|
|
10
10
|
}>;
|
|
11
|
-
type MaterialComponentMode = z
|
|
11
|
+
type MaterialComponentMode = z.infer<typeof materialComponentModeSchema>;
|
|
12
12
|
type MaterialComponentProps<T = object> = {
|
|
13
13
|
mode: MaterialComponentMode;
|
|
14
14
|
} & T;
|
|
@@ -18,62 +18,55 @@ type MaterialComponentProps<T = object> = {
|
|
|
18
18
|
* @param inspectorMeta
|
|
19
19
|
* @returns
|
|
20
20
|
*/
|
|
21
|
-
declare function withInspectorMeta<T extends z
|
|
21
|
+
declare function withInspectorMeta<T extends z.ZodTypeAny>(schema: T, inspectorMeta: ComponentInspectorFieldMeta): T;
|
|
22
22
|
/**
|
|
23
23
|
* 定义组件props schema
|
|
24
24
|
* 使用defineXXXPropSchema定义defaultValue时,目前仅限于在第一层定义
|
|
25
25
|
* @param shape
|
|
26
26
|
* @returns
|
|
27
27
|
*/
|
|
28
|
-
declare function defineComponentPropsSchema<const TShape extends z
|
|
29
|
-
mode: z
|
|
28
|
+
declare function defineComponentPropsSchema<const TShape extends z.ZodRawShape>(shape: TShape): z.ZodObject<(keyof TShape & "mode" extends never ? { -readonly [P in keyof TShape]: TShape[P] } & {
|
|
29
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
30
30
|
renderer: "renderer";
|
|
31
31
|
editor: "editor";
|
|
32
32
|
}>>;
|
|
33
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
|
|
34
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
35
35
|
renderer: "renderer";
|
|
36
36
|
editor: "editor";
|
|
37
37
|
}>>;
|
|
38
|
-
}) extends infer T ? { [k in keyof T]: T[k] } : never, z
|
|
38
|
+
}) extends infer T ? { [k in keyof T]: T[k] } : never, z.core.$strip>;
|
|
39
39
|
interface SchemaHasDefaultValue {
|
|
40
40
|
readonly __schemaHasDefaultValueBrand: never;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* 推导 schema 的 props 类型,兼容空 schema 的 strict index signature。
|
|
44
44
|
*/
|
|
45
|
-
type InferSchemaProps<TSchema extends z
|
|
46
|
-
type SchemaByRequired<TSchema extends z
|
|
47
|
-
type MaybeSchemaWithDefaultValue<TSchema extends z
|
|
45
|
+
type InferSchemaProps<TSchema extends z.ZodTypeAny> = z.infer<TSchema>;
|
|
46
|
+
type SchemaByRequired<TSchema extends z.ZodTypeAny, TRequired extends boolean | undefined> = TRequired extends false ? z.ZodOptional<TSchema> : TSchema;
|
|
47
|
+
type MaybeSchemaWithDefaultValue<TSchema extends z.ZodTypeAny, TOption extends {
|
|
48
48
|
defaultValue?: unknown;
|
|
49
49
|
}> = TOption extends {
|
|
50
50
|
defaultValue: infer TDefaultValue;
|
|
51
51
|
} ? [TDefaultValue] extends [undefined] ? TSchema : TSchema & SchemaHasDefaultValue : TSchema;
|
|
52
52
|
declare function defineTextPropSchema<const TOption extends TextInspectorFieldOption & {
|
|
53
53
|
required?: boolean;
|
|
54
|
-
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
54
|
+
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodString, TOption['required']>, TOption>;
|
|
55
55
|
declare function defineTextareaPropSchema<const TOption extends TextareaInspectorFieldOption & {
|
|
56
56
|
required?: boolean;
|
|
57
|
-
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
57
|
+
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodString, TOption['required']>, TOption>;
|
|
58
58
|
declare function defineNumberPropSchema<const TOption extends NumberInspectorFieldOption & {
|
|
59
59
|
required?: boolean;
|
|
60
|
-
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
60
|
+
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodNumber, TOption['required']>, TOption>;
|
|
61
61
|
declare function defineColorPropSchema<const TOption extends ColorInspectorFieldOption & {
|
|
62
62
|
required?: boolean;
|
|
63
|
-
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
64
|
-
/**
|
|
65
|
-
* 定义日期时间字段schema,用于时间段选择。
|
|
66
|
-
* 值为 ISO 8601 或 YYYY-MM-DD HH:mm:ss 格式字符串。
|
|
67
|
-
* @param option inspector 字段配置
|
|
68
|
-
* @returns zod schema
|
|
69
|
-
*/
|
|
63
|
+
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodString, TOption['required']>, TOption>;
|
|
70
64
|
declare function defineDatetimePropSchema<const TOption extends DatetimeInspectorFieldOption & {
|
|
71
65
|
required?: boolean;
|
|
72
|
-
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
73
|
-
/** 时间段结构:{ start: 开始时间, end: 结束时间 },格式 YYYY-MM-DD HH:mm:ss */
|
|
66
|
+
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodString, TOption['required']>, TOption>;
|
|
74
67
|
declare const timeRangeShape: {
|
|
75
|
-
readonly start: z
|
|
76
|
-
readonly end: z
|
|
68
|
+
readonly start: z.ZodString;
|
|
69
|
+
readonly end: z.ZodString;
|
|
77
70
|
};
|
|
78
71
|
interface TimeRangeValue {
|
|
79
72
|
start: string;
|
|
@@ -82,68 +75,40 @@ interface TimeRangeValue {
|
|
|
82
75
|
interface TimeRangeInspectorOption extends Omit<TimeRangeInspectorFieldOption, 'defaultValue'> {
|
|
83
76
|
defaultValue?: TimeRangeValue;
|
|
84
77
|
}
|
|
85
|
-
/**
|
|
86
|
-
* 定义时间段字段schema,用于开始时间+结束时间范围选择。
|
|
87
|
-
* @param option inspector 字段配置
|
|
88
|
-
* @returns zod schema
|
|
89
|
-
*/
|
|
90
78
|
declare function defineTimeRangePropSchema<const TOption extends TimeRangeInspectorOption & {
|
|
91
79
|
required?: boolean;
|
|
92
|
-
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
80
|
+
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodObject<typeof timeRangeShape>, TOption['required']>, TOption>;
|
|
93
81
|
declare function defineSelectPropSchema<const TOption extends SelectInspectorFieldOption & {
|
|
94
82
|
required?: boolean;
|
|
95
|
-
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
83
|
+
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodString, TOption['required']>, TOption>;
|
|
96
84
|
type StringTuple = readonly [string, ...string[]];
|
|
97
85
|
type SelectEnumInspectorFieldOption<TValues extends StringTuple> = Omit<SelectInspectorFieldOption, 'defaultValue'> & {
|
|
98
86
|
defaultValue?: TValues[number];
|
|
99
87
|
};
|
|
100
|
-
/**
|
|
101
|
-
* 基于字符串元组定义select字段schema。
|
|
102
|
-
* @param values 可选值元组
|
|
103
|
-
* @param option inspector 字段配置
|
|
104
|
-
* @returns zod schema
|
|
105
|
-
*/
|
|
106
88
|
declare function defineSelectEnumPropSchema<const TValues extends StringTuple, const TOption extends SelectEnumInspectorFieldOption<TValues> & {
|
|
107
89
|
required?: boolean;
|
|
108
|
-
}>(values: TValues, option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
90
|
+
}>(values: TValues, option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodType<TValues[number]>, TOption['required']>, TOption>;
|
|
109
91
|
declare function defineCheckboxPropSchema<const TOption extends CheckboxInspectorFieldOption & {
|
|
110
92
|
required?: boolean;
|
|
111
|
-
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
93
|
+
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodBoolean, TOption['required']>, TOption>;
|
|
112
94
|
declare function defineSwitchPropSchema<const TOption extends SwitchInspectorFieldOption & {
|
|
113
95
|
required?: boolean;
|
|
114
|
-
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
115
|
-
type SchemaShape<TSchema extends z
|
|
116
|
-
type SchemaFieldDefaultValue<TFieldSchema> = TFieldSchema extends z
|
|
117
|
-
type SchemaDefaultProps<TSchema extends z
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
* @returns
|
|
122
|
-
*/
|
|
123
|
-
declare function getSchemaDefaultProps<const TSchema extends z$1.ZodObject<z$1.ZodRawShape>>(schema: TSchema): SchemaDefaultProps<TSchema>;
|
|
124
|
-
type ArrayItemInspectorOption<TItemSchema extends z$1.ZodTypeAny> = Omit<ArrayInspectorFieldOption, 'defaultValue'> & {
|
|
125
|
-
defaultValue?: z$1.infer<TItemSchema>[];
|
|
96
|
+
}>(option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodBoolean, TOption['required']>, TOption>;
|
|
97
|
+
type SchemaShape<TSchema extends z.ZodObject<z.ZodRawShape>> = TSchema extends z.ZodObject<infer TShape> ? TShape : never;
|
|
98
|
+
type SchemaFieldDefaultValue<TFieldSchema> = TFieldSchema extends z.ZodTypeAny ? TFieldSchema extends SchemaHasDefaultValue ? Exclude<z.infer<TFieldSchema>, undefined> : never : never;
|
|
99
|
+
type SchemaDefaultProps<TSchema extends z.ZodObject<z.ZodRawShape>> = { [Key in keyof SchemaShape<TSchema> as [SchemaFieldDefaultValue<SchemaShape<TSchema>[Key]>] extends [never] ? never : Key]: SchemaFieldDefaultValue<SchemaShape<TSchema>[Key]> };
|
|
100
|
+
declare function getSchemaDefaultProps<const TSchema extends z.ZodObject<z.ZodRawShape>>(schema: TSchema): SchemaDefaultProps<TSchema>;
|
|
101
|
+
type ArrayItemInspectorOption<TItemSchema extends z.ZodTypeAny> = Omit<ArrayInspectorFieldOption, 'defaultValue'> & {
|
|
102
|
+
defaultValue?: z.infer<TItemSchema>[];
|
|
126
103
|
};
|
|
127
|
-
type ObjectPropInspectorOption<TShape extends z
|
|
128
|
-
defaultValue?: z
|
|
104
|
+
type ObjectPropInspectorOption<TShape extends z.ZodRawShape> = Omit<ObjectInspectorFieldOption, 'defaultValue'> & {
|
|
105
|
+
defaultValue?: z.infer<z.ZodObject<TShape>>;
|
|
129
106
|
};
|
|
130
|
-
|
|
131
|
-
* 定义数组字段schema,支持声明数组项schema。
|
|
132
|
-
* @param itemSchema 数组项schema
|
|
133
|
-
* @param option inspector 字段配置
|
|
134
|
-
* @returns zod schema
|
|
135
|
-
*/
|
|
136
|
-
declare function defineArrayItemPropSchema<TItemSchema extends z$1.ZodTypeAny, const TOption extends ArrayItemInspectorOption<TItemSchema> & {
|
|
107
|
+
declare function defineArrayItemPropSchema<TItemSchema extends z.ZodTypeAny, const TOption extends ArrayItemInspectorOption<TItemSchema> & {
|
|
137
108
|
required?: boolean;
|
|
138
|
-
}>(itemSchema: TItemSchema, option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
139
|
-
|
|
140
|
-
* 定义对象字段schema,支持声明对象shape。
|
|
141
|
-
* @param shape 对象字段shape
|
|
142
|
-
* @param option inspector 字段配置
|
|
143
|
-
* @returns zod schema
|
|
144
|
-
*/
|
|
145
|
-
declare function defineObjectPropSchema<const TShape extends z$1.ZodRawShape, const TOption extends ObjectPropInspectorOption<TShape> & {
|
|
109
|
+
}>(itemSchema: TItemSchema, option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodArray<TItemSchema>, TOption['required']>, TOption>;
|
|
110
|
+
declare function defineObjectPropSchema<const TShape extends z.ZodRawShape, const TOption extends ObjectPropInspectorOption<TShape> & {
|
|
146
111
|
required?: boolean;
|
|
147
|
-
}>(shape: TShape, option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z
|
|
112
|
+
}>(shape: TShape, option: TOption): MaybeSchemaWithDefaultValue<SchemaByRequired<z.ZodObject<TShape>, TOption['required']>, TOption>;
|
|
148
113
|
//#endregion
|
|
149
114
|
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
|
|
2
|
+
import{z as 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};
|
|
@@ -11,16 +11,10 @@ type MaterialMapGroupByCategory<TMaterials extends readonly MaterialLike[]> = {
|
|
|
11
11
|
}>[] };
|
|
12
12
|
/**
|
|
13
13
|
* 将物料数组转换为 type -> material 的映射。
|
|
14
|
-
* 如果出现重复 type,会输出警告并以后者覆盖前者。
|
|
15
|
-
* @param materials 通过 defineMaterial 定义的物料数组
|
|
16
|
-
* @returns 以 material.type 为 key 的映射
|
|
17
14
|
*/
|
|
18
15
|
declare function generateMaterialMap<const TMaterials extends readonly MaterialLike[]>(materials: TMaterials): MaterialMap<TMaterials>;
|
|
19
16
|
/**
|
|
20
17
|
* 将物料数组转换为 category -> material[] 的映射。
|
|
21
|
-
* 同一分类下的物料顺序与入参数组保持一致。
|
|
22
|
-
* @param materials 通过 defineMaterial 定义的物料数组
|
|
23
|
-
* @returns 以 material.category 为 key 的映射
|
|
24
18
|
*/
|
|
25
19
|
declare function generateMaterialMapGroupByCategory<const TMaterials extends readonly MaterialLike[]>(materials: TMaterials): MaterialMapGroupByCategory<TMaterials>;
|
|
26
20
|
//#endregion
|