@fusion.dev/helix-core 0.143.0 → 0.145.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 +10266 -4161
- package/dist/controllers/aria-forward-controller/aria-forward-controller.d.ts +10 -0
- package/dist/controllers/aria-forward-controller/aria-forward-controller.js +6 -0
- package/dist/controllers/chart-pointer-controller/chart-pointer-controller.d.ts +89 -0
- package/dist/controllers/chart-pointer-controller/chart-pointer-controller.js +102 -1
- package/dist/controllers/chart-pointer-controller/reading-step.d.ts +57 -0
- package/dist/controllers/chart-pointer-controller/reading-step.js +45 -0
- package/dist/controllers/copy-controller/copy-controller.d.ts +11 -6
- package/dist/controllers/copy-controller/copy-controller.js +11 -9
- package/dist/controllers/countdown-controller/countdown-controller.d.ts +55 -0
- package/dist/controllers/countdown-controller/countdown-controller.js +57 -0
- package/dist/controllers/delay-controller/delay-controller.d.ts +50 -0
- package/dist/controllers/delay-controller/delay-controller.js +54 -0
- package/dist/controllers/focus-scope-controller/focus-scope-controller.d.ts +56 -0
- package/dist/controllers/focus-scope-controller/focus-scope-controller.js +71 -0
- package/dist/controllers/keyboard-navigation-controller/keyboard-navigation-controller.d.ts +11 -2
- package/dist/controllers/keyboard-navigation-controller/keyboard-navigation-controller.js +4 -1
- package/dist/controllers/open-phase-controller/open-phase-controller.d.ts +49 -0
- package/dist/controllers/open-phase-controller/open-phase-controller.js +41 -0
- package/dist/controllers/source-controller/source-controller.d.ts +16 -0
- package/dist/controllers/source-controller/source-controller.js +44 -1
- package/dist/controllers/status-controller/status-controller.d.ts +47 -0
- package/dist/controllers/status-controller/status-controller.js +34 -0
- package/dist/controllers/swipe-controller/swipe-controller.d.ts +61 -0
- package/dist/controllers/swipe-controller/swipe-controller.js +106 -0
- package/dist/controllers/virtualize-controller/virtualize-controller.d.ts +68 -35
- package/dist/controllers/virtualize-controller/virtualize-controller.js +77 -10
- package/dist/events/events.d.ts +221 -0
- package/dist/events/events.js +150 -0
- package/dist/helix-element/helix-element.js +14 -1
- package/dist/helix-element/react-bridge.d.ts +9 -4
- package/dist/helix-element/react-bridge.js +14 -1
- package/dist/index.d.ts +31 -9
- package/dist/index.js +29 -7
- package/dist/mixins/mixin-chart-source/mixin-chart-source.d.ts +7 -2
- package/dist/mixins/mixin-chart-source/mixin-chart-source.js +5 -1
- package/dist/mixins/mixin-controller-checked/mixin-controller-checked.d.ts +10 -0
- package/dist/mixins/mixin-controller-checked/mixin-controller-checked.js +9 -0
- package/dist/mixins/mixin-dismissible/mixin-dismissible.d.ts +2 -0
- package/dist/mixins/mixin-dismissible/mixin-dismissible.js +7 -3
- package/dist/mixins/mixin-field/mixin-field.d.ts +2 -0
- package/dist/mixins/mixin-field/mixin-field.js +8 -0
- package/dist/mixins/mixin-picker-editing/mixin-picker-editing.d.ts +16 -6
- package/dist/mixins/mixin-picker-editing/mixin-picker-editing.js +19 -1
- package/dist/mixins/mixin-picker-field/mixin-picker-field.d.ts +5 -4
- package/dist/mixins/mixin-picker-field/mixin-picker-field.js +12 -1
- package/dist/mixins/mixin-segmented-field/mixin-segmented-field.d.ts +67 -0
- package/dist/mixins/mixin-segmented-field/mixin-segmented-field.js +243 -0
- package/dist/utils/arrow/arrow.d.ts +15 -0
- package/dist/utils/arrow/arrow.js +2 -0
- package/dist/utils/audit-name/audit-name.d.ts +28 -0
- package/dist/utils/audit-name/audit-name.js +95 -0
- package/dist/utils/calendar/calendar.d.ts +117 -0
- package/dist/utils/calendar/calendar.js +96 -0
- package/dist/utils/chord/chord.d.ts +43 -0
- package/dist/utils/chord/chord.js +53 -0
- package/dist/utils/clock/clock.d.ts +87 -0
- package/dist/utils/clock/clock.js +68 -0
- package/dist/utils/color-name/color-name.d.ts +28 -0
- package/dist/utils/color-name/color-name.js +150 -0
- package/dist/utils/count-label/count-label.d.ts +13 -0
- package/dist/utils/count-label/count-label.js +5 -0
- package/dist/utils/css-color/css-color.d.ts +12 -0
- package/dist/utils/css-color/css-color.js +2 -2
- package/dist/utils/date-segments/date-segments.d.ts +122 -0
- package/dist/utils/date-segments/date-segments.js +206 -0
- package/dist/utils/draw-dismiss/draw-dismiss.d.ts +30 -0
- package/dist/utils/draw-dismiss/draw-dismiss.js +16 -0
- package/dist/utils/draw-icon/draw-icon.d.ts +7 -6
- package/dist/utils/draw-tooltip/draw-tooltip.d.ts +15 -21
- package/dist/utils/draw-tooltip/draw-tooltip.js +11 -5
- package/dist/utils/draw-tooltip/spoken-reading.d.ts +10 -0
- package/dist/utils/draw-tooltip/spoken-reading.js +10 -0
- package/dist/utils/follow-link/follow-link.d.ts +46 -0
- package/dist/utils/follow-link/follow-link.js +37 -0
- package/dist/utils/heading-in/heading-in.d.ts +19 -0
- package/dist/utils/heading-in/heading-in.js +14 -0
- package/dist/utils/number-format/number-format.d.ts +23 -0
- package/dist/utils/number-format/number-format.js +55 -0
- package/dist/utils/platform/platform.d.ts +23 -0
- package/dist/utils/platform/platform.js +11 -0
- package/dist/utils/range-add/range-add.d.ts +19 -0
- package/dist/utils/range-add/range-add.js +5 -0
- package/dist/utils/read-color/read-color.d.ts +14 -0
- package/dist/utils/read-color/read-color.js +13 -0
- package/dist/utils/read-series/read-series.d.ts +6 -0
- package/dist/utils/read-series/read-series.js +1 -0
- package/dist/utils/reflect-elements/reflect-elements.d.ts +37 -0
- package/dist/utils/reflect-elements/reflect-elements.js +40 -0
- package/dist/utils/relative-time/relative-time.d.ts +13 -1
- package/dist/utils/relative-time/relative-time.js +7 -4
- package/dist/utils/report-runtime/report-runtime.d.ts +5 -1
- package/dist/utils/roving-stop/roving-stop.d.ts +20 -0
- package/dist/utils/roving-stop/roving-stop.js +3 -0
- package/dist/utils/swipe/swipe.d.ts +63 -0
- package/dist/utils/swipe/swipe.js +48 -0
- package/dist/utils/tab-stops/tab-stops.d.ts +16 -0
- package/dist/utils/tab-stops/tab-stops.js +22 -0
- package/dist/utils/value-as/value-as.d.ts +20 -0
- package/dist/utils/value-as/value-as.js +16 -0
- package/dist/utils/write-time/write-time.d.ts +15 -5
- package/dist/utils/write-time/write-time.js +7 -7
- package/dist/utils/written-list/written-list.d.ts +18 -0
- package/dist/utils/written-list/written-list.js +8 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
|
@@ -63,6 +63,16 @@ export interface Window {
|
|
|
63
63
|
/** Index one past the last item rendered. */
|
|
64
64
|
last: number;
|
|
65
65
|
}
|
|
66
|
+
/** Where `reveal` puts an item, and how it gets there. */
|
|
67
|
+
export interface RevealOptions {
|
|
68
|
+
/**
|
|
69
|
+
* Where the item lands: the least distance that shows it whole (`nearest`,
|
|
70
|
+
* the default), or at the box's `start`, `center` or `end`.
|
|
71
|
+
*/
|
|
72
|
+
align?: 'center' | 'end' | 'nearest' | 'start';
|
|
73
|
+
/** The platform's scroll behavior. Instant when left out. */
|
|
74
|
+
behavior?: ScrollBehavior;
|
|
75
|
+
}
|
|
66
76
|
/**
|
|
67
77
|
* Works out which slice of a long set is worth rendering.
|
|
68
78
|
*
|
|
@@ -86,35 +96,14 @@ export interface Window {
|
|
|
86
96
|
* track, so the room the absent rows would have taken is left as padding before
|
|
87
97
|
* and after. A reader dragging that thumb is dragging against the real length.
|
|
88
98
|
*
|
|
89
|
-
* **
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* not
|
|
97
|
-
*
|
|
98
|
-
* **A third channel is open.** Data as *text*
|
|
99
|
-
* in the markup, a `<script type="application/json">` child or an attribute, is
|
|
100
|
-
* neither a property nor a node per row: React's hydration bug cannot touch text
|
|
101
|
-
* it renders as a child, a server emits it, and the node count is one. The
|
|
102
|
-
* charts already read data out of the document this way, `for="<id>"` at a real
|
|
103
|
-
* `<table>`, so the pattern is in the library rather than being invented for
|
|
104
|
-
* this.
|
|
105
|
-
*
|
|
106
|
-
* So the thing actually blocked is the *row template*. Turning an item into
|
|
107
|
-
* markup wants either a render function, which is a function property and dies
|
|
108
|
-
* on the same bug, or a `<template>` with named holes, which survives because it
|
|
109
|
-
* is markup and which no component here asks anyone to write. That is a decision
|
|
110
|
-
* about what this library is willing to look like, not a platform limit, and it
|
|
111
|
-
* is open at #71.
|
|
112
|
-
*
|
|
113
|
-
* So what this buys is the expensive half rather than all of it: the rows
|
|
114
|
-
* outside the window are not laid out and not painted, which is where the time
|
|
115
|
-
* goes in a long list, and the node count stays. That is worth having and it is
|
|
116
|
-
* not worth calling something it is not. An element that windows children it
|
|
117
|
-
* was handed is not a virtual list, whatever it is named.
|
|
99
|
+
* **The set arrives as data**, which is what lets a host create only the rows
|
|
100
|
+
* in the window. A host takes it through a property (an `items` array, which
|
|
101
|
+
* `applyReactProperties` carries across React hydration with every other object
|
|
102
|
+
* property) or as text in the markup (a `<script type="application/json">`
|
|
103
|
+
* named by `for`, which a server emits and which is one node whatever the
|
|
104
|
+
* row count). A host that is handed its rows as light-DOM children still gets
|
|
105
|
+
* the expensive half from this: the rows outside the window are not laid out
|
|
106
|
+
* and not painted, and the node count stays.
|
|
118
107
|
*
|
|
119
108
|
* **One estimate, not per-row measurement.** Measuring every row to place it is
|
|
120
109
|
* how a virtual list ends up reading the layout it is trying to avoid, and it
|
|
@@ -166,6 +155,39 @@ export declare class VirtualizeController implements ReactiveController {
|
|
|
166
155
|
* on screen plus the overscan, whatever the set's length.
|
|
167
156
|
*/
|
|
168
157
|
private placed;
|
|
158
|
+
/**
|
|
159
|
+
* The items on screen, with no overscan: `first` is the item at the top of
|
|
160
|
+
* the box and `last` is one past the item at its bottom, so
|
|
161
|
+
* `items.slice(first, last)` is what a reader sees.
|
|
162
|
+
*
|
|
163
|
+
* For a host that reports what is visible, where `window` is what is drawn.
|
|
164
|
+
* An empty span (`first === last`) while the box has no height or the set
|
|
165
|
+
* no items.
|
|
166
|
+
*/
|
|
167
|
+
visible(): {
|
|
168
|
+
first: number;
|
|
169
|
+
last: number;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* How much of the set lies below the bottom of the box, in pixels.
|
|
173
|
+
*
|
|
174
|
+
* For a host that asks for more items as a reader nears the end. Read from
|
|
175
|
+
* the arithmetic and not from `scrollHeight`, which also counts whatever the
|
|
176
|
+
* host draws around the rows.
|
|
177
|
+
*/
|
|
178
|
+
remaining(): number;
|
|
179
|
+
/**
|
|
180
|
+
* The two spacers' heights for the window, with item `kept` drawn too.
|
|
181
|
+
*
|
|
182
|
+
* For a host that keeps an item outside the window drawn, the row holding
|
|
183
|
+
* focus say. The item takes its own room out of the spacer on its side, so
|
|
184
|
+
* the scrollbar still measures the set. Every host that keeps a focused row
|
|
185
|
+
* asks this, so the arithmetic is written once.
|
|
186
|
+
*/
|
|
187
|
+
spacers(kept?: number): {
|
|
188
|
+
after: number;
|
|
189
|
+
before: number;
|
|
190
|
+
};
|
|
169
191
|
/**
|
|
170
192
|
* Measures what was just drawn, and holds the reader still if it moved.
|
|
171
193
|
*
|
|
@@ -206,14 +228,25 @@ export declare class VirtualizeController implements ReactiveController {
|
|
|
206
228
|
*/
|
|
207
229
|
sizeOf(index: number): number;
|
|
208
230
|
/**
|
|
209
|
-
* Scrolls the box
|
|
231
|
+
* Scrolls the box to show item `index`.
|
|
232
|
+
*
|
|
233
|
+
* By default the least distance that shows it whole, for a host moving focus
|
|
234
|
+
* to an item outside the window, whose own element cannot be scrolled to
|
|
235
|
+
* because it is not drawn where it belongs. `inset` is how far into the box
|
|
236
|
+
* the items start, for a heading that sticks at its top and covers that much
|
|
237
|
+
* of every item scrolled under it.
|
|
210
238
|
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
239
|
+
* `align` puts the item at the box's `start`, `center` or `end` instead, and
|
|
240
|
+
* `behavior` is the platform's, for a host whose consumer asked to be taken
|
|
241
|
+
* to an item. A smooth scroll moves the window through the box's own
|
|
242
|
+
* `scroll` events, the same as a reader scrolling.
|
|
243
|
+
*/
|
|
244
|
+
reveal(index: number, inset?: number, { align, behavior }?: RevealOptions): void;
|
|
245
|
+
/**
|
|
246
|
+
* Where item `index` starts along the scroll axis, in pixels from the top of
|
|
247
|
+
* the set: what was measured above it, or the estimate.
|
|
215
248
|
*/
|
|
216
|
-
|
|
249
|
+
offsetOf(index: number): number;
|
|
217
250
|
/**
|
|
218
251
|
* Drops every measurement, for a host that swapped its data.
|
|
219
252
|
*
|
|
@@ -39,6 +39,7 @@ export class VirtualizeController {
|
|
|
39
39
|
}
|
|
40
40
|
this.observer.observe(box);
|
|
41
41
|
box.addEventListener('scroll', this.handleScroll, { passive: true });
|
|
42
|
+
box.setAttribute('data-virtual', '');
|
|
42
43
|
this.watching = true;
|
|
43
44
|
}
|
|
44
45
|
measure() {
|
|
@@ -97,6 +98,48 @@ export class VirtualizeController {
|
|
|
97
98
|
last,
|
|
98
99
|
};
|
|
99
100
|
}
|
|
101
|
+
visible() {
|
|
102
|
+
const box = this.options.container();
|
|
103
|
+
const total = Math.max(0, this.options.count());
|
|
104
|
+
if (!box || total === 0) {
|
|
105
|
+
return { first: 0, last: 0 };
|
|
106
|
+
}
|
|
107
|
+
const top = Math.max(0, box.scrollTop);
|
|
108
|
+
const bottom = top + box.clientHeight;
|
|
109
|
+
if (!this.measuring()) {
|
|
110
|
+
const size = Math.max(1, this.options.estimate());
|
|
111
|
+
const first = Math.min(Math.floor(top / size), total);
|
|
112
|
+
return { first, last: Math.max(first, Math.min(total, Math.ceil(bottom / size))) };
|
|
113
|
+
}
|
|
114
|
+
const first = this.heights.indexAt(top, total);
|
|
115
|
+
let last = first;
|
|
116
|
+
while (last < total && this.heights.before(last, total) < bottom) {
|
|
117
|
+
last += 1;
|
|
118
|
+
}
|
|
119
|
+
return { first, last };
|
|
120
|
+
}
|
|
121
|
+
remaining() {
|
|
122
|
+
const box = this.options.container();
|
|
123
|
+
const total = Math.max(0, this.options.count());
|
|
124
|
+
if (!box) {
|
|
125
|
+
return 0;
|
|
126
|
+
}
|
|
127
|
+
const length = this.measuring()
|
|
128
|
+
? this.heights.total(total)
|
|
129
|
+
: total * Math.max(1, this.options.estimate());
|
|
130
|
+
return Math.max(0, length - Math.max(0, box.scrollTop) - box.clientHeight);
|
|
131
|
+
}
|
|
132
|
+
spacers(kept) {
|
|
133
|
+
const { after, before, first, last } = this.window;
|
|
134
|
+
if (kept === undefined || (kept >= first && kept < last)) {
|
|
135
|
+
return { after, before };
|
|
136
|
+
}
|
|
137
|
+
const room = this.sizeOf(kept);
|
|
138
|
+
return {
|
|
139
|
+
after: kept >= last ? Math.max(0, after - room) : after,
|
|
140
|
+
before: kept < first ? Math.max(0, before - room) : before,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
100
143
|
hostUpdated() {
|
|
101
144
|
if (this.owed !== 0) {
|
|
102
145
|
const box = this.options.container();
|
|
@@ -149,22 +192,46 @@ export class VirtualizeController {
|
|
|
149
192
|
sizeOf(index) {
|
|
150
193
|
return this.measuring() ? this.heights.at(index) : Math.max(1, this.options.estimate());
|
|
151
194
|
}
|
|
152
|
-
reveal(index, inset = 0) {
|
|
195
|
+
reveal(index, inset = 0, { align = 'nearest', behavior } = {}) {
|
|
153
196
|
const box = this.options.container();
|
|
154
197
|
if (!box) {
|
|
155
198
|
return;
|
|
156
199
|
}
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
200
|
+
const top = this.offsetOf(index);
|
|
201
|
+
const size = this.sizeOf(index);
|
|
202
|
+
const room = box.clientHeight - inset;
|
|
203
|
+
let to;
|
|
204
|
+
if (align === 'start') {
|
|
205
|
+
to = top;
|
|
206
|
+
}
|
|
207
|
+
else if (align === 'center') {
|
|
208
|
+
to = top - inset - (room - size) / 2;
|
|
209
|
+
}
|
|
210
|
+
else if (align === 'end') {
|
|
211
|
+
to = top + size + inset - box.clientHeight;
|
|
212
|
+
}
|
|
213
|
+
else if (top < box.scrollTop) {
|
|
214
|
+
to = top;
|
|
164
215
|
}
|
|
165
|
-
else if (
|
|
166
|
-
|
|
216
|
+
else if (top + size + inset > box.scrollTop + box.clientHeight) {
|
|
217
|
+
to = top + size + inset - box.clientHeight;
|
|
167
218
|
}
|
|
219
|
+
else {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const next = Math.max(0, to);
|
|
223
|
+
if (behavior && typeof box.scrollTo === 'function') {
|
|
224
|
+
box.scrollTo({ behavior, top: next });
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
box.scrollTop = next;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
offsetOf(index) {
|
|
231
|
+
const total = Math.max(0, this.options.count());
|
|
232
|
+
return this.measuring()
|
|
233
|
+
? this.heights.before(index, total)
|
|
234
|
+
: Math.max(0, Math.min(index, total)) * Math.max(1, this.options.estimate());
|
|
168
235
|
}
|
|
169
236
|
forget() {
|
|
170
237
|
this.heights.forget();
|
package/dist/events/events.d.ts
CHANGED
|
@@ -261,6 +261,34 @@ export declare class HelixCanvasEditEvent extends CustomEvent<{
|
|
|
261
261
|
name: string;
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
|
+
/** Why a file field did not take a file. */
|
|
265
|
+
export type Refusal = 'count' | 'invalid' | 'size' | 'type';
|
|
266
|
+
/** One file a file field did not take, and why. */
|
|
267
|
+
export interface RefusedFile {
|
|
268
|
+
/** The file. */
|
|
269
|
+
readonly file: File;
|
|
270
|
+
/** What the field's `validate` said about it, where it was the one refusing. */
|
|
271
|
+
readonly message?: string;
|
|
272
|
+
/** Why it was not taken. */
|
|
273
|
+
readonly reason: Refusal;
|
|
274
|
+
}
|
|
275
|
+
/** The files a file field refused. */
|
|
276
|
+
export interface RejectDetail {
|
|
277
|
+
/** Each refused file with its reason, in the order they arrived. */
|
|
278
|
+
files: RefusedFile[];
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Files arrived at a file field and some were refused: by `accept`, by
|
|
282
|
+
* `max-file-size`, by `max-files`, or by the field's own `validate`.
|
|
283
|
+
*
|
|
284
|
+
* A notification and not a request, because the files are already left out;
|
|
285
|
+
* the event is how a page tells the reader why. Bubbles and is composed, so a
|
|
286
|
+
* form around the field hears it.
|
|
287
|
+
*/
|
|
288
|
+
export declare class HelixRejectEvent extends CustomEvent<RejectDetail> {
|
|
289
|
+
static readonly eventName = "helix-reject";
|
|
290
|
+
constructor(detail: RejectDetail);
|
|
291
|
+
}
|
|
264
292
|
/** What a reader asked to take off the board. */
|
|
265
293
|
export interface RemoveDetail {
|
|
266
294
|
/** The cards, by name. */
|
|
@@ -799,6 +827,17 @@ export declare class HelixBeforeSplitEvent extends CustomEvent<ChangeDetail> {
|
|
|
799
827
|
static readonly eventName = "helix-before-split";
|
|
800
828
|
constructor(detail: ChangeDetail);
|
|
801
829
|
}
|
|
830
|
+
/**
|
|
831
|
+
* The divider between a sandbox's panes settled somewhere new.
|
|
832
|
+
*
|
|
833
|
+
* The notification half of `helix-before-split`, sent once `split` has moved,
|
|
834
|
+
* with the lead pane's new share. Not cancelable: the decision was the
|
|
835
|
+
* request's.
|
|
836
|
+
*/
|
|
837
|
+
export declare class HelixSplitEvent extends CustomEvent<ChangeDetail> {
|
|
838
|
+
static readonly eventName = "helix-split";
|
|
839
|
+
constructor(detail: ChangeDetail);
|
|
840
|
+
}
|
|
802
841
|
/**
|
|
803
842
|
* A sandbox's panel is about to change height, and can be refused.
|
|
804
843
|
*
|
|
@@ -811,6 +850,17 @@ export declare class HelixBeforePanelResizeEvent extends CustomEvent<ChangeDetai
|
|
|
811
850
|
static readonly eventName = "helix-before-panel-resize";
|
|
812
851
|
constructor(detail: ChangeDetail);
|
|
813
852
|
}
|
|
853
|
+
/**
|
|
854
|
+
* A sandbox's panel settled at a new height.
|
|
855
|
+
*
|
|
856
|
+
* The notification half of `helix-before-panel-resize`, sent once `panelSize`
|
|
857
|
+
* has moved, with the height in pixels. Not cancelable: the decision was the
|
|
858
|
+
* request's.
|
|
859
|
+
*/
|
|
860
|
+
export declare class HelixPanelResizeEvent extends CustomEvent<ChangeDetail> {
|
|
861
|
+
static readonly eventName = "helix-panel-resize";
|
|
862
|
+
constructor(detail: ChangeDetail);
|
|
863
|
+
}
|
|
814
864
|
/** A pane is about to collapse or reopen, and can be refused. */
|
|
815
865
|
export declare class HelixBeforeCollapseEvent extends CustomEvent<ChangeDetail> {
|
|
816
866
|
static readonly eventName = "helix-before-collapse";
|
|
@@ -832,6 +882,17 @@ export declare class HelixBeforeEditEvent extends CustomEvent<ChangeDetail> {
|
|
|
832
882
|
static readonly eventName = "helix-before-edit";
|
|
833
883
|
constructor(detail: ChangeDetail);
|
|
834
884
|
}
|
|
885
|
+
/**
|
|
886
|
+
* Source was edited.
|
|
887
|
+
*
|
|
888
|
+
* The notification half of `helix-before-edit`, sent once the pane holds the
|
|
889
|
+
* new source, with that source. Not cancelable: the decision was the
|
|
890
|
+
* request's.
|
|
891
|
+
*/
|
|
892
|
+
export declare class HelixEditEvent extends CustomEvent<ChangeDetail> {
|
|
893
|
+
static readonly eventName = "helix-edit";
|
|
894
|
+
constructor(detail: ChangeDetail);
|
|
895
|
+
}
|
|
835
896
|
/**
|
|
836
897
|
* A value is about to change, and the change can be refused.
|
|
837
898
|
*
|
|
@@ -914,6 +975,145 @@ export declare class HelixCreateEvent extends CustomEvent<CreateDetail> {
|
|
|
914
975
|
static readonly eventName = "helix-create";
|
|
915
976
|
constructor(detail: CreateDetail);
|
|
916
977
|
}
|
|
978
|
+
/** Detail carried by `helix-aura-fallback`. */
|
|
979
|
+
export interface AuraFallbackDetail {
|
|
980
|
+
/**
|
|
981
|
+
* Why the gradient shows: `software` for a renderer that draws on the CPU,
|
|
982
|
+
* `unavailable` for no WebGL or a shader the browser refused, and `lost` for
|
|
983
|
+
* a context the browser took back, on a GPU reset or past its limit of about
|
|
984
|
+
* sixteen.
|
|
985
|
+
*/
|
|
986
|
+
reason: 'lost' | 'software' | 'unavailable';
|
|
987
|
+
}
|
|
988
|
+
/**
|
|
989
|
+
* An aura stopped drawing its shader and shows its gradient, and says why.
|
|
990
|
+
*
|
|
991
|
+
* Sent each time it falls back, from the aura, which then matches
|
|
992
|
+
* `:state(fallback)` until it draws again. Not cancelable: there is nothing
|
|
993
|
+
* left to refuse.
|
|
994
|
+
*/
|
|
995
|
+
export declare class HelixAuraFallbackEvent extends CustomEvent<AuraFallbackDetail> {
|
|
996
|
+
static readonly eventName = "helix-aura-fallback";
|
|
997
|
+
constructor(detail: AuraFallbackDetail);
|
|
998
|
+
}
|
|
999
|
+
/**
|
|
1000
|
+
* A reader cleared the value: an input's clear button emptied the field, or a
|
|
1001
|
+
* clearable rating went back to unrated.
|
|
1002
|
+
*
|
|
1003
|
+
* Sent after the value is cleared, and after the `input` and `change` the
|
|
1004
|
+
* clear sends. Carries nothing, because the value is the cleared one.
|
|
1005
|
+
*/
|
|
1006
|
+
export declare class HelixClearEvent extends Event {
|
|
1007
|
+
static readonly eventName = "helix-clear";
|
|
1008
|
+
constructor();
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* A press put nothing on the clipboard: the browser did not allow the write,
|
|
1012
|
+
* such as on a page without the clipboard permission, or there was nothing to
|
|
1013
|
+
* copy.
|
|
1014
|
+
*/
|
|
1015
|
+
export declare class HelixCopyErrorEvent extends Event {
|
|
1016
|
+
static readonly eventName = "helix-copy-error";
|
|
1017
|
+
constructor();
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* A reader asked for more items: a feed's or a table's `load-more` button, or
|
|
1021
|
+
* a list scrolled near its end. Append them, and set `loading` while they are
|
|
1022
|
+
* on their way.
|
|
1023
|
+
*
|
|
1024
|
+
* Carries nothing, because what comes next is the consumer's to know. Not
|
|
1025
|
+
* cancelable: nothing is loaded until the consumer loads it.
|
|
1026
|
+
*/
|
|
1027
|
+
export declare class HelixLoadMoreEvent extends Event {
|
|
1028
|
+
static readonly eventName = "helix-load-more";
|
|
1029
|
+
constructor();
|
|
1030
|
+
}
|
|
1031
|
+
/**
|
|
1032
|
+
* A lazy branch opened and asks for its children: a tree item with `lazy`.
|
|
1033
|
+
* Sent from the item, so `target` is the branch to fill.
|
|
1034
|
+
*
|
|
1035
|
+
* Carries nothing, because the children are the consumer's to fetch. Not
|
|
1036
|
+
* cancelable: the branch is already open, and says it is busy until children
|
|
1037
|
+
* arrive.
|
|
1038
|
+
*/
|
|
1039
|
+
export declare class HelixLoadEvent extends Event {
|
|
1040
|
+
static readonly eventName = "helix-load";
|
|
1041
|
+
constructor();
|
|
1042
|
+
}
|
|
1043
|
+
/** Detail carried by `helix-range-change`. */
|
|
1044
|
+
export interface RangeDetail {
|
|
1045
|
+
/** The index of the first item on screen. */
|
|
1046
|
+
first: number;
|
|
1047
|
+
/** One past the index of the last item on screen. */
|
|
1048
|
+
last: number;
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* The items on screen changed: a virtual list was scrolled or resized, or its
|
|
1052
|
+
* items changed. Carries the new range, which the list's `range` also holds.
|
|
1053
|
+
* Not cancelable: the list has already moved.
|
|
1054
|
+
*/
|
|
1055
|
+
export declare class HelixRangeChangeEvent extends CustomEvent<RangeDetail> {
|
|
1056
|
+
static readonly eventName = "helix-range-change";
|
|
1057
|
+
constructor(detail: RangeDetail);
|
|
1058
|
+
}
|
|
1059
|
+
/**
|
|
1060
|
+
* Rows opened or closed in place: a data table's tree of rows. Carries every
|
|
1061
|
+
* open row's key, separated by commas, which the table's `expanded` also
|
|
1062
|
+
* holds. Not cancelable: the rows have already moved.
|
|
1063
|
+
*/
|
|
1064
|
+
export declare class HelixExpandEvent extends CustomEvent<ChangeDetail> {
|
|
1065
|
+
static readonly eventName = "helix-expand";
|
|
1066
|
+
constructor(detail: ChangeDetail);
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* A sequence played to its last entry and stopped there: a video playlist
|
|
1070
|
+
* with no `repeat`. Carries nothing, because the playlist still holds the last
|
|
1071
|
+
* entry. Not cancelable: playback has already ended.
|
|
1072
|
+
*/
|
|
1073
|
+
export declare class HelixEndEvent extends Event {
|
|
1074
|
+
static readonly eventName = "helix-end";
|
|
1075
|
+
constructor();
|
|
1076
|
+
}
|
|
1077
|
+
/** Detail carried by `helix-typing`. */
|
|
1078
|
+
export interface TypingDetail {
|
|
1079
|
+
/** Whether the user is writing now, as a boolean and not a word that reads like one. */
|
|
1080
|
+
typing: boolean;
|
|
1081
|
+
}
|
|
1082
|
+
/**
|
|
1083
|
+
* The user started or stopped writing: a chat composer, for a typing
|
|
1084
|
+
* indicator on the other side. Carries which, as the composer's `typing` does.
|
|
1085
|
+
* Not cancelable: it reports what the user did.
|
|
1086
|
+
*/
|
|
1087
|
+
export declare class HelixTypingEvent extends CustomEvent<TypingDetail> {
|
|
1088
|
+
static readonly eventName = "helix-typing";
|
|
1089
|
+
constructor(detail: TypingDetail);
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* A reader acted on a row: Enter on a list row, or a press in a list that
|
|
1093
|
+
* selects nothing. Sent from the row, so `target` is the row acted on.
|
|
1094
|
+
*
|
|
1095
|
+
* Carries nothing, because the row is the whole of the answer. Not cancelable:
|
|
1096
|
+
* a row with a link follows it and sends nothing, so there is no default left
|
|
1097
|
+
* to refuse.
|
|
1098
|
+
*/
|
|
1099
|
+
export declare class HelixActionEvent extends Event {
|
|
1100
|
+
static readonly eventName = "helix-action";
|
|
1101
|
+
constructor();
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* A checked state changed after `helix-before-toggle` let it: a map layer
|
|
1105
|
+
* shown or hidden from the layers menu. Sent from what changed, with the state
|
|
1106
|
+
* it now holds.
|
|
1107
|
+
*
|
|
1108
|
+
* **Not the native `toggle`.** That one is a `ToggleEvent` saying a popover or
|
|
1109
|
+
* a `<details>` opened or closed, with `newState` of `open` or `closed`, and a
|
|
1110
|
+
* layer shown on a map is neither: it is the request's own verb without
|
|
1111
|
+
* `before`, carrying the same `checked` the request did.
|
|
1112
|
+
*/
|
|
1113
|
+
export declare class HelixToggleEvent extends CustomEvent<ToggleDetail> {
|
|
1114
|
+
static readonly eventName = "helix-toggle";
|
|
1115
|
+
constructor(detail: ToggleDetail);
|
|
1116
|
+
}
|
|
917
1117
|
/** Detail carried by `helix-copy`. */
|
|
918
1118
|
export interface CopyDetail {
|
|
919
1119
|
/** What was put on the clipboard. */
|
|
@@ -1037,6 +1237,12 @@ export interface SelectDetail {
|
|
|
1037
1237
|
* A flag says it outright.
|
|
1038
1238
|
*/
|
|
1039
1239
|
alternate?: boolean;
|
|
1240
|
+
/**
|
|
1241
|
+
* The link of a row that is a link, which the browser follows once the event
|
|
1242
|
+
* is done unless it is canceled. A client-side router cancels it and follows
|
|
1243
|
+
* the link itself.
|
|
1244
|
+
*/
|
|
1245
|
+
href?: string;
|
|
1040
1246
|
/** Value of the item the reader chose. */
|
|
1041
1247
|
value: string;
|
|
1042
1248
|
}
|
|
@@ -1285,7 +1491,9 @@ export declare class HelixHistoryEvent extends CustomEvent<Record<string, never>
|
|
|
1285
1491
|
* forgotten.
|
|
1286
1492
|
*/
|
|
1287
1493
|
declare const registry: {
|
|
1494
|
+
readonly HelixActionEvent: typeof HelixActionEvent;
|
|
1288
1495
|
readonly HelixActivateEvent: typeof HelixActivateEvent;
|
|
1496
|
+
readonly HelixAuraFallbackEvent: typeof HelixAuraFallbackEvent;
|
|
1289
1497
|
readonly HelixBeforeActivateEvent: typeof HelixBeforeActivateEvent;
|
|
1290
1498
|
readonly HelixBeforeChangeEvent: typeof HelixBeforeChangeEvent;
|
|
1291
1499
|
readonly HelixBeforeCloseEvent: typeof HelixBeforeCloseEvent;
|
|
@@ -1305,13 +1513,18 @@ declare const registry: {
|
|
|
1305
1513
|
readonly HelixCanvasViewEvent: typeof HelixCanvasViewEvent;
|
|
1306
1514
|
readonly HelixCanvasZoomEvent: typeof HelixCanvasZoomEvent;
|
|
1307
1515
|
readonly HelixCaretEvent: typeof HelixCaretEvent;
|
|
1516
|
+
readonly HelixClearEvent: typeof HelixClearEvent;
|
|
1308
1517
|
readonly HelixCollapseEvent: typeof HelixCollapseEvent;
|
|
1309
1518
|
readonly HelixCompleteEvent: typeof HelixCompleteEvent;
|
|
1310
1519
|
readonly HelixConnectEvent: typeof HelixConnectEvent;
|
|
1311
1520
|
readonly HelixConsoleEvent: typeof HelixConsoleEvent;
|
|
1521
|
+
readonly HelixCopyErrorEvent: typeof HelixCopyErrorEvent;
|
|
1312
1522
|
readonly HelixCopyEvent: typeof HelixCopyEvent;
|
|
1313
1523
|
readonly HelixCreateEvent: typeof HelixCreateEvent;
|
|
1314
1524
|
readonly HelixDismissEvent: typeof HelixDismissEvent;
|
|
1525
|
+
readonly HelixEditEvent: typeof HelixEditEvent;
|
|
1526
|
+
readonly HelixEndEvent: typeof HelixEndEvent;
|
|
1527
|
+
readonly HelixExpandEvent: typeof HelixExpandEvent;
|
|
1315
1528
|
readonly HelixFacetEvent: typeof HelixFacetEvent;
|
|
1316
1529
|
readonly HelixFilterEvent: typeof HelixFilterEvent;
|
|
1317
1530
|
readonly HelixFilteredEvent: typeof HelixFilteredEvent;
|
|
@@ -1323,6 +1536,8 @@ declare const registry: {
|
|
|
1323
1536
|
readonly HelixGraphSignalEvent: typeof HelixGraphSignalEvent;
|
|
1324
1537
|
readonly HelixGraphZoomEvent: typeof HelixGraphZoomEvent;
|
|
1325
1538
|
readonly HelixHistoryEvent: typeof HelixHistoryEvent;
|
|
1539
|
+
readonly HelixLoadEvent: typeof HelixLoadEvent;
|
|
1540
|
+
readonly HelixLoadMoreEvent: typeof HelixLoadMoreEvent;
|
|
1326
1541
|
readonly HelixMapClusterEvent: typeof HelixMapClusterEvent;
|
|
1327
1542
|
readonly HelixMapPanEvent: typeof HelixMapPanEvent;
|
|
1328
1543
|
readonly HelixMapPartChangeEvent: typeof HelixMapPartChangeEvent;
|
|
@@ -1333,10 +1548,13 @@ declare const registry: {
|
|
|
1333
1548
|
readonly HelixMoveEvent: typeof HelixMoveEvent;
|
|
1334
1549
|
readonly HelixNavigateEvent: typeof HelixNavigateEvent;
|
|
1335
1550
|
readonly HelixNextEvent: typeof HelixNextEvent;
|
|
1551
|
+
readonly HelixPanelResizeEvent: typeof HelixPanelResizeEvent;
|
|
1336
1552
|
readonly HelixPinEvent: typeof HelixPinEvent;
|
|
1337
1553
|
readonly HelixPreviousEvent: typeof HelixPreviousEvent;
|
|
1554
|
+
readonly HelixRangeChangeEvent: typeof HelixRangeChangeEvent;
|
|
1338
1555
|
readonly HelixReadEvent: typeof HelixReadEvent;
|
|
1339
1556
|
readonly HelixReconnectEvent: typeof HelixReconnectEvent;
|
|
1557
|
+
readonly HelixRejectEvent: typeof HelixRejectEvent;
|
|
1340
1558
|
readonly HelixRelabelEvent: typeof HelixRelabelEvent;
|
|
1341
1559
|
readonly HelixRemoveEvent: typeof HelixRemoveEvent;
|
|
1342
1560
|
readonly HelixReorderEvent: typeof HelixReorderEvent;
|
|
@@ -1352,7 +1570,10 @@ declare const registry: {
|
|
|
1352
1570
|
readonly HelixShortcutEvent: typeof HelixShortcutEvent;
|
|
1353
1571
|
readonly HelixSortEvent: typeof HelixSortEvent;
|
|
1354
1572
|
readonly HelixSortedEvent: typeof HelixSortedEvent;
|
|
1573
|
+
readonly HelixSplitEvent: typeof HelixSplitEvent;
|
|
1574
|
+
readonly HelixToggleEvent: typeof HelixToggleEvent;
|
|
1355
1575
|
readonly HelixTourAskEvent: typeof HelixTourAskEvent;
|
|
1576
|
+
readonly HelixTypingEvent: typeof HelixTypingEvent;
|
|
1356
1577
|
};
|
|
1357
1578
|
/**
|
|
1358
1579
|
* Every name this library dispatches.
|