@vef-framework/hooks 1.0.8 → 1.0.10

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # The Shared foundations of VEF Framework
2
2
 
3
- VEF framework designed by Venus is built on top of React, and it provides a set of components that are essential for building a modern web application. These components are designed to be highly customizable and reusable, allowing developers to build complex and dynamic user interfaces with ease.
3
+ VEF framework made by Venus is built on top of React, and it provides a set of components that are essential for building a modern web application. These components are designed to be highly customizable and reusable, allowing developers to build complex and dynamic user interfaces with ease.
4
4
 
5
5
  ## Installation
6
6
 
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, 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{useDeepCompareCallback}from"./use-deep-compare-callback.js";export{useDeepCompareMemo}from"./use-deep-compare-memo.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{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{useShallowCompareCallback}from"./use-shallow-compare-callback.js";export{useShallowCompareMemo}from"./use-shallow-compare-memo.js";export{useSingleton}from"./use-singleton.js";export{useThemeTokens}from"./use-theme-tokens.js";export{useWindowSize}from"./use-window-size.js";export{useDeepCompareEffect,useDeepCompareLayoutEffect,useMount,useSize,useUnmount,useUpdate,useUpdateEffect,useUpdateLayoutEffect}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/dist/lib.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  export{useDeepCompareEffect,useDeepCompareLayoutEffect,useMount,useSize,useUnmount,useUpdate,useUpdateEffect,useUpdateLayoutEffect}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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
2
- import{useAuthContext as r}from"@vef-framework/core";import{useMemo as e}from"react";function o(o){const{checkPermission:n}=r();return e((()=>o?.filter((r=>{const e=r.permissions;if(!e)return!0;return"any"===(r.checkMode??"any")?e.some((r=>n(r))):e.every((r=>n(r)))}))),[o,n])}export{o as useAuthorizedItems};
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
+ import{useAuthContext as r}from"@vef-framework/core";import{useMemo as e}from"react";function o(o){const{checkPermission:n}=r();return e((()=>o?.filter((r=>{const{permissions:e}=r;if(!e)return!0;return"any"===(r.checkMode??"any")?e.some((r=>n(r))):e.every((r=>n(r)))}))),[o,n])}export{o as 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,4 +1,4 @@
1
- import type { ColorType, LiteralUnion } from "@vef-framework/shared";
1
+ import { type ColorType, type LiteralUnion } from "@vef-framework/shared";
2
2
  /**
3
3
  * Get default color tokens
4
4
  *
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{defaultColorTypes as e,semanticColorTypes as r,capitalize as t}from"@vef-framework/shared";import{useMemo as o}from"react";import{useThemeTokens as n}from"./use-theme-tokens.js";function c(){const r=n();return o((()=>e.reduce(((e,t)=>(e.set(t,r[t]),e)),new Map)),[r])}function s(){const e=n();return o((()=>r.reduce(((r,o)=>(r.set(o,e[`color${t(o)}`]),r)),new Map)),[e])}function u(){const e=c(),r=s();return o((()=>new Map([...e,...r])),[e,r])}export{u as useColorTokens,c as useDefaultColorTokens,s as 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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{isFunction as o,defaultMessageTitle as i}from"@vef-framework/shared";import{useMemo as n}from"react";function r(r,t){return n((()=>r.filter((i=>{const{show:n}=i;return o(n)?n(t):n??!0})).map((n=>{const{disabled:r,requireConfirmation:e,confirmationMode:a,confirmationTitle:m,confirmationContent:f,...c}=n,l={...c,disabled:o(r)?r(t):r??!1,requireConfirmation:o(e)?e(t):e??!1,confirmationMode:o(a)?a(t):a??"simple",confirmationTitle:o(m)?m(t):m??i,confirmationContent:o(f)?f(t):f??`确定要${c.label}吗?`};return l.requireConfirmation&&!l.confirmationMode&&(l.confirmationMode="simple"),l.requireConfirmation&&!l.confirmationTitle&&(l.confirmationTitle=i),l.requireConfirmation&&!l.confirmationContent&&(l.confirmationContent=`确定要${l.label}吗?`),l}))),[r,t])}export{r as 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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{useDataQuery as e}from"./use-data-query.js";import{useFallbackOptions as i}from"./use-fallback-options.js";import{useNormalizedDataOptions as a}from"./use-normalized-options.js";import{useRemoteFilter as l}from"./use-remote-filter.js";function o({labelField:o,valueField:s,descriptionField:t,childrenField:d,disabledField:r,defaultToFirst:n,filterable:p=!1,filterFromRemote:u=!1,keywordKey:c="keyword",valuesKey:f="ids",fallbackOptionsApi:m,fallbackOptionsApiParams:F,resolveFallbackOptions:b,isGrouped:O=!1,selectedOptionValues:k,apiParams:y,...v}){const[g,P]=l(p&&u,y,c),{data:j,isLoading:A}=e({apiParams:g,...v}),[K,L,h]=a(j??[],{labelField:o,valueField:s,descriptionField:t,childrenField:d,disabledField:r,defaultToFirst:n},{isGrouped:O,parsePinyin:p&&!u,selectedOptionValues:k}),{data:w,isLoading:z}=i(L,{fallbackOptionsApi:m??v.api,fallbackOptionsApiParams:F,valuesKey:f,resolveFallbackOptions:b});return{onFilterKeywordChange:P,isLoading:A,normalizedOptions:K,defaultOption:h,fallbackOptions:w,isFallbackOptionsLoading:z}}export{o as 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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{createContext as r,useContext as o}from"react";const t=r(!1);function n(){return o(t)}const c=t.Provider;export{c as DisabledContextProvider,n as 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,4 +1,4 @@
1
- import type { AnyValue, EmptyObject, ObjectType, QueryConfig, QueryResult } from "@vef-framework/shared";
1
+ import { type AnyValue, type EmptyObject, type ObjectType, type QueryConfig, type QueryResult } from "@vef-framework/shared";
2
2
  /**
3
3
  * A hook that fetches data from the API, data dictionary or a stub created from data.
4
4
  *
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, 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 o({onFetched:o,...s}){const{useApiQuery:p,stubQueryApi:c,dataDictionaryQueryApi:u}=e(),[n,m,l]=function({data:e,dataDictionaryKey:t,api:r,apiParams:o,apiEnabled:s,staleTime:p,keepPreviousData:c,placeholderData:u},n,m){return i((()=>a(e)?a(t)?a(r)?[n,[],{keepPreviousData:!0,initialData:[]}]:[r,o,{enabled:s??!0,staleTime:p,keepPreviousData:c,placeholderData:u}]:[m,{...o,key:t},{enabled:s??!0,staleTime:p,keepPreviousData:c,placeholderData:u}]:[n,e,{keepPreviousData:!0,initialData:e}]),[e,t,r,n,m,o,s,p,c,u])}(s,c,u),d=p(n,m,l);r((()=>{Object.is(n,c)&&c.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{o as 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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{useCallback as o}from"react";import{useDeepCompareMemo as r}from"./use-deep-compare-memo.js";function e(e,m){const t=r((()=>m),m);return o(e,t)}export{e as useDeepCompareCallback};
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,4 +1,4 @@
1
- import type { Provider } from "@vef-framework/shared";
1
+ import { type Provider } from "@vef-framework/shared";
2
2
  import { type DependencyList } from "react";
3
3
  /**
4
4
  * A hook that memoizes a value based on deep comparison of its dependencies.
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{isEqual as r}from"@vef-framework/shared";import{useRef as e,useMemo as t}from"react";function n(n,o){const c=e(),u=e(0);var a,f;return void 0!==c.current&&(a=o,f=c.current,a.length===f.length&&a.every(((e,t)=>r(e,f[t]))))||(u.current+=1),c.current=o,t(n,[u.current])}export{n as useDeepCompareMemo};
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,4 +1,4 @@
1
- import type { Api, DataOption, EmptyObject, IdValue, Mapper, MaybePromise, ObjectType, PureDataOption, QueryParamsWithValues } from "@vef-framework/shared";
1
+ import { type Api, type DataOption, type EmptyObject, type IdValue, type Mapper, type MaybePromise, type ObjectType, type PureDataOption, type QueryParamsWithValues } from "@vef-framework/shared";
2
2
  /**
3
3
  * The config of the use fallback options hook.
4
4
  */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, 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 i,useMemo as o}from"react";function s(s,{fallbackOptionsApi:t,fallbackOptionsApiParams:p,valuesKey:l,resolveFallbackOptions:n}){const{useApiQuery:u,stubQueryApi:c,asyncFnQueryApi:f}=e(),[k,m,v]=function(e,{fallbackOptionsApi:r,fallbackOptionsApiParams:s,valuesKey:t,resolveFallbackOptions:p},l,n){const u=i();return o((()=>{if(a(p))return[n,{key:u,args:[e],fn:p},{keepPreviousData:!0}];if(r){const a={...s,[t??"ids"]:e};return[r,a,{keepPreviousData:!0}]}return[l,[],{keepPreviousData:!0,initialData:[]}]}),[p,r,l,u,e,n,s,t])}(s,{fallbackOptionsApi:t,fallbackOptionsApiParams:p,valuesKey:l,resolveFallbackOptions:n},c,f),b=u(k,m,v);return r((()=>{Object.is(k,c)&&c.removeQueries(m),Object.is(k,f)&&f.removeQueries(m)})),b}export{s as 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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{useCallback as d}from"react";import{useThemeTokens as n}from"./use-theme-tokens.js";function e(){const{paddingXS:e,paddingSM:i,padding:t,paddingMD:r,paddingLG:a}=n();return d((d=>"tiny"===d?e:"small"===d?i:"medium"===d?t:"large"===d?r:"huge"===d?a:d),[e,i,t,r,a])}export{e as 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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{useGapSizeNormalizer as r}from"./use-gap-size-normalizer.js";function e(e){return r()(e)}export{e as 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 */
@@ -6,4 +6,4 @@ import type { ItemType } from "antd/es/menu/interface";
6
6
  * @param items - The menu items.
7
7
  * @returns The normalized menu items.
8
8
  */
9
- export declare function useNormalizedMenuItems(items: MenuItem[]): ItemType[];
9
+ export declare function useNormalizedMenuItems<T extends readonly MenuItem[] = readonly MenuItem[]>(items: T): ItemType[];
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
2
- import{useMemo as e}from"react";function l(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(l)}:"group"===e.type?{type:"group",key:e.key,label:e.label,children:e.children.map(l)}:{type:"divider",key:e.key}}function i(i){return e((()=>i.map(l)),[i])}export{i as useNormalizedMenuItems};
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
+ import{useMemo as e}from"react";function l(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(l)}:"group"===e.type?{type:"group",key:e.key,label:e.label,children:e.children.map(l)}:{type:"divider",key:e.key}}function i(i){return e((()=>i.map(l)),[i])}export{i as 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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{isNullish as e,VefError as i,isString as r,parsePinyinFirstLetter as n,isArray as l}from"@vef-framework/shared";import{useMemo as t}from"react";function o(o,{labelField:d="label",valueField:a="value",childrenField:s="children",descriptionField:h="description",disabledField:c="disabled",defaultToFirst:u=!1},{isTree:f=!1,isGrouped:p=!1,parsePinyin:b=!1,selectedOptionValues:v=[]}={}){return t((()=>{const t=new Set(v),w=!f&&p,m=(o,u=!1)=>{const f=o[d];if(e(f)){if("label"===d)throw new i(-10001,"The label value of the option is required.");throw new i(-10001,`The label value pointed by '${d}' of the option is required.`)}const p=o[a];if(e(p)){if("value"===a)throw new i(-10002,"The value value of the option is required.");throw new i(-10002,`The value value pointed by '${a}' of the option is required.`)}const v=o[s],T=o[h],y=o[c]??!1,F={...o,label:f,value:p,children:v,description:T,disabled:y};if(b){const{labelText:e,descriptionText:i}=F;(r(f)||r(e))&&(F.labelPinyin=n(r(f)?f:e).join("")),(r(T)||r(i))&&(F.descriptionPinyin=n(r(T)?T:i).join(""))}return u&&w||!t.has(p)||t.delete(p),l(F.children)&&(F.children=F.children.map((e=>m(e)))),F},T=Array.from(t),y=o.map((e=>m(e,!0)));if(!u)return[y,T];if(w){const e=y.find((e=>l(e.children)&&e.children.length>0));return[y,T,e?.children?.[0]]}return[y,T,y[0]]}),[s,u,h,c,p,f,d,o,b,v,a])}export{o as 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,4 +1,4 @@
1
- import type { DataOption, NormalizedDataOption, PureDataOption } from "@vef-framework/shared";
1
+ import { type DataOption, type NormalizedDataOption, type PureDataOption } from "@vef-framework/shared";
2
2
  /**
3
3
  * The hook to filter the options.
4
4
  *
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{isString as e}from"@vef-framework/shared";import{useMemo as i}from"react";function n(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{n as 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,4 +1,4 @@
1
- import type { EmptyObject, ObjectType, QueryParamsWithKeyword } from "@vef-framework/shared";
1
+ import { type EmptyObject, type ObjectType, type QueryParamsWithKeyword } from "@vef-framework/shared";
2
2
  /**
3
3
  * The hook to handle the remote filter.
4
4
  *
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, 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 n(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{n as 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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{useCallback as o}from"react";import{useShallowCompareMemo as r}from"./use-shallow-compare-memo.js";function m(m,t){const e=r((()=>t),t);return o(m,e)}export{m as useShallowCompareCallback};
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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{useRef as r,useMemo as t}from"react";import{shallow as e}from"zustand/shallow";function n(n,o){const c=r(),u=r(0);var a,i;return void 0!==c.current&&(a=o,i=c.current,a.length===i.length&&a.every(((r,t)=>e(r,i[t]))))||(u.current+=1),c.current=o,t(n,[u.current])}export{n as useShallowCompareMemo};
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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{isNullish as r}from"@vef-framework/shared";import{useRef as t}from"react";function e(e){const o=t();return r(o.current)&&(o.current=e()),o.current}export{e as 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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{theme as n}from"antd";const{useToken:o}=n;function t(){const{token:n}=o();return n}export{t as 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.8, build time: 2024-12-10T13:58:46.329Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.10, build time: 2024-12-19T06:15:22.124Z, made by Venus. */
2
2
  import{useRafState as i,useEventListener as n}from"ahooks";function t(){const[t,e]=i((()=>({width:window.innerWidth,height:window.innerHeight})));return n("resize",(()=>{e({width:window.innerWidth,height:window.innerHeight})})),t}export{t as 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vef-framework/hooks",
3
3
  "type": "module",
4
- "version": "1.0.8",
4
+ "version": "1.0.10",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@9.15.0",
7
7
  "description": "Hooks fundamental to the VEF framework",
@@ -19,24 +19,20 @@
19
19
  "engines": {
20
20
  "node": ">=20"
21
21
  },
22
- "scripts": {
23
- "build": "pnpm clean && tsx build.ts",
24
- "clean": "rimraf dist"
25
- },
26
22
  "peerDependencies": {
27
23
  "react": ">=18.0.0",
28
24
  "react-dom": ">=18.0.0",
29
25
  "zustand": ">=5.0.0"
30
26
  },
31
27
  "dependencies": {
32
- "@emotion/cache": "11.13.5",
33
- "@emotion/react": "11.13.5",
34
- "@emotion/styled": "11.13.5",
35
- "antd": "5.22.3",
28
+ "@emotion/cache": "11.14.0",
29
+ "@emotion/react": "11.14.0",
30
+ "@emotion/styled": "11.14.0",
31
+ "antd": "5.22.4",
36
32
  "tslib": "2.8.1",
37
33
  "use-sync-external-store": "^1.4.0",
38
- "@vef-framework/core": "1.0.8",
39
- "@vef-framework/shared": "1.0.8",
34
+ "@vef-framework/core": "1.0.10",
35
+ "@vef-framework/shared": "1.0.10",
40
36
  "ahooks": "3.8.4"
41
37
  },
42
38
  "publishConfig": {