@fusion.dev/helix-docs 0.193.0 → 0.195.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/content/charting.mdx +26 -18
- package/content/coding-agents.mdx +71 -30
- package/content/introduction.mdx +1 -0
- package/content/metrics.mdx +226 -226
- package/content/spatial-charts.mdx +30 -6
- package/content/using-helix-with-an-agent.mdx +56 -96
- package/dist/pages.generated.js +2 -2
- package/dist/sources.generated.js +410 -376
- package/package.json +11 -9
package/content/charting.mdx
CHANGED
|
@@ -12,11 +12,11 @@ Helix has these chart families, and each one has its own API page:
|
|
|
12
12
|
- `Line Chart`
|
|
13
13
|
- `Area Chart`
|
|
14
14
|
- `Scatter Chart`
|
|
15
|
-
- `Spatial Scatter Chart`, drawn in three dimensions
|
|
16
|
-
- `Spatial Surface Chart`, drawn in three dimensions
|
|
15
|
+
- `Spatial Scatter Chart`, drawn in three dimensions
|
|
16
|
+
- `Spatial Surface Chart`, drawn in three dimensions
|
|
17
17
|
- `Donut Chart`
|
|
18
18
|
- `Heatmap`
|
|
19
|
-
- `Spatial Heatmap
|
|
19
|
+
- `Spatial Heatmap`, drawn in three dimensions
|
|
20
20
|
- `Sparkline`
|
|
21
21
|
- `Trend`
|
|
22
22
|
- `Legend`, which all of the charts share
|
|
@@ -40,20 +40,14 @@ Choose a chart by the question it answers.
|
|
|
40
40
|
overlaps the series, and `Area Chart` adds them.
|
|
41
41
|
- **Parts of one whole, at one moment.** `Donut Chart`.
|
|
42
42
|
- **Whether two measures relate.** `Scatter Chart`, with one point per row.
|
|
43
|
-
- **Where rows fall on three measures, and which gather together.** `
|
|
44
|
-
|
|
45
|
-
three dimensions, such as clusters or embeddings. Its table and its
|
|
46
|
-
|
|
47
|
-
- **How one measure rises and falls over two others.** `Spatial Surface Chart`,
|
|
48
|
-
row per place on a grid, drawn as a surface you can turn. Use it for
|
|
49
|
-
over two ranges, such as load by hour and by day. Its table carries
|
|
50
|
-
values.
|
|
51
|
-
|
|
52
|
-
The spatial charts and `Spatial Heatmap` draw themselves in 3D in SVG, which a
|
|
53
|
-
server, a print, and a page without WebGL all show. Shift with an arrow turns
|
|
54
|
-
the spatial charts' drawing. `@fusion.dev/helix-plot` draws all three with
|
|
55
|
-
three.js instead, lit and in perspective, in a view you can drag round and
|
|
56
|
-
zoom.
|
|
43
|
+
- **Where rows fall on three measures, and which gather together.** `Spatial
|
|
44
|
+
Scatter Chart`, with one point per row in a box you can turn. Use it for data
|
|
45
|
+
that has three dimensions, such as clusters or embeddings. Its table and its
|
|
46
|
+
tooltip carry the exact values.
|
|
47
|
+
- **How one measure rises and falls over two others.** `Spatial Surface Chart`,
|
|
48
|
+
with one row per place on a grid, drawn as a surface you can turn. Use it for
|
|
49
|
+
a measure over two ranges, such as load by hour and by day. Its table carries
|
|
50
|
+
the exact values.
|
|
57
51
|
- **How each day or check went.** `Heatmap`, for uptime, contributions, or
|
|
58
52
|
activity.
|
|
59
53
|
- **The same days, as a relief.** `Spatial Heatmap` reads the same table as
|
|
@@ -65,6 +59,12 @@ zoom.
|
|
|
65
59
|
Use `Trend` to show which way one measurement moved and whether that is good
|
|
66
60
|
news.
|
|
67
61
|
|
|
62
|
+
The three spatial charts draw themselves in 3D in SVG, which a
|
|
63
|
+
print and a page without WebGL show too, and a drag or Shift with an arrow
|
|
64
|
+
turns. `@fusion.dev/helix-plot` can also draw all three with three.js, lit and
|
|
65
|
+
in perspective, in a view you can drag round and zoom. The
|
|
66
|
+
[spatial charts guide](./spatial-charts) covers both.
|
|
67
|
+
|
|
68
68
|
## Charts read their data from a table
|
|
69
69
|
|
|
70
70
|
```html
|
|
@@ -127,8 +127,11 @@ reading a chart is usually read for:
|
|
|
127
127
|
- `Donut Chart`: each slice's share of the whole.
|
|
128
128
|
- `Scatter Chart`: each series' number of points and how strongly the two
|
|
129
129
|
measures relate.
|
|
130
|
+
- `Spatial Scatter Chart`: its three measures and its number of points.
|
|
131
|
+
- `Spatial Surface Chart`: its measures, its number of readings, and the range
|
|
132
|
+
of its heights.
|
|
130
133
|
|
|
131
|
-
`Heatmap`
|
|
134
|
+
`Heatmap` and `Spatial Heatmap` are each an image with that name. `Sparkline` takes a `label` of its own.
|
|
132
135
|
|
|
133
136
|
## Tables that change
|
|
134
137
|
|
|
@@ -184,6 +187,8 @@ These parts change direction:
|
|
|
184
187
|
right
|
|
185
188
|
- `Line Chart`, `Area Chart`, and `Sparkline`, with their end marks
|
|
186
189
|
- `Heatmap`'s weeks, which were already a grid laid out along the line
|
|
190
|
+
- `Spatial Heatmap`'s weeks in its SVG drawing. A three.js drawing keeps its
|
|
191
|
+
direction, and the chart's labels follow it.
|
|
187
192
|
- A half `Donut Chart`, which is read across
|
|
188
193
|
|
|
189
194
|
These parts keep their direction:
|
|
@@ -197,6 +202,9 @@ These parts keep their direction:
|
|
|
197
202
|
number line runs that way in every script. Its axis names read in their own
|
|
198
203
|
direction, so a name in Arabic reads right to left under the far end of the
|
|
199
204
|
plot. Its summary and tooltip follow the page's direction.
|
|
205
|
+
- `Spatial Scatter Chart` and `Spatial Surface Chart` are laid out as on a
|
|
206
|
+
left-to-right page, because all three of their axes are measures. Their
|
|
207
|
+
summaries and tooltips follow the page's direction.
|
|
200
208
|
|
|
201
209
|
To keep a chart left to right on a right-to-left page, such as a number line in
|
|
202
210
|
a mathematics text, set `dir="ltr"` on the chart element. You need nothing else.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Install Helix for a coding agent, and the files an agent can read to write Helix code.
|
|
3
3
|
order: 4
|
|
4
4
|
section: Getting started
|
|
5
5
|
title: Coding agents
|
|
@@ -11,6 +11,72 @@ We publish Helix as text for agents that write Helix code, so an agent does not
|
|
|
11
11
|
need to read the rendered website. Three sources give it the library as text.
|
|
12
12
|
We generate all three from the same sources as this site.
|
|
13
13
|
|
|
14
|
+
## Install the plugin
|
|
15
|
+
|
|
16
|
+
Helix's plugin gives an agent the [Helix skill](./using-helix-with-an-agent) and
|
|
17
|
+
the Helix MCP server in one install. The server runs
|
|
18
|
+
`npx @fusion.dev/helix-cli mcp`, the command line your project installs, so its
|
|
19
|
+
answers are your version's.
|
|
20
|
+
|
|
21
|
+
| Tool | Install |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Claude Code | `claude plugin marketplace add project-fusion/fusion`, then `claude plugin install helix@fusion` |
|
|
24
|
+
| Cursor | `/plugin marketplace add https://github.com/project-fusion/fusion` in Cursor's agent, then install `helix`. A team marketplace can import the repository instead |
|
|
25
|
+
| VS Code | Add `"chat.plugins.marketplaces": ["project-fusion/fusion"]` to your settings, search `@agentPlugins` in the Extensions view, and install `helix` |
|
|
26
|
+
| GitHub Copilot CLI | `copilot plugin install project-fusion/fusion:helix/plugin` |
|
|
27
|
+
| Codex | `codex plugin marketplace add project-fusion/fusion`, then `codex plugin add helix@fusion` |
|
|
28
|
+
| Devin | `devin plugins install project-fusion/fusion#helix/plugin` |
|
|
29
|
+
| Gemini CLI | `gemini skills install https://github.com/project-fusion/fusion.git --path helix/plugin/skills/helix`, for the skill alone |
|
|
30
|
+
|
|
31
|
+
The plugin follows the latest release of Helix. Its skill points to the copy in
|
|
32
|
+
`node_modules`, which matches the version you installed.
|
|
33
|
+
|
|
34
|
+
## Link the skill without a plugin
|
|
35
|
+
|
|
36
|
+
**Point your tool at the skill, and do not copy it.** A copy starts to go stale
|
|
37
|
+
as soon as you paste it, and the skill changes with the library. The skill in
|
|
38
|
+
the package matches the Helix you installed.
|
|
39
|
+
|
|
40
|
+
Most tools read skills from `.agents/skills`, and Claude Code and Cline from
|
|
41
|
+
`.claude/skills`. Link it into the one your tool reads:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
mkdir -p .agents/skills
|
|
45
|
+
ln -s ../../node_modules/@fusion.dev/helix/skills/helix .agents/skills/helix
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Other tools read a file in your repository. Add a line to it that names the
|
|
49
|
+
skill, or this page:
|
|
50
|
+
|
|
51
|
+
```md
|
|
52
|
+
Helix: read node_modules/@fusion.dev/helix/skills/helix/SKILL.md before
|
|
53
|
+
writing components, and node_modules/@fusion.dev/helix/api.json for the API.
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
| Tool | Where it goes |
|
|
57
|
+
|---|---|
|
|
58
|
+
| Claude Code | `.claude/skills/helix`, or a line in `AGENTS.md` or `CLAUDE.md` |
|
|
59
|
+
| Cursor | `.cursor/rules/` |
|
|
60
|
+
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
61
|
+
| Anything else | Whatever it reads. The line is the same |
|
|
62
|
+
|
|
63
|
+
We do not write those files for you, and we chose this on purpose. You would
|
|
64
|
+
have to maintain a file we generated in your repository against our changes. A
|
|
65
|
+
tool that rewrote it on install would be a dependency you did not ask for, in a
|
|
66
|
+
directory you own. You add the link or the line, and you can delete it.
|
|
67
|
+
|
|
68
|
+
## Install the Helix MCP server
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
helix mcp init --client claude
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`helix mcp` answers from the Helix packages your project installs: families,
|
|
75
|
+
examples, import lines, tokens, and the theme a brand color produces. `--client`
|
|
76
|
+
takes `claude`, `cursor`, or `vscode`, and writes the server into the file that
|
|
77
|
+
client reads. [The Helix MCP server](#the-helix-mcp-server) lists the tools. It runs on your
|
|
78
|
+
machine, talks to a client you chose, and makes no network requests.
|
|
79
|
+
|
|
14
80
|
## The manifest
|
|
15
81
|
|
|
16
82
|
```
|
|
@@ -78,37 +144,12 @@ agent uses most:
|
|
|
78
144
|
- `specifier` and `words` on each element: the line that registers it, and the
|
|
79
145
|
properties `registerWords` translates
|
|
80
146
|
|
|
81
|
-
## Import every family you write
|
|
82
|
-
|
|
83
|
-
Each tag needs its family's entry imported. A family registers its own parts,
|
|
84
|
-
so `@fusion.dev/helix/tabs` registers Tab and Tab Panel. A family does not
|
|
85
|
-
register another family's elements that you write inside it:
|
|
86
|
-
|
|
87
|
-
```js
|
|
88
|
-
import '@fusion.dev/helix/select'
|
|
89
|
-
import '@fusion.dev/helix/option'
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Without the Option import, the options are unknown elements and the Select
|
|
93
|
-
offers nothing. The same is true
|
|
94
|
-
of the layout around an example: a Button inside a Flex needs both imports.
|
|
95
|
-
Copy the import lines above an example together with its markup.
|
|
96
|
-
|
|
97
147
|
## Check the code you wrote
|
|
98
148
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
| `helix scan` | Unknown tags, attributes, values, slots, parts, hooks, React event props, and tokens, a `--_helix-` primitive read, `[disabled]` on a form control, a selector on an attribute the element never writes back, and a tag whose entry nothing imports, each with its file and line |
|
|
104
|
-
| `helix theme audit` | Every foreground and background pair in your theme that misses its contrast target |
|
|
105
|
-
| `initDiagnostics()` from `@fusion.dev/helix-diagnostics` | The same findings on the running page, and what the library reports as it runs, such as an option nobody imported |
|
|
106
|
-
|
|
107
|
-
`helix scan` and `helix theme audit` exit 1 when they find an error and 0 when
|
|
108
|
-
they find none. Run them after you write Helix code, and fix each finding
|
|
109
|
-
before you finish. `helix scan --file <path>` reports one file's findings, and
|
|
110
|
-
`helix scan --stdin tsx` reads a snippet from stdin. Both still read the whole
|
|
111
|
-
project, so an import in another file counts.
|
|
149
|
+
`helix scan`, `helix diagnostics --once`, and `helix theme audit` check what an
|
|
150
|
+
agent wrote, and the MCP server runs the same checks.
|
|
151
|
+
[Using Helix with an agent](./using-helix-with-an-agent#check-the-code-you-wrote)
|
|
152
|
+
lists what each finds.
|
|
112
153
|
|
|
113
154
|
## The index
|
|
114
155
|
|
package/content/introduction.mdx
CHANGED
|
@@ -64,6 +64,7 @@ each framework.
|
|
|
64
64
|
| `@fusion.dev/helix-icons` | You are drawing an icon outside a component |
|
|
65
65
|
| `@fusion.dev/helix-map` | You are drawing a map with MapLibre, Leaflet, or a renderer of your own. See [Maps](./maps) |
|
|
66
66
|
| `@fusion.dev/helix-graph` | You are drawing a graph with Sigma.js, cosmos.gl, three.js, or a renderer of your own. See [Graphs](./graphs) |
|
|
67
|
+
| `@fusion.dev/helix-plot` | You are drawing a spatial chart with three.js. See [Spatial charts](./spatial-charts) |
|
|
67
68
|
| `@fusion.dev/helix-core` | You are building a new Helix component |
|
|
68
69
|
|
|
69
70
|
React uses the elements directly. Helix ships a `jsx.d.ts` that types every
|