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

@lynx-js/lynx-api-docs

v0.3.8

Published

Install the public Lynx engine AI context bundle into a project and inject AGENTS.md references.

Readme

Lynx API Docs - Engine AI Context Bundle

Install Into Another Project

Use the npm CLI package to vendor this engine docs bundle into another project and inject a managed reference block into that project's root AGENTS.md. The package is intended to be consumed by upstream DSL framework skills or agents rather than directly by end developers.

npx @lynx-js/lynx-api-docs install

Optional flags:

  • --project <path>: target another project root
  • --dest <path>: override the default install location .ai/lynx-api-docs
  • --dry-run: preview file changes without writing
  • --no-link: skip linking to project-local agent skill directories
  • --link-claude: link the skill to <project>/.claude/skills/
  • --link-codex: link the skill to <project>/.codex/skills/
  • --link-trae: link the skill to <project>/.trae/skills/
  • --link-all: link the skill to all known project-local agent directories (default)
  • --skills-dir <path>: link the skill to a custom directory

The CLI copies this engine context bundle into the target project and adds a compact AGENTS.md pointer so agents can retrieve the detailed references on demand. By default, it also links the installed skill into .claude/skills/, .codex/skills/, and .trae/skills/; use --no-link to skip those links.

This package is an AI context bundle, not a traditional JavaScript or native runtime API reference. It documents the public Lynx surface shipped in this repository.

This is the Lynx engine documentation entry point for upstream DSL framework skills and agents. It contains public documentation for CSS, layout, elements, patterns, examples, and best practices.

Public Surface

This package documents only the public Lynx surface. Use the public element references included in the package instead of relying on undocumented tags or host-specific behavior.

Quick Start

Layout Systems

Lynx provides four layout systems:

  1. Linear layout - The default and most efficient layout, suitable for simple lists
  2. Flex layout - CSS Flexbox, suitable for complex flexible layouts
  3. Grid layout - A subset of CSS Grid, suitable for two-dimensional layouts
  4. Relative layout - A Lynx-specific system for layouts based on relative constraints

CSS Reference

Lynx-Specific Features

Elements

  • page element - Page root, CSS rem reference root, and layout root
  • view element - General-purpose container for layout wrappers and visual styles
  • text element - Text rendering, nested text composition, and truncation
  • image element - Bitmap loading, placeholders, and animated-image playback control
  • list element - Large data sets, list-item structure, and scroll-threshold events
  • input element - Single-line input, text selection, and confirm actions
  • scroll-view element - General-purpose scroll container, scroll events, and scrolling methods
  • scroll-coordinator element - Public coordinated header/content scrolling, collapse events, and scrolling methods
  • svg element - Native SVG rendering and Serval-mode considerations
  • textarea element - Multiline input, row limits, and text methods
  • blur-view element - Public blur container, iOS material effects, and Android automatic-update control
  • refresh element - Public pull-to-refresh container, refresh header, and refresh-state events
  • viewpager element - Public paging container, page-change events, and selectTab
  • overlay element - Public overlay container, show/dismiss events, and platform overlay capabilities
  • webview element - Native WebView loading, message bridging, and method-based control

Styling Patterns

Layout Examples

Usage Recommendations

As Context for an AI Coding Agent

const loadContext = (intent: string) => {
  const base = load('quick-reference.md');

  switch (intent) {
    case 'layout':
      return base + load('layout/' + layoutType + '.md');
    case 'element':
      return base + load('elements/' + elementName + '.md');
    case 'migration':
      return base + load('lynx-vs-web/migration-guide.md');
    default:
      return base + load('best-practices.md');
  }
};

Context Size

  • Quick reference: ~8 KB - Frequently used value types and properties
  • One layout system: ~8 KB - Detailed layout guidance and examples
  • Complete context: All documentation, loaded on demand

Key Points

  1. Layout selection: Use Linear for simple lists, Flex for complex layouts, and Grid for two-dimensional layouts.
  2. Default behavior: An element with no display declaration uses Linear Layout by default, and text content must be placed in a <text> element.
  3. Box model: The default is border-box, and margins do not collapse.
  4. Recommended units: Use rem and vw for screen adaptation. rpx is Lynx-specific and fully supported, but is not Web-compatible.
  5. Performance first: Minimize nesting, use CSS classes, and avoid dynamic layout changes.
  6. Element selection: Read the corresponding element reference before using platform-specific capabilities.

Feedback and Updates

This context bundle evolves with Lynx releases and developer feedback.