@fusion.dev/helix-headless 0.148.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 +6966 -1798
- package/dist/announcement/root/announcement-root.d.ts +5 -0
- package/dist/announcement/root/announcement-root.js +5 -2
- package/dist/area-chart/root/area-chart-root.d.ts +11 -0
- package/dist/area-chart/root/area-chart-root.js +20 -7
- 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 +6 -1
- package/dist/badge/count.js +3 -3
- package/dist/badge/root/badge-root.d.ts +6 -2
- package/dist/badge/root/badge-root.js +3 -3
- 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/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/root/button-group-root.d.ts +3 -0
- package/dist/button-group/root/button-group-root.js +2 -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/neighbor.d.ts +17 -0
- package/dist/canvas/neighbor.js +1 -0
- package/dist/canvas/node/canvas-node.js +3 -2
- package/dist/canvas/root/canvas-root.d.ts +65 -8
- package/dist/canvas/root/canvas-root.js +115 -49
- package/dist/carousel/root/carousel-root.d.ts +5 -0
- package/dist/carousel/root/carousel-root.js +16 -5
- 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 +27 -1
- package/dist/chat/root/chat-root.js +37 -9
- 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 +11 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +11 -3
- package/dist/code-block/root/code-block-root.d.ts +12 -2
- package/dist/code-block/root/code-block-root.js +12 -2
- 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 +47 -13
- package/dist/combobox/root/combobox-root.d.ts +36 -7
- package/dist/combobox/root/combobox-root.js +37 -12
- package/dist/command/root/command-root.d.ts +15 -6
- 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 +268 -118
- 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/dialog/root/dialog-root.d.ts +12 -1
- package/dist/dialog/root/dialog-root.js +11 -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/root/drilldown-root.d.ts +5 -0
- package/dist/drilldown/root/drilldown-root.js +4 -1
- package/dist/element-events.generated.js +25 -3
- package/dist/file-input/root/file-input-root.d.ts +18 -3
- package/dist/file-input/root/file-input-root.js +34 -17
- package/dist/filter-input/chip/filter-chip.d.ts +13 -0
- package/dist/filter-input/chip/filter-chip.js +6 -1
- 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/root/format-date-root.d.ts +20 -2
- package/dist/format-date/root/format-date-root.js +5 -2
- 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 +78 -9
- package/dist/graph/root/graph-root.js +124 -27
- package/dist/heatmap/root/heatmap-root.d.ts +25 -4
- package/dist/heatmap/root/heatmap-root.js +27 -7
- 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/input/root/input-root.d.ts +5 -0
- package/dist/input/root/input-root.js +4 -1
- 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 +112 -2
- 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 +68 -11
- package/dist/listbox/root/listbox-root.js +41 -9
- 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 +16 -1
- 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 +33 -14
- package/dist/map/root/map-root.js +59 -22
- 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/menu/root/menu-root.d.ts +5 -0
- 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 +3 -1
- package/dist/notifications/notification/notification.d.ts +5 -0
- package/dist/notifications/notification/notification.js +3 -1
- package/dist/notifications/root/notifications-root.d.ts +8 -0
- package/dist/notifications/root/notifications-root.js +10 -2
- 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 +51 -12
- package/dist/object-inspector/root/object-inspector-root.js +21 -20
- 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 +7 -3
- package/dist/pagination/size/pagination-size.js +4 -2
- 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 +6 -6
- package/dist/pin-input/code.js +1 -5
- package/dist/pin-input/root/pin-input-root.d.ts +9 -3
- package/dist/pin-input/root/pin-input-root.js +6 -2
- 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 +12 -2
- package/dist/qr-code/root/qr-code-root.js +9 -2
- 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/root/scatter-chart-root.d.ts +20 -2
- package/dist/scatter-chart/root/scatter-chart-root.js +20 -5
- package/dist/select/root/select-root.d.ts +11 -0
- package/dist/select/root/select-root.js +13 -3
- 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/root/speed-dial-root.d.ts +5 -0
- package/dist/speed-dial/root/speed-dial-root.js +4 -1
- package/dist/splitter/root/splitter-root.d.ts +6 -1
- package/dist/splitter/root/splitter-root.js +9 -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/column/table-column.d.ts +11 -4
- package/dist/table/column/table-column.js +15 -10
- package/dist/table/grid-controller.d.ts +8 -3
- package/dist/table/grid-controller.js +17 -11
- package/dist/table/root/table-root.d.ts +107 -5
- package/dist/table/root/table-root.js +122 -20
- package/dist/table/row/table-row.d.ts +42 -0
- package/dist/table/row/table-row.js +40 -1
- 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 +3 -1
- 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 +15 -7
- package/dist/time-picker/root/time-picker-root.js +25 -12
- package/dist/toast/item/toast-item.d.ts +7 -0
- package/dist/toast/item/toast-item.js +1 -0
- package/dist/toast/root/toast-root.d.ts +9 -1
- package/dist/toast/root/toast-root.js +5 -4
- package/dist/toolbar/root/toolbar-root.d.ts +5 -0
- package/dist/toolbar/root/toolbar-root.js +5 -2
- package/dist/tooltip/root/tooltip-root.d.ts +27 -17
- 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 +12 -3
- package/dist/video/root/video-root.js +41 -14
- 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 +5 -2
- package/lint.json +1 -1
- package/package.json +7 -6
- package/types/jsx.d.ts +4014 -1862
- package/types/vue.d.ts +1266 -624
- package/types/words.d.ts +3280 -0
- package/dist/toast/hotkey.d.ts +0 -22
- package/dist/toast/hotkey.js +0 -23
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const formatters = new Map();
|
|
2
|
+
export const descriptionOf = (locale, words) => {
|
|
3
|
+
let found = formatters.get(locale);
|
|
4
|
+
if (!found) {
|
|
5
|
+
found = new Intl.ListFormat(locale || undefined, { style: 'narrow', type: 'conjunction' });
|
|
6
|
+
formatters.set(locale, found);
|
|
7
|
+
}
|
|
8
|
+
return found.format(words.filter((one) => Boolean(one)));
|
|
9
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where focus goes when a stop on a board leaves: the arithmetic, kept apart
|
|
3
|
+
* from the board that moves focus there.
|
|
4
|
+
*
|
|
5
|
+
* Shared by the two ways a stop leaves, Delete and the page taking it away,
|
|
6
|
+
* so a reader lands in the same place either way.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The first stop after `at` in `walk` that `kept` keeps, or, with none after
|
|
10
|
+
* it, the nearest one before it. Undefined where none is kept.
|
|
11
|
+
*
|
|
12
|
+
* @param walk Every stop's key, in the order the arrow keys walk them.
|
|
13
|
+
* @param at Where the stop that left was, as an index into `walk`, or `-1`
|
|
14
|
+
* for nowhere, which takes the first stop kept.
|
|
15
|
+
* @param kept Whether a stop is still there.
|
|
16
|
+
*/
|
|
17
|
+
export declare const neighborOf: (walk: readonly string[], at: number, kept: (key: string) => boolean) => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const neighborOf = (walk, at, kept) => walk.slice(at + 1).find(kept) ?? walk.slice(0, Math.max(at, 0)).reverse().find(kept);
|
|
@@ -4,9 +4,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, HelixElement, PlacementController } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, HelixElement, PlacementController, wordsLocale, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing } from 'lit';
|
|
9
9
|
import { property, state } from 'lit/decorators.js';
|
|
10
|
+
import { descriptionOf } from '../describe.js';
|
|
10
11
|
const DRAWN = [
|
|
11
12
|
'group',
|
|
12
13
|
'height',
|
|
@@ -82,7 +83,7 @@ let HelixHeadlessCanvasNode = class HelixHeadlessCanvasNode extends HelixElement
|
|
|
82
83
|
>
|
|
83
84
|
<slot id="content"></slot>
|
|
84
85
|
<slot name="description"></slot>
|
|
85
|
-
<span id="about" hidden>${[this.status, this.meaning, this.links]
|
|
86
|
+
<span id="about" hidden>${descriptionOf(wordsLocale(this), [this.status, this.meaning, this.links])}</span>
|
|
86
87
|
</div>
|
|
87
88
|
${this.connectable
|
|
88
89
|
? html `<span part="handle handle-top" aria-hidden="true" data-side="top"></span>
|
|
@@ -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';
|
|
@@ -69,6 +69,11 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
|
|
|
69
69
|
* - Delete on a card or a connection dispatches `helix-remove`. The event names
|
|
70
70
|
* every connection that removing the card would leave without an end.
|
|
71
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
|
+
*
|
|
72
77
|
* The board applies a move itself, because the card already exists. A
|
|
73
78
|
* connection is a new element, and React discards an element the board adds to
|
|
74
79
|
* its markup on the next render, so you write the connection.
|
|
@@ -149,10 +154,20 @@ declare const HelixHeadlessCanvas_base: (new (...args: any[]) => import("@fusion
|
|
|
149
154
|
* @cssstate using - A board with `gestures="activate"` has been pressed and has the gestures.
|
|
150
155
|
*/
|
|
151
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;
|
|
152
162
|
/** The connection whose target had focus as an update began, and that target. */
|
|
153
163
|
private focusedEdge;
|
|
154
164
|
/** Each card is assigned to its own slot, in the order the arrows walk them. */
|
|
155
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;
|
|
156
171
|
/** The text read with a card to say where its connections come from, with `{cards}`. */
|
|
157
172
|
comesFromLabel: string;
|
|
158
173
|
/** The text announced when a connection is requested, with `{from}` and `{to}`. */
|
|
@@ -172,6 +187,13 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
172
187
|
* this, so a reader hears the ends first and what the line says after.
|
|
173
188
|
*/
|
|
174
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;
|
|
175
197
|
/**
|
|
176
198
|
* The accessible name for the board. Required.
|
|
177
199
|
*
|
|
@@ -192,6 +214,11 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
192
214
|
* Third", rather than with a comma this component chose.
|
|
193
215
|
*/
|
|
194
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;
|
|
195
222
|
/**
|
|
196
223
|
* What screen readers hear after a key moves a card, with `{name}` for the
|
|
197
224
|
* card and `{x}` and `{y}` for where it now is, in the document's units.
|
|
@@ -276,7 +303,8 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
276
303
|
selectedLabel: string;
|
|
277
304
|
/**
|
|
278
305
|
* What screen readers hear after the selection grows or shrinks, with
|
|
279
|
-
* `{count}` for how many cards and connections are selected
|
|
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
|
|
280
308
|
* click with Shift, Command or Control, Command or Control with A, a box
|
|
281
309
|
* drawn across the board, or Escape.
|
|
282
310
|
*
|
|
@@ -312,9 +340,18 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
312
340
|
* told the same. A tone left out is not read.
|
|
313
341
|
*/
|
|
314
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;
|
|
315
352
|
/**
|
|
316
353
|
* What screen readers hear after a zoom button or key, with `{zoom}` for the
|
|
317
|
-
* zoom as a percentage, written the way the
|
|
354
|
+
* zoom as a percentage, written the way the element's locale writes one.
|
|
318
355
|
*/
|
|
319
356
|
zoomedLabel: string;
|
|
320
357
|
/** The card or connection that holds the board's one tab stop, by its key. */
|
|
@@ -336,8 +373,6 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
336
373
|
* once, so a second "2 selected" differs by a space no reader says.
|
|
337
374
|
*/
|
|
338
375
|
private say;
|
|
339
|
-
/** Numbers as the page's language writes them. */
|
|
340
|
-
private get numbers();
|
|
341
376
|
/**
|
|
342
377
|
* Where focus goes once something a reader removed has gone.
|
|
343
378
|
*
|
|
@@ -347,6 +382,17 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
347
382
|
* or, for a page that declines, off one that stays.
|
|
348
383
|
*/
|
|
349
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;
|
|
350
396
|
/**
|
|
351
397
|
* Where the plane's corner was on the last render, in the document's units.
|
|
352
398
|
*
|
|
@@ -463,9 +509,6 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
463
509
|
/** The events this family names for itself, the surface being shared. */
|
|
464
510
|
protected panEvent(detail: ViewportPanDetail): Event;
|
|
465
511
|
protected zoomEvent(detail: ViewportZoomDetail): Event;
|
|
466
|
-
protected get restingControlsLabel(): string;
|
|
467
|
-
/** What the board says about its gestures where the page does not say it. */
|
|
468
|
-
protected get restingGestureLabels(): ViewportGestureLabels;
|
|
469
512
|
/**
|
|
470
513
|
* Zoom and fullscreen, without the pad.
|
|
471
514
|
*
|
|
@@ -859,6 +902,20 @@ export declare class HelixHeadlessCanvas extends HelixHeadlessCanvas_base {
|
|
|
859
902
|
* own, ended by its release.
|
|
860
903
|
*/
|
|
861
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;
|
|
862
919
|
/** Brings a card into view, where it is not already whole in it. */
|
|
863
920
|
private reveal;
|
|
864
921
|
/**
|
|
@@ -4,11 +4,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { assignSlots, capturePointer, customElement,
|
|
7
|
+
import { assignSlots, capturePointer, customElement, formatPercent, formatWords, HelixBeforeMoveEvent, HelixBeforeReconnectEvent, HelixBeforeRelabelEvent, HelixCanvasEditEvent, HelixCanvasPanEvent, HelixCanvasViewEvent, HelixCanvasZoomEvent, HelixConnectEvent, HelixElement, HelixMoveEvent, HelixReconnectEvent, HelixRelabelEvent, HelixRemoveEvent, HelixSelectEvent, hostAria, inlineStep, isRtl, MixinViewport, words, wordsConverter, wordsLocale, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html, nothing, svg } from 'lit';
|
|
9
9
|
import { property, state } from 'lit/decorators.js';
|
|
10
|
+
import { descriptionOf } from '../describe.js';
|
|
10
11
|
import { HelixHeadlessCanvasEdge } from '../edge/canvas-edge.js';
|
|
11
12
|
import { EdgePan } from '../edge-pan.js';
|
|
13
|
+
import { neighborOf } from '../neighbor.js';
|
|
12
14
|
import { HelixHeadlessCanvasNode } from '../node/canvas-node.js';
|
|
13
15
|
import { snapBox, snapTo, stepTo } from '../snap.js';
|
|
14
16
|
import { colorOf, connector, distanceTo, ends, extent, inside, port, reading, sideNear, } from './canvas-document.js';
|
|
@@ -40,13 +42,17 @@ const size = (value) => (value > 0 ? `${value}px` : undefined);
|
|
|
40
42
|
let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixElement) {
|
|
41
43
|
constructor() {
|
|
42
44
|
super(...arguments);
|
|
45
|
+
this.activateHintLabel = 'Press the board to use it';
|
|
43
46
|
this.comesFromLabel = 'from {cards}';
|
|
44
47
|
this.connectedLabel = 'Asked to connect {from} to {to}.';
|
|
45
48
|
this.connectingLabel = 'Connecting from {from}. Move to another card and press Enter, or Escape to stop.';
|
|
46
49
|
this.connectionLabel = 'From {from} to {to}';
|
|
50
|
+
this.controlsLabel = 'Board controls';
|
|
51
|
+
this.fallbackLabel = 'Canvas';
|
|
47
52
|
this.label = '';
|
|
48
53
|
this.labelEditorLabel = 'Label for {name}';
|
|
49
54
|
this.leadsToLabel = 'leads to {cards}';
|
|
55
|
+
this.linkedLabel = '{leadsTo}; {comesFrom}';
|
|
50
56
|
this.movedLabel = '{name} moved to {x}, {y}';
|
|
51
57
|
this.readOnly = false;
|
|
52
58
|
this.reconnectingLabel = 'Moving the end of the connection from {from} to {to}. Move to a card and press Enter, or Escape to stop.';
|
|
@@ -56,8 +62,12 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
56
62
|
this.selectionLabel = '{count} selected';
|
|
57
63
|
this.stoppedLabel = 'Stopped connecting.';
|
|
58
64
|
this.toneLabels = {};
|
|
65
|
+
this.twoFingerHintLabel = 'Use two fingers to move the board';
|
|
66
|
+
this.usingLabel = 'Using the board. Press Escape to scroll the page again.';
|
|
67
|
+
this.wheelHintLabel = 'Use {key} and scroll to zoom the board';
|
|
59
68
|
this.zoomedLabel = 'Zoom {zoom}';
|
|
60
69
|
this.said = '';
|
|
70
|
+
this.walked = [];
|
|
61
71
|
this.at = { x: 0, y: 0, zoom: 1 };
|
|
62
72
|
this.direct = false;
|
|
63
73
|
this.touched = false;
|
|
@@ -468,10 +478,10 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
468
478
|
};
|
|
469
479
|
if (this.requestMove(detail)) {
|
|
470
480
|
this.dispatchEvent(new HelixMoveEvent(detail));
|
|
471
|
-
this.say(
|
|
481
|
+
this.say(formatWords(this, 'movedLabel', {
|
|
472
482
|
name: this.nameOf(card.name),
|
|
473
|
-
x:
|
|
474
|
-
y:
|
|
483
|
+
x: card.x,
|
|
484
|
+
y: card.y,
|
|
475
485
|
}));
|
|
476
486
|
}
|
|
477
487
|
void this.updateComplete.then(() => this.reveal(card.name));
|
|
@@ -488,10 +498,10 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
488
498
|
const detail = { nodes: [{ name: card.name, ...box }] };
|
|
489
499
|
if (this.requestMove(detail)) {
|
|
490
500
|
this.dispatchEvent(new HelixMoveEvent(detail));
|
|
491
|
-
this.say(
|
|
492
|
-
height:
|
|
501
|
+
this.say(formatWords(this, 'resizedLabel', {
|
|
502
|
+
height: box.height,
|
|
493
503
|
name: this.nameOf(card.name),
|
|
494
|
-
width:
|
|
504
|
+
width: box.width,
|
|
495
505
|
}));
|
|
496
506
|
}
|
|
497
507
|
return;
|
|
@@ -591,6 +601,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
591
601
|
return;
|
|
592
602
|
}
|
|
593
603
|
this.refocus = undefined;
|
|
604
|
+
this.focusedCard = card;
|
|
594
605
|
this.stop = edge ?? card?.name;
|
|
595
606
|
if (!this.pointing && this.stop !== undefined && !this.picked.includes(this.stop)) {
|
|
596
607
|
this.choose(this.stop);
|
|
@@ -606,6 +617,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
606
617
|
};
|
|
607
618
|
this.handleFocusOut = (event) => {
|
|
608
619
|
const next = event.relatedTarget;
|
|
620
|
+
this.forget(this.cardOf(event), next);
|
|
609
621
|
const linking = this.linking;
|
|
610
622
|
if (!linking ||
|
|
611
623
|
linking.pointer !== undefined ||
|
|
@@ -669,6 +681,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
669
681
|
this.requestUpdate();
|
|
670
682
|
};
|
|
671
683
|
}
|
|
684
|
+
static { this.words = 'helix-canvas'; }
|
|
672
685
|
static { this.shadowRootOptions = {
|
|
673
686
|
...HelixElement.shadowRootOptions,
|
|
674
687
|
slotAssignment: 'manual',
|
|
@@ -676,9 +689,6 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
676
689
|
say(words) {
|
|
677
690
|
this.said = words !== '' && words === this.said ? `${words}\u00a0` : words;
|
|
678
691
|
}
|
|
679
|
-
get numbers() {
|
|
680
|
-
return formatNumbers(this.closest('[lang]')?.getAttribute('lang') ?? '');
|
|
681
|
-
}
|
|
682
692
|
get box() {
|
|
683
693
|
const viewport = this.renderRoot?.querySelector('[part="viewport"]');
|
|
684
694
|
return {
|
|
@@ -784,17 +794,6 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
784
794
|
zoomEvent(detail) {
|
|
785
795
|
return new HelixCanvasZoomEvent(detail);
|
|
786
796
|
}
|
|
787
|
-
get restingControlsLabel() {
|
|
788
|
-
return 'Board controls';
|
|
789
|
-
}
|
|
790
|
-
get restingGestureLabels() {
|
|
791
|
-
return {
|
|
792
|
-
activate: 'Press the board to use it',
|
|
793
|
-
twoFinger: 'Use two fingers to move the board',
|
|
794
|
-
using: 'Using the board. Press Escape to scroll the page again.',
|
|
795
|
-
wheel: 'Use {key} and scroll to zoom the board',
|
|
796
|
-
};
|
|
797
|
-
}
|
|
798
797
|
get restingControls() {
|
|
799
798
|
return 'zoom fullscreen';
|
|
800
799
|
}
|
|
@@ -817,10 +816,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
817
816
|
this.direct = false;
|
|
818
817
|
this.touched = true;
|
|
819
818
|
this.zoomAbout(by > 0 ? 1.25 : 1 / 1.25, { x: this.box.width / 2, y: this.box.height / 2 });
|
|
820
|
-
|
|
821
|
-
this.say(fillTemplate(this.zoomedLabel, {
|
|
822
|
-
zoom: new Intl.NumberFormat(lang, { maximumFractionDigits: 0, style: 'percent' }).format(this.at.zoom),
|
|
823
|
-
}));
|
|
819
|
+
this.say(formatWords(this, 'zoomedLabel', { zoom: formatPercent(this.at.zoom, wordsLocale(this)) }));
|
|
824
820
|
super.zoom(by);
|
|
825
821
|
}
|
|
826
822
|
show(name) {
|
|
@@ -905,7 +901,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
905
901
|
}
|
|
906
902
|
startLinking(from) {
|
|
907
903
|
this.linking = { from };
|
|
908
|
-
this.said =
|
|
904
|
+
this.said = formatWords(this, 'connectingLabel', { from: this.nameOf(from) });
|
|
909
905
|
}
|
|
910
906
|
arrival(name) {
|
|
911
907
|
const card = this.cardNamed(name);
|
|
@@ -926,7 +922,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
926
922
|
this.said = linking ? this.stoppedLabel : '';
|
|
927
923
|
return;
|
|
928
924
|
}
|
|
929
|
-
this.said =
|
|
925
|
+
this.said = formatWords(this, 'connectedLabel', {
|
|
930
926
|
from: this.nameOf(linking.from),
|
|
931
927
|
to: this.nameOf(arriving),
|
|
932
928
|
});
|
|
@@ -956,7 +952,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
956
952
|
};
|
|
957
953
|
this.said = pointer
|
|
958
954
|
? ''
|
|
959
|
-
:
|
|
955
|
+
: formatWords(this, 'reconnectingLabel', {
|
|
960
956
|
from: this.nameOf(edge.fromNode),
|
|
961
957
|
to: this.nameOf(edge.toNode),
|
|
962
958
|
});
|
|
@@ -1006,7 +1002,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1006
1002
|
this.rekey(linking.edge, this.keyOfElement(element));
|
|
1007
1003
|
}
|
|
1008
1004
|
if (linking.pointer === undefined) {
|
|
1009
|
-
this.said =
|
|
1005
|
+
this.said = formatWords(this, 'connectedLabel', {
|
|
1010
1006
|
from: this.nameOf(detail.from),
|
|
1011
1007
|
to: this.nameOf(detail.to),
|
|
1012
1008
|
});
|
|
@@ -1042,12 +1038,8 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1042
1038
|
};
|
|
1043
1039
|
const gone = new Set([...asked, ...leaving.map((edge) => this.keyOf(edge))]);
|
|
1044
1040
|
const at = Math.min(...asked.map((one) => walk.findIndex((stop) => stop.key === one)));
|
|
1045
|
-
const next = walk.
|
|
1046
|
-
|
|
1047
|
-
.slice(0, Math.max(at, 0))
|
|
1048
|
-
.reverse()
|
|
1049
|
-
.find((one) => !gone.has(one.key));
|
|
1050
|
-
this.refocus = { gone: [...gone], next: next?.key };
|
|
1041
|
+
const next = neighborOf(walk.map((one) => one.key), at, (key) => !gone.has(key));
|
|
1042
|
+
this.refocus = { gone: [...gone], next };
|
|
1051
1043
|
this.dispatchEvent(new HelixRemoveEvent(detail));
|
|
1052
1044
|
}
|
|
1053
1045
|
clicked(key, event) {
|
|
@@ -1184,7 +1176,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1184
1176
|
if (this.dispatchEvent(new HelixSelectEvent({ value }))) {
|
|
1185
1177
|
this.selected = value;
|
|
1186
1178
|
if (said) {
|
|
1187
|
-
this.say(
|
|
1179
|
+
this.say(formatWords(this, 'selectionLabel', { count: list.length }));
|
|
1188
1180
|
}
|
|
1189
1181
|
}
|
|
1190
1182
|
}
|
|
@@ -1306,6 +1298,39 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1306
1298
|
document.removeEventListener('keydown', this.handleHeldKey, true);
|
|
1307
1299
|
document.removeEventListener('pointerdown', this.handleHeldOutside, true);
|
|
1308
1300
|
}
|
|
1301
|
+
forget(card, to) {
|
|
1302
|
+
if (!card || card !== this.focusedCard) {
|
|
1303
|
+
return;
|
|
1304
|
+
}
|
|
1305
|
+
if (to) {
|
|
1306
|
+
this.focusedCard = undefined;
|
|
1307
|
+
return;
|
|
1308
|
+
}
|
|
1309
|
+
queueMicrotask(() => {
|
|
1310
|
+
if (card.isConnected && this.focusedCard === card) {
|
|
1311
|
+
this.focusedCard = undefined;
|
|
1312
|
+
}
|
|
1313
|
+
});
|
|
1314
|
+
}
|
|
1315
|
+
handOn() {
|
|
1316
|
+
const gone = this.focusedCard;
|
|
1317
|
+
if (!gone || this.cards.includes(gone)) {
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
this.focusedCard = undefined;
|
|
1321
|
+
const active = this.ownerDocument.activeElement;
|
|
1322
|
+
if (active !== null && active !== this.ownerDocument.body) {
|
|
1323
|
+
return;
|
|
1324
|
+
}
|
|
1325
|
+
const keys = new Set(this.walk.map((one) => one.key));
|
|
1326
|
+
const next = neighborOf(this.walked.map((one) => one.key), this.walked.findIndex((one) => one.key === gone.name), (key) => keys.has(key));
|
|
1327
|
+
if (next === undefined) {
|
|
1328
|
+
this.partNamed('region')?.focus();
|
|
1329
|
+
}
|
|
1330
|
+
else {
|
|
1331
|
+
this.focusStop(next);
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1309
1334
|
reveal(id) {
|
|
1310
1335
|
const node = this.byId.get(id);
|
|
1311
1336
|
const origin = this.origin;
|
|
@@ -1390,7 +1415,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1390
1415
|
const drawn = edge ? this.geometryOf(edge, origin) : undefined;
|
|
1391
1416
|
if (drawn) {
|
|
1392
1417
|
at = drawn.mid;
|
|
1393
|
-
named =
|
|
1418
|
+
named = formatWords(this, 'connectionLabel', {
|
|
1394
1419
|
from: this.textOf(drawn.from),
|
|
1395
1420
|
to: this.textOf(drawn.to),
|
|
1396
1421
|
});
|
|
@@ -1408,7 +1433,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1408
1433
|
}
|
|
1409
1434
|
return html `<input
|
|
1410
1435
|
part="label-editor"
|
|
1411
|
-
aria-label=${
|
|
1436
|
+
aria-label=${formatWords(this, 'labelEditorLabel', { name: named })}
|
|
1412
1437
|
data-target=${editing.target}
|
|
1413
1438
|
style=${`--_canvas-editor-x: ${at.x}px; --_canvas-editor-y: ${at.y}px`}
|
|
1414
1439
|
type="text"
|
|
@@ -1495,19 +1520,17 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1495
1520
|
leads.set(edge.fromNode, [...(leads.get(edge.fromNode) ?? []), named(edge.toNode)]);
|
|
1496
1521
|
from.set(edge.toNode, [...(from.get(edge.toNode) ?? []), named(edge.fromNode)]);
|
|
1497
1522
|
}
|
|
1498
|
-
const
|
|
1499
|
-
const list = new Intl.ListFormat(lang, { type: 'conjunction' });
|
|
1523
|
+
const list = new Intl.ListFormat(wordsLocale(this), { type: 'conjunction' });
|
|
1500
1524
|
return new Map(this.nodes.map((one) => {
|
|
1501
1525
|
const out = leads.get(one.id) ?? [];
|
|
1502
1526
|
const into = from.get(one.id) ?? [];
|
|
1527
|
+
const leadsTo = out.length > 0 ? formatWords(this, 'leadsToLabel', { cards: list.format(out) }) : '';
|
|
1528
|
+
const comesFrom = into.length > 0 ? formatWords(this, 'comesFromLabel', { cards: list.format(into) }) : '';
|
|
1503
1529
|
return [
|
|
1504
1530
|
one.id,
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
]
|
|
1509
|
-
.filter(Boolean)
|
|
1510
|
-
.join('; '),
|
|
1531
|
+
leadsTo && comesFrom
|
|
1532
|
+
? formatWords(this, 'linkedLabel', { comesFrom, leadsTo })
|
|
1533
|
+
: leadsTo || comesFrom,
|
|
1511
1534
|
];
|
|
1512
1535
|
}));
|
|
1513
1536
|
}
|
|
@@ -1666,6 +1689,8 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1666
1689
|
this.focusStop(refocus.next !== undefined && keys.has(refocus.next) ? refocus.next : this.walk[0]?.key);
|
|
1667
1690
|
}
|
|
1668
1691
|
}
|
|
1692
|
+
this.handOn();
|
|
1693
|
+
this.walked = this.walk;
|
|
1669
1694
|
this.watchBox();
|
|
1670
1695
|
if (!this.touched) {
|
|
1671
1696
|
this.fitInto(true);
|
|
@@ -1911,8 +1936,8 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
1911
1936
|
const ends = heads(edge);
|
|
1912
1937
|
return svg `<path
|
|
1913
1938
|
part="edge-target"
|
|
1914
|
-
aria-description=${[pickedKeys.has(key) ? this.selectedLabel :
|
|
1915
|
-
aria-label=${
|
|
1939
|
+
aria-description=${descriptionOf(wordsLocale(this), [pickedKeys.has(key) ? this.selectedLabel : '', element?.tone ? this.toneLabels[element.tone] : '', edge.label]) || nothing}
|
|
1940
|
+
aria-label=${formatWords(this, 'connectionLabel', { from: this.textOf(from), to: this.textOf(to) })}
|
|
1916
1941
|
d=${drawn.d}
|
|
1917
1942
|
data-edge=${key}
|
|
1918
1943
|
fill="none"
|
|
@@ -2025,7 +2050,7 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
2025
2050
|
return html `<div
|
|
2026
2051
|
part="region"
|
|
2027
2052
|
role="group"
|
|
2028
|
-
aria-label=${this.label ||
|
|
2053
|
+
aria-label=${this.label || this.fallbackLabel}
|
|
2029
2054
|
aria-keyshortcuts="ArrowUp ArrowDown ArrowLeft ArrowRight Plus Minus"
|
|
2030
2055
|
tabindex="0"
|
|
2031
2056
|
@focusin=${this.idle.stir}
|
|
@@ -2087,27 +2112,50 @@ let HelixHeadlessCanvas = class HelixHeadlessCanvas extends MixinViewport(HelixE
|
|
|
2087
2112
|
}
|
|
2088
2113
|
};
|
|
2089
2114
|
__decorate([
|
|
2115
|
+
words,
|
|
2116
|
+
property({ attribute: 'activate-hint-label' })
|
|
2117
|
+
], HelixHeadlessCanvas.prototype, "activateHintLabel", void 0);
|
|
2118
|
+
__decorate([
|
|
2119
|
+
words,
|
|
2090
2120
|
property({ attribute: 'comes-from-label' })
|
|
2091
2121
|
], HelixHeadlessCanvas.prototype, "comesFromLabel", void 0);
|
|
2092
2122
|
__decorate([
|
|
2123
|
+
words,
|
|
2093
2124
|
property({ attribute: 'connected-label' })
|
|
2094
2125
|
], HelixHeadlessCanvas.prototype, "connectedLabel", void 0);
|
|
2095
2126
|
__decorate([
|
|
2127
|
+
words,
|
|
2096
2128
|
property({ attribute: 'connecting-label' })
|
|
2097
2129
|
], HelixHeadlessCanvas.prototype, "connectingLabel", void 0);
|
|
2098
2130
|
__decorate([
|
|
2131
|
+
words,
|
|
2099
2132
|
property({ attribute: 'connection-label' })
|
|
2100
2133
|
], HelixHeadlessCanvas.prototype, "connectionLabel", void 0);
|
|
2134
|
+
__decorate([
|
|
2135
|
+
words,
|
|
2136
|
+
property({ attribute: 'controls-label' })
|
|
2137
|
+
], HelixHeadlessCanvas.prototype, "controlsLabel", void 0);
|
|
2138
|
+
__decorate([
|
|
2139
|
+
words,
|
|
2140
|
+
property({ attribute: 'fallback-label' })
|
|
2141
|
+
], HelixHeadlessCanvas.prototype, "fallbackLabel", void 0);
|
|
2101
2142
|
__decorate([
|
|
2102
2143
|
property()
|
|
2103
2144
|
], HelixHeadlessCanvas.prototype, "label", void 0);
|
|
2104
2145
|
__decorate([
|
|
2146
|
+
words,
|
|
2105
2147
|
property({ attribute: 'label-editor-label' })
|
|
2106
2148
|
], HelixHeadlessCanvas.prototype, "labelEditorLabel", void 0);
|
|
2107
2149
|
__decorate([
|
|
2150
|
+
words,
|
|
2108
2151
|
property({ attribute: 'leads-to-label' })
|
|
2109
2152
|
], HelixHeadlessCanvas.prototype, "leadsToLabel", void 0);
|
|
2110
2153
|
__decorate([
|
|
2154
|
+
words,
|
|
2155
|
+
property({ attribute: 'linked-label' })
|
|
2156
|
+
], HelixHeadlessCanvas.prototype, "linkedLabel", void 0);
|
|
2157
|
+
__decorate([
|
|
2158
|
+
words,
|
|
2111
2159
|
property({ attribute: 'moved-label' })
|
|
2112
2160
|
], HelixHeadlessCanvas.prototype, "movedLabel", void 0);
|
|
2113
2161
|
__decorate([
|
|
@@ -2120,18 +2168,22 @@ __decorate([
|
|
|
2120
2168
|
property({ attribute: 'readonly', reflect: true, type: Boolean })
|
|
2121
2169
|
], HelixHeadlessCanvas.prototype, "readOnly", void 0);
|
|
2122
2170
|
__decorate([
|
|
2171
|
+
words,
|
|
2123
2172
|
property({ attribute: 'reconnecting-label' })
|
|
2124
2173
|
], HelixHeadlessCanvas.prototype, "reconnectingLabel", void 0);
|
|
2125
2174
|
__decorate([
|
|
2175
|
+
words,
|
|
2126
2176
|
property({ attribute: 'resized-label' })
|
|
2127
2177
|
], HelixHeadlessCanvas.prototype, "resizedLabel", void 0);
|
|
2128
2178
|
__decorate([
|
|
2129
2179
|
property()
|
|
2130
2180
|
], HelixHeadlessCanvas.prototype, "selected", void 0);
|
|
2131
2181
|
__decorate([
|
|
2182
|
+
words,
|
|
2132
2183
|
property({ attribute: 'selected-label' })
|
|
2133
2184
|
], HelixHeadlessCanvas.prototype, "selectedLabel", void 0);
|
|
2134
2185
|
__decorate([
|
|
2186
|
+
words,
|
|
2135
2187
|
property({ attribute: 'selection-label' })
|
|
2136
2188
|
], HelixHeadlessCanvas.prototype, "selectionLabel", void 0);
|
|
2137
2189
|
__decorate([
|
|
@@ -2141,12 +2193,26 @@ __decorate([
|
|
|
2141
2193
|
state()
|
|
2142
2194
|
], HelixHeadlessCanvas.prototype, "editing", void 0);
|
|
2143
2195
|
__decorate([
|
|
2196
|
+
words,
|
|
2144
2197
|
property({ attribute: 'stopped-label' })
|
|
2145
2198
|
], HelixHeadlessCanvas.prototype, "stoppedLabel", void 0);
|
|
2146
2199
|
__decorate([
|
|
2147
2200
|
property({ attribute: 'tone-labels', converter: wordsConverter })
|
|
2148
2201
|
], HelixHeadlessCanvas.prototype, "toneLabels", void 0);
|
|
2149
2202
|
__decorate([
|
|
2203
|
+
words,
|
|
2204
|
+
property({ attribute: 'two-finger-hint-label' })
|
|
2205
|
+
], HelixHeadlessCanvas.prototype, "twoFingerHintLabel", void 0);
|
|
2206
|
+
__decorate([
|
|
2207
|
+
words,
|
|
2208
|
+
property({ attribute: 'using-label' })
|
|
2209
|
+
], HelixHeadlessCanvas.prototype, "usingLabel", void 0);
|
|
2210
|
+
__decorate([
|
|
2211
|
+
words,
|
|
2212
|
+
property({ attribute: 'wheel-hint-label' })
|
|
2213
|
+
], HelixHeadlessCanvas.prototype, "wheelHintLabel", void 0);
|
|
2214
|
+
__decorate([
|
|
2215
|
+
words,
|
|
2150
2216
|
property({ attribute: 'zoomed-label' })
|
|
2151
2217
|
], HelixHeadlessCanvas.prototype, "zoomedLabel", void 0);
|
|
2152
2218
|
__decorate([
|
|
@@ -94,6 +94,11 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
94
94
|
* @cssstate dragging - While a mouse drags the track, under `mouse-drag`.
|
|
95
95
|
*/
|
|
96
96
|
export declare class HelixHeadlessCarousel extends HelixElement {
|
|
97
|
+
/**
|
|
98
|
+
* The key this family's words are registered under, its styled tag:
|
|
99
|
+
* `registerWords('de', { 'helix-carousel': { nextLabel: 'Nächste Folie' } })`.
|
|
100
|
+
*/
|
|
101
|
+
static words: string;
|
|
97
102
|
/**
|
|
98
103
|
* Manual, so each slide can be wrapped without its markup being touched.
|
|
99
104
|
*
|