Repository navigation
chore: the published packages get a README and a way back to the source #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # @botharness/botui | ||
|
|
||
| Install BotUI components into your project — copy-and-own, like [shadcn](https://ui.shadcn.com). | ||
|
|
||
| ```bash | ||
| npx @botharness/botui add dot-matrix | ||
| ``` | ||
|
|
||
| The source lands in your repo. **No runtime dependency. Nothing to keep current. The code is | ||
| yours** — read it, change it, delete the name. | ||
|
|
||
| ## Why | ||
|
|
||
| A loading indicator is not a place to take a runtime dependency. It is thirty lines of animation | ||
| you will want to tune to your own brand, and the moment it is a dependency, tuning it means a | ||
| version bump or a patch-package. | ||
|
|
||
| So this installer copies **the real source files**, not a bundle. What lands in | ||
| `components/botui/` is the same text as the [BotUI repository](https://github.com/BotHarness/BotUI), | ||
| and a test in CI asserts it byte for byte. When BotUI ships something better, you take the diff | ||
| when you want to. | ||
|
|
||
| ## Commands | ||
|
|
||
| ```bash | ||
| npx @botharness/botui list # what the registry offers | ||
| npx @botharness/botui info <name> # what one component ships | ||
| npx @botharness/botui add <name> # copy it into your project | ||
| npx @botharness/botui add <name> --dry-run # show the plan, write nothing | ||
| ``` | ||
|
|
||
| ## Also works with shadcn | ||
|
|
||
| The registry is served in shadcn's format, so this installs the same component: | ||
|
|
||
| ```bash | ||
| npx shadcn@latest add https://ui.botharness.ai/r/dot-matrix.json | ||
| ``` | ||
|
|
||
| Files are fetched from the registry at `ui.botharness.ai`, not from npm — so a published version | ||
| whose registry item is not deployed yet installs nothing. That ordering is deliberate; see | ||
| [Releasing](https://github.com/BotHarness/BotUI#releasing). | ||
|
|
||
| ## Documentation | ||
|
|
||
| **[ui.botharness.ai](https://ui.botharness.ai)** — a live playground for every component, in | ||
| [English](https://ui.botharness.ai/) and [中文](https://ui.botharness.ai/zh/). | ||
|
|
||
| ## License | ||
|
|
||
| MIT © [BotHarness](https://github.com/BotHarness/BotUI) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # @botharness/botui-core | ||
|
|
||
| The framework-agnostic engine behind BotUI components — no DOM library, no framework, one dependency: none. | ||
|
|
||
| This is the layer that decides **which cells exist**, **what order the light moves in**, **how bright each cell is over the cycle**, and **how one dot is drawn**. Those are independent questions, so they are independent tables you can extend without touching each other. | ||
|
|
||
| ## Install | ||
|
|
||
| You probably don't need this package. The recommended path is to copy the source into your repo: | ||
|
|
||
| ```bash | ||
| npx @botharness/botui add dot-matrix | ||
| ``` | ||
|
|
||
| Install it from npm when you want the engine as a dependency, or when you are building tooling on top of it: | ||
|
|
||
| ```bash | ||
| npm install @botharness/botui-core | ||
| ``` | ||
|
|
||
| ## Use | ||
|
|
||
| ```ts | ||
| import { createDotMatrix } from "@botharness/botui-core"; | ||
| import "@botharness/botui-core/style.css"; // required for renderer: "css" | ||
|
|
||
| const field = createDotMatrix(document.querySelector("#loading")!, { | ||
| size: 32, | ||
| cols: 5, | ||
| rows: 5, | ||
| silhouette: "circle", | ||
| dot: "circle", | ||
| preset: "spiral", | ||
| }); | ||
|
|
||
| field.start(); | ||
| // …later | ||
| field.destroy(); | ||
| ``` | ||
|
|
||
| ### The two renderers | ||
|
|
||
| | `renderer` | Cost | Use when | | ||
| | ----------------- | --------------------------------------------- | ----------------------------------------------- | | ||
| | `"svg"` (default) | one attribute write per visible dot per frame | you animate size, shape, or dot count | | ||
| | `"css"` | **zero JS per frame** — one `@keyframes` rule | the geometry is fixed and only brightness moves | | ||
|
|
||
| Both are driven by the same `field(options, t)`, a pure function of the options and a phase. That is the whole reason the CSS path is trustworthy: it is not a second implementation, so it cannot drift from the SVG one. | ||
|
|
||
| `cssRenderable(options)` tells you up front whether a motion can be expressed as keyframes. Some cannot — `columns` staggers each column's entry, which a per-dot `animation-delay` does not model — and the function returns `false` rather than silently rendering something else. | ||
|
|
||
| ### The five layers | ||
|
|
||
| | Layer | Question it answers | | ||
| | ------------- | ------------------------------------------------------------------------- | | ||
| | **Lattice** | which cells exist (`square`, `circle`, `diamond`, `hex`, `ring`, `cross`) | | ||
| | **Traversal** | what order the light moves in (`spiral`, `columnSnake`, `radial`, `ring`) | | ||
| | **Envelope** | how bright a cell is over the cycle (`comet`, `wave`, `plateau`, `chase`) | | ||
| | **Glyph** | how one dot is drawn — a polygon plus two corner radii | | ||
| | **Renderer** | SVG or CSS | | ||
|
|
||
| The full option list, and the reasoning behind the size algebra, are in | ||
| [`src/types.ts`](https://github.com/BotHarness/BotUI/blob/main/packages/core/src/types.ts). | ||
|
|
||
| ## Documentation | ||
|
|
||
| **[ui.botharness.ai](https://ui.botharness.ai)** — a live playground for every control, in | ||
| [English](https://ui.botharness.ai/) and [中文](https://ui.botharness.ai/zh/). | ||
|
|
||
| ## License | ||
|
|
||
| MIT © [BotHarness](https://github.com/BotHarness/BotUI) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # @botharness/botui-react | ||
|
|
||
| React bindings for [BotUI](https://github.com/BotHarness/BotUI) components — `<DotMatrix>`. | ||
|
|
||
| The engine ([`@botharness/botui-core`](https://www.npmjs.com/package/@botharness/botui-core)) | ||
| does the work; this package is a ref and an effect. That is deliberate: a component that owns | ||
| no geometry cannot drift from the engine that does. | ||
|
|
||
| ## Install | ||
|
|
||
| You probably don't need this package. The recommended path is to copy the source into your repo: | ||
|
|
||
| ```bash | ||
| npx @botharness/botui add dot-matrix | ||
| ``` | ||
|
|
||
| Install it from npm when you want a component you can import and upgrade: | ||
|
|
||
| ```bash | ||
| npm install @botharness/botui-react @botharness/botui-core | ||
| ``` | ||
|
|
||
| `react` is a peer dependency (`>=18`); the stylesheet ships with the core package: | ||
|
|
||
| ```ts | ||
| import "@botharness/botui-core/style.css"; // once, in your app entry | ||
| ``` | ||
|
|
||
| ## Use | ||
|
|
||
| ```tsx | ||
| import { DotMatrix } from "@botharness/botui-react"; | ||
|
|
||
| // `state` is the vocabulary an agent UI already speaks | ||
| <DotMatrix state="thinking" size={24} /> | ||
| <DotMatrix state="streaming" size={24} renderer="css" /> | ||
| ``` | ||
|
|
||
| `state` is a **preset** — motion plus the agent state it is meant to express. If you want the | ||
| underlying geometry instead, pass the options directly and `preset` becomes optional: | ||
|
|
||
| ```tsx | ||
| <DotMatrix size={24} cols={5} rows={5} silhouette="circle" dot="circle" /> | ||
| ``` | ||
|
|
||
| `renderer="css"` costs zero JS per frame but only works for motions the engine can express as | ||
| keyframes. The component checks for you: asking for an unsupported motion falls back to SVG | ||
| rather than rendering something that does not match the preview. | ||
|
|
||
| ## Documentation | ||
|
|
||
| **[ui.botharness.ai](https://ui.botharness.ai)** — a live playground for every prop, in | ||
| [English](https://ui.botharness.ai/) and [中文](https://ui.botharness.ai/zh/). | ||
|
|
||
| ## License | ||
|
|
||
| MIT © [BotHarness](https://github.com/BotHarness/BotUI) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Compare the complete repository identity.
https://github.com/BotHarness/BotUI-other.gitpasses this substring check, although it points to a different repository. The checker therefore accepts metadata that violates its same-repository requirement.Normalize the optional
git+prefix and.gitsuffix, then compare the complete URL withREPO_URL.🤖 Prompt for AI Agents