luna-plus 0.0.5 → 0.0.7
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/Icon/Icon.svelte +3 -7
- package/package.json +2 -2
package/dist/Icon/Icon.svelte
CHANGED
|
@@ -22,16 +22,12 @@
|
|
|
22
22
|
|
|
23
23
|
const classes = $derived(cls ? `lm-icon ${cls}` : "lm-icon");
|
|
24
24
|
|
|
25
|
-
// lucide 图标格式为 [
|
|
26
|
-
// children 是子元素数组: [[tag, attrs], [tag, attrs], ...]
|
|
25
|
+
// lucide 0.563.0+ 图标格式为 [[tag, attrs], [tag, attrs], ...]
|
|
27
26
|
type IconTuple = [string, Record<string, any>];
|
|
28
27
|
const normalized = $derived.by(() => {
|
|
29
28
|
if (!icon || !Array.isArray(icon)) return [] as ReadonlyArray<IconTuple>;
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
const children = icon[2];
|
|
33
|
-
if (!children || !Array.isArray(children)) return [] as ReadonlyArray<IconTuple>;
|
|
34
|
-
const tuples = children.map(([tag, nodeAttrs]: any) => [
|
|
29
|
+
// 新格式: 直接是子元素数组 [[tag, attrs], [tag, attrs], ...]
|
|
30
|
+
const tuples = icon.map(([tag, nodeAttrs]: any) => [
|
|
35
31
|
tag as string,
|
|
36
32
|
Object.freeze({ ...nodeAttrs }),
|
|
37
33
|
]) as IconTuple[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "luna-plus",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "A modern Svelte 5 component library with 60+ components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"svelte": "./dist/index.js",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
103
|
"async-validator": "^4.2.5",
|
|
104
|
-
"lucide": "^0.
|
|
104
|
+
"lucide": "^0.563.0"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@sveltejs/package": "^2.5.7",
|