rn-iconify 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -235
- 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 +41 -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,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createTabBarIcon - Helper for React Navigation tab bar icons
|
|
3
|
+
* Creates a tabBarIcon function that handles focused/unfocused states
|
|
4
|
+
*/
|
|
5
|
+
import type { TabBarIconConfig, SimpleTabBarIconConfig, TabBarIconFunction } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Create a tab bar icon function for React Navigation
|
|
8
|
+
*
|
|
9
|
+
* @example Simple usage (same icon for both states)
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { createTabBarIcon } from 'rn-iconify/navigation';
|
|
12
|
+
*
|
|
13
|
+
* <Tab.Screen
|
|
14
|
+
* name="Home"
|
|
15
|
+
* component={HomeScreen}
|
|
16
|
+
* options={{
|
|
17
|
+
* tabBarIcon: createTabBarIcon('mdi:home'),
|
|
18
|
+
* }}
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example Different icons for focused/unfocused
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <Tab.Screen
|
|
25
|
+
* options={{
|
|
26
|
+
* tabBarIcon: createTabBarIcon(['mdi:home', 'mdi:home-outline']),
|
|
27
|
+
* }}
|
|
28
|
+
* />
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @example With full configuration
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <Tab.Screen
|
|
34
|
+
* options={{
|
|
35
|
+
* tabBarIcon: createTabBarIcon({
|
|
36
|
+
* focused: 'mdi:home',
|
|
37
|
+
* unfocused: 'mdi:home-outline',
|
|
38
|
+
* size: 28,
|
|
39
|
+
* focusedColor: '#007AFF',
|
|
40
|
+
* }),
|
|
41
|
+
* }}
|
|
42
|
+
* />
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @example With aliases (requires IconAliasProvider)
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <Tab.Screen
|
|
48
|
+
* options={{
|
|
49
|
+
* tabBarIcon: createTabBarIcon(['home', 'home-outline']),
|
|
50
|
+
* }}
|
|
51
|
+
* />
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare function createTabBarIcon(config: SimpleTabBarIconConfig | TabBarIconConfig): TabBarIconFunction;
|
|
55
|
+
/**
|
|
56
|
+
* Create multiple tab bar icons at once
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* import { createTabBarIcons } from 'rn-iconify/navigation';
|
|
61
|
+
*
|
|
62
|
+
* const tabIcons = createTabBarIcons({
|
|
63
|
+
* Home: ['mdi:home', 'mdi:home-outline'],
|
|
64
|
+
* Search: 'mdi:magnify',
|
|
65
|
+
* Profile: ['mdi:account', 'mdi:account-outline'],
|
|
66
|
+
* Settings: {
|
|
67
|
+
* focused: 'mdi:cog',
|
|
68
|
+
* unfocused: 'mdi:cog-outline',
|
|
69
|
+
* size: 26,
|
|
70
|
+
* },
|
|
71
|
+
* });
|
|
72
|
+
*
|
|
73
|
+
* <Tab.Screen
|
|
74
|
+
* name="Home"
|
|
75
|
+
* options={{ tabBarIcon: tabIcons.Home }}
|
|
76
|
+
* />
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare function createTabBarIcons<T extends Record<string, SimpleTabBarIconConfig | TabBarIconConfig>>(configs: T): {
|
|
80
|
+
[K in keyof T]: TabBarIconFunction;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Quick helper for common tab patterns
|
|
84
|
+
* Uses filled/outline icon variants automatically
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```tsx
|
|
88
|
+
* import { tabIcon } from 'rn-iconify/navigation';
|
|
89
|
+
*
|
|
90
|
+
* <Tab.Screen
|
|
91
|
+
* options={{
|
|
92
|
+
* tabBarIcon: tabIcon('mdi', 'home'), // mdi:home / mdi:home-outline
|
|
93
|
+
* }}
|
|
94
|
+
* />
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare function tabIcon(prefix: string, name: string, outlineSuffix?: string): TabBarIconFunction;
|
|
98
|
+
export default createTabBarIcon;
|
|
99
|
+
//# sourceMappingURL=createTabBarIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTabBarIcon.d.ts","sourceRoot":"","sources":["../../../src/navigation/createTabBarIcon.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAEV,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAoBjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,sBAAsB,GAAG,gBAAgB,GAChD,kBAAkB,CAiCpB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,CAC/B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,sBAAsB,GAAG,gBAAgB,CAAC,EACnE,OAAO,EAAE,CAAC,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,kBAAkB;CAAE,CAQpD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,aAAa,SAAa,GACzB,kBAAkB,CAKpB;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Navigation Integration
|
|
3
|
+
* Helpers for using rn-iconify with React Navigation
|
|
4
|
+
*
|
|
5
|
+
* @example Tab Navigator
|
|
6
|
+
* ```tsx
|
|
7
|
+
* import { createTabBarIcon } from 'rn-iconify/navigation';
|
|
8
|
+
*
|
|
9
|
+
* <Tab.Navigator>
|
|
10
|
+
* <Tab.Screen
|
|
11
|
+
* name="Home"
|
|
12
|
+
* options={{
|
|
13
|
+
* tabBarIcon: createTabBarIcon(['mdi:home', 'mdi:home-outline']),
|
|
14
|
+
* }}
|
|
15
|
+
* />
|
|
16
|
+
* </Tab.Navigator>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @example Drawer Navigator
|
|
20
|
+
* ```tsx
|
|
21
|
+
* import { createDrawerIcon } from 'rn-iconify/navigation';
|
|
22
|
+
*
|
|
23
|
+
* <Drawer.Screen
|
|
24
|
+
* options={{
|
|
25
|
+
* drawerIcon: createDrawerIcon('mdi:home'),
|
|
26
|
+
* }}
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @example Header Icons
|
|
31
|
+
* ```tsx
|
|
32
|
+
* import { createHeaderIcon, createBackIcon } from 'rn-iconify/navigation';
|
|
33
|
+
*
|
|
34
|
+
* <Stack.Screen
|
|
35
|
+
* options={({ navigation }) => ({
|
|
36
|
+
* headerLeft: createBackIcon({ onPress: () => navigation.goBack() }),
|
|
37
|
+
* headerRight: createHeaderIcon({ icon: 'mdi:dots-vertical' }),
|
|
38
|
+
* })}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export type { TabBarIconProps, DrawerIconProps, HeaderIconProps, TabBarIconConfig, SimpleTabBarIconConfig, DrawerIconConfig, TabBarIconFunction, DrawerIconFunction, HeaderIconFunction, NavigationIconPreset, IconSpec, } from './types';
|
|
43
|
+
export { DEFAULT_NAVIGATION_PRESETS } from './types';
|
|
44
|
+
export { createTabBarIcon, createTabBarIcons, tabIcon } from './createTabBarIcon';
|
|
45
|
+
export { createDrawerIcon, createDrawerIcons } from './createDrawerIcon';
|
|
46
|
+
export { createHeaderIcon, createBackIcon, createCloseIcon, createMenuIcon, } from './createHeaderIcon';
|
|
47
|
+
export type { HeaderIconConfig } from './createHeaderIcon';
|
|
48
|
+
export { useNavigationIcon } from './useNavigationIcon';
|
|
49
|
+
export type { UseNavigationIconOptions, UseNavigationIconReturn } from './useNavigationIcon';
|
|
50
|
+
export { createTabBarIcon as default } from './createTabBarIcon';
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAGH,YAAY,EACV,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,QAAQ,GACT,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAGrD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGzE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAG7F,OAAO,EAAE,gBAAgB,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Navigation Integration Types
|
|
3
|
+
* Type definitions for navigation icon helpers
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
7
|
+
/**
|
|
8
|
+
* Props passed by React Navigation to tabBarIcon
|
|
9
|
+
*/
|
|
10
|
+
export interface TabBarIconProps {
|
|
11
|
+
focused: boolean;
|
|
12
|
+
color: string;
|
|
13
|
+
size: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Props passed by React Navigation to drawerIcon
|
|
17
|
+
*/
|
|
18
|
+
export interface DrawerIconProps {
|
|
19
|
+
focused: boolean;
|
|
20
|
+
color: string;
|
|
21
|
+
size: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props passed by React Navigation to headerLeft/headerRight icons
|
|
25
|
+
*/
|
|
26
|
+
export interface HeaderIconProps {
|
|
27
|
+
tintColor?: string;
|
|
28
|
+
pressColor?: string;
|
|
29
|
+
pressOpacity?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Icon specification - can be a full name or alias
|
|
33
|
+
* @example 'mdi:home' or 'home' (if alias is registered)
|
|
34
|
+
*/
|
|
35
|
+
export type IconSpec = string;
|
|
36
|
+
/**
|
|
37
|
+
* Configuration for tab bar icon
|
|
38
|
+
*/
|
|
39
|
+
export interface TabBarIconConfig {
|
|
40
|
+
/**
|
|
41
|
+
* Icon to show when tab is focused
|
|
42
|
+
* Can be a full icon name (mdi:home) or alias (home)
|
|
43
|
+
*/
|
|
44
|
+
focused: IconSpec;
|
|
45
|
+
/**
|
|
46
|
+
* Icon to show when tab is not focused
|
|
47
|
+
* If not provided, uses the focused icon with different styling
|
|
48
|
+
*/
|
|
49
|
+
unfocused?: IconSpec;
|
|
50
|
+
/**
|
|
51
|
+
* Custom size override (default: uses navigation's size)
|
|
52
|
+
*/
|
|
53
|
+
size?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Custom color override for focused state
|
|
56
|
+
*/
|
|
57
|
+
focusedColor?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Custom color override for unfocused state
|
|
60
|
+
*/
|
|
61
|
+
unfocusedColor?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Additional style for the icon container
|
|
64
|
+
*/
|
|
65
|
+
style?: StyleProp<ViewStyle>;
|
|
66
|
+
/**
|
|
67
|
+
* Accessibility label
|
|
68
|
+
*/
|
|
69
|
+
accessibilityLabel?: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Simple config - just icon names
|
|
73
|
+
*/
|
|
74
|
+
export type SimpleTabBarIconConfig = IconSpec | [IconSpec, IconSpec];
|
|
75
|
+
/**
|
|
76
|
+
* Configuration for drawer icon
|
|
77
|
+
*/
|
|
78
|
+
export interface DrawerIconConfig {
|
|
79
|
+
/**
|
|
80
|
+
* Icon to show
|
|
81
|
+
*/
|
|
82
|
+
icon: IconSpec;
|
|
83
|
+
/**
|
|
84
|
+
* Icon when drawer item is focused
|
|
85
|
+
*/
|
|
86
|
+
focusedIcon?: IconSpec;
|
|
87
|
+
/**
|
|
88
|
+
* Custom size override
|
|
89
|
+
*/
|
|
90
|
+
size?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Additional style
|
|
93
|
+
*/
|
|
94
|
+
style?: StyleProp<ViewStyle>;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Return type for createTabBarIcon
|
|
98
|
+
*/
|
|
99
|
+
export type TabBarIconFunction = (props: TabBarIconProps) => ReactNode;
|
|
100
|
+
/**
|
|
101
|
+
* Return type for createDrawerIcon
|
|
102
|
+
*/
|
|
103
|
+
export type DrawerIconFunction = (props: DrawerIconProps) => ReactNode;
|
|
104
|
+
/**
|
|
105
|
+
* Return type for createHeaderIcon
|
|
106
|
+
*/
|
|
107
|
+
export type HeaderIconFunction = (props: HeaderIconProps) => ReactNode;
|
|
108
|
+
/**
|
|
109
|
+
* Navigation icon preset - common icon patterns
|
|
110
|
+
*/
|
|
111
|
+
export interface NavigationIconPreset {
|
|
112
|
+
home: {
|
|
113
|
+
focused: IconSpec;
|
|
114
|
+
unfocused: IconSpec;
|
|
115
|
+
};
|
|
116
|
+
search: {
|
|
117
|
+
focused: IconSpec;
|
|
118
|
+
unfocused: IconSpec;
|
|
119
|
+
};
|
|
120
|
+
profile: {
|
|
121
|
+
focused: IconSpec;
|
|
122
|
+
unfocused: IconSpec;
|
|
123
|
+
};
|
|
124
|
+
settings: {
|
|
125
|
+
focused: IconSpec;
|
|
126
|
+
unfocused: IconSpec;
|
|
127
|
+
};
|
|
128
|
+
notifications: {
|
|
129
|
+
focused: IconSpec;
|
|
130
|
+
unfocused: IconSpec;
|
|
131
|
+
};
|
|
132
|
+
messages: {
|
|
133
|
+
focused: IconSpec;
|
|
134
|
+
unfocused: IconSpec;
|
|
135
|
+
};
|
|
136
|
+
favorites: {
|
|
137
|
+
focused: IconSpec;
|
|
138
|
+
unfocused: IconSpec;
|
|
139
|
+
};
|
|
140
|
+
cart: {
|
|
141
|
+
focused: IconSpec;
|
|
142
|
+
unfocused: IconSpec;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Default icon presets using popular icon sets
|
|
147
|
+
*/
|
|
148
|
+
export declare const DEFAULT_NAVIGATION_PRESETS: NavigationIconPreset;
|
|
149
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/navigation/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,OAAO,EAAE,QAAQ,CAAC;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,QAAQ,CAAA;KAAE,CAAC;IACjD,MAAM,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,QAAQ,CAAA;KAAE,CAAC;IACnD,OAAO,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,QAAQ,CAAA;KAAE,CAAC;IACpD,QAAQ,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,QAAQ,CAAA;KAAE,CAAC;IACrD,aAAa,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,QAAQ,CAAA;KAAE,CAAC;IAC1D,QAAQ,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,QAAQ,CAAA;KAAE,CAAC;IACrD,SAAS,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,QAAQ,CAAA;KAAE,CAAC;IACtD,IAAI,EAAE;QAAE,OAAO,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,QAAQ,CAAA;KAAE,CAAC;CAClD;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,oBASxC,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useNavigationIcon - Hook for creating navigation icons
|
|
3
|
+
* Provides a clean API for creating icons with navigation context
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import type { TabBarIconFunction, DrawerIconFunction } from './types';
|
|
7
|
+
type IconSpec = string;
|
|
8
|
+
/**
|
|
9
|
+
* Hook options
|
|
10
|
+
*/
|
|
11
|
+
export interface UseNavigationIconOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Default size for icons
|
|
14
|
+
* @default 24
|
|
15
|
+
*/
|
|
16
|
+
defaultSize?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Suffix for unfocused icon variants
|
|
19
|
+
* @default '-outline'
|
|
20
|
+
*/
|
|
21
|
+
outlineSuffix?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Return type for useNavigationIcon
|
|
25
|
+
*/
|
|
26
|
+
export interface UseNavigationIconReturn {
|
|
27
|
+
/**
|
|
28
|
+
* Create a tab bar icon function
|
|
29
|
+
*/
|
|
30
|
+
tabBarIcon: (focused: IconSpec, unfocused?: IconSpec) => TabBarIconFunction;
|
|
31
|
+
/**
|
|
32
|
+
* Create a drawer icon function
|
|
33
|
+
*/
|
|
34
|
+
drawerIcon: (icon: IconSpec, focusedIcon?: IconSpec) => DrawerIconFunction;
|
|
35
|
+
/**
|
|
36
|
+
* Create an auto-outline tab bar icon
|
|
37
|
+
* Uses {name} for focused and {name}-outline for unfocused
|
|
38
|
+
*/
|
|
39
|
+
autoTabBarIcon: (prefix: string, name: string) => TabBarIconFunction;
|
|
40
|
+
/**
|
|
41
|
+
* Render an icon directly with navigation props
|
|
42
|
+
*/
|
|
43
|
+
renderIcon: (name: IconSpec, props: {
|
|
44
|
+
color: string;
|
|
45
|
+
size: number;
|
|
46
|
+
}) => React.ReactElement;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Hook for creating navigation icons with consistent styling
|
|
50
|
+
*
|
|
51
|
+
* @example Basic usage
|
|
52
|
+
* ```tsx
|
|
53
|
+
* import { useNavigationIcon } from 'rn-iconify/navigation';
|
|
54
|
+
*
|
|
55
|
+
* function MyTabs() {
|
|
56
|
+
* const { tabBarIcon, drawerIcon } = useNavigationIcon();
|
|
57
|
+
*
|
|
58
|
+
* return (
|
|
59
|
+
* <Tab.Navigator>
|
|
60
|
+
* <Tab.Screen
|
|
61
|
+
* name="Home"
|
|
62
|
+
* options={{
|
|
63
|
+
* tabBarIcon: tabBarIcon('mdi:home', 'mdi:home-outline'),
|
|
64
|
+
* }}
|
|
65
|
+
* />
|
|
66
|
+
* <Tab.Screen
|
|
67
|
+
* name="Settings"
|
|
68
|
+
* options={{
|
|
69
|
+
* tabBarIcon: tabBarIcon('mdi:cog'),
|
|
70
|
+
* }}
|
|
71
|
+
* />
|
|
72
|
+
* </Tab.Navigator>
|
|
73
|
+
* );
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @example With auto-outline
|
|
78
|
+
* ```tsx
|
|
79
|
+
* const { autoTabBarIcon } = useNavigationIcon();
|
|
80
|
+
*
|
|
81
|
+
* <Tab.Screen
|
|
82
|
+
* options={{
|
|
83
|
+
* // Uses mdi:home (focused) and mdi:home-outline (unfocused)
|
|
84
|
+
* tabBarIcon: autoTabBarIcon('mdi', 'home'),
|
|
85
|
+
* }}
|
|
86
|
+
* />
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare function useNavigationIcon(options?: UseNavigationIconOptions): UseNavigationIconReturn;
|
|
90
|
+
export default useNavigationIcon;
|
|
91
|
+
//# sourceMappingURL=useNavigationIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavigationIcon.d.ts","sourceRoot":"","sources":["../../../src/navigation/useNavigationIcon.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,KAAK,EAGV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAGjB,KAAK,QAAQ,GAAG,MAAM,CAAC;AAEvB;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,UAAU,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,QAAQ,KAAK,kBAAkB,CAAC;IAE5E;;OAEG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,EAAE,QAAQ,KAAK,kBAAkB,CAAC;IAE3E;;;OAGG;IACH,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,kBAAkB,CAAC;IAErE;;OAEG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,YAAY,CAAC;CAC5F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B,GAAG,uBAAuB,CAoDjG;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Iconify API Client
|
|
3
3
|
* Handles fetching icon data from Iconify API
|
|
4
|
+
* Supports custom API servers via ConfigManager
|
|
4
5
|
*/
|
|
5
6
|
/**
|
|
6
7
|
* Parse icon name into prefix and name parts
|
|
@@ -38,4 +39,35 @@ export declare function fetchIconsBatch(iconNames: string[], signal?: AbortSigna
|
|
|
38
39
|
* Check if Iconify API is reachable
|
|
39
40
|
*/
|
|
40
41
|
export declare function checkAPIHealth(): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Get the current API base URL
|
|
44
|
+
*/
|
|
45
|
+
export declare function getAPIBaseUrl(): string;
|
|
46
|
+
/**
|
|
47
|
+
* Icon collection info from Iconify API
|
|
48
|
+
*/
|
|
49
|
+
export interface IconifyCollectionInfo {
|
|
50
|
+
prefix: string;
|
|
51
|
+
total: number;
|
|
52
|
+
title?: string;
|
|
53
|
+
icons: string[];
|
|
54
|
+
aliases?: Record<string, string>;
|
|
55
|
+
categories?: Record<string, string[]>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Fetch all icons for a specific icon set from Iconify API
|
|
59
|
+
* @param prefix Icon set prefix (e.g., "mdi", "heroicons")
|
|
60
|
+
* @param signal Optional AbortSignal for cancellation
|
|
61
|
+
* @returns Collection info including all icon names
|
|
62
|
+
*/
|
|
63
|
+
export declare function fetchCollection(prefix: string, signal?: AbortSignal): Promise<IconifyCollectionInfo>;
|
|
64
|
+
/**
|
|
65
|
+
* Search icons using Iconify API
|
|
66
|
+
* @param query Search query
|
|
67
|
+
* @param prefixes Optional array of icon set prefixes to search
|
|
68
|
+
* @param limit Maximum number of results
|
|
69
|
+
* @param signal Optional AbortSignal for cancellation
|
|
70
|
+
* @returns Array of icon names
|
|
71
|
+
*/
|
|
72
|
+
export declare function searchIconsAPI(query: string, prefixes?: string[], limit?: number, signal?: AbortSignal): Promise<string[]>;
|
|
41
73
|
//# sourceMappingURL=IconifyAPI.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconifyAPI.d.ts","sourceRoot":"","sources":["../../../src/network/IconifyAPI.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"IconifyAPI.d.ts","sourceRoot":"","sources":["../../../src/network/IconifyAPI.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyFH;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAcvF;AAsCD;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAqGvF;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,MAAM,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACpD;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,SAAS,EAAE,MAAM,EAAE,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,gBAAgB,CAAC,CA+E3B;AAED;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAWvD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACvC;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAoDhC;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,EAAE,EACnB,KAAK,GAAE,MAAY,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,EAAE,CAAC,CAgCnB"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { fetchIcon, fetchIconsBatch, parseIconName, checkAPIHealth } from './IconifyAPI';
|
|
1
|
+
export { fetchIcon, fetchIconsBatch, parseIconName, checkAPIHealth, getAPIBaseUrl, fetchCollection, searchIconsAPI, } from './IconifyAPI';
|
|
2
|
+
export type { BatchFetchResult, IconifyCollectionInfo } from './IconifyAPI';
|
|
2
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/network/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/network/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,eAAe,EACf,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PerformanceMonitor - Tracks icon loading performance
|
|
3
|
+
* Provides metrics, statistics, and insights for optimization
|
|
4
|
+
*/
|
|
5
|
+
import type { IconLoadEvent, LoadEventType, CacheStatistics, PerformanceSummary, PerformanceReport, PerformanceListener } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Performance Monitor API
|
|
8
|
+
*/
|
|
9
|
+
export declare const PerformanceMonitor: {
|
|
10
|
+
/**
|
|
11
|
+
* Enable performance monitoring
|
|
12
|
+
*/
|
|
13
|
+
enable(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Disable performance monitoring
|
|
16
|
+
*/
|
|
17
|
+
disable(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Check if monitoring is enabled
|
|
20
|
+
*/
|
|
21
|
+
isEnabled(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Record an icon load event
|
|
24
|
+
*/
|
|
25
|
+
recordEvent(iconName: string, type: LoadEventType, duration: number, error?: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Subscribe to performance events
|
|
28
|
+
* Returns unsubscribe function
|
|
29
|
+
*/
|
|
30
|
+
subscribe(listener: PerformanceListener): () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Get cache statistics
|
|
33
|
+
*/
|
|
34
|
+
getCacheStats(): CacheStatistics;
|
|
35
|
+
/**
|
|
36
|
+
* Get performance summary
|
|
37
|
+
*/
|
|
38
|
+
getSummary(): PerformanceSummary;
|
|
39
|
+
/**
|
|
40
|
+
* Get full performance report
|
|
41
|
+
*/
|
|
42
|
+
getReport(): PerformanceReport;
|
|
43
|
+
/**
|
|
44
|
+
* Reset all performance data
|
|
45
|
+
*/
|
|
46
|
+
reset(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Get raw events (for debugging)
|
|
49
|
+
*/
|
|
50
|
+
getEvents(): IconLoadEvent[];
|
|
51
|
+
/**
|
|
52
|
+
* Format report as string (for console output)
|
|
53
|
+
*/
|
|
54
|
+
formatReport(): string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Enable performance monitoring
|
|
58
|
+
* Alias for PerformanceMonitor.enable()
|
|
59
|
+
*/
|
|
60
|
+
export declare function enablePerformanceMonitoring(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Disable performance monitoring
|
|
63
|
+
* Alias for PerformanceMonitor.disable()
|
|
64
|
+
*/
|
|
65
|
+
export declare function disablePerformanceMonitoring(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Get performance report
|
|
68
|
+
* Alias for PerformanceMonitor.getReport()
|
|
69
|
+
*/
|
|
70
|
+
export declare function getPerformanceReport(): PerformanceReport;
|
|
71
|
+
/**
|
|
72
|
+
* Print formatted performance report to console
|
|
73
|
+
*/
|
|
74
|
+
export declare function printPerformanceReport(): void;
|
|
75
|
+
export default PerformanceMonitor;
|
|
76
|
+
//# sourceMappingURL=PerformanceMonitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PerformanceMonitor.d.ts","sourceRoot":"","sources":["../../../src/performance/PerformanceMonitor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAuCjB;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAC7B;;OAEG;cACO,IAAI;IAMd;;OAEG;eACQ,IAAI;IAKf;;OAEG;iBACU,OAAO;IAIpB;;OAEG;0BACmB,MAAM,QAAQ,aAAa,YAAY,MAAM,UAAU,MAAM,GAAG,IAAI;IAyD1F;;;OAGG;wBACiB,mBAAmB,GAAG,MAAM,IAAI;IAUpD;;OAEG;qBACc,eAAe;IAgBhC;;OAEG;kBACW,kBAAkB;IAsChC;;OAEG;iBACU,iBAAiB;IAqD9B;;OAEG;aACM,IAAI;IAcb;;OAEG;iBACU,aAAa,EAAE;IAI5B;;OAEG;oBACa,MAAM;CAoCvB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,IAAI,CAElD;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performance Monitoring Module
|
|
3
|
+
* Track and analyze icon loading performance
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* import { enablePerformanceMonitoring, getPerformanceReport } from 'rn-iconify';
|
|
8
|
+
*
|
|
9
|
+
* // Enable monitoring
|
|
10
|
+
* enablePerformanceMonitoring();
|
|
11
|
+
*
|
|
12
|
+
* // Later, get the report
|
|
13
|
+
* const report = getPerformanceReport();
|
|
14
|
+
* console.log(`Cache hit rate: ${report.cacheStats.hitRate * 100}%`);
|
|
15
|
+
* console.log(`Avg load time: ${report.summary.avgLoadTime}ms`);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export type { IconLoadEvent, LoadEventType, CacheStatistics, PerformanceSummary, PerformanceReport, PerformanceListener, } from './types';
|
|
19
|
+
export { PerformanceMonitor, enablePerformanceMonitoring, disablePerformanceMonitoring, getPerformanceReport, printPerformanceReport, } from './PerformanceMonitor';
|
|
20
|
+
export { PerformanceMonitor as default } from './PerformanceMonitor';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/performance/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,kBAAkB,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
|