@codady/icax 0.0.1
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/CHANGELOG.md +19 -0
- package/LICENSE +24 -0
- package/README.md +0 -0
- package/dist/icax.cjs.js +113 -0
- package/dist/icax.cjs.min.js +15 -0
- package/dist/icax.esm.js +111 -0
- package/dist/icax.esm.min.js +15 -0
- package/dist/icax.umd.js +119 -0
- package/dist/icax.umd.min.js +15 -0
- package/examples/demo.html +52 -0
- package/package.json +75 -0
- package/rollup.config.js +68 -0
- package/script-mini.js +43 -0
- package/script-note.js +34 -0
- package/src/icax.js +27 -0
- package/src/icax.ts +34 -0
- package/src/icaxCheck.js +3 -0
- package/src/icaxCheck.ts +11 -0
- package/src/icaxCircle.js +3 -0
- package/src/icaxCircle.ts +11 -0
- package/src/icaxClipboard - /345/211/257/346/234/254.js" +3 -0
- package/src/icaxClipboard.js +3 -0
- package/src/icaxClipboard.ts +11 -0
- package/src/icaxClose - /345/211/257/346/234/254.js" +3 -0
- package/src/icaxClose.js +3 -0
- package/src/icaxClose.ts +11 -0
- package/src/icaxCopy - /345/211/257/346/234/254.js" +3 -0
- package/src/icaxCopy.js +3 -0
- package/src/icaxCopy.ts +11 -0
- package/src/icaxDivide - /345/211/257/346/234/254.js" +3 -0
- package/src/icaxDivide.js +3 -0
- package/src/icaxDivide.ts +11 -0
- package/src/icaxDown.js +3 -0
- package/src/icaxDown.ts +11 -0
- package/src/icaxLeft - /345/211/257/346/234/254.js" +3 -0
- package/src/icaxLeft.js +3 -0
- package/src/icaxLeft.ts +11 -0
- package/src/icaxMinus - /345/211/257/346/234/254.js" +3 -0
- package/src/icaxMinus.js +3 -0
- package/src/icaxMinus.ts +11 -0
- package/src/icaxPercent - /345/211/257/346/234/254.js" +3 -0
- package/src/icaxPercent.js +3 -0
- package/src/icaxPercent.ts +11 -0
- package/src/icaxPlus - /345/211/257/346/234/254.js" +3 -0
- package/src/icaxPlus.js +3 -0
- package/src/icaxPlus.ts +11 -0
- package/src/icaxRight - /345/211/257/346/234/254.js" +3 -0
- package/src/icaxRight.js +3 -0
- package/src/icaxRight.ts +11 -0
- package/src/icaxSquare - /345/211/257/346/234/254.js" +3 -0
- package/src/icaxSquare.js +3 -0
- package/src/icaxSquare.ts +11 -0
- package/src/icaxUp.js +4 -0
- package/src/icaxUp.ts +12 -0
- package/src/style.js +9 -0
- package/src/style.ts +9 -0
- package/src/wrap.js +13 -0
- package/src/wrap.ts +18 -0
- package/tsconfig.json +108 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All changes to Icax including new features, updates, and removals are documented here.
|
|
4
|
+
|
|
5
|
+
## [v0.0.1] - 2026-1-4
|
|
6
|
+
|
|
7
|
+
### Distribution Files
|
|
8
|
+
- **JS**: https://unpkg.com/@codady/icax@0.0.1/dist/icax.umd.js
|
|
9
|
+
|
|
10
|
+
### Changes
|
|
11
|
+
|
|
12
|
+
#### Fixed
|
|
13
|
+
- Null
|
|
14
|
+
|
|
15
|
+
#### Added
|
|
16
|
+
- Publish the first version.
|
|
17
|
+
|
|
18
|
+
#### Removed
|
|
19
|
+
- Null
|
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 AXUI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
Please keep our copyright information. If you have any questions,
|
|
24
|
+
please contact us: 3217728223@qq.com.
|
package/README.md
ADDED
|
File without changes
|
package/dist/icax.cjs.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
|
|
2
|
+
/*!
|
|
3
|
+
* @since Last modified: 2026-1-7 17:15:20
|
|
4
|
+
* @name Icax event management system.
|
|
5
|
+
* @version 0.0.1
|
|
6
|
+
* @author AXUI development team <3217728223@qq.com>
|
|
7
|
+
* @description Icax.
|
|
8
|
+
* @see {@link https://icax.axui.cn|Official website}
|
|
9
|
+
* @see {@link https://github.com/codady/icax/issues|github issues}
|
|
10
|
+
* @see {@link https://gitee.com/codady/icax/issues|Gitee issues}
|
|
11
|
+
* @see {@link https://www.npmjs.com/package/@codady/icax|NPM}
|
|
12
|
+
* @issue QQ Group No.1:952502085
|
|
13
|
+
* @copyright This software supports the MIT License, allowing free learning and commercial use, but please retain the terms 'Icax', 'Icax' and 'COAX' within the software.
|
|
14
|
+
* @license MIT license
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const COMMA = ',';
|
|
20
|
+
|
|
21
|
+
const SPACE = ' ';
|
|
22
|
+
|
|
23
|
+
const trim = (str, placement = '') => {
|
|
24
|
+
if (typeof str !== 'string') {
|
|
25
|
+
console.warn('Expected a string input');
|
|
26
|
+
return '';
|
|
27
|
+
}
|
|
28
|
+
switch (placement) {
|
|
29
|
+
case 'start':
|
|
30
|
+
return str.trimStart();
|
|
31
|
+
case 'end':
|
|
32
|
+
return str.trimEnd();
|
|
33
|
+
case 'both':
|
|
34
|
+
return str.trim();
|
|
35
|
+
case 'global':
|
|
36
|
+
return str.replace(/[\s\r\n]+/g, '');
|
|
37
|
+
default:
|
|
38
|
+
return str.trim().replace(/[\s\r\n]+/g, ' '); // Default behavior, trims both ends and replaces inner spaces
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const parseClasses = (data) => {
|
|
43
|
+
let separator, result = [];
|
|
44
|
+
if (Array.isArray(data)) {
|
|
45
|
+
// If data is already an array, filter out invalid values
|
|
46
|
+
result = data.filter((k) => k && typeof k === 'string');
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
// Trim the input string and handle multiple spaces
|
|
50
|
+
data = trim(data);
|
|
51
|
+
// Use comma as the separator if present, otherwise use space
|
|
52
|
+
separator = data.includes(COMMA) ? COMMA : SPACE;
|
|
53
|
+
result = data.split(separator);
|
|
54
|
+
}
|
|
55
|
+
// Trim each item globally and filter out any empty strings
|
|
56
|
+
return result.map((k) => trim(k, 'global')).filter(Boolean);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const style = (name = '') => `
|
|
60
|
+
<style>
|
|
61
|
+
:where([dir="rtl"]) .icax-${name},
|
|
62
|
+
:where(:dir(rtl)) .icax-${name} {
|
|
63
|
+
transform: scaleX(-1);
|
|
64
|
+
transform-origin: center;
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
const wrap = (content, fun, isRtl = false, options) => {
|
|
70
|
+
const size = options?.size || '1em', color = options?.color || 'currentColor', thickness = options?.thickness || 2, classes = options?.classes ? parseClasses(options.classes).join(' ') : '',
|
|
71
|
+
// 得到 "icax-left"
|
|
72
|
+
origName = fun.name.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
73
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${color}"
|
|
74
|
+
stroke-width="${thickness}" stroke-linecap="round" stroke-linejoin="round" class="${origName} ${classes}">
|
|
75
|
+
${isRtl ? style(origName.split('-')[1]) : ''}
|
|
76
|
+
${content}
|
|
77
|
+
</svg>`;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const icaxCheck = (options) => wrap(`<polyline points="20 6 9 17 4 12"></polyline>`, icaxCheck, false, options);
|
|
81
|
+
|
|
82
|
+
const icaxCircle = (options) => wrap(`<circle cx="12" cy="12" r="10"></circle>`, icaxCircle, false, options);
|
|
83
|
+
|
|
84
|
+
const icaxClipboard = (options) => wrap(`<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>`, icaxClipboard, false, options);
|
|
85
|
+
|
|
86
|
+
const icaxClose = (options) => wrap(`<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>`, icaxClose, false, options);
|
|
87
|
+
|
|
88
|
+
const icaxCopy = (options) => wrap(`<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>`, icaxCopy, false, options);
|
|
89
|
+
|
|
90
|
+
const icaxDown = (options) => wrap(`<polyline points="6 9 12 15 18 9"></polyline>`, icaxDown, false, options);
|
|
91
|
+
|
|
92
|
+
const icaxLeft = (options) => wrap(`<polyline points="15 18 9 12 15 6"></polyline>`, icaxLeft, true, options);
|
|
93
|
+
|
|
94
|
+
const icaxRight = (options) => wrap(`<polyline points="9 18 15 12 9 6"></polyline>`, icaxRight, true, options);
|
|
95
|
+
|
|
96
|
+
const icaxSquare = (options) => wrap(`<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>`, icaxSquare, false, options);
|
|
97
|
+
|
|
98
|
+
const icaxUp = (options) => wrap(`<polyline points="18 15 12 9 6 15"></polyline>`, icaxUp, false, options);
|
|
99
|
+
|
|
100
|
+
const icax = {
|
|
101
|
+
left: icaxLeft,
|
|
102
|
+
right: icaxRight,
|
|
103
|
+
up: icaxUp,
|
|
104
|
+
down: icaxDown,
|
|
105
|
+
copy: icaxCopy,
|
|
106
|
+
clipboard: icaxClipboard,
|
|
107
|
+
close: icaxClose,
|
|
108
|
+
check: icaxCheck,
|
|
109
|
+
square: icaxSquare,
|
|
110
|
+
circle: icaxCircle,
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
module.exports = icax;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @since Last modified: 2026-1-7 17:15:20
|
|
3
|
+
* @name Icax event management system.
|
|
4
|
+
* @version 0.0.1
|
|
5
|
+
* @author AXUI development team <3217728223@qq.com>
|
|
6
|
+
* @description Icax.
|
|
7
|
+
* @see {@link https://icax.axui.cn|Official website}
|
|
8
|
+
* @see {@link https://github.com/codady/icax/issues|github issues}
|
|
9
|
+
* @see {@link https://gitee.com/codady/icax/issues|Gitee issues}
|
|
10
|
+
* @see {@link https://www.npmjs.com/package/@codady/icax|NPM}
|
|
11
|
+
* @issue QQ Group No.1:952502085
|
|
12
|
+
* @copyright This software supports the MIT License, allowing free learning and commercial use, but please retain the terms 'Icax', 'Icax' and 'COAX' within the software.
|
|
13
|
+
* @license MIT license
|
|
14
|
+
*/
|
|
15
|
+
"use strict";const COMMA=",",SPACE=" ",trim=(e,i="")=>{if("string"!=typeof e)return"";switch(i){case"start":return e.trimStart();case"end":return e.trimEnd();case"both":return e.trim();case"global":return e.replace(/[\s\r\n]+/g,"");default:return e.trim().replace(/[\s\r\n]+/g," ")}},parseClasses=e=>{let i,r=[];return Array.isArray(e)?r=e.filter(e=>e&&"string"==typeof e):(i=(e=trim(e)).includes(",")?",":" ",r=e.split(i)),r.map(e=>trim(e,"global")).filter(Boolean)},style=(e="")=>`\n <style>\n :where([dir="rtl"]) .icax-${e},\n :where(:dir(rtl)) .icax-${e} {\n transform: scaleX(-1);\n transform-origin: center;\n }\n </style>\n`,wrap=(e,i,r=!1,a)=>{const t=a?.size||"1em",c=a?.color||"currentColor",l=a?.thickness||2,n=a?.classes?parseClasses(a.classes).join(" "):"",s=i.name.replace(/([A-Z])/g,"-$1").toLowerCase();return`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${c}"\n stroke-width="${l}" stroke-linecap="round" stroke-linejoin="round" class="${s} ${n}">\n ${r?style(s.split("-")[1]):""}\n ${e}\n </svg>`},icaxCheck=e=>wrap('<polyline points="20 6 9 17 4 12"></polyline>',icaxCheck,!1,e),icaxCircle=e=>wrap('<circle cx="12" cy="12" r="10"></circle>',icaxCircle,!1,e),icaxClipboard=e=>wrap('<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>',icaxClipboard,!1,e),icaxClose=e=>wrap('<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>',icaxClose,!1,e),icaxCopy=e=>wrap('<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>',icaxCopy,!1,e),icaxDown=e=>wrap('<polyline points="6 9 12 15 18 9"></polyline>',icaxDown,!1,e),icaxLeft=e=>wrap('<polyline points="15 18 9 12 15 6"></polyline>',icaxLeft,!0,e),icaxRight=e=>wrap('<polyline points="9 18 15 12 9 6"></polyline>',icaxRight,!0,e),icaxSquare=e=>wrap('<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>',icaxSquare,!1,e),icaxUp=e=>wrap('<polyline points="18 15 12 9 6 15"></polyline>',icaxUp,!1,e),icax={left:icaxLeft,right:icaxRight,up:icaxUp,down:icaxDown,copy:icaxCopy,clipboard:icaxClipboard,close:icaxClose,check:icaxCheck,square:icaxSquare,circle:icaxCircle};module.exports=icax;
|
package/dist/icax.esm.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
|
|
2
|
+
/*!
|
|
3
|
+
* @since Last modified: 2026-1-7 17:15:20
|
|
4
|
+
* @name Icax event management system.
|
|
5
|
+
* @version 0.0.1
|
|
6
|
+
* @author AXUI development team <3217728223@qq.com>
|
|
7
|
+
* @description Icax.
|
|
8
|
+
* @see {@link https://icax.axui.cn|Official website}
|
|
9
|
+
* @see {@link https://github.com/codady/icax/issues|github issues}
|
|
10
|
+
* @see {@link https://gitee.com/codady/icax/issues|Gitee issues}
|
|
11
|
+
* @see {@link https://www.npmjs.com/package/@codady/icax|NPM}
|
|
12
|
+
* @issue QQ Group No.1:952502085
|
|
13
|
+
* @copyright This software supports the MIT License, allowing free learning and commercial use, but please retain the terms 'Icax', 'Icax' and 'COAX' within the software.
|
|
14
|
+
* @license MIT license
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const COMMA = ',';
|
|
18
|
+
|
|
19
|
+
const SPACE = ' ';
|
|
20
|
+
|
|
21
|
+
const trim = (str, placement = '') => {
|
|
22
|
+
if (typeof str !== 'string') {
|
|
23
|
+
console.warn('Expected a string input');
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
switch (placement) {
|
|
27
|
+
case 'start':
|
|
28
|
+
return str.trimStart();
|
|
29
|
+
case 'end':
|
|
30
|
+
return str.trimEnd();
|
|
31
|
+
case 'both':
|
|
32
|
+
return str.trim();
|
|
33
|
+
case 'global':
|
|
34
|
+
return str.replace(/[\s\r\n]+/g, '');
|
|
35
|
+
default:
|
|
36
|
+
return str.trim().replace(/[\s\r\n]+/g, ' '); // Default behavior, trims both ends and replaces inner spaces
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const parseClasses = (data) => {
|
|
41
|
+
let separator, result = [];
|
|
42
|
+
if (Array.isArray(data)) {
|
|
43
|
+
// If data is already an array, filter out invalid values
|
|
44
|
+
result = data.filter((k) => k && typeof k === 'string');
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
// Trim the input string and handle multiple spaces
|
|
48
|
+
data = trim(data);
|
|
49
|
+
// Use comma as the separator if present, otherwise use space
|
|
50
|
+
separator = data.includes(COMMA) ? COMMA : SPACE;
|
|
51
|
+
result = data.split(separator);
|
|
52
|
+
}
|
|
53
|
+
// Trim each item globally and filter out any empty strings
|
|
54
|
+
return result.map((k) => trim(k, 'global')).filter(Boolean);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const style = (name = '') => `
|
|
58
|
+
<style>
|
|
59
|
+
:where([dir="rtl"]) .icax-${name},
|
|
60
|
+
:where(:dir(rtl)) .icax-${name} {
|
|
61
|
+
transform: scaleX(-1);
|
|
62
|
+
transform-origin: center;
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
const wrap = (content, fun, isRtl = false, options) => {
|
|
68
|
+
const size = options?.size || '1em', color = options?.color || 'currentColor', thickness = options?.thickness || 2, classes = options?.classes ? parseClasses(options.classes).join(' ') : '',
|
|
69
|
+
// 得到 "icax-left"
|
|
70
|
+
origName = fun.name.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
71
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${color}"
|
|
72
|
+
stroke-width="${thickness}" stroke-linecap="round" stroke-linejoin="round" class="${origName} ${classes}">
|
|
73
|
+
${isRtl ? style(origName.split('-')[1]) : ''}
|
|
74
|
+
${content}
|
|
75
|
+
</svg>`;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const icaxCheck = (options) => wrap(`<polyline points="20 6 9 17 4 12"></polyline>`, icaxCheck, false, options);
|
|
79
|
+
|
|
80
|
+
const icaxCircle = (options) => wrap(`<circle cx="12" cy="12" r="10"></circle>`, icaxCircle, false, options);
|
|
81
|
+
|
|
82
|
+
const icaxClipboard = (options) => wrap(`<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>`, icaxClipboard, false, options);
|
|
83
|
+
|
|
84
|
+
const icaxClose = (options) => wrap(`<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>`, icaxClose, false, options);
|
|
85
|
+
|
|
86
|
+
const icaxCopy = (options) => wrap(`<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>`, icaxCopy, false, options);
|
|
87
|
+
|
|
88
|
+
const icaxDown = (options) => wrap(`<polyline points="6 9 12 15 18 9"></polyline>`, icaxDown, false, options);
|
|
89
|
+
|
|
90
|
+
const icaxLeft = (options) => wrap(`<polyline points="15 18 9 12 15 6"></polyline>`, icaxLeft, true, options);
|
|
91
|
+
|
|
92
|
+
const icaxRight = (options) => wrap(`<polyline points="9 18 15 12 9 6"></polyline>`, icaxRight, true, options);
|
|
93
|
+
|
|
94
|
+
const icaxSquare = (options) => wrap(`<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>`, icaxSquare, false, options);
|
|
95
|
+
|
|
96
|
+
const icaxUp = (options) => wrap(`<polyline points="18 15 12 9 6 15"></polyline>`, icaxUp, false, options);
|
|
97
|
+
|
|
98
|
+
const icax = {
|
|
99
|
+
left: icaxLeft,
|
|
100
|
+
right: icaxRight,
|
|
101
|
+
up: icaxUp,
|
|
102
|
+
down: icaxDown,
|
|
103
|
+
copy: icaxCopy,
|
|
104
|
+
clipboard: icaxClipboard,
|
|
105
|
+
close: icaxClose,
|
|
106
|
+
check: icaxCheck,
|
|
107
|
+
square: icaxSquare,
|
|
108
|
+
circle: icaxCircle,
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export { icax as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @since Last modified: 2026-1-7 17:15:20
|
|
3
|
+
* @name Icax event management system.
|
|
4
|
+
* @version 0.0.1
|
|
5
|
+
* @author AXUI development team <3217728223@qq.com>
|
|
6
|
+
* @description Icax.
|
|
7
|
+
* @see {@link https://icax.axui.cn|Official website}
|
|
8
|
+
* @see {@link https://github.com/codady/icax/issues|github issues}
|
|
9
|
+
* @see {@link https://gitee.com/codady/icax/issues|Gitee issues}
|
|
10
|
+
* @see {@link https://www.npmjs.com/package/@codady/icax|NPM}
|
|
11
|
+
* @issue QQ Group No.1:952502085
|
|
12
|
+
* @copyright This software supports the MIT License, allowing free learning and commercial use, but please retain the terms 'Icax', 'Icax' and 'COAX' within the software.
|
|
13
|
+
* @license MIT license
|
|
14
|
+
*/
|
|
15
|
+
const COMMA=",",SPACE=" ",trim=(e,i="")=>{if("string"!=typeof e)return"";switch(i){case"start":return e.trimStart();case"end":return e.trimEnd();case"both":return e.trim();case"global":return e.replace(/[\s\r\n]+/g,"");default:return e.trim().replace(/[\s\r\n]+/g," ")}},parseClasses=e=>{let i,r=[];return Array.isArray(e)?r=e.filter(e=>e&&"string"==typeof e):(i=(e=trim(e)).includes(",")?",":" ",r=e.split(i)),r.map(e=>trim(e,"global")).filter(Boolean)},style=(e="")=>`\n <style>\n :where([dir="rtl"]) .icax-${e},\n :where(:dir(rtl)) .icax-${e} {\n transform: scaleX(-1);\n transform-origin: center;\n }\n </style>\n`,wrap=(e,i,r=!1,a)=>{const t=a?.size||"1em",c=a?.color||"currentColor",l=a?.thickness||2,n=a?.classes?parseClasses(a.classes).join(" "):"",s=i.name.replace(/([A-Z])/g,"-$1").toLowerCase();return`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${c}"\n stroke-width="${l}" stroke-linecap="round" stroke-linejoin="round" class="${s} ${n}">\n ${r?style(s.split("-")[1]):""}\n ${e}\n </svg>`},icaxCheck=e=>wrap('<polyline points="20 6 9 17 4 12"></polyline>',icaxCheck,!1,e),icaxCircle=e=>wrap('<circle cx="12" cy="12" r="10"></circle>',icaxCircle,!1,e),icaxClipboard=e=>wrap('<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>',icaxClipboard,!1,e),icaxClose=e=>wrap('<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>',icaxClose,!1,e),icaxCopy=e=>wrap('<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>',icaxCopy,!1,e),icaxDown=e=>wrap('<polyline points="6 9 12 15 18 9"></polyline>',icaxDown,!1,e),icaxLeft=e=>wrap('<polyline points="15 18 9 12 15 6"></polyline>',icaxLeft,!0,e),icaxRight=e=>wrap('<polyline points="9 18 15 12 9 6"></polyline>',icaxRight,!0,e),icaxSquare=e=>wrap('<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>',icaxSquare,!1,e),icaxUp=e=>wrap('<polyline points="18 15 12 9 6 15"></polyline>',icaxUp,!1,e),icax={left:icaxLeft,right:icaxRight,up:icaxUp,down:icaxDown,copy:icaxCopy,clipboard:icaxClipboard,close:icaxClose,check:icaxCheck,square:icaxSquare,circle:icaxCircle};export{icax as default};
|
package/dist/icax.umd.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
|
|
2
|
+
/*!
|
|
3
|
+
* @since Last modified: 2026-1-7 17:15:20
|
|
4
|
+
* @name Icax event management system.
|
|
5
|
+
* @version 0.0.1
|
|
6
|
+
* @author AXUI development team <3217728223@qq.com>
|
|
7
|
+
* @description Icax.
|
|
8
|
+
* @see {@link https://icax.axui.cn|Official website}
|
|
9
|
+
* @see {@link https://github.com/codady/icax/issues|github issues}
|
|
10
|
+
* @see {@link https://gitee.com/codady/icax/issues|Gitee issues}
|
|
11
|
+
* @see {@link https://www.npmjs.com/package/@codady/icax|NPM}
|
|
12
|
+
* @issue QQ Group No.1:952502085
|
|
13
|
+
* @copyright This software supports the MIT License, allowing free learning and commercial use, but please retain the terms 'Icax', 'Icax' and 'COAX' within the software.
|
|
14
|
+
* @license MIT license
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
(function (global, factory) {
|
|
18
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
19
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
|
20
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.icax = factory());
|
|
21
|
+
})(this, (function () { 'use strict';
|
|
22
|
+
|
|
23
|
+
const COMMA = ',';
|
|
24
|
+
|
|
25
|
+
const SPACE = ' ';
|
|
26
|
+
|
|
27
|
+
const trim = (str, placement = '') => {
|
|
28
|
+
if (typeof str !== 'string') {
|
|
29
|
+
console.warn('Expected a string input');
|
|
30
|
+
return '';
|
|
31
|
+
}
|
|
32
|
+
switch (placement) {
|
|
33
|
+
case 'start':
|
|
34
|
+
return str.trimStart();
|
|
35
|
+
case 'end':
|
|
36
|
+
return str.trimEnd();
|
|
37
|
+
case 'both':
|
|
38
|
+
return str.trim();
|
|
39
|
+
case 'global':
|
|
40
|
+
return str.replace(/[\s\r\n]+/g, '');
|
|
41
|
+
default:
|
|
42
|
+
return str.trim().replace(/[\s\r\n]+/g, ' '); // Default behavior, trims both ends and replaces inner spaces
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const parseClasses = (data) => {
|
|
47
|
+
let separator, result = [];
|
|
48
|
+
if (Array.isArray(data)) {
|
|
49
|
+
// If data is already an array, filter out invalid values
|
|
50
|
+
result = data.filter((k) => k && typeof k === 'string');
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
// Trim the input string and handle multiple spaces
|
|
54
|
+
data = trim(data);
|
|
55
|
+
// Use comma as the separator if present, otherwise use space
|
|
56
|
+
separator = data.includes(COMMA) ? COMMA : SPACE;
|
|
57
|
+
result = data.split(separator);
|
|
58
|
+
}
|
|
59
|
+
// Trim each item globally and filter out any empty strings
|
|
60
|
+
return result.map((k) => trim(k, 'global')).filter(Boolean);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const style = (name = '') => `
|
|
64
|
+
<style>
|
|
65
|
+
:where([dir="rtl"]) .icax-${name},
|
|
66
|
+
:where(:dir(rtl)) .icax-${name} {
|
|
67
|
+
transform: scaleX(-1);
|
|
68
|
+
transform-origin: center;
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
const wrap = (content, fun, isRtl = false, options) => {
|
|
74
|
+
const size = options?.size || '1em', color = options?.color || 'currentColor', thickness = options?.thickness || 2, classes = options?.classes ? parseClasses(options.classes).join(' ') : '',
|
|
75
|
+
// 得到 "icax-left"
|
|
76
|
+
origName = fun.name.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
77
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${color}"
|
|
78
|
+
stroke-width="${thickness}" stroke-linecap="round" stroke-linejoin="round" class="${origName} ${classes}">
|
|
79
|
+
${isRtl ? style(origName.split('-')[1]) : ''}
|
|
80
|
+
${content}
|
|
81
|
+
</svg>`;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const icaxCheck = (options) => wrap(`<polyline points="20 6 9 17 4 12"></polyline>`, icaxCheck, false, options);
|
|
85
|
+
|
|
86
|
+
const icaxCircle = (options) => wrap(`<circle cx="12" cy="12" r="10"></circle>`, icaxCircle, false, options);
|
|
87
|
+
|
|
88
|
+
const icaxClipboard = (options) => wrap(`<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>`, icaxClipboard, false, options);
|
|
89
|
+
|
|
90
|
+
const icaxClose = (options) => wrap(`<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>`, icaxClose, false, options);
|
|
91
|
+
|
|
92
|
+
const icaxCopy = (options) => wrap(`<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>`, icaxCopy, false, options);
|
|
93
|
+
|
|
94
|
+
const icaxDown = (options) => wrap(`<polyline points="6 9 12 15 18 9"></polyline>`, icaxDown, false, options);
|
|
95
|
+
|
|
96
|
+
const icaxLeft = (options) => wrap(`<polyline points="15 18 9 12 15 6"></polyline>`, icaxLeft, true, options);
|
|
97
|
+
|
|
98
|
+
const icaxRight = (options) => wrap(`<polyline points="9 18 15 12 9 6"></polyline>`, icaxRight, true, options);
|
|
99
|
+
|
|
100
|
+
const icaxSquare = (options) => wrap(`<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>`, icaxSquare, false, options);
|
|
101
|
+
|
|
102
|
+
const icaxUp = (options) => wrap(`<polyline points="18 15 12 9 6 15"></polyline>`, icaxUp, false, options);
|
|
103
|
+
|
|
104
|
+
const icax = {
|
|
105
|
+
left: icaxLeft,
|
|
106
|
+
right: icaxRight,
|
|
107
|
+
up: icaxUp,
|
|
108
|
+
down: icaxDown,
|
|
109
|
+
copy: icaxCopy,
|
|
110
|
+
clipboard: icaxClipboard,
|
|
111
|
+
close: icaxClose,
|
|
112
|
+
check: icaxCheck,
|
|
113
|
+
square: icaxSquare,
|
|
114
|
+
circle: icaxCircle,
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
return icax;
|
|
118
|
+
|
|
119
|
+
}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @since Last modified: 2026-1-7 17:15:20
|
|
3
|
+
* @name Icax event management system.
|
|
4
|
+
* @version 0.0.1
|
|
5
|
+
* @author AXUI development team <3217728223@qq.com>
|
|
6
|
+
* @description Icax.
|
|
7
|
+
* @see {@link https://icax.axui.cn|Official website}
|
|
8
|
+
* @see {@link https://github.com/codady/icax/issues|github issues}
|
|
9
|
+
* @see {@link https://gitee.com/codady/icax/issues|Gitee issues}
|
|
10
|
+
* @see {@link https://www.npmjs.com/package/@codady/icax|NPM}
|
|
11
|
+
* @issue QQ Group No.1:952502085
|
|
12
|
+
* @copyright This software supports the MIT License, allowing free learning and commercial use, but please retain the terms 'Icax', 'Icax' and 'COAX' within the software.
|
|
13
|
+
* @license MIT license
|
|
14
|
+
*/
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).icax=t()}(this,function(){"use strict";const trim=(e,t="")=>{if("string"!=typeof e)return"";switch(t){case"start":return e.trimStart();case"end":return e.trimEnd();case"both":return e.trim();case"global":return e.replace(/[\s\r\n]+/g,"");default:return e.trim().replace(/[\s\r\n]+/g," ")}},wrap=(e,t,r=!1,n)=>{const i=n?.size||"1em",l=n?.color||"currentColor",o=n?.thickness||2,s=n?.classes?(e=>{let t,r=[];return Array.isArray(e)?r=e.filter(e=>e&&"string"==typeof e):(t=(e=trim(e)).includes(",")?",":" ",r=e.split(t)),r.map(e=>trim(e,"global")).filter(Boolean)})(n.classes).join(" "):"",c=t.name.replace(/([A-Z])/g,"-$1").toLowerCase();return`<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${i}" viewBox="0 0 24 24" fill="none" stroke="${l}"\n stroke-width="${o}" stroke-linecap="round" stroke-linejoin="round" class="${c} ${s}">\n ${r?((e="")=>`\n <style>\n :where([dir="rtl"]) .icax-${e},\n :where(:dir(rtl)) .icax-${e} {\n transform: scaleX(-1);\n transform-origin: center;\n }\n </style>\n`)(c.split("-")[1]):""}\n ${e}\n </svg>`},icaxCheck=e=>wrap('<polyline points="20 6 9 17 4 12"></polyline>',icaxCheck,!1,e),icaxCircle=e=>wrap('<circle cx="12" cy="12" r="10"></circle>',icaxCircle,!1,e),icaxClipboard=e=>wrap('<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>',icaxClipboard,!1,e),icaxClose=e=>wrap('<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>',icaxClose,!1,e),icaxCopy=e=>wrap('<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>',icaxCopy,!1,e),icaxDown=e=>wrap('<polyline points="6 9 12 15 18 9"></polyline>',icaxDown,!1,e),icaxLeft=e=>wrap('<polyline points="15 18 9 12 15 6"></polyline>',icaxLeft,!0,e),icaxRight=e=>wrap('<polyline points="9 18 15 12 9 6"></polyline>',icaxRight,!0,e),icaxSquare=e=>wrap('<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>',icaxSquare,!1,e),icaxUp=e=>wrap('<polyline points="18 15 12 9 6 15"></polyline>',icaxUp,!1,e);return{left:icaxLeft,right:icaxRight,up:icaxUp,down:icaxDown,copy:icaxCopy,clipboard:icaxClipboard,close:icaxClose,check:icaxCheck,square:icaxSquare,circle:icaxCircle}});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>Icax 图标库</title>
|
|
8
|
+
<style>
|
|
9
|
+
|
|
10
|
+
</style>
|
|
11
|
+
|
|
12
|
+
</head>
|
|
13
|
+
|
|
14
|
+
<body>
|
|
15
|
+
|
|
16
|
+
<div style="display: grid;grid-template-columns: repeat(7, 1fr)" id="grid">
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
<script src="../dist/icax.umd.js" type='text/javascript'></script>
|
|
22
|
+
<script src="../node_modules/@codady/utils/dist/utils.umd.js" type='text/javascript'></script>
|
|
23
|
+
<script type='text/javascript'>
|
|
24
|
+
|
|
25
|
+
let grid = utils.getEl('#grid');
|
|
26
|
+
for (let key in icax) {
|
|
27
|
+
let value = icax[key],
|
|
28
|
+
item = utils.createEl('div', {}, `<div>${value()}</div><div>${key}(${value.name})</div><div>../assets/${key}.svg</div>`);
|
|
29
|
+
grid.append(item);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
let tools = utils.createTools([
|
|
33
|
+
{
|
|
34
|
+
name:'01',
|
|
35
|
+
icon:icax.left({classes:'a b c'}),
|
|
36
|
+
label:'ceshi'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name:'02',
|
|
40
|
+
icon:icax.right(),
|
|
41
|
+
label:'测试'
|
|
42
|
+
},
|
|
43
|
+
]);
|
|
44
|
+
|
|
45
|
+
document.body.appendChild(tools);
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
</script>
|
|
50
|
+
</body>
|
|
51
|
+
|
|
52
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codady/icax",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"author": "AXUI Development Team",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"description": "icax",
|
|
10
|
+
"main": "./src/icax.js",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"types": "./types/icax.d.ts",
|
|
13
|
+
"directories": {
|
|
14
|
+
"doc": "docs"
|
|
15
|
+
},
|
|
16
|
+
"private": false,
|
|
17
|
+
"workspaces": [],
|
|
18
|
+
"files": [
|
|
19
|
+
"examples",
|
|
20
|
+
"docs",
|
|
21
|
+
"dist",
|
|
22
|
+
"src",
|
|
23
|
+
"package.json",
|
|
24
|
+
"rollup.config.js",
|
|
25
|
+
"tsconfig.json",
|
|
26
|
+
"script-mini.js",
|
|
27
|
+
"script-note.js",
|
|
28
|
+
"CHANGELOG.md",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
34
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
35
|
+
"@types/node": "^22.19.1",
|
|
36
|
+
"archiver": "^7.0.1",
|
|
37
|
+
"cross-env": "^7.0.3",
|
|
38
|
+
"rollup": "^4.18.1",
|
|
39
|
+
"rollup-plugin-replace": "^2.2.0",
|
|
40
|
+
"terser": "^5.27.2"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "rollup --config",
|
|
44
|
+
"mini": "node script-mini.js",
|
|
45
|
+
"push": "node script-push.js",
|
|
46
|
+
"all": "cross-env REPLACE=true npm run build && npm run css && npm run mini && npm publish && (npm run push || true)"
|
|
47
|
+
},
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "https://github.com/codady/icax"
|
|
51
|
+
},
|
|
52
|
+
"extraRepositories": [
|
|
53
|
+
{
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "https://gitee.com/codady/icax"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"keywords": [
|
|
59
|
+
"javascript",
|
|
60
|
+
"es6",
|
|
61
|
+
"components",
|
|
62
|
+
"vnode",
|
|
63
|
+
"mvvm",
|
|
64
|
+
"html5",
|
|
65
|
+
"css3"
|
|
66
|
+
],
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/codady/icax/issues"
|
|
69
|
+
},
|
|
70
|
+
"homepage": "https://www.axui.cn",
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@codady/utils": "^0.0.25",
|
|
73
|
+
"simple-git": "^3.27.0"
|
|
74
|
+
}
|
|
75
|
+
}
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Last modified: 2026/01/07 09:11:32
|
|
3
|
+
*/
|
|
4
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
5
|
+
import replace from 'rollup-plugin-replace';
|
|
6
|
+
import note from './script-note.js';
|
|
7
|
+
import json from '@rollup/plugin-json';
|
|
8
|
+
|
|
9
|
+
const sharePlugins = [
|
|
10
|
+
{
|
|
11
|
+
name: "remove-comments",
|
|
12
|
+
transform(code) {
|
|
13
|
+
const cleanedCode = code.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
14
|
+
return {
|
|
15
|
+
code: cleanedCode,
|
|
16
|
+
map: null,
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
process.env.REPLACE === 'true' && replace({
|
|
21
|
+
preventAssignment: true,
|
|
22
|
+
'console.log': '',
|
|
23
|
+
}),
|
|
24
|
+
resolve(),
|
|
25
|
+
json(),
|
|
26
|
+
].filter(Boolean);
|
|
27
|
+
export default [
|
|
28
|
+
{
|
|
29
|
+
input: './src/icax.js',
|
|
30
|
+
output:
|
|
31
|
+
{
|
|
32
|
+
dir: './dist/',
|
|
33
|
+
format: 'umd',
|
|
34
|
+
name: 'icax',
|
|
35
|
+
entryFileNames: 'icax.umd.js',
|
|
36
|
+
banner: note,
|
|
37
|
+
},
|
|
38
|
+
plugins: [
|
|
39
|
+
...sharePlugins,
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
input: './src/icax.js',
|
|
44
|
+
output:
|
|
45
|
+
{
|
|
46
|
+
dir: './dist/',
|
|
47
|
+
format: 'es',
|
|
48
|
+
entryFileNames: 'icax.esm.js',
|
|
49
|
+
banner: note,
|
|
50
|
+
},
|
|
51
|
+
plugins: [
|
|
52
|
+
...sharePlugins
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
input: './src/icax.js',
|
|
57
|
+
output:
|
|
58
|
+
{
|
|
59
|
+
dir: './dist/',
|
|
60
|
+
format: 'cjs',
|
|
61
|
+
entryFileNames: 'icax.cjs.js',
|
|
62
|
+
banner: note,
|
|
63
|
+
},
|
|
64
|
+
plugins: [
|
|
65
|
+
...sharePlugins
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
]
|