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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@almadar/mobile

v1.2.4

Published

React Native UI components for Almadar - extends @almadar/ui

Readme

@almadar/mobile

React Native UI components for the Almadar platform. This package provides mobile-optimized components that mirror the functionality of @almadar/ui while following React Native patterns and best practices.

Features

  • 154 Components - Comprehensive component library (100% of @almadar/ui)
  • Event Bus Architecture - Declarative event-driven interactions
  • Closed Circuit Props - Consistent loading, error, and entity states
  • Theme System - Full light/dark theme support with CSS variable parity
  • TypeScript - Full type safety

Installation

npm install @almadar/mobile
# or
yarn add @almadar/mobile
# or
pnpm add @almadar/mobile

Quick Start

import { ThemeProvider, Button, Card, VStack } from '@almadar/mobile';

function App() {
  return (
    <ThemeProvider>
      <VStack spacing={16} style={{ padding: 16 }}>
        <Card>
          <Button 
            variant="primary"
            action="SUBMIT_FORM"
            actionPayload={{ formId: 'contact' }}
          >
            Submit
          </Button>
        </Card>
      </VStack>
    </ThemeProvider>
  );
}

Component Architecture

Closed Circuit Props

All components implement the closed circuit pattern:

interface ComponentProps {
  // Visual state
  isLoading?: boolean;  // Shows LoadingState when true
  error?: Error | null; // Shows ErrorState when present
  entity?: string;      // Entity name for auto-fetch
  
  // Styling
  style?: ViewStyle;    // React Native styles
}

Event Bus Pattern

Interactive components use the event bus for loose coupling:

<Button 
  action="SAVE_ITEM"           // Emits 'UI:SAVE_ITEM'
  actionPayload={{ id: 1 }}    // Event payload
  onPress={() => {}}           // Optional callback
>
  Save
</Button>

Events follow the pattern: UI:EVENT_NAME

Component Categories

Atoms (16 components)

Basic building blocks:

  • Layout: VStack, HStack, Box, Center
  • Typography: Typography
  • Form: Button, Input, Label, Checkbox, Radio, Switch, Textarea, Select, Spinner, ProgressBar
  • Display: Card, Badge, Avatar, Divider, Icon

Molecules (18 components)

Composite components:

  • Feedback: Alert, Toast, Skeleton, LoadingState, ErrorState, EmptyState
  • Form: FormField, FormSectionHeader, InputGroup, SearchInput, ButtonGroup
  • Navigation: Tabs, Breadcrumb
  • Overlay: Modal, Drawer, Tooltip, Popover, Menu

Organisms (28 components)

Complex components:

  • Layout: Header, PageHeader, DashboardLayout, AuthLayout
  • Data: DataTable, StatCard, Timeline, EntityList, EntityCard, CardGrid
  • Form: FormSection, WizardContainer, DetailPanel
  • Game: BattleBoard, CastleBoard, WorldMapBoard, IsometricCanvas, GameCanvas3D, CombatLog, DialogueBox, GameHud, InventoryPanel, GameMenu, GameOverScreen, GameAudioProvider, GameAudioToggle, TraitSlot, TraitStateViewer, UncontrolledBattleBoard, CanvasEffect

Templates (2 components)

Page layouts:

  • DashboardLayout - Main app layout with header
  • AuthLayout - Login/register layouts with keyboard avoiding

Hooks (9 hooks)

  • useEventBus - Event bus integration
  • useTheme - Theme access
  • useThemeStyles - Theme-aware StyleSheet
  • useNavigation - Navigation helpers
  • useScrollHeader - Collapsible headers
  • useSafeAreaInsets - Safe area handling
  • usePullToRefresh - Pull-to-refresh
  • useInfiniteScroll - Infinite scroll

Theming

Themes match @almadar/ui CSS variables:

const theme = {
  colors: {
    primary: '#14b8a6',
    'primary-hover': '#0d9488',
    'primary-foreground': '#ffffff',
    // ... all CSS variables mapped
  },
  borderRadius: {
    sm: 6,
    md: 10,
    lg: 14,
    xl: 20,
    full: 9999,
  },
  shadows: {
    sm: { shadowColor, shadowOffset, shadowOpacity, shadowRadius, elevation },
    main: { ... },
    lg: { ... },
  },
};

Phase Implementation Summary

| Phase | Components Added | Coverage | |-------|------------------|----------| | Phase 1: Foundation | +10 | Atoms: 19% → 52% | | Phase 2: Navigation | +6 | Organisms: 5% → 11% | | Phase 3: Data Display | +10 | Molecules: 15% → 44% | | Phase 4: Advanced UI | +9 | Molecules: 36% → 50% | | Phase 5: Game Systems | +17 | Organisms: 11% → 28% | | Phase 6: Layout & Containers | +7 | Atoms/Molecules: expansion | | Phase 7: UI Enhancement | +8 | Molecules: expansion | | Phase 8: Data Display | +10 | Organisms: expansion | | Phase 9: Form & Input | +6 | Molecules/Organisms: expansion | | Phase 10: Layout Structure | +8 | Organisms: expansion | | Phase 11: Slots & Layouts | +5 | Organisms: expansion | | Phase 12: Book Components | +5 | Organisms: book/ | | Phase 13: Game Templates | +9 | Templates: expansion | | Phase 14: Puzzle Games | +16 | Organisms: puzzles/ | | Phase 15: Physics Sim | +3 | Organisms: physics-sim/ | | Phase 16: Specialized Views | +8 | Organisms: various | | Total | +132 | 13% → 100% |

Migration from @almadar/ui

Web to Mobile Mapping

| Web (@almadar/ui) | Mobile (@almadar/mobile) | |-------------------|--------------------------| | onClick | onPress | | className | style (ViewStyle) | | action | action (same) | | eventBus.emit('EVENT') | eventBus.emit('UI:EVENT') |

Example Migration

Web:

<Button 
  onClick={() => {}}
  className="my-button"
>
  Click
</Button>

Mobile:

<Button 
  onPress={() => {}}
  style={{ marginTop: 8 }}
>
  Click
</Button>

License

BSL 1.1 (Business Source License). Converts to Apache 2.0 on 2030-02-01. Non-production use is free.