@vope/utils 1.4.4 → 1.4.6
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/cjs/index.js +129 -56
- package/lib/clamp.js +2 -2
- package/lib/classnames.js +2 -2
- package/lib/compare/version.js +1 -2
- package/lib/compare/weak-equal.js +1 -2
- package/lib/convert/json.js +1 -2
- package/lib/convert/object.js +1 -2
- package/lib/convert/strings.js +1 -2
- package/lib/desens.js +51 -0
- package/lib/encoding.js +16 -16
- package/lib/index.js +56 -48
- package/lib/input-regex.js +1 -2
- package/lib/is/class.js +1 -2
- package/lib/is/empty.js +2 -3
- package/lib/is/null.js +1 -2
- package/lib/load/image.js +11 -0
- package/lib/memory/basic.js +2 -2
- package/lib/memory/list.js +2 -2
- package/lib/memory/power.js +3 -3
- package/lib/once.js +2 -2
- package/lib/power/decon.js +1 -2
- package/lib/rotate/angle.js +2 -3
- package/lib/rotate/rad.js +1 -2
- package/lib/style/css.js +26 -0
- package/lib/table/flex.js +1 -1
- package/lib/union.js +1 -1
- package/lib/url/join.js +1 -2
- package/lib/url/params.js +1 -2
- package/lib/wait.js +2 -2
- package/package.json +56 -55
- package/types/clamp.d.ts +1 -2
- package/types/classnames.d.ts +2 -2
- package/types/compare/version.d.ts +1 -2
- package/types/compare/weak-equal.d.ts +1 -2
- package/types/convert/json.d.ts +1 -2
- package/types/convert/object.d.ts +1 -2
- package/types/convert/strings.d.ts +1 -2
- package/types/desens.d.ts +40 -0
- package/types/encoding.d.ts +1 -2
- package/types/index.d.ts +27 -24
- package/types/input-regex.d.ts +2 -3
- package/types/is/class.d.ts +1 -2
- package/types/is/empty.d.ts +1 -2
- package/types/is/null.d.ts +1 -2
- package/types/load/image.d.ts +5 -0
- package/types/memory/basic.d.ts +1 -1
- package/types/memory/list.d.ts +2 -2
- package/types/memory/power.d.ts +2 -2
- package/types/once.d.ts +1 -2
- package/types/power/decon.d.ts +2 -2
- package/types/rotate/angle.d.ts +1 -2
- package/types/rotate/rad.d.ts +1 -2
- package/types/style/css.d.ts +9 -0
- package/types/table/flex.d.ts +1 -1
- package/types/union.d.ts +1 -1
- package/types/url/join.d.ts +1 -2
- package/types/url/params.d.ts +2 -2
- package/types/wait.d.ts +1 -2
package/lib/memory/basic.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import hash8strings from "../convert/strings";
|
|
1
|
+
import { hash8strings } from "../convert/strings";
|
|
2
2
|
class MemoryBasic {
|
|
3
3
|
/**
|
|
4
4
|
* @param key 用于对数据进行分类的key
|
|
@@ -134,5 +134,5 @@ class MemoryBasic {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
export {
|
|
137
|
-
MemoryBasic
|
|
137
|
+
MemoryBasic
|
|
138
138
|
};
|
package/lib/memory/list.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import MemoryBasic from "./basic";
|
|
1
|
+
import { MemoryBasic } from "./basic";
|
|
2
2
|
class MemoryList extends MemoryBasic {
|
|
3
3
|
constructor(key) {
|
|
4
4
|
super(key, {
|
|
@@ -8,5 +8,5 @@ class MemoryList extends MemoryBasic {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
|
-
MemoryList
|
|
11
|
+
MemoryList
|
|
12
12
|
};
|
package/lib/memory/power.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import deconPowersSum from "../power/decon";
|
|
2
|
-
import MemoryBasic from "./basic";
|
|
1
|
+
import { deconPowersSum } from "../power/decon";
|
|
2
|
+
import { MemoryBasic } from "./basic";
|
|
3
3
|
class MemoryPower extends MemoryBasic {
|
|
4
4
|
constructor(key) {
|
|
5
5
|
super(key, {
|
|
@@ -9,5 +9,5 @@ class MemoryPower extends MemoryBasic {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
|
-
MemoryPower
|
|
12
|
+
MemoryPower
|
|
13
13
|
};
|
package/lib/once.js
CHANGED
package/lib/power/decon.js
CHANGED
package/lib/rotate/angle.js
CHANGED
package/lib/rotate/rad.js
CHANGED
package/lib/style/css.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { isString } from "lodash-es";
|
|
2
|
+
import { isNull } from "../is/null";
|
|
3
|
+
const hump = /[A-Z]/g;
|
|
4
|
+
const css = (...args) => {
|
|
5
|
+
const list = [];
|
|
6
|
+
for (let i = 0; i < args.length; i++) {
|
|
7
|
+
const data = args[i];
|
|
8
|
+
if (!data)
|
|
9
|
+
continue;
|
|
10
|
+
if (isString(data)) {
|
|
11
|
+
list.push(data);
|
|
12
|
+
} else if (Array.isArray(data)) {
|
|
13
|
+
const result = css(...data);
|
|
14
|
+
result && list.push(result);
|
|
15
|
+
} else {
|
|
16
|
+
for (const key in data) {
|
|
17
|
+
const value = data[key];
|
|
18
|
+
isNull(value) || list.push(`${key.replace(hump, ($0) => "-" + $0.toLocaleLowerCase())}: ${value}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return list.join(";");
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
css
|
|
26
|
+
};
|
package/lib/table/flex.js
CHANGED
package/lib/union.js
CHANGED
package/lib/url/join.js
CHANGED
package/lib/url/params.js
CHANGED
|
@@ -19,7 +19,6 @@ const connectURLParams = (url, params, isOpenType) => {
|
|
|
19
19
|
const caches = list.join("&");
|
|
20
20
|
return url.includes("?") ? url + "&" + caches : url + "?" + caches;
|
|
21
21
|
};
|
|
22
|
-
var params_default = connectURLParams;
|
|
23
22
|
export {
|
|
24
|
-
|
|
23
|
+
connectURLParams
|
|
25
24
|
};
|
package/lib/wait.js
CHANGED
package/package.json
CHANGED
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vope/utils",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public",
|
|
8
|
-
"registry": "https://registry.npmjs.org/"
|
|
9
|
-
},
|
|
10
|
-
"types": "./types/index.d.ts",
|
|
11
|
-
"module": "./lib/index.js",
|
|
12
|
-
"main": "./cjs/index.js",
|
|
13
|
-
"scripts": {
|
|
14
|
-
"
|
|
15
|
-
"prebuild": "npm run
|
|
16
|
-
"build": "node ./build.cjs",
|
|
17
|
-
"premocha": "node ./build.cjs --type=test",
|
|
18
|
-
"mocha": "mocha __tests/**/*.js",
|
|
19
|
-
"test": "npm run mocha",
|
|
20
|
-
"prepublishOnly": "npm run build & npm run test"
|
|
21
|
-
},
|
|
22
|
-
"exports": {
|
|
23
|
-
".": {
|
|
24
|
-
"import": "./lib/index.js",
|
|
25
|
-
"require": "./cjs/index.js"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"author": "vope",
|
|
29
|
-
"license": "ISC",
|
|
30
|
-
"files": [
|
|
31
|
-
"cjs",
|
|
32
|
-
"lib",
|
|
33
|
-
"types"
|
|
34
|
-
],
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@babel/parser": "^7.23.4",
|
|
37
|
-
"@babel/traverse": "^7.23.4",
|
|
38
|
-
"@babel/types": "^7.23.4",
|
|
39
|
-
"@types/babel__traverse": "^7.20.4",
|
|
40
|
-
"@types/mocha": "^10.0.6",
|
|
41
|
-
"@types/node": "^20.4.5",
|
|
42
|
-
"esbuild": "^0.19.4",
|
|
43
|
-
"glob": "^10.3.10",
|
|
44
|
-
"iconv-lite": "^0.6.3",
|
|
45
|
-
"mocha": "^10.2.0",
|
|
46
|
-
"rimraf": "^5.0.5",
|
|
47
|
-
"tslib": "^2.6.1",
|
|
48
|
-
"typescript": "^5.3.2"
|
|
49
|
-
},
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"@types/lodash-es": "^4.17.9",
|
|
52
|
-
"@vope/types": "^1.0.
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@vope/utils",
|
|
3
|
+
"version": "1.4.6",
|
|
4
|
+
"description": "",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public",
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"types": "./types/index.d.ts",
|
|
11
|
+
"module": "./lib/index.js",
|
|
12
|
+
"main": "./cjs/index.js",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"start": "esbuild ./pre.ts --outfile=pre.cjs --format=cjs & node ./pre.cjs",
|
|
15
|
+
"prebuild": "npm run start & esbuild ./build.ts --outfile=build.cjs --format=cjs",
|
|
16
|
+
"build": "node ./build.cjs",
|
|
17
|
+
"premocha": "node ./build.cjs --type=test",
|
|
18
|
+
"mocha": "mocha __tests/**/*.js",
|
|
19
|
+
"test": "npm run mocha",
|
|
20
|
+
"prepublishOnly": "npm run build & npm run test"
|
|
21
|
+
},
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./lib/index.js",
|
|
25
|
+
"require": "./cjs/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"author": "vope",
|
|
29
|
+
"license": "ISC",
|
|
30
|
+
"files": [
|
|
31
|
+
"cjs",
|
|
32
|
+
"lib",
|
|
33
|
+
"types"
|
|
34
|
+
],
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@babel/parser": "^7.23.4",
|
|
37
|
+
"@babel/traverse": "^7.23.4",
|
|
38
|
+
"@babel/types": "^7.23.4",
|
|
39
|
+
"@types/babel__traverse": "^7.20.4",
|
|
40
|
+
"@types/mocha": "^10.0.6",
|
|
41
|
+
"@types/node": "^20.4.5",
|
|
42
|
+
"esbuild": "^0.19.4",
|
|
43
|
+
"glob": "^10.3.10",
|
|
44
|
+
"iconv-lite": "^0.6.3",
|
|
45
|
+
"mocha": "^10.2.0",
|
|
46
|
+
"rimraf": "^5.0.5",
|
|
47
|
+
"tslib": "^2.6.1",
|
|
48
|
+
"typescript": "^5.3.2"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@types/lodash-es": "^4.17.9",
|
|
52
|
+
"@vope/types": "^1.0.4",
|
|
53
|
+
"csstype": "^3.1.3",
|
|
54
|
+
"lodash-es": "^4.17.21"
|
|
55
|
+
}
|
|
56
|
+
}
|
package/types/clamp.d.ts
CHANGED
package/types/classnames.d.ts
CHANGED
package/types/convert/json.d.ts
CHANGED
|
@@ -9,5 +9,4 @@
|
|
|
9
9
|
* 'key'
|
|
10
10
|
* ).a.value // 1
|
|
11
11
|
*/
|
|
12
|
-
declare const hash8json: <K extends string | symbol, T extends Record<K, string | number>>(list: T[], key: K) => Record<T[K], T>;
|
|
13
|
-
export default hash8json;
|
|
12
|
+
export declare const hash8json: <K extends string | symbol, T extends Record<K, string | number>>(list: T[], key: K) => Record<T[K], T>;
|
|
@@ -9,5 +9,4 @@
|
|
|
9
9
|
* 'key'
|
|
10
10
|
* ).get(Object).value // 2
|
|
11
11
|
*/
|
|
12
|
-
declare const hash8object: <K extends string | symbol, T extends Record<K, unknown>>(list: T[], key: K) => Map<T[K], T>;
|
|
13
|
-
export default hash8object;
|
|
12
|
+
export declare const hash8object: <K extends string | symbol, T extends Record<K, unknown>>(list: T[], key: K) => Map<T[K], T>;
|
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
* @example
|
|
4
4
|
* hash8strings(['a', 'b']).a // 0
|
|
5
5
|
*/
|
|
6
|
-
declare const hash8strings: <T extends string | number>(list: T[]) => { [P in T]: number; };
|
|
7
|
-
export default hash8strings;
|
|
6
|
+
export declare const hash8strings: <T extends string | number>(list: T[]) => { [P in T]: number; };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
interface Rule {
|
|
2
|
+
/** 加密的开始(包含)和结束(包含)位置(位置信息基于明文) */
|
|
3
|
+
range: [number, number];
|
|
4
|
+
}
|
|
5
|
+
interface DecryptRule extends Rule {
|
|
6
|
+
/** 密文长度 */
|
|
7
|
+
modify: number;
|
|
8
|
+
}
|
|
9
|
+
interface EncryptRule extends Rule {
|
|
10
|
+
/** 密文 */
|
|
11
|
+
ciphertext: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 脱敏加密(对明文进行多个片段加密)
|
|
15
|
+
* @param plaintext 明文
|
|
16
|
+
* @param encrypt 加密方法
|
|
17
|
+
* @returns 解密要素
|
|
18
|
+
*/
|
|
19
|
+
export declare const desensEncrypt: (plaintext: string, encrypt: (plaintext: string) => EncryptRule[]) => {
|
|
20
|
+
ciphertext: string;
|
|
21
|
+
rules: DecryptRule[];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* 脱敏解密(对密文进行多个片段解密)
|
|
25
|
+
* @param plaintext 密文
|
|
26
|
+
* @param rules 解密要素
|
|
27
|
+
* @param decrypt 解密方法
|
|
28
|
+
*/
|
|
29
|
+
export declare const desensDecrypt: (ciphertext: string, rules: DecryptRule | DecryptRule[], decrypt: (ciphertext: string) => string) => string;
|
|
30
|
+
type Replacer = string | {
|
|
31
|
+
[Symbol.replace](text: string, size: number): string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* 脱敏平替
|
|
35
|
+
* @param plaintext 密文
|
|
36
|
+
* @param rules 解密要素
|
|
37
|
+
* @param replacer 替换者
|
|
38
|
+
*/
|
|
39
|
+
export declare const desensReplace: (ciphertext: string, rules: DecryptRule | DecryptRule[], replacer?: Replacer) => string;
|
|
40
|
+
export {};
|
package/types/encoding.d.ts
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* @param uint 文件内容Uint8Array格式
|
|
4
4
|
* @param limit 用于约束GBK和utf_8的判定上限
|
|
5
5
|
*/
|
|
6
|
-
declare const getEncoding: (uint: Uint8Array, limit?: number) => {
|
|
6
|
+
export declare const getEncoding: (uint: Uint8Array, limit?: number) => {
|
|
7
7
|
encoding: "utf-8" | "utf-16le" | "utf-16be" | "gbk";
|
|
8
8
|
offset: number;
|
|
9
9
|
};
|
|
10
|
-
export default getEncoding;
|
package/types/index.d.ts
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
1
|
+
export { clamp } from './clamp';
|
|
2
|
+
export { classnames } from './classnames';
|
|
3
|
+
export { compareVersion } from './compare/version';
|
|
4
|
+
export { deepWeakEqual } from './compare/weak-equal';
|
|
5
|
+
export { hash8json } from './convert/json';
|
|
6
|
+
export { hash8object } from './convert/object';
|
|
7
|
+
export { hash8strings } from './convert/strings';
|
|
8
|
+
export { desensEncrypt, desensDecrypt, desensReplace } from './desens';
|
|
9
|
+
export { getEncoding } from './encoding';
|
|
10
|
+
export { inputRegex } from './input-regex';
|
|
11
|
+
export { isClass } from './is/class';
|
|
12
|
+
export { isEmpty } from './is/empty';
|
|
13
|
+
export { isNull } from './is/null';
|
|
14
|
+
export { loadImage } from './load/image';
|
|
15
|
+
export { MemoryBasic } from './memory/basic';
|
|
16
|
+
export { MemoryList } from './memory/list';
|
|
17
|
+
export { MemoryPower } from './memory/power';
|
|
18
|
+
export { once } from './once';
|
|
19
|
+
export { deconPowersSum } from './power/decon';
|
|
20
|
+
export { rotateAngle } from './rotate/angle';
|
|
21
|
+
export { rotateRad } from './rotate/rad';
|
|
22
|
+
export { type CSSProperties, type StyleValue, css } from './style/css';
|
|
23
|
+
export { FlexTable } from './table/flex';
|
|
24
|
+
export { Union } from './union';
|
|
25
|
+
export { joinPaths } from './url/join';
|
|
26
|
+
export { connectURLParams } from './url/params';
|
|
27
|
+
export { wait } from './wait';
|
package/types/input-regex.d.ts
CHANGED
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
* @param text
|
|
4
4
|
* @param flags 表示输出正则表达式
|
|
5
5
|
*/
|
|
6
|
-
declare function inputRegex(text: string, flags?: string): RegExp;
|
|
6
|
+
export declare function inputRegex(text: string, flags?: string): RegExp;
|
|
7
7
|
/**
|
|
8
8
|
* 处理输入文本中的特殊字符,用于转换正则表达式
|
|
9
9
|
* @param text
|
|
10
10
|
* @param flags 表示输出字符串,该字符串将作为正则表达式的一部分
|
|
11
11
|
*/
|
|
12
|
-
declare function inputRegex(text: string, flags: false): string;
|
|
13
|
-
export default inputRegex;
|
|
12
|
+
export declare function inputRegex(text: string, flags: false): string;
|
package/types/is/class.d.ts
CHANGED
package/types/is/empty.d.ts
CHANGED
package/types/is/null.d.ts
CHANGED
package/types/memory/basic.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ interface Config<Reactor> {
|
|
|
15
15
|
/**
|
|
16
16
|
* 分类存储(通过继承,可用于拓展存储方式)
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export declare class MemoryBasic<V, Reactor, Type extends Memory.Type> {
|
|
19
19
|
#private;
|
|
20
20
|
protected key: Memory.Pitch<V, Type>;
|
|
21
21
|
protected list: V[];
|
package/types/memory/list.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import MemoryBasic from './basic';
|
|
1
|
+
import { MemoryBasic } from './basic';
|
|
2
2
|
import { Memory } from './type';
|
|
3
3
|
/**
|
|
4
4
|
* 分类存储(基于普通的键值存储)
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export declare class MemoryList<V, Type extends Memory.Type = Memory.Type> extends MemoryBasic<V, number[], Type> {
|
|
7
7
|
constructor(key: Memory.Pitch<V, Type>);
|
|
8
8
|
}
|
package/types/memory/power.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import MemoryBasic from './basic';
|
|
1
|
+
import { MemoryBasic } from './basic';
|
|
2
2
|
import { Memory } from './type';
|
|
3
3
|
/**
|
|
4
4
|
* 分类存储(基于2的n次幂之和构建唯一键进行存储)
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export declare class MemoryPower<V, Type extends Memory.Type = Memory.Type> extends MemoryBasic<V, number, Type> {
|
|
7
7
|
constructor(key: Memory.Pitch<V, Type>);
|
|
8
8
|
}
|
package/types/once.d.ts
CHANGED
|
@@ -3,5 +3,4 @@
|
|
|
3
3
|
* @param callback 运行返回值的函数
|
|
4
4
|
* @param thisArg 绑定到运行函数的this对象
|
|
5
5
|
*/
|
|
6
|
-
declare const
|
|
7
|
-
export default _default;
|
|
6
|
+
export declare const once: <T extends (...args: any) => any>(func: T, thisArg?: any) => (...list: Parameters<T>) => ReturnType<T>;
|
package/types/power/decon.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ type Sort = 'asc' | 'desc';
|
|
|
5
5
|
* @param sort 排序方式(默认降序)
|
|
6
6
|
* @description sum > 2**53则会因为精度问题计算报错
|
|
7
7
|
*/
|
|
8
|
-
declare const deconPowersSum: (sum: number, sort?: Sort) => number[];
|
|
9
|
-
export
|
|
8
|
+
export declare const deconPowersSum: (sum: number, sort?: Sort) => number[];
|
|
9
|
+
export {};
|
package/types/rotate/angle.d.ts
CHANGED
|
@@ -5,5 +5,4 @@ import { _Point } from './rad';
|
|
|
5
5
|
* @param angle 旋转角度
|
|
6
6
|
* @param visit 旋转原点
|
|
7
7
|
*/
|
|
8
|
-
declare const rotateAngle: (from: _Point, angle: number, visit?: _Point) => _Point;
|
|
9
|
-
export default rotateAngle;
|
|
8
|
+
export declare const rotateAngle: (from: _Point, angle: number, visit?: _Point) => _Point;
|
package/types/rotate/rad.d.ts
CHANGED
|
@@ -5,5 +5,4 @@ export type _Point = [number, number];
|
|
|
5
5
|
* @param rad 旋转弧度
|
|
6
6
|
* @param visit 旋转原点
|
|
7
7
|
*/
|
|
8
|
-
declare const rotateRad: (from: _Point, rad: number, visit?: _Point) => _Point;
|
|
9
|
-
export default rotateRad;
|
|
8
|
+
export declare const rotateRad: (from: _Point, rad: number, visit?: _Point) => _Point;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Properties, PropertiesHyphen } from 'csstype';
|
|
2
|
+
export interface CSSProperties extends Properties<string | number>, PropertiesHyphen<string | number> {
|
|
3
|
+
[v: `--${string}`]: string | number | undefined;
|
|
4
|
+
}
|
|
5
|
+
export type StyleValue = false | null | undefined | string | CSSProperties | Array<StyleValue>;
|
|
6
|
+
/**
|
|
7
|
+
* Css合并
|
|
8
|
+
*/
|
|
9
|
+
export declare const css: (...args: StyleValue[]) => string;
|
package/types/table/flex.d.ts
CHANGED
package/types/union.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ interface Result<Data, Option> {
|
|
|
6
6
|
/**
|
|
7
7
|
* 数据联合(用于需要对加入的数据进行智能提示)
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export declare class Union<Primary extends string, Member extends string, Origin extends {
|
|
10
10
|
[key in Primary]: string;
|
|
11
11
|
}, Data extends unknown, Option extends unknown, Status extends Member | never = never> {
|
|
12
12
|
#private;
|
package/types/url/join.d.ts
CHANGED
package/types/url/params.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ type Params = Param | Param[];
|
|
|
7
7
|
* @param isOpenType 是否开启类型处理
|
|
8
8
|
* @description 开始类型处理的情况下,undefined会被转成null
|
|
9
9
|
*/
|
|
10
|
-
declare const connectURLParams: (url: string, params?: Record<string, Params>, isOpenType?: boolean) => string;
|
|
11
|
-
export
|
|
10
|
+
export declare const connectURLParams: (url: string, params?: Record<string, Params>, isOpenType?: boolean) => string;
|
|
11
|
+
export {};
|
package/types/wait.d.ts
CHANGED