@fugood/bricks-project 2.24.0-beta.30 → 2.24.0-beta.31
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/package.json +3 -3
- package/tools/icons/fa6pro-meta.json +3669 -26125
- package/tools/mcp-tools/icons.ts +14 -4
package/tools/mcp-tools/icons.ts
CHANGED
|
@@ -6,12 +6,22 @@ import glyphmap from '../icons/fa6pro-glyphmap.json'
|
|
|
6
6
|
import glyphmapMeta from '../icons/fa6pro-meta.json'
|
|
7
7
|
|
|
8
8
|
type IconStyle = 'brands' | 'duotone' | 'light' | 'regular' | 'solid' | 'thin'
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
// Bitmask bits for icon family membership (compact metadata format)
|
|
11
|
+
const STYLE_BITS: Record<IconStyle, number> = {
|
|
12
|
+
brands: 1,
|
|
13
|
+
thin: 2,
|
|
14
|
+
light: 4,
|
|
15
|
+
regular: 8,
|
|
16
|
+
solid: 16,
|
|
17
|
+
duotone: 256,
|
|
18
|
+
}
|
|
19
|
+
const ALL_STYLES = Object.keys(STYLE_BITS) as IconStyle[]
|
|
20
|
+
const iconMeta = glyphmapMeta as Record<string, number>
|
|
10
21
|
|
|
11
22
|
const iconList = Object.entries(glyphmap as Record<string, number>).map(([name, code]) => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
)
|
|
23
|
+
const bits = iconMeta[name] || 0
|
|
24
|
+
const styles = ALL_STYLES.filter((s) => bits & STYLE_BITS[s])
|
|
15
25
|
return { name, code, styles }
|
|
16
26
|
})
|
|
17
27
|
|