rn-iconify 1.0.0 → 2.0.1

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 (658) hide show
  1. package/README.md +47 -235
  2. package/assets/logo.gif +0 -0
  3. package/babel.js +14 -0
  4. package/lib/commonjs/IconRenderer.js +91 -4
  5. package/lib/commonjs/IconRenderer.js.map +1 -1
  6. package/lib/commonjs/accessibility/AccessibilityProvider.js +189 -0
  7. package/lib/commonjs/accessibility/AccessibilityProvider.js.map +1 -0
  8. package/lib/commonjs/accessibility/index.js +87 -0
  9. package/lib/commonjs/accessibility/index.js.map +1 -0
  10. package/lib/commonjs/accessibility/types.js +6 -0
  11. package/lib/commonjs/accessibility/types.js.map +1 -0
  12. package/lib/commonjs/accessibility/useAccessibleIcon.js +119 -0
  13. package/lib/commonjs/accessibility/useAccessibleIcon.js.map +1 -0
  14. package/lib/commonjs/accessibility/utils.js +231 -0
  15. package/lib/commonjs/accessibility/utils.js.map +1 -0
  16. package/lib/commonjs/alias/Icon.js +113 -0
  17. package/lib/commonjs/alias/Icon.js.map +1 -0
  18. package/lib/commonjs/alias/IconAliasContext.js +177 -0
  19. package/lib/commonjs/alias/IconAliasContext.js.map +1 -0
  20. package/lib/commonjs/alias/createIconAliases.js +222 -0
  21. package/lib/commonjs/alias/createIconAliases.js.map +1 -0
  22. package/lib/commonjs/alias/index.js +57 -0
  23. package/lib/commonjs/alias/index.js.map +1 -0
  24. package/lib/commonjs/alias/types.js +6 -0
  25. package/lib/commonjs/alias/types.js.map +1 -0
  26. package/lib/commonjs/animated/AnimatedIcon.js +116 -0
  27. package/lib/commonjs/animated/AnimatedIcon.js.map +1 -0
  28. package/lib/commonjs/animated/index.js +76 -0
  29. package/lib/commonjs/animated/index.js.map +1 -0
  30. package/lib/commonjs/animated/presets.js +220 -0
  31. package/lib/commonjs/animated/presets.js.map +1 -0
  32. package/lib/commonjs/animated/types.js +71 -0
  33. package/lib/commonjs/animated/types.js.map +1 -0
  34. package/lib/commonjs/animated/useIconAnimation.js +313 -0
  35. package/lib/commonjs/animated/useIconAnimation.js.map +1 -0
  36. package/lib/commonjs/babel/ast-utils.js +214 -0
  37. package/lib/commonjs/babel/ast-utils.js.map +1 -0
  38. package/lib/commonjs/babel/cache-writer.js +281 -0
  39. package/lib/commonjs/babel/cache-writer.js.map +1 -0
  40. package/lib/commonjs/babel/collector.js +219 -0
  41. package/lib/commonjs/babel/collector.js.map +1 -0
  42. package/lib/commonjs/babel/index.js +104 -0
  43. package/lib/commonjs/babel/index.js.map +1 -0
  44. package/lib/commonjs/babel/plugin.js +226 -0
  45. package/lib/commonjs/babel/plugin.js.map +1 -0
  46. package/lib/commonjs/babel/types.js +485 -0
  47. package/lib/commonjs/babel/types.js.map +1 -0
  48. package/lib/commonjs/bundle/index.js +213 -0
  49. package/lib/commonjs/bundle/index.js.map +1 -0
  50. package/lib/commonjs/cache/CacheManager.js +105 -6
  51. package/lib/commonjs/cache/CacheManager.js.map +1 -1
  52. package/lib/commonjs/cli/commands/analyze.js +171 -0
  53. package/lib/commonjs/cli/commands/analyze.js.map +1 -0
  54. package/lib/commonjs/cli/commands/bundle.js +214 -0
  55. package/lib/commonjs/cli/commands/bundle.js.map +1 -0
  56. package/lib/commonjs/cli/index.js +142 -0
  57. package/lib/commonjs/cli/index.js.map +1 -0
  58. package/lib/commonjs/cli/parser.js +260 -0
  59. package/lib/commonjs/cli/parser.js.map +1 -0
  60. package/lib/commonjs/cli/types.js +42 -0
  61. package/lib/commonjs/cli/types.js.map +1 -0
  62. package/lib/commonjs/config/ConfigManager.js +182 -0
  63. package/lib/commonjs/config/ConfigManager.js.map +1 -0
  64. package/lib/commonjs/config/index.js +44 -0
  65. package/lib/commonjs/config/index.js.map +1 -0
  66. package/lib/commonjs/config/types.js +55 -0
  67. package/lib/commonjs/config/types.js.map +1 -0
  68. package/lib/commonjs/createIconSet.js +49 -11
  69. package/lib/commonjs/createIconSet.js.map +1 -1
  70. package/lib/commonjs/explorer/IconExplorer.js +827 -0
  71. package/lib/commonjs/explorer/IconExplorer.js.map +1 -0
  72. package/lib/commonjs/explorer/iconSets.js +303 -0
  73. package/lib/commonjs/explorer/iconSets.js.map +1 -0
  74. package/lib/commonjs/explorer/index.js +93 -0
  75. package/lib/commonjs/explorer/index.js.map +1 -0
  76. package/lib/commonjs/explorer/types.js +6 -0
  77. package/lib/commonjs/explorer/types.js.map +1 -0
  78. package/lib/commonjs/explorer/useExplorer.js +359 -0
  79. package/lib/commonjs/explorer/useExplorer.js.map +1 -0
  80. package/lib/commonjs/index.js +618 -12
  81. package/lib/commonjs/index.js.map +1 -1
  82. package/lib/commonjs/navigation/createDrawerIcon.js +129 -0
  83. package/lib/commonjs/navigation/createDrawerIcon.js.map +1 -0
  84. package/lib/commonjs/navigation/createHeaderIcon.js +185 -0
  85. package/lib/commonjs/navigation/createHeaderIcon.js.map +1 -0
  86. package/lib/commonjs/navigation/createTabBarIcon.js +178 -0
  87. package/lib/commonjs/navigation/createTabBarIcon.js.map +1 -0
  88. package/lib/commonjs/navigation/index.js +83 -0
  89. package/lib/commonjs/navigation/index.js.map +1 -0
  90. package/lib/commonjs/navigation/types.js +94 -0
  91. package/lib/commonjs/navigation/types.js.map +1 -0
  92. package/lib/commonjs/navigation/useNavigationIcon.js +128 -0
  93. package/lib/commonjs/navigation/useNavigationIcon.js.map +1 -0
  94. package/lib/commonjs/network/IconifyAPI.js +154 -14
  95. package/lib/commonjs/network/IconifyAPI.js.map +1 -1
  96. package/lib/commonjs/network/index.js +18 -0
  97. package/lib/commonjs/network/index.js.map +1 -1
  98. package/lib/commonjs/performance/PerformanceMonitor.js +327 -0
  99. package/lib/commonjs/performance/PerformanceMonitor.js.map +1 -0
  100. package/lib/commonjs/performance/index.js +43 -0
  101. package/lib/commonjs/performance/index.js.map +1 -0
  102. package/lib/commonjs/performance/types.js +2 -0
  103. package/lib/commonjs/performance/types.js.map +1 -0
  104. package/lib/commonjs/placeholder/PlaceholderFactory.js +111 -0
  105. package/lib/commonjs/placeholder/PlaceholderFactory.js.map +1 -0
  106. package/lib/commonjs/placeholder/Pulse.js +77 -0
  107. package/lib/commonjs/placeholder/Pulse.js.map +1 -0
  108. package/lib/commonjs/placeholder/Shimmer.js +95 -0
  109. package/lib/commonjs/placeholder/Shimmer.js.map +1 -0
  110. package/lib/commonjs/placeholder/Skeleton.js +52 -0
  111. package/lib/commonjs/placeholder/Skeleton.js.map +1 -0
  112. package/lib/commonjs/placeholder/index.js +41 -0
  113. package/lib/commonjs/placeholder/index.js.map +1 -0
  114. package/lib/commonjs/placeholder/types.js +40 -0
  115. package/lib/commonjs/placeholder/types.js.map +1 -0
  116. package/lib/commonjs/theme/IconThemeProvider.js +96 -0
  117. package/lib/commonjs/theme/IconThemeProvider.js.map +1 -0
  118. package/lib/commonjs/theme/context.js +53 -0
  119. package/lib/commonjs/theme/context.js.map +1 -0
  120. package/lib/commonjs/theme/index.js +52 -0
  121. package/lib/commonjs/theme/index.js.map +1 -0
  122. package/lib/commonjs/theme/types.js +39 -0
  123. package/lib/commonjs/theme/types.js.map +1 -0
  124. package/lib/commonjs/theme/useIconTheme.js +121 -0
  125. package/lib/commonjs/theme/useIconTheme.js.map +1 -0
  126. package/lib/module/IconRenderer.js +92 -5
  127. package/lib/module/IconRenderer.js.map +1 -1
  128. package/lib/module/accessibility/AccessibilityProvider.js +179 -0
  129. package/lib/module/accessibility/AccessibilityProvider.js.map +1 -0
  130. package/lib/module/accessibility/index.js +42 -0
  131. package/lib/module/accessibility/index.js.map +1 -0
  132. package/lib/module/accessibility/types.js +2 -0
  133. package/lib/module/accessibility/types.js.map +1 -0
  134. package/lib/module/accessibility/useAccessibleIcon.js +112 -0
  135. package/lib/module/accessibility/useAccessibleIcon.js.map +1 -0
  136. package/lib/module/accessibility/utils.js +221 -0
  137. package/lib/module/accessibility/utils.js.map +1 -0
  138. package/lib/module/alias/Icon.js +105 -0
  139. package/lib/module/alias/Icon.js.map +1 -0
  140. package/lib/module/alias/IconAliasContext.js +166 -0
  141. package/lib/module/alias/IconAliasContext.js.map +1 -0
  142. package/lib/module/alias/createIconAliases.js +213 -0
  143. package/lib/module/alias/createIconAliases.js.map +1 -0
  144. package/lib/module/alias/index.js +45 -0
  145. package/lib/module/alias/index.js.map +1 -0
  146. package/lib/module/alias/types.js +2 -0
  147. package/lib/module/alias/types.js.map +1 -0
  148. package/lib/module/animated/AnimatedIcon.js +109 -0
  149. package/lib/module/animated/AnimatedIcon.js.map +1 -0
  150. package/lib/module/animated/index.js +80 -0
  151. package/lib/module/animated/index.js.map +1 -0
  152. package/lib/module/animated/presets.js +209 -0
  153. package/lib/module/animated/presets.js.map +1 -0
  154. package/lib/module/animated/types.js +65 -0
  155. package/lib/module/animated/types.js.map +1 -0
  156. package/lib/module/animated/useIconAnimation.js +306 -0
  157. package/lib/module/animated/useIconAnimation.js.map +1 -0
  158. package/lib/module/babel/ast-utils.js +201 -0
  159. package/lib/module/babel/ast-utils.js.map +1 -0
  160. package/lib/module/babel/cache-writer.js +269 -0
  161. package/lib/module/babel/cache-writer.js.map +1 -0
  162. package/lib/module/babel/collector.js +214 -0
  163. package/lib/module/babel/collector.js.map +1 -0
  164. package/lib/module/babel/index.js +51 -0
  165. package/lib/module/babel/index.js.map +1 -0
  166. package/lib/module/babel/plugin.js +220 -0
  167. package/lib/module/babel/plugin.js.map +1 -0
  168. package/lib/module/babel/types.js +476 -0
  169. package/lib/module/babel/types.js.map +1 -0
  170. package/lib/module/bundle/index.js +205 -0
  171. package/lib/module/bundle/index.js.map +1 -0
  172. package/lib/module/cache/CacheManager.js +106 -6
  173. package/lib/module/cache/CacheManager.js.map +1 -1
  174. package/lib/module/cli/commands/analyze.js +166 -0
  175. package/lib/module/cli/commands/analyze.js.map +1 -0
  176. package/lib/module/cli/commands/bundle.js +208 -0
  177. package/lib/module/cli/commands/bundle.js.map +1 -0
  178. package/lib/module/cli/index.js +140 -0
  179. package/lib/module/cli/index.js.map +1 -0
  180. package/lib/module/cli/parser.js +251 -0
  181. package/lib/module/cli/parser.js.map +1 -0
  182. package/lib/module/cli/types.js +36 -0
  183. package/lib/module/cli/types.js.map +1 -0
  184. package/lib/module/components/index.js +27 -1
  185. package/lib/module/components/index.js.map +1 -1
  186. package/lib/module/config/ConfigManager.js +173 -0
  187. package/lib/module/config/ConfigManager.js.map +1 -0
  188. package/lib/module/config/index.js +28 -0
  189. package/lib/module/config/index.js.map +1 -0
  190. package/lib/module/config/types.js +49 -0
  191. package/lib/module/config/types.js.map +1 -0
  192. package/lib/module/createIconSet.js +49 -11
  193. package/lib/module/createIconSet.js.map +1 -1
  194. package/lib/module/explorer/IconExplorer.js +817 -0
  195. package/lib/module/explorer/IconExplorer.js.map +1 -0
  196. package/lib/module/explorer/iconSets.js +291 -0
  197. package/lib/module/explorer/iconSets.js.map +1 -0
  198. package/lib/module/explorer/index.js +42 -0
  199. package/lib/module/explorer/index.js.map +1 -0
  200. package/lib/module/explorer/types.js +2 -0
  201. package/lib/module/explorer/types.js.map +1 -0
  202. package/lib/module/explorer/useExplorer.js +353 -0
  203. package/lib/module/explorer/useExplorer.js.map +1 -0
  204. package/lib/module/index.js +26 -11
  205. package/lib/module/index.js.map +1 -1
  206. package/lib/module/navigation/createDrawerIcon.js +121 -0
  207. package/lib/module/navigation/createDrawerIcon.js.map +1 -0
  208. package/lib/module/navigation/createHeaderIcon.js +175 -0
  209. package/lib/module/navigation/createHeaderIcon.js.map +1 -0
  210. package/lib/module/navigation/createTabBarIcon.js +168 -0
  211. package/lib/module/navigation/createTabBarIcon.js.map +1 -0
  212. package/lib/module/navigation/index.js +59 -0
  213. package/lib/module/navigation/index.js.map +1 -0
  214. package/lib/module/navigation/types.js +88 -0
  215. package/lib/module/navigation/types.js.map +1 -0
  216. package/lib/module/navigation/useNavigationIcon.js +121 -0
  217. package/lib/module/navigation/useNavigationIcon.js.map +1 -0
  218. package/lib/module/network/IconifyAPI.js +152 -14
  219. package/lib/module/network/IconifyAPI.js.map +1 -1
  220. package/lib/module/network/index.js +1 -1
  221. package/lib/module/network/index.js.map +1 -1
  222. package/lib/module/performance/PerformanceMonitor.js +317 -0
  223. package/lib/module/performance/PerformanceMonitor.js.map +1 -0
  224. package/lib/module/performance/index.js +26 -0
  225. package/lib/module/performance/index.js.map +1 -0
  226. package/lib/module/performance/types.js +2 -0
  227. package/lib/module/performance/types.js.map +1 -0
  228. package/lib/module/placeholder/PlaceholderFactory.js +105 -0
  229. package/lib/module/placeholder/PlaceholderFactory.js.map +1 -0
  230. package/lib/module/placeholder/Pulse.js +70 -0
  231. package/lib/module/placeholder/Pulse.js.map +1 -0
  232. package/lib/module/placeholder/Shimmer.js +88 -0
  233. package/lib/module/placeholder/Shimmer.js.map +1 -0
  234. package/lib/module/placeholder/Skeleton.js +45 -0
  235. package/lib/module/placeholder/Skeleton.js.map +1 -0
  236. package/lib/module/placeholder/index.js +15 -0
  237. package/lib/module/placeholder/index.js.map +1 -0
  238. package/lib/module/placeholder/types.js +34 -0
  239. package/lib/module/placeholder/types.js.map +1 -0
  240. package/lib/module/theme/IconThemeProvider.js +89 -0
  241. package/lib/module/theme/IconThemeProvider.js.map +1 -0
  242. package/lib/module/theme/context.js +47 -0
  243. package/lib/module/theme/context.js.map +1 -0
  244. package/lib/module/theme/index.js +19 -0
  245. package/lib/module/theme/index.js.map +1 -0
  246. package/lib/module/theme/types.js +33 -0
  247. package/lib/module/theme/types.js.map +1 -0
  248. package/lib/module/theme/useIconTheme.js +114 -0
  249. package/lib/module/theme/useIconTheme.js.map +1 -0
  250. package/lib/typescript/IconRenderer.d.ts +1 -1
  251. package/lib/typescript/IconRenderer.d.ts.map +1 -1
  252. package/lib/typescript/accessibility/AccessibilityProvider.d.ts +57 -0
  253. package/lib/typescript/accessibility/AccessibilityProvider.d.ts.map +1 -0
  254. package/lib/typescript/accessibility/index.d.ts +37 -0
  255. package/lib/typescript/accessibility/index.d.ts.map +1 -0
  256. package/lib/typescript/accessibility/types.d.ts +130 -0
  257. package/lib/typescript/accessibility/types.d.ts.map +1 -0
  258. package/lib/typescript/accessibility/useAccessibleIcon.d.ts +111 -0
  259. package/lib/typescript/accessibility/useAccessibleIcon.d.ts.map +1 -0
  260. package/lib/typescript/accessibility/utils.d.ts +29 -0
  261. package/lib/typescript/accessibility/utils.d.ts.map +1 -0
  262. package/lib/typescript/alias/Icon.d.ts +38 -0
  263. package/lib/typescript/alias/Icon.d.ts.map +1 -0
  264. package/lib/typescript/alias/IconAliasContext.d.ts +52 -0
  265. package/lib/typescript/alias/IconAliasContext.d.ts.map +1 -0
  266. package/lib/typescript/alias/createIconAliases.d.ts +77 -0
  267. package/lib/typescript/alias/createIconAliases.d.ts.map +1 -0
  268. package/lib/typescript/alias/index.d.ts +36 -0
  269. package/lib/typescript/alias/index.d.ts.map +1 -0
  270. package/lib/typescript/alias/types.d.ts +115 -0
  271. package/lib/typescript/alias/types.d.ts.map +1 -0
  272. package/lib/typescript/animated/AnimatedIcon.d.ts +45 -0
  273. package/lib/typescript/animated/AnimatedIcon.d.ts.map +1 -0
  274. package/lib/typescript/animated/index.d.ts +70 -0
  275. package/lib/typescript/animated/index.d.ts.map +1 -0
  276. package/lib/typescript/animated/presets.d.ts +35 -0
  277. package/lib/typescript/animated/presets.d.ts.map +1 -0
  278. package/lib/typescript/animated/types.d.ts +196 -0
  279. package/lib/typescript/animated/types.d.ts.map +1 -0
  280. package/lib/typescript/animated/useIconAnimation.d.ts +64 -0
  281. package/lib/typescript/animated/useIconAnimation.d.ts.map +1 -0
  282. package/lib/typescript/babel/ast-utils.d.ts +52 -0
  283. package/lib/typescript/babel/ast-utils.d.ts.map +1 -0
  284. package/lib/typescript/babel/cache-writer.d.ts +56 -0
  285. package/lib/typescript/babel/cache-writer.d.ts.map +1 -0
  286. package/lib/typescript/babel/collector.d.ts +107 -0
  287. package/lib/typescript/babel/collector.d.ts.map +1 -0
  288. package/lib/typescript/babel/index.d.ts +47 -0
  289. package/lib/typescript/babel/index.d.ts.map +1 -0
  290. package/lib/typescript/babel/plugin.d.ts +17 -0
  291. package/lib/typescript/babel/plugin.d.ts.map +1 -0
  292. package/lib/typescript/babel/types.d.ts +129 -0
  293. package/lib/typescript/babel/types.d.ts.map +1 -0
  294. package/lib/typescript/bundle/index.d.ts +161 -0
  295. package/lib/typescript/bundle/index.d.ts.map +1 -0
  296. package/lib/typescript/cache/CacheManager.d.ts +52 -4
  297. package/lib/typescript/cache/CacheManager.d.ts.map +1 -1
  298. package/lib/typescript/cli/commands/analyze.d.ts +10 -0
  299. package/lib/typescript/cli/commands/analyze.d.ts.map +1 -0
  300. package/lib/typescript/cli/commands/bundle.d.ts +10 -0
  301. package/lib/typescript/cli/commands/bundle.d.ts.map +1 -0
  302. package/lib/typescript/cli/index.d.ts +7 -0
  303. package/lib/typescript/cli/index.d.ts.map +1 -0
  304. package/lib/typescript/cli/parser.d.ts +18 -0
  305. package/lib/typescript/cli/parser.d.ts.map +1 -0
  306. package/lib/typescript/cli/types.d.ts +157 -0
  307. package/lib/typescript/cli/types.d.ts.map +1 -0
  308. package/lib/typescript/components/Academicons.d.ts +1 -1
  309. package/lib/typescript/components/AkarIcons.d.ts +1 -1
  310. package/lib/typescript/components/AntDesign.d.ts +1 -1
  311. package/lib/typescript/components/Arcticons.d.ts +1 -1
  312. package/lib/typescript/components/Basil.d.ts +1 -1
  313. package/lib/typescript/components/Bi.d.ts +1 -1
  314. package/lib/typescript/components/BitcoinIcons.d.ts +1 -1
  315. package/lib/typescript/components/Bpmn.d.ts +1 -1
  316. package/lib/typescript/components/Brandico.d.ts +1 -1
  317. package/lib/typescript/components/Bx.d.ts +1 -1
  318. package/lib/typescript/components/Bxl.d.ts +1 -1
  319. package/lib/typescript/components/Bxs.d.ts +1 -1
  320. package/lib/typescript/components/Bytesize.d.ts +1 -1
  321. package/lib/typescript/components/Carbon.d.ts +1 -1
  322. package/lib/typescript/components/Catppuccin.d.ts +1 -1
  323. package/lib/typescript/components/Cbi.d.ts +1 -1
  324. package/lib/typescript/components/Charm.d.ts +1 -1
  325. package/lib/typescript/components/Ci.d.ts +1 -1
  326. package/lib/typescript/components/Cib.d.ts +1 -1
  327. package/lib/typescript/components/Cif.d.ts +1 -1
  328. package/lib/typescript/components/Cil.d.ts +1 -1
  329. package/lib/typescript/components/CircleFlags.d.ts +1 -1
  330. package/lib/typescript/components/Circum.d.ts +1 -1
  331. package/lib/typescript/components/Clarity.d.ts +1 -1
  332. package/lib/typescript/components/Codex.d.ts +1 -1
  333. package/lib/typescript/components/Codicon.d.ts +1 -1
  334. package/lib/typescript/components/Covid.d.ts +1 -1
  335. package/lib/typescript/components/Cryptocurrency.d.ts +1 -1
  336. package/lib/typescript/components/CryptocurrencyColor.d.ts +1 -1
  337. package/lib/typescript/components/Cuida.d.ts +1 -1
  338. package/lib/typescript/components/Dashicons.d.ts +1 -1
  339. package/lib/typescript/components/Devicon.d.ts +1 -1
  340. package/lib/typescript/components/DeviconPlain.d.ts +1 -1
  341. package/lib/typescript/components/DinkieIcons.d.ts +1 -1
  342. package/lib/typescript/components/DuoIcons.d.ts +1 -1
  343. package/lib/typescript/components/Ei.d.ts +1 -1
  344. package/lib/typescript/components/El.d.ts +1 -1
  345. package/lib/typescript/components/EmojioneMonotone.d.ts +1 -1
  346. package/lib/typescript/components/Entypo.d.ts +1 -1
  347. package/lib/typescript/components/EntypoSocial.d.ts +1 -1
  348. package/lib/typescript/components/EosIcons.d.ts +1 -1
  349. package/lib/typescript/components/Ep.d.ts +1 -1
  350. package/lib/typescript/components/Et.d.ts +1 -1
  351. package/lib/typescript/components/Eva.d.ts +1 -1
  352. package/lib/typescript/components/F7.d.ts +1 -1
  353. package/lib/typescript/components/Fa.d.ts +1 -1
  354. package/lib/typescript/components/Fa6Brands.d.ts +1 -1
  355. package/lib/typescript/components/Fa6Regular.d.ts +1 -1
  356. package/lib/typescript/components/Fa6Solid.d.ts +1 -1
  357. package/lib/typescript/components/Fa7Brands.d.ts +1 -1
  358. package/lib/typescript/components/Fa7Regular.d.ts +1 -1
  359. package/lib/typescript/components/Fa7Solid.d.ts +1 -1
  360. package/lib/typescript/components/FaBrands.d.ts +1 -1
  361. package/lib/typescript/components/FaRegular.d.ts +1 -1
  362. package/lib/typescript/components/FaSolid.d.ts +1 -1
  363. package/lib/typescript/components/Fad.d.ts +1 -1
  364. package/lib/typescript/components/Famicons.d.ts +1 -1
  365. package/lib/typescript/components/Fe.d.ts +1 -1
  366. package/lib/typescript/components/Feather.d.ts +1 -1
  367. package/lib/typescript/components/FileIcons.d.ts +1 -1
  368. package/lib/typescript/components/Flag.d.ts +1 -1
  369. package/lib/typescript/components/Flagpack.d.ts +1 -1
  370. package/lib/typescript/components/FlatUi.d.ts +1 -1
  371. package/lib/typescript/components/Flowbite.d.ts +1 -1
  372. package/lib/typescript/components/Fluent.d.ts +1 -1
  373. package/lib/typescript/components/FluentColor.d.ts +1 -1
  374. package/lib/typescript/components/FluentEmoji.d.ts +1 -1
  375. package/lib/typescript/components/FluentEmojiFlat.d.ts +1 -1
  376. package/lib/typescript/components/FluentEmojiHighContrast.d.ts +1 -1
  377. package/lib/typescript/components/FluentMdl2.d.ts +1 -1
  378. package/lib/typescript/components/Fontelico.d.ts +1 -1
  379. package/lib/typescript/components/Fontisto.d.ts +1 -1
  380. package/lib/typescript/components/Formkit.d.ts +1 -1
  381. package/lib/typescript/components/Foundation.d.ts +1 -1
  382. package/lib/typescript/components/Gala.d.ts +1 -1
  383. package/lib/typescript/components/GameIcons.d.ts +1 -1
  384. package/lib/typescript/components/Garden.d.ts +1 -1
  385. package/lib/typescript/components/Geo.d.ts +1 -1
  386. package/lib/typescript/components/Gg.d.ts +1 -1
  387. package/lib/typescript/components/Gis.d.ts +1 -1
  388. package/lib/typescript/components/GravityUi.d.ts +1 -1
  389. package/lib/typescript/components/Gridicons.d.ts +1 -1
  390. package/lib/typescript/components/GrommetIcons.d.ts +1 -1
  391. package/lib/typescript/components/Guidance.d.ts +1 -1
  392. package/lib/typescript/components/Healthicons.d.ts +1 -1
  393. package/lib/typescript/components/Heroicons.d.ts +1 -1
  394. package/lib/typescript/components/HeroiconsOutline.d.ts +1 -1
  395. package/lib/typescript/components/HeroiconsSolid.d.ts +1 -1
  396. package/lib/typescript/components/Hugeicons.d.ts +1 -1
  397. package/lib/typescript/components/Humbleicons.d.ts +1 -1
  398. package/lib/typescript/components/Ic.d.ts +1 -1
  399. package/lib/typescript/components/IcomoonFree.d.ts +1 -1
  400. package/lib/typescript/components/IconPark.d.ts +1 -1
  401. package/lib/typescript/components/IconParkOutline.d.ts +1 -1
  402. package/lib/typescript/components/IconParkSolid.d.ts +1 -1
  403. package/lib/typescript/components/IconParkTwotone.d.ts +1 -1
  404. package/lib/typescript/components/Iconamoon.d.ts +1 -1
  405. package/lib/typescript/components/Iconoir.d.ts +1 -1
  406. package/lib/typescript/components/Icons8.d.ts +1 -1
  407. package/lib/typescript/components/Il.d.ts +1 -1
  408. package/lib/typescript/components/Ion.d.ts +1 -1
  409. package/lib/typescript/components/Iwwa.d.ts +1 -1
  410. package/lib/typescript/components/Ix.d.ts +1 -1
  411. package/lib/typescript/components/Jam.d.ts +1 -1
  412. package/lib/typescript/components/La.d.ts +1 -1
  413. package/lib/typescript/components/LetsIcons.d.ts +1 -1
  414. package/lib/typescript/components/LineMd.d.ts +1 -1
  415. package/lib/typescript/components/Lineicons.d.ts +1 -1
  416. package/lib/typescript/components/Logos.d.ts +1 -1
  417. package/lib/typescript/components/Ls.d.ts +1 -1
  418. package/lib/typescript/components/Lsicon.d.ts +1 -1
  419. package/lib/typescript/components/Lucide.d.ts +1 -1
  420. package/lib/typescript/components/LucideLab.d.ts +1 -1
  421. package/lib/typescript/components/Mage.d.ts +1 -1
  422. package/lib/typescript/components/Majesticons.d.ts +1 -1
  423. package/lib/typescript/components/Maki.d.ts +1 -1
  424. package/lib/typescript/components/Map.d.ts +1 -1
  425. package/lib/typescript/components/Marketeq.d.ts +1 -1
  426. package/lib/typescript/components/MaterialIconTheme.d.ts +1 -1
  427. package/lib/typescript/components/MaterialSymbols.d.ts +1 -1
  428. package/lib/typescript/components/MaterialSymbolsLight.d.ts +1 -1
  429. package/lib/typescript/components/Mdi.d.ts +1 -1
  430. package/lib/typescript/components/MdiLight.d.ts +1 -1
  431. package/lib/typescript/components/MedicalIcon.d.ts +1 -1
  432. package/lib/typescript/components/Memory.d.ts +1 -1
  433. package/lib/typescript/components/Meteocons.d.ts +1 -1
  434. package/lib/typescript/components/MeteorIcons.d.ts +1 -1
  435. package/lib/typescript/components/Mi.d.ts +1 -1
  436. package/lib/typescript/components/Mingcute.d.ts +1 -1
  437. package/lib/typescript/components/MonoIcons.d.ts +1 -1
  438. package/lib/typescript/components/Mynaui.d.ts +1 -1
  439. package/lib/typescript/components/Nimbus.d.ts +1 -1
  440. package/lib/typescript/components/Nonicons.d.ts +1 -1
  441. package/lib/typescript/components/Nrk.d.ts +1 -1
  442. package/lib/typescript/components/Octicon.d.ts +1 -1
  443. package/lib/typescript/components/Oi.d.ts +1 -1
  444. package/lib/typescript/components/Ooui.d.ts +1 -1
  445. package/lib/typescript/components/Oui.d.ts +1 -1
  446. package/lib/typescript/components/Pajamas.d.ts +1 -1
  447. package/lib/typescript/components/Pepicons.d.ts +1 -1
  448. package/lib/typescript/components/PepiconsPencil.d.ts +1 -1
  449. package/lib/typescript/components/PepiconsPop.d.ts +1 -1
  450. package/lib/typescript/components/PepiconsPrint.d.ts +1 -1
  451. package/lib/typescript/components/Ph.d.ts +1 -1
  452. package/lib/typescript/components/Picon.d.ts +1 -1
  453. package/lib/typescript/components/Pixel.d.ts +1 -1
  454. package/lib/typescript/components/Pixelarticons.d.ts +1 -1
  455. package/lib/typescript/components/Prime.d.ts +1 -1
  456. package/lib/typescript/components/Proicons.d.ts +1 -1
  457. package/lib/typescript/components/Ps.d.ts +1 -1
  458. package/lib/typescript/components/QlementineIcons.d.ts +1 -1
  459. package/lib/typescript/components/Quill.d.ts +1 -1
  460. package/lib/typescript/components/RadixIcons.d.ts +1 -1
  461. package/lib/typescript/components/Raphael.d.ts +1 -1
  462. package/lib/typescript/components/Ri.d.ts +1 -1
  463. package/lib/typescript/components/RivetIcons.d.ts +1 -1
  464. package/lib/typescript/components/Roentgen.d.ts +1 -1
  465. package/lib/typescript/components/Si.d.ts +1 -1
  466. package/lib/typescript/components/SiGlyph.d.ts +1 -1
  467. package/lib/typescript/components/Sidekickicons.d.ts +1 -1
  468. package/lib/typescript/components/SimpleIcons.d.ts +1 -1
  469. package/lib/typescript/components/SimpleLineIcons.d.ts +1 -1
  470. package/lib/typescript/components/SkillIcons.d.ts +1 -1
  471. package/lib/typescript/components/Solar.d.ts +1 -1
  472. package/lib/typescript/components/Stash.d.ts +1 -1
  473. package/lib/typescript/components/Streamline.d.ts +1 -1
  474. package/lib/typescript/components/StreamlineBlock.d.ts +1 -1
  475. package/lib/typescript/components/StreamlineColor.d.ts +1 -1
  476. package/lib/typescript/components/StreamlineCyber.d.ts +1 -1
  477. package/lib/typescript/components/StreamlineCyberColor.d.ts +1 -1
  478. package/lib/typescript/components/StreamlineEmojis.d.ts +1 -1
  479. package/lib/typescript/components/StreamlineFlex.d.ts +1 -1
  480. package/lib/typescript/components/StreamlineFlexColor.d.ts +1 -1
  481. package/lib/typescript/components/StreamlineFreehand.d.ts +1 -1
  482. package/lib/typescript/components/StreamlineFreehandColor.d.ts +1 -1
  483. package/lib/typescript/components/StreamlineKameleonColor.d.ts +1 -1
  484. package/lib/typescript/components/StreamlineLogos.d.ts +1 -1
  485. package/lib/typescript/components/StreamlinePixel.d.ts +1 -1
  486. package/lib/typescript/components/StreamlinePlump.d.ts +1 -1
  487. package/lib/typescript/components/StreamlinePlumpColor.d.ts +1 -1
  488. package/lib/typescript/components/StreamlineSharp.d.ts +1 -1
  489. package/lib/typescript/components/StreamlineSharpColor.d.ts +1 -1
  490. package/lib/typescript/components/StreamlineStickiesColor.d.ts +1 -1
  491. package/lib/typescript/components/StreamlineUltimate.d.ts +1 -1
  492. package/lib/typescript/components/StreamlineUltimateColor.d.ts +1 -1
  493. package/lib/typescript/components/Subway.d.ts +1 -1
  494. package/lib/typescript/components/SvgSpinners.d.ts +1 -1
  495. package/lib/typescript/components/SystemUicons.d.ts +1 -1
  496. package/lib/typescript/components/Tabler.d.ts +1 -1
  497. package/lib/typescript/components/Tdesign.d.ts +1 -1
  498. package/lib/typescript/components/Teenyicons.d.ts +1 -1
  499. package/lib/typescript/components/Temaki.d.ts +1 -1
  500. package/lib/typescript/components/Token.d.ts +1 -1
  501. package/lib/typescript/components/TokenBranded.d.ts +1 -1
  502. package/lib/typescript/components/Topcoat.d.ts +1 -1
  503. package/lib/typescript/components/Typcn.d.ts +1 -1
  504. package/lib/typescript/components/Uil.d.ts +1 -1
  505. package/lib/typescript/components/Uim.d.ts +1 -1
  506. package/lib/typescript/components/Uis.d.ts +1 -1
  507. package/lib/typescript/components/Uit.d.ts +1 -1
  508. package/lib/typescript/components/Uiw.d.ts +1 -1
  509. package/lib/typescript/components/Unjs.d.ts +1 -1
  510. package/lib/typescript/components/Vaadin.d.ts +1 -1
  511. package/lib/typescript/components/Vs.d.ts +1 -1
  512. package/lib/typescript/components/VscodeIcons.d.ts +1 -1
  513. package/lib/typescript/components/Websymbol.d.ts +1 -1
  514. package/lib/typescript/components/Weui.d.ts +1 -1
  515. package/lib/typescript/components/Whh.d.ts +1 -1
  516. package/lib/typescript/components/Wi.d.ts +1 -1
  517. package/lib/typescript/components/Wpf.d.ts +1 -1
  518. package/lib/typescript/components/Zmdi.d.ts +1 -1
  519. package/lib/typescript/components/Zondicons.d.ts +1 -1
  520. package/lib/typescript/components/index.d.ts +38 -1
  521. package/lib/typescript/components/index.d.ts.map +1 -1
  522. package/lib/typescript/config/ConfigManager.d.ts +102 -0
  523. package/lib/typescript/config/ConfigManager.d.ts.map +1 -0
  524. package/lib/typescript/config/index.d.ts +22 -0
  525. package/lib/typescript/config/index.d.ts.map +1 -0
  526. package/lib/typescript/config/types.d.ts +112 -0
  527. package/lib/typescript/config/types.d.ts.map +1 -0
  528. package/lib/typescript/createIconSet.d.ts +1 -1
  529. package/lib/typescript/createIconSet.d.ts.map +1 -1
  530. package/lib/typescript/explorer/IconExplorer.d.ts +54 -0
  531. package/lib/typescript/explorer/IconExplorer.d.ts.map +1 -0
  532. package/lib/typescript/explorer/iconSets.d.ts +35 -0
  533. package/lib/typescript/explorer/iconSets.d.ts.map +1 -0
  534. package/lib/typescript/explorer/index.d.ts +33 -0
  535. package/lib/typescript/explorer/index.d.ts.map +1 -0
  536. package/lib/typescript/explorer/types.d.ts +329 -0
  537. package/lib/typescript/explorer/types.d.ts.map +1 -0
  538. package/lib/typescript/explorer/useExplorer.d.ts +18 -0
  539. package/lib/typescript/explorer/useExplorer.d.ts.map +1 -0
  540. package/lib/typescript/index.d.ts +25 -4
  541. package/lib/typescript/index.d.ts.map +1 -1
  542. package/lib/typescript/navigation/createDrawerIcon.d.ts +74 -0
  543. package/lib/typescript/navigation/createDrawerIcon.d.ts.map +1 -0
  544. package/lib/typescript/navigation/createHeaderIcon.d.ts +145 -0
  545. package/lib/typescript/navigation/createHeaderIcon.d.ts.map +1 -0
  546. package/lib/typescript/navigation/createTabBarIcon.d.ts +99 -0
  547. package/lib/typescript/navigation/createTabBarIcon.d.ts.map +1 -0
  548. package/lib/typescript/navigation/index.d.ts +51 -0
  549. package/lib/typescript/navigation/index.d.ts.map +1 -0
  550. package/lib/typescript/navigation/types.d.ts +149 -0
  551. package/lib/typescript/navigation/types.d.ts.map +1 -0
  552. package/lib/typescript/navigation/useNavigationIcon.d.ts +91 -0
  553. package/lib/typescript/navigation/useNavigationIcon.d.ts.map +1 -0
  554. package/lib/typescript/network/IconifyAPI.d.ts +32 -0
  555. package/lib/typescript/network/IconifyAPI.d.ts.map +1 -1
  556. package/lib/typescript/network/index.d.ts +2 -1
  557. package/lib/typescript/network/index.d.ts.map +1 -1
  558. package/lib/typescript/performance/PerformanceMonitor.d.ts +76 -0
  559. package/lib/typescript/performance/PerformanceMonitor.d.ts.map +1 -0
  560. package/lib/typescript/performance/index.d.ts +21 -0
  561. package/lib/typescript/performance/index.d.ts.map +1 -0
  562. package/lib/typescript/performance/types.d.ts +156 -0
  563. package/lib/typescript/performance/types.d.ts.map +1 -0
  564. package/lib/typescript/placeholder/PlaceholderFactory.d.ts +44 -0
  565. package/lib/typescript/placeholder/PlaceholderFactory.d.ts.map +1 -0
  566. package/lib/typescript/placeholder/Pulse.d.ts +18 -0
  567. package/lib/typescript/placeholder/Pulse.d.ts.map +1 -0
  568. package/lib/typescript/placeholder/Shimmer.d.ts +19 -0
  569. package/lib/typescript/placeholder/Shimmer.d.ts.map +1 -0
  570. package/lib/typescript/placeholder/Skeleton.d.ts +18 -0
  571. package/lib/typescript/placeholder/Skeleton.d.ts.map +1 -0
  572. package/lib/typescript/placeholder/index.d.ts +12 -0
  573. package/lib/typescript/placeholder/index.d.ts.map +1 -0
  574. package/lib/typescript/placeholder/types.d.ts +63 -0
  575. package/lib/typescript/placeholder/types.d.ts.map +1 -0
  576. package/lib/typescript/theme/IconThemeProvider.d.ts +64 -0
  577. package/lib/typescript/theme/IconThemeProvider.d.ts.map +1 -0
  578. package/lib/typescript/theme/context.d.ts +24 -0
  579. package/lib/typescript/theme/context.d.ts.map +1 -0
  580. package/lib/typescript/theme/index.d.ts +10 -0
  581. package/lib/typescript/theme/index.d.ts.map +1 -0
  582. package/lib/typescript/theme/types.d.ts +85 -0
  583. package/lib/typescript/theme/types.d.ts.map +1 -0
  584. package/lib/typescript/theme/useIconTheme.d.ts +78 -0
  585. package/lib/typescript/theme/useIconTheme.d.ts.map +1 -0
  586. package/lib/typescript/types/index.d.ts +58 -1
  587. package/lib/typescript/types/index.d.ts.map +1 -1
  588. package/package.json +43 -3
  589. package/src/IconRenderer.tsx +91 -4
  590. package/src/accessibility/AccessibilityProvider.tsx +220 -0
  591. package/src/accessibility/index.ts +63 -0
  592. package/src/accessibility/types.ts +152 -0
  593. package/src/accessibility/useAccessibleIcon.ts +220 -0
  594. package/src/accessibility/utils.ts +180 -0
  595. package/src/alias/Icon.tsx +113 -0
  596. package/src/alias/IconAliasContext.tsx +180 -0
  597. package/src/alias/createIconAliases.tsx +233 -0
  598. package/src/alias/index.ts +59 -0
  599. package/src/alias/types.ts +132 -0
  600. package/src/animated/AnimatedIcon.tsx +116 -0
  601. package/src/animated/index.ts +97 -0
  602. package/src/animated/presets.ts +211 -0
  603. package/src/animated/types.ts +239 -0
  604. package/src/animated/useIconAnimation.ts +383 -0
  605. package/src/babel/ast-utils.ts +219 -0
  606. package/src/babel/cache-writer.ts +323 -0
  607. package/src/babel/collector.ts +224 -0
  608. package/src/babel/index.ts +60 -0
  609. package/src/babel/plugin.ts +254 -0
  610. package/src/babel/types.ts +717 -0
  611. package/src/bundle/index.ts +313 -0
  612. package/src/cache/CacheManager.ts +123 -6
  613. package/src/cli/commands/analyze.ts +195 -0
  614. package/src/cli/commands/bundle.ts +231 -0
  615. package/src/cli/index.ts +153 -0
  616. package/src/cli/parser.ts +275 -0
  617. package/src/cli/types.ts +187 -0
  618. package/src/components/index.ts +52 -1
  619. package/src/config/ConfigManager.ts +196 -0
  620. package/src/config/index.ts +34 -0
  621. package/src/config/types.ts +149 -0
  622. package/src/createIconSet.tsx +48 -9
  623. package/src/explorer/IconExplorer.tsx +844 -0
  624. package/src/explorer/iconSets.ts +334 -0
  625. package/src/explorer/index.ts +64 -0
  626. package/src/explorer/types.ts +392 -0
  627. package/src/explorer/useExplorer.ts +390 -0
  628. package/src/index.ts +218 -9
  629. package/src/navigation/createDrawerIcon.tsx +113 -0
  630. package/src/navigation/createHeaderIcon.tsx +213 -0
  631. package/src/navigation/createTabBarIcon.tsx +180 -0
  632. package/src/navigation/index.ts +80 -0
  633. package/src/navigation/types.ts +155 -0
  634. package/src/navigation/useNavigationIcon.tsx +156 -0
  635. package/src/network/IconifyAPI.ts +182 -14
  636. package/src/network/index.ts +11 -1
  637. package/src/performance/PerformanceMonitor.ts +367 -0
  638. package/src/performance/index.ts +39 -0
  639. package/src/performance/types.ts +185 -0
  640. package/src/placeholder/PlaceholderFactory.tsx +133 -0
  641. package/src/placeholder/Pulse.tsx +86 -0
  642. package/src/placeholder/Shimmer.tsx +104 -0
  643. package/src/placeholder/Skeleton.tsx +52 -0
  644. package/src/placeholder/index.ts +21 -0
  645. package/src/placeholder/types.ts +78 -0
  646. package/src/theme/IconThemeProvider.tsx +94 -0
  647. package/src/theme/context.ts +51 -0
  648. package/src/theme/index.ts +19 -0
  649. package/src/theme/types.ts +108 -0
  650. package/src/theme/useIconTheme.ts +119 -0
  651. package/src/types/index.ts +78 -1
  652. package/lib/commonjs/components/Phosphor.js +0 -493
  653. package/lib/commonjs/components/Phosphor.js.map +0 -1
  654. package/lib/module/components/Phosphor.js +0 -488
  655. package/lib/module/components/Phosphor.js.map +0 -1
  656. package/lib/typescript/components/Phosphor.d.ts +0 -472
  657. package/lib/typescript/components/Phosphor.d.ts.map +0 -1
  658. package/src/components/Phosphor.tsx +0 -506
@@ -0,0 +1,390 @@
1
+ /**
2
+ * Hook for managing Icon Explorer state
3
+ */
4
+
5
+ import { useState, useCallback, useMemo, useEffect, useRef } from 'react';
6
+ import { Clipboard, Alert, Platform } from 'react-native';
7
+ import type {
8
+ ExplorerConfig,
9
+ ResolvedExplorerConfig,
10
+ ExplorerState,
11
+ ExplorerActions,
12
+ ExplorerContextValue,
13
+ SearchResult,
14
+ PreviewConfig,
15
+ } from './types';
16
+ import { getAllIconSets, generateImportStatement, generateIconJSX } from './iconSets';
17
+ import { fetchCollection, searchIconsAPI } from '../network/IconifyAPI';
18
+
19
+ /**
20
+ * Default preview configuration
21
+ */
22
+ export const DEFAULT_PREVIEW_CONFIG: PreviewConfig = {
23
+ sizes: [16, 24, 32, 48, 64],
24
+ colors: ['#000000', '#6366F1', '#EF4444', '#10B981', '#F59E0B', '#8B5CF6'],
25
+ showName: true,
26
+ showCode: true,
27
+ backgroundColor: '#FFFFFF',
28
+ };
29
+
30
+ /**
31
+ * Default explorer configuration
32
+ */
33
+ export const DEFAULT_EXPLORER_CONFIG: ResolvedExplorerConfig = {
34
+ iconSets: [],
35
+ initialQuery: '',
36
+ maxResults: 100,
37
+ preview: DEFAULT_PREVIEW_CONFIG,
38
+ keyboardShortcuts: true,
39
+ };
40
+
41
+ /**
42
+ * Initial explorer state
43
+ */
44
+ const initialState: ExplorerState = {
45
+ query: '',
46
+ results: [],
47
+ selectedIcon: null,
48
+ activeIconSet: null,
49
+ isLoading: false,
50
+ error: null,
51
+ previewSize: 24,
52
+ previewColor: '#000000',
53
+ };
54
+
55
+ /**
56
+ * Cache for fetched collection icons
57
+ */
58
+ const collectionCache = new Map<string, string[]>();
59
+
60
+ /**
61
+ * Search icons locally from cached collections
62
+ */
63
+ function searchIconsLocally(
64
+ query: string,
65
+ cachedIcons: Map<string, string[]>,
66
+ iconSetPrefix: string | null,
67
+ maxResults: number
68
+ ): SearchResult[] {
69
+ const results: SearchResult[] = [];
70
+ const lowerQuery = query.toLowerCase();
71
+
72
+ // Get prefixes to search
73
+ const prefixesToSearch = iconSetPrefix ? [iconSetPrefix] : Array.from(cachedIcons.keys());
74
+
75
+ for (const prefix of prefixesToSearch) {
76
+ const icons = cachedIcons.get(prefix) || [];
77
+
78
+ for (const iconName of icons) {
79
+ const fullName = `${prefix}:${iconName}`;
80
+
81
+ // If query is empty, show all icons
82
+ // If query exists, filter by query
83
+ const matchesQuery = !query || iconName.toLowerCase().includes(lowerQuery);
84
+
85
+ if (matchesQuery) {
86
+ // Calculate relevance score
87
+ let score = 0.5;
88
+ if (query) {
89
+ if (iconName.toLowerCase() === lowerQuery) {
90
+ score = 1;
91
+ } else if (iconName.toLowerCase().startsWith(lowerQuery)) {
92
+ score = 0.8;
93
+ }
94
+ }
95
+
96
+ results.push({
97
+ fullName,
98
+ prefix,
99
+ name: iconName,
100
+ score,
101
+ });
102
+ }
103
+
104
+ if (results.length >= maxResults) break;
105
+ }
106
+
107
+ if (results.length >= maxResults) break;
108
+ }
109
+
110
+ // Sort by score (for searches) or keep order (for initial load)
111
+ if (query) {
112
+ results.sort((a, b) => b.score - a.score);
113
+ }
114
+
115
+ return results.slice(0, maxResults);
116
+ }
117
+
118
+ /**
119
+ * Hook for Icon Explorer functionality
120
+ */
121
+ export function useExplorer(config?: ExplorerConfig): ExplorerContextValue {
122
+ // Resolve configuration
123
+ const resolvedConfig = useMemo<ResolvedExplorerConfig>(
124
+ () => ({
125
+ ...DEFAULT_EXPLORER_CONFIG,
126
+ ...config,
127
+ preview: {
128
+ ...DEFAULT_PREVIEW_CONFIG,
129
+ ...config?.preview,
130
+ },
131
+ }),
132
+ [config]
133
+ );
134
+
135
+ // State
136
+ const [state, setState] = useState<ExplorerState>(() => ({
137
+ ...initialState,
138
+ query: resolvedConfig.initialQuery,
139
+ previewSize: resolvedConfig.preview.sizes[1] || 24,
140
+ previewColor: resolvedConfig.preview.colors[0] || '#000000',
141
+ }));
142
+
143
+ // Cached icons from API
144
+ const [cachedIcons, setCachedIcons] = useState<Map<string, string[]>>(new Map());
145
+ const [collectionsLoaded, setCollectionsLoaded] = useState(false);
146
+ const [totalIcons, setTotalIcons] = useState(0);
147
+ const abortControllerRef = useRef<AbortController | null>(null);
148
+
149
+ // Get available icon sets
150
+ const iconSets = useMemo(() => {
151
+ const allSets = getAllIconSets();
152
+ if (resolvedConfig.iconSets.length === 0) {
153
+ return allSets;
154
+ }
155
+ return allSets.filter((set) => resolvedConfig.iconSets.includes(set.prefix));
156
+ }, [resolvedConfig.iconSets]);
157
+
158
+ // Fetch all collections on mount
159
+ useEffect(() => {
160
+ let cancelled = false;
161
+ const controller = new AbortController();
162
+ abortControllerRef.current = controller;
163
+
164
+ const fetchAllCollections = async () => {
165
+ setState((prev) => ({ ...prev, isLoading: true, error: null }));
166
+
167
+ const newCache = new Map<string, string[]>();
168
+ let total = 0;
169
+ const prefixesToFetch = iconSets.map((set) => set.prefix);
170
+
171
+ // Fetch collections in parallel
172
+ const results = await Promise.allSettled(
173
+ prefixesToFetch.map(async (prefix) => {
174
+ // Check global cache first
175
+ if (collectionCache.has(prefix)) {
176
+ return { prefix, icons: collectionCache.get(prefix)! };
177
+ }
178
+
179
+ try {
180
+ const collection = await fetchCollection(prefix, controller.signal);
181
+ // Store in global cache
182
+ collectionCache.set(prefix, collection.icons);
183
+ return { prefix, icons: collection.icons };
184
+ } catch (error) {
185
+ console.warn(`Failed to fetch collection ${prefix}:`, error);
186
+ return { prefix, icons: [] };
187
+ }
188
+ })
189
+ );
190
+
191
+ if (cancelled) return;
192
+
193
+ // Process results
194
+ for (const result of results) {
195
+ if (result.status === 'fulfilled') {
196
+ const { prefix, icons } = result.value;
197
+ newCache.set(prefix, icons);
198
+ total += icons.length;
199
+ }
200
+ }
201
+
202
+ setCachedIcons(newCache);
203
+ setTotalIcons(total);
204
+ setCollectionsLoaded(true);
205
+ setState((prev) => ({ ...prev, isLoading: false }));
206
+ };
207
+
208
+ fetchAllCollections();
209
+
210
+ return () => {
211
+ cancelled = true;
212
+ controller.abort();
213
+ };
214
+ }, [iconSets]);
215
+
216
+ // Search when query or filter changes
217
+ useEffect(() => {
218
+ if (!collectionsLoaded) return;
219
+
220
+ let cancelled = false;
221
+
222
+ const performSearch = async () => {
223
+ setState((prev) => ({ ...prev, isLoading: true, error: null }));
224
+
225
+ try {
226
+ let results: SearchResult[];
227
+
228
+ // Use API search for queries, local search for browsing
229
+ if (state.query && state.query.length >= 2) {
230
+ // Use Iconify search API for better results
231
+ const prefixes = state.activeIconSet
232
+ ? [state.activeIconSet]
233
+ : iconSets.map((s) => s.prefix);
234
+
235
+ try {
236
+ const apiResults = await searchIconsAPI(
237
+ state.query,
238
+ prefixes,
239
+ resolvedConfig.maxResults
240
+ );
241
+
242
+ results = apiResults.map((fullName) => {
243
+ const [prefix, name] = fullName.split(':');
244
+ return {
245
+ fullName,
246
+ prefix,
247
+ name,
248
+ score: 1,
249
+ };
250
+ });
251
+ } catch {
252
+ // Fallback to local search if API fails
253
+ results = searchIconsLocally(
254
+ state.query,
255
+ cachedIcons,
256
+ state.activeIconSet,
257
+ resolvedConfig.maxResults
258
+ );
259
+ }
260
+ } else {
261
+ // Local search for browsing (no query or short query)
262
+ results = searchIconsLocally(
263
+ state.query,
264
+ cachedIcons,
265
+ state.activeIconSet,
266
+ resolvedConfig.maxResults
267
+ );
268
+ }
269
+
270
+ if (!cancelled) {
271
+ setState((prev) => ({ ...prev, results, isLoading: false }));
272
+ }
273
+ } catch (error) {
274
+ if (!cancelled) {
275
+ setState((prev) => ({
276
+ ...prev,
277
+ isLoading: false,
278
+ error: error instanceof Error ? error.message : 'Search failed',
279
+ }));
280
+ }
281
+ }
282
+ };
283
+
284
+ // Debounce search only if there's a query, otherwise load immediately
285
+ const delay = state.query ? 300 : 0;
286
+ const timeoutId = setTimeout(performSearch, delay);
287
+
288
+ return () => {
289
+ cancelled = true;
290
+ clearTimeout(timeoutId);
291
+ };
292
+ }, [
293
+ state.query,
294
+ state.activeIconSet,
295
+ resolvedConfig.maxResults,
296
+ collectionsLoaded,
297
+ cachedIcons,
298
+ iconSets,
299
+ ]);
300
+
301
+ // Destructure callbacks for stable dependencies
302
+ const { onIconSelect, onCopyCode, preview } = resolvedConfig;
303
+
304
+ // Actions
305
+ const setQuery = useCallback((query: string) => {
306
+ setState((prev) => ({ ...prev, query }));
307
+ }, []);
308
+
309
+ const selectIcon = useCallback(
310
+ (iconName: string | null) => {
311
+ setState((prev) => ({ ...prev, selectedIcon: iconName }));
312
+ if (iconName && onIconSelect) {
313
+ onIconSelect(iconName);
314
+ }
315
+ },
316
+ [onIconSelect]
317
+ );
318
+
319
+ const filterByIconSet = useCallback((prefix: string | null) => {
320
+ setState((prev) => ({ ...prev, activeIconSet: prefix }));
321
+ }, []);
322
+
323
+ const setPreviewSize = useCallback((size: number) => {
324
+ setState((prev) => ({ ...prev, previewSize: size }));
325
+ }, []);
326
+
327
+ const setPreviewColor = useCallback((color: string) => {
328
+ setState((prev) => ({ ...prev, previewColor: color }));
329
+ }, []);
330
+
331
+ const copyIconCode = useCallback(
332
+ (iconName: string, format: 'jsx' | 'import' = 'jsx') => {
333
+ const code =
334
+ format === 'import'
335
+ ? `${generateImportStatement(iconName)}\n\n${generateIconJSX(iconName, state.previewSize, state.previewColor)}`
336
+ : generateIconJSX(iconName, state.previewSize, state.previewColor);
337
+
338
+ // Copy to clipboard
339
+ if (Platform.OS === 'web' && typeof navigator !== 'undefined' && 'clipboard' in navigator) {
340
+ (
341
+ navigator as unknown as { clipboard: { writeText: (text: string) => Promise<void> } }
342
+ ).clipboard
343
+ .writeText(code)
344
+ .then(() => {
345
+ if (onCopyCode) {
346
+ onCopyCode(code);
347
+ }
348
+ });
349
+ } else {
350
+ Clipboard.setString(code);
351
+ if (onCopyCode) {
352
+ onCopyCode(code);
353
+ } else {
354
+ Alert.alert('Copied!', 'Icon code copied to clipboard');
355
+ }
356
+ }
357
+ },
358
+ [state.previewSize, state.previewColor, onCopyCode]
359
+ );
360
+
361
+ const reset = useCallback(() => {
362
+ setState({
363
+ ...initialState,
364
+ previewSize: preview.sizes[1] || 24,
365
+ previewColor: preview.colors[0] || '#000000',
366
+ });
367
+ }, [preview]);
368
+
369
+ // Build context value
370
+ const actions: ExplorerActions = {
371
+ setQuery,
372
+ selectIcon,
373
+ filterByIconSet,
374
+ setPreviewSize,
375
+ setPreviewColor,
376
+ copyIconCode,
377
+ reset,
378
+ };
379
+
380
+ return {
381
+ ...state,
382
+ ...actions,
383
+ config: resolvedConfig,
384
+ iconSets,
385
+ totalIcons,
386
+ collectionsLoaded,
387
+ };
388
+ }
389
+
390
+ export default useExplorer;
package/src/index.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * ```
14
14
  */
15
15
 
16
- // Icon Set Components (212 sets, 268,000+ icons)
16
+ // Icon Set Components (200+ sets, 268,000+ icons)
17
17
  export * from './components';
18
18
 
19
19
  // Core Types
@@ -24,24 +24,235 @@ export type {
24
24
  IconLoadingState,
25
25
  IconifyIconData,
26
26
  IconifyAPIResponse,
27
+ PlaceholderType,
28
+ PlaceholderPreset,
29
+ PlaceholderConfig,
30
+ // Animation types
31
+ AnimationType,
32
+ AnimationPreset,
33
+ AnimationConfig,
34
+ AnimationEasing,
35
+ AnimationControls,
27
36
  } from './types';
28
37
 
38
+ // Placeholder Components
39
+ export {
40
+ Skeleton,
41
+ Pulse,
42
+ Shimmer,
43
+ PlaceholderFactory,
44
+ DEFAULT_PLACEHOLDER_CONFIG,
45
+ } from './placeholder';
46
+ export type { PlaceholderProps, PlaceholderFactoryProps } from './placeholder';
47
+
48
+ // Theme System
49
+ export {
50
+ IconThemeProvider,
51
+ IconThemeContext,
52
+ useIconTheme,
53
+ useIconThemeValue,
54
+ useMergedIconProps,
55
+ DEFAULT_ICON_THEME,
56
+ mergeWithDefaults,
57
+ } from './theme';
58
+ export type { IconTheme, IconThemeProviderProps, IconThemeContextValue } from './theme';
59
+
60
+ // Icon Alias System
61
+ export {
62
+ Icon,
63
+ IconAliasProvider,
64
+ IconAliasContext,
65
+ useIconAliasContext,
66
+ useResolveIcon,
67
+ createIconAliases,
68
+ defineAliases,
69
+ } from './alias';
70
+ export type {
71
+ IconAliasMap,
72
+ IconAliases,
73
+ AliasName,
74
+ GenericIconProps,
75
+ IconAliasContextValue,
76
+ IconAliasProviderProps,
77
+ CreateIconAliasesConfig,
78
+ IconAliasResult,
79
+ } from './alias';
80
+
29
81
  // Factory Function (for creating custom icon sets)
30
82
  export { createIconSet } from './createIconSet';
31
83
  export type { IconNameType } from './createIconSet';
32
84
 
85
+ // Animation System
86
+ export {
87
+ AnimatedIcon,
88
+ useIconAnimation,
89
+ ANIMATION_PRESETS,
90
+ resolveAnimation,
91
+ isAnimationPreset,
92
+ getEasingFunction,
93
+ getDefaultDuration,
94
+ getDefaultLoop,
95
+ DEFAULT_ANIMATION_DURATIONS,
96
+ DEFAULT_ANIMATION_LOOPS,
97
+ } from './animated';
98
+ export type {
99
+ AnimatedIconProps,
100
+ AnimationState,
101
+ ResolvedAnimationConfig,
102
+ AnimationDirection,
103
+ } from './animated';
104
+
105
+ // React Navigation Integration
106
+ export {
107
+ createTabBarIcon,
108
+ createTabBarIcons,
109
+ tabIcon,
110
+ createDrawerIcon,
111
+ createDrawerIcons,
112
+ createHeaderIcon,
113
+ createBackIcon,
114
+ createCloseIcon,
115
+ createMenuIcon,
116
+ useNavigationIcon,
117
+ DEFAULT_NAVIGATION_PRESETS,
118
+ } from './navigation';
119
+ export type {
120
+ TabBarIconProps,
121
+ DrawerIconProps,
122
+ HeaderIconProps,
123
+ TabBarIconConfig,
124
+ DrawerIconConfig,
125
+ TabBarIconFunction,
126
+ DrawerIconFunction,
127
+ HeaderIconFunction,
128
+ HeaderIconConfig,
129
+ IconSpec,
130
+ SimpleTabBarIconConfig,
131
+ NavigationIconPreset,
132
+ UseNavigationIconOptions,
133
+ UseNavigationIconReturn,
134
+ } from './navigation';
135
+
33
136
  // Cache Management - import for internal use and re-export
34
137
  import { CacheManager } from './cache/CacheManager';
35
138
  export { CacheManager };
36
139
 
37
- // Network Utilities
38
- export { fetchIcon, fetchIconsBatch, parseIconName, checkAPIHealth } from './network/IconifyAPI';
39
- export type { BatchFetchResult } from './network/IconifyAPI';
140
+ // Configuration
141
+ export {
142
+ configure,
143
+ resetConfiguration,
144
+ getConfiguration,
145
+ ConfigManager,
146
+ DEFAULT_CONFIG,
147
+ } from './config';
148
+ export type {
149
+ IconifyConfig,
150
+ IconifyAPIConfig,
151
+ CacheConfig,
152
+ PerformanceConfig,
153
+ ResolvedConfig,
154
+ } from './config';
155
+
156
+ // Network Utilities - import fetchIcon for internal use
157
+ import { fetchIcon } from './network/IconifyAPI';
158
+ export {
159
+ fetchIcon,
160
+ fetchIconsBatch,
161
+ parseIconName,
162
+ checkAPIHealth,
163
+ getAPIBaseUrl,
164
+ fetchCollection,
165
+ searchIconsAPI,
166
+ } from './network/IconifyAPI';
167
+ export type { BatchFetchResult, IconifyCollectionInfo } from './network/IconifyAPI';
40
168
 
41
169
  // Native Module Utilities
42
170
  export { getNativeIconify, isNativeModuleAvailable } from './native';
43
171
  export type { PrefetchResult, CacheStats, ModuleConstants, NativeIconifyInterface } from './native';
44
172
 
173
+ // Offline Bundle
174
+ export {
175
+ loadOfflineBundle,
176
+ loadOfflineBundleAsync,
177
+ isBundleCompatible,
178
+ getBundleStats,
179
+ } from './bundle';
180
+ export type { IconBundle, BundleLoadResult } from './bundle';
181
+
182
+ // Performance Monitoring
183
+ export {
184
+ PerformanceMonitor,
185
+ enablePerformanceMonitoring,
186
+ disablePerformanceMonitoring,
187
+ getPerformanceReport,
188
+ printPerformanceReport,
189
+ } from './performance';
190
+ export type {
191
+ IconLoadEvent,
192
+ LoadEventType,
193
+ CacheStatistics,
194
+ PerformanceSummary,
195
+ PerformanceReport,
196
+ PerformanceListener,
197
+ } from './performance';
198
+
199
+ // Accessibility
200
+ export {
201
+ AccessibilityProvider,
202
+ AccessibilityContext,
203
+ useAccessibilityContext,
204
+ useAccessibility,
205
+ useAccessibleIcon,
206
+ withAccessibility,
207
+ defaultLabelGenerator,
208
+ adjustForHighContrast,
209
+ meetsContrastRequirement,
210
+ getHighContrastAlternative,
211
+ calculateTouchTargetPadding,
212
+ DEFAULT_ACCESSIBILITY_CONFIG,
213
+ } from './accessibility';
214
+ export type {
215
+ AccessibilityConfig,
216
+ ResolvedAccessibilityConfig,
217
+ AccessibilityContextValue,
218
+ AccessibleIconProps,
219
+ AccessibilityProviderProps,
220
+ UseAccessibleIconInput,
221
+ UseAccessibleIconOutput,
222
+ } from './accessibility';
223
+
224
+ // Icon Explorer (Dev Mode)
225
+ export {
226
+ IconExplorer,
227
+ ExplorerContext,
228
+ useExplorerContext,
229
+ useExplorer,
230
+ getAllIconSets,
231
+ getIconSetByPrefix,
232
+ getIconSetsByCategory,
233
+ searchIconSets,
234
+ generateImportStatement,
235
+ generateIconJSX,
236
+ POPULAR_ICON_SETS,
237
+ DEFAULT_PREVIEW_CONFIG,
238
+ DEFAULT_EXPLORER_CONFIG,
239
+ } from './explorer';
240
+ export type {
241
+ IconSetInfo,
242
+ SearchResult,
243
+ PreviewConfig,
244
+ ExplorerConfig,
245
+ ResolvedExplorerConfig,
246
+ ExplorerState,
247
+ ExplorerActions,
248
+ ExplorerContextValue,
249
+ IconExplorerProps,
250
+ IconGridProps,
251
+ IconPreviewProps,
252
+ SearchBarProps,
253
+ IconSetFilterProps,
254
+ } from './explorer';
255
+
45
256
  /**
46
257
  * Prefetch multiple icons into cache
47
258
  * Useful for preloading icons before they're needed
@@ -57,10 +268,7 @@ export type { PrefetchResult, CacheStats, ModuleConstants, NativeIconifyInterfac
57
268
  export async function prefetchIcons(
58
269
  iconNames: string[]
59
270
  ): Promise<{ success: string[]; failed: string[] }> {
60
- const { CacheManager: cache } = await import('./cache/CacheManager');
61
- const { fetchIcon: fetch } = await import('./network/IconifyAPI');
62
-
63
- return cache.prefetch(iconNames, fetch);
271
+ return CacheManager.prefetch(iconNames, fetchIcon);
64
272
  }
65
273
 
66
274
  /**
@@ -86,11 +294,12 @@ export async function clearCache(): Promise<void> {
86
294
  * import { getCacheStats } from 'rn-iconify';
87
295
  *
88
296
  * const stats = getCacheStats();
89
- * console.log(`Cached: ${stats.memoryCount} in memory, ${stats.diskCount} on disk`);
297
+ * console.log(`Cached: ${stats.memoryCount} in memory, ${stats.bundledCount} bundled, ${stats.diskCount} on disk`);
90
298
  * ```
91
299
  */
92
300
  export function getCacheStats(): {
93
301
  memoryCount: number;
302
+ bundledCount: number;
94
303
  diskCount: number;
95
304
  diskSizeBytes: number;
96
305
  } {