@yh-ui/icons 1.0.0 → 1.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/dist/iconify.mjs +23 -23
- package/dist/src/iconify.d.ts +1 -1
- package/dist/src/iconify.d.ts.map +1 -1
- package/package.json +19 -4
package/dist/iconify.mjs
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { Icon as f } from "@iconify/vue";
|
|
2
|
-
import { h as
|
|
3
|
-
function
|
|
4
|
-
const { icon:
|
|
1
|
+
import { Icon as f, getIcon as u, loadIcon as p } from "@iconify/vue";
|
|
2
|
+
import { h as d } from "vue";
|
|
3
|
+
function l(t) {
|
|
4
|
+
const { icon: o, size: r, color: e, spin: a, rotate: i } = t, n = {};
|
|
5
5
|
if (r) {
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const c = typeof r == "number" ? `${r}px` : r;
|
|
7
|
+
n.width = c, n.height = c, n.fontSize = c;
|
|
8
8
|
}
|
|
9
|
-
return e && (
|
|
10
|
-
icon:
|
|
11
|
-
style: Object.keys(
|
|
9
|
+
return e && (n.color = e), i && (n.transform = `rotate(${i}deg)`), a && (n.animation = "spin 1s linear infinite"), {
|
|
10
|
+
icon: o,
|
|
11
|
+
style: Object.keys(n).length > 0 ? n : void 0
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function g() {
|
|
15
15
|
return (t) => {
|
|
16
|
-
const
|
|
17
|
-
return
|
|
16
|
+
const o = l(t);
|
|
17
|
+
return d(f, o);
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function s(t) {
|
|
21
21
|
return t.includes(":") ? t : t.includes("/") ? t.replace("/", ":") : `mdi:${t}`;
|
|
22
22
|
}
|
|
23
23
|
async function m(t) {
|
|
24
24
|
try {
|
|
25
|
-
return
|
|
25
|
+
return !!s(t);
|
|
26
26
|
} catch {
|
|
27
27
|
return !1;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
async function
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
30
|
+
async function I(t) {
|
|
31
|
+
const o = s(t), r = u(o);
|
|
32
|
+
if (r) return r;
|
|
33
33
|
try {
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
34
|
+
const e = await p(o);
|
|
35
|
+
if (!e)
|
|
36
36
|
throw new Error(`Icon not found: ${t}`);
|
|
37
|
-
return
|
|
37
|
+
return e;
|
|
38
38
|
} catch {
|
|
39
39
|
throw new Error(`Failed to load icon: ${t}`);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
g as createIconifyComponent,
|
|
44
|
+
I as getIconData,
|
|
45
45
|
m as iconExists,
|
|
46
|
-
|
|
46
|
+
s as parseIconName
|
|
47
47
|
};
|
package/dist/src/iconify.d.ts
CHANGED
|
@@ -65,5 +65,5 @@ export declare function iconExists(name: string): Promise<boolean>;
|
|
|
65
65
|
* @param name - 图标名称
|
|
66
66
|
* @returns 图标的 SVG 数据
|
|
67
67
|
*/
|
|
68
|
-
export declare function getIconData(name: string): Promise<Required<import('@iconify/
|
|
68
|
+
export declare function getIconData(name: string): Promise<Required<import('@iconify/types').IconifyIcon>>;
|
|
69
69
|
//# sourceMappingURL=iconify.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconify.d.ts","sourceRoot":"","sources":["../../src/iconify.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAK,KAAK,KAAK,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAExE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,YAAY;IAC3B,iDAAiD;IACjD,IAAI,EAAE,QAAQ,CAAA;IACd,WAAW;IACX,IAAI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A;AAE5C;;GAEG;AACH,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,CAAA;AAE1B;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAclD;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQ/D;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,2DAiB7C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yh-ui/icons",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "YH-UI Icons - High performance icon library with Iconify integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"types": "./dist/index.d.ts"
|
|
13
13
|
},
|
|
14
14
|
"./vue": {
|
|
15
|
-
"import": "./dist/vue.mjs",
|
|
16
|
-
"types": "./dist/vue.d.ts"
|
|
15
|
+
"import": "./dist/vue/icon.mjs",
|
|
16
|
+
"types": "./dist/src/vue/icon.d.ts"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
@@ -27,7 +27,20 @@
|
|
|
27
27
|
"svg"
|
|
28
28
|
],
|
|
29
29
|
"author": "YH-UI Team",
|
|
30
|
+
"homepage": "https://1079161148.github.io/yh-ui/",
|
|
30
31
|
"license": "MIT",
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/1079161148/yh-ui.git",
|
|
38
|
+
"directory": "packages/icons"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=18.0.0",
|
|
42
|
+
"pnpm": ">=9.0.0"
|
|
43
|
+
},
|
|
31
44
|
"peerDependencies": {
|
|
32
45
|
"vue": "^3.5.0"
|
|
33
46
|
},
|
|
@@ -40,6 +53,8 @@
|
|
|
40
53
|
},
|
|
41
54
|
"scripts": {
|
|
42
55
|
"build": "vite build",
|
|
43
|
-
"dev": "vite build --watch"
|
|
56
|
+
"dev": "vite build --watch",
|
|
57
|
+
"typecheck": "vue-tsc --noEmit",
|
|
58
|
+
"lint": "eslint ."
|
|
44
59
|
}
|
|
45
60
|
}
|