@fugood/bricks-project 2.24.1-beta.3 → 2.25.0-beta.0

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.
@@ -17,7 +17,18 @@ const STYLE_BITS: Record<IconStyle, number> = {
17
17
  duotone: 256,
18
18
  }
19
19
  const ALL_STYLES = Object.keys(STYLE_BITS) as IconStyle[]
20
- const iconMeta = glyphmapMeta as Record<string, number>
20
+
21
+ // Metadata is shipped as { bitmaskValue: [iconName, ...] } with the dominant
22
+ // 510 (all non-brand families) omitted. Expand to a flat lookup once.
23
+ const DEFAULT_BITMASK = 510
24
+ const compactMeta = glyphmapMeta as Record<string, string[]>
25
+ const iconMeta: Record<string, number> = {}
26
+ for (const name of Object.keys(glyphmap)) iconMeta[name] = DEFAULT_BITMASK
27
+ for (const bitmaskKey of Object.keys(compactMeta)) {
28
+ const value = Number(bitmaskKey)
29
+ const names = compactMeta[bitmaskKey]
30
+ for (const name of names) iconMeta[name] = value
31
+ }
21
32
 
22
33
  const iconList = Object.entries(glyphmap as Record<string, number>).map(([name, code]) => {
23
34
  const bits = iconMeta[name] || 0