@unicom-cloud/utils 0.1.15 → 0.1.17
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.
- package/class-name/index.js +5 -5
- package/constant/index.js +24 -2
- package/constant/platform.js +13 -12
- package/constant.js +24 -2
- package/content-disposition/index.js +3 -3
- package/date/convertTime.js +4 -4
- package/event-emitter/index.js +2 -4
- package/filesize/types/constants.d.ts +81 -0
- package/filesize/types/filesize.d.ts +97 -0
- package/index.js +66 -60
- package/js-cookie/index.d.ts +116 -0
- package/js-cookie/index.js +4 -0
- package/js-cookie/src/api.js +56 -0
- package/js-cookie/src/assign.js +11 -0
- package/js-cookie/src/converter.js +14 -0
- package/jsCookie.js +4 -0
- package/lunar/lib/Holiday.js +2 -6
- package/lunar/lib/HolidayUtil.js +113 -100
- package/lunar/lib/I18n.js +395 -975
- package/lunar/lib/JieQi.js +12 -16
- package/lunar/lib/Lunar.js +224 -672
- package/lunar/lib/LunarMonth.js +35 -98
- package/lunar/lib/LunarTime.js +24 -103
- package/lunar/lib/LunarUtil.js +426 -1728
- package/lunar/lib/LunarYear.js +473 -566
- package/lunar/lib/ShouXingUtil.js +6714 -6690
- package/lunar/lib/Solar.js +24 -49
- package/lunar/lib/SolarHalfYear.js +0 -2
- package/lunar/lib/SolarMonth.js +4 -6
- package/lunar/lib/SolarSeason.js +0 -2
- package/lunar/lib/SolarUtil.js +238 -226
- package/lunar/lib/SolarWeek.js +7 -11
- package/lunar/lib/SolarYear.js +0 -1
- package/nzh/nzh.d.ts +74 -0
- package/package.json +1 -1
- package/query-string/base.d.ts +717 -0
- package/query-string/base.js +268 -0
- package/query-string/index.d.ts +16 -0
- package/query-string/index.js +4 -0
- package/query-string/splitOnFirst.js +14 -0
- package/queryString.js +4 -0
- package/random/index.js +56 -35
- package/snapdom/src/api/preCache.js +51 -28
- package/snapdom/src/core/cache.js +1 -4
- package/snapdom/src/core/capture.js +45 -44
- package/snapdom/src/core/clone.js +82 -66
- package/snapdom/src/core/prepare.js +168 -46
- package/snapdom/src/modules/background.js +29 -19
- package/snapdom/src/modules/fonts.js +146 -91
- package/snapdom/src/modules/images.js +14 -9
- package/snapdom/src/modules/pseudo.js +55 -58
- package/snapdom/src/modules/styles.js +22 -22
- package/snapdom/src/modules/svgDefs.js +39 -20
- package/snapdom/src/utils/cssTools.js +58 -51
- package/snapdom/src/utils/helpers.js +197 -140
- package/snapdom/types/snapdom.d.ts +101 -0
- package/tinycolor/src/conversion.js +1 -1
- package/tinycolor/src/index.js +2 -19
- package/turbo-stream/src/encode.js +5 -8
- package/turbo-stream/src/shared.js +117 -119
- package/types/constant/index.d.ts +11 -0
- package/types/constant/platform.d.ts +1 -0
- package/types/index.d.ts +3 -0
- package/types/js-cookie/index.d.ts +1 -0
- package/types/js-cookie/src/api.d.mts +2 -0
- package/types/js-cookie/src/assign.d.mts +1 -0
- package/types/js-cookie/src/converter.d.mts +5 -0
- package/types/lunar/lib/Lunar.d.ts +0 -98
- package/types/lunar/lib/LunarMonth.d.ts +0 -12
- package/types/lunar/lib/LunarTime.d.ts +0 -22
- package/types/lunar/lib/LunarUtil.d.ts +0 -90
- package/types/lunar/lib/LunarYear.d.ts +0 -30
- package/types/lunar/lib/Solar.d.ts +0 -5
- package/types/query-string/base.d.ts +11 -0
- package/types/query-string/index.d.ts +2 -0
- package/types/query-string/splitOnFirst.d.ts +1 -0
- package/types/random/index.d.ts +14 -23
- package/types/snapdom/src/api/preCache.d.ts +2 -5
- package/types/snapdom/src/core/cache.d.ts +0 -3
- package/types/snapdom/src/core/clone.d.ts +1 -1
- package/types/snapdom/src/modules/background.d.ts +16 -6
- package/types/snapdom/src/modules/fonts.d.ts +5 -1
- package/types/snapdom/src/modules/pseudo.d.ts +1 -1
- package/types/snapdom/src/modules/styles.d.ts +1 -1
- package/types/snapdom/src/modules/svgDefs.d.ts +13 -13
- package/types/snapdom/src/utils/cssTools.d.ts +2 -10
- package/types/snapdom/src/utils/helpers.d.ts +13 -7
- package/types/tinycolor/src/conversion.d.ts +1 -1
- package/types/turbo-stream/src/shared.d.ts +3 -3
- package/url-toolkit/src/url-toolkit.d.ts +22 -0
package/tinycolor/src/index.js
CHANGED
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
import { numberInputToObject as d, rgbToHsv as g, rgbToHsl as u, rgbToHex as b, rgbaToHex as m, rgbToCmyk as c } from "./conversion.js";
|
|
2
2
|
import { names as $ } from "./css-color-names.js";
|
|
3
3
|
import { inputToRGB as f } from "./format-input.js";
|
|
4
|
-
import { boundAlpha as
|
|
4
|
+
import { boundAlpha as M, clamp01 as a, bound01 as l } from "./util.js";
|
|
5
5
|
class n {
|
|
6
|
-
/** red */
|
|
7
|
-
r;
|
|
8
|
-
/** green */
|
|
9
|
-
g;
|
|
10
|
-
/** blue */
|
|
11
|
-
b;
|
|
12
|
-
/** alpha */
|
|
13
|
-
a;
|
|
14
|
-
/** the format used to create the tinycolor instance */
|
|
15
|
-
format;
|
|
16
|
-
/** input passed into the constructer used to create the tinycolor instance */
|
|
17
|
-
originalInput;
|
|
18
|
-
/** the color was successfully parsed */
|
|
19
|
-
isValid;
|
|
20
|
-
gradientType;
|
|
21
|
-
/** rounded alpha */
|
|
22
|
-
roundA;
|
|
23
6
|
constructor(t = "", s = {}) {
|
|
24
7
|
if (t instanceof n)
|
|
25
8
|
return t;
|
|
@@ -64,7 +47,7 @@ class n {
|
|
|
64
47
|
* @param alpha - The new alpha value. The accepted range is 0-1.
|
|
65
48
|
*/
|
|
66
49
|
setAlpha(t) {
|
|
67
|
-
return this.a =
|
|
50
|
+
return this.a = M(t), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
68
51
|
}
|
|
69
52
|
/**
|
|
70
53
|
* Returns whether the color is monochrome.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WaitGroup as
|
|
2
|
-
const { NEGATIVE_INFINITY: ye, POSITIVE_INFINITY: ce, isNaN: Te } = Number,
|
|
1
|
+
import { WaitGroup as v, STR_UNDEFINED as h, STR_NULL as M, STR_TRUE as B, STR_FALSE as C, STR_PROMISE as b, STR_READABLE_STREAM as O, STR_ASYNC_ITERABLE as F, STR_REFERENCE_SYMBOL as $, STR_DATE as x, STR_REGEXP as G, STR_URL as J, STR_ARRAY_BUFFER as V, STR_INT_8_ARRAY as j, STR_UINT_8_ARRAY as q, STR_UINT_8_ARRAY_CLAMPED as z, STR_INT_16_ARRAY as W, STR_UINT_16_ARRAY as K, STR_INT_32_ARRAY as X, STR_UINT_32_ARRAY as Z, STR_FLOAT_32_ARRAY as H, STR_FLOAT_64_ARRAY as Q, STR_BIG_INT_64_ARRAY as k, STR_BIG_UINT_64_ARRAY as ee, STR_DATA_VIEW as te, STR_FORM_DATA as ie, SUPPORTS_FILE as ne, STR_FILE as oe, STR_BLOB as se, STR_ERROR as re, STR_SET as ae, STR_MAP as fe, STR_PLUGIN as Y, STR_NaN as pe, STR_INFINITY as Re, STR_NEGATIVE_INFINITY as _e, STR_NEGATIVE_ZERO as le, STR_BIGINT as ue, STR_SYMBOL as Se, STR_REDACTED as Ae, STR_SUCCESS as L, STR_FAILURE as U } from "./shared.js";
|
|
2
|
+
const { NEGATIVE_INFINITY: ye, POSITIVE_INFINITY: ce, isNaN: Te } = Number, P = 1, D = 2;
|
|
3
3
|
function Ne(f, { plugins: t = [], redactErrors: _ = !0, signal: p } = {}) {
|
|
4
4
|
const y = () => p?.aborted ?? !1, c = new Promise((a, E) => {
|
|
5
5
|
p?.addEventListener("abort", (r) => {
|
|
@@ -8,7 +8,7 @@ function Ne(f, { plugins: t = [], redactErrors: _ = !0, signal: p } = {}) {
|
|
|
8
8
|
});
|
|
9
9
|
return new ReadableStream({
|
|
10
10
|
async start(a) {
|
|
11
|
-
const E = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), I = { refId: 0, promiseId: 0 }, T = new
|
|
11
|
+
const E = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), I = { refId: 0, promiseId: 0 }, T = new v(), e = [], u = (o) => {
|
|
12
12
|
de(
|
|
13
13
|
o,
|
|
14
14
|
e,
|
|
@@ -27,7 +27,7 @@ function Ne(f, { plugins: t = [], redactErrors: _ = !0, signal: p } = {}) {
|
|
|
27
27
|
}, s = {
|
|
28
28
|
push: (...o) => {
|
|
29
29
|
for (const [S, d, w] of o)
|
|
30
|
-
T.add(), S ===
|
|
30
|
+
T.add(), S === P ? Promise.race([w, c]).then(
|
|
31
31
|
i.bind(null, d),
|
|
32
32
|
n.bind(null, d)
|
|
33
33
|
) : (async () => {
|
|
@@ -64,9 +64,6 @@ function Ne(f, { plugins: t = [], redactErrors: _ = !0, signal: p } = {}) {
|
|
|
64
64
|
}
|
|
65
65
|
const A = 1, m = 2;
|
|
66
66
|
class l {
|
|
67
|
-
type;
|
|
68
|
-
prefix;
|
|
69
|
-
value;
|
|
70
67
|
constructor(t, _, p) {
|
|
71
68
|
this.type = t, this.prefix = _, this.value = p;
|
|
72
69
|
}
|
|
@@ -112,7 +109,7 @@ function de(f, t, _, p, y, c, a, E) {
|
|
|
112
109
|
}
|
|
113
110
|
const n = c.promiseId++;
|
|
114
111
|
p.set(e, n), t.push(b, n.toString()), y.push([
|
|
115
|
-
|
|
112
|
+
P,
|
|
116
113
|
n,
|
|
117
114
|
e
|
|
118
115
|
]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const u = "A", T = "*", S = "J", f = "j", y = "b", A = "K", l = "V", p = "D", E = "E", w = "!", I = "false", N = "k", b = "H", L = "h", B = "F", F = "I", U = "L", Y = "G", x = "O", m = "M", D = "NaN", M = "i", P = "z", O = "null", z = "P", G = "$", g = "R", C = "<redacted>", v = "@", j = "r", q = "S", V = ":", W = "s", k = "true", H = "l", J = "g", K = "o", Q = "C", X = "u", Z = "U";
|
|
2
2
|
let a = !0;
|
|
3
3
|
try {
|
|
4
4
|
new File([], "");
|
|
@@ -6,154 +6,152 @@ try {
|
|
|
6
6
|
a = !1;
|
|
7
7
|
}
|
|
8
8
|
class $ {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
constructor() {
|
|
10
|
+
this.p = 0, this.#e = [];
|
|
11
|
+
}
|
|
12
|
+
#e;
|
|
13
|
+
#t(t) {
|
|
14
|
+
this.p === 0 ? t() : this.#e.push(t);
|
|
13
15
|
}
|
|
14
16
|
add() {
|
|
15
17
|
this.p++;
|
|
16
18
|
}
|
|
17
19
|
done() {
|
|
18
20
|
if (--this.p === 0) {
|
|
19
|
-
let
|
|
20
|
-
for (; (
|
|
21
|
-
|
|
21
|
+
let t;
|
|
22
|
+
for (; (t = this.#e.shift()) !== void 0; )
|
|
23
|
+
t();
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
wait() {
|
|
25
|
-
return new Promise(this.#
|
|
27
|
+
return new Promise(this.#t.bind(this));
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
class c {
|
|
29
|
-
promise;
|
|
30
|
-
resolve;
|
|
31
|
-
reject;
|
|
32
31
|
constructor() {
|
|
33
|
-
this.promise = new Promise((
|
|
34
|
-
this.resolve =
|
|
32
|
+
this.promise = new Promise((t, e) => {
|
|
33
|
+
this.resolve = t, this.reject = e;
|
|
35
34
|
});
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
class d {
|
|
39
|
-
|
|
40
|
-
#t =
|
|
41
|
-
#e = this.#t;
|
|
38
|
+
#e = new c();
|
|
39
|
+
#t = this.#e;
|
|
42
40
|
constructor() {
|
|
43
41
|
this.iterable = async function* () {
|
|
44
|
-
let
|
|
42
|
+
let t = this.#e;
|
|
45
43
|
for (; ; ) {
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
44
|
+
const e = await t.promise;
|
|
45
|
+
if (e.done)
|
|
48
46
|
return;
|
|
49
|
-
yield
|
|
47
|
+
yield e.value, t = e.next;
|
|
50
48
|
}
|
|
51
49
|
}.bind(this)();
|
|
52
50
|
}
|
|
53
51
|
resolve() {
|
|
54
|
-
this.#
|
|
52
|
+
this.#t.resolve({ done: !0 });
|
|
55
53
|
}
|
|
56
|
-
reject(
|
|
57
|
-
this.#
|
|
58
|
-
}), this.#
|
|
54
|
+
reject(t) {
|
|
55
|
+
this.#t.promise.catch(() => {
|
|
56
|
+
}), this.#t.reject(t);
|
|
59
57
|
}
|
|
60
|
-
yield(
|
|
61
|
-
const
|
|
62
|
-
this.#
|
|
58
|
+
yield(t) {
|
|
59
|
+
const e = new c();
|
|
60
|
+
this.#t.resolve({
|
|
63
61
|
done: !1,
|
|
64
|
-
value:
|
|
65
|
-
next:
|
|
66
|
-
}), this.#
|
|
62
|
+
value: t,
|
|
63
|
+
next: e
|
|
64
|
+
}), this.#t = e;
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
|
-
class
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
e.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
e
|
|
67
|
+
class tt extends d {
|
|
68
|
+
constructor() {
|
|
69
|
+
super(...arguments), this.readable = new ReadableStream({
|
|
70
|
+
start: async (t) => {
|
|
71
|
+
try {
|
|
72
|
+
for await (const e of this.iterable)
|
|
73
|
+
t.enqueue(e);
|
|
74
|
+
t.close();
|
|
75
|
+
} catch (e) {
|
|
76
|
+
t.error(e);
|
|
77
|
+
}
|
|
78
78
|
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
81
|
}
|
|
82
82
|
class h extends Blob {
|
|
83
|
-
promise;
|
|
84
|
-
#t;
|
|
85
83
|
#e;
|
|
84
|
+
#t;
|
|
86
85
|
#s = {};
|
|
87
|
-
constructor(
|
|
88
|
-
if (super(), typeof
|
|
89
|
-
this.promise =
|
|
90
|
-
let i =
|
|
91
|
-
typeof
|
|
92
|
-
let
|
|
93
|
-
typeof s < "u" && (
|
|
86
|
+
constructor(t, e, s, o) {
|
|
87
|
+
if (super(), typeof t < "u") {
|
|
88
|
+
this.promise = t.promise;
|
|
89
|
+
let i = t.#s.start ?? 0;
|
|
90
|
+
typeof e < "u" && (i += e), this.#s.start = i;
|
|
91
|
+
let n = t.#s.end;
|
|
92
|
+
typeof s < "u" && (n = (t.#s.start ?? 0) + s), this.#s.end = n, this.#t = o ?? t?.type, this.#e = (n ?? t.size) - i;
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
get size() {
|
|
97
|
-
if (typeof this.#
|
|
96
|
+
if (typeof this.#e > "u")
|
|
98
97
|
throw new Error("Size is not set");
|
|
99
|
-
return this.#
|
|
98
|
+
return this.#e;
|
|
100
99
|
}
|
|
101
|
-
set size(
|
|
102
|
-
this.#
|
|
100
|
+
set size(t) {
|
|
101
|
+
this.#e = t;
|
|
103
102
|
}
|
|
104
103
|
get type() {
|
|
105
|
-
if (typeof this.#
|
|
104
|
+
if (typeof this.#t > "u")
|
|
106
105
|
throw new Error("Type is not set");
|
|
107
|
-
return this.#
|
|
106
|
+
return this.#t;
|
|
108
107
|
}
|
|
109
|
-
set type(
|
|
110
|
-
this.#
|
|
108
|
+
set type(t) {
|
|
109
|
+
this.#t = t;
|
|
111
110
|
}
|
|
112
111
|
async arrayBuffer() {
|
|
113
112
|
if (!this.promise)
|
|
114
113
|
throw new Error("Promise is not set");
|
|
115
|
-
const
|
|
116
|
-
return this.#s ?
|
|
114
|
+
const t = await this.promise;
|
|
115
|
+
return this.#s ? t.slice(
|
|
117
116
|
this.#s.start,
|
|
118
117
|
this.#s.end
|
|
119
|
-
) :
|
|
118
|
+
) : t;
|
|
120
119
|
}
|
|
121
120
|
bytes() {
|
|
122
|
-
return this.arrayBuffer().then((
|
|
121
|
+
return this.arrayBuffer().then((t) => new Uint8Array(t));
|
|
123
122
|
}
|
|
124
|
-
slice(
|
|
125
|
-
return new h(this,
|
|
123
|
+
slice(t, e, s) {
|
|
124
|
+
return new h(this, t, e, s);
|
|
126
125
|
}
|
|
127
126
|
stream() {
|
|
128
127
|
return new ReadableStream({
|
|
129
|
-
start: async (
|
|
128
|
+
start: async (t) => {
|
|
130
129
|
try {
|
|
131
|
-
|
|
132
|
-
} catch (
|
|
133
|
-
|
|
130
|
+
t.enqueue(await this.bytes()), t.close();
|
|
131
|
+
} catch (e) {
|
|
132
|
+
t.error(e);
|
|
134
133
|
}
|
|
135
134
|
}
|
|
136
135
|
});
|
|
137
136
|
}
|
|
138
137
|
text() {
|
|
139
|
-
return this.bytes().then((
|
|
138
|
+
return this.bytes().then((t) => new TextDecoder().decode(t));
|
|
140
139
|
}
|
|
141
140
|
}
|
|
142
141
|
const _ = a ? File : Blob;
|
|
143
142
|
class R extends _ {
|
|
144
|
-
promise;
|
|
145
|
-
#t;
|
|
146
143
|
#e;
|
|
144
|
+
#t;
|
|
147
145
|
#s;
|
|
148
|
-
#
|
|
146
|
+
#n;
|
|
149
147
|
#i = {};
|
|
150
|
-
constructor(
|
|
151
|
-
if (a ? super([], "") : super([]), typeof
|
|
152
|
-
this.promise =
|
|
153
|
-
let i =
|
|
154
|
-
typeof
|
|
155
|
-
let
|
|
156
|
-
typeof s < "u" && (
|
|
148
|
+
constructor(t, e, s, o) {
|
|
149
|
+
if (a ? super([], "") : super([]), typeof t < "u") {
|
|
150
|
+
this.promise = t.promise;
|
|
151
|
+
let i = t.#i.start ?? 0;
|
|
152
|
+
typeof e < "u" && (i += e), this.#i.start = i;
|
|
153
|
+
let n = t.#i.end;
|
|
154
|
+
typeof s < "u" && (n = (t.#i.start ?? 0) + s), this.#i.end = n, this.#t = o ?? t?.type, this.#s = t.name, this.#n = t.lastModified;
|
|
157
155
|
}
|
|
158
156
|
}
|
|
159
157
|
get name() {
|
|
@@ -161,74 +159,74 @@ class R extends _ {
|
|
|
161
159
|
throw new Error("Name is not set");
|
|
162
160
|
return this.#s;
|
|
163
161
|
}
|
|
164
|
-
set name(
|
|
165
|
-
this.#s =
|
|
162
|
+
set name(t) {
|
|
163
|
+
this.#s = t;
|
|
166
164
|
}
|
|
167
165
|
get lastModified() {
|
|
168
|
-
if (typeof this.#
|
|
166
|
+
if (typeof this.#n > "u")
|
|
169
167
|
throw new Error("Last modified is not set");
|
|
170
|
-
return this.#
|
|
168
|
+
return this.#n;
|
|
171
169
|
}
|
|
172
|
-
set lastModified(
|
|
173
|
-
this.#
|
|
170
|
+
set lastModified(t) {
|
|
171
|
+
this.#n = t;
|
|
174
172
|
}
|
|
175
173
|
get size() {
|
|
176
|
-
if (typeof this.#
|
|
174
|
+
if (typeof this.#e > "u")
|
|
177
175
|
throw new Error("Size is not set");
|
|
178
|
-
return this.#
|
|
176
|
+
return this.#e;
|
|
179
177
|
}
|
|
180
|
-
set size(
|
|
181
|
-
this.#
|
|
178
|
+
set size(t) {
|
|
179
|
+
this.#e = t;
|
|
182
180
|
}
|
|
183
181
|
get type() {
|
|
184
|
-
if (typeof this.#
|
|
182
|
+
if (typeof this.#t > "u")
|
|
185
183
|
throw new Error("Type is not set");
|
|
186
|
-
return this.#
|
|
184
|
+
return this.#t;
|
|
187
185
|
}
|
|
188
|
-
set type(
|
|
189
|
-
this.#
|
|
186
|
+
set type(t) {
|
|
187
|
+
this.#t = t;
|
|
190
188
|
}
|
|
191
189
|
async arrayBuffer() {
|
|
192
190
|
if (!this.promise)
|
|
193
191
|
throw new Error("Promise is not set");
|
|
194
|
-
const
|
|
195
|
-
return this.#i ?
|
|
192
|
+
const t = await this.promise;
|
|
193
|
+
return this.#i ? t.slice(
|
|
196
194
|
this.#i.start,
|
|
197
195
|
this.#i.end
|
|
198
|
-
) :
|
|
196
|
+
) : t;
|
|
199
197
|
}
|
|
200
198
|
bytes() {
|
|
201
|
-
return this.arrayBuffer().then((
|
|
199
|
+
return this.arrayBuffer().then((t) => new Uint8Array(t));
|
|
202
200
|
}
|
|
203
|
-
slice(
|
|
204
|
-
return new R(this,
|
|
201
|
+
slice(t, e, s) {
|
|
202
|
+
return new R(this, t, e, s);
|
|
205
203
|
}
|
|
206
204
|
stream() {
|
|
207
205
|
return new ReadableStream({
|
|
208
|
-
start: async (
|
|
206
|
+
start: async (t) => {
|
|
209
207
|
try {
|
|
210
|
-
|
|
211
|
-
} catch (
|
|
212
|
-
|
|
208
|
+
t.enqueue(await this.bytes()), t.close();
|
|
209
|
+
} catch (e) {
|
|
210
|
+
t.error(e);
|
|
213
211
|
}
|
|
214
212
|
}
|
|
215
213
|
});
|
|
216
214
|
}
|
|
217
215
|
text() {
|
|
218
|
-
return this.bytes().then((
|
|
216
|
+
return this.bytes().then((t) => new TextDecoder().decode(t));
|
|
219
217
|
}
|
|
220
218
|
}
|
|
221
219
|
export {
|
|
222
220
|
c as Deferred,
|
|
223
221
|
d as DeferredAsyncIterable,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
222
|
+
tt as DeferredReadableStream,
|
|
223
|
+
u as STR_ARRAY_BUFFER,
|
|
224
|
+
T as STR_ASYNC_ITERABLE,
|
|
225
|
+
y as STR_BIGINT,
|
|
228
226
|
S as STR_BIG_INT_64_ARRAY,
|
|
229
227
|
f as STR_BIG_UINT_64_ARRAY,
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
A as STR_BLOB,
|
|
229
|
+
l as STR_DATA_VIEW,
|
|
232
230
|
p as STR_DATE,
|
|
233
231
|
E as STR_ERROR,
|
|
234
232
|
w as STR_FAILURE,
|
|
@@ -236,20 +234,20 @@ export {
|
|
|
236
234
|
N as STR_FILE,
|
|
237
235
|
b as STR_FLOAT_32_ARRAY,
|
|
238
236
|
L as STR_FLOAT_64_ARRAY,
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
237
|
+
B as STR_FORM_DATA,
|
|
238
|
+
F as STR_INFINITY,
|
|
239
|
+
U as STR_INT_16_ARRAY,
|
|
240
|
+
Y as STR_INT_32_ARRAY,
|
|
241
|
+
x as STR_INT_8_ARRAY,
|
|
242
|
+
m as STR_MAP,
|
|
245
243
|
M as STR_NEGATIVE_INFINITY,
|
|
246
244
|
P as STR_NEGATIVE_ZERO,
|
|
247
245
|
O as STR_NULL,
|
|
248
246
|
D as STR_NaN,
|
|
249
247
|
z as STR_PLUGIN,
|
|
250
248
|
G as STR_PROMISE,
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
g as STR_READABLE_STREAM,
|
|
250
|
+
C as STR_REDACTED,
|
|
253
251
|
v as STR_REFERENCE_SYMBOL,
|
|
254
252
|
j as STR_REGEXP,
|
|
255
253
|
q as STR_SET,
|
|
@@ -1 +1,12 @@
|
|
|
1
|
+
export * as date from "./address";
|
|
2
|
+
export * as chineseCharacters from "./chineseCharacters";
|
|
3
|
+
export * as constellations from "./constellations";
|
|
4
|
+
export * as domain from "./domain";
|
|
5
|
+
export * as identity from "./identity";
|
|
6
|
+
export * as keyboardCode from "./keyboardCode";
|
|
7
|
+
export * as licensePlate from "./licensePlate";
|
|
8
|
+
export * as name from "./name";
|
|
9
|
+
export * as platform from "./platform";
|
|
10
|
+
export * as protocol from "./protocol";
|
|
11
|
+
export * as ui from "./ui";
|
|
1
12
|
export const MATCH_MEDIA_PREFERS_COLOR_SCHEME_DARK: MediaQueryList;
|
|
@@ -6,6 +6,7 @@ export const isIOS_OS: boolean;
|
|
|
6
6
|
export const isAndroidOS: boolean;
|
|
7
7
|
export const isHarmony: boolean;
|
|
8
8
|
export const isMacOS: boolean;
|
|
9
|
+
export const isAppleDevice: boolean;
|
|
9
10
|
export const isWindowsOS: boolean;
|
|
10
11
|
export const isMobileDevice: boolean;
|
|
11
12
|
export const isPWA: boolean;
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export * as constant from "./constant";
|
|
1
2
|
export * as date from "./date";
|
|
2
3
|
export * as is from "./is";
|
|
3
4
|
export * as math from "./math";
|
|
5
|
+
export * as snapdom from "./snapdom";
|
|
4
6
|
export * as tree from "./tree";
|
|
5
7
|
export * as turboStream from "./turbo-stream";
|
|
6
8
|
export * as uiColor from "./ui-color";
|
|
@@ -11,6 +13,7 @@ export { default as clipboardCopy } from "./clipboard-copy";
|
|
|
11
13
|
export { default as decimal } from "./decimal";
|
|
12
14
|
export { default as eventEmitter } from "./event-emitter";
|
|
13
15
|
export { default as invariant } from "./invariant";
|
|
16
|
+
export { default as jsCookie } from "./js-cookie";
|
|
14
17
|
export { default as Lunar } from "./lunar";
|
|
15
18
|
export { default as md5 } from "./md5";
|
|
16
19
|
export { default as normalizeWheel } from "./normalize-wheel";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./src/api.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function _default(target: any, ...args: any[]): any;
|
|
@@ -107,66 +107,12 @@ export declare class Lunar {
|
|
|
107
107
|
getYearInChinese(): string;
|
|
108
108
|
getMonthInChinese(): string;
|
|
109
109
|
getDayInChinese(): string;
|
|
110
|
-
getPengZuGan(): string;
|
|
111
|
-
getPengZuZhi(): string;
|
|
112
|
-
getPositionXi(): string;
|
|
113
|
-
getPositionXiDesc(): string;
|
|
114
|
-
getPositionYangGui(): string;
|
|
115
|
-
getPositionYangGuiDesc(): string;
|
|
116
|
-
getPositionYinGui(): string;
|
|
117
|
-
getPositionYinGuiDesc(): string;
|
|
118
|
-
getPositionFu(): string;
|
|
119
|
-
getPositionFuDesc(): string;
|
|
120
|
-
getPositionCai(): string;
|
|
121
|
-
getPositionCaiDesc(): string;
|
|
122
|
-
getDayPositionXi(): string;
|
|
123
|
-
getDayPositionXiDesc(): string;
|
|
124
|
-
getDayPositionYangGui(): string;
|
|
125
|
-
getDayPositionYangGuiDesc(): string;
|
|
126
|
-
getDayPositionYinGui(): string;
|
|
127
|
-
getDayPositionYinGuiDesc(): string;
|
|
128
|
-
getDayPositionFu(sect?: number): string;
|
|
129
|
-
getDayPositionFuDesc(sect?: number): string;
|
|
130
|
-
getDayPositionCai(): string;
|
|
131
|
-
getDayPositionCaiDesc(): string;
|
|
132
|
-
getTimePositionXi(): string;
|
|
133
|
-
getTimePositionXiDesc(): string;
|
|
134
|
-
getTimePositionYangGui(): string;
|
|
135
|
-
getTimePositionYangGuiDesc(): string;
|
|
136
|
-
getTimePositionYinGui(): string;
|
|
137
|
-
getTimePositionYinGuiDesc(): string;
|
|
138
|
-
getTimePositionFu(sect?: number): string;
|
|
139
|
-
getTimePositionFuDesc(sect?: number): string;
|
|
140
|
-
getTimePositionCai(): string;
|
|
141
|
-
getTimePositionCaiDesc(): string;
|
|
142
|
-
getYearPositionTaiSui(sect?: number): string;
|
|
143
|
-
getYearPositionTaiSuiDesc(sect?: number): string;
|
|
144
|
-
getMonthPositionTaiSui(sect?: number): string;
|
|
145
|
-
getMonthPositionTaiSuiDesc(sect?: number): string;
|
|
146
|
-
getDayPositionTaiSui(sect?: number): string;
|
|
147
|
-
getDayPositionTaiSuiDesc(sect?: number): string;
|
|
148
|
-
getChong(): string;
|
|
149
110
|
getChongGan(): string;
|
|
150
111
|
getChongGanTie(): string;
|
|
151
|
-
getChongShengXiao(): string;
|
|
152
|
-
getChongDesc(): string;
|
|
153
|
-
getSha(): string;
|
|
154
|
-
getDayChong(): string;
|
|
155
112
|
getDayChongGan(): string;
|
|
156
113
|
getDayChongGanTie(): string;
|
|
157
|
-
getDayChongShengXiao(): string;
|
|
158
|
-
getDayChongDesc(): string;
|
|
159
|
-
getDaySha(): string;
|
|
160
|
-
getTimeChong(): string;
|
|
161
114
|
getTimeChongGan(): string;
|
|
162
115
|
getTimeChongGanTie(): string;
|
|
163
|
-
getTimeChongShengXiao(): string;
|
|
164
|
-
getTimeChongDesc(): string;
|
|
165
|
-
getTimeSha(): string;
|
|
166
|
-
getYearNaYin(): string;
|
|
167
|
-
getMonthNaYin(): string;
|
|
168
|
-
getDayNaYin(): string;
|
|
169
|
-
getTimeNaYin(): string;
|
|
170
116
|
getSeason(): string;
|
|
171
117
|
private static _convertJieQi;
|
|
172
118
|
getJie(): string;
|
|
@@ -174,30 +120,8 @@ export declare class Lunar {
|
|
|
174
120
|
getJieQi(): string;
|
|
175
121
|
getWeek(): number;
|
|
176
122
|
getWeekInChinese(): string;
|
|
177
|
-
getXiu(): string;
|
|
178
|
-
getXiuLuck(): string;
|
|
179
|
-
getXiuSong(): string;
|
|
180
|
-
getZheng(): string;
|
|
181
|
-
getAnimal(): string;
|
|
182
|
-
getGong(): string;
|
|
183
|
-
getShou(): string;
|
|
184
123
|
getFestivals(): string[];
|
|
185
124
|
getOtherFestivals(): string[];
|
|
186
|
-
getZhiXing(): string;
|
|
187
|
-
getDayTianShen(): string;
|
|
188
|
-
getTimeTianShen(): string;
|
|
189
|
-
getDayTianShenType(): string;
|
|
190
|
-
getTimeTianShenType(): string;
|
|
191
|
-
getDayTianShenLuck(): string;
|
|
192
|
-
getTimeTianShenLuck(): string;
|
|
193
|
-
getDayPositionTai(): string;
|
|
194
|
-
getMonthPositionTai(): string;
|
|
195
|
-
getDayYi(sect?: number): string[];
|
|
196
|
-
getDayJi(sect?: number): string[];
|
|
197
|
-
getDayJiShen(): string[];
|
|
198
|
-
getDayXiongSha(): string[];
|
|
199
|
-
getTimeYi(): string[];
|
|
200
|
-
getTimeJi(): string[];
|
|
201
125
|
getYueXiang(): string;
|
|
202
126
|
private getJieQiSolar;
|
|
203
127
|
getSolar(): Solar;
|
|
@@ -216,30 +140,8 @@ export declare class Lunar {
|
|
|
216
140
|
getCurrentJie(): JieQi | null;
|
|
217
141
|
getCurrentQi(): JieQi | null;
|
|
218
142
|
next(days: number): Lunar;
|
|
219
|
-
getYearXun(): string;
|
|
220
|
-
getMonthXun(): string;
|
|
221
|
-
getDayXun(): string;
|
|
222
|
-
getTimeXun(): string;
|
|
223
|
-
getYearXunByLiChun(): string;
|
|
224
|
-
getYearXunExact(): string;
|
|
225
|
-
getMonthXunExact(): string;
|
|
226
|
-
getDayXunExact(): string;
|
|
227
|
-
getDayXunExact2(): string;
|
|
228
|
-
getYearXunKong(): string;
|
|
229
|
-
getMonthXunKong(): string;
|
|
230
|
-
getDayXunKong(): string;
|
|
231
|
-
getTimeXunKong(): string;
|
|
232
|
-
getYearXunKongByLiChun(): string;
|
|
233
|
-
getYearXunKongExact(): string;
|
|
234
|
-
getMonthXunKongExact(): string;
|
|
235
|
-
getDayXunKongExact(): string;
|
|
236
|
-
getDayXunKongExact2(): string;
|
|
237
143
|
toString(): string;
|
|
238
144
|
toFullString(): string;
|
|
239
|
-
getLiuYao(): string;
|
|
240
|
-
getWuHou(): string;
|
|
241
|
-
getHou(): string;
|
|
242
|
-
getDayLu(): string;
|
|
243
145
|
getTime(): LunarTime;
|
|
244
146
|
getTimes(): LunarTime[];
|
|
245
147
|
}
|
|
@@ -18,18 +18,6 @@ export declare class LunarMonth {
|
|
|
18
18
|
isLeap(): boolean;
|
|
19
19
|
getDayCount(): number;
|
|
20
20
|
getFirstJulianDay(): number;
|
|
21
|
-
getPositionXi(): string;
|
|
22
|
-
getPositionXiDesc(): string;
|
|
23
|
-
getPositionYangGui(): string;
|
|
24
|
-
getPositionYangGuiDesc(): string;
|
|
25
|
-
getPositionYinGui(): string;
|
|
26
|
-
getPositionYinGuiDesc(): string;
|
|
27
|
-
getPositionFu(sect?: number): string;
|
|
28
|
-
getPositionFuDesc(sect?: number): string;
|
|
29
|
-
getPositionCai(): string;
|
|
30
|
-
getPositionCaiDesc(): string;
|
|
31
|
-
getPositionTaiSui(): string;
|
|
32
|
-
getPositionTaiSuiDesc(): string;
|
|
33
21
|
toString(): string;
|
|
34
22
|
next(n: number): LunarMonth | null;
|
|
35
23
|
}
|