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

@horizon-js/web-nextjs

v2.5.0

Published

Frontend core Horizon Next.js — hooks, query engine, capabilities, platform utilities. Pacote multi-subpath.

Readme

@horizon-js/web-nextjs

Frontend core do Horizon — pacote multi-subpath. Consolida tudo que é genérico do frontend Next.js: hooks, motor de query, capabilities, navegação, UI kit, platform core.

Antes da versão 2.4.0 este pacote era apenas documentação. A partir de 2.4.0 virou runtime + docs.


Subpaths

// Motor de query de listas (enricher, URL parser, factory, facets)
import { createListContext, SearchStateEnricher, UrlStateSerializer } from "@horizon-js/web-nextjs/frontend-query-engine"

Roadmap de subpaths (adicionados conforme FASE D+ do projetão):

| Subpath | Status | O que contém | |---|---|---| | /frontend-query-engine | ✅ 2.4.0 | Factory, state-to-request, state-to-url, request-options | | /hooks | pendente | useGetOnScreen, useScrollLock, useGetDeviceSizeName, useGetScrollDirection | | /platform-core | pendente | Registry de módulos, tipos da plataforma | | /capabilities/mkt-scripts | pendente | GTM, GA, Facebook Pixel | | /capabilities/contacts | pendente | WhatsApp button, redes sociais | | /capabilities/seo | pendente | Meta tags, JSON-LD helpers |


frontend-query-engine

Motor de query de listas. Submódulo principal até agora.

import {
  createListContext,
  SearchStateEnricher,
  UrlStateSerializer,
  buildRequestOptionsGenerator,
  FieldsResolver,
  RangeIdentifier,
  type ListSchema,
  type EnrichedRequest
} from '@horizon-js/web-nextjs/frontend-query-engine'

Organização interna

frontend-query-engine/
├── factory/           → createListContext (context React de listagem)
├── state-to-request/  → SearchStateEnricher (estado → request da API)
├── state-to-url/      → UrlStateSerializer (estado ↔ querystring)
└── request-options/   → buildRequestOptionsGenerator (config de facets)

Para documentação detalhada da arquitetura interna ver src/frontend-query-engine/.

Origem

Este módulo foi extraído de 4 libs locais do projeto GHI-7661 (Horizon 2.3) em 2026-04-22:

  • list-context-factoryfactory/
  • list-context-state-to-request-enricherstate-to-request/
  • list-context-state-to-url-parserstate-to-url/
  • list-context-request-options-generatorrequest-options/

O código foi inicialmente publicado como @horizon-js/[email protected] standalone (desvio da arquitetura planejada). Corrigido em 2026-04-22 movendo pra subpath deste pacote, conforme o projetão documentado em Inteligência Imobland/02 - Projetos e ideias/Horizon 2.3/reorganizacao-pacotes-npm/.


Filosofia atual vs futura

A filosofia atual do frontend-query-engine é list-context v4 (factory pattern com handlers plugáveis). Está planejada migração pra TanStack Query + Zustand + contratos universais (QueryRequest/QueryResponse) — ver doc 05-FRONTEND-QUERY-ENGINE.md do projetão.

Essa migração vai acontecer em releases futuras:

  • 2.4.x — mantém filosofia atual, apenas consolida o código aqui
  • 2.5.0 — adiciona contratos universais (QueryRequest, QueryResponse) + adapter pattern
  • 2.6.0+ — adiciona TanStack hooks (useListInfinite, useListMap, useListFacets, useListPreview)
  • 3.0.0 — depreca list-context v4 (factory pattern), filosofia totalmente TanStack+Zustand

Consumidores em 2.4.x seguirão funcionando ao atualizar pra 3.0.0 via migration guide.


Peer dependencies

  • react >= 18.0.0 (opcional — só requerido pelo factory/ submódulo)

Documentação