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

@ai-gui/plugin-solid

v0.29.2

Published

Solid-geometry teaching figures for AIGUI — cubes, prisms, pyramids, cones and their sections, described the way a textbook names them.

Downloads

740

Readme

@ai-gui/plugin-solid

Solid-geometry teaching figures for AIGUI. The model names a solid and the conditions on it — 正方体 ABCD-A1B1C1D1, 过 A、B1、D1 的截面 — and the figure is computed from those.

Install

pnpm add @ai-gui/plugin-solid

three is a dependency and is imported only when a figure is actually drawn, so a page whose answers contain no geometry never loads it.

Usage

import { solid } from "@ai-gui/plugin-solid"
import { buildSystemPrompt } from "@ai-gui/core"

<AIRenderer plugins={[solid()]} />

// The model has no prior for this block, so the spec is what makes it usable at all.
const system = buildSystemPrompt({ registry, plugins: [solid()], locale: "zh-CN" })

The model then emits:

平面 AB₁D₁ 截正方体,截面是正三角形。

```solid
{
  "solid": "cube",
  "label": "ABCD-A1B1C1D1",
  "edge": 2,
  "section": { "through": ["A", "B1", "D1"] },
  "highlight": [{ "plane": ["A", "B1", "D1"] }],
  "caption": "平面 AB1D1 截正方体所得的截面"
}
```

Why the protocol looks like this

Conditions, never results. The model says which three points the plane passes through; the section polygon is computed here. A model asked instead for the shape sometimes answers "五边形" when it is a hexagon, and a figure drawn from that answer would be wrong in a way a student cannot see. Vertex coordinates are refused for the same reason: they put the model's arithmetic into the picture.

The textbook's own vocabulary. A model is fluent in 正方体 ABCD-A1B1C1D1 — it has seen the notation hundreds of thousands of times — and is not fluent in {"vertices": [[0,0,0], …]}.

Every reference must resolve. A figure naming a point that was never defined is refused rather than drawn without it. {"plane": ["P", "A", "B"]} on a cone is the right shape in every field and still meaningless, because a cone has no A or B until onCircle puts them there.

Supported

| | | | --- | --- | | Solids | cube, cuboid, prism (3–6 sides), pyramid (3–6 sides), cylinder, cone, sphere | | Points | along a segment (on + at), a face centre (center), the foot of a perpendicular (foot), a point on a circle (onCircle + angle) | | Marks | segments (solid or dashed), section through three points, highlight of a line, plane, or angle | | Apex | apexOver: "A" puts the apex above one vertex, which is what makes PA ⊥ 底面 drawable — the default regular pyramid would contradict the explanation |

Not in this version, and the prompt spec tells the model to explain them in prose instead: net diagrams and shortest-path unfoldings, non-axial sections of cones and cylinders (they are conics, not polygons), animation of a moving point, compound or hollowed solids, coordinate annotation.

Options

  • height?: number — figure height in CSS pixels, default 320.
  • maxPoints?: number — refuse a figure introducing more than this many points, default 24.
  • maxSourceBytes?: number — refuse a fence larger than this before parsing it, default 16 KiB.

Dragging turns the figure; there is no authoring, panning or unbounded zoom. theme is honoured, so a figure on a dark page is drawn for one.

Testing note

src/fixtures/ holds the 19 figures a model actually produced when given this plugin's prompt spec and twenty textbook questions. They are part of the test suite: a protocol change they stop parsing is a change that breaks answers already being written.

See the root README for the full plugin list.