@fusion.dev/helix-headless 0.162.1 → 0.163.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/custom-elements.json +233 -12
- package/dist/canvas/index.d.ts +1 -1
- package/dist/canvas/root/canvas-document.d.ts +33 -0
- package/dist/canvas/root/canvas-root.d.ts +50 -2
- package/dist/canvas/root/canvas-root.js +98 -3
- package/dist/chat/composer/chat-composer.js +1 -1
- package/dist/chat/root/chat-root.d.ts +15 -4
- package/dist/chat/root/chat-root.js +19 -8
- package/dist/map/root/map-root.d.ts +8 -1
- package/dist/map/root/map-root.js +12 -0
- package/dist/menu/item/menu-item.d.ts +38 -7
- package/dist/menu/item/menu-item.js +20 -9
- package/dist/menu/root/menu-root.d.ts +10 -1
- package/dist/menu/root/menu-root.js +8 -3
- package/dist/steps/root/steps-root.d.ts +7 -1
- package/dist/steps/root/steps-root.js +6 -1
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +162 -24
- package/types/vue.d.ts +40 -7
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-headless",
|
|
3
3
|
"description": "Headless component tier. Structure, accessibility, state, and form participation. No styling.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.163.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
},
|
|
50
50
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@fusion.dev/helix-core": "0.
|
|
53
|
-
"@fusion.dev/helix-icons": "0.
|
|
52
|
+
"@fusion.dev/helix-core": "0.163.0",
|
|
53
|
+
"@fusion.dev/helix-icons": "0.163.0",
|
|
54
54
|
"uqr": "^0.1.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@fusion.dev/helix-cem": "0.
|
|
58
|
-
"@fusion.dev/helix-testing": "0.
|
|
57
|
+
"@fusion.dev/helix-cem": "0.163.0",
|
|
58
|
+
"@fusion.dev/helix-testing": "0.163.0",
|
|
59
59
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
60
60
|
"@happy-dom/global-registrator": "^20.14.5",
|
|
61
61
|
"@lit-labs/ssr": "^4.1.0",
|
package/types/jsx.d.ts
CHANGED
|
@@ -3754,6 +3754,13 @@ at any zoom, and a consumer who wants their own units multiplies by them. */
|
|
|
3754
3754
|
"zoom-out-label"?: (HelixHeadlessCanvas["zoomOutLabel"]) | undefined;
|
|
3755
3755
|
/** The zoom out button's label. */
|
|
3756
3756
|
zoomOutLabel?: (HelixHeadlessCanvas["zoomOutLabel"]) | undefined;
|
|
3757
|
+
/** Draws every connection's line: a function from where it leaves and
|
|
3758
|
+
arrives, and the sides it does, to its SVG path and where its label sits.
|
|
3759
|
+
|
|
3760
|
+
Absent, or returning nothing for a connection, draws the board's own
|
|
3761
|
+
route. A function that throws draws the board's own too, and the error is
|
|
3762
|
+
reported to the page as an uncaught one. Set it as a property. */
|
|
3763
|
+
edgeRoute?: (HelixHeadlessCanvas["edgeRoute"]) | undefined;
|
|
3757
3764
|
/** The board's current view: the document's point at the middle of the view,
|
|
3758
3765
|
and the zoom.
|
|
3759
3766
|
|
|
@@ -4202,6 +4209,13 @@ at any zoom, and a consumer who wants their own units multiplies by them. */
|
|
|
4202
4209
|
"attr:zoom-out-label"?: (HelixHeadlessCanvas["zoomOutLabel"]) | undefined;
|
|
4203
4210
|
/** The zoom out button's label. */
|
|
4204
4211
|
"prop:zoomOutLabel"?: (HelixHeadlessCanvas["zoomOutLabel"]) | undefined;
|
|
4212
|
+
/** Draws every connection's line: a function from where it leaves and
|
|
4213
|
+
arrives, and the sides it does, to its SVG path and where its label sits.
|
|
4214
|
+
|
|
4215
|
+
Absent, or returning nothing for a connection, draws the board's own
|
|
4216
|
+
route. A function that throws draws the board's own too, and the error is
|
|
4217
|
+
reported to the page as an uncaught one. Set it as a property. */
|
|
4218
|
+
"prop:edgeRoute"?: (HelixHeadlessCanvas["edgeRoute"]) | undefined;
|
|
4205
4219
|
/** The board's current view: the document's point at the middle of the view,
|
|
4206
4220
|
and the zoom.
|
|
4207
4221
|
|
|
@@ -20613,7 +20627,8 @@ was never tickable look identical from here. Announcing only the ticked one
|
|
|
20613
20627
|
as a checkbox tells a reader its siblings are commands, which is the one
|
|
20614
20628
|
thing they are not.
|
|
20615
20629
|
|
|
20616
|
-
`checked`
|
|
20630
|
+
`checked` and `exclusive` imply it, so a row that is on, or one of a set,
|
|
20631
|
+
never has to say both.
|
|
20617
20632
|
|
|
20618
20633
|
Choosing the row checks or unchecks it, after a `helix-before-toggle` that
|
|
20619
20634
|
you can cancel. */
|
|
@@ -20623,6 +20638,18 @@ you can cancel. */
|
|
|
20623
20638
|
The row changes it when it is chosen. Not reflected: the attribute is the
|
|
20624
20639
|
state you start the row in, and `:state(checked)` carries the current one. */
|
|
20625
20640
|
checked?: (HelixHeadlessMenuItem["checked"]) | undefined;
|
|
20641
|
+
/** Whether choosing the row closes the menu.
|
|
20642
|
+
|
|
20643
|
+
Unset takes the menu's `close-on-select`, which is on, and keeps the menu
|
|
20644
|
+
open after a Space on a choice row. Write `close-on-select="false"` for a
|
|
20645
|
+
row that changes something the reader is watching, such as a zoom step. */
|
|
20646
|
+
"close-on-select"?: (HelixHeadlessMenuItem["closeOnSelect"]) | undefined;
|
|
20647
|
+
/** Whether choosing the row closes the menu.
|
|
20648
|
+
|
|
20649
|
+
Unset takes the menu's `close-on-select`, which is on, and keeps the menu
|
|
20650
|
+
open after a Space on a choice row. Write `close-on-select="false"` for a
|
|
20651
|
+
row that changes something the reader is watching, such as a zoom step. */
|
|
20652
|
+
closeOnSelect?: (HelixHeadlessMenuItem["closeOnSelect"]) | undefined;
|
|
20626
20653
|
/** Whether the row is disabled, so it cannot be chosen. */
|
|
20627
20654
|
disabled?: (HelixHeadlessMenuItem["disabled"]) | undefined;
|
|
20628
20655
|
/** Whether the link downloads the file when the row is chosen.
|
|
@@ -20639,8 +20666,7 @@ that row and unchecks the others. Choosing the row that is checked leaves
|
|
|
20639
20666
|
it checked. `menuitemradio` tells a reader which kind of set they are in,
|
|
20640
20667
|
where `menuitemcheckbox` says every row is independent.
|
|
20641
20668
|
|
|
20642
|
-
|
|
20643
|
-
one of a set of anything. */
|
|
20669
|
+
It makes the row a choice, so it needs no `checkable` beside it. */
|
|
20644
20670
|
exclusive?: (HelixHeadlessMenuItem["exclusive"]) | undefined;
|
|
20645
20671
|
/** The URL the row links to. Setting it renders the row as a link.
|
|
20646
20672
|
|
|
@@ -20687,7 +20713,8 @@ was never tickable look identical from here. Announcing only the ticked one
|
|
|
20687
20713
|
as a checkbox tells a reader its siblings are commands, which is the one
|
|
20688
20714
|
thing they are not.
|
|
20689
20715
|
|
|
20690
|
-
`checked`
|
|
20716
|
+
`checked` and `exclusive` imply it, so a row that is on, or one of a set,
|
|
20717
|
+
never has to say both.
|
|
20691
20718
|
|
|
20692
20719
|
Choosing the row checks or unchecks it, after a `helix-before-toggle` that
|
|
20693
20720
|
you can cancel. */
|
|
@@ -20697,6 +20724,18 @@ you can cancel. */
|
|
|
20697
20724
|
The row changes it when it is chosen. Not reflected: the attribute is the
|
|
20698
20725
|
state you start the row in, and `:state(checked)` carries the current one. */
|
|
20699
20726
|
"prop:checked"?: (HelixHeadlessMenuItem["checked"]) | undefined;
|
|
20727
|
+
/** Whether choosing the row closes the menu.
|
|
20728
|
+
|
|
20729
|
+
Unset takes the menu's `close-on-select`, which is on, and keeps the menu
|
|
20730
|
+
open after a Space on a choice row. Write `close-on-select="false"` for a
|
|
20731
|
+
row that changes something the reader is watching, such as a zoom step. */
|
|
20732
|
+
"bool:close-on-select"?: (HelixHeadlessMenuItem["closeOnSelect"]) | undefined;
|
|
20733
|
+
/** Whether choosing the row closes the menu.
|
|
20734
|
+
|
|
20735
|
+
Unset takes the menu's `close-on-select`, which is on, and keeps the menu
|
|
20736
|
+
open after a Space on a choice row. Write `close-on-select="false"` for a
|
|
20737
|
+
row that changes something the reader is watching, such as a zoom step. */
|
|
20738
|
+
"prop:closeOnSelect"?: (HelixHeadlessMenuItem["closeOnSelect"]) | undefined;
|
|
20700
20739
|
/** Whether the row is disabled, so it cannot be chosen. */
|
|
20701
20740
|
"prop:disabled"?: (HelixHeadlessMenuItem["disabled"]) | undefined;
|
|
20702
20741
|
/** Whether the link downloads the file when the row is chosen.
|
|
@@ -20713,8 +20752,7 @@ that row and unchecks the others. Choosing the row that is checked leaves
|
|
|
20713
20752
|
it checked. `menuitemradio` tells a reader which kind of set they are in,
|
|
20714
20753
|
where `menuitemcheckbox` says every row is independent.
|
|
20715
20754
|
|
|
20716
|
-
|
|
20717
|
-
one of a set of anything. */
|
|
20755
|
+
It makes the row a choice, so it needs no `checkable` beside it. */
|
|
20718
20756
|
"prop:exclusive"?: (HelixHeadlessMenuItem["exclusive"]) | undefined;
|
|
20719
20757
|
/** The URL the row links to. Setting it renders the row as a link.
|
|
20720
20758
|
|
|
@@ -20779,6 +20817,18 @@ export type HelixHeadlessMenuProps = {
|
|
|
20779
20817
|
"back-label"?: (HelixHeadlessMenu["backLabel"]) | undefined;
|
|
20780
20818
|
/** The text of the row that returns from a submenu. */
|
|
20781
20819
|
backLabel?: (HelixHeadlessMenu["backLabel"]) | undefined;
|
|
20820
|
+
/** Whether choosing a row closes the menu.
|
|
20821
|
+
|
|
20822
|
+
On by default, and a Space on a choice row leaves the menu open either way.
|
|
20823
|
+
Write `close-on-select="false"` to keep the menu open after every choice, as
|
|
20824
|
+
Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this. */
|
|
20825
|
+
"close-on-select"?: (HelixHeadlessMenu["closeOnSelect"]) | undefined;
|
|
20826
|
+
/** Whether choosing a row closes the menu.
|
|
20827
|
+
|
|
20828
|
+
On by default, and a Space on a choice row leaves the menu open either way.
|
|
20829
|
+
Write `close-on-select="false"` to keep the menu open after every choice, as
|
|
20830
|
+
Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this. */
|
|
20831
|
+
closeOnSelect?: (HelixHeadlessMenu["closeOnSelect"]) | undefined;
|
|
20782
20832
|
/** Whether the menu is the trigger's context menu: it opens where the reader
|
|
20783
20833
|
asks for one, with a right-click, a long press, Shift+F10 or the menu key. */
|
|
20784
20834
|
context?: (HelixHeadlessMenu["context"]) | undefined;
|
|
@@ -20862,6 +20912,18 @@ export type HelixHeadlessMenuSolidJsProps = {
|
|
|
20862
20912
|
"attr:back-label"?: (HelixHeadlessMenu["backLabel"]) | undefined;
|
|
20863
20913
|
/** The text of the row that returns from a submenu. */
|
|
20864
20914
|
"prop:backLabel"?: (HelixHeadlessMenu["backLabel"]) | undefined;
|
|
20915
|
+
/** Whether choosing a row closes the menu.
|
|
20916
|
+
|
|
20917
|
+
On by default, and a Space on a choice row leaves the menu open either way.
|
|
20918
|
+
Write `close-on-select="false"` to keep the menu open after every choice, as
|
|
20919
|
+
Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this. */
|
|
20920
|
+
"bool:close-on-select"?: (HelixHeadlessMenu["closeOnSelect"]) | undefined;
|
|
20921
|
+
/** Whether choosing a row closes the menu.
|
|
20922
|
+
|
|
20923
|
+
On by default, and a Space on a choice row leaves the menu open either way.
|
|
20924
|
+
Write `close-on-select="false"` to keep the menu open after every choice, as
|
|
20925
|
+
Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this. */
|
|
20926
|
+
"prop:closeOnSelect"?: (HelixHeadlessMenu["closeOnSelect"]) | undefined;
|
|
20865
20927
|
/** Whether the menu is the trigger's context menu: it opens where the reader
|
|
20866
20928
|
asks for one, with a right-click, a long press, Shift+F10 or the menu key. */
|
|
20867
20929
|
"prop:context"?: (HelixHeadlessMenu["context"]) | undefined;
|
|
@@ -38751,6 +38813,17 @@ export type CustomElements = {
|
|
|
38751
38813
|
* connection is a new element, and React discards an element the board adds to
|
|
38752
38814
|
* its markup on the next render, so you write the connection.
|
|
38753
38815
|
*
|
|
38816
|
+
* **`edgeRoute` draws the connections' lines your own way**: a function from
|
|
38817
|
+
* where a line leaves and arrives, and the sides it does, to its SVG path, for
|
|
38818
|
+
* a route such as one that bends around the cards between. What it returns
|
|
38819
|
+
* is the line drawn, the line pressed and focused, and the one an arrowhead
|
|
38820
|
+
* sits at the end of. Nothing back draws the board's own.
|
|
38821
|
+
*
|
|
38822
|
+
* Add `minimap` to `controls` for a picture of the whole board in a corner:
|
|
38823
|
+
* each card as a box, and a frame around what is on screen. A press or a drag
|
|
38824
|
+
* on it brings that place to the middle of the view. It is for a pointer, and
|
|
38825
|
+
* a screen reader skips it: the arrow keys and `show()` reach every card.
|
|
38826
|
+
*
|
|
38754
38827
|
* Cards and connections are `helix-canvas-node` and `helix-canvas-edge`
|
|
38755
38828
|
* elements, so they are in the served markup whichever renderer wrote them. The
|
|
38756
38829
|
* library fetches nothing, and an array passed to an element is missing from
|
|
@@ -38962,6 +39035,12 @@ export type CustomElements = {
|
|
|
38962
39035
|
* - `pan-up-label`/`panUpLabel`: The pan up button's label.
|
|
38963
39036
|
* - `zoom-in-label`/`zoomInLabel`: The zoom in button's label.
|
|
38964
39037
|
* - `zoom-out-label`/`zoomOutLabel`: The zoom out button's label.
|
|
39038
|
+
* - `edgeRoute`: Draws every connection's line: a function from where it leaves and
|
|
39039
|
+
* arrives, and the sides it does, to its SVG path and where its label sits.
|
|
39040
|
+
*
|
|
39041
|
+
* Absent, or returning nothing for a connection, draws the board's own
|
|
39042
|
+
* route. A function that throws draws the board's own too, and the error is
|
|
39043
|
+
* reported to the page as an uncaught one. Set it as a property. (property only)
|
|
38965
39044
|
* - `view`: The board's current view: the document's point at the middle of the view,
|
|
38966
39045
|
* and the zoom.
|
|
38967
39046
|
*
|
|
@@ -39102,6 +39181,9 @@ export type CustomElements = {
|
|
|
39102
39181
|
* - `label-editor`: The field for editing a connection's label or a group's name, placed over that text.
|
|
39103
39182
|
* - `live`: A live region that screen readers announce while a connection is being made.
|
|
39104
39183
|
* - `marquee`: The box a Shift-drag across the empty board draws, which selects the cards it touches.
|
|
39184
|
+
* - `minimap`: The picture of the whole board, under `controls="minimap"`.
|
|
39185
|
+
* - `minimap-node`: One card in the minimap.
|
|
39186
|
+
* - `minimap-view`: The frame in the minimap around what is on screen.
|
|
39105
39187
|
* - `pan-down`: The button that moves the board down.
|
|
39106
39188
|
* - `pan-end`: The button that moves the board toward the end of a line of text: right in English.
|
|
39107
39189
|
* - `pan-start`: The button that moves the board toward the start of a line of text: left in English.
|
|
@@ -50797,7 +50879,8 @@ export type CustomElements = {
|
|
|
50797
50879
|
* same `group`, such as a route and its dotted legs, share one tile. A tile
|
|
50798
50880
|
* sends `helix-before-toggle` from the layer first, so you can store the
|
|
50799
50881
|
* choice or refuse it, and `helix-toggle` from it once `hidden` holds the
|
|
50800
|
-
* choice.
|
|
50882
|
+
* choice. Escape closes the menu and returns focus to its button, and the menu
|
|
50883
|
+
* closes when focus moves on from it or a press lands outside the map.
|
|
50801
50884
|
*
|
|
50802
50885
|
* Imagery, a `helix-map-raster` with `ground`, is a map type and not a tile.
|
|
50803
50886
|
* The menu opens with a card for each type, Standard, Hybrid, and Satellite,
|
|
@@ -51458,16 +51541,22 @@ export type CustomElements = {
|
|
|
51458
51541
|
* - `checked` makes the row a choice.
|
|
51459
51542
|
* - With neither, the row is a command.
|
|
51460
51543
|
*
|
|
51461
|
-
* The role follows the kind. A row with `
|
|
51462
|
-
* `aria-checked`, and `exclusive`
|
|
51463
|
-
* only one can be on. A row that opens a page
|
|
51464
|
-
* `aria-haspopup`.
|
|
51544
|
+
* The role follows the kind. A row with `checkable` or `checked` is
|
|
51545
|
+
* `menuitemcheckbox` with `aria-checked`, and an `exclusive` row is
|
|
51546
|
+
* `menuitemradio`, for a set where only one can be on. A row that opens a page
|
|
51547
|
+
* keeps `menuitem` and sets `aria-haspopup`.
|
|
51465
51548
|
*
|
|
51466
51549
|
* Choosing a choice row checks or unchecks it before `helix-select` is sent,
|
|
51467
51550
|
* so a listener reads the new `checked`. An `exclusive` row turns on and turns
|
|
51468
51551
|
* off the `exclusive` rows next to it. Cancel `helix-before-toggle` to keep a
|
|
51469
51552
|
* row as it is and set `checked` yourself.
|
|
51470
51553
|
*
|
|
51554
|
+
* Space on a choice row changes it and leaves the menu open, so a reader can
|
|
51555
|
+
* set several in a row, as the APG's menu does. Enter and a press change it and
|
|
51556
|
+
* close the menu. `close-on-select="false"` on the row keeps the menu open after
|
|
51557
|
+
* any choice of it, and `close-on-select` on the row closes it after a Space as
|
|
51558
|
+
* well.
|
|
51559
|
+
*
|
|
51471
51560
|
* The menu sets whether the row's page is showing as a property, never as an
|
|
51472
51561
|
* attribute. An attribute written onto your element after it upgrades causes a
|
|
51473
51562
|
* hydration mismatch.
|
|
@@ -51501,7 +51590,8 @@ export type CustomElements = {
|
|
|
51501
51590
|
* as a checkbox tells a reader its siblings are commands, which is the one
|
|
51502
51591
|
* thing they are not.
|
|
51503
51592
|
*
|
|
51504
|
-
* `checked`
|
|
51593
|
+
* `checked` and `exclusive` imply it, so a row that is on, or one of a set,
|
|
51594
|
+
* never has to say both.
|
|
51505
51595
|
*
|
|
51506
51596
|
* Choosing the row checks or unchecks it, after a `helix-before-toggle` that
|
|
51507
51597
|
* you can cancel.
|
|
@@ -51509,6 +51599,11 @@ export type CustomElements = {
|
|
|
51509
51599
|
*
|
|
51510
51600
|
* The row changes it when it is chosen. Not reflected: the attribute is the
|
|
51511
51601
|
* state you start the row in, and `:state(checked)` carries the current one.
|
|
51602
|
+
* - `close-on-select`/`closeOnSelect`: Whether choosing the row closes the menu.
|
|
51603
|
+
*
|
|
51604
|
+
* Unset takes the menu's `close-on-select`, which is on, and keeps the menu
|
|
51605
|
+
* open after a Space on a choice row. Write `close-on-select="false"` for a
|
|
51606
|
+
* row that changes something the reader is watching, such as a zoom step.
|
|
51512
51607
|
* - `disabled`: Whether the row is disabled, so it cannot be chosen.
|
|
51513
51608
|
* - `download`: Whether the link downloads the file when the row is chosen.
|
|
51514
51609
|
*
|
|
@@ -51523,8 +51618,7 @@ export type CustomElements = {
|
|
|
51523
51618
|
* it checked. `menuitemradio` tells a reader which kind of set they are in,
|
|
51524
51619
|
* where `menuitemcheckbox` says every row is independent.
|
|
51525
51620
|
*
|
|
51526
|
-
*
|
|
51527
|
-
* one of a set of anything.
|
|
51621
|
+
* It makes the row a choice, so it needs no `checkable` beside it.
|
|
51528
51622
|
* - `href`: The URL the row links to. Setting it renders the row as a link.
|
|
51529
51623
|
*
|
|
51530
51624
|
* **The row itself becomes an `<a>`, and the role goes with it.** A
|
|
@@ -51680,7 +51774,8 @@ export type CustomElements = {
|
|
|
51680
51774
|
* Keys: Enter, Space or Down Arrow on the trigger opens the menu on its first
|
|
51681
51775
|
* row, and Up Arrow on its last. In the menu, Up and Down Arrow move between
|
|
51682
51776
|
* rows, Home and End go to the first and the last, a typed letter moves to
|
|
51683
|
-
* the next row whose name starts with it, Enter and Space choose
|
|
51777
|
+
* the next row whose name starts with it, Enter and Space choose (Space on a
|
|
51778
|
+
* choice row changes it and leaves the menu open), Right Arrow
|
|
51684
51779
|
* opens a row's submenu and Left Arrow goes back, the two swapping on a
|
|
51685
51780
|
* right-to-left page. Left Arrow on the top page does nothing. Escape closes
|
|
51686
51781
|
* the menu and returns focus to the trigger. Tab closes it and moves on.
|
|
@@ -51709,6 +51804,11 @@ export type CustomElements = {
|
|
|
51709
51804
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
51710
51805
|
*
|
|
51711
51806
|
* - `back-label`/`backLabel`: The text of the row that returns from a submenu.
|
|
51807
|
+
* - `close-on-select`/`closeOnSelect`: Whether choosing a row closes the menu.
|
|
51808
|
+
*
|
|
51809
|
+
* On by default, and a Space on a choice row leaves the menu open either way.
|
|
51810
|
+
* Write `close-on-select="false"` to keep the menu open after every choice, as
|
|
51811
|
+
* Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this.
|
|
51712
51812
|
* - `context`: Whether the menu is the trigger's context menu: it opens where the reader
|
|
51713
51813
|
* asks for one, with a right-click, a long press, Shift+F10 or the menu key.
|
|
51714
51814
|
* - `label`: Accessible name for the surface.
|
|
@@ -67412,6 +67512,17 @@ export type CustomElementsSolidJs = {
|
|
|
67412
67512
|
* connection is a new element, and React discards an element the board adds to
|
|
67413
67513
|
* its markup on the next render, so you write the connection.
|
|
67414
67514
|
*
|
|
67515
|
+
* **`edgeRoute` draws the connections' lines your own way**: a function from
|
|
67516
|
+
* where a line leaves and arrives, and the sides it does, to its SVG path, for
|
|
67517
|
+
* a route such as one that bends around the cards between. What it returns
|
|
67518
|
+
* is the line drawn, the line pressed and focused, and the one an arrowhead
|
|
67519
|
+
* sits at the end of. Nothing back draws the board's own.
|
|
67520
|
+
*
|
|
67521
|
+
* Add `minimap` to `controls` for a picture of the whole board in a corner:
|
|
67522
|
+
* each card as a box, and a frame around what is on screen. A press or a drag
|
|
67523
|
+
* on it brings that place to the middle of the view. It is for a pointer, and
|
|
67524
|
+
* a screen reader skips it: the arrow keys and `show()` reach every card.
|
|
67525
|
+
*
|
|
67415
67526
|
* Cards and connections are `helix-canvas-node` and `helix-canvas-edge`
|
|
67416
67527
|
* elements, so they are in the served markup whichever renderer wrote them. The
|
|
67417
67528
|
* library fetches nothing, and an array passed to an element is missing from
|
|
@@ -67623,6 +67734,12 @@ export type CustomElementsSolidJs = {
|
|
|
67623
67734
|
* - `pan-up-label`/`panUpLabel`: The pan up button's label.
|
|
67624
67735
|
* - `zoom-in-label`/`zoomInLabel`: The zoom in button's label.
|
|
67625
67736
|
* - `zoom-out-label`/`zoomOutLabel`: The zoom out button's label.
|
|
67737
|
+
* - `edgeRoute`: Draws every connection's line: a function from where it leaves and
|
|
67738
|
+
* arrives, and the sides it does, to its SVG path and where its label sits.
|
|
67739
|
+
*
|
|
67740
|
+
* Absent, or returning nothing for a connection, draws the board's own
|
|
67741
|
+
* route. A function that throws draws the board's own too, and the error is
|
|
67742
|
+
* reported to the page as an uncaught one. Set it as a property. (property only)
|
|
67626
67743
|
* - `view`: The board's current view: the document's point at the middle of the view,
|
|
67627
67744
|
* and the zoom.
|
|
67628
67745
|
*
|
|
@@ -67763,6 +67880,9 @@ export type CustomElementsSolidJs = {
|
|
|
67763
67880
|
* - `label-editor`: The field for editing a connection's label or a group's name, placed over that text.
|
|
67764
67881
|
* - `live`: A live region that screen readers announce while a connection is being made.
|
|
67765
67882
|
* - `marquee`: The box a Shift-drag across the empty board draws, which selects the cards it touches.
|
|
67883
|
+
* - `minimap`: The picture of the whole board, under `controls="minimap"`.
|
|
67884
|
+
* - `minimap-node`: One card in the minimap.
|
|
67885
|
+
* - `minimap-view`: The frame in the minimap around what is on screen.
|
|
67766
67886
|
* - `pan-down`: The button that moves the board down.
|
|
67767
67887
|
* - `pan-end`: The button that moves the board toward the end of a line of text: right in English.
|
|
67768
67888
|
* - `pan-start`: The button that moves the board toward the start of a line of text: left in English.
|
|
@@ -79583,7 +79703,8 @@ export type CustomElementsSolidJs = {
|
|
|
79583
79703
|
* same `group`, such as a route and its dotted legs, share one tile. A tile
|
|
79584
79704
|
* sends `helix-before-toggle` from the layer first, so you can store the
|
|
79585
79705
|
* choice or refuse it, and `helix-toggle` from it once `hidden` holds the
|
|
79586
|
-
* choice.
|
|
79706
|
+
* choice. Escape closes the menu and returns focus to its button, and the menu
|
|
79707
|
+
* closes when focus moves on from it or a press lands outside the map.
|
|
79587
79708
|
*
|
|
79588
79709
|
* Imagery, a `helix-map-raster` with `ground`, is a map type and not a tile.
|
|
79589
79710
|
* The menu opens with a card for each type, Standard, Hybrid, and Satellite,
|
|
@@ -80254,16 +80375,22 @@ export type CustomElementsSolidJs = {
|
|
|
80254
80375
|
* - `checked` makes the row a choice.
|
|
80255
80376
|
* - With neither, the row is a command.
|
|
80256
80377
|
*
|
|
80257
|
-
* The role follows the kind. A row with `
|
|
80258
|
-
* `aria-checked`, and `exclusive`
|
|
80259
|
-
* only one can be on. A row that opens a page
|
|
80260
|
-
* `aria-haspopup`.
|
|
80378
|
+
* The role follows the kind. A row with `checkable` or `checked` is
|
|
80379
|
+
* `menuitemcheckbox` with `aria-checked`, and an `exclusive` row is
|
|
80380
|
+
* `menuitemradio`, for a set where only one can be on. A row that opens a page
|
|
80381
|
+
* keeps `menuitem` and sets `aria-haspopup`.
|
|
80261
80382
|
*
|
|
80262
80383
|
* Choosing a choice row checks or unchecks it before `helix-select` is sent,
|
|
80263
80384
|
* so a listener reads the new `checked`. An `exclusive` row turns on and turns
|
|
80264
80385
|
* off the `exclusive` rows next to it. Cancel `helix-before-toggle` to keep a
|
|
80265
80386
|
* row as it is and set `checked` yourself.
|
|
80266
80387
|
*
|
|
80388
|
+
* Space on a choice row changes it and leaves the menu open, so a reader can
|
|
80389
|
+
* set several in a row, as the APG's menu does. Enter and a press change it and
|
|
80390
|
+
* close the menu. `close-on-select="false"` on the row keeps the menu open after
|
|
80391
|
+
* any choice of it, and `close-on-select` on the row closes it after a Space as
|
|
80392
|
+
* well.
|
|
80393
|
+
*
|
|
80267
80394
|
* The menu sets whether the row's page is showing as a property, never as an
|
|
80268
80395
|
* attribute. An attribute written onto your element after it upgrades causes a
|
|
80269
80396
|
* hydration mismatch.
|
|
@@ -80297,7 +80424,8 @@ export type CustomElementsSolidJs = {
|
|
|
80297
80424
|
* as a checkbox tells a reader its siblings are commands, which is the one
|
|
80298
80425
|
* thing they are not.
|
|
80299
80426
|
*
|
|
80300
|
-
* `checked`
|
|
80427
|
+
* `checked` and `exclusive` imply it, so a row that is on, or one of a set,
|
|
80428
|
+
* never has to say both.
|
|
80301
80429
|
*
|
|
80302
80430
|
* Choosing the row checks or unchecks it, after a `helix-before-toggle` that
|
|
80303
80431
|
* you can cancel.
|
|
@@ -80305,6 +80433,11 @@ export type CustomElementsSolidJs = {
|
|
|
80305
80433
|
*
|
|
80306
80434
|
* The row changes it when it is chosen. Not reflected: the attribute is the
|
|
80307
80435
|
* state you start the row in, and `:state(checked)` carries the current one.
|
|
80436
|
+
* - `close-on-select`/`closeOnSelect`: Whether choosing the row closes the menu.
|
|
80437
|
+
*
|
|
80438
|
+
* Unset takes the menu's `close-on-select`, which is on, and keeps the menu
|
|
80439
|
+
* open after a Space on a choice row. Write `close-on-select="false"` for a
|
|
80440
|
+
* row that changes something the reader is watching, such as a zoom step.
|
|
80308
80441
|
* - `disabled`: Whether the row is disabled, so it cannot be chosen.
|
|
80309
80442
|
* - `download`: Whether the link downloads the file when the row is chosen.
|
|
80310
80443
|
*
|
|
@@ -80319,8 +80452,7 @@ export type CustomElementsSolidJs = {
|
|
|
80319
80452
|
* it checked. `menuitemradio` tells a reader which kind of set they are in,
|
|
80320
80453
|
* where `menuitemcheckbox` says every row is independent.
|
|
80321
80454
|
*
|
|
80322
|
-
*
|
|
80323
|
-
* one of a set of anything.
|
|
80455
|
+
* It makes the row a choice, so it needs no `checkable` beside it.
|
|
80324
80456
|
* - `href`: The URL the row links to. Setting it renders the row as a link.
|
|
80325
80457
|
*
|
|
80326
80458
|
* **The row itself becomes an `<a>`, and the role goes with it.** A
|
|
@@ -80479,7 +80611,8 @@ export type CustomElementsSolidJs = {
|
|
|
80479
80611
|
* Keys: Enter, Space or Down Arrow on the trigger opens the menu on its first
|
|
80480
80612
|
* row, and Up Arrow on its last. In the menu, Up and Down Arrow move between
|
|
80481
80613
|
* rows, Home and End go to the first and the last, a typed letter moves to
|
|
80482
|
-
* the next row whose name starts with it, Enter and Space choose
|
|
80614
|
+
* the next row whose name starts with it, Enter and Space choose (Space on a
|
|
80615
|
+
* choice row changes it and leaves the menu open), Right Arrow
|
|
80483
80616
|
* opens a row's submenu and Left Arrow goes back, the two swapping on a
|
|
80484
80617
|
* right-to-left page. Left Arrow on the top page does nothing. Escape closes
|
|
80485
80618
|
* the menu and returns focus to the trigger. Tab closes it and moves on.
|
|
@@ -80508,6 +80641,11 @@ export type CustomElementsSolidJs = {
|
|
|
80508
80641
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
80509
80642
|
*
|
|
80510
80643
|
* - `back-label`/`backLabel`: The text of the row that returns from a submenu.
|
|
80644
|
+
* - `close-on-select`/`closeOnSelect`: Whether choosing a row closes the menu.
|
|
80645
|
+
*
|
|
80646
|
+
* On by default, and a Space on a choice row leaves the menu open either way.
|
|
80647
|
+
* Write `close-on-select="false"` to keep the menu open after every choice, as
|
|
80648
|
+
* Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this.
|
|
80511
80649
|
* - `context`: Whether the menu is the trigger's context menu: it opens where the reader
|
|
80512
80650
|
* asks for one, with a right-click, a long press, Shift+F10 or the menu key.
|
|
80513
80651
|
* - `label`: Accessible name for the surface.
|
package/types/vue.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ import type {
|
|
|
25
25
|
CanvasNode,
|
|
26
26
|
CanvasNodeProps,
|
|
27
27
|
CanvasPath,
|
|
28
|
+
CanvasRoute,
|
|
29
|
+
CanvasRouteEnds,
|
|
28
30
|
CanvasSide,
|
|
29
31
|
CanvasTone,
|
|
30
32
|
fromJsonCanvas,
|
|
@@ -2175,6 +2177,13 @@ at any zoom, and a consumer who wants their own units multiplies by them. */
|
|
|
2175
2177
|
"zoom-out-label"?: (HelixHeadlessCanvas["zoomOutLabel"]) | undefined;
|
|
2176
2178
|
/** The zoom out button's label. */
|
|
2177
2179
|
zoomOutLabel?: (HelixHeadlessCanvas["zoomOutLabel"]) | undefined;
|
|
2180
|
+
/** Draws every connection's line: a function from where it leaves and
|
|
2181
|
+
arrives, and the sides it does, to its SVG path and where its label sits.
|
|
2182
|
+
|
|
2183
|
+
Absent, or returning nothing for a connection, draws the board's own
|
|
2184
|
+
route. A function that throws draws the board's own too, and the error is
|
|
2185
|
+
reported to the page as an uncaught one. Set it as a property. */
|
|
2186
|
+
edgeRoute?: (HelixHeadlessCanvas["edgeRoute"]) | undefined;
|
|
2178
2187
|
/** The board's current view: the document's point at the middle of the view,
|
|
2179
2188
|
and the zoom.
|
|
2180
2189
|
|
|
@@ -10559,7 +10568,8 @@ was never tickable look identical from here. Announcing only the ticked one
|
|
|
10559
10568
|
as a checkbox tells a reader its siblings are commands, which is the one
|
|
10560
10569
|
thing they are not.
|
|
10561
10570
|
|
|
10562
|
-
`checked`
|
|
10571
|
+
`checked` and `exclusive` imply it, so a row that is on, or one of a set,
|
|
10572
|
+
never has to say both.
|
|
10563
10573
|
|
|
10564
10574
|
Choosing the row checks or unchecks it, after a `helix-before-toggle` that
|
|
10565
10575
|
you can cancel. */
|
|
@@ -10569,6 +10579,18 @@ you can cancel. */
|
|
|
10569
10579
|
The row changes it when it is chosen. Not reflected: the attribute is the
|
|
10570
10580
|
state you start the row in, and `:state(checked)` carries the current one. */
|
|
10571
10581
|
checked?: (HelixHeadlessMenuItem["checked"]) | undefined;
|
|
10582
|
+
/** Whether choosing the row closes the menu.
|
|
10583
|
+
|
|
10584
|
+
Unset takes the menu's `close-on-select`, which is on, and keeps the menu
|
|
10585
|
+
open after a Space on a choice row. Write `close-on-select="false"` for a
|
|
10586
|
+
row that changes something the reader is watching, such as a zoom step. */
|
|
10587
|
+
"close-on-select"?: (HelixHeadlessMenuItem["closeOnSelect"]) | undefined;
|
|
10588
|
+
/** Whether choosing the row closes the menu.
|
|
10589
|
+
|
|
10590
|
+
Unset takes the menu's `close-on-select`, which is on, and keeps the menu
|
|
10591
|
+
open after a Space on a choice row. Write `close-on-select="false"` for a
|
|
10592
|
+
row that changes something the reader is watching, such as a zoom step. */
|
|
10593
|
+
closeOnSelect?: (HelixHeadlessMenuItem["closeOnSelect"]) | undefined;
|
|
10572
10594
|
/** Whether the row is disabled, so it cannot be chosen. */
|
|
10573
10595
|
disabled?: (HelixHeadlessMenuItem["disabled"]) | undefined;
|
|
10574
10596
|
/** Whether the link downloads the file when the row is chosen.
|
|
@@ -10585,8 +10607,7 @@ that row and unchecks the others. Choosing the row that is checked leaves
|
|
|
10585
10607
|
it checked. `menuitemradio` tells a reader which kind of set they are in,
|
|
10586
10608
|
where `menuitemcheckbox` says every row is independent.
|
|
10587
10609
|
|
|
10588
|
-
|
|
10589
|
-
one of a set of anything. */
|
|
10610
|
+
It makes the row a choice, so it needs no `checkable` beside it. */
|
|
10590
10611
|
exclusive?: (HelixHeadlessMenuItem["exclusive"]) | undefined;
|
|
10591
10612
|
/** The URL the row links to. Setting it renders the row as a link.
|
|
10592
10613
|
|
|
@@ -10647,6 +10668,18 @@ export type HelixHeadlessMenuVueProps = {
|
|
|
10647
10668
|
"back-label"?: (HelixHeadlessMenu["backLabel"]) | undefined;
|
|
10648
10669
|
/** The text of the row that returns from a submenu. */
|
|
10649
10670
|
backLabel?: (HelixHeadlessMenu["backLabel"]) | undefined;
|
|
10671
|
+
/** Whether choosing a row closes the menu.
|
|
10672
|
+
|
|
10673
|
+
On by default, and a Space on a choice row leaves the menu open either way.
|
|
10674
|
+
Write `close-on-select="false"` to keep the menu open after every choice, as
|
|
10675
|
+
Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this. */
|
|
10676
|
+
"close-on-select"?: (HelixHeadlessMenu["closeOnSelect"]) | undefined;
|
|
10677
|
+
/** Whether choosing a row closes the menu.
|
|
10678
|
+
|
|
10679
|
+
On by default, and a Space on a choice row leaves the menu open either way.
|
|
10680
|
+
Write `close-on-select="false"` to keep the menu open after every choice, as
|
|
10681
|
+
Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this. */
|
|
10682
|
+
closeOnSelect?: (HelixHeadlessMenu["closeOnSelect"]) | undefined;
|
|
10650
10683
|
/** Whether the menu is the trigger's context menu: it opens where the reader
|
|
10651
10684
|
asks for one, with a right-click, a long press, Shift+F10 or the menu key. */
|
|
10652
10685
|
context?: (HelixHeadlessMenu["context"]) | undefined;
|
|
@@ -18693,7 +18726,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
18693
18726
|
HelixHeadlessCanvasNodeVueProps,
|
|
18694
18727
|
HelixHeadlessCanvasNodeVueEvents
|
|
18695
18728
|
>;
|
|
18696
|
-
/** A board of cards and connectors, drawn by Helix. On a canvas every position is data that someone placed, so drawing is arithmetic over rectangles with no layout to compute. 'Map' takes a slotted map, because another renderer draws its tiles. The format is [JSON Canvas](https://jsoncanvas.org), an open format. Each node has an 'x', 'y', 'width', 'height', and a type. Each edge names the two nodes it joins and the sides it leaves and arrives on. A card belongs to a group when it sits inside the group's bounds. The cards are text in the DOM, so a screen reader can read them. The family adds a reading order and states each card's connections as text. 'order' sets the reading order: - 'spatial' bands the cards into rows. - 'edges' follows the arrows, starting from the cards that nothing points to. **Cards move by default.** The board writes the new 'x' and 'y' onto the card, the way an input writes its own value, and dispatches two events: - 'helix-before-move' for every step. Cancel it to hold the positions in your own state and apply them yourself. - 'helix-move' once the move is finished. A resize dispatches the same pair with a size. Set 'readonly' on the board to keep every card in place, such as on a published board. Set 'readonly' on one card or connection to keep only that one in place. Set 'snap' to a length in the document's units, such as '32', and a card that is moved or resized lands on a multiple of it. Carrying a card, a corner, a connection, or the selection box near the edge of the board moves the board under it, so a card can be taken to a place off screen in one drag. A connection let go within 20 pixels of a card arrives at it. A double click on the empty board zooms in about that point, and Shift with a double click zooms out. Keyboard behavior: - One card holds the board's tab stop. - The arrow keys move through the cards in reading order. The card you land on scrolls into view, and its connections are announced with it. - The card you land on is selected. Control or Command with an arrow key, Home, or End moves without changing the selection, and Space adds the card to the selection or takes it out, so you can select cards that are not next to each other. - Shift with an arrow key moves the card: by 16 units, or to the next multiple of 'snap' where it is set. Alt with an arrow key resizes it from its bottom right corner the same way. - The connections leaving a card are stops of their own, straight after it. Enter on one moves to the card it arrives at. - What a key changes that a reader cannot see is said: where a card moved to, its new size, how many cards are selected, and the zoom. A selected card or connection says so when a reader arrives on it. - Control or Command with C copies the selected cards, and the connections between them, as a JSON Canvas document in text, which another board or an app that reads the format takes. A paste is your page's: listen for 'paste' on the board, read the text with 'fromJsonCanvas', and add the cards it holds. - Control or Command with Z undoes the last move or resize the board made, and with Shift, or Control with Y, makes it again. 'undo()' and 'redo()' do the same from a script. Each asks with 'helix-before-move' and tells with 'helix-move', as a move does, so a board that holds its positions in your state is undone through your state. Every drag also works with clicks, as WCAG 2.5.7 requires for a pointer that cannot hold a button down. Click a selected card's move handle, a corner, a card's connection point, or the end of a selected connection to pick it up. It follows the pointer with no button held, and the next click puts it down where a drag would have. On touch, the next tap sets where it lands. Escape, or a press outside the board, puts it back. So a finger connects two cards with three taps: the card, one of its points, and the card to connect to. Connecting and removing dispatch requests, and your code applies them: - Drawing from a card's handle to another card, or pressing C on one card and Enter on another, dispatches 'helix-connect'. - Delete on a card or a connection dispatches 'helix-remove'. The event names every connection that removing the card would leave without an end. Once your page removes what Delete asked for, focus moves to the next stop, to the one before where it was the last, and to the board where none is left. A focused card your page removes for its own reasons hands focus on the same way, unless the reader has already moved focus somewhere else. The board applies a move itself, because the card already exists. A connection is a new element, and React discards an element the board adds to its markup on the next render, so you write the connection. Cards and connections are 'helix-canvas-node' and 'helix-canvas-edge' elements, so they are in the served markup whichever renderer wrote them. The library fetches nothing, and an array passed to an element is missing from the first paint of a server-rendered React page. 'fromJsonCanvas' turns a JSON Canvas document into their props, and 'toJsonCanvas()' writes a board back out. */
|
|
18729
|
+
/** A board of cards and connectors, drawn by Helix. On a canvas every position is data that someone placed, so drawing is arithmetic over rectangles with no layout to compute. 'Map' takes a slotted map, because another renderer draws its tiles. The format is [JSON Canvas](https://jsoncanvas.org), an open format. Each node has an 'x', 'y', 'width', 'height', and a type. Each edge names the two nodes it joins and the sides it leaves and arrives on. A card belongs to a group when it sits inside the group's bounds. The cards are text in the DOM, so a screen reader can read them. The family adds a reading order and states each card's connections as text. 'order' sets the reading order: - 'spatial' bands the cards into rows. - 'edges' follows the arrows, starting from the cards that nothing points to. **Cards move by default.** The board writes the new 'x' and 'y' onto the card, the way an input writes its own value, and dispatches two events: - 'helix-before-move' for every step. Cancel it to hold the positions in your own state and apply them yourself. - 'helix-move' once the move is finished. A resize dispatches the same pair with a size. Set 'readonly' on the board to keep every card in place, such as on a published board. Set 'readonly' on one card or connection to keep only that one in place. Set 'snap' to a length in the document's units, such as '32', and a card that is moved or resized lands on a multiple of it. Carrying a card, a corner, a connection, or the selection box near the edge of the board moves the board under it, so a card can be taken to a place off screen in one drag. A connection let go within 20 pixels of a card arrives at it. A double click on the empty board zooms in about that point, and Shift with a double click zooms out. Keyboard behavior: - One card holds the board's tab stop. - The arrow keys move through the cards in reading order. The card you land on scrolls into view, and its connections are announced with it. - The card you land on is selected. Control or Command with an arrow key, Home, or End moves without changing the selection, and Space adds the card to the selection or takes it out, so you can select cards that are not next to each other. - Shift with an arrow key moves the card: by 16 units, or to the next multiple of 'snap' where it is set. Alt with an arrow key resizes it from its bottom right corner the same way. - The connections leaving a card are stops of their own, straight after it. Enter on one moves to the card it arrives at. - What a key changes that a reader cannot see is said: where a card moved to, its new size, how many cards are selected, and the zoom. A selected card or connection says so when a reader arrives on it. - Control or Command with C copies the selected cards, and the connections between them, as a JSON Canvas document in text, which another board or an app that reads the format takes. A paste is your page's: listen for 'paste' on the board, read the text with 'fromJsonCanvas', and add the cards it holds. - Control or Command with Z undoes the last move or resize the board made, and with Shift, or Control with Y, makes it again. 'undo()' and 'redo()' do the same from a script. Each asks with 'helix-before-move' and tells with 'helix-move', as a move does, so a board that holds its positions in your state is undone through your state. Every drag also works with clicks, as WCAG 2.5.7 requires for a pointer that cannot hold a button down. Click a selected card's move handle, a corner, a card's connection point, or the end of a selected connection to pick it up. It follows the pointer with no button held, and the next click puts it down where a drag would have. On touch, the next tap sets where it lands. Escape, or a press outside the board, puts it back. So a finger connects two cards with three taps: the card, one of its points, and the card to connect to. Connecting and removing dispatch requests, and your code applies them: - Drawing from a card's handle to another card, or pressing C on one card and Enter on another, dispatches 'helix-connect'. - Delete on a card or a connection dispatches 'helix-remove'. The event names every connection that removing the card would leave without an end. Once your page removes what Delete asked for, focus moves to the next stop, to the one before where it was the last, and to the board where none is left. A focused card your page removes for its own reasons hands focus on the same way, unless the reader has already moved focus somewhere else. The board applies a move itself, because the card already exists. A connection is a new element, and React discards an element the board adds to its markup on the next render, so you write the connection. **'edgeRoute' draws the connections' lines your own way**: a function from where a line leaves and arrives, and the sides it does, to its SVG path, for a route such as one that bends around the cards between. What it returns is the line drawn, the line pressed and focused, and the one an arrowhead sits at the end of. Nothing back draws the board's own. Add 'minimap' to 'controls' for a picture of the whole board in a corner: each card as a box, and a frame around what is on screen. A press or a drag on it brings that place to the middle of the view. It is for a pointer, and a screen reader skips it: the arrow keys and 'show()' reach every card. Cards and connections are 'helix-canvas-node' and 'helix-canvas-edge' elements, so they are in the served markup whichever renderer wrote them. The library fetches nothing, and an array passed to an element is missing from the first paint of a server-rendered React page. 'fromJsonCanvas' turns a JSON Canvas document into their props, and 'toJsonCanvas()' writes a board back out. */
|
|
18697
18730
|
"helix-headless-canvas": DefineCustomElement<
|
|
18698
18731
|
HelixHeadlessCanvas,
|
|
18699
18732
|
HelixHeadlessCanvasVueProps,
|
|
@@ -19035,7 +19068,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
19035
19068
|
HelixHeadlessMapRasterVueProps,
|
|
19036
19069
|
HelixHeadlessMapRasterVueEvents
|
|
19037
19070
|
>;
|
|
19038
|
-
/** Wraps a map drawn by MapLibre, Leaflet, or another renderer. The frame adds a name for the map, a column of controls, and a strip for the map credit. Helix does not draw the map itself. The controls are one column, and 'controls' names which ones: 'fullscreen', 'layers', 'tilt', 'zoom', and 'compass', top to bottom. 'zoom compass fullscreen' by default. The compass's needle points north as the map turns, and pressing it turns the map to face north. Add 'pan' and 'rotate' for buttons around the compass that move and turn the map. Dragging is otherwise the only way a pointer moves the map, so add them where the map has to be usable without dragging, as WCAG 2.2 asks at level AA. The arrow keys pan the map and Shift with Left or Right turns it either way. The pan and zoom buttons and the arrow keys send 'helix-map-pan' and 'helix-map-zoom'. Move your map in response, or connect it with 'connectMap' from '@fusion.dev/helix-map', which does this for you. Add 'tilt' to 'controls' for the 3D button, which a map with 3D buildings or terrain needs. It is a toggle. Pressed, it tilts the map 50 degrees, and 'connectMap' raises the buildings and the ground. Pressed again, it makes the map flat, and lays them flat too. Shift with Up or Down tilts the map in steps. Turning and tilting send 'helix-map-rotate' and 'helix-map-tilt', which 'connectMap' answers on MapLibre. Leaflet draws maps flat and does not rotate. Add 'layers' to 'controls' for a layers button. It opens a menu with a tile for each layer, which sets the layer's 'hidden' attribute. Layers with the same 'group', such as a route and its dotted legs, share one tile. A tile sends 'helix-before-toggle' from the layer first, so you can store the choice or refuse it, and 'helix-toggle' from it once 'hidden' holds the choice. Imagery, a 'helix-map-raster' with 'ground', is a map type and not a tile. The menu opens with a card for each type, Standard, Hybrid, and Satellite, with a picture of the map in it, and 'map-type' says which is chosen. Standard hides the imagery, Hybrid draws it under the roads and names, and Satellite draws it alone. Choosing one sends 'helix-before-change' with its name, and 'change' once 'map-type' holds it. 'connectMap' does not draw a hidden layer, so a layer you write with 'hidden' starts turned off. Markers, routes, areas, live positions, and points layers go inside the frame as child elements. */
|
|
19071
|
+
/** Wraps a map drawn by MapLibre, Leaflet, or another renderer. The frame adds a name for the map, a column of controls, and a strip for the map credit. Helix does not draw the map itself. The controls are one column, and 'controls' names which ones: 'fullscreen', 'layers', 'tilt', 'zoom', and 'compass', top to bottom. 'zoom compass fullscreen' by default. The compass's needle points north as the map turns, and pressing it turns the map to face north. Add 'pan' and 'rotate' for buttons around the compass that move and turn the map. Dragging is otherwise the only way a pointer moves the map, so add them where the map has to be usable without dragging, as WCAG 2.2 asks at level AA. The arrow keys pan the map and Shift with Left or Right turns it either way. The pan and zoom buttons and the arrow keys send 'helix-map-pan' and 'helix-map-zoom'. Move your map in response, or connect it with 'connectMap' from '@fusion.dev/helix-map', which does this for you. Add 'tilt' to 'controls' for the 3D button, which a map with 3D buildings or terrain needs. It is a toggle. Pressed, it tilts the map 50 degrees, and 'connectMap' raises the buildings and the ground. Pressed again, it makes the map flat, and lays them flat too. Shift with Up or Down tilts the map in steps. Turning and tilting send 'helix-map-rotate' and 'helix-map-tilt', which 'connectMap' answers on MapLibre. Leaflet draws maps flat and does not rotate. Add 'layers' to 'controls' for a layers button. It opens a menu with a tile for each layer, which sets the layer's 'hidden' attribute. Layers with the same 'group', such as a route and its dotted legs, share one tile. A tile sends 'helix-before-toggle' from the layer first, so you can store the choice or refuse it, and 'helix-toggle' from it once 'hidden' holds the choice. Escape closes the menu and returns focus to its button, and the menu closes when focus moves on from it or a press lands outside the map. Imagery, a 'helix-map-raster' with 'ground', is a map type and not a tile. The menu opens with a card for each type, Standard, Hybrid, and Satellite, with a picture of the map in it, and 'map-type' says which is chosen. Standard hides the imagery, Hybrid draws it under the roads and names, and Satellite draws it alone. Choosing one sends 'helix-before-change' with its name, and 'change' once 'map-type' holds it. 'connectMap' does not draw a hidden layer, so a layer you write with 'hidden' starts turned off. Markers, routes, areas, live positions, and points layers go inside the frame as child elements. */
|
|
19039
19072
|
"helix-headless-map": DefineCustomElement<
|
|
19040
19073
|
HelixHeadlessMap,
|
|
19041
19074
|
HelixHeadlessMapVueProps,
|
|
@@ -19059,13 +19092,13 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
19059
19092
|
HelixHeadlessMegamenuVueProps,
|
|
19060
19093
|
HelixHeadlessMegamenuVueEvents
|
|
19061
19094
|
>;
|
|
19062
|
-
/** One element covers three kinds of row, and what you give it decides which: - Content in the 'submenu' slot makes the row open a submenu page. - 'checked' makes the row a choice. - With neither, the row is a command. The role follows the kind. A row with 'checked' is 'menuitemcheckbox' with 'aria-checked', and 'exclusive'
|
|
19095
|
+
/** One element covers three kinds of row, and what you give it decides which: - Content in the 'submenu' slot makes the row open a submenu page. - 'checked' makes the row a choice. - With neither, the row is a command. The role follows the kind. A row with 'checkable' or 'checked' is 'menuitemcheckbox' with 'aria-checked', and an 'exclusive' row is 'menuitemradio', for a set where only one can be on. A row that opens a page keeps 'menuitem' and sets 'aria-haspopup'. Choosing a choice row checks or unchecks it before 'helix-select' is sent, so a listener reads the new 'checked'. An 'exclusive' row turns on and turns off the 'exclusive' rows next to it. Cancel 'helix-before-toggle' to keep a row as it is and set 'checked' yourself. Space on a choice row changes it and leaves the menu open, so a reader can set several in a row, as the APG's menu does. Enter and a press change it and close the menu. 'close-on-select="false"' on the row keeps the menu open after any choice of it, and 'close-on-select' on the row closes it after a Space as well. The menu sets whether the row's page is showing as a property, never as an attribute. An attribute written onto your element after it upgrades causes a hydration mismatch. 'shortcut' shows a row's keyboard shortcut after its label, drawn by 'Kbd' in the platform's glyphs, and gives the row 'aria-keyshortcuts'. It binds nothing: the shortcut is the page's to bind. Other trailing words, such as a count, go in the 'end' slot. The row is named by its label alone. Words in 'description', a line under the label, and in 'end' describe it instead, through 'aria-describedby', as React Aria's menu item does with its description: a reader hears "Copy", then "Copies the selection". A development build warns when a row has no words to be named by, such as a row holding only an icon with no label. The check mark and the caret are the fallbacks of the 'check' and 'chevron' slots, so a mark of your own replaces either by being slotted. Neither is read as part of the row's name. */
|
|
19063
19096
|
"helix-headless-menu-item": DefineCustomElement<
|
|
19064
19097
|
HelixHeadlessMenuItem,
|
|
19065
19098
|
HelixHeadlessMenuItemVueProps,
|
|
19066
19099
|
HelixHeadlessMenuItemVueEvents
|
|
19067
19100
|
>;
|
|
19068
|
-
/** The trigger is slotted and stays your own element, as with the tooltip. The menu renders its surface in the top layer with the popover API, so an ancestor with 'overflow: hidden' does not clip it and it needs no 'z-index'. Slot a 'helix-button' or 'helix-icon-button' as the trigger, and the menu tells it that it opens a menu and whether the menu is open, inside its own shadow root. On a plain element, such as a '<button>', the menu writes 'aria-haspopup="menu"' and 'aria-expanded', from a frame after its own first render, so a server's markup is never changed while a framework hydrates it. It never writes 'aria-expanded' where you wrote it yourself. Submenus drill down by default. A submenu replaces the panel's content, and a back row returns to the previous page. One panel stays inside a narrow window, and works on touch screens, which have no hover. **'submenus="flyout"' opens each submenu in a panel of its own beside its row**, as React Aria's 'SubmenuTrigger' and Radix's 'Sub' do. Resting the pointer on the row opens it, and a pointer crossing toward the open panel over the rows between keeps it open, as Radix's grace area does. Right Arrow opens a row's submenu on its first row, and Left Arrow or Escape closes it and returns focus to the row, the two arrows swapping on a right-to-left page. The row says 'aria-expanded', and the panel is a 'menu' named by the row. The root holds which page is open, because only one page shows at a time. It sets this on items as a property, never as an attribute. An attribute written onto your element after it upgrades causes a hydration mismatch. Group rows under a heading with 'Menu.Section', which is a 'group' named by its heading. Between runs of rows, a '<helix-divider>' is a separator a screen reader announces. Keys: Enter, Space or Down Arrow on the trigger opens the menu on its first row, and Up Arrow on its last. In the menu, Up and Down Arrow move between rows, Home and End go to the first and the last, a typed letter moves to the next row whose name starts with it, Enter and Space choose, Right Arrow opens a row's submenu and Left Arrow goes back, the two swapping on a right-to-left page. Left Arrow on the top page does nothing. Escape closes the menu and returns focus to the trigger. Tab closes it and moves on. While it is open, the surface carries the trigger's width as '--floating-anchor-inline-size' and the room left below it as '--floating-available-block-size', as Radix's dropdown menu publishes its trigger's width, for a menu as wide as its trigger: 'helix-menu::part(surface) { min-inline-size: var(--floating-anchor-inline-size) }'. With 'context', the trigger is an area and the menu is its context menu: a right-click, a long press, Shift+F10 or the menu key over the area opens it at the pointer, or at the area's corner from the keyboard, as Radix's context menu does. A press on the area does not open it, and closing it returns focus to where it was. A touch or a pen held still on the area opens it too, on every browser, since iOS sends no 'contextmenu' for one. **A trigger with its own action.** With 'open-on="long-press"', a press on the trigger is the trigger's own, and a press held for half a second opens the menu, as React Aria's 'trigger="longPress"' does. Alt+Down or Alt+Up opens it from the keyboard, and the trigger is described by 'long-press-label', which says so. */
|
|
19101
|
+
/** The trigger is slotted and stays your own element, as with the tooltip. The menu renders its surface in the top layer with the popover API, so an ancestor with 'overflow: hidden' does not clip it and it needs no 'z-index'. Slot a 'helix-button' or 'helix-icon-button' as the trigger, and the menu tells it that it opens a menu and whether the menu is open, inside its own shadow root. On a plain element, such as a '<button>', the menu writes 'aria-haspopup="menu"' and 'aria-expanded', from a frame after its own first render, so a server's markup is never changed while a framework hydrates it. It never writes 'aria-expanded' where you wrote it yourself. Submenus drill down by default. A submenu replaces the panel's content, and a back row returns to the previous page. One panel stays inside a narrow window, and works on touch screens, which have no hover. **'submenus="flyout"' opens each submenu in a panel of its own beside its row**, as React Aria's 'SubmenuTrigger' and Radix's 'Sub' do. Resting the pointer on the row opens it, and a pointer crossing toward the open panel over the rows between keeps it open, as Radix's grace area does. Right Arrow opens a row's submenu on its first row, and Left Arrow or Escape closes it and returns focus to the row, the two arrows swapping on a right-to-left page. The row says 'aria-expanded', and the panel is a 'menu' named by the row. The root holds which page is open, because only one page shows at a time. It sets this on items as a property, never as an attribute. An attribute written onto your element after it upgrades causes a hydration mismatch. Group rows under a heading with 'Menu.Section', which is a 'group' named by its heading. Between runs of rows, a '<helix-divider>' is a separator a screen reader announces. Keys: Enter, Space or Down Arrow on the trigger opens the menu on its first row, and Up Arrow on its last. In the menu, Up and Down Arrow move between rows, Home and End go to the first and the last, a typed letter moves to the next row whose name starts with it, Enter and Space choose (Space on a choice row changes it and leaves the menu open), Right Arrow opens a row's submenu and Left Arrow goes back, the two swapping on a right-to-left page. Left Arrow on the top page does nothing. Escape closes the menu and returns focus to the trigger. Tab closes it and moves on. While it is open, the surface carries the trigger's width as '--floating-anchor-inline-size' and the room left below it as '--floating-available-block-size', as Radix's dropdown menu publishes its trigger's width, for a menu as wide as its trigger: 'helix-menu::part(surface) { min-inline-size: var(--floating-anchor-inline-size) }'. With 'context', the trigger is an area and the menu is its context menu: a right-click, a long press, Shift+F10 or the menu key over the area opens it at the pointer, or at the area's corner from the keyboard, as Radix's context menu does. A press on the area does not open it, and closing it returns focus to where it was. A touch or a pen held still on the area opens it too, on every browser, since iOS sends no 'contextmenu' for one. **A trigger with its own action.** With 'open-on="long-press"', a press on the trigger is the trigger's own, and a press held for half a second opens the menu, as React Aria's 'trigger="longPress"' does. Alt+Down or Alt+Up opens it from the keyboard, and the trigger is described by 'long-press-label', which says so. */
|
|
19069
19102
|
"helix-headless-menu": DefineCustomElement<
|
|
19070
19103
|
HelixHeadlessMenu,
|
|
19071
19104
|
HelixHeadlessMenuVueProps,
|