@rainte/ant 0.0.1 → 0.0.3

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 (108) hide show
  1. package/README.md +10 -27
  2. package/dist/browser-ponyfill-BhoWWtMr.js +341 -0
  3. package/dist/index-DStl3yyY.js +95046 -0
  4. package/dist/index.css +7 -0
  5. package/dist/index.js +9 -0
  6. package/dist/index.umd.cjs +600 -0
  7. package/dist/types/lib/index.d.ts +10 -0
  8. package/dist/types/src/App.d.ts +1 -0
  9. package/dist/types/src/components/Editor/index.d.ts +9 -0
  10. package/dist/types/src/components/Form/index.d.ts +7 -0
  11. package/dist/types/src/components/Provider/index.d.ts +2 -0
  12. package/dist/types/src/components/Table/index.d.ts +4 -0
  13. package/dist/types/src/components/Upload/index.d.ts +7 -0
  14. package/dist/types/src/main.d.ts +1 -0
  15. package/dist/types/src/router/index.d.ts +7 -0
  16. package/dist/types/src/utils/i18n.d.ts +70 -0
  17. package/dist/types/src/views/form/index.d.ts +1 -0
  18. package/dist/types/src/views/layout/blank/index.d.ts +1 -0
  19. package/dist/types/src/views/layout/menu/index.d.ts +1 -0
  20. package/dist/types/src/views/table/index.d.ts +1 -0
  21. package/dist/types/vite.config.d.ts +2 -0
  22. package/dist/vite.svg +1 -0
  23. package/package.json +41 -43
  24. package/.editorconfig +0 -9
  25. package/.fatherrc.ts +0 -15
  26. package/.gitattributes +0 -1
  27. package/.prettierignore +0 -7
  28. package/.prettierrc +0 -13
  29. package/.umirc.ts +0 -24
  30. package/LICENSE +0 -21
  31. package/docs/index.md +0 -9
  32. package/es/components/Editor/index.d.ts +0 -8
  33. package/es/components/Editor/index.js +0 -35
  34. package/es/components/Editor/props.d.ts +0 -13
  35. package/es/components/Editor/props.js +0 -12
  36. package/es/components/Form/index.d.ts +0 -8
  37. package/es/components/Form/index.js +0 -53
  38. package/es/components/Image/index.d.ts +0 -5
  39. package/es/components/Image/index.js +0 -14
  40. package/es/components/Table/index.d.ts +0 -9
  41. package/es/components/Table/index.js +0 -35
  42. package/es/components/Tabs/index.d.ts +0 -9
  43. package/es/components/Tabs/index.js +0 -22
  44. package/es/components/ValueType/components/Cascader.d.ts +0 -3
  45. package/es/components/ValueType/components/Cascader.js +0 -89
  46. package/es/components/ValueType/components/Editor.d.ts +0 -3
  47. package/es/components/ValueType/components/Editor.js +0 -18
  48. package/es/components/ValueType/components/TreeSelect.d.ts +0 -3
  49. package/es/components/ValueType/components/TreeSelect.js +0 -87
  50. package/es/components/ValueType/components/Upload.d.ts +0 -4
  51. package/es/components/ValueType/components/Upload.js +0 -73
  52. package/es/components/ValueType/index.d.ts +0 -15
  53. package/es/components/ValueType/index.js +0 -10
  54. package/es/index.d.ts +0 -11
  55. package/es/index.js +0 -6
  56. package/es/utils/Swr.d.ts +0 -1
  57. package/es/utils/Swr.js +0 -58
  58. package/es/utils/Tree.d.ts +0 -2
  59. package/es/utils/Tree.js +0 -65
  60. package/lib/components/Editor/index.d.ts +0 -8
  61. package/lib/components/Editor/index.js +0 -43
  62. package/lib/components/Editor/props.d.ts +0 -13
  63. package/lib/components/Editor/props.js +0 -19
  64. package/lib/components/Form/index.d.ts +0 -8
  65. package/lib/components/Form/index.js +0 -64
  66. package/lib/components/Image/index.d.ts +0 -5
  67. package/lib/components/Image/index.js +0 -22
  68. package/lib/components/Table/index.d.ts +0 -9
  69. package/lib/components/Table/index.js +0 -46
  70. package/lib/components/Tabs/index.d.ts +0 -9
  71. package/lib/components/Tabs/index.js +0 -30
  72. package/lib/components/ValueType/components/Cascader.d.ts +0 -3
  73. package/lib/components/ValueType/components/Cascader.js +0 -97
  74. package/lib/components/ValueType/components/Editor.d.ts +0 -3
  75. package/lib/components/ValueType/components/Editor.js +0 -26
  76. package/lib/components/ValueType/components/TreeSelect.d.ts +0 -3
  77. package/lib/components/ValueType/components/TreeSelect.js +0 -95
  78. package/lib/components/ValueType/components/Upload.d.ts +0 -4
  79. package/lib/components/ValueType/components/Upload.js +0 -82
  80. package/lib/components/ValueType/index.d.ts +0 -15
  81. package/lib/components/ValueType/index.js +0 -18
  82. package/lib/index.d.ts +0 -11
  83. package/lib/index.js +0 -41
  84. package/lib/utils/Swr.d.ts +0 -1
  85. package/lib/utils/Swr.js +0 -66
  86. package/lib/utils/Tree.d.ts +0 -2
  87. package/lib/utils/Tree.js +0 -73
  88. package/src/components/Editor/index.md +0 -8
  89. package/src/components/Editor/index.tsx +0 -20
  90. package/src/components/Editor/props.ts +0 -50
  91. package/src/components/Form/index.md +0 -132
  92. package/src/components/Form/index.tsx +0 -48
  93. package/src/components/Image/index.md +0 -8
  94. package/src/components/Image/index.tsx +0 -16
  95. package/src/components/Table/index.md +0 -80
  96. package/src/components/Table/index.tsx +0 -45
  97. package/src/components/Tabs/index.md +0 -24
  98. package/src/components/Tabs/index.tsx +0 -21
  99. package/src/components/ValueType/components/Cascader.tsx +0 -79
  100. package/src/components/ValueType/components/Editor.tsx +0 -18
  101. package/src/components/ValueType/components/TreeSelect.tsx +0 -74
  102. package/src/components/ValueType/components/Upload.tsx +0 -74
  103. package/src/components/ValueType/index.ts +0 -33
  104. package/src/index.ts +0 -12
  105. package/src/utils/Swr.ts +0 -29
  106. package/src/utils/Tree.ts +0 -51
  107. package/tsconfig.json +0 -31
  108. package/typings.d.ts +0 -4
package/README.md CHANGED
@@ -1,27 +1,10 @@
1
- # ant
2
-
3
- ## Getting Started
4
-
5
- Install dependencies,
6
-
7
- ```bash
8
- $ npm i
9
- ```
10
-
11
- Start the dev server,
12
-
13
- ```bash
14
- $ npm start
15
- ```
16
-
17
- Build documentation,
18
-
19
- ```bash
20
- $ npm run docs:build
21
- ```
22
-
23
- Build library via `father-build`,
24
-
25
- ```bash
26
- $ npm run build
27
- ```
1
+ # ant
2
+
3
+ Ant
4
+
5
+ ```sh
6
+ npm config set proxy http://127.0.0.1:1080
7
+ npm config set https-proxy http://127.0.0.1:1080
8
+ npm login --registry=https://registry.npmjs.org
9
+ pnpm release
10
+ ```
@@ -0,0 +1,341 @@
1
+ import { g as z } from "./index-DStl3yyY.js";
2
+ function G(w, d) {
3
+ for (var b = 0; b < d.length; b++) {
4
+ const y = d[b];
5
+ if (typeof y != "string" && !Array.isArray(y)) {
6
+ for (const h in y)
7
+ if (h !== "default" && !(h in w)) {
8
+ const p = Object.getOwnPropertyDescriptor(y, h);
9
+ p && Object.defineProperty(w, h, p.get ? p : {
10
+ enumerable: !0,
11
+ get: () => y[h]
12
+ });
13
+ }
14
+ }
15
+ }
16
+ return Object.freeze(Object.defineProperty(w, Symbol.toStringTag, { value: "Module" }));
17
+ }
18
+ var A = { exports: {} }, R;
19
+ function $() {
20
+ return R || (R = 1, function(w, d) {
21
+ var b = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof window < "u" && window, y = function() {
22
+ function p() {
23
+ this.fetch = !1, this.DOMException = b.DOMException;
24
+ }
25
+ return p.prototype = b, new p();
26
+ }();
27
+ (function(p) {
28
+ (function(u) {
29
+ var a = typeof p < "u" && p || typeof self < "u" && self || typeof a < "u" && a, f = {
30
+ searchParams: "URLSearchParams" in a,
31
+ iterable: "Symbol" in a && "iterator" in Symbol,
32
+ blob: "FileReader" in a && "Blob" in a && function() {
33
+ try {
34
+ return new Blob(), !0;
35
+ } catch {
36
+ return !1;
37
+ }
38
+ }(),
39
+ formData: "FormData" in a,
40
+ arrayBuffer: "ArrayBuffer" in a
41
+ };
42
+ function j(e) {
43
+ return e && DataView.prototype.isPrototypeOf(e);
44
+ }
45
+ if (f.arrayBuffer)
46
+ var S = [
47
+ "[object Int8Array]",
48
+ "[object Uint8Array]",
49
+ "[object Uint8ClampedArray]",
50
+ "[object Int16Array]",
51
+ "[object Uint16Array]",
52
+ "[object Int32Array]",
53
+ "[object Uint32Array]",
54
+ "[object Float32Array]",
55
+ "[object Float64Array]"
56
+ ], F = ArrayBuffer.isView || function(e) {
57
+ return e && S.indexOf(Object.prototype.toString.call(e)) > -1;
58
+ };
59
+ function v(e) {
60
+ if (typeof e != "string" && (e = String(e)), /[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e) || e === "")
61
+ throw new TypeError('Invalid character in header field name: "' + e + '"');
62
+ return e.toLowerCase();
63
+ }
64
+ function E(e) {
65
+ return typeof e != "string" && (e = String(e)), e;
66
+ }
67
+ function T(e) {
68
+ var t = {
69
+ next: function() {
70
+ var r = e.shift();
71
+ return { done: r === void 0, value: r };
72
+ }
73
+ };
74
+ return f.iterable && (t[Symbol.iterator] = function() {
75
+ return t;
76
+ }), t;
77
+ }
78
+ function s(e) {
79
+ this.map = {}, e instanceof s ? e.forEach(function(t, r) {
80
+ this.append(r, t);
81
+ }, this) : Array.isArray(e) ? e.forEach(function(t) {
82
+ this.append(t[0], t[1]);
83
+ }, this) : e && Object.getOwnPropertyNames(e).forEach(function(t) {
84
+ this.append(t, e[t]);
85
+ }, this);
86
+ }
87
+ s.prototype.append = function(e, t) {
88
+ e = v(e), t = E(t);
89
+ var r = this.map[e];
90
+ this.map[e] = r ? r + ", " + t : t;
91
+ }, s.prototype.delete = function(e) {
92
+ delete this.map[v(e)];
93
+ }, s.prototype.get = function(e) {
94
+ return e = v(e), this.has(e) ? this.map[e] : null;
95
+ }, s.prototype.has = function(e) {
96
+ return this.map.hasOwnProperty(v(e));
97
+ }, s.prototype.set = function(e, t) {
98
+ this.map[v(e)] = E(t);
99
+ }, s.prototype.forEach = function(e, t) {
100
+ for (var r in this.map)
101
+ this.map.hasOwnProperty(r) && e.call(t, this.map[r], r, this);
102
+ }, s.prototype.keys = function() {
103
+ var e = [];
104
+ return this.forEach(function(t, r) {
105
+ e.push(r);
106
+ }), T(e);
107
+ }, s.prototype.values = function() {
108
+ var e = [];
109
+ return this.forEach(function(t) {
110
+ e.push(t);
111
+ }), T(e);
112
+ }, s.prototype.entries = function() {
113
+ var e = [];
114
+ return this.forEach(function(t, r) {
115
+ e.push([r, t]);
116
+ }), T(e);
117
+ }, f.iterable && (s.prototype[Symbol.iterator] = s.prototype.entries);
118
+ function B(e) {
119
+ if (e.bodyUsed)
120
+ return Promise.reject(new TypeError("Already read"));
121
+ e.bodyUsed = !0;
122
+ }
123
+ function P(e) {
124
+ return new Promise(function(t, r) {
125
+ e.onload = function() {
126
+ t(e.result);
127
+ }, e.onerror = function() {
128
+ r(e.error);
129
+ };
130
+ });
131
+ }
132
+ function I(e) {
133
+ var t = new FileReader(), r = P(t);
134
+ return t.readAsArrayBuffer(e), r;
135
+ }
136
+ function M(e) {
137
+ var t = new FileReader(), r = P(t);
138
+ return t.readAsText(e), r;
139
+ }
140
+ function q(e) {
141
+ for (var t = new Uint8Array(e), r = new Array(t.length), n = 0; n < t.length; n++)
142
+ r[n] = String.fromCharCode(t[n]);
143
+ return r.join("");
144
+ }
145
+ function D(e) {
146
+ if (e.slice)
147
+ return e.slice(0);
148
+ var t = new Uint8Array(e.byteLength);
149
+ return t.set(new Uint8Array(e)), t.buffer;
150
+ }
151
+ function x() {
152
+ return this.bodyUsed = !1, this._initBody = function(e) {
153
+ this.bodyUsed = this.bodyUsed, this._bodyInit = e, e ? typeof e == "string" ? this._bodyText = e : f.blob && Blob.prototype.isPrototypeOf(e) ? this._bodyBlob = e : f.formData && FormData.prototype.isPrototypeOf(e) ? this._bodyFormData = e : f.searchParams && URLSearchParams.prototype.isPrototypeOf(e) ? this._bodyText = e.toString() : f.arrayBuffer && f.blob && j(e) ? (this._bodyArrayBuffer = D(e.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : f.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(e) || F(e)) ? this._bodyArrayBuffer = D(e) : this._bodyText = e = Object.prototype.toString.call(e) : this._bodyText = "", this.headers.get("content-type") || (typeof e == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : f.searchParams && URLSearchParams.prototype.isPrototypeOf(e) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
154
+ }, f.blob && (this.blob = function() {
155
+ var e = B(this);
156
+ if (e)
157
+ return e;
158
+ if (this._bodyBlob)
159
+ return Promise.resolve(this._bodyBlob);
160
+ if (this._bodyArrayBuffer)
161
+ return Promise.resolve(new Blob([this._bodyArrayBuffer]));
162
+ if (this._bodyFormData)
163
+ throw new Error("could not read FormData body as blob");
164
+ return Promise.resolve(new Blob([this._bodyText]));
165
+ }, this.arrayBuffer = function() {
166
+ if (this._bodyArrayBuffer) {
167
+ var e = B(this);
168
+ return e || (ArrayBuffer.isView(this._bodyArrayBuffer) ? Promise.resolve(
169
+ this._bodyArrayBuffer.buffer.slice(
170
+ this._bodyArrayBuffer.byteOffset,
171
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
172
+ )
173
+ ) : Promise.resolve(this._bodyArrayBuffer));
174
+ } else
175
+ return this.blob().then(I);
176
+ }), this.text = function() {
177
+ var e = B(this);
178
+ if (e)
179
+ return e;
180
+ if (this._bodyBlob)
181
+ return M(this._bodyBlob);
182
+ if (this._bodyArrayBuffer)
183
+ return Promise.resolve(q(this._bodyArrayBuffer));
184
+ if (this._bodyFormData)
185
+ throw new Error("could not read FormData body as text");
186
+ return Promise.resolve(this._bodyText);
187
+ }, f.formData && (this.formData = function() {
188
+ return this.text().then(C);
189
+ }), this.json = function() {
190
+ return this.text().then(JSON.parse);
191
+ }, this;
192
+ }
193
+ var H = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
194
+ function L(e) {
195
+ var t = e.toUpperCase();
196
+ return H.indexOf(t) > -1 ? t : e;
197
+ }
198
+ function m(e, t) {
199
+ if (!(this instanceof m))
200
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
201
+ t = t || {};
202
+ var r = t.body;
203
+ if (e instanceof m) {
204
+ if (e.bodyUsed)
205
+ throw new TypeError("Already read");
206
+ this.url = e.url, this.credentials = e.credentials, t.headers || (this.headers = new s(e.headers)), this.method = e.method, this.mode = e.mode, this.signal = e.signal, !r && e._bodyInit != null && (r = e._bodyInit, e.bodyUsed = !0);
207
+ } else
208
+ this.url = String(e);
209
+ if (this.credentials = t.credentials || this.credentials || "same-origin", (t.headers || !this.headers) && (this.headers = new s(t.headers)), this.method = L(t.method || this.method || "GET"), this.mode = t.mode || this.mode || null, this.signal = t.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && r)
210
+ throw new TypeError("Body not allowed for GET or HEAD requests");
211
+ if (this._initBody(r), (this.method === "GET" || this.method === "HEAD") && (t.cache === "no-store" || t.cache === "no-cache")) {
212
+ var n = /([?&])_=[^&]*/;
213
+ if (n.test(this.url))
214
+ this.url = this.url.replace(n, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
215
+ else {
216
+ var i = /\?/;
217
+ this.url += (i.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
218
+ }
219
+ }
220
+ }
221
+ m.prototype.clone = function() {
222
+ return new m(this, { body: this._bodyInit });
223
+ };
224
+ function C(e) {
225
+ var t = new FormData();
226
+ return e.trim().split("&").forEach(function(r) {
227
+ if (r) {
228
+ var n = r.split("="), i = n.shift().replace(/\+/g, " "), o = n.join("=").replace(/\+/g, " ");
229
+ t.append(decodeURIComponent(i), decodeURIComponent(o));
230
+ }
231
+ }), t;
232
+ }
233
+ function k(e) {
234
+ var t = new s(), r = e.replace(/\r?\n[\t ]+/g, " ");
235
+ return r.split("\r").map(function(n) {
236
+ return n.indexOf(`
237
+ `) === 0 ? n.substr(1, n.length) : n;
238
+ }).forEach(function(n) {
239
+ var i = n.split(":"), o = i.shift().trim();
240
+ if (o) {
241
+ var _ = i.join(":").trim();
242
+ t.append(o, _);
243
+ }
244
+ }), t;
245
+ }
246
+ x.call(m.prototype);
247
+ function c(e, t) {
248
+ if (!(this instanceof c))
249
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
250
+ t || (t = {}), this.type = "default", this.status = t.status === void 0 ? 200 : t.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = t.statusText === void 0 ? "" : "" + t.statusText, this.headers = new s(t.headers), this.url = t.url || "", this._initBody(e);
251
+ }
252
+ x.call(c.prototype), c.prototype.clone = function() {
253
+ return new c(this._bodyInit, {
254
+ status: this.status,
255
+ statusText: this.statusText,
256
+ headers: new s(this.headers),
257
+ url: this.url
258
+ });
259
+ }, c.error = function() {
260
+ var e = new c(null, { status: 0, statusText: "" });
261
+ return e.type = "error", e;
262
+ };
263
+ var N = [301, 302, 303, 307, 308];
264
+ c.redirect = function(e, t) {
265
+ if (N.indexOf(t) === -1)
266
+ throw new RangeError("Invalid status code");
267
+ return new c(null, { status: t, headers: { location: e } });
268
+ }, u.DOMException = a.DOMException;
269
+ try {
270
+ new u.DOMException();
271
+ } catch {
272
+ u.DOMException = function(t, r) {
273
+ this.message = t, this.name = r;
274
+ var n = Error(t);
275
+ this.stack = n.stack;
276
+ }, u.DOMException.prototype = Object.create(Error.prototype), u.DOMException.prototype.constructor = u.DOMException;
277
+ }
278
+ function O(e, t) {
279
+ return new Promise(function(r, n) {
280
+ var i = new m(e, t);
281
+ if (i.signal && i.signal.aborted)
282
+ return n(new u.DOMException("Aborted", "AbortError"));
283
+ var o = new XMLHttpRequest();
284
+ function _() {
285
+ o.abort();
286
+ }
287
+ o.onload = function() {
288
+ var l = {
289
+ status: o.status,
290
+ statusText: o.statusText,
291
+ headers: k(o.getAllResponseHeaders() || "")
292
+ };
293
+ l.url = "responseURL" in o ? o.responseURL : l.headers.get("X-Request-URL");
294
+ var g = "response" in o ? o.response : o.responseText;
295
+ setTimeout(function() {
296
+ r(new c(g, l));
297
+ }, 0);
298
+ }, o.onerror = function() {
299
+ setTimeout(function() {
300
+ n(new TypeError("Network request failed"));
301
+ }, 0);
302
+ }, o.ontimeout = function() {
303
+ setTimeout(function() {
304
+ n(new TypeError("Network request failed"));
305
+ }, 0);
306
+ }, o.onabort = function() {
307
+ setTimeout(function() {
308
+ n(new u.DOMException("Aborted", "AbortError"));
309
+ }, 0);
310
+ };
311
+ function V(l) {
312
+ try {
313
+ return l === "" && a.location.href ? a.location.href : l;
314
+ } catch {
315
+ return l;
316
+ }
317
+ }
318
+ o.open(i.method, V(i.url), !0), i.credentials === "include" ? o.withCredentials = !0 : i.credentials === "omit" && (o.withCredentials = !1), "responseType" in o && (f.blob ? o.responseType = "blob" : f.arrayBuffer && i.headers.get("Content-Type") && i.headers.get("Content-Type").indexOf("application/octet-stream") !== -1 && (o.responseType = "arraybuffer")), t && typeof t.headers == "object" && !(t.headers instanceof s) ? Object.getOwnPropertyNames(t.headers).forEach(function(l) {
319
+ o.setRequestHeader(l, E(t.headers[l]));
320
+ }) : i.headers.forEach(function(l, g) {
321
+ o.setRequestHeader(g, l);
322
+ }), i.signal && (i.signal.addEventListener("abort", _), o.onreadystatechange = function() {
323
+ o.readyState === 4 && i.signal.removeEventListener("abort", _);
324
+ }), o.send(typeof i._bodyInit > "u" ? null : i._bodyInit);
325
+ });
326
+ }
327
+ return O.polyfill = !0, a.fetch || (a.fetch = O, a.Headers = s, a.Request = m, a.Response = c), u.Headers = s, u.Request = m, u.Response = c, u.fetch = O, u;
328
+ })({});
329
+ })(y), y.fetch.ponyfill = !0, delete y.fetch.polyfill;
330
+ var h = b.fetch ? b : y;
331
+ d = h.fetch, d.default = h.fetch, d.fetch = h.fetch, d.Headers = h.Headers, d.Request = h.Request, d.Response = h.Response, w.exports = d;
332
+ }(A, A.exports)), A.exports;
333
+ }
334
+ var U = $();
335
+ const X = /* @__PURE__ */ z(U), K = /* @__PURE__ */ G({
336
+ __proto__: null,
337
+ default: X
338
+ }, [U]);
339
+ export {
340
+ K as b
341
+ };