rn-iconify 1.0.0 → 2.0.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.
Files changed (657) hide show
  1. package/README.md +47 -235
  2. package/babel.js +14 -0
  3. package/lib/commonjs/IconRenderer.js +91 -4
  4. package/lib/commonjs/IconRenderer.js.map +1 -1
  5. package/lib/commonjs/accessibility/AccessibilityProvider.js +189 -0
  6. package/lib/commonjs/accessibility/AccessibilityProvider.js.map +1 -0
  7. package/lib/commonjs/accessibility/index.js +87 -0
  8. package/lib/commonjs/accessibility/index.js.map +1 -0
  9. package/lib/commonjs/accessibility/types.js +6 -0
  10. package/lib/commonjs/accessibility/types.js.map +1 -0
  11. package/lib/commonjs/accessibility/useAccessibleIcon.js +119 -0
  12. package/lib/commonjs/accessibility/useAccessibleIcon.js.map +1 -0
  13. package/lib/commonjs/accessibility/utils.js +231 -0
  14. package/lib/commonjs/accessibility/utils.js.map +1 -0
  15. package/lib/commonjs/alias/Icon.js +113 -0
  16. package/lib/commonjs/alias/Icon.js.map +1 -0
  17. package/lib/commonjs/alias/IconAliasContext.js +177 -0
  18. package/lib/commonjs/alias/IconAliasContext.js.map +1 -0
  19. package/lib/commonjs/alias/createIconAliases.js +222 -0
  20. package/lib/commonjs/alias/createIconAliases.js.map +1 -0
  21. package/lib/commonjs/alias/index.js +57 -0
  22. package/lib/commonjs/alias/index.js.map +1 -0
  23. package/lib/commonjs/alias/types.js +6 -0
  24. package/lib/commonjs/alias/types.js.map +1 -0
  25. package/lib/commonjs/animated/AnimatedIcon.js +116 -0
  26. package/lib/commonjs/animated/AnimatedIcon.js.map +1 -0
  27. package/lib/commonjs/animated/index.js +76 -0
  28. package/lib/commonjs/animated/index.js.map +1 -0
  29. package/lib/commonjs/animated/presets.js +220 -0
  30. package/lib/commonjs/animated/presets.js.map +1 -0
  31. package/lib/commonjs/animated/types.js +71 -0
  32. package/lib/commonjs/animated/types.js.map +1 -0
  33. package/lib/commonjs/animated/useIconAnimation.js +313 -0
  34. package/lib/commonjs/animated/useIconAnimation.js.map +1 -0
  35. package/lib/commonjs/babel/ast-utils.js +214 -0
  36. package/lib/commonjs/babel/ast-utils.js.map +1 -0
  37. package/lib/commonjs/babel/cache-writer.js +281 -0
  38. package/lib/commonjs/babel/cache-writer.js.map +1 -0
  39. package/lib/commonjs/babel/collector.js +219 -0
  40. package/lib/commonjs/babel/collector.js.map +1 -0
  41. package/lib/commonjs/babel/index.js +104 -0
  42. package/lib/commonjs/babel/index.js.map +1 -0
  43. package/lib/commonjs/babel/plugin.js +226 -0
  44. package/lib/commonjs/babel/plugin.js.map +1 -0
  45. package/lib/commonjs/babel/types.js +485 -0
  46. package/lib/commonjs/babel/types.js.map +1 -0
  47. package/lib/commonjs/bundle/index.js +213 -0
  48. package/lib/commonjs/bundle/index.js.map +1 -0
  49. package/lib/commonjs/cache/CacheManager.js +105 -6
  50. package/lib/commonjs/cache/CacheManager.js.map +1 -1
  51. package/lib/commonjs/cli/commands/analyze.js +171 -0
  52. package/lib/commonjs/cli/commands/analyze.js.map +1 -0
  53. package/lib/commonjs/cli/commands/bundle.js +214 -0
  54. package/lib/commonjs/cli/commands/bundle.js.map +1 -0
  55. package/lib/commonjs/cli/index.js +142 -0
  56. package/lib/commonjs/cli/index.js.map +1 -0
  57. package/lib/commonjs/cli/parser.js +260 -0
  58. package/lib/commonjs/cli/parser.js.map +1 -0
  59. package/lib/commonjs/cli/types.js +42 -0
  60. package/lib/commonjs/cli/types.js.map +1 -0
  61. package/lib/commonjs/config/ConfigManager.js +182 -0
  62. package/lib/commonjs/config/ConfigManager.js.map +1 -0
  63. package/lib/commonjs/config/index.js +44 -0
  64. package/lib/commonjs/config/index.js.map +1 -0
  65. package/lib/commonjs/config/types.js +55 -0
  66. package/lib/commonjs/config/types.js.map +1 -0
  67. package/lib/commonjs/createIconSet.js +49 -11
  68. package/lib/commonjs/createIconSet.js.map +1 -1
  69. package/lib/commonjs/explorer/IconExplorer.js +827 -0
  70. package/lib/commonjs/explorer/IconExplorer.js.map +1 -0
  71. package/lib/commonjs/explorer/iconSets.js +303 -0
  72. package/lib/commonjs/explorer/iconSets.js.map +1 -0
  73. package/lib/commonjs/explorer/index.js +93 -0
  74. package/lib/commonjs/explorer/index.js.map +1 -0
  75. package/lib/commonjs/explorer/types.js +6 -0
  76. package/lib/commonjs/explorer/types.js.map +1 -0
  77. package/lib/commonjs/explorer/useExplorer.js +359 -0
  78. package/lib/commonjs/explorer/useExplorer.js.map +1 -0
  79. package/lib/commonjs/index.js +618 -12
  80. package/lib/commonjs/index.js.map +1 -1
  81. package/lib/commonjs/navigation/createDrawerIcon.js +129 -0
  82. package/lib/commonjs/navigation/createDrawerIcon.js.map +1 -0
  83. package/lib/commonjs/navigation/createHeaderIcon.js +185 -0
  84. package/lib/commonjs/navigation/createHeaderIcon.js.map +1 -0
  85. package/lib/commonjs/navigation/createTabBarIcon.js +178 -0
  86. package/lib/commonjs/navigation/createTabBarIcon.js.map +1 -0
  87. package/lib/commonjs/navigation/index.js +83 -0
  88. package/lib/commonjs/navigation/index.js.map +1 -0
  89. package/lib/commonjs/navigation/types.js +94 -0
  90. package/lib/commonjs/navigation/types.js.map +1 -0
  91. package/lib/commonjs/navigation/useNavigationIcon.js +128 -0
  92. package/lib/commonjs/navigation/useNavigationIcon.js.map +1 -0
  93. package/lib/commonjs/network/IconifyAPI.js +154 -14
  94. package/lib/commonjs/network/IconifyAPI.js.map +1 -1
  95. package/lib/commonjs/network/index.js +18 -0
  96. package/lib/commonjs/network/index.js.map +1 -1
  97. package/lib/commonjs/performance/PerformanceMonitor.js +327 -0
  98. package/lib/commonjs/performance/PerformanceMonitor.js.map +1 -0
  99. package/lib/commonjs/performance/index.js +43 -0
  100. package/lib/commonjs/performance/index.js.map +1 -0
  101. package/lib/commonjs/performance/types.js +2 -0
  102. package/lib/commonjs/performance/types.js.map +1 -0
  103. package/lib/commonjs/placeholder/PlaceholderFactory.js +111 -0
  104. package/lib/commonjs/placeholder/PlaceholderFactory.js.map +1 -0
  105. package/lib/commonjs/placeholder/Pulse.js +77 -0
  106. package/lib/commonjs/placeholder/Pulse.js.map +1 -0
  107. package/lib/commonjs/placeholder/Shimmer.js +95 -0
  108. package/lib/commonjs/placeholder/Shimmer.js.map +1 -0
  109. package/lib/commonjs/placeholder/Skeleton.js +52 -0
  110. package/lib/commonjs/placeholder/Skeleton.js.map +1 -0
  111. package/lib/commonjs/placeholder/index.js +41 -0
  112. package/lib/commonjs/placeholder/index.js.map +1 -0
  113. package/lib/commonjs/placeholder/types.js +40 -0
  114. package/lib/commonjs/placeholder/types.js.map +1 -0
  115. package/lib/commonjs/theme/IconThemeProvider.js +96 -0
  116. package/lib/commonjs/theme/IconThemeProvider.js.map +1 -0
  117. package/lib/commonjs/theme/context.js +53 -0
  118. package/lib/commonjs/theme/context.js.map +1 -0
  119. package/lib/commonjs/theme/index.js +52 -0
  120. package/lib/commonjs/theme/index.js.map +1 -0
  121. package/lib/commonjs/theme/types.js +39 -0
  122. package/lib/commonjs/theme/types.js.map +1 -0
  123. package/lib/commonjs/theme/useIconTheme.js +121 -0
  124. package/lib/commonjs/theme/useIconTheme.js.map +1 -0
  125. package/lib/module/IconRenderer.js +92 -5
  126. package/lib/module/IconRenderer.js.map +1 -1
  127. package/lib/module/accessibility/AccessibilityProvider.js +179 -0
  128. package/lib/module/accessibility/AccessibilityProvider.js.map +1 -0
  129. package/lib/module/accessibility/index.js +42 -0
  130. package/lib/module/accessibility/index.js.map +1 -0
  131. package/lib/module/accessibility/types.js +2 -0
  132. package/lib/module/accessibility/types.js.map +1 -0
  133. package/lib/module/accessibility/useAccessibleIcon.js +112 -0
  134. package/lib/module/accessibility/useAccessibleIcon.js.map +1 -0
  135. package/lib/module/accessibility/utils.js +221 -0
  136. package/lib/module/accessibility/utils.js.map +1 -0
  137. package/lib/module/alias/Icon.js +105 -0
  138. package/lib/module/alias/Icon.js.map +1 -0
  139. package/lib/module/alias/IconAliasContext.js +166 -0
  140. package/lib/module/alias/IconAliasContext.js.map +1 -0
  141. package/lib/module/alias/createIconAliases.js +213 -0
  142. package/lib/module/alias/createIconAliases.js.map +1 -0
  143. package/lib/module/alias/index.js +45 -0
  144. package/lib/module/alias/index.js.map +1 -0
  145. package/lib/module/alias/types.js +2 -0
  146. package/lib/module/alias/types.js.map +1 -0
  147. package/lib/module/animated/AnimatedIcon.js +109 -0
  148. package/lib/module/animated/AnimatedIcon.js.map +1 -0
  149. package/lib/module/animated/index.js +80 -0
  150. package/lib/module/animated/index.js.map +1 -0
  151. package/lib/module/animated/presets.js +209 -0
  152. package/lib/module/animated/presets.js.map +1 -0
  153. package/lib/module/animated/types.js +65 -0
  154. package/lib/module/animated/types.js.map +1 -0
  155. package/lib/module/animated/useIconAnimation.js +306 -0
  156. package/lib/module/animated/useIconAnimation.js.map +1 -0
  157. package/lib/module/babel/ast-utils.js +201 -0
  158. package/lib/module/babel/ast-utils.js.map +1 -0
  159. package/lib/module/babel/cache-writer.js +269 -0
  160. package/lib/module/babel/cache-writer.js.map +1 -0
  161. package/lib/module/babel/collector.js +214 -0
  162. package/lib/module/babel/collector.js.map +1 -0
  163. package/lib/module/babel/index.js +51 -0
  164. package/lib/module/babel/index.js.map +1 -0
  165. package/lib/module/babel/plugin.js +220 -0
  166. package/lib/module/babel/plugin.js.map +1 -0
  167. package/lib/module/babel/types.js +476 -0
  168. package/lib/module/babel/types.js.map +1 -0
  169. package/lib/module/bundle/index.js +205 -0
  170. package/lib/module/bundle/index.js.map +1 -0
  171. package/lib/module/cache/CacheManager.js +106 -6
  172. package/lib/module/cache/CacheManager.js.map +1 -1
  173. package/lib/module/cli/commands/analyze.js +166 -0
  174. package/lib/module/cli/commands/analyze.js.map +1 -0
  175. package/lib/module/cli/commands/bundle.js +208 -0
  176. package/lib/module/cli/commands/bundle.js.map +1 -0
  177. package/lib/module/cli/index.js +140 -0
  178. package/lib/module/cli/index.js.map +1 -0
  179. package/lib/module/cli/parser.js +251 -0
  180. package/lib/module/cli/parser.js.map +1 -0
  181. package/lib/module/cli/types.js +36 -0
  182. package/lib/module/cli/types.js.map +1 -0
  183. package/lib/module/components/index.js +27 -1
  184. package/lib/module/components/index.js.map +1 -1
  185. package/lib/module/config/ConfigManager.js +173 -0
  186. package/lib/module/config/ConfigManager.js.map +1 -0
  187. package/lib/module/config/index.js +28 -0
  188. package/lib/module/config/index.js.map +1 -0
  189. package/lib/module/config/types.js +49 -0
  190. package/lib/module/config/types.js.map +1 -0
  191. package/lib/module/createIconSet.js +49 -11
  192. package/lib/module/createIconSet.js.map +1 -1
  193. package/lib/module/explorer/IconExplorer.js +817 -0
  194. package/lib/module/explorer/IconExplorer.js.map +1 -0
  195. package/lib/module/explorer/iconSets.js +291 -0
  196. package/lib/module/explorer/iconSets.js.map +1 -0
  197. package/lib/module/explorer/index.js +42 -0
  198. package/lib/module/explorer/index.js.map +1 -0
  199. package/lib/module/explorer/types.js +2 -0
  200. package/lib/module/explorer/types.js.map +1 -0
  201. package/lib/module/explorer/useExplorer.js +353 -0
  202. package/lib/module/explorer/useExplorer.js.map +1 -0
  203. package/lib/module/index.js +26 -11
  204. package/lib/module/index.js.map +1 -1
  205. package/lib/module/navigation/createDrawerIcon.js +121 -0
  206. package/lib/module/navigation/createDrawerIcon.js.map +1 -0
  207. package/lib/module/navigation/createHeaderIcon.js +175 -0
  208. package/lib/module/navigation/createHeaderIcon.js.map +1 -0
  209. package/lib/module/navigation/createTabBarIcon.js +168 -0
  210. package/lib/module/navigation/createTabBarIcon.js.map +1 -0
  211. package/lib/module/navigation/index.js +59 -0
  212. package/lib/module/navigation/index.js.map +1 -0
  213. package/lib/module/navigation/types.js +88 -0
  214. package/lib/module/navigation/types.js.map +1 -0
  215. package/lib/module/navigation/useNavigationIcon.js +121 -0
  216. package/lib/module/navigation/useNavigationIcon.js.map +1 -0
  217. package/lib/module/network/IconifyAPI.js +152 -14
  218. package/lib/module/network/IconifyAPI.js.map +1 -1
  219. package/lib/module/network/index.js +1 -1
  220. package/lib/module/network/index.js.map +1 -1
  221. package/lib/module/performance/PerformanceMonitor.js +317 -0
  222. package/lib/module/performance/PerformanceMonitor.js.map +1 -0
  223. package/lib/module/performance/index.js +26 -0
  224. package/lib/module/performance/index.js.map +1 -0
  225. package/lib/module/performance/types.js +2 -0
  226. package/lib/module/performance/types.js.map +1 -0
  227. package/lib/module/placeholder/PlaceholderFactory.js +105 -0
  228. package/lib/module/placeholder/PlaceholderFactory.js.map +1 -0
  229. package/lib/module/placeholder/Pulse.js +70 -0
  230. package/lib/module/placeholder/Pulse.js.map +1 -0
  231. package/lib/module/placeholder/Shimmer.js +88 -0
  232. package/lib/module/placeholder/Shimmer.js.map +1 -0
  233. package/lib/module/placeholder/Skeleton.js +45 -0
  234. package/lib/module/placeholder/Skeleton.js.map +1 -0
  235. package/lib/module/placeholder/index.js +15 -0
  236. package/lib/module/placeholder/index.js.map +1 -0
  237. package/lib/module/placeholder/types.js +34 -0
  238. package/lib/module/placeholder/types.js.map +1 -0
  239. package/lib/module/theme/IconThemeProvider.js +89 -0
  240. package/lib/module/theme/IconThemeProvider.js.map +1 -0
  241. package/lib/module/theme/context.js +47 -0
  242. package/lib/module/theme/context.js.map +1 -0
  243. package/lib/module/theme/index.js +19 -0
  244. package/lib/module/theme/index.js.map +1 -0
  245. package/lib/module/theme/types.js +33 -0
  246. package/lib/module/theme/types.js.map +1 -0
  247. package/lib/module/theme/useIconTheme.js +114 -0
  248. package/lib/module/theme/useIconTheme.js.map +1 -0
  249. package/lib/typescript/IconRenderer.d.ts +1 -1
  250. package/lib/typescript/IconRenderer.d.ts.map +1 -1
  251. package/lib/typescript/accessibility/AccessibilityProvider.d.ts +57 -0
  252. package/lib/typescript/accessibility/AccessibilityProvider.d.ts.map +1 -0
  253. package/lib/typescript/accessibility/index.d.ts +37 -0
  254. package/lib/typescript/accessibility/index.d.ts.map +1 -0
  255. package/lib/typescript/accessibility/types.d.ts +130 -0
  256. package/lib/typescript/accessibility/types.d.ts.map +1 -0
  257. package/lib/typescript/accessibility/useAccessibleIcon.d.ts +111 -0
  258. package/lib/typescript/accessibility/useAccessibleIcon.d.ts.map +1 -0
  259. package/lib/typescript/accessibility/utils.d.ts +29 -0
  260. package/lib/typescript/accessibility/utils.d.ts.map +1 -0
  261. package/lib/typescript/alias/Icon.d.ts +38 -0
  262. package/lib/typescript/alias/Icon.d.ts.map +1 -0
  263. package/lib/typescript/alias/IconAliasContext.d.ts +52 -0
  264. package/lib/typescript/alias/IconAliasContext.d.ts.map +1 -0
  265. package/lib/typescript/alias/createIconAliases.d.ts +77 -0
  266. package/lib/typescript/alias/createIconAliases.d.ts.map +1 -0
  267. package/lib/typescript/alias/index.d.ts +36 -0
  268. package/lib/typescript/alias/index.d.ts.map +1 -0
  269. package/lib/typescript/alias/types.d.ts +115 -0
  270. package/lib/typescript/alias/types.d.ts.map +1 -0
  271. package/lib/typescript/animated/AnimatedIcon.d.ts +45 -0
  272. package/lib/typescript/animated/AnimatedIcon.d.ts.map +1 -0
  273. package/lib/typescript/animated/index.d.ts +70 -0
  274. package/lib/typescript/animated/index.d.ts.map +1 -0
  275. package/lib/typescript/animated/presets.d.ts +35 -0
  276. package/lib/typescript/animated/presets.d.ts.map +1 -0
  277. package/lib/typescript/animated/types.d.ts +196 -0
  278. package/lib/typescript/animated/types.d.ts.map +1 -0
  279. package/lib/typescript/animated/useIconAnimation.d.ts +64 -0
  280. package/lib/typescript/animated/useIconAnimation.d.ts.map +1 -0
  281. package/lib/typescript/babel/ast-utils.d.ts +52 -0
  282. package/lib/typescript/babel/ast-utils.d.ts.map +1 -0
  283. package/lib/typescript/babel/cache-writer.d.ts +56 -0
  284. package/lib/typescript/babel/cache-writer.d.ts.map +1 -0
  285. package/lib/typescript/babel/collector.d.ts +107 -0
  286. package/lib/typescript/babel/collector.d.ts.map +1 -0
  287. package/lib/typescript/babel/index.d.ts +47 -0
  288. package/lib/typescript/babel/index.d.ts.map +1 -0
  289. package/lib/typescript/babel/plugin.d.ts +17 -0
  290. package/lib/typescript/babel/plugin.d.ts.map +1 -0
  291. package/lib/typescript/babel/types.d.ts +129 -0
  292. package/lib/typescript/babel/types.d.ts.map +1 -0
  293. package/lib/typescript/bundle/index.d.ts +161 -0
  294. package/lib/typescript/bundle/index.d.ts.map +1 -0
  295. package/lib/typescript/cache/CacheManager.d.ts +52 -4
  296. package/lib/typescript/cache/CacheManager.d.ts.map +1 -1
  297. package/lib/typescript/cli/commands/analyze.d.ts +10 -0
  298. package/lib/typescript/cli/commands/analyze.d.ts.map +1 -0
  299. package/lib/typescript/cli/commands/bundle.d.ts +10 -0
  300. package/lib/typescript/cli/commands/bundle.d.ts.map +1 -0
  301. package/lib/typescript/cli/index.d.ts +7 -0
  302. package/lib/typescript/cli/index.d.ts.map +1 -0
  303. package/lib/typescript/cli/parser.d.ts +18 -0
  304. package/lib/typescript/cli/parser.d.ts.map +1 -0
  305. package/lib/typescript/cli/types.d.ts +157 -0
  306. package/lib/typescript/cli/types.d.ts.map +1 -0
  307. package/lib/typescript/components/Academicons.d.ts +1 -1
  308. package/lib/typescript/components/AkarIcons.d.ts +1 -1
  309. package/lib/typescript/components/AntDesign.d.ts +1 -1
  310. package/lib/typescript/components/Arcticons.d.ts +1 -1
  311. package/lib/typescript/components/Basil.d.ts +1 -1
  312. package/lib/typescript/components/Bi.d.ts +1 -1
  313. package/lib/typescript/components/BitcoinIcons.d.ts +1 -1
  314. package/lib/typescript/components/Bpmn.d.ts +1 -1
  315. package/lib/typescript/components/Brandico.d.ts +1 -1
  316. package/lib/typescript/components/Bx.d.ts +1 -1
  317. package/lib/typescript/components/Bxl.d.ts +1 -1
  318. package/lib/typescript/components/Bxs.d.ts +1 -1
  319. package/lib/typescript/components/Bytesize.d.ts +1 -1
  320. package/lib/typescript/components/Carbon.d.ts +1 -1
  321. package/lib/typescript/components/Catppuccin.d.ts +1 -1
  322. package/lib/typescript/components/Cbi.d.ts +1 -1
  323. package/lib/typescript/components/Charm.d.ts +1 -1
  324. package/lib/typescript/components/Ci.d.ts +1 -1
  325. package/lib/typescript/components/Cib.d.ts +1 -1
  326. package/lib/typescript/components/Cif.d.ts +1 -1
  327. package/lib/typescript/components/Cil.d.ts +1 -1
  328. package/lib/typescript/components/CircleFlags.d.ts +1 -1
  329. package/lib/typescript/components/Circum.d.ts +1 -1
  330. package/lib/typescript/components/Clarity.d.ts +1 -1
  331. package/lib/typescript/components/Codex.d.ts +1 -1
  332. package/lib/typescript/components/Codicon.d.ts +1 -1
  333. package/lib/typescript/components/Covid.d.ts +1 -1
  334. package/lib/typescript/components/Cryptocurrency.d.ts +1 -1
  335. package/lib/typescript/components/CryptocurrencyColor.d.ts +1 -1
  336. package/lib/typescript/components/Cuida.d.ts +1 -1
  337. package/lib/typescript/components/Dashicons.d.ts +1 -1
  338. package/lib/typescript/components/Devicon.d.ts +1 -1
  339. package/lib/typescript/components/DeviconPlain.d.ts +1 -1
  340. package/lib/typescript/components/DinkieIcons.d.ts +1 -1
  341. package/lib/typescript/components/DuoIcons.d.ts +1 -1
  342. package/lib/typescript/components/Ei.d.ts +1 -1
  343. package/lib/typescript/components/El.d.ts +1 -1
  344. package/lib/typescript/components/EmojioneMonotone.d.ts +1 -1
  345. package/lib/typescript/components/Entypo.d.ts +1 -1
  346. package/lib/typescript/components/EntypoSocial.d.ts +1 -1
  347. package/lib/typescript/components/EosIcons.d.ts +1 -1
  348. package/lib/typescript/components/Ep.d.ts +1 -1
  349. package/lib/typescript/components/Et.d.ts +1 -1
  350. package/lib/typescript/components/Eva.d.ts +1 -1
  351. package/lib/typescript/components/F7.d.ts +1 -1
  352. package/lib/typescript/components/Fa.d.ts +1 -1
  353. package/lib/typescript/components/Fa6Brands.d.ts +1 -1
  354. package/lib/typescript/components/Fa6Regular.d.ts +1 -1
  355. package/lib/typescript/components/Fa6Solid.d.ts +1 -1
  356. package/lib/typescript/components/Fa7Brands.d.ts +1 -1
  357. package/lib/typescript/components/Fa7Regular.d.ts +1 -1
  358. package/lib/typescript/components/Fa7Solid.d.ts +1 -1
  359. package/lib/typescript/components/FaBrands.d.ts +1 -1
  360. package/lib/typescript/components/FaRegular.d.ts +1 -1
  361. package/lib/typescript/components/FaSolid.d.ts +1 -1
  362. package/lib/typescript/components/Fad.d.ts +1 -1
  363. package/lib/typescript/components/Famicons.d.ts +1 -1
  364. package/lib/typescript/components/Fe.d.ts +1 -1
  365. package/lib/typescript/components/Feather.d.ts +1 -1
  366. package/lib/typescript/components/FileIcons.d.ts +1 -1
  367. package/lib/typescript/components/Flag.d.ts +1 -1
  368. package/lib/typescript/components/Flagpack.d.ts +1 -1
  369. package/lib/typescript/components/FlatUi.d.ts +1 -1
  370. package/lib/typescript/components/Flowbite.d.ts +1 -1
  371. package/lib/typescript/components/Fluent.d.ts +1 -1
  372. package/lib/typescript/components/FluentColor.d.ts +1 -1
  373. package/lib/typescript/components/FluentEmoji.d.ts +1 -1
  374. package/lib/typescript/components/FluentEmojiFlat.d.ts +1 -1
  375. package/lib/typescript/components/FluentEmojiHighContrast.d.ts +1 -1
  376. package/lib/typescript/components/FluentMdl2.d.ts +1 -1
  377. package/lib/typescript/components/Fontelico.d.ts +1 -1
  378. package/lib/typescript/components/Fontisto.d.ts +1 -1
  379. package/lib/typescript/components/Formkit.d.ts +1 -1
  380. package/lib/typescript/components/Foundation.d.ts +1 -1
  381. package/lib/typescript/components/Gala.d.ts +1 -1
  382. package/lib/typescript/components/GameIcons.d.ts +1 -1
  383. package/lib/typescript/components/Garden.d.ts +1 -1
  384. package/lib/typescript/components/Geo.d.ts +1 -1
  385. package/lib/typescript/components/Gg.d.ts +1 -1
  386. package/lib/typescript/components/Gis.d.ts +1 -1
  387. package/lib/typescript/components/GravityUi.d.ts +1 -1
  388. package/lib/typescript/components/Gridicons.d.ts +1 -1
  389. package/lib/typescript/components/GrommetIcons.d.ts +1 -1
  390. package/lib/typescript/components/Guidance.d.ts +1 -1
  391. package/lib/typescript/components/Healthicons.d.ts +1 -1
  392. package/lib/typescript/components/Heroicons.d.ts +1 -1
  393. package/lib/typescript/components/HeroiconsOutline.d.ts +1 -1
  394. package/lib/typescript/components/HeroiconsSolid.d.ts +1 -1
  395. package/lib/typescript/components/Hugeicons.d.ts +1 -1
  396. package/lib/typescript/components/Humbleicons.d.ts +1 -1
  397. package/lib/typescript/components/Ic.d.ts +1 -1
  398. package/lib/typescript/components/IcomoonFree.d.ts +1 -1
  399. package/lib/typescript/components/IconPark.d.ts +1 -1
  400. package/lib/typescript/components/IconParkOutline.d.ts +1 -1
  401. package/lib/typescript/components/IconParkSolid.d.ts +1 -1
  402. package/lib/typescript/components/IconParkTwotone.d.ts +1 -1
  403. package/lib/typescript/components/Iconamoon.d.ts +1 -1
  404. package/lib/typescript/components/Iconoir.d.ts +1 -1
  405. package/lib/typescript/components/Icons8.d.ts +1 -1
  406. package/lib/typescript/components/Il.d.ts +1 -1
  407. package/lib/typescript/components/Ion.d.ts +1 -1
  408. package/lib/typescript/components/Iwwa.d.ts +1 -1
  409. package/lib/typescript/components/Ix.d.ts +1 -1
  410. package/lib/typescript/components/Jam.d.ts +1 -1
  411. package/lib/typescript/components/La.d.ts +1 -1
  412. package/lib/typescript/components/LetsIcons.d.ts +1 -1
  413. package/lib/typescript/components/LineMd.d.ts +1 -1
  414. package/lib/typescript/components/Lineicons.d.ts +1 -1
  415. package/lib/typescript/components/Logos.d.ts +1 -1
  416. package/lib/typescript/components/Ls.d.ts +1 -1
  417. package/lib/typescript/components/Lsicon.d.ts +1 -1
  418. package/lib/typescript/components/Lucide.d.ts +1 -1
  419. package/lib/typescript/components/LucideLab.d.ts +1 -1
  420. package/lib/typescript/components/Mage.d.ts +1 -1
  421. package/lib/typescript/components/Majesticons.d.ts +1 -1
  422. package/lib/typescript/components/Maki.d.ts +1 -1
  423. package/lib/typescript/components/Map.d.ts +1 -1
  424. package/lib/typescript/components/Marketeq.d.ts +1 -1
  425. package/lib/typescript/components/MaterialIconTheme.d.ts +1 -1
  426. package/lib/typescript/components/MaterialSymbols.d.ts +1 -1
  427. package/lib/typescript/components/MaterialSymbolsLight.d.ts +1 -1
  428. package/lib/typescript/components/Mdi.d.ts +1 -1
  429. package/lib/typescript/components/MdiLight.d.ts +1 -1
  430. package/lib/typescript/components/MedicalIcon.d.ts +1 -1
  431. package/lib/typescript/components/Memory.d.ts +1 -1
  432. package/lib/typescript/components/Meteocons.d.ts +1 -1
  433. package/lib/typescript/components/MeteorIcons.d.ts +1 -1
  434. package/lib/typescript/components/Mi.d.ts +1 -1
  435. package/lib/typescript/components/Mingcute.d.ts +1 -1
  436. package/lib/typescript/components/MonoIcons.d.ts +1 -1
  437. package/lib/typescript/components/Mynaui.d.ts +1 -1
  438. package/lib/typescript/components/Nimbus.d.ts +1 -1
  439. package/lib/typescript/components/Nonicons.d.ts +1 -1
  440. package/lib/typescript/components/Nrk.d.ts +1 -1
  441. package/lib/typescript/components/Octicon.d.ts +1 -1
  442. package/lib/typescript/components/Oi.d.ts +1 -1
  443. package/lib/typescript/components/Ooui.d.ts +1 -1
  444. package/lib/typescript/components/Oui.d.ts +1 -1
  445. package/lib/typescript/components/Pajamas.d.ts +1 -1
  446. package/lib/typescript/components/Pepicons.d.ts +1 -1
  447. package/lib/typescript/components/PepiconsPencil.d.ts +1 -1
  448. package/lib/typescript/components/PepiconsPop.d.ts +1 -1
  449. package/lib/typescript/components/PepiconsPrint.d.ts +1 -1
  450. package/lib/typescript/components/Ph.d.ts +1 -1
  451. package/lib/typescript/components/Picon.d.ts +1 -1
  452. package/lib/typescript/components/Pixel.d.ts +1 -1
  453. package/lib/typescript/components/Pixelarticons.d.ts +1 -1
  454. package/lib/typescript/components/Prime.d.ts +1 -1
  455. package/lib/typescript/components/Proicons.d.ts +1 -1
  456. package/lib/typescript/components/Ps.d.ts +1 -1
  457. package/lib/typescript/components/QlementineIcons.d.ts +1 -1
  458. package/lib/typescript/components/Quill.d.ts +1 -1
  459. package/lib/typescript/components/RadixIcons.d.ts +1 -1
  460. package/lib/typescript/components/Raphael.d.ts +1 -1
  461. package/lib/typescript/components/Ri.d.ts +1 -1
  462. package/lib/typescript/components/RivetIcons.d.ts +1 -1
  463. package/lib/typescript/components/Roentgen.d.ts +1 -1
  464. package/lib/typescript/components/Si.d.ts +1 -1
  465. package/lib/typescript/components/SiGlyph.d.ts +1 -1
  466. package/lib/typescript/components/Sidekickicons.d.ts +1 -1
  467. package/lib/typescript/components/SimpleIcons.d.ts +1 -1
  468. package/lib/typescript/components/SimpleLineIcons.d.ts +1 -1
  469. package/lib/typescript/components/SkillIcons.d.ts +1 -1
  470. package/lib/typescript/components/Solar.d.ts +1 -1
  471. package/lib/typescript/components/Stash.d.ts +1 -1
  472. package/lib/typescript/components/Streamline.d.ts +1 -1
  473. package/lib/typescript/components/StreamlineBlock.d.ts +1 -1
  474. package/lib/typescript/components/StreamlineColor.d.ts +1 -1
  475. package/lib/typescript/components/StreamlineCyber.d.ts +1 -1
  476. package/lib/typescript/components/StreamlineCyberColor.d.ts +1 -1
  477. package/lib/typescript/components/StreamlineEmojis.d.ts +1 -1
  478. package/lib/typescript/components/StreamlineFlex.d.ts +1 -1
  479. package/lib/typescript/components/StreamlineFlexColor.d.ts +1 -1
  480. package/lib/typescript/components/StreamlineFreehand.d.ts +1 -1
  481. package/lib/typescript/components/StreamlineFreehandColor.d.ts +1 -1
  482. package/lib/typescript/components/StreamlineKameleonColor.d.ts +1 -1
  483. package/lib/typescript/components/StreamlineLogos.d.ts +1 -1
  484. package/lib/typescript/components/StreamlinePixel.d.ts +1 -1
  485. package/lib/typescript/components/StreamlinePlump.d.ts +1 -1
  486. package/lib/typescript/components/StreamlinePlumpColor.d.ts +1 -1
  487. package/lib/typescript/components/StreamlineSharp.d.ts +1 -1
  488. package/lib/typescript/components/StreamlineSharpColor.d.ts +1 -1
  489. package/lib/typescript/components/StreamlineStickiesColor.d.ts +1 -1
  490. package/lib/typescript/components/StreamlineUltimate.d.ts +1 -1
  491. package/lib/typescript/components/StreamlineUltimateColor.d.ts +1 -1
  492. package/lib/typescript/components/Subway.d.ts +1 -1
  493. package/lib/typescript/components/SvgSpinners.d.ts +1 -1
  494. package/lib/typescript/components/SystemUicons.d.ts +1 -1
  495. package/lib/typescript/components/Tabler.d.ts +1 -1
  496. package/lib/typescript/components/Tdesign.d.ts +1 -1
  497. package/lib/typescript/components/Teenyicons.d.ts +1 -1
  498. package/lib/typescript/components/Temaki.d.ts +1 -1
  499. package/lib/typescript/components/Token.d.ts +1 -1
  500. package/lib/typescript/components/TokenBranded.d.ts +1 -1
  501. package/lib/typescript/components/Topcoat.d.ts +1 -1
  502. package/lib/typescript/components/Typcn.d.ts +1 -1
  503. package/lib/typescript/components/Uil.d.ts +1 -1
  504. package/lib/typescript/components/Uim.d.ts +1 -1
  505. package/lib/typescript/components/Uis.d.ts +1 -1
  506. package/lib/typescript/components/Uit.d.ts +1 -1
  507. package/lib/typescript/components/Uiw.d.ts +1 -1
  508. package/lib/typescript/components/Unjs.d.ts +1 -1
  509. package/lib/typescript/components/Vaadin.d.ts +1 -1
  510. package/lib/typescript/components/Vs.d.ts +1 -1
  511. package/lib/typescript/components/VscodeIcons.d.ts +1 -1
  512. package/lib/typescript/components/Websymbol.d.ts +1 -1
  513. package/lib/typescript/components/Weui.d.ts +1 -1
  514. package/lib/typescript/components/Whh.d.ts +1 -1
  515. package/lib/typescript/components/Wi.d.ts +1 -1
  516. package/lib/typescript/components/Wpf.d.ts +1 -1
  517. package/lib/typescript/components/Zmdi.d.ts +1 -1
  518. package/lib/typescript/components/Zondicons.d.ts +1 -1
  519. package/lib/typescript/components/index.d.ts +38 -1
  520. package/lib/typescript/components/index.d.ts.map +1 -1
  521. package/lib/typescript/config/ConfigManager.d.ts +102 -0
  522. package/lib/typescript/config/ConfigManager.d.ts.map +1 -0
  523. package/lib/typescript/config/index.d.ts +22 -0
  524. package/lib/typescript/config/index.d.ts.map +1 -0
  525. package/lib/typescript/config/types.d.ts +112 -0
  526. package/lib/typescript/config/types.d.ts.map +1 -0
  527. package/lib/typescript/createIconSet.d.ts +1 -1
  528. package/lib/typescript/createIconSet.d.ts.map +1 -1
  529. package/lib/typescript/explorer/IconExplorer.d.ts +54 -0
  530. package/lib/typescript/explorer/IconExplorer.d.ts.map +1 -0
  531. package/lib/typescript/explorer/iconSets.d.ts +35 -0
  532. package/lib/typescript/explorer/iconSets.d.ts.map +1 -0
  533. package/lib/typescript/explorer/index.d.ts +33 -0
  534. package/lib/typescript/explorer/index.d.ts.map +1 -0
  535. package/lib/typescript/explorer/types.d.ts +329 -0
  536. package/lib/typescript/explorer/types.d.ts.map +1 -0
  537. package/lib/typescript/explorer/useExplorer.d.ts +18 -0
  538. package/lib/typescript/explorer/useExplorer.d.ts.map +1 -0
  539. package/lib/typescript/index.d.ts +25 -4
  540. package/lib/typescript/index.d.ts.map +1 -1
  541. package/lib/typescript/navigation/createDrawerIcon.d.ts +74 -0
  542. package/lib/typescript/navigation/createDrawerIcon.d.ts.map +1 -0
  543. package/lib/typescript/navigation/createHeaderIcon.d.ts +145 -0
  544. package/lib/typescript/navigation/createHeaderIcon.d.ts.map +1 -0
  545. package/lib/typescript/navigation/createTabBarIcon.d.ts +99 -0
  546. package/lib/typescript/navigation/createTabBarIcon.d.ts.map +1 -0
  547. package/lib/typescript/navigation/index.d.ts +51 -0
  548. package/lib/typescript/navigation/index.d.ts.map +1 -0
  549. package/lib/typescript/navigation/types.d.ts +149 -0
  550. package/lib/typescript/navigation/types.d.ts.map +1 -0
  551. package/lib/typescript/navigation/useNavigationIcon.d.ts +91 -0
  552. package/lib/typescript/navigation/useNavigationIcon.d.ts.map +1 -0
  553. package/lib/typescript/network/IconifyAPI.d.ts +32 -0
  554. package/lib/typescript/network/IconifyAPI.d.ts.map +1 -1
  555. package/lib/typescript/network/index.d.ts +2 -1
  556. package/lib/typescript/network/index.d.ts.map +1 -1
  557. package/lib/typescript/performance/PerformanceMonitor.d.ts +76 -0
  558. package/lib/typescript/performance/PerformanceMonitor.d.ts.map +1 -0
  559. package/lib/typescript/performance/index.d.ts +21 -0
  560. package/lib/typescript/performance/index.d.ts.map +1 -0
  561. package/lib/typescript/performance/types.d.ts +156 -0
  562. package/lib/typescript/performance/types.d.ts.map +1 -0
  563. package/lib/typescript/placeholder/PlaceholderFactory.d.ts +44 -0
  564. package/lib/typescript/placeholder/PlaceholderFactory.d.ts.map +1 -0
  565. package/lib/typescript/placeholder/Pulse.d.ts +18 -0
  566. package/lib/typescript/placeholder/Pulse.d.ts.map +1 -0
  567. package/lib/typescript/placeholder/Shimmer.d.ts +19 -0
  568. package/lib/typescript/placeholder/Shimmer.d.ts.map +1 -0
  569. package/lib/typescript/placeholder/Skeleton.d.ts +18 -0
  570. package/lib/typescript/placeholder/Skeleton.d.ts.map +1 -0
  571. package/lib/typescript/placeholder/index.d.ts +12 -0
  572. package/lib/typescript/placeholder/index.d.ts.map +1 -0
  573. package/lib/typescript/placeholder/types.d.ts +63 -0
  574. package/lib/typescript/placeholder/types.d.ts.map +1 -0
  575. package/lib/typescript/theme/IconThemeProvider.d.ts +64 -0
  576. package/lib/typescript/theme/IconThemeProvider.d.ts.map +1 -0
  577. package/lib/typescript/theme/context.d.ts +24 -0
  578. package/lib/typescript/theme/context.d.ts.map +1 -0
  579. package/lib/typescript/theme/index.d.ts +10 -0
  580. package/lib/typescript/theme/index.d.ts.map +1 -0
  581. package/lib/typescript/theme/types.d.ts +85 -0
  582. package/lib/typescript/theme/types.d.ts.map +1 -0
  583. package/lib/typescript/theme/useIconTheme.d.ts +78 -0
  584. package/lib/typescript/theme/useIconTheme.d.ts.map +1 -0
  585. package/lib/typescript/types/index.d.ts +58 -1
  586. package/lib/typescript/types/index.d.ts.map +1 -1
  587. package/package.json +41 -3
  588. package/src/IconRenderer.tsx +91 -4
  589. package/src/accessibility/AccessibilityProvider.tsx +220 -0
  590. package/src/accessibility/index.ts +63 -0
  591. package/src/accessibility/types.ts +152 -0
  592. package/src/accessibility/useAccessibleIcon.ts +220 -0
  593. package/src/accessibility/utils.ts +180 -0
  594. package/src/alias/Icon.tsx +113 -0
  595. package/src/alias/IconAliasContext.tsx +180 -0
  596. package/src/alias/createIconAliases.tsx +233 -0
  597. package/src/alias/index.ts +59 -0
  598. package/src/alias/types.ts +132 -0
  599. package/src/animated/AnimatedIcon.tsx +116 -0
  600. package/src/animated/index.ts +97 -0
  601. package/src/animated/presets.ts +211 -0
  602. package/src/animated/types.ts +239 -0
  603. package/src/animated/useIconAnimation.ts +383 -0
  604. package/src/babel/ast-utils.ts +219 -0
  605. package/src/babel/cache-writer.ts +323 -0
  606. package/src/babel/collector.ts +224 -0
  607. package/src/babel/index.ts +60 -0
  608. package/src/babel/plugin.ts +254 -0
  609. package/src/babel/types.ts +717 -0
  610. package/src/bundle/index.ts +313 -0
  611. package/src/cache/CacheManager.ts +123 -6
  612. package/src/cli/commands/analyze.ts +195 -0
  613. package/src/cli/commands/bundle.ts +231 -0
  614. package/src/cli/index.ts +153 -0
  615. package/src/cli/parser.ts +275 -0
  616. package/src/cli/types.ts +187 -0
  617. package/src/components/index.ts +52 -1
  618. package/src/config/ConfigManager.ts +196 -0
  619. package/src/config/index.ts +34 -0
  620. package/src/config/types.ts +149 -0
  621. package/src/createIconSet.tsx +48 -9
  622. package/src/explorer/IconExplorer.tsx +844 -0
  623. package/src/explorer/iconSets.ts +334 -0
  624. package/src/explorer/index.ts +64 -0
  625. package/src/explorer/types.ts +392 -0
  626. package/src/explorer/useExplorer.ts +390 -0
  627. package/src/index.ts +218 -9
  628. package/src/navigation/createDrawerIcon.tsx +113 -0
  629. package/src/navigation/createHeaderIcon.tsx +213 -0
  630. package/src/navigation/createTabBarIcon.tsx +180 -0
  631. package/src/navigation/index.ts +80 -0
  632. package/src/navigation/types.ts +155 -0
  633. package/src/navigation/useNavigationIcon.tsx +156 -0
  634. package/src/network/IconifyAPI.ts +182 -14
  635. package/src/network/index.ts +11 -1
  636. package/src/performance/PerformanceMonitor.ts +367 -0
  637. package/src/performance/index.ts +39 -0
  638. package/src/performance/types.ts +185 -0
  639. package/src/placeholder/PlaceholderFactory.tsx +133 -0
  640. package/src/placeholder/Pulse.tsx +86 -0
  641. package/src/placeholder/Shimmer.tsx +104 -0
  642. package/src/placeholder/Skeleton.tsx +52 -0
  643. package/src/placeholder/index.ts +21 -0
  644. package/src/placeholder/types.ts +78 -0
  645. package/src/theme/IconThemeProvider.tsx +94 -0
  646. package/src/theme/context.ts +51 -0
  647. package/src/theme/index.ts +19 -0
  648. package/src/theme/types.ts +108 -0
  649. package/src/theme/useIconTheme.ts +119 -0
  650. package/src/types/index.ts +78 -1
  651. package/lib/commonjs/components/Phosphor.js +0 -493
  652. package/lib/commonjs/components/Phosphor.js.map +0 -1
  653. package/lib/module/components/Phosphor.js +0 -488
  654. package/lib/module/components/Phosphor.js.map +0 -1
  655. package/lib/typescript/components/Phosphor.d.ts +0 -472
  656. package/lib/typescript/components/Phosphor.d.ts.map +0 -1
  657. package/src/components/Phosphor.tsx +0 -506
@@ -0,0 +1,52 @@
1
+ /**
2
+ * AST Utilities
3
+ * Helper functions for working with Babel AST nodes
4
+ */
5
+ import type * as BabelTypes from '@babel/types';
6
+ import type { NodePath } from '@babel/core';
7
+ /**
8
+ * Get the component name from a JSX opening element
9
+ * Handles: <Mdi />, <Heroicons />, etc.
10
+ */
11
+ export declare function getComponentName(node: BabelTypes.JSXOpeningElement, t: typeof BabelTypes): string | null;
12
+ /**
13
+ * Get the value of the 'name' attribute from a JSX element
14
+ * Handles: name="home", name='home'
15
+ * Returns null for dynamic values: name={iconName}
16
+ */
17
+ export declare function getNameAttribute(node: BabelTypes.JSXOpeningElement, t: typeof BabelTypes): string | null;
18
+ /**
19
+ * Check if a call expression is calling a specific function by name
20
+ * Handles: prefetchIcons([...])
21
+ */
22
+ export declare function isCallTo(path: NodePath<BabelTypes.CallExpression>, functionName: string, t: typeof BabelTypes): boolean;
23
+ /**
24
+ * Extract string values from an array expression
25
+ * Handles: ['mdi:home', 'mdi:settings']
26
+ * Skips dynamic values
27
+ */
28
+ export declare function extractArrayStrings(node: BabelTypes.Node | null | undefined, t: typeof BabelTypes): string[];
29
+ /**
30
+ * Get location info from a node
31
+ */
32
+ export declare function getNodeLocation(node: BabelTypes.Node): {
33
+ line: number;
34
+ column: number;
35
+ };
36
+ /**
37
+ * Check if an icon name matches a pattern (supports wildcards)
38
+ * @example matchesPattern('mdi:home', 'mdi:*') => true
39
+ * @example matchesPattern('mdi:home', 'mdi:home') => true
40
+ * @example matchesPattern('mdi:home', 'heroicons:*') => false
41
+ */
42
+ export declare function matchesPattern(iconName: string, pattern: string): boolean;
43
+ /**
44
+ * Check if an icon should be included based on include/exclude patterns
45
+ */
46
+ export declare function shouldIncludeIcon(iconName: string, include?: string[], exclude?: string[]): boolean;
47
+ /**
48
+ * Validate icon name format
49
+ * Valid format: prefix:name (e.g., mdi:home)
50
+ */
51
+ export declare function isValidIconName(name: string): boolean;
52
+ //# sourceMappingURL=ast-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ast-utils.d.ts","sourceRoot":"","sources":["../../../src/babel/ast-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,KAAK,UAAU,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,UAAU,CAAC,iBAAiB,EAClC,CAAC,EAAE,OAAO,UAAU,GACnB,MAAM,GAAG,IAAI,CAcf;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,UAAU,CAAC,iBAAiB,EAClC,CAAC,EAAE,OAAO,UAAU,GACnB,MAAM,GAAG,IAAI,CAuCf;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC,EACzC,YAAY,EAAE,MAAM,EACpB,CAAC,EAAE,OAAO,UAAU,GACnB,OAAO,CAUT;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,EACxC,CAAC,EAAE,OAAO,UAAU,GACnB,MAAM,EAAE,CAyBV;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAKvF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAmBzE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,OAAO,CAaT;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAoBrD"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Cache Writer
3
+ * Fetches collected icons from Iconify API and writes them to a cache file
4
+ * Runs in Node.js environment during build time
5
+ */
6
+ import type { IconBundle, BabelPluginOptions } from './types';
7
+ /**
8
+ * Iconify API response structure
9
+ */
10
+ interface IconifyAPIResponse {
11
+ prefix: string;
12
+ icons: Record<string, {
13
+ body: string;
14
+ width?: number;
15
+ height?: number;
16
+ left?: number;
17
+ top?: number;
18
+ hFlip?: boolean;
19
+ vFlip?: boolean;
20
+ rotate?: number;
21
+ }>;
22
+ width?: number;
23
+ height?: number;
24
+ }
25
+ /**
26
+ * Build SVG string from Iconify icon data
27
+ * @internal Exported for testing
28
+ */
29
+ export declare function buildSvg(data: IconifyAPIResponse['icons'][string], defaultWidth?: number, defaultHeight?: number): {
30
+ svg: string;
31
+ width: number;
32
+ height: number;
33
+ };
34
+ /**
35
+ * Group icons by prefix
36
+ * @internal Exported for testing
37
+ */
38
+ export declare function groupIconsByPrefix(iconNames: string[]): Map<string, string[]>;
39
+ /**
40
+ * Fetch all icons and create bundle
41
+ */
42
+ export declare function fetchAndCreateBundle(iconNames: string[], options: BabelPluginOptions): Promise<IconBundle>;
43
+ /**
44
+ * Write bundle to file
45
+ */
46
+ export declare function writeBundleToFile(bundle: IconBundle, outputPath: string, verbose: boolean): void;
47
+ /**
48
+ * Generate icon bundle from collected icons
49
+ */
50
+ export declare function generateBundle(iconNames: string[], options: BabelPluginOptions, projectRoot: string): Promise<void>;
51
+ /**
52
+ * Check if bundle file exists and is valid
53
+ */
54
+ export declare function isBundleValid(outputPath: string, projectRoot: string): boolean;
55
+ export {};
56
+ //# sourceMappingURL=cache-writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-writer.d.ts","sourceRoot":"","sources":["../../../src/babel/cache-writer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAW9D;;GAEG;AACH,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CACX,MAAM,EACN;QACE,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CACF,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAoBD;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EACzC,YAAY,SAAK,EACjB,aAAa,SAAK,GACjB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAgChD;AAmED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAc7E;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,UAAU,CAAC,CAwCrB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAehG;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,EAAE,kBAAkB,EAC3B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAwCf;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAgB9E"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Icon Collector
3
+ * Singleton that collects icons across all files during the build process
4
+ */
5
+ import type { CollectedIcon, BabelPluginOptions } from './types';
6
+ /**
7
+ * Icon collection state
8
+ * Uses a singleton pattern since Babel plugin runs in a single process
9
+ */
10
+ declare class IconCollector {
11
+ /**
12
+ * Map of icon name -> collection info
13
+ * Using Map to track first occurrence location
14
+ */
15
+ private icons;
16
+ /**
17
+ * Set of processed files to track progress
18
+ */
19
+ private processedFiles;
20
+ /**
21
+ * Options from plugin configuration
22
+ */
23
+ private options;
24
+ /**
25
+ * Whether bundle generation has been triggered
26
+ */
27
+ private bundleGenerated;
28
+ /**
29
+ * Start time for performance tracking
30
+ */
31
+ private startTime;
32
+ /**
33
+ * Initialize the collector with options
34
+ * Called at the start of each build
35
+ */
36
+ initialize(options: BabelPluginOptions): void;
37
+ /**
38
+ * Reset collector state
39
+ * Should be called at the start of each build
40
+ */
41
+ reset(): void;
42
+ /**
43
+ * Add an icon to the collection
44
+ */
45
+ add(iconName: string, file: string, line: number, column: number): boolean;
46
+ /**
47
+ * Mark a file as processed
48
+ */
49
+ markFileProcessed(filename: string): void;
50
+ /**
51
+ * Check if a file has been processed
52
+ */
53
+ isFileProcessed(filename: string): boolean;
54
+ /**
55
+ * Check if there are any collected icons
56
+ */
57
+ hasIcons(): boolean;
58
+ /**
59
+ * Get all collected icon names
60
+ */
61
+ getIconNames(): string[];
62
+ /**
63
+ * Get all collected icons with their metadata
64
+ */
65
+ getAllIcons(): CollectedIcon[];
66
+ /**
67
+ * Get icon count
68
+ */
69
+ getCount(): number;
70
+ /**
71
+ * Get processed file count
72
+ */
73
+ getProcessedFileCount(): number;
74
+ /**
75
+ * Get icons grouped by prefix
76
+ */
77
+ getIconsByPrefix(): Map<string, string[]>;
78
+ /**
79
+ * Mark bundle as generated
80
+ */
81
+ markBundleGenerated(): void;
82
+ /**
83
+ * Check if bundle has been generated
84
+ */
85
+ isBundleGenerated(): boolean;
86
+ /**
87
+ * Get elapsed time since initialization
88
+ */
89
+ getElapsedTime(): number;
90
+ /**
91
+ * Get current options
92
+ */
93
+ getOptions(): BabelPluginOptions;
94
+ /**
95
+ * Print summary (for verbose mode)
96
+ */
97
+ printSummary(): void;
98
+ }
99
+ /**
100
+ * Singleton instance
101
+ */
102
+ export declare const collector: IconCollector;
103
+ /**
104
+ * Export class for testing
105
+ */
106
+ export { IconCollector };
107
+ //# sourceMappingURL=collector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../../src/babel/collector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGjE;;;GAGG;AACH,cAAM,aAAa;IACjB;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAyC;IAEtD;;OAEG;IACH,OAAO,CAAC,cAAc,CAA0B;IAEhD;;OAEG;IACH,OAAO,CAAC,OAAO,CAA0B;IAEzC;;OAEG;IACH,OAAO,CAAC,eAAe,CAAkB;IAEzC;;OAEG;IACH,OAAO,CAAC,SAAS,CAAa;IAE9B;;;OAGG;IACH,UAAU,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAS7C;;;OAGG;IACH,KAAK,IAAI,IAAI;IAOb;;OAEG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAoC1E;;OAEG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIzC;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAI1C;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,YAAY,IAAI,MAAM,EAAE;IAIxB;;OAEG;IACH,WAAW,IAAI,aAAa,EAAE;IAI9B;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,qBAAqB,IAAI,MAAM;IAI/B;;OAEG;IACH,gBAAgB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAczC;;OAEG;IACH,mBAAmB,IAAI,IAAI;IAI3B;;OAEG;IACH,iBAAiB,IAAI,OAAO;IAI5B;;OAEG;IACH,cAAc,IAAI,MAAM;IAIxB;;OAEG;IACH,UAAU,IAAI,kBAAkB;IAIhC;;OAEG;IACH,YAAY,IAAI,IAAI;CAcrB;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,eAAsB,CAAC;AAE7C;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * rn-iconify Babel Plugin
3
+ *
4
+ * Build-time icon bundling for 0ms first render.
5
+ *
6
+ * @example
7
+ * ```js
8
+ * // babel.config.js
9
+ * module.exports = {
10
+ * presets: ['module:@react-native/babel-preset'],
11
+ * plugins: ['rn-iconify/babel'],
12
+ * };
13
+ * ```
14
+ *
15
+ * @example With options
16
+ * ```js
17
+ * // babel.config.js
18
+ * module.exports = {
19
+ * presets: ['module:@react-native/babel-preset'],
20
+ * plugins: [
21
+ * ['rn-iconify/babel', {
22
+ * include: ['mdi:*', 'heroicons:*'],
23
+ * exclude: ['mdi:test-*'],
24
+ * outputPath: '.rn-iconify-cache',
25
+ * verbose: true,
26
+ * }]
27
+ * ],
28
+ * };
29
+ * ```
30
+ */
31
+ import { createRnIconifyPlugin, resetPluginState } from './plugin';
32
+ import type { BabelPluginOptions } from './types';
33
+ export type { BabelPluginOptions };
34
+ export type { CollectedIcon, IconBundle, BabelPluginState } from './types';
35
+ export { collector } from './collector';
36
+ export { resetPluginState };
37
+ export { COMPONENT_PREFIX_MAP, PREFIX_COMPONENT_MAP, VALID_COMPONENTS, VALID_PREFIXES, getFilenameFromState, getFilenameFromFile, } from './types';
38
+ /**
39
+ * Default export for Babel plugin
40
+ * This is what Babel will import when you add 'rn-iconify/babel' to your config
41
+ */
42
+ export default createRnIconifyPlugin;
43
+ /**
44
+ * Named export for explicit importing
45
+ */
46
+ export { createRnIconifyPlugin };
47
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/babel/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,YAAY,EAAE,kBAAkB,EAAE,CAAC;AACnC,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG3E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAe,qBAAqB,CAAC;AAErC;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Babel Plugin Visitor
3
+ * Main visitor logic for the rn-iconify Babel plugin
4
+ */
5
+ import type { PluginObj, types as BabelTypes } from '@babel/core';
6
+ import type { BabelPluginState } from './types';
7
+ /**
8
+ * Create the rn-iconify Babel plugin
9
+ */
10
+ export declare function createRnIconifyPlugin(babel: {
11
+ types: typeof BabelTypes;
12
+ }): PluginObj<BabelPluginState>;
13
+ /**
14
+ * Reset plugin state (for testing)
15
+ */
16
+ export declare function resetPluginState(): void;
17
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/babel/plugin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,SAAS,CAAC;AA2DpE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,KAAK,EAAE,OAAO,UAAU,CAAC;CAC1B,GAAG,SAAS,CAAC,gBAAgB,CAAC,CA0K9B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAQvC"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Babel Plugin Types
3
+ * Type definitions for the rn-iconify Babel plugin
4
+ */
5
+ import type { NodePath } from '@babel/core';
6
+ import type { JSXOpeningElement, CallExpression } from '@babel/types';
7
+ /**
8
+ * Plugin options that can be passed in babel.config.js
9
+ */
10
+ export interface BabelPluginOptions {
11
+ /**
12
+ * Patterns for icons to include (supports wildcards)
13
+ * @example ['mdi:*', 'heroicons:user']
14
+ */
15
+ include?: string[];
16
+ /**
17
+ * Patterns for icons to exclude
18
+ * @example ['mdi:test-*']
19
+ */
20
+ exclude?: string[];
21
+ /**
22
+ * Output directory for the generated cache
23
+ * @default '.rn-iconify-cache'
24
+ */
25
+ outputPath?: string;
26
+ /**
27
+ * Enable verbose logging during build
28
+ * @default false
29
+ */
30
+ verbose?: boolean;
31
+ /**
32
+ * Disable the plugin (useful for debugging)
33
+ * @default false
34
+ */
35
+ disabled?: boolean;
36
+ }
37
+ /**
38
+ * Babel file object structure (for pre/post hooks)
39
+ */
40
+ export interface BabelFile {
41
+ opts: {
42
+ filename?: string;
43
+ root?: string;
44
+ };
45
+ }
46
+ /**
47
+ * Plugin state passed between visitors
48
+ * Matches Babel's internal state structure
49
+ * Note: filename and file may not always be present depending on Babel version/config
50
+ */
51
+ export interface BabelPluginState {
52
+ opts: BabelPluginOptions;
53
+ filename?: string;
54
+ file?: BabelFile;
55
+ }
56
+ /**
57
+ * Helper to safely extract filename from visitor state
58
+ */
59
+ export declare function getFilenameFromState(state: BabelPluginState): string;
60
+ /**
61
+ * Helper to safely extract filename from any object (pre/post hooks or visitor state)
62
+ * Uses type guards to safely access nested properties
63
+ */
64
+ export declare function getFilename(obj: unknown): string;
65
+ /**
66
+ * Alias for getFilename - used in pre/post hooks where file object is passed
67
+ * This is a more descriptive name for when working with BabelFile objects
68
+ */
69
+ export declare function getFilenameFromFile(file: unknown): string;
70
+ /**
71
+ * Collected icon information
72
+ */
73
+ export interface CollectedIcon {
74
+ /**
75
+ * Full icon name (prefix:name)
76
+ */
77
+ name: string;
78
+ /**
79
+ * Source file where the icon was found
80
+ */
81
+ file: string;
82
+ /**
83
+ * Line number in source
84
+ */
85
+ line: number;
86
+ /**
87
+ * Column number in source
88
+ */
89
+ column: number;
90
+ }
91
+ /**
92
+ * Icon bundle structure (matches CLI output)
93
+ */
94
+ export interface IconBundle {
95
+ version: string;
96
+ generatedAt: string;
97
+ icons: Record<string, {
98
+ svg: string;
99
+ width: number;
100
+ height: number;
101
+ }>;
102
+ count: number;
103
+ }
104
+ /**
105
+ * JSX visitor function type
106
+ */
107
+ export type JSXVisitor = (path: NodePath<JSXOpeningElement>, state: BabelPluginState) => void;
108
+ /**
109
+ * Call expression visitor function type
110
+ */
111
+ export type CallVisitor = (path: NodePath<CallExpression>, state: BabelPluginState) => void;
112
+ /**
113
+ * Complete mapping of React component names to Iconify prefixes
114
+ * This covers all 200+ icon sets available in rn-iconify
115
+ */
116
+ export declare const COMPONENT_PREFIX_MAP: Record<string, string>;
117
+ /**
118
+ * Reverse map: prefix -> component name
119
+ */
120
+ export declare const PREFIX_COMPONENT_MAP: Record<string, string>;
121
+ /**
122
+ * Set of all valid component names for fast lookup
123
+ */
124
+ export declare const VALID_COMPONENTS: Set<string>;
125
+ /**
126
+ * Set of all valid prefixes for fast lookup
127
+ */
128
+ export declare const VALID_PREFIXES: Set<string>;
129
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/babel/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE;QACJ,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAyCD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAYpE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAiBhD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CACX,MAAM,EACN;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CACF,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAE9F;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAE5F;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsevD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,aAA6C,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,cAAc,aAA+C,CAAC"}
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Offline Bundle Module
3
+ * Provides functionality to load pre-bundled icons at runtime
4
+ */
5
+ /**
6
+ * Icon bundle structure (matches CLI output)
7
+ */
8
+ export interface IconBundle {
9
+ /**
10
+ * Bundle version
11
+ */
12
+ version: string;
13
+ /**
14
+ * Generation timestamp
15
+ */
16
+ generatedAt: string;
17
+ /**
18
+ * Icons in the bundle
19
+ */
20
+ icons: Record<string, {
21
+ svg: string;
22
+ width: number;
23
+ height: number;
24
+ }>;
25
+ /**
26
+ * Total icon count
27
+ */
28
+ count: number;
29
+ }
30
+ /**
31
+ * Bundle loading result
32
+ */
33
+ export interface BundleLoadResult {
34
+ /**
35
+ * Number of icons loaded
36
+ */
37
+ loaded: number;
38
+ /**
39
+ * Number of icons skipped (already cached)
40
+ */
41
+ skipped: number;
42
+ /**
43
+ * Total icons in bundle
44
+ */
45
+ total: number;
46
+ /**
47
+ * Bundle version
48
+ */
49
+ version: string;
50
+ /**
51
+ * Load time in milliseconds
52
+ */
53
+ loadTimeMs: number;
54
+ }
55
+ /**
56
+ * Load an offline icon bundle into the cache
57
+ *
58
+ * This function should be called early in your app initialization
59
+ * to pre-populate the icon cache with bundled icons.
60
+ *
61
+ * Icons loaded from the bundle are immediately available without
62
+ * network requests, providing instant rendering.
63
+ *
64
+ * @param bundle - The icon bundle object (from JSON import)
65
+ * @param options - Loading options
66
+ * @returns Result with load statistics
67
+ *
68
+ * @example
69
+ * ```tsx
70
+ * // In your app entry point (App.tsx or index.js)
71
+ * import { loadOfflineBundle } from 'rn-iconify';
72
+ * import iconBundle from './assets/icons.bundle.json';
73
+ *
74
+ * // Load bundle on app start
75
+ * const result = loadOfflineBundle(iconBundle);
76
+ * console.log(`Loaded ${result.loaded} icons in ${result.loadTimeMs}ms`);
77
+ *
78
+ * // Or with options
79
+ * loadOfflineBundle(iconBundle, {
80
+ * skipExisting: true, // Don't overwrite existing cache entries
81
+ * verbose: true, // Log loading progress
82
+ * });
83
+ * ```
84
+ */
85
+ export declare function loadOfflineBundle(bundle: IconBundle, options?: {
86
+ /**
87
+ * Skip icons that are already in cache
88
+ * @default true
89
+ */
90
+ skipExisting?: boolean;
91
+ /**
92
+ * Log loading progress
93
+ * @default false
94
+ */
95
+ verbose?: boolean;
96
+ }): BundleLoadResult;
97
+ /**
98
+ * Async version of loadOfflineBundle
99
+ *
100
+ * Useful for loading large bundles without blocking the main thread.
101
+ * Uses setTimeout to yield to the event loop periodically.
102
+ *
103
+ * @param bundle - The icon bundle object
104
+ * @param options - Loading options
105
+ * @returns Promise resolving to load result
106
+ *
107
+ * @example
108
+ * ```tsx
109
+ * import { loadOfflineBundleAsync } from 'rn-iconify';
110
+ * import iconBundle from './assets/icons.bundle.json';
111
+ *
112
+ * async function initApp() {
113
+ * const result = await loadOfflineBundleAsync(iconBundle, {
114
+ * batchSize: 100, // Process 100 icons per batch
115
+ * verbose: true,
116
+ * });
117
+ * console.log(`Loaded ${result.loaded} icons`);
118
+ * }
119
+ * ```
120
+ */
121
+ export declare function loadOfflineBundleAsync(bundle: IconBundle, options?: {
122
+ /**
123
+ * Skip icons that are already in cache
124
+ * @default true
125
+ */
126
+ skipExisting?: boolean;
127
+ /**
128
+ * Log loading progress
129
+ * @default false
130
+ */
131
+ verbose?: boolean;
132
+ /**
133
+ * Number of icons to process per batch
134
+ * @default 50
135
+ */
136
+ batchSize?: number;
137
+ /**
138
+ * Progress callback
139
+ */
140
+ onProgress?: (loaded: number, total: number) => void;
141
+ }): Promise<BundleLoadResult>;
142
+ /**
143
+ * Check if a bundle is compatible with this version of rn-iconify
144
+ *
145
+ * @param bundle - The icon bundle object
146
+ * @returns true if compatible
147
+ */
148
+ export declare function isBundleCompatible(bundle: IconBundle): boolean;
149
+ /**
150
+ * Get bundle statistics
151
+ *
152
+ * @param bundle - The icon bundle object
153
+ * @returns Statistics about the bundle
154
+ */
155
+ export declare function getBundleStats(bundle: IconBundle): {
156
+ iconCount: number;
157
+ prefixes: string[];
158
+ estimatedSizeBytes: number;
159
+ generatedAt: Date;
160
+ };
161
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bundle/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,MAAM,CACX,MAAM,EACN;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CACF,CAAC;IAEF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE;IACP;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACd,GACL,gBAAgB,CA2ClB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE;IACP;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD,GACL,OAAO,CAAC,gBAAgB,CAAC,CAqD3B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAa9D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,IAAI,CAAC;CACnB,CAgBA"}
@@ -1,16 +1,63 @@
1
1
  /**
2
- * Cache Manager - Orchestrates memory and disk cache
3
- * Priority: Memory Cache → Disk Cache → Native Cache → Network
2
+ * Cache Manager - Orchestrates memory, bundled, and disk cache
3
+ * Priority: Memory Cache → Bundled Icons → Disk Cache → Native Cache → Network
4
4
  *
5
5
  * Integrates with native module for background prefetching when available
6
6
  */
7
+ /**
8
+ * Bundled icon data structure
9
+ */
10
+ interface BundledIconData {
11
+ svg: string;
12
+ width: number;
13
+ height: number;
14
+ }
15
+ /**
16
+ * Bundle structure from Babel plugin
17
+ */
18
+ interface IconBundle {
19
+ version: string;
20
+ generatedAt: string;
21
+ icons: Record<string, BundledIconData>;
22
+ count: number;
23
+ }
7
24
  declare class CacheManagerImpl {
8
25
  /**
9
26
  * Track in-flight prefetch operations to prevent race conditions
10
27
  */
11
28
  private prefetchingIcons;
12
29
  /**
13
- * Get icon SVG from cache (memory first, then disk)
30
+ * Bundled icons from Babel plugin (loaded at app start)
31
+ * These are icons that were detected during build time
32
+ */
33
+ private bundledIcons;
34
+ /**
35
+ * Whether bundled icons have been initialized
36
+ */
37
+ private bundledIconsInitialized;
38
+ /**
39
+ * Initialize bundled icons from the Babel plugin cache
40
+ * This should be called automatically on first access
41
+ */
42
+ initBundledIcons(): void;
43
+ /**
44
+ * Load bundled icons from a custom bundle object
45
+ * Useful for manual bundle loading or testing
46
+ *
47
+ * @param bundle The icon bundle to load
48
+ * @returns Number of icons loaded
49
+ */
50
+ loadBundle(bundle: IconBundle): number;
51
+ /**
52
+ * Check if an icon is in the bundled cache
53
+ */
54
+ hasBundled(iconName: string): boolean;
55
+ /**
56
+ * Get bundled icons count
57
+ */
58
+ getBundledCount(): number;
59
+ /**
60
+ * Get icon SVG from cache (memory first, then bundled, then disk)
14
61
  * @returns SVG string or null if not cached
15
62
  */
16
63
  get(iconName: string): string | null;
@@ -19,7 +66,7 @@ declare class CacheManagerImpl {
19
66
  */
20
67
  set(iconName: string, svg: string): void;
21
68
  /**
22
- * Check if icon exists in any cache
69
+ * Check if icon exists in any cache (memory, bundled, or disk)
23
70
  */
24
71
  has(iconName: string): boolean;
25
72
  /**
@@ -39,6 +86,7 @@ declare class CacheManagerImpl {
39
86
  */
40
87
  getStats(): {
41
88
  memoryCount: number;
89
+ bundledCount: number;
42
90
  diskCount: number;
43
91
  diskSizeBytes: number;
44
92
  };