@hugeicons/migrate-core 0.1.1 → 0.1.2
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/constants.d.ts +20 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +157 -8
- package/dist/constants.js.map +1 -1
- package/dist/data/mappings/feather.json +301 -0
- package/dist/data/mappings/fontawesome.json +1150 -0
- package/dist/data/mappings/heroicons.json +248 -0
- package/dist/data/mappings/lucide.json +1034 -0
- package/dist/data/mappings/material.json +1041 -0
- package/dist/data/mappings/phosphor.json +1036 -0
- package/dist/data/mappings/tabler.json +1413 -0
- package/dist/data/mappings.d.ts +62 -0
- package/dist/data/mappings.d.ts.map +1 -1
- package/dist/data/mappings.js +606 -102
- package/dist/data/mappings.js.map +1 -1
- package/dist/engine/analyzer.d.ts.map +1 -1
- package/dist/engine/analyzer.js +122 -4
- package/dist/engine/analyzer.js.map +1 -1
- package/dist/engine/transformer.d.ts.map +1 -1
- package/dist/engine/transformer.js +207 -5
- package/dist/engine/transformer.js.map +1 -1
- package/package.json +2 -2
package/dist/data/mappings.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Contains exact and alias mappings from source libraries to Hugeicons
|
|
4
4
|
*
|
|
5
5
|
* Uses auto-generated hugeicons-map.json for accurate mappings
|
|
6
|
+
* Also loads library-specific mappings from the mappings/ directory
|
|
6
7
|
*/
|
|
7
8
|
interface IconEntry {
|
|
8
9
|
name: string;
|
|
@@ -10,6 +11,52 @@ interface IconEntry {
|
|
|
10
11
|
aliases: string[];
|
|
11
12
|
lucideAliases: string[];
|
|
12
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Get the count of generated mappings for a library
|
|
16
|
+
*/
|
|
17
|
+
export declare function getGeneratedMappingCount(library: string): number;
|
|
18
|
+
/**
|
|
19
|
+
* Normalize FontAwesome icon name for lookup
|
|
20
|
+
* Handles various FA naming conventions:
|
|
21
|
+
* - faArrowRight -> ArrowRight
|
|
22
|
+
* - fa-arrow-right -> ArrowRight
|
|
23
|
+
* - arrow-right -> ArrowRight
|
|
24
|
+
*/
|
|
25
|
+
export declare function normalizeFAIconName(name: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Check if a library is a FontAwesome package
|
|
28
|
+
*/
|
|
29
|
+
export declare function isFontAwesomeLibrary(library: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Get FontAwesome mapping for an icon name
|
|
32
|
+
* Priority: Generated mappings -> ICON_MAP -> Manual mappings -> Fuzzy match
|
|
33
|
+
*/
|
|
34
|
+
export declare function getFontAwesomeMapping(iconName: string): string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Get Lucide mapping for an icon name
|
|
37
|
+
* Priority: Generated mappings -> ICON_MAP -> Fuzzy match
|
|
38
|
+
*/
|
|
39
|
+
export declare function getLucideMapping(iconName: string): string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Get Heroicons mapping for an icon name
|
|
42
|
+
*/
|
|
43
|
+
export declare function getHeroiconsMapping(iconName: string): string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Get Material Icons mapping for an icon name
|
|
46
|
+
*/
|
|
47
|
+
export declare function getMaterialMapping(iconName: string): string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Get Feather Icons mapping for an icon name
|
|
50
|
+
*/
|
|
51
|
+
export declare function getFeatherMapping(iconName: string): string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Get Tabler Icons mapping for an icon name
|
|
54
|
+
*/
|
|
55
|
+
export declare function getTablerMapping(iconName: string): string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Get Phosphor Icons mapping for an icon name
|
|
58
|
+
*/
|
|
59
|
+
export declare function getPhosphorMapping(iconName: string): string | undefined;
|
|
13
60
|
/**
|
|
14
61
|
* Check if a Lucide icon name exists as an alias in Hugeicons
|
|
15
62
|
* Returns the alias name if it exists, otherwise undefined
|
|
@@ -18,6 +65,7 @@ export declare function getLucideAliasIfExists(iconName: string): string | undef
|
|
|
18
65
|
/**
|
|
19
66
|
* Get exact mapping for a library and icon
|
|
20
67
|
* For Lucide icons, prefers keeping the original name if it exists as an alias
|
|
68
|
+
* For FontAwesome icons, handles various naming conventions
|
|
21
69
|
*/
|
|
22
70
|
export declare function getExactMapping(library: string, iconName: string): string | undefined;
|
|
23
71
|
/**
|
|
@@ -63,7 +111,21 @@ export declare function getMapStats(): {
|
|
|
63
111
|
totalIcons: number;
|
|
64
112
|
totalAliases: number;
|
|
65
113
|
lucideMappings: number;
|
|
114
|
+
fontawesomeMappings: number;
|
|
66
115
|
generated: string;
|
|
116
|
+
generatedMappings: {
|
|
117
|
+
fontawesome: number;
|
|
118
|
+
lucide: number;
|
|
119
|
+
heroicons: number;
|
|
120
|
+
material: number;
|
|
121
|
+
feather: number;
|
|
122
|
+
tabler: number;
|
|
123
|
+
phosphor: number;
|
|
124
|
+
};
|
|
67
125
|
};
|
|
126
|
+
/**
|
|
127
|
+
* Get the FontAwesome mapping dictionary
|
|
128
|
+
*/
|
|
129
|
+
export declare function getFontAwesomeMap(): Record<string, string>;
|
|
68
130
|
export {};
|
|
69
131
|
//# sourceMappingURL=mappings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappings.d.ts","sourceRoot":"","sources":["../../src/data/mappings.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mappings.d.ts","sourceRoot":"","sources":["../../src/data/mappings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAqED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGhE;AA2TD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CA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