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

@salla.sa/twilight-theme-engine

v1.0.0-beta.4

Published

Core engine for Salla React themes - component registry, hooks, contexts, routes, and base components

Maintainers

ali-subaieali-subaiekamalmirzayevkamalmirzayevabady009abady009fares.dfares.dm.ayarim.ayarii.bakhsh4sallai.bakhsh4sallaajibadeabdajibadeabdjamallajamallaowieselshaikhowieselshaikhwatheq_alshowaiter_sallawatheq_alshowaiter_sallamaqalaqilmaqalaqilibra-hassanibra-hassananass_atanass_atsalahmynsalahmynanasredanasredadelgsadelgsdev-tarekdev-tarekshamoon1997shamoon1997mohammed_ashraafmohammed_ashraafhassankottihassankottimazizsallamazizsallacanarydev41canarydev41odaigawbraodaigawbraiabdallahiabdallahahmed4324345ahmed4324345ali-mhdali-mhdossycodesossycodesm.farhan.sallam.farhan.sallas.alkhwlanis.alkhwlaninikhilpawar30nikhilpawar30tahasallatahasallaegkrinkelegkrinkelomersamliomersamliahmed-elazizahmed-elazizmzfrshkmzfrshkghofranesallaghofranesallaabdulrahman_sallaabdulrahman_sallanaderm91naderm91arshad1024arshad1024abubakermoharramabubakermoharrama.qahtana.qahtanahmed-amlasahmed-amlasnullish-onenullish-onethaifanithaifanisoao_dsoao_ddhaferdhaferadel.elshafeyadel.elshafeymalshoubakimalshoubakimohanad7afizmohanad7afizrashaamer87rashaamer87ahmed-alkatheriahmed-alkatherihossamelsawyhossamelsawydhassanalidhassanaliabdulrazzak-almohamadabdulrazzak-almohamada-athamneh-sallaa-athamneh-sallaalkhatera-sallaalkhatera-sallaoalachioalachim.emam.sallam.emam.sallaa.djedainia.djedainimhd-mazenmhd-mazenzafari8zafari8kulth00mkulth00mmuhammed-shmuhammed-shahmed-elnaggarahmed-elnaggaraminealyateaminealyateahmed3mmarahmed3mmarashraf.redaashraf.redadevlomingodevlomingoelzakzoukelzakzoukaliarsalan177aliarsalan177hamzasallahamzasallamostafaezzeldinmostafaezzeldinjojomak13jojomak13dev_foudadev_foudayalattas-sallayalattas-sallabuhoribuhorimohammad-altamimimohammad-altamimimaher-sallamaher-sallailyasabdul94ilyasabdul94iahmadzainiahmadzainhanisaeedhanisaeedhazemsallahazemsallaosameyyosameyyabdulrhman_kassemabdulrhman_kassemeslammooeslammoomajedsallamajedsallamntahhan_sallamntahhan_sallahalsairihalsairiwael_bettayebwael_bettayebimutaharimutaharyassine87yassine87yasser.syasser.smostafanabawymostafanabawyaboubakar.devaboubakar.devawajieh-sallaawajieh-sallasayed-159sayed-159m.alfaifim.alfaifiaeldalysaeldalysm.hammad10m.hammad10z.hamanez.hamanefarah-slfarah-slsirsayed98sirsayed98mozedan-sallamozedan-sallaabdelrahman-sallaabdelrahman-sallamfkfawazmfkfawazalquhaitsallaalquhaitsallaabbasshdevabbasshdevalialjishialialjishiochanii-sallaochanii-sallamomen-mahmoud-mahmoudmomen-mahmoud-mahmoudmurkbhuttomurkbhuttoaliahmed-sallaaliahmed-sallasagark45sagark45houssem-amrihoussem-amriahmednabilahmednabilmaher-gadmaher-gadsoaodsoaodtamir-sallatamir-sallaattia_sallaattia_sallarefal_alharbirefal_alharbinabeel-sallanabeel-sallajalmatarijalmatariusama-sallausama-sallaabdulmajidashraf81abdulmajidashraf81m-shaeelm-shaeelibrahimkubaisyibrahimkubaisyhalwany_sallahalwany_sallaaladdin-sallaaladdin-sallafaisal-alhusfaisal-alhusa.almomania.almomaniemanlowndiemanlowndiwaleed.sallawaleed.sallahamedov93hamedov93harshal-sweplyharshal-sweplysachinpmsachinpmsameerchoudharipmsameerchoudharipmranjeetmahtoranjeetmahtosandeepmahadikqasandeepmahadikqasvmakhanesvmakhaneabdomursal.sallaabdomursal.sallamayuri1712mayuri1712ankita9096ankita9096jaykrushnasweplyjaykrushnasweplysultan-algarbisultan-algarbia-wakodea-wakodef.darzaidf.darzaida.alshomrania.alshomranianhaar-ali-sallaanhaar-ali-sallarohan-sallarohan-sallam.adiom.adiotarekararsallatarekararsallaemadbatwaemadbatwamohannadhanafi-sallamohannadhanafi-sallaabo3ish-sallaabo3ish-sallasalem-bajubairsalem-bajubairm.moharramm.moharramnyadavsweplynyadavsweplymori1999mori1999hinal.dhinal.dshankarsweplyshankarsweplytejasborate11tejasborate11yogeshkhairnaryogeshkhairnary.kumavaty.kumavatvijit123vijit123tejaslendetejaslendem.alsihatim.alsihatim.yasserm.yasseryalturkeyyalturkeymaher-abuyounesmaher-abuyounesbasma159basma159fatiamrouqafatiamrouqa

Readme

@salla.sa/twilight-theme-engine

Slim core engine for Salla React themes built on TanStack Start.

Installation

npm install @salla.sa/twilight-theme-engine

Features

  • Component Registry - Dynamic component resolution with override support
  • Hook System - Extension points for content injection
  • Data Contexts - Store, Theme, User providers
  • i18n - Translation and RTL support
  • Utilities - Money formatting, asset helpers, color utilities

Documentation

Quick Start

Setup Providers

import { TwilightProvider } from '@salla.sa/twilight-theme-engine';
import { I18nProvider } from '@salla.sa/twilight-theme-engine/i18n';

function App() {
  return (
    <TwilightProvider storeIdentifier="my-store" defaultLocale="ar">
      <I18nProvider locale="ar" translations={translations}>
        {children}
      </I18nProvider>
    </TwilightProvider>
  );
}

Component Registry

import { registry, Component, defineComponent } from '@salla.sa/twilight-theme-engine';

// Register components
registry.register('header', Header);
registry.register('product.card', ProductCard);

// Override in custom theme
registry.override('header', CustomHeader);

// Use dynamically
<Component name="product.card" product={product} />;

Hook System

import { defineHooks } from '@salla.sa/twilight-theme-engine/hooks/HookRegistry';
import { HookSlot } from '@salla.sa/twilight-theme-engine/hooks/HookSlot';

// Define hooks
defineHooks({
  'body:start': () => <AnnouncementBar />,
  'product:form.end': ({ product }) => <TrustBadges />,
});

// Use in pages
<HookSlot name="product:form.end" context={{ product }} />;

Use Contexts

import { useStore } from '@salla.sa/twilight-theme-engine/hooks/useStore';
import { useTheme } from '@salla.sa/twilight-theme-engine/hooks/useTheme';
import { useTwilight } from '@salla.sa/twilight-theme-engine';

function MyComponent() {
  const store = useStore();
  const theme = useTheme();
  const { user, isRTL } = useTwilight();

  const setting = theme.settings.get('header_is_sticky', true);
}

Translations

import { useI18n } from '@salla.sa/twilight-theme-engine/i18n';

function MyComponent() {
  const { t } = useI18n();

  return (
    <div>
      <h1>{t('pages.cart.title')}</h1>
      <p>{t('pages.products.sold_times', { count: 5 })}</p>
    </div>
  );
}

Utilities

import { useMoney } from '@salla.sa/twilight-theme-engine/hooks/useMoney';
import { useAsset } from '@salla.sa/twilight-theme-engine/hooks/useAsset';

function ProductCard({ product, featured }) {
  const { formatMoney } = useMoney();
  const { asset, cdn } = useAsset();

  return (
    <div className={cn('card', featured && 'card--featured')}>
      <img src={cdn(product.image.url, 400)} />
      <p>{formatMoney(product.price)}</p>
    </div>
  );
}

Import Paths

Use granular imports to avoid pulling in the entire package:

// Core
import { TwilightProvider, useTwilight } from '@salla.sa/twilight-theme-engine';

// Hooks (granular)
import { useStore } from '@salla.sa/twilight-theme-engine/hooks/useStore';
import { useTheme } from '@salla.sa/twilight-theme-engine/hooks/useTheme';
import { useMoney } from '@salla.sa/twilight-theme-engine/hooks/useMoney';
import { useAsset } from '@salla.sa/twilight-theme-engine/hooks/useAsset';

// i18n
import {
  useI18n,
  I18nProvider,
  FALLBACK_LOCALE,
  getLanguageInfo,
} from '@salla.sa/twilight-theme-engine/i18n';

// Components
import { Link } from '@salla.sa/twilight-theme-engine/common';

// Routes
import { Home } from '@salla.sa/twilight-theme-engine/routes/home';
import type { HomeLoaderData } from '@salla.sa/twilight-theme-engine/routes/home';

// API
import { store } from '@salla.sa/twilight-theme-engine/api/store';
import { translations } from '@salla.sa/twilight-theme-engine/api/translations';

// Types
import type { Store, Theme, Product } from '@salla.sa/twilight-theme-engine/types';

License

MIT