add all frontend files

This commit is contained in:
2026-01-17 15:16:36 -05:00
parent ff16ae7858
commit e40287e4aa
25704 changed files with 1935289 additions and 0 deletions

1
node_modules/.bin/acorn generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../acorn/bin/acorn

1
node_modules/.bin/baseline-browser-mapping generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../baseline-browser-mapping/dist/cli.js

1
node_modules/.bin/browserslist generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../browserslist/cli.js

1
node_modules/.bin/esbuild generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../esbuild/bin/esbuild

1
node_modules/.bin/eslint generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../eslint/bin/eslint.js

1
node_modules/.bin/js-yaml generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../js-yaml/bin/js-yaml.js

1
node_modules/.bin/jsesc generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../jsesc/bin/jsesc

1
node_modules/.bin/json5 generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../json5/lib/cli.js

1
node_modules/.bin/loose-envify generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../loose-envify/cli.js

1
node_modules/.bin/nanoid generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../nanoid/bin/nanoid.cjs

1
node_modules/.bin/node-which generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../which/bin/node-which

1
node_modules/.bin/parser generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../@babel/parser/bin/babel-parser.js

1
node_modules/.bin/resolve generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../resolve/bin/resolve

1
node_modules/.bin/rimraf generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../rimraf/bin.js

1
node_modules/.bin/rollup generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../rollup/dist/bin/rollup

1
node_modules/.bin/semver generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../semver/bin/semver.js

1
node_modules/.bin/update-browserslist-db generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../update-browserslist-db/cli.js

1
node_modules/.bin/vite generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../vite/bin/vite.js

4922
node_modules/.package-lock.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

16920
node_modules/.vite/deps/@ant-design_icons.js generated vendored Normal file

File diff suppressed because one or more lines are too long

7
node_modules/.vite/deps/@ant-design_icons.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

67
node_modules/.vite/deps/_metadata.json generated vendored Normal file
View File

@@ -0,0 +1,67 @@
{
"hash": "2d9d43f8",
"configHash": "49acd256",
"lockfileHash": "c7b18a7c",
"browserHash": "138d8dd2",
"optimized": {
"@ant-design/icons": {
"src": "../../@ant-design/icons/es/index.js",
"file": "@ant-design_icons.js",
"fileHash": "c7caddfe",
"needsInterop": false
},
"antd": {
"src": "../../antd/es/index.js",
"file": "antd.js",
"fileHash": "4f4dcf9d",
"needsInterop": false
},
"axios": {
"src": "../../axios/index.js",
"file": "axios.js",
"fileHash": "fda5f31c",
"needsInterop": false
},
"dayjs": {
"src": "../../dayjs/dayjs.min.js",
"file": "dayjs.js",
"fileHash": "07b06578",
"needsInterop": true
},
"react": {
"src": "../../react/index.js",
"file": "react.js",
"fileHash": "fd5e07dc",
"needsInterop": true
},
"react-dom/client": {
"src": "../../react-dom/client.js",
"file": "react-dom_client.js",
"fileHash": "59cdf014",
"needsInterop": true
},
"react-router-dom": {
"src": "../../react-router-dom/dist/index.js",
"file": "react-router-dom.js",
"fileHash": "40c3ca90",
"needsInterop": false
}
},
"chunks": {
"chunk-6RFEPWM6": {
"file": "chunk-6RFEPWM6.js"
},
"chunk-QZC7O2C6": {
"file": "chunk-QZC7O2C6.js"
},
"chunk-6BKLQ22S": {
"file": "chunk-6BKLQ22S.js"
},
"chunk-DRWLMN53": {
"file": "chunk-DRWLMN53.js"
},
"chunk-G3PMV62Z": {
"file": "chunk-G3PMV62Z.js"
}
}
}

94810
node_modules/.vite/deps/antd.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

7
node_modules/.vite/deps/antd.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

2629
node_modules/.vite/deps/axios.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

7
node_modules/.vite/deps/axios.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

21629
node_modules/.vite/deps/chunk-6BKLQ22S.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

7
node_modules/.vite/deps/chunk-6BKLQ22S.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

2714
node_modules/.vite/deps/chunk-6RFEPWM6.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

7
node_modules/.vite/deps/chunk-6RFEPWM6.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

1906
node_modules/.vite/deps/chunk-DRWLMN53.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

7
node_modules/.vite/deps/chunk-DRWLMN53.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

36
node_modules/.vite/deps/chunk-G3PMV62Z.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__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(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
export {
__commonJS,
__export,
__toESM
};
//# sourceMappingURL=chunk-G3PMV62Z.js.map

7
node_modules/.vite/deps/chunk-G3PMV62Z.js.map generated vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

288
node_modules/.vite/deps/chunk-QZC7O2C6.js generated vendored Normal file
View File

@@ -0,0 +1,288 @@
import {
__commonJS
} from "./chunk-G3PMV62Z.js";
// node_modules/dayjs/dayjs.min.js
var require_dayjs_min = __commonJS({
"node_modules/dayjs/dayjs.min.js"(exports, module) {
!function(t, e) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
}(exports, function() {
"use strict";
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
} }, m = function(t2, e2, n2) {
var r2 = String(t2);
return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
}, v = { s: m, z: function(t2) {
var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
}, m: function t2(e2, n2) {
if (e2.date() < n2.date()) return -t2(n2, e2);
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
}, a: function(t2) {
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
}, p: function(t2) {
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
}, u: function(t2) {
return void 0 === t2;
} }, g = "en", D = {};
D[g] = M;
var p = "$isDayjsObject", S = function(t2) {
return t2 instanceof _ || !(!t2 || !t2[p]);
}, w = function t2(e2, n2, r2) {
var i2;
if (!e2) return g;
if ("string" == typeof e2) {
var s2 = e2.toLowerCase();
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
var u2 = e2.split("-");
if (!i2 && u2.length > 1) return t2(u2[0]);
} else {
var a2 = e2.name;
D[a2] = e2, i2 = a2;
}
return !r2 && i2 && (g = i2), i2 || !r2 && g;
}, O = function(t2, e2) {
if (S(t2)) return t2.clone();
var n2 = "object" == typeof e2 ? e2 : {};
return n2.date = t2, n2.args = arguments, new _(n2);
}, b = v;
b.l = w, b.i = S, b.w = function(t2, e2) {
return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
};
var _ = function() {
function M2(t2) {
this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
}
var m2 = M2.prototype;
return m2.parse = function(t2) {
this.$d = function(t3) {
var e2 = t3.date, n2 = t3.utc;
if (null === e2) return /* @__PURE__ */ new Date(NaN);
if (b.u(e2)) return /* @__PURE__ */ new Date();
if (e2 instanceof Date) return new Date(e2);
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
var r2 = e2.match($);
if (r2) {
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
}
}
return new Date(e2);
}(t2), this.init();
}, m2.init = function() {
var t2 = this.$d;
this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
}, m2.$utils = function() {
return b;
}, m2.isValid = function() {
return !(this.$d.toString() === l);
}, m2.isSame = function(t2, e2) {
var n2 = O(t2);
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
}, m2.isAfter = function(t2, e2) {
return O(t2) < this.startOf(e2);
}, m2.isBefore = function(t2, e2) {
return this.endOf(e2) < O(t2);
}, m2.$g = function(t2, e2, n2) {
return b.u(t2) ? this[e2] : this.set(n2, t2);
}, m2.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, m2.valueOf = function() {
return this.$d.getTime();
}, m2.startOf = function(t2, e2) {
var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
return r2 ? i2 : i2.endOf(a);
}, $2 = function(t3, e3) {
return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
switch (f2) {
case h:
return r2 ? l2(1, 0) : l2(31, 11);
case c:
return r2 ? l2(1, M3) : l2(0, M3 + 1);
case o:
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
case a:
case d:
return $2(v2 + "Hours", 0);
case u:
return $2(v2 + "Minutes", 1);
case s:
return $2(v2 + "Seconds", 2);
case i:
return $2(v2 + "Milliseconds", 3);
default:
return this.clone();
}
}, m2.endOf = function(t2) {
return this.startOf(t2, false);
}, m2.$set = function(t2, e2) {
var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
if (o2 === c || o2 === h) {
var y2 = this.clone().set(d, 1);
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
} else l2 && this.$d[l2]($2);
return this.init(), this;
}, m2.set = function(t2, e2) {
return this.clone().$set(t2, e2);
}, m2.get = function(t2) {
return this[b.p(t2)]();
}, m2.add = function(r2, f2) {
var d2, l2 = this;
r2 = Number(r2);
var $2 = b.p(f2), y2 = function(t2) {
var e2 = O(l2);
return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
};
if ($2 === c) return this.set(c, this.$M + r2);
if ($2 === h) return this.set(h, this.$y + r2);
if ($2 === a) return y2(1);
if ($2 === o) return y2(7);
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
return b.w(m3, this);
}, m2.subtract = function(t2, e2) {
return this.add(-1 * t2, e2);
}, m2.format = function(t2) {
var e2 = this, n2 = this.$locale();
if (!this.isValid()) return n2.invalidDate || l;
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
}, d2 = function(t3) {
return b.s(s2 % 12 || 12, t3, "0");
}, $2 = f2 || function(t3, e3, n3) {
var r3 = t3 < 12 ? "AM" : "PM";
return n3 ? r3.toLowerCase() : r3;
};
return r2.replace(y, function(t3, r3) {
return r3 || function(t4) {
switch (t4) {
case "YY":
return String(e2.$y).slice(-2);
case "YYYY":
return b.s(e2.$y, 4, "0");
case "M":
return a2 + 1;
case "MM":
return b.s(a2 + 1, 2, "0");
case "MMM":
return h2(n2.monthsShort, a2, c2, 3);
case "MMMM":
return h2(c2, a2);
case "D":
return e2.$D;
case "DD":
return b.s(e2.$D, 2, "0");
case "d":
return String(e2.$W);
case "dd":
return h2(n2.weekdaysMin, e2.$W, o2, 2);
case "ddd":
return h2(n2.weekdaysShort, e2.$W, o2, 3);
case "dddd":
return o2[e2.$W];
case "H":
return String(s2);
case "HH":
return b.s(s2, 2, "0");
case "h":
return d2(1);
case "hh":
return d2(2);
case "a":
return $2(s2, u2, true);
case "A":
return $2(s2, u2, false);
case "m":
return String(u2);
case "mm":
return b.s(u2, 2, "0");
case "s":
return String(e2.$s);
case "ss":
return b.s(e2.$s, 2, "0");
case "SSS":
return b.s(e2.$ms, 3, "0");
case "Z":
return i2;
}
return null;
}(t3) || i2.replace(":", "");
});
}, m2.utcOffset = function() {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
}, m2.diff = function(r2, d2, l2) {
var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
return b.m(y2, m3);
};
switch (M3) {
case h:
$2 = D2() / 12;
break;
case c:
$2 = D2();
break;
case f:
$2 = D2() / 3;
break;
case o:
$2 = (g2 - v2) / 6048e5;
break;
case a:
$2 = (g2 - v2) / 864e5;
break;
case u:
$2 = g2 / n;
break;
case s:
$2 = g2 / e;
break;
case i:
$2 = g2 / t;
break;
default:
$2 = g2;
}
return l2 ? $2 : b.a($2);
}, m2.daysInMonth = function() {
return this.endOf(c).$D;
}, m2.$locale = function() {
return D[this.$L];
}, m2.locale = function(t2, e2) {
if (!t2) return this.$L;
var n2 = this.clone(), r2 = w(t2, e2, true);
return r2 && (n2.$L = r2), n2;
}, m2.clone = function() {
return b.w(this.$d, this);
}, m2.toDate = function() {
return new Date(this.valueOf());
}, m2.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, m2.toISOString = function() {
return this.$d.toISOString();
}, m2.toString = function() {
return this.$d.toUTCString();
}, M2;
}(), k = _.prototype;
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
k[t2[1]] = function(e2) {
return this.$g(e2, t2[0], t2[1]);
};
}), O.extend = function(t2, e2) {
return t2.$i || (t2(e2, _, O), t2.$i = true), O;
}, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
return O(1e3 * t2);
}, O.en = D[g], O.Ls = D, O.p = {}, O;
});
}
});
export {
require_dayjs_min
};
//# sourceMappingURL=chunk-QZC7O2C6.js.map

7
node_modules/.vite/deps/chunk-QZC7O2C6.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

6
node_modules/.vite/deps/dayjs.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
import {
require_dayjs_min
} from "./chunk-QZC7O2C6.js";
import "./chunk-G3PMV62Z.js";
export default require_dayjs_min();
//# sourceMappingURL=dayjs.js.map

7
node_modules/.vite/deps/dayjs.js.map generated vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

3
node_modules/.vite/deps/package.json generated vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"type": "module"
}

39
node_modules/.vite/deps/react-dom_client.js generated vendored Normal file
View File

@@ -0,0 +1,39 @@
import {
require_react_dom
} from "./chunk-6BKLQ22S.js";
import "./chunk-DRWLMN53.js";
import {
__commonJS
} from "./chunk-G3PMV62Z.js";
// node_modules/react-dom/client.js
var require_client = __commonJS({
"node_modules/react-dom/client.js"(exports) {
var m = require_react_dom();
if (false) {
exports.createRoot = m.createRoot;
exports.hydrateRoot = m.hydrateRoot;
} else {
i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
exports.createRoot = function(c, o) {
i.usingClientEntryPoint = true;
try {
return m.createRoot(c, o);
} finally {
i.usingClientEntryPoint = false;
}
};
exports.hydrateRoot = function(c, h, o) {
i.usingClientEntryPoint = true;
try {
return m.hydrateRoot(c, h, o);
} finally {
i.usingClientEntryPoint = false;
}
};
}
var i;
}
});
export default require_client();
//# sourceMappingURL=react-dom_client.js.map

7
node_modules/.vite/deps/react-dom_client.js.map generated vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../react-dom/client.js"],
"sourcesContent": ["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n"],
"mappings": ";;;;;;;;;AAAA;AAAA;AAEA,QAAI,IAAI;AACR,QAAI,OAAuC;AACzC,cAAQ,aAAa,EAAE;AACvB,cAAQ,cAAc,EAAE;AAAA,IAC1B,OAAO;AACD,UAAI,EAAE;AACV,cAAQ,aAAa,SAAS,GAAG,GAAG;AAClC,UAAE,wBAAwB;AAC1B,YAAI;AACF,iBAAO,EAAE,WAAW,GAAG,CAAC;AAAA,QAC1B,UAAE;AACA,YAAE,wBAAwB;AAAA,QAC5B;AAAA,MACF;AACA,cAAQ,cAAc,SAAS,GAAG,GAAG,GAAG;AACtC,UAAE,wBAAwB;AAC1B,YAAI;AACF,iBAAO,EAAE,YAAY,GAAG,GAAG,CAAC;AAAA,QAC9B,UAAE;AACA,YAAE,wBAAwB;AAAA,QAC5B;AAAA,MACF;AAAA,IACF;AAjBM;AAAA;AAAA;",
"names": []
}

6055
node_modules/.vite/deps/react-router-dom.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

7
node_modules/.vite/deps/react-router-dom.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

6
node_modules/.vite/deps/react.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
import {
require_react
} from "./chunk-DRWLMN53.js";
import "./chunk-G3PMV62Z.js";
export default require_react();
//# sourceMappingURL=react.js.map

7
node_modules/.vite/deps/react.js.map generated vendored Normal file
View File

@@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

22
node_modules/@ant-design/colors/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
MIT LICENSE
Copyright (c) 2018-present Ant UED, https://xtech.antfin.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

119
node_modules/@ant-design/colors/README.md generated vendored Normal file
View File

@@ -0,0 +1,119 @@
<h1 align="center">Ant Design Colors</h1>
<div align="center">
:art: Color palettes calculator of [Ant Design](https://ant.design/docs/spec/colors).
[![CI status][github-action-image]][github-action-url]
[![codecov][codecov-image]][codecov-url]
[![NPM version][npm-image]][npm-url]
[![NPM downloads][download-image]][download-url]
[![][bundlephobia-image]][bundlephobia-url]
![](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
[npm-image]: http://img.shields.io/npm/v/@ant-design/colors.svg?style=flat-square
[npm-url]: http://npmjs.org/package/@ant-design/colors
[github-action-image]: https://github.com/ant-design/ant-design-colors/actions/workflows/ci.yml/badge.svg
[github-action-url]: https://github.com/ant-design/ant-design-colors/actions/workflows/ci.yml
[codecov-image]: https://img.shields.io/codecov/c/github/ant-design/ant-design-colors/main.svg?style=flat-square
[codecov-url]: https://codecov.io/gh/ant-design/ant-design-colors/tree/main
[download-image]: https://img.shields.io/npm/dm/@ant-design/colors.svg?style=flat-square
[download-url]: https://npmjs.org/package/@ant-design/colors
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@ant-design/colors?style=flat-square
[bundlephobia-url]: https://bundlephobia.com/package/@ant-design/colors
</div>
![](https://user-images.githubusercontent.com/507615/55726820-43e68400-5a43-11e9-8541-b0fc28b78f37.png)
## Install
```bash
$ npm install @ant-design/colors
// or
$ yarn add @ant-design/colors
```
## Usage
```bash
$ npm install @ant-design/colors --save
```
```js
import {
red,
volcano,
gold,
yellow,
lime,
green,
cyan,
blue,
geekblue,
purple,
magenta,
grey,
} from '@ant-design/colors';
console.log(blue); // ['#E6F4FF', '#BAE0FF', '#91CAFF', '#69B1FF', '#4096FF', '#1677FF', '#0958D9', '#003EB3', '#002C8C', '#001D66']
console.log(blue.primary); // '#1677FF'
```
```js
import { generate, presetPalettes } from '@ant-design/colors';
// Generate color palettes by a given color
const colors = generate('#1890ff');
console.log(colors); // ['#E6F7FF', '#BAE7FF', '#91D5FF', ''#69C0FF', '#40A9FF', '#1890FF', '#096DD9', '#0050B3', '#003A8C', '#002766']
console.log(presetPalettes);
/*
{
red: [...],
volcano: [...],
orange: [...],
gold: [...],
yellow: [...],
lime: [...],
green: [...],
cyan: [...],
blue: [...],
geekblue: [...],
purple: [...],
magenta: [...],
}
*/
```
```js
import { generate, presetDarkPalettes } from '@ant-design/colors';
// Generate dark color palettes by a given color
const colors = generate('#1890ff', {
theme: 'dark',
backgroundColor: '#141414',
});
console.log(colors); // ['#111d2c', '#112a45', '#15395b', '#164c7e', '#1765ad', '#177ddc', '#3c9ae8', '#65b7f3', '#8dcff8', '#b7e3fa']
console.log(presetDarkPalettes);
/*
{
red: [...],
volcano: [...],
orange: [...],
gold: [...],
yellow: [...],
lime: [...],
green: [...],
cyan: [...],
blue: [...],
geekblue: [...],
purple: [...],
magenta: [...],
}
*/
```
## Articles
- [Ant Design Colors](https://ant.design/docs/spec/colors)
- [Ant Design 色板生成算法演进之路](https://zhuanlan.zhihu.com/p/32422584)

8
node_modules/@ant-design/colors/es/generate.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import type { ColorInput } from '@ant-design/fast-color';
interface Opts {
theme?: 'dark' | 'default';
backgroundColor?: string;
}
export default function generate(color: ColorInput, opts?: Opts): string[];
export {};
//# sourceMappingURL=generate.d.ts.map

1
node_modules/@ant-design/colors/es/generate.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAsFzD,UAAU,IAAI;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,GAAE,IAAS,GAAG,MAAM,EAAE,CA8B7E"}

128
node_modules/@ant-design/colors/es/generate.js generated vendored Normal file
View File

@@ -0,0 +1,128 @@
import { FastColor } from '@ant-design/fast-color';
var hueStep = 2; // 色相阶梯
var saturationStep = 0.16; // 饱和度阶梯,浅色部分
var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
var lightColorCount = 5; // 浅色数量,主色上
var darkColorCount = 4; // 深色数量,主色下
// 暗色主题颜色映射关系表
var darkColorMap = [{
index: 7,
amount: 15
}, {
index: 6,
amount: 25
}, {
index: 5,
amount: 30
}, {
index: 5,
amount: 45
}, {
index: 5,
amount: 65
}, {
index: 5,
amount: 85
}, {
index: 4,
amount: 90
}, {
index: 3,
amount: 95
}, {
index: 2,
amount: 97
}, {
index: 1,
amount: 98
}];
function getHue(hsv, i, light) {
var hue;
// 根据色相不同,色相转向不同
if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
} else {
hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
}
if (hue < 0) {
hue += 360;
} else if (hue >= 360) {
hue -= 360;
}
return hue;
}
function getSaturation(hsv, i, light) {
// grey color don't change saturation
if (hsv.h === 0 && hsv.s === 0) {
return hsv.s;
}
var saturation;
if (light) {
saturation = hsv.s - saturationStep * i;
} else if (i === darkColorCount) {
saturation = hsv.s + saturationStep;
} else {
saturation = hsv.s + saturationStep2 * i;
}
// 边界值修正
if (saturation > 1) {
saturation = 1;
}
// 第一格的 s 限制在 0.06-0.1 之间
if (light && i === lightColorCount && saturation > 0.1) {
saturation = 0.1;
}
if (saturation < 0.06) {
saturation = 0.06;
}
return Math.round(saturation * 100) / 100;
}
function getValue(hsv, i, light) {
var value;
if (light) {
value = hsv.v + brightnessStep1 * i;
} else {
value = hsv.v - brightnessStep2 * i;
}
// Clamp value between 0 and 1
value = Math.max(0, Math.min(1, value));
return Math.round(value * 100) / 100;
}
export default function generate(color) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var patterns = [];
var pColor = new FastColor(color);
var hsv = pColor.toHsv();
for (var i = lightColorCount; i > 0; i -= 1) {
var c = new FastColor({
h: getHue(hsv, i, true),
s: getSaturation(hsv, i, true),
v: getValue(hsv, i, true)
});
patterns.push(c);
}
patterns.push(pColor);
for (var _i = 1; _i <= darkColorCount; _i += 1) {
var _c = new FastColor({
h: getHue(hsv, _i),
s: getSaturation(hsv, _i),
v: getValue(hsv, _i)
});
patterns.push(_c);
}
// dark theme patterns
if (opts.theme === 'dark') {
return darkColorMap.map(function (_ref) {
var index = _ref.index,
amount = _ref.amount;
return new FastColor(opts.backgroundColor || '#141414').mix(patterns[index], amount).toHexString();
});
}
return patterns.map(function (c) {
return c.toHexString();
});
}

4
node_modules/@ant-design/colors/es/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export { default as generate } from './generate';
export * from './presets';
export type * from './types';
//# sourceMappingURL=index.d.ts.map

1
node_modules/@ant-design/colors/es/index.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,WAAW,CAAA;AACzB,mBAAmB,SAAS,CAAA"}

2
node_modules/@ant-design/colors/es/index.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export { default as generate } from "./generate";
export * from "./presets";

32
node_modules/@ant-design/colors/es/presets.d.ts generated vendored Normal file
View File

@@ -0,0 +1,32 @@
import type { Palette, PalettesProps } from './types';
export declare const presetPrimaryColors: Record<string, string>;
export declare const red: Palette;
export declare const volcano: Palette;
export declare const orange: Palette;
export declare const gold: Palette;
export declare const yellow: Palette;
export declare const lime: Palette;
export declare const green: Palette;
export declare const cyan: Palette;
export declare const blue: Palette;
export declare const geekblue: Palette;
export declare const purple: Palette;
export declare const magenta: Palette;
export declare const grey: Palette;
export declare const gray: Palette;
export declare const presetPalettes: PalettesProps;
export declare const redDark: Palette;
export declare const volcanoDark: Palette;
export declare const orangeDark: Palette;
export declare const goldDark: Palette;
export declare const yellowDark: Palette;
export declare const limeDark: Palette;
export declare const greenDark: Palette;
export declare const cyanDark: Palette;
export declare const blueDark: Palette;
export declare const geekblueDark: Palette;
export declare const purpleDark: Palette;
export declare const magentaDark: Palette;
export declare const greyDark: Palette;
export declare const presetDarkPalettes: PalettesProps;
//# sourceMappingURL=presets.d.ts.map

1
node_modules/@ant-design/colors/es/presets.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["presets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEtD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CActD,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,OAWjB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,OAWrB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,OAWpB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,OAWlB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,OAWpB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,OAWlB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,OAWnB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,OAWlB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,OAWlB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,OAWpB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,OAWrB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,OAWlB,CAAC;AAGF,eAAO,MAAM,IAAI,SAAO,CAAC;AAEzB,eAAO,MAAM,cAAc,EAAE,aAc5B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,OAWrB,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,OAWzB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,OAWxB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,OAWxB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,OAWvB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,OAW1B,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,OAWxB,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,OAWzB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,aAchC,CAAC"}

100
node_modules/@ant-design/colors/es/presets.js generated vendored Normal file
View File

@@ -0,0 +1,100 @@
// Generated by script. Do NOT modify!
export var presetPrimaryColors = {
"red": "#F5222D",
"volcano": "#FA541C",
"orange": "#FA8C16",
"gold": "#FAAD14",
"yellow": "#FADB14",
"lime": "#A0D911",
"green": "#52C41A",
"cyan": "#13C2C2",
"blue": "#1677FF",
"geekblue": "#2F54EB",
"purple": "#722ED1",
"magenta": "#EB2F96",
"grey": "#666666"
};
export var red = ["#fff1f0", "#ffccc7", "#ffa39e", "#ff7875", "#ff4d4f", "#f5222d", "#cf1322", "#a8071a", "#820014", "#5c0011"];
red.primary = red[5];
export var volcano = ["#fff2e8", "#ffd8bf", "#ffbb96", "#ff9c6e", "#ff7a45", "#fa541c", "#d4380d", "#ad2102", "#871400", "#610b00"];
volcano.primary = volcano[5];
export var orange = ["#fff7e6", "#ffe7ba", "#ffd591", "#ffc069", "#ffa940", "#fa8c16", "#d46b08", "#ad4e00", "#873800", "#612500"];
orange.primary = orange[5];
export var gold = ["#fffbe6", "#fff1b8", "#ffe58f", "#ffd666", "#ffc53d", "#faad14", "#d48806", "#ad6800", "#874d00", "#613400"];
gold.primary = gold[5];
export var yellow = ["#feffe6", "#ffffb8", "#fffb8f", "#fff566", "#ffec3d", "#fadb14", "#d4b106", "#ad8b00", "#876800", "#614700"];
yellow.primary = yellow[5];
export var lime = ["#fcffe6", "#f4ffb8", "#eaff8f", "#d3f261", "#bae637", "#a0d911", "#7cb305", "#5b8c00", "#3f6600", "#254000"];
lime.primary = lime[5];
export var green = ["#f6ffed", "#d9f7be", "#b7eb8f", "#95de64", "#73d13d", "#52c41a", "#389e0d", "#237804", "#135200", "#092b00"];
green.primary = green[5];
export var cyan = ["#e6fffb", "#b5f5ec", "#87e8de", "#5cdbd3", "#36cfc9", "#13c2c2", "#08979c", "#006d75", "#00474f", "#002329"];
cyan.primary = cyan[5];
export var blue = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"];
blue.primary = blue[5];
export var geekblue = ["#f0f5ff", "#d6e4ff", "#adc6ff", "#85a5ff", "#597ef7", "#2f54eb", "#1d39c4", "#10239e", "#061178", "#030852"];
geekblue.primary = geekblue[5];
export var purple = ["#f9f0ff", "#efdbff", "#d3adf7", "#b37feb", "#9254de", "#722ed1", "#531dab", "#391085", "#22075e", "#120338"];
purple.primary = purple[5];
export var magenta = ["#fff0f6", "#ffd6e7", "#ffadd2", "#ff85c0", "#f759ab", "#eb2f96", "#c41d7f", "#9e1068", "#780650", "#520339"];
magenta.primary = magenta[5];
export var grey = ["#a6a6a6", "#999999", "#8c8c8c", "#808080", "#737373", "#666666", "#404040", "#1a1a1a", "#000000", "#000000"];
grey.primary = grey[5];
export var gray = grey;
export var presetPalettes = {
red: red,
volcano: volcano,
orange: orange,
gold: gold,
yellow: yellow,
lime: lime,
green: green,
cyan: cyan,
blue: blue,
geekblue: geekblue,
purple: purple,
magenta: magenta,
grey: grey
};
export var redDark = ["#2a1215", "#431418", "#58181c", "#791a1f", "#a61d24", "#d32029", "#e84749", "#f37370", "#f89f9a", "#fac8c3"];
redDark.primary = redDark[5];
export var volcanoDark = ["#2b1611", "#441d12", "#592716", "#7c3118", "#aa3e19", "#d84a1b", "#e87040", "#f3956a", "#f8b692", "#fad4bc"];
volcanoDark.primary = volcanoDark[5];
export var orangeDark = ["#2b1d11", "#442a11", "#593815", "#7c4a15", "#aa6215", "#d87a16", "#e89a3c", "#f3b765", "#f8cf8d", "#fae3b7"];
orangeDark.primary = orangeDark[5];
export var goldDark = ["#2b2111", "#443111", "#594214", "#7c5914", "#aa7714", "#d89614", "#e8b339", "#f3cc62", "#f8df8b", "#faedb5"];
goldDark.primary = goldDark[5];
export var yellowDark = ["#2b2611", "#443b11", "#595014", "#7c6e14", "#aa9514", "#d8bd14", "#e8d639", "#f3ea62", "#f8f48b", "#fafab5"];
yellowDark.primary = yellowDark[5];
export var limeDark = ["#1f2611", "#2e3c10", "#3e4f13", "#536d13", "#6f9412", "#8bbb11", "#a9d134", "#c9e75d", "#e4f88b", "#f0fab5"];
limeDark.primary = limeDark[5];
export var greenDark = ["#162312", "#1d3712", "#274916", "#306317", "#3c8618", "#49aa19", "#6abe39", "#8fd460", "#b2e58b", "#d5f2bb"];
greenDark.primary = greenDark[5];
export var cyanDark = ["#112123", "#113536", "#144848", "#146262", "#138585", "#13a8a8", "#33bcb7", "#58d1c9", "#84e2d8", "#b2f1e8"];
cyanDark.primary = cyanDark[5];
export var blueDark = ["#111a2c", "#112545", "#15325b", "#15417e", "#1554ad", "#1668dc", "#3c89e8", "#65a9f3", "#8dc5f8", "#b7dcfa"];
blueDark.primary = blueDark[5];
export var geekblueDark = ["#131629", "#161d40", "#1c2755", "#203175", "#263ea0", "#2b4acb", "#5273e0", "#7f9ef3", "#a8c1f8", "#d2e0fa"];
geekblueDark.primary = geekblueDark[5];
export var purpleDark = ["#1a1325", "#24163a", "#301c4d", "#3e2069", "#51258f", "#642ab5", "#854eca", "#ab7ae0", "#cda8f0", "#ebd7fa"];
purpleDark.primary = purpleDark[5];
export var magentaDark = ["#291321", "#40162f", "#551c3b", "#75204f", "#a02669", "#cb2b83", "#e0529c", "#f37fb7", "#f8a8cc", "#fad2e3"];
magentaDark.primary = magentaDark[5];
export var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
greyDark.primary = greyDark[5];
export var presetDarkPalettes = {
red: redDark,
volcano: volcanoDark,
orange: orangeDark,
gold: goldDark,
yellow: yellowDark,
lime: limeDark,
green: greenDark,
cyan: cyanDark,
blue: blueDark,
geekblue: geekblueDark,
purple: purpleDark,
magenta: magentaDark,
grey: greyDark
};

5
node_modules/@ant-design/colors/es/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export type Palette = string[] & {
primary?: string;
};
export type PalettesProps = Record<string, Palette>;
//# sourceMappingURL=types.d.ts.map

1
node_modules/@ant-design/colors/es/types.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,MAAM,EAAE,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}

1
node_modules/@ant-design/colors/es/types.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export {};

8
node_modules/@ant-design/colors/lib/generate.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import type { ColorInput } from '@ant-design/fast-color';
interface Opts {
theme?: 'dark' | 'default';
backgroundColor?: string;
}
export default function generate(color: ColorInput, opts?: Opts): string[];
export {};
//# sourceMappingURL=generate.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAsFzD,UAAU,IAAI;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,GAAE,IAAS,GAAG,MAAM,EAAE,CA8B7E"}

134
node_modules/@ant-design/colors/lib/generate.js generated vendored Normal file
View File

@@ -0,0 +1,134 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = generate;
var _fastColor = require("@ant-design/fast-color");
var hueStep = 2; // 色相阶梯
var saturationStep = 0.16; // 饱和度阶梯,浅色部分
var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
var lightColorCount = 5; // 浅色数量,主色上
var darkColorCount = 4; // 深色数量,主色下
// 暗色主题颜色映射关系表
var darkColorMap = [{
index: 7,
amount: 15
}, {
index: 6,
amount: 25
}, {
index: 5,
amount: 30
}, {
index: 5,
amount: 45
}, {
index: 5,
amount: 65
}, {
index: 5,
amount: 85
}, {
index: 4,
amount: 90
}, {
index: 3,
amount: 95
}, {
index: 2,
amount: 97
}, {
index: 1,
amount: 98
}];
function getHue(hsv, i, light) {
var hue;
// 根据色相不同,色相转向不同
if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
} else {
hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
}
if (hue < 0) {
hue += 360;
} else if (hue >= 360) {
hue -= 360;
}
return hue;
}
function getSaturation(hsv, i, light) {
// grey color don't change saturation
if (hsv.h === 0 && hsv.s === 0) {
return hsv.s;
}
var saturation;
if (light) {
saturation = hsv.s - saturationStep * i;
} else if (i === darkColorCount) {
saturation = hsv.s + saturationStep;
} else {
saturation = hsv.s + saturationStep2 * i;
}
// 边界值修正
if (saturation > 1) {
saturation = 1;
}
// 第一格的 s 限制在 0.06-0.1 之间
if (light && i === lightColorCount && saturation > 0.1) {
saturation = 0.1;
}
if (saturation < 0.06) {
saturation = 0.06;
}
return Math.round(saturation * 100) / 100;
}
function getValue(hsv, i, light) {
var value;
if (light) {
value = hsv.v + brightnessStep1 * i;
} else {
value = hsv.v - brightnessStep2 * i;
}
// Clamp value between 0 and 1
value = Math.max(0, Math.min(1, value));
return Math.round(value * 100) / 100;
}
function generate(color) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var patterns = [];
var pColor = new _fastColor.FastColor(color);
var hsv = pColor.toHsv();
for (var i = lightColorCount; i > 0; i -= 1) {
var c = new _fastColor.FastColor({
h: getHue(hsv, i, true),
s: getSaturation(hsv, i, true),
v: getValue(hsv, i, true)
});
patterns.push(c);
}
patterns.push(pColor);
for (var _i = 1; _i <= darkColorCount; _i += 1) {
var _c = new _fastColor.FastColor({
h: getHue(hsv, _i),
s: getSaturation(hsv, _i),
v: getValue(hsv, _i)
});
patterns.push(_c);
}
// dark theme patterns
if (opts.theme === 'dark') {
return darkColorMap.map(function (_ref) {
var index = _ref.index,
amount = _ref.amount;
return new _fastColor.FastColor(opts.backgroundColor || '#141414').mix(patterns[index], amount).toHexString();
});
}
return patterns.map(function (c) {
return c.toHexString();
});
}

4
node_modules/@ant-design/colors/lib/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export { default as generate } from './generate';
export * from './presets';
export type * from './types';
//# sourceMappingURL=index.d.ts.map

1
node_modules/@ant-design/colors/lib/index.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,WAAW,CAAA;AACzB,mBAAmB,SAAS,CAAA"}

28
node_modules/@ant-design/colors/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
generate: true
};
Object.defineProperty(exports, "generate", {
enumerable: true,
get: function get() {
return _generate.default;
}
});
var _generate = _interopRequireDefault(require("./generate"));
var _presets = require("./presets");
Object.keys(_presets).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _presets[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _presets[key];
}
});
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

32
node_modules/@ant-design/colors/lib/presets.d.ts generated vendored Normal file
View File

@@ -0,0 +1,32 @@
import type { Palette, PalettesProps } from './types';
export declare const presetPrimaryColors: Record<string, string>;
export declare const red: Palette;
export declare const volcano: Palette;
export declare const orange: Palette;
export declare const gold: Palette;
export declare const yellow: Palette;
export declare const lime: Palette;
export declare const green: Palette;
export declare const cyan: Palette;
export declare const blue: Palette;
export declare const geekblue: Palette;
export declare const purple: Palette;
export declare const magenta: Palette;
export declare const grey: Palette;
export declare const gray: Palette;
export declare const presetPalettes: PalettesProps;
export declare const redDark: Palette;
export declare const volcanoDark: Palette;
export declare const orangeDark: Palette;
export declare const goldDark: Palette;
export declare const yellowDark: Palette;
export declare const limeDark: Palette;
export declare const greenDark: Palette;
export declare const cyanDark: Palette;
export declare const blueDark: Palette;
export declare const geekblueDark: Palette;
export declare const purpleDark: Palette;
export declare const magentaDark: Palette;
export declare const greyDark: Palette;
export declare const presetDarkPalettes: PalettesProps;
//# sourceMappingURL=presets.d.ts.map

1
node_modules/@ant-design/colors/lib/presets.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["presets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEtD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CActD,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,OAWjB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,OAWrB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,OAWpB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,OAWlB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,OAWpB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,OAWlB,CAAC;AAGF,eAAO,MAAM,KAAK,EAAE,OAWnB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,OAWlB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,OAWlB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,MAAM,EAAE,OAWpB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,OAWrB,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE,OAWlB,CAAC;AAGF,eAAO,MAAM,IAAI,SAAO,CAAC;AAEzB,eAAO,MAAM,cAAc,EAAE,aAc5B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,OAWrB,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,OAWzB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,OAWxB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,OAWxB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,OAWvB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,OAW1B,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,OAWxB,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,OAWzB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAWtB,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,aAchC,CAAC"}

106
node_modules/@ant-design/colors/lib/presets.js generated vendored Normal file
View File

@@ -0,0 +1,106 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.yellowDark = exports.yellow = exports.volcanoDark = exports.volcano = exports.redDark = exports.red = exports.purpleDark = exports.purple = exports.presetPrimaryColors = exports.presetPalettes = exports.presetDarkPalettes = exports.orangeDark = exports.orange = exports.magentaDark = exports.magenta = exports.limeDark = exports.lime = exports.greyDark = exports.grey = exports.greenDark = exports.green = exports.gray = exports.goldDark = exports.gold = exports.geekblueDark = exports.geekblue = exports.cyanDark = exports.cyan = exports.blueDark = exports.blue = void 0;
// Generated by script. Do NOT modify!
var presetPrimaryColors = exports.presetPrimaryColors = {
"red": "#F5222D",
"volcano": "#FA541C",
"orange": "#FA8C16",
"gold": "#FAAD14",
"yellow": "#FADB14",
"lime": "#A0D911",
"green": "#52C41A",
"cyan": "#13C2C2",
"blue": "#1677FF",
"geekblue": "#2F54EB",
"purple": "#722ED1",
"magenta": "#EB2F96",
"grey": "#666666"
};
var red = exports.red = ["#fff1f0", "#ffccc7", "#ffa39e", "#ff7875", "#ff4d4f", "#f5222d", "#cf1322", "#a8071a", "#820014", "#5c0011"];
red.primary = red[5];
var volcano = exports.volcano = ["#fff2e8", "#ffd8bf", "#ffbb96", "#ff9c6e", "#ff7a45", "#fa541c", "#d4380d", "#ad2102", "#871400", "#610b00"];
volcano.primary = volcano[5];
var orange = exports.orange = ["#fff7e6", "#ffe7ba", "#ffd591", "#ffc069", "#ffa940", "#fa8c16", "#d46b08", "#ad4e00", "#873800", "#612500"];
orange.primary = orange[5];
var gold = exports.gold = ["#fffbe6", "#fff1b8", "#ffe58f", "#ffd666", "#ffc53d", "#faad14", "#d48806", "#ad6800", "#874d00", "#613400"];
gold.primary = gold[5];
var yellow = exports.yellow = ["#feffe6", "#ffffb8", "#fffb8f", "#fff566", "#ffec3d", "#fadb14", "#d4b106", "#ad8b00", "#876800", "#614700"];
yellow.primary = yellow[5];
var lime = exports.lime = ["#fcffe6", "#f4ffb8", "#eaff8f", "#d3f261", "#bae637", "#a0d911", "#7cb305", "#5b8c00", "#3f6600", "#254000"];
lime.primary = lime[5];
var green = exports.green = ["#f6ffed", "#d9f7be", "#b7eb8f", "#95de64", "#73d13d", "#52c41a", "#389e0d", "#237804", "#135200", "#092b00"];
green.primary = green[5];
var cyan = exports.cyan = ["#e6fffb", "#b5f5ec", "#87e8de", "#5cdbd3", "#36cfc9", "#13c2c2", "#08979c", "#006d75", "#00474f", "#002329"];
cyan.primary = cyan[5];
var blue = exports.blue = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"];
blue.primary = blue[5];
var geekblue = exports.geekblue = ["#f0f5ff", "#d6e4ff", "#adc6ff", "#85a5ff", "#597ef7", "#2f54eb", "#1d39c4", "#10239e", "#061178", "#030852"];
geekblue.primary = geekblue[5];
var purple = exports.purple = ["#f9f0ff", "#efdbff", "#d3adf7", "#b37feb", "#9254de", "#722ed1", "#531dab", "#391085", "#22075e", "#120338"];
purple.primary = purple[5];
var magenta = exports.magenta = ["#fff0f6", "#ffd6e7", "#ffadd2", "#ff85c0", "#f759ab", "#eb2f96", "#c41d7f", "#9e1068", "#780650", "#520339"];
magenta.primary = magenta[5];
var grey = exports.grey = ["#a6a6a6", "#999999", "#8c8c8c", "#808080", "#737373", "#666666", "#404040", "#1a1a1a", "#000000", "#000000"];
grey.primary = grey[5];
var gray = exports.gray = grey;
var presetPalettes = exports.presetPalettes = {
red: red,
volcano: volcano,
orange: orange,
gold: gold,
yellow: yellow,
lime: lime,
green: green,
cyan: cyan,
blue: blue,
geekblue: geekblue,
purple: purple,
magenta: magenta,
grey: grey
};
var redDark = exports.redDark = ["#2a1215", "#431418", "#58181c", "#791a1f", "#a61d24", "#d32029", "#e84749", "#f37370", "#f89f9a", "#fac8c3"];
redDark.primary = redDark[5];
var volcanoDark = exports.volcanoDark = ["#2b1611", "#441d12", "#592716", "#7c3118", "#aa3e19", "#d84a1b", "#e87040", "#f3956a", "#f8b692", "#fad4bc"];
volcanoDark.primary = volcanoDark[5];
var orangeDark = exports.orangeDark = ["#2b1d11", "#442a11", "#593815", "#7c4a15", "#aa6215", "#d87a16", "#e89a3c", "#f3b765", "#f8cf8d", "#fae3b7"];
orangeDark.primary = orangeDark[5];
var goldDark = exports.goldDark = ["#2b2111", "#443111", "#594214", "#7c5914", "#aa7714", "#d89614", "#e8b339", "#f3cc62", "#f8df8b", "#faedb5"];
goldDark.primary = goldDark[5];
var yellowDark = exports.yellowDark = ["#2b2611", "#443b11", "#595014", "#7c6e14", "#aa9514", "#d8bd14", "#e8d639", "#f3ea62", "#f8f48b", "#fafab5"];
yellowDark.primary = yellowDark[5];
var limeDark = exports.limeDark = ["#1f2611", "#2e3c10", "#3e4f13", "#536d13", "#6f9412", "#8bbb11", "#a9d134", "#c9e75d", "#e4f88b", "#f0fab5"];
limeDark.primary = limeDark[5];
var greenDark = exports.greenDark = ["#162312", "#1d3712", "#274916", "#306317", "#3c8618", "#49aa19", "#6abe39", "#8fd460", "#b2e58b", "#d5f2bb"];
greenDark.primary = greenDark[5];
var cyanDark = exports.cyanDark = ["#112123", "#113536", "#144848", "#146262", "#138585", "#13a8a8", "#33bcb7", "#58d1c9", "#84e2d8", "#b2f1e8"];
cyanDark.primary = cyanDark[5];
var blueDark = exports.blueDark = ["#111a2c", "#112545", "#15325b", "#15417e", "#1554ad", "#1668dc", "#3c89e8", "#65a9f3", "#8dc5f8", "#b7dcfa"];
blueDark.primary = blueDark[5];
var geekblueDark = exports.geekblueDark = ["#131629", "#161d40", "#1c2755", "#203175", "#263ea0", "#2b4acb", "#5273e0", "#7f9ef3", "#a8c1f8", "#d2e0fa"];
geekblueDark.primary = geekblueDark[5];
var purpleDark = exports.purpleDark = ["#1a1325", "#24163a", "#301c4d", "#3e2069", "#51258f", "#642ab5", "#854eca", "#ab7ae0", "#cda8f0", "#ebd7fa"];
purpleDark.primary = purpleDark[5];
var magentaDark = exports.magentaDark = ["#291321", "#40162f", "#551c3b", "#75204f", "#a02669", "#cb2b83", "#e0529c", "#f37fb7", "#f8a8cc", "#fad2e3"];
magentaDark.primary = magentaDark[5];
var greyDark = exports.greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
greyDark.primary = greyDark[5];
var presetDarkPalettes = exports.presetDarkPalettes = {
red: redDark,
volcano: volcanoDark,
orange: orangeDark,
gold: goldDark,
yellow: yellowDark,
lime: limeDark,
green: greenDark,
cyan: cyanDark,
blue: blueDark,
geekblue: geekblueDark,
purple: purpleDark,
magenta: magentaDark,
grey: greyDark
};

5
node_modules/@ant-design/colors/lib/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export type Palette = string[] & {
primary?: string;
};
export type PalettesProps = Record<string, Palette>;
//# sourceMappingURL=types.d.ts.map

1
node_modules/@ant-design/colors/lib/types.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,MAAM,EAAE,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}

5
node_modules/@ant-design/colors/lib/types.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});

50
node_modules/@ant-design/colors/package.json generated vendored Normal file
View File

@@ -0,0 +1,50 @@
{
"name": "@ant-design/colors",
"version": "7.2.1",
"description": "Color palettes calculator of Ant Design",
"homepage": "https://github.com/ant-design/ant-design-colors#readme",
"bugs": {
"url": "https://github.com/ant-design/ant-design-colors/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ant-design/ant-design-colors.git"
},
"license": "MIT",
"author": "afc163 <afc163@gmail.com>",
"main": "./lib/index",
"module": "./es/index",
"typings": "es/index.d.ts",
"files": [
"lib",
"es"
],
"scripts": {
"bench": "vitest bench",
"coverage": "npm test -- --coverage",
"compile": "father build",
"lint": "eslint src --ext .ts",
"prepare": "tsx generate-presets",
"prepublishOnly": "npm run compile && np --no-cleanup --no-publish --branch=antd-5.x",
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
"test": "jest"
},
"dependencies": {
"@ant-design/fast-color": "^2.0.6"
},
"devDependencies": {
"@ctrl/tinycolor": "^3.6.1",
"@types/jest": "^26.0.24",
"@types/node": "^20.14.9",
"@umijs/fabric": "^3.0.0",
"eslint": "^7.32.0",
"father": "^4.4.4",
"jest": "^26.6.3",
"np": "^7.7.0",
"prettier": "^2.8.8",
"ts-jest": "^26.5.6",
"tsx": "^4.16.1",
"typescript": "~5.8.2",
"vitest": "^1.6.0"
}
}

20
node_modules/@ant-design/cssinjs-utils/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

30
node_modules/@ant-design/cssinjs-utils/README.md generated vendored Normal file
View File

@@ -0,0 +1,30 @@
# @ant-design/cssinjs-utils
A cssinjs util library to support Ant Design (antd) and its ecosystem libraries.
## Install
``` bash
npm i @ant-design/cssinjs-utils --save
```
## Usage
## Example
http://localhost:8000
## Development
``` bash
npm install
npm start
```
## API
## Test Case
```
npm test
npm run coverage
```
open coverage/ dir
## License
cssinjs-util is released under the MIT license.

View File

@@ -0,0 +1,6 @@
import React from 'react';
/**
* Like `useMemo`, but this hook result will be shared across all instances.
*/
declare function useUniqueMemo<T>(memoFn: () => T, deps: React.DependencyList): T;
export default useUniqueMemo;

View File

@@ -0,0 +1,100 @@
import _typeof from "@babel/runtime/helpers/esm/typeof";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import React from 'react';
var BEAT_LIMIT = 1000 * 60 * 10;
/**
* A helper class to map keys to values.
* It supports both primitive keys and object keys.
*/
var ArrayKeyMap = /*#__PURE__*/function () {
function ArrayKeyMap() {
_classCallCheck(this, ArrayKeyMap);
_defineProperty(this, "map", new Map());
// Use WeakMap to avoid memory leak
_defineProperty(this, "objectIDMap", new WeakMap());
_defineProperty(this, "nextID", 0);
_defineProperty(this, "lastAccessBeat", new Map());
// We will clean up the cache when reach the limit
_defineProperty(this, "accessBeat", 0);
}
_createClass(ArrayKeyMap, [{
key: "set",
value: function set(keys, value) {
// New set will trigger clear
this.clear();
// Set logic
var compositeKey = this.getCompositeKey(keys);
this.map.set(compositeKey, value);
this.lastAccessBeat.set(compositeKey, Date.now());
}
}, {
key: "get",
value: function get(keys) {
var compositeKey = this.getCompositeKey(keys);
var cache = this.map.get(compositeKey);
this.lastAccessBeat.set(compositeKey, Date.now());
this.accessBeat += 1;
return cache;
}
}, {
key: "getCompositeKey",
value: function getCompositeKey(keys) {
var _this = this;
var ids = keys.map(function (key) {
if (key && _typeof(key) === 'object') {
return "obj_".concat(_this.getObjectID(key));
}
return "".concat(_typeof(key), "_").concat(key);
});
return ids.join('|');
}
}, {
key: "getObjectID",
value: function getObjectID(obj) {
if (this.objectIDMap.has(obj)) {
return this.objectIDMap.get(obj);
}
var id = this.nextID;
this.objectIDMap.set(obj, id);
this.nextID += 1;
return id;
}
}, {
key: "clear",
value: function clear() {
var _this2 = this;
if (this.accessBeat > 10000) {
var now = Date.now();
this.lastAccessBeat.forEach(function (beat, key) {
if (now - beat > BEAT_LIMIT) {
_this2.map.delete(key);
_this2.lastAccessBeat.delete(key);
}
});
this.accessBeat = 0;
}
}
}]);
return ArrayKeyMap;
}();
var uniqueMap = new ArrayKeyMap();
/**
* Like `useMemo`, but this hook result will be shared across all instances.
*/
function useUniqueMemo(memoFn, deps) {
return React.useMemo(function () {
var cachedValue = uniqueMap.get(deps);
if (cachedValue) {
return cachedValue;
}
var newValue = memoFn();
uniqueMap.set(deps, newValue);
return newValue;
}, deps);
}
export default useUniqueMemo;

View File

@@ -0,0 +1,8 @@
export type UseCSP = () => {
nonce?: string;
};
/**
* Provide a default hook since not everyone needs to config this.
*/
declare const useDefaultCSP: UseCSP;
export default useDefaultCSP;

View File

@@ -0,0 +1,7 @@
/**
* Provide a default hook since not everyone needs to config this.
*/
var useDefaultCSP = function useDefaultCSP() {
return {};
};
export default useDefaultCSP;

View File

@@ -0,0 +1,11 @@
export type UsePrefix = () => {
/**
* All the component use `@ant-design/cssinjs-utils` should have same `rootPrefixCls`.
*/
rootPrefixCls: string;
/**
* `iconPrefixCls` comes from the setting of `@ant-design/icons`.
* Here maybe little coupling but everyone need use this.
*/
iconPrefixCls: string;
};

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,20 @@
import type { Theme, TokenType } from '@ant-design/cssinjs';
import type { OverrideTokenMap, TokenMap, GlobalToken } from '../interface';
export type TokenMapWithTheme<CompTokenMap extends TokenMap, AliasToken extends TokenType, DesignToken extends TokenType> = {
[key in keyof OverrideTokenMap<CompTokenMap, AliasToken>]?: OverrideTokenMap<CompTokenMap, AliasToken>[key] & {
theme?: Theme<DesignToken, AliasToken>;
};
};
export interface UseTokenReturn<CompTokenMap extends TokenMap, AliasToken extends TokenType, DesignToken extends TokenType> {
token: GlobalToken<CompTokenMap, AliasToken>;
realToken?: GlobalToken<CompTokenMap, AliasToken>;
theme?: Theme<DesignToken, AliasToken>;
components?: TokenMapWithTheme<CompTokenMap, DesignToken, AliasToken>;
hashId?: string;
hashed?: string | boolean;
cssVar?: {
prefix?: string;
key?: string;
};
}
export type UseToken<CompTokenMap extends TokenMap, DesignToken extends TokenType, AliasToken extends TokenType> = () => UseTokenReturn<CompTokenMap, DesignToken, AliasToken>;

View File

@@ -0,0 +1 @@
export {};

6
node_modules/@ant-design/cssinjs-utils/es/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
export { default as genStyleUtils } from './util/genStyleUtils';
export { default as genCalc } from './util/calc';
export { default as statisticToken, merge as mergeToken, statistic } from './util/statistic';
export type { OverrideTokenMap, TokenMap, TokenMapKey, GlobalTokenWithComponent, ComponentToken, ComponentTokenKey, GlobalToken, } from './interface';
export type { default as AbstractCalculator } from './util/calc/calculator';
export type { FullToken, GetDefaultToken, GetDefaultTokenFn, GenStyleFn, TokenWithCommonCls, CSSUtil, } from './util/genStyleUtils';

3
node_modules/@ant-design/cssinjs-utils/es/index.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export { default as genStyleUtils } from "./util/genStyleUtils";
export { default as genCalc } from "./util/calc";
export { default as statisticToken, merge as mergeToken, statistic } from "./util/statistic";

View File

@@ -0,0 +1,10 @@
import type { TokenType } from '@ant-design/cssinjs';
export type TokenMap = Record<PropertyKey, any>;
export type TokenMapKey<CompTokenMap extends TokenMap> = Extract<keyof CompTokenMap, string>;
export type GlobalToken<CompTokenMap extends TokenMap, AliasToken extends TokenType> = AliasToken & CompTokenMap;
export type OverrideTokenMap<CompTokenMap extends TokenMap, AliasToken extends TokenType> = {
[key in keyof CompTokenMap]: Partial<CompTokenMap[key]> & Partial<AliasToken>;
};
export type GlobalTokenWithComponent<CompTokenMap extends TokenMap, AliasToken extends TokenType, C extends TokenMapKey<CompTokenMap>> = GlobalToken<CompTokenMap, AliasToken> & CompTokenMap[C];
export type ComponentToken<CompTokenMap extends TokenMap, AliasToken extends TokenType, C extends TokenMapKey<CompTokenMap>> = Exclude<OverrideTokenMap<CompTokenMap, AliasToken>[C], undefined>;
export type ComponentTokenKey<CompTokenMap extends TokenMap, AliasToken extends TokenType, C extends TokenMapKey<CompTokenMap>> = keyof ComponentToken<CompTokenMap, AliasToken, C>;

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
export type { OverrideTokenMap, TokenMap, TokenMapKey, GlobalTokenWithComponent, ComponentToken, ComponentTokenKey, GlobalToken, } from './components';
export type UseComponentStyleResult = [(node: React.ReactNode) => React.ReactElement, string];

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,15 @@
import AbstractCalculator from './calculator';
export default class CSSCalculator extends AbstractCalculator {
result: string;
unitlessCssVar: Set<string>;
lowPriority?: boolean;
constructor(num: number | string | AbstractCalculator, unitlessCssVar: Set<string>);
add(num: number | string | AbstractCalculator): this;
sub(num: number | string | AbstractCalculator): this;
mul(num: number | string | AbstractCalculator): this;
div(num: number | string | AbstractCalculator): this;
getResult(force?: boolean): string;
equal(options?: {
unit?: boolean;
}): string;
}

View File

@@ -0,0 +1,116 @@
import _typeof from "@babel/runtime/helpers/esm/typeof";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import AbstractCalculator from "./calculator";
var CALC_UNIT = 'CALC_UNIT';
var regexp = new RegExp(CALC_UNIT, 'g');
function unit(value) {
if (typeof value === 'number') {
return "".concat(value).concat(CALC_UNIT);
}
return value;
}
var CSSCalculator = /*#__PURE__*/function (_AbstractCalculator) {
_inherits(CSSCalculator, _AbstractCalculator);
var _super = _createSuper(CSSCalculator);
function CSSCalculator(num, unitlessCssVar) {
var _this;
_classCallCheck(this, CSSCalculator);
_this = _super.call(this);
_defineProperty(_assertThisInitialized(_this), "result", '');
_defineProperty(_assertThisInitialized(_this), "unitlessCssVar", void 0);
_defineProperty(_assertThisInitialized(_this), "lowPriority", void 0);
var numType = _typeof(num);
_this.unitlessCssVar = unitlessCssVar;
if (num instanceof CSSCalculator) {
_this.result = "(".concat(num.result, ")");
} else if (numType === 'number') {
_this.result = unit(num);
} else if (numType === 'string') {
_this.result = num;
}
return _this;
}
_createClass(CSSCalculator, [{
key: "add",
value: function add(num) {
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " + ").concat(num.getResult());
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " + ").concat(unit(num));
}
this.lowPriority = true;
return this;
}
}, {
key: "sub",
value: function sub(num) {
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " - ").concat(num.getResult());
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " - ").concat(unit(num));
}
this.lowPriority = true;
return this;
}
}, {
key: "mul",
value: function mul(num) {
if (this.lowPriority) {
this.result = "(".concat(this.result, ")");
}
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " * ").concat(num.getResult(true));
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " * ").concat(num);
}
this.lowPriority = false;
return this;
}
}, {
key: "div",
value: function div(num) {
if (this.lowPriority) {
this.result = "(".concat(this.result, ")");
}
if (num instanceof CSSCalculator) {
this.result = "".concat(this.result, " / ").concat(num.getResult(true));
} else if (typeof num === 'number' || typeof num === 'string') {
this.result = "".concat(this.result, " / ").concat(num);
}
this.lowPriority = false;
return this;
}
}, {
key: "getResult",
value: function getResult(force) {
return this.lowPriority || force ? "(".concat(this.result, ")") : this.result;
}
}, {
key: "equal",
value: function equal(options) {
var _this2 = this;
var _ref = options || {},
cssUnit = _ref.unit;
var mergedUnit = true;
if (typeof cssUnit === 'boolean') {
mergedUnit = cssUnit;
} else if (Array.from(this.unitlessCssVar).some(function (cssVar) {
return _this2.result.includes(cssVar);
})) {
mergedUnit = false;
}
this.result = this.result.replace(regexp, mergedUnit ? 'px' : '');
if (typeof this.lowPriority !== 'undefined') {
return "calc(".concat(this.result, ")");
}
return this.result;
}
}]);
return CSSCalculator;
}(AbstractCalculator);
export { CSSCalculator as default };

View File

@@ -0,0 +1,11 @@
import AbstractCalculator from './calculator';
declare class NumCalculator extends AbstractCalculator {
result: number;
constructor(num: number | string | AbstractCalculator);
add(num: number | string | AbstractCalculator): this;
sub(num: number | string | AbstractCalculator): this;
mul(num: number | string | AbstractCalculator): this;
div(num: number | string | AbstractCalculator): this;
equal(): number;
}
export default NumCalculator;

View File

@@ -0,0 +1,71 @@
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import AbstractCalculator from "./calculator";
var NumCalculator = /*#__PURE__*/function (_AbstractCalculator) {
_inherits(NumCalculator, _AbstractCalculator);
var _super = _createSuper(NumCalculator);
function NumCalculator(num) {
var _this;
_classCallCheck(this, NumCalculator);
_this = _super.call(this);
_defineProperty(_assertThisInitialized(_this), "result", 0);
if (num instanceof NumCalculator) {
_this.result = num.result;
} else if (typeof num === 'number') {
_this.result = num;
}
return _this;
}
_createClass(NumCalculator, [{
key: "add",
value: function add(num) {
if (num instanceof NumCalculator) {
this.result += num.result;
} else if (typeof num === 'number') {
this.result += num;
}
return this;
}
}, {
key: "sub",
value: function sub(num) {
if (num instanceof NumCalculator) {
this.result -= num.result;
} else if (typeof num === 'number') {
this.result -= num;
}
return this;
}
}, {
key: "mul",
value: function mul(num) {
if (num instanceof NumCalculator) {
this.result *= num.result;
} else if (typeof num === 'number') {
this.result *= num;
}
return this;
}
}, {
key: "div",
value: function div(num) {
if (num instanceof NumCalculator) {
this.result /= num.result;
} else if (typeof num === 'number') {
this.result /= num;
}
return this;
}
}, {
key: "equal",
value: function equal() {
return this.result;
}
}]);
return NumCalculator;
}(AbstractCalculator);
export default NumCalculator;

View File

@@ -0,0 +1,30 @@
declare abstract class AbstractCalculator {
/**
* @descCN 计算两数的和例如1 + 2
* @descEN Calculate the sum of two numbers, e.g. 1 + 2
*/
abstract add(num: number | string | AbstractCalculator): this;
/**
* @descCN 计算两数的差例如1 - 2
* @descEN Calculate the difference between two numbers, e.g. 1 - 2
*/
abstract sub(num: number | string | AbstractCalculator): this;
/**
* @descCN 计算两数的积例如1 * 2
* @descEN Calculate the product of two numbers, e.g. 1 * 2
*/
abstract mul(num: number | string | AbstractCalculator): this;
/**
* @descCN 计算两数的商例如1 / 2
* @descEN Calculate the quotient of two numbers, e.g. 1 / 2
*/
abstract div(num: number | string | AbstractCalculator): this;
/**
* @descCN 获取计算结果
* @descEN Get the calculation result
*/
abstract equal(options?: {
unit?: boolean;
}): string | number;
}
export default AbstractCalculator;

View File

@@ -0,0 +1,6 @@
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
var AbstractCalculator = /*#__PURE__*/_createClass(function AbstractCalculator() {
_classCallCheck(this, AbstractCalculator);
});
export default AbstractCalculator;

View File

@@ -0,0 +1,5 @@
import type AbstractCalculator from './calculator';
import CSSCalculator from './CSSCalculator';
import NumCalculator from './NumCalculator';
declare const genCalc: (type: 'css' | 'js', unitlessCssVar: Set<string>) => (num: number | string | AbstractCalculator) => CSSCalculator | NumCalculator;
export default genCalc;

View File

@@ -0,0 +1,9 @@
import CSSCalculator from "./CSSCalculator";
import NumCalculator from "./NumCalculator";
var genCalc = function genCalc(type, unitlessCssVar) {
var Calculator = type === 'css' ? CSSCalculator : NumCalculator;
return function (num) {
return new Calculator(num, unitlessCssVar);
};
};
export default genCalc;

View File

@@ -0,0 +1,116 @@
import React from 'react';
import type { CSSInterpolation, CSSObject, TokenType } from '@ant-design/cssinjs';
import { useStyleRegister } from '@ant-design/cssinjs';
import type { ComponentTokenKey, GlobalTokenWithComponent, TokenMap, TokenMapKey, UseComponentStyleResult } from '../interface';
import type AbstractCalculator from './calc/calculator';
import type { UseCSP } from '../hooks/useCSP';
import type { UsePrefix } from '../hooks/usePrefix';
import type { UseToken } from '../hooks/useToken';
type LayerConfig = Parameters<typeof useStyleRegister>[0]['layer'];
export interface StyleInfo {
hashId: string;
prefixCls: string;
rootPrefixCls: string;
iconPrefixCls: string;
}
export type CSSUtil = {
calc: (number: any) => AbstractCalculator;
max: (...values: (number | string)[]) => number | string;
min: (...values: (number | string)[]) => number | string;
};
export type TokenWithCommonCls<T> = T & {
/** Wrap component class with `.` prefix */
componentCls: string;
/** Origin prefix which do not have `.` prefix */
prefixCls: string;
/** Wrap icon class with `.` prefix */
iconCls: string;
/** Wrap ant prefixCls class with `.` prefix */
antCls: string;
} & CSSUtil;
export type FullToken<CompTokenMap extends TokenMap, AliasToken extends TokenType, C extends TokenMapKey<CompTokenMap>> = TokenWithCommonCls<GlobalTokenWithComponent<CompTokenMap, AliasToken, C>>;
export type GenStyleFn<CompTokenMap extends TokenMap, AliasToken extends TokenType, C extends TokenMapKey<CompTokenMap>> = (token: FullToken<CompTokenMap, AliasToken, C>, info: StyleInfo) => CSSInterpolation;
export type GetDefaultTokenFn<CompTokenMap extends TokenMap, AliasToken extends TokenType, C extends TokenMapKey<CompTokenMap>> = (token: AliasToken & Partial<CompTokenMap[C]>) => CompTokenMap[C];
export type GetDefaultToken<CompTokenMap extends TokenMap, AliasToken extends TokenType, C extends TokenMapKey<CompTokenMap>> = null | CompTokenMap[C] | GetDefaultTokenFn<CompTokenMap, AliasToken, C>;
export interface SubStyleComponentProps {
prefixCls: string;
rootCls?: string;
}
export type CSSVarRegisterProps = {
rootCls: string;
component: string;
cssVar: {
prefix?: string;
key?: string;
};
};
type GetResetStylesConfig = {
prefix: ReturnType<UsePrefix>;
csp: ReturnType<UseCSP>;
};
export type GetResetStyles<AliasToken extends TokenType> = (token: AliasToken, config?: GetResetStylesConfig) => CSSInterpolation;
export type GetCompUnitless<CompTokenMap extends TokenMap, AliasToken extends TokenType> = <C extends TokenMapKey<CompTokenMap>>(component: C | [C, string]) => Partial<Record<ComponentTokenKey<CompTokenMap, AliasToken, C>, boolean>>;
declare function genStyleUtils<CompTokenMap extends TokenMap, AliasToken extends TokenType, DesignToken extends TokenType>(config: {
usePrefix: UsePrefix;
useToken: UseToken<CompTokenMap, AliasToken, DesignToken>;
useCSP?: UseCSP;
getResetStyles?: GetResetStyles<AliasToken>;
getCommonStyle?: (token: AliasToken, componentPrefixCls: string, rootCls?: string, resetFont?: boolean) => CSSObject;
getCompUnitless?: GetCompUnitless<CompTokenMap, AliasToken>;
layer?: LayerConfig;
}): {
genStyleHooks: <C extends TokenMapKey<CompTokenMap>>(component: C | [C, string], styleFn: GenStyleFn<CompTokenMap, AliasToken, C>, getDefaultToken?: GetDefaultToken<CompTokenMap, AliasToken, C>, options?: {
resetStyle?: boolean;
resetFont?: boolean;
deprecatedTokens?: [keyof Exclude<import("../interface").OverrideTokenMap<CompTokenMap, AliasToken>[C], undefined>, keyof Exclude<import("../interface").OverrideTokenMap<CompTokenMap, AliasToken>[C], undefined>][];
/**
* Component tokens that do not need unit.
*/
unitless?: Partial<Record<keyof Exclude<import("../interface").OverrideTokenMap<CompTokenMap, AliasToken>[C], undefined>, boolean>>;
/**
* Only use component style in client side. Ignore in SSR.
*/
clientOnly?: boolean;
/**
* Set order of component style.
* @default -999
*/
order?: number;
/**
* Whether generate styles
* @default true
*/
injectStyle?: boolean;
}) => (prefixCls: string, rootCls?: string) => readonly [(node: React.ReactElement) => React.ReactElement, string, string];
genSubStyleComponent: <C_1 extends TokenMapKey<CompTokenMap>>(componentName: C_1 | [C_1, string], styleFn: GenStyleFn<CompTokenMap, AliasToken, C_1>, getDefaultToken?: GetDefaultToken<CompTokenMap, AliasToken, C_1>, options?: {
resetStyle?: boolean;
resetFont?: boolean;
deprecatedTokens?: [keyof Exclude<import("../interface").OverrideTokenMap<CompTokenMap, AliasToken>[C_1], undefined>, keyof Exclude<import("../interface").OverrideTokenMap<CompTokenMap, AliasToken>[C_1], undefined>][];
/**
* Only use component style in client side. Ignore in SSR.
*/
clientOnly?: boolean;
/**
* Set order of component style. Default is -999.
*/
order?: number;
injectStyle?: boolean;
unitless?: Partial<Record<keyof Exclude<import("../interface").OverrideTokenMap<CompTokenMap, AliasToken>[C_1], undefined>, boolean>>;
}) => React.FunctionComponent<SubStyleComponentProps>;
genComponentStyleHook: <C_2 extends TokenMapKey<CompTokenMap>>(componentName: C_2 | [C_2, string], styleFn: GenStyleFn<CompTokenMap, AliasToken, C_2>, getDefaultToken?: GetDefaultToken<CompTokenMap, AliasToken, C_2>, options?: {
resetStyle?: boolean;
resetFont?: boolean;
deprecatedTokens?: [keyof Exclude<import("../interface").OverrideTokenMap<CompTokenMap, AliasToken>[C_2], undefined>, keyof Exclude<import("../interface").OverrideTokenMap<CompTokenMap, AliasToken>[C_2], undefined>][];
/**
* Only use component style in client side. Ignore in SSR.
*/
clientOnly?: boolean;
/**
* Set order of component style. Default is -999.
*/
order?: number;
injectStyle?: boolean;
unitless?: Partial<Record<keyof Exclude<import("../interface").OverrideTokenMap<CompTokenMap, AliasToken>[C_2], undefined>, boolean>>;
}) => (prefixCls: string, rootCls?: string) => UseComponentStyleResult;
};
export default genStyleUtils;

View File

@@ -0,0 +1,245 @@
import _typeof from "@babel/runtime/helpers/esm/typeof";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import React from 'react';
import { token2CSSVar, useCSSVarRegister, useStyleRegister } from '@ant-design/cssinjs';
import genCalc from "./calc";
import getCompVarPrefix from "./getCompVarPrefix";
import getComponentToken from "./getComponentToken";
import getDefaultComponentToken from "./getDefaultComponentToken";
import genMaxMin from "./maxmin";
import statisticToken, { merge as mergeToken } from "./statistic";
import useUniqueMemo from "../_util/hooks/useUniqueMemo";
import useDefaultCSP from "../hooks/useCSP";
function genStyleUtils(config) {
// Dependency inversion for preparing basic config.
var _config$useCSP = config.useCSP,
useCSP = _config$useCSP === void 0 ? useDefaultCSP : _config$useCSP,
useToken = config.useToken,
usePrefix = config.usePrefix,
getResetStyles = config.getResetStyles,
getCommonStyle = config.getCommonStyle,
getCompUnitless = config.getCompUnitless;
function genStyleHooks(component, styleFn, getDefaultToken, options) {
var componentName = Array.isArray(component) ? component[0] : component;
function prefixToken(key) {
return "".concat(String(componentName)).concat(key.slice(0, 1).toUpperCase()).concat(key.slice(1));
}
// Fill unitless
var originUnitless = (options === null || options === void 0 ? void 0 : options.unitless) || {};
var originCompUnitless = typeof getCompUnitless === 'function' ? getCompUnitless(component) : {};
var compUnitless = _objectSpread(_objectSpread({}, originCompUnitless), {}, _defineProperty({}, prefixToken('zIndexPopup'), true));
Object.keys(originUnitless).forEach(function (key) {
compUnitless[prefixToken(key)] = originUnitless[key];
});
// Options
var mergedOptions = _objectSpread(_objectSpread({}, options), {}, {
unitless: compUnitless,
prefixToken: prefixToken
});
// Hooks
var useStyle = genComponentStyleHook(component, styleFn, getDefaultToken, mergedOptions);
var useCSSVar = genCSSVarRegister(componentName, getDefaultToken, mergedOptions);
return function (prefixCls) {
var rootCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : prefixCls;
var _useStyle = useStyle(prefixCls, rootCls),
_useStyle2 = _slicedToArray(_useStyle, 2),
hashId = _useStyle2[1];
var _useCSSVar = useCSSVar(rootCls),
_useCSSVar2 = _slicedToArray(_useCSSVar, 2),
wrapCSSVar = _useCSSVar2[0],
cssVarCls = _useCSSVar2[1];
return [wrapCSSVar, hashId, cssVarCls];
};
}
function genCSSVarRegister(component, getDefaultToken, options) {
var compUnitless = options.unitless,
_options$injectStyle = options.injectStyle,
injectStyle = _options$injectStyle === void 0 ? true : _options$injectStyle,
prefixToken = options.prefixToken,
ignore = options.ignore;
var CSSVarRegister = function CSSVarRegister(_ref) {
var rootCls = _ref.rootCls,
_ref$cssVar = _ref.cssVar,
cssVar = _ref$cssVar === void 0 ? {} : _ref$cssVar;
var _useToken = useToken(),
realToken = _useToken.realToken;
useCSSVarRegister({
path: [component],
prefix: cssVar.prefix,
key: cssVar.key,
unitless: compUnitless,
ignore: ignore,
token: realToken,
scope: rootCls
}, function () {
var defaultToken = getDefaultComponentToken(component, realToken, getDefaultToken);
var componentToken = getComponentToken(component, realToken, defaultToken, {
deprecatedTokens: options === null || options === void 0 ? void 0 : options.deprecatedTokens
});
Object.keys(defaultToken).forEach(function (key) {
componentToken[prefixToken(key)] = componentToken[key];
delete componentToken[key];
});
return componentToken;
});
return null;
};
var useCSSVar = function useCSSVar(rootCls) {
var _useToken2 = useToken(),
cssVar = _useToken2.cssVar;
return [function (node) {
return injectStyle && cssVar ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CSSVarRegister, {
rootCls: rootCls,
cssVar: cssVar,
component: component
}), node) : node;
}, cssVar === null || cssVar === void 0 ? void 0 : cssVar.key];
};
return useCSSVar;
}
function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var cells = Array.isArray(componentName) ? componentName : [componentName, componentName];
var _cells = _slicedToArray(cells, 1),
component = _cells[0];
var concatComponent = cells.join('-');
var mergedLayer = config.layer || {
name: 'antd'
};
// Return new style hook
return function (prefixCls) {
var rootCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : prefixCls;
var _useToken3 = useToken(),
theme = _useToken3.theme,
realToken = _useToken3.realToken,
hashId = _useToken3.hashId,
token = _useToken3.token,
cssVar = _useToken3.cssVar;
var _usePrefix = usePrefix(),
rootPrefixCls = _usePrefix.rootPrefixCls,
iconPrefixCls = _usePrefix.iconPrefixCls;
var csp = useCSP();
var type = cssVar ? 'css' : 'js';
// Use unique memo to share the result across all instances
var calc = useUniqueMemo(function () {
var unitlessCssVar = new Set();
if (cssVar) {
Object.keys(options.unitless || {}).forEach(function (key) {
// Some component proxy the AliasToken (e.g. Image) and some not (e.g. Modal)
// We should both pass in `unitlessCssVar` to make sure the CSSVar can be unitless.
unitlessCssVar.add(token2CSSVar(key, cssVar.prefix));
unitlessCssVar.add(token2CSSVar(key, getCompVarPrefix(component, cssVar.prefix)));
});
}
return genCalc(type, unitlessCssVar);
}, [type, component, cssVar === null || cssVar === void 0 ? void 0 : cssVar.prefix]);
var _genMaxMin = genMaxMin(type),
max = _genMaxMin.max,
min = _genMaxMin.min;
// Shared config
var sharedConfig = {
theme: theme,
token: token,
hashId: hashId,
nonce: function nonce() {
return csp.nonce;
},
clientOnly: options.clientOnly,
layer: mergedLayer,
// antd is always at top of styles
order: options.order || -999
};
// This if statement is safe, as it will only be used if the generator has the function. It's not dynamic.
if (typeof getResetStyles === 'function') {
// Generate style for all need reset tags.
useStyleRegister(_objectSpread(_objectSpread({}, sharedConfig), {}, {
clientOnly: false,
path: ['Shared', rootPrefixCls]
}), function () {
return getResetStyles(token, {
prefix: {
rootPrefixCls: rootPrefixCls,
iconPrefixCls: iconPrefixCls
},
csp: csp
});
});
}
var wrapSSR = useStyleRegister(_objectSpread(_objectSpread({}, sharedConfig), {}, {
path: [concatComponent, prefixCls, iconPrefixCls]
}), function () {
if (options.injectStyle === false) {
return [];
}
var _statisticToken = statisticToken(token),
proxyToken = _statisticToken.token,
flush = _statisticToken.flush;
var defaultComponentToken = getDefaultComponentToken(component, realToken, getDefaultToken);
var componentCls = ".".concat(prefixCls);
var componentToken = getComponentToken(component, realToken, defaultComponentToken, {
deprecatedTokens: options.deprecatedTokens
});
if (cssVar && defaultComponentToken && _typeof(defaultComponentToken) === 'object') {
Object.keys(defaultComponentToken).forEach(function (key) {
defaultComponentToken[key] = "var(".concat(token2CSSVar(key, getCompVarPrefix(component, cssVar.prefix)), ")");
});
}
var mergedToken = mergeToken(proxyToken, {
componentCls: componentCls,
prefixCls: prefixCls,
iconCls: ".".concat(iconPrefixCls),
antCls: ".".concat(rootPrefixCls),
calc: calc,
// @ts-ignore
max: max,
// @ts-ignore
min: min
}, cssVar ? defaultComponentToken : componentToken);
var styleInterpolation = styleFn(mergedToken, {
hashId: hashId,
prefixCls: prefixCls,
rootPrefixCls: rootPrefixCls,
iconPrefixCls: iconPrefixCls
});
flush(component, componentToken);
var commonStyle = typeof getCommonStyle === 'function' ? getCommonStyle(mergedToken, prefixCls, rootCls, options.resetFont) : null;
return [options.resetStyle === false ? null : commonStyle, styleInterpolation];
});
return [wrapSSR, hashId];
};
}
function genSubStyleComponent(componentName, styleFn, getDefaultToken) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var useStyle = genComponentStyleHook(componentName, styleFn, getDefaultToken, _objectSpread({
resetStyle: false,
// Sub Style should default after root one
order: -998
}, options));
var StyledComponent = function StyledComponent(_ref2) {
var prefixCls = _ref2.prefixCls,
_ref2$rootCls = _ref2.rootCls,
rootCls = _ref2$rootCls === void 0 ? prefixCls : _ref2$rootCls;
useStyle(prefixCls, rootCls);
return null;
};
if (process.env.NODE_ENV !== 'production') {
StyledComponent.displayName = "SubStyle_".concat(String(Array.isArray(componentName) ? componentName.join('.') : componentName));
}
return StyledComponent;
}
return {
genStyleHooks: genStyleHooks,
genSubStyleComponent: genSubStyleComponent,
genComponentStyleHook: genComponentStyleHook
};
}
export default genStyleUtils;

View File

@@ -0,0 +1,2 @@
declare const getCompVarPrefix: (component: string, prefix?: string) => string;
export default getCompVarPrefix;

View File

@@ -0,0 +1,4 @@
var getCompVarPrefix = function getCompVarPrefix(component, prefix) {
return "".concat([prefix, component.replace(/([A-Z]+)([A-Z][a-z]+)/g, '$1-$2').replace(/([a-z])([A-Z])/g, '$1-$2')].filter(Boolean).join('-'));
};
export default getCompVarPrefix;

Some files were not shown because too many files have changed in this diff Show More