@fusion.dev/helix-core 0.103.3 → 0.104.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.
Files changed (37) hide show
  1. package/custom-elements.json +1384 -150
  2. package/dist/controllers/arrival-controller/arrival-controller.d.ts +43 -0
  3. package/dist/controllers/arrival-controller/arrival-controller.js +35 -0
  4. package/dist/controllers/cue-controller/cue-controller.d.ts +8 -0
  5. package/dist/controllers/cue-controller/cue-controller.js +4 -1
  6. package/dist/controllers/keyboard-navigation-controller/keyboard-navigation-controller.js +4 -0
  7. package/dist/controllers/remote-playback-controller/remote-playback-controller.d.ts +15 -0
  8. package/dist/controllers/remote-playback-controller/remote-playback-controller.js +19 -3
  9. package/dist/events/events.d.ts +236 -0
  10. package/dist/events/events.js +144 -0
  11. package/dist/helix-form-element/helix-form-element.d.ts +9 -0
  12. package/dist/helix-form-element/helix-form-element.js +1 -0
  13. package/dist/index.d.ts +6 -1
  14. package/dist/index.js +6 -1
  15. package/dist/mixins/mixin-collection/mixin-collection.d.ts +6 -0
  16. package/dist/mixins/mixin-collection/mixin-collection.js +5 -1
  17. package/dist/mixins/mixin-controller-open/mixin-controller-open.js +3 -3
  18. package/dist/mixins/mixin-controller-value/mixin-controller-value.d.ts +1 -1
  19. package/dist/mixins/mixin-controller-value/mixin-controller-value.js +2 -1
  20. package/dist/mixins/mixin-field/mixin-field.d.ts +11 -0
  21. package/dist/mixins/mixin-field/mixin-field.js +25 -3
  22. package/dist/mixins/mixin-picker-field/mixin-picker-field.d.ts +8 -0
  23. package/dist/mixins/mixin-picker-field/mixin-picker-field.js +22 -2
  24. package/dist/mixins/mixin-tokens/mixin-tokens.js +0 -1
  25. package/dist/mixins/mixin-viewport/mixin-viewport.d.ts +17 -5
  26. package/dist/mixins/mixin-viewport/mixin-viewport.js +68 -21
  27. package/dist/utils/fill-template/fill-template.d.ts +13 -0
  28. package/dist/utils/fill-template/fill-template.js +1 -0
  29. package/dist/utils/key-claimed/key-claimed.d.ts +18 -0
  30. package/dist/utils/key-claimed/key-claimed.js +14 -0
  31. package/dist/utils/report-values/report-values.d.ts +21 -0
  32. package/dist/utils/report-values/report-values.js +11 -0
  33. package/dist/utils/slotted-words/slotted-words.d.ts +11 -0
  34. package/dist/utils/slotted-words/slotted-words.js +5 -0
  35. package/dist/utils/tell-disclosure/tell-disclosure.d.ts +3 -1
  36. package/dist/utils/tell-disclosure/tell-disclosure.js +1 -1
  37. package/package.json +4 -4
@@ -0,0 +1,43 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ /** How an element that announces itself reads what it has to say. */
3
+ export interface ArrivalOptions {
4
+ /** The words, read off whatever the page put in the element. */
5
+ text: () => string;
6
+ /** Whether the element is arriving now, rather than with the page. */
7
+ arriving: () => boolean;
8
+ }
9
+ /**
10
+ * The words of an element that is announced when it appears, for a region that
11
+ * is there before they are.
12
+ *
13
+ * **A live region is heard when what it holds changes, not when it arrives.**
14
+ * An element the page inserts with its message already inside is a region
15
+ * arriving with its words, which a screen reader reads inconsistently at best:
16
+ * an empty state after a search, a banner raised mid-session. So the element
17
+ * renders its region empty and this fills it a frame later, which is a change.
18
+ *
19
+ * **Left empty when the element came with the page**, served or parsed in the
20
+ * first pass, because a message that was always there is content rather than
21
+ * news, and a region that spoke on every page load would interrupt a reader
22
+ * before they had read anything. Its words are the baseline instead, and the
23
+ * region speaks only when they change. Filling it at once also drew the words a
24
+ * second time on the headless tier, which has no sheet to clip the region, and
25
+ * a served page changed its picture on hydrating.
26
+ *
27
+ * The component renders `said` into its region and calls `say` when what it
28
+ * holds changes, from a `slotchange`.
29
+ */
30
+ export declare class ArrivalController implements ReactiveController {
31
+ private readonly host;
32
+ private readonly options;
33
+ /** What the region says now. */
34
+ said: string;
35
+ /** The words last accounted for, said or not. */
36
+ private heard;
37
+ private frame;
38
+ constructor(host: ReactiveControllerHost, options: ArrivalOptions);
39
+ hostConnected(): void;
40
+ hostDisconnected(): void;
41
+ /** Reads the words again, and says them if they moved. */
42
+ say(): void;
43
+ }
@@ -0,0 +1,35 @@
1
+ export class ArrivalController {
2
+ constructor(host, options) {
3
+ this.host = host;
4
+ this.options = options;
5
+ this.said = '';
6
+ this.heard = '';
7
+ this.frame = 0;
8
+ host.addController(this);
9
+ }
10
+ hostConnected() {
11
+ cancelAnimationFrame(this.frame);
12
+ if (!this.options.arriving()) {
13
+ this.heard = this.options.text();
14
+ return;
15
+ }
16
+ this.heard = '';
17
+ this.frame = requestAnimationFrame(() => {
18
+ this.frame = 0;
19
+ this.say();
20
+ });
21
+ }
22
+ hostDisconnected() {
23
+ cancelAnimationFrame(this.frame);
24
+ this.frame = 0;
25
+ }
26
+ say() {
27
+ const next = this.options.text();
28
+ if (next === this.heard) {
29
+ return;
30
+ }
31
+ this.heard = next;
32
+ this.said = next;
33
+ this.host.requestUpdate();
34
+ }
35
+ }
@@ -79,6 +79,14 @@ export declare class CueController implements ReactiveController {
79
79
  private track;
80
80
  constructor(host: ReactiveControllerHost, listener: () => void);
81
81
  follow(track: TextTrack): void;
82
+ /**
83
+ * Listens again after a move, to the track it was following.
84
+ *
85
+ * The track is kept across the disconnect for this: it is only chosen again
86
+ * on `loadedmetadata`, and moving a video does not reload it, so a caption
87
+ * froze on whatever it last said.
88
+ */
89
+ hostConnected(): void;
82
90
  hostDisconnected(): void;
83
91
  private stop;
84
92
  }
@@ -35,8 +35,11 @@ export class CueController {
35
35
  this.track = track;
36
36
  track.addEventListener('cuechange', this.listener);
37
37
  }
38
+ hostConnected() {
39
+ this.track?.addEventListener('cuechange', this.listener);
40
+ }
38
41
  hostDisconnected() {
39
- this.stop();
42
+ this.track?.removeEventListener('cuechange', this.listener);
40
43
  }
41
44
  stop() {
42
45
  this.track?.removeEventListener('cuechange', this.listener);
@@ -1,4 +1,5 @@
1
1
  import { inlineStep } from '../../utils/inline-step/inline-step.js';
2
+ import { keyClaimed } from '../../utils/key-claimed/key-claimed.js';
2
3
  const KEYS = new Set(['ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'End', 'Home']);
3
4
  export class KeyboardNavigationController {
4
5
  constructor(host, { items, origin = 'selection', reserved = () => [], selects = () => true, wrap = true, }) {
@@ -6,6 +7,9 @@ export class KeyboardNavigationController {
6
7
  if (!KEYS.has(event.key) || this.reserved().includes(event.key)) {
7
8
  return;
8
9
  }
10
+ if (keyClaimed(event)) {
11
+ return;
12
+ }
9
13
  const items = this.items().filter((item) => !item.disabled);
10
14
  if (items.length === 0) {
11
15
  return;
@@ -25,10 +25,25 @@ export declare class RemotePlaybackController implements ReactiveController {
25
25
  /** Cancels the availability watch, since it outlives a single render. */
26
26
  private watch;
27
27
  constructor(host: ReactiveControllerHost, report: RemoteReport);
28
+ /** Whether the host is in the document, which a watch is only kept while. */
29
+ private connected;
28
30
  /** Starts watching the media element, once there is one. */
29
31
  attach(media: HTMLMediaElement): Promise<void>;
32
+ /**
33
+ * Asks to hear when a device turns up or goes, for the media attached.
34
+ *
35
+ * **A watch that arrives after the host has gone is canceled on arrival.**
36
+ * The platform answers asynchronously, and a video removed while it did kept
37
+ * a watch nothing would cancel.
38
+ */
39
+ private start;
30
40
  /** Opens the platform's own device picker. It has no list of its own. */
31
41
  prompt(): Promise<void>;
42
+ /**
43
+ * Watches again after a move. The disconnect canceled it, and `attach` is
44
+ * called once, so the control kept whatever it last knew about devices.
45
+ */
46
+ hostConnected(): void;
32
47
  hostDisconnected(): void;
33
48
  private readonly handleState;
34
49
  }
@@ -1,6 +1,7 @@
1
1
  export class RemotePlaybackController {
2
2
  constructor(host, report) {
3
3
  this.report = report;
4
+ this.connected = false;
4
5
  this.handleState = () => {
5
6
  this.report.connected(this.media?.remote?.state === 'connected');
6
7
  };
@@ -10,14 +11,22 @@ export class RemotePlaybackController {
10
11
  this.media = media;
11
12
  media.remote?.addEventListener?.('connect', this.handleState);
12
13
  media.remote?.addEventListener?.('disconnect', this.handleState);
13
- const remote = media.remote;
14
- if (!remote?.watchAvailability) {
14
+ await this.start();
15
+ }
16
+ async start() {
17
+ const remote = this.media?.remote;
18
+ if (!remote?.watchAvailability || this.watch !== undefined) {
15
19
  return;
16
20
  }
17
21
  try {
18
- this.watch = await remote.watchAvailability((available) => {
22
+ const watch = await remote.watchAvailability((available) => {
19
23
  this.report.available(available);
20
24
  });
25
+ if (!this.connected || this.watch !== undefined) {
26
+ void remote.cancelWatchAvailability?.(watch);
27
+ return;
28
+ }
29
+ this.watch = watch;
21
30
  }
22
31
  catch {
23
32
  }
@@ -29,7 +38,14 @@ export class RemotePlaybackController {
29
38
  catch {
30
39
  }
31
40
  }
41
+ hostConnected() {
42
+ this.connected = true;
43
+ if (this.media) {
44
+ void this.start();
45
+ }
46
+ }
32
47
  hostDisconnected() {
48
+ this.connected = false;
33
49
  if (this.watch !== undefined) {
34
50
  void this.media?.remote?.cancelWatchAvailability?.(this.watch);
35
51
  this.watch = undefined;
@@ -89,6 +89,230 @@ export interface ViewportZoomDetail {
89
89
  /** Which way, `1` in and `-1` out, so a consumer can multiply by their own step. */
90
90
  by: number;
91
91
  }
92
+ /**
93
+ * The board moved, which on a canvas is a fact rather than a request.
94
+ *
95
+ * **`Map` asks and `Canvas` tells, and the difference is who draws.** A map is
96
+ * somebody else's, so the frame can only ask them to move it; a canvas is drawn
97
+ * here from a document, so the same press moves it and this says that it did.
98
+ * The detail is the same shape either way, being a direction and a distance.
99
+ */
100
+ export declare class HelixCanvasPanEvent extends CustomEvent<ViewportPanDetail> {
101
+ static readonly eventName = "helix-canvas-pan";
102
+ constructor(detail: ViewportPanDetail);
103
+ }
104
+ /** The board zoomed, and told, for the same reason. */
105
+ export declare class HelixCanvasZoomEvent extends CustomEvent<ViewportZoomDetail> {
106
+ static readonly eventName = "helix-canvas-zoom";
107
+ constructor(detail: ViewportZoomDetail);
108
+ }
109
+ /**
110
+ * Where a move or a resize puts each card it carries, in the board's own
111
+ * units.
112
+ *
113
+ * **One contract for both**, because what a controlled page does with either
114
+ * is the same: write the geometry the detail says onto the cards it renders. A
115
+ * resize says `width` and `height` as well, and moves `x` and `y` too when it
116
+ * is dragged from a corner other than the bottom right.
117
+ */
118
+ export interface MoveDetail {
119
+ /**
120
+ * Every card the gesture moves, the one the reader took hold of first.
121
+ *
122
+ * **A list, because a group carries what is inside it.** Dragging a group
123
+ * moves its cards with it, which is what every board does, and a controlled
124
+ * consumer who refuses the move has to write every position it would have
125
+ * written, not only the one the pointer was on.
126
+ */
127
+ nodes: Array<{
128
+ name: string;
129
+ x: number;
130
+ y: number;
131
+ width?: number;
132
+ height?: number;
133
+ }>;
134
+ }
135
+ /**
136
+ * Cards are about to move, and can be refused.
137
+ *
138
+ * **This is the controlled half, the way `helix-before-open` is for a
139
+ * dialog.** A board moves its own cards by default, writing `x` and `y` onto
140
+ * each one the way an input writes its own value. A consumer who keeps the
141
+ * positions in their own state calls `preventDefault()` here, writes what the
142
+ * detail says into that state, and renders the cards where it puts them.
143
+ *
144
+ * Sent for every step of a drag, so a controlled board follows the pointer
145
+ * rather than jumping on the drop.
146
+ */
147
+ export declare class HelixBeforeMoveEvent extends CustomEvent<MoveDetail> {
148
+ static readonly eventName = "helix-before-move";
149
+ constructor(detail: MoveDetail);
150
+ }
151
+ /**
152
+ * Cards moved, and the move is finished: a drag let go, or a key press.
153
+ *
154
+ * The `change` to `helix-before-move`'s `input`: what a consumer binds who
155
+ * only wants to save a board once somebody has finished rearranging it.
156
+ */
157
+ export declare class HelixMoveEvent extends CustomEvent<MoveDetail> {
158
+ static readonly eventName = "helix-move";
159
+ constructor(detail: MoveDetail);
160
+ }
161
+ /** Which two cards a reader asked to join, by name, and the side they started from. */
162
+ export interface ConnectDetail {
163
+ from: string;
164
+ to: string;
165
+ /** The side the reader drew from, where they drew from one. */
166
+ fromSide?: 'top' | 'right' | 'bottom' | 'left' | undefined;
167
+ /** The side nearest where they let go, where they let go over a card. */
168
+ toSide?: 'top' | 'right' | 'bottom' | 'left' | undefined;
169
+ }
170
+ /**
171
+ * A reader asked for two cards to be joined.
172
+ *
173
+ * **A request with no default, which is the difference from a move.** A board
174
+ * writes a card's position onto the card, because the card is already there.
175
+ * A connection is a new element, and a board that added one to markup React
176
+ * renders would have it put back or thrown away on the next render. So the board
177
+ * asks and the page adds the `helix-canvas-edge`, the way `Map` asks to be panned.
178
+ */
179
+ export declare class HelixConnectEvent extends CustomEvent<ConnectDetail> {
180
+ static readonly eventName = "helix-connect";
181
+ constructor(detail: ConnectDetail);
182
+ }
183
+ /** Where a connection's ends are going, and where they were. */
184
+ export interface ReconnectDetail {
185
+ /** The connection's name, where it has one. */
186
+ name: string;
187
+ /** Its ends before, so a page that named none of its connections can find it. */
188
+ was: {
189
+ from: string;
190
+ to: string;
191
+ };
192
+ from: string;
193
+ to: string;
194
+ fromSide?: 'top' | 'right' | 'bottom' | 'left' | undefined;
195
+ toSide?: 'top' | 'right' | 'bottom' | 'left' | undefined;
196
+ }
197
+ /**
198
+ * A connection's end is about to move to another card or another side, and can
199
+ * be refused.
200
+ *
201
+ * **A move, not a request, and that is the difference from `helix-connect`.**
202
+ * The connection is already an element on the page, so the board rewrites its
203
+ * ends itself, the way it writes a card's position onto the card; a page that
204
+ * holds its connections in state refuses this and writes them there.
205
+ */
206
+ export declare class HelixBeforeReconnectEvent extends CustomEvent<ReconnectDetail> {
207
+ static readonly eventName = "helix-before-reconnect";
208
+ constructor(detail: ReconnectDetail);
209
+ }
210
+ /** A connection's end moved, and the move is finished. */
211
+ export declare class HelixReconnectEvent extends CustomEvent<ReconnectDetail> {
212
+ static readonly eventName = "helix-reconnect";
213
+ constructor(detail: ReconnectDetail);
214
+ }
215
+ /** A label a reader rewrote on a board, and what it said before. */
216
+ export interface RelabelDetail {
217
+ /** What was relabelled: a connection, or a group, whose name the board draws. */
218
+ target: 'edge' | 'group';
219
+ /** Its name on the board. */
220
+ name: string;
221
+ /** A connection's ends, so a page that named none of its connections can find it. */
222
+ from?: string | undefined;
223
+ to?: string | undefined;
224
+ /** The new label, empty for none. */
225
+ label: string;
226
+ /** The label before. */
227
+ was: string;
228
+ }
229
+ /**
230
+ * A label the board draws is about to change, and can be refused.
231
+ *
232
+ * **The board edits what it draws and asks for what it does not.** A
233
+ * connection's label and a group's name are drawn by the board from an
234
+ * attribute, so the board edits them in place and writes the attribute back,
235
+ * the way it writes a card's position; a page holding them in state refuses
236
+ * this and writes them there. A card's own content is the page's, which is why
237
+ * that is `helix-canvas-edit`, a request, rather than this.
238
+ */
239
+ export declare class HelixBeforeRelabelEvent extends CustomEvent<RelabelDetail> {
240
+ static readonly eventName = "helix-before-relabel";
241
+ constructor(detail: RelabelDetail);
242
+ }
243
+ /** A label the board draws changed. */
244
+ export declare class HelixRelabelEvent extends CustomEvent<RelabelDetail> {
245
+ static readonly eventName = "helix-relabel";
246
+ constructor(detail: RelabelDetail);
247
+ }
248
+ /**
249
+ * A reader asked to edit a card: a double-click, or Enter or F2 on it.
250
+ *
251
+ * **A request, because what a card holds is the page's.** Text, a picture, a
252
+ * chart: the board cannot know what editing any of those means, so it says
253
+ * which card and the page opens its own editor, in place, in a dialog, or in a
254
+ * panel beside the board.
255
+ */
256
+ export declare class HelixCanvasEditEvent extends CustomEvent<{
257
+ name: string;
258
+ }> {
259
+ static readonly eventName = "helix-canvas-edit";
260
+ constructor(detail: {
261
+ name: string;
262
+ });
263
+ }
264
+ /** What a reader asked to take off the board. */
265
+ export interface RemoveDetail {
266
+ /** The cards, by name. */
267
+ nodes: string[];
268
+ /**
269
+ * The connections, including every one attached to a card being removed,
270
+ * since a line to nothing is not drawn but its element would stay behind.
271
+ * Each carries its ends as well as its name, so a page that named none of
272
+ * its connections can still find them.
273
+ */
274
+ edges: Array<{
275
+ name: string;
276
+ from: string;
277
+ to: string;
278
+ }>;
279
+ }
280
+ /**
281
+ * A reader asked for cards or connections to be taken away.
282
+ *
283
+ * A request for the reason `helix-connect` is one: the elements are the page's,
284
+ * so the page removes them. Nothing to refuse, because nothing happens unless
285
+ * the page acts.
286
+ */
287
+ export declare class HelixRemoveEvent extends CustomEvent<RemoveDetail> {
288
+ static readonly eventName = "helix-remove";
289
+ constructor(detail: RemoveDetail);
290
+ }
291
+ /**
292
+ * Where a board is looking: the point at the middle of the view, in the
293
+ * document's own units, and how far it is zoomed.
294
+ *
295
+ * The middle rather than a corner, so a view saved in one box and restored in
296
+ * a box of another size shows the same thing in the middle of it.
297
+ */
298
+ export interface CanvasView {
299
+ x: number;
300
+ y: number;
301
+ zoom: number;
302
+ }
303
+ /**
304
+ * The board's view changed, however it changed: a drag, the wheel, a press on
305
+ * a control, a card brought into view, or the board fitting itself.
306
+ *
307
+ * **One event for all of them**, because what a consumer keeping a minimap or a
308
+ * saved position in step needs is where the board is now, not which of six
309
+ * gestures put it there; `helix-canvas-pan` and `helix-canvas-zoom` still say
310
+ * which control was pressed. Sent for every step of a drag, the way `input` is.
311
+ */
312
+ export declare class HelixCanvasViewEvent extends CustomEvent<CanvasView> {
313
+ static readonly eventName = "helix-canvas-view";
314
+ constructor(detail: CanvasView);
315
+ }
92
316
  /** What `ViewportPanDetail` was called when only Map had one. */
93
317
  export type MapPanDetail = ViewportPanDetail;
94
318
  /** What `ViewportZoomDetail` was called when only Map had one. */
@@ -789,14 +1013,22 @@ declare const registry: {
789
1013
  readonly HelixBeforeCloseEvent: typeof HelixBeforeCloseEvent;
790
1014
  readonly HelixBeforeCollapseEvent: typeof HelixBeforeCollapseEvent;
791
1015
  readonly HelixBeforeEditEvent: typeof HelixBeforeEditEvent;
1016
+ readonly HelixBeforeMoveEvent: typeof HelixBeforeMoveEvent;
792
1017
  readonly HelixBeforeOpenEvent: typeof HelixBeforeOpenEvent;
793
1018
  readonly HelixBeforePanelResizeEvent: typeof HelixBeforePanelResizeEvent;
794
1019
  readonly HelixBeforePinEvent: typeof HelixBeforePinEvent;
1020
+ readonly HelixBeforeReconnectEvent: typeof HelixBeforeReconnectEvent;
1021
+ readonly HelixBeforeRelabelEvent: typeof HelixBeforeRelabelEvent;
795
1022
  readonly HelixBeforeResizeEvent: typeof HelixBeforeResizeEvent;
796
1023
  readonly HelixBeforeSplitEvent: typeof HelixBeforeSplitEvent;
797
1024
  readonly HelixBeforeToggleEvent: typeof HelixBeforeToggleEvent;
1025
+ readonly HelixCanvasEditEvent: typeof HelixCanvasEditEvent;
1026
+ readonly HelixCanvasPanEvent: typeof HelixCanvasPanEvent;
1027
+ readonly HelixCanvasViewEvent: typeof HelixCanvasViewEvent;
1028
+ readonly HelixCanvasZoomEvent: typeof HelixCanvasZoomEvent;
798
1029
  readonly HelixCaretEvent: typeof HelixCaretEvent;
799
1030
  readonly HelixCompleteEvent: typeof HelixCompleteEvent;
1031
+ readonly HelixConnectEvent: typeof HelixConnectEvent;
800
1032
  readonly HelixConsoleEvent: typeof HelixConsoleEvent;
801
1033
  readonly HelixCopyEvent: typeof HelixCopyEvent;
802
1034
  readonly HelixCreateEvent: typeof HelixCreateEvent;
@@ -806,10 +1038,14 @@ declare const registry: {
806
1038
  readonly HelixHistoryEvent: typeof HelixHistoryEvent;
807
1039
  readonly HelixMapPanEvent: typeof HelixMapPanEvent;
808
1040
  readonly HelixMapZoomEvent: typeof HelixMapZoomEvent;
1041
+ readonly HelixMoveEvent: typeof HelixMoveEvent;
809
1042
  readonly HelixNavigateEvent: typeof HelixNavigateEvent;
810
1043
  readonly HelixNextEvent: typeof HelixNextEvent;
811
1044
  readonly HelixPreviousEvent: typeof HelixPreviousEvent;
812
1045
  readonly HelixReadEvent: typeof HelixReadEvent;
1046
+ readonly HelixReconnectEvent: typeof HelixReconnectEvent;
1047
+ readonly HelixRelabelEvent: typeof HelixRelabelEvent;
1048
+ readonly HelixRemoveEvent: typeof HelixRemoveEvent;
813
1049
  readonly HelixReorderEvent: typeof HelixReorderEvent;
814
1050
  readonly HelixResizeEvent: typeof HelixResizeEvent;
815
1051
  readonly HelixSampleEndEvent: typeof HelixSampleEndEvent;
@@ -42,6 +42,138 @@ export class HelixPreviousEvent extends CustomEvent {
42
42
  });
43
43
  }
44
44
  }
45
+ export class HelixCanvasPanEvent extends CustomEvent {
46
+ static { this.eventName = 'helix-canvas-pan'; }
47
+ constructor(detail) {
48
+ super(HelixCanvasPanEvent.eventName, {
49
+ bubbles: true,
50
+ cancelable: false,
51
+ composed: true,
52
+ detail,
53
+ });
54
+ }
55
+ }
56
+ export class HelixCanvasZoomEvent extends CustomEvent {
57
+ static { this.eventName = 'helix-canvas-zoom'; }
58
+ constructor(detail) {
59
+ super(HelixCanvasZoomEvent.eventName, {
60
+ bubbles: true,
61
+ cancelable: false,
62
+ composed: true,
63
+ detail,
64
+ });
65
+ }
66
+ }
67
+ export class HelixBeforeMoveEvent extends CustomEvent {
68
+ static { this.eventName = 'helix-before-move'; }
69
+ constructor(detail) {
70
+ super(HelixBeforeMoveEvent.eventName, {
71
+ bubbles: true,
72
+ cancelable: true,
73
+ composed: true,
74
+ detail,
75
+ });
76
+ }
77
+ }
78
+ export class HelixMoveEvent extends CustomEvent {
79
+ static { this.eventName = 'helix-move'; }
80
+ constructor(detail) {
81
+ super(HelixMoveEvent.eventName, {
82
+ bubbles: true,
83
+ cancelable: false,
84
+ composed: true,
85
+ detail,
86
+ });
87
+ }
88
+ }
89
+ export class HelixConnectEvent extends CustomEvent {
90
+ static { this.eventName = 'helix-connect'; }
91
+ constructor(detail) {
92
+ super(HelixConnectEvent.eventName, {
93
+ bubbles: true,
94
+ cancelable: false,
95
+ composed: true,
96
+ detail,
97
+ });
98
+ }
99
+ }
100
+ export class HelixBeforeReconnectEvent extends CustomEvent {
101
+ static { this.eventName = 'helix-before-reconnect'; }
102
+ constructor(detail) {
103
+ super(HelixBeforeReconnectEvent.eventName, {
104
+ bubbles: true,
105
+ cancelable: true,
106
+ composed: true,
107
+ detail,
108
+ });
109
+ }
110
+ }
111
+ export class HelixReconnectEvent extends CustomEvent {
112
+ static { this.eventName = 'helix-reconnect'; }
113
+ constructor(detail) {
114
+ super(HelixReconnectEvent.eventName, {
115
+ bubbles: true,
116
+ cancelable: false,
117
+ composed: true,
118
+ detail,
119
+ });
120
+ }
121
+ }
122
+ export class HelixBeforeRelabelEvent extends CustomEvent {
123
+ static { this.eventName = 'helix-before-relabel'; }
124
+ constructor(detail) {
125
+ super(HelixBeforeRelabelEvent.eventName, {
126
+ bubbles: true,
127
+ cancelable: true,
128
+ composed: true,
129
+ detail,
130
+ });
131
+ }
132
+ }
133
+ export class HelixRelabelEvent extends CustomEvent {
134
+ static { this.eventName = 'helix-relabel'; }
135
+ constructor(detail) {
136
+ super(HelixRelabelEvent.eventName, {
137
+ bubbles: true,
138
+ cancelable: false,
139
+ composed: true,
140
+ detail,
141
+ });
142
+ }
143
+ }
144
+ export class HelixCanvasEditEvent extends CustomEvent {
145
+ static { this.eventName = 'helix-canvas-edit'; }
146
+ constructor(detail) {
147
+ super(HelixCanvasEditEvent.eventName, {
148
+ bubbles: true,
149
+ cancelable: false,
150
+ composed: true,
151
+ detail,
152
+ });
153
+ }
154
+ }
155
+ export class HelixRemoveEvent extends CustomEvent {
156
+ static { this.eventName = 'helix-remove'; }
157
+ constructor(detail) {
158
+ super(HelixRemoveEvent.eventName, {
159
+ bubbles: true,
160
+ cancelable: false,
161
+ composed: true,
162
+ detail,
163
+ });
164
+ }
165
+ }
166
+ export class HelixCanvasViewEvent extends CustomEvent {
167
+ static { this.eventName = 'helix-canvas-view'; }
168
+ constructor(detail) {
169
+ super(HelixCanvasViewEvent.eventName, {
170
+ bubbles: true,
171
+ cancelable: false,
172
+ composed: true,
173
+ detail,
174
+ });
175
+ }
176
+ }
45
177
  export class HelixTourAskEvent extends CustomEvent {
46
178
  static { this.eventName = 'helix-tour-ask'; }
47
179
  constructor(detail) {
@@ -401,14 +533,22 @@ const registry = {
401
533
  HelixBeforeCloseEvent,
402
534
  HelixBeforeCollapseEvent,
403
535
  HelixBeforeEditEvent,
536
+ HelixBeforeMoveEvent,
404
537
  HelixBeforeOpenEvent,
405
538
  HelixBeforePanelResizeEvent,
406
539
  HelixBeforePinEvent,
540
+ HelixBeforeReconnectEvent,
541
+ HelixBeforeRelabelEvent,
407
542
  HelixBeforeResizeEvent,
408
543
  HelixBeforeSplitEvent,
409
544
  HelixBeforeToggleEvent,
545
+ HelixCanvasEditEvent,
546
+ HelixCanvasPanEvent,
547
+ HelixCanvasViewEvent,
548
+ HelixCanvasZoomEvent,
410
549
  HelixCaretEvent,
411
550
  HelixCompleteEvent,
551
+ HelixConnectEvent,
412
552
  HelixConsoleEvent,
413
553
  HelixCopyEvent,
414
554
  HelixCreateEvent,
@@ -418,10 +558,14 @@ const registry = {
418
558
  HelixHistoryEvent,
419
559
  HelixMapPanEvent,
420
560
  HelixMapZoomEvent,
561
+ HelixMoveEvent,
421
562
  HelixNavigateEvent,
422
563
  HelixNextEvent,
423
564
  HelixPreviousEvent,
424
565
  HelixReadEvent,
566
+ HelixReconnectEvent,
567
+ HelixRelabelEvent,
568
+ HelixRemoveEvent,
425
569
  HelixReorderEvent,
426
570
  HelixResizeEvent,
427
571
  HelixSampleEndEvent,
@@ -111,6 +111,15 @@ export declare class HelixFormElement extends HelixElement {
111
111
  * middle of removing.
112
112
  */
113
113
  formDisabledCallback(disabled: boolean): void;
114
+ /**
115
+ * The form was reset. Nothing here, and every override calls it.
116
+ *
117
+ * **A chain rather than a leaf**, because more than one layer owes a reset
118
+ * something: the value mixin its default, and the field mixin beneath it the
119
+ * forgetting of a reader's past attempt, whose message otherwise showed over
120
+ * the emptied control the moment the form was reset.
121
+ */
122
+ formResetCallback(): void;
114
123
  protected willUpdate(changed: PropertyValues): void;
115
124
  /**
116
125
  * Announces `input` from the host, the way the control it stands for would.
@@ -20,6 +20,7 @@ export class HelixFormElement extends HelixElement {
20
20
  formDisabledCallback(disabled) {
21
21
  this.formDisabled = disabled && !this.disabled;
22
22
  }
23
+ formResetCallback() { }
23
24
  willUpdate(changed) {
24
25
  super.willUpdate(changed);
25
26
  this.internals.ariaDisabled = this.isDisabled ? 'true' : null;