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

@konce-pt/backdrop

v0.11.0

Published

Animated backdrop core for Koncept UI — canvas renderers plus the maths behind two effects: a density-ramped grid of squares and a flowing current of light with an OKLCH colour ramp. Framework-free TypeScript; the colour maths lives in @konce-pt/color.

Readme

@konce-pt/backdrop

Animowane tło Koncept UI to dekoracyjna warstwa pod sekcję — rysowana na canvasie zamiast wczytywana jako obraz, więc nie kosztuje transferu, skaluje się bez rozdzielczości i bierze kolory z tokenów motywu.

Ta paczka jest jego rdzeniem: układ siatki i rampa gęstości efektu signal-grid, płynąca wstęga i rampa barw efektu wave, oraz renderery canvas dla obu. Czysty TypeScript bez wiązania z frameworkiem; rachunek barw bierze z @konce-pt/color, swojej jedynej zależności.

Zwykle nie instalujesz go samodzielnie: używa go KptBackdrop z @konce-pt/angular i z @konce-pt/react. Sięgnij po niego wprost, gdy rysujesz ten sam efekt własnym rendererem.

npm i @konce-pt/backdrop
import { createBackdropRenderer } from '@konce-pt/backdrop';

// Renderer żyje tyle, co jeden zestaw ustawień — zmiana wejść buduje nowy.
const renderer = createBackdropRenderer({
  effect: 'wave',
  colors: ['#5B8AF2', '#A86DF2', '#F25B9E'],
  rotation: 12,
});

renderer.resize(1200, 480);   // przy starcie i przy zmianie rozmiaru
renderer.draw(context, 3.4);  // klatka dla 3,4 sekundy animacji

Dwa efekty, jedna zasada

signal-grid bierze gradient z tego, ile kwadratów się pali w danej odległości od kotwicy — nie przyciemnia gotowej, równomiernej siatki. wave opada od linii środkowej krzywą Gaussa, więc w całym kadrze nie ma ani jednej twardej krawędzi; to właśnie odróżnia prąd światła od paska.

W obu wypadkach losowania wyprowadzają się z pozycji, a nie z zapamiętanego stanu, więc zmiana rozmiaru okna zostawia obraz rozpoznawalnym zamiast tasować go od nowa.

Barwy mieszają się dookoła koła

Rampa wstęgi jest zamknięta w pętlę i mieszana po biegunowej postaci OKLab. Interpolacja sRGB miesza wartości po gammie i wychodzi błotem; nawet prostokątny OKLab przecina oś achromatyczną dla przeciwnych odcieni, więc w połowie drogi z niebieskiego w żółty zostaje szarość — dokładnie tam, gdzie prąd świeci najmocniej.

Wstęga liczy się w małym buforze

Efekt nie ma detalu, tylko miękkość. Liczymy go więc w buforze o dłuższym boku 160 px i skalujemy w górę — rozmycie robi za darmo interpolacja przeglądarki. Kilka tysięcy pikseli na klatkę obsługuje kadr dowolnej wielkości.

API

  • Renderery — createBackdropRenderer, createSignalGridRenderer, createWaveRenderer, resolveBackdropColors, typy KptBackdropRenderer, KptBackdropRenderOptions, KptBackdropColors
  • Siatka — buildSignalGrid, signalGridDensity, signalGridAlpha, typy KptSignalGridOptions, KptSignalGridFrame, KptSignalGridCell
  • Wstęga — resolveWave, waveIntensity, waveRamp, waveBuffer, typy KptWaveOptions, KptWaveSettings, KptWaveBuffer, KptWaveHarmonic
  • Barwy (re-eksport z @konce-pt/color) — mixOklch, shiftHue, readCssColor, parseHexColor, toHexColor, srgbToOklab, oklabToSrgb, adaptLightness, adaptToSurface, relativeLuminance, prefersDarkContent, typy KptRgb, KptOklab
  • Losowanie — kptHash01
  • Stałe — KPT_SIGNAL_GRID_*, KPT_WAVE_*, KPT_BACKDROP_MAX_DPR, KPT_BACKDROP_MAX_STEP
  • Model — typy KptBackdropAnchor, KptBackdropEffect

Pełny opis: llms.txt (EN) i llms-pl.txt (PL).

Testy

pnpm --filter @konce-pt/backdrop exec node --test "src/**/*.test.ts"

Licencja

MIT © konce.pt