JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 206
  • Score
    100M100P100Q106960F
  • License MIT

Core engine for Lumina i18n: hashing and signals-based state.

Package Exports

  • @continuouslabs/lumina
  • @continuouslabs/lumina/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@continuouslabs/lumina) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@continuouslabs/lumina

The reactive core of the Lumina i18n ecosystem.

Lumina Core provides the fundamental translation logic, singleton state management, and reactive hooks used by all framework adapters. It is designed for high-performance, SSR-safe internationalization with zero overhead.

💎 Features

  • Singleton Architecture: Unified state across all modules via globalThis.__lumina.
  • Reactive Engine: Atomic updates for locale changes.
  • SSR-Safe: Built-in protection against hydration mismatches.
  • Type-Safe: Complete TypeScript support for locales and keys.

🚀 Installation

pnpm add @continuouslabs/lumina

📖 Basic Usage

While most users will use a framework adapter, the core can be used in any environment:

import { initLumina, t } from '@continuouslabs/lumina'

// Initialize the singleton
initLumina({
  locale: 'en',
  messages: {
    en: { "id_123": "Hello World" }
  }
})

// Use the global translation hook
console.log(t('Hello World'))

🛠️ State Management

Lumina uses a specialized singleton pattern on globalThis to ensure that even in complex builds (like Next.js or Astro), there is only one source of truth for your application's localization state.


Developed with focus by Continuous Labs