@fusion.dev/helix-headless 0.105.0 → 0.107.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 +7324 -3890
- package/dist/accordion/item/accordion-item.d.ts +17 -16
- package/dist/accordion/root/accordion-root.d.ts +13 -17
- package/dist/announcement/root/announcement-root.d.ts +24 -31
- package/dist/app-header/root/app-header-root.d.ts +14 -14
- package/dist/area-chart/root/area-chart-root.d.ts +29 -48
- package/dist/avatar/group/avatar-group.d.ts +6 -8
- package/dist/avatar/root/avatar-root.d.ts +11 -11
- package/dist/badge/root/badge-root.d.ts +14 -15
- package/dist/bar-chart/root/bar-chart-root.d.ts +40 -44
- package/dist/blockquote/root/blockquote-root.d.ts +5 -7
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +25 -33
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +12 -11
- package/dist/button/root/button-root.d.ts +16 -17
- package/dist/button-group/root/button-group-root.d.ts +9 -10
- package/dist/callout/root/callout-root.d.ts +10 -15
- package/dist/canvas/edge/canvas-edge.d.ts +21 -21
- package/dist/canvas/node/canvas-node.d.ts +43 -45
- package/dist/canvas/root/canvas-root.d.ts +100 -99
- package/dist/card/root/card-root.d.ts +10 -12
- package/dist/carousel/root/carousel-root.d.ts +32 -33
- package/dist/chat/composer/chat-composer.d.ts +24 -26
- package/dist/chat/message/chat-message.d.ts +30 -33
- package/dist/chat/root/chat-root.d.ts +63 -80
- package/dist/checkbox/root/checkbox-root.d.ts +30 -32
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +25 -25
- package/dist/code/root/code-root.d.ts +6 -10
- package/dist/code-block/root/code-block-root.d.ts +35 -48
- package/dist/color-input/root/color-input-root.d.ts +52 -56
- package/dist/color-picker/root/color-picker-root.d.ts +49 -49
- package/dist/combobox/root/combobox-root.d.ts +52 -53
- package/dist/command/root/command-root.d.ts +35 -40
- package/dist/copy-button/root/copy-button-root.d.ts +24 -26
- package/dist/data-table/root/data-table-root.d.ts +106 -107
- package/dist/date-input/root/date-input-root.d.ts +54 -53
- package/dist/date-picker/root/date-picker-root.d.ts +25 -21
- package/dist/description-list/item/description-list-item.d.ts +7 -7
- package/dist/description-list/root/description-list-root.d.ts +10 -15
- package/dist/dialog/root/dialog-root.d.ts +22 -19
- package/dist/divider/root/divider-root.d.ts +12 -13
- package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
- package/dist/drawer/root/drawer-root.d.ts +19 -18
- package/dist/drilldown/item/drilldown-item.d.ts +28 -28
- package/dist/drilldown/root/drilldown-root.d.ts +22 -28
- package/dist/element-events.generated.js +7 -0
- package/dist/empty/root/empty-root.d.ts +16 -19
- package/dist/file-input/root/file-input-root.d.ts +32 -32
- package/dist/filter-input/chip/filter-chip.d.ts +36 -39
- package/dist/filter-input/field/filter-field.d.ts +25 -31
- package/dist/filter-input/menu/filter-menu.d.ts +50 -47
- package/dist/filter-input/operator/filter-operator.d.ts +15 -20
- package/dist/filter-input/root/filter-input-root.d.ts +80 -98
- package/dist/format-date/root/format-date-root.d.ts +19 -27
- package/dist/heatmap/root/heatmap-root.d.ts +40 -41
- package/dist/icon/root/icon-root.d.ts +21 -23
- package/dist/icon-button/root/icon-button-root.d.ts +12 -14
- package/dist/image/root/image-root.d.ts +30 -30
- package/dist/input/root/input-root.d.ts +36 -35
- package/dist/kbd/root/kbd-root.d.ts +13 -15
- package/dist/legend/root/legend-root.d.ts +18 -16
- package/dist/lightbox/item/lightbox-item.d.ts +13 -15
- package/dist/lightbox/root/lightbox-root.d.ts +40 -41
- package/dist/line-chart/root/line-chart-root.d.ts +20 -29
- package/dist/list/item/list-item.d.ts +17 -22
- package/dist/list/root/list-root.d.ts +6 -7
- package/dist/listbox/root/listbox-root.d.ts +42 -41
- package/dist/loader/root/loader-root.d.ts +16 -20
- package/dist/map/area/map-area.d.ts +6 -0
- package/dist/map/area/map-area.js +3 -0
- package/dist/map/buildings/map-buildings.d.ts +45 -0
- package/dist/map/buildings/map-buildings.js +37 -0
- package/dist/map/contours/map-contours.d.ts +61 -0
- package/dist/map/contours/map-contours.js +54 -0
- package/dist/map/index.d.ts +7 -0
- package/dist/map/index.js +5 -0
- package/dist/map/landcover/map-landcover.d.ts +47 -0
- package/dist/map/landcover/map-landcover.js +37 -0
- package/dist/map/marker/map-marker.d.ts +11 -4
- package/dist/map/marker/map-marker.js +13 -1
- package/dist/map/points/map-points.d.ts +7 -1
- package/dist/map/points/map-points.js +3 -0
- package/dist/map/raster/map-raster.d.ts +84 -0
- package/dist/map/raster/map-raster.js +96 -0
- package/dist/map/root/map-root.d.ts +169 -7
- package/dist/map/root/map-root.js +352 -4
- package/dist/map/route/map-route.d.ts +6 -0
- package/dist/map/route/map-route.js +3 -0
- package/dist/map/terrain/map-terrain.d.ts +68 -0
- package/dist/map/terrain/map-terrain.js +58 -0
- package/dist/megamenu/root/megamenu-root.d.ts +27 -25
- package/dist/menu/item/menu-item.d.ts +30 -31
- package/dist/menu/root/menu-root.d.ts +25 -29
- package/dist/meter/root/meter-root.d.ts +22 -21
- package/dist/navigation/root/navigation-root.d.ts +13 -16
- package/dist/notifications/group/notification-group.d.ts +27 -28
- package/dist/notifications/notification/notification.d.ts +35 -42
- package/dist/notifications/root/notifications-root.d.ts +22 -24
- package/dist/number-input/root/number-input-root.d.ts +46 -50
- package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
- package/dist/option/group/option-group.d.ts +11 -11
- package/dist/option/root/option-root.d.ts +28 -33
- package/dist/outline/root/outline-root.d.ts +18 -17
- package/dist/pagination/root/pagination-root.d.ts +37 -39
- package/dist/pagination/size/pagination-size.d.ts +37 -43
- package/dist/pagination/summary/pagination-summary.d.ts +12 -14
- package/dist/pin-input/root/pin-input-root.d.ts +32 -38
- package/dist/popover/root/popover-root.d.ts +16 -21
- package/dist/progress/root/progress-root.d.ts +16 -14
- package/dist/qr-code/root/qr-code-root.d.ts +22 -25
- package/dist/quote/root/quote-root.d.ts +5 -6
- package/dist/radio/group/radio-group.d.ts +26 -28
- package/dist/radio/root/radio-root.d.ts +24 -28
- package/dist/rating/root/rating-root.d.ts +27 -30
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
- package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
- package/dist/select/root/select-root.d.ts +41 -44
- package/dist/skeleton/root/skeleton-root.d.ts +7 -8
- package/dist/skip-link/root/skip-link-root.d.ts +21 -28
- package/dist/slider/root/slider-root.d.ts +36 -39
- package/dist/sparkline/root/sparkline-root.d.ts +22 -28
- package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
- package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
- package/dist/splitter/root/splitter-root.d.ts +37 -41
- package/dist/stat/group/stat-group.d.ts +4 -4
- package/dist/stat/root/stat-root.d.ts +8 -9
- package/dist/steps/root/steps-root.d.ts +11 -14
- package/dist/steps/step/step.d.ts +22 -29
- package/dist/switch/root/switch-root.d.ts +20 -24
- package/dist/table/cell/table-cell.d.ts +18 -8
- package/dist/table/cell/table-cell.js +5 -1
- package/dist/table/column/table-column.d.ts +62 -55
- package/dist/table/root/table-root.d.ts +16 -17
- package/dist/table/row/table-row.d.ts +3 -3
- package/dist/tabs/panel/tab-panel.d.ts +3 -3
- package/dist/tabs/root/tabs-root.d.ts +19 -17
- package/dist/tabs/tab/tab.d.ts +6 -6
- package/dist/tag/root/tag-root.d.ts +11 -12
- package/dist/textarea/root/textarea-root.d.ts +29 -32
- package/dist/time-input/root/time-input-root.d.ts +70 -69
- package/dist/time-picker/root/time-picker-root.d.ts +58 -66
- package/dist/timeline/item/timeline-item.d.ts +18 -24
- package/dist/timeline/root/timeline-root.d.ts +13 -21
- package/dist/toast/item/toast-item.d.ts +21 -22
- package/dist/toast/root/toast-root.d.ts +18 -23
- package/dist/toggle/group/toggle-group.d.ts +23 -25
- package/dist/toggle/root/toggle-root.d.ts +8 -8
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/tooltip/root/tooltip-root.d.ts +41 -47
- package/dist/tour/root/tour-root.d.ts +24 -26
- package/dist/tour/stop/tour-stop.d.ts +39 -48
- package/dist/tree/item/tree-item.d.ts +23 -25
- package/dist/tree/root/tree-root.d.ts +13 -12
- package/dist/trend/root/trend-root.d.ts +18 -19
- package/dist/video/root/video-root.d.ts +108 -101
- package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
- package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
- package/package.json +5 -5
- package/types/jsx.d.ts +10363 -9520
- package/types/svelte.d.ts +5 -0
- package/types/vue.d.ts +1440 -1032
|
@@ -4,38 +4,33 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
4
4
|
* @summary One card or group on a canvas.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* what is inside it is the consumer's own DOM rather than a string this
|
|
13
|
-
* component parses.
|
|
7
|
+
* A card is an element in the markup, the rule `VideoPlaylist` also follows. An
|
|
8
|
+
* array passed to a custom element is missing from the first paint of every
|
|
9
|
+
* server-rendered React page, because React skips the properties it would have
|
|
10
|
+
* to set imperatively during hydration. A card element is in the served HTML
|
|
11
|
+
* whichever renderer wrote it, and its contents are your own DOM.
|
|
14
12
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* the honest half of what a board can promise before it hydrates.
|
|
13
|
+
* Set `x` and `y` to place the card. On a canvas the placement carries meaning,
|
|
14
|
+
* so positions are given and never computed. The board reads them and places
|
|
15
|
+
* the card. Without JavaScript, the page shows the cards and their text without
|
|
16
|
+
* the arrangement.
|
|
20
17
|
*
|
|
21
|
-
*
|
|
22
|
-
* form control's
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* meant. `id` is left for the page, which can still use it.
|
|
18
|
+
* `name` identifies the card and only has to be unique on its board, like a
|
|
19
|
+
* form control's name in its form. An `id` must be unique on the whole page,
|
|
20
|
+
* which fails when two boards come from one template or one board is shown
|
|
21
|
+
* twice. `id` stays free for your own use.
|
|
26
22
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* Canvas
|
|
23
|
+
* The card holds your content, and there is no card type. Text is text, a link
|
|
24
|
+
* is a link you put inside the card, and a file is whatever you show for one.
|
|
25
|
+
* The board treats one kind differently: a group, drawn as a box behind the
|
|
26
|
+
* cards inside it. Set `group` for a group. `fromJsonCanvas` maps the four JSON
|
|
27
|
+
* Canvas node types on the way in.
|
|
32
28
|
*
|
|
33
|
-
*
|
|
34
|
-
* board keeps one tab stop among its cards, arrow keys
|
|
35
|
-
* order, and the
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* thing twice to a sighted reader and took a row from the board to do it.
|
|
29
|
+
* The cards are how you move around the board with a keyboard or a screen
|
|
30
|
+
* reader. The board keeps one tab stop among its cards, the arrow keys move
|
|
31
|
+
* through them in reading order, and the card you land on scrolls into view.
|
|
32
|
+
* Its connections are announced with it, so a screen reader reads the arrows
|
|
33
|
+
* between cards.
|
|
39
34
|
*
|
|
40
35
|
* @since 0.100.0
|
|
41
36
|
* @status experimental
|
|
@@ -43,31 +38,31 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
43
38
|
* @aliases CanvasCard, BoardNode
|
|
44
39
|
* @documentation https://fusion.dev/helix/components/canvas
|
|
45
40
|
*
|
|
46
|
-
* @slot -
|
|
47
|
-
* @slot description - A
|
|
41
|
+
* @slot - The card's content, such as text, a picture, or a chart.
|
|
42
|
+
* @slot description - A line of secondary text under the content.
|
|
48
43
|
*
|
|
49
|
-
* @csspart grip - A corner a selected card
|
|
44
|
+
* @csspart grip - A corner handle that resizes a selected card, on each of the four corners.
|
|
50
45
|
* @csspart grip-bottom-left - The bottom left corner.
|
|
51
46
|
* @csspart grip-bottom-right - The bottom right corner.
|
|
52
47
|
* @csspart grip-top-left - The top left corner.
|
|
53
48
|
* @csspart grip-top-right - The top right corner.
|
|
54
|
-
* @csspart handle - A point
|
|
49
|
+
* @csspart handle - A point that you draw a connection from, on each of the four sides.
|
|
55
50
|
* @csspart handle-bottom - The point on the bottom side.
|
|
56
51
|
* @csspart handle-left - The point on the left side.
|
|
57
52
|
* @csspart handle-right - The point on the right side.
|
|
58
53
|
* @csspart handle-top - The point on the top side.
|
|
59
|
-
* @csspart move - The handle a selected card
|
|
54
|
+
* @csspart move - The handle that moves a selected card. Drag it, or click once to pick the card up and again to put it down.
|
|
60
55
|
* @csspart node - The box the content sits in.
|
|
61
|
-
* @csspart outline - The drawn outline of a card
|
|
56
|
+
* @csspart outline - The drawn outline of a `diamond` card, a shape a box cannot draw.
|
|
62
57
|
*
|
|
63
58
|
* @cssstate candidate - While a connection is being drawn and this card is somewhere it could arrive.
|
|
64
|
-
* @cssstate current -
|
|
65
|
-
* @cssstate selected -
|
|
66
|
-
* @cssstate target -
|
|
59
|
+
* @cssstate current - The card that receives focus when you tab into the board.
|
|
60
|
+
* @cssstate selected - The card is selected.
|
|
61
|
+
* @cssstate target - A connection being drawn would end here if you released it.
|
|
67
62
|
*/
|
|
68
63
|
export declare class HelixHeadlessCanvasNode extends HelixElement {
|
|
69
64
|
/**
|
|
70
|
-
*
|
|
65
|
+
* Makes this a group: a box drawn behind the cards inside it.
|
|
71
66
|
*
|
|
72
67
|
* The board works out what is inside it from the geometry, which is what the
|
|
73
68
|
* format does too, and moves them with it. Its `label` is drawn above it.
|
|
@@ -94,7 +89,8 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
|
|
|
94
89
|
/** How tall the card is, in the document's own units. */
|
|
95
90
|
height: number;
|
|
96
91
|
/**
|
|
97
|
-
*
|
|
92
|
+
* The card's name as text. A group shows it, and another card's connections
|
|
93
|
+
* read it out.
|
|
98
94
|
*
|
|
99
95
|
* A group needs one because it has no text of its own; a card that has text
|
|
100
96
|
* is named by it, and one holding a picture or a figure is named by nothing
|
|
@@ -102,7 +98,8 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
|
|
|
102
98
|
*/
|
|
103
99
|
label: string;
|
|
104
100
|
/**
|
|
105
|
-
*
|
|
101
|
+
* The name that connections and events use for this card, unique on its
|
|
102
|
+
* board.
|
|
106
103
|
*
|
|
107
104
|
* Required: a card with no name is drawn but nothing can connect to it, and
|
|
108
105
|
* the board has nothing to say when a reader asks for it to go.
|
|
@@ -115,7 +112,7 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
|
|
|
115
112
|
*/
|
|
116
113
|
links: string;
|
|
117
114
|
/**
|
|
118
|
-
*
|
|
115
|
+
* Prevents the card from being moved, connected, or removed.
|
|
119
116
|
*
|
|
120
117
|
* **The board's own word, meaning the same thing one card at a time.** A
|
|
121
118
|
* board of cards a reader rearranges often has one that anchors it, a start
|
|
@@ -124,8 +121,8 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
|
|
|
124
121
|
*/
|
|
125
122
|
readOnly: boolean;
|
|
126
123
|
/**
|
|
127
|
-
* The card's outline: `circle`, `diamond`, `pill
|
|
128
|
-
* box
|
|
124
|
+
* The card's outline: `circle`, `diamond`, `pill`, or `square`. Unset is a
|
|
125
|
+
* rounded box.
|
|
129
126
|
*
|
|
130
127
|
* **A flowchart's vocabulary, and the reason it is on this tier**: a diamond
|
|
131
128
|
* is drawn as an outline the card renders, because a border follows a box
|
|
@@ -152,7 +149,8 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
|
|
|
152
149
|
*/
|
|
153
150
|
resizable: boolean;
|
|
154
151
|
/**
|
|
155
|
-
*
|
|
152
|
+
* The meaning of the card, shown by its color, in the same tones as other
|
|
153
|
+
* Helix components.
|
|
156
154
|
*
|
|
157
155
|
* **`tone` rather than the format's `color`**, which was a second word for
|
|
158
156
|
* the same thing on this family alone: JSON Canvas writes `1` to `6` and
|
|
@@ -188,7 +186,7 @@ export declare class HelixHeadlessCanvasNode extends HelixElement {
|
|
|
188
186
|
*/
|
|
189
187
|
protected updated(changed: PropertyValues): void;
|
|
190
188
|
/**
|
|
191
|
-
* Focuses the card
|
|
189
|
+
* Focuses the card's `node` part. The host draws no box of its own.
|
|
192
190
|
*
|
|
193
191
|
* The board calls this to walk the cards, and a consumer can too: the part is
|
|
194
192
|
* what holds the tab stop and what a focus ring is drawn around.
|
|
@@ -5,66 +5,66 @@ export type { CanvasDocument, CanvasEdge, CanvasEdgeProps, CanvasEnd, CanvasNode
|
|
|
5
5
|
export { fromJsonCanvas } from './canvas-document.js';
|
|
6
6
|
declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion.dev/helix-core").ViewportElement) & typeof HelixElement;
|
|
7
7
|
/**
|
|
8
|
-
* @summary A board of cards and the connections between them, which
|
|
8
|
+
* @summary A board of cards and the connections between them, which can be navigated, rearranged, and connected.
|
|
9
9
|
*
|
|
10
10
|
* @description
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* tiles and a graph view's positions are computed, which is why `Map` takes a
|
|
16
|
-
* slotted map and this takes a document.
|
|
11
|
+
* A board of cards and connectors, drawn by Helix. On a canvas every position
|
|
12
|
+
* is data that someone placed, so drawing is arithmetic over rectangles with no
|
|
13
|
+
* layout to compute. `Map` takes a slotted map, because another renderer draws
|
|
14
|
+
* its tiles.
|
|
17
15
|
*
|
|
18
|
-
*
|
|
19
|
-
* an `x`, `y`, `width`, `height
|
|
20
|
-
* joins and the sides it leaves and arrives on. A card belongs to a
|
|
21
|
-
* it sits inside the group's bounds
|
|
16
|
+
* The format is [JSON Canvas](https://jsoncanvas.org), an open format. Each
|
|
17
|
+
* node has an `x`, `y`, `width`, `height`, and a type. Each edge names the two
|
|
18
|
+
* nodes it joins and the sides it leaves and arrives on. A card belongs to a
|
|
19
|
+
* group when it sits inside the group's bounds.
|
|
22
20
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* points to.
|
|
21
|
+
* The cards are text in the DOM, so a screen reader can read them. The family
|
|
22
|
+
* adds a reading order and states each card's connections as text. `order` sets
|
|
23
|
+
* the reading order:
|
|
24
|
+
* - `spatial` bands the cards into rows.
|
|
25
|
+
* - `edges` follows the arrows, starting from the cards that nothing points to.
|
|
29
26
|
*
|
|
30
|
-
* **Cards move by default
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* pair with a size in it. `readonly` keeps every card where it is, for a board
|
|
36
|
-
* that is published rather than worked on, and `readonly` on one card or
|
|
37
|
-
* connection keeps that one.
|
|
27
|
+
* **Cards move by default.** The board writes the new `x` and `y` onto the
|
|
28
|
+
* card, the way an input writes its own value, and dispatches two events:
|
|
29
|
+
* - `helix-before-move` for every step. Cancel it to hold the positions in your
|
|
30
|
+
* own state and apply them yourself.
|
|
31
|
+
* - `helix-move` once the move is finished.
|
|
38
32
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* arrow moves it, which is the keyboard's way to do what a drag does. The
|
|
43
|
-
* connections leaving a card are stops of their own, straight after it, and
|
|
44
|
-
* Enter on one goes to the card it arrives at.
|
|
33
|
+
* A resize dispatches the same pair with a size. Set `readonly` on the board to
|
|
34
|
+
* keep every card in place, such as on a published board. Set `readonly` on one
|
|
35
|
+
* card or connection to keep only that one in place.
|
|
45
36
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
37
|
+
* Keyboard behavior:
|
|
38
|
+
* - One card holds the board's tab stop.
|
|
39
|
+
* - The arrow keys move through the cards in reading order. The card you land
|
|
40
|
+
* on scrolls into view, and its connections are announced with it.
|
|
41
|
+
* - Shift with an arrow key moves the card.
|
|
42
|
+
* - The connections leaving a card are stops of their own, straight after it.
|
|
43
|
+
* Enter on one moves to the card it arrives at.
|
|
53
44
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* thrown away on the next render, so the board asks and the page writes it.
|
|
45
|
+
* Every drag also works with clicks, as WCAG 2.5.7 requires for a pointer that
|
|
46
|
+
* cannot hold a button down. Click a selected card's move handle, a corner, a
|
|
47
|
+
* card's connection point, or the end of a selected connection to pick it up.
|
|
48
|
+
* It follows the pointer with no button held, and the next click puts it down
|
|
49
|
+
* where a drag would have. On touch, the next tap sets where it lands. Escape,
|
|
50
|
+
* or a press outside the board, puts it back.
|
|
61
51
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
52
|
+
* Connecting and removing dispatch requests, and your code applies them:
|
|
53
|
+
* - Drawing from a card's handle to another card, or pressing C on one card and
|
|
54
|
+
* Enter on another, dispatches `helix-connect`.
|
|
55
|
+
* - Delete on a card or a connection dispatches `helix-remove`. The event names
|
|
56
|
+
* every connection that removing the card would leave without an end.
|
|
57
|
+
*
|
|
58
|
+
* The board applies a move itself, because the card already exists. A
|
|
59
|
+
* connection is a new element, and React discards an element the board adds to
|
|
60
|
+
* its markup on the next render, so you write the connection.
|
|
61
|
+
*
|
|
62
|
+
* Cards and connections are `helix-canvas-node` and `helix-canvas-edge`
|
|
63
|
+
* elements, so they are in the served markup whichever renderer wrote them. The
|
|
64
|
+
* library fetches nothing, and an array passed to an element is missing from
|
|
65
|
+
* the first paint of a server-rendered React page. `fromJsonCanvas` turns a
|
|
66
|
+
* JSON Canvas document into their props, and `toJsonCanvas()` writes a board
|
|
67
|
+
* back out.
|
|
68
68
|
*
|
|
69
69
|
* @since 0.100.0
|
|
70
70
|
* @status experimental
|
|
@@ -72,64 +72,63 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
|
|
|
72
72
|
* @aliases Board, JSON Canvas, Whiteboard
|
|
73
73
|
* @documentation https://fusion.dev/helix/components/canvas
|
|
74
74
|
*
|
|
75
|
-
* @slot empty -
|
|
76
|
-
* @slot footer -
|
|
77
|
-
* @slot header -
|
|
75
|
+
* @slot empty - Content shown when the document has no nodes.
|
|
76
|
+
* @slot footer - Content below the board.
|
|
77
|
+
* @slot header - Content above the board.
|
|
78
78
|
*
|
|
79
|
-
* @event {HelixBeforeMoveEvent} helix-before-move - Cards are about to move.
|
|
80
|
-
* @event {HelixBeforeReconnectEvent} helix-before-reconnect - A connection's end is about to move to another card or side.
|
|
81
|
-
* @event {HelixBeforeRelabelEvent} helix-before-relabel - A connection's label or a group's name is about to change.
|
|
82
|
-
* @event {HelixCanvasEditEvent} helix-canvas-edit -
|
|
83
|
-
* @event {HelixCanvasPanEvent} helix-canvas-pan - The board
|
|
84
|
-
* @event {HelixCanvasViewEvent} helix-canvas-view -
|
|
85
|
-
* @event {HelixCanvasZoomEvent} helix-canvas-zoom - The board zoomed
|
|
86
|
-
* @event {HelixConnectEvent} helix-connect -
|
|
87
|
-
* @event {HelixMoveEvent} helix-move - Cards moved and the move is finished: a drag
|
|
79
|
+
* @event {HelixBeforeMoveEvent} helix-before-move - Cards are about to move. Cancelable: cancel it to keep the positions in your own state.
|
|
80
|
+
* @event {HelixBeforeReconnectEvent} helix-before-reconnect - A connection's end is about to move to another card or side. Cancelable: cancel it to keep connections in your own state.
|
|
81
|
+
* @event {HelixBeforeRelabelEvent} helix-before-relabel - A connection's label or a group's name is about to change. Cancelable: cancel it to keep labels in your own state.
|
|
82
|
+
* @event {HelixCanvasEditEvent} helix-canvas-edit - A card was double-clicked, or Enter or F2 was pressed on it. Open your own editor for the card.
|
|
83
|
+
* @event {HelixCanvasPanEvent} helix-canvas-pan - The board moved one step, from its controls or the arrow keys. A drag sends `helix-canvas-view`.
|
|
84
|
+
* @event {HelixCanvasViewEvent} helix-canvas-view - The board's view changed, by any means. The detail is the new view.
|
|
85
|
+
* @event {HelixCanvasZoomEvent} helix-canvas-zoom - The board zoomed one step, from its controls or the keys. A wheel or a pinch sends `helix-canvas-view`.
|
|
86
|
+
* @event {HelixConnectEvent} helix-connect - Two cards were chosen to be joined. Add a `helix-canvas-edge` to join them.
|
|
87
|
+
* @event {HelixMoveEvent} helix-move - Cards moved and the move is finished: a drag was released, a click put a card down, or a key was pressed.
|
|
88
88
|
* @event {HelixReconnectEvent} helix-reconnect - A connection's end moved, and the move is finished.
|
|
89
89
|
* @event {HelixRelabelEvent} helix-relabel - A connection's label or a group's name changed.
|
|
90
|
-
* @event {HelixRemoveEvent} helix-remove -
|
|
91
|
-
* @event {HelixSelectEvent} helix-select - The selection changed. The detail's `value` is the names, comma separated, empty for none. Cancelable:
|
|
90
|
+
* @event {HelixRemoveEvent} helix-remove - Cards or connections were chosen for removal. Remove the elements it names.
|
|
91
|
+
* @event {HelixSelectEvent} helix-select - The selection changed. The detail's `value` is the names, comma separated, empty for none. Cancelable: canceling it keeps the selection as it was.
|
|
92
92
|
*
|
|
93
|
-
* @csspart arrow - The
|
|
94
|
-
* @csspart board - The plane the cards are placed on, which
|
|
93
|
+
* @csspart arrow - The arrowhead at an end of a connection that has one.
|
|
94
|
+
* @csspart board - The plane the cards are placed on, which pans and zooms.
|
|
95
95
|
* @csspart controls - The group the pan and zoom buttons sit in.
|
|
96
|
-
* @csspart draft - The connection being drawn, before
|
|
96
|
+
* @csspart draft - The connection being drawn, before `helix-connect` is sent.
|
|
97
97
|
* @csspart edge - One connector between two cards.
|
|
98
|
-
* @csspart edge-end - An end of a selected connection
|
|
99
|
-
* @csspart edge-target -
|
|
98
|
+
* @csspart edge-end - An end of a selected connection. Drag it, or click it to pick it up.
|
|
99
|
+
* @csspart edge-target - A wider, invisible line over a connection, which receives focus and presses.
|
|
100
100
|
* @csspart edges - The layer the connectors are drawn in.
|
|
101
101
|
* @csspart footer - The strip below the board.
|
|
102
|
-
* @csspart fullscreen - The button that
|
|
102
|
+
* @csspart fullscreen - The button that makes the board fill the screen.
|
|
103
103
|
* @csspart header - The strip above the board.
|
|
104
104
|
* @csspart label - The label on a connector.
|
|
105
|
-
* @csspart label-editor - The field a connection's label or a group's name
|
|
106
|
-
* @csspart live -
|
|
105
|
+
* @csspart label-editor - The field for editing a connection's label or a group's name, placed over that text.
|
|
106
|
+
* @csspart live - A live region that screen readers announce while a connection is being made.
|
|
107
107
|
* @csspart marquee - The box a Shift-drag across the empty board draws, which selects the cards it touches.
|
|
108
108
|
* @csspart pan-down - The button that moves the board down.
|
|
109
|
-
* @csspart pan-end - The button that moves the board the
|
|
110
|
-
* @csspart pan-start - The button that moves the board the
|
|
109
|
+
* @csspart pan-end - The button that moves the board toward the end of a line of text: right in English.
|
|
110
|
+
* @csspart pan-start - The button that moves the board toward the start of a line of text: left in English.
|
|
111
111
|
* @csspart pan-up - The button that moves the board up.
|
|
112
112
|
* @csspart region - The named region the board is drawn in.
|
|
113
113
|
* @csspart viewport - The box the board is drawn inside.
|
|
114
114
|
* @csspart zoom-in - The button that zooms in.
|
|
115
115
|
* @csspart zoom-out - The button that zooms out.
|
|
116
116
|
*
|
|
117
|
-
* @cssstate connecting - While
|
|
118
|
-
* @cssstate direct -
|
|
117
|
+
* @cssstate connecting - While you draw a connection.
|
|
118
|
+
* @cssstate direct - The board moves without easing, while you drag it or while it settles into its box.
|
|
119
119
|
* @cssstate empty - While the document has no nodes.
|
|
120
120
|
* @cssstate fullscreen - While the board fills the screen.
|
|
121
|
-
* @cssstate holding -
|
|
122
|
-
* @cssstate idle -
|
|
121
|
+
* @cssstate holding - An item picked up with a click follows the pointer until the next press puts it down.
|
|
122
|
+
* @cssstate idle - The user has been still long enough for the controls to hide.
|
|
123
123
|
* @cssstate pressing - While a press on the board, its cards or its connections is under way.
|
|
124
124
|
*/
|
|
125
125
|
export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
126
|
-
/**
|
|
126
|
+
/** The text read with a card to say where its connections come from, with `{cards}`. */
|
|
127
127
|
comesFromLabel: string;
|
|
128
|
-
/**
|
|
128
|
+
/** The text announced when a connection is requested, with `{from}` and `{to}`. */
|
|
129
129
|
connectedLabel: string;
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
132
|
-
* filled in.
|
|
131
|
+
* The text announced when a connection is started, with `{from}` filled in.
|
|
133
132
|
*
|
|
134
133
|
* **Every sentence this board speaks is a property**, the rule the pan
|
|
135
134
|
* controls already kept with `pan-up-label` and its three: a board on a page in another
|
|
@@ -137,33 +136,35 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
137
136
|
*/
|
|
138
137
|
connectingLabel: string;
|
|
139
138
|
/**
|
|
140
|
-
*
|
|
139
|
+
* The accessible name of a connection, with `{from}` and `{to}`.
|
|
141
140
|
*
|
|
142
141
|
* Its own label, where it has one, is its description rather than part of
|
|
143
142
|
* this, so a reader hears the ends first and what the line says after.
|
|
144
143
|
*/
|
|
145
144
|
connectionLabel: string;
|
|
146
145
|
/**
|
|
147
|
-
*
|
|
146
|
+
* The accessible name for the board. Required.
|
|
148
147
|
*
|
|
149
148
|
* A document has no name of its own in the format, and "Canvas" names the
|
|
150
149
|
* widget rather than the thinking on it.
|
|
151
150
|
*/
|
|
152
151
|
label: string;
|
|
153
152
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
153
|
+
* The accessible name of the field for editing a label, with `{name}` for what
|
|
154
|
+
* the label belongs to.
|
|
156
155
|
*/
|
|
157
156
|
labelEditorLabel: string;
|
|
158
157
|
/**
|
|
159
|
-
*
|
|
158
|
+
* The text read with a card to say where its connections go, with `{cards}`
|
|
159
|
+
* as the list.
|
|
160
160
|
*
|
|
161
161
|
* The list is joined the way the page's language joins one, "Second and
|
|
162
162
|
* Third", rather than with a comma this component chose.
|
|
163
163
|
*/
|
|
164
164
|
leadsToLabel: string;
|
|
165
165
|
/**
|
|
166
|
-
* The order
|
|
166
|
+
* The order the arrow keys and screen readers move through the cards:
|
|
167
|
+
* `spatial` or `edges`.
|
|
167
168
|
*
|
|
168
169
|
* `spatial` bands them into rows and reads each row across, which is how a
|
|
169
170
|
* person reads a board laid out on a grid and is a heuristic a loose board
|
|
@@ -175,8 +176,8 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
175
176
|
*/
|
|
176
177
|
order?: 'spatial' | 'edges';
|
|
177
178
|
/**
|
|
178
|
-
*
|
|
179
|
-
* for right angles.
|
|
179
|
+
* The route every connection takes when it sets no `path` of its own:
|
|
180
|
+
* `straight`, or `step` for right angles.
|
|
180
181
|
*
|
|
181
182
|
* Absent is a curve. A flowchart wants `step` on all of its edges, and
|
|
182
183
|
* writing it once here rather than on each is the reason this exists; an
|
|
@@ -184,7 +185,7 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
184
185
|
*/
|
|
185
186
|
path?: 'straight' | 'step';
|
|
186
187
|
/**
|
|
187
|
-
*
|
|
188
|
+
* Prevents every card from being moved, connected, or removed.
|
|
188
189
|
*
|
|
189
190
|
* **The attribute is `readonly`, which is the platform's spelling**, and the
|
|
190
191
|
* reverse of an `editable` switch on purpose: a form control takes input
|
|
@@ -194,13 +195,13 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
194
195
|
*/
|
|
195
196
|
readOnly: boolean;
|
|
196
197
|
/**
|
|
197
|
-
*
|
|
198
|
-
* `{
|
|
198
|
+
* The text announced when a connection's end is picked up, with `{from}` and
|
|
199
|
+
* `{to}`.
|
|
199
200
|
*/
|
|
200
201
|
reconnectingLabel: string;
|
|
201
202
|
/**
|
|
202
|
-
* The
|
|
203
|
-
*
|
|
203
|
+
* The names of the selected cards and connections, comma separated. Empty
|
|
204
|
+
* when nothing is selected.
|
|
204
205
|
*
|
|
205
206
|
* **Comma separated, the way `Listbox` writes a multiple value**, so a page
|
|
206
207
|
* reads one selection the same way wherever it comes from. A click, or a key
|
|
@@ -224,7 +225,7 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
224
225
|
* A label being edited in place: whose, and what it said before.
|
|
225
226
|
*/
|
|
226
227
|
private editing;
|
|
227
|
-
/**
|
|
228
|
+
/** The text announced when a connection is stopped before it is requested. */
|
|
228
229
|
stoppedLabel: string;
|
|
229
230
|
/** The card or connection that holds the board's one tab stop, by its key. */
|
|
230
231
|
private stop;
|
|
@@ -770,7 +771,7 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
770
771
|
*/
|
|
771
772
|
private get free();
|
|
772
773
|
/**
|
|
773
|
-
*
|
|
774
|
+
* The board's current view: the document's point at the middle of the view,
|
|
774
775
|
* and the zoom.
|
|
775
776
|
*
|
|
776
777
|
* **Read to save a view and written to restore one**, which a consumer keeping
|
|
@@ -794,7 +795,7 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
794
795
|
*/
|
|
795
796
|
toJsonCanvas(): CanvasDocument;
|
|
796
797
|
/**
|
|
797
|
-
* Fits the whole board into
|
|
798
|
+
* Fits the whole board into its box, centered, and never zoomed in past its
|
|
798
799
|
* own size.
|
|
799
800
|
*
|
|
800
801
|
* **Automatic while nobody has touched the board, and public for when they
|
|
@@ -4,19 +4,17 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
4
4
|
* @summary Groups related content and actions into a single surface.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* own markup, so a title can be a real `<h2>` rather than an emulated one.
|
|
7
|
+
* The header, body, and footer regions are slots, because they have no state,
|
|
8
|
+
* behavior, or API of their own. You bring your own markup, so a title can be a
|
|
9
|
+
* real `<h2>`.
|
|
11
10
|
*
|
|
12
|
-
* The host is the surface.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* through `::part`. One node instead of two, on every card on the page.
|
|
11
|
+
* The host is the surface. The element itself takes the border, the radius, and
|
|
12
|
+
* the grid, so you style `Card` directly and there is no wrapper part to reach
|
|
13
|
+
* through with `::part`.
|
|
16
14
|
*
|
|
17
|
-
* Name the card with `aria-label` or `aria-labelledby`.
|
|
18
|
-
*
|
|
19
|
-
* needs a DOM, and the server has none.
|
|
15
|
+
* Name the card with `aria-label` or `aria-labelledby`. These are the only
|
|
16
|
+
* names that work with server rendering, because reading a title from the light
|
|
17
|
+
* DOM needs a DOM, and the server has none.
|
|
20
18
|
*
|
|
21
19
|
* @since 0.1.0
|
|
22
20
|
* @status stable
|
|
@@ -31,7 +29,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
31
29
|
*/
|
|
32
30
|
export declare class HelixHeadlessCard extends HelixElement {
|
|
33
31
|
/**
|
|
34
|
-
*
|
|
32
|
+
* Places the media after the content. By default it comes before.
|
|
35
33
|
*
|
|
36
34
|
* **A figure that concludes a card is the same region as one that opens it**,
|
|
37
35
|
* and the only thing that differs is which edge it is flush against. Media is
|