@go-wind/admin-react 0.0.0-stage → 0.2.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 (120) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -2
  3. package/dist/access/access-control.d.ts +39 -0
  4. package/dist/access/field-permission.d.ts +11 -0
  5. package/dist/access/index.d.ts +4 -0
  6. package/dist/access/use-access.d.ts +50 -0
  7. package/dist/admin-react.css +2 -0
  8. package/dist/admin-react.js +36561 -0
  9. package/dist/admin-react.js.map +1 -0
  10. package/dist/auth-gateway.d.ts +54 -0
  11. package/dist/components/ListTable/ResizableHeaderCell.d.ts +31 -0
  12. package/dist/components/ListTable/TableSkeleton.d.ts +25 -0
  13. package/dist/components/ListTable/index.d.ts +20 -0
  14. package/dist/components/Loading/index.d.ts +22 -0
  15. package/dist/constants.d.ts +30 -0
  16. package/dist/env.d.ts +5 -0
  17. package/dist/hooks/useClipboard.d.ts +3 -0
  18. package/dist/hooks/useEcharts.d.ts +10 -0
  19. package/dist/hooks/useKeyStroke.d.ts +13 -0
  20. package/dist/hooks/usePageFullscreen.d.ts +9 -0
  21. package/dist/hooks/useProTableScrollY.d.ts +22 -0
  22. package/dist/hooks/useTime.d.ts +6 -0
  23. package/dist/hooks/useTitle.d.ts +1 -0
  24. package/dist/hooks/useTokenRefresh.d.ts +26 -0
  25. package/dist/hooks/useWatermark.d.ts +20 -0
  26. package/dist/i18n/components/LocaleSwitcher/index.d.ts +1 -0
  27. package/dist/i18n/components/index.d.ts +1 -0
  28. package/dist/i18n/config/i18n.d.ts +18 -0
  29. package/dist/i18n/hooks/index.d.ts +2 -0
  30. package/dist/i18n/hooks/useI18n.d.ts +96 -0
  31. package/dist/i18n/hooks/useLocaleSync.d.ts +4 -0
  32. package/dist/i18n/index.d.ts +3 -0
  33. package/dist/i18n/utils/detector.d.ts +26 -0
  34. package/dist/i18n/utils/formatter.d.ts +38 -0
  35. package/dist/i18n/utils/index.d.ts +3 -0
  36. package/dist/i18n/utils/sync.d.ts +27 -0
  37. package/dist/index.d.ts +41 -0
  38. package/dist/locales/en-US/index.d.ts +2 -0
  39. package/dist/locales/index.d.ts +10 -0
  40. package/dist/locales/zh-CN/index.d.ts +2 -0
  41. package/dist/nprogress-CwfUlis6.js +159 -0
  42. package/dist/nprogress-CwfUlis6.js.map +1 -0
  43. package/dist/preferences/components/PreferencesPanel/AppearancePanel.d.ts +3 -0
  44. package/dist/preferences/components/PreferencesPanel/GeneralPanel.d.ts +3 -0
  45. package/dist/preferences/components/PreferencesPanel/LayoutPanel.d.ts +3 -0
  46. package/dist/preferences/components/PreferencesPanel/ShortcutKeyPanel.d.ts +3 -0
  47. package/dist/preferences/components/PreferencesPanel/index.d.ts +8 -0
  48. package/dist/preferences/components/ThemeProvider/index.d.ts +9 -0
  49. package/dist/preferences/components/index.d.ts +2 -0
  50. package/dist/preferences/config/constants.d.ts +24 -0
  51. package/dist/preferences/config/darkTheme.d.ts +32 -0
  52. package/dist/preferences/config/default.d.ts +3 -0
  53. package/dist/preferences/config/index.d.ts +4 -0
  54. package/dist/preferences/config/lightTheme.d.ts +33 -0
  55. package/dist/preferences/hooks/index.d.ts +3 -0
  56. package/dist/preferences/hooks/useLocale.d.ts +23 -0
  57. package/dist/preferences/hooks/usePreferences.d.ts +31 -0
  58. package/dist/preferences/hooks/useThemeConfig.d.ts +2 -0
  59. package/dist/preferences/index.d.ts +5 -0
  60. package/dist/preferences/store/index.d.ts +24 -0
  61. package/dist/preferences/theme-transition.d.ts +17 -0
  62. package/dist/preferences/types/app.d.ts +238 -0
  63. package/dist/preferences/types/index.d.ts +4 -0
  64. package/dist/preferences/types/layout.d.ts +78 -0
  65. package/dist/preferences/types/preferences-root.d.ts +48 -0
  66. package/dist/preferences/types/theme.d.ts +29 -0
  67. package/dist/preferences/utils/diff.d.ts +7 -0
  68. package/dist/preferences/utils/merge.d.ts +9 -0
  69. package/dist/query-client.d.ts +9 -0
  70. package/dist/rolldown-runtime-BbCBk-LD.js +19 -0
  71. package/dist/router/factory.d.ts +7 -0
  72. package/dist/router/generators/generate-menus.d.ts +13 -0
  73. package/dist/router/generators/generate-routes-backend.d.ts +12 -0
  74. package/dist/router/generators/generate-routes-frontend.d.ts +17 -0
  75. package/dist/router/generators/index.d.ts +3 -0
  76. package/dist/router/index.d.ts +5 -0
  77. package/dist/router/routes-context.d.ts +8 -0
  78. package/dist/router/types/index.d.ts +207 -0
  79. package/dist/router/utils/index.d.ts +8 -0
  80. package/dist/router/utils/inject-redirect.d.ts +6 -0
  81. package/dist/router/utils/lazy.d.ts +11 -0
  82. package/dist/router/utils/loader.d.ts +14 -0
  83. package/dist/router/utils/menu.d.ts +5 -0
  84. package/dist/router/utils/merge-route-modules.d.ts +23 -0
  85. package/dist/router/utils/reset-routes.d.ts +18 -0
  86. package/dist/router/utils/sort-routes.d.ts +5 -0
  87. package/dist/router/utils/transform-meta-to-handle.d.ts +11 -0
  88. package/dist/storage/index.d.ts +2 -0
  89. package/dist/storage/storage.class.d.ts +125 -0
  90. package/dist/storage/storage.types.d.ts +199 -0
  91. package/dist/stores/auth.d.ts +56 -0
  92. package/dist/stores/index.d.ts +2 -0
  93. package/dist/stores/user.d.ts +32 -0
  94. package/dist/transport/rest/captcha-headers.d.ts +2 -0
  95. package/dist/transport/rest/index.d.ts +8 -0
  96. package/dist/transport/rest/modules/downloader.d.ts +9 -0
  97. package/dist/transport/rest/modules/interceptor.d.ts +9 -0
  98. package/dist/transport/rest/modules/uploader.d.ts +10 -0
  99. package/dist/transport/rest/pagination.d.ts +73 -0
  100. package/dist/transport/rest/preset-interceptors.d.ts +25 -0
  101. package/dist/transport/rest/request-api.d.ts +6 -0
  102. package/dist/transport/rest/request-client.d.ts +87 -0
  103. package/dist/transport/rest/types.d.ts +38 -0
  104. package/dist/transport/rest/utils.d.ts +16 -0
  105. package/dist/transport/sse/event.d.ts +44 -0
  106. package/dist/transport/sse/index.d.ts +5 -0
  107. package/dist/transport/sse/sse_client.d.ts +76 -0
  108. package/dist/transport/sse/types.d.ts +27 -0
  109. package/dist/types.d.ts +44 -0
  110. package/dist/utils/color.d.ts +27 -0
  111. package/dist/utils/date.d.ts +5 -0
  112. package/dist/utils/diff.d.ts +6 -0
  113. package/dist/utils/index.d.ts +9 -0
  114. package/dist/utils/inference.d.ts +111 -0
  115. package/dist/utils/merge.d.ts +17 -0
  116. package/dist/utils/nprogress.d.ts +11 -0
  117. package/dist/utils/tree.d.ts +27 -0
  118. package/dist/utils/url.d.ts +11 -0
  119. package/dist/utils/utils.d.ts +37 -0
  120. package/package.json +77 -3
@@ -0,0 +1,159 @@
1
+ import { t as e } from "./rolldown-runtime-BbCBk-LD.js";
2
+ // ../../node_modules/.pnpm/nprogress@0.2.0/node_modules/nprogress/nprogress.js
3
+ var t = /* @__PURE__ */ e(((e, t, n) => {
4
+ (function(n, r) {
5
+ typeof define == "function" && define.amd ? define(r) : typeof e == "object" ? t.exports = r() : n.NProgress = r();
6
+ })(n, function() {
7
+ var e = {};
8
+ e.version = "0.2.0";
9
+ var t = e.settings = {
10
+ minimum: .08,
11
+ easing: "ease",
12
+ positionUsing: "",
13
+ speed: 200,
14
+ trickle: !0,
15
+ trickleRate: .02,
16
+ trickleSpeed: 800,
17
+ showSpinner: !0,
18
+ barSelector: "[role=\"bar\"]",
19
+ spinnerSelector: "[role=\"spinner\"]",
20
+ parent: "body",
21
+ template: "<div class=\"bar\" role=\"bar\"><div class=\"peg\"></div></div><div class=\"spinner\" role=\"spinner\"><div class=\"spinner-icon\"></div></div>"
22
+ };
23
+ e.configure = function(e) {
24
+ var n, r;
25
+ for (n in e) r = e[n], r !== void 0 && e.hasOwnProperty(n) && (t[n] = r);
26
+ return this;
27
+ }, e.status = null, e.set = function(r) {
28
+ var s = e.isStarted();
29
+ r = n(r, t.minimum, 1), e.status = r === 1 ? null : r;
30
+ var c = e.render(!s), l = c.querySelector(t.barSelector), u = t.speed, d = t.easing;
31
+ return c.offsetWidth, a(function(n) {
32
+ t.positionUsing === "" && (t.positionUsing = e.getPositioningCSS()), o(l, i(r, u, d)), r === 1 ? (o(c, {
33
+ transition: "none",
34
+ opacity: 1
35
+ }), c.offsetWidth, setTimeout(function() {
36
+ o(c, {
37
+ transition: "all " + u + "ms linear",
38
+ opacity: 0
39
+ }), setTimeout(function() {
40
+ e.remove(), n();
41
+ }, u);
42
+ }, u)) : setTimeout(n, u);
43
+ }), this;
44
+ }, e.isStarted = function() {
45
+ return typeof e.status == "number";
46
+ }, e.start = function() {
47
+ e.status || e.set(0);
48
+ var n = function() {
49
+ setTimeout(function() {
50
+ e.status && (e.trickle(), n());
51
+ }, t.trickleSpeed);
52
+ };
53
+ return t.trickle && n(), this;
54
+ }, e.done = function(t) {
55
+ return !t && !e.status ? this : e.inc(.3 + .5 * Math.random()).set(1);
56
+ }, e.inc = function(t) {
57
+ var r = e.status;
58
+ return r ? (typeof t != "number" && (t = (1 - r) * n(Math.random() * r, .1, .95)), r = n(r + t, 0, .994), e.set(r)) : e.start();
59
+ }, e.trickle = function() {
60
+ return e.inc(Math.random() * t.trickleRate);
61
+ }, (function() {
62
+ var t = 0, n = 0;
63
+ e.promise = function(r) {
64
+ return !r || r.state() === "resolved" || (n === 0 && e.start(), t++, n++, r.always(function() {
65
+ n--, n === 0 ? (t = 0, e.done()) : e.set((t - n) / t);
66
+ })), this;
67
+ };
68
+ })(), e.render = function(n) {
69
+ if (e.isRendered()) return document.getElementById("nprogress");
70
+ c(document.documentElement, "nprogress-busy");
71
+ var i = document.createElement("div");
72
+ i.id = "nprogress", i.innerHTML = t.template;
73
+ var a = i.querySelector(t.barSelector), s = n ? "-100" : r(e.status || 0), l = document.querySelector(t.parent), u;
74
+ return o(a, {
75
+ transition: "all 0 linear",
76
+ transform: "translate3d(" + s + "%,0,0)"
77
+ }), t.showSpinner || (u = i.querySelector(t.spinnerSelector), u && d(u)), l != document.body && c(l, "nprogress-custom-parent"), l.appendChild(i), i;
78
+ }, e.remove = function() {
79
+ l(document.documentElement, "nprogress-busy"), l(document.querySelector(t.parent), "nprogress-custom-parent");
80
+ var e = document.getElementById("nprogress");
81
+ e && d(e);
82
+ }, e.isRendered = function() {
83
+ return !!document.getElementById("nprogress");
84
+ }, e.getPositioningCSS = function() {
85
+ var e = document.body.style, t = "WebkitTransform" in e ? "Webkit" : "MozTransform" in e ? "Moz" : "msTransform" in e ? "ms" : "OTransform" in e ? "O" : "";
86
+ return t + "Perspective" in e ? "translate3d" : t + "Transform" in e ? "translate" : "margin";
87
+ };
88
+ function n(e, t, n) {
89
+ return e < t ? t : e > n ? n : e;
90
+ }
91
+ function r(e) {
92
+ return (-1 + e) * 100;
93
+ }
94
+ function i(e, n, i) {
95
+ var a = t.positionUsing === "translate3d" ? { transform: "translate3d(" + r(e) + "%,0,0)" } : t.positionUsing === "translate" ? { transform: "translate(" + r(e) + "%,0)" } : { "margin-left": r(e) + "%" };
96
+ return a.transition = "all " + n + "ms " + i, a;
97
+ }
98
+ var a = (function() {
99
+ var e = [];
100
+ function t() {
101
+ var n = e.shift();
102
+ n && n(t);
103
+ }
104
+ return function(n) {
105
+ e.push(n), e.length == 1 && t();
106
+ };
107
+ })(), o = (function() {
108
+ var e = [
109
+ "Webkit",
110
+ "O",
111
+ "Moz",
112
+ "ms"
113
+ ], t = {};
114
+ function n(e) {
115
+ return e.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(e, t) {
116
+ return t.toUpperCase();
117
+ });
118
+ }
119
+ function r(t) {
120
+ var n = document.body.style;
121
+ if (t in n) return t;
122
+ for (var r = e.length, i = t.charAt(0).toUpperCase() + t.slice(1), a; r--;) if (a = e[r] + i, a in n) return a;
123
+ return t;
124
+ }
125
+ function i(e) {
126
+ return e = n(e), t[e] || (t[e] = r(e));
127
+ }
128
+ function a(e, t, n) {
129
+ t = i(t), e.style[t] = n;
130
+ }
131
+ return function(e, t) {
132
+ var n = arguments, r, i;
133
+ if (n.length == 2) for (r in t) i = t[r], i !== void 0 && t.hasOwnProperty(r) && a(e, r, i);
134
+ else a(e, n[1], n[2]);
135
+ };
136
+ })();
137
+ function s(e, t) {
138
+ return (typeof e == "string" ? e : u(e)).indexOf(" " + t + " ") >= 0;
139
+ }
140
+ function c(e, t) {
141
+ var n = u(e), r = n + t;
142
+ s(n, t) || (e.className = r.substring(1));
143
+ }
144
+ function l(e, t) {
145
+ var n = u(e), r;
146
+ s(e, t) && (r = n.replace(" " + t + " ", " "), e.className = r.substring(1, r.length - 1));
147
+ }
148
+ function u(e) {
149
+ return (" " + (e.className || "") + " ").replace(/\s+/gi, " ");
150
+ }
151
+ function d(e) {
152
+ e && e.parentNode && e.parentNode.removeChild(e);
153
+ }
154
+ return e;
155
+ });
156
+ }));
157
+ export default t();
158
+
159
+ //# sourceMappingURL=nprogress-CwfUlis6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nprogress-CwfUlis6.js","names":["__commonJSMin","require_nprogress","factory","exports","this$1","NProgress","Settings","key","value","options","started","clamp","n","progress","bar","speed","ease","queue","css","barPositionCSS","next","work","force","amount","initial","current","$promise","perc","fromStart","toBarPerc","parent","spinner","removeElement","addClass","removeClass","bodyStyle","vendorPrefix","min","max","barCSS","pending","fn","cssPrefixes","cssProps","camelCase","string","letter","getVendorProp","style","name","i","capName","vendorName","getStyleProp","applyCss","prop","args","properties","element","hasClass","classList","oldList","newList"],"sources":["../../../node_modules/.pnpm/nprogress@0.2.0/node_modules/nprogress/nprogress.js"],"sourcesContent":["/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress\n * @license MIT */\n\n;(function(root, factory) {\n\n if (typeof define === 'function' && define.amd) {\n define(factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.NProgress = factory();\n }\n\n})(this, function() {\n var NProgress = {};\n\n NProgress.version = '0.2.0';\n\n var Settings = NProgress.settings = {\n minimum: 0.08,\n easing: 'ease',\n positionUsing: '',\n speed: 200,\n trickle: true,\n trickleRate: 0.02,\n trickleSpeed: 800,\n showSpinner: true,\n barSelector: '[role=\"bar\"]',\n spinnerSelector: '[role=\"spinner\"]',\n parent: 'body',\n template: '<div class=\"bar\" role=\"bar\"><div class=\"peg\"></div></div><div class=\"spinner\" role=\"spinner\"><div class=\"spinner-icon\"></div></div>'\n };\n\n /**\n * Updates configuration.\n *\n * NProgress.configure({\n * minimum: 0.1\n * });\n */\n NProgress.configure = function(options) {\n var key, value;\n for (key in options) {\n value = options[key];\n if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;\n }\n\n return this;\n };\n\n /**\n * Last number.\n */\n\n NProgress.status = null;\n\n /**\n * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.\n *\n * NProgress.set(0.4);\n * NProgress.set(1.0);\n */\n\n NProgress.set = function(n) {\n var started = NProgress.isStarted();\n\n n = clamp(n, Settings.minimum, 1);\n NProgress.status = (n === 1 ? null : n);\n\n var progress = NProgress.render(!started),\n bar = progress.querySelector(Settings.barSelector),\n speed = Settings.speed,\n ease = Settings.easing;\n\n progress.offsetWidth; /* Repaint */\n\n queue(function(next) {\n // Set positionUsing if it hasn't already been set\n if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();\n\n // Add transition\n css(bar, barPositionCSS(n, speed, ease));\n\n if (n === 1) {\n // Fade out\n css(progress, { \n transition: 'none', \n opacity: 1 \n });\n progress.offsetWidth; /* Repaint */\n\n setTimeout(function() {\n css(progress, { \n transition: 'all ' + speed + 'ms linear', \n opacity: 0 \n });\n setTimeout(function() {\n NProgress.remove();\n next();\n }, speed);\n }, speed);\n } else {\n setTimeout(next, speed);\n }\n });\n\n return this;\n };\n\n NProgress.isStarted = function() {\n return typeof NProgress.status === 'number';\n };\n\n /**\n * Shows the progress bar.\n * This is the same as setting the status to 0%, except that it doesn't go backwards.\n *\n * NProgress.start();\n *\n */\n NProgress.start = function() {\n if (!NProgress.status) NProgress.set(0);\n\n var work = function() {\n setTimeout(function() {\n if (!NProgress.status) return;\n NProgress.trickle();\n work();\n }, Settings.trickleSpeed);\n };\n\n if (Settings.trickle) work();\n\n return this;\n };\n\n /**\n * Hides the progress bar.\n * This is the *sort of* the same as setting the status to 100%, with the\n * difference being `done()` makes some placebo effect of some realistic motion.\n *\n * NProgress.done();\n *\n * If `true` is passed, it will show the progress bar even if its hidden.\n *\n * NProgress.done(true);\n */\n\n NProgress.done = function(force) {\n if (!force && !NProgress.status) return this;\n\n return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);\n };\n\n /**\n * Increments by a random amount.\n */\n\n NProgress.inc = function(amount) {\n var n = NProgress.status;\n\n if (!n) {\n return NProgress.start();\n } else {\n if (typeof amount !== 'number') {\n amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);\n }\n\n n = clamp(n + amount, 0, 0.994);\n return NProgress.set(n);\n }\n };\n\n NProgress.trickle = function() {\n return NProgress.inc(Math.random() * Settings.trickleRate);\n };\n\n /**\n * Waits for all supplied jQuery promises and\n * increases the progress as the promises resolve.\n *\n * @param $promise jQUery Promise\n */\n (function() {\n var initial = 0, current = 0;\n\n NProgress.promise = function($promise) {\n if (!$promise || $promise.state() === \"resolved\") {\n return this;\n }\n\n if (current === 0) {\n NProgress.start();\n }\n\n initial++;\n current++;\n\n $promise.always(function() {\n current--;\n if (current === 0) {\n initial = 0;\n NProgress.done();\n } else {\n NProgress.set((initial - current) / initial);\n }\n });\n\n return this;\n };\n\n })();\n\n /**\n * (Internal) renders the progress bar markup based on the `template`\n * setting.\n */\n\n NProgress.render = function(fromStart) {\n if (NProgress.isRendered()) return document.getElementById('nprogress');\n\n addClass(document.documentElement, 'nprogress-busy');\n \n var progress = document.createElement('div');\n progress.id = 'nprogress';\n progress.innerHTML = Settings.template;\n\n var bar = progress.querySelector(Settings.barSelector),\n perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),\n parent = document.querySelector(Settings.parent),\n spinner;\n \n css(bar, {\n transition: 'all 0 linear',\n transform: 'translate3d(' + perc + '%,0,0)'\n });\n\n if (!Settings.showSpinner) {\n spinner = progress.querySelector(Settings.spinnerSelector);\n spinner && removeElement(spinner);\n }\n\n if (parent != document.body) {\n addClass(parent, 'nprogress-custom-parent');\n }\n\n parent.appendChild(progress);\n return progress;\n };\n\n /**\n * Removes the element. Opposite of render().\n */\n\n NProgress.remove = function() {\n removeClass(document.documentElement, 'nprogress-busy');\n removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');\n var progress = document.getElementById('nprogress');\n progress && removeElement(progress);\n };\n\n /**\n * Checks if the progress bar is rendered.\n */\n\n NProgress.isRendered = function() {\n return !!document.getElementById('nprogress');\n };\n\n /**\n * Determine which positioning CSS rule to use.\n */\n\n NProgress.getPositioningCSS = function() {\n // Sniff on document.body.style\n var bodyStyle = document.body.style;\n\n // Sniff prefixes\n var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :\n ('MozTransform' in bodyStyle) ? 'Moz' :\n ('msTransform' in bodyStyle) ? 'ms' :\n ('OTransform' in bodyStyle) ? 'O' : '';\n\n if (vendorPrefix + 'Perspective' in bodyStyle) {\n // Modern browsers with 3D support, e.g. Webkit, IE10\n return 'translate3d';\n } else if (vendorPrefix + 'Transform' in bodyStyle) {\n // Browsers without 3D support, e.g. IE9\n return 'translate';\n } else {\n // Browsers without translate() support, e.g. IE7-8\n return 'margin';\n }\n };\n\n /**\n * Helpers\n */\n\n function clamp(n, min, max) {\n if (n < min) return min;\n if (n > max) return max;\n return n;\n }\n\n /**\n * (Internal) converts a percentage (`0..1`) to a bar translateX\n * percentage (`-100%..0%`).\n */\n\n function toBarPerc(n) {\n return (-1 + n) * 100;\n }\n\n\n /**\n * (Internal) returns the correct CSS for changing the bar's\n * position given an n percentage, and speed and ease from Settings\n */\n\n function barPositionCSS(n, speed, ease) {\n var barCSS;\n\n if (Settings.positionUsing === 'translate3d') {\n barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };\n } else if (Settings.positionUsing === 'translate') {\n barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };\n } else {\n barCSS = { 'margin-left': toBarPerc(n)+'%' };\n }\n\n barCSS.transition = 'all '+speed+'ms '+ease;\n\n return barCSS;\n }\n\n /**\n * (Internal) Queues a function to be executed.\n */\n\n var queue = (function() {\n var pending = [];\n \n function next() {\n var fn = pending.shift();\n if (fn) {\n fn(next);\n }\n }\n\n return function(fn) {\n pending.push(fn);\n if (pending.length == 1) next();\n };\n })();\n\n /**\n * (Internal) Applies css properties to an element, similar to the jQuery \n * css method.\n *\n * While this helper does assist with vendor prefixed property names, it \n * does not perform any manipulation of values prior to setting styles.\n */\n\n var css = (function() {\n var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],\n cssProps = {};\n\n function camelCase(string) {\n return string.replace(/^-ms-/, 'ms-').replace(/-([\\da-z])/gi, function(match, letter) {\n return letter.toUpperCase();\n });\n }\n\n function getVendorProp(name) {\n var style = document.body.style;\n if (name in style) return name;\n\n var i = cssPrefixes.length,\n capName = name.charAt(0).toUpperCase() + name.slice(1),\n vendorName;\n while (i--) {\n vendorName = cssPrefixes[i] + capName;\n if (vendorName in style) return vendorName;\n }\n\n return name;\n }\n\n function getStyleProp(name) {\n name = camelCase(name);\n return cssProps[name] || (cssProps[name] = getVendorProp(name));\n }\n\n function applyCss(element, prop, value) {\n prop = getStyleProp(prop);\n element.style[prop] = value;\n }\n\n return function(element, properties) {\n var args = arguments,\n prop, \n value;\n\n if (args.length == 2) {\n for (prop in properties) {\n value = properties[prop];\n if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);\n }\n } else {\n applyCss(element, args[1], args[2]);\n }\n }\n })();\n\n /**\n * (Internal) Determines if an element or space separated list of class names contains a class name.\n */\n\n function hasClass(element, name) {\n var list = typeof element == 'string' ? element : classList(element);\n return list.indexOf(' ' + name + ' ') >= 0;\n }\n\n /**\n * (Internal) Adds a class to an element.\n */\n\n function addClass(element, name) {\n var oldList = classList(element),\n newList = oldList + name;\n\n if (hasClass(oldList, name)) return; \n\n // Trim the opening space.\n element.className = newList.substring(1);\n }\n\n /**\n * (Internal) Removes a class from an element.\n */\n\n function removeClass(element, name) {\n var oldList = classList(element),\n newList;\n\n if (!hasClass(element, name)) return;\n\n // Replace the class name.\n newList = oldList.replace(' ' + name + ' ', ' ');\n\n // Trim the opening and closing spaces.\n element.className = newList.substring(1, newList.length - 1);\n }\n\n /**\n * (Internal) Gets a space separated list of the class names on the element. \n * The list is wrapped with a single space on each end to facilitate finding \n * matches within the list.\n */\n\n function classList(element) {\n return (' ' + (element.className || '') + ' ').replace(/\\s+/gi, ' ');\n }\n\n /**\n * (Internal) Removes an element from the DOM.\n */\n\n function removeElement(element) {\n element && element.parentNode && element.parentNode.removeChild(element);\n }\n\n return NProgress;\n});\n\n"],"ignoreList":[0],"mappings":";;;CAGC,CAAC,SAAS,GAAM,GAAS;EAExB,AAAI,OAAO,UAAW,cAAc,OAAO,MACzC,OAAOE,CAAO,IACL,OAAOC,KAAY,WAC5B,EAAO,UAAUD,EAAQ,IAEzB,EAAK,YAAYA,EAAQ;CAG7B,EAAA,CAACE,GAAQ,WAAW;EAClB,IAAIC,IAAY,CAAC;EAEjB,EAAU,UAAU;EAEpB,IAAIC,IAAW,EAAU,WAAW;GAClC,SAAS;GACT,QAAQ;GACR,eAAe;GACf,OAAO;GACP,SAAS;GACT,aAAa;GACb,cAAc;GACd,aAAa;GACb,aAAa;GACb,iBAAiB;GACjB,QAAQ;GACR,UAAU;EACZ;EAkPA,AAzOA,EAAU,YAAY,SAAS,GAAS;GACtC,IAAIC,GAAKC;GACT,KAAKD,KAAOE,GAEV,AADA,IAAQA,EAAQF,IACZC,MAAU,KAAA,KAAaC,EAAQ,eAAeF,CAAG,MAAG,EAASA,KAAOC;GAG1E,OAAO;EACT,GAMA,EAAU,SAAS,MASnB,EAAU,MAAM,SAAS,GAAG;GAC1B,IAAIE,IAAUL,EAAU,UAAU;GAGlC,AADA,IAAIM,EAAMC,GAAGN,EAAS,SAAS,CAAC,GAChC,EAAU,SAAUM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,CAAI,MAG1B,EAAQ,YAAYa,EAAQ,UAAU,CAAC;EACzC;EAMA,SAAS5B,EAAY,GAAS,GAAM;GAClC,IAAI2B,IAAUD,EAAUF,CAAO,GAC3BI;GAEJ,AAAKH,EAASD,GAAST,CAAI,MAG3B,IAAUY,EAAQ,QAAQ,MAAMZ,IAAO,KAAK,GAAG,GAG/C,EAAQ,YAAYa,EAAQ,UAAU,GAAGA,EAAQ,SAAS,CAAC;EAC7D;EAQA,SAASF,EAAU,GAAS;GAC1B,QAAQ,OAAOF,EAAQ,aAAa,MAAM,IAAA,CAAK,QAAQ,SAAS,GAAG;EACrE;EAMA,SAAS1B,EAAc,GAAS;GAC9B,KAAW0B,EAAQ,cAAcA,EAAQ,WAAW,YAAYA,CAAO;EACzE;EAEA,OAAOrD;CACT,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './AppearancePanel.style.less';
3
+ export declare const AppearancePanel: React.FC;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './GeneralPanel.style.less';
3
+ export declare const GeneralPanel: React.FC;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './LayoutPanel.style.less';
3
+ export declare const LayoutPanel: React.FC;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './ShortcutKeyPanel.style.less';
3
+ export declare const ShortcutKeyPanel: React.FC;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './PreferencesPanel.style.less';
3
+ interface PreferencesPanelProps {
4
+ open: boolean;
5
+ onClose: () => void;
6
+ }
7
+ export declare const PreferencesPanel: React.FC<PreferencesPanelProps>;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export interface ThemeProviderProps {
3
+ children: React.ReactNode;
4
+ }
5
+ /**
6
+ * 全局主题提供者
7
+ * 负责:AntD 主题动态切换、系统深色模式同步、CSS 滤镜、水印、国际化
8
+ */
9
+ export declare const ThemeProvider: ({ children }: ThemeProviderProps) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from "./PreferencesPanel";
2
+ export * from "./ThemeProvider";
@@ -0,0 +1,24 @@
1
+ import type { BuiltinThemeType } from '../types';
2
+ interface BuiltinThemePreset {
3
+ color: string;
4
+ darkPrimaryColor?: string;
5
+ primaryColor?: string;
6
+ type: BuiltinThemeType;
7
+ }
8
+ declare const BUILT_IN_THEME_PRESETS: BuiltinThemePreset[];
9
+ export declare const COLOR_PRESETS: BuiltinThemePreset[];
10
+ /**
11
+ * 「次要文字」档(docs/design-language.md §2.2)。
12
+ *
13
+ * 浅色侧不直接用 gray-500 #6B7280:它是按白底量的,实测离开白底就掉下 4.5——
14
+ * 白 4.83 / 页面大底 #F5F5F5 4.43 / 卡片灰 #F0F2F5 4.31 / 标签栏 #F0F0F0 4.24。
15
+ * 沿同一色相压暗到 #676E7C 后四处全部达标:5.12 / 4.70 / 4.57 / 4.50(数值由
16
+ * `node .zcode/tmp/hue-calc.mjs` 同口径的 sRGB 相对亮度算出)。
17
+ * 三端共用这两个值(vue-element 的 --el-text-color-secondary、vue-vben 的 --gray-*),
18
+ * 改动须同步 docs/design-language.md §2.2 与三端。
19
+ */
20
+ export declare const SECONDARY_TEXT_LIGHT = "#676E7C";
21
+ /** 暗色侧的次要文字 = §2.3 的 #8B949E(L0 6.23 / L1 5.77 / L2 5.34 / L3 4.77 全达标) */
22
+ export declare const SECONDARY_TEXT_DARK = "#8B949E";
23
+ export { BUILT_IN_THEME_PRESETS };
24
+ export type { BuiltinThemePreset };
@@ -0,0 +1,32 @@
1
+ import type { ThemeConfig } from 'antd';
2
+ /**
3
+ * 暗黑模式扩展色板 —— 暗夜蓝黑大底 + gray 系一楼(2026-08-24 定稿)
4
+ *
5
+ * L0 #0B0F19 地面:全局大背景(暗夜蓝黑,最暗)
6
+ * L1 #111827 一楼:搜索卡片 + 抽屉 + 表格容器(gray-900,比大底微亮)
7
+ * L2 #161F33 二楼:输入框/下拉框(比卡片微亮,"浮起"式,避免黑洞感)
8
+ * L3 #1F2937 表头独立次级深色;#1C2128 下拉/弹窗浮层
9
+ *
10
+ * 主色 hsl(212 100% 45%)(#006BE6,见 docs/design-language.md);文字基色 #F8FAFC;placeholder #6E7681
11
+ */
12
+ export declare const DARK_PALETTE: {
13
+ readonly bgLayout: "#0B0F19";
14
+ readonly bgNav: "#111827";
15
+ readonly bgSurface: "#111827";
16
+ readonly bgElevated: "#1C2128";
17
+ readonly bgInset: "#111827";
18
+ readonly borderInput: "rgba(148, 163, 184, 0.22)";
19
+ readonly borderInputHover: "rgba(148, 163, 184, 0.4)";
20
+ readonly borderCard: "rgba(255, 255, 255, 0.08)";
21
+ readonly textPrimary: "#F8FAFC";
22
+ readonly textSecondary: "#8B949E";
23
+ readonly textTertiary: "#6E7681";
24
+ readonly placeholder: "#6E7681";
25
+ readonly accentBlue: "#006BE6";
26
+ };
27
+ /**
28
+ * 暗黑模式扩展 token —— 叠加在 theme.darkAlgorithm 之上的精调
29
+ * (用户 2026-08-24 定稿:暗夜蓝黑大底 + gray 一楼;主色 2026-09-08 起对齐设计语言规范)
30
+ */
31
+ export declare const darkThemeTokens: ThemeConfig['token'];
32
+ export declare const darkThemeComponents: ThemeConfig['components'];
@@ -0,0 +1,3 @@
1
+ import type { Preferences } from "../types";
2
+ declare const defaultPreferences: Preferences;
3
+ export { defaultPreferences };
@@ -0,0 +1,4 @@
1
+ export * from './constants';
2
+ export * from './darkTheme';
3
+ export * from './default';
4
+ export * from './lightTheme';
@@ -0,0 +1,33 @@
1
+ import type { ThemeConfig } from 'antd';
2
+ /**
3
+ * 浅色模式扩展色板 —— docs/design-language.md §2.2 的落地值
4
+ *
5
+ * canvas #F1F3F6 页面画布(卡片在其上"浮起")
6
+ * surface #FFFFFF 卡片 / 表格容器 / 顶栏 / 侧栏
7
+ * border #E4E4E7 通用边框(≈ zinc-200)
8
+ *
9
+ * 沿革:本文件 2026-10-16 之前不存在——react 端此前只有 darkTheme.ts 一套覆盖,浅色全部
10
+ * 走 antd defaultAlgorithm 派生值(实测画布 #F5F5F5、卡片边框 #F0F0F0、卡片投影 none),
11
+ * 白卡压在 #F5F5F5 上分离度只有 1.049、边框对白底 1.045,等于"没有层级系统"。
12
+ * §2.2 开头那条"react 半 ✓ … 要严格对齐需新增一套 light tokens,未做,属新工作"记录的就是这里。
13
+ */
14
+ export declare const LIGHT_PALETTE: {
15
+ readonly bgLayout: "#F1F3F6";
16
+ readonly bgSurface: "#FFFFFF";
17
+ readonly borderCard: "#E4E4E7";
18
+ };
19
+ /**
20
+ * 浅色模式扩展 token —— 叠加在 theme.defaultAlgorithm 之上
21
+ *
22
+ * 只补"层级"这一条线(画布/容器/边框/圆角),文字档不动:
23
+ * 主/常规/次要三档已由 src/styles/semantic-text.css 与 colorTextDescription
24
+ * (constants.ts 的 SECONDARY_TEXT_LIGHT)接上,再在 token 层覆盖一遍会派生出
25
+ * 第二套真相。
26
+ *
27
+ * colorTextPlaceholder 同样**故意不动**:§2.2 记的浅色档是 #9CA3AF,但 antd
28
+ * 默认的 rgba(0,0,0,.25)(合成 #BFBFBF)与已输入值 #1F2937 的分离度 6.06 倍,
29
+ * 比 #9CA3AF 的 5.78 倍更"退后"。本轮的诉求是去掉生硬、不是加重提示语,
30
+ * 钉成 #9CA3AF 会把暗色那轮刚压下去的问题在浅色侧重犯一遍。
31
+ */
32
+ export declare const lightThemeTokens: ThemeConfig['token'];
33
+ export declare const lightThemeComponents: ThemeConfig['components'];
@@ -0,0 +1,3 @@
1
+ export * from "./useLocale";
2
+ export * from "./usePreferences";
3
+ export * from "./useThemeConfig";
@@ -0,0 +1,23 @@
1
+ import type { Locale } from 'antd/es/locale';
2
+ import type { SupportedLanguagesType } from '../types/layout';
3
+ /**
4
+ * 语言切换 Hook
5
+ * 提供便捷的语言切换和管理功能,同时支持 Ant Design 国际化
6
+ */
7
+ export declare function useLocale(): {
8
+ locale: SupportedLanguagesType;
9
+ localeName: string;
10
+ antdLocale: Locale;
11
+ isZhCN: boolean;
12
+ isEnUS: boolean;
13
+ setLocale: (newLocale: SupportedLanguagesType) => void;
14
+ setZhCN: () => void;
15
+ setEnUS: () => void;
16
+ toggleLocale: () => void;
17
+ getLocaleName: (lang: SupportedLanguagesType) => string;
18
+ supportedLocales: {
19
+ value: SupportedLanguagesType;
20
+ label: string;
21
+ }[];
22
+ preferences: import("..").Preferences;
23
+ };
@@ -0,0 +1,31 @@
1
+ import type { DeepPartial, Preferences } from '../types';
2
+ /**
3
+ * 偏好设置 Hook
4
+ * 提供便捷的偏好设置访问和更新方法
5
+ */
6
+ export declare function usePreferences(): {
7
+ preferences: Preferences;
8
+ app: import("..").AppPreferences;
9
+ theme: import("..").ThemePreferences;
10
+ shortcutKeys: import("..").ShortcutKeyPreferences;
11
+ transition: import("..").TransitionPreferences;
12
+ copyright: import("..").CopyrightPreferences;
13
+ navigation: import("..").NavigationPreferences;
14
+ tabbar: import("..").TabbarPreferences;
15
+ breadcrumb: import("..").BreadcrumbPreferences;
16
+ sidebar: import("..").SidebarPreferences;
17
+ header: import("..").HeaderPreferences;
18
+ footer: import("..").FooterPreferences;
19
+ logo: import("..").LogoPreferences;
20
+ widget: import("..").WidgetPreferences;
21
+ isDark: boolean;
22
+ isMobile: boolean;
23
+ updatePreferences: (overrides: DeepPartial<Preferences>) => void;
24
+ resetPreferences: () => void;
25
+ getPreference: <K extends keyof Preferences>(key: K) => Preferences[K];
26
+ updateTheme: (themeOverrides: DeepPartial<Preferences["theme"]>) => void;
27
+ updateApp: (appOverrides: DeepPartial<Preferences["app"]>) => void;
28
+ toggleTheme: () => void;
29
+ setThemeMode: (mode: Preferences["theme"]["mode"]) => void;
30
+ setLanguage: (locale: Preferences["app"]["locale"]) => void;
31
+ };
@@ -0,0 +1,2 @@
1
+ import { type ThemeConfig } from 'antd';
2
+ export declare const useThemeConfig: () => ThemeConfig;
@@ -0,0 +1,5 @@
1
+ export * from "./types";
2
+ export * from "./config";
3
+ export * from "./hooks";
4
+ export * from "./store";
5
+ export * from "./components";
@@ -0,0 +1,24 @@
1
+ import type { DeepPartial, Preferences } from '../types';
2
+ export interface PreferencesState {
3
+ preferences: Preferences;
4
+ setPreferences: (overrides: DeepPartial<Preferences>) => void;
5
+ resetPreferences: () => void;
6
+ getPreference: <K extends keyof Preferences>(key: K) => Preferences[K];
7
+ }
8
+ export declare const usePreferencesStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<PreferencesState>, "setState" | "persist"> & {
9
+ setState(partial: PreferencesState | Partial<PreferencesState> | ((state: PreferencesState) => PreferencesState | Partial<PreferencesState>), replace?: false | undefined): unknown;
10
+ setState(state: PreferencesState | ((state: PreferencesState) => PreferencesState), replace: true): unknown;
11
+ persist: {
12
+ setOptions: (options: Partial<import("zustand/middleware").PersistOptions<PreferencesState, {
13
+ preferences: Preferences;
14
+ }, unknown>>) => void;
15
+ clearStorage: () => void;
16
+ rehydrate: () => Promise<void>;
17
+ hasHydrated: () => boolean;
18
+ onHydrate: (fn: (state: PreferencesState) => void) => () => void;
19
+ onFinishHydration: (fn: (state: PreferencesState) => void) => () => void;
20
+ getOptions: () => Partial<import("zustand/middleware").PersistOptions<PreferencesState, {
21
+ preferences: Preferences;
22
+ }, unknown>>;
23
+ };
24
+ }>;
@@ -0,0 +1,17 @@
1
+ export interface ThemeTransitionOrigin {
2
+ x: number;
3
+ y: number;
4
+ }
5
+ export interface ThemeTransitionOptions {
6
+ /** 执行状态更新的函数,内部会以 flushSync 包裹以保证过渡快照时机 */
7
+ update: () => void;
8
+ /** 动效圆心(通常是点击点);缺省时取视口中心 */
9
+ origin?: ThemeTransitionOrigin;
10
+ }
11
+ /**
12
+ * 主题切换的 View Transitions 圆形扩散动效(ele/ThemeSwitch 风格):
13
+ * 始终让新画面自圆心扩张覆盖旧画面。切暗时暗色从点击点立即绽开,
14
+ * 不存在"旧画面收缩"方案里点击点附近久久残留亮色的问题。
15
+ * 浏览器不支持或用户偏好减少动效(prefers-reduced-motion)时退化为直接切换。
16
+ */
17
+ export declare function startThemeViewTransition({ update, origin, }: ThemeTransitionOptions): void;