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

@chrono-os/admin-lp-editor

v0.9.0

Published

Editor visual de Landing Pages (forms por section do @chrono-os/lp-schema, preview vivo em iframe, paletas/cores recentes, sticky CTA, activity feed) com injeção de dependências por context — neutro, consumível por qualquer app admin.

Downloads

504

Readme

@chrono-os/admin-lp-editor

Editor visual de Landing Pages — neutro e consumível por qualquer app admin.

Entrega o componente <LPEditor>:

  • Forms por section do @chrono-os/lp-schema (15 tipos: hero, problema, benefícios, depoimentos, FAQ, pricing, form, vídeo, countdown, garantia, footer, programa, instrutores, cta-strip, qualificação interativa).
  • Preview vivo em iframe (desktop + mobile) por section + sticky CTA, com postMessage pra refletir edições de cor sem salvar.
  • Paletas salvas + histórico de cores recentes por kind (bg/text/hover).
  • Sticky CTA bar configurável.
  • Activity feed (opcional).

O editor não conhece o backend, o roteador, nem o storage do app. Tudo entra por injeção de dependências via <AdminLpEditorProvider>.

Instalação

yarn add @chrono-os/admin-lp-editor \
  @chrono-os/lp-schema @chrono-os/lp-react \
  @chrono-os/image-editor-react lucide-react

react/react-dom >= 18 são peers. @chrono-os/lp-react é peer opcional (usado pelas rotas de preview do consumer, não pelo editor em si).

Uso

'use client'

import {
  LPEditor,
  AdminLpEditorProvider,
  type AdminLpEditorApi,
  type AdminLpEditorNav,
  type EditorLp,
} from '@chrono-os/admin-lp-editor'
import { useRouter } from 'next/navigation'

const api: AdminLpEditorApi = {
  createLP: (payload) => myApi.createLP(payload),
  updateLP: (id, payload) => myApi.updateLP(id, payload),
  loadPalettes: () => myApi.loadPalettes(),
  savePalette: (name, theme) => myApi.savePalette(name, theme),
  deletePalette: (id) => myApi.deletePalette(id),
  loadRecentColors: () => myApi.loadRecentColors(),
  pushThemeColors: (theme) => myApi.pushThemeColors(theme),
  uploadAdapter: myUploadAdapter, // do @chrono-os/image-editor-react
  loadActivity: (lpId) => myApi.loadActivity(lpId), // opcional
}

export function EditPage({ lp }: { lp?: EditorLp }) {
  const router = useRouter()
  const nav: AdminLpEditorNav = {
    onCreated: (id) => router.replace(`/admin/dashboard/lps/${id}`),
    onCancel: () => router.back(),
    statsHref: (id) => `/admin/dashboard/lps/${id}/stats`,
    publicHref: (slug) => `/lp/${slug}`,
    previewBasePath: '/admin-preview', // default
  }
  return (
    <AdminLpEditorProvider api={api} nav={nav}>
      <LPEditor lp={lp} />
    </AdminLpEditorProvider>
  )
}

Rotas de preview

O editor renderiza iframes apontando para:

  • <previewBasePath>/lp/:id/section/:index?v=...&viewport=desktop|mobile
  • <previewBasePath>/lp/:id/sticky-cta?v=...

O consumer é responsável por servir essas rotas (renderizando a section/sticky isolada via @chrono-os/lp-react). previewBasePath default é /admin-preview.

Tailwind

Os componentes usam classes utilitárias + tokens do design system Chrono/Naírio (brand-blue, brand-navy). Inclua o dist deste pacote no content do seu tailwind.config pra não purgar as classes:

content: [
  // ...
  './node_modules/@chrono-os/admin-lp-editor/dist/**/*.{js,cjs}',
]

API pública

| Export | Tipo | |---|---| | LPEditor | ({ lp?: EditorLp }) => JSX.Element | | AdminLpEditorProvider | ({ api, nav, children }) => JSX.Element | | useAdminLpEditor | () => { api, nav } | | SECTION_LABELS | Record<LPSectionType, string> | | defaultSection | (type: LPSectionType) => LPSection |

Tipos: AdminLpEditorApi, AdminLpEditorNav, EditorLp, EditorStickyCta, SavedPalette, RecentColorsByKind, RecentColorKind, LpThemeState, ThemeResolvedColors, LpActivity.