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.
- package/README.md +47 -235
- package/assets/logo.gif +0 -0
- package/babel.js +14 -0
- package/lib/commonjs/IconRenderer.js +91 -4
- package/lib/commonjs/IconRenderer.js.map +1 -1
- package/lib/commonjs/accessibility/AccessibilityProvider.js +189 -0
- package/lib/commonjs/accessibility/AccessibilityProvider.js.map +1 -0
- package/lib/commonjs/accessibility/index.js +87 -0
- package/lib/commonjs/accessibility/index.js.map +1 -0
- package/lib/commonjs/accessibility/types.js +6 -0
- package/lib/commonjs/accessibility/types.js.map +1 -0
- package/lib/commonjs/accessibility/useAccessibleIcon.js +119 -0
- package/lib/commonjs/accessibility/useAccessibleIcon.js.map +1 -0
- package/lib/commonjs/accessibility/utils.js +231 -0
- package/lib/commonjs/accessibility/utils.js.map +1 -0
- package/lib/commonjs/alias/Icon.js +113 -0
- package/lib/commonjs/alias/Icon.js.map +1 -0
- package/lib/commonjs/alias/IconAliasContext.js +177 -0
- package/lib/commonjs/alias/IconAliasContext.js.map +1 -0
- package/lib/commonjs/alias/createIconAliases.js +222 -0
- package/lib/commonjs/alias/createIconAliases.js.map +1 -0
- package/lib/commonjs/alias/index.js +57 -0
- package/lib/commonjs/alias/index.js.map +1 -0
- package/lib/commonjs/alias/types.js +6 -0
- package/lib/commonjs/alias/types.js.map +1 -0
- package/lib/commonjs/animated/AnimatedIcon.js +116 -0
- package/lib/commonjs/animated/AnimatedIcon.js.map +1 -0
- package/lib/commonjs/animated/index.js +76 -0
- package/lib/commonjs/animated/index.js.map +1 -0
- package/lib/commonjs/animated/presets.js +220 -0
- package/lib/commonjs/animated/presets.js.map +1 -0
- package/lib/commonjs/animated/types.js +71 -0
- package/lib/commonjs/animated/types.js.map +1 -0
- package/lib/commonjs/animated/useIconAnimation.js +313 -0
- package/lib/commonjs/animated/useIconAnimation.js.map +1 -0
- package/lib/commonjs/babel/ast-utils.js +214 -0
- package/lib/commonjs/babel/ast-utils.js.map +1 -0
- package/lib/commonjs/babel/cache-writer.js +281 -0
- package/lib/commonjs/babel/cache-writer.js.map +1 -0
- package/lib/commonjs/babel/collector.js +219 -0
- package/lib/commonjs/babel/collector.js.map +1 -0
- package/lib/commonjs/babel/index.js +104 -0
- package/lib/commonjs/babel/index.js.map +1 -0
- package/lib/commonjs/babel/plugin.js +226 -0
- package/lib/commonjs/babel/plugin.js.map +1 -0
- package/lib/commonjs/babel/types.js +485 -0
- package/lib/commonjs/babel/types.js.map +1 -0
- package/lib/commonjs/bundle/index.js +213 -0
- package/lib/commonjs/bundle/index.js.map +1 -0
- package/lib/commonjs/cache/CacheManager.js +105 -6
- package/lib/commonjs/cache/CacheManager.js.map +1 -1
- package/lib/commonjs/cli/commands/analyze.js +171 -0
- package/lib/commonjs/cli/commands/analyze.js.map +1 -0
- package/lib/commonjs/cli/commands/bundle.js +214 -0
- package/lib/commonjs/cli/commands/bundle.js.map +1 -0
- package/lib/commonjs/cli/index.js +142 -0
- package/lib/commonjs/cli/index.js.map +1 -0
- package/lib/commonjs/cli/parser.js +260 -0
- package/lib/commonjs/cli/parser.js.map +1 -0
- package/lib/commonjs/cli/types.js +42 -0
- package/lib/commonjs/cli/types.js.map +1 -0
- package/lib/commonjs/config/ConfigManager.js +182 -0
- package/lib/commonjs/config/ConfigManager.js.map +1 -0
- package/lib/commonjs/config/index.js +44 -0
- package/lib/commonjs/config/index.js.map +1 -0
- package/lib/commonjs/config/types.js +55 -0
- package/lib/commonjs/config/types.js.map +1 -0
- package/lib/commonjs/createIconSet.js +49 -11
- package/lib/commonjs/createIconSet.js.map +1 -1
- package/lib/commonjs/explorer/IconExplorer.js +827 -0
- package/lib/commonjs/explorer/IconExplorer.js.map +1 -0
- package/lib/commonjs/explorer/iconSets.js +303 -0
- package/lib/commonjs/explorer/iconSets.js.map +1 -0
- package/lib/commonjs/explorer/index.js +93 -0
- package/lib/commonjs/explorer/index.js.map +1 -0
- package/lib/commonjs/explorer/types.js +6 -0
- package/lib/commonjs/explorer/types.js.map +1 -0
- package/lib/commonjs/explorer/useExplorer.js +359 -0
- package/lib/commonjs/explorer/useExplorer.js.map +1 -0
- package/lib/commonjs/index.js +618 -12
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/navigation/createDrawerIcon.js +129 -0
- package/lib/commonjs/navigation/createDrawerIcon.js.map +1 -0
- package/lib/commonjs/navigation/createHeaderIcon.js +185 -0
- package/lib/commonjs/navigation/createHeaderIcon.js.map +1 -0
- package/lib/commonjs/navigation/createTabBarIcon.js +178 -0
- package/lib/commonjs/navigation/createTabBarIcon.js.map +1 -0
- package/lib/commonjs/navigation/index.js +83 -0
- package/lib/commonjs/navigation/index.js.map +1 -0
- package/lib/commonjs/navigation/types.js +94 -0
- package/lib/commonjs/navigation/types.js.map +1 -0
- package/lib/commonjs/navigation/useNavigationIcon.js +128 -0
- package/lib/commonjs/navigation/useNavigationIcon.js.map +1 -0
- package/lib/commonjs/network/IconifyAPI.js +154 -14
- package/lib/commonjs/network/IconifyAPI.js.map +1 -1
- package/lib/commonjs/network/index.js +18 -0
- package/lib/commonjs/network/index.js.map +1 -1
- package/lib/commonjs/performance/PerformanceMonitor.js +327 -0
- package/lib/commonjs/performance/PerformanceMonitor.js.map +1 -0
- package/lib/commonjs/performance/index.js +43 -0
- package/lib/commonjs/performance/index.js.map +1 -0
- package/lib/commonjs/performance/types.js +2 -0
- package/lib/commonjs/performance/types.js.map +1 -0
- package/lib/commonjs/placeholder/PlaceholderFactory.js +111 -0
- package/lib/commonjs/placeholder/PlaceholderFactory.js.map +1 -0
- package/lib/commonjs/placeholder/Pulse.js +77 -0
- package/lib/commonjs/placeholder/Pulse.js.map +1 -0
- package/lib/commonjs/placeholder/Shimmer.js +95 -0
- package/lib/commonjs/placeholder/Shimmer.js.map +1 -0
- package/lib/commonjs/placeholder/Skeleton.js +52 -0
- package/lib/commonjs/placeholder/Skeleton.js.map +1 -0
- package/lib/commonjs/placeholder/index.js +41 -0
- package/lib/commonjs/placeholder/index.js.map +1 -0
- package/lib/commonjs/placeholder/types.js +40 -0
- package/lib/commonjs/placeholder/types.js.map +1 -0
- package/lib/commonjs/theme/IconThemeProvider.js +96 -0
- package/lib/commonjs/theme/IconThemeProvider.js.map +1 -0
- package/lib/commonjs/theme/context.js +53 -0
- package/lib/commonjs/theme/context.js.map +1 -0
- package/lib/commonjs/theme/index.js +52 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/types.js +39 -0
- package/lib/commonjs/theme/types.js.map +1 -0
- package/lib/commonjs/theme/useIconTheme.js +121 -0
- package/lib/commonjs/theme/useIconTheme.js.map +1 -0
- package/lib/module/IconRenderer.js +92 -5
- package/lib/module/IconRenderer.js.map +1 -1
- package/lib/module/accessibility/AccessibilityProvider.js +179 -0
- package/lib/module/accessibility/AccessibilityProvider.js.map +1 -0
- package/lib/module/accessibility/index.js +42 -0
- package/lib/module/accessibility/index.js.map +1 -0
- package/lib/module/accessibility/types.js +2 -0
- package/lib/module/accessibility/types.js.map +1 -0
- package/lib/module/accessibility/useAccessibleIcon.js +112 -0
- package/lib/module/accessibility/useAccessibleIcon.js.map +1 -0
- package/lib/module/accessibility/utils.js +221 -0
- package/lib/module/accessibility/utils.js.map +1 -0
- package/lib/module/alias/Icon.js +105 -0
- package/lib/module/alias/Icon.js.map +1 -0
- package/lib/module/alias/IconAliasContext.js +166 -0
- package/lib/module/alias/IconAliasContext.js.map +1 -0
- package/lib/module/alias/createIconAliases.js +213 -0
- package/lib/module/alias/createIconAliases.js.map +1 -0
- package/lib/module/alias/index.js +45 -0
- package/lib/module/alias/index.js.map +1 -0
- package/lib/module/alias/types.js +2 -0
- package/lib/module/alias/types.js.map +1 -0
- package/lib/module/animated/AnimatedIcon.js +109 -0
- package/lib/module/animated/AnimatedIcon.js.map +1 -0
- package/lib/module/animated/index.js +80 -0
- package/lib/module/animated/index.js.map +1 -0
- package/lib/module/animated/presets.js +209 -0
- package/lib/module/animated/presets.js.map +1 -0
- package/lib/module/animated/types.js +65 -0
- package/lib/module/animated/types.js.map +1 -0
- package/lib/module/animated/useIconAnimation.js +306 -0
- package/lib/module/animated/useIconAnimation.js.map +1 -0
- package/lib/module/babel/ast-utils.js +201 -0
- package/lib/module/babel/ast-utils.js.map +1 -0
- package/lib/module/babel/cache-writer.js +269 -0
- package/lib/module/babel/cache-writer.js.map +1 -0
- package/lib/module/babel/collector.js +214 -0
- package/lib/module/babel/collector.js.map +1 -0
- package/lib/module/babel/index.js +51 -0
- package/lib/module/babel/index.js.map +1 -0
- package/lib/module/babel/plugin.js +220 -0
- package/lib/module/babel/plugin.js.map +1 -0
- package/lib/module/babel/types.js +476 -0
- package/lib/module/babel/types.js.map +1 -0
- package/lib/module/bundle/index.js +205 -0
- package/lib/module/bundle/index.js.map +1 -0
- package/lib/module/cache/CacheManager.js +106 -6
- package/lib/module/cache/CacheManager.js.map +1 -1
- package/lib/module/cli/commands/analyze.js +166 -0
- package/lib/module/cli/commands/analyze.js.map +1 -0
- package/lib/module/cli/commands/bundle.js +208 -0
- package/lib/module/cli/commands/bundle.js.map +1 -0
- package/lib/module/cli/index.js +140 -0
- package/lib/module/cli/index.js.map +1 -0
- package/lib/module/cli/parser.js +251 -0
- package/lib/module/cli/parser.js.map +1 -0
- package/lib/module/cli/types.js +36 -0
- package/lib/module/cli/types.js.map +1 -0
- package/lib/module/components/index.js +27 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/config/ConfigManager.js +173 -0
- package/lib/module/config/ConfigManager.js.map +1 -0
- package/lib/module/config/index.js +28 -0
- package/lib/module/config/index.js.map +1 -0
- package/lib/module/config/types.js +49 -0
- package/lib/module/config/types.js.map +1 -0
- package/lib/module/createIconSet.js +49 -11
- package/lib/module/createIconSet.js.map +1 -1
- package/lib/module/explorer/IconExplorer.js +817 -0
- package/lib/module/explorer/IconExplorer.js.map +1 -0
- package/lib/module/explorer/iconSets.js +291 -0
- package/lib/module/explorer/iconSets.js.map +1 -0
- package/lib/module/explorer/index.js +42 -0
- package/lib/module/explorer/index.js.map +1 -0
- package/lib/module/explorer/types.js +2 -0
- package/lib/module/explorer/types.js.map +1 -0
- package/lib/module/explorer/useExplorer.js +353 -0
- package/lib/module/explorer/useExplorer.js.map +1 -0
- package/lib/module/index.js +26 -11
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/createDrawerIcon.js +121 -0
- package/lib/module/navigation/createDrawerIcon.js.map +1 -0
- package/lib/module/navigation/createHeaderIcon.js +175 -0
- package/lib/module/navigation/createHeaderIcon.js.map +1 -0
- package/lib/module/navigation/createTabBarIcon.js +168 -0
- package/lib/module/navigation/createTabBarIcon.js.map +1 -0
- package/lib/module/navigation/index.js +59 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/navigation/types.js +88 -0
- package/lib/module/navigation/types.js.map +1 -0
- package/lib/module/navigation/useNavigationIcon.js +121 -0
- package/lib/module/navigation/useNavigationIcon.js.map +1 -0
- package/lib/module/network/IconifyAPI.js +152 -14
- package/lib/module/network/IconifyAPI.js.map +1 -1
- package/lib/module/network/index.js +1 -1
- package/lib/module/network/index.js.map +1 -1
- package/lib/module/performance/PerformanceMonitor.js +317 -0
- package/lib/module/performance/PerformanceMonitor.js.map +1 -0
- package/lib/module/performance/index.js +26 -0
- package/lib/module/performance/index.js.map +1 -0
- package/lib/module/performance/types.js +2 -0
- package/lib/module/performance/types.js.map +1 -0
- package/lib/module/placeholder/PlaceholderFactory.js +105 -0
- package/lib/module/placeholder/PlaceholderFactory.js.map +1 -0
- package/lib/module/placeholder/Pulse.js +70 -0
- package/lib/module/placeholder/Pulse.js.map +1 -0
- package/lib/module/placeholder/Shimmer.js +88 -0
- package/lib/module/placeholder/Shimmer.js.map +1 -0
- package/lib/module/placeholder/Skeleton.js +45 -0
- package/lib/module/placeholder/Skeleton.js.map +1 -0
- package/lib/module/placeholder/index.js +15 -0
- package/lib/module/placeholder/index.js.map +1 -0
- package/lib/module/placeholder/types.js +34 -0
- package/lib/module/placeholder/types.js.map +1 -0
- package/lib/module/theme/IconThemeProvider.js +89 -0
- package/lib/module/theme/IconThemeProvider.js.map +1 -0
- package/lib/module/theme/context.js +47 -0
- package/lib/module/theme/context.js.map +1 -0
- package/lib/module/theme/index.js +19 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/types.js +33 -0
- package/lib/module/theme/types.js.map +1 -0
- package/lib/module/theme/useIconTheme.js +114 -0
- package/lib/module/theme/useIconTheme.js.map +1 -0
- package/lib/typescript/IconRenderer.d.ts +1 -1
- package/lib/typescript/IconRenderer.d.ts.map +1 -1
- package/lib/typescript/accessibility/AccessibilityProvider.d.ts +57 -0
- package/lib/typescript/accessibility/AccessibilityProvider.d.ts.map +1 -0
- package/lib/typescript/accessibility/index.d.ts +37 -0
- package/lib/typescript/accessibility/index.d.ts.map +1 -0
- package/lib/typescript/accessibility/types.d.ts +130 -0
- package/lib/typescript/accessibility/types.d.ts.map +1 -0
- package/lib/typescript/accessibility/useAccessibleIcon.d.ts +111 -0
- package/lib/typescript/accessibility/useAccessibleIcon.d.ts.map +1 -0
- package/lib/typescript/accessibility/utils.d.ts +29 -0
- package/lib/typescript/accessibility/utils.d.ts.map +1 -0
- package/lib/typescript/alias/Icon.d.ts +38 -0
- package/lib/typescript/alias/Icon.d.ts.map +1 -0
- package/lib/typescript/alias/IconAliasContext.d.ts +52 -0
- package/lib/typescript/alias/IconAliasContext.d.ts.map +1 -0
- package/lib/typescript/alias/createIconAliases.d.ts +77 -0
- package/lib/typescript/alias/createIconAliases.d.ts.map +1 -0
- package/lib/typescript/alias/index.d.ts +36 -0
- package/lib/typescript/alias/index.d.ts.map +1 -0
- package/lib/typescript/alias/types.d.ts +115 -0
- package/lib/typescript/alias/types.d.ts.map +1 -0
- package/lib/typescript/animated/AnimatedIcon.d.ts +45 -0
- package/lib/typescript/animated/AnimatedIcon.d.ts.map +1 -0
- package/lib/typescript/animated/index.d.ts +70 -0
- package/lib/typescript/animated/index.d.ts.map +1 -0
- package/lib/typescript/animated/presets.d.ts +35 -0
- package/lib/typescript/animated/presets.d.ts.map +1 -0
- package/lib/typescript/animated/types.d.ts +196 -0
- package/lib/typescript/animated/types.d.ts.map +1 -0
- package/lib/typescript/animated/useIconAnimation.d.ts +64 -0
- package/lib/typescript/animated/useIconAnimation.d.ts.map +1 -0
- package/lib/typescript/babel/ast-utils.d.ts +52 -0
- package/lib/typescript/babel/ast-utils.d.ts.map +1 -0
- package/lib/typescript/babel/cache-writer.d.ts +56 -0
- package/lib/typescript/babel/cache-writer.d.ts.map +1 -0
- package/lib/typescript/babel/collector.d.ts +107 -0
- package/lib/typescript/babel/collector.d.ts.map +1 -0
- package/lib/typescript/babel/index.d.ts +47 -0
- package/lib/typescript/babel/index.d.ts.map +1 -0
- package/lib/typescript/babel/plugin.d.ts +17 -0
- package/lib/typescript/babel/plugin.d.ts.map +1 -0
- package/lib/typescript/babel/types.d.ts +129 -0
- package/lib/typescript/babel/types.d.ts.map +1 -0
- package/lib/typescript/bundle/index.d.ts +161 -0
- package/lib/typescript/bundle/index.d.ts.map +1 -0
- package/lib/typescript/cache/CacheManager.d.ts +52 -4
- package/lib/typescript/cache/CacheManager.d.ts.map +1 -1
- package/lib/typescript/cli/commands/analyze.d.ts +10 -0
- package/lib/typescript/cli/commands/analyze.d.ts.map +1 -0
- package/lib/typescript/cli/commands/bundle.d.ts +10 -0
- package/lib/typescript/cli/commands/bundle.d.ts.map +1 -0
- package/lib/typescript/cli/index.d.ts +7 -0
- package/lib/typescript/cli/index.d.ts.map +1 -0
- package/lib/typescript/cli/parser.d.ts +18 -0
- package/lib/typescript/cli/parser.d.ts.map +1 -0
- package/lib/typescript/cli/types.d.ts +157 -0
- package/lib/typescript/cli/types.d.ts.map +1 -0
- package/lib/typescript/components/Academicons.d.ts +1 -1
- package/lib/typescript/components/AkarIcons.d.ts +1 -1
- package/lib/typescript/components/AntDesign.d.ts +1 -1
- package/lib/typescript/components/Arcticons.d.ts +1 -1
- package/lib/typescript/components/Basil.d.ts +1 -1
- package/lib/typescript/components/Bi.d.ts +1 -1
- package/lib/typescript/components/BitcoinIcons.d.ts +1 -1
- package/lib/typescript/components/Bpmn.d.ts +1 -1
- package/lib/typescript/components/Brandico.d.ts +1 -1
- package/lib/typescript/components/Bx.d.ts +1 -1
- package/lib/typescript/components/Bxl.d.ts +1 -1
- package/lib/typescript/components/Bxs.d.ts +1 -1
- package/lib/typescript/components/Bytesize.d.ts +1 -1
- package/lib/typescript/components/Carbon.d.ts +1 -1
- package/lib/typescript/components/Catppuccin.d.ts +1 -1
- package/lib/typescript/components/Cbi.d.ts +1 -1
- package/lib/typescript/components/Charm.d.ts +1 -1
- package/lib/typescript/components/Ci.d.ts +1 -1
- package/lib/typescript/components/Cib.d.ts +1 -1
- package/lib/typescript/components/Cif.d.ts +1 -1
- package/lib/typescript/components/Cil.d.ts +1 -1
- package/lib/typescript/components/CircleFlags.d.ts +1 -1
- package/lib/typescript/components/Circum.d.ts +1 -1
- package/lib/typescript/components/Clarity.d.ts +1 -1
- package/lib/typescript/components/Codex.d.ts +1 -1
- package/lib/typescript/components/Codicon.d.ts +1 -1
- package/lib/typescript/components/Covid.d.ts +1 -1
- package/lib/typescript/components/Cryptocurrency.d.ts +1 -1
- package/lib/typescript/components/CryptocurrencyColor.d.ts +1 -1
- package/lib/typescript/components/Cuida.d.ts +1 -1
- package/lib/typescript/components/Dashicons.d.ts +1 -1
- package/lib/typescript/components/Devicon.d.ts +1 -1
- package/lib/typescript/components/DeviconPlain.d.ts +1 -1
- package/lib/typescript/components/DinkieIcons.d.ts +1 -1
- package/lib/typescript/components/DuoIcons.d.ts +1 -1
- package/lib/typescript/components/Ei.d.ts +1 -1
- package/lib/typescript/components/El.d.ts +1 -1
- package/lib/typescript/components/EmojioneMonotone.d.ts +1 -1
- package/lib/typescript/components/Entypo.d.ts +1 -1
- package/lib/typescript/components/EntypoSocial.d.ts +1 -1
- package/lib/typescript/components/EosIcons.d.ts +1 -1
- package/lib/typescript/components/Ep.d.ts +1 -1
- package/lib/typescript/components/Et.d.ts +1 -1
- package/lib/typescript/components/Eva.d.ts +1 -1
- package/lib/typescript/components/F7.d.ts +1 -1
- package/lib/typescript/components/Fa.d.ts +1 -1
- package/lib/typescript/components/Fa6Brands.d.ts +1 -1
- package/lib/typescript/components/Fa6Regular.d.ts +1 -1
- package/lib/typescript/components/Fa6Solid.d.ts +1 -1
- package/lib/typescript/components/Fa7Brands.d.ts +1 -1
- package/lib/typescript/components/Fa7Regular.d.ts +1 -1
- package/lib/typescript/components/Fa7Solid.d.ts +1 -1
- package/lib/typescript/components/FaBrands.d.ts +1 -1
- package/lib/typescript/components/FaRegular.d.ts +1 -1
- package/lib/typescript/components/FaSolid.d.ts +1 -1
- package/lib/typescript/components/Fad.d.ts +1 -1
- package/lib/typescript/components/Famicons.d.ts +1 -1
- package/lib/typescript/components/Fe.d.ts +1 -1
- package/lib/typescript/components/Feather.d.ts +1 -1
- package/lib/typescript/components/FileIcons.d.ts +1 -1
- package/lib/typescript/components/Flag.d.ts +1 -1
- package/lib/typescript/components/Flagpack.d.ts +1 -1
- package/lib/typescript/components/FlatUi.d.ts +1 -1
- package/lib/typescript/components/Flowbite.d.ts +1 -1
- package/lib/typescript/components/Fluent.d.ts +1 -1
- package/lib/typescript/components/FluentColor.d.ts +1 -1
- package/lib/typescript/components/FluentEmoji.d.ts +1 -1
- package/lib/typescript/components/FluentEmojiFlat.d.ts +1 -1
- package/lib/typescript/components/FluentEmojiHighContrast.d.ts +1 -1
- package/lib/typescript/components/FluentMdl2.d.ts +1 -1
- package/lib/typescript/components/Fontelico.d.ts +1 -1
- package/lib/typescript/components/Fontisto.d.ts +1 -1
- package/lib/typescript/components/Formkit.d.ts +1 -1
- package/lib/typescript/components/Foundation.d.ts +1 -1
- package/lib/typescript/components/Gala.d.ts +1 -1
- package/lib/typescript/components/GameIcons.d.ts +1 -1
- package/lib/typescript/components/Garden.d.ts +1 -1
- package/lib/typescript/components/Geo.d.ts +1 -1
- package/lib/typescript/components/Gg.d.ts +1 -1
- package/lib/typescript/components/Gis.d.ts +1 -1
- package/lib/typescript/components/GravityUi.d.ts +1 -1
- package/lib/typescript/components/Gridicons.d.ts +1 -1
- package/lib/typescript/components/GrommetIcons.d.ts +1 -1
- package/lib/typescript/components/Guidance.d.ts +1 -1
- package/lib/typescript/components/Healthicons.d.ts +1 -1
- package/lib/typescript/components/Heroicons.d.ts +1 -1
- package/lib/typescript/components/HeroiconsOutline.d.ts +1 -1
- package/lib/typescript/components/HeroiconsSolid.d.ts +1 -1
- package/lib/typescript/components/Hugeicons.d.ts +1 -1
- package/lib/typescript/components/Humbleicons.d.ts +1 -1
- package/lib/typescript/components/Ic.d.ts +1 -1
- package/lib/typescript/components/IcomoonFree.d.ts +1 -1
- package/lib/typescript/components/IconPark.d.ts +1 -1
- package/lib/typescript/components/IconParkOutline.d.ts +1 -1
- package/lib/typescript/components/IconParkSolid.d.ts +1 -1
- package/lib/typescript/components/IconParkTwotone.d.ts +1 -1
- package/lib/typescript/components/Iconamoon.d.ts +1 -1
- package/lib/typescript/components/Iconoir.d.ts +1 -1
- package/lib/typescript/components/Icons8.d.ts +1 -1
- package/lib/typescript/components/Il.d.ts +1 -1
- package/lib/typescript/components/Ion.d.ts +1 -1
- package/lib/typescript/components/Iwwa.d.ts +1 -1
- package/lib/typescript/components/Ix.d.ts +1 -1
- package/lib/typescript/components/Jam.d.ts +1 -1
- package/lib/typescript/components/La.d.ts +1 -1
- package/lib/typescript/components/LetsIcons.d.ts +1 -1
- package/lib/typescript/components/LineMd.d.ts +1 -1
- package/lib/typescript/components/Lineicons.d.ts +1 -1
- package/lib/typescript/components/Logos.d.ts +1 -1
- package/lib/typescript/components/Ls.d.ts +1 -1
- package/lib/typescript/components/Lsicon.d.ts +1 -1
- package/lib/typescript/components/Lucide.d.ts +1 -1
- package/lib/typescript/components/LucideLab.d.ts +1 -1
- package/lib/typescript/components/Mage.d.ts +1 -1
- package/lib/typescript/components/Majesticons.d.ts +1 -1
- package/lib/typescript/components/Maki.d.ts +1 -1
- package/lib/typescript/components/Map.d.ts +1 -1
- package/lib/typescript/components/Marketeq.d.ts +1 -1
- package/lib/typescript/components/MaterialIconTheme.d.ts +1 -1
- package/lib/typescript/components/MaterialSymbols.d.ts +1 -1
- package/lib/typescript/components/MaterialSymbolsLight.d.ts +1 -1
- package/lib/typescript/components/Mdi.d.ts +1 -1
- package/lib/typescript/components/MdiLight.d.ts +1 -1
- package/lib/typescript/components/MedicalIcon.d.ts +1 -1
- package/lib/typescript/components/Memory.d.ts +1 -1
- package/lib/typescript/components/Meteocons.d.ts +1 -1
- package/lib/typescript/components/MeteorIcons.d.ts +1 -1
- package/lib/typescript/components/Mi.d.ts +1 -1
- package/lib/typescript/components/Mingcute.d.ts +1 -1
- package/lib/typescript/components/MonoIcons.d.ts +1 -1
- package/lib/typescript/components/Mynaui.d.ts +1 -1
- package/lib/typescript/components/Nimbus.d.ts +1 -1
- package/lib/typescript/components/Nonicons.d.ts +1 -1
- package/lib/typescript/components/Nrk.d.ts +1 -1
- package/lib/typescript/components/Octicon.d.ts +1 -1
- package/lib/typescript/components/Oi.d.ts +1 -1
- package/lib/typescript/components/Ooui.d.ts +1 -1
- package/lib/typescript/components/Oui.d.ts +1 -1
- package/lib/typescript/components/Pajamas.d.ts +1 -1
- package/lib/typescript/components/Pepicons.d.ts +1 -1
- package/lib/typescript/components/PepiconsPencil.d.ts +1 -1
- package/lib/typescript/components/PepiconsPop.d.ts +1 -1
- package/lib/typescript/components/PepiconsPrint.d.ts +1 -1
- package/lib/typescript/components/Ph.d.ts +1 -1
- package/lib/typescript/components/Picon.d.ts +1 -1
- package/lib/typescript/components/Pixel.d.ts +1 -1
- package/lib/typescript/components/Pixelarticons.d.ts +1 -1
- package/lib/typescript/components/Prime.d.ts +1 -1
- package/lib/typescript/components/Proicons.d.ts +1 -1
- package/lib/typescript/components/Ps.d.ts +1 -1
- package/lib/typescript/components/QlementineIcons.d.ts +1 -1
- package/lib/typescript/components/Quill.d.ts +1 -1
- package/lib/typescript/components/RadixIcons.d.ts +1 -1
- package/lib/typescript/components/Raphael.d.ts +1 -1
- package/lib/typescript/components/Ri.d.ts +1 -1
- package/lib/typescript/components/RivetIcons.d.ts +1 -1
- package/lib/typescript/components/Roentgen.d.ts +1 -1
- package/lib/typescript/components/Si.d.ts +1 -1
- package/lib/typescript/components/SiGlyph.d.ts +1 -1
- package/lib/typescript/components/Sidekickicons.d.ts +1 -1
- package/lib/typescript/components/SimpleIcons.d.ts +1 -1
- package/lib/typescript/components/SimpleLineIcons.d.ts +1 -1
- package/lib/typescript/components/SkillIcons.d.ts +1 -1
- package/lib/typescript/components/Solar.d.ts +1 -1
- package/lib/typescript/components/Stash.d.ts +1 -1
- package/lib/typescript/components/Streamline.d.ts +1 -1
- package/lib/typescript/components/StreamlineBlock.d.ts +1 -1
- package/lib/typescript/components/StreamlineColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineCyber.d.ts +1 -1
- package/lib/typescript/components/StreamlineCyberColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineEmojis.d.ts +1 -1
- package/lib/typescript/components/StreamlineFlex.d.ts +1 -1
- package/lib/typescript/components/StreamlineFlexColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineFreehand.d.ts +1 -1
- package/lib/typescript/components/StreamlineFreehandColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineKameleonColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineLogos.d.ts +1 -1
- package/lib/typescript/components/StreamlinePixel.d.ts +1 -1
- package/lib/typescript/components/StreamlinePlump.d.ts +1 -1
- package/lib/typescript/components/StreamlinePlumpColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineSharp.d.ts +1 -1
- package/lib/typescript/components/StreamlineSharpColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineStickiesColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineUltimate.d.ts +1 -1
- package/lib/typescript/components/StreamlineUltimateColor.d.ts +1 -1
- package/lib/typescript/components/Subway.d.ts +1 -1
- package/lib/typescript/components/SvgSpinners.d.ts +1 -1
- package/lib/typescript/components/SystemUicons.d.ts +1 -1
- package/lib/typescript/components/Tabler.d.ts +1 -1
- package/lib/typescript/components/Tdesign.d.ts +1 -1
- package/lib/typescript/components/Teenyicons.d.ts +1 -1
- package/lib/typescript/components/Temaki.d.ts +1 -1
- package/lib/typescript/components/Token.d.ts +1 -1
- package/lib/typescript/components/TokenBranded.d.ts +1 -1
- package/lib/typescript/components/Topcoat.d.ts +1 -1
- package/lib/typescript/components/Typcn.d.ts +1 -1
- package/lib/typescript/components/Uil.d.ts +1 -1
- package/lib/typescript/components/Uim.d.ts +1 -1
- package/lib/typescript/components/Uis.d.ts +1 -1
- package/lib/typescript/components/Uit.d.ts +1 -1
- package/lib/typescript/components/Uiw.d.ts +1 -1
- package/lib/typescript/components/Unjs.d.ts +1 -1
- package/lib/typescript/components/Vaadin.d.ts +1 -1
- package/lib/typescript/components/Vs.d.ts +1 -1
- package/lib/typescript/components/VscodeIcons.d.ts +1 -1
- package/lib/typescript/components/Websymbol.d.ts +1 -1
- package/lib/typescript/components/Weui.d.ts +1 -1
- package/lib/typescript/components/Whh.d.ts +1 -1
- package/lib/typescript/components/Wi.d.ts +1 -1
- package/lib/typescript/components/Wpf.d.ts +1 -1
- package/lib/typescript/components/Zmdi.d.ts +1 -1
- package/lib/typescript/components/Zondicons.d.ts +1 -1
- package/lib/typescript/components/index.d.ts +38 -1
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/config/ConfigManager.d.ts +102 -0
- package/lib/typescript/config/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/config/index.d.ts +22 -0
- package/lib/typescript/config/index.d.ts.map +1 -0
- package/lib/typescript/config/types.d.ts +112 -0
- package/lib/typescript/config/types.d.ts.map +1 -0
- package/lib/typescript/createIconSet.d.ts +1 -1
- package/lib/typescript/createIconSet.d.ts.map +1 -1
- package/lib/typescript/explorer/IconExplorer.d.ts +54 -0
- package/lib/typescript/explorer/IconExplorer.d.ts.map +1 -0
- package/lib/typescript/explorer/iconSets.d.ts +35 -0
- package/lib/typescript/explorer/iconSets.d.ts.map +1 -0
- package/lib/typescript/explorer/index.d.ts +33 -0
- package/lib/typescript/explorer/index.d.ts.map +1 -0
- package/lib/typescript/explorer/types.d.ts +329 -0
- package/lib/typescript/explorer/types.d.ts.map +1 -0
- package/lib/typescript/explorer/useExplorer.d.ts +18 -0
- package/lib/typescript/explorer/useExplorer.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +25 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/navigation/createDrawerIcon.d.ts +74 -0
- package/lib/typescript/navigation/createDrawerIcon.d.ts.map +1 -0
- package/lib/typescript/navigation/createHeaderIcon.d.ts +145 -0
- package/lib/typescript/navigation/createHeaderIcon.d.ts.map +1 -0
- package/lib/typescript/navigation/createTabBarIcon.d.ts +99 -0
- package/lib/typescript/navigation/createTabBarIcon.d.ts.map +1 -0
- package/lib/typescript/navigation/index.d.ts +51 -0
- package/lib/typescript/navigation/index.d.ts.map +1 -0
- package/lib/typescript/navigation/types.d.ts +149 -0
- package/lib/typescript/navigation/types.d.ts.map +1 -0
- package/lib/typescript/navigation/useNavigationIcon.d.ts +91 -0
- package/lib/typescript/navigation/useNavigationIcon.d.ts.map +1 -0
- package/lib/typescript/network/IconifyAPI.d.ts +32 -0
- package/lib/typescript/network/IconifyAPI.d.ts.map +1 -1
- package/lib/typescript/network/index.d.ts +2 -1
- package/lib/typescript/network/index.d.ts.map +1 -1
- package/lib/typescript/performance/PerformanceMonitor.d.ts +76 -0
- package/lib/typescript/performance/PerformanceMonitor.d.ts.map +1 -0
- package/lib/typescript/performance/index.d.ts +21 -0
- package/lib/typescript/performance/index.d.ts.map +1 -0
- package/lib/typescript/performance/types.d.ts +156 -0
- package/lib/typescript/performance/types.d.ts.map +1 -0
- package/lib/typescript/placeholder/PlaceholderFactory.d.ts +44 -0
- package/lib/typescript/placeholder/PlaceholderFactory.d.ts.map +1 -0
- package/lib/typescript/placeholder/Pulse.d.ts +18 -0
- package/lib/typescript/placeholder/Pulse.d.ts.map +1 -0
- package/lib/typescript/placeholder/Shimmer.d.ts +19 -0
- package/lib/typescript/placeholder/Shimmer.d.ts.map +1 -0
- package/lib/typescript/placeholder/Skeleton.d.ts +18 -0
- package/lib/typescript/placeholder/Skeleton.d.ts.map +1 -0
- package/lib/typescript/placeholder/index.d.ts +12 -0
- package/lib/typescript/placeholder/index.d.ts.map +1 -0
- package/lib/typescript/placeholder/types.d.ts +63 -0
- package/lib/typescript/placeholder/types.d.ts.map +1 -0
- package/lib/typescript/theme/IconThemeProvider.d.ts +64 -0
- package/lib/typescript/theme/IconThemeProvider.d.ts.map +1 -0
- package/lib/typescript/theme/context.d.ts +24 -0
- package/lib/typescript/theme/context.d.ts.map +1 -0
- package/lib/typescript/theme/index.d.ts +10 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/theme/types.d.ts +85 -0
- package/lib/typescript/theme/types.d.ts.map +1 -0
- package/lib/typescript/theme/useIconTheme.d.ts +78 -0
- package/lib/typescript/theme/useIconTheme.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +58 -1
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/package.json +43 -3
- package/src/IconRenderer.tsx +91 -4
- package/src/accessibility/AccessibilityProvider.tsx +220 -0
- package/src/accessibility/index.ts +63 -0
- package/src/accessibility/types.ts +152 -0
- package/src/accessibility/useAccessibleIcon.ts +220 -0
- package/src/accessibility/utils.ts +180 -0
- package/src/alias/Icon.tsx +113 -0
- package/src/alias/IconAliasContext.tsx +180 -0
- package/src/alias/createIconAliases.tsx +233 -0
- package/src/alias/index.ts +59 -0
- package/src/alias/types.ts +132 -0
- package/src/animated/AnimatedIcon.tsx +116 -0
- package/src/animated/index.ts +97 -0
- package/src/animated/presets.ts +211 -0
- package/src/animated/types.ts +239 -0
- package/src/animated/useIconAnimation.ts +383 -0
- package/src/babel/ast-utils.ts +219 -0
- package/src/babel/cache-writer.ts +323 -0
- package/src/babel/collector.ts +224 -0
- package/src/babel/index.ts +60 -0
- package/src/babel/plugin.ts +254 -0
- package/src/babel/types.ts +717 -0
- package/src/bundle/index.ts +313 -0
- package/src/cache/CacheManager.ts +123 -6
- package/src/cli/commands/analyze.ts +195 -0
- package/src/cli/commands/bundle.ts +231 -0
- package/src/cli/index.ts +153 -0
- package/src/cli/parser.ts +275 -0
- package/src/cli/types.ts +187 -0
- package/src/components/index.ts +52 -1
- package/src/config/ConfigManager.ts +196 -0
- package/src/config/index.ts +34 -0
- package/src/config/types.ts +149 -0
- package/src/createIconSet.tsx +48 -9
- package/src/explorer/IconExplorer.tsx +844 -0
- package/src/explorer/iconSets.ts +334 -0
- package/src/explorer/index.ts +64 -0
- package/src/explorer/types.ts +392 -0
- package/src/explorer/useExplorer.ts +390 -0
- package/src/index.ts +218 -9
- package/src/navigation/createDrawerIcon.tsx +113 -0
- package/src/navigation/createHeaderIcon.tsx +213 -0
- package/src/navigation/createTabBarIcon.tsx +180 -0
- package/src/navigation/index.ts +80 -0
- package/src/navigation/types.ts +155 -0
- package/src/navigation/useNavigationIcon.tsx +156 -0
- package/src/network/IconifyAPI.ts +182 -14
- package/src/network/index.ts +11 -1
- package/src/performance/PerformanceMonitor.ts +367 -0
- package/src/performance/index.ts +39 -0
- package/src/performance/types.ts +185 -0
- package/src/placeholder/PlaceholderFactory.tsx +133 -0
- package/src/placeholder/Pulse.tsx +86 -0
- package/src/placeholder/Shimmer.tsx +104 -0
- package/src/placeholder/Skeleton.tsx +52 -0
- package/src/placeholder/index.ts +21 -0
- package/src/placeholder/types.ts +78 -0
- package/src/theme/IconThemeProvider.tsx +94 -0
- package/src/theme/context.ts +51 -0
- package/src/theme/index.ts +19 -0
- package/src/theme/types.ts +108 -0
- package/src/theme/useIconTheme.ts +119 -0
- package/src/types/index.ts +78 -1
- package/lib/commonjs/components/Phosphor.js +0 -493
- package/lib/commonjs/components/Phosphor.js.map +0 -1
- package/lib/module/components/Phosphor.js +0 -488
- package/lib/module/components/Phosphor.js.map +0 -1
- package/lib/typescript/components/Phosphor.d.ts +0 -472
- package/lib/typescript/components/Phosphor.d.ts.map +0 -1
- 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 (
|
|
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
|
-
//
|
|
38
|
-
export {
|
|
39
|
-
|
|
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
|
-
|
|
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
|
} {
|