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,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* createIconAliases - Factory function for creating type-safe icon aliases
|
|
3
|
+
* Provides full TypeScript autocomplete for alias names
|
|
4
|
+
*/
|
|
5
|
+
import type { IconAliasMap, CreateIconAliasesConfig, IconAliasResult } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Create a type-safe icon alias system
|
|
8
|
+
*
|
|
9
|
+
* This function creates:
|
|
10
|
+
* - A typed Icon component with autocomplete for alias names
|
|
11
|
+
* - A Provider component to wrap your app
|
|
12
|
+
* - A resolve function to convert aliases to full icon names
|
|
13
|
+
*
|
|
14
|
+
* @example Basic usage
|
|
15
|
+
* ```tsx
|
|
16
|
+
* // icons.ts
|
|
17
|
+
* import { createIconAliases } from 'rn-iconify';
|
|
18
|
+
*
|
|
19
|
+
* export const { Icon, Provider: IconProvider, aliases } = createIconAliases({
|
|
20
|
+
* aliases: {
|
|
21
|
+
* back: 'mdi:arrow-left',
|
|
22
|
+
* forward: 'mdi:arrow-right',
|
|
23
|
+
* menu: 'heroicons:bars-3',
|
|
24
|
+
* close: 'mdi:close',
|
|
25
|
+
* home: 'mdi:home',
|
|
26
|
+
* settings: 'lucide:settings',
|
|
27
|
+
* } as const,
|
|
28
|
+
* });
|
|
29
|
+
*
|
|
30
|
+
* // App.tsx
|
|
31
|
+
* import { Icon, IconProvider } from './icons';
|
|
32
|
+
*
|
|
33
|
+
* function App() {
|
|
34
|
+
* return (
|
|
35
|
+
* <IconProvider>
|
|
36
|
+
* <Icon name="back" size={24} /> {// TypeScript autocomplete! }
|
|
37
|
+
* <Icon name="menu" color="blue" />
|
|
38
|
+
* </IconProvider>
|
|
39
|
+
* );
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @example With navigation
|
|
44
|
+
* ```tsx
|
|
45
|
+
* import { Icon } from './icons';
|
|
46
|
+
*
|
|
47
|
+
* <Tab.Screen
|
|
48
|
+
* options={{
|
|
49
|
+
* tabBarIcon: ({ color, size }) => (
|
|
50
|
+
* <Icon name="home" color={color} size={size} />
|
|
51
|
+
* ),
|
|
52
|
+
* }}
|
|
53
|
+
* />
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare function createIconAliases<T extends IconAliasMap>(config: CreateIconAliasesConfig<T>): IconAliasResult<T>;
|
|
57
|
+
/**
|
|
58
|
+
* Quick helper to create aliases without full type safety
|
|
59
|
+
* Useful for simple cases or when aliases are dynamic
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```tsx
|
|
63
|
+
* import { defineAliases, Icon, IconAliasProvider } from 'rn-iconify';
|
|
64
|
+
*
|
|
65
|
+
* const aliases = defineAliases({
|
|
66
|
+
* back: 'mdi:arrow-left',
|
|
67
|
+
* menu: 'heroicons:bars-3',
|
|
68
|
+
* });
|
|
69
|
+
*
|
|
70
|
+
* <IconAliasProvider aliases={aliases}>
|
|
71
|
+
* <Icon name="back" />
|
|
72
|
+
* </IconAliasProvider>
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare function defineAliases<T extends IconAliasMap>(aliases: T): T;
|
|
76
|
+
export default createIconAliases;
|
|
77
|
+
//# sourceMappingURL=createIconAliases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createIconAliases.d.ts","sourceRoot":"","sources":["../../../src/alias/createIconAliases.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EACV,YAAY,EAIZ,uBAAuB,EACvB,eAAe,EAChB,MAAM,SAAS,CAAC;AAsBjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,YAAY,EACtD,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,GACjC,eAAe,CAAC,CAAC,CAAC,CAkHpB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,YAAY,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAKnE;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon Alias System
|
|
3
|
+
* Create custom icon name mappings for consistent usage across your app
|
|
4
|
+
*
|
|
5
|
+
* @example Basic usage
|
|
6
|
+
* ```tsx
|
|
7
|
+
* import { createIconAliases } from 'rn-iconify';
|
|
8
|
+
*
|
|
9
|
+
* const { Icon, Provider } = createIconAliases({
|
|
10
|
+
* aliases: {
|
|
11
|
+
* back: 'mdi:arrow-left',
|
|
12
|
+
* menu: 'heroicons:bars-3',
|
|
13
|
+
* } as const,
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* <Provider>
|
|
17
|
+
* <Icon name="back" />
|
|
18
|
+
* </Provider>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @example With generic Icon component
|
|
22
|
+
* ```tsx
|
|
23
|
+
* import { Icon, IconAliasProvider } from 'rn-iconify';
|
|
24
|
+
*
|
|
25
|
+
* <IconAliasProvider aliases={{ back: 'mdi:arrow-left' }}>
|
|
26
|
+
* <Icon name="back" />
|
|
27
|
+
* <Icon name="mdi:home" /> // Full names still work
|
|
28
|
+
* </IconAliasProvider>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export type { IconAliasMap, IconAliases, AliasName, GenericIconProps, IconAliasContextValue, IconAliasProviderProps, CreateIconAliasesConfig, IconAliasResult, } from './types';
|
|
32
|
+
export { IconAliasContext, IconAliasProvider, useIconAliasContext, useResolveIcon, } from './IconAliasContext';
|
|
33
|
+
export { Icon } from './Icon';
|
|
34
|
+
export { createIconAliases, defineAliases } from './createIconAliases';
|
|
35
|
+
export { createIconAliases as default } from './createIconAliases';
|
|
36
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/alias/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,YAAY,EACV,YAAY,EACZ,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,GAChB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,GACf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGvE,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon Alias System Types
|
|
3
|
+
* Type definitions for the icon alias feature
|
|
4
|
+
*/
|
|
5
|
+
import type { IconProps } from '../types';
|
|
6
|
+
/**
|
|
7
|
+
* Icon alias definition - maps alias name to full icon name
|
|
8
|
+
* @example { back: 'mdi:arrow-left', menu: 'heroicons:bars-3' }
|
|
9
|
+
*/
|
|
10
|
+
export type IconAliasMap = Record<string, string>;
|
|
11
|
+
/**
|
|
12
|
+
* Type-safe alias configuration
|
|
13
|
+
* Uses 'as const' for full TypeScript inference
|
|
14
|
+
*/
|
|
15
|
+
export type IconAliases<T extends IconAliasMap> = {
|
|
16
|
+
readonly [K in keyof T]: T[K];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Extract alias names from an alias map
|
|
20
|
+
*/
|
|
21
|
+
export type AliasName<T extends IconAliasMap> = keyof T & string;
|
|
22
|
+
/**
|
|
23
|
+
* Props for the generic Icon component
|
|
24
|
+
* Accepts either a full icon name (prefix:name) or an alias
|
|
25
|
+
*/
|
|
26
|
+
export interface GenericIconProps<TAlias extends string = string> extends Omit<IconProps<TAlias>, 'name'> {
|
|
27
|
+
/**
|
|
28
|
+
* Icon name - can be:
|
|
29
|
+
* - Full icon name: "mdi:home", "heroicons:user"
|
|
30
|
+
* - Alias name: "back", "menu" (if aliases are configured)
|
|
31
|
+
*/
|
|
32
|
+
name: TAlias | string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Icon alias context value
|
|
36
|
+
*/
|
|
37
|
+
export interface IconAliasContextValue {
|
|
38
|
+
/**
|
|
39
|
+
* Registered aliases
|
|
40
|
+
*/
|
|
41
|
+
aliases: IconAliasMap;
|
|
42
|
+
/**
|
|
43
|
+
* Resolve an alias or icon name to full icon name
|
|
44
|
+
* @param name Alias or full icon name
|
|
45
|
+
* @returns Full icon name (prefix:name format)
|
|
46
|
+
*/
|
|
47
|
+
resolveIcon: (name: string) => string;
|
|
48
|
+
/**
|
|
49
|
+
* Check if a name is a registered alias
|
|
50
|
+
*/
|
|
51
|
+
isAlias: (name: string) => boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Register additional aliases at runtime
|
|
54
|
+
*/
|
|
55
|
+
registerAliases: (newAliases: IconAliasMap) => void;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Props for IconAliasProvider
|
|
59
|
+
*/
|
|
60
|
+
export interface IconAliasProviderProps {
|
|
61
|
+
/**
|
|
62
|
+
* Icon alias definitions
|
|
63
|
+
*/
|
|
64
|
+
aliases: IconAliasMap;
|
|
65
|
+
/**
|
|
66
|
+
* Allow extending parent aliases (default: true)
|
|
67
|
+
*/
|
|
68
|
+
extend?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Children components
|
|
71
|
+
*/
|
|
72
|
+
children: React.ReactNode;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Configuration for createIconAliases
|
|
76
|
+
*/
|
|
77
|
+
export interface CreateIconAliasesConfig<T extends IconAliasMap> {
|
|
78
|
+
/**
|
|
79
|
+
* Alias definitions
|
|
80
|
+
*/
|
|
81
|
+
aliases: T;
|
|
82
|
+
/**
|
|
83
|
+
* Validate icon names at creation time (dev only)
|
|
84
|
+
* @default true
|
|
85
|
+
*/
|
|
86
|
+
validate?: boolean;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Return type for createIconAliases
|
|
90
|
+
*/
|
|
91
|
+
export interface IconAliasResult<T extends IconAliasMap> {
|
|
92
|
+
/**
|
|
93
|
+
* The alias map
|
|
94
|
+
*/
|
|
95
|
+
aliases: IconAliases<T>;
|
|
96
|
+
/**
|
|
97
|
+
* Type-safe Icon component with alias support
|
|
98
|
+
*/
|
|
99
|
+
Icon: React.ComponentType<GenericIconProps<AliasName<T>>>;
|
|
100
|
+
/**
|
|
101
|
+
* Provider component for alias context
|
|
102
|
+
*/
|
|
103
|
+
Provider: React.ComponentType<{
|
|
104
|
+
children: React.ReactNode;
|
|
105
|
+
}>;
|
|
106
|
+
/**
|
|
107
|
+
* Resolve function
|
|
108
|
+
*/
|
|
109
|
+
resolve: (name: AliasName<T> | string) => string;
|
|
110
|
+
/**
|
|
111
|
+
* Type helper for alias names
|
|
112
|
+
*/
|
|
113
|
+
AliasName: AliasName<T>;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/alias/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,YAAY,IAAI;IAChD,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,YAAY,IAAI,MAAM,CAAC,GAAG,MAAM,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,gBAAgB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,CAC9D,SAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACvC;;;;OAIG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IAEtB;;;;OAIG;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAEtC;;OAEG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAEnC;;OAEG;IACH,eAAe,EAAE,CAAC,UAAU,EAAE,YAAY,KAAK,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,YAAY;IAC7D;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC;IAEX;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,YAAY;IACrD;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAExB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE1D;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAC,CAAC;IAE7D;;OAEG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,MAAM,CAAC;IAEjD;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CACzB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AnimatedIcon - Wrapper component for animated icons
|
|
3
|
+
* Provides animation capabilities to any icon component
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import type { AnimatedIconProps, AnimationControls } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* AnimatedIcon wrapper component
|
|
9
|
+
* Wraps any icon component to add animation capabilities
|
|
10
|
+
*
|
|
11
|
+
* @example Basic usage
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { AnimatedIcon } from 'rn-iconify/animated';
|
|
14
|
+
* import { Mdi } from 'rn-iconify';
|
|
15
|
+
*
|
|
16
|
+
* <AnimatedIcon animate="spin">
|
|
17
|
+
* <Mdi name="loading" size={24} />
|
|
18
|
+
* </AnimatedIcon>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @example With custom configuration
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <AnimatedIcon
|
|
24
|
+
* animate={{ type: 'rotate', duration: 2000, easing: 'linear' }}
|
|
25
|
+
* autoPlay={true}
|
|
26
|
+
* >
|
|
27
|
+
* <Mdi name="sync" size={24} />
|
|
28
|
+
* </AnimatedIcon>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @example With ref for animation control
|
|
32
|
+
* ```tsx
|
|
33
|
+
* const animationRef = useRef<AnimationControls>(null);
|
|
34
|
+
*
|
|
35
|
+
* <AnimatedIcon ref={animationRef} animate="bounce" autoPlay={false}>
|
|
36
|
+
* <Mdi name="heart" size={24} />
|
|
37
|
+
* </AnimatedIcon>
|
|
38
|
+
*
|
|
39
|
+
* // Later
|
|
40
|
+
* animationRef.current?.start();
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const AnimatedIcon: React.ForwardRefExoticComponent<AnimatedIconProps & React.RefAttributes<AnimationControls>>;
|
|
44
|
+
export default AnimatedIcon;
|
|
45
|
+
//# sourceMappingURL=AnimatedIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimatedIcon.d.ts","sourceRoot":"","sources":["../../../src/animated/AnimatedIcon.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA0C,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,YAAY,6FA4DvB,CAAC;AASH,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animated Icons Module
|
|
3
|
+
* Provides animation capabilities for rn-iconify icons
|
|
4
|
+
*
|
|
5
|
+
* @example Basic usage with preset
|
|
6
|
+
* ```tsx
|
|
7
|
+
* import { Mdi } from 'rn-iconify';
|
|
8
|
+
*
|
|
9
|
+
* // Direct usage with animate prop
|
|
10
|
+
* <Mdi name="loading" animate="spin" />
|
|
11
|
+
* <Mdi name="heart" animate="pulse" />
|
|
12
|
+
* <Mdi name="bell" animate="shake" />
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @example Using AnimatedIcon wrapper
|
|
16
|
+
* ```tsx
|
|
17
|
+
* import { AnimatedIcon } from 'rn-iconify/animated';
|
|
18
|
+
* import { Mdi } from 'rn-iconify';
|
|
19
|
+
*
|
|
20
|
+
* <AnimatedIcon animate="bounce">
|
|
21
|
+
* <Mdi name="star" size={24} />
|
|
22
|
+
* </AnimatedIcon>
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example Custom animation configuration
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Mdi
|
|
28
|
+
* name="sync"
|
|
29
|
+
* animate={{
|
|
30
|
+
* type: 'rotate',
|
|
31
|
+
* duration: 2000,
|
|
32
|
+
* easing: 'linear',
|
|
33
|
+
* loop: true,
|
|
34
|
+
* }}
|
|
35
|
+
* />
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example Animation control with ref
|
|
39
|
+
* ```tsx
|
|
40
|
+
* import { useRef } from 'react';
|
|
41
|
+
* import { AnimatedIcon, AnimationControls } from 'rn-iconify/animated';
|
|
42
|
+
*
|
|
43
|
+
* function MyComponent() {
|
|
44
|
+
* const animRef = useRef<AnimationControls>(null);
|
|
45
|
+
*
|
|
46
|
+
* const handlePress = () => {
|
|
47
|
+
* if (animRef.current?.isAnimating) {
|
|
48
|
+
* animRef.current.stop();
|
|
49
|
+
* } else {
|
|
50
|
+
* animRef.current?.start();
|
|
51
|
+
* }
|
|
52
|
+
* };
|
|
53
|
+
*
|
|
54
|
+
* return (
|
|
55
|
+
* <TouchableOpacity onPress={handlePress}>
|
|
56
|
+
* <AnimatedIcon ref={animRef} animate="spin" autoPlay={false}>
|
|
57
|
+
* <Mdi name="refresh" size={24} />
|
|
58
|
+
* </AnimatedIcon>
|
|
59
|
+
* </TouchableOpacity>
|
|
60
|
+
* );
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export type { AnimationPreset, AnimationDirection, AnimationEasing, AnimationConfig, AnimationType, ResolvedAnimationConfig, AnimationState, AnimationControls, AnimatedIconProps, } from './types';
|
|
65
|
+
export { DEFAULT_ANIMATION_DURATIONS, DEFAULT_ANIMATION_LOOPS } from './types';
|
|
66
|
+
export { ANIMATION_PRESETS, getEasingFunction, resolveAnimation, isAnimationPreset, getDefaultDuration, getDefaultLoop, } from './presets';
|
|
67
|
+
export { useIconAnimation } from './useIconAnimation';
|
|
68
|
+
export { AnimatedIcon } from './AnimatedIcon';
|
|
69
|
+
export { AnimatedIcon as default } from './AnimatedIcon';
|
|
70
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/animated/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAGH,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAG/E,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,GACf,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,YAAY,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animation presets for rn-iconify
|
|
3
|
+
* Pre-configured animations for common use cases
|
|
4
|
+
*/
|
|
5
|
+
import type { AnimationPreset, AnimationConfig, ResolvedAnimationConfig, AnimationType, AnimationEasing } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Preset animation configurations
|
|
8
|
+
*/
|
|
9
|
+
export declare const ANIMATION_PRESETS: Record<AnimationPreset, AnimationConfig>;
|
|
10
|
+
/**
|
|
11
|
+
* Convert easing string to React Native Easing function
|
|
12
|
+
*/
|
|
13
|
+
export declare function getEasingFunction(easing: AnimationEasing): (value: number) => number;
|
|
14
|
+
/**
|
|
15
|
+
* Resolve animation type to full configuration
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveAnimation(animation: AnimationType, overrides?: {
|
|
18
|
+
duration?: number;
|
|
19
|
+
loop?: boolean;
|
|
20
|
+
easing?: AnimationEasing;
|
|
21
|
+
delay?: number;
|
|
22
|
+
}): ResolvedAnimationConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Check if a string is a valid animation preset
|
|
25
|
+
*/
|
|
26
|
+
export declare function isAnimationPreset(value: string): value is AnimationPreset;
|
|
27
|
+
/**
|
|
28
|
+
* Get default duration for a preset
|
|
29
|
+
*/
|
|
30
|
+
export declare function getDefaultDuration(preset: AnimationPreset): number;
|
|
31
|
+
/**
|
|
32
|
+
* Get default loop setting for a preset
|
|
33
|
+
*/
|
|
34
|
+
export declare function getDefaultLoop(preset: AnimationPreset): boolean;
|
|
35
|
+
//# sourceMappingURL=presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../src/animated/presets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,eAAe,EAAE,eAAe,CA0FtE,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAqBpF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,aAAa,EACxB,SAAS,CAAC,EAAE;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACA,uBAAuB,CA2CzB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,eAAe,CAEzE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAElE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAE/D"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animation types for rn-iconify
|
|
3
|
+
* Supports preset animations and custom configurations
|
|
4
|
+
*/
|
|
5
|
+
import type { EasingFunction } from 'react-native';
|
|
6
|
+
/**
|
|
7
|
+
* Built-in animation presets
|
|
8
|
+
*/
|
|
9
|
+
export type AnimationPreset = 'spin' | 'pulse' | 'bounce' | 'shake' | 'ping' | 'wiggle';
|
|
10
|
+
/**
|
|
11
|
+
* Animation direction for reversible animations
|
|
12
|
+
*/
|
|
13
|
+
export type AnimationDirection = 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
|
|
14
|
+
/**
|
|
15
|
+
* Animation easing options
|
|
16
|
+
*/
|
|
17
|
+
export type AnimationEasing = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'bounce' | EasingFunction;
|
|
18
|
+
/**
|
|
19
|
+
* Custom animation configuration
|
|
20
|
+
*/
|
|
21
|
+
export interface AnimationConfig {
|
|
22
|
+
/**
|
|
23
|
+
* Animation type
|
|
24
|
+
*/
|
|
25
|
+
type: 'rotate' | 'scale' | 'opacity' | 'translate' | 'sequence';
|
|
26
|
+
/**
|
|
27
|
+
* Animation duration in milliseconds
|
|
28
|
+
* @default 1000
|
|
29
|
+
*/
|
|
30
|
+
duration?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to loop the animation
|
|
33
|
+
* @default true for spin/pulse/bounce/ping, false for shake/wiggle
|
|
34
|
+
*/
|
|
35
|
+
loop?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Number of times to loop (-1 for infinite)
|
|
38
|
+
* @default -1
|
|
39
|
+
*/
|
|
40
|
+
iterations?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Animation easing function
|
|
43
|
+
* @default varies by preset: 'linear' for spin, 'ease-in-out' for pulse/wiggle, 'bounce' for bounce, 'ease-out' for shake/ping
|
|
44
|
+
*/
|
|
45
|
+
easing?: AnimationEasing;
|
|
46
|
+
/**
|
|
47
|
+
* Animation direction
|
|
48
|
+
* @default 'normal'
|
|
49
|
+
*/
|
|
50
|
+
direction?: AnimationDirection;
|
|
51
|
+
/**
|
|
52
|
+
* Delay before animation starts (ms)
|
|
53
|
+
* @default 0
|
|
54
|
+
*/
|
|
55
|
+
delay?: number;
|
|
56
|
+
/**
|
|
57
|
+
* For rotate: degrees to rotate (default: 360)
|
|
58
|
+
* For scale: min/max scale values
|
|
59
|
+
* For opacity: min/max opacity values
|
|
60
|
+
* For translate: x/y translation values
|
|
61
|
+
*/
|
|
62
|
+
from?: number | {
|
|
63
|
+
x?: number;
|
|
64
|
+
y?: number;
|
|
65
|
+
};
|
|
66
|
+
to?: number | {
|
|
67
|
+
x?: number;
|
|
68
|
+
y?: number;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Animation prop type - can be a preset string or custom config
|
|
73
|
+
*/
|
|
74
|
+
export type AnimationType = AnimationPreset | AnimationConfig;
|
|
75
|
+
/**
|
|
76
|
+
* Resolved animation configuration with all defaults applied
|
|
77
|
+
*/
|
|
78
|
+
export interface ResolvedAnimationConfig {
|
|
79
|
+
type: AnimationConfig['type'];
|
|
80
|
+
duration: number;
|
|
81
|
+
loop: boolean;
|
|
82
|
+
iterations: number;
|
|
83
|
+
easing: AnimationEasing;
|
|
84
|
+
direction: AnimationDirection;
|
|
85
|
+
delay: number;
|
|
86
|
+
from: number | {
|
|
87
|
+
x: number;
|
|
88
|
+
y: number;
|
|
89
|
+
};
|
|
90
|
+
to: number | {
|
|
91
|
+
x: number;
|
|
92
|
+
y: number;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Animation state for tracking animation lifecycle
|
|
97
|
+
*/
|
|
98
|
+
export type AnimationState = 'idle' | 'running' | 'paused' | 'completed';
|
|
99
|
+
/**
|
|
100
|
+
* Animation control interface returned by useIconAnimation
|
|
101
|
+
*/
|
|
102
|
+
export interface AnimationControls {
|
|
103
|
+
/**
|
|
104
|
+
* Start the animation
|
|
105
|
+
*/
|
|
106
|
+
start: () => void;
|
|
107
|
+
/**
|
|
108
|
+
* Stop the animation
|
|
109
|
+
*/
|
|
110
|
+
stop: () => void;
|
|
111
|
+
/**
|
|
112
|
+
* Pause the animation
|
|
113
|
+
*/
|
|
114
|
+
pause: () => void;
|
|
115
|
+
/**
|
|
116
|
+
* Resume a paused animation
|
|
117
|
+
*/
|
|
118
|
+
resume: () => void;
|
|
119
|
+
/**
|
|
120
|
+
* Reset animation to initial state
|
|
121
|
+
*/
|
|
122
|
+
reset: () => void;
|
|
123
|
+
/**
|
|
124
|
+
* Current animation state
|
|
125
|
+
*/
|
|
126
|
+
state: AnimationState;
|
|
127
|
+
/**
|
|
128
|
+
* Whether animation is currently running
|
|
129
|
+
*/
|
|
130
|
+
isAnimating: boolean;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Props for animated icon components
|
|
134
|
+
*/
|
|
135
|
+
export interface AnimatedIconProps {
|
|
136
|
+
/**
|
|
137
|
+
* Icon element to animate
|
|
138
|
+
*/
|
|
139
|
+
children: React.ReactNode;
|
|
140
|
+
/**
|
|
141
|
+
* Animation to apply
|
|
142
|
+
* Can be a preset name or custom configuration
|
|
143
|
+
* @example 'spin'
|
|
144
|
+
* @example { type: 'rotate', duration: 2000, easing: 'linear' }
|
|
145
|
+
*/
|
|
146
|
+
animate?: AnimationType;
|
|
147
|
+
/**
|
|
148
|
+
* Animation duration override (ms)
|
|
149
|
+
* @default varies by preset
|
|
150
|
+
*/
|
|
151
|
+
animationDuration?: number;
|
|
152
|
+
/**
|
|
153
|
+
* Whether animation should loop
|
|
154
|
+
* @default true
|
|
155
|
+
*/
|
|
156
|
+
animationLoop?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Animation easing override
|
|
159
|
+
*/
|
|
160
|
+
animationEasing?: AnimationEasing;
|
|
161
|
+
/**
|
|
162
|
+
* Delay before animation starts (ms)
|
|
163
|
+
* @default 0
|
|
164
|
+
*/
|
|
165
|
+
animationDelay?: number;
|
|
166
|
+
/**
|
|
167
|
+
* Whether to start animation immediately
|
|
168
|
+
* @default true
|
|
169
|
+
*/
|
|
170
|
+
autoPlay?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Callback when animation completes (for non-looping animations)
|
|
173
|
+
*/
|
|
174
|
+
onAnimationComplete?: () => void;
|
|
175
|
+
/**
|
|
176
|
+
* Width of the animation container
|
|
177
|
+
*/
|
|
178
|
+
width?: number;
|
|
179
|
+
/**
|
|
180
|
+
* Height of the animation container
|
|
181
|
+
*/
|
|
182
|
+
height?: number;
|
|
183
|
+
/**
|
|
184
|
+
* Test ID for testing
|
|
185
|
+
*/
|
|
186
|
+
testID?: string;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Default animation durations by preset
|
|
190
|
+
*/
|
|
191
|
+
export declare const DEFAULT_ANIMATION_DURATIONS: Record<AnimationPreset, number>;
|
|
192
|
+
/**
|
|
193
|
+
* Default animation loop settings by preset
|
|
194
|
+
*/
|
|
195
|
+
export declare const DEFAULT_ANIMATION_LOOPS: Record<AnimationPreset, boolean>;
|
|
196
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/animated/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,mBAAmB,CAAC;AAE1F;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,QAAQ,GACR,MAAM,GACN,SAAS,GACT,UAAU,GACV,aAAa,GACb,QAAQ,GACR,cAAc,CAAC;AAEnB;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAEhE;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB;;;OAGG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG;QAAE,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,EAAE,CAAC,EAAE,MAAM,GAAG;QAAE,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,eAAe,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,EAAE,EAAE,MAAM,GAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IAEnB;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IAEjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAOvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,eAAe,EAAE,OAAO,CAOpE,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useIconAnimation - Hook for managing icon animations
|
|
3
|
+
* Handles Animated values, timing, and animation lifecycle
|
|
4
|
+
*/
|
|
5
|
+
import { Animated } from 'react-native';
|
|
6
|
+
import type { AnimationType, AnimationControls, AnimationEasing } from './types';
|
|
7
|
+
interface UseIconAnimationOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Animation configuration
|
|
10
|
+
*/
|
|
11
|
+
animation?: AnimationType;
|
|
12
|
+
/**
|
|
13
|
+
* Duration override (ms)
|
|
14
|
+
*/
|
|
15
|
+
duration?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Loop override
|
|
18
|
+
*/
|
|
19
|
+
loop?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Easing override
|
|
22
|
+
*/
|
|
23
|
+
easing?: AnimationEasing;
|
|
24
|
+
/**
|
|
25
|
+
* Delay before animation starts (ms)
|
|
26
|
+
*/
|
|
27
|
+
delay?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to start automatically
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
autoPlay?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Callback when animation completes
|
|
35
|
+
*/
|
|
36
|
+
onComplete?: () => void;
|
|
37
|
+
}
|
|
38
|
+
interface UseIconAnimationReturn extends AnimationControls {
|
|
39
|
+
/**
|
|
40
|
+
* Animated style to apply to the icon
|
|
41
|
+
*/
|
|
42
|
+
animatedStyle: {
|
|
43
|
+
transform?: Array<{
|
|
44
|
+
rotate: Animated.AnimatedInterpolation<string>;
|
|
45
|
+
} | {
|
|
46
|
+
scale: Animated.Value;
|
|
47
|
+
} | {
|
|
48
|
+
translateX: Animated.Value;
|
|
49
|
+
} | {
|
|
50
|
+
translateY: Animated.Value;
|
|
51
|
+
}>;
|
|
52
|
+
opacity?: Animated.Value;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Whether animation is enabled
|
|
56
|
+
*/
|
|
57
|
+
hasAnimation: boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Hook for managing icon animations
|
|
61
|
+
*/
|
|
62
|
+
export declare function useIconAnimation(options?: UseIconAnimationOptions): UseIconAnimationReturn;
|
|
63
|
+
export default useIconAnimation;
|
|
64
|
+
//# sourceMappingURL=useIconAnimation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIconAnimation.d.ts","sourceRoot":"","sources":["../../../src/animated/useIconAnimation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EACV,aAAa,EAEb,iBAAiB,EAEjB,eAAe,EAChB,MAAM,SAAS,CAAC;AAGjB,UAAU,uBAAuB;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,UAAU,sBAAuB,SAAQ,iBAAiB;IACxD;;OAEG;IACH,aAAa,EAAE;QACb,SAAS,CAAC,EAAE,KAAK,CACb;YAAE,MAAM,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAA;SAAE,GAClD;YAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAA;SAAE,GACzB;YAAE,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAA;SAAE,GAC9B;YAAE,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAA;SAAE,CACjC,CAAC;QACF,OAAO,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;KAC1B,CAAC;IAEF;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B,GAAG,sBAAsB,CA+S9F;AAED,eAAe,gBAAgB,CAAC"}
|