@fusion.dev/helix-docs 0.223.0 → 0.224.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/building-on-the-headless-tier.mdx +6 -8
- package/content/events.mdx +151 -49
- package/content/graphs.mdx +7 -5
- package/content/introduction.mdx +2 -2
- package/content/maps.mdx +1 -1
- package/content/metrics.mdx +288 -288
- package/content/other-frameworks.mdx +1 -1
- package/content/routing.mdx +17 -10
- package/content/sandbox.mdx +1 -1
- package/content/using-helix-with-an-agent.mdx +1 -1
- package/content/using-the-elements.mdx +30 -5
- package/content/visual-testing.mdx +59 -2
- package/dist/pages.generated.js +1 -1
- package/dist/sources.generated.js +564 -373
- package/package.json +14 -14
|
@@ -170,17 +170,16 @@ Each flag does one job, and the manifest is incomplete without either:
|
|
|
170
170
|
- `--litelement` reads Lit's decorators, so the properties you declare with
|
|
171
171
|
`@property` are attributes too.
|
|
172
172
|
|
|
173
|
-
Then run a typings generator over the manifest
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
wrote.
|
|
173
|
+
Then run a typings generator over the manifest, such as `@wc-toolkit/jsx-types`
|
|
174
|
+
or `@wc-toolkit/vuejs-types`. The typings for `acme-combobox` then include the
|
|
175
|
+
members it inherits, as well as the ones you wrote.
|
|
177
176
|
|
|
178
177
|
The generated file names Helix's event classes, such as
|
|
179
178
|
`HelixBeforeChangeEvent`, without importing them. Add one line at its top that
|
|
180
179
|
imports the names TypeScript reports as missing:
|
|
181
180
|
|
|
182
181
|
```ts
|
|
183
|
-
import type { HelixBeforeChangeEvent,
|
|
182
|
+
import type { HelixBeforeChangeEvent, HelixBeforeFilterEvent } from '@fusion.dev/helix-core'
|
|
184
183
|
```
|
|
185
184
|
|
|
186
185
|
Without that line, a project that sets `skipLibCheck` gets no error, and each
|
|
@@ -204,9 +203,8 @@ declare module 'react' {
|
|
|
204
203
|
|
|
205
204
|
A subclass that adds properties joins its own to them with `&`.
|
|
206
205
|
|
|
207
|
-
`@fusion.dev/helix-cem`, the step that
|
|
208
|
-
|
|
209
|
-
repository.
|
|
206
|
+
`@fusion.dev/helix-cem`, the step that writes our own typings from our manifests,
|
|
207
|
+
is not published. It is build tooling for this repository.
|
|
210
208
|
|
|
211
209
|
### The tag map
|
|
212
210
|
|
package/content/events.mdx
CHANGED
|
@@ -34,8 +34,9 @@ ways:
|
|
|
34
34
|
|
|
35
35
|
- The class name is in the manifest, so the framework typings can emit a typed
|
|
36
36
|
callback. A bare `CustomEvent` would give `(detail: unknown)`.
|
|
37
|
-
- The
|
|
38
|
-
|
|
37
|
+
- The family augments `HTMLElementEventMap` for its own events, and core does
|
|
38
|
+
for the events several families share. Importing a family types
|
|
39
|
+
`addEventListener` for its events when you write plain HTML.
|
|
39
40
|
- The name is defined on the class, so a dispatch and a listener always use the
|
|
40
41
|
same string.
|
|
41
42
|
|
|
@@ -75,9 +76,10 @@ from an unprefixed name, and you would.
|
|
|
75
76
|
`helix-before-open` and `helix-before-close`. Overlays nest, and an inner
|
|
76
77
|
overlay's lifecycle must never reach the outer overlay that contains it. A
|
|
77
78
|
menu that closes inside a dialog does not close the dialog.
|
|
78
|
-
- **Coordination events** bubble and are composed. These are
|
|
79
|
-
`helix-dismiss`, and `helix-before-change`. A parent or
|
|
80
|
-
them across a shadow boundary, so you can use a `Tree`
|
|
79
|
+
- **Coordination events** bubble and are composed. These are
|
|
80
|
+
`helix-before-select`, `helix-dismiss`, and `helix-before-change`. A parent or
|
|
81
|
+
a router can intercept them across a shadow boundary, so you can use a `Tree`
|
|
82
|
+
as navigation.
|
|
81
83
|
|
|
82
84
|
If you listen on a container and receive nothing, the event is probably a
|
|
83
85
|
lifecycle event. Add the listener to the element itself.
|
|
@@ -95,31 +97,157 @@ dialog.addEventListener('helix-before-close', (event) => {
|
|
|
95
97
|
})
|
|
96
98
|
```
|
|
97
99
|
|
|
98
|
-
Every dispatched event is checked against a declaration,
|
|
99
|
-
|
|
100
|
+
Every dispatched event is checked against a declaration, so every event you can
|
|
101
|
+
listen for is documented. A declaration needs no dispatch of its own, because a
|
|
102
|
+
parent declares the events its children send and a form control declares the
|
|
103
|
+
native event it relays.
|
|
104
|
+
|
|
105
|
+
## Names
|
|
106
|
+
|
|
107
|
+
Every Helix event follows one grammar:
|
|
108
|
+
|
|
109
|
+
- A request is named `helix-before-<verb>`. It is cancelable, carries what is
|
|
110
|
+
being proposed, and is sent before anything moves.
|
|
111
|
+
- Its notification is the native event where the platform has one, such as
|
|
112
|
+
`change` or `toggle`. Otherwise it is `helix-<verb>`, the same verb without
|
|
113
|
+
`before`. It is not cancelable, carries the state now in force, and is sent
|
|
114
|
+
once the change stands. A request that is refused sends no notification.
|
|
115
|
+
- `toggle` means open and closed, as it does on `<details>`. A checked state
|
|
116
|
+
uses `helix-before-check`, followed by `change` on a form control or by
|
|
117
|
+
`helix-check` elsewhere.
|
|
118
|
+
|
|
119
|
+
Two notifications use the past tense, because the plain verb is taken:
|
|
120
|
+
`helix-resized`, since `helix-resize` reports a measurement, and
|
|
121
|
+
`helix-pasted`, since `paste` is the clipboard event.
|
|
122
|
+
|
|
123
|
+
### Commands
|
|
124
|
+
|
|
125
|
+
Five events are cancelable and have no `before` in their name. Each one is a
|
|
126
|
+
command you can refuse, and no notification follows, because nothing is in
|
|
127
|
+
force afterwards to report:
|
|
128
|
+
|
|
129
|
+
- `helix-create`, a value a combobox list does not hold
|
|
130
|
+
- `helix-dismiss`, an element asking to be taken away
|
|
131
|
+
- `helix-send`, what a reader wrote in a chat composer
|
|
132
|
+
- `helix-shortcut`, a chord that was pressed
|
|
133
|
+
- `helix-terminal-link`, an address a terminal would open
|
|
134
|
+
|
|
135
|
+
### Changed in October 2026
|
|
136
|
+
|
|
137
|
+
Requests that had plain names now carry `before`, and the plain name is the
|
|
138
|
+
notification:
|
|
139
|
+
|
|
140
|
+
- `helix-sort`, `helix-filter`, `helix-select`, and `helix-reorder` were the
|
|
141
|
+
requests on Data Table. They are `helix-before-sort`, `helix-before-filter`,
|
|
142
|
+
`helix-before-select`, and `helix-before-reorder` now. The plain names are
|
|
143
|
+
the notifications that were `helix-sorted`, `helix-filtered`,
|
|
144
|
+
`helix-selected`, and `helix-reordered`. **A page that bound `helix-sort` to
|
|
145
|
+
refuse a sort binds `helix-before-sort` now**, because `helix-sort` arrives
|
|
146
|
+
after the order has moved and cannot be refused.
|
|
147
|
+
- `helix-navigate` is `helix-before-navigate`, and `helix-navigate` follows it
|
|
148
|
+
on Pagination, Data Table, Date Picker, and Drilldown. Pagination and Data
|
|
149
|
+
Table sent `helix-activate` after a page moved, and send `helix-navigate`
|
|
150
|
+
now.
|
|
151
|
+
- `helix-select` on Carousel is `helix-before-activate`, and `helix-activate`
|
|
152
|
+
still follows it.
|
|
153
|
+
- `helix-facet`, `helix-graph-filter`, and `helix-read` are
|
|
154
|
+
`helix-before-facet`, `helix-before-graph-filter`, and `helix-before-read`,
|
|
155
|
+
and each plain name is the notification after it.
|
|
156
|
+
- `helix-before-toggle` is `helix-before-check`, and `helix-toggle` is
|
|
157
|
+
`helix-check`. A row of Table that opens sends `helix-before-expand` and
|
|
158
|
+
`helix-expand`.
|
|
159
|
+
- `helix-reorder` on a list, a tree, or a table is no longer cancelable. Refuse
|
|
160
|
+
`helix-before-reorder` to keep an item where it is.
|
|
100
161
|
|
|
101
162
|
## Helix events
|
|
102
163
|
|
|
164
|
+
Each component's page lists the events it sends, with the class and the detail.
|
|
165
|
+
|
|
166
|
+
### Requests and notifications
|
|
167
|
+
|
|
168
|
+
| Event | Meaning |
|
|
169
|
+
|---|---|
|
|
170
|
+
| `helix-before-activate`, `helix-activate` | A set is about to make a different child current, and then did |
|
|
171
|
+
| `helix-before-change` | A value is about to change. `input` and `change` follow |
|
|
172
|
+
| `helix-before-check`, `helix-check` | A checked state is about to change, and then did. A form control sends `change` in place of `helix-check` |
|
|
173
|
+
| `helix-before-collapse`, `helix-collapse` | A splitter's pane is about to shut or reopen, and then did |
|
|
174
|
+
| `helix-before-edit`, `helix-edit` | A sandbox's source is about to be edited, and then was |
|
|
175
|
+
| `helix-before-expand`, `helix-expand` | Rows of a table are about to open or close in place, and then did |
|
|
176
|
+
| `helix-before-facet`, `helix-facet` | A filter input's field is about to be filtered by other values, and then was |
|
|
177
|
+
| `helix-before-filter`, `helix-filter` | A list or a table is about to narrow what it shows, and then did |
|
|
178
|
+
| `helix-before-follow`, `helix-follow` | A press on a link in a table cell is about to load its page, and then is |
|
|
179
|
+
| `helix-before-graph-filter`, `helix-graph-filter` | A graph is about to show or hide a group's notes, and then did |
|
|
180
|
+
| `helix-before-listen`, `helix-listen` | A field is about to listen for dictation, and then put a phrase in its text |
|
|
181
|
+
| `helix-before-move`, `helix-move` | Cards on a canvas are about to move, and then did |
|
|
182
|
+
| `helix-before-navigate`, `helix-navigate` | A component is about to move the view it shows, such as a page or a month, and then did |
|
|
183
|
+
| `helix-before-open`, `helix-before-close` | An open state is about to change. `toggle` follows |
|
|
184
|
+
| `helix-before-panel-resize`, `helix-panel-resize` | A sandbox's panel is about to change height, and then did |
|
|
185
|
+
| `helix-before-paste`, `helix-pasted` | Cards are about to be pasted onto a canvas, and then were |
|
|
186
|
+
| `helix-before-pin`, `helix-pin` | A transcript is about to be pinned to the bottom or let go of it, and then was |
|
|
187
|
+
| `helix-before-read`, `helix-read` | A notification is about to be marked read or unread, and then was |
|
|
188
|
+
| `helix-before-reconnect`, `helix-reconnect` | A connection's end on a canvas is about to move, and then did |
|
|
189
|
+
| `helix-before-relabel`, `helix-relabel` | A label a canvas draws is about to change, and then did |
|
|
190
|
+
| `helix-before-reorder`, `helix-reorder` | A row, an item, or a column is about to move to a new place, and then did |
|
|
191
|
+
| `helix-before-resize`, `helix-resized` | A splitter's divider is about to settle, and then did |
|
|
192
|
+
| `helix-before-select`, `helix-select` | An item in a set is about to be chosen, and then a selection changed |
|
|
193
|
+
| `helix-before-sort`, `helix-sort` | A table is about to change its order, and then did |
|
|
194
|
+
| `helix-before-split`, `helix-split` | The divider between a sandbox's panes is about to move, and then did |
|
|
195
|
+
|
|
196
|
+
### Command events
|
|
197
|
+
|
|
198
|
+
| Event | Meaning |
|
|
199
|
+
|---|---|
|
|
200
|
+
| `helix-create` | A combobox was asked for a value its list does not hold |
|
|
201
|
+
| `helix-dismiss` | An element asks to be taken away |
|
|
202
|
+
| `helix-send` | A chat composer is handing over what the reader wrote |
|
|
203
|
+
| `helix-shortcut` | A shortcut's chord was pressed |
|
|
204
|
+
| `helix-terminal-link` | A link in a terminal's output was activated |
|
|
205
|
+
|
|
206
|
+
### Other notifications
|
|
207
|
+
|
|
103
208
|
| Event | Meaning |
|
|
104
209
|
|---|---|
|
|
105
|
-
| `helix-
|
|
106
|
-
| `helix-
|
|
107
|
-
| `helix-
|
|
108
|
-
| `helix-
|
|
109
|
-
| `helix-
|
|
110
|
-
| `helix-
|
|
111
|
-
| `helix-
|
|
112
|
-
| `helix-select` | An item was chosen from a set |
|
|
113
|
-
| `helix-dismiss` | A user asked for something to close |
|
|
114
|
-
| `helix-next`, `helix-previous` | Movement through a sequence |
|
|
115
|
-
| `helix-filter` | A query changed in a filtering control |
|
|
116
|
-
| `helix-navigate` | A component is about to navigate |
|
|
117
|
-
| `helix-copy` | Something was copied |
|
|
118
|
-
| `helix-caret` | The cursor moved in a text control |
|
|
210
|
+
| `helix-action` | A reader acted on a list row |
|
|
211
|
+
| `helix-aura-fallback` | An aura stopped drawing its shader and shows its gradient |
|
|
212
|
+
| `helix-band` | A meter's reading moved into another band |
|
|
213
|
+
| `helix-canvas-edit` | A reader asked to edit a card |
|
|
214
|
+
| `helix-canvas-pan`, `helix-canvas-zoom`, `helix-canvas-view` | A canvas moved, zoomed, or changed its view |
|
|
215
|
+
| `helix-caret` | The cursor moved in a text editor |
|
|
216
|
+
| `helix-clear` | A reader cleared a value |
|
|
119
217
|
| `helix-complete` | A control that fills up has filled |
|
|
120
|
-
| `helix-
|
|
218
|
+
| `helix-connect` | A reader asked for two cards to be joined |
|
|
121
219
|
| `helix-console` | The sandbox passes on a log message |
|
|
122
|
-
| `helix-
|
|
220
|
+
| `helix-copy`, `helix-copy-error` | Something was copied, or nothing could be |
|
|
221
|
+
| `helix-device-button`, `helix-device-key`, `helix-device-screenshot` | A device screen's button, key, or screenshot was asked for |
|
|
222
|
+
| `helix-device-scroll`, `helix-device-swipe`, `helix-device-tap`, `helix-device-text`, `helix-device-touch` | A reader scrolled, swiped, tapped, pasted, or touched a device screen |
|
|
223
|
+
| `helix-end` | A video playlist reached its last entry and stopped |
|
|
224
|
+
| `helix-found` | A search found its matches, or moved among them |
|
|
225
|
+
| `helix-graph-layout`, `helix-graph-ready` | A graph's layout settled, or the graph was drawn whole |
|
|
226
|
+
| `helix-graph-pan`, `helix-graph-zoom` | A reader asked a graph to move or to zoom |
|
|
227
|
+
| `helix-graph-part-change`, `helix-graph-signal` | What a graph's connector draws changed, or something passed between two notes |
|
|
228
|
+
| `helix-history` | A transcript reached its oldest turn, and older ones can be fetched |
|
|
229
|
+
| `helix-load` | A lazy tree branch opened and asks for its children |
|
|
230
|
+
| `helix-load-more` | A reader asked for more items |
|
|
231
|
+
| `helix-map-cluster` | A reader pressed a cluster of map markers |
|
|
232
|
+
| `helix-map-pan`, `helix-map-rotate`, `helix-map-tilt`, `helix-map-zoom` | A reader asked a map to move, rotate, tilt, or zoom |
|
|
233
|
+
| `helix-map-part-change`, `helix-map-ready` | What a map's connector draws changed, or the map was drawn whole |
|
|
234
|
+
| `helix-next`, `helix-previous` | A reader asked for the next or the previous item in a sequence |
|
|
235
|
+
| `helix-plot-change`, `helix-plot-turn` | What a plot's connector draws changed, or a reader turned a 3D plot by key |
|
|
236
|
+
| `helix-press` | A control was pressed and acted |
|
|
237
|
+
| `helix-preview` | A control shows what a press would choose |
|
|
238
|
+
| `helix-range-change` | The items a virtual list shows changed |
|
|
239
|
+
| `helix-reading-change`, `helix-reading-press` | A chart moved to a reading, or a reading was pressed |
|
|
240
|
+
| `helix-reject` | A file field refused some of the files it was given |
|
|
241
|
+
| `helix-remove` | A reader asked for cards or connections to be taken away |
|
|
242
|
+
| `helix-resize` | A preview reports how much room its content needs |
|
|
243
|
+
| `helix-sample-start`, `helix-sample-end` | The eyedropper opened, or closed |
|
|
244
|
+
| `helix-scrolled` | A header started or stopped floating over the page |
|
|
245
|
+
| `helix-stop` | A reader asked for what is under way to stop |
|
|
246
|
+
| `helix-strands-fallback` | A strands element stopped drawing its ribbon and shows its gradient |
|
|
247
|
+
| `helix-terminal-bell`, `helix-terminal-title` | A terminal's program rang the bell or set its title |
|
|
248
|
+
| `helix-terminal-input`, `helix-terminal-resize`, `helix-terminal-restart` | A terminal has input for the process, changed size, or was asked to restart |
|
|
249
|
+
| `helix-tour-ask`, `helix-tour-status` | A tour stop asked the tour to move, or the tour's progress changed |
|
|
250
|
+
| `helix-typing` | A reader started or stopped writing in a chat composer |
|
|
123
251
|
|
|
124
252
|
Every stateful component also sends native events once the change is applied:
|
|
125
253
|
|
|
@@ -130,32 +258,6 @@ Every stateful component also sends native events once the change is applied:
|
|
|
130
258
|
- `close` on a dialog
|
|
131
259
|
- `load` and `error` on an image
|
|
132
260
|
|
|
133
|
-
Each component's page lists the events it dispatches, with the class and the
|
|
134
|
-
detail. The table above lists the common ones.
|
|
135
|
-
|
|
136
|
-
## Requests under a plain name
|
|
137
|
-
|
|
138
|
-
A few events with no `before` in their name are also cancelable requests. Each
|
|
139
|
-
is sent before the change, and you refuse the change with `preventDefault()`:
|
|
140
|
-
|
|
141
|
-
- `helix-navigate` on Pagination, Data Table, and Date Picker
|
|
142
|
-
- `helix-sort`, `helix-filter`, `helix-select`, and `helix-reorder` on Data Table
|
|
143
|
-
- `helix-select` on Carousel
|
|
144
|
-
|
|
145
|
-
Each of these requests had its name before the library had a word for the
|
|
146
|
-
notification, so the notification has its own name. It is sent after the
|
|
147
|
-
change, is not cancelable, and carries the new state:
|
|
148
|
-
|
|
149
|
-
- `helix-activate` after the page moves on Pagination and Data Table, and after
|
|
150
|
-
the slide moves on Carousel
|
|
151
|
-
- `helix-sorted`, `helix-filtered`, `helix-selected`, and `helix-reordered` on
|
|
152
|
-
Data Table
|
|
153
|
-
- `input` and `change` together on Pagination Size, as a native `<select>`
|
|
154
|
-
sends them
|
|
155
|
-
|
|
156
|
-
A request that is refused sends no notification. Date Picker's `helix-navigate`
|
|
157
|
-
moves the month on show, and the month sends no notification.
|
|
158
|
-
|
|
159
261
|
## Events in a framework
|
|
160
262
|
|
|
161
263
|
Native events use their usual props, such as `onChange`, `onInput`, and
|
package/content/graphs.mdx
CHANGED
|
@@ -265,12 +265,13 @@ list:
|
|
|
265
265
|
```
|
|
266
266
|
|
|
267
267
|
`hiddenGroups` holds the names of the groups turned off. Set it to start with
|
|
268
|
-
some hidden. A press sends `helix-graph-filter` first, with every group
|
|
269
|
-
would be hidden. Cancel it to keep the groups as they were, or to keep them
|
|
270
|
-
your own state and set `hiddenGroups` yourself
|
|
268
|
+
some hidden. A press sends `helix-before-graph-filter` first, with every group
|
|
269
|
+
that would be hidden. Cancel it to keep the groups as they were, or to keep them
|
|
270
|
+
in your own state and set `hiddenGroups` yourself. `helix-graph-filter` follows
|
|
271
|
+
once the groups have changed, with every group now hidden:
|
|
271
272
|
|
|
272
273
|
```ts
|
|
273
|
-
frame.addEventListener('helix-graph-filter', (event) => {
|
|
274
|
+
frame.addEventListener('helix-before-graph-filter', (event) => {
|
|
274
275
|
event.preventDefault()
|
|
275
276
|
frame.hiddenGroups = event.detail.hidden
|
|
276
277
|
})
|
|
@@ -562,7 +563,8 @@ The frame sends these events. Their names follow Map's: `helix-graph-pan`,
|
|
|
562
563
|
|---|---|---|---|
|
|
563
564
|
| `helix-before-activate` | A note is about to be selected | Yes | You, to keep the selection in your own state |
|
|
564
565
|
| `helix-activate` | A note was selected, in the list or the drawing | No | You |
|
|
565
|
-
| `helix-graph-filter` | A group in the legend was pressed, before its notes are shown or hidden | Yes | You, to set `hiddenGroups` yourself |
|
|
566
|
+
| `helix-before-graph-filter` | A group in the legend was pressed, before its notes are shown or hidden | Yes | You, to set `hiddenGroups` yourself |
|
|
567
|
+
| `helix-graph-filter` | A group's notes were shown or hidden | No | You |
|
|
566
568
|
| `helix-graph-layout` | A layout settled, with where it put each note | No | You, to keep the positions |
|
|
567
569
|
| `helix-graph-ready` | The graph has been drawn whole | No | You, to show the graph once it is finished |
|
|
568
570
|
| `helix-graph-pan` | An arrow key or a pan button asked the drawing to move | No | `connectGraph`, or your own renderer |
|
package/content/introduction.mdx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: What Helix is, and the packages it includes.
|
|
2
|
+
description: What Fusion Helix is, and the packages it includes.
|
|
3
3
|
order: 1
|
|
4
4
|
section: Getting started
|
|
5
5
|
title: Introduction
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Helix
|
|
8
|
+
# Fusion Helix
|
|
9
9
|
|
|
10
10
|
Helix is a design system of web components. It includes:
|
|
11
11
|
|
package/content/maps.mdx
CHANGED
|
@@ -626,7 +626,7 @@ tile is lit while its layer is shown. Pressing a tile sets its layer's `hidden`
|
|
|
626
626
|
attribute, and `connectMap` does not draw a hidden layer. Write `hidden` on a
|
|
627
627
|
layer to start it turned off.
|
|
628
628
|
|
|
629
|
-
Before it sets `hidden`, a tile sends `helix-before-
|
|
629
|
+
Before it sets `hidden`, a tile sends `helix-before-check` from the layer, with
|
|
630
630
|
`checked` true when the layer is to be shown. Store the choice from it, or
|
|
631
631
|
cancel it to keep the layer as it is.
|
|
632
632
|
|