a-calc 3.0.0-beta.20260124.3 → 3.0.0-beta.20260124.4
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/calc.d.ts +10 -0
- package/mcp-server/src/index.js +0 -0
- package/package.json +127 -127
package/calc.d.ts
CHANGED
|
@@ -470,6 +470,16 @@ export type UnitConvertIn = Record<string, Record<string, UnitConvertRule>>;
|
|
|
470
470
|
*/
|
|
471
471
|
export type ThousandsPresetName = 'us' | 'eu' | 'swiss' | 'space' | 'fr' | 'indian' | 'wan';
|
|
472
472
|
|
|
473
|
+
/**
|
|
474
|
+
* 紧凑格式预设名称(系统内置)
|
|
475
|
+
* - en: 英文/国际通用 (1.23K, 1.23M, 1.23B, 1.23T)
|
|
476
|
+
* - cn: 中文千进制 (1.23千, 1.23百万, 1.23十亿, 1.23万亿)
|
|
477
|
+
* - wan: 万进制 (1.23万, 1.23亿, 1.23万亿)
|
|
478
|
+
* - storage: 存储单位 (1KB, 1MB, 1GB, 1TB - 1024进制)
|
|
479
|
+
* - indian: 印度格式 (1.23K, 1.23L, 1.23Cr - 阶梯[1000,100,100])
|
|
480
|
+
*/
|
|
481
|
+
export type CompactPresetName = 'en' | 'cn' | 'wan' | 'storage' | 'indian';
|
|
482
|
+
|
|
473
483
|
/**
|
|
474
484
|
* 千分位预设配置类型
|
|
475
485
|
*/
|
package/mcp-server/src/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,132 +1,132 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
"./es": {
|
|
13
|
-
"types": "./calc.d.ts",
|
|
14
|
-
"import": "./es/index.js",
|
|
15
|
-
"default": "./es/index.js"
|
|
16
|
-
},
|
|
17
|
-
"./cjs": {
|
|
18
|
-
"types": "./calc.d.ts",
|
|
19
|
-
"require": "./cjs/index.js",
|
|
20
|
-
"default": "./cjs/index.js"
|
|
21
|
-
},
|
|
22
|
-
"./mcp-server/src/index.js": "./mcp-server/src/index.js"
|
|
2
|
+
"name": "a-calc",
|
|
3
|
+
"version": "3.0.0-beta.20260124.4",
|
|
4
|
+
"description": "A very powerful and easy-to-use number precision calculation and formatting library.",
|
|
5
|
+
"main": "./cjs/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./calc.d.ts",
|
|
9
|
+
"import": "./es/index.js",
|
|
10
|
+
"require": "./cjs/index.js"
|
|
23
11
|
},
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"scripts": {
|
|
29
|
-
"dev": "rollup -c --environment build:dev",
|
|
30
|
-
"dev:w": "rollup -c -w --environment build:dev",
|
|
31
|
-
"build": "run-p gen:version build-test",
|
|
32
|
-
"build-test": "rollup -c --environment build:build & npm run test",
|
|
33
|
-
"build-only": "rollup -c --environment build:build",
|
|
34
|
-
"build:w": "rollup -c -w --environment build:build",
|
|
35
|
-
"build:docs": "pnpm install --frozen-lockfile=false && vitepress build docs",
|
|
36
|
-
"test": "vitest run",
|
|
37
|
-
"test:type": "tsc --noEmit type-check.ts",
|
|
38
|
-
"gen:version": "node gen_version_info.cjs",
|
|
39
|
-
"docs:dev": "vitepress dev docs",
|
|
40
|
-
"docs:build": "vitepress build docs",
|
|
41
|
-
"docs:preview": "vitepress preview docs"
|
|
12
|
+
"./es": {
|
|
13
|
+
"types": "./calc.d.ts",
|
|
14
|
+
"import": "./es/index.js",
|
|
15
|
+
"default": "./es/index.js"
|
|
42
16
|
},
|
|
43
|
-
"
|
|
44
|
-
|
|
17
|
+
"./cjs": {
|
|
18
|
+
"types": "./calc.d.ts",
|
|
19
|
+
"require": "./cjs/index.js",
|
|
20
|
+
"default": "./cjs/index.js"
|
|
45
21
|
},
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
22
|
+
"./mcp-server/src/index.js": "./mcp-server/src/index.js"
|
|
23
|
+
},
|
|
24
|
+
"browser": "browser/index.js",
|
|
25
|
+
"module": "es/index.js",
|
|
26
|
+
"types": "calc.d.ts",
|
|
27
|
+
"typings": "calc.d.ts",
|
|
28
|
+
"bin": {
|
|
29
|
+
"a-calc-mcp": "./mcp-server/src/index.js"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"es",
|
|
33
|
+
"cjs",
|
|
34
|
+
"browser",
|
|
35
|
+
"calc.d.ts",
|
|
36
|
+
"a-calc.versions.js",
|
|
37
|
+
"mcp-server/src",
|
|
38
|
+
"mcp-server/package.json",
|
|
39
|
+
"mcp-server/README.md"
|
|
40
|
+
],
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "git+https://github.com/Autumn-one/a-calc-old.git"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"decimal",
|
|
47
|
+
"math",
|
|
48
|
+
"expression",
|
|
49
|
+
"evaluator",
|
|
50
|
+
"arbitrary",
|
|
51
|
+
"precision",
|
|
52
|
+
"arithmetic",
|
|
53
|
+
"big",
|
|
54
|
+
"number",
|
|
55
|
+
"parser",
|
|
56
|
+
"float",
|
|
57
|
+
"biginteger",
|
|
58
|
+
"bigdecimal",
|
|
59
|
+
"bignumber",
|
|
60
|
+
"bigint",
|
|
61
|
+
"bignum",
|
|
62
|
+
"a-calc",
|
|
63
|
+
"四则运算",
|
|
64
|
+
"数学",
|
|
65
|
+
"运算",
|
|
66
|
+
"浮点数",
|
|
67
|
+
"精度",
|
|
68
|
+
"金融计算"
|
|
69
|
+
],
|
|
70
|
+
"author": "Autumn",
|
|
71
|
+
"bugs": {
|
|
72
|
+
"url": "https://github.com/Autumn-one/a-calc-old/issues"
|
|
73
|
+
},
|
|
74
|
+
"homepage": "https://github.com/Autumn-one/a-calc-old#readme",
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@babel/core": "^7.21.4",
|
|
77
|
+
"@babel/preset-env": "^7.21.4",
|
|
78
|
+
"@codemirror/commands": "^6.10.1",
|
|
79
|
+
"@codemirror/lang-javascript": "^6.2.4",
|
|
80
|
+
"@codemirror/language": "^6.12.1",
|
|
81
|
+
"@codemirror/state": "^6.5.3",
|
|
82
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
83
|
+
"@codemirror/view": "^6.39.8",
|
|
84
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
85
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
86
|
+
"@rollup/plugin-json": "^6.0.1",
|
|
87
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
88
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
89
|
+
"@vitest/coverage-v8": "^2.1.9",
|
|
90
|
+
"a-calc": "^2.2.15",
|
|
91
|
+
"benchmark": "^2.1.4",
|
|
92
|
+
"bignumber.js": "^9.3.1",
|
|
93
|
+
"codemirror": "^6.0.2",
|
|
94
|
+
"cross-env": "^7.0.3",
|
|
95
|
+
"decimal.js": "^10.6.0",
|
|
96
|
+
"fast-deep-equal": "^3.1.3",
|
|
97
|
+
"glob": "^8.1.0",
|
|
98
|
+
"husky": "^9.1.7",
|
|
99
|
+
"json-stringify-safe": "^5.0.1",
|
|
100
|
+
"lodash-es": "^4.17.21",
|
|
101
|
+
"math-expression-evaluator": "^2.0.7",
|
|
102
|
+
"mathjs": "^15.1.0",
|
|
103
|
+
"npm-run-all": "^4.1.5",
|
|
104
|
+
"rollup": "^4.6.0",
|
|
105
|
+
"rollup-plugin-livereload": "^2.0.5",
|
|
106
|
+
"rollup-plugin-serve": "^1.1.0",
|
|
107
|
+
"typescript": "^5.1.6",
|
|
108
|
+
"vitepress": "^1.6.4",
|
|
109
|
+
"vitest": "^2.1.0",
|
|
110
|
+
"vue": "^3.5.25",
|
|
111
|
+
"@uiw/codemirror-themes-all": "^4.25.4"
|
|
112
|
+
},
|
|
113
|
+
"dependencies": {
|
|
114
|
+
"typescript-treasure": "0.0.9",
|
|
115
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
116
|
+
},
|
|
117
|
+
"scripts": {
|
|
118
|
+
"dev": "rollup -c --environment build:dev",
|
|
119
|
+
"dev:w": "rollup -c -w --environment build:dev",
|
|
120
|
+
"build": "run-p gen:version build-test",
|
|
121
|
+
"build-test": "rollup -c --environment build:build & npm run test",
|
|
122
|
+
"build-only": "rollup -c --environment build:build",
|
|
123
|
+
"build:w": "rollup -c -w --environment build:build",
|
|
124
|
+
"build:docs": "pnpm install --frozen-lockfile=false && vitepress build docs",
|
|
125
|
+
"test": "vitest run",
|
|
126
|
+
"test:type": "tsc --noEmit type-check.ts",
|
|
127
|
+
"gen:version": "node gen_version_info.cjs",
|
|
128
|
+
"docs:dev": "vitepress dev docs",
|
|
129
|
+
"docs:build": "vitepress build docs",
|
|
130
|
+
"docs:preview": "vitepress preview docs"
|
|
131
|
+
}
|
|
132
132
|
}
|