@vef-framework-react/starter 2.9.0 → 2.11.0

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 (173) hide show
  1. package/dist/cjs/components/access-denied/index.cjs +1 -1
  2. package/dist/cjs/components/app/index.cjs +1 -1
  3. package/dist/cjs/components/base-layout/use-base-layout.cjs +1 -1
  4. package/dist/cjs/components/error/index.cjs +1 -1
  5. package/dist/cjs/components/index.cjs +1 -1
  6. package/dist/cjs/components/layout/components/footer.cjs +1 -1
  7. package/dist/cjs/components/layout/components/header/app-switcher.cjs +1 -1
  8. package/dist/cjs/components/layout/components/header/color-scheme.cjs +1 -1
  9. package/dist/cjs/components/layout/components/header/fullscreen.cjs +1 -1
  10. package/dist/cjs/components/layout/components/header/index.cjs +1 -1
  11. package/dist/cjs/components/layout/components/header/menu-burger.cjs +1 -1
  12. package/dist/cjs/components/layout/components/header/search.cjs +1 -1
  13. package/dist/cjs/components/layout/components/header/theme-config.cjs +1 -1
  14. package/dist/cjs/components/layout/components/header/user-avatar.cjs +1 -1
  15. package/dist/cjs/components/layout/components/logo.cjs +1 -1
  16. package/dist/cjs/components/layout/components/menu.cjs +1 -1
  17. package/dist/cjs/components/layout/components/search/index.cjs +1 -1
  18. package/dist/cjs/components/layout/components/search/keyboard-help.cjs +1 -1
  19. package/dist/cjs/components/layout/components/search/keyboard.cjs +1 -1
  20. package/dist/cjs/components/layout/components/search/search-result-item.cjs +1 -1
  21. package/dist/cjs/components/layout/components/search/search-result.cjs +1 -1
  22. package/dist/cjs/components/layout/components/sidebar.cjs +1 -1
  23. package/dist/cjs/components/layout/components/tabs/context-menu.cjs +1 -1
  24. package/dist/cjs/components/layout/components/tabs/index.cjs +1 -1
  25. package/dist/cjs/components/layout/components/tabs/main-content-maximum.cjs +1 -1
  26. package/dist/cjs/components/layout/components/tabs/reload.cjs +1 -1
  27. package/dist/cjs/components/layout/components/tabs/tab-item.cjs +1 -1
  28. package/dist/cjs/components/layout/components/tabs/tab-list.cjs +1 -1
  29. package/dist/cjs/components/layout/components/tabs/tabs-container.cjs +1 -1
  30. package/dist/cjs/components/layout/components/theme-config/color-scheme-switcher.cjs +1 -1
  31. package/dist/cjs/components/layout/components/theme-config/color-scheme.cjs +1 -1
  32. package/dist/cjs/components/layout/components/theme-config/config-item.cjs +1 -1
  33. package/dist/cjs/components/layout/components/theme-config/index.cjs +1 -1
  34. package/dist/cjs/components/layout/components/theme-config/menu-layout-card.cjs +1 -1
  35. package/dist/cjs/components/layout/components/theme-config/menu-layout.cjs +1 -1
  36. package/dist/cjs/components/layout/components/theme-config/operations.cjs +1 -1
  37. package/dist/cjs/components/layout/components/theme-config/theme-color-picker.cjs +1 -1
  38. package/dist/cjs/components/layout/components/theme-config/theme-colors.cjs +1 -1
  39. package/dist/cjs/components/layout/hooks/use-menu-navigate.cjs +1 -1
  40. package/dist/cjs/components/layout/hooks/use-tab-navigate.cjs +1 -1
  41. package/dist/cjs/components/layout/index.cjs +1 -1
  42. package/dist/cjs/components/login/icon-login.cjs +1 -1
  43. package/dist/cjs/components/login/index.cjs +1 -1
  44. package/dist/cjs/components/login/password-change-challenge.cjs +1 -0
  45. package/dist/cjs/components/n-progress/components/bar.cjs +8 -8
  46. package/dist/cjs/components/n-progress/index.cjs +1 -1
  47. package/dist/cjs/components/not-found/index.cjs +1 -1
  48. package/dist/cjs/components/router-provider/index.cjs +1 -1
  49. package/dist/cjs/components/theme-config-provider/index.cjs +1 -1
  50. package/dist/cjs/helpers/app-version.cjs +1 -1
  51. package/dist/cjs/helpers/app.cjs +1 -1
  52. package/dist/cjs/helpers/index.cjs +1 -1
  53. package/dist/cjs/helpers/router.cjs +1 -1
  54. package/dist/cjs/hooks/use-active-menu-key.cjs +1 -1
  55. package/dist/cjs/hooks/use-route-full-path.cjs +1 -1
  56. package/dist/cjs/index.cjs +1 -1
  57. package/dist/cjs/routes/layout.cjs +1 -1
  58. package/dist/cjs/routes/login.cjs +1 -1
  59. package/dist/es/components/access-denied/access-denied-icon.js +1 -1
  60. package/dist/es/components/access-denied/index.js +18 -18
  61. package/dist/es/components/app/index.js +8 -8
  62. package/dist/es/components/base-layout/index.js +1 -1
  63. package/dist/es/components/base-layout/styles.js +1 -1
  64. package/dist/es/components/base-layout/use-base-layout.js +8 -8
  65. package/dist/es/components/error/error-icon.js +1 -1
  66. package/dist/es/components/error/index.js +27 -27
  67. package/dist/es/components/index.js +5 -4
  68. package/dist/es/components/layout/components/contour-pattern.js +1 -1
  69. package/dist/es/components/layout/components/footer.js +2 -2
  70. package/dist/es/components/layout/components/header/app-switcher.js +39 -39
  71. package/dist/es/components/layout/components/header/boy-icon.js +1 -1
  72. package/dist/es/components/layout/components/header/color-scheme.js +7 -7
  73. package/dist/es/components/layout/components/header/fullscreen.js +8 -8
  74. package/dist/es/components/layout/components/header/girl-icon.js +1 -1
  75. package/dist/es/components/layout/components/header/header-pattern.js +1 -1
  76. package/dist/es/components/layout/components/header/index.js +22 -22
  77. package/dist/es/components/layout/components/header/menu-burger.js +5 -5
  78. package/dist/es/components/layout/components/header/menu-fold-left-icon.js +1 -1
  79. package/dist/es/components/layout/components/header/menu-unfold-left-icon.js +1 -1
  80. package/dist/es/components/layout/components/header/mixed-menu.js +1 -1
  81. package/dist/es/components/layout/components/header/search.js +5 -5
  82. package/dist/es/components/layout/components/header/theme-config.js +5 -5
  83. package/dist/es/components/layout/components/header/user-avatar.js +29 -29
  84. package/dist/es/components/layout/components/index.js +1 -1
  85. package/dist/es/components/layout/components/logo.js +15 -15
  86. package/dist/es/components/layout/components/menu.js +10 -10
  87. package/dist/es/components/layout/components/search/index.js +22 -22
  88. package/dist/es/components/layout/components/search/keyboard-arrow-down-icon.js +1 -1
  89. package/dist/es/components/layout/components/search/keyboard-arrow-up-icon.js +1 -1
  90. package/dist/es/components/layout/components/search/keyboard-control-icon.js +1 -1
  91. package/dist/es/components/layout/components/search/keyboard-esc-icon.js +1 -1
  92. package/dist/es/components/layout/components/search/keyboard-help.js +19 -19
  93. package/dist/es/components/layout/components/search/keyboard-return-icon.js +1 -1
  94. package/dist/es/components/layout/components/search/keyboard-shift-icon.js +1 -1
  95. package/dist/es/components/layout/components/search/keyboard.js +8 -8
  96. package/dist/es/components/layout/components/search/letter-s-icon.js +1 -1
  97. package/dist/es/components/layout/components/search/search-result-item.js +24 -24
  98. package/dist/es/components/layout/components/search/search-result.js +21 -21
  99. package/dist/es/components/layout/components/sidebar.js +8 -8
  100. package/dist/es/components/layout/components/tabs/context-menu.js +13 -13
  101. package/dist/es/components/layout/components/tabs/index.js +10 -10
  102. package/dist/es/components/layout/components/tabs/main-content-maximum.js +5 -5
  103. package/dist/es/components/layout/components/tabs/reload.js +6 -6
  104. package/dist/es/components/layout/components/tabs/tab-item.js +26 -26
  105. package/dist/es/components/layout/components/tabs/tab-list.js +13 -13
  106. package/dist/es/components/layout/components/tabs/tabs-container.js +18 -18
  107. package/dist/es/components/layout/components/theme-config/color-scheme-switcher.js +21 -21
  108. package/dist/es/components/layout/components/theme-config/color-scheme.js +15 -15
  109. package/dist/es/components/layout/components/theme-config/config-item.js +8 -8
  110. package/dist/es/components/layout/components/theme-config/index.js +18 -18
  111. package/dist/es/components/layout/components/theme-config/menu-layout-card.js +21 -21
  112. package/dist/es/components/layout/components/theme-config/menu-layout.js +24 -24
  113. package/dist/es/components/layout/components/theme-config/operations.js +6 -6
  114. package/dist/es/components/layout/components/theme-config/theme-color-picker.js +6 -6
  115. package/dist/es/components/layout/components/theme-config/theme-colors.js +9 -9
  116. package/dist/es/components/layout/hooks/index.js +1 -1
  117. package/dist/es/components/layout/hooks/use-color-scheme-updater.js +1 -1
  118. package/dist/es/components/layout/hooks/use-menu-navigate.js +9 -9
  119. package/dist/es/components/layout/hooks/use-mixed-menu.js +1 -1
  120. package/dist/es/components/layout/hooks/use-tab-navigate.js +11 -11
  121. package/dist/es/components/layout/index.js +14 -14
  122. package/dist/es/components/layout/store.js +1 -1
  123. package/dist/es/components/layout/styles.js +1 -1
  124. package/dist/es/components/login/icon-login.js +154 -154
  125. package/dist/es/components/login/index.js +119 -118
  126. package/dist/es/components/login/password-change-challenge.js +104 -0
  127. package/dist/es/components/login/styles.js +1 -1
  128. package/dist/es/components/login/welcome-messages.js +1 -1
  129. package/dist/es/components/n-progress/components/bar.js +15 -15
  130. package/dist/es/components/n-progress/components/container.js +1 -1
  131. package/dist/es/components/n-progress/components/index.js +1 -1
  132. package/dist/es/components/n-progress/event.js +1 -1
  133. package/dist/es/components/n-progress/index.js +6 -6
  134. package/dist/es/components/not-found/index.js +18 -18
  135. package/dist/es/components/not-found/not-found-icon.js +1 -1
  136. package/dist/es/components/router-provider/context.js +1 -1
  137. package/dist/es/components/router-provider/index.js +9 -9
  138. package/dist/es/components/theme-config-provider/global-style.js +1 -1
  139. package/dist/es/components/theme-config-provider/index.js +4 -4
  140. package/dist/es/components/theme-config-provider/use-color-mode-effect.js +1 -1
  141. package/dist/es/components/theme-config-provider/use-theme-config.js +1 -1
  142. package/dist/es/constants/event.js +1 -1
  143. package/dist/es/constants/index.js +1 -1
  144. package/dist/es/constants/router.js +1 -1
  145. package/dist/es/constants/storage.js +1 -1
  146. package/dist/es/helpers/api.js +1 -1
  147. package/dist/es/helpers/app-version.js +59 -59
  148. package/dist/es/helpers/app.js +10 -10
  149. package/dist/es/helpers/auth.js +1 -1
  150. package/dist/es/helpers/event.js +1 -1
  151. package/dist/es/helpers/index.js +5 -5
  152. package/dist/es/helpers/menu-key.js +1 -1
  153. package/dist/es/helpers/query.js +1 -1
  154. package/dist/es/helpers/router.js +34 -34
  155. package/dist/es/hooks/index.js +1 -1
  156. package/dist/es/hooks/use-active-menu-key.js +5 -5
  157. package/dist/es/hooks/use-route-full-path.js +5 -5
  158. package/dist/es/index.js +13 -12
  159. package/dist/es/routes/access-denied.js +1 -1
  160. package/dist/es/routes/index.js +1 -1
  161. package/dist/es/routes/layout.js +16 -16
  162. package/dist/es/routes/login.js +7 -7
  163. package/dist/es/routes/root.js +1 -1
  164. package/dist/es/stores/app.js +1 -1
  165. package/dist/es/stores/index.js +1 -1
  166. package/dist/es/stores/tab.js +1 -1
  167. package/dist/es/stores/theme.js +1 -1
  168. package/dist/types/components/index.d.ts +1 -1
  169. package/dist/types/components/login/index.d.ts +1 -0
  170. package/dist/types/components/login/password-change-challenge.d.ts +72 -0
  171. package/dist/types/index.d.ts +1 -1
  172. package/package.json +5 -5
  173. package/dist/types/helpers/menu-key.test.d.ts +0 -1
@@ -1,17 +1,17 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import { ACCESS_DENIED_ROUTE_PATH as e } from "../constants/router.js";
3
- import { useAppStore as t } from "../stores/app.js";
4
- import { useTabStore as n } from "../stores/tab.js";
5
- import { onAccessDenied as r, onUnauthenticated as i } from "./event.js";
6
- import { nProgressEventEmitter as a } from "../components/n-progress/event.js";
7
- import { Error as o } from "../components/error/index.js";
8
- import { resolveActiveMenuKey as s } from "./menu-key.js";
9
- import { NotFound as c } from "../components/not-found/index.js";
10
- import { handleClientLogout as l } from "./auth.js";
11
- import { Loader as u, showErrorNotification as d } from "@vef-framework-react/components";
12
- import { getSanitizedErrorStack as f, hashKey as p } from "@vef-framework-react/shared";
13
- import { jsx as m } from "@emotion/react/jsx-runtime";
14
- import { createBrowserHistory as h, createHashHistory as g, createRouter as _ } from "@tanstack/react-router";
3
+ import { nProgressEventEmitter as t } from "../components/n-progress/event.js";
4
+ import { useAppStore as n } from "../stores/app.js";
5
+ import { useTabStore as r } from "../stores/tab.js";
6
+ import { Error as i } from "../components/error/index.js";
7
+ import { resolveActiveMenuKey as a } from "./menu-key.js";
8
+ import { onAccessDenied as o, onUnauthenticated as s } from "./event.js";
9
+ import { handleClientLogout as c } from "./auth.js";
10
+ import { NotFound as l } from "../components/not-found/index.js";
11
+ import { jsx as u } from "@emotion/react/jsx-runtime";
12
+ import { createBrowserHistory as d, createHashHistory as f, createRouter as p } from "@tanstack/react-router";
13
+ import { Loader as m, showErrorNotification as h } from "@vef-framework-react/components";
14
+ import { getSanitizedErrorStack as g, hashKey as _ } from "@vef-framework-react/shared";
15
15
  //#region src/helpers/router.tsx
16
16
  function v() {
17
17
  return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
@@ -25,21 +25,21 @@ var y = 600 * 1e3, b = process.env.NODE_ENV === "production" ? {
25
25
  toString: v
26
26
  };
27
27
  function x({ history: v, routeTree: x, context: S }) {
28
- let C = _({
28
+ let C = p({
29
29
  routeTree: x,
30
30
  context: S,
31
31
  trailingSlash: "never",
32
32
  caseSensitive: !0,
33
- history: v === "hash" ? g() : h(),
33
+ history: v === "hash" ? f() : d(),
34
34
  search: { strict: !0 },
35
35
  notFoundMode: "root",
36
- defaultPendingComponent: () => /* @__PURE__ */ m(u, {
36
+ defaultPendingComponent: () => /* @__PURE__ */ u(m, {
37
37
  description: "玩命加载中, 请耐心等待...",
38
38
  descriptionSize: 18,
39
39
  size: 48
40
40
  }),
41
- defaultErrorComponent: o,
42
- defaultNotFoundComponent: c,
41
+ defaultErrorComponent: i,
42
+ defaultNotFoundComponent: l,
43
43
  defaultPendingMs: 500,
44
44
  defaultPendingMinMs: 300,
45
45
  defaultStructuralSharing: !0,
@@ -54,34 +54,34 @@ function x({ history: v, routeTree: x, context: S }) {
54
54
  defaultGcTime: y,
55
55
  defaultViewTransition: !1,
56
56
  async defaultOnCatch(e) {
57
- d(/* @__PURE__ */ m("pre", {
57
+ h(/* @__PURE__ */ u("pre", {
58
58
  css: b,
59
- children: await f(e)
59
+ children: await g(e)
60
60
  }), { title: e.message || e.name });
61
61
  }
62
62
  });
63
63
  return C.subscribe("onBeforeLoad", ({ pathChanged: e }) => {
64
- e && a.emit("start");
65
- }), C.subscribe("onLoad", () => a.emit("complete")), C.subscribe("onLoad", (e) => {
66
- let r = e.toLocation, { fullPath: i, params: a, search: o, context: c } = C.matchRoutes(r.pathname, r.search, {
64
+ e && t.emit("start");
65
+ }), C.subscribe("onLoad", () => t.emit("complete")), C.subscribe("onLoad", (e) => {
66
+ let t = e.toLocation, { fullPath: i, params: o, search: s, context: c } = C.matchRoutes(t.pathname, t.search, {
67
67
  preload: !1,
68
68
  throwOnError: !1
69
- }).at(-1), { userMenuMap: l } = t.getState(), { addTab: u, setActiveTabId: d } = n.getState(), f = `${i}|${p(o)}|${p(a)}`, m = l ? s(l.values(), {
69
+ }).at(-1), { userMenuMap: l } = n.getState(), { addTab: u, setActiveTabId: d } = r.getState(), f = `${i}|${_(s)}|${_(o)}`, p = l ? a(l.values(), {
70
70
  fullPath: i,
71
- params: a,
72
- search: o
73
- }) : void 0, h = m ? l?.get(m) : void 0;
74
- h && (u({
71
+ params: o,
72
+ search: s
73
+ }) : void 0, m = p ? l?.get(p) : void 0;
74
+ m && (u({
75
75
  id: f,
76
76
  fullPath: i,
77
- params: a,
78
- search: o,
79
- label: c.routeTitle || h.name
77
+ params: o,
78
+ search: s,
79
+ label: c.routeTitle || m.name
80
80
  }), d(f));
81
- }), r(() => {
81
+ }), o(() => {
82
82
  C.navigate({ to: e });
83
- }), i(() => {
84
- l(C);
83
+ }), s(() => {
84
+ c(C);
85
85
  }), C;
86
86
  }
87
87
  //#endregion
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import { useActiveMenuKey as e } from "./use-active-menu-key.js";
3
3
  import { useRouteFullPath as t } from "./use-route-full-path.js";
4
4
  export { e as useActiveMenuKey, t as useRouteFullPath };
@@ -1,12 +1,12 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import { useAppStore as e } from "../stores/app.js";
3
3
  import { resolveActiveMenuKey as t } from "../helpers/menu-key.js";
4
- import { useMemo as n } from "react";
5
- import { useLocation as r, useRouter as i } from "@tanstack/react-router";
4
+ import { useLocation as n, useRouter as r } from "@tanstack/react-router";
5
+ import { useMemo as i } from "react";
6
6
  //#region src/hooks/use-active-menu-key.ts
7
7
  function a() {
8
- let a = i(), o = r({ select: (e) => e.pathname }), s = r({ select: (e) => e.search }), c = e((e) => e.userMenuMap);
9
- return n(() => {
8
+ let a = r(), o = n({ select: (e) => e.pathname }), s = n({ select: (e) => e.search }), c = e((e) => e.userMenuMap);
9
+ return i(() => {
10
10
  if (!c) return;
11
11
  let e = a.matchRoutes(o, s, {
12
12
  preload: !1,
@@ -1,10 +1,10 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
2
- import { useMemo as e } from "react";
3
- import { useLocation as t, useRouter as n } from "@tanstack/react-router";
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
+ import { useLocation as e, useRouter as t } from "@tanstack/react-router";
3
+ import { useMemo as n } from "react";
4
4
  //#region src/hooks/use-route-full-path.ts
5
5
  function r() {
6
- let r = n(), i = t({ select: (e) => e.pathname }), a = t({ select: (e) => e.search });
7
- return e(() => r.matchRoutes(i, a, {
6
+ let r = t(), i = e({ select: (e) => e.pathname }), a = e({ select: (e) => e.search });
7
+ return n(() => r.matchRoutes(i, a, {
8
8
  preload: !1,
9
9
  throwOnError: !1
10
10
  }).at(-1).fullPath, [
package/dist/es/index.js CHANGED
@@ -1,17 +1,18 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import { ACCESS_DENIED_ROUTE_ID as e, ACCESS_DENIED_ROUTE_PATH as t, INDEX_ROUTE_ID as n, INDEX_ROUTE_PATH as r, LOGIN_ROUTE_ID as i, LOGIN_ROUTE_PATH as a } from "./constants/router.js";
3
- import { useAppStore as o } from "./stores/app.js";
4
- import { useTabStore as s } from "./stores/tab.js";
5
- import { useThemeStore as c } from "./stores/theme.js";
6
- import { dispatchCustomEvent as l, emitAccessDenied as u, emitUnauthenticated as d } from "./helpers/event.js";
7
- import { createApiClient as f } from "./helpers/api.js";
8
- import { setupAppVersionNotification as p } from "./helpers/app-version.js";
3
+ import { setupAppVersionNotification as o } from "./helpers/app-version.js";
4
+ import { useAppStore as s } from "./stores/app.js";
5
+ import { useTabStore as c } from "./stores/tab.js";
6
+ import { useThemeStore as l } from "./stores/theme.js";
7
+ import { dispatchCustomEvent as u, emitAccessDenied as d, emitUnauthenticated as f } from "./helpers/event.js";
8
+ import { createApiClient as p } from "./helpers/api.js";
9
9
  import { createApp as m } from "./helpers/app.js";
10
10
  import { handleClientLogout as h } from "./helpers/auth.js";
11
11
  import { extractQueryParams as g, noopMutationFn as _ } from "./helpers/query.js";
12
12
  import { createRouter as v } from "./helpers/router.js";
13
- import { createAccessDeniedRouteOptions as y } from "./routes/access-denied.js";
14
- import { createLayoutRouteOptions as b } from "./routes/layout.js";
15
- import { createLoginRouteOptions as x } from "./routes/login.js";
16
- import { createRootRouteOptions as S } from "./routes/root.js";
17
- export { e as ACCESS_DENIED_ROUTE_ID, t as ACCESS_DENIED_ROUTE_PATH, n as INDEX_ROUTE_ID, r as INDEX_ROUTE_PATH, i as LOGIN_ROUTE_ID, a as LOGIN_ROUTE_PATH, y as createAccessDeniedRouteOptions, f as createApiClient, m as createApp, b as createLayoutRouteOptions, x as createLoginRouteOptions, S as createRootRouteOptions, v as createRouter, l as dispatchCustomEvent, u as emitAccessDenied, d as emitUnauthenticated, g as extractQueryParams, h as handleClientLogout, _ as noopMutationFn, p as setupAppVersionNotification, o as useAppStore, s as useTabStore, c as useThemeStore };
13
+ import { PASSWORD_CHANGE_CHALLENGE_TYPE as y, PasswordChangeChallenge as b } from "./components/login/password-change-challenge.js";
14
+ import { createAccessDeniedRouteOptions as x } from "./routes/access-denied.js";
15
+ import { createLayoutRouteOptions as S } from "./routes/layout.js";
16
+ import { createLoginRouteOptions as C } from "./routes/login.js";
17
+ import { createRootRouteOptions as w } from "./routes/root.js";
18
+ export { e as ACCESS_DENIED_ROUTE_ID, t as ACCESS_DENIED_ROUTE_PATH, n as INDEX_ROUTE_ID, r as INDEX_ROUTE_PATH, i as LOGIN_ROUTE_ID, a as LOGIN_ROUTE_PATH, y as PASSWORD_CHANGE_CHALLENGE_TYPE, b as PasswordChangeChallenge, x as createAccessDeniedRouteOptions, p as createApiClient, m as createApp, S as createLayoutRouteOptions, C as createLoginRouteOptions, w as createRootRouteOptions, v as createRouter, u as dispatchCustomEvent, d as emitAccessDenied, f as emitUnauthenticated, g as extractQueryParams, h as handleClientLogout, _ as noopMutationFn, o as setupAppVersionNotification, s as useAppStore, c as useTabStore, l as useThemeStore };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import "../constants/router.js";
3
3
  import { AccessDenied as e } from "../components/access-denied/index.js";
4
4
  //#region src/routes/access-denied.ts
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import { createAccessDeniedRouteOptions as e } from "./access-denied.js";
3
3
  import { createLayoutRouteOptions as t } from "./layout.js";
4
4
  import { createLoginRouteOptions as n } from "./login.js";
@@ -1,13 +1,13 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import { ACCESS_DENIED_ROUTE_PATH as e, LOGIN_ROUTE_PATH as t } from "../constants/router.js";
3
3
  import { useAppStore as n } from "../stores/app.js";
4
4
  import { Error as r } from "../components/error/index.js";
5
5
  import { menuKeyOf as i } from "../helpers/menu-key.js";
6
6
  import { Layout as a } from "../components/layout/index.js";
7
7
  import { NotFound as o } from "../components/not-found/index.js";
8
- import { DynamicIcon as s, Loader as c } from "@vef-framework-react/components";
9
- import { jsx as l } from "@emotion/react/jsx-runtime";
10
- import { Outlet as u, redirect as d } from "@tanstack/react-router";
8
+ import { jsx as s } from "@emotion/react/jsx-runtime";
9
+ import { Outlet as c, redirect as l } from "@tanstack/react-router";
10
+ import { DynamicIcon as u, Loader as d } from "@vef-framework-react/components";
11
11
  //#region src/routes/layout.tsx
12
12
  function f(e, t = /* @__PURE__ */ new Map()) {
13
13
  for (let n of e) n.children && f(n.children, t), t.set(i(n.path, n.meta), n);
@@ -25,7 +25,7 @@ function m(e, t = /* @__PURE__ */ new Set()) {
25
25
  return t;
26
26
  }
27
27
  function h(e) {
28
- let { path: t, type: n, name: r, icon: a } = e, o = a ? /* @__PURE__ */ l(s, { name: a }) : void 0;
28
+ let { path: t, type: n, name: r, icon: a } = e, o = a ? /* @__PURE__ */ s(u, { name: a }) : void 0;
29
29
  return n === "directory" ? {
30
30
  type: "submenu",
31
31
  key: i(t, e.meta),
@@ -49,43 +49,43 @@ function _(e, t) {
49
49
  throwOnError: !1
50
50
  }).at(-1).fullPath;
51
51
  }
52
- function v({ fetchUserInfo: i, beforeLoad: s, loader: h, ...v }) {
52
+ function v({ fetchUserInfo: i, beforeLoad: u, loader: h, ...v }) {
53
53
  function y() {
54
- return /* @__PURE__ */ l(a, {
54
+ return /* @__PURE__ */ s(a, {
55
55
  ...v,
56
- children: /* @__PURE__ */ l(u, {})
56
+ children: /* @__PURE__ */ s(c, {})
57
57
  });
58
58
  }
59
59
  return {
60
60
  beforeLoad: async (r) => {
61
- let i = r, { location: a, context: o } = i, { isAuthenticated: c, menuPathSet: l } = n.getState();
62
- if (!c) throw d({
61
+ let i = r, { location: a, context: o } = i, { isAuthenticated: s, menuPathSet: c } = n.getState();
62
+ if (!s) throw l({
63
63
  to: t,
64
64
  search: { redirect: a.href }
65
65
  });
66
- if (l && !l.has(_(o, a))) throw d({
66
+ if (c && !c.has(_(o, a))) throw l({
67
67
  to: e,
68
68
  replace: !0
69
69
  });
70
- return await s?.(i) ?? {};
70
+ return await u?.(i) ?? {};
71
71
  },
72
72
  loader: async (t) => {
73
- let r = t, { location: a, context: o } = r, { permissionTokens: s, ...c } = await i(), { menus: l } = c, u = Object.freeze(f(l)), v = Object.freeze(p(l)), y = Object.freeze(m(l)), b = Object.freeze(g(l));
73
+ let r = t, { location: a, context: o } = r, { permissionTokens: s, ...c } = await i(), { menus: u } = c, d = Object.freeze(f(u)), v = Object.freeze(p(u)), y = Object.freeze(m(u)), b = Object.freeze(g(u));
74
74
  if (n.setState({
75
75
  ...n.getState(),
76
76
  userInfo: Object.freeze(c),
77
- userMenuMap: u,
77
+ userMenuMap: d,
78
78
  menuPathMap: v,
79
79
  menuPathSet: y,
80
80
  menuItems: b,
81
81
  permissionTokens: Object.freeze(new Set(s))
82
- }), !y.has(_(o, a))) throw d({
82
+ }), !y.has(_(o, a))) throw l({
83
83
  to: e,
84
84
  replace: !0
85
85
  });
86
86
  if (h) return await h(r);
87
87
  },
88
- pendingComponent: () => /* @__PURE__ */ l(c, {
88
+ pendingComponent: () => /* @__PURE__ */ s(d, {
89
89
  description: "页面玩命加载中, 请稍后...",
90
90
  descriptionSize: 18,
91
91
  size: 48
@@ -1,19 +1,19 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import "../constants/router.js";
3
3
  import { useAppStore as e } from "../stores/app.js";
4
4
  import { Login as t } from "../components/login/index.js";
5
- import { z as n } from "@vef-framework-react/shared";
6
- import { jsx as r } from "@emotion/react/jsx-runtime";
7
- import { redirect as i } from "@tanstack/react-router";
5
+ import { jsx as n } from "@emotion/react/jsx-runtime";
6
+ import { redirect as r } from "@tanstack/react-router";
7
+ import { z as i } from "@vef-framework-react/shared";
8
8
  //#region src/routes/login.tsx
9
9
  function a(a) {
10
10
  function o() {
11
- return /* @__PURE__ */ r(t, { ...a });
11
+ return /* @__PURE__ */ n(t, { ...a });
12
12
  }
13
13
  return {
14
- validateSearch: n.object({ redirect: n.string().optional().default("/").catch("/") }),
14
+ validateSearch: i.object({ redirect: i.string().optional().default("/").catch("/") }),
15
15
  beforeLoad: ({ search: t }) => {
16
- if (e.getState().isAuthenticated) throw i({
16
+ if (e.getState().isAuthenticated) throw r({
17
17
  to: t.redirect,
18
18
  replace: !0
19
19
  });
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import { useAppStore as e } from "../stores/app.js";
3
3
  import { useActiveMenuKey as t } from "../hooks/use-active-menu-key.js";
4
4
  import { jsx as n } from "@emotion/react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import { createPersistedStore as e } from "@vef-framework-react/core";
3
3
  //#region src/stores/app.ts
4
4
  var t = e(() => ({
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import { useAppStore as e } from "./app.js";
3
3
  import { useTabStore as t } from "./tab.js";
4
4
  import { useThemeStore as n } from "./theme.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import "../constants/router.js";
3
3
  import { createPersistedStore as e, originalState as t } from "@vef-framework-react/core";
4
4
  //#region src/stores/tab.ts
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/starter v2.9.0 made by Venus | 2026-07-07T06:22:20.439Z */
1
+ /*! @vef-framework-react/starter v2.11.0 made by Venus | 2026-07-15T09:38:14.250Z */
2
2
  import { createPersistedStore as e } from "@vef-framework-react/core";
3
3
  import { omit as t } from "@vef-framework-react/shared";
4
4
  //#region src/stores/theme.ts
@@ -3,7 +3,7 @@ export { App, type AppProps } from './app';
3
3
  export { BaseLayout, type BaseLayoutProps } from './base-layout';
4
4
  export { Error } from './error';
5
5
  export { Layout, type AppItem, type LayoutProps, type UserMenuItem } from './layout';
6
- export { Login, type LoginChallenge, type LoginChallengeRenderer, type LoginChallengeRendererProps, type LoginChallengeRenderers, type LoginParams, type LoginProps, type LoginResult, type PasswordLoginParams, type ResolveChallengeParams } from './login';
6
+ export { Login, PASSWORD_CHANGE_CHALLENGE_TYPE, PasswordChangeChallenge, type LoginChallenge, type LoginChallengeRenderer, type LoginChallengeRendererProps, type LoginChallengeRenderers, type LoginParams, type LoginProps, type LoginResult, type PasswordChangeChallengeData, type PasswordChangeChallengeProps, type PasswordChangeChallengeSpec, type PasswordChangeReason, type PasswordLoginParams, type ResolveChallengeParams } from './login';
7
7
  export { NProgress, nProgressEventEmitter } from './n-progress';
8
8
  export { NotFound } from './not-found';
9
9
  export { RouterContextHookProvider, RouterProvider, type RouterProviderProps, type UseRouterContext } from './router-provider';
@@ -1,4 +1,5 @@
1
1
  import { LoginProps } from './props';
2
2
  export declare function Login({ logo, title, description, publicKey, onLogin, onResolveChallenge, challengeRenderers }: LoginProps): import("@emotion/react/jsx-runtime").JSX.Element;
3
+ export { PASSWORD_CHANGE_CHALLENGE_TYPE, PasswordChangeChallenge, type PasswordChangeChallengeData, type PasswordChangeChallengeProps, type PasswordChangeChallengeSpec, type PasswordChangeReason } from './password-change-challenge';
3
4
  export { type LoginChallenge, type LoginParams, type LoginResult, type PasswordLoginParams, type ResolveChallengeParams } from './payload';
4
5
  export { type LoginChallengeRenderer, type LoginChallengeRendererProps, type LoginChallengeRenderers, type LoginProps } from './props';
@@ -0,0 +1,72 @@
1
+ import { LiteralUnion } from '@vef-framework-react/shared';
2
+ /**
3
+ * The challenge type identifier for forced password change, aligned with the
4
+ * backend `security.ChallengeTypePasswordChange`.
5
+ */
6
+ export declare const PASSWORD_CHANGE_CHALLENGE_TYPE = "password_change";
7
+ /**
8
+ * Why the server forces a password change. `first_login` and `expired` are the
9
+ * backend's predefined reasons; hosts may define additional ones.
10
+ */
11
+ export type PasswordChangeReason = LiteralUnion<"first_login" | "expired", string>;
12
+ /**
13
+ * The challenge `data` payload for a forced password change, aligned with the
14
+ * backend `security.PasswordChangeChallengeData`.
15
+ */
16
+ export interface PasswordChangeChallengeData {
17
+ reason: PasswordChangeReason;
18
+ meta?: Record<string, unknown>;
19
+ }
20
+ /**
21
+ * The `Register['challenges']` entry for the built-in password-change
22
+ * renderer. Hosts wire it up via module augmentation:
23
+ *
24
+ * @example
25
+ * declare module "@vef-framework-react/starter" {
26
+ * interface Register {
27
+ * challenges: {
28
+ * [PASSWORD_CHANGE_CHALLENGE_TYPE]: PasswordChangeChallengeSpec;
29
+ * };
30
+ * }
31
+ * }
32
+ */
33
+ export interface PasswordChangeChallengeSpec {
34
+ data: PasswordChangeChallengeData;
35
+ /**
36
+ * The new password — encrypted with the login `publicKey` when one is
37
+ * configured, plaintext otherwise.
38
+ */
39
+ response: string;
40
+ }
41
+ /**
42
+ * Props shaped to stay assignable to `LoginChallengeRenderers` entries both
43
+ * with and without a `Register['challenges']` augmentation: `challenge.data`
44
+ * stays wide (`unknown`, narrowed internally) while `resolve` stays narrow
45
+ * (the renderer only ever submits a string).
46
+ */
47
+ export interface PasswordChangeChallengeProps {
48
+ challenge: {
49
+ /**
50
+ * The server-provided {@link PasswordChangeChallengeData}; treated as
51
+ * untrusted wire data and read defensively.
52
+ */
53
+ data?: unknown;
54
+ };
55
+ resolve: (response: string) => Promise<void>;
56
+ cancel: () => void;
57
+ pending: boolean;
58
+ error?: string | null;
59
+ /**
60
+ * Provided by the Login component when a `publicKey` is configured; the new
61
+ * password is encrypted before it is submitted.
62
+ */
63
+ encrypt?: (plaintext: string) => string;
64
+ }
65
+ /**
66
+ * Built-in renderer for the backend's forced password-change login challenge
67
+ * (`security.PasswordChangeChallengeProvider`). Collects and confirms the new
68
+ * password, encrypts it when the Login component provides `encrypt`, and
69
+ * surfaces both resolve failures (e.g. a password-policy violation) and local
70
+ * validation errors inline.
71
+ */
72
+ export declare function PasswordChangeChallenge({ challenge, pending, error, encrypt, resolve, cancel }: PasswordChangeChallengeProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- export { type AppItem, type LoginChallenge, type LoginChallengeRenderer, type LoginChallengeRendererProps, type LoginChallengeRenderers, type LoginParams, type LoginProps, type LoginResult, type PasswordLoginParams, type ResolveChallengeParams, type UserMenuItem } from './components';
1
+ export { PASSWORD_CHANGE_CHALLENGE_TYPE, PasswordChangeChallenge, type AppItem, type LoginChallenge, type LoginChallengeRenderer, type LoginChallengeRendererProps, type LoginChallengeRenderers, type LoginParams, type LoginProps, type LoginResult, type PasswordChangeChallengeData, type PasswordChangeChallengeProps, type PasswordChangeChallengeSpec, type PasswordChangeReason, type PasswordLoginParams, type ResolveChallengeParams, type UserMenuItem } from './components';
2
2
  export { ACCESS_DENIED_ROUTE_ID, ACCESS_DENIED_ROUTE_PATH, INDEX_ROUTE_ID, INDEX_ROUTE_PATH, LOGIN_ROUTE_ID, LOGIN_ROUTE_PATH } from './constants';
3
3
  export { createApiClient, createApp, createRouter, dispatchCustomEvent, emitAccessDenied, emitUnauthenticated, extractQueryParams, handleClientLogout, noopMutationFn, setupAppVersionNotification, type ApiClientOptions, type AppChangelog, type AppVersionNotificationOptions, type RouterOptions } from './helpers';
4
4
  export { createAccessDeniedRouteOptions, createLayoutRouteOptions, createLoginRouteOptions, createRootRouteOptions, type LayoutBeforeLoadArgs, type LayoutLoaderArgs } from './routes';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vef-framework-react/starter",
3
- "version": "2.9.0",
3
+ "version": "2.11.0",
4
4
  "private": false,
5
5
  "description": "Starter for VEF framework",
6
6
  "keywords": [
@@ -49,10 +49,10 @@
49
49
  "@tanstack/react-router": "^1.170.17",
50
50
  "react": "^19.2.7",
51
51
  "react-dom": "^19.2.7",
52
- "@vef-framework-react/components": "2.9.0",
53
- "@vef-framework-react/core": "2.9.0",
54
- "@vef-framework-react/hooks": "2.9.0",
55
- "@vef-framework-react/shared": "2.9.0"
52
+ "@vef-framework-react/components": "2.11.0",
53
+ "@vef-framework-react/core": "2.11.0",
54
+ "@vef-framework-react/hooks": "2.11.0",
55
+ "@vef-framework-react/shared": "2.11.0"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "@tanstack/react-router": ">=1",
@@ -1 +0,0 @@
1
- export {};