@fangzhongya/utils 0.0.77 → 0.0.79
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/dist/basic/index.cjs +8 -7
- package/dist/basic/index.d.cts +2 -1
- package/dist/basic/index.d.ts +2 -1
- package/dist/basic/index.js +7 -6
- package/dist/basic/string/index.cjs +10 -6
- package/dist/basic/string/index.d.cts +1 -0
- package/dist/basic/string/index.d.ts +1 -0
- package/dist/basic/string/index.js +10 -6
- package/dist/basic/string/splitNum.cjs +7 -0
- package/dist/basic/string/splitNum.d.cts +3 -0
- package/dist/basic/string/splitNum.d.ts +3 -0
- package/dist/basic/string/splitNum.js +7 -0
- package/dist/chunk-2DOCIHRT.cjs +32 -0
- package/dist/{chunk-CY2RRXP5.js → chunk-AS7KKPQT.js} +9 -5
- package/dist/chunk-CDL6JMY2.js +59 -0
- package/dist/chunk-IWEOJ5C5.cjs +59 -0
- package/dist/{chunk-FLGYKRQ6.cjs → chunk-K425VRJJ.cjs} +4 -6
- package/dist/{chunk-4JXZQBCA.js → chunk-MWIVL4NW.js} +5 -7
- package/dist/{chunk-NGZ6KFQR.js → chunk-SANLZVGX.js} +1 -1
- package/dist/{chunk-G6O3Z6MX.cjs → chunk-SGWRUS75.cjs} +8 -4
- package/dist/{chunk-2IDKKVEA.cjs → chunk-UWIEWCBK.cjs} +2 -2
- package/dist/chunk-YQ53QNMC.js +32 -0
- package/dist/dom/index.cjs +3 -3
- package/dist/dom/index.js +4 -4
- package/dist/html/getVueText.cjs +2 -4
- package/dist/html/getVueText.d.cts +1 -5
- package/dist/html/getVueText.d.ts +1 -5
- package/dist/html/getVueText.js +3 -5
- package/dist/html/index.cjs +5 -7
- package/dist/html/index.d.cts +1 -1
- package/dist/html/index.d.ts +1 -1
- package/dist/html/index.js +6 -8
- package/dist/{index-BKbw-_J6.d.ts → index-BKcLYIs7.d.ts} +1 -1
- package/dist/{index-CdRz4xJD.d.ts → index-BkWVGAdT.d.ts} +2 -3
- package/dist/{index-JauNNBr7.d.cts → index-BufudZ6Z.d.cts} +3 -1
- package/dist/{index-BkNPwlhS.d.ts → index-BzjmJ_n4.d.ts} +3 -1
- package/dist/{index-C1ttB6pd.d.cts → index-Cq6UjFhn.d.cts} +1 -1
- package/dist/{index-CnrmwHvE.d.cts → index-zghlonkx.d.cts} +2 -3
- package/dist/index.cjs +35 -34
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +38 -37
- package/dist/judge/index.cjs +6 -6
- package/dist/judge/index.js +13 -13
- package/dist/tree/index.cjs +3 -3
- package/dist/tree/index.js +6 -6
- package/dist/window/index.cjs +5 -5
- package/dist/window/index.js +14 -14
- package/package.json +6 -1
- package/dist/chunk-6TBH7RAC.cjs +0 -51
- package/dist/chunk-7PJ2D3KR.js +0 -51
- package/dist/{chunk-YKNGDK4I.js → chunk-7VGVDOZH.js} +12 -12
- package/dist/{chunk-Z3BZ5W5W.js → chunk-GPFPHJRZ.js} +3 -3
- package/dist/{chunk-UHKL2RG3.cjs → chunk-J2WRN55J.cjs} +5 -5
- package/dist/{chunk-QUIZWAFR.js → chunk-OVHYLUAS.js} +5 -5
- package/dist/{chunk-UPW5FHFQ.cjs → chunk-PIVDNYTG.cjs} +4 -4
- package/dist/{chunk-ZUIHJQD6.cjs → chunk-PKFURLQT.cjs} +2 -2
- package/dist/{chunk-APRM3ELY.cjs → chunk-PV2N6PF2.cjs} +2 -2
- package/dist/{chunk-FXZQXYYH.js → chunk-PYYFCN7M.js} +13 -13
package/dist/basic/index.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-UWIEWCBK.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkSGWRUS75cjs = require('../chunk-SGWRUS75.cjs');
|
|
5
|
+
require('../chunk-L7FSHU27.cjs');
|
|
5
6
|
require('../chunk-BWXXXTFU.cjs');
|
|
6
7
|
require('../chunk-K2XKKEE7.cjs');
|
|
7
8
|
require('../chunk-TKE7IK2M.cjs');
|
|
@@ -11,7 +12,7 @@ require('../chunk-4PUYFFPO.cjs');
|
|
|
11
12
|
require('../chunk-ASGZ2VD6.cjs');
|
|
12
13
|
require('../chunk-HWHYHL6J.cjs');
|
|
13
14
|
require('../chunk-J7S3KBHL.cjs');
|
|
14
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-2DOCIHRT.cjs');
|
|
15
16
|
require('../chunk-XWCRGY54.cjs');
|
|
16
17
|
|
|
17
18
|
|
|
@@ -36,21 +37,21 @@ require('../chunk-TCMJPIRM.cjs');
|
|
|
36
37
|
require('../chunk-NDKOWDDX.cjs');
|
|
37
38
|
require('../chunk-XSQOJWXL.cjs');
|
|
38
39
|
require('../chunk-GD3OA7GU.cjs');
|
|
40
|
+
require('../chunk-XW3XIK3D.cjs');
|
|
39
41
|
require('../chunk-2H3KVSFA.cjs');
|
|
40
42
|
require('../chunk-ILJLXJ5O.cjs');
|
|
41
43
|
require('../chunk-OJBZ7UUC.cjs');
|
|
42
44
|
require('../chunk-JR6ZN6QD.cjs');
|
|
45
|
+
require('../chunk-UEVMS6QD.cjs');
|
|
46
|
+
require('../chunk-OQL4GIEJ.cjs');
|
|
43
47
|
require('../chunk-PW7RP73J.cjs');
|
|
44
|
-
require('../chunk-XW3XIK3D.cjs');
|
|
45
48
|
require('../chunk-WWAPPA4E.cjs');
|
|
46
49
|
require('../chunk-A5LHXE5X.cjs');
|
|
47
50
|
require('../chunk-MIC3W2VY.cjs');
|
|
48
|
-
require('../chunk-UEVMS6QD.cjs');
|
|
49
|
-
require('../chunk-OQL4GIEJ.cjs');
|
|
50
51
|
require('../chunk-ISHLY7WM.cjs');
|
|
51
52
|
require('../chunk-75ZPJI57.cjs');
|
|
52
53
|
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
|
|
56
|
-
exports.array = _chunk65O7KWP4cjs.array_exports; exports.object = _chunkYUKBGZQ4cjs.object_exports; exports.string =
|
|
57
|
+
exports.array = _chunk65O7KWP4cjs.array_exports; exports.object = _chunkYUKBGZQ4cjs.object_exports; exports.string = _chunkSGWRUS75cjs.string_exports;
|
package/dist/basic/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { i as array } from '../index-D8_Udh46.cjs';
|
|
2
2
|
export { i as object } from '../index-Cz8fWd5l.cjs';
|
|
3
|
-
export { i as string } from '../index-
|
|
3
|
+
export { i as string } from '../index-BufudZ6Z.cjs';
|
|
4
4
|
import './array/asyncMergeArray.cjs';
|
|
5
5
|
import './array/compareArray.cjs';
|
|
6
6
|
import './array/deleteArray.cjs';
|
|
@@ -34,6 +34,7 @@ import './string/getImports.cjs';
|
|
|
34
34
|
import './string/getStartSame.cjs';
|
|
35
35
|
import './string/getStartSames.cjs';
|
|
36
36
|
import './string/getStrNunPosit.cjs';
|
|
37
|
+
import './string/splitNum.cjs';
|
|
37
38
|
import './string/splitUpper.cjs';
|
|
38
39
|
import './string/startsNum.cjs';
|
|
39
40
|
import './string/toFunction.cjs';
|
package/dist/basic/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { i as array } from '../index-BYfEDFkm.js';
|
|
2
2
|
export { i as object } from '../index-oW2flHUo.js';
|
|
3
|
-
export { i as string } from '../index-
|
|
3
|
+
export { i as string } from '../index-BzjmJ_n4.js';
|
|
4
4
|
import './array/asyncMergeArray.js';
|
|
5
5
|
import './array/compareArray.js';
|
|
6
6
|
import './array/deleteArray.js';
|
|
@@ -34,6 +34,7 @@ import './string/getImports.js';
|
|
|
34
34
|
import './string/getStartSame.js';
|
|
35
35
|
import './string/getStartSames.js';
|
|
36
36
|
import './string/getStrNunPosit.js';
|
|
37
|
+
import './string/splitNum.js';
|
|
37
38
|
import './string/splitUpper.js';
|
|
38
39
|
import './string/startsNum.js';
|
|
39
40
|
import './string/toFunction.js';
|
package/dist/basic/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-SANLZVGX.js";
|
|
2
2
|
import {
|
|
3
3
|
string_exports
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-AS7KKPQT.js";
|
|
5
|
+
import "../chunk-VKE5JARB.js";
|
|
5
6
|
import "../chunk-U6V3V5KH.js";
|
|
6
7
|
import "../chunk-TIZFQBWC.js";
|
|
7
8
|
import "../chunk-ZADO6V3Z.js";
|
|
@@ -11,7 +12,7 @@ import "../chunk-YKSVLAAK.js";
|
|
|
11
12
|
import "../chunk-4KYAGDPN.js";
|
|
12
13
|
import "../chunk-N5Y3XGHX.js";
|
|
13
14
|
import "../chunk-7DTHADVK.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-YQ53QNMC.js";
|
|
15
16
|
import "../chunk-FS4JPT23.js";
|
|
16
17
|
import {
|
|
17
18
|
object_exports
|
|
@@ -36,17 +37,17 @@ import "../chunk-Q6FMBSK4.js";
|
|
|
36
37
|
import "../chunk-WQ2PUZ2S.js";
|
|
37
38
|
import "../chunk-DBSRZCFK.js";
|
|
38
39
|
import "../chunk-ZVBCHJA5.js";
|
|
40
|
+
import "../chunk-O34QAOO7.js";
|
|
39
41
|
import "../chunk-USIMBBLW.js";
|
|
40
42
|
import "../chunk-P7AWHISY.js";
|
|
41
43
|
import "../chunk-LPMR5W6M.js";
|
|
42
44
|
import "../chunk-DMZP4RPN.js";
|
|
45
|
+
import "../chunk-4OBNLDTJ.js";
|
|
46
|
+
import "../chunk-EWJJKQIO.js";
|
|
43
47
|
import "../chunk-A276ZDLP.js";
|
|
44
|
-
import "../chunk-O34QAOO7.js";
|
|
45
48
|
import "../chunk-BEKTNBRJ.js";
|
|
46
49
|
import "../chunk-GYE23WAN.js";
|
|
47
50
|
import "../chunk-MXY4W3K5.js";
|
|
48
|
-
import "../chunk-4OBNLDTJ.js";
|
|
49
|
-
import "../chunk-EWJJKQIO.js";
|
|
50
51
|
import "../chunk-5PX3AFSC.js";
|
|
51
52
|
import "../chunk-MLKGABMK.js";
|
|
52
53
|
export {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-SGWRUS75.cjs');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkL7FSHU27cjs = require('../../chunk-L7FSHU27.cjs');
|
|
2
5
|
|
|
3
6
|
|
|
4
7
|
|
|
@@ -39,7 +42,7 @@ var _chunkHWHYHL6Jcjs = require('../../chunk-HWHYHL6J.cjs');
|
|
|
39
42
|
var _chunkJ7S3KBHLcjs = require('../../chunk-J7S3KBHL.cjs');
|
|
40
43
|
|
|
41
44
|
|
|
42
|
-
var
|
|
45
|
+
var _chunk2DOCIHRTcjs = require('../../chunk-2DOCIHRT.cjs');
|
|
43
46
|
|
|
44
47
|
|
|
45
48
|
var _chunkXWCRGY54cjs = require('../../chunk-XWCRGY54.cjs');
|
|
@@ -58,13 +61,13 @@ var _chunkOJBZ7UUCcjs = require('../../chunk-OJBZ7UUC.cjs');
|
|
|
58
61
|
var _chunkJR6ZN6QDcjs = require('../../chunk-JR6ZN6QD.cjs');
|
|
59
62
|
|
|
60
63
|
|
|
61
|
-
var _chunkPW7RP73Jcjs = require('../../chunk-PW7RP73J.cjs');
|
|
62
|
-
|
|
63
|
-
|
|
64
64
|
var _chunkUEVMS6QDcjs = require('../../chunk-UEVMS6QD.cjs');
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
var _chunkOQL4GIEJcjs = require('../../chunk-OQL4GIEJ.cjs');
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
var _chunkPW7RP73Jcjs = require('../../chunk-PW7RP73J.cjs');
|
|
68
71
|
require('../../chunk-75ZPJI57.cjs');
|
|
69
72
|
|
|
70
73
|
|
|
@@ -96,4 +99,5 @@ require('../../chunk-75ZPJI57.cjs');
|
|
|
96
99
|
|
|
97
100
|
|
|
98
101
|
|
|
99
|
-
|
|
102
|
+
|
|
103
|
+
exports.appearNum = _chunkOJBZ7UUCcjs.appearNum; exports.appearNumSeat = _chunkJR6ZN6QDcjs.appearNumSeat; exports.deComment = _chunkXWCRGY54cjs.deComment; exports.extractParams = _chunkJJ37YIPJcjs.extractParams; exports.firstLower = _chunkUEVMS6QDcjs.firstLower; exports.firstUpper = _chunkOQL4GIEJcjs.firstUpper; exports.getContent = _chunk4PUYFFPOcjs.getContent; exports.getContents = _chunk4PUYFFPOcjs.getContents; exports.getExports = _chunkASGZ2VD6cjs.getExports; exports.getExportsExtended = _chunkASGZ2VD6cjs.getExportsExtended; exports.getExportsStrict = _chunkASGZ2VD6cjs.getExportsStrict; exports.getFunctionFormat = _chunkJJ37YIPJcjs.getFunctionFormat; exports.getImports = _chunkHWHYHL6Jcjs.getImports; exports.getImportss = _chunkHWHYHL6Jcjs.getImportss; exports.getStartSame = _chunkJ7S3KBHLcjs.getStartSame; exports.getStartSames = _chunkPW7RP73Jcjs.getStartSames; exports.getStrNunPosit = _chunk2H3KVSFAcjs.getStrNunPosit; exports.serializeCodeBlock = _chunkTKE7IK2Mcjs.serializeCodeBlock; exports.serializeFunctionRef = _chunkTKE7IK2Mcjs.serializeFunctionRef; exports.splitNum = _chunk2DOCIHRTcjs.splitNum; exports.splitUpper = _chunkL7FSHU27cjs.splitUpper; exports.startsNum = _chunkILJLXJ5Ocjs.startsNum; exports.toFunction = _chunkJJ37YIPJcjs.toFunction; exports.toFunctionParam = _chunkBWXXXTFUcjs.toFunctionParam; exports.toFunctionParamOptions = _chunkBWXXXTFUcjs.toFunctionParamOptions; exports.toJSONParse = _chunkK2XKKEE7cjs.toJSONParse; exports.toJSONSParse = _chunkTKE7IK2Mcjs.toJSONSParse; exports.toJSONSStringify = _chunkTKE7IK2Mcjs.toJSONSStringify; exports.toJSONStringify = _chunkK2XKKEE7cjs.toJSONStringify; exports.toStringParse = _chunkHLKHFBMFcjs.toStringParse;
|
|
@@ -9,6 +9,7 @@ export { getImports, getImportss } from './getImports.cjs';
|
|
|
9
9
|
export { getStartSame } from './getStartSame.cjs';
|
|
10
10
|
export { getStartSames } from './getStartSames.cjs';
|
|
11
11
|
export { getStrNunPosit } from './getStrNunPosit.cjs';
|
|
12
|
+
export { splitNum } from './splitNum.cjs';
|
|
12
13
|
export { splitUpper } from './splitUpper.cjs';
|
|
13
14
|
export { startsNum } from './startsNum.cjs';
|
|
14
15
|
export { FunctionFormat, extractParams, getFunctionFormat, toFunction } from './toFunction.cjs';
|
|
@@ -9,6 +9,7 @@ export { getImports, getImportss } from './getImports.js';
|
|
|
9
9
|
export { getStartSame } from './getStartSame.js';
|
|
10
10
|
export { getStartSames } from './getStartSames.js';
|
|
11
11
|
export { getStrNunPosit } from './getStrNunPosit.js';
|
|
12
|
+
export { splitNum } from './splitNum.js';
|
|
12
13
|
export { splitUpper } from './splitUpper.js';
|
|
13
14
|
export { startsNum } from './startsNum.js';
|
|
14
15
|
export { FunctionFormat, extractParams, getFunctionFormat, toFunction } from './toFunction.js';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-AS7KKPQT.js";
|
|
2
|
+
import {
|
|
3
|
+
splitUpper
|
|
4
|
+
} from "../../chunk-VKE5JARB.js";
|
|
2
5
|
import {
|
|
3
6
|
toFunctionParam,
|
|
4
7
|
toFunctionParamOptions
|
|
@@ -38,8 +41,8 @@ import {
|
|
|
38
41
|
getStartSame
|
|
39
42
|
} from "../../chunk-7DTHADVK.js";
|
|
40
43
|
import {
|
|
41
|
-
|
|
42
|
-
} from "../../chunk-
|
|
44
|
+
splitNum
|
|
45
|
+
} from "../../chunk-YQ53QNMC.js";
|
|
43
46
|
import {
|
|
44
47
|
deComment
|
|
45
48
|
} from "../../chunk-FS4JPT23.js";
|
|
@@ -56,15 +59,15 @@ import {
|
|
|
56
59
|
import {
|
|
57
60
|
appearNumSeat
|
|
58
61
|
} from "../../chunk-DMZP4RPN.js";
|
|
59
|
-
import {
|
|
60
|
-
getStartSames
|
|
61
|
-
} from "../../chunk-A276ZDLP.js";
|
|
62
62
|
import {
|
|
63
63
|
firstLower
|
|
64
64
|
} from "../../chunk-4OBNLDTJ.js";
|
|
65
65
|
import {
|
|
66
66
|
firstUpper
|
|
67
67
|
} from "../../chunk-EWJJKQIO.js";
|
|
68
|
+
import {
|
|
69
|
+
getStartSames
|
|
70
|
+
} from "../../chunk-A276ZDLP.js";
|
|
68
71
|
import "../../chunk-MLKGABMK.js";
|
|
69
72
|
export {
|
|
70
73
|
appearNum,
|
|
@@ -86,6 +89,7 @@ export {
|
|
|
86
89
|
getStrNunPosit,
|
|
87
90
|
serializeCodeBlock,
|
|
88
91
|
serializeFunctionRef,
|
|
92
|
+
splitNum,
|
|
89
93
|
splitUpper,
|
|
90
94
|
startsNum,
|
|
91
95
|
toFunction,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/string/splitNum.ts
|
|
2
|
+
function splitNum(str, separator = " ", limit = 2) {
|
|
3
|
+
if (limit < 1) return [];
|
|
4
|
+
if (limit === 1) return [str];
|
|
5
|
+
const result = [];
|
|
6
|
+
let lastIndex = 0;
|
|
7
|
+
let count = 0;
|
|
8
|
+
if (typeof separator === "string") {
|
|
9
|
+
for (let i = 0; i < limit - 1; i++) {
|
|
10
|
+
const index = str.indexOf(separator, lastIndex);
|
|
11
|
+
if (index === -1) break;
|
|
12
|
+
result.push(str.substring(lastIndex, index));
|
|
13
|
+
lastIndex = index + separator.length;
|
|
14
|
+
count++;
|
|
15
|
+
}
|
|
16
|
+
} else {
|
|
17
|
+
const regex = new RegExp(separator.source, separator.flags + "g");
|
|
18
|
+
regex.lastIndex = lastIndex;
|
|
19
|
+
let match;
|
|
20
|
+
while ((match = regex.exec(str)) !== null && count < limit - 1) {
|
|
21
|
+
result.push(str.substring(lastIndex, match.index));
|
|
22
|
+
lastIndex = regex.lastIndex;
|
|
23
|
+
count++;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
result.push(str.substring(lastIndex));
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
exports.splitNum = splitNum;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
splitUpper
|
|
3
|
+
} from "./chunk-VKE5JARB.js";
|
|
1
4
|
import {
|
|
2
5
|
toFunctionParam,
|
|
3
6
|
toFunctionParamOptions
|
|
@@ -37,8 +40,8 @@ import {
|
|
|
37
40
|
getStartSame
|
|
38
41
|
} from "./chunk-7DTHADVK.js";
|
|
39
42
|
import {
|
|
40
|
-
|
|
41
|
-
} from "./chunk-
|
|
43
|
+
splitNum
|
|
44
|
+
} from "./chunk-YQ53QNMC.js";
|
|
42
45
|
import {
|
|
43
46
|
deComment
|
|
44
47
|
} from "./chunk-FS4JPT23.js";
|
|
@@ -54,15 +57,15 @@ import {
|
|
|
54
57
|
import {
|
|
55
58
|
appearNumSeat
|
|
56
59
|
} from "./chunk-DMZP4RPN.js";
|
|
57
|
-
import {
|
|
58
|
-
getStartSames
|
|
59
|
-
} from "./chunk-A276ZDLP.js";
|
|
60
60
|
import {
|
|
61
61
|
firstLower
|
|
62
62
|
} from "./chunk-4OBNLDTJ.js";
|
|
63
63
|
import {
|
|
64
64
|
firstUpper
|
|
65
65
|
} from "./chunk-EWJJKQIO.js";
|
|
66
|
+
import {
|
|
67
|
+
getStartSames
|
|
68
|
+
} from "./chunk-A276ZDLP.js";
|
|
66
69
|
import {
|
|
67
70
|
__export
|
|
68
71
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -89,6 +92,7 @@ __export(string_exports, {
|
|
|
89
92
|
getStrNunPosit: () => getStrNunPosit,
|
|
90
93
|
serializeCodeBlock: () => serializeCodeBlock,
|
|
91
94
|
serializeFunctionRef: () => serializeFunctionRef,
|
|
95
|
+
splitNum: () => splitNum,
|
|
92
96
|
splitUpper: () => splitUpper,
|
|
93
97
|
startsNum: () => startsNum,
|
|
94
98
|
toFunction: () => toFunction,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// packages/html/getVueText.ts
|
|
2
|
+
function getVueText(content) {
|
|
3
|
+
const result = {
|
|
4
|
+
template: "",
|
|
5
|
+
scripts: [],
|
|
6
|
+
styles: [],
|
|
7
|
+
customBlocks: []
|
|
8
|
+
};
|
|
9
|
+
let i = 0;
|
|
10
|
+
const len = content.length;
|
|
11
|
+
while (i < len) {
|
|
12
|
+
const tagStart = content.indexOf("<", i);
|
|
13
|
+
if (tagStart === -1) break;
|
|
14
|
+
if (content.startsWith("<!--", tagStart)) {
|
|
15
|
+
i = content.indexOf("-->", tagStart) + 3;
|
|
16
|
+
if (i === 2) break;
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const tagNameMatch = content.substring(tagStart + 1).match(/^([a-z][a-z0-9-]*)/i);
|
|
20
|
+
if (!tagNameMatch) {
|
|
21
|
+
i = tagStart + 1;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
const tagName = tagNameMatch[1];
|
|
25
|
+
let tagEnd = content.indexOf(">", tagStart);
|
|
26
|
+
if (tagEnd === -1) break;
|
|
27
|
+
const closingTag = `</${tagName}>`;
|
|
28
|
+
const contentStart = tagEnd + 1;
|
|
29
|
+
let contentEnd = content.indexOf(closingTag, contentStart);
|
|
30
|
+
if (contentEnd === -1) {
|
|
31
|
+
i = contentStart;
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const tagContent = content.substring(contentStart, contentEnd).trim();
|
|
35
|
+
switch (tagName) {
|
|
36
|
+
case "template":
|
|
37
|
+
result.template = tagContent;
|
|
38
|
+
break;
|
|
39
|
+
case "script":
|
|
40
|
+
result.scripts.push(tagContent);
|
|
41
|
+
break;
|
|
42
|
+
case "style":
|
|
43
|
+
result.styles.push(tagContent);
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
result.customBlocks.push({
|
|
47
|
+
type: tagName,
|
|
48
|
+
content: tagContent
|
|
49
|
+
});
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
i = contentEnd + closingTag.length;
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
getVueText
|
|
59
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/html/getVueText.ts
|
|
2
|
+
function getVueText(content) {
|
|
3
|
+
const result = {
|
|
4
|
+
template: "",
|
|
5
|
+
scripts: [],
|
|
6
|
+
styles: [],
|
|
7
|
+
customBlocks: []
|
|
8
|
+
};
|
|
9
|
+
let i = 0;
|
|
10
|
+
const len = content.length;
|
|
11
|
+
while (i < len) {
|
|
12
|
+
const tagStart = content.indexOf("<", i);
|
|
13
|
+
if (tagStart === -1) break;
|
|
14
|
+
if (content.startsWith("<!--", tagStart)) {
|
|
15
|
+
i = content.indexOf("-->", tagStart) + 3;
|
|
16
|
+
if (i === 2) break;
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const tagNameMatch = content.substring(tagStart + 1).match(/^([a-z][a-z0-9-]*)/i);
|
|
20
|
+
if (!tagNameMatch) {
|
|
21
|
+
i = tagStart + 1;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
const tagName = tagNameMatch[1];
|
|
25
|
+
let tagEnd = content.indexOf(">", tagStart);
|
|
26
|
+
if (tagEnd === -1) break;
|
|
27
|
+
const closingTag = `</${tagName}>`;
|
|
28
|
+
const contentStart = tagEnd + 1;
|
|
29
|
+
let contentEnd = content.indexOf(closingTag, contentStart);
|
|
30
|
+
if (contentEnd === -1) {
|
|
31
|
+
i = contentStart;
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const tagContent = content.substring(contentStart, contentEnd).trim();
|
|
35
|
+
switch (tagName) {
|
|
36
|
+
case "template":
|
|
37
|
+
result.template = tagContent;
|
|
38
|
+
break;
|
|
39
|
+
case "script":
|
|
40
|
+
result.scripts.push(tagContent);
|
|
41
|
+
break;
|
|
42
|
+
case "style":
|
|
43
|
+
result.styles.push(tagContent);
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
result.customBlocks.push({
|
|
47
|
+
type: tagName,
|
|
48
|
+
content: tagContent
|
|
49
|
+
});
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
i = contentEnd + closingTag.length;
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
exports.getVueText = getVueText;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var _chunkEWXBN4VGcjs = require('./chunk-EWXBN4VG.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
3
|
var _chunkLEPZYF2Ncjs = require('./chunk-LEPZYF2N.cjs');
|
|
7
4
|
|
|
8
5
|
|
|
9
6
|
var _chunkE2MM4MECcjs = require('./chunk-E2MM4MEC.cjs');
|
|
10
7
|
|
|
11
8
|
|
|
9
|
+
var _chunkIWEOJ5C5cjs = require('./chunk-IWEOJ5C5.cjs');
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
|
|
12
|
+
var _chunkEWXBN4VGcjs = require('./chunk-EWXBN4VG.cjs');
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
|
|
@@ -20,8 +19,7 @@ var html_exports = {};
|
|
|
20
19
|
_chunk75ZPJI57cjs.__export.call(void 0, html_exports, {
|
|
21
20
|
analysisHtml: () => _chunkLEPZYF2Ncjs.analysisHtml,
|
|
22
21
|
generateHtmlh: () => _chunkE2MM4MECcjs.generateHtmlh,
|
|
23
|
-
getVueText: () =>
|
|
24
|
-
getVueTexts: () => _chunk6TBH7RACcjs.getVueTexts,
|
|
22
|
+
getVueText: () => _chunkIWEOJ5C5cjs.getVueText,
|
|
25
23
|
htmlEscape: () => _chunkEWXBN4VGcjs.htmlEscape
|
|
26
24
|
});
|
|
27
25
|
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
htmlEscape
|
|
3
|
-
} from "./chunk-NCSN3MC5.js";
|
|
4
1
|
import {
|
|
5
2
|
analysisHtml
|
|
6
3
|
} from "./chunk-GIAO77MY.js";
|
|
@@ -8,9 +5,11 @@ import {
|
|
|
8
5
|
generateHtmlh
|
|
9
6
|
} from "./chunk-IV7XHH6K.js";
|
|
10
7
|
import {
|
|
11
|
-
getVueText
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
getVueText
|
|
9
|
+
} from "./chunk-CDL6JMY2.js";
|
|
10
|
+
import {
|
|
11
|
+
htmlEscape
|
|
12
|
+
} from "./chunk-NCSN3MC5.js";
|
|
14
13
|
import {
|
|
15
14
|
__export
|
|
16
15
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -21,7 +20,6 @@ __export(html_exports, {
|
|
|
21
20
|
analysisHtml: () => analysisHtml,
|
|
22
21
|
generateHtmlh: () => generateHtmlh,
|
|
23
22
|
getVueText: () => getVueText,
|
|
24
|
-
getVueTexts: () => getVueTexts,
|
|
25
23
|
htmlEscape: () => htmlEscape
|
|
26
24
|
});
|
|
27
25
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkL7FSHU27cjs = require('./chunk-L7FSHU27.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
|
|
4
7
|
var _chunkBWXXXTFUcjs = require('./chunk-BWXXXTFU.cjs');
|
|
5
8
|
|
|
@@ -38,7 +41,7 @@ var _chunkHWHYHL6Jcjs = require('./chunk-HWHYHL6J.cjs');
|
|
|
38
41
|
var _chunkJ7S3KBHLcjs = require('./chunk-J7S3KBHL.cjs');
|
|
39
42
|
|
|
40
43
|
|
|
41
|
-
var
|
|
44
|
+
var _chunk2DOCIHRTcjs = require('./chunk-2DOCIHRT.cjs');
|
|
42
45
|
|
|
43
46
|
|
|
44
47
|
var _chunkXWCRGY54cjs = require('./chunk-XWCRGY54.cjs');
|
|
@@ -56,15 +59,15 @@ var _chunkOJBZ7UUCcjs = require('./chunk-OJBZ7UUC.cjs');
|
|
|
56
59
|
var _chunkJR6ZN6QDcjs = require('./chunk-JR6ZN6QD.cjs');
|
|
57
60
|
|
|
58
61
|
|
|
59
|
-
var _chunkPW7RP73Jcjs = require('./chunk-PW7RP73J.cjs');
|
|
60
|
-
|
|
61
|
-
|
|
62
62
|
var _chunkUEVMS6QDcjs = require('./chunk-UEVMS6QD.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
var _chunkOQL4GIEJcjs = require('./chunk-OQL4GIEJ.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
68
|
+
var _chunkPW7RP73Jcjs = require('./chunk-PW7RP73J.cjs');
|
|
69
|
+
|
|
70
|
+
|
|
68
71
|
var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
|
|
69
72
|
|
|
70
73
|
// packages/basic/string/index.ts
|
|
@@ -89,6 +92,7 @@ _chunk75ZPJI57cjs.__export.call(void 0, string_exports, {
|
|
|
89
92
|
getStrNunPosit: () => _chunk2H3KVSFAcjs.getStrNunPosit,
|
|
90
93
|
serializeCodeBlock: () => _chunkTKE7IK2Mcjs.serializeCodeBlock,
|
|
91
94
|
serializeFunctionRef: () => _chunkTKE7IK2Mcjs.serializeFunctionRef,
|
|
95
|
+
splitNum: () => _chunk2DOCIHRTcjs.splitNum,
|
|
92
96
|
splitUpper: () => _chunkL7FSHU27cjs.splitUpper,
|
|
93
97
|
startsNum: () => _chunkILJLXJ5Ocjs.startsNum,
|
|
94
98
|
toFunction: () => _chunkJJ37YIPJcjs.toFunction,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSGWRUS75cjs = require('./chunk-SGWRUS75.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkYUKBGZQ4cjs = require('./chunk-YUKBGZQ4.cjs');
|
|
@@ -16,7 +16,7 @@ var basic_exports = {};
|
|
|
16
16
|
_chunk75ZPJI57cjs.__export.call(void 0, basic_exports, {
|
|
17
17
|
array: () => _chunk65O7KWP4cjs.array_exports,
|
|
18
18
|
object: () => _chunkYUKBGZQ4cjs.object_exports,
|
|
19
|
-
string: () =>
|
|
19
|
+
string: () => _chunkSGWRUS75cjs.string_exports
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// packages/basic/string/splitNum.ts
|
|
2
|
+
function splitNum(str, separator = " ", limit = 2) {
|
|
3
|
+
if (limit < 1) return [];
|
|
4
|
+
if (limit === 1) return [str];
|
|
5
|
+
const result = [];
|
|
6
|
+
let lastIndex = 0;
|
|
7
|
+
let count = 0;
|
|
8
|
+
if (typeof separator === "string") {
|
|
9
|
+
for (let i = 0; i < limit - 1; i++) {
|
|
10
|
+
const index = str.indexOf(separator, lastIndex);
|
|
11
|
+
if (index === -1) break;
|
|
12
|
+
result.push(str.substring(lastIndex, index));
|
|
13
|
+
lastIndex = index + separator.length;
|
|
14
|
+
count++;
|
|
15
|
+
}
|
|
16
|
+
} else {
|
|
17
|
+
const regex = new RegExp(separator.source, separator.flags + "g");
|
|
18
|
+
regex.lastIndex = lastIndex;
|
|
19
|
+
let match;
|
|
20
|
+
while ((match = regex.exec(str)) !== null && count < limit - 1) {
|
|
21
|
+
result.push(str.substring(lastIndex, match.index));
|
|
22
|
+
lastIndex = regex.lastIndex;
|
|
23
|
+
count++;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
result.push(str.substring(lastIndex));
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
splitNum
|
|
32
|
+
};
|
package/dist/dom/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-PKFURLQT.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var _chunk2OR4FUOAcjs = require('../chunk-2OR4FUOA.cjs');
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
|
|
7
|
+
var _chunkEOJVE3HLcjs = require('../chunk-EOJVE3HL.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk2OR4FUOAcjs = require('../chunk-2OR4FUOA.cjs');
|
|
11
11
|
require('../chunk-75ZPJI57.cjs');
|
|
12
12
|
|
|
13
13
|
|
package/dist/dom/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "../chunk-
|
|
2
|
-
import {
|
|
3
|
-
getLocus
|
|
4
|
-
} from "../chunk-Q63V2U5G.js";
|
|
1
|
+
import "../chunk-GPFPHJRZ.js";
|
|
5
2
|
import {
|
|
6
3
|
foundEvent,
|
|
7
4
|
foundEventCallback,
|
|
8
5
|
pressEvent,
|
|
9
6
|
shiftEvent
|
|
10
7
|
} from "../chunk-AFFLQCJL.js";
|
|
8
|
+
import {
|
|
9
|
+
getLocus
|
|
10
|
+
} from "../chunk-Q63V2U5G.js";
|
|
11
11
|
import "../chunk-MLKGABMK.js";
|
|
12
12
|
export {
|
|
13
13
|
foundEvent,
|
package/dist/html/getVueText.cjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var _chunk6TBH7RACcjs = require('../chunk-6TBH7RAC.cjs');
|
|
3
|
+
var _chunkIWEOJ5C5cjs = require('../chunk-IWEOJ5C5.cjs');
|
|
5
4
|
require('../chunk-75ZPJI57.cjs');
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
exports.getVueText = _chunk6TBH7RACcjs.getVueText; exports.getVueTexts = _chunk6TBH7RACcjs.getVueTexts;
|
|
7
|
+
exports.getVueText = _chunkIWEOJ5C5cjs.getVueText;
|