@vef-framework/starter 1.0.101 → 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 -15
  2. package/es/app.js +1 -25
  3. package/es/components/index.js +1 -9
  4. package/es/components/vef-access-denied-page/index.js +1 -23
  5. package/es/components/vef-app/index.js +1 -15
  6. package/es/components/vef-dev-assistant/index.js +2 -127
  7. package/es/components/vef-error-page/index.js +1 -20
  8. package/es/components/vef-login-page/index.js +1 -37
  9. package/es/components/vef-not-found-page/index.js +1 -22
  10. package/es/components/vef-router-provider/index.js +1 -18
  11. package/es/constants.js +1 -10
  12. package/es/helper.js +1 -20
  13. package/es/index.js +1 -21
  14. package/es/router.js +1 -70
  15. package/es/routes/access-denied.js +1 -12
  16. package/es/routes/index.js +1 -6
  17. package/es/routes/layout.js +1 -134
  18. package/es/routes/login.js +1 -29
  19. package/es/routes/root.js +1 -22
  20. package/es/store.js +1 -19
  21. package/lib/api.cjs +1 -19
  22. package/lib/app.cjs +1 -29
  23. package/lib/components/index.cjs +1 -23
  24. package/lib/components/vef-access-denied-page/index.cjs +1 -27
  25. package/lib/components/vef-access-denied-page/props.cjs +1 -5
  26. package/lib/components/vef-app/index.cjs +1 -19
  27. package/lib/components/vef-app/props.cjs +1 -5
  28. package/lib/components/vef-dev-assistant/index.cjs +2 -131
  29. package/lib/components/vef-dev-assistant/props.cjs +1 -5
  30. package/lib/components/vef-error-page/index.cjs +1 -24
  31. package/lib/components/vef-error-page/props.cjs +1 -5
  32. package/lib/components/vef-login-page/index.cjs +1 -41
  33. package/lib/components/vef-login-page/props.cjs +1 -5
  34. package/lib/components/vef-not-found-page/index.cjs +1 -26
  35. package/lib/components/vef-not-found-page/props.cjs +1 -5
  36. package/lib/components/vef-router-provider/index.cjs +1 -22
  37. package/lib/components/vef-router-provider/props.cjs +1 -5
  38. package/lib/constants.cjs +1 -19
  39. package/lib/helper.cjs +1 -24
  40. package/lib/index.cjs +1 -50
  41. package/lib/router.cjs +1 -74
  42. package/lib/routes/access-denied.cjs +1 -16
  43. package/lib/routes/index.cjs +1 -17
  44. package/lib/routes/layout.cjs +1 -138
  45. package/lib/routes/login.cjs +1 -33
  46. package/lib/routes/root.cjs +1 -26
  47. package/lib/store.cjs +1 -23
  48. package/package.json +5 -5
@@ -1,134 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- import { jsx } from '@emotion/react/jsx-runtime';
3
- import { useRouter, useNavigate, useLocation, Outlet, redirect } from '@tanstack/react-router';
4
- import { VefIcon, VefLayout, VefLoadingPlaceholder } from '@vef-framework/components';
5
- import { useApiContext } from '@vef-framework/core';
6
- import { buildRouteParentMenusMappings } from '@vef-framework/shared';
7
- import { HomeIcon } from 'lucide-react';
8
- import { useMemo, useCallback } from 'react';
9
- import { INDEX_PAGE_PATH, ACCESS_DENIED_PAGE_PATH, LOGIN_PAGE_PATH } from '../constants.js';
10
- import { handleClientLogout } from '../helper.js';
11
- import { useAppStore } from '../store.js';
12
-
13
- const indexBreadcrumbItem = {
14
- key: INDEX_PAGE_PATH,
15
- label: /* @__PURE__ */ jsx(VefIcon, { children: /* @__PURE__ */ jsx(HomeIcon, {}) })
16
- };
17
- function createLayoutRouteOptions({
18
- title,
19
- logo,
20
- getUserDescription
21
- }) {
22
- function LayoutComponent() {
23
- const router = useRouter();
24
- const navigate = useNavigate();
25
- const { pathname } = useLocation();
26
- const [menus, user, routeParentMenusMappings] = useAppStore((state) => [state.menus, state.user, state.routeParentMenusMappings]);
27
- const defaultOpenedMenuKeys = routeParentMenusMappings?.get(pathname)?.[1].map((it) => it.key);
28
- const breadcrumbItems = useMemo(() => {
29
- const mapping = routeParentMenusMappings?.get(pathname);
30
- if (!mapping) {
31
- return [];
32
- }
33
- const [currentMenu, parentMenus] = mapping;
34
- return [
35
- indexBreadcrumbItem,
36
- ...parentMenus.map((menu) => ({
37
- key: menu.key,
38
- label: menu.label,
39
- dropdownItems: menu.children.filter((child) => child.type !== "divider").map((child) => ({
40
- key: child.key,
41
- label: child.label
42
- }))
43
- })),
44
- {
45
- label: currentMenu.label
46
- }
47
- ];
48
- }, [pathname, routeParentMenusMappings]);
49
- const { logoutApi, fetchAuthenticatedUserApi } = useApiContext();
50
- const { mutate: logout } = logoutApi.useMutation();
51
- const handleLogout = useCallback(async () => {
52
- await logout();
53
- await handleClientLogout(router, fetchAuthenticatedUserApi);
54
- }, [logout, router, fetchAuthenticatedUserApi]);
55
- const handleMenuSwitch = useCallback((menuKey) => {
56
- navigate({
57
- to: menuKey
58
- });
59
- }, [navigate]);
60
- return /* @__PURE__ */ jsx(
61
- VefLayout,
62
- {
63
- activeMenuKey: pathname,
64
- breadcrumbItems,
65
- defaultOpenedMenuKeys,
66
- logo,
67
- menuItems: menus,
68
- title,
69
- userAvatar: user?.avatar,
70
- userDescription: getUserDescription?.(user),
71
- userGender: user?.gender,
72
- userName: user?.name,
73
- onActiveMenuKeyChange: handleMenuSwitch,
74
- onBreadcrumbClick: handleMenuSwitch,
75
- onLogout: handleLogout,
76
- children: /* @__PURE__ */ jsx(Outlet, {})
77
- }
78
- );
79
- }
80
- return {
81
- beforeLoad: ({ location }) => {
82
- const { isAuthenticated, routeParentMenusMappings } = useAppStore.getState();
83
- if (!isAuthenticated) {
84
- throw redirect({
85
- to: LOGIN_PAGE_PATH,
86
- search: {
87
- redirect: location.href
88
- }
89
- });
90
- }
91
- if (routeParentMenusMappings && !routeParentMenusMappings.has(location.pathname)) {
92
- throw redirect({
93
- to: ACCESS_DENIED_PAGE_PATH,
94
- replace: true
95
- });
96
- }
97
- },
98
- loader: async ({ context, location }) => {
99
- const { fetchAuthenticatedUserApi } = context;
100
- const {
101
- menus,
102
- permissions,
103
- ...user
104
- } = await fetchAuthenticatedUserApi.fetchQuery();
105
- const routeParentMenusMappings = Object.freeze(buildRouteParentMenusMappings(menus));
106
- useAppStore.setState({
107
- user: Object.freeze(user),
108
- menus: Object.freeze(menus),
109
- permissions: Object.freeze(new Set(permissions)),
110
- routeParentMenusMappings
111
- });
112
- if (!routeParentMenusMappings.has(location.pathname)) {
113
- throw redirect({
114
- to: ACCESS_DENIED_PAGE_PATH,
115
- replace: true
116
- });
117
- }
118
- },
119
- pendingComponent: () => /* @__PURE__ */ jsx(
120
- VefLoadingPlaceholder,
121
- {
122
- size: "large",
123
- tip: "系统加载中,请稍后..."
124
- }
125
- ),
126
- component: LayoutComponent,
127
- staleTime: Infinity,
128
- gcTime: 0,
129
- shouldReload: false
130
- };
131
- }
132
-
133
- export { createLayoutRouteOptions };
134
- /*! 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,29 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- import { jsx } from '@emotion/react/jsx-runtime';
3
- import { redirect } from '@tanstack/react-router';
4
- import { z } from '@vef-framework/shared';
5
- import '../components/index.js';
6
- import { INDEX_PAGE_PATH } from '../constants.js';
7
- import { useAppStore } from '../store.js';
8
- import VefLoginPage from '../components/vef-login-page/index.js';
9
-
10
- function createLoginRouteOptions(props) {
11
- return {
12
- validateSearch: z.object({
13
- redirect: z.string().optional().default(INDEX_PAGE_PATH).catch(INDEX_PAGE_PATH)
14
- }),
15
- beforeLoad: ({ search }) => {
16
- if (useAppStore.getState().isAuthenticated) {
17
- const { redirect: redirectPath } = search;
18
- throw redirect({
19
- to: redirectPath,
20
- replace: true
21
- });
22
- }
23
- },
24
- component: () => /* @__PURE__ */ jsx(VefLoginPage, { ...props })
25
- };
26
- }
27
-
28
- export { createLoginRouteOptions };
29
- /*! 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,22 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- import { jsxs, Fragment, jsx } from '@emotion/react/jsx-runtime';
3
- import { createRootRouteWithContext, Outlet } from '@tanstack/react-router';
4
- import '../components/index.js';
5
- import VefNotFoundPage from '../components/vef-not-found-page/index.js';
6
- import VefErrorPage from '../components/vef-error-page/index.js';
7
- import VefDevAssistant from '../components/vef-dev-assistant/index.js';
8
-
9
- function createRootRoute() {
10
- return createRootRouteWithContext()({
11
- component: () => /* @__PURE__ */ jsxs(Fragment, { children: [
12
- /* @__PURE__ */ jsx(Outlet, {}),
13
- process.env.NODE_ENV === "development" && /* @__PURE__ */ jsx(VefDevAssistant, {})
14
- ] }),
15
- errorComponent: VefErrorPage,
16
- notFoundComponent: VefNotFoundPage,
17
- ssr: false
18
- });
19
- }
20
-
21
- export { createRootRoute };
22
- /*! 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,19 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- import { createStore } from '@vef-framework/shared';
3
-
4
- const useAppStore = createStore(
5
- () => ({
6
- isAuthenticated: false
7
- }),
8
- {
9
- name: "APP",
10
- storage: "session",
11
- selector: (state) => ({
12
- isAuthenticated: state.isAuthenticated,
13
- token: state.token
14
- })
15
- }
16
- );
17
-
18
- export { useAppStore };
19
- /*! 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,19 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const core = require('@vef-framework/core');
7
- const store = require('./store.cjs');
8
-
9
- function createApiClient(options) {
10
- return core.createApiClient({
11
- ...options,
12
- getAccessToken() {
13
- return store.useAppStore.getState().token?.accessToken;
14
- }
15
- });
16
- }
17
-
18
- exports.createApiClient = createApiClient;
19
- /*! 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,29 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const react = require('react');
7
- const client = require('react-dom/client');
8
- require('./components/index.cjs');
9
- const index = require('./components/vef-app/index.cjs');
10
-
11
- function createApp() {
12
- const root = client.createRoot(
13
- document.getElementById("root"),
14
- {
15
- identifierPrefix: "vef-"
16
- }
17
- );
18
- return {
19
- render: (props) => {
20
- root.render(
21
- react.createElement(index.default, props)
22
- );
23
- },
24
- unmount: () => root.unmount()
25
- };
26
- }
27
-
28
- exports.createApp = createApp;
29
- /*! 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,23 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const index = require('./vef-access-denied-page/index.cjs');
7
- const index$1 = require('./vef-app/index.cjs');
8
- const index$2 = require('./vef-dev-assistant/index.cjs');
9
- const index$3 = require('./vef-error-page/index.cjs');
10
- const index$4 = require('./vef-login-page/index.cjs');
11
- const index$5 = require('./vef-not-found-page/index.cjs');
12
- const index$6 = require('./vef-router-provider/index.cjs');
13
-
14
-
15
-
16
- exports.VefAccessDeniedPage = index.default;
17
- exports.VefApp = index$1.default;
18
- exports.VefDevAssistant = index$2.default;
19
- exports.VefErrorPage = index$3.default;
20
- exports.VefLoginPage = index$4.default;
21
- exports.VefNotFoundPage = index$5.default;
22
- exports.VefRouterProvider = index$6.default;
23
- /*! 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,27 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
5
-
6
- const jsxRuntime = require('@emotion/react/jsx-runtime');
7
- const reactRouter = require('@tanstack/react-router');
8
- const components = require('@vef-framework/components');
9
- const react = require('react');
10
- const constants = require('../../constants.cjs');
11
-
12
- function VefAccessDeniedPage(props) {
13
- const { pathname } = reactRouter.useLocation();
14
- const { redirect } = reactRouter.useRouterState();
15
- const navigate = reactRouter.useNavigate();
16
- const handleNavigateHome = react.useCallback(
17
- () => navigate({
18
- to: constants.INDEX_PAGE_PATH,
19
- replace: true
20
- }),
21
- [navigate]
22
- );
23
- return /* @__PURE__ */ jsxRuntime.jsx(components.VefAccessDenied, { uri: redirect?._fromLocation?.pathname ?? pathname, onNavigateHome: handleNavigateHome, ...props });
24
- }
25
-
26
- exports.default = VefAccessDeniedPage;
27
- /*! 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,5 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
-
5
- /*! 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,19 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
5
-
6
- const jsxRuntime = require('@emotion/react/jsx-runtime');
7
- const components = require('@vef-framework/components');
8
- const react = require('react');
9
- const index = require('../vef-router-provider/index.cjs');
10
-
11
- function VefApp({
12
- router,
13
- ...configProviderProps
14
- }) {
15
- return /* @__PURE__ */ jsxRuntime.jsx(react.StrictMode, { children: /* @__PURE__ */ jsxRuntime.jsx(components.VefConfigProvider, { ...configProviderProps, children: /* @__PURE__ */ jsxRuntime.jsx(index.default, { router }) }) });
16
- }
17
-
18
- exports.default = VefApp;
19
- /*! 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,5 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
-
5
- /*! 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,18 +1,4 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
5
-
6
- const jsxRuntime = require('@emotion/react/jsx-runtime');
7
- const react = require('@emotion/react');
8
- const components = require('@vef-framework/components');
9
- const hooks = require('@vef-framework/hooks');
10
- const shared = require('@vef-framework/shared');
11
- const lucideReact = require('lucide-react');
12
- const react$2 = require('motion/react');
13
- const react$1 = require('react');
14
-
15
- const devtoolsContainerStyle = react.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`
16
2
  position: fixed;
17
3
  bottom: 0;
18
4
  width: 100%;
@@ -41,119 +27,4 @@ const devtoolsContainerStyle = react.css`
41
27
  box-shadow: ${shared.themeVariables.boxShadowDrawerDown};
42
28
  }
43
29
  }
44
- `;
45
- function IconCoffee(props) {
46
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...props, children: [
47
- /* @__PURE__ */ 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: /* @__PURE__ */ jsxRuntime.jsx("animate", { attributeName: "fill-opacity", begin: "0.8s", dur: "0.5s", fill: "freeze", values: "0;1" }) }),
48
- /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, children: [
49
- /* @__PURE__ */ 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: /* @__PURE__ */ jsxRuntime.jsx("animate", { attributeName: "stroke-dashoffset", dur: "0.6s", fill: "freeze", values: "48;0" }) }),
50
- /* @__PURE__ */ 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: /* @__PURE__ */ jsxRuntime.jsx("animate", { attributeName: "stroke-dashoffset", begin: "0.6s", dur: "0.2s", fill: "freeze", values: "14;0" }) }),
51
- /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "lineMdCoffeeHalfEmptyFilledLoop0", children: /* @__PURE__ */ 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: /* @__PURE__ */ jsxRuntime.jsx("animateMotion", { calcMode: "linear", dur: "3s", path: "M0 0v-8", repeatCount: "indefinite" }) }) }),
52
- /* @__PURE__ */ jsxRuntime.jsxs("rect", { fill: "currentColor", height: 0, mask: "url(#lineMdCoffeeHalfEmptyFilledLoop0)", width: 24, y: 7, children: [
53
- /* @__PURE__ */ jsxRuntime.jsx("animate", { attributeName: "y", begin: "0.8s", dur: "0.6s", fill: "freeze", values: "7;2" }),
54
- /* @__PURE__ */ jsxRuntime.jsx("animate", { attributeName: "height", begin: "0.8s", dur: "0.6s", fill: "freeze", values: "0;5" })
55
- ] })
56
- ] })
57
- ] });
58
- }
59
- const isDev = process.env.NODE_ENV === "development";
60
- const RouterDevtools = isDev ? react$1.lazy(() => import('@tanstack/router-devtools').then((mod) => ({
61
- default: mod.TanStackRouterDevtoolsPanel
62
- }))) : () => null;
63
- const QueryDevtools = isDev ? react$1.lazy(() => import('@tanstack/react-query-devtools').then((mod) => ({
64
- default: mod.ReactQueryDevtoolsPanel
65
- }))) : () => null;
66
- const variants = {
67
- opened: {
68
- opacity: 1,
69
- y: 0,
70
- transition: {
71
- type: "spring",
72
- bounce: 0,
73
- duration: 0.2
74
- }
75
- },
76
- closed: {
77
- opacity: 0,
78
- y: "50%"
79
- }
80
- };
81
- function VefDevAssistant() {
82
- const [visibleDevtools, setVisibleDevtools] = react$1.useState(null);
83
- const handleShowQueryDevtools = react$1.useCallback((event) => {
84
- event.stopPropagation();
85
- setVisibleDevtools((visible) => visible === "query" ? null : "query");
86
- }, []);
87
- const handleShowRouterDevtools = react$1.useCallback((event) => {
88
- event.stopPropagation();
89
- setVisibleDevtools((visible) => visible === "router" ? null : "router");
90
- }, []);
91
- hooks.useKeyPress("esc", () => {
92
- if (visibleDevtools) {
93
- setVisibleDevtools(null);
94
- }
95
- });
96
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
97
- /* @__PURE__ */ jsxRuntime.jsxs(
98
- components.VefFloatButtonGroup,
99
- {
100
- collapsable: true,
101
- shape: "square",
102
- icon: /* @__PURE__ */ jsxRuntime.jsx(components.VefIcon, { size: "huge", children: /* @__PURE__ */ jsxRuntime.jsx(IconCoffee, {}) }),
103
- onClick: (event) => event.stopPropagation(),
104
- children: [
105
- /* @__PURE__ */ jsxRuntime.jsx(
106
- components.VefFloatButton,
107
- {
108
- tip: "API调试控制台",
109
- icon: /* @__PURE__ */ jsxRuntime.jsx(components.VefIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CompassIcon, {}) }),
110
- onClick: handleShowQueryDevtools
111
- }
112
- ),
113
- /* @__PURE__ */ jsxRuntime.jsx(
114
- components.VefFloatButton,
115
- {
116
- tip: "路由调试控制台",
117
- icon: /* @__PURE__ */ jsxRuntime.jsx(components.VefIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SendIcon, {}) }),
118
- onClick: handleShowRouterDevtools
119
- }
120
- )
121
- ]
122
- }
123
- ),
124
- /* @__PURE__ */ jsxRuntime.jsxs(react$2.AnimatePresence, { mode: "wait", children: [
125
- visibleDevtools === "query" && /* @__PURE__ */ jsxRuntime.jsx(
126
- react$2.motion.div,
127
- {
128
- animate: "opened",
129
- css: devtoolsContainerStyle,
130
- exit: "closed",
131
- initial: "closed",
132
- variants,
133
- children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(components.VefLoadingPlaceholder, {}), children: /* @__PURE__ */ jsxRuntime.jsx(QueryDevtools, { style: { height: "100%" } }) })
134
- }
135
- ),
136
- visibleDevtools === "router" && /* @__PURE__ */ jsxRuntime.jsx(
137
- react$2.motion.div,
138
- {
139
- animate: "opened",
140
- css: devtoolsContainerStyle,
141
- exit: "closed",
142
- initial: "closed",
143
- variants,
144
- children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(components.VefLoadingPlaceholder, {}), children: /* @__PURE__ */ jsxRuntime.jsx(
145
- RouterDevtools,
146
- {
147
- isOpen: visibleDevtools === "router",
148
- setIsOpen: shared.noop,
149
- style: { height: "100%" }
150
- }
151
- ) })
152
- }
153
- )
154
- ] })
155
- ] });
156
- }
157
-
158
- exports.default = VefDevAssistant;
159
- /*! 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,5 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
-
5
- /*! 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,24 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
5
-
6
- const jsxRuntime = require('@emotion/react/jsx-runtime');
7
- const components = require('@vef-framework/components');
8
- const core = require('@vef-framework/core');
9
- const react = require('react');
10
-
11
- function VefErrorPage({
12
- error,
13
- info,
14
- reset
15
- }) {
16
- const { reset: resetQueryError } = core.useQueryErrorResetBoundary();
17
- react.useEffect(() => {
18
- resetQueryError();
19
- }, [resetQueryError]);
20
- return /* @__PURE__ */ jsxRuntime.jsx(components.VefError, { componentStack: info?.componentStack, error, reset });
21
- }
22
-
23
- exports.default = VefErrorPage;
24
- /*! 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,5 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
-
5
- /*! 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,41 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
5
-
6
- const jsxRuntime = require('@emotion/react/jsx-runtime');
7
- const reactRouter = require('@tanstack/react-router');
8
- const components = require('@vef-framework/components');
9
- const constants = require('../../constants.cjs');
10
- const store = require('../../store.cjs');
11
-
12
- function VefLoginPage(props) {
13
- const router = reactRouter.useRouter();
14
- const navigate = reactRouter.useNavigate();
15
- const { redirect } = reactRouter.useSearch({
16
- from: constants.LOGIN_PAGE_ROUTE
17
- });
18
- return /* @__PURE__ */ jsxRuntime.jsx(
19
- components.VefLogin,
20
- {
21
- onLoginSuccess: async ({ accessToken, refreshToken }) => {
22
- store.useAppStore.setState({
23
- isAuthenticated: true,
24
- token: Object.freeze({
25
- accessToken,
26
- refreshToken
27
- })
28
- });
29
- await router.invalidate();
30
- await navigate({
31
- to: redirect,
32
- replace: true
33
- });
34
- },
35
- ...props
36
- }
37
- );
38
- }
39
-
40
- exports.default = VefLoginPage;
41
- /*! 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,5 +1 @@
1
- /*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.197Z, made by Venus. */
2
- 'use strict';
3
-
4
-
5
- /*! 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 */