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

rpg-prop-kit

v0.4.0

Published

Props de UI para RPG de mesa — CRT retrô e analógicos (pergaminho, lacre, cartaz, placa, dataslate).

Readme

rpg-prop-kit

CI npm version bundle size license

Props de UI para ferramentas de RPG de mesa — CRT retrô e analógicos (pergaminho, lacre de cera, cartaz, placa de metal, dataslate). Os CRTs nascem do Immersive Terminal for RPGs; o resto é a mesma linguagem visual para handouts de fantasia e sci-fi.

⚠️ Status: v0.2.0. API ainda pode mudar na linha 0.x.

Screenshots

Clique para ver em 1080p.

Componentes

| Componente | Descrição | | ---------------- | ---------------------------------------------------------------- | | <CRTScreen> | Moldura de monitor CRT (scanlines, flicker, sweep, vignette, curvatura), com temas de fósforo. | | <TypeWriter> | Digita um texto caractere a caractere, com cursor piscando. | | <BootSequence> | Sequência de boot: linhas digitadas em ordem, com cores por status. | | <CRTImage> | Imagem com tratamento de fósforo (dessaturada, tom + scanlines). | | <Parchment> | Folha de papel quente (vellum / folio / ash), opcionalmente pautada e manchada. | | <WaxSeal> | Gota de cera irregular + glifo (crimson / gold / green / charcoal). | | <Poster> | Cartaz de aviso / procurado (moldura dupla, título em caixa alta). | | <MetalPlate> | Placa escovada com rebites (iron / brass / gunmetal). | | <Dataslate> | Tablete sci-fi (imperial / union / amber) com LCD e scanlines. | | <EditorBlock> | Bloco de formulário de editor: <details> fechado com título e uma linha do que há dentro. |

Hooks:

  • useTypewriter(text, options): a lógica de digitação, caso queira montar o seu próprio componente.
  • useResizableWidth({ storageKey, defaultWidth, minWidth, maxRatio }): largura de um menu lateral. Arrasta pela borda, anda com ← / →, volta ao padrão no duplo clique e recolhe. Grava em <storageKey>.width e <storageKey>.collapsed.

<EditorBlock> e useResizableWidth são o menu dos editores da família (OPORD, scenario-forge, GM Control Room). As cores do bloco vêm de --rpk-block-line, --rpk-block-accent e --rpk-block-muted.

As classes CSS (rpk-parchment, rpk-seal, rpk-poster, rpk-plate, rpk-slate) funcionam sozinhas se você só importar rpg-prop-kit/styles.css — os componentes React só aplicam as classes e as paletas via data-rpk-*.

Mais props chegam nas próximas versões.

Instalação

npm install rpg-prop-kit

react e react-dom (>= 18) são peer dependencies.

Uso

import { CRTScreen, BootSequence, TypeWriter } from 'rpg-prop-kit'
import 'rpg-prop-kit/styles.css'

export function App() {
  return (
    <CRTScreen theme="phosphor" fullscreen>
      <BootSequence
        lines={[
          { text: '> POST ......... OK', status: 'ok' },
          '> carregando manifesto da missao ...',
          { text: '> AVISO: assinatura desconhecida', status: 'error' },
        ]}
      />
      <TypeWriter text="> bem-vindo, operador._" cursor />
    </CRTScreen>
  )
}
import { Parchment, WaxSeal, Poster, Dataslate } from 'rpg-prop-kit'
import 'rpg-prop-kit/styles.css'

export function Handouts() {
  return (
    <>
      <Parchment tone="vellum" stained>
        <p>O sino silenciou na terceira vela.</p>
        <WaxSeal glyph="P" color="crimson" motto="vigilia" />
      </Parchment>
      <Poster eyebrow="aviso" title="A Fenda">
        Não cruzar o fosso após o sino.
      </Poster>
      <Dataslate tone="union">Prioridade verde. Lance autorizada.</Dataslate>
    </>
  )
}

Props do CRTScreen

| Prop | Tipo | Padrão | Descrição | | ------------ | --------------------------------- | ---------- | ------------------------------------------- | | theme | 'phosphor' \| 'amber' \| 'ice' | — | Tema de cor. Omita para usar o seu próprio. | | fullscreen | boolean | false | Ocupa a viewport inteira. | | scanlines | boolean | true | Linhas horizontais. | | flicker | boolean | true | Tremor de opacidade. | | sweep | boolean | true | Faixa de luz descendo. | | vignette | boolean | true | Bordas escurecidas. | | curvature | boolean | true | Leve inclinação 3D. | | gpu | boolean \| CrtOverlayOptions | false | Overlay em WebGPU (ver abaixo). | | className | string | — | Classe extra no container. | | style | CSSProperties | — | Estilos inline no container. |

Overlay em WebGPU

<CRTScreen gpu> desenha por cima do conteúdo, num canvas que não captura cliques: scanlines, grade de abertura do tubo, granulado de fósforo, uma faixa de interferência que leva 20 s para descer, vinheta, franja de cor nas bordas e reflexo no vidro. A cor vem do tema.

  • Quando a GPU assume, as scanlines, o sweep e a vinheta em CSS saem, para não duplicar. Sem WebGPU (Safari antigo, http fora de localhost), fica tudo em CSS como antes.
  • Com prefers-reduced-motion, desenha um quadro parado. Nada pisca.
  • As props scanlines, sweep e vignette desligadas também desligam o equivalente na GPU.

Ajuste fino (todos de 0 a 1):

<CRTScreen gpu={{ mask: 0.5, grain: 0.2, interference: 0, glare: 0.4 }} />

Para uma tela CRT própria, use <CRTGpuOverlay> dentro de um container com position: relative. Ele avisa onStatusChange('gpu' | 'unsupported') para você desligar os seus efeitos em CSS. Sem React, use createCrtOverlay(canvas, opções).

Tema próprio

Não passe theme e defina as variáveis num ancestral:

.minha-tela {
  --rpk-bg: #08010a;
  --rpk-fg: #d36bff;
  --rpk-accent: #f0b3ff;
  --rpk-glow: 8px;
}

Desenvolvimento

npm install      # instala as dependências
npm run dev      # playground em http://localhost:5173
npm run build    # gera o pacote em dist/ (ES + UMD + tipos)
npm test

Release no npm: tag v* dispara .github/workflows/publish.yml (OIDC, sem NPM_TOKEN). Trusted publisher no npmjs.com aponta para este repo e o arquivo publish.yml.

A estrutura:

src/
  components/   # um diretório por componente (CRTScreen, Parchment, ...)
  hooks/        # hooks reutilizáveis
  styles/       # temas CRT (`themes.css`) e paletas analógicas (`analog.css`)
  utils/        # helpers
examples/       # playground consumido pelo index.html da raiz

Família

Usado por Immersive Terminal, scenario-forge, GM Control Room e o portfólio. O irmão impresso é o mesa-press (Markdown → PDF).

Licença

MIT © Felipe Lippelt