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

@arshdelight/loop-react

v0.1.2

Published

Agent UI for loop: ToolRow, tool renderer registry with Generic Fallback, markdown renderer (highlight.js / katex / mermaid), bilingual i18n, theming, renderer workbench

Readme

@arshdelight/loop-react

loop 的渲染层:ToolRow 工具行(dsh 式折叠行 + IN/OUT gutter)、工具渲染器注册表(下游注册专属渲染器,未注册工具落 Generic Fallback)、markdown 渲染器(highlight.js 代码高亮 / katex 公式 / mermaid 图表 / 流式光标)、中英双字典 t 协议 i18n、深浅自适应主题、渲染器预览工作台(可选子模块)。

import {
  LoopI18nProvider, StreamEntriesView,
  registerStreamToolRenderer, useLoopT,
  ToolRow, GutterBlock, type StreamToolRenderProps,
} from '@arshdelight/loop-react'
// css 入口依次引入(写法见下方样式节):
//   @import "tailwindcss";
//   @import "@arshdelight/loop-react/theme.css";
//   @import "@arshdelight/loop-react/markdown.css";

registerStreamToolRenderer('my_tool', (props: StreamToolRenderProps) => {
  const t = useLoopT()
  return (
    <ToolRow toolName={props.toolCall.toolName} input={props.toolCall.input}
             status={props.toolResult ? 'ok' : 'running'} title={t('mytool.running')}>
      <GutterBlock label="OUT">{JSON.stringify(props.toolResult?.output)}</GutterBlock>
    </ToolRow>
  )
})

function Chat({ entries, running }) {
  return (
    <LoopI18nProvider lang="zh">
      <StreamEntriesView entries={entries} streaming={running} />
    </LoopI18nProvider>
  )
}

样式:Tailwind v4 作为 peerDependency;下游 css 依次引入 tailwindcss、本包的 theme.css 与 markdown.css,并把本包 dist 加入 Tailwind 的 source 扫描。 换肤 = 覆盖 --loop-* CSS 变量;工具行标题等文案全部走 t 协议(内置中英双字典, LoopI18nProvider lang 一键切换)。

  • 术语表与下游用法:仓库 README
  • 事件协议(渲染的数据来源):@arshdelight/loop-core
  • 渲染器离线预览:@arshdelight/loop-react/workbench 的 RendererWorkbench

MIT License.