npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mbrain/epichug-react-native

v0.0.19

Published

- `@mbrain/epichug-react-native` is a React Native library with a lot of utility functions and components. Use it whenever you can. - Also you can suggest changing or adding things to this library, its under programmers control. - All epichug elements hav

Readme

EPICHUG LIBRARY

  • @mbrain/epichug-react-native is a React Native library with a lot of utility functions and components. Use it whenever you can.
  • Also you can suggest changing or adding things to this library, its under programmers control.
  • All epichug elements have linked documentation files
    • ALWAYS read the documentation file before using any element
    • The documentation contains the correct props, usage examples, and styling options
    • For example FabButton is linked to its docs etc.
  • Example imports
    • import {sleep} from '@mbrain/epichug-react-native';
    • import {appwriteFileStorageProvider} from '@mbrain/epichug-react-native/appwrite';

Utils

General utility functions and hooks for common React Native development tasks.

  • sleep function
    • Creates a pause in async code execution for the specified duration
  • getExpoPluginConfig function
    • Retrieves the configuration object for a specific Expo plugin from the app.json/app.config.js
  • useEpicDevMenu hook
    • Extends the Expo development menu with: Sitemap, Theme preview
  • useOrientation hook
    • Provides real-time screen orientation information and orientation lock status
  • useIsKeyboardVisible hook
    • Detect if the virtual keyboard is currently visible on screen
  • useSortableList hook
    • Hook for managing state and logic for drag-and-drop reorderable lists, with optimistic updates and error handling
  • useDebouncedChangeText hook
    • Hook that adds debouncing to text input changes to prevent excessive API calls or state updates
  • useDebouncedColorScheme hook
    • Hook that debounces color scheme changes to prevent rapid theme switching and UI flickering, it should be used instead of React Native useColorScheme
  • colorWithOpacity function
    • Utility function that adds opacity to any color format and returns an rgba string
  • createIntlService function
    • Creates an internationalization service with device locale detection, language matching, and React hooks for i18next integration

Storage

Use these functions for local storage and for file storage (uploading files to server)

  • createLocalStorage function
    • Returns localStorage object with methods for storing, retrieving, and observing changes to local data with automatic JSON serialization/deserialization and error handling
  • createFileStorage function
    • Creates a file storage service for uploading and managing files on backend servers
  • getZustandLocalStorage function
    • Creates a local storage adapter for Zustand persist middleware using MMKV
  • getTanstackLocalStorage function
    • Creates a local storage adapter for TanStack React Query persistence using MMKV

Navigation

Components and functions that you can use with expo-router.

  • JsStack component
    • Expo router support for JavaScript Stack navigator, use it only if there is some explicit reason, otherwise use native stack
  • MaterialTopTabs component
    • Expo router support for Material Top Tabs navigator
  • CustomBottomTabs component
    • Customizable React Navigation bottom tab bar with blur effects, floating mode, and theme integration
  • ScreenContent component
    • A comprehensive screen wrapper component that handles safe areas, scrolling, and keyboard avoidance
    • ScreenContent props are defined in ScreenContentProps type
  • useLogRouteChange hook
    • Logs to console route path change in dev environment

Theming

Theming is accomplished by extending react-native-paper's MD3Theme with a custom Theme type that includes additional design tokens (gap, border, margin, padding, roundness), managed through an AppThemeProvider that handles system theme detection and localStorage persistence, and consumed via the useAppTheme hook.

  • Theme types used to create custom themes
    • Theme type
      • Extended Material Design 3 theme with additional spacing and layout properties.
    • ThemeValuePerSize type
      • Responsive size-based value mapping for consistent spacing and sizing across the application.
    • themeDefaults variable
      • Default theme values
  • AppThemeProvider component
  • useAppTheme hook
    • React hook for accessing the current application theme with full type safety
  • useNavigationTheme hook
    • Hook that converts the current app theme to React Navigation compatible theme format
  • ThemePreview component
    • Comprehensive theme preview component that displays all Material Design 3 colors and components
  • ThemePreviewButton component
    • Button component that opens the comprehensive theme preview in a full-screen modal.

Shared UI Components

Shared UI components including snackbars, dialogs, and theme preview.

Components

Button Components

  • ThumbnailImage component
  • FabButton component
    • Themed floating action button with consistent positioning and styling
  • FabGroupButton component
    • Enhanced floating action button group with smart visibility management
  • BackButton component
    • Themed navigation back button with automatic router integration
  • DrawerButton component
    • Themed drawer navigation button with automatic drawer integration
  • GradientButton component
    • Customizable gradient button with advanced visual effects and theming

Form Components

  • FieldErrors component
    • Displays validation errors for form fields integrated with React Hook Form, mostly used from field components: TextInputField, SwitchField, ImagePickerField etc.
  • FormRootErrors component
    • Displays form-level validation errors that are not tied to specific fields, i.e. "root" errors in React Hook Form
  • TextInputField component
    • Wrapper around Paper TextInput, with react-hook-form integration and several additional props
  • SelectField component
    • Enhanced select dropdown component with optional React Hook Form integration
  • SwitchField component
    • Wrapper around Paper Switch, with react-hook-form integration and several additional props
  • ImagePickerField component

Access Control

  • AccessControlProvider component
  • useAccessControl component
    • Hook for accessing role-based access control data with localization support
  • PermissionsGroups component
    • Component that displays a list of permission groups with navigation support, its usually used together with PermissionsEdit
  • PermissionsEdit component
    • Component for editing role-based permissions within a specific permission group, its usually used together with PermissionsGroups
  • useAbility component
    • React hook for checking if the current user has a specific permission
  • useAllAbilities component
    • React hook for checking if the current user has ALL of the specified permissions
  • useSomeAbilities component
    • React hook for checking if the current user has ANY of the specified permissions
  • validatePermissions component
    • Comprehensive validation function for access control system configuration
  • Access control types
    • Roles type
      • Array of role identifiers in the access control system
    • PermGroup type
      • Permission group definition that organizes related permissions into logical categories
    • Permission type
      • Core permission definition that controls access to specific features or actions
    • Translations type
      • Complete translation configuration for the entire access control system

Appwrite Backend Helpers

  • fromAppwriteUser component
    • Converts raw Appwrite user object to standardized application user format
  • toAppwriteDoc component
    • Converts JavaScript object to Appwrite document format for database operations
  • fromAppwriteDoc component
    • Converts Appwrite document to standard JavaScript object format