@vef-framework/starter 1.0.50 → 1.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/es/app.js +1 -1
  2. package/es/components/index.js +1 -1
  3. package/es/components/vef-access-denied-page/index.js +1 -1
  4. package/es/components/vef-app/index.js +1 -1
  5. package/es/components/vef-dev-assistant/index.js +1 -1
  6. package/es/components/vef-error-page/index.js +1 -1
  7. package/es/components/vef-login-page/index.js +1 -1
  8. package/es/components/vef-not-found-page/index.js +1 -1
  9. package/es/components/vef-router-provider/index.js +1 -1
  10. package/es/constants.js +1 -1
  11. package/es/index.js +1 -1
  12. package/es/router.js +1 -1
  13. package/es/routes/access-denied.js +1 -1
  14. package/es/routes/index.js +1 -1
  15. package/es/routes/layout.js +1 -1
  16. package/es/routes/login.js +1 -1
  17. package/es/routes/root.js +1 -1
  18. package/es/store.js +1 -1
  19. package/lib/app.cjs +1 -1
  20. package/lib/components/index.cjs +1 -1
  21. package/lib/components/vef-access-denied-page/index.cjs +1 -1
  22. package/lib/components/vef-access-denied-page/props.cjs +1 -1
  23. package/lib/components/vef-app/index.cjs +1 -1
  24. package/lib/components/vef-app/props.cjs +1 -1
  25. package/lib/components/vef-dev-assistant/index.cjs +1 -1
  26. package/lib/components/vef-dev-assistant/props.cjs +1 -1
  27. package/lib/components/vef-error-page/index.cjs +1 -1
  28. package/lib/components/vef-error-page/props.cjs +1 -1
  29. package/lib/components/vef-login-page/index.cjs +1 -1
  30. package/lib/components/vef-login-page/props.cjs +1 -1
  31. package/lib/components/vef-not-found-page/index.cjs +1 -1
  32. package/lib/components/vef-not-found-page/props.cjs +1 -1
  33. package/lib/components/vef-router-provider/index.cjs +1 -1
  34. package/lib/components/vef-router-provider/props.cjs +1 -1
  35. package/lib/constants.cjs +1 -1
  36. package/lib/index.cjs +1 -1
  37. package/lib/router.cjs +1 -1
  38. package/lib/routes/access-denied.cjs +1 -1
  39. package/lib/routes/index.cjs +1 -1
  40. package/lib/routes/layout.cjs +1 -1
  41. package/lib/routes/login.cjs +1 -1
  42. package/lib/routes/root.cjs +1 -1
  43. package/lib/store.cjs +1 -1
  44. package/package.json +5 -5
  45. package/types/routes/access-denied.d.ts +3 -3
  46. package/types/routes/layout.d.ts +16 -3
  47. package/types/routes/login.d.ts +16 -3
  48. package/lib/types.cjs +0 -3
  49. package/types/types.d.ts +0 -5
package/es/app.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{createElement as e}from"react";import{createRoot as n}from"react-dom/client";import"./components/index.js";import o from"./components/vef-app/index.js";function t(){const t=n(document.getElementById("root"),{identifierPrefix:"vef-"});return{render:n=>{t.render(e(o,n))},unmount:()=>t.unmount()}}export{t as createApp};
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  export{default as VefAccessDeniedPage}from"./vef-access-denied-page/index.js";export{default as VefApp}from"./vef-app/index.js";export{default as VefDevAssistant}from"./vef-dev-assistant/index.js";export{default as VefErrorPage}from"./vef-error-page/index.js";export{default as VefLoginPage}from"./vef-login-page/index.js";export{default as VefNotFoundPage}from"./vef-not-found-page/index.js";export{default as VefRouterProvider}from"./vef-router-provider/index.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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{jsx as t}from"@emotion/react/jsx-runtime";import{useLocation as o,useRouterState as r,useNavigate as e}from"@tanstack/react-router";import{VefAccessDenied as m}from"@vef-framework/components";import{useCallback as a}from"react";import{INDEX_PAGE_PATH as n}from"../../constants.js";const c=()=>{const{pathname:c}=o(),{redirect:i}=r(),p=e(),f=a((()=>p({to:n,replace:!0})),[p]);return t(m,{uri:i?._fromLocation?.pathname??c,onNavigateHome:f})};export{c 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 */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{jsx as r}from"@emotion/react/jsx-runtime";import{VefConfigProvider as o}from"@vef-framework/components";import{StrictMode as e}from"react";import t from"../vef-router-provider/index.js";const m=({router:m,...i})=>r(e,{children:r(o,{...i,children:r(t,{router:m})})});export{m 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 */
@@ -1,4 +1,4 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{jsxs as e,jsx as t,Fragment as o}from"@emotion/react/jsx-runtime";import{css as r}from"@emotion/react";import{VefFloatButtonGroup as i,VefIcon as a,VefFloatButton as n,VefLoadingPlaceholder as l}from"@vef-framework/components";import{useKeyPress as s}from"@vef-framework/hooks";import{themeVariables as d,noop as c}from"@vef-framework/shared";import{CompassIcon as h,SendIcon as f}from"lucide-react";import{AnimatePresence as p,motion as u}from"motion/react";import{lazy as m,useState as v,useCallback as k,Suspense as y}from"react";const g=r`
3
3
  position: fixed;
4
4
  bottom: 0;
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{jsx as r}from"@emotion/react/jsx-runtime";import{VefError as o}from"@vef-framework/components";import{useQueryErrorResetBoundary as e}from"@vef-framework/core";import{useEffect as t}from"react";const m=({error:m,info:n,reset:c})=>{const{reset:f}=e();return t((()=>{f()}),[f]),r(o,{componentStack:n?.componentStack,error:m,reset:c})};export{m 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 */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{jsx as e}from"@emotion/react/jsx-runtime";import{useRouter as t,useNavigate as o,useSearch as r}from"@tanstack/react-router";import{VefLogin as s}from"@vef-framework/components";import{LOGIN_PAGE_ROUTE as a}from"../../constants.js";import{useAppStore as n}from"../../store.js";const c=c=>{const i=t(),m=o(),{redirect:f}=r({from:a});return e(s,{onLoginSuccess:async({accessToken:e,refreshToken:t})=>{n.setState({isAuthenticated:!0,token:Object.freeze({accessToken:e,refreshToken:t})}),await i.invalidate(),await m({to:f,replace:!0})},...c})};export{c 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 */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{jsx as t}from"@emotion/react/jsx-runtime";import{useNavigate as o,useLocation as r}from"@tanstack/react-router";import{VefNotFound as e}from"@vef-framework/components";import{useCallback as m}from"react";import{INDEX_PAGE_PATH as a}from"../../constants.js";const n=()=>{const n=o(),c=m((()=>n({to:a,replace:!0})),[n]),{pathname:i}=r();return t(e,{uri:i,onNavigateHome:c})};export{n 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 */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{jsx as t}from"@emotion/react/jsx-runtime";import{RouterProvider as r}from"@tanstack/react-router";import{useApiContext as e}from"@vef-framework/core";import{useMemo as o}from"react";const c=({router:c})=>{const{fetchAuthenticatedUserApi:m}=e(),a=o((()=>({fetchAuthenticatedUserApi:m})),[m]);return t(r,{context:a,router:c})};export{c 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/es/constants.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  const o="/login",c="/_common/login",e="/",n="/_layout",s="/access-denied",d="/_common/access-denied";export{s as ACCESS_DENIED_PAGE_PATH,d as ACCESS_DENIED_PAGE_ROUTE,e as INDEX_PAGE_PATH,n as INDEX_PAGE_ROUTE,o as LOGIN_PAGE_PATH,c as LOGIN_PAGE_ROUTE};
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  export{createApp}from"./app.js";import"./components/index.js";export{ACCESS_DENIED_PAGE_PATH,ACCESS_DENIED_PAGE_ROUTE,INDEX_PAGE_PATH,INDEX_PAGE_ROUTE,LOGIN_PAGE_PATH,LOGIN_PAGE_ROUTE}from"./constants.js";export{createRouter}from"./router.js";import"./routes/index.js";export{useAppStore}from"./store.js";export{default as VefAccessDeniedPage}from"./components/vef-access-denied-page/index.js";export{default as VefApp}from"./components/vef-app/index.js";export{default as VefDevAssistant}from"./components/vef-dev-assistant/index.js";export{default as VefErrorPage}from"./components/vef-error-page/index.js";export{default as VefLoginPage}from"./components/vef-login-page/index.js";export{default as VefNotFoundPage}from"./components/vef-not-found-page/index.js";export{default as VefRouterProvider}from"./components/vef-router-provider/index.js";export{createAccessDeniedRouteOptions}from"./routes/access-denied.js";export{createLayoutRouteOptions}from"./routes/layout.js";export{createLoginRouteOptions}from"./routes/login.js";export{createRootRoute}from"./routes/root.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/router.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{createRouter as e,createBrowserHistory as r}from"@tanstack/react-router";import{VefLoadingPlaceholder as t,VefText as o}from"@vef-framework/components";import{showErrorNotification as a}from"@vef-framework/shared";import n from"nprogress";import{createElement as l}from"react";const s=6e5;function i({routeTree:i}){const c=e({routeTree:i,trailingSlash:"never",caseSensitive:!0,history:r(),search:{strict:!0},notFoundMode:"root",defaultPendingComponent:()=>l(t,{size:"large"}),defaultPendingMs:500,defaultPendingMinMs:300,defaultSsr:!1,defaultStructuralSharing:!0,defaultHashScrollIntoView:{behavior:"smooth",block:"start",inline:"center"},defaultPreload:"intent",defaultPreloadDelay:50,defaultPreloadGcTime:s,defaultGcTime:s,defaultOnCatch(e,r){a(e.message||e.name,l(o,{color:"error",children:l("pre",{style:{maxHeight:"480px",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.2) transparent"},children:e.stack||r.componentStack||"No stack trace available"})}))}});return c.subscribe("onBeforeLoad",(({pathChanged:e})=>e&&n.start())),c.subscribe("onLoad",(()=>n.done())),c}export{i as createRouter};
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import"../components/index.js";import e from"../components/vef-access-denied-page/index.js";function n(){return{component:e}}export{n as createAccessDeniedRouteOptions};
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  export{createAccessDeniedRouteOptions}from"./access-denied.js";export{createLayoutRouteOptions}from"./layout.js";export{createLoginRouteOptions}from"./login.js";export{createRootRoute}from"./root.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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{jsx as e}from"@emotion/react/jsx-runtime";import{useRouter as t,useNavigate as r,useLocation as a,Outlet as o,redirect as n}from"@tanstack/react-router";import{VefIcon as i,VefLayout as s,VefLoadingPlaceholder as c}from"@vef-framework/components";import{useApiContext as m}from"@vef-framework/core";import{buildRouteParentMenusMappings as u}from"@vef-framework/shared";import{HomeIcon as l}from"lucide-react";import{useMemo as p,useCallback as f}from"react";import{INDEX_PAGE_PATH as d,LOGIN_PAGE_PATH as h,ACCESS_DENIED_PAGE_PATH as g}from"../constants.js";import{useAppStore as b}from"../store.js";const w={key:d,label:e(i,{children:e(l,{})})};function y({title:i,logo:l,getUserDescription:d}){return{beforeLoad:({location:e})=>{const{isAuthenticated:t,routeParentMenusMappings:r}=b.getState();if(!t)throw n({to:h,search:{redirect:e.href}});if(r&&!r.has(e.pathname))throw n({to:g,replace:!0})},loader:async({context:e,location:t})=>{const{fetchAuthenticatedUserApi:r}=e,{menus:a,permissions:o,...i}=await r.fetchQuery(null),s=Object.freeze(u(a));if(b.setState({user:Object.freeze(i),menus:Object.freeze(a),permissions:Object.freeze(new Set(o)),routeParentMenusMappings:s}),!s.has(t.pathname))throw n({to:g,replace:!0})},pendingComponent:()=>e(c,{size:"large",tip:"系统加载中,请稍后..."}),component:function(){const n=t(),c=r(),{pathname:u}=a(),[g,y,k]=b((e=>[e.menus,e.user,e.routeParentMenusMappings])),v=k?.get(u)?.[1].map((e=>e.key)),M=p((()=>{const e=k?.get(u);if(!e)return[];const[t,r]=e;return[w,...r.map((e=>({key:e.key,label:e.label,dropdownItems:e.children.filter((e=>"divider"!==e.type)).map((e=>({key:e.key,label:e.label})))}))),{label:t.label}]}),[u,k]),{logoutApi:A,fetchAuthenticatedUserApi:j}=m(),{mutate:z}=A.useMutation(),O=f((async()=>{await z(null),await j.invalidateQueries(),b.setState({isAuthenticated:!1},!0),await n.invalidate(),await c({to:h})}),[j,z,c,n]),S=f((e=>{c({to:e})}),[c]);return e(s,{activeMenuKey:u,breadcrumbItems:M,defaultOpenedMenuKeys:v,logo:l,menuItems:g,title:i,userAvatar:y?.avatar,userDescription:d?.(y),userGender:y?.gender,userName:y?.name,onActiveMenuKeyChange:S,onBreadcrumbClick:S,onLogout:O,children:e(o,{})})},staleTime:1/0,gcTime:0,shouldReload:!1}}export{y as createLayoutRouteOptions};
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{jsx as t}from"@emotion/react/jsx-runtime";import{redirect as o}from"@tanstack/react-router";import{z as e}from"@vef-framework/shared";import"../components/index.js";import{INDEX_PAGE_PATH as r}from"../constants.js";import{useAppStore as i}from"../store.js";import n from"../components/vef-login-page/index.js";function a(a){return{validateSearch:e.object({redirect:e.string().optional().default(r).catch(r)}),beforeLoad:({search:t})=>{if(i.getState().isAuthenticated){const{redirect:e}=t;throw o({to:e,replace:!0})}},component:()=>t(n,{...a})}}export{a as createLoginRouteOptions};
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/routes/root.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{jsxs as o,Fragment as e,jsx as n}from"@emotion/react/jsx-runtime";import{createRootRouteWithContext as r,Outlet as t}from"@tanstack/react-router";import"../components/index.js";import m from"../components/vef-dev-assistant/index.js";import p from"../components/vef-error-page/index.js";import s from"../components/vef-not-found-page/index.js";function i(){return r()({component:()=>o(e,{children:[n(t,{}),"development"===process.env.NODE_ENV&&n(m,{})]}),errorComponent:p,notFoundComponent:s,ssr:!1})}export{i as createRootRoute};
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/store.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  import{createStore as e}from"@vef-framework/shared";const t=e((()=>({isAuthenticated:!1,fetchUserApi:void 0})),{name:"APP",storage:"session",selector:e=>({isAuthenticated:e.isAuthenticated,token:e.token})});export{t as useAppStore};
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/app.cjs CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("react-dom/client");require("./components/index.cjs");const r=require("./components/vef-app/index.cjs");exports.createApp=function(){const n=t.createRoot(document.getElementById("root"),{identifierPrefix:"vef-"});return{render:t=>{n.render(e.createElement(r.default,t))},unmount:()=>n.unmount()}};
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vef-access-denied-page/index.cjs"),r=require("./vef-app/index.cjs"),t=require("./vef-dev-assistant/index.cjs"),s=require("./vef-error-page/index.cjs"),i=require("./vef-login-page/index.cjs"),o=require("./vef-not-found-page/index.cjs"),d=require("./vef-router-provider/index.cjs");exports.VefAccessDeniedPage=e.default,exports.VefApp=r.default,exports.VefDevAssistant=t.default,exports.VefErrorPage=s.default,exports.VefLoginPage=i.default,exports.VefNotFoundPage=o.default,exports.VefRouterProvider=d.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 */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@emotion/react/jsx-runtime"),t=require("@tanstack/react-router"),r=require("@vef-framework/components"),a=require("react"),o=require("../../constants.cjs");exports.default=()=>{const{pathname:s}=t.useLocation(),{redirect:u}=t.useRouterState(),c=t.useNavigate(),i=a.useCallback((()=>c({to:o.INDEX_PAGE_PATH,replace:!0})),[c]);return e.jsx(r.VefAccessDenied,{uri:u?._fromLocation?.pathname??s,onNavigateHome:i})};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@emotion/react/jsx-runtime"),r=require("@vef-framework/components"),t=require("react"),o=require("../vef-router-provider/index.cjs");exports.default=({router:i,...u})=>e.jsx(t.StrictMode,{children:e.jsx(r.VefConfigProvider,{...u,children:e.jsx(o.default,{router:i})})});
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";
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
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@emotion/react/jsx-runtime"),t=require("@emotion/react"),s=require("@vef-framework/components"),o=require("@vef-framework/hooks"),r=require("@vef-framework/shared"),i=require("lucide-react"),a=require("motion/react"),n=require("react"),l=t.css`
3
3
  position: fixed;
4
4
  bottom: 0;
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@emotion/react/jsx-runtime"),r=require("@vef-framework/components"),o=require("@vef-framework/core"),t=require("react");exports.default=({error:s,info:u,reset:n})=>{const{reset:c}=o.useQueryErrorResetBoundary();return t.useEffect((()=>{c()}),[c]),e.jsx(r.VefError,{componentStack:u?.componentStack,error:s,reset:n})};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@emotion/react/jsx-runtime"),t=require("@tanstack/react-router"),r=require("@vef-framework/components"),s=require("../../constants.cjs"),o=require("../../store.cjs");exports.default=a=>{const c=t.useRouter(),n=t.useNavigate(),{redirect:i}=t.useSearch({from:s.LOGIN_PAGE_ROUTE});return e.jsx(r.VefLogin,{onLoginSuccess:async({accessToken:e,refreshToken:t})=>{o.useAppStore.setState({isAuthenticated:!0,token:Object.freeze({accessToken:e,refreshToken:t})}),await c.invalidate(),await n({to:i,replace:!0})},...a})};
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@emotion/react/jsx-runtime"),t=require("@tanstack/react-router"),r=require("@vef-framework/components"),o=require("react"),a=require("../../constants.cjs");exports.default=()=>{const u=t.useNavigate(),s=o.useCallback((()=>u({to:a.INDEX_PAGE_PATH,replace:!0})),[u]),{pathname:n}=t.useLocation();return e.jsx(r.VefNotFound,{uri:n,onNavigateHome:s})};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@emotion/react/jsx-runtime"),t=require("@tanstack/react-router"),r=require("@vef-framework/core"),o=require("react");exports.default=({router:u})=>{const{fetchAuthenticatedUserApi:i}=r.useApiContext(),s=o.useMemo((()=>({fetchAuthenticatedUserApi:i})),[i]);return e.jsx(t.RouterProvider,{context:s,router:u})};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";
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/constants.cjs CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.ACCESS_DENIED_PAGE_PATH="/access-denied",exports.ACCESS_DENIED_PAGE_ROUTE="/_common/access-denied",exports.INDEX_PAGE_PATH="/",exports.INDEX_PAGE_ROUTE="/_layout",exports.LOGIN_PAGE_PATH="/login",exports.LOGIN_PAGE_ROUTE="/_common/login";
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./app.cjs");require("./components/index.cjs");const t=require("./constants.cjs"),r=require("./router.cjs");require("./routes/index.cjs");const o=require("./store.cjs"),s=require("./components/vef-access-denied-page/index.cjs"),p=require("./components/vef-app/index.cjs"),c=require("./components/vef-dev-assistant/index.cjs"),n=require("./components/vef-error-page/index.cjs"),u=require("./components/vef-login-page/index.cjs"),i=require("./components/vef-not-found-page/index.cjs"),a=require("./components/vef-router-provider/index.cjs"),E=require("./routes/access-denied.cjs"),A=require("./routes/layout.cjs"),d=require("./routes/login.cjs"),x=require("./routes/root.cjs");exports.createApp=e.createApp,exports.ACCESS_DENIED_PAGE_PATH=t.ACCESS_DENIED_PAGE_PATH,exports.ACCESS_DENIED_PAGE_ROUTE=t.ACCESS_DENIED_PAGE_ROUTE,exports.INDEX_PAGE_PATH=t.INDEX_PAGE_PATH,exports.INDEX_PAGE_ROUTE=t.INDEX_PAGE_ROUTE,exports.LOGIN_PAGE_PATH=t.LOGIN_PAGE_PATH,exports.LOGIN_PAGE_ROUTE=t.LOGIN_PAGE_ROUTE,exports.createRouter=r.createRouter,exports.useAppStore=o.useAppStore,exports.VefAccessDeniedPage=s.default,exports.VefApp=p.default,exports.VefDevAssistant=c.default,exports.VefErrorPage=n.default,exports.VefLoginPage=u.default,exports.VefNotFoundPage=i.default,exports.VefRouterProvider=a.default,exports.createAccessDeniedRouteOptions=E.createAccessDeniedRouteOptions,exports.createLayoutRouteOptions=A.createLayoutRouteOptions,exports.createLoginRouteOptions=d.createLoginRouteOptions,exports.createRootRoute=x.createRootRoute;
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/router.cjs CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tanstack/react-router"),r=require("@vef-framework/components"),t=require("@vef-framework/shared"),a=require("nprogress"),o=require("react"),n=6e5;exports.createRouter=function({routeTree:l}){const i=e.createRouter({routeTree:l,trailingSlash:"never",caseSensitive:!0,history:e.createBrowserHistory(),search:{strict:!0},notFoundMode:"root",defaultPendingComponent:()=>o.createElement(r.VefLoadingPlaceholder,{size:"large"}),defaultPendingMs:500,defaultPendingMinMs:300,defaultSsr:!1,defaultStructuralSharing:!0,defaultHashScrollIntoView:{behavior:"smooth",block:"start",inline:"center"},defaultPreload:"intent",defaultPreloadDelay:50,defaultPreloadGcTime:n,defaultGcTime:n,defaultOnCatch(e,a){t.showErrorNotification(e.message||e.name,o.createElement(r.VefText,{color:"error",children:o.createElement("pre",{style:{maxHeight:"480px",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.2) transparent"},children:e.stack||a.componentStack||"No stack trace available"})}))}});return i.subscribe("onBeforeLoad",(({pathChanged:e})=>e&&a.start())),i.subscribe("onLoad",(()=>a.done())),i};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("../components/index.cjs");const e=require("../components/vef-access-denied-page/index.cjs");exports.createAccessDeniedRouteOptions=function(){return{component:e.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 */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./access-denied.cjs"),t=require("./layout.cjs"),o=require("./login.cjs"),r=require("./root.cjs");exports.createAccessDeniedRouteOptions=e.createAccessDeniedRouteOptions,exports.createLayoutRouteOptions=t.createLayoutRouteOptions,exports.createLoginRouteOptions=o.createLoginRouteOptions,exports.createRootRoute=r.createRootRoute;
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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@emotion/react/jsx-runtime"),t=require("@tanstack/react-router"),r=require("@vef-framework/components"),a=require("@vef-framework/core"),n=require("@vef-framework/shared"),o=require("lucide-react"),s=require("react"),i=require("../constants.cjs"),u=require("../store.cjs"),c={key:i.INDEX_PAGE_PATH,label:e.jsx(r.VefIcon,{children:e.jsx(o.HomeIcon,{})})};exports.createLayoutRouteOptions=function({title:o,logo:l,getUserDescription:p}){return{beforeLoad:({location:e})=>{const{isAuthenticated:r,routeParentMenusMappings:a}=u.useAppStore.getState();if(!r)throw t.redirect({to:i.LOGIN_PAGE_PATH,search:{redirect:e.href}});if(a&&!a.has(e.pathname))throw t.redirect({to:i.ACCESS_DENIED_PAGE_PATH,replace:!0})},loader:async({context:e,location:r})=>{const{fetchAuthenticatedUserApi:a}=e,{menus:o,permissions:s,...c}=await a.fetchQuery(null),l=Object.freeze(n.buildRouteParentMenusMappings(o));if(u.useAppStore.setState({user:Object.freeze(c),menus:Object.freeze(o),permissions:Object.freeze(new Set(s)),routeParentMenusMappings:l}),!l.has(r.pathname))throw t.redirect({to:i.ACCESS_DENIED_PAGE_PATH,replace:!0})},pendingComponent:()=>e.jsx(r.VefLoadingPlaceholder,{size:"large",tip:"系统加载中,请稍后..."}),component:function(){const n=t.useRouter(),d=t.useNavigate(),{pathname:m}=t.useLocation(),[f,A,h]=u.useAppStore((e=>[e.menus,e.user,e.routeParentMenusMappings])),g=h?.get(m)?.[1].map((e=>e.key)),b=s.useMemo((()=>{const e=h?.get(m);if(!e)return[];const[t,r]=e;return[c,...r.map((e=>({key:e.key,label:e.label,dropdownItems:e.children.filter((e=>"divider"!==e.type)).map((e=>({key:e.key,label:e.label})))}))),{label:t.label}]}),[m,h]),{logoutApi:y,fetchAuthenticatedUserApi:P}=a.useApiContext(),{mutate:M}=y.useMutation(),S=s.useCallback((async()=>{await M(null),await P.invalidateQueries(),u.useAppStore.setState({isAuthenticated:!1},!0),await n.invalidate(),await d({to:i.LOGIN_PAGE_PATH})}),[P,M,d,n]),j=s.useCallback((e=>{d({to:e})}),[d]);return e.jsx(r.VefLayout,{activeMenuKey:m,breadcrumbItems:b,defaultOpenedMenuKeys:g,logo:l,menuItems:f,title:o,userAvatar:A?.avatar,userDescription:p?.(A),userGender:A?.gender,userName:A?.name,onActiveMenuKeyChange:j,onBreadcrumbClick:j,onLogout:S,children:e.jsx(t.Outlet,{})})},staleTime:1/0,gcTime:0,shouldReload:!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.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@emotion/react/jsx-runtime"),t=require("@tanstack/react-router"),r=require("@vef-framework/shared");require("../components/index.cjs");const o=require("../constants.cjs"),c=require("../store.cjs"),i=require("../components/vef-login-page/index.cjs");exports.createLoginRouteOptions=function(n){return{validateSearch:r.z.object({redirect:r.z.string().optional().default(o.INDEX_PAGE_PATH).catch(o.INDEX_PAGE_PATH)}),beforeLoad:({search:e})=>{if(c.useAppStore.getState().isAuthenticated){const{redirect:r}=e;throw t.redirect({to:r,replace:!0})}},component:()=>e.jsx(i.default,{...n})}};
3
3
  /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@emotion/react/jsx-runtime"),t=require("@tanstack/react-router");require("../components/index.cjs");const o=require("../components/vef-dev-assistant/index.cjs"),n=require("../components/vef-error-page/index.cjs"),r=require("../components/vef-not-found-page/index.cjs");exports.createRootRoute=function(){return t.createRootRouteWithContext()({component:()=>e.jsxs(e.Fragment,{children:[e.jsx(t.Outlet,{}),"development"===process.env.NODE_ENV&&e.jsx(o.default,{})]}),errorComponent:n.default,notFoundComponent:r.default,ssr:!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 */
package/lib/store.cjs CHANGED
@@ -1,3 +1,3 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
1
+ /*! VefFramework version: 1.0.52, build time: 2024-12-27T03:54:47.396Z, made by Venus. */
2
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared").createStore((()=>({isAuthenticated:!1,fetchUserApi:void 0})),{name:"APP",storage:"session",selector:e=>({isAuthenticated:e.isAuthenticated,token:e.token})});exports.useAppStore=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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vef-framework/starter",
3
3
  "type": "module",
4
- "version": "1.0.50",
4
+ "version": "1.0.52",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@9.15.0",
7
7
  "description": "The starter of the VEF framework",
@@ -41,10 +41,10 @@
41
41
  "use-sync-external-store": "^1.4.0",
42
42
  "@tanstack/react-query-devtools": "5.62.8",
43
43
  "@tanstack/router-devtools": "1.92.1",
44
- "@vef-framework/components": "1.0.50",
45
- "@vef-framework/core": "1.0.50",
46
- "@vef-framework/hooks": "1.0.50",
47
- "@vef-framework/shared": "1.0.50",
44
+ "@vef-framework/components": "1.0.52",
45
+ "@vef-framework/core": "1.0.52",
46
+ "@vef-framework/hooks": "1.0.52",
47
+ "@vef-framework/shared": "1.0.52",
48
48
  "lucide-react": "0.469.0",
49
49
  "motion": "11.15.0",
50
50
  "nprogress": "^0.2.0"
@@ -1,8 +1,8 @@
1
- import type { AnyRoute, FileRoutesByPath, RouteConstraints } from "@tanstack/react-router";
2
- import type { RouteOptions } from "../types";
3
1
  /**
4
2
  * The options of the access denied route.
5
3
  *
6
4
  * @returns The options of the access denied route.
7
5
  */
8
- export declare function createAccessDeniedRouteOptions<TFilePath extends keyof FileRoutesByPath, TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]["parentRoute"], TId extends RouteConstraints["TId"] = FileRoutesByPath[TFilePath]["id"], TPath extends RouteConstraints["TPath"] = FileRoutesByPath[TFilePath]["path"], TFullPath extends RouteConstraints["TFullPath"] = FileRoutesByPath[TFilePath]["fullPath"]>(): RouteOptions<TFilePath, TParentRoute, TId, TPath, TFullPath>;
6
+ export declare function createAccessDeniedRouteOptions(): {
7
+ readonly component: import("react").FC<import("..").VefAccessDeniedPageProps>;
8
+ };
@@ -1,7 +1,7 @@
1
- import { type AnyRoute, type FileRoutesByPath, type RouteConstraints } from "@tanstack/react-router";
1
+ import { type ParsedLocation } from "@tanstack/react-router";
2
2
  import { type VefLayoutProps } from "@vef-framework/components";
3
3
  import { type Mapper } from "@vef-framework/shared";
4
- import type { RouteOptions } from "../types";
4
+ import type { RouterContext } from "../components";
5
5
  import { type AppState } from "../store";
6
6
  /**
7
7
  * The options for the layout route.
@@ -17,4 +17,17 @@ export interface LayoutOptions extends Pick<VefLayoutProps, "title" | "logo"> {
17
17
  *
18
18
  * @returns The options for the layout route.
19
19
  */
20
- export declare function createLayoutRouteOptions<TFilePath extends keyof FileRoutesByPath, TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]["parentRoute"], TId extends RouteConstraints["TId"] = FileRoutesByPath[TFilePath]["id"], TPath extends RouteConstraints["TPath"] = FileRoutesByPath[TFilePath]["path"], TFullPath extends RouteConstraints["TFullPath"] = FileRoutesByPath[TFilePath]["fullPath"]>({ title, logo, getUserDescription, }: LayoutOptions): RouteOptions<TFilePath, TParentRoute, TId, TPath, TFullPath>;
20
+ export declare function createLayoutRouteOptions({ title, logo, getUserDescription, }: LayoutOptions): {
21
+ readonly beforeLoad: ({ location }: {
22
+ location: ParsedLocation;
23
+ }) => void;
24
+ readonly loader: ({ context, location }: {
25
+ context: RouterContext;
26
+ location: ParsedLocation;
27
+ }) => Promise<void>;
28
+ readonly pendingComponent: () => import("@emotion/react/jsx-runtime").JSX.Element;
29
+ readonly component: () => import("@emotion/react/jsx-runtime").JSX.Element;
30
+ readonly staleTime: number;
31
+ readonly gcTime: 0;
32
+ readonly shouldReload: false;
33
+ };
@@ -1,5 +1,4 @@
1
- import { type AnyRoute, type FileRoutesByPath, type RouteConstraints } from "@tanstack/react-router";
2
- import type { RouteOptions } from "../types";
1
+ import { z } from "@vef-framework/shared";
3
2
  import { type VefLoginPageProps } from "../components";
4
3
  /**
5
4
  * The options for the login route.
@@ -11,4 +10,18 @@ export interface LoginOptions extends VefLoginPageProps {
11
10
  *
12
11
  * @returns The options for the login route.
13
12
  */
14
- export declare function createLoginRouteOptions<TFilePath extends keyof FileRoutesByPath, TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]["parentRoute"], TId extends RouteConstraints["TId"] = FileRoutesByPath[TFilePath]["id"], TPath extends RouteConstraints["TPath"] = FileRoutesByPath[TFilePath]["path"], TFullPath extends RouteConstraints["TFullPath"] = FileRoutesByPath[TFilePath]["fullPath"]>(props: LoginOptions): RouteOptions<TFilePath, TParentRoute, TId, TPath, TFullPath>;
13
+ export declare function createLoginRouteOptions(props: LoginOptions): {
14
+ readonly validateSearch: z.ZodObject<{
15
+ redirect: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodString>>>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ redirect: string;
18
+ }, {
19
+ redirect?: unknown;
20
+ }>;
21
+ readonly beforeLoad: ({ search }: {
22
+ search: {
23
+ redirect: string;
24
+ };
25
+ }) => void;
26
+ readonly component: () => import("@emotion/react/jsx-runtime").JSX.Element;
27
+ };
package/lib/types.cjs DELETED
@@ -1,3 +0,0 @@
1
- /*! VefFramework version: 1.0.50, build time: 2024-12-26T14:52:15.348Z, made by Venus. */
2
- "use strict";
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/types/types.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import type { AnyRoute, FileRoute, FileRoutesByPath, RouteConstraints } from "@tanstack/react-router";
2
- /**
3
- * The options for creating a route.
4
- */
5
- export type RouteOptions<TFilePath extends keyof FileRoutesByPath, TParentRoute extends AnyRoute = FileRoutesByPath[TFilePath]["parentRoute"], TId extends RouteConstraints["TId"] = FileRoutesByPath[TFilePath]["id"], TPath extends RouteConstraints["TPath"] = FileRoutesByPath[TFilePath]["path"], TFullPath extends RouteConstraints["TFullPath"] = FileRoutesByPath[TFilePath]["fullPath"]> = Parameters<FileRoute<TFilePath, TParentRoute, TId, TPath, TFullPath>["createRoute"]>[0];