@vef-framework/core 1.0.39 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/api/api-client.js +2 -2
- package/es/api/api-context.js +2 -2
- package/es/api/index.js +2 -2
- package/es/api/query-client.js +1 -1
- package/es/api/request-client.js +1 -1
- package/es/auth/auth-context.js +1 -1
- package/es/auth/index.js +1 -1
- package/es/expr/compiler.js +1 -1
- package/es/expr/helpers.js +1 -1
- package/es/index.js +2 -2
- package/es/middleware/dispatcher.js +1 -1
- package/lib/api/api-client.cjs +2 -2
- package/lib/api/api-context.cjs +2 -2
- package/lib/api/index.cjs +2 -2
- package/lib/api/query-client.cjs +1 -1
- package/lib/api/request-client.cjs +1 -1
- package/lib/auth/auth-context.cjs +1 -1
- package/lib/auth/index.cjs +1 -1
- package/lib/expr/compiler.cjs +1 -1
- package/lib/expr/helpers.cjs +1 -1
- package/lib/index.cjs +2 -2
- package/lib/middleware/dispatcher.cjs +1 -1
- package/package.json +4 -4
- package/types/api/api-client.d.ts +30 -7
- package/types/api/api-context.d.ts +35 -3
- package/types/api/index.d.ts +2 -2
package/es/api/api-client.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{useQuery as e,keepPreviousData as t,
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
|
+
import{useQuery as e,keepPreviousData as t,useSuspenseQuery as i,useMutation as s,useIsFetching as r,useIsMutating as a,QueryClientProvider as n}from"@tanstack/react-query";import{createElement as u}from"react";import{createQueryClient as c}from"./query-client.js";import{createRequestClient as h}from"./request-client.js";var o,l,y,d,p,g,Q,f,v,m=Object.defineProperty,A=e=>{throw TypeError(e)},D=(e,t,i)=>((e,t,i)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),b=(e,t,i)=>t.has(e)||A("Cannot "+i),w=(e,t,i)=>(b(e,t,"read from private field"),i?i.call(e):t.get(e)),k=(e,t,i)=>t.has(e)?A("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),q=(e,t,i,s)=>(b(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),M=(e,t,i)=>(b(e,t,"access private method"),i);class F{constructor(v){this.options=v,k(this,p),D(this,"useApiQuery"),D(this,"useSuspenseApiQuery"),D(this,"useApiMutation"),D(this,"useIsFetching"),D(this,"useIsMutating"),D(this,"QueryClientProvider"),k(this,o),k(this,l),k(this,y),k(this,d),q(this,o,c(v)),q(this,l,h(v)),q(this,y,{get:async(e,t)=>{const i=w(this,d);return q(this,d,void 0),await w(this,l).get(e,{...t,signal:i})},post:async(e,t,i)=>{const s=w(this,d);return q(this,d,void 0),await w(this,l).post(e,t,{...i,signal:s})},put:async(e,t,i)=>{const s=w(this,d);return q(this,d,void 0),await w(this,l).put(e,t,{...i,signal:s})},delete:async(e,t)=>{const i=w(this,d);return q(this,d,void 0),await w(this,l).delete(e,{...t,signal:i})}});const m=this;this.useApiQuery=function(i,s,r){var a;const{keepPreviousData:n,placeholderData:u,initialData:c,...h}=r??{},o=e({queryKey:[i.key,s],queryFn:({signal:e})=>i(s,{signal:e}),select:M(m,p,g),placeholderData:u??!0===n?t:void 0,initialData:c?{code:0,message:"ok",data:c}:void 0,...h});return M(a=m,p,f).call(a,o)},this.useSuspenseApiQuery=function(e,t,s){const{keepPreviousData:r,initialData:a,...n}=s??{},{data:u,refetch:c}=i({queryKey:[e.key,t],queryFn:({signal:i})=>e(t,{signal:i}),select:M(m,p,g),initialData:a?{code:0,message:"ok",data:a}:void 0,...n});return{data:u,refetch:M(this,p,Q).call(this,c)}},this.useApiMutation=function(e){const{isPending:t,isIdle:i,isError:r,isSuccess:a,error:n,data:u,mutateAsync:c}=s({mutationKey:[e.key],mutationFn:t=>e(t)});return{mutate:async e=>await c(e),isPending:t,isIdle:i,isError:r,isSuccess:a,message:u?.message,error:n??void 0,data:u?.data}},this.useIsFetching=function(e,t){return r({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1})>0},this.useIsMutating=function(e){return a({mutationKey:[e],exact:!1})>0},this.QueryClientProvider=function({children:e}){return u(n,{client:w(m,o)},e)}}async fetchApiQuery(e,t,i){const{initialData:s,...r}=i??{};return(await w(this,o).fetchQuery({queryKey:[e.key,t],queryFn:({signal:i})=>e(t,{signal:i}),initialData:s?{code:0,message:"ok",data:s}:void 0,...r})).data}createQueryApi(e,t){const i=M(this,p,v).call(this,e,t);return i.useQuery=this.useApiQuery.bind(this,i),i.useSuspenseQuery=this.useSuspenseApiQuery.bind(this,i),i.fetchQuery=this.fetchApiQuery.bind(this,i),i.getQueryData=this.getApiQueryData.bind(this,e),i.getQueriesData=this.getApiQueriesData.bind(this,e),i.setQueryData=(t,i)=>this.setApiQueryData(t,e,i),i.ensureQueryData=this.ensureApiQueryData.bind(this,i),i.removeQueries=this.removeApiQueries.bind(this,e),i.invalidateQueries=this.invalidateApiQueries.bind(this,e),i.resetQueries=this.resetApiQueries.bind(this,e),i.refetchQueries=this.refetchApiQueries.bind(this,e),i.cancelQueries=this.cancelApiQueries.bind(this,e),i.isFetching=this.isFetching.bind(this,e),i.useIsFetching=this.useIsFetching.bind(void 0,e),Object.freeze(i)}createMutationApi(e,t,i=[]){const s=M(this,p,v).call(this,e,t);return s.relatedQueries=Object.freeze(i),s.useMutation=this.useApiMutation.bind(this,s),s.refetchRelatedQueries=function(){return Promise.all(i.map((e=>e.refetchQueries())))},s.invalidateRelatedQueries=function(){return Promise.all(i.map((e=>e.invalidateQueries())))},s.isMutating=this.isMutating.bind(this,e),s.useIsMutating=this.useIsMutating.bind(void 0,e),Object.freeze(s)}getApiQueryData(e,t){return w(this,o).getQueryData(arguments.length>1?[e,t]:[e])}getApiQueriesData(e,t){return w(this,o).getQueriesData({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1})}setApiQueryData(e,t,i){w(this,o).setQueryData(arguments.length>2?[t,i]:[t],e)}async ensureApiQueryData(e,t,i){const{initialData:s,...r}=i??{};return(await w(this,o).ensureQueryData({queryKey:[e.key,t],queryFn:({signal:i})=>e(t,{signal:i}),initialData:s?{code:0,message:"ok",data:s}:void 0,...r,revalidateIfStale:!0})).data}removeApiQueries(e,t){w(this,o).removeQueries({type:"all",exact:!1,queryKey:arguments.length>1?[e,t]:[e]})}invalidateApiQueries(e,t){return w(this,o).invalidateQueries({queryKey:arguments.length>1?[e,t]:[e],type:"all",exact:!1,stale:!1,refetchType:"active"},{throwOnError:!1,cancelRefetch:!1})}resetApiQueries(e,t){return w(this,o).resetQueries({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1},{cancelRefetch:!0,throwOnError:!1})}refetchApiQueries(e,t){return w(this,o).refetchQueries({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1},{throwOnError:!1,cancelRefetch:!1})}cancelApiQueries(e,t){return w(this,o).cancelQueries({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1},{revert:!0,silent:!0})}isFetching(e,t){return w(this,o).isFetching({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1})>0}isMutating(e){return w(this,o).isMutating({mutationKey:[e],exact:!1})>0}}function K(e){return Object.freeze(new F(e))}o=new WeakMap,l=new WeakMap,y=new WeakMap,d=new WeakMap,p=new WeakSet,g=function(e){return e.data},Q=function(e){return async t=>{const i=await e(t);return{isSuccess:i.isSuccess,isError:i.isError,error:i.error,data:i.data}}},f=function({isPending:e,isFetching:t,isLoading:i,isRefetching:s,isSuccess:r,isPlaceholderData:a,isError:n,isLoadingError:u,isRefetchError:c,isStale:h,error:o,data:l,refetch:y}){return{isPending:e,isSuccess:r,isError:n,isLoadingError:u,isRefetchError:c,isLoading:i,isFetching:t,isRefetching:s,isPlaceholderData:a,isStale:h,error:o??void 0,data:l,refetch:M(this,p,Q).call(this,y)}},v=function(e,t){const i=t(w(this,y)),s=async(e,t)=>(q(this,d,t?.signal),await i(e));return s.key=e,s};export{F as ApiClient,K as createApiClient};
|
|
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/api/api-context.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{VefError as e}from"@vef-framework/shared";import{createContext as i,useMemo as t,createElement as r,useContext as a}from"react";const n=i(null),u=({client:e,
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
|
+
import{VefError as e}from"@vef-framework/shared";import{createContext as i,useMemo as t,createElement as r,useContext as a}from"react";const n=i(null),u=({client:e,dataDictionaryApi:i,loginApi:a,logoutApi:u,fetchAuthenticatedUserApi:s,children:p})=>{const A=t((()=>{const t=e.createQueryApi("_vefStubQueryApi",(()=>e=>Promise.resolve({code:0,message:"ok",data:e}))),r=e.createQueryApi("_vefAsyncFnQueryApi",(()=>async({args:e,fn:i})=>({code:0,message:"ok",data:await i(...e)}))),n=e.createMutationApi("_vefStubMutationApi",(()=>e=>Promise.resolve({code:0,message:"ok",data:e}))),p=e.createMutationApi("_vefAsyncFnMutationApi",(()=>async({args:e,fn:i})=>({code:0,message:"ok",data:await i(...e)})));return Object.freeze({useApiQuery:e.useApiQuery,useSuspenseApiQuery:e.useSuspenseApiQuery,useApiMutation:e.useApiMutation,useIsFetching:e.useIsFetching,useIsMutating:e.useIsMutating,fetchApiQuery:e.fetchApiQuery.bind(e),createQueryApi:e.createQueryApi.bind(e),createMutationApi:e.createMutationApi.bind(e),getApiQueryData:e.getApiQueryData.bind(e),getApiQueriesData:e.getApiQueriesData.bind(e),setApiQueryData:e.setApiQueryData.bind(e),ensureApiQueryData:e.ensureApiQueryData.bind(e),removeApiQueries:e.removeApiQueries.bind(e),invalidateApiQueries:e.invalidateApiQueries.bind(e),resetApiQueries:e.resetApiQueries.bind(e),refetchApiQueries:e.refetchApiQueries.bind(e),cancelApiQueries:e.cancelApiQueries.bind(e),isFetching:e.isFetching.bind(e),isMutating:e.isMutating.bind(e),stubQueryApi:t,asyncFnQueryApi:r,stubMutationApi:n,asyncFnMutationApi:p,dataDictionaryApi:i,loginApi:a,logoutApi:u,fetchAuthenticatedUserApi:s})}),[e,i,a,u,s]);return r(n.Provider,{value:A},r(e.QueryClientProvider,{},p))};function s(){const i=a(n);if(null===i)throw new e(-1,"Api context not found: Please ensure useApiContext is called within an ApiContextProvider");return i}export{u as ApiContextProvider,s as useApiContext};
|
|
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/api/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
export{ApiClient,createApiClient}from"./api-client.js";export{ApiContextProvider,useApiContext}from"./api-context.js";export{
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
|
+
export{ApiClient,createApiClient}from"./api-client.js";export{ApiContextProvider,useApiContext}from"./api-context.js";export{useQueryErrorResetBoundary}from"@tanstack/react-query";
|
|
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/api/query-client.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
import{QueryClient as e}from"@tanstack/react-query";function r(r){const t=r?.staleTime??1/0;return new e({defaultOptions:{queries:{networkMode:"always",staleTime:t,gcTime:r?.gcTime??6e5,retry:3,structuralSharing:!0,throwOnError:!1,refetchOnMount:!1,refetchOnReconnect:!0,refetchOnWindowFocus:!0},mutations:{networkMode:"always",gcTime:t,retry:!1,throwOnError:!1}}})}export{r as createQueryClient};
|
|
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/api/request-client.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
import{isNullish as e,showWarningMessage as t,VefError as a,isString as s,showErrorMessage as r,isFunction as o}from"@vef-framework/shared";import n,{CanceledError as i}from"axios";import l from"qs";var c,p=e=>{throw TypeError(e)},m=(e,t,a)=>t.has(e)||p("Cannot "+a),d=(e,t,a)=>(m(e,t,"read from private field"),a?a.call(e):t.get(e));const u=/\{\w+\}/;class h{constructor(o){var h,g,f;this.options=o,h=this,(g=c).has(h)?p("Cannot add the same private member more than once"):g instanceof WeakSet?g.add(h):g.set(h,f),((e,t,a,s)=>{m(e,t,"write to private field"),s?s.call(e,a):t.set(e,a)})(this,c,n.create({baseURL:o.baseUrl,timeout:o.timeout??3e4,headers:{"Content-Type":"application/json"},paramsSerializer:e=>l.stringify(e,{arrayFormat:"repeat",skipNulls:!0,charset:"utf-8"}),responseType:"json",validateStatus:()=>!0})),d(this,c).interceptors.request.use((t=>{const a=this.options.getAccessToken?.();a&&(t.headers.Authorization=`Bearer ${a}`);const{url:s}=t;return s&&u.test(s)&&(t.url=s.replace(u,((a,s)=>{const r=t.params?.[s];if(e(r))throw new Error(`Path parameter ${s} is nil`);return r}))),t})),d(this,c).interceptors.response.use((e=>{const{code:s,message:r}=e.data;return 0===s?e:(t(r),Promise.reject(new a(s,r)))}),(e=>{if(e instanceof i)return Promise.reject(e);const{response:t,message:o}=e;if(t?.data){const e=`处理请求响应信息异常:${o??"无"}`;return Promise.reject(new a(t.status,e))}{let t=o??(s(e)?e:"");if("Network Error"===t)t="接口连接异常可能原因:网络不通或存在跨域问题。";else if(t.includes("timeout"))t="接口请求超时";else if(t.includes("Request failed with status code")){t=`接口状态码异常:${o.substring(o.length-3)}`}else t="接口未知异常";return r(t),Promise.reject(new a(-1,t))}}))}async get(e,t){return(await d(this,c).get(e,{params:t?.params,signal:t?.signal})).data}async post(e,t,a){return(await d(this,c).post(e,t,{params:a?.params,signal:a?.signal})).data}async put(e,t,a){return(await d(this,c).put(e,t,{params:a?.params,signal:a?.signal})).data}async delete(e,t){return(await d(this,c).delete(e,{params:t?.params,signal:t?.signal})).data}async upload(e,t,a){return(await d(this,c).postForm(e,t,{params:a?.params,signal:a?.signal,onUploadProgress:o(a?.onProgress)?e=>{const t=e.lengthComputable?e.total??0:0,{loaded:s}=e,r=Math.round(s/t*100);a.onProgress?.(r)}:void 0})).data}async download(e,t){const{data:r,headers:n}=await d(this,c).get(e,{params:t?.params,responseType:"blob",onDownloadProgress:o(t?.onProgress)?e=>{const a=e.lengthComputable?e.total??0:0,{loaded:s}=e,r=Math.round(s/a*100);t.onProgress?.(r)}:void 0});let i=null;try{i=JSON.parse(await r.text())}catch{}if(i&&0!==i.code)throw new a(i.code,i.message);const l=n.get("content-disposition");if(s(l)){const e=/filename[^;=\n]*=(?<name>(?<quote>['"]).*?\2|[^;\n]*)/.exec(l);if(e&&e.groups){const{name:a}=e.groups,s=decodeURIComponent(a),n=document.createElement("a");n.href=URL.createObjectURL(r),n.download=o(t?.fileName)?t.fileName(s):t?.fileName??s,n.click(),URL.revokeObjectURL(n.href)}}}}function g(e){return Object.freeze(new h(e))}c=new WeakMap;export{h as RequestClient,g as createRequestClient};
|
|
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/auth/auth-context.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
import{isString as e,VefError as r}from"@vef-framework/shared";import{createContext as t,useMemo as o,createElement as n,useContext as i}from"react";const s=t(null),u=({permissionChecker:r,children:t})=>{const i=o((()=>({checkPermission:t=>!r||(e(t)?r(t):r(t.key))})),[r]);return n(s.Provider,{value:i},t)};function c(){const e=i(s);if(null===e)throw new r(-1,"useAuthContext must be used within a AuthContextProvider");return e}export{u as AuthContextProvider,c as useAuthContext};
|
|
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/auth/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
export{AuthContextProvider,useAuthContext}from"./auth-context.js";
|
|
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/expr/compiler.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
import{parseArgs as n,getAt as t,isQuotedString as e,rmEscapes as r}from"./helpers.js";function i(s){let l;const o=new Set,u=function(n,t){return"function"==typeof n?n(t):n},f=[{"&&":(n,t,e)=>u(n,e)&&u(t,e),"||":(n,t,e)=>u(n,e)||u(t,e)},{"===":(n,t,e)=>!(u(n,e)!==u(t,e)),"!==":(n,t,e)=>!(u(n,e)===u(t,e)),"==":(n,t,e)=>!(u(n,e)!=u(t,e)),"!=":(n,t,e)=>!(u(n,e)==u(t,e)),">=":(n,t,e)=>!!(u(n,e)>=u(t,e)),"<=":(n,t,e)=>!!(u(n,e)<=u(t,e)),">":(n,t,e)=>!!(u(n,e)>u(t,e)),"<":(n,t,e)=>!!(u(n,e)<u(t,e))},{"+":(n,t,e)=>u(n,e)+u(t,e),"-":(n,t,e)=>u(n,e)-u(t,e)},{"*":(n,t,e)=>u(n,e)*u(t,e),"/":(n,t,e)=>u(n,e)/u(t,e),"%":(n,t,e)=>u(n,e)%u(t,e)}],c=f.reduce(((n,t)=>n.concat(Object.keys(t))),[]),d=new Set(c.map((n=>n.charAt(0))));function g(n,t,e,r){const i=n.filter((n=>n.startsWith(t)));return!!i.length&&i.find((n=>{if(r.length>=e+n.length){if(r.substring(e,e+n.length)===n)return n}return!1}))}function h(n,t,e=1){let r=e?t.substring(n+1).trim():t.substring(0,n).trim();if(!r.length)return-1;if(!e){const n=r.split("").reverse(),t=n.findIndex((n=>d.has(n)));r=n.slice(t).join("")}const[i]=r;return f.findIndex((n=>!!g(Object.keys(n),i,0,r)))}function a(n,t){let e="";const{length:r}=t;let i=0;for(let s=n;s<r;s++){const n=t.charAt(s);if("("===n)i++;else if(")"===n)i--;else if(0===i&&" "===n)continue;if(0===i&&g(c,n,s,t))return[e,s-1];e+=n}return[e,t.length-1]}function b(n,t=0){const e=f[t],{length:r}=n,i=Object.keys(e);let s,l,o=0,u=!1,c=null,d="",b=null,y="",m="",$="",j=0;const v=(n,t)=>{n?m+=t:d+=t};for(let f=0;f<r;f++)if(l=y,y=n.charAt(f),"'"!==y&&'"'!==y||"\\"===l||!(0===o&&!u||o&&!$))if(u&&(y!==u||"\\"===l)||$&&(y!==$||"\\"===l))v(o,y);else if(u!==y)if($!==y){if(" "!==y)if("("===y)0===o?j=f:m+=y,o++;else if(")"===y)if(o--,0===o){const e="string"==typeof d&&d.startsWith("$")?d:void 0,r=e&&"."===n.charAt(f+1);let i="";r&&([i,f]=a(f+2,n));const s=c?t:h(j,n,0),l=h(f,n);-1===s&&-1===l?(d=p(m,-1,e,i),"string"==typeof d&&(d=m)):c&&(s>=l||-1===l)&&t===s?(b=c.bind(null,p(m,-1,e,i)),c=null,d=""):l>s&&t===l?d=p(m,-1,e,i):d+=`(${m})${r?`.${i}`:""}`,m=""}else m+=y;else{if(0===o&&(s=g(i,y,f,n))){0===f&&console.error(103,[s,n]),f+=s.length-1,f===n.length-1&&console.error(104,[s,n]),c?d&&(b=c.bind(null,p(d,t)),c=e[s].bind(null,b),d=""):b?(c=e[s].bind(null,p(b,t)),b=null):(c=e[s].bind(null,p(d,t)),d="");continue}v(o,y)}}else $=!1,v(o,y);else u=!1,v(o,y);else o?$=y:u=y,v(o,y);return d&&c&&(c=c.bind(null,p(d,t))),c=!c&&b?b:c,!c&&d&&(c=(n,t)=>"function"==typeof n?n(t):n,c=c.bind(null,p(d,t))),c||d||console.error(105,n),c}function p(s,u,c,d){if(c){const e=p(c,f.length);let r,o=!!d&&i(`$${d}`);if("function"==typeof e){const i=n(String(s)).map((n=>p(n,-1)));return n=>{const s=e(n);return"function"!=typeof s?(console.warn(150,c),s):(r=s(...i.map((t=>"function"==typeof t?t(n):t))),o&&(o=o.provide((n=>{const e=l(n);return n.reduce(((n,i)=>{if(i===d||d?.startsWith(`${i}(`)){const e=t(r,i);n[i]=()=>e}else n[i]=e[i];return n}),{})}))),o?o():r)}}}else if("string"==typeof s){if("true"===s)return!0;if("false"===s)return!1;if("undefined"===s)return;if(e(s))return r(s.substring(1,s.length-1));if(!Number.isNaN(+s))return Number(s);if(u<f.length-1)return b(s,u+1);if(s.startsWith("$")){const n=s.substring(1);return o.add(n),function(t){return n in t?t[n]():void 0}}return s}return s}const y=b(s),m=Array.from(o);return Object.assign(y,{provide:function n(t){return l=t,Object.assign(y.bind(null,t(m)),{provide:n})}})}export{i as compile};
|
|
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/expr/helpers.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
function t(t,n){return Object.hasOwn(t,n)}function n(n,e){if(!n||"object"!=typeof n)return null;const r=e.split(".");let u=n;for(const n in r){const e=r[n];if(t(u,e)&&(u=u[e]),+n==r.length-1)return u;if(!u||"object"!=typeof u)return null}return null}function e(t){if('"'!==t[0]&&"'"!==t[0])return!1;if(t[0]!==t[t.length-1])return!1;const[n]=t;for(let e=1;e<t.length;e++)if(t[e]===n&&(1===e||"\\"!==t[e-1])&&e!==t.length-1)return!1;return!0}function r(t){const n=[];let e="",r=0,u="",o="";for(let l=0;l<t.length;l++){const f=t.charAt(l);f===u&&"\\"!==o?u="":"'"!==f&&'"'!==f||u||"\\"===o?"("!==f||u?")"!==f||u||r--:r++:u=f,","!==f||u||0!==r?(" "!==f||u)&&(e+=f):(n.push(e),e=""),o=f}return e&&n.push(e),n}function u(t){if(!t.length)return"";let n="",e="";for(let r=0;r<t.length;r++){const u=t.charAt(r);"\\"===u&&"\\"!==e||(n+=u),e=u}return n}export{n as getAt,t as has,e as isQuotedString,r as parseArgs,u as rmEscapes};
|
|
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/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import"./api/index.js";import"./auth/index.js";export{compile}from"./expr/compiler.js";export{ApiClient,createApiClient}from"./api/api-client.js";export{
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
|
+
import"./api/index.js";import"./auth/index.js";export{compile}from"./expr/compiler.js";export{ApiClient,createApiClient}from"./api/api-client.js";export{useQueryErrorResetBoundary}from"@tanstack/react-query";export{ApiContextProvider,useApiContext}from"./api/api-context.js";export{AuthContextProvider,useAuthContext}from"./auth/auth-context.js";
|
|
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.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
function t(){const t=[];let n=0;const e=n=>t.push(n),s=e=>{const o=t[n];return"function"==typeof o?o(e,(t=>(n++,s(t)))):(n=0,e)};return e.dispatch=s,e.unshift=n=>t.unshift(n),e.remove=n=>{const e=t.indexOf(n);e>-1&&t.splice(e,1)},e}export{t as default};
|
|
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/api/api-client.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tanstack/react-query"),t=require("react"),i=require("./query-client.cjs"),
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tanstack/react-query"),t=require("react"),i=require("./query-client.cjs"),s=require("./request-client.cjs");var r,a,n,u,c,h,o,l,y,d=Object.defineProperty,p=e=>{throw TypeError(e)},g=(e,t,i)=>((e,t,i)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),Q=(e,t,i)=>t.has(e)||p("Cannot "+i),f=(e,t,i)=>(Q(e,t,"read from private field"),i?i.call(e):t.get(e)),v=(e,t,i)=>t.has(e)?p("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),A=(e,t,i,s)=>(Q(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),D=(e,t,i)=>(Q(e,t,"access private method"),i);class m{constructor(y){this.options=y,v(this,c),g(this,"useApiQuery"),g(this,"useSuspenseApiQuery"),g(this,"useApiMutation"),g(this,"useIsFetching"),g(this,"useIsMutating"),g(this,"QueryClientProvider"),v(this,r),v(this,a),v(this,n),v(this,u),A(this,r,i.createQueryClient(y)),A(this,a,s.createRequestClient(y)),A(this,n,{get:async(e,t)=>{const i=f(this,u);return A(this,u,void 0),await f(this,a).get(e,{...t,signal:i})},post:async(e,t,i)=>{const s=f(this,u);return A(this,u,void 0),await f(this,a).post(e,t,{...i,signal:s})},put:async(e,t,i)=>{const s=f(this,u);return A(this,u,void 0),await f(this,a).put(e,t,{...i,signal:s})},delete:async(e,t)=>{const i=f(this,u);return A(this,u,void 0),await f(this,a).delete(e,{...t,signal:i})}});const d=this;this.useApiQuery=function(t,i,s){var r;const{keepPreviousData:a,placeholderData:n,initialData:u,...o}=s??{},y=e.useQuery({queryKey:[t.key,i],queryFn:({signal:e})=>t(i,{signal:e}),select:D(d,c,h),placeholderData:n??!0===a?e.keepPreviousData:void 0,initialData:u?{code:0,message:"ok",data:u}:void 0,...o});return D(r=d,c,l).call(r,y)},this.useSuspenseApiQuery=function(t,i,s){const{keepPreviousData:r,initialData:a,...n}=s??{},{data:u,refetch:l}=e.useSuspenseQuery({queryKey:[t.key,i],queryFn:({signal:e})=>t(i,{signal:e}),select:D(d,c,h),initialData:a?{code:0,message:"ok",data:a}:void 0,...n});return{data:u,refetch:D(this,c,o).call(this,l)}},this.useApiMutation=function(t){const{isPending:i,isIdle:s,isError:r,isSuccess:a,error:n,data:u,mutateAsync:c}=e.useMutation({mutationKey:[t.key],mutationFn:e=>t(e)});return{mutate:async e=>await c(e),isPending:i,isIdle:s,isError:r,isSuccess:a,message:u?.message,error:n??void 0,data:u?.data}},this.useIsFetching=function(t,i){return e.useIsFetching({queryKey:arguments.length>1?[t,i]:[t],type:"active",exact:!1})>0},this.useIsMutating=function(t){return e.useIsMutating({mutationKey:[t],exact:!1})>0},this.QueryClientProvider=function({children:i}){return t.createElement(e.QueryClientProvider,{client:f(d,r)},i)}}async fetchApiQuery(e,t,i){const{initialData:s,...a}=i??{};return(await f(this,r).fetchQuery({queryKey:[e.key,t],queryFn:({signal:i})=>e(t,{signal:i}),initialData:s?{code:0,message:"ok",data:s}:void 0,...a})).data}createQueryApi(e,t){const i=D(this,c,y).call(this,e,t);return i.useQuery=this.useApiQuery.bind(this,i),i.useSuspenseQuery=this.useSuspenseApiQuery.bind(this,i),i.fetchQuery=this.fetchApiQuery.bind(this,i),i.getQueryData=this.getApiQueryData.bind(this,e),i.getQueriesData=this.getApiQueriesData.bind(this,e),i.setQueryData=(t,i)=>this.setApiQueryData(t,e,i),i.ensureQueryData=this.ensureApiQueryData.bind(this,i),i.removeQueries=this.removeApiQueries.bind(this,e),i.invalidateQueries=this.invalidateApiQueries.bind(this,e),i.resetQueries=this.resetApiQueries.bind(this,e),i.refetchQueries=this.refetchApiQueries.bind(this,e),i.cancelQueries=this.cancelApiQueries.bind(this,e),i.isFetching=this.isFetching.bind(this,e),i.useIsFetching=this.useIsFetching.bind(void 0,e),Object.freeze(i)}createMutationApi(e,t,i=[]){const s=D(this,c,y).call(this,e,t);return s.relatedQueries=Object.freeze(i),s.useMutation=this.useApiMutation.bind(this,s),s.refetchRelatedQueries=function(){return Promise.all(i.map((e=>e.refetchQueries())))},s.invalidateRelatedQueries=function(){return Promise.all(i.map((e=>e.invalidateQueries())))},s.isMutating=this.isMutating.bind(this,e),s.useIsMutating=this.useIsMutating.bind(void 0,e),Object.freeze(s)}getApiQueryData(e,t){return f(this,r).getQueryData(arguments.length>1?[e,t]:[e])}getApiQueriesData(e,t){return f(this,r).getQueriesData({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1})}setApiQueryData(e,t,i){f(this,r).setQueryData(arguments.length>2?[t,i]:[t],e)}async ensureApiQueryData(e,t,i){const{initialData:s,...a}=i??{};return(await f(this,r).ensureQueryData({queryKey:[e.key,t],queryFn:({signal:i})=>e(t,{signal:i}),initialData:s?{code:0,message:"ok",data:s}:void 0,...a,revalidateIfStale:!0})).data}removeApiQueries(e,t){f(this,r).removeQueries({type:"all",exact:!1,queryKey:arguments.length>1?[e,t]:[e]})}invalidateApiQueries(e,t){return f(this,r).invalidateQueries({queryKey:arguments.length>1?[e,t]:[e],type:"all",exact:!1,stale:!1,refetchType:"active"},{throwOnError:!1,cancelRefetch:!1})}resetApiQueries(e,t){return f(this,r).resetQueries({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1},{cancelRefetch:!0,throwOnError:!1})}refetchApiQueries(e,t){return f(this,r).refetchQueries({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1},{throwOnError:!1,cancelRefetch:!1})}cancelApiQueries(e,t){return f(this,r).cancelQueries({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1},{revert:!0,silent:!0})}isFetching(e,t){return f(this,r).isFetching({queryKey:arguments.length>1?[e,t]:[e],type:"active",exact:!1})>0}isMutating(e){return f(this,r).isMutating({mutationKey:[e],exact:!1})>0}}r=new WeakMap,a=new WeakMap,n=new WeakMap,u=new WeakMap,c=new WeakSet,h=function(e){return e.data},o=function(e){return async t=>{const i=await e(t);return{isSuccess:i.isSuccess,isError:i.isError,error:i.error,data:i.data}}},l=function({isPending:e,isFetching:t,isLoading:i,isRefetching:s,isSuccess:r,isPlaceholderData:a,isError:n,isLoadingError:u,isRefetchError:h,isStale:l,error:y,data:d,refetch:p}){return{isPending:e,isSuccess:r,isError:n,isLoadingError:u,isRefetchError:h,isLoading:i,isFetching:t,isRefetching:s,isPlaceholderData:a,isStale:l,error:y??void 0,data:d,refetch:D(this,c,o).call(this,p)}},y=function(e,t){const i=t(f(this,n)),s=async(e,t)=>(A(this,u,t?.signal),await i(e));return s.key=e,s},exports.ApiClient=m,exports.createApiClient=function(e){return Object.freeze(new m(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 */
|
package/lib/api/api-context.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),i=require("react"),t=i.createContext(null);exports.ApiContextProvider=({client:e,
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),i=require("react"),t=i.createContext(null);exports.ApiContextProvider=({client:e,dataDictionaryApi:r,loginApi:n,logoutApi:u,fetchAuthenticatedUserApi:a,children:s})=>{const o=i.useMemo((()=>{const i=e.createQueryApi("_vefStubQueryApi",(()=>e=>Promise.resolve({code:0,message:"ok",data:e}))),t=e.createQueryApi("_vefAsyncFnQueryApi",(()=>async({args:e,fn:i})=>({code:0,message:"ok",data:await i(...e)}))),s=e.createMutationApi("_vefStubMutationApi",(()=>e=>Promise.resolve({code:0,message:"ok",data:e}))),o=e.createMutationApi("_vefAsyncFnMutationApi",(()=>async({args:e,fn:i})=>({code:0,message:"ok",data:await i(...e)})));return Object.freeze({useApiQuery:e.useApiQuery,useSuspenseApiQuery:e.useSuspenseApiQuery,useApiMutation:e.useApiMutation,useIsFetching:e.useIsFetching,useIsMutating:e.useIsMutating,fetchApiQuery:e.fetchApiQuery.bind(e),createQueryApi:e.createQueryApi.bind(e),createMutationApi:e.createMutationApi.bind(e),getApiQueryData:e.getApiQueryData.bind(e),getApiQueriesData:e.getApiQueriesData.bind(e),setApiQueryData:e.setApiQueryData.bind(e),ensureApiQueryData:e.ensureApiQueryData.bind(e),removeApiQueries:e.removeApiQueries.bind(e),invalidateApiQueries:e.invalidateApiQueries.bind(e),resetApiQueries:e.resetApiQueries.bind(e),refetchApiQueries:e.refetchApiQueries.bind(e),cancelApiQueries:e.cancelApiQueries.bind(e),isFetching:e.isFetching.bind(e),isMutating:e.isMutating.bind(e),stubQueryApi:i,asyncFnQueryApi:t,stubMutationApi:s,asyncFnMutationApi:o,dataDictionaryApi:r,loginApi:n,logoutApi:u,fetchAuthenticatedUserApi:a})}),[e,r,n,u,a]);return i.createElement(t.Provider,{value:o},i.createElement(e.QueryClientProvider,{},s))},exports.useApiContext=function(){const r=i.useContext(t);if(null===r)throw new e.VefError(-1,"Api context not found: Please ensure useApiContext is called within an ApiContextProvider");return 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 */
|
package/lib/api/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./api-client.cjs"),t=require("./api-context.cjs"),r=require("@tanstack/react-query");exports.ApiClient=e.ApiClient,exports.createApiClient=e.createApiClient,exports.ApiContextProvider=t.ApiContextProvider,exports.useApiContext=t.useApiContext,Object.defineProperty(exports,"
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./api-client.cjs"),t=require("./api-context.cjs"),r=require("@tanstack/react-query");exports.ApiClient=e.ApiClient,exports.createApiClient=e.createApiClient,exports.ApiContextProvider=t.ApiContextProvider,exports.useApiContext=t.useApiContext,Object.defineProperty(exports,"useQueryErrorResetBoundary",{enumerable:!0,get:()=>r.useQueryErrorResetBoundary});
|
|
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/api/query-client.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tanstack/react-query");exports.createQueryClient=function(t){const r=t?.staleTime??1/0,n=t?.gcTime??6e5;return new e.QueryClient({defaultOptions:{queries:{networkMode:"always",staleTime:r,gcTime:n,retry:3,structuralSharing:!0,throwOnError:!1,refetchOnMount:!1,refetchOnReconnect:!0,refetchOnWindowFocus:!0},mutations:{networkMode:"always",gcTime:r,retry:!1,throwOnError:!1}}})};
|
|
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.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),t=require("axios"),r=require("qs");var s,a=e=>{throw TypeError(e)},o=(e,t,r)=>t.has(e)||a("Cannot "+r),n=(e,t,r)=>(o(e,t,"read from private field"),r?r.call(e):t.get(e));const i=/\{\w+\}/;class l{constructor(l){var c,u,p;this.options=l,c=this,(u=s).has(c)?a("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(c):u.set(c,p),((e,t,r,s)=>{o(e,t,"write to private field"),s?s.call(e,r):t.set(e,r)})(this,s,t.create({baseURL:l.baseUrl,timeout:l.timeout??3e4,headers:{"Content-Type":"application/json"},paramsSerializer:e=>r.stringify(e,{arrayFormat:"repeat",skipNulls:!0,charset:"utf-8"}),responseType:"json",validateStatus:()=>!0})),n(this,s).interceptors.request.use((t=>{const r=this.options.getAccessToken?.();r&&(t.headers.Authorization=`Bearer ${r}`);const{url:s}=t;return s&&i.test(s)&&(t.url=s.replace(i,((r,s)=>{const a=t.params?.[s];if(e.isNullish(a))throw new Error(`Path parameter ${s} is nil`);return a}))),t})),n(this,s).interceptors.response.use((t=>{const{code:r,message:s}=t.data;return 0===r?t:(e.showWarningMessage(s),Promise.reject(new e.VefError(r,s)))}),(r=>{if(r instanceof t.CanceledError)return Promise.reject(r);const{response:s,message:a}=r;if(s?.data){const t=`处理请求响应信息异常:${a??"无"}`;return Promise.reject(new e.VefError(s.status,t))}{let t=a??(e.isString(r)?r:"");if("Network Error"===t)t="接口连接异常可能原因:网络不通或存在跨域问题。";else if(t.includes("timeout"))t="接口请求超时";else if(t.includes("Request failed with status code")){t=`接口状态码异常:${a.substring(a.length-3)}`}else t="接口未知异常";return e.showErrorMessage(t),Promise.reject(new e.VefError(-1,t))}}))}async get(e,t){return(await n(this,s).get(e,{params:t?.params,signal:t?.signal})).data}async post(e,t,r){return(await n(this,s).post(e,t,{params:r?.params,signal:r?.signal})).data}async put(e,t,r){return(await n(this,s).put(e,t,{params:r?.params,signal:r?.signal})).data}async delete(e,t){return(await n(this,s).delete(e,{params:t?.params,signal:t?.signal})).data}async upload(t,r,a){return(await n(this,s).postForm(t,r,{params:a?.params,signal:a?.signal,onUploadProgress:e.isFunction(a?.onProgress)?e=>{const t=e.lengthComputable?e.total??0:0,{loaded:r}=e,s=Math.round(r/t*100);a.onProgress?.(s)}:void 0})).data}async download(t,r){const{data:a,headers:o}=await n(this,s).get(t,{params:r?.params,responseType:"blob",onDownloadProgress:e.isFunction(r?.onProgress)?e=>{const t=e.lengthComputable?e.total??0:0,{loaded:s}=e,a=Math.round(s/t*100);r.onProgress?.(a)}:void 0});let i=null;try{i=JSON.parse(await a.text())}catch{}if(i&&0!==i.code)throw new e.VefError(i.code,i.message);const l=o.get("content-disposition");if(e.isString(l)){const t=/filename[^;=\n]*=(?<name>(?<quote>['"]).*?\2|[^;\n]*)/.exec(l);if(t&&t.groups){const{name:s}=t.groups,o=decodeURIComponent(s),n=document.createElement("a");n.href=URL.createObjectURL(a),n.download=e.isFunction(r?.fileName)?r.fileName(o):r?.fileName??o,n.click(),URL.revokeObjectURL(n.href)}}}}s=new WeakMap,exports.RequestClient=l,exports.createRequestClient=function(e){return Object.freeze(new l(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.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared"),t=require("react"),r=t.createContext(null);exports.AuthContextProvider=({permissionChecker:o,children:n})=>{const u=t.useMemo((()=>({checkPermission:t=>!o||(e.isString(t)?o(t):o(t.key))})),[o]);return t.createElement(r.Provider,{value:u},n)},exports.useAuthContext=function(){const o=t.useContext(r);if(null===o)throw new e.VefError(-1,"useAuthContext must be used within a AuthContextProvider");return 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 */
|
package/lib/auth/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./auth-context.cjs");exports.AuthContextProvider=t.AuthContextProvider,exports.useAuthContext=t.useAuthContext;
|
|
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/expr/compiler.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./helpers.cjs");exports.compile=function t(e){let r;const i=new Set,s=function(n,t){return"function"==typeof n?n(t):n},o=[{"&&":(n,t,e)=>s(n,e)&&s(t,e),"||":(n,t,e)=>s(n,e)||s(t,e)},{"===":(n,t,e)=>!(s(n,e)!==s(t,e)),"!==":(n,t,e)=>!(s(n,e)===s(t,e)),"==":(n,t,e)=>!(s(n,e)!=s(t,e)),"!=":(n,t,e)=>!(s(n,e)==s(t,e)),">=":(n,t,e)=>!!(s(n,e)>=s(t,e)),"<=":(n,t,e)=>!!(s(n,e)<=s(t,e)),">":(n,t,e)=>!!(s(n,e)>s(t,e)),"<":(n,t,e)=>!!(s(n,e)<s(t,e))},{"+":(n,t,e)=>s(n,e)+s(t,e),"-":(n,t,e)=>s(n,e)-s(t,e)},{"*":(n,t,e)=>s(n,e)*s(t,e),"/":(n,t,e)=>s(n,e)/s(t,e),"%":(n,t,e)=>s(n,e)%s(t,e)}],l=o.reduce(((n,t)=>n.concat(Object.keys(t))),[]),u=new Set(l.map((n=>n.charAt(0))));function f(n,t,e,r){const i=n.filter((n=>n.startsWith(t)));return!!i.length&&i.find((n=>{if(r.length>=e+n.length){if(r.substring(e,e+n.length)===n)return n}return!1}))}function c(n,t,e=1){let r=e?t.substring(n+1).trim():t.substring(0,n).trim();if(!r.length)return-1;if(!e){const n=r.split("").reverse(),t=n.findIndex((n=>u.has(n)));r=n.slice(t).join("")}const[i]=r;return o.findIndex((n=>!!f(Object.keys(n),i,0,r)))}function g(n,t){let e="";const{length:r}=t;let i=0;for(let s=n;s<r;s++){const n=t.charAt(s);if("("===n)i++;else if(")"===n)i--;else if(0===i&&" "===n)continue;if(0===i&&f(l,n,s,t))return[e,s-1];e+=n}return[e,t.length-1]}function d(n,t=0){const e=o[t],{length:r}=n,i=Object.keys(e);let s,l,u=0,d=!1,h=null,b="",p=null,y="",m="",j="",$=0;const v=(n,t)=>{n?m+=t:b+=t};for(let o=0;o<r;o++)if(l=y,y=n.charAt(o),"'"!==y&&'"'!==y||"\\"===l||!(0===u&&!d||u&&!j))if(d&&(y!==d||"\\"===l)||j&&(y!==j||"\\"===l))v(u,y);else if(d!==y)if(j!==y){if(" "!==y)if("("===y)0===u?$=o:m+=y,u++;else if(")"===y)if(u--,0===u){const e="string"==typeof b&&b.startsWith("$")?b:void 0,r=e&&"."===n.charAt(o+1);let i="";r&&([i,o]=g(o+2,n));const s=h?t:c($,n,0),l=c(o,n);-1===s&&-1===l?(b=a(m,-1,e,i),"string"==typeof b&&(b=m)):h&&(s>=l||-1===l)&&t===s?(p=h.bind(null,a(m,-1,e,i)),h=null,b=""):l>s&&t===l?b=a(m,-1,e,i):b+=`(${m})${r?`.${i}`:""}`,m=""}else m+=y;else{if(0===u&&(s=f(i,y,o,n))){0===o&&console.error(103,[s,n]),o+=s.length-1,o===n.length-1&&console.error(104,[s,n]),h?b&&(p=h.bind(null,a(b,t)),h=e[s].bind(null,p),b=""):p?(h=e[s].bind(null,a(p,t)),p=null):(h=e[s].bind(null,a(b,t)),b="");continue}v(u,y)}}else j=!1,v(u,y);else d=!1,v(u,y);else u?j=y:d=y,v(u,y);return b&&h&&(h=h.bind(null,a(b,t))),h=!h&&p?p:h,!h&&b&&(h=(n,t)=>"function"==typeof n?n(t):n,h=h.bind(null,a(b,t))),h||b||console.error(105,n),h}function a(e,s,l,u){if(l){const i=a(l,o.length);let s,f=!!u&&t(`$${u}`);if("function"==typeof i){const t=n.parseArgs(String(e)).map((n=>a(n,-1)));return e=>{const o=i(e);return"function"!=typeof o?(console.warn(150,l),o):(s=o(...t.map((n=>"function"==typeof n?n(e):n))),f&&(f=f.provide((t=>{const e=r(t);return t.reduce(((t,r)=>{if(r===u||u?.startsWith(`${r}(`)){const e=n.getAt(s,r);t[r]=()=>e}else t[r]=e[r];return t}),{})}))),f?f():s)}}}else if("string"==typeof e){if("true"===e)return!0;if("false"===e)return!1;if("undefined"===e)return;if(n.isQuotedString(e))return n.rmEscapes(e.substring(1,e.length-1));if(!Number.isNaN(+e))return Number(e);if(s<o.length-1)return d(e,s+1);if(e.startsWith("$")){const n=e.substring(1);return i.add(n),function(t){return n in t?t[n]():void 0}}return e}return e}const h=d(e),b=Array.from(i);return Object.assign(h,{provide:function n(t){return r=t,Object.assign(h.bind(null,t(b)),{provide: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 */
|
package/lib/expr/helpers.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
"use strict";function t(t,e){return Object.hasOwn(t,e)}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),exports.getAt=function(e,n){if(!e||"object"!=typeof e)return null;const r=n.split(".");let o=e;for(const e in r){const n=r[e];if(t(o,n)&&(o=o[n]),+e==r.length-1)return o;if(!o||"object"!=typeof o)return null}return null},exports.has=t,exports.isQuotedString=function(t){if('"'!==t[0]&&"'"!==t[0])return!1;if(t[0]!==t[t.length-1])return!1;const[e]=t;for(let n=1;n<t.length;n++)if(t[n]===e&&(1===n||"\\"!==t[n-1])&&n!==t.length-1)return!1;return!0},exports.parseArgs=function(t){const e=[];let n="",r=0,o="",u="";for(let s=0;s<t.length;s++){const l=t.charAt(s);l===o&&"\\"!==u?o="":"'"!==l&&'"'!==l||o||"\\"===u?"("!==l||o?")"!==l||o||r--:r++:o=l,","!==l||o||0!==r?(" "!==l||o)&&(n+=l):(e.push(n),n=""),u=l}return n&&e.push(n),e},exports.rmEscapes=function(t){if(!t.length)return"";let e="",n="";for(let r=0;r<t.length;r++){const o=t.charAt(r);"\\"===o&&"\\"!==n||(e+=o),n=o}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 */
|
package/lib/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./api/index.cjs"),require("./auth/index.cjs");const e=require("./expr/compiler.cjs"),t=require("./api/api-client.cjs"),r=require("@tanstack/react-query"),i=require("./api/api-context.cjs"),o=require("./auth/auth-context.cjs");exports.compile=e.compile,exports.ApiClient=t.ApiClient,exports.createApiClient=t.createApiClient,Object.defineProperty(exports,"
|
|
1
|
+
/*! VefFramework version: 1.0.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./api/index.cjs"),require("./auth/index.cjs");const e=require("./expr/compiler.cjs"),t=require("./api/api-client.cjs"),r=require("@tanstack/react-query"),i=require("./api/api-context.cjs"),o=require("./auth/auth-context.cjs");exports.compile=e.compile,exports.ApiClient=t.ApiClient,exports.createApiClient=t.createApiClient,Object.defineProperty(exports,"useQueryErrorResetBoundary",{enumerable:!0,get:()=>r.useQueryErrorResetBoundary}),exports.ApiContextProvider=i.ApiContextProvider,exports.useApiContext=i.useApiContext,exports.AuthContextProvider=o.AuthContextProvider,exports.useAuthContext=o.useAuthContext;
|
|
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.41, build time: 2024-12-25T08:44:08.089Z, made by Venus. */
|
|
2
2
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default=function(){const e=[];let t=0;const n=t=>e.push(t),o=n=>{const s=e[t];return"function"==typeof s?s(n,(e=>(t++,o(e)))):(t=0,n)};return n.dispatch=o,n.unshift=t=>e.unshift(t),n.remove=t=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},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 */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vef-framework/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.41",
|
|
5
5
|
"private": false,
|
|
6
6
|
"packageManager": "pnpm@9.15.0",
|
|
7
7
|
"description": "The core of the VEF framework",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"@emotion/cache": "11.14.0",
|
|
32
32
|
"@emotion/react": "11.14.0",
|
|
33
33
|
"@emotion/styled": "11.14.0",
|
|
34
|
-
"antd": "5.22.
|
|
34
|
+
"antd": "5.22.5",
|
|
35
35
|
"tslib": "2.8.1",
|
|
36
36
|
"use-sync-external-store": "^1.4.0",
|
|
37
37
|
"@tanstack/react-query": "5.62.8",
|
|
38
|
-
"@tanstack/react-router": "1.
|
|
39
|
-
"@vef-framework/shared": "1.0.
|
|
38
|
+
"@tanstack/react-router": "1.92.1",
|
|
39
|
+
"@vef-framework/shared": "1.0.41",
|
|
40
40
|
"axios": "1.7.9",
|
|
41
41
|
"qs": "6.13.1"
|
|
42
42
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type UseQueryOptions } from "@tanstack/react-query";
|
|
1
|
+
import type { Api, ApiResponse, BiMapperOptional1, ChildrenProps, Except, Mapper, MaybeUndefined, MutationApi, MutationResult, ObjectType, ObjectValue, QueryApi, QueryResult, SuspenseQueryResult, VefError } from "@vef-framework/shared";
|
|
2
|
+
import { type FetchQueryOptions as FetchReactQueryOptions, type RefetchOptions, type UseQueryOptions as UseReactQueryOptions } from "@tanstack/react-query";
|
|
3
3
|
import { type FC } from "react";
|
|
4
4
|
import { type QueryClientOptions } from "./query-client";
|
|
5
5
|
import { type RequestClientOptions, type RequestOptions } from "./request-client";
|
|
@@ -20,7 +20,7 @@ export interface ApiClientOptions extends RequestClientOptions, QueryClientOptio
|
|
|
20
20
|
/**
|
|
21
21
|
* The query options.
|
|
22
22
|
*/
|
|
23
|
-
export interface
|
|
23
|
+
export interface UseQueryOptions<R = unknown> extends Pick<UseReactQueryOptions<ApiResponse<R>, VefError, R>, "staleTime" | "enabled" | "placeholderData" | "refetchInterval" | "refetchIntervalInBackground" | "refetchOnMount" | "refetchOnWindowFocus"> {
|
|
24
24
|
/**
|
|
25
25
|
* Whether to keep the previous data.
|
|
26
26
|
*/
|
|
@@ -30,6 +30,16 @@ export interface QueryOptions<R = unknown> extends Pick<UseQueryOptions<ApiRespo
|
|
|
30
30
|
*/
|
|
31
31
|
initialData?: R;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* The fetch query options.
|
|
35
|
+
*/
|
|
36
|
+
export interface FetchQueryOptions<R = unknown> extends Pick<FetchReactQueryOptions<ApiResponse<R>, VefError>, "queryKey" | "queryFn" | "staleTime"> {
|
|
37
|
+
/**
|
|
38
|
+
* The initial data.
|
|
39
|
+
*/
|
|
40
|
+
initialData?: R;
|
|
41
|
+
}
|
|
42
|
+
export type { RefetchOptions };
|
|
33
43
|
/**
|
|
34
44
|
* The API client.
|
|
35
45
|
*/
|
|
@@ -41,7 +51,11 @@ export declare class ApiClient {
|
|
|
41
51
|
* These hook functions are doing this because React's Hooks cannot be used in class methods,
|
|
42
52
|
* and this approach can bypass the check.
|
|
43
53
|
*/
|
|
44
|
-
readonly useApiQuery: <T = unknown, R = unknown>(queryFn: Readonly<QueryApi<T, R>>, args: T, options?:
|
|
54
|
+
readonly useApiQuery: <T = unknown, R = unknown>(queryFn: Readonly<QueryApi<T, R>>, args: T, options?: UseQueryOptions<R>) => QueryResult<R>;
|
|
55
|
+
/**
|
|
56
|
+
* The useSuspenseApiQuery hook.
|
|
57
|
+
*/
|
|
58
|
+
readonly useSuspenseApiQuery: <T = unknown, R = unknown>(queryFn: Readonly<QueryApi<T, R>>, args: T, options?: Except<UseQueryOptions<R>, "enabled" | "placeholderData">) => SuspenseQueryResult<R>;
|
|
45
59
|
/**
|
|
46
60
|
* The useApiMutation hook.
|
|
47
61
|
* These hook functions are doing this because React's Hooks cannot be used in class methods,
|
|
@@ -74,7 +88,7 @@ export declare class ApiClient {
|
|
|
74
88
|
* @param options - The options of the API.
|
|
75
89
|
* @returns The API query.
|
|
76
90
|
*/
|
|
77
|
-
fetchApiQuery<T extends ObjectType = ObjectValue, R = unknown>(queryFn: Api<T, R>, args: T, options?:
|
|
91
|
+
fetchApiQuery<T extends ObjectType = ObjectValue, R = unknown>(queryFn: Api<T, R>, args: T, options?: FetchQueryOptions<R>): Promise<R>;
|
|
78
92
|
/**
|
|
79
93
|
* Create a query API.
|
|
80
94
|
*
|
|
@@ -82,7 +96,7 @@ export declare class ApiClient {
|
|
|
82
96
|
* @param factory - The factory of the API function.
|
|
83
97
|
* @returns The query API.
|
|
84
98
|
*/
|
|
85
|
-
createQueryApi<T
|
|
99
|
+
createQueryApi<T = unknown, R = unknown>(key: string, factory: Mapper<RequestMethods<R>, Mapper<T, Promise<ApiResponse<R>>>>): Readonly<QueryApi<T, R>>;
|
|
86
100
|
/**
|
|
87
101
|
* Create a mutation API.
|
|
88
102
|
*
|
|
@@ -91,7 +105,7 @@ export declare class ApiClient {
|
|
|
91
105
|
* @param relatedQueries - The related queries.
|
|
92
106
|
* @returns The mutation API.
|
|
93
107
|
*/
|
|
94
|
-
createMutationApi<T, R>(key: string, factory: Mapper<Except<RequestMethods<R>, "get">, Mapper<T, Promise<ApiResponse<R>>>>, relatedQueries?: Array<Readonly<QueryApi<any, any>>>): Readonly<MutationApi<T, R>>;
|
|
108
|
+
createMutationApi<T = unknown, R = unknown>(key: string, factory: Mapper<Except<RequestMethods<R>, "get">, Mapper<T, Promise<ApiResponse<R>>>>, relatedQueries?: Array<Readonly<QueryApi<any, any>>>): Readonly<MutationApi<T, R>>;
|
|
95
109
|
/**
|
|
96
110
|
* Get the API query data.
|
|
97
111
|
*
|
|
@@ -116,6 +130,15 @@ export declare class ApiClient {
|
|
|
116
130
|
* @param args - The arguments of the API.
|
|
117
131
|
*/
|
|
118
132
|
setApiQueryData<T>(data: MaybeUndefined<T | Mapper<MaybeUndefined<T>, MaybeUndefined<T>>>, apiKey: string, args?: unknown): void;
|
|
133
|
+
/**
|
|
134
|
+
* Ensure the API query data.
|
|
135
|
+
*
|
|
136
|
+
* @param queryFn - The API function.
|
|
137
|
+
* @param args - The arguments of the API.
|
|
138
|
+
* @param options - The options of the API.
|
|
139
|
+
* @returns The API query data.
|
|
140
|
+
*/
|
|
141
|
+
ensureApiQueryData<T extends ObjectType = ObjectValue, R = unknown>(queryFn: Api<T, R>, args: T, options?: FetchQueryOptions<R>): Promise<R>;
|
|
119
142
|
/**
|
|
120
143
|
* Remove the API queries.
|
|
121
144
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ChildrenProps, type
|
|
1
|
+
import { type ChildrenProps, type DataDictionaryApi, type FetchAuthenticatedUserApi, type LoginApi, type LogoutApi, type MutationApi, type QueryApi } from "@vef-framework/shared";
|
|
2
2
|
import { type FC } from "react";
|
|
3
3
|
import type { ApiClient } from "./api-client";
|
|
4
4
|
/**
|
|
@@ -12,7 +12,19 @@ export interface ApiContextProviderProps extends ChildrenProps {
|
|
|
12
12
|
/**
|
|
13
13
|
* The query API for the data dictionary.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
dataDictionaryApi?: DataDictionaryApi;
|
|
16
|
+
/**
|
|
17
|
+
* The login API.
|
|
18
|
+
*/
|
|
19
|
+
loginApi: LoginApi;
|
|
20
|
+
/**
|
|
21
|
+
* The logout API.
|
|
22
|
+
*/
|
|
23
|
+
logoutApi: LogoutApi;
|
|
24
|
+
/**
|
|
25
|
+
* The fetch authenticated user API.
|
|
26
|
+
*/
|
|
27
|
+
fetchAuthenticatedUserApi: FetchAuthenticatedUserApi;
|
|
16
28
|
}
|
|
17
29
|
/**
|
|
18
30
|
* The API context.
|
|
@@ -22,6 +34,10 @@ export interface ApiContext {
|
|
|
22
34
|
* The useApiQuery hook.
|
|
23
35
|
*/
|
|
24
36
|
useApiQuery: ApiClient["useApiQuery"];
|
|
37
|
+
/**
|
|
38
|
+
* The useSuspenseApiQuery hook.
|
|
39
|
+
*/
|
|
40
|
+
useSuspenseApiQuery: ApiClient["useSuspenseApiQuery"];
|
|
25
41
|
/**
|
|
26
42
|
* The useApiMutation hook.
|
|
27
43
|
*/
|
|
@@ -58,6 +74,10 @@ export interface ApiContext {
|
|
|
58
74
|
* The set query API data function.
|
|
59
75
|
*/
|
|
60
76
|
setApiQueryData: ApiClient["setApiQueryData"];
|
|
77
|
+
/**
|
|
78
|
+
* The ensure query API data function.
|
|
79
|
+
*/
|
|
80
|
+
ensureApiQueryData: ApiClient["ensureApiQueryData"];
|
|
61
81
|
/**
|
|
62
82
|
* The remove API queries function.
|
|
63
83
|
*/
|
|
@@ -105,7 +125,19 @@ export interface ApiContext {
|
|
|
105
125
|
/**
|
|
106
126
|
* The query API for the data dictionary.
|
|
107
127
|
*/
|
|
108
|
-
|
|
128
|
+
dataDictionaryApi?: DataDictionaryApi;
|
|
129
|
+
/**
|
|
130
|
+
* The login API.
|
|
131
|
+
*/
|
|
132
|
+
loginApi: LoginApi;
|
|
133
|
+
/**
|
|
134
|
+
* The logout API.
|
|
135
|
+
*/
|
|
136
|
+
logoutApi: LogoutApi;
|
|
137
|
+
/**
|
|
138
|
+
* The fetch authenticated user API.
|
|
139
|
+
*/
|
|
140
|
+
fetchAuthenticatedUserApi: FetchAuthenticatedUserApi;
|
|
109
141
|
}
|
|
110
142
|
/**
|
|
111
143
|
* The async function params.
|
package/types/api/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ApiClient, createApiClient, type ApiClientOptions, type QueryOptions, } from "./api-client";
|
|
1
|
+
export { ApiClient, createApiClient, type ApiClientOptions, type UseQueryOptions as QueryOptions, } from "./api-client";
|
|
2
2
|
export * from "./api-context";
|
|
3
|
-
export {
|
|
3
|
+
export { useQueryErrorResetBoundary } from "@tanstack/react-query";
|