@vope/utils 1.4.28 → 1.4.30

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 CHANGED
@@ -5531,7 +5531,7 @@ var MemoryBasic = class {
5531
5531
  return this.list.reduce(callback, initialValue);
5532
5532
  }
5533
5533
  /**
5534
- * 检测存储是否包含某种类型
5534
+ * 判断存储是否包含指定类型
5535
5535
  */
5536
5536
  includes(type) {
5537
5537
  return this.memorys.has(type);
@@ -5722,7 +5722,7 @@ var MemorySimple = class {
5722
5722
  return this.#memory.reduce(callback, initialValue);
5723
5723
  }
5724
5724
  /**
5725
- * 获取指定类型存储数据
5725
+ * 判断是否包含指定类型
5726
5726
  */
5727
5727
  includes(type) {
5728
5728
  return this.#memory.includes(type);
@@ -5774,6 +5774,12 @@ var Neo4jAhchors = class {
5774
5774
  [neo4j.targetField]: end
5775
5775
  });
5776
5776
  }
5777
+ /**
5778
+ * 设置多边间隔弧长
5779
+ */
5780
+ setRaidx(value) {
5781
+ this.config.radOffsetRaidx = value;
5782
+ }
5777
5783
  /**
5778
5784
  * 当图数据准备好后调用
5779
5785
  */
@@ -81,7 +81,7 @@ class MemoryBasic {
81
81
  return this.list.reduce(callback, initialValue);
82
82
  }
83
83
  /**
84
- * 检测存储是否包含某种类型
84
+ * 判断存储是否包含指定类型
85
85
  */
86
86
  includes(type) {
87
87
  return this.memorys.has(type);
@@ -64,7 +64,7 @@ class MemorySimple {
64
64
  return this.#memory.reduce(callback, initialValue);
65
65
  }
66
66
  /**
67
- * 获取指定类型存储数据
67
+ * 判断是否包含指定类型
68
68
  */
69
69
  includes(type) {
70
70
  return this.#memory.includes(type);
@@ -13,6 +13,12 @@ class Neo4jAhchors {
13
13
  [neo4j.targetField]: end
14
14
  });
15
15
  }
16
+ /**
17
+ * 设置多边间隔弧长
18
+ */
19
+ setRaidx(value) {
20
+ this.config.radOffsetRaidx = value;
21
+ }
16
22
  /**
17
23
  * 当图数据准备好后调用
18
24
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vope/utils",
3
- "version": "1.4.28",
3
+ "version": "1.4.30",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -19,7 +19,7 @@
19
19
  "mocha": "mocha __tests/**/*.js",
20
20
  "test": "npm run mocha",
21
21
  "prepublishOnly": "npm run build & npm run test",
22
- "debug": "npm run build & npm run premocha"
22
+ "debug": "npm run start & npm run premocha"
23
23
  },
24
24
  "exports": {
25
25
  ".": {
@@ -29,21 +29,25 @@
29
29
  },
30
30
  "author": "vope",
31
31
  "license": "ISC",
32
+ "sideEffects": [
33
+ "lib/storage/offline.js",
34
+ "src/storage/offline.ts"
35
+ ],
32
36
  "files": [
33
37
  "cjs",
34
38
  "lib",
35
39
  "types"
36
40
  ],
37
41
  "devDependencies": {
38
- "@babel/parser": "^7.23.4",
39
- "@babel/traverse": "^7.23.4",
40
- "@babel/types": "^7.23.4",
42
+ "@babel/parser": "^7.26.5",
43
+ "@babel/traverse": "^7.26.5",
44
+ "@babel/types": "^7.26.5",
41
45
  "@rollup/plugin-alias": "^5.1.1",
42
46
  "@rollup/plugin-commonjs": "^28.0.0",
43
47
  "@rollup/plugin-json": "^6.1.0",
44
48
  "@rollup/plugin-node-resolve": "^15.3.0",
45
49
  "@rollup/plugin-typescript": "^12.1.0",
46
- "@types/babel__traverse": "^7.20.4",
50
+ "@types/babel__traverse": "^7.20.6",
47
51
  "@types/mocha": "^10.0.6",
48
52
  "@types/node": "^20.4.5",
49
53
  "@types/sm-crypto": "^0.3.4",
@@ -53,7 +57,7 @@
53
57
  "mocha": "^10.2.0",
54
58
  "puppeteer": "^23.4.1",
55
59
  "rimraf": "^5.0.5",
56
- "rollup": "^4.22.5",
60
+ "rollup": "^4.34.6",
57
61
  "tslib": "^2.6.1",
58
62
  "typescript": "^5.3.3"
59
63
  },
package/types/desens.d.ts CHANGED
@@ -2,11 +2,11 @@ interface Rule {
2
2
  /** 加密的开始(包含)和结束(包含)位置(位置信息基于明文) */
3
3
  range: [number, number];
4
4
  }
5
- interface DecryptRule extends Rule {
5
+ export interface DesensDecrypt extends Rule {
6
6
  /** 密文长度 */
7
7
  modify: number;
8
8
  }
9
- interface EncryptRule extends Rule {
9
+ export interface DesensEncrypt extends Rule {
10
10
  /** 密文 */
11
11
  ciphertext: string;
12
12
  }
@@ -16,17 +16,17 @@ interface EncryptRule extends Rule {
16
16
  * @param encrypt 加密方法
17
17
  * @returns 解密要素
18
18
  */
19
- export declare const desensEncrypt: (plaintext: string, encrypt: (plaintext: string) => EncryptRule[]) => {
19
+ export declare const desensEncrypt: (plaintext: string, encrypt: (plaintext: string) => DesensEncrypt[]) => {
20
20
  ciphertext: string;
21
- rules: DecryptRule[];
21
+ rules: DesensDecrypt[];
22
22
  };
23
23
  /**
24
24
  * 脱敏解密(对密文进行多个片段解密)
25
- * @param plaintext 密文
25
+ * @param ciphertext 密文
26
26
  * @param rules 解密要素
27
27
  * @param decrypt 解密方法
28
28
  */
29
- export declare const desensDecrypt: (ciphertext: string, rules: DecryptRule | DecryptRule[], decrypt: (ciphertext: string) => string) => string;
29
+ export declare const desensDecrypt: (ciphertext: string, rules: DesensDecrypt | DesensDecrypt[], decrypt: (ciphertext: string) => string) => string;
30
30
  type Replacer = string | {
31
31
  [Symbol.replace](text: string, size: number): string;
32
32
  };
@@ -36,5 +36,5 @@ type Replacer = string | {
36
36
  * @param rules 解密要素
37
37
  * @param replacer 替换者
38
38
  */
39
- export declare const desensReplace: (ciphertext: string, rules: DecryptRule | DecryptRule[], replacer?: Replacer) => string;
39
+ export declare const desensReplace: (ciphertext: string, rules: DesensDecrypt | DesensDecrypt[], replacer?: Replacer) => string;
40
40
  export {};
package/types/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { deepWeakEqual } from './compare/weak-equal';
5
5
  export { hash8json } from './convert/json';
6
6
  export { hash8object } from './convert/object';
7
7
  export { hash8strings } from './convert/strings';
8
- export { desensEncrypt, desensDecrypt, desensReplace } from './desens';
8
+ export { type DesensDecrypt, type DesensEncrypt, desensEncrypt, desensDecrypt, desensReplace } from './desens';
9
9
  export { getEncoding } from './encoding';
10
10
  export { inputRegex } from './input-regex';
11
11
  export { isClass } from './is/class';
@@ -56,7 +56,7 @@ export declare class MemoryBasic<T, Reactor, Type extends Memory.Type> {
56
56
  */
57
57
  reduce<V>(callback: (previousValue: V, currentValue: T, currentIndex: number) => V, initialValue: V): V;
58
58
  /**
59
- * 检测存储是否包含某种类型
59
+ * 判断存储是否包含指定类型
60
60
  */
61
61
  includes(type: Type): boolean;
62
62
  /**
@@ -41,7 +41,7 @@ export declare class MemorySimple<T, Type extends Memory.Type> implements Basic<
41
41
  */
42
42
  reduce<V>(callback: (previousValue: V, currentValue: T, currentIndex: number) => V, initialValue: V): V;
43
43
  /**
44
- * 获取指定类型存储数据
44
+ * 判断是否包含指定类型
45
45
  */
46
46
  includes(type: Type): boolean;
47
47
  /**
@@ -4,6 +4,7 @@ interface IBox {
4
4
  centerY: number;
5
5
  }
6
6
  interface Config {
7
+ /** 多边之间的间隔弧长 */
7
8
  radOffsetRaidx?: number;
8
9
  getBox(id: string): IBox;
9
10
  }
@@ -16,6 +17,10 @@ export default class Neo4jAhchors<INode extends object, IEdge extends object> {
16
17
  protected config: Config;
17
18
  constructor(neo4j: Neo4j<INode, IEdge>, config: Config);
18
19
  protected getDir(start: string, end: string): string;
20
+ /**
21
+ * 设置多边间隔弧长
22
+ */
23
+ setRaidx(value: number): void;
19
24
  /**
20
25
  * 当图数据准备好后调用
21
26
  */