@vef-framework/hooks 1.0.5 → 1.0.7
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 +4 -2
- package/dist/index.js +1 -1
- package/dist/lib.js +1 -1
- package/dist/use-authorized-items.js +1 -1
- package/dist/use-color-tokens.js +1 -1
- package/dist/use-computed-action-buttons.d.ts +1 -2
- package/dist/use-computed-action-buttons.js +1 -1
- package/dist/use-computed-options.d.ts +1 -2
- package/dist/use-computed-options.js +1 -1
- package/dist/use-context-disabled.js +1 -1
- package/dist/use-data-query.d.ts +1 -2
- package/dist/use-data-query.js +2 -2
- package/dist/use-deep-compare-callback.js +1 -1
- package/dist/use-deep-compare-memo.js +1 -1
- package/dist/use-fallback-options.d.ts +1 -2
- package/dist/use-fallback-options.js +2 -2
- package/dist/use-gap-size-normalizer.js +1 -1
- package/dist/use-normalized-gap-size.js +1 -1
- package/dist/use-normalized-menu-items.js +1 -1
- package/dist/use-normalized-options.d.ts +1 -2
- package/dist/use-normalized-options.js +1 -1
- package/dist/use-option-filter.js +1 -1
- package/dist/use-remote-filter.d.ts +1 -2
- package/dist/use-remote-filter.js +1 -1
- package/dist/use-shallow-compare-callback.js +1 -1
- package/dist/use-shallow-compare-memo.js +1 -1
- package/dist/use-singleton.js +1 -1
- package/dist/use-theme-tokens.js +1 -1
- package/dist/use-window-size.js +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -15,9 +15,11 @@ pnpm add @vef-framework/hooks
|
|
|
15
15
|
To use the VEF framework hooks foundations in your project, you can import them from the package, for example:
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
|
-
import {
|
|
18
|
+
import { useXxx } from "@vef-framework/hooks";
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
function App() {
|
|
21
|
+
const result = useXxx();
|
|
22
|
+
}
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
## Documentation
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
|
|
2
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};
|
|
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/use-color-tokens.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type ActionButton, type ConfirmationMode } from "@vef-framework/shared";
|
|
1
|
+
import { type ActionButton, type ConfirmationMode, type Except } from "@vef-framework/shared";
|
|
3
2
|
import { type ReactNode } from "react";
|
|
4
3
|
/**
|
|
5
4
|
* The computed action button.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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,5 +1,4 @@
|
|
|
1
|
-
import type { DataOption, DataOptionConfig, IdValue, Mapper, MaybePromise, ObjectType, PureDataOption, QueryApi, QueryConfig, QueryParamsWithKeyword, QueryParamsWithValues, StringKey } from "@vef-framework/shared";
|
|
2
|
-
import type { EmptyObject } from "@vef-framework/shared";
|
|
1
|
+
import type { DataOption, DataOptionConfig, EmptyObject, IdValue, Mapper, MaybePromise, ObjectType, PureDataOption, QueryApi, QueryConfig, QueryParamsWithKeyword, QueryParamsWithValues, StringKey } from "@vef-framework/shared";
|
|
3
2
|
/**
|
|
4
3
|
* The config of the useComputedOptions hook.
|
|
5
4
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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 */
|
package/dist/use-data-query.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { AnyValue, ObjectType, QueryConfig, QueryResult } from "@vef-framework/shared";
|
|
2
|
-
import type { EmptyObject } from "@vef-framework/shared";
|
|
1
|
+
import type { AnyValue, EmptyObject, ObjectType, QueryConfig, QueryResult } from "@vef-framework/shared";
|
|
3
2
|
/**
|
|
4
3
|
* A hook that fetches data from the API, data dictionary or a stub created from data.
|
|
5
4
|
*
|
package/dist/use-data-query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{useApiContext as e}from"@vef-framework/core";import{
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
|
|
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.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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,5 +1,4 @@
|
|
|
1
|
-
import type { Api, DataOption, IdValue, Mapper, MaybePromise, ObjectType, PureDataOption, QueryParamsWithValues } from "@vef-framework/shared";
|
|
2
|
-
import type { EmptyObject } from "@vef-framework/shared";
|
|
1
|
+
import type { Api, DataOption, EmptyObject, IdValue, Mapper, MaybePromise, ObjectType, PureDataOption, QueryParamsWithValues } from "@vef-framework/shared";
|
|
3
2
|
/**
|
|
4
3
|
* The config of the use fallback options hook.
|
|
5
4
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{useApiContext as e}from"@vef-framework/core";import{
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
|
|
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.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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 */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, made by Venus. */
|
|
2
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,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type DataOption, type DataOptionConfig, type IdValue, type NormalizedDataOption, type PureDataOption, type StringKey } from "@vef-framework/shared";
|
|
1
|
+
import { type DataOption, type DataOptionConfig, type Except, type IdValue, type NormalizedDataOption, type PureDataOption, type StringKey } from "@vef-framework/shared";
|
|
3
2
|
/**
|
|
4
3
|
* The config of the useNormalizedDataOptions hook.
|
|
5
4
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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,5 +1,4 @@
|
|
|
1
|
-
import type { ObjectType, QueryParamsWithKeyword } from "@vef-framework/shared";
|
|
2
|
-
import type { EmptyObject } from "@vef-framework/shared";
|
|
1
|
+
import type { EmptyObject, ObjectType, QueryParamsWithKeyword } from "@vef-framework/shared";
|
|
3
2
|
/**
|
|
4
3
|
* The hook to handle the remote filter.
|
|
5
4
|
*
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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 */
|
package/dist/use-singleton.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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 */
|
package/dist/use-theme-tokens.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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 */
|
package/dist/use-window-size.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.7, build time: 2024-12-10T13:48:48.540Z, 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.
|
|
4
|
+
"version": "1.0.7",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Hooks fundamental to the VEF framework",
|
|
7
7
|
"author": "Venus",
|
|
@@ -33,8 +33,9 @@
|
|
|
33
33
|
"@emotion/styled": "11.13.5",
|
|
34
34
|
"antd": "5.22.3",
|
|
35
35
|
"tslib": "2.8.1",
|
|
36
|
-
"
|
|
37
|
-
"@vef-framework/
|
|
36
|
+
"use-sync-external-store": "^1.4.0",
|
|
37
|
+
"@vef-framework/core": "1.0.7",
|
|
38
|
+
"@vef-framework/shared": "1.0.7",
|
|
38
39
|
"ahooks": "3.8.4"
|
|
39
40
|
},
|
|
40
41
|
"publishConfig": {
|