@vef-framework/starter 1.0.100 → 1.0.102

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 (48) hide show
  1. package/es/api.js +1 -3
  2. package/es/app.js +1 -3
  3. package/es/components/index.js +1 -3
  4. package/es/components/vef-access-denied-page/index.js +1 -3
  5. package/es/components/vef-app/index.js +1 -3
  6. package/es/components/vef-dev-assistant/index.js +4 -6
  7. package/es/components/vef-error-page/index.js +1 -3
  8. package/es/components/vef-login-page/index.js +1 -3
  9. package/es/components/vef-not-found-page/index.js +1 -3
  10. package/es/components/vef-router-provider/index.js +1 -3
  11. package/es/constants.js +1 -3
  12. package/es/helper.js +1 -3
  13. package/es/index.js +1 -3
  14. package/es/router.js +1 -3
  15. package/es/routes/access-denied.js +1 -3
  16. package/es/routes/index.js +1 -3
  17. package/es/routes/layout.js +1 -3
  18. package/es/routes/login.js +1 -3
  19. package/es/routes/root.js +1 -3
  20. package/es/store.js +1 -3
  21. package/lib/api.cjs +1 -3
  22. package/lib/app.cjs +1 -3
  23. package/lib/components/index.cjs +1 -3
  24. package/lib/components/vef-access-denied-page/index.cjs +1 -3
  25. package/lib/components/vef-access-denied-page/props.cjs +1 -3
  26. package/lib/components/vef-app/index.cjs +1 -3
  27. package/lib/components/vef-app/props.cjs +1 -3
  28. package/lib/components/vef-dev-assistant/index.cjs +4 -6
  29. package/lib/components/vef-dev-assistant/props.cjs +1 -3
  30. package/lib/components/vef-error-page/index.cjs +1 -3
  31. package/lib/components/vef-error-page/props.cjs +1 -3
  32. package/lib/components/vef-login-page/index.cjs +1 -3
  33. package/lib/components/vef-login-page/props.cjs +1 -3
  34. package/lib/components/vef-not-found-page/index.cjs +1 -3
  35. package/lib/components/vef-not-found-page/props.cjs +1 -3
  36. package/lib/components/vef-router-provider/index.cjs +1 -3
  37. package/lib/components/vef-router-provider/props.cjs +1 -3
  38. package/lib/constants.cjs +1 -3
  39. package/lib/helper.cjs +1 -3
  40. package/lib/index.cjs +1 -3
  41. package/lib/router.cjs +1 -3
  42. package/lib/routes/access-denied.cjs +1 -3
  43. package/lib/routes/index.cjs +1 -3
  44. package/lib/routes/layout.cjs +1 -3
  45. package/lib/routes/login.cjs +1 -3
  46. package/lib/routes/root.cjs +1 -3
  47. package/lib/store.cjs +1 -3
  48. package/package.json +5 -5
package/es/api.js CHANGED
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{createApiClient as e}from"@vef-framework/core";import{useAppStore as t}from"./store.js";function createApiClient(r){return e({...r,getAccessToken:()=>t.getState().token?.accessToken})}export{createApiClient};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{createApiClient as createApiClient$1}from"@vef-framework/core";import{useAppStore}from"./store.js";function createApiClient(options){return createApiClient$1({...options,getAccessToken(){return useAppStore.getState().token?.accessToken}})}/*! 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 */export{createApiClient};
package/es/app.js CHANGED
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{createElement as e}from"react";import{createRoot as t}from"react-dom/client";import"./components/index.js";import r from"./components/vef-app/index.js";function createApp(){const n=t(document.getElementById("root"),{identifierPrefix:"vef-"});return{render:t=>{n.render(e(r,t))},unmount:()=>n.unmount()}}export{createApp};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{createElement}from"react";import{createRoot}from"react-dom/client";import"./components/index.js";import VefApp from"./components/vef-app/index.js";function createApp(){const root=createRoot(document.getElementById("root"),{identifierPrefix:"vef-"});return{render:props=>{root.render(createElement(VefApp,props))},unmount:()=>root.unmount()}}/*! 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 */export{createApp};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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
- /*! 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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{default as default2}from"./vef-access-denied-page/index.js";import{default as default3}from"./vef-app/index.js";import{default as default4}from"./vef-dev-assistant/index.js";import{default as default5}from"./vef-error-page/index.js";import{default as default6}from"./vef-login-page/index.js";import{default as default7}from"./vef-not-found-page/index.js";import{default as default8}from"./vef-router-provider/index.js";/*! 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 */export{default2 as VefAccessDeniedPage,default3 as VefApp,default4 as VefDevAssistant,default5 as VefErrorPage,default6 as VefLoginPage,default7 as VefNotFoundPage,default8 as VefRouterProvider};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{jsx as e}from"@emotion/react/jsx-runtime";import{useLocation as t,useRouterState as o,useNavigate as r}from"@tanstack/react-router";import{VefAccessDenied as a}from"@vef-framework/components";import{useCallback as m}from"react";import{INDEX_PAGE_PATH as n}from"../../constants.js";function VefAccessDeniedPage(c){const{pathname:i}=t(),{redirect:f}=o(),s=r(),p=m((()=>s({to:n,replace:!0})),[s]);return e(a,{uri:f?._fromLocation?.pathname??i,onNavigateHome:p,...c})}export{VefAccessDeniedPage as default};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{jsx}from"@emotion/react/jsx-runtime";import{useLocation,useRouterState,useNavigate}from"@tanstack/react-router";import{VefAccessDenied}from"@vef-framework/components";import{useCallback}from"react";import{INDEX_PAGE_PATH}from"../../constants.js";function VefAccessDeniedPage(props){const{pathname}=useLocation(),{redirect}=useRouterState(),navigate=useNavigate(),handleNavigateHome=useCallback(()=>navigate({to:INDEX_PAGE_PATH,replace:!0}),[navigate]);return jsx(VefAccessDenied,{uri:redirect?._fromLocation?.pathname??pathname,onNavigateHome:handleNavigateHome,...props})}/*! 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 */export{VefAccessDeniedPage as default};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{jsx as r}from"@emotion/react/jsx-runtime";import{VefConfigProvider as e}from"@vef-framework/components";import{StrictMode as o}from"react";import t from"../vef-router-provider/index.js";function VefApp({router:m,...f}){return r(o,{children:r(e,{...f,children:r(t,{router:m})})})}export{VefApp as default};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{jsx}from"@emotion/react/jsx-runtime";import{VefConfigProvider}from"@vef-framework/components";import{StrictMode}from"react";import VefRouterProvider from"../vef-router-provider/index.js";function VefApp({router,...configProviderProps}){return jsx(StrictMode,{children:jsx(VefConfigProvider,{...configProviderProps,children:jsx(VefRouterProvider,{router})})})}/*! 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 */export{VefApp as default};
@@ -1,5 +1,4 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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,VefFloatButton as n,VefIcon as a,VefLoadingPlaceholder as l}from"@vef-framework/components";import{useKeyPress as s}from"@vef-framework/hooks";import{themeVariables as c,noop as d}from"@vef-framework/shared";import{CompassIcon as f,SendIcon as h}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`
1
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{jsxs,jsx,Fragment}from"@emotion/react/jsx-runtime";import{css}from"@emotion/react";import{VefFloatButtonGroup,VefFloatButton,VefIcon,VefLoadingPlaceholder}from"@vef-framework/components";import{useKeyPress}from"@vef-framework/hooks";import{themeVariables,noop}from"@vef-framework/shared";import{CompassIcon,SendIcon}from"lucide-react";import{AnimatePresence,motion}from"motion/react";import{lazy,useState,useCallback,Suspense}from"react";const devtoolsContainerStyle=css`
3
2
  position: fixed;
4
3
  bottom: 0;
5
4
  width: 100%;
@@ -22,11 +21,10 @@ import{jsxs as e,jsx as t,Fragment as o}from"@emotion/react/jsx-runtime";import{
22
21
  }
23
22
 
24
23
  > div {
25
- padding: ${c.paddingSm};
24
+ padding: ${themeVariables.paddingSm};
26
25
  scrollbar-width: thin;
27
26
  scrollbar-color: #334155 transparent;
28
- box-shadow: ${c.boxShadowDrawerDown};
27
+ box-shadow: ${themeVariables.boxShadowDrawerDown};
29
28
  }
30
29
  }
31
- `;function IconCoffee(o){return e("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...o,children:[t("path",{d:"M17 14v4c0 1.66 -1.34 3 -3 3h-6c-1.66 0 -3 -1.34 -3 -3v-4Z",fill:"currentColor",fillOpacity:0,children:t("animate",{attributeName:"fill-opacity",begin:"0.8s",dur:"0.5s",fill:"freeze",values:"0;1"})}),e("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[t("path",{d:"M17 9v9c0 1.66 -1.34 3 -3 3h-6c-1.66 0 -3 -1.34 -3 -3v-9Z",strokeDasharray:48,strokeDashoffset:48,children:t("animate",{attributeName:"stroke-dashoffset",dur:"0.6s",fill:"freeze",values:"48;0"})}),t("path",{d:"M17 9h3c0.55 0 1 0.45 1 1v3c0 0.55 -0.45 1 -1 1h-3",strokeDasharray:14,strokeDashoffset:14,children:t("animate",{attributeName:"stroke-dashoffset",begin:"0.6s",dur:"0.2s",fill:"freeze",values:"14;0"})}),t("mask",{id:"lineMdCoffeeHalfEmptyFilledLoop0",children:t("path",{d:"M8 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4M12 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4M16 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4",stroke:"#fff",children:t("animateMotion",{calcMode:"linear",dur:"3s",path:"M0 0v-8",repeatCount:"indefinite"})})}),e("rect",{fill:"currentColor",height:0,mask:"url(#lineMdCoffeeHalfEmptyFilledLoop0)",width:24,y:7,children:[t("animate",{attributeName:"y",begin:"0.8s",dur:"0.6s",fill:"freeze",values:"7;2"}),t("animate",{attributeName:"height",begin:"0.8s",dur:"0.6s",fill:"freeze",values:"0;5"})]})]})]})}const b="development"===process.env.NODE_ENV,w=b?m((()=>import("@tanstack/router-devtools").then((e=>({default:e.TanStackRouterDevtoolsPanel}))))):()=>null,x=b?m((()=>import("@tanstack/react-query-devtools").then((e=>({default:e.ReactQueryDevtoolsPanel}))))):()=>null,D={opened:{opacity:1,y:0,transition:{type:"spring",bounce:0,duration:.2}},closed:{opacity:0,y:"50%"}};function VefDevAssistant(){const[r,c]=v(null),m=k((e=>{e.stopPropagation(),c((e=>"query"===e?null:"query"))}),[]),b=k((e=>{e.stopPropagation(),c((e=>"router"===e?null:"router"))}),[]);return s("esc",(()=>{r&&c(null)})),e(o,{children:[e(i,{collapsable:!0,shape:"square",icon:t(a,{size:"huge",children:t(IconCoffee,{})}),onClick:e=>e.stopPropagation(),children:[t(n,{tip:"API调试控制台",icon:t(a,{children:t(f,{})}),onClick:m}),t(n,{tip:"路由调试控制台",icon:t(a,{children:t(h,{})}),onClick:b})]}),e(p,{mode:"wait",children:["query"===r&&t(u.div,{animate:"opened",css:g,exit:"closed",initial:"closed",variants:D,children:t(y,{fallback:t(l,{}),children:t(x,{style:{height:"100%"}})})}),"router"===r&&t(u.div,{animate:"opened",css:g,exit:"closed",initial:"closed",variants:D,children:t(y,{fallback:t(l,{}),children:t(w,{isOpen:"router"===r,setIsOpen:d,style:{height:"100%"}})})})]})]})}export{VefDevAssistant as default};
32
- /*! 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 */
30
+ `;function IconCoffee(props){return jsxs("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...props,children:[jsx("path",{d:"M17 14v4c0 1.66 -1.34 3 -3 3h-6c-1.66 0 -3 -1.34 -3 -3v-4Z",fill:"currentColor",fillOpacity:0,children:jsx("animate",{attributeName:"fill-opacity",begin:"0.8s",dur:"0.5s",fill:"freeze",values:"0;1"})}),jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[jsx("path",{d:"M17 9v9c0 1.66 -1.34 3 -3 3h-6c-1.66 0 -3 -1.34 -3 -3v-9Z",strokeDasharray:48,strokeDashoffset:48,children:jsx("animate",{attributeName:"stroke-dashoffset",dur:"0.6s",fill:"freeze",values:"48;0"})}),jsx("path",{d:"M17 9h3c0.55 0 1 0.45 1 1v3c0 0.55 -0.45 1 -1 1h-3",strokeDasharray:14,strokeDashoffset:14,children:jsx("animate",{attributeName:"stroke-dashoffset",begin:"0.6s",dur:"0.2s",fill:"freeze",values:"14;0"})}),jsx("mask",{id:"lineMdCoffeeHalfEmptyFilledLoop0",children:jsx("path",{d:"M8 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4M12 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4M16 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4",stroke:"#fff",children:jsx("animateMotion",{calcMode:"linear",dur:"3s",path:"M0 0v-8",repeatCount:"indefinite"})})}),jsxs("rect",{fill:"currentColor",height:0,mask:"url(#lineMdCoffeeHalfEmptyFilledLoop0)",width:24,y:7,children:[jsx("animate",{attributeName:"y",begin:"0.8s",dur:"0.6s",fill:"freeze",values:"7;2"}),jsx("animate",{attributeName:"height",begin:"0.8s",dur:"0.6s",fill:"freeze",values:"0;5"})]})]})]})}const isDev=process.env.NODE_ENV==="development",RouterDevtools=isDev?lazy(()=>import("@tanstack/router-devtools").then(mod=>({default:mod.TanStackRouterDevtoolsPanel}))):()=>null,QueryDevtools=isDev?lazy(()=>import("@tanstack/react-query-devtools").then(mod=>({default:mod.ReactQueryDevtoolsPanel}))):()=>null,variants={opened:{opacity:1,y:0,transition:{type:"spring",bounce:0,duration:.2}},closed:{opacity:0,y:"50%"}};function VefDevAssistant(){const[visibleDevtools,setVisibleDevtools]=useState(null),handleShowQueryDevtools=useCallback(event=>{event.stopPropagation(),setVisibleDevtools(visible=>visible==="query"?null:"query")},[]),handleShowRouterDevtools=useCallback(event=>{event.stopPropagation(),setVisibleDevtools(visible=>visible==="router"?null:"router")},[]);return useKeyPress("esc",()=>{visibleDevtools&&setVisibleDevtools(null)}),jsxs(Fragment,{children:[jsxs(VefFloatButtonGroup,{collapsable:!0,shape:"square",icon:jsx(VefIcon,{size:"huge",children:jsx(IconCoffee,{})}),onClick:event=>event.stopPropagation(),children:[jsx(VefFloatButton,{tip:"API调试控制台",icon:jsx(VefIcon,{children:jsx(CompassIcon,{})}),onClick:handleShowQueryDevtools}),jsx(VefFloatButton,{tip:"路由调试控制台",icon:jsx(VefIcon,{children:jsx(SendIcon,{})}),onClick:handleShowRouterDevtools})]}),jsxs(AnimatePresence,{mode:"wait",children:[visibleDevtools==="query"&&jsx(motion.div,{animate:"opened",css:devtoolsContainerStyle,exit:"closed",initial:"closed",variants,children:jsx(Suspense,{fallback:jsx(VefLoadingPlaceholder,{}),children:jsx(QueryDevtools,{style:{height:"100%"}})})}),visibleDevtools==="router"&&jsx(motion.div,{animate:"opened",css:devtoolsContainerStyle,exit:"closed",initial:"closed",variants,children:jsx(Suspense,{fallback:jsx(VefLoadingPlaceholder,{}),children:jsx(RouterDevtools,{isOpen:visibleDevtools==="router",setIsOpen:noop,style:{height:"100%"}})})})]})]})}/*! 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 */export{VefDevAssistant as default};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{jsx as r}from"@emotion/react/jsx-runtime";import{VefError as e}from"@vef-framework/components";import{useQueryErrorResetBoundary as o}from"@vef-framework/core";import{useEffect as t}from"react";function VefErrorPage({error:m,info:f,reset:n}){const{reset:a}=o();return t((()=>{a()}),[a]),r(e,{componentStack:f?.componentStack,error:m,reset:n})}export{VefErrorPage as default};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{jsx}from"@emotion/react/jsx-runtime";import{VefError}from"@vef-framework/components";import{useQueryErrorResetBoundary}from"@vef-framework/core";import{useEffect}from"react";function VefErrorPage({error,info,reset}){const{reset:resetQueryError}=useQueryErrorResetBoundary();return useEffect(()=>{resetQueryError()},[resetQueryError]),jsx(VefError,{componentStack:info?.componentStack,error,reset})}/*! 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 */export{VefErrorPage as default};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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 n}from"@vef-framework/components";import{LOGIN_PAGE_ROUTE as a}from"../../constants.js";import{useAppStore as s}from"../../store.js";function VefLoginPage(c){const i=t(),f=o(),{redirect:m}=r({from:a});return e(n,{onLoginSuccess:async({accessToken:e,refreshToken:t})=>{s.setState({isAuthenticated:!0,token:Object.freeze({accessToken:e,refreshToken:t})}),await i.invalidate(),await f({to:m,replace:!0})},...c})}export{VefLoginPage as default};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{jsx}from"@emotion/react/jsx-runtime";import{useRouter,useNavigate,useSearch}from"@tanstack/react-router";import{VefLogin}from"@vef-framework/components";import{LOGIN_PAGE_ROUTE}from"../../constants.js";import{useAppStore}from"../../store.js";function VefLoginPage(props){const router=useRouter(),navigate=useNavigate(),{redirect}=useSearch({from:LOGIN_PAGE_ROUTE});return jsx(VefLogin,{onLoginSuccess:async({accessToken,refreshToken})=>{useAppStore.setState({isAuthenticated:!0,token:Object.freeze({accessToken,refreshToken})}),await router.invalidate(),await navigate({to:redirect,replace:!0})},...props})}/*! 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 */export{VefLoginPage as default};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{jsx as o}from"@emotion/react/jsx-runtime";import{useNavigate as t,useLocation as r}from"@tanstack/react-router";import{VefNotFound as e}from"@vef-framework/components";import{useCallback as a}from"react";import{INDEX_PAGE_PATH as m}from"../../constants.js";function VefNotFoundPage(){const n=t(),f=a((()=>n({to:m,replace:!0})),[n]),{pathname:i}=r();return o(e,{uri:i,onNavigateHome:f})}export{VefNotFoundPage as default};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{jsx}from"@emotion/react/jsx-runtime";import{useNavigate,useLocation}from"@tanstack/react-router";import{VefNotFound}from"@vef-framework/components";import{useCallback}from"react";import{INDEX_PAGE_PATH}from"../../constants.js";function VefNotFoundPage(){const navigate=useNavigate(),handleNavigateHome=useCallback(()=>navigate({to:INDEX_PAGE_PATH,replace:!0}),[navigate]),{pathname}=useLocation();return jsx(VefNotFound,{uri:pathname,onNavigateHome:handleNavigateHome})}/*! 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 */export{VefNotFoundPage as default};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{jsx as r}from"@emotion/react/jsx-runtime";import{RouterProvider as t}from"@tanstack/react-router";import{useApiContext as e}from"@vef-framework/core";import{useMemo as o}from"react";function VefRouterProvider({router:i}){const{fetchAuthenticatedUserApi:c}=e(),f=o((()=>({fetchAuthenticatedUserApi:c})),[c]);return r(t,{context:f,router:i})}export{VefRouterProvider as default};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{jsx}from"@emotion/react/jsx-runtime";import{RouterProvider}from"@tanstack/react-router";import{useApiContext}from"@vef-framework/core";import{useMemo}from"react";function VefRouterProvider({router}){const{fetchAuthenticatedUserApi}=useApiContext(),context=useMemo(()=>({fetchAuthenticatedUserApi}),[fetchAuthenticatedUserApi]);return jsx(RouterProvider,{context,router})}/*! 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 */export{VefRouterProvider as default};
package/es/constants.js CHANGED
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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
- /*! 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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */const LOGIN_PAGE_PATH="/login",LOGIN_PAGE_ROUTE="/_common/login",INDEX_PAGE_PATH="/",INDEX_PAGE_ROUTE="/_layout",ACCESS_DENIED_PAGE_PATH="/access-denied",ACCESS_DENIED_PAGE_ROUTE="/_common/access-denied";/*! 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 */export{ACCESS_DENIED_PAGE_PATH,ACCESS_DENIED_PAGE_ROUTE,INDEX_PAGE_PATH,INDEX_PAGE_ROUTE,LOGIN_PAGE_PATH,LOGIN_PAGE_ROUTE};
package/es/helper.js CHANGED
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{LOGIN_PAGE_PATH as t}from"./constants.js";import{useAppStore as a}from"./store.js";async function handleClientLogout(i,e){await e.invalidateQueries(),a.setState({isAuthenticated:!1},!0),await i.invalidate(),await i.navigate({to:t})}export{handleClientLogout};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{LOGIN_PAGE_PATH}from"./constants.js";import{useAppStore}from"./store.js";async function handleClientLogout(router,fetchAuthenticatedUserApi){await fetchAuthenticatedUserApi.invalidateQueries(),useAppStore.setState({isAuthenticated:!1},!0),await router.invalidate(),await router.navigate({to:LOGIN_PAGE_PATH})}/*! 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 */export{handleClientLogout};
package/es/index.js CHANGED
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- export{createApiClient}from"./api.js";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{handleClientLogout}from"./helper.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
- /*! 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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{createApiClient}from"./api.js";import{createApp}from"./app.js";import"./components/index.js";import{ACCESS_DENIED_PAGE_PATH,ACCESS_DENIED_PAGE_ROUTE,INDEX_PAGE_PATH,INDEX_PAGE_ROUTE,LOGIN_PAGE_PATH,LOGIN_PAGE_ROUTE}from"./constants.js";import{handleClientLogout}from"./helper.js";import{createRouter}from"./router.js";import"./routes/index.js";import{useAppStore}from"./store.js";import{default as default2}from"./components/vef-access-denied-page/index.js";import{default as default3}from"./components/vef-app/index.js";import{default as default4}from"./components/vef-dev-assistant/index.js";import{default as default5}from"./components/vef-error-page/index.js";import{default as default6}from"./components/vef-login-page/index.js";import{default as default7}from"./components/vef-not-found-page/index.js";import{default as default8}from"./components/vef-router-provider/index.js";import{createAccessDeniedRouteOptions}from"./routes/access-denied.js";import{createLayoutRouteOptions}from"./routes/layout.js";import{createLoginRouteOptions}from"./routes/login.js";import{createRootRoute}from"./routes/root.js";/*! 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 */export{ACCESS_DENIED_PAGE_PATH,ACCESS_DENIED_PAGE_ROUTE,INDEX_PAGE_PATH,INDEX_PAGE_ROUTE,LOGIN_PAGE_PATH,LOGIN_PAGE_ROUTE,default2 as VefAccessDeniedPage,default3 as VefApp,default4 as VefDevAssistant,default5 as VefErrorPage,default6 as VefLoginPage,default7 as VefNotFoundPage,default8 as VefRouterProvider,createAccessDeniedRouteOptions,createApiClient,createApp,createLayoutRouteOptions,createLoginRouteOptions,createRootRoute,createRouter,handleClientLogout,useAppStore};
package/es/router.js CHANGED
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{createRouter as e,createHashHistory as r,createBrowserHistory as t}from"@tanstack/react-router";import{VefText as o,VefLoadingPlaceholder as a}from"@vef-framework/components";import{showErrorNotification as n}from"@vef-framework/shared";import s from"nprogress";import{createElement as l}from"react";const i=6e5;function createRouter({routeTree:c,history:d}){const u=e({routeTree:c,trailingSlash:"never",caseSensitive:!0,history:"hash"===d?r():t(),search:{strict:!0},notFoundMode:"root",defaultPendingComponent:()=>l(a,{size:"large"}),defaultPendingMs:500,defaultPendingMinMs:300,defaultSsr:!1,defaultStructuralSharing:!0,defaultHashScrollIntoView:{behavior:"smooth",block:"start",inline:"center"},defaultPreload:"intent",defaultPreloadDelay:50,defaultPreloadGcTime:i,defaultGcTime:i,defaultOnCatch(e,r){n(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 u.subscribe("onBeforeLoad",(({pathChanged:e})=>e&&s.start())),u.subscribe("onLoad",(()=>{s.done()})),u}export{createRouter};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{createRouter as createRouter$1,createHashHistory,createBrowserHistory}from"@tanstack/react-router";import{VefText,VefLoadingPlaceholder}from"@vef-framework/components";import{showErrorNotification}from"@vef-framework/shared";import NProgress from"nprogress";import{createElement}from"react";const defaultGcTime=10*60*1e3;function createRouter({routeTree,history}){const router=createRouter$1({routeTree,trailingSlash:"never",caseSensitive:!0,history:history==="hash"?createHashHistory():createBrowserHistory(),search:{strict:!0},notFoundMode:"root",defaultPendingComponent:()=>createElement(VefLoadingPlaceholder,{size:"large"}),defaultPendingMs:500,defaultPendingMinMs:300,defaultSsr:!1,defaultStructuralSharing:!0,defaultHashScrollIntoView:{behavior:"smooth",block:"start",inline:"center"},defaultPreload:"intent",defaultPreloadDelay:50,defaultPreloadGcTime:defaultGcTime,defaultGcTime,defaultOnCatch(error,errorInfo){showErrorNotification(error.message||error.name,createElement(VefText,{color:"error",children:createElement("pre",{style:{maxHeight:"480px",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.2) transparent"},children:error.stack||errorInfo.componentStack||"No stack trace available"})}))}});return router.subscribe("onBeforeLoad",({pathChanged})=>pathChanged&&NProgress.start()),router.subscribe("onLoad",()=>{NProgress.done()}),router}/*! 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 */export{createRouter};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import"../components/index.js";import e from"../components/vef-access-denied-page/index.js";function createAccessDeniedRouteOptions(){return{component:e}}export{createAccessDeniedRouteOptions};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import"../components/index.js";import VefAccessDeniedPage from"../components/vef-access-denied-page/index.js";function createAccessDeniedRouteOptions(){return{component:VefAccessDeniedPage}}/*! 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 */export{createAccessDeniedRouteOptions};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- export{createAccessDeniedRouteOptions}from"./access-denied.js";export{createLayoutRouteOptions}from"./layout.js";export{createLoginRouteOptions}from"./login.js";export{createRootRoute}from"./root.js";
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{createAccessDeniedRouteOptions}from"./access-denied.js";import{createLayoutRouteOptions}from"./layout.js";import{createLoginRouteOptions}from"./login.js";import{createRootRoute}from"./root.js";/*! 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 */export{createAccessDeniedRouteOptions,createLayoutRouteOptions,createLoginRouteOptions,createRootRoute};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{jsx as e}from"@emotion/react/jsx-runtime";import{useRouter as t,useNavigate as r,useLocation as o,Outlet as a,redirect as n}from"@tanstack/react-router";import{VefIcon as i,VefLayout as s,VefLoadingPlaceholder as m}from"@vef-framework/components";import{useApiContext as c}from"@vef-framework/core";import{buildRouteParentMenusMappings as u}from"@vef-framework/shared";import{HomeIcon as p}from"lucide-react";import{useMemo as l,useCallback as f}from"react";import{INDEX_PAGE_PATH as d,ACCESS_DENIED_PAGE_PATH as h,LOGIN_PAGE_PATH as g}from"../constants.js";import{handleClientLogout as y}from"../helper.js";import{useAppStore as b}from"../store.js";const k={key:d,label:e(i,{children:e(p,{})})};function createLayoutRouteOptions({title:i,logo:p,getUserDescription:d}){return{beforeLoad:({location:e})=>{const{isAuthenticated:t,routeParentMenusMappings:r}=b.getState();if(!t)throw n({to:g,search:{redirect:e.href}});if(r&&!r.has(e.pathname))throw n({to:h,replace:!0})},loader:async({context:e,location:t})=>{const{fetchAuthenticatedUserApi:r}=e,{menus:o,permissions:a,...i}=await r.fetchQuery(),s=Object.freeze(u(o));if(b.setState({user:Object.freeze(i),menus:Object.freeze(o),permissions:Object.freeze(new Set(a)),routeParentMenusMappings:s}),!s.has(t.pathname))throw n({to:h,replace:!0})},pendingComponent:()=>e(m,{size:"large",tip:"系统加载中,请稍后..."}),component:function LayoutComponent(){const n=t(),m=r(),{pathname:u}=o(),[h,g,w]=b((e=>[e.menus,e.user,e.routeParentMenusMappings])),M=w?.get(u)?.[1].map((e=>e.key)),j=l((()=>{const e=w?.get(u);if(!e)return[];const[t,r]=e;return[k,...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,w]),{logoutApi:v,fetchAuthenticatedUserApi:A}=c(),{mutate:O}=v.useMutation(),z=f((async()=>{await O(),await y(n,A)}),[O,n,A]),L=f((e=>{m({to:e})}),[m]);return e(s,{activeMenuKey:u,breadcrumbItems:j,defaultOpenedMenuKeys:M,logo:p,menuItems:h,title:i,userAvatar:g?.avatar,userDescription:d?.(g),userGender:g?.gender,userName:g?.name,onActiveMenuKeyChange:L,onBreadcrumbClick:L,onLogout:z,children:e(a,{})})},staleTime:1/0,gcTime:0,shouldReload:!1}}export{createLayoutRouteOptions};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{jsx}from"@emotion/react/jsx-runtime";import{useRouter,useNavigate,useLocation,Outlet,redirect}from"@tanstack/react-router";import{VefIcon,VefLayout,VefLoadingPlaceholder}from"@vef-framework/components";import{useApiContext}from"@vef-framework/core";import{buildRouteParentMenusMappings}from"@vef-framework/shared";import{HomeIcon}from"lucide-react";import{useMemo,useCallback}from"react";import{INDEX_PAGE_PATH,ACCESS_DENIED_PAGE_PATH,LOGIN_PAGE_PATH}from"../constants.js";import{handleClientLogout}from"../helper.js";import{useAppStore}from"../store.js";const indexBreadcrumbItem={key:INDEX_PAGE_PATH,label:jsx(VefIcon,{children:jsx(HomeIcon,{})})};function createLayoutRouteOptions({title,logo,getUserDescription}){function LayoutComponent(){const router=useRouter(),navigate=useNavigate(),{pathname}=useLocation(),[menus,user,routeParentMenusMappings]=useAppStore(state=>[state.menus,state.user,state.routeParentMenusMappings]),defaultOpenedMenuKeys=routeParentMenusMappings?.get(pathname)?.[1].map(it=>it.key),breadcrumbItems=useMemo(()=>{const mapping=routeParentMenusMappings?.get(pathname);if(!mapping)return[];const[currentMenu,parentMenus]=mapping;return[indexBreadcrumbItem,...parentMenus.map(menu=>({key:menu.key,label:menu.label,dropdownItems:menu.children.filter(child=>child.type!=="divider").map(child=>({key:child.key,label:child.label}))})),{label:currentMenu.label}]},[pathname,routeParentMenusMappings]),{logoutApi,fetchAuthenticatedUserApi}=useApiContext(),{mutate:logout}=logoutApi.useMutation(),handleLogout=useCallback(async()=>{await logout(),await handleClientLogout(router,fetchAuthenticatedUserApi)},[logout,router,fetchAuthenticatedUserApi]),handleMenuSwitch=useCallback(menuKey=>{navigate({to:menuKey})},[navigate]);return jsx(VefLayout,{activeMenuKey:pathname,breadcrumbItems,defaultOpenedMenuKeys,logo,menuItems:menus,title,userAvatar:user?.avatar,userDescription:getUserDescription?.(user),userGender:user?.gender,userName:user?.name,onActiveMenuKeyChange:handleMenuSwitch,onBreadcrumbClick:handleMenuSwitch,onLogout:handleLogout,children:jsx(Outlet,{})})}return{beforeLoad:({location})=>{const{isAuthenticated,routeParentMenusMappings}=useAppStore.getState();if(!isAuthenticated)throw redirect({to:LOGIN_PAGE_PATH,search:{redirect:location.href}});if(routeParentMenusMappings&&!routeParentMenusMappings.has(location.pathname))throw redirect({to:ACCESS_DENIED_PAGE_PATH,replace:!0})},loader:async({context,location})=>{const{fetchAuthenticatedUserApi}=context,{menus,permissions,...user}=await fetchAuthenticatedUserApi.fetchQuery(),routeParentMenusMappings=Object.freeze(buildRouteParentMenusMappings(menus));if(useAppStore.setState({user:Object.freeze(user),menus:Object.freeze(menus),permissions:Object.freeze(new Set(permissions)),routeParentMenusMappings}),!routeParentMenusMappings.has(location.pathname))throw redirect({to:ACCESS_DENIED_PAGE_PATH,replace:!0})},pendingComponent:()=>jsx(VefLoadingPlaceholder,{size:"large",tip:"系统加载中,请稍后..."}),component:LayoutComponent,staleTime:1/0,gcTime:0,shouldReload:!1}}/*! 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 */export{createLayoutRouteOptions};
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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 createLoginRouteOptions(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{createLoginRouteOptions};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{jsx}from"@emotion/react/jsx-runtime";import{redirect}from"@tanstack/react-router";import{z}from"@vef-framework/shared";import"../components/index.js";import{INDEX_PAGE_PATH}from"../constants.js";import{useAppStore}from"../store.js";import VefLoginPage from"../components/vef-login-page/index.js";function createLoginRouteOptions(props){return{validateSearch:z.object({redirect:z.string().optional().default(INDEX_PAGE_PATH).catch(INDEX_PAGE_PATH)}),beforeLoad:({search})=>{if(useAppStore.getState().isAuthenticated){const{redirect:redirectPath}=search;throw redirect({to:redirectPath,replace:!0})}},component:()=>jsx(VefLoginPage,{...props})}}/*! 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 */export{createLoginRouteOptions};
package/es/routes/root.js CHANGED
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{jsxs as o,Fragment as e,jsx as t}from"@emotion/react/jsx-runtime";import{createRootRouteWithContext as n,Outlet as r}from"@tanstack/react-router";import"../components/index.js";import m from"../components/vef-not-found-page/index.js";import p from"../components/vef-error-page/index.js";import s from"../components/vef-dev-assistant/index.js";function createRootRoute(){return n()({component:()=>o(e,{children:[t(r,{}),"development"===process.env.NODE_ENV&&t(s,{})]}),errorComponent:p,notFoundComponent:m,ssr:!1})}export{createRootRoute};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{jsxs,Fragment,jsx}from"@emotion/react/jsx-runtime";import{createRootRouteWithContext,Outlet}from"@tanstack/react-router";import"../components/index.js";import VefNotFoundPage from"../components/vef-not-found-page/index.js";import VefErrorPage from"../components/vef-error-page/index.js";import VefDevAssistant from"../components/vef-dev-assistant/index.js";function createRootRoute(){return createRootRouteWithContext()({component:()=>jsxs(Fragment,{children:[jsx(Outlet,{}),process.env.NODE_ENV==="development"&&jsx(VefDevAssistant,{})]}),errorComponent:VefErrorPage,notFoundComponent:VefNotFoundPage,ssr:!1})}/*! 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 */export{createRootRoute};
package/es/store.js CHANGED
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- import{createStore as e}from"@vef-framework/shared";const t=e((()=>({isAuthenticated:!1})),{name:"APP",storage:"session",selector:e=>({isAuthenticated:e.isAuthenticated,token:e.token})});export{t as useAppStore};
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
+ /*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */import{createStore}from"@vef-framework/shared";const useAppStore=createStore(()=>({isAuthenticated:!1}),{name:"APP",storage:"session",selector:state=>({isAuthenticated:state.isAuthenticated,token:state.token})});/*! 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 */export{useAppStore};
package/lib/api.cjs CHANGED
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/core"),t=require("./store.cjs");exports.createApiClient=function createApiClient(r){return e.createApiClient({...r,getAccessToken:()=>t.useAppStore.getState().token?.accessToken})};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const core=require("@vef-framework/core"),store=require("./store.cjs");function createApiClient(options){return core.createApiClient({...options,getAccessToken(){return store.useAppStore.getState().token?.accessToken}})}exports.createApiClient=createApiClient;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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 createApp(){const n=t.createRoot(document.getElementById("root"),{identifierPrefix:"vef-"});return{render:t=>{n.render(e.createElement(r.default,t))},unmount:()=>n.unmount()}};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const react=require("react"),client=require("react-dom/client");require("./components/index.cjs");const index=require("./components/vef-app/index.cjs");function createApp(){const root=client.createRoot(document.getElementById("root"),{identifierPrefix:"vef-"});return{render:props=>{root.render(react.createElement(index.default,props))},unmount:()=>root.unmount()}}exports.createApp=createApp;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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
- /*! 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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const index=require("./vef-access-denied-page/index.cjs"),index$1=require("./vef-app/index.cjs"),index$2=require("./vef-dev-assistant/index.cjs"),index$3=require("./vef-error-page/index.cjs"),index$4=require("./vef-login-page/index.cjs"),index$5=require("./vef-not-found-page/index.cjs"),index$6=require("./vef-router-provider/index.cjs");exports.VefAccessDeniedPage=index.default,exports.VefApp=index$1.default,exports.VefDevAssistant=index$2.default,exports.VefErrorPage=index$3.default,exports.VefLoginPage=index$4.default,exports.VefNotFoundPage=index$5.default,exports.VefRouterProvider=index$6.default;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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=function VefAccessDeniedPage(s){const{pathname:c}=t.useLocation(),{redirect:n}=t.useRouterState(),u=t.useNavigate(),i=a.useCallback((()=>u({to:o.INDEX_PAGE_PATH,replace:!0})),[u]);return e.jsx(r.VefAccessDenied,{uri:n?._fromLocation?.pathname??c,onNavigateHome:i,...s})};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const jsxRuntime=require("@emotion/react/jsx-runtime"),reactRouter=require("@tanstack/react-router"),components=require("@vef-framework/components"),react=require("react"),constants=require("../../constants.cjs");function VefAccessDeniedPage(props){const{pathname}=reactRouter.useLocation(),{redirect}=reactRouter.useRouterState(),navigate=reactRouter.useNavigate(),handleNavigateHome=react.useCallback(()=>navigate({to:constants.INDEX_PAGE_PATH,replace:!0}),[navigate]);return jsxRuntime.jsx(components.VefAccessDenied,{uri:redirect?._fromLocation?.pathname??pathname,onNavigateHome:handleNavigateHome,...props})}exports.default=VefAccessDeniedPage;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, 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 */
1
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. *//*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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=function VefApp({router:i,...u}){return e.jsx(t.StrictMode,{children:e.jsx(r.VefConfigProvider,{...u,children:e.jsx(o.default,{router:i})})})};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const jsxRuntime=require("@emotion/react/jsx-runtime"),components=require("@vef-framework/components"),react=require("react"),index=require("../vef-router-provider/index.cjs");function VefApp({router,...configProviderProps}){return jsxRuntime.jsx(react.StrictMode,{children:jsxRuntime.jsx(components.VefConfigProvider,{...configProviderProps,children:jsxRuntime.jsx(index.default,{router})})})}exports.default=VefApp;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, 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 */
1
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. *//*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -1,5 +1,4 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@emotion/react/jsx-runtime"),t=require("@emotion/react"),o=require("@vef-framework/components"),s=require("@vef-framework/hooks"),r=require("@vef-framework/shared"),i=require("lucide-react"),a=require("motion/react"),n=require("react"),l=t.css`
1
+ "use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod));/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const jsxRuntime=require("@emotion/react/jsx-runtime"),react=require("@emotion/react"),components=require("@vef-framework/components"),hooks=require("@vef-framework/hooks"),shared=require("@vef-framework/shared"),lucideReact=require("lucide-react"),react$2=require("motion/react"),react$1=require("react"),devtoolsContainerStyle=react.css`
3
2
  position: fixed;
4
3
  bottom: 0;
5
4
  width: 100%;
@@ -22,11 +21,10 @@
22
21
  }
23
22
 
24
23
  > div {
25
- padding: ${r.themeVariables.paddingSm};
24
+ padding: ${shared.themeVariables.paddingSm};
26
25
  scrollbar-width: thin;
27
26
  scrollbar-color: #334155 transparent;
28
- box-shadow: ${r.themeVariables.boxShadowDrawerDown};
27
+ box-shadow: ${shared.themeVariables.boxShadowDrawerDown};
29
28
  }
30
29
  }
31
- `;function IconCoffee(t){return e.jsxs("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...t,children:[e.jsx("path",{d:"M17 14v4c0 1.66 -1.34 3 -3 3h-6c-1.66 0 -3 -1.34 -3 -3v-4Z",fill:"currentColor",fillOpacity:0,children:e.jsx("animate",{attributeName:"fill-opacity",begin:"0.8s",dur:"0.5s",fill:"freeze",values:"0;1"})}),e.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[e.jsx("path",{d:"M17 9v9c0 1.66 -1.34 3 -3 3h-6c-1.66 0 -3 -1.34 -3 -3v-9Z",strokeDasharray:48,strokeDashoffset:48,children:e.jsx("animate",{attributeName:"stroke-dashoffset",dur:"0.6s",fill:"freeze",values:"48;0"})}),e.jsx("path",{d:"M17 9h3c0.55 0 1 0.45 1 1v3c0 0.55 -0.45 1 -1 1h-3",strokeDasharray:14,strokeDashoffset:14,children:e.jsx("animate",{attributeName:"stroke-dashoffset",begin:"0.6s",dur:"0.2s",fill:"freeze",values:"14;0"})}),e.jsx("mask",{id:"lineMdCoffeeHalfEmptyFilledLoop0",children:e.jsx("path",{d:"M8 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4M12 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4M16 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4",stroke:"#fff",children:e.jsx("animateMotion",{calcMode:"linear",dur:"3s",path:"M0 0v-8",repeatCount:"indefinite"})})}),e.jsxs("rect",{fill:"currentColor",height:0,mask:"url(#lineMdCoffeeHalfEmptyFilledLoop0)",width:24,y:7,children:[e.jsx("animate",{attributeName:"y",begin:"0.8s",dur:"0.6s",fill:"freeze",values:"7;2"}),e.jsx("animate",{attributeName:"height",begin:"0.8s",dur:"0.6s",fill:"freeze",values:"0;5"})]})]})]})}const c="development"===process.env.NODE_ENV,d=c?n.lazy((()=>import("@tanstack/router-devtools").then((e=>({default:e.TanStackRouterDevtoolsPanel}))))):()=>null,u=c?n.lazy((()=>import("@tanstack/react-query-devtools").then((e=>({default:e.ReactQueryDevtoolsPanel}))))):()=>null,f={opened:{opacity:1,y:0,transition:{type:"spring",bounce:0,duration:.2}},closed:{opacity:0,y:"50%"}};exports.default=function VefDevAssistant(){const[t,c]=n.useState(null),h=n.useCallback((e=>{e.stopPropagation(),c((e=>"query"===e?null:"query"))}),[]),p=n.useCallback((e=>{e.stopPropagation(),c((e=>"router"===e?null:"router"))}),[]);return s.useKeyPress("esc",(()=>{t&&c(null)})),e.jsxs(e.Fragment,{children:[e.jsxs(o.VefFloatButtonGroup,{collapsable:!0,shape:"square",icon:e.jsx(o.VefIcon,{size:"huge",children:e.jsx(IconCoffee,{})}),onClick:e=>e.stopPropagation(),children:[e.jsx(o.VefFloatButton,{tip:"API调试控制台",icon:e.jsx(o.VefIcon,{children:e.jsx(i.CompassIcon,{})}),onClick:h}),e.jsx(o.VefFloatButton,{tip:"路由调试控制台",icon:e.jsx(o.VefIcon,{children:e.jsx(i.SendIcon,{})}),onClick:p})]}),e.jsxs(a.AnimatePresence,{mode:"wait",children:["query"===t&&e.jsx(a.motion.div,{animate:"opened",css:l,exit:"closed",initial:"closed",variants:f,children:e.jsx(n.Suspense,{fallback:e.jsx(o.VefLoadingPlaceholder,{}),children:e.jsx(u,{style:{height:"100%"}})})}),"router"===t&&e.jsx(a.motion.div,{animate:"opened",css:l,exit:"closed",initial:"closed",variants:f,children:e.jsx(n.Suspense,{fallback:e.jsx(o.VefLoadingPlaceholder,{}),children:e.jsx(d,{isOpen:"router"===t,setIsOpen:r.noop,style:{height:"100%"}})})})]})]})};
32
- /*! 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 */
30
+ `;function IconCoffee(props){return jsxRuntime.jsxs("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...props,children:[jsxRuntime.jsx("path",{d:"M17 14v4c0 1.66 -1.34 3 -3 3h-6c-1.66 0 -3 -1.34 -3 -3v-4Z",fill:"currentColor",fillOpacity:0,children:jsxRuntime.jsx("animate",{attributeName:"fill-opacity",begin:"0.8s",dur:"0.5s",fill:"freeze",values:"0;1"})}),jsxRuntime.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[jsxRuntime.jsx("path",{d:"M17 9v9c0 1.66 -1.34 3 -3 3h-6c-1.66 0 -3 -1.34 -3 -3v-9Z",strokeDasharray:48,strokeDashoffset:48,children:jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",dur:"0.6s",fill:"freeze",values:"48;0"})}),jsxRuntime.jsx("path",{d:"M17 9h3c0.55 0 1 0.45 1 1v3c0 0.55 -0.45 1 -1 1h-3",strokeDasharray:14,strokeDashoffset:14,children:jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",begin:"0.6s",dur:"0.2s",fill:"freeze",values:"14;0"})}),jsxRuntime.jsx("mask",{id:"lineMdCoffeeHalfEmptyFilledLoop0",children:jsxRuntime.jsx("path",{d:"M8 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4M12 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4M16 0c0 2-2 2-2 4s2 2 2 4-2 2-2 4 2 2 2 4",stroke:"#fff",children:jsxRuntime.jsx("animateMotion",{calcMode:"linear",dur:"3s",path:"M0 0v-8",repeatCount:"indefinite"})})}),jsxRuntime.jsxs("rect",{fill:"currentColor",height:0,mask:"url(#lineMdCoffeeHalfEmptyFilledLoop0)",width:24,y:7,children:[jsxRuntime.jsx("animate",{attributeName:"y",begin:"0.8s",dur:"0.6s",fill:"freeze",values:"7;2"}),jsxRuntime.jsx("animate",{attributeName:"height",begin:"0.8s",dur:"0.6s",fill:"freeze",values:"0;5"})]})]})]})}const isDev=process.env.NODE_ENV==="development",RouterDevtools=isDev?react$1.lazy(()=>import("@tanstack/router-devtools").then(mod=>({default:mod.TanStackRouterDevtoolsPanel}))):()=>null,QueryDevtools=isDev?react$1.lazy(()=>import("@tanstack/react-query-devtools").then(mod=>({default:mod.ReactQueryDevtoolsPanel}))):()=>null,variants={opened:{opacity:1,y:0,transition:{type:"spring",bounce:0,duration:.2}},closed:{opacity:0,y:"50%"}};function VefDevAssistant(){const[visibleDevtools,setVisibleDevtools]=react$1.useState(null),handleShowQueryDevtools=react$1.useCallback(event=>{event.stopPropagation(),setVisibleDevtools(visible=>visible==="query"?null:"query")},[]),handleShowRouterDevtools=react$1.useCallback(event=>{event.stopPropagation(),setVisibleDevtools(visible=>visible==="router"?null:"router")},[]);return hooks.useKeyPress("esc",()=>{visibleDevtools&&setVisibleDevtools(null)}),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(components.VefFloatButtonGroup,{collapsable:!0,shape:"square",icon:jsxRuntime.jsx(components.VefIcon,{size:"huge",children:jsxRuntime.jsx(IconCoffee,{})}),onClick:event=>event.stopPropagation(),children:[jsxRuntime.jsx(components.VefFloatButton,{tip:"API调试控制台",icon:jsxRuntime.jsx(components.VefIcon,{children:jsxRuntime.jsx(lucideReact.CompassIcon,{})}),onClick:handleShowQueryDevtools}),jsxRuntime.jsx(components.VefFloatButton,{tip:"路由调试控制台",icon:jsxRuntime.jsx(components.VefIcon,{children:jsxRuntime.jsx(lucideReact.SendIcon,{})}),onClick:handleShowRouterDevtools})]}),jsxRuntime.jsxs(react$2.AnimatePresence,{mode:"wait",children:[visibleDevtools==="query"&&jsxRuntime.jsx(react$2.motion.div,{animate:"opened",css:devtoolsContainerStyle,exit:"closed",initial:"closed",variants,children:jsxRuntime.jsx(react$1.Suspense,{fallback:jsxRuntime.jsx(components.VefLoadingPlaceholder,{}),children:jsxRuntime.jsx(QueryDevtools,{style:{height:"100%"}})})}),visibleDevtools==="router"&&jsxRuntime.jsx(react$2.motion.div,{animate:"opened",css:devtoolsContainerStyle,exit:"closed",initial:"closed",variants,children:jsxRuntime.jsx(react$1.Suspense,{fallback:jsxRuntime.jsx(components.VefLoadingPlaceholder,{}),children:jsxRuntime.jsx(RouterDevtools,{isOpen:visibleDevtools==="router",setIsOpen:shared.noop,style:{height:"100%"}})})})]})]})}exports.default=VefDevAssistant;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, 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 */
1
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. *//*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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=function VefErrorPage({error:n,info:s,reset:u}){const{reset:c}=o.useQueryErrorResetBoundary();return t.useEffect((()=>{c()}),[c]),e.jsx(r.VefError,{componentStack:s?.componentStack,error:n,reset:u})};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const jsxRuntime=require("@emotion/react/jsx-runtime"),components=require("@vef-framework/components"),core=require("@vef-framework/core"),react=require("react");function VefErrorPage({error,info,reset}){const{reset:resetQueryError}=core.useQueryErrorResetBoundary();return react.useEffect(()=>{resetQueryError()},[resetQueryError]),jsxRuntime.jsx(components.VefError,{componentStack:info?.componentStack,error,reset})}exports.default=VefErrorPage;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, 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 */
1
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. *//*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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=function VefLoginPage(a){const n=t.useRouter(),c=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 n.invalidate(),await c({to:i,replace:!0})},...a})};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const jsxRuntime=require("@emotion/react/jsx-runtime"),reactRouter=require("@tanstack/react-router"),components=require("@vef-framework/components"),constants=require("../../constants.cjs"),store=require("../../store.cjs");function VefLoginPage(props){const router=reactRouter.useRouter(),navigate=reactRouter.useNavigate(),{redirect}=reactRouter.useSearch({from:constants.LOGIN_PAGE_ROUTE});return jsxRuntime.jsx(components.VefLogin,{onLoginSuccess:async({accessToken,refreshToken})=>{store.useAppStore.setState({isAuthenticated:!0,token:Object.freeze({accessToken,refreshToken})}),await router.invalidate(),await navigate({to:redirect,replace:!0})},...props})}exports.default=VefLoginPage;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, 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 */
1
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. *//*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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=function VefNotFoundPage(){const u=t.useNavigate(),n=o.useCallback((()=>u({to:a.INDEX_PAGE_PATH,replace:!0})),[u]),{pathname:s}=t.useLocation();return e.jsx(r.VefNotFound,{uri:s,onNavigateHome:n})};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const jsxRuntime=require("@emotion/react/jsx-runtime"),reactRouter=require("@tanstack/react-router"),components=require("@vef-framework/components"),react=require("react"),constants=require("../../constants.cjs");function VefNotFoundPage(){const navigate=reactRouter.useNavigate(),handleNavigateHome=react.useCallback(()=>navigate({to:constants.INDEX_PAGE_PATH,replace:!0}),[navigate]),{pathname}=reactRouter.useLocation();return jsxRuntime.jsx(components.VefNotFound,{uri:pathname,onNavigateHome:handleNavigateHome})}exports.default=VefNotFoundPage;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, 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 */
1
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. *//*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@emotion/react/jsx-runtime"),r=require("@tanstack/react-router"),t=require("@vef-framework/core"),o=require("react");exports.default=function VefRouterProvider({router:u}){const{fetchAuthenticatedUserApi:i}=t.useApiContext(),c=o.useMemo((()=>({fetchAuthenticatedUserApi:i})),[i]);return e.jsx(r.RouterProvider,{context:c,router:u})};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const jsxRuntime=require("@emotion/react/jsx-runtime"),reactRouter=require("@tanstack/react-router"),core=require("@vef-framework/core"),react=require("react");function VefRouterProvider({router}){const{fetchAuthenticatedUserApi}=core.useApiContext(),context=react.useMemo(()=>({fetchAuthenticatedUserApi}),[fetchAuthenticatedUserApi]);return jsxRuntime.jsx(reactRouter.RouterProvider,{context,router})}exports.default=VefRouterProvider;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, 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 */
1
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. *//*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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
- /*! 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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const LOGIN_PAGE_PATH="/login",LOGIN_PAGE_ROUTE="/_common/login",INDEX_PAGE_PATH="/",INDEX_PAGE_ROUTE="/_layout",ACCESS_DENIED_PAGE_PATH="/access-denied",ACCESS_DENIED_PAGE_ROUTE="/_common/access-denied";exports.ACCESS_DENIED_PAGE_PATH=ACCESS_DENIED_PAGE_PATH,exports.ACCESS_DENIED_PAGE_ROUTE=ACCESS_DENIED_PAGE_ROUTE,exports.INDEX_PAGE_PATH=INDEX_PAGE_PATH,exports.INDEX_PAGE_ROUTE=INDEX_PAGE_ROUTE,exports.LOGIN_PAGE_PATH=LOGIN_PAGE_PATH,exports.LOGIN_PAGE_ROUTE=LOGIN_PAGE_ROUTE;/*! 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/helper.cjs CHANGED
@@ -1,3 +1 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./constants.cjs"),e=require("./store.cjs");exports.handleClientLogout=async function handleClientLogout(a,i){await i.invalidateQueries(),e.useAppStore.setState({isAuthenticated:!1},!0),await a.invalidate(),await a.navigate({to:t.LOGIN_PAGE_PATH})};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const constants=require("./constants.cjs"),store=require("./store.cjs");async function handleClientLogout(router,fetchAuthenticatedUserApi){await fetchAuthenticatedUserApi.invalidateQueries(),store.useAppStore.setState({isAuthenticated:!1},!0),await router.invalidate(),await router.navigate({to:constants.LOGIN_PAGE_PATH})}exports.handleClientLogout=handleClientLogout;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./api.cjs"),t=require("./app.cjs");require("./components/index.cjs");const r=require("./constants.cjs"),o=require("./helper.cjs"),s=require("./router.cjs");require("./routes/index.cjs");const p=require("./store.cjs"),n=require("./components/vef-access-denied-page/index.cjs"),i=require("./components/vef-app/index.cjs"),c=require("./components/vef-dev-assistant/index.cjs"),u=require("./components/vef-error-page/index.cjs"),a=require("./components/vef-login-page/index.cjs"),E=require("./components/vef-not-found-page/index.cjs"),A=require("./components/vef-router-provider/index.cjs"),d=require("./routes/access-denied.cjs"),x=require("./routes/layout.cjs"),_=require("./routes/login.cjs"),P=require("./routes/root.cjs");exports.createApiClient=e.createApiClient,exports.createApp=t.createApp,exports.ACCESS_DENIED_PAGE_PATH=r.ACCESS_DENIED_PAGE_PATH,exports.ACCESS_DENIED_PAGE_ROUTE=r.ACCESS_DENIED_PAGE_ROUTE,exports.INDEX_PAGE_PATH=r.INDEX_PAGE_PATH,exports.INDEX_PAGE_ROUTE=r.INDEX_PAGE_ROUTE,exports.LOGIN_PAGE_PATH=r.LOGIN_PAGE_PATH,exports.LOGIN_PAGE_ROUTE=r.LOGIN_PAGE_ROUTE,exports.handleClientLogout=o.handleClientLogout,exports.createRouter=s.createRouter,exports.useAppStore=p.useAppStore,exports.VefAccessDeniedPage=n.default,exports.VefApp=i.default,exports.VefDevAssistant=c.default,exports.VefErrorPage=u.default,exports.VefLoginPage=a.default,exports.VefNotFoundPage=E.default,exports.VefRouterProvider=A.default,exports.createAccessDeniedRouteOptions=d.createAccessDeniedRouteOptions,exports.createLayoutRouteOptions=x.createLayoutRouteOptions,exports.createLoginRouteOptions=_.createLoginRouteOptions,exports.createRootRoute=P.createRootRoute;
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const api=require("./api.cjs"),app=require("./app.cjs");require("./components/index.cjs");const constants=require("./constants.cjs"),helper=require("./helper.cjs"),router=require("./router.cjs");require("./routes/index.cjs");const store=require("./store.cjs"),index=require("./components/vef-access-denied-page/index.cjs"),index$1=require("./components/vef-app/index.cjs"),index$2=require("./components/vef-dev-assistant/index.cjs"),index$3=require("./components/vef-error-page/index.cjs"),index$4=require("./components/vef-login-page/index.cjs"),index$5=require("./components/vef-not-found-page/index.cjs"),index$6=require("./components/vef-router-provider/index.cjs"),accessDenied=require("./routes/access-denied.cjs"),layout=require("./routes/layout.cjs"),login=require("./routes/login.cjs"),root=require("./routes/root.cjs");exports.createApiClient=api.createApiClient,exports.createApp=app.createApp,exports.ACCESS_DENIED_PAGE_PATH=constants.ACCESS_DENIED_PAGE_PATH,exports.ACCESS_DENIED_PAGE_ROUTE=constants.ACCESS_DENIED_PAGE_ROUTE,exports.INDEX_PAGE_PATH=constants.INDEX_PAGE_PATH,exports.INDEX_PAGE_ROUTE=constants.INDEX_PAGE_ROUTE,exports.LOGIN_PAGE_PATH=constants.LOGIN_PAGE_PATH,exports.LOGIN_PAGE_ROUTE=constants.LOGIN_PAGE_ROUTE,exports.handleClientLogout=helper.handleClientLogout,exports.createRouter=router.createRouter,exports.useAppStore=store.useAppStore,exports.VefAccessDeniedPage=index.default,exports.VefApp=index$1.default,exports.VefDevAssistant=index$2.default,exports.VefErrorPage=index$3.default,exports.VefLoginPage=index$4.default,exports.VefNotFoundPage=index$5.default,exports.VefRouterProvider=index$6.default,exports.createAccessDeniedRouteOptions=accessDenied.createAccessDeniedRouteOptions,exports.createLayoutRouteOptions=layout.createLayoutRouteOptions,exports.createLoginRouteOptions=login.createLoginRouteOptions,exports.createRootRoute=root.createRootRoute;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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 createRouter({routeTree:s,history:i}){const l=e.createRouter({routeTree:s,trailingSlash:"never",caseSensitive:!0,history:"hash"===i?e.createHashHistory():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 l.subscribe("onBeforeLoad",(({pathChanged:e})=>e&&a.start())),l.subscribe("onLoad",(()=>{a.done()})),l};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const reactRouter=require("@tanstack/react-router"),components=require("@vef-framework/components"),shared=require("@vef-framework/shared"),NProgress=require("nprogress"),react=require("react"),defaultGcTime=10*60*1e3;function createRouter({routeTree,history}){const router=reactRouter.createRouter({routeTree,trailingSlash:"never",caseSensitive:!0,history:history==="hash"?reactRouter.createHashHistory():reactRouter.createBrowserHistory(),search:{strict:!0},notFoundMode:"root",defaultPendingComponent:()=>react.createElement(components.VefLoadingPlaceholder,{size:"large"}),defaultPendingMs:500,defaultPendingMinMs:300,defaultSsr:!1,defaultStructuralSharing:!0,defaultHashScrollIntoView:{behavior:"smooth",block:"start",inline:"center"},defaultPreload:"intent",defaultPreloadDelay:50,defaultPreloadGcTime:defaultGcTime,defaultGcTime,defaultOnCatch(error,errorInfo){shared.showErrorNotification(error.message||error.name,react.createElement(components.VefText,{color:"error",children:react.createElement("pre",{style:{maxHeight:"480px",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.2) transparent"},children:error.stack||errorInfo.componentStack||"No stack trace available"})}))}});return router.subscribe("onBeforeLoad",({pathChanged})=>pathChanged&&NProgress.start()),router.subscribe("onLoad",()=>{NProgress.done()}),router}exports.createRouter=createRouter;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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 createAccessDeniedRouteOptions(){return{component:e.default}};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("../components/index.cjs");const index=require("../components/vef-access-denied-page/index.cjs");function createAccessDeniedRouteOptions(){return{component:index.default}}exports.createAccessDeniedRouteOptions=createAccessDeniedRouteOptions;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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
- /*! 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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const accessDenied=require("./access-denied.cjs"),layout=require("./layout.cjs"),login=require("./login.cjs"),root=require("./root.cjs");exports.createAccessDeniedRouteOptions=accessDenied.createAccessDeniedRouteOptions,exports.createLayoutRouteOptions=layout.createLayoutRouteOptions,exports.createLoginRouteOptions=login.createLoginRouteOptions,exports.createRootRoute=root.createRootRoute;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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"),o=require("@vef-framework/core"),a=require("@vef-framework/shared"),n=require("lucide-react"),s=require("react"),u=require("../constants.cjs"),i=require("../helper.cjs"),c=require("../store.cjs"),l={key:u.INDEX_PAGE_PATH,label:e.jsx(r.VefIcon,{children:e.jsx(n.HomeIcon,{})})};exports.createLayoutRouteOptions=function createLayoutRouteOptions({title:n,logo:p,getUserDescription:m}){return{beforeLoad:({location:e})=>{const{isAuthenticated:r,routeParentMenusMappings:o}=c.useAppStore.getState();if(!r)throw t.redirect({to:u.LOGIN_PAGE_PATH,search:{redirect:e.href}});if(o&&!o.has(e.pathname))throw t.redirect({to:u.ACCESS_DENIED_PAGE_PATH,replace:!0})},loader:async({context:e,location:r})=>{const{fetchAuthenticatedUserApi:o}=e,{menus:n,permissions:s,...i}=await o.fetchQuery(),l=Object.freeze(a.buildRouteParentMenusMappings(n));if(c.useAppStore.setState({user:Object.freeze(i),menus:Object.freeze(n),permissions:Object.freeze(new Set(s)),routeParentMenusMappings:l}),!l.has(r.pathname))throw t.redirect({to:u.ACCESS_DENIED_PAGE_PATH,replace:!0})},pendingComponent:()=>e.jsx(r.VefLoadingPlaceholder,{size:"large",tip:"系统加载中,请稍后..."}),component:function LayoutComponent(){const a=t.useRouter(),u=t.useNavigate(),{pathname:d}=t.useLocation(),[f,h,g]=c.useAppStore((e=>[e.menus,e.user,e.routeParentMenusMappings])),A=g?.get(d)?.[1].map((e=>e.key)),b=s.useMemo((()=>{const e=g?.get(d);if(!e)return[];const[t,r]=e;return[l,...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}]}),[d,g]),{logoutApi:y,fetchAuthenticatedUserApi:j}=o.useApiContext(),{mutate:M}=y.useMutation(),P=s.useCallback((async()=>{await M(),await i.handleClientLogout(a,j)}),[M,a,j]),k=s.useCallback((e=>{u({to:e})}),[u]);return e.jsx(r.VefLayout,{activeMenuKey:d,breadcrumbItems:b,defaultOpenedMenuKeys:A,logo:p,menuItems:f,title:n,userAvatar:h?.avatar,userDescription:m?.(h),userGender:h?.gender,userName:h?.name,onActiveMenuKeyChange:k,onBreadcrumbClick:k,onLogout:P,children:e.jsx(t.Outlet,{})})},staleTime:1/0,gcTime:0,shouldReload:!1}};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jsxRuntime=require("@emotion/react/jsx-runtime"),reactRouter=require("@tanstack/react-router"),components=require("@vef-framework/components"),core=require("@vef-framework/core"),shared=require("@vef-framework/shared"),lucideReact=require("lucide-react"),react=require("react"),constants=require("../constants.cjs"),helper=require("../helper.cjs"),store=require("../store.cjs"),indexBreadcrumbItem={key:constants.INDEX_PAGE_PATH,label:jsxRuntime.jsx(components.VefIcon,{children:jsxRuntime.jsx(lucideReact.HomeIcon,{})})};function createLayoutRouteOptions({title,logo,getUserDescription}){function LayoutComponent(){const router=reactRouter.useRouter(),navigate=reactRouter.useNavigate(),{pathname}=reactRouter.useLocation(),[menus,user,routeParentMenusMappings]=store.useAppStore(state=>[state.menus,state.user,state.routeParentMenusMappings]),defaultOpenedMenuKeys=routeParentMenusMappings?.get(pathname)?.[1].map(it=>it.key),breadcrumbItems=react.useMemo(()=>{const mapping=routeParentMenusMappings?.get(pathname);if(!mapping)return[];const[currentMenu,parentMenus]=mapping;return[indexBreadcrumbItem,...parentMenus.map(menu=>({key:menu.key,label:menu.label,dropdownItems:menu.children.filter(child=>child.type!=="divider").map(child=>({key:child.key,label:child.label}))})),{label:currentMenu.label}]},[pathname,routeParentMenusMappings]),{logoutApi,fetchAuthenticatedUserApi}=core.useApiContext(),{mutate:logout}=logoutApi.useMutation(),handleLogout=react.useCallback(async()=>{await logout(),await helper.handleClientLogout(router,fetchAuthenticatedUserApi)},[logout,router,fetchAuthenticatedUserApi]),handleMenuSwitch=react.useCallback(menuKey=>{navigate({to:menuKey})},[navigate]);return jsxRuntime.jsx(components.VefLayout,{activeMenuKey:pathname,breadcrumbItems,defaultOpenedMenuKeys,logo,menuItems:menus,title,userAvatar:user?.avatar,userDescription:getUserDescription?.(user),userGender:user?.gender,userName:user?.name,onActiveMenuKeyChange:handleMenuSwitch,onBreadcrumbClick:handleMenuSwitch,onLogout:handleLogout,children:jsxRuntime.jsx(reactRouter.Outlet,{})})}return{beforeLoad:({location})=>{const{isAuthenticated,routeParentMenusMappings}=store.useAppStore.getState();if(!isAuthenticated)throw reactRouter.redirect({to:constants.LOGIN_PAGE_PATH,search:{redirect:location.href}});if(routeParentMenusMappings&&!routeParentMenusMappings.has(location.pathname))throw reactRouter.redirect({to:constants.ACCESS_DENIED_PAGE_PATH,replace:!0})},loader:async({context,location})=>{const{fetchAuthenticatedUserApi}=context,{menus,permissions,...user}=await fetchAuthenticatedUserApi.fetchQuery(),routeParentMenusMappings=Object.freeze(shared.buildRouteParentMenusMappings(menus));if(store.useAppStore.setState({user:Object.freeze(user),menus:Object.freeze(menus),permissions:Object.freeze(new Set(permissions)),routeParentMenusMappings}),!routeParentMenusMappings.has(location.pathname))throw reactRouter.redirect({to:constants.ACCESS_DENIED_PAGE_PATH,replace:!0})},pendingComponent:()=>jsxRuntime.jsx(components.VefLoadingPlaceholder,{size:"large",tip:"系统加载中,请稍后..."}),component:LayoutComponent,staleTime:1/0,gcTime:0,shouldReload:!1}}exports.createLayoutRouteOptions=createLayoutRouteOptions;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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 createLoginRouteOptions(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
- /*! 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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jsxRuntime=require("@emotion/react/jsx-runtime"),reactRouter=require("@tanstack/react-router"),shared=require("@vef-framework/shared");require("../components/index.cjs");const constants=require("../constants.cjs"),store=require("../store.cjs"),index=require("../components/vef-login-page/index.cjs");function createLoginRouteOptions(props){return{validateSearch:shared.z.object({redirect:shared.z.string().optional().default(constants.INDEX_PAGE_PATH).catch(constants.INDEX_PAGE_PATH)}),beforeLoad:({search})=>{if(store.useAppStore.getState().isAuthenticated){const{redirect:redirectPath}=search;throw reactRouter.redirect({to:redirectPath,replace:!0})}},component:()=>jsxRuntime.jsx(index.default,{...props})}}exports.createLoginRouteOptions=createLoginRouteOptions;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
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-not-found-page/index.cjs"),n=require("../components/vef-error-page/index.cjs"),r=require("../components/vef-dev-assistant/index.cjs");exports.createRootRoute=function createRootRoute(){return t.createRootRouteWithContext()({component:()=>e.jsxs(e.Fragment,{children:[e.jsx(t.Outlet,{}),"development"===process.env.NODE_ENV&&e.jsx(r.default,{})]}),errorComponent:n.default,notFoundComponent:o.default,ssr:!1})};
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const jsxRuntime=require("@emotion/react/jsx-runtime"),reactRouter=require("@tanstack/react-router");require("../components/index.cjs");const index=require("../components/vef-not-found-page/index.cjs"),index$1=require("../components/vef-error-page/index.cjs"),index$2=require("../components/vef-dev-assistant/index.cjs");function createRootRoute(){return reactRouter.createRootRouteWithContext()({component:()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactRouter.Outlet,{}),process.env.NODE_ENV==="development"&&jsxRuntime.jsx(index$2.default,{})]}),errorComponent:index$1.default,notFoundComponent:index.default,ssr:!1})}exports.createRootRoute=createRootRoute;/*! 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 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.320Z, made by Venus. */
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@vef-framework/shared").createStore((()=>({isAuthenticated:!1})),{name:"APP",storage:"session",selector:e=>({isAuthenticated:e.isAuthenticated,token:e.token})});exports.useAppStore=e;
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
+ "use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:58.117Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const shared=require("@vef-framework/shared"),useAppStore=shared.createStore(()=>({isAuthenticated:!1}),{name:"APP",storage:"session",selector:state=>({isAuthenticated:state.isAuthenticated,token:state.token})});exports.useAppStore=useAppStore;/*! 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.100",
4
+ "version": "1.0.102",
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.67.1",
43
43
  "@tanstack/router-devtools": "^1.112.18",
44
- "@vef-framework/components": "1.0.100",
45
- "@vef-framework/core": "1.0.100",
46
- "@vef-framework/hooks": "1.0.100",
47
- "@vef-framework/shared": "1.0.100",
44
+ "@vef-framework/components": "1.0.102",
45
+ "@vef-framework/core": "1.0.102",
46
+ "@vef-framework/hooks": "1.0.102",
47
+ "@vef-framework/shared": "1.0.102",
48
48
  "lucide-react": "0.477.0",
49
49
  "motion": "12.4.10",
50
50
  "nprogress": "^0.2.0"