@fusion.dev/helix-headless 0.147.0 → 0.149.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 +11222 -2332
- package/dist/accordion/item/accordion-item.d.ts +5 -2
- package/dist/accordion/item/accordion-item.js +11 -7
- package/dist/accordion/root/accordion-root.js +4 -6
- package/dist/announcement/root/announcement-root.d.ts +61 -5
- package/dist/announcement/root/announcement-root.js +126 -20
- package/dist/area-chart/root/area-chart-root.d.ts +11 -0
- package/dist/area-chart/root/area-chart-root.js +21 -9
- package/dist/avatar/group/avatar-group.d.ts +10 -2
- package/dist/avatar/group/avatar-group.js +10 -5
- package/dist/badge/count.d.ts +19 -0
- package/dist/badge/count.js +20 -0
- package/dist/badge/root/badge-root.d.ts +6 -2
- package/dist/badge/root/badge-root.js +8 -22
- package/dist/bar-chart/root/bar-chart-root.d.ts +13 -1
- package/dist/bar-chart/root/bar-chart-root.js +17 -4
- package/dist/blockquote/root/blockquote-root.d.ts +66 -8
- package/dist/blockquote/root/blockquote-root.js +85 -8
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +2 -2
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +8 -1
- package/dist/breadcrumbs/root/breadcrumbs-root.js +5 -2
- package/dist/button/root/button-root.d.ts +10 -1
- package/dist/button/root/button-root.js +3 -2
- package/dist/button-group/arrows.d.ts +14 -0
- package/dist/button-group/arrows.js +10 -0
- package/dist/button-group/root/button-group-root.d.ts +144 -3
- package/dist/button-group/root/button-group-root.js +142 -2
- package/dist/callout/root/callout-root.d.ts +16 -2
- package/dist/callout/root/callout-root.js +16 -4
- package/dist/canvas/describe.d.ts +10 -0
- package/dist/canvas/describe.js +9 -0
- package/dist/canvas/edge-pan.d.ts +61 -0
- package/dist/canvas/edge-pan.js +63 -0
- package/dist/canvas/neighbor.d.ts +17 -0
- package/dist/canvas/neighbor.js +1 -0
- package/dist/canvas/node/canvas-node.d.ts +12 -2
- package/dist/canvas/node/canvas-node.js +8 -3
- package/dist/canvas/root/canvas-document.d.ts +10 -0
- package/dist/canvas/root/canvas-document.js +1 -0
- package/dist/canvas/root/canvas-root.d.ts +168 -9
- package/dist/canvas/root/canvas-root.js +239 -69
- package/dist/canvas/snap.d.ts +42 -0
- package/dist/canvas/snap.js +32 -0
- package/dist/carousel/root/carousel-root.d.ts +9 -3
- package/dist/carousel/root/carousel-root.js +17 -10
- package/dist/chat/composer/chat-composer.d.ts +5 -0
- package/dist/chat/composer/chat-composer.js +4 -1
- package/dist/chat/message/chat-message.d.ts +9 -5
- package/dist/chat/message/chat-message.js +8 -4
- package/dist/chat/naming.js +2 -2
- package/dist/chat/root/chat-root.d.ts +40 -4
- package/dist/chat/root/chat-root.js +38 -14
- package/dist/checkbox/root/checkbox-root.d.ts +11 -0
- package/dist/checkbox/root/checkbox-root.js +8 -2
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +24 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +28 -12
- package/dist/checkbox-group/select-all.d.ts +11 -0
- package/dist/checkbox-group/select-all.js +5 -0
- package/dist/code-block/root/code-block-root.d.ts +20 -8
- package/dist/code-block/root/code-block-root.js +16 -5
- package/dist/color-input/root/color-input-root.d.ts +13 -0
- package/dist/color-input/root/color-input-root.js +18 -5
- package/dist/color-picker/root/color-picker-root.d.ts +19 -3
- package/dist/color-picker/root/color-picker-root.js +52 -24
- package/dist/color-picker/wheel.d.ts +11 -0
- package/dist/color-picker/wheel.js +9 -0
- package/dist/combobox/root/combobox-root.d.ts +106 -18
- package/dist/combobox/root/combobox-root.js +101 -26
- package/dist/command/root/command-root.d.ts +19 -9
- package/dist/command/root/command-root.js +9 -4
- package/dist/copy-button/root/copy-button-root.d.ts +5 -0
- package/dist/copy-button/root/copy-button-root.js +7 -2
- package/dist/data-table/root/data-table-root.d.ts +171 -29
- package/dist/data-table/root/data-table-root.js +284 -161
- package/dist/date-input/root/date-input-root.d.ts +32 -9
- package/dist/date-input/root/date-input-root.js +66 -44
- package/dist/date-picker/root/date-picker-root.d.ts +38 -15
- package/dist/date-picker/root/date-picker-root.js +52 -33
- package/dist/description-list/item/description-list-item.d.ts +4 -0
- package/dist/description-list/item/description-list-item.js +7 -1
- package/dist/dialog/root/dialog-root.d.ts +12 -1
- package/dist/dialog/root/dialog-root.js +11 -4
- package/dist/divider/root/divider-root.d.ts +45 -16
- package/dist/divider/root/divider-root.js +28 -4
- package/dist/donut-chart/root/donut-chart-root.d.ts +5 -0
- package/dist/donut-chart/root/donut-chart-root.js +8 -5
- package/dist/drawer/root/drawer-root.d.ts +12 -1
- package/dist/drawer/root/drawer-root.js +9 -2
- package/dist/drilldown/item/drilldown-item.js +3 -4
- package/dist/drilldown/root/drilldown-root.d.ts +5 -0
- package/dist/drilldown/root/drilldown-root.js +4 -1
- package/dist/element-events.generated.js +26 -3
- package/dist/empty/root/empty-root.d.ts +17 -3
- package/dist/empty/root/empty-root.js +29 -5
- package/dist/file-input/root/file-input-root.d.ts +18 -3
- package/dist/file-input/root/file-input-root.js +34 -18
- package/dist/file-input/status.js +2 -1
- package/dist/filter-input/chip/filter-chip.d.ts +13 -0
- package/dist/filter-input/chip/filter-chip.js +7 -3
- package/dist/filter-input/menu/filter-menu.d.ts +5 -0
- package/dist/filter-input/menu/filter-menu.js +3 -1
- package/dist/filter-input/root/filter-input-root.d.ts +20 -3
- package/dist/filter-input/root/filter-input-root.js +8 -4
- package/dist/format-date/fields.d.ts +20 -0
- package/dist/format-date/fields.js +14 -0
- package/dist/format-date/options.d.ts +2 -1
- package/dist/format-date/options.js +9 -38
- package/dist/format-date/root/format-date-root.d.ts +55 -5
- package/dist/format-date/root/format-date-root.js +29 -34
- package/dist/graph/root/graph-model.d.ts +11 -0
- package/dist/graph/root/graph-model.js +4 -0
- package/dist/graph/root/graph-root.d.ts +101 -14
- package/dist/graph/root/graph-root.js +140 -46
- package/dist/heatmap/root/heatmap-root.d.ts +37 -4
- package/dist/heatmap/root/heatmap-root.js +51 -16
- package/dist/icon-button/root/icon-button-root.d.ts +5 -0
- package/dist/icon-button/root/icon-button-root.js +1 -0
- package/dist/image/root/image-root.d.ts +11 -0
- package/dist/input/root/input-root.d.ts +5 -0
- package/dist/input/root/input-root.js +4 -1
- package/dist/kbd/root/kbd-root.js +1 -2
- package/dist/legend/root/legend-root.js +4 -17
- package/dist/lightbox/root/lightbox-root.d.ts +14 -4
- package/dist/lightbox/root/lightbox-root.js +25 -7
- package/dist/line-chart/root/line-chart-root.d.ts +5 -0
- package/dist/line-chart/root/line-chart-root.js +4 -2
- package/dist/list/item/list-item.d.ts +32 -0
- package/dist/list/item/list-item.js +34 -7
- package/dist/list/root/list-root.d.ts +87 -0
- package/dist/list/root/list-root.js +119 -23
- package/dist/listbox/reorder/index.d.ts +1 -0
- package/dist/listbox/reorder/index.js +4 -0
- package/dist/listbox/reorder/listbox-reorder.d.ts +83 -0
- package/dist/listbox/reorder/listbox-reorder.js +151 -0
- package/dist/listbox/root/listbox-root.d.ts +185 -33
- package/dist/listbox/root/listbox-root.js +166 -136
- package/dist/loader/root/loader-root.d.ts +5 -0
- package/dist/loader/root/loader-root.js +3 -1
- package/dist/map/area/map-area.d.ts +5 -0
- package/dist/map/area/map-area.js +3 -1
- package/dist/map/buildings/map-buildings.d.ts +5 -0
- package/dist/map/buildings/map-buildings.js +3 -1
- package/dist/map/contours/map-contours.d.ts +5 -0
- package/dist/map/contours/map-contours.js +3 -1
- package/dist/map/landcover/map-landcover.d.ts +5 -0
- package/dist/map/landcover/map-landcover.js +3 -1
- package/dist/map/marker/map-marker.d.ts +18 -2
- package/dist/map/marker/map-marker.js +13 -5
- package/dist/map/points/map-points.d.ts +5 -0
- package/dist/map/points/map-points.js +6 -4
- package/dist/map/position/map-position.d.ts +5 -0
- package/dist/map/position/map-position.js +3 -1
- package/dist/map/raster/map-raster.d.ts +5 -0
- package/dist/map/raster/map-raster.js +3 -1
- package/dist/map/root/map-root.d.ts +73 -16
- package/dist/map/root/map-root.js +122 -44
- package/dist/map/route/map-route.d.ts +5 -0
- package/dist/map/route/map-route.js +3 -1
- package/dist/map/terrain/map-terrain.d.ts +5 -0
- package/dist/map/terrain/map-terrain.js +3 -1
- package/dist/megamenu/root/megamenu-root.js +4 -11
- package/dist/menu/root/menu-root.d.ts +7 -2
- package/dist/menu/root/menu-root.js +3 -1
- package/dist/meter/root/meter-root.d.ts +16 -3
- package/dist/meter/root/meter-root.js +12 -5
- package/dist/navigation/root/navigation-root.d.ts +5 -0
- package/dist/navigation/root/navigation-root.js +7 -8
- package/dist/notifications/group/notification-group.d.ts +8 -1
- package/dist/notifications/group/notification-group.js +12 -6
- package/dist/notifications/notification/notification.d.ts +17 -1
- package/dist/notifications/notification/notification.js +6 -2
- package/dist/notifications/root/notifications-root.d.ts +49 -5
- package/dist/notifications/root/notifications-root.js +36 -8
- package/dist/number-input/root/number-input-root.d.ts +21 -8
- package/dist/number-input/root/number-input-root.js +26 -11
- package/dist/object-inspector/root/object-inspector-root.d.ts +56 -13
- package/dist/object-inspector/root/object-inspector-root.js +41 -30
- package/dist/outline/root/outline-root.d.ts +5 -0
- package/dist/outline/root/outline-root.js +3 -1
- package/dist/pagination/root/pagination-root.d.ts +7 -1
- package/dist/pagination/root/pagination-root.js +16 -7
- package/dist/pagination/size/pagination-size.d.ts +8 -3
- package/dist/pagination/size/pagination-size.js +5 -3
- package/dist/pagination/summary/pagination-summary.d.ts +8 -6
- package/dist/pagination/summary/pagination-summary.js +4 -9
- package/dist/pin-input/code.d.ts +23 -0
- package/dist/pin-input/code.js +21 -0
- package/dist/pin-input/root/pin-input-root.d.ts +9 -3
- package/dist/pin-input/root/pin-input-root.js +13 -23
- package/dist/popover/root/popover-root.d.ts +12 -2
- package/dist/popover/root/popover-root.js +10 -4
- package/dist/progress/root/progress-root.d.ts +7 -2
- package/dist/progress/root/progress-root.js +5 -2
- package/dist/qr-code/name.d.ts +3 -2
- package/dist/qr-code/name.js +2 -2
- package/dist/qr-code/root/qr-code-root.d.ts +26 -5
- package/dist/qr-code/root/qr-code-root.js +27 -6
- package/dist/radio/group/radio-group.d.ts +11 -0
- package/dist/radio/group/radio-group.js +8 -2
- package/dist/rating/root/rating-root.d.ts +12 -1
- package/dist/rating/root/rating-root.js +10 -3
- package/dist/scatter-chart/measures.d.ts +22 -0
- package/dist/scatter-chart/measures.js +11 -0
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +22 -8
- package/dist/scatter-chart/root/scatter-chart-root.js +25 -23
- package/dist/select/root/select-root.d.ts +67 -8
- package/dist/select/root/select-root.js +45 -11
- package/dist/skip-link/root/skip-link-root.d.ts +5 -0
- package/dist/skip-link/root/skip-link-root.js +3 -1
- package/dist/slider/root/slider-root.d.ts +7 -2
- package/dist/slider/root/slider-root.js +11 -5
- package/dist/sparkline/readings.d.ts +15 -5
- package/dist/sparkline/readings.js +3 -3
- package/dist/sparkline/root/sparkline-root.d.ts +9 -4
- package/dist/sparkline/root/sparkline-root.js +9 -3
- package/dist/speed-dial/group/speed-dial-group.d.ts +48 -0
- package/dist/speed-dial/group/speed-dial-group.js +43 -0
- package/dist/speed-dial/index.d.ts +1 -0
- package/dist/speed-dial/index.js +1 -0
- package/dist/speed-dial/item/speed-dial-item.d.ts +26 -1
- package/dist/speed-dial/item/speed-dial-item.js +41 -3
- package/dist/speed-dial/long-press.d.ts +50 -0
- package/dist/speed-dial/long-press.js +48 -0
- package/dist/speed-dial/root/speed-dial-root.d.ts +85 -1
- package/dist/speed-dial/root/speed-dial-root.js +117 -5
- package/dist/splitter/root/splitter-root.d.ts +12 -3
- package/dist/splitter/root/splitter-root.js +22 -4
- package/dist/steps/root/steps-root.d.ts +9 -2
- package/dist/steps/root/steps-root.js +6 -3
- package/dist/steps/step/step.d.ts +12 -0
- package/dist/steps/step/step.js +11 -2
- package/dist/switch/root/switch-root.d.ts +11 -0
- package/dist/switch/root/switch-root.js +8 -2
- package/dist/table/cell/table-cell.d.ts +8 -1
- package/dist/table/cell/table-cell.js +6 -2
- package/dist/table/column/table-column.d.ts +11 -4
- package/dist/table/column/table-column.js +15 -10
- package/dist/table/grid-controller.d.ts +122 -0
- package/dist/table/grid-controller.js +299 -0
- package/dist/table/root/table-root.d.ts +154 -8
- package/dist/table/root/table-root.js +197 -38
- package/dist/table/row/table-row.d.ts +55 -1
- package/dist/table/row/table-row.js +60 -7
- package/dist/tabs/root/tabs-root.d.ts +5 -0
- package/dist/tabs/root/tabs-root.js +3 -1
- package/dist/tag/group/tag-group.d.ts +5 -0
- package/dist/tag/group/tag-group.js +8 -15
- package/dist/tag/root/tag-root.d.ts +14 -1
- package/dist/tag/root/tag-root.js +11 -8
- package/dist/textarea/root/textarea-root.d.ts +5 -0
- package/dist/textarea/root/textarea-root.js +3 -1
- package/dist/time-input/root/time-input-root.d.ts +14 -7
- package/dist/time-input/root/time-input-root.js +43 -32
- package/dist/time-picker/root/time-picker-root.d.ts +16 -7
- package/dist/time-picker/root/time-picker-root.js +28 -12
- package/dist/toast/item/toast-item.d.ts +13 -3
- package/dist/toast/item/toast-item.js +2 -0
- package/dist/toast/root/toast-root.d.ts +22 -2
- package/dist/toast/root/toast-root.js +24 -17
- package/dist/toggle/group/toggle-group.js +3 -5
- package/dist/toolbar/root/toolbar-root.d.ts +36 -0
- package/dist/toolbar/root/toolbar-root.js +43 -9
- package/dist/tooltip/root/tooltip-root.d.ts +27 -17
- package/dist/tooltip/root/tooltip-root.js +1 -2
- package/dist/tour/root/tour-root.d.ts +8 -2
- package/dist/tour/root/tour-root.js +4 -2
- package/dist/tour/stop/tour-stop.d.ts +5 -0
- package/dist/tour/stop/tour-stop.js +6 -1
- package/dist/tree/grip.d.ts +5 -0
- package/dist/tree/grip.js +1 -0
- package/dist/tree/item/tree-item.d.ts +24 -0
- package/dist/tree/item/tree-item.js +27 -5
- package/dist/tree/root/tree-root.d.ts +66 -1
- package/dist/tree/root/tree-root.js +77 -5
- package/dist/trend/root/trend-root.d.ts +20 -4
- package/dist/trend/root/trend-root.js +20 -5
- package/dist/video/root/video-root.d.ts +23 -3
- package/dist/video/root/video-root.js +56 -15
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -0
- package/dist/video-playlist/menu/video-playlist-menu.js +3 -1
- package/dist/video-playlist/root/video-playlist-root.d.ts +5 -0
- package/dist/video-playlist/root/video-playlist-root.js +3 -1
- package/dist/virtual-list/root/virtual-list-root.d.ts +19 -3
- package/dist/virtual-list/root/virtual-list-root.js +10 -19
- package/lint.json +1 -1
- package/package.json +7 -6
- package/types/jsx.d.ts +6005 -2114
- package/types/svelte.d.ts +1 -0
- package/types/vue.d.ts +1594 -676
- package/types/words.d.ts +3280 -0
- package/dist/kbd/keys.d.ts +0 -29
- package/dist/kbd/keys.js +0 -52
- package/dist/toast/hotkey.d.ts +0 -22
- package/dist/toast/hotkey.js +0 -23
- package/dist/tooltip/focus-target.d.ts +0 -6
- package/dist/tooltip/focus-target.js +0 -9
|
@@ -127,6 +127,16 @@ export declare const ends: (edge: CanvasEdge, from: CanvasNode, to: CanvasNode)
|
|
|
127
127
|
fromSide: CanvasSide;
|
|
128
128
|
toSide: CanvasSide;
|
|
129
129
|
};
|
|
130
|
+
/**
|
|
131
|
+
* How far a point is from a card's box, in the document's units: nothing
|
|
132
|
+
* inside it, and the shortest way to its edge outside.
|
|
133
|
+
*/
|
|
134
|
+
export declare const distanceTo: (node: {
|
|
135
|
+
x: number;
|
|
136
|
+
y: number;
|
|
137
|
+
width: number;
|
|
138
|
+
height: number;
|
|
139
|
+
}, point: Point) => number;
|
|
130
140
|
/**
|
|
131
141
|
* The side of a card nearest a point, which is where a connection a reader is
|
|
132
142
|
* holding arrives.
|
|
@@ -175,6 +175,7 @@ export const ends = (edge, from, to) => {
|
|
|
175
175
|
const toSide = edge.toSide ?? fallbackTo;
|
|
176
176
|
return { end: port(to, toSide), fromSide, start: port(from, fromSide), toSide };
|
|
177
177
|
};
|
|
178
|
+
export const distanceTo = (node, point) => Math.hypot(Math.max(node.x - point.x, 0, point.x - (node.x + node.width)), Math.max(node.y - point.y, 0, point.y - (node.y + node.height)));
|
|
178
179
|
export const sideNear = (node, point) => ['top', 'right', 'bottom', 'left']
|
|
179
180
|
.map((side) => {
|
|
180
181
|
const at = port(node, side);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CanvasView, HelixElement, type
|
|
1
|
+
import { type CanvasView, HelixElement, type ViewportPanDetail, type ViewportWay, type ViewportZoomDetail } from '@fusion.dev/helix-core';
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
import { type CanvasDocument, type CanvasTone } from './canvas-document.js';
|
|
4
4
|
export type { CanvasDocument, CanvasEdge, CanvasEdgeProps, CanvasEnd, CanvasNode, CanvasNodeProps, CanvasPath, CanvasSide, CanvasTone, } from './canvas-document.js';
|
|
@@ -34,20 +34,34 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
|
|
|
34
34
|
* keep every card in place, such as on a published board. Set `readonly` on one
|
|
35
35
|
* card or connection to keep only that one in place.
|
|
36
36
|
*
|
|
37
|
+
* Set `snap` to a length in the document's units, such as `32`, and a card
|
|
38
|
+
* that is moved or resized lands on a multiple of it. Carrying a card, a
|
|
39
|
+
* corner, a connection, or the selection box near the edge of the board moves
|
|
40
|
+
* the board under it, so a card can be taken to a place off screen in one
|
|
41
|
+
* drag. A connection let go within 20 pixels of a card arrives at it. A
|
|
42
|
+
* double click on the empty board zooms in about that point, and Shift with a
|
|
43
|
+
* double click zooms out.
|
|
44
|
+
*
|
|
37
45
|
* Keyboard behavior:
|
|
38
46
|
* - One card holds the board's tab stop.
|
|
39
47
|
* - The arrow keys move through the cards in reading order. The card you land
|
|
40
48
|
* on scrolls into view, and its connections are announced with it.
|
|
41
|
-
* - Shift with an arrow key moves the card
|
|
49
|
+
* - Shift with an arrow key moves the card: by 16 units, or to the next
|
|
50
|
+
* multiple of `snap` where it is set. Alt with an arrow key resizes it from
|
|
51
|
+
* its bottom right corner the same way.
|
|
42
52
|
* - The connections leaving a card are stops of their own, straight after it.
|
|
43
53
|
* Enter on one moves to the card it arrives at.
|
|
54
|
+
* - What a key changes that a reader cannot see is said: where a card moved
|
|
55
|
+
* to, its new size, how many cards are selected, and the zoom. A selected
|
|
56
|
+
* card or connection says so when a reader arrives on it.
|
|
44
57
|
*
|
|
45
58
|
* Every drag also works with clicks, as WCAG 2.5.7 requires for a pointer that
|
|
46
59
|
* cannot hold a button down. Click a selected card's move handle, a corner, a
|
|
47
60
|
* card's connection point, or the end of a selected connection to pick it up.
|
|
48
61
|
* It follows the pointer with no button held, and the next click puts it down
|
|
49
62
|
* 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.
|
|
63
|
+
* or a press outside the board, puts it back. So a finger connects two cards
|
|
64
|
+
* with three taps: the card, one of its points, and the card to connect to.
|
|
51
65
|
*
|
|
52
66
|
* Connecting and removing dispatch requests, and your code applies them:
|
|
53
67
|
* - Drawing from a card's handle to another card, or pressing C on one card and
|
|
@@ -55,6 +69,11 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
|
|
|
55
69
|
* - Delete on a card or a connection dispatches `helix-remove`. The event names
|
|
56
70
|
* every connection that removing the card would leave without an end.
|
|
57
71
|
*
|
|
72
|
+
* Once your page removes what Delete asked for, focus moves to the next stop,
|
|
73
|
+
* to the one before where it was the last, and to the board where none is
|
|
74
|
+
* left. A focused card your page removes for its own reasons hands focus on
|
|
75
|
+
* the same way, unless the reader has already moved focus somewhere else.
|
|
76
|
+
*
|
|
58
77
|
* The board applies a move itself, because the card already exists. A
|
|
59
78
|
* connection is a new element, and React discards an element the board adds to
|
|
60
79
|
* its markup on the next render, so you write the connection.
|
|
@@ -75,7 +94,14 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
|
|
|
75
94
|
* @slot - The board's `helix-canvas-node` and `helix-canvas-edge` elements, drawn on the plane.
|
|
76
95
|
* @slot empty - Content shown when the document has no nodes.
|
|
77
96
|
* @slot footer - Content below the board.
|
|
97
|
+
* @slot fullscreen-icon - Replaces the glyph inside the fullscreen button.
|
|
78
98
|
* @slot header - Content above the board.
|
|
99
|
+
* @slot pan-down-icon - Replaces the glyph inside the pan down button.
|
|
100
|
+
* @slot pan-end-icon - Replaces the glyph inside the button that pans toward the end of a line of text.
|
|
101
|
+
* @slot pan-start-icon - Replaces the glyph inside the button that pans toward the start of a line of text.
|
|
102
|
+
* @slot pan-up-icon - Replaces the glyph inside the pan up button.
|
|
103
|
+
* @slot zoom-in-icon - Replaces the glyph inside the zoom-in button.
|
|
104
|
+
* @slot zoom-out-icon - Replaces the glyph inside the zoom-out button.
|
|
79
105
|
*
|
|
80
106
|
* @event {HelixBeforeMoveEvent} helix-before-move - Cards are about to move. Cancelable: cancel it to keep the positions in your own state.
|
|
81
107
|
* @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.
|
|
@@ -128,10 +154,20 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
|
|
|
128
154
|
* @cssstate using - A board with `gestures="activate"` has been pressed and has the gestures.
|
|
129
155
|
*/
|
|
130
156
|
export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
157
|
+
/**
|
|
158
|
+
* The key this family's words are registered under, its styled tag:
|
|
159
|
+
* `registerWords('de', { 'helix-canvas': { stoppedLabel: 'Verbinden beendet.' } })`.
|
|
160
|
+
*/
|
|
161
|
+
static words: string;
|
|
131
162
|
/** The connection whose target had focus as an update began, and that target. */
|
|
132
163
|
private focusedEdge;
|
|
133
164
|
/** Each card is assigned to its own slot, in the order the arrows walk them. */
|
|
134
165
|
static shadowRootOptions: ShadowRootInit;
|
|
166
|
+
/**
|
|
167
|
+
* The hint shown when the board, waiting to be pressed with
|
|
168
|
+
* `gestures="activate"`, is scrolled or swiped over.
|
|
169
|
+
*/
|
|
170
|
+
activateHintLabel: string;
|
|
135
171
|
/** The text read with a card to say where its connections come from, with `{cards}`. */
|
|
136
172
|
comesFromLabel: string;
|
|
137
173
|
/** The text announced when a connection is requested, with `{from}` and `{to}`. */
|
|
@@ -151,6 +187,13 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
151
187
|
* this, so a reader hears the ends first and what the line says after.
|
|
152
188
|
*/
|
|
153
189
|
connectionLabel: string;
|
|
190
|
+
/**
|
|
191
|
+
* The name of the group of controls, read by screen readers, which names
|
|
192
|
+
* what the controls drive rather than the mechanism.
|
|
193
|
+
*/
|
|
194
|
+
controlsLabel: string;
|
|
195
|
+
/** The board's name where `label` is empty. */
|
|
196
|
+
fallbackLabel: string;
|
|
154
197
|
/**
|
|
155
198
|
* The accessible name for the board. Required.
|
|
156
199
|
*
|
|
@@ -171,6 +214,20 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
171
214
|
* Third", rather than with a comma this component chose.
|
|
172
215
|
*/
|
|
173
216
|
leadsToLabel: string;
|
|
217
|
+
/**
|
|
218
|
+
* The text read with a card that has connections both ways. `{leadsTo}` is
|
|
219
|
+
* `leads-to-label` and `{comesFrom}` is `comes-from-label`, each filled in.
|
|
220
|
+
*/
|
|
221
|
+
linkedLabel: string;
|
|
222
|
+
/**
|
|
223
|
+
* What screen readers hear after a key moves a card, with `{name}` for the
|
|
224
|
+
* card and `{x}` and `{y}` for where it now is, in the document's units.
|
|
225
|
+
*
|
|
226
|
+
* **A move a reader cannot see has to be said.** Shift with an arrow moved
|
|
227
|
+
* the card and said nothing, so a reader moving one by keys could not tell
|
|
228
|
+
* whether it had moved, or how far.
|
|
229
|
+
*/
|
|
230
|
+
movedLabel: string;
|
|
174
231
|
/**
|
|
175
232
|
* The order the arrow keys and screen readers move through the cards:
|
|
176
233
|
* `spatial` or `edges`.
|
|
@@ -208,6 +265,12 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
208
265
|
* `{to}`.
|
|
209
266
|
*/
|
|
210
267
|
reconnectingLabel: string;
|
|
268
|
+
/**
|
|
269
|
+
* What screen readers hear after a key resizes a card, with `{name}` for the
|
|
270
|
+
* card and `{width}` and `{height}` for its new size, in the document's
|
|
271
|
+
* units.
|
|
272
|
+
*/
|
|
273
|
+
resizedLabel: string;
|
|
211
274
|
/**
|
|
212
275
|
* The names of the selected cards and connections, comma separated. Empty
|
|
213
276
|
* when nothing is selected.
|
|
@@ -230,6 +293,36 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
230
293
|
* Written to select from outside, and read to act on the selection.
|
|
231
294
|
*/
|
|
232
295
|
selected: string;
|
|
296
|
+
/**
|
|
297
|
+
* What a selected card or connection adds to what screen readers hear on
|
|
298
|
+
* it, before its tone and its connections. Empty adds nothing.
|
|
299
|
+
*
|
|
300
|
+
* A card is an article and a connection a button, and neither has a selected
|
|
301
|
+
* state for `aria-selected` to carry, so the state is said in words.
|
|
302
|
+
*/
|
|
303
|
+
selectedLabel: string;
|
|
304
|
+
/**
|
|
305
|
+
* What screen readers hear after the selection grows or shrinks, with
|
|
306
|
+
* `{count}` for how many cards and connections are selected, written in the
|
|
307
|
+
* locale, where a language that needs plural forms writes them: by Space, a
|
|
308
|
+
* click with Shift, Command or Control, Command or Control with A, a box
|
|
309
|
+
* drawn across the board, or Escape.
|
|
310
|
+
*
|
|
311
|
+
* A selection of one made by arriving on a card or clicking it is not said,
|
|
312
|
+
* since the card is.
|
|
313
|
+
*/
|
|
314
|
+
selectionLabel: string;
|
|
315
|
+
/**
|
|
316
|
+
* Snaps the cards a reader moves or resizes to a multiple of this many of the
|
|
317
|
+
* document's units, such as `32` to land on the lines `grid` draws.
|
|
318
|
+
*
|
|
319
|
+
* **A drag lets go on the nearest line and a key goes to the next one.**
|
|
320
|
+
* Shift with an arrow moves a card to the next line that way, rather than
|
|
321
|
+
* by its step of 16, and Alt with an arrow moves its bottom right corner
|
|
322
|
+
* the same way. A group moves with what it carries, so a card inside one
|
|
323
|
+
* keeps its place in it. Absent, cards land where they are let go.
|
|
324
|
+
*/
|
|
325
|
+
snap?: number;
|
|
233
326
|
/**
|
|
234
327
|
* A label being edited in place: whose, and what it said before.
|
|
235
328
|
*/
|
|
@@ -247,6 +340,20 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
247
340
|
* told the same. A tone left out is not read.
|
|
248
341
|
*/
|
|
249
342
|
toneLabels: Partial<Record<CanvasTone, string>>;
|
|
343
|
+
/** The hint shown when one finger swipes over the board with `gestures="cooperative"`. */
|
|
344
|
+
twoFingerHintLabel: string;
|
|
345
|
+
/** The line shown while the board, with `gestures="activate"`, has the gestures. */
|
|
346
|
+
usingLabel: string;
|
|
347
|
+
/**
|
|
348
|
+
* The hint shown when the wheel scrolls past the board with
|
|
349
|
+
* `gestures="cooperative"`. `{key}` is ⌘ on a Mac and Ctrl elsewhere.
|
|
350
|
+
*/
|
|
351
|
+
wheelHintLabel: string;
|
|
352
|
+
/**
|
|
353
|
+
* What screen readers hear after a zoom button or key, with `{zoom}` for the
|
|
354
|
+
* zoom as a percentage, written the way the element's locale writes one.
|
|
355
|
+
*/
|
|
356
|
+
zoomedLabel: string;
|
|
250
357
|
/** The card or connection that holds the board's one tab stop, by its key. */
|
|
251
358
|
private stop;
|
|
252
359
|
/**
|
|
@@ -254,8 +361,18 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
254
361
|
* started it, and where the pointer is, in the document's own units.
|
|
255
362
|
*/
|
|
256
363
|
private linking;
|
|
257
|
-
/**
|
|
364
|
+
/**
|
|
365
|
+
* What the live region says: a connection being made, and what a key did
|
|
366
|
+
* that a reader cannot see, a move, a resize, the selection, the zoom.
|
|
367
|
+
*/
|
|
258
368
|
private said;
|
|
369
|
+
/**
|
|
370
|
+
* Says something in the live region.
|
|
371
|
+
*
|
|
372
|
+
* The same words twice would change nothing in the region and be heard
|
|
373
|
+
* once, so a second "2 selected" differs by a space no reader says.
|
|
374
|
+
*/
|
|
375
|
+
private say;
|
|
259
376
|
/**
|
|
260
377
|
* Where focus goes once something a reader removed has gone.
|
|
261
378
|
*
|
|
@@ -265,6 +382,17 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
265
382
|
* or, for a page that declines, off one that stays.
|
|
266
383
|
*/
|
|
267
384
|
private refocus;
|
|
385
|
+
/**
|
|
386
|
+
* The card focus is on, while it is.
|
|
387
|
+
*
|
|
388
|
+
* **Kept so a card the page takes away hands focus on**, as Delete does: a
|
|
389
|
+
* filter, an undo or another person's edit removed the card a reader was on,
|
|
390
|
+
* and the browser dropped focus to the page's body, putting the reader back
|
|
391
|
+
* at its top with nothing said. Map does the same for its markers.
|
|
392
|
+
*/
|
|
393
|
+
private focusedCard;
|
|
394
|
+
/** The stops in the order the arrows walked them on the last update. */
|
|
395
|
+
private walked;
|
|
268
396
|
/**
|
|
269
397
|
* Where the plane's corner was on the last render, in the document's units.
|
|
270
398
|
*
|
|
@@ -381,9 +509,6 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
381
509
|
/** The events this family names for itself, the surface being shared. */
|
|
382
510
|
protected panEvent(detail: ViewportPanDetail): Event;
|
|
383
511
|
protected zoomEvent(detail: ViewportZoomDetail): Event;
|
|
384
|
-
protected get restingControlsLabel(): string;
|
|
385
|
-
/** What the board says about its gestures where the page does not say it. */
|
|
386
|
-
protected get restingGestureLabels(): ViewportGestureLabels;
|
|
387
512
|
/**
|
|
388
513
|
* Zoom and fullscreen, without the pad.
|
|
389
514
|
*
|
|
@@ -469,7 +594,8 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
469
594
|
private toDocument;
|
|
470
595
|
/**
|
|
471
596
|
* The card under a point, the smallest where they overlap, so a card inside
|
|
472
|
-
* a group is found before the group around it.
|
|
597
|
+
* a group is found before the group around it. Where none is, the nearest
|
|
598
|
+
* within `reach`, in the document's units.
|
|
473
599
|
*/
|
|
474
600
|
private cardAt;
|
|
475
601
|
/** What a card is called, by id, for what the live region says. */
|
|
@@ -631,6 +757,22 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
631
757
|
* Returns whether it applied, so a caller knows whether to report a finish.
|
|
632
758
|
*/
|
|
633
759
|
private requestMove;
|
|
760
|
+
/**
|
|
761
|
+
* Moves the view while a pointer carries something near its edge, and
|
|
762
|
+
* carries it along: a card, a corner, a connection being drawn, the box that
|
|
763
|
+
* selects.
|
|
764
|
+
*/
|
|
765
|
+
private readonly edgePan;
|
|
766
|
+
/** The last pointer move of a carry, which a frame of `edgePan` moves on from. */
|
|
767
|
+
private carryPointer;
|
|
768
|
+
/**
|
|
769
|
+
* One frame of moving the view under something carried to its edge: the
|
|
770
|
+
* board moves by `by` and what is in hand stays under the pointer, so a card
|
|
771
|
+
* goes on moving over the board while the hand is still.
|
|
772
|
+
*/
|
|
773
|
+
private panCarrying;
|
|
774
|
+
/** Follows a pointer carrying something, which moves the view at an edge. */
|
|
775
|
+
private carryOn;
|
|
634
776
|
/**
|
|
635
777
|
* Drag to move the board, which is the gesture a canvas is reached for with.
|
|
636
778
|
*
|
|
@@ -760,6 +902,20 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
760
902
|
* own, ended by its release.
|
|
761
903
|
*/
|
|
762
904
|
private readonly handleFocusOut;
|
|
905
|
+
/**
|
|
906
|
+
* Forgets the card focus left, unless the page took it away.
|
|
907
|
+
*
|
|
908
|
+
* Focus leaving for nothing is a press on the page or the card removed, and
|
|
909
|
+
* which one is known once the removal has finished: a card still on the
|
|
910
|
+
* board was left, and one gone is owed a place for focus to land.
|
|
911
|
+
*/
|
|
912
|
+
private forget;
|
|
913
|
+
/**
|
|
914
|
+
* Gives focus on from a card the page took away with focus in it: to the
|
|
915
|
+
* next stop, the one before where it was the last, and the board where none
|
|
916
|
+
* is left. Not where the reader has gone somewhere else already.
|
|
917
|
+
*/
|
|
918
|
+
private handOn;
|
|
763
919
|
/** Brings a card into view, where it is not already whole in it. */
|
|
764
920
|
private reveal;
|
|
765
921
|
/**
|
|
@@ -767,7 +923,10 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
767
923
|
* board draws; a card's content by asking, which the board does not.
|
|
768
924
|
*/
|
|
769
925
|
private editStop;
|
|
770
|
-
/**
|
|
926
|
+
/**
|
|
927
|
+
* A double-click on a card or a connection edits it, the pointer's F2, and
|
|
928
|
+
* one on the empty board zooms in about where it landed.
|
|
929
|
+
*/
|
|
771
930
|
private readonly handleDoubleClick;
|
|
772
931
|
/**
|
|
773
932
|
* Finishes editing a label: asks, writes it where the page did not refuse,
|