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,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performance monitoring types for rn-iconify
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Icon load event type
|
|
6
|
+
*/
|
|
7
|
+
export type LoadEventType = 'memory_hit' | 'bundled_hit' | 'disk_hit' | 'network_fetch' | 'error';
|
|
8
|
+
/**
|
|
9
|
+
* Single icon load event
|
|
10
|
+
*/
|
|
11
|
+
export interface IconLoadEvent {
|
|
12
|
+
/**
|
|
13
|
+
* Icon name (e.g., "mdi:home")
|
|
14
|
+
*/
|
|
15
|
+
iconName: string;
|
|
16
|
+
/**
|
|
17
|
+
* Event type
|
|
18
|
+
*/
|
|
19
|
+
type: LoadEventType;
|
|
20
|
+
/**
|
|
21
|
+
* Load time in milliseconds
|
|
22
|
+
*/
|
|
23
|
+
duration: number;
|
|
24
|
+
/**
|
|
25
|
+
* Timestamp of the event
|
|
26
|
+
*/
|
|
27
|
+
timestamp: number;
|
|
28
|
+
/**
|
|
29
|
+
* Error message if type is 'error'
|
|
30
|
+
*/
|
|
31
|
+
error?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Cache statistics
|
|
35
|
+
*/
|
|
36
|
+
export interface CacheStatistics {
|
|
37
|
+
/**
|
|
38
|
+
* Number of memory cache hits
|
|
39
|
+
*/
|
|
40
|
+
memoryHits: number;
|
|
41
|
+
/**
|
|
42
|
+
* Number of bundled icon hits
|
|
43
|
+
*/
|
|
44
|
+
bundledHits: number;
|
|
45
|
+
/**
|
|
46
|
+
* Number of disk cache hits
|
|
47
|
+
*/
|
|
48
|
+
diskHits: number;
|
|
49
|
+
/**
|
|
50
|
+
* Number of network fetches
|
|
51
|
+
*/
|
|
52
|
+
networkFetches: number;
|
|
53
|
+
/**
|
|
54
|
+
* Number of errors
|
|
55
|
+
*/
|
|
56
|
+
errors: number;
|
|
57
|
+
/**
|
|
58
|
+
* Total requests
|
|
59
|
+
*/
|
|
60
|
+
totalRequests: number;
|
|
61
|
+
/**
|
|
62
|
+
* Cache hit rate (0-1)
|
|
63
|
+
*/
|
|
64
|
+
hitRate: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Performance summary
|
|
68
|
+
*/
|
|
69
|
+
export interface PerformanceSummary {
|
|
70
|
+
/**
|
|
71
|
+
* Average load time in milliseconds
|
|
72
|
+
*/
|
|
73
|
+
avgLoadTime: number;
|
|
74
|
+
/**
|
|
75
|
+
* Minimum load time in milliseconds
|
|
76
|
+
*/
|
|
77
|
+
minLoadTime: number;
|
|
78
|
+
/**
|
|
79
|
+
* Maximum load time in milliseconds
|
|
80
|
+
*/
|
|
81
|
+
maxLoadTime: number;
|
|
82
|
+
/**
|
|
83
|
+
* 50th percentile (median) load time
|
|
84
|
+
*/
|
|
85
|
+
p50LoadTime: number;
|
|
86
|
+
/**
|
|
87
|
+
* 90th percentile load time
|
|
88
|
+
*/
|
|
89
|
+
p90LoadTime: number;
|
|
90
|
+
/**
|
|
91
|
+
* 99th percentile load time
|
|
92
|
+
*/
|
|
93
|
+
p99LoadTime: number;
|
|
94
|
+
/**
|
|
95
|
+
* Total icons loaded
|
|
96
|
+
*/
|
|
97
|
+
totalLoads: number;
|
|
98
|
+
/**
|
|
99
|
+
* Total errors
|
|
100
|
+
*/
|
|
101
|
+
totalErrors: number;
|
|
102
|
+
/**
|
|
103
|
+
* Uptime since monitoring started (ms)
|
|
104
|
+
*/
|
|
105
|
+
uptime: number;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Complete performance report
|
|
109
|
+
*/
|
|
110
|
+
export interface PerformanceReport {
|
|
111
|
+
/**
|
|
112
|
+
* Performance summary
|
|
113
|
+
*/
|
|
114
|
+
summary: PerformanceSummary;
|
|
115
|
+
/**
|
|
116
|
+
* Cache statistics
|
|
117
|
+
*/
|
|
118
|
+
cacheStats: CacheStatistics;
|
|
119
|
+
/**
|
|
120
|
+
* Load time breakdown by type
|
|
121
|
+
*/
|
|
122
|
+
loadTimesByType: {
|
|
123
|
+
memory: number;
|
|
124
|
+
bundled: number;
|
|
125
|
+
disk: number;
|
|
126
|
+
network: number;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Top slowest icons
|
|
130
|
+
*/
|
|
131
|
+
slowestIcons: Array<{
|
|
132
|
+
iconName: string;
|
|
133
|
+
avgDuration: number;
|
|
134
|
+
count: number;
|
|
135
|
+
}>;
|
|
136
|
+
/**
|
|
137
|
+
* Most frequently loaded icons
|
|
138
|
+
*/
|
|
139
|
+
mostUsedIcons: Array<{
|
|
140
|
+
iconName: string;
|
|
141
|
+
count: number;
|
|
142
|
+
}>;
|
|
143
|
+
/**
|
|
144
|
+
* Recent events
|
|
145
|
+
*/
|
|
146
|
+
recentEvents: IconLoadEvent[];
|
|
147
|
+
/**
|
|
148
|
+
* Report timestamp
|
|
149
|
+
*/
|
|
150
|
+
generatedAt: number;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Performance listener callback
|
|
154
|
+
*/
|
|
155
|
+
export type PerformanceListener = (event: IconLoadEvent) => void;
|
|
156
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/performance/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,GAAG,eAAe,GAAG,OAAO,CAAC;AAElG;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC;IAE5B;;OAEG;IACH,UAAU,EAAE,eAAe,CAAC;IAE5B;;OAEG;IACH,eAAe,EAAE;QACf,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAEF;;OAEG;IACH,YAAY,EAAE,KAAK,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;IAEH;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;IAEH;;OAEG;IACH,YAAY,EAAE,aAAa,EAAE,CAAC;IAE9B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PlaceholderFactory
|
|
3
|
+
* Creates the appropriate placeholder component based on type
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import type { PlaceholderType, PlaceholderConfig } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* Props for PlaceholderFactory
|
|
9
|
+
*/
|
|
10
|
+
export interface PlaceholderFactoryProps extends PlaceholderConfig {
|
|
11
|
+
/**
|
|
12
|
+
* Type of placeholder to render
|
|
13
|
+
*/
|
|
14
|
+
type: PlaceholderType;
|
|
15
|
+
/**
|
|
16
|
+
* Width of the placeholder
|
|
17
|
+
*/
|
|
18
|
+
width: number;
|
|
19
|
+
/**
|
|
20
|
+
* Height of the placeholder
|
|
21
|
+
*/
|
|
22
|
+
height: number;
|
|
23
|
+
/**
|
|
24
|
+
* Test ID for testing
|
|
25
|
+
*/
|
|
26
|
+
testID?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* PlaceholderFactory - renders the appropriate placeholder component
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* // Using preset
|
|
34
|
+
* <PlaceholderFactory type="shimmer" width={24} height={24} />
|
|
35
|
+
*
|
|
36
|
+
* // Using custom component
|
|
37
|
+
* <PlaceholderFactory type={<ActivityIndicator />} width={24} height={24} />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function PlaceholderFactory({ type, width, height, color, highlightColor, duration, borderRadius, testID, }: PlaceholderFactoryProps): React.ReactElement | null;
|
|
41
|
+
export declare namespace PlaceholderFactory {
|
|
42
|
+
var displayName: string;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=PlaceholderFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaceholderFactory.d.ts","sourceRoot":"","sources":["../../../src/placeholder/PlaceholderFactory.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAyB,MAAM,OAAO,CAAC;AAK9C,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAqB,MAAM,SAAS,CAAC;AAErF;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AASD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,KAAK,EACL,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,MAAM,GACP,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CA0DrD;yBAnEe,kBAAkB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pulse Placeholder Component
|
|
3
|
+
* Animated opacity fade effect while icon is loading
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import type { PlaceholderProps } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* Pulse placeholder - animated opacity fade effect
|
|
9
|
+
* Provides subtle visual feedback during loading
|
|
10
|
+
*/
|
|
11
|
+
declare function PulseComponent({ width, height, color, duration, borderRadius, testID, }: PlaceholderProps): React.ReactElement;
|
|
12
|
+
/**
|
|
13
|
+
* Memoized Pulse component
|
|
14
|
+
* Animation runs independently of re-renders
|
|
15
|
+
*/
|
|
16
|
+
export declare const Pulse: React.MemoExoticComponent<typeof PulseComponent>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=Pulse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pulse.d.ts","sourceRoot":"","sources":["../../../src/placeholder/Pulse.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAkC,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;GAGG;AACH,iBAAS,cAAc,CAAC,EACtB,KAAK,EACL,MAAM,EACN,KAAwC,EACxC,QAA8C,EAC9C,YAAsD,EACtD,MAAM,GACP,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAmDvC;AAQD;;;GAGG;AACH,eAAO,MAAM,KAAK,kDAAuB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shimmer Placeholder Component
|
|
3
|
+
* Animated gradient sweep effect while icon is loading
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import type { PlaceholderProps } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* Shimmer placeholder - animated light sweep effect
|
|
9
|
+
* Provides prominent visual feedback during loading
|
|
10
|
+
* Uses translateX animation for smooth performance
|
|
11
|
+
*/
|
|
12
|
+
declare function ShimmerComponent({ width, height, color, highlightColor, duration, borderRadius, testID, }: PlaceholderProps): React.ReactElement;
|
|
13
|
+
/**
|
|
14
|
+
* Memoized Shimmer component
|
|
15
|
+
* Animation runs independently of re-renders
|
|
16
|
+
*/
|
|
17
|
+
export declare const Shimmer: React.MemoExoticComponent<typeof ShimmerComponent>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=Shimmer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shimmer.d.ts","sourceRoot":"","sources":["../../../src/placeholder/Shimmer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAkC,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,MAAM,EACN,KAAwC,EACxC,cAA0D,EAC1D,QAA8C,EAC9C,YAAsD,EACtD,MAAM,GACP,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CA4DvC;AAeD;;;GAGG;AACH,eAAO,MAAM,OAAO,oDAAyB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skeleton Placeholder Component
|
|
3
|
+
* Static gray box shown while icon is loading
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import type { PlaceholderProps } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* Skeleton placeholder - a simple static colored box
|
|
9
|
+
* Lightweight alternative when animation is not needed
|
|
10
|
+
*/
|
|
11
|
+
declare function SkeletonComponent({ width, height, color, borderRadius, testID, }: PlaceholderProps): React.ReactElement;
|
|
12
|
+
/**
|
|
13
|
+
* Memoized Skeleton component
|
|
14
|
+
* Only re-renders when dimensions or styling change
|
|
15
|
+
*/
|
|
16
|
+
export declare const Skeleton: React.MemoExoticComponent<typeof SkeletonComponent>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/placeholder/Skeleton.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAe,MAAM,OAAO,CAAC;AAGpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;GAGG;AACH,iBAAS,iBAAiB,CAAC,EACzB,KAAK,EACL,MAAM,EACN,KAAwC,EACxC,YAAsD,EACtD,MAAM,GACP,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAkBvC;AAQD;;;GAGG;AACH,eAAO,MAAM,QAAQ,qDAA0B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Placeholder System
|
|
3
|
+
* Provides visual feedback while icons are loading
|
|
4
|
+
*/
|
|
5
|
+
export type { PlaceholderPreset, PlaceholderType, PlaceholderConfig, PlaceholderProps, } from './types';
|
|
6
|
+
export { DEFAULT_PLACEHOLDER_CONFIG } from './types';
|
|
7
|
+
export { Skeleton } from './Skeleton';
|
|
8
|
+
export { Pulse } from './Pulse';
|
|
9
|
+
export { Shimmer } from './Shimmer';
|
|
10
|
+
export { PlaceholderFactory } from './PlaceholderFactory';
|
|
11
|
+
export type { PlaceholderFactoryProps } from './PlaceholderFactory';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/placeholder/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAGrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Placeholder System Types
|
|
3
|
+
* Provides type definitions for icon loading placeholders
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
/**
|
|
7
|
+
* Built-in placeholder animation types
|
|
8
|
+
* - skeleton: Static gray box (no animation)
|
|
9
|
+
* - pulse: Opacity fade animation
|
|
10
|
+
* - shimmer: Gradient sweep animation
|
|
11
|
+
*/
|
|
12
|
+
export type PlaceholderPreset = 'skeleton' | 'pulse' | 'shimmer';
|
|
13
|
+
/**
|
|
14
|
+
* Placeholder type - can be a preset string or custom ReactNode
|
|
15
|
+
*/
|
|
16
|
+
export type PlaceholderType = PlaceholderPreset | ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Configuration for placeholder appearance
|
|
19
|
+
*/
|
|
20
|
+
export interface PlaceholderConfig {
|
|
21
|
+
/**
|
|
22
|
+
* Placeholder background color
|
|
23
|
+
* @default '#E1E1E1'
|
|
24
|
+
*/
|
|
25
|
+
color?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Secondary color for shimmer gradient
|
|
28
|
+
* @default '#F5F5F5'
|
|
29
|
+
*/
|
|
30
|
+
highlightColor?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Animation duration in milliseconds
|
|
33
|
+
* @default 1000
|
|
34
|
+
*/
|
|
35
|
+
duration?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Border radius of the placeholder
|
|
38
|
+
* @default 4
|
|
39
|
+
*/
|
|
40
|
+
borderRadius?: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Props for placeholder components
|
|
44
|
+
*/
|
|
45
|
+
export interface PlaceholderProps extends PlaceholderConfig {
|
|
46
|
+
/**
|
|
47
|
+
* Width of the placeholder
|
|
48
|
+
*/
|
|
49
|
+
width: number;
|
|
50
|
+
/**
|
|
51
|
+
* Height of the placeholder
|
|
52
|
+
*/
|
|
53
|
+
height: number;
|
|
54
|
+
/**
|
|
55
|
+
* Test ID for testing
|
|
56
|
+
*/
|
|
57
|
+
testID?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Default placeholder configuration values
|
|
61
|
+
*/
|
|
62
|
+
export declare const DEFAULT_PLACEHOLDER_CONFIG: Required<PlaceholderConfig>;
|
|
63
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/placeholder/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG,SAAS,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,iBAAiB,CAKlE,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IconThemeProvider
|
|
3
|
+
* Provides global theme configuration for all icon components
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import type { IconThemeProviderProps } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* IconThemeProvider
|
|
9
|
+
*
|
|
10
|
+
* Wraps your app to provide global icon theming.
|
|
11
|
+
* All descendant icon components will inherit these defaults.
|
|
12
|
+
*
|
|
13
|
+
* @example Basic usage
|
|
14
|
+
* ```tsx
|
|
15
|
+
* import { IconThemeProvider } from 'rn-iconify';
|
|
16
|
+
*
|
|
17
|
+
* export default function App() {
|
|
18
|
+
* return (
|
|
19
|
+
* <IconThemeProvider theme={{ size: 20, color: '#333' }}>
|
|
20
|
+
* <YourApp />
|
|
21
|
+
* </IconThemeProvider>
|
|
22
|
+
* );
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @example With placeholder defaults
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <IconThemeProvider
|
|
29
|
+
* theme={{
|
|
30
|
+
* size: 24,
|
|
31
|
+
* color: '#1a1a1a',
|
|
32
|
+
* placeholder: 'shimmer',
|
|
33
|
+
* placeholderColor: '#f0f0f0',
|
|
34
|
+
* }}
|
|
35
|
+
* >
|
|
36
|
+
* <YourApp />
|
|
37
|
+
* </IconThemeProvider>
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @example Dynamic theme switching
|
|
41
|
+
* ```tsx
|
|
42
|
+
* function App() {
|
|
43
|
+
* const [isDark, setIsDark] = useState(false);
|
|
44
|
+
*
|
|
45
|
+
* return (
|
|
46
|
+
* <IconThemeProvider
|
|
47
|
+
* theme={{
|
|
48
|
+
* color: isDark ? '#ffffff' : '#000000',
|
|
49
|
+
* placeholderColor: isDark ? '#333333' : '#e1e1e1',
|
|
50
|
+
* }}
|
|
51
|
+
* >
|
|
52
|
+
* <YourApp />
|
|
53
|
+
* </IconThemeProvider>
|
|
54
|
+
* );
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
declare function IconThemeProviderComponent({ theme: initialTheme, children, }: IconThemeProviderProps): React.ReactElement;
|
|
59
|
+
declare namespace IconThemeProviderComponent {
|
|
60
|
+
var displayName: string;
|
|
61
|
+
}
|
|
62
|
+
export declare const IconThemeProvider: React.MemoExoticComponent<typeof IconThemeProviderComponent>;
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=IconThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/theme/IconThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA+C,MAAM,OAAO,CAAC;AAEpE,OAAO,KAAK,EAAE,sBAAsB,EAAoC,MAAM,SAAS,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,iBAAS,0BAA0B,CAAC,EAClC,KAAK,EAAE,YAAY,EACnB,QAAQ,GACT,EAAE,sBAAsB,GAAG,KAAK,CAAC,YAAY,CA0B7C;kBA7BQ,0BAA0B;;;AAiCnC,eAAO,MAAM,iBAAiB,8DAAmC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IconThemeContext
|
|
3
|
+
* React Context for icon theming
|
|
4
|
+
*/
|
|
5
|
+
import type { IconThemeContextValue, IconTheme } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* IconThemeContext
|
|
8
|
+
*
|
|
9
|
+
* Provides icon theme configuration to all descendant icon components.
|
|
10
|
+
* Use with IconThemeProvider for proper functionality.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* // Access theme directly (prefer useIconTheme hook instead)
|
|
15
|
+
* const { theme, setTheme } = useContext(IconThemeContext);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const IconThemeContext: import("react").Context<IconThemeContextValue>;
|
|
19
|
+
/**
|
|
20
|
+
* Helper to merge theme with defaults
|
|
21
|
+
* Ensures all required properties have values
|
|
22
|
+
*/
|
|
23
|
+
export declare function mergeWithDefaults(theme: IconTheme): IconTheme;
|
|
24
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/theme/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAmBhE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,gDAA4D,CAAC;AAI1F;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAK7D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme System
|
|
3
|
+
* Global icon theming and configuration
|
|
4
|
+
*/
|
|
5
|
+
export { IconThemeProvider } from './IconThemeProvider';
|
|
6
|
+
export { IconThemeContext, mergeWithDefaults } from './context';
|
|
7
|
+
export { useIconTheme, useIconThemeValue, useMergedIconProps } from './useIconTheme';
|
|
8
|
+
export type { IconTheme, IconThemeProviderProps, IconThemeContextValue } from './types';
|
|
9
|
+
export { DEFAULT_ICON_THEME } from './types';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGhE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGrF,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme System Types
|
|
3
|
+
* Defines types for global icon theming and configuration
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
import type { PlaceholderType } from '../placeholder/types';
|
|
7
|
+
import type { IconRotation, IconFlip } from '../types';
|
|
8
|
+
/**
|
|
9
|
+
* Icon theme configuration
|
|
10
|
+
* All properties are optional - components will use their own defaults if not provided
|
|
11
|
+
*/
|
|
12
|
+
export interface IconTheme {
|
|
13
|
+
/**
|
|
14
|
+
* Default icon size (width and height)
|
|
15
|
+
* @default 24
|
|
16
|
+
*/
|
|
17
|
+
size?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Default icon color
|
|
20
|
+
* @default '#000000'
|
|
21
|
+
*/
|
|
22
|
+
color?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Default placeholder type shown while icons load
|
|
25
|
+
* @example 'shimmer'
|
|
26
|
+
*/
|
|
27
|
+
placeholder?: PlaceholderType;
|
|
28
|
+
/**
|
|
29
|
+
* Default placeholder background color
|
|
30
|
+
* @default '#E1E1E1'
|
|
31
|
+
*/
|
|
32
|
+
placeholderColor?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Default placeholder animation duration in milliseconds
|
|
35
|
+
* @default 1000
|
|
36
|
+
*/
|
|
37
|
+
placeholderDuration?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Default rotation for all icons
|
|
40
|
+
* @default 0
|
|
41
|
+
*/
|
|
42
|
+
rotate?: IconRotation;
|
|
43
|
+
/**
|
|
44
|
+
* Default flip direction for all icons
|
|
45
|
+
*/
|
|
46
|
+
flip?: IconFlip;
|
|
47
|
+
/**
|
|
48
|
+
* Default fallback delay in milliseconds
|
|
49
|
+
* @default 0
|
|
50
|
+
*/
|
|
51
|
+
fallbackDelay?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Props for IconThemeProvider component
|
|
55
|
+
*/
|
|
56
|
+
export interface IconThemeProviderProps {
|
|
57
|
+
/**
|
|
58
|
+
* Theme configuration
|
|
59
|
+
*/
|
|
60
|
+
theme: IconTheme;
|
|
61
|
+
/**
|
|
62
|
+
* Child components that will receive the theme
|
|
63
|
+
*/
|
|
64
|
+
children: ReactNode;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Context value for icon theme
|
|
68
|
+
*/
|
|
69
|
+
export interface IconThemeContextValue {
|
|
70
|
+
/**
|
|
71
|
+
* Current theme configuration
|
|
72
|
+
*/
|
|
73
|
+
theme: IconTheme;
|
|
74
|
+
/**
|
|
75
|
+
* Update theme dynamically
|
|
76
|
+
* Useful for theme switching (e.g., dark mode)
|
|
77
|
+
*/
|
|
78
|
+
setTheme: (theme: IconTheme | ((prev: IconTheme) => IconTheme)) => void;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Default theme values
|
|
82
|
+
* Used when no theme is provided or for missing properties
|
|
83
|
+
*/
|
|
84
|
+
export declare const DEFAULT_ICON_THEME: Required<Omit<IconTheme, 'placeholder' | 'flip'>> & Pick<IconTheme, 'placeholder' | 'flip'>;
|
|
85
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAE9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,CAAC,KAAK,IAAI,CAAC;CACzE;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,MAAM,CAAC,CAAC,GAChF,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,MAAM,CASvC,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useIconTheme Hook
|
|
3
|
+
* Access and modify icon theme from any component
|
|
4
|
+
*/
|
|
5
|
+
import type { IconTheme, IconThemeContextValue } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* useIconTheme
|
|
8
|
+
*
|
|
9
|
+
* Hook to access and modify the icon theme.
|
|
10
|
+
* Must be used within an IconThemeProvider.
|
|
11
|
+
*
|
|
12
|
+
* @returns Current theme and setTheme function
|
|
13
|
+
*
|
|
14
|
+
* @example Access current theme
|
|
15
|
+
* ```tsx
|
|
16
|
+
* function MyComponent() {
|
|
17
|
+
* const { theme } = useIconTheme();
|
|
18
|
+
* console.log('Current icon size:', theme.size);
|
|
19
|
+
* return <Text>Icon color: {theme.color}</Text>;
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example Update theme dynamically
|
|
24
|
+
* ```tsx
|
|
25
|
+
* function ThemeToggle() {
|
|
26
|
+
* const { theme, setTheme } = useIconTheme();
|
|
27
|
+
*
|
|
28
|
+
* const toggleDarkMode = () => {
|
|
29
|
+
* setTheme(prev => ({
|
|
30
|
+
* ...prev,
|
|
31
|
+
* color: prev.color === '#000000' ? '#ffffff' : '#000000',
|
|
32
|
+
* }));
|
|
33
|
+
* };
|
|
34
|
+
*
|
|
35
|
+
* return <Button onPress={toggleDarkMode} title="Toggle Dark Mode" />;
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function useIconTheme(): IconThemeContextValue;
|
|
40
|
+
/**
|
|
41
|
+
* useIconThemeValue
|
|
42
|
+
*
|
|
43
|
+
* Get a specific theme value with automatic fallback to default.
|
|
44
|
+
* Useful when you need just one property.
|
|
45
|
+
*
|
|
46
|
+
* @param key - Theme property key
|
|
47
|
+
* @returns The theme value or default
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* function MyIcon() {
|
|
52
|
+
* const defaultSize = useIconThemeValue('size');
|
|
53
|
+
* const defaultColor = useIconThemeValue('color');
|
|
54
|
+
* return <Text>Default: {defaultSize}px, {defaultColor}</Text>;
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function useIconThemeValue<K extends keyof IconTheme>(key: K): NonNullable<IconTheme[K]> | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* useMergedIconProps
|
|
61
|
+
*
|
|
62
|
+
* Merges component props with theme defaults.
|
|
63
|
+
* Props take precedence over theme values.
|
|
64
|
+
*
|
|
65
|
+
* @param props - Component props
|
|
66
|
+
* @returns Merged props with theme defaults
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* function CustomIcon({ size, color, ...rest }: IconProps) {
|
|
71
|
+
* const mergedProps = useMergedIconProps({ size, color });
|
|
72
|
+
* // mergedProps.size = props.size ?? theme.size ?? 24
|
|
73
|
+
* // mergedProps.color = props.color ?? theme.color ?? '#000000'
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export declare function useMergedIconProps<T extends Partial<IconTheme>>(props: T): T & Required<Pick<IconTheme, 'size' | 'color'>> & Omit<IconTheme, 'size' | 'color'>;
|
|
78
|
+
//# sourceMappingURL=useIconTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIconTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/useIconTheme.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,IAAI,qBAAqB,CAGpD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,SAAS,EACzD,GAAG,EAAE,CAAC,GACL,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAQvC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,OAAO,CAAC,SAAS,CAAC,EAC7D,KAAK,EAAE,CAAC,GACP,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,CAoBrF"}
|