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,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Babel Plugin Visitor
|
|
3
|
+
* Main visitor logic for the rn-iconify Babel plugin
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { COMPONENT_PREFIX_MAP, VALID_COMPONENTS, getFilenameFromState, getFilenameFromFile } from './types';
|
|
7
|
+
import { getComponentName, getNameAttribute, isCallTo, extractArrayStrings, getNodeLocation } from './ast-utils';
|
|
8
|
+
import { collector } from './collector';
|
|
9
|
+
import { generateBundle } from './cache-writer';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Type guard to safely extract plugin options from 'this' context
|
|
13
|
+
*/
|
|
14
|
+
function hasPluginOpts(obj) {
|
|
15
|
+
return typeof obj === 'object' && obj !== null && 'opts' in obj && typeof obj.opts === 'object';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Safely get plugin options from 'this' context
|
|
20
|
+
*/
|
|
21
|
+
function getPluginOptions(context) {
|
|
22
|
+
if (hasPluginOpts(context)) {
|
|
23
|
+
return context.opts || {};
|
|
24
|
+
}
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Track which files have been fully processed
|
|
30
|
+
*/
|
|
31
|
+
const processedFiles = new Set();
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Track if build is in progress
|
|
35
|
+
*/
|
|
36
|
+
let buildInProgress = false;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Debounce timer for bundle generation
|
|
40
|
+
*/
|
|
41
|
+
let bundleTimer = null;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Project root directory
|
|
45
|
+
*/
|
|
46
|
+
let projectRoot = '';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Create the rn-iconify Babel plugin
|
|
50
|
+
*/
|
|
51
|
+
export function createRnIconifyPlugin(babel) {
|
|
52
|
+
const t = babel.types;
|
|
53
|
+
return {
|
|
54
|
+
name: 'rn-iconify',
|
|
55
|
+
pre(file) {
|
|
56
|
+
// Access plugin options through 'this' using type guard approach
|
|
57
|
+
const opts = getPluginOptions(this);
|
|
58
|
+
|
|
59
|
+
// Skip if disabled
|
|
60
|
+
if (opts.disabled) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Initialize collector on first file
|
|
65
|
+
if (!buildInProgress) {
|
|
66
|
+
buildInProgress = true;
|
|
67
|
+
collector.initialize(opts);
|
|
68
|
+
|
|
69
|
+
// Detect project root from file - uses type guards for safe access
|
|
70
|
+
const filename = getFilenameFromFile(file);
|
|
71
|
+
if (filename) {
|
|
72
|
+
// Try to find project root by looking for package.json
|
|
73
|
+
let dir = filename;
|
|
74
|
+
while (dir !== '/') {
|
|
75
|
+
dir = dir.substring(0, dir.lastIndexOf('/'));
|
|
76
|
+
try {
|
|
77
|
+
require.resolve(`${dir}/package.json`);
|
|
78
|
+
projectRoot = dir;
|
|
79
|
+
break;
|
|
80
|
+
} catch {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (!projectRoot) {
|
|
85
|
+
projectRoot = process.cwd();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (opts.verbose) {
|
|
89
|
+
console.log(`[rn-iconify] Build started. Project root: ${projectRoot}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
visitor: {
|
|
94
|
+
/**
|
|
95
|
+
* Visit import declarations to track which icon components are imported
|
|
96
|
+
* This helps us know which JSX elements to look for
|
|
97
|
+
*/
|
|
98
|
+
ImportDeclaration(path, state) {
|
|
99
|
+
const opts = state.opts || {};
|
|
100
|
+
if (opts.disabled) return;
|
|
101
|
+
const source = path.node.source.value;
|
|
102
|
+
|
|
103
|
+
// Only care about imports from rn-iconify
|
|
104
|
+
if (source !== 'rn-iconify' && !source.startsWith('rn-iconify/')) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Track imported icon components for this file
|
|
109
|
+
// (Not strictly necessary since we check COMPONENT_PREFIX_MAP, but could be optimized)
|
|
110
|
+
},
|
|
111
|
+
/**
|
|
112
|
+
* Visit JSX opening elements to find icon usage
|
|
113
|
+
* Handles: <Mdi name="home" />, <Heroicons name="user" />, etc.
|
|
114
|
+
*/
|
|
115
|
+
JSXOpeningElement(path, state) {
|
|
116
|
+
const opts = state.opts || {};
|
|
117
|
+
if (opts.disabled) return;
|
|
118
|
+
const filename = getFilenameFromState(state) || 'unknown';
|
|
119
|
+
|
|
120
|
+
// Get component name
|
|
121
|
+
const componentName = getComponentName(path.node, t);
|
|
122
|
+
if (!componentName) return;
|
|
123
|
+
|
|
124
|
+
// Check if it's a valid icon component
|
|
125
|
+
if (!VALID_COMPONENTS.has(componentName)) return;
|
|
126
|
+
|
|
127
|
+
// Get the icon name from the 'name' attribute
|
|
128
|
+
const iconName = getNameAttribute(path.node, t);
|
|
129
|
+
|
|
130
|
+
// Skip dynamic names
|
|
131
|
+
if (!iconName) {
|
|
132
|
+
if (opts.verbose) {
|
|
133
|
+
const loc = getNodeLocation(path.node);
|
|
134
|
+
console.log(`[rn-iconify] Skipping dynamic icon name in ${filename}:${loc.line} (component: ${componentName})`);
|
|
135
|
+
}
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Get prefix from component name
|
|
140
|
+
const prefix = COMPONENT_PREFIX_MAP[componentName];
|
|
141
|
+
if (!prefix) return;
|
|
142
|
+
|
|
143
|
+
// Build full icon name
|
|
144
|
+
const fullIconName = `${prefix}:${iconName}`;
|
|
145
|
+
|
|
146
|
+
// Add to collector
|
|
147
|
+
const loc = getNodeLocation(path.node);
|
|
148
|
+
collector.add(fullIconName, filename, loc.line, loc.column);
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* Visit call expressions to find prefetchIcons usage
|
|
152
|
+
* Handles: prefetchIcons(['mdi:home', 'mdi:settings'])
|
|
153
|
+
*/
|
|
154
|
+
CallExpression(path, state) {
|
|
155
|
+
const opts = state.opts || {};
|
|
156
|
+
if (opts.disabled) return;
|
|
157
|
+
const filename = getFilenameFromState(state) || 'unknown';
|
|
158
|
+
|
|
159
|
+
// Check if this is a call to prefetchIcons
|
|
160
|
+
if (!isCallTo(path, 'prefetchIcons', t)) return;
|
|
161
|
+
|
|
162
|
+
// Get the first argument (should be an array of icon names)
|
|
163
|
+
const firstArg = path.node.arguments[0];
|
|
164
|
+
const iconNames = extractArrayStrings(firstArg, t);
|
|
165
|
+
|
|
166
|
+
// Add each icon to collector
|
|
167
|
+
const loc = getNodeLocation(path.node);
|
|
168
|
+
for (const iconName of iconNames) {
|
|
169
|
+
collector.add(iconName, filename, loc.line, loc.column);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
post(file) {
|
|
174
|
+
const opts = getPluginOptions(this);
|
|
175
|
+
if (opts.disabled) return;
|
|
176
|
+
const filename = getFilenameFromFile(file);
|
|
177
|
+
|
|
178
|
+
// Mark file as processed
|
|
179
|
+
if (filename) {
|
|
180
|
+
processedFiles.add(filename);
|
|
181
|
+
collector.markFileProcessed(filename);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Debounce bundle generation
|
|
185
|
+
// Metro processes files in parallel, so we wait for a quiet period
|
|
186
|
+
if (bundleTimer) {
|
|
187
|
+
clearTimeout(bundleTimer);
|
|
188
|
+
}
|
|
189
|
+
bundleTimer = setTimeout(async () => {
|
|
190
|
+
// Only generate if we have icons and haven't already generated
|
|
191
|
+
if (collector.hasIcons() && !collector.isBundleGenerated()) {
|
|
192
|
+
collector.markBundleGenerated();
|
|
193
|
+
collector.printSummary();
|
|
194
|
+
try {
|
|
195
|
+
await generateBundle(collector.getIconNames(), opts, projectRoot);
|
|
196
|
+
} catch (error) {
|
|
197
|
+
console.error('[rn-iconify] Bundle generation error:', error);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Reset for next build
|
|
201
|
+
buildInProgress = false;
|
|
202
|
+
}
|
|
203
|
+
}, 500); // Wait 500ms after last file to ensure all files are processed
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Reset plugin state (for testing)
|
|
210
|
+
*/
|
|
211
|
+
export function resetPluginState() {
|
|
212
|
+
processedFiles.clear();
|
|
213
|
+
buildInProgress = false;
|
|
214
|
+
if (bundleTimer) {
|
|
215
|
+
clearTimeout(bundleTimer);
|
|
216
|
+
bundleTimer = null;
|
|
217
|
+
}
|
|
218
|
+
collector.reset();
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["COMPONENT_PREFIX_MAP","VALID_COMPONENTS","getFilenameFromState","getFilenameFromFile","getComponentName","getNameAttribute","isCallTo","extractArrayStrings","getNodeLocation","collector","generateBundle","hasPluginOpts","obj","opts","getPluginOptions","context","processedFiles","Set","buildInProgress","bundleTimer","projectRoot","createRnIconifyPlugin","babel","t","types","name","pre","file","disabled","initialize","filename","dir","substring","lastIndexOf","require","resolve","process","cwd","verbose","console","log","visitor","ImportDeclaration","path","state","source","node","value","startsWith","JSXOpeningElement","componentName","has","iconName","loc","line","prefix","fullIconName","add","column","CallExpression","firstArg","arguments","iconNames","post","markFileProcessed","clearTimeout","setTimeout","hasIcons","isBundleGenerated","markBundleGenerated","printSummary","getIconNames","error","resetPluginState","clear","reset"],"sourceRoot":"../../../src","sources":["babel/plugin.ts"],"mappings":"AAAA;AACA;AACA;AACA;;AAIA,SACEA,o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AAC;UAC/D;;UAEA;UACAtD,eAAe,GAAG,KAAK;QACzB;MACF,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IACX;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA,OAAO,SAASuD,gBAAgBA,CAAA,EAAS;EACvCzD,cAAc,CAAC0D,KAAK,CAAC,CAAC;EACtBxD,eAAe,GAAG,KAAK;EACvB,IAAIC,WAAW,EAAE;IACf8C,YAAY,CAAC9C,WAAW,CAAC;IACzBA,WAAW,GAAG,IAAI;EACpB;EACAV,SAAS,CAACkE,KAAK,CAAC,CAAC;AACnB","ignoreList":[]}
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Babel Plugin Types
|
|
3
|
+
* Type definitions for the rn-iconify Babel plugin
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Plugin options that can be passed in babel.config.js
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Babel file object structure (for pre/post hooks)
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Plugin state passed between visitors
|
|
16
|
+
* Matches Babel's internal state structure
|
|
17
|
+
* Note: filename and file may not always be present depending on Babel version/config
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Type guard to check if an object has opts with filename
|
|
22
|
+
*/
|
|
23
|
+
function hasOptsWithFilename(obj) {
|
|
24
|
+
return typeof obj === 'object' && obj !== null && 'opts' in obj && typeof obj.opts === 'object' && obj.opts !== null && 'filename' in obj.opts && typeof obj.opts.filename === 'string';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Type guard to check if an object has a filename property
|
|
29
|
+
*/
|
|
30
|
+
function hasFilename(obj) {
|
|
31
|
+
return typeof obj === 'object' && obj !== null && 'filename' in obj && typeof obj.filename === 'string';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Type guard to check if an object has file.opts.filename
|
|
36
|
+
*/
|
|
37
|
+
function hasFileOptsFilename(obj) {
|
|
38
|
+
return typeof obj === 'object' && obj !== null && 'file' in obj && hasOptsWithFilename(obj.file);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Helper to safely extract filename from visitor state
|
|
43
|
+
*/
|
|
44
|
+
export function getFilenameFromState(state) {
|
|
45
|
+
// Babel provides filename directly on state
|
|
46
|
+
if (state.filename) {
|
|
47
|
+
return state.filename;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Fallback to file.opts.filename
|
|
51
|
+
if (state.file?.opts?.filename) {
|
|
52
|
+
return state.file.opts.filename;
|
|
53
|
+
}
|
|
54
|
+
return '';
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Helper to safely extract filename from any object (pre/post hooks or visitor state)
|
|
59
|
+
* Uses type guards to safely access nested properties
|
|
60
|
+
*/
|
|
61
|
+
export function getFilename(obj) {
|
|
62
|
+
// Check for direct filename property
|
|
63
|
+
if (hasFilename(obj)) {
|
|
64
|
+
return obj.filename;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Check for opts.filename (BabelFile structure)
|
|
68
|
+
if (hasOptsWithFilename(obj)) {
|
|
69
|
+
return obj.opts.filename;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Check for file.opts.filename
|
|
73
|
+
if (hasFileOptsFilename(obj)) {
|
|
74
|
+
return obj.file.opts.filename;
|
|
75
|
+
}
|
|
76
|
+
return '';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Alias for getFilename - used in pre/post hooks where file object is passed
|
|
81
|
+
* This is a more descriptive name for when working with BabelFile objects
|
|
82
|
+
*/
|
|
83
|
+
export function getFilenameFromFile(file) {
|
|
84
|
+
return getFilename(file);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Collected icon information
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Icon bundle structure (matches CLI output)
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* JSX visitor function type
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Call expression visitor function type
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Complete mapping of React component names to Iconify prefixes
|
|
105
|
+
* This covers all 200+ icon sets available in rn-iconify
|
|
106
|
+
*/
|
|
107
|
+
export const COMPONENT_PREFIX_MAP = {
|
|
108
|
+
// Popular icon sets
|
|
109
|
+
Mdi: 'mdi',
|
|
110
|
+
MdiLight: 'mdi-light',
|
|
111
|
+
Heroicons: 'heroicons',
|
|
112
|
+
HeroiconsOutline: 'heroicons-outline',
|
|
113
|
+
HeroiconsSolid: 'heroicons-solid',
|
|
114
|
+
Lucide: 'lucide',
|
|
115
|
+
LucideLab: 'lucide-lab',
|
|
116
|
+
Ph: 'ph',
|
|
117
|
+
Feather: 'feather',
|
|
118
|
+
Tabler: 'tabler',
|
|
119
|
+
Bi: 'bi',
|
|
120
|
+
Ri: 'ri',
|
|
121
|
+
Carbon: 'carbon',
|
|
122
|
+
Ion: 'ion',
|
|
123
|
+
Octicon: 'octicon',
|
|
124
|
+
SimpleIcons: 'simple-icons',
|
|
125
|
+
Logos: 'logos',
|
|
126
|
+
Solar: 'solar',
|
|
127
|
+
Iconoir: 'iconoir',
|
|
128
|
+
// Font Awesome
|
|
129
|
+
Fa: 'fa',
|
|
130
|
+
FaBrands: 'fa-brands',
|
|
131
|
+
FaRegular: 'fa-regular',
|
|
132
|
+
FaSolid: 'fa-solid',
|
|
133
|
+
Fa6Solid: 'fa6-solid',
|
|
134
|
+
Fa6Regular: 'fa6-regular',
|
|
135
|
+
Fa6Brands: 'fa6-brands',
|
|
136
|
+
Fa7Solid: 'fa7-solid',
|
|
137
|
+
Fa7Regular: 'fa7-regular',
|
|
138
|
+
Fa7Brands: 'fa7-brands',
|
|
139
|
+
Fad: 'fad',
|
|
140
|
+
// Fluent
|
|
141
|
+
Fluent: 'fluent',
|
|
142
|
+
FluentColor: 'fluent-color',
|
|
143
|
+
FluentEmoji: 'fluent-emoji',
|
|
144
|
+
FluentEmojiFlat: 'fluent-emoji-flat',
|
|
145
|
+
FluentEmojiHighContrast: 'fluent-emoji-high-contrast',
|
|
146
|
+
FluentMdl2: 'fluent-mdl2',
|
|
147
|
+
// Material
|
|
148
|
+
MaterialSymbols: 'material-symbols',
|
|
149
|
+
MaterialSymbolsLight: 'material-symbols-light',
|
|
150
|
+
MaterialIconTheme: 'material-icon-theme',
|
|
151
|
+
// Ant Design
|
|
152
|
+
AntDesign: 'ant-design',
|
|
153
|
+
// Academicons
|
|
154
|
+
Academicons: 'academicons',
|
|
155
|
+
// Akar
|
|
156
|
+
AkarIcons: 'akar-icons',
|
|
157
|
+
// Arcticons
|
|
158
|
+
Arcticons: 'arcticons',
|
|
159
|
+
// Basil
|
|
160
|
+
Basil: 'basil',
|
|
161
|
+
// Bitcoin
|
|
162
|
+
BitcoinIcons: 'bitcoin-icons',
|
|
163
|
+
// BPMN
|
|
164
|
+
Bpmn: 'bpmn',
|
|
165
|
+
// Brandico
|
|
166
|
+
Brandico: 'brandico',
|
|
167
|
+
// BoxIcons
|
|
168
|
+
Bx: 'bx',
|
|
169
|
+
Bxl: 'bxl',
|
|
170
|
+
Bxs: 'bxs',
|
|
171
|
+
// Bytesize
|
|
172
|
+
Bytesize: 'bytesize',
|
|
173
|
+
// Catppuccin
|
|
174
|
+
Catppuccin: 'catppuccin',
|
|
175
|
+
// CBI
|
|
176
|
+
Cbi: 'cbi',
|
|
177
|
+
// Charm
|
|
178
|
+
Charm: 'charm',
|
|
179
|
+
// Coolicons
|
|
180
|
+
Ci: 'ci',
|
|
181
|
+
// CoreUI
|
|
182
|
+
Cib: 'cib',
|
|
183
|
+
Cif: 'cif',
|
|
184
|
+
Cil: 'cil',
|
|
185
|
+
// Circle Flags
|
|
186
|
+
CircleFlags: 'circle-flags',
|
|
187
|
+
// Circum
|
|
188
|
+
Circum: 'circum',
|
|
189
|
+
// Clarity
|
|
190
|
+
Clarity: 'clarity',
|
|
191
|
+
// Codex
|
|
192
|
+
Codex: 'codex',
|
|
193
|
+
// Codicon
|
|
194
|
+
Codicon: 'codicon',
|
|
195
|
+
// Covid
|
|
196
|
+
Covid: 'covid',
|
|
197
|
+
// Cryptocurrency
|
|
198
|
+
Cryptocurrency: 'cryptocurrency',
|
|
199
|
+
CryptocurrencyColor: 'cryptocurrency-color',
|
|
200
|
+
// Cuida
|
|
201
|
+
Cuida: 'cuida',
|
|
202
|
+
// Dashicons
|
|
203
|
+
Dashicons: 'dashicons',
|
|
204
|
+
// Devicon
|
|
205
|
+
Devicon: 'devicon',
|
|
206
|
+
DeviconPlain: 'devicon-plain',
|
|
207
|
+
// Dinkie
|
|
208
|
+
DinkieIcons: 'dinkie-icons',
|
|
209
|
+
// Duo
|
|
210
|
+
DuoIcons: 'duo-icons',
|
|
211
|
+
// Evil Icons
|
|
212
|
+
Ei: 'ei',
|
|
213
|
+
// Elusive
|
|
214
|
+
El: 'el',
|
|
215
|
+
// Emojione
|
|
216
|
+
EmojioneMonotone: 'emojione-monotone',
|
|
217
|
+
// Entypo
|
|
218
|
+
Entypo: 'entypo',
|
|
219
|
+
EntypoSocial: 'entypo-social',
|
|
220
|
+
// EOS Icons
|
|
221
|
+
EosIcons: 'eos-icons',
|
|
222
|
+
// Element Plus
|
|
223
|
+
Ep: 'ep',
|
|
224
|
+
// Elegant Themes
|
|
225
|
+
Et: 'et',
|
|
226
|
+
// Eva
|
|
227
|
+
Eva: 'eva',
|
|
228
|
+
// Framework7
|
|
229
|
+
F7: 'f7',
|
|
230
|
+
// Famicons
|
|
231
|
+
Famicons: 'famicons',
|
|
232
|
+
// Feather (alternate)
|
|
233
|
+
Fe: 'fe',
|
|
234
|
+
// File Icons
|
|
235
|
+
FileIcons: 'file-icons',
|
|
236
|
+
// Flags
|
|
237
|
+
Flag: 'flag',
|
|
238
|
+
Flagpack: 'flagpack',
|
|
239
|
+
// Flat UI
|
|
240
|
+
FlatUi: 'flat-ui',
|
|
241
|
+
// Flowbite
|
|
242
|
+
Flowbite: 'flowbite',
|
|
243
|
+
// Fontelico
|
|
244
|
+
Fontelico: 'fontelico',
|
|
245
|
+
// Fontisto
|
|
246
|
+
Fontisto: 'fontisto',
|
|
247
|
+
// Formkit
|
|
248
|
+
Formkit: 'formkit',
|
|
249
|
+
// Foundation
|
|
250
|
+
Foundation: 'foundation',
|
|
251
|
+
// Gala
|
|
252
|
+
Gala: 'gala',
|
|
253
|
+
// Game Icons
|
|
254
|
+
GameIcons: 'game-icons',
|
|
255
|
+
// Garden
|
|
256
|
+
Garden: 'garden',
|
|
257
|
+
// Geo
|
|
258
|
+
Geo: 'geo',
|
|
259
|
+
// GG
|
|
260
|
+
Gg: 'gg',
|
|
261
|
+
// GIS
|
|
262
|
+
Gis: 'gis',
|
|
263
|
+
// Gravity UI
|
|
264
|
+
GravityUi: 'gravity-ui',
|
|
265
|
+
// Gridicons
|
|
266
|
+
Gridicons: 'gridicons',
|
|
267
|
+
// Grommet
|
|
268
|
+
GrommetIcons: 'grommet-icons',
|
|
269
|
+
// Guidance
|
|
270
|
+
Guidance: 'guidance',
|
|
271
|
+
// Health Icons
|
|
272
|
+
Healthicons: 'healthicons',
|
|
273
|
+
// Hugeicons
|
|
274
|
+
Hugeicons: 'hugeicons',
|
|
275
|
+
// Humble
|
|
276
|
+
Humbleicons: 'humbleicons',
|
|
277
|
+
// Google Material (IC)
|
|
278
|
+
Ic: 'ic',
|
|
279
|
+
// IcoMoon
|
|
280
|
+
IcomoonFree: 'icomoon-free',
|
|
281
|
+
// Icon Park
|
|
282
|
+
IconPark: 'icon-park',
|
|
283
|
+
IconParkOutline: 'icon-park-outline',
|
|
284
|
+
IconParkSolid: 'icon-park-solid',
|
|
285
|
+
IconParkTwotone: 'icon-park-twotone',
|
|
286
|
+
// Iconamoon
|
|
287
|
+
Iconamoon: 'iconamoon',
|
|
288
|
+
// Icons8
|
|
289
|
+
Icons8: 'icons8',
|
|
290
|
+
// IL
|
|
291
|
+
Il: 'il',
|
|
292
|
+
// IWWA
|
|
293
|
+
Iwwa: 'iwwa',
|
|
294
|
+
// IX
|
|
295
|
+
Ix: 'ix',
|
|
296
|
+
// Jam
|
|
297
|
+
Jam: 'jam',
|
|
298
|
+
// Line Awesome
|
|
299
|
+
La: 'la',
|
|
300
|
+
// Lets Icons
|
|
301
|
+
LetsIcons: 'lets-icons',
|
|
302
|
+
// Line MD
|
|
303
|
+
LineMd: 'line-md',
|
|
304
|
+
// Line Icons
|
|
305
|
+
Lineicons: 'lineicons',
|
|
306
|
+
// LS
|
|
307
|
+
Ls: 'ls',
|
|
308
|
+
Lsicon: 'lsicon',
|
|
309
|
+
// Mage
|
|
310
|
+
Mage: 'mage',
|
|
311
|
+
// Majesticons
|
|
312
|
+
Majesticons: 'majesticons',
|
|
313
|
+
// Maki
|
|
314
|
+
Maki: 'maki',
|
|
315
|
+
// Map
|
|
316
|
+
Map: 'map',
|
|
317
|
+
// Marketeq
|
|
318
|
+
Marketeq: 'marketeq',
|
|
319
|
+
// Medical
|
|
320
|
+
MedicalIcon: 'medical-icon',
|
|
321
|
+
// Memory
|
|
322
|
+
Memory: 'memory',
|
|
323
|
+
// Meteocons
|
|
324
|
+
Meteocons: 'meteocons',
|
|
325
|
+
// Meteor Icons
|
|
326
|
+
MeteorIcons: 'meteor-icons',
|
|
327
|
+
// MI
|
|
328
|
+
Mi: 'mi',
|
|
329
|
+
// Mingcute
|
|
330
|
+
Mingcute: 'mingcute',
|
|
331
|
+
// Mono
|
|
332
|
+
MonoIcons: 'mono-icons',
|
|
333
|
+
// Mynaui
|
|
334
|
+
Mynaui: 'mynaui',
|
|
335
|
+
// Nimbus
|
|
336
|
+
Nimbus: 'nimbus',
|
|
337
|
+
// Nonicons
|
|
338
|
+
Nonicons: 'nonicons',
|
|
339
|
+
// NRK
|
|
340
|
+
Nrk: 'nrk',
|
|
341
|
+
// Open Iconic
|
|
342
|
+
Oi: 'oi',
|
|
343
|
+
// OOUI
|
|
344
|
+
Ooui: 'ooui',
|
|
345
|
+
// OUI (Elastic)
|
|
346
|
+
Oui: 'oui',
|
|
347
|
+
// Pajamas (GitLab)
|
|
348
|
+
Pajamas: 'pajamas',
|
|
349
|
+
// Pepicons
|
|
350
|
+
Pepicons: 'pepicons',
|
|
351
|
+
PepiconsPencil: 'pepicons-pencil',
|
|
352
|
+
PepiconsPop: 'pepicons-pop',
|
|
353
|
+
PepiconsPrint: 'pepicons-print',
|
|
354
|
+
// Picon
|
|
355
|
+
Picon: 'picon',
|
|
356
|
+
// Pixel
|
|
357
|
+
Pixel: 'pixel',
|
|
358
|
+
Pixelarticons: 'pixelarticons',
|
|
359
|
+
// Prime
|
|
360
|
+
Prime: 'prime',
|
|
361
|
+
// Proicons
|
|
362
|
+
Proicons: 'proicons',
|
|
363
|
+
// PS
|
|
364
|
+
Ps: 'ps',
|
|
365
|
+
// Qlementine
|
|
366
|
+
QlementineIcons: 'qlementine-icons',
|
|
367
|
+
// Quill
|
|
368
|
+
Quill: 'quill',
|
|
369
|
+
// Radix
|
|
370
|
+
RadixIcons: 'radix-icons',
|
|
371
|
+
// Raphael
|
|
372
|
+
Raphael: 'raphael',
|
|
373
|
+
// Rivet
|
|
374
|
+
RivetIcons: 'rivet-icons',
|
|
375
|
+
// Roentgen
|
|
376
|
+
Roentgen: 'roentgen',
|
|
377
|
+
// SI
|
|
378
|
+
Si: 'si',
|
|
379
|
+
SiGlyph: 'si-glyph',
|
|
380
|
+
// Sidekick
|
|
381
|
+
Sidekickicons: 'sidekickicons',
|
|
382
|
+
// Simple Line
|
|
383
|
+
SimpleLineIcons: 'simple-line-icons',
|
|
384
|
+
// Skill Icons
|
|
385
|
+
SkillIcons: 'skill-icons',
|
|
386
|
+
// Stash
|
|
387
|
+
Stash: 'stash',
|
|
388
|
+
// Streamline
|
|
389
|
+
Streamline: 'streamline',
|
|
390
|
+
StreamlineBlock: 'streamline-block',
|
|
391
|
+
StreamlineColor: 'streamline-color',
|
|
392
|
+
StreamlineCyber: 'streamline-cyber',
|
|
393
|
+
StreamlineCyberColor: 'streamline-cyber-color',
|
|
394
|
+
StreamlineEmojis: 'streamline-emojis',
|
|
395
|
+
StreamlineFlex: 'streamline-flex',
|
|
396
|
+
StreamlineFlexColor: 'streamline-flex-color',
|
|
397
|
+
StreamlineFreehand: 'streamline-freehand',
|
|
398
|
+
StreamlineFreehandColor: 'streamline-freehand-color',
|
|
399
|
+
StreamlineKameleonColor: 'streamline-kameleon-color',
|
|
400
|
+
StreamlineLogos: 'streamline-logos',
|
|
401
|
+
StreamlinePixel: 'streamline-pixel',
|
|
402
|
+
StreamlinePlump: 'streamline-plump',
|
|
403
|
+
StreamlinePlumpColor: 'streamline-plump-color',
|
|
404
|
+
StreamlineSharp: 'streamline-sharp',
|
|
405
|
+
StreamlineSharpColor: 'streamline-sharp-color',
|
|
406
|
+
StreamlineStickiesColor: 'streamline-stickies-color',
|
|
407
|
+
StreamlineUltimate: 'streamline-ultimate',
|
|
408
|
+
StreamlineUltimateColor: 'streamline-ultimate-color',
|
|
409
|
+
// Subway
|
|
410
|
+
Subway: 'subway',
|
|
411
|
+
// SVG Spinners
|
|
412
|
+
SvgSpinners: 'svg-spinners',
|
|
413
|
+
// System UIcons
|
|
414
|
+
SystemUicons: 'system-uicons',
|
|
415
|
+
// TDesign
|
|
416
|
+
Tdesign: 'tdesign',
|
|
417
|
+
// Teenyicons
|
|
418
|
+
Teenyicons: 'teenyicons',
|
|
419
|
+
// Temaki
|
|
420
|
+
Temaki: 'temaki',
|
|
421
|
+
// Token
|
|
422
|
+
Token: 'token',
|
|
423
|
+
TokenBranded: 'token-branded',
|
|
424
|
+
// Topcoat
|
|
425
|
+
Topcoat: 'topcoat',
|
|
426
|
+
// Typicons
|
|
427
|
+
Typcn: 'typcn',
|
|
428
|
+
// Unicons
|
|
429
|
+
Uil: 'uil',
|
|
430
|
+
Uim: 'uim',
|
|
431
|
+
Uis: 'uis',
|
|
432
|
+
Uit: 'uit',
|
|
433
|
+
// UIW
|
|
434
|
+
Uiw: 'uiw',
|
|
435
|
+
// UnJS
|
|
436
|
+
Unjs: 'unjs',
|
|
437
|
+
// Vaadin
|
|
438
|
+
Vaadin: 'vaadin',
|
|
439
|
+
// VS
|
|
440
|
+
Vs: 'vs',
|
|
441
|
+
// VSCode Icons
|
|
442
|
+
VscodeIcons: 'vscode-icons',
|
|
443
|
+
// Web Symbol
|
|
444
|
+
Websymbol: 'websymbol',
|
|
445
|
+
// WeUI
|
|
446
|
+
Weui: 'weui',
|
|
447
|
+
// WHH
|
|
448
|
+
Whh: 'whh',
|
|
449
|
+
// Weather Icons
|
|
450
|
+
Wi: 'wi',
|
|
451
|
+
// WPF
|
|
452
|
+
Wpf: 'wpf',
|
|
453
|
+
// ZMDI
|
|
454
|
+
Zmdi: 'zmdi',
|
|
455
|
+
// Zondicons
|
|
456
|
+
Zondicons: 'zondicons'
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Reverse map: prefix -> component name
|
|
461
|
+
*/
|
|
462
|
+
export const PREFIX_COMPONENT_MAP = Object.entries(COMPONENT_PREFIX_MAP).reduce((acc, [component, prefix]) => {
|
|
463
|
+
acc[prefix] = component;
|
|
464
|
+
return acc;
|
|
465
|
+
}, {});
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Set of all valid component names for fast lookup
|
|
469
|
+
*/
|
|
470
|
+
export const VALID_COMPONENTS = new Set(Object.keys(COMPONENT_PREFIX_MAP));
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Set of all valid prefixes for fast lookup
|
|
474
|
+
*/
|
|
475
|
+
export const VALID_PREFIXES = new Set(Object.values(COMPONENT_PREFIX_MAP));
|
|
476
|
+
//# sourceMappingURL=types.js.map
|