@vef-framework/hooks 1.0.95 → 1.0.97

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 (51) hide show
  1. package/es/index.js +1 -1
  2. package/es/lib.js +1 -1
  3. package/es/use-authorized-items.js +1 -1
  4. package/es/use-color-tokens.js +1 -1
  5. package/es/use-computed-action-buttons.js +1 -1
  6. package/es/use-computed-options.js +1 -1
  7. package/es/use-context-disabled.js +1 -1
  8. package/es/use-data-query.js +1 -1
  9. package/es/use-deep-callback.js +1 -1
  10. package/es/use-deep-memo.js +1 -1
  11. package/es/use-deep-selector.js +1 -1
  12. package/es/use-fallback-options.js +1 -1
  13. package/es/use-gap-size-normalizer.js +1 -1
  14. package/es/use-normalized-gap-size.js +1 -1
  15. package/es/use-normalized-menu-items.js +1 -1
  16. package/es/use-normalized-options.js +1 -1
  17. package/es/use-option-filter.js +1 -1
  18. package/es/use-remote-filter.js +1 -1
  19. package/es/use-shallow-callback.js +1 -1
  20. package/es/use-shallow-memo.js +1 -1
  21. package/es/use-shallow-selector.js +1 -1
  22. package/es/use-singleton.js +1 -1
  23. package/es/use-theme-tokens.js +1 -1
  24. package/es/use-transient-store.js +1 -1
  25. package/es/use-window-size.js +1 -1
  26. package/lib/index.cjs +1 -1
  27. package/lib/lib.cjs +1 -1
  28. package/lib/use-authorized-items.cjs +1 -1
  29. package/lib/use-color-tokens.cjs +1 -1
  30. package/lib/use-computed-action-buttons.cjs +1 -1
  31. package/lib/use-computed-options.cjs +1 -1
  32. package/lib/use-context-disabled.cjs +1 -1
  33. package/lib/use-data-query.cjs +1 -1
  34. package/lib/use-deep-callback.cjs +1 -1
  35. package/lib/use-deep-memo.cjs +1 -1
  36. package/lib/use-deep-selector.cjs +1 -1
  37. package/lib/use-fallback-options.cjs +1 -1
  38. package/lib/use-gap-size-normalizer.cjs +1 -1
  39. package/lib/use-normalized-gap-size.cjs +1 -1
  40. package/lib/use-normalized-menu-items.cjs +1 -1
  41. package/lib/use-normalized-options.cjs +1 -1
  42. package/lib/use-option-filter.cjs +1 -1
  43. package/lib/use-remote-filter.cjs +1 -1
  44. package/lib/use-shallow-callback.cjs +1 -1
  45. package/lib/use-shallow-memo.cjs +1 -1
  46. package/lib/use-shallow-selector.cjs +1 -1
  47. package/lib/use-singleton.cjs +1 -1
  48. package/lib/use-theme-tokens.cjs +1 -1
  49. package/lib/use-transient-store.cjs +1 -1
  50. package/lib/use-window-size.cjs +1 -1
  51. package/package.json +3 -3
package/es/index.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import"./lib.js";export{useAuthorizedItems}from"./use-authorized-items.js";export{useColorTokens,useDefaultColorTokens,useSemanticColorTokens}from"./use-color-tokens.js";export{useComputedActionButtons}from"./use-computed-action-buttons.js";export{useComputedOptions}from"./use-computed-options.js";export{DisabledContextProvider,useContextDisabled}from"./use-context-disabled.js";export{useDataQuery}from"./use-data-query.js";export{useDeepCallback}from"./use-deep-callback.js";export{useDeepMemo}from"./use-deep-memo.js";export{useDeepSelector}from"./use-deep-selector.js";export{useFallbackOptions}from"./use-fallback-options.js";export{useGapSizeNormalizer}from"./use-gap-size-normalizer.js";export{useNormalizedGapSize}from"./use-normalized-gap-size.js";export{normalizeMenuItem,useNormalizedMenuItems}from"./use-normalized-menu-items.js";export{useNormalizedDataOptions}from"./use-normalized-options.js";export{useOptionFilter}from"./use-option-filter.js";export{useRemoteFilter}from"./use-remote-filter.js";export{useShallowCallback}from"./use-shallow-callback.js";export{useShallowMemo}from"./use-shallow-memo.js";export{useShallowSelector}from"./use-shallow-selector.js";export{useSingleton}from"./use-singleton.js";export{useThemeTokens}from"./use-theme-tokens.js";export{useTransientStore}from"./use-transient-store.js";export{useWindowSize}from"./use-window-size.js";export{useClickAway,useMeasure}from"@uidotdev/usehooks";export{useDeepCompareEffect as useDeepEffect,useDeepCompareLayoutEffect as useDeepLayoutEffect,useSize as useElementSize,useEventListener,useKeyPress,useMount,useUnmount,useUpdateEffect,useUpdateLayoutEffect,useUpdate as useUpdater}from"ahooks";
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
package/es/lib.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  export{useClickAway,useMeasure}from"@uidotdev/usehooks";export{useDeepCompareEffect as useDeepEffect,useDeepCompareLayoutEffect as useDeepLayoutEffect,useSize as useElementSize,useEventListener,useKeyPress,useMount,useUnmount,useUpdateEffect,useUpdateLayoutEffect,useUpdate as useUpdater}from"ahooks";
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{useAuthContext as e}from"@vef-framework/core";import{useMemo as r}from"react";function useAuthorizedItems(o){const{checkPermission:t}=e();return r((()=>o?.filter((e=>{const{permissions:r}=e;if(!r)return!0;return"any"===(e.checkMode??"any")?r.some((e=>t(e))):r.every((e=>t(e)))}))),[o,t])}export{useAuthorizedItems};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{defaultColorTypes as e,semanticColorTypes as o,capitalize as r}from"@vef-framework/shared";import{useMemo as n}from"react";import{useThemeTokens as s}from"./use-theme-tokens.js";function useDefaultColorTokens(){const o=s();return n((()=>e.reduce(((e,r)=>(e.set(r,o[r]),e)),new Map)),[o])}function useSemanticColorTokens(){const e=s();return n((()=>o.reduce(((o,n)=>(o.set(n,e[`color${r(n)}`]),o)),new Map)),[e])}function useColorTokens(){const e=useDefaultColorTokens(),o=useSemanticColorTokens();return n((()=>new Map([...e,...o])),[e,o])}export{useColorTokens,useDefaultColorTokens,useSemanticColorTokens};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{isFunction as o,defaultMessageTitle as i}from"@vef-framework/shared";import{useMemo as n}from"react";function useComputedActionButtons(t,r){return n((()=>t.filter((i=>{const{show:n}=i;return o(n)?n(r):n??!0})).map((n=>{const{disabled:t,requireConfirmation:e,confirmationMode:m,confirmationTitle:a,confirmationContent:f,...c}=n,u={...c,disabled:o(t)?t(r):t??!1,requireConfirmation:o(e)?e(r):e??!1,confirmationMode:o(m)?m(r):m??"simple",confirmationTitle:o(a)?a(r):a??i,confirmationContent:o(f)?f(r):f??`确定要${c.label}吗?`};return u.requireConfirmation&&!u.confirmationMode&&(u.confirmationMode="simple"),u.requireConfirmation&&!u.confirmationTitle&&(u.confirmationTitle=i),u.requireConfirmation&&!u.confirmationContent&&(u.confirmationContent=`确定要${u.label}吗?`),u}))),[t,r])}export{useComputedActionButtons};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{useDataQuery as e}from"./use-data-query.js";import{useFallbackOptions as a}from"./use-fallback-options.js";import{useNormalizedDataOptions as i}from"./use-normalized-options.js";import{useRemoteFilter as o}from"./use-remote-filter.js";function useComputedOptions({labelKey:s,valueKey:l,descriptionKey:t,childrenKey:r,disabledKey:p,defaultToFirst:n,filterable:d=!1,filterFromRemote:u=!1,keywordKey:m="keyword",valuesKey:y="ids",fallbackOptionsApi:c,fallbackOptionsApiParams:f,resolveFallbackOptions:b,isGrouped:K=!1,selectedOptionValues:O,apiParams:k,...F}){const[v,g]=o(d&&u,k,m),{data:P,isLoading:j}=e({apiParams:v,...F}),[A,L,h]=i(P??[],{labelKey:s,valueKey:l,descriptionKey:t,childrenKey:r,disabledKey:p,defaultToFirst:n},{isGrouped:K,parsePinyin:d&&!u,selectedOptionValues:O}),{data:w,isLoading:C}=a(L,{fallbackOptionsApi:c??F.api,fallbackOptionsApiParams:f,valuesKey:y,resolveFallbackOptions:b});return{onFilterKeywordChange:g,isLoading:j,normalizedOptions:A,defaultOption:h,fallbackOptions:w,isFallbackOptionsLoading:C}}export{useComputedOptions};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{createContext as t,useContext as e}from"react";const o=t(!1);function useContextDisabled(){return e(o)}const r=o.Provider;export{r as DisabledContextProvider,useContextDisabled};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{useApiContext as e}from"@vef-framework/core";import{isNullish as a,isFunction as t}from"@vef-framework/shared";import{useUnmount as r}from"ahooks";import{useMemo as i}from"react";function useDataQuery({onFetched:o,...s}){const{useApiQuery:u,stubQueryApi:p,dataDictionaryApi:c}=e(),[n,m,l]=function useApi({data:e,dataDictionaryKey:t,api:r,apiParams:o,apiEnabled:s,staleTime:u,keepPreviousData:p,placeholderData:c},n,m){return i((()=>a(e)?a(t)?a(r)?[n,[],{keepPreviousData:!0,initialData:[]}]:[r,o,{enabled:s??!0,staleTime:u,keepPreviousData:p,placeholderData:c}]:[m,{...o,key:t},{enabled:s??!0,staleTime:u,keepPreviousData:p,placeholderData:c}]:[n,e,{keepPreviousData:!0,initialData:e}]),[e,t,r,n,m,o,s,u,p,c])}(s,p,c),D=u(n,m,l);r((()=>{Object.is(n,p)&&p.removeQueries(m)}));const{isSuccess:d,data:f,...k}=D,v=i((()=>d&&t(o)?o(f):f),[d,f,o]);return{...k,isSuccess:d,data:v}}export{useDataQuery};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{useCallback as e}from"react";import{useDeepMemo as o}from"./use-deep-memo.js";function useDeepCallback(r,t){const m=o((()=>t),t);return e(r,m)}export{useDeepCallback};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{isDeepEqual as e}from"@vef-framework/shared";import{useRef as r,useMemo as t}from"react";function useDeepMemo(n,o){const u=r(),c=r(0);return void 0!==u.current&&function isEqual(r,t){return r.length===t.length&&r.every(((r,n)=>e(r,t[n])))}(o,u.current)||(c.current+=1),u.current=o,t(n,[c.current])}export{useDeepMemo};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{isDeepEqual as r}from"@vef-framework/shared";import{useRef as e}from"react";function useDeepSelector(t){const o=e();return e=>{const c=t(e);return r(o.current,c)?o.current:o.current=c}}export{useDeepSelector};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{useApiContext as e}from"@vef-framework/core";import{isFunction as a}from"@vef-framework/shared";import{useUnmount as r}from"ahooks";import{useId as s}from"react";import{useShallowMemo as i}from"./use-shallow-memo.js";function useFallbackOptions(o,{fallbackOptionsApi:t,fallbackOptionsApiParams:l,valuesKey:p,resolveFallbackOptions:n}){const{useApiQuery:u,stubQueryApi:c,asyncFnQueryApi:f}=e(),[m,k,b]=function useApi(e,{fallbackOptionsApi:r,fallbackOptionsApiParams:o,valuesKey:t,resolveFallbackOptions:l},p,n){const u=s();return i((()=>{if(e.length>0){if(a(l))return[n,{key:u,args:[e],fn:l},{keepPreviousData:!0}];if(r){const a={...o,[t??"ids"]:e};return[r,a,{keepPreviousData:!0}]}}return[p,[],{keepPreviousData:!0,initialData:[]}]}),[l,r,p,u,e,n,o,t])}(o,{fallbackOptionsApi:t,fallbackOptionsApiParams:l,valuesKey:p,resolveFallbackOptions:n},c,f),v=u(m,k,b);return r((()=>{Object.is(m,c)&&c.removeQueries(k),Object.is(m,f)&&f.removeQueries(k)})),v}export{useFallbackOptions};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{useCallback as e}from"react";import{useThemeTokens as i}from"./use-theme-tokens.js";function useGapSizeNormalizer(){const{paddingXS:r,paddingSM:a,padding:d,paddingMD:n,paddingLG:m}=i();return e((e=>"tiny"===e?r:"small"===e?a:"medium"===e?d:"large"===e?n:"huge"===e?m:e),[r,a,d,n,m])}export{useGapSizeNormalizer};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{useGapSizeNormalizer as e}from"./use-gap-size-normalizer.js";function useNormalizedGapSize(r){return e()(r)}export{useNormalizedGapSize};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{useMemo as e}from"react";function normalizeMenuItem(e){return"item"===e.type?{type:"item",key:e.key,label:e.label,disabled:e.disabled,icon:e.icon,extra:e.extra}:"submenu"===e.type?{type:"submenu",key:e.key,label:e.label,disabled:e.disabled,icon:e.icon,children:e.children.map(normalizeMenuItem)}:"group"===e.type?{type:"group",key:e.key,label:e.label,children:e.children.map(normalizeMenuItem)}:{type:"divider",key:e.key}}function useNormalizedMenuItems(n){return e((()=>n.map(normalizeMenuItem)),[n])}export{normalizeMenuItem,useNormalizedMenuItems};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{isNullish as e,VefError as i,isString as r,parsePinyinFirstLetter as n,isArray as t}from"@vef-framework/shared";import{useMemo as o}from"react";function useNormalizedDataOptions(l,{labelKey:a="label",valueKey:d="value",childrenKey:s="children",descriptionKey:u="description",disabledKey:h="disabled",defaultToFirst:c=!1},{isTree:p=!1,isGrouped:f=!1,parsePinyin:b=!1,selectedOptionValues:v=[]}={}){return o((()=>{const o=new Set(v),y=!p&&f,normalizeOption=(l,c=!1)=>{const p=l[a];if(e(p)){if("label"===a)throw new i(-10001,"The label value of the option is required.");throw new i(-10001,`The label value pointed by '${a}' of the option is required.`)}const f=l[d];if(e(f)){if("value"===d)throw new i(-10002,"The value value of the option is required.");throw new i(-10002,`The value value pointed by '${d}' of the option is required.`)}const v=l[s],m=l[u],w=l[h]??!1,T={...l,label:p,value:f,children:v,description:m,disabled:w};if(b){const{labelText:e,descriptionText:i}=T;(r(p)||r(e))&&(T.labelPinyin=n(r(p)?p:e).join("")),(r(m)||r(i))&&(T.descriptionPinyin=n(r(m)?m:i).join(""))}return c&&y||!o.has(f)||o.delete(f),t(T.children)&&(T.children=T.children.map((e=>normalizeOption(e)))),T},m=l.map((e=>normalizeOption(e,!0))),w=Array.from(o);if(!c)return[m,w];if(y){const e=m.find((e=>t(e.children)&&e.children.length>0));return[m,w,e?.children?.[0]]}return[m,w,m[0]]}),[s,c,u,h,f,p,a,l,b,d])}export{useNormalizedDataOptions};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{isString as e}from"@vef-framework/shared";import{useMemo as i}from"react";function useOptionFilter(n,l){return i((()=>{if(n)return!l&&((i,n)=>(e(n.label)&&n.label.includes(i)||e(n.labelText)&&n.labelText.includes(i)||n.labelPinyin?.includes(i)||n.value.includes(i)||e(n.description)&&n.description.includes(i)||e(n.descriptionText)&&n.descriptionText.includes(i)||n.descriptionPinyin?.includes(i))??!1)}),[n,l])}export{useOptionFilter};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{trim as r,debounce as e}from"@vef-framework/shared";import{useState as t,useMemo as o}from"react";function useRemoteFilter(n,f,i="keyword"){const[m,u]=t();return[o((()=>{if(!n)return f;const e={...f},t=r(m);return t&&(e[i]=t),e}),[n,f,m,i]),o((()=>{if(n)return e({delay:500},(r=>{u(r)}))}),[n])]}export{useRemoteFilter};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{useCallback as o}from"react";import{useShallowMemo as l}from"./use-shallow-memo.js";function useShallowCallback(a,r){const e=l((()=>r),r);return o(a,e)}export{useShallowCallback};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{isShallowEqual as r}from"@vef-framework/shared";import{useRef as e,useMemo as t}from"react";function useShallowMemo(n,o){const u=e(),c=e(0);return void 0!==u.current&&function isEqual(e,t){return e.length===t.length&&e.every(((e,n)=>r(e,t[n])))}(o,u.current)||(c.current+=1),u.current=o,t(n,[c.current])}export{useShallowMemo};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{isShallowEqual as r}from"@vef-framework/shared";import{useRef as e}from"react";function useShallowSelector(t){const o=e();return e=>{const c=t(e);return r(o.current,c)?o.current:o.current=c}}export{useShallowSelector};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{isNullish as r}from"@vef-framework/shared";import{useRef as e}from"react";function useSingleton(t){const n=e();return r(n.current)&&(n.current=t()),n.current}export{useSingleton};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{theme as e}from"antd";const{useToken:n}=e;function useThemeTokens(){const{token:e}=n();return e}export{useThemeTokens};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{isShallowEqual as e}from"@vef-framework/shared";import{useRef as r,useEffect as t}from"react";function useTransientStore({subscribe:n,getState:i},{selector:o=e=>e,equalityFn:s=e,listener:u}={}){const a=r();return a.current||(a.current=o(i())),t((()=>n(o,((e,r)=>{a.current=e,u?.(e,r)}),{fireImmediately:!1,equalityFn:s})),[s,u,o,n]),a}export{useTransientStore};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  import{useRafState as i,useEventListener as n}from"ahooks";function useWindowSize(){const[e,o]=i((()=>({width:window.innerWidth,height:window.innerHeight})));return n("resize",(()=>{o({width:window.innerWidth,height:window.innerHeight})})),e}export{useWindowSize};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
package/lib/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./lib.cjs");const e=require("./use-authorized-items.cjs"),s=require("./use-color-tokens.cjs"),t=require("./use-computed-action-buttons.cjs"),r=require("./use-computed-options.cjs"),o=require("./use-context-disabled.cjs"),u=require("./use-data-query.cjs"),i=require("./use-deep-callback.cjs"),a=require("./use-deep-memo.cjs"),n=require("./use-deep-selector.cjs"),l=require("./use-fallback-options.cjs"),p=require("./use-gap-size-normalizer.cjs"),c=require("./use-normalized-gap-size.cjs"),m=require("./use-normalized-menu-items.cjs"),d=require("./use-normalized-options.cjs"),x=require("./use-option-filter.cjs"),b=require("./use-remote-filter.cjs"),j=require("./use-shallow-callback.cjs"),f=require("./use-shallow-memo.cjs"),z=require("./use-shallow-selector.cjs"),q=require("./use-singleton.cjs"),S=require("./use-theme-tokens.cjs"),y=require("./use-transient-store.cjs"),k=require("./use-window-size.cjs"),C=require("@uidotdev/usehooks"),O=require("ahooks");exports.useAuthorizedItems=e.useAuthorizedItems,exports.useColorTokens=s.useColorTokens,exports.useDefaultColorTokens=s.useDefaultColorTokens,exports.useSemanticColorTokens=s.useSemanticColorTokens,exports.useComputedActionButtons=t.useComputedActionButtons,exports.useComputedOptions=r.useComputedOptions,exports.DisabledContextProvider=o.DisabledContextProvider,exports.useContextDisabled=o.useContextDisabled,exports.useDataQuery=u.useDataQuery,exports.useDeepCallback=i.useDeepCallback,exports.useDeepMemo=a.useDeepMemo,exports.useDeepSelector=n.useDeepSelector,exports.useFallbackOptions=l.useFallbackOptions,exports.useGapSizeNormalizer=p.useGapSizeNormalizer,exports.useNormalizedGapSize=c.useNormalizedGapSize,exports.normalizeMenuItem=m.normalizeMenuItem,exports.useNormalizedMenuItems=m.useNormalizedMenuItems,exports.useNormalizedDataOptions=d.useNormalizedDataOptions,exports.useOptionFilter=x.useOptionFilter,exports.useRemoteFilter=b.useRemoteFilter,exports.useShallowCallback=j.useShallowCallback,exports.useShallowMemo=f.useShallowMemo,exports.useShallowSelector=z.useShallowSelector,exports.useSingleton=q.useSingleton,exports.useThemeTokens=S.useThemeTokens,exports.useTransientStore=y.useTransientStore,exports.useWindowSize=k.useWindowSize,Object.defineProperty(exports,"useClickAway",{enumerable:!0,get:()=>C.useClickAway}),Object.defineProperty(exports,"useMeasure",{enumerable:!0,get:()=>C.useMeasure}),Object.defineProperty(exports,"useDeepEffect",{enumerable:!0,get:()=>O.useDeepCompareEffect}),Object.defineProperty(exports,"useDeepLayoutEffect",{enumerable:!0,get:()=>O.useDeepCompareLayoutEffect}),Object.defineProperty(exports,"useElementSize",{enumerable:!0,get:()=>O.useSize}),Object.defineProperty(exports,"useEventListener",{enumerable:!0,get:()=>O.useEventListener}),Object.defineProperty(exports,"useKeyPress",{enumerable:!0,get:()=>O.useKeyPress}),Object.defineProperty(exports,"useMount",{enumerable:!0,get:()=>O.useMount}),Object.defineProperty(exports,"useUnmount",{enumerable:!0,get:()=>O.useUnmount}),Object.defineProperty(exports,"useUpdateEffect",{enumerable:!0,get:()=>O.useUpdateEffect}),Object.defineProperty(exports,"useUpdateLayoutEffect",{enumerable:!0,get:()=>O.useUpdateLayoutEffect}),Object.defineProperty(exports,"useUpdater",{enumerable:!0,get:()=>O.useUpdate});
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
package/lib/lib.cjs CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@uidotdev/usehooks"),t=require("ahooks");Object.defineProperty(exports,"useClickAway",{enumerable:!0,get:()=>e.useClickAway}),Object.defineProperty(exports,"useMeasure",{enumerable:!0,get:()=>e.useMeasure}),Object.defineProperty(exports,"useDeepEffect",{enumerable:!0,get:()=>t.useDeepCompareEffect}),Object.defineProperty(exports,"useDeepLayoutEffect",{enumerable:!0,get:()=>t.useDeepCompareLayoutEffect}),Object.defineProperty(exports,"useElementSize",{enumerable:!0,get:()=>t.useSize}),Object.defineProperty(exports,"useEventListener",{enumerable:!0,get:()=>t.useEventListener}),Object.defineProperty(exports,"useKeyPress",{enumerable:!0,get:()=>t.useKeyPress}),Object.defineProperty(exports,"useMount",{enumerable:!0,get:()=>t.useMount}),Object.defineProperty(exports,"useUnmount",{enumerable:!0,get:()=>t.useUnmount}),Object.defineProperty(exports,"useUpdateEffect",{enumerable:!0,get:()=>t.useUpdateEffect}),Object.defineProperty(exports,"useUpdateLayoutEffect",{enumerable:!0,get:()=>t.useUpdateLayoutEffect}),Object.defineProperty(exports,"useUpdater",{enumerable:!0,get:()=>t.useUpdate});
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/core"),r=require("react");exports.useAuthorizedItems=function useAuthorizedItems(t){const{checkPermission:o}=e.useAuthContext();return r.useMemo((()=>t?.filter((e=>{const{permissions:r}=e;if(!r)return!0;return"any"===(e.checkMode??"any")?r.some((e=>o(e))):r.every((e=>o(e)))}))),[t,o])};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),o=require("react"),s=require("./use-theme-tokens.cjs");function useDefaultColorTokens(){const r=s.useThemeTokens();return o.useMemo((()=>e.defaultColorTypes.reduce(((e,o)=>(e.set(o,r[o]),e)),new Map)),[r])}function useSemanticColorTokens(){const r=s.useThemeTokens();return o.useMemo((()=>e.semanticColorTypes.reduce(((o,s)=>(o.set(s,r[`color${e.capitalize(s)}`]),o)),new Map)),[r])}exports.useColorTokens=function useColorTokens(){const e=useDefaultColorTokens(),s=useSemanticColorTokens();return o.useMemo((()=>new Map([...e,...s])),[e,s])},exports.useDefaultColorTokens=useDefaultColorTokens,exports.useSemanticColorTokens=useSemanticColorTokens;
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@vef-framework/shared"),n=require("react");exports.useComputedActionButtons=function useComputedActionButtons(o,t){return n.useMemo((()=>o.filter((n=>{const{show:o}=n;return i.isFunction(o)?o(t):o??!0})).map((n=>{const{disabled:o,requireConfirmation:e,confirmationMode:r,confirmationTitle:a,confirmationContent:u,...s}=n,c={...s,disabled:i.isFunction(o)?o(t):o??!1,requireConfirmation:i.isFunction(e)?e(t):e??!1,confirmationMode:i.isFunction(r)?r(t):r??"simple",confirmationTitle:i.isFunction(a)?a(t):a??i.defaultMessageTitle,confirmationContent:i.isFunction(u)?u(t):u??`确定要${s.label}吗?`};return c.requireConfirmation&&!c.confirmationMode&&(c.confirmationMode="simple"),c.requireConfirmation&&!c.confirmationTitle&&(c.confirmationTitle=i.defaultMessageTitle),c.requireConfirmation&&!c.confirmationContent&&(c.confirmationContent=`确定要${c.label}吗?`),c}))),[o,t])};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./use-data-query.cjs"),a=require("./use-fallback-options.cjs"),i=require("./use-normalized-options.cjs"),s=require("./use-remote-filter.cjs");exports.useComputedOptions=function useComputedOptions({labelKey:o,valueKey:t,descriptionKey:l,childrenKey:r,disabledKey:n,defaultToFirst:p,filterable:u=!1,filterFromRemote:d=!1,keywordKey:c="keyword",valuesKey:y="ids",fallbackOptionsApi:b,fallbackOptionsApiParams:O,resolveFallbackOptions:f,isGrouped:m=!1,selectedOptionValues:K,apiParams:k,...F}){const[g,v]=s.useRemoteFilter(u&&d,k,c),{data:P,isLoading:j}=e.useDataQuery({apiParams:g,...F}),[q,A,L]=i.useNormalizedDataOptions(P??[],{labelKey:o,valueKey:t,descriptionKey:l,childrenKey:r,disabledKey:n,defaultToFirst:p},{isGrouped:m,parsePinyin:u&&!d,selectedOptionValues:K}),{data:h,isLoading:w}=a.useFallbackOptions(A,{fallbackOptionsApi:b??F.api,fallbackOptionsApiParams:O,valuesKey:y,resolveFallbackOptions:f});return{onFilterKeywordChange:v,isLoading:j,normalizedOptions:q,defaultOption:L,fallbackOptions:h,isFallbackOptionsLoading:w}};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext(!1);const o=t.Provider;exports.DisabledContextProvider=o,exports.useContextDisabled=function useContextDisabled(){return e.useContext(t)};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/core"),a=require("@vef-framework/shared"),i=require("ahooks"),t=require("react");exports.useDataQuery=function useDataQuery({onFetched:r,...s}){const{useApiQuery:u,stubQueryApi:o,dataDictionaryApi:n}=e.useApiContext(),[l,c,p]=function useApi({data:e,dataDictionaryKey:i,api:r,apiParams:s,apiEnabled:u,staleTime:o,keepPreviousData:n,placeholderData:l},c,p){return t.useMemo((()=>a.isNullish(e)?a.isNullish(i)?a.isNullish(r)?[c,[],{keepPreviousData:!0,initialData:[]}]:[r,s,{enabled:u??!0,staleTime:o,keepPreviousData:n,placeholderData:l}]:[p,{...s,key:i},{enabled:u??!0,staleTime:o,keepPreviousData:n,placeholderData:l}]:[c,e,{keepPreviousData:!0,initialData:e}]),[e,i,r,c,p,s,u,o,n,l])}(s,o,n),d=u(l,c,p);i.useUnmount((()=>{Object.is(l,o)&&o.removeQueries(c)}));const{isSuccess:D,data:m,...y}=d,h=t.useMemo((()=>D&&a.isFunction(r)?r(m):m),[D,m,r]);return{...y,isSuccess:D,data:h}};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./use-deep-memo.cjs");exports.useDeepCallback=function useDeepCallback(t,s){const u=r.useDeepMemo((()=>s),s);return e.useCallback(t,u)};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),r=require("react");exports.useDeepMemo=function useDeepMemo(t,u){const n=r.useRef(),o=r.useRef(0);return void 0!==n.current&&function isEqual(r,t){return r.length===t.length&&r.every(((r,u)=>e.isDeepEqual(r,t[u])))}(u,n.current)||(o.current+=1),n.current=u,r.useMemo(t,[o.current])};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),r=require("react");exports.useDeepSelector=function useDeepSelector(t){const u=r.useRef();return r=>{const o=t(r);return e.isDeepEqual(u.current,o)?u.current:u.current=o}};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/core"),s=require("@vef-framework/shared"),a=require("ahooks"),r=require("react"),i=require("./use-shallow-memo.cjs");exports.useFallbackOptions=function useFallbackOptions(t,{fallbackOptionsApi:o,fallbackOptionsApiParams:u,valuesKey:l,resolveFallbackOptions:n}){const{useApiQuery:p,stubQueryApi:c,asyncFnQueryApi:k}=e.useApiContext(),[f,b,v]=function useApi(e,{fallbackOptionsApi:a,fallbackOptionsApiParams:t,valuesKey:o,resolveFallbackOptions:u},l,n){const p=r.useId();return i.useShallowMemo((()=>{if(e.length>0){if(s.isFunction(u))return[n,{key:p,args:[e],fn:u},{keepPreviousData:!0}];if(a){const s={...t,[o??"ids"]:e};return[a,s,{keepPreviousData:!0}]}}return[l,[],{keepPreviousData:!0,initialData:[]}]}),[u,a,l,p,e,n,t,o])}(t,{fallbackOptionsApi:o,fallbackOptionsApiParams:u,valuesKey:l,resolveFallbackOptions:n},c,k),O=p(f,b,v);return a.useUnmount((()=>{Object.is(f,c)&&c.removeQueries(b),Object.is(f,k)&&k.removeQueries(b)})),O};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./use-theme-tokens.cjs");exports.useGapSizeNormalizer=function useGapSizeNormalizer(){const{paddingXS:i,paddingSM:a,padding:t,paddingMD:n,paddingLG:s}=r.useThemeTokens();return e.useCallback((e=>"tiny"===e?i:"small"===e?a:"medium"===e?t:"large"===e?n:"huge"===e?s:e),[i,a,t,n,s])};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./use-gap-size-normalizer.cjs");exports.useNormalizedGapSize=function useNormalizedGapSize(r){return e.useGapSizeNormalizer()(r)};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");function normalizeMenuItem(e){return"item"===e.type?{type:"item",key:e.key,label:e.label,disabled:e.disabled,icon:e.icon,extra:e.extra}:"submenu"===e.type?{type:"submenu",key:e.key,label:e.label,disabled:e.disabled,icon:e.icon,children:e.children.map(normalizeMenuItem)}:"group"===e.type?{type:"group",key:e.key,label:e.label,children:e.children.map(normalizeMenuItem)}:{type:"divider",key:e.key}}exports.normalizeMenuItem=normalizeMenuItem,exports.useNormalizedMenuItems=function useNormalizedMenuItems(t){return e.useMemo((()=>t.map(normalizeMenuItem)),[t])};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),i=require("react");exports.useNormalizedDataOptions=function useNormalizedDataOptions(r,{labelKey:t="label",valueKey:n="value",childrenKey:o="children",descriptionKey:l="description",disabledKey:s="disabled",defaultToFirst:a=!1},{isTree:d=!1,isGrouped:u=!1,parsePinyin:c=!1,selectedOptionValues:h=[]}={}){return i.useMemo((()=>{const i=new Set(h),p=!d&&u,normalizeOption=(r,a=!1)=>{const d=r[t];if(e.isNullish(d)){if("label"===t)throw new e.VefError(-10001,"The label value of the option is required.");throw new e.VefError(-10001,`The label value pointed by '${t}' of the option is required.`)}const u=r[n];if(e.isNullish(u)){if("value"===n)throw new e.VefError(-10002,"The value value of the option is required.");throw new e.VefError(-10002,`The value value pointed by '${n}' of the option is required.`)}const h=r[o],f=r[l],y=r[s]??!1,b={...r,label:d,value:u,children:h,description:f,disabled:y};if(c){const{labelText:i,descriptionText:r}=b;(e.isString(d)||e.isString(i))&&(b.labelPinyin=e.parsePinyinFirstLetter(e.isString(d)?d:i).join("")),(e.isString(f)||e.isString(r))&&(b.descriptionPinyin=e.parsePinyinFirstLetter(e.isString(f)?f:r).join(""))}return a&&p||!i.has(u)||i.delete(u),e.isArray(b.children)&&(b.children=b.children.map((e=>normalizeOption(e)))),b},f=r.map((e=>normalizeOption(e,!0))),y=Array.from(i);if(!a)return[f,y];if(p){const i=f.find((i=>e.isArray(i.children)&&i.children.length>0));return[f,y,i?.children?.[0]]}return[f,y,f[0]]}),[o,a,l,s,u,d,t,r,c,n])};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),i=require("react");exports.useOptionFilter=function useOptionFilter(t,n){return i.useMemo((()=>{if(t)return!n&&((i,t)=>(e.isString(t.label)&&t.label.includes(i)||e.isString(t.labelText)&&t.labelText.includes(i)||t.labelPinyin?.includes(i)||t.value.includes(i)||e.isString(t.description)&&t.description.includes(i)||e.isString(t.descriptionText)&&t.descriptionText.includes(i)||t.descriptionPinyin?.includes(i))??!1)}),[t,n])};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),r=require("react");exports.useRemoteFilter=function useRemoteFilter(t,o,u="keyword"){const[s,n]=r.useState();return[r.useMemo((()=>{if(!t)return o;const r={...o},n=e.trim(s);return n&&(r[u]=n),r}),[t,o,s,u]),r.useMemo((()=>{if(t)return e.debounce({delay:500},(e=>{n(e)}))}),[t])]};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),l=require("./use-shallow-memo.cjs");exports.useShallowCallback=function useShallowCallback(o,a){const r=l.useShallowMemo((()=>a),a);return e.useCallback(o,r)};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),r=require("react");exports.useShallowMemo=function useShallowMemo(t,u){const o=r.useRef(),n=r.useRef(0);return void 0!==o.current&&function isEqual(r,t){return r.length===t.length&&r.every(((r,u)=>e.isShallowEqual(r,t[u])))}(u,o.current)||(n.current+=1),o.current=u,r.useMemo(t,[n.current])};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),r=require("react");exports.useShallowSelector=function useShallowSelector(t){const o=r.useRef();return r=>{const u=t(r);return e.isShallowEqual(o.current,u)?o.current:o.current=u}};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),r=require("react");exports.useSingleton=function useSingleton(t){const n=r.useRef();return e.isNullish(n.current)&&(n.current=t()),n.current};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("antd"),{useToken:t}=e.theme;exports.useThemeTokens=function useThemeTokens(){const{token:e}=t();return e};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),r=require("react");exports.useTransientStore=function useTransientStore({subscribe:t,getState:s},{selector:u=e=>e,equalityFn:n=e.isShallowEqual,listener:i}={}){const o=r.useRef();return o.current||(o.current=u(s())),r.useEffect((()=>t(u,((e,r)=>{o.current=e,i?.(e,r)}),{fireImmediately:!1,equalityFn:n})),[n,i,u,t]),o};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.95, build time: 2025-03-06T05:25:13.464Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.97, build time: 2025-03-06T12:24:36.309Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("ahooks");exports.useWindowSize=function useWindowSize(){const[i,t]=e.useRafState((()=>({width:window.innerWidth,height:window.innerHeight})));return e.useEventListener("resize",(()=>{t({width:window.innerWidth,height:window.innerHeight})})),i};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vef-framework/hooks",
3
3
  "type": "module",
4
- "version": "1.0.95",
4
+ "version": "1.0.97",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@9.15.0",
7
7
  "description": "The hooks of the VEF framework",
@@ -35,8 +35,8 @@
35
35
  "tslib": "2.8.1",
36
36
  "use-sync-external-store": "^1.4.0",
37
37
  "@uidotdev/usehooks": "^2.4.1",
38
- "@vef-framework/core": "1.0.95",
39
- "@vef-framework/shared": "1.0.95",
38
+ "@vef-framework/core": "1.0.97",
39
+ "@vef-framework/shared": "1.0.97",
40
40
  "ahooks": "3.8.4"
41
41
  },
42
42
  "publishConfig": {