@fusion.dev/helix-core 0.145.0 → 0.146.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 (254) hide show
  1. package/custom-elements.json +5203 -1777
  2. package/dist/controllers/aria-forward-controller/aria-forward-controller.d.ts +3 -2
  3. package/dist/controllers/aria-forward-controller/aria-forward-controller.js +3 -14
  4. package/dist/controllers/chart-pointer-controller/chart-pointer-controller.d.ts +65 -3
  5. package/dist/controllers/chart-pointer-controller/chart-pointer-controller.js +37 -9
  6. package/dist/controllers/chart-pointer-controller/reading-step.d.ts +7 -1
  7. package/dist/controllers/chart-pointer-controller/reading-step.js +5 -0
  8. package/dist/controllers/keyboard-navigation-controller/keyboard-navigation-controller.d.ts +9 -55
  9. package/dist/controllers/keyboard-navigation-controller/keyboard-navigation-controller.js +7 -39
  10. package/dist/controllers/relative-clock-controller/relative-clock-controller.d.ts +44 -0
  11. package/dist/controllers/relative-clock-controller/relative-clock-controller.js +31 -0
  12. package/dist/controllers/source-controller/source-controller.d.ts +10 -3
  13. package/dist/controllers/source-controller/source-controller.js +7 -4
  14. package/dist/controllers/virtualize-controller/virtualize-controller.d.ts +48 -1
  15. package/dist/controllers/virtualize-controller/virtualize-controller.js +50 -7
  16. package/dist/events/action.d.ts +12 -0
  17. package/dist/events/action.js +6 -0
  18. package/dist/events/activate.d.ts +22 -0
  19. package/dist/events/activate.js +11 -0
  20. package/dist/events/aura-fallback.d.ts +12 -0
  21. package/dist/events/aura-fallback.js +11 -0
  22. package/dist/events/before-activate.d.ts +24 -0
  23. package/dist/events/before-activate.js +11 -0
  24. package/dist/events/before-change.d.ts +26 -0
  25. package/dist/events/before-change.js +11 -0
  26. package/dist/events/before-close.d.ts +6 -0
  27. package/dist/events/before-close.js +11 -0
  28. package/dist/events/before-collapse.d.ts +6 -0
  29. package/dist/events/before-collapse.js +11 -0
  30. package/dist/events/before-edit.d.ts +6 -0
  31. package/dist/events/before-edit.js +11 -0
  32. package/dist/events/before-move.d.ts +17 -0
  33. package/dist/events/before-move.js +11 -0
  34. package/dist/events/before-open.d.ts +17 -0
  35. package/dist/events/before-open.js +11 -0
  36. package/dist/events/before-panel-resize.d.ts +13 -0
  37. package/dist/events/before-panel-resize.js +11 -0
  38. package/dist/events/before-pin.d.ts +6 -0
  39. package/dist/events/before-pin.js +11 -0
  40. package/dist/events/before-reconnect.d.ts +14 -0
  41. package/dist/events/before-reconnect.js +11 -0
  42. package/dist/events/before-relabel.d.ts +15 -0
  43. package/dist/events/before-relabel.js +11 -0
  44. package/dist/events/before-resize.d.ts +6 -0
  45. package/dist/events/before-resize.js +11 -0
  46. package/dist/events/before-split.d.ts +12 -0
  47. package/dist/events/before-split.js +11 -0
  48. package/dist/events/before-toggle.d.ts +23 -0
  49. package/dist/events/before-toggle.js +11 -0
  50. package/dist/events/canvas-edit.d.ts +16 -0
  51. package/dist/events/canvas-edit.js +11 -0
  52. package/dist/events/canvas-pan.d.ts +13 -0
  53. package/dist/events/canvas-pan.js +11 -0
  54. package/dist/events/canvas-view.d.ts +14 -0
  55. package/dist/events/canvas-view.js +11 -0
  56. package/dist/events/canvas-zoom.d.ts +6 -0
  57. package/dist/events/canvas-zoom.js +11 -0
  58. package/dist/events/caret.d.ts +17 -0
  59. package/dist/events/caret.js +11 -0
  60. package/dist/events/clear.d.ts +11 -0
  61. package/dist/events/clear.js +6 -0
  62. package/dist/events/collapse.d.ts +12 -0
  63. package/dist/events/collapse.js +11 -0
  64. package/dist/events/complete.d.ts +26 -0
  65. package/dist/events/complete.js +11 -0
  66. package/dist/events/connect.d.ts +14 -0
  67. package/dist/events/connect.js +11 -0
  68. package/dist/events/console.d.ts +13 -0
  69. package/dist/events/console.js +11 -0
  70. package/dist/events/copy-error.d.ts +9 -0
  71. package/dist/events/copy-error.js +6 -0
  72. package/dist/events/copy.d.ts +12 -0
  73. package/dist/events/copy.js +10 -0
  74. package/dist/events/create.d.ts +18 -0
  75. package/dist/events/create.js +11 -0
  76. package/dist/events/details.d.ts +454 -0
  77. package/dist/events/details.js +1 -0
  78. package/dist/events/dismiss.d.ts +16 -0
  79. package/dist/events/dismiss.js +11 -0
  80. package/dist/events/edit.d.ts +12 -0
  81. package/dist/events/edit.js +11 -0
  82. package/dist/events/end.d.ts +9 -0
  83. package/dist/events/end.js +6 -0
  84. package/dist/events/events.d.ts +111 -1478
  85. package/dist/events/events.js +91 -863
  86. package/dist/events/expand.d.ts +10 -0
  87. package/dist/events/expand.js +11 -0
  88. package/dist/events/facet.d.ts +17 -0
  89. package/dist/events/facet.js +11 -0
  90. package/dist/events/filter.d.ts +12 -0
  91. package/dist/events/filter.js +11 -0
  92. package/dist/events/filtered.d.ts +12 -0
  93. package/dist/events/filtered.js +11 -0
  94. package/dist/events/graph-filter.d.ts +10 -0
  95. package/dist/events/graph-filter.js +11 -0
  96. package/dist/events/graph-layout.d.ts +10 -0
  97. package/dist/events/graph-layout.js +11 -0
  98. package/dist/events/graph-pan.d.ts +9 -0
  99. package/dist/events/graph-pan.js +11 -0
  100. package/dist/events/graph-part-change.d.ts +10 -0
  101. package/dist/events/graph-part-change.js +11 -0
  102. package/dist/events/graph-ready.d.ts +8 -0
  103. package/dist/events/graph-ready.js +6 -0
  104. package/dist/events/graph-signal.d.ts +11 -0
  105. package/dist/events/graph-signal.js +11 -0
  106. package/dist/events/graph-zoom.d.ts +6 -0
  107. package/dist/events/graph-zoom.js +11 -0
  108. package/dist/events/history.d.ts +16 -0
  109. package/dist/events/history.js +11 -0
  110. package/dist/events/load-more.d.ts +12 -0
  111. package/dist/events/load-more.js +6 -0
  112. package/dist/events/load.d.ts +12 -0
  113. package/dist/events/load.js +6 -0
  114. package/dist/events/map-cluster.d.ts +15 -0
  115. package/dist/events/map-cluster.js +11 -0
  116. package/dist/events/map-pan.d.ts +18 -0
  117. package/dist/events/map-pan.js +11 -0
  118. package/dist/events/map-part-change.d.ts +16 -0
  119. package/dist/events/map-part-change.js +11 -0
  120. package/dist/events/map-ready.d.ts +15 -0
  121. package/dist/events/map-ready.js +6 -0
  122. package/dist/events/map-rotate.d.ts +9 -0
  123. package/dist/events/map-rotate.js +11 -0
  124. package/dist/events/map-tilt.d.ts +9 -0
  125. package/dist/events/map-tilt.js +11 -0
  126. package/dist/events/map-zoom.d.ts +13 -0
  127. package/dist/events/map-zoom.js +11 -0
  128. package/dist/events/move.d.ts +11 -0
  129. package/dist/events/move.js +11 -0
  130. package/dist/events/names.d.ts +15 -0
  131. package/dist/events/names.js +88 -0
  132. package/dist/events/navigate.d.ts +13 -0
  133. package/dist/events/navigate.js +11 -0
  134. package/dist/events/next.d.ts +23 -0
  135. package/dist/events/next.js +11 -0
  136. package/dist/events/panel-resize.d.ts +12 -0
  137. package/dist/events/panel-resize.js +11 -0
  138. package/dist/events/pin.d.ts +12 -0
  139. package/dist/events/pin.js +11 -0
  140. package/dist/events/press.d.ts +19 -0
  141. package/dist/events/press.js +11 -0
  142. package/dist/events/preview.d.ts +14 -0
  143. package/dist/events/preview.js +11 -0
  144. package/dist/events/previous.d.ts +6 -0
  145. package/dist/events/previous.js +11 -0
  146. package/dist/events/range-change.d.ts +10 -0
  147. package/dist/events/range-change.js +11 -0
  148. package/dist/events/read.d.ts +19 -0
  149. package/dist/events/read.js +11 -0
  150. package/dist/events/reconnect.d.ts +6 -0
  151. package/dist/events/reconnect.js +11 -0
  152. package/dist/events/reject.d.ts +13 -0
  153. package/dist/events/reject.js +11 -0
  154. package/dist/events/relabel.d.ts +6 -0
  155. package/dist/events/relabel.js +11 -0
  156. package/dist/events/remove.d.ts +12 -0
  157. package/dist/events/remove.js +11 -0
  158. package/dist/events/reorder.d.ts +18 -0
  159. package/dist/events/reorder.js +11 -0
  160. package/dist/events/reordered.d.ts +12 -0
  161. package/dist/events/reordered.js +11 -0
  162. package/dist/events/resize.d.ts +19 -0
  163. package/dist/events/resize.js +11 -0
  164. package/dist/events/resized.d.ts +16 -0
  165. package/dist/events/resized.js +11 -0
  166. package/dist/events/sample-end.d.ts +5 -0
  167. package/dist/events/sample-end.js +6 -0
  168. package/dist/events/sample-start.d.ts +18 -0
  169. package/dist/events/sample-start.js +6 -0
  170. package/dist/events/scrolled.d.ts +32 -0
  171. package/dist/events/scrolled.js +11 -0
  172. package/dist/events/select.d.ts +12 -0
  173. package/dist/events/select.js +11 -0
  174. package/dist/events/selected.d.ts +12 -0
  175. package/dist/events/selected.js +11 -0
  176. package/dist/events/send.d.ts +18 -0
  177. package/dist/events/send.js +11 -0
  178. package/dist/events/shortcut.d.ts +13 -0
  179. package/dist/events/shortcut.js +11 -0
  180. package/dist/events/sort.d.ts +17 -0
  181. package/dist/events/sort.js +11 -0
  182. package/dist/events/sorted.d.ts +15 -0
  183. package/dist/events/sorted.js +11 -0
  184. package/dist/events/split.d.ts +12 -0
  185. package/dist/events/split.js +11 -0
  186. package/dist/events/toggle.d.ts +15 -0
  187. package/dist/events/toggle.js +11 -0
  188. package/dist/events/tour-ask.d.ts +16 -0
  189. package/dist/events/tour-ask.js +11 -0
  190. package/dist/events/tour-status.d.ts +14 -0
  191. package/dist/events/tour-status.js +11 -0
  192. package/dist/events/typing.d.ts +10 -0
  193. package/dist/events/typing.js +11 -0
  194. package/dist/helix-element/react-bridge.d.ts +10 -0
  195. package/dist/helix-element/react-bridge.js +1 -1
  196. package/dist/helix-form-element/helix-form-element.d.ts +5 -20
  197. package/dist/helix-form-element/helix-form-element.js +4 -56
  198. package/dist/index.d.ts +15 -3
  199. package/dist/index.js +15 -3
  200. package/dist/mixins/mixin-chart-source/mixin-chart-source.d.ts +17 -2
  201. package/dist/mixins/mixin-chart-source/mixin-chart-source.js +22 -1
  202. package/dist/mixins/mixin-controller-active/mixin-controller-active.js +4 -3
  203. package/dist/mixins/mixin-controller-checked/mixin-controller-checked.d.ts +5 -2
  204. package/dist/mixins/mixin-controller-checked/mixin-controller-checked.js +2 -1
  205. package/dist/mixins/mixin-controller-value/mixin-controller-value.d.ts +4 -2
  206. package/dist/mixins/mixin-controller-value/mixin-controller-value.js +7 -2
  207. package/dist/mixins/mixin-dismissible/mixin-dismissible.js +20 -4
  208. package/dist/mixins/mixin-field/mixin-field.js +2 -2
  209. package/dist/mixins/mixin-picker-field/mixin-picker-field.d.ts +15 -3
  210. package/dist/mixins/mixin-picker-field/mixin-picker-field.js +11 -4
  211. package/dist/mixins/mixin-segmented-field/mixin-segmented-field.d.ts +1 -1
  212. package/dist/mixins/mixin-segmented-field/mixin-segmented-field.js +10 -4
  213. package/dist/utils/audit-name/audit-name-off.d.ts +10 -0
  214. package/dist/utils/audit-name/audit-name-off.js +1 -0
  215. package/dist/utils/audit-name/audit-name.d.ts +19 -6
  216. package/dist/utils/audit-name/audit-name.js +10 -27
  217. package/dist/utils/calendar/calendar.js +7 -7
  218. package/dist/utils/draw-tooltip/draw-tooltip.d.ts +1 -1
  219. package/dist/utils/draw-tooltip/draw-tooltip.js +3 -1
  220. package/dist/utils/draw-tooltip/spoken-reading.d.ts +6 -2
  221. package/dist/utils/draw-tooltip/spoken-reading.js +5 -4
  222. package/dist/utils/heading-level/heading-level.d.ts +8 -0
  223. package/dist/utils/heading-level/heading-level.js +4 -0
  224. package/dist/utils/implicit-submit/implicit-submit.d.ts +25 -0
  225. package/dist/utils/implicit-submit/implicit-submit.js +52 -0
  226. package/dist/utils/name-text/name-text.d.ts +12 -0
  227. package/dist/utils/name-text/name-text.js +25 -0
  228. package/dist/utils/number-format/number-format.d.ts +2 -1
  229. package/dist/utils/number-format/number-format.js +13 -5
  230. package/dist/utils/plain-click/plain-click.d.ts +10 -0
  231. package/dist/utils/plain-click/plain-click.js +1 -0
  232. package/dist/utils/press-type/press-type.d.ts +20 -0
  233. package/dist/utils/press-type/press-type.js +15 -0
  234. package/dist/utils/report-runtime/report-runtime.d.ts +6 -3
  235. package/dist/utils/row-data/row-data.d.ts +15 -0
  236. package/dist/utils/row-data/row-data.js +17 -0
  237. package/dist/utils/row-order/row-order.d.ts +141 -0
  238. package/dist/utils/row-order/row-order.js +76 -0
  239. package/dist/utils/tell-disclosure/tell-disclosure.d.ts +4 -0
  240. package/dist/utils/tree-arrow/tree-arrow.d.ts +23 -0
  241. package/dist/utils/tree-arrow/tree-arrow.js +9 -0
  242. package/dist/utils/typeahead/typeahead.d.ts +67 -0
  243. package/dist/utils/typeahead/typeahead.js +36 -0
  244. package/dist/utils/value-as/value-as.d.ts +9 -0
  245. package/dist/utils/value-as/value-as.js +9 -1
  246. package/dist/utils/watch-labels/watch-labels.d.ts +16 -0
  247. package/dist/utils/watch-labels/watch-labels.js +34 -0
  248. package/dist/utils/words-converter/words-converter.d.ts +14 -0
  249. package/dist/utils/words-converter/words-converter.js +15 -0
  250. package/dist/utils/written-list/written-list.d.ts +29 -0
  251. package/dist/utils/written-list/written-list.js +30 -0
  252. package/dist/version.d.ts +1 -1
  253. package/dist/version.js +1 -1
  254. package/package.json +18 -5
@@ -20,7 +20,9 @@ export interface VirtualizeOptions {
20
20
  * the straight line the note below defends. A host that returns its row
21
21
  * elements gets each one measured after it renders and placed by what it
22
22
  * came to; a host that returns nothing gets every item at `estimate`, which
23
- * is right whenever the rows really are uniform and is cheaper.
23
+ * is right whenever the rows really are uniform and is cheaper. A host that
24
+ * returns its rows and turns `measured` off keeps the straight line, with its
25
+ * slope read once from the rows it drew.
24
26
  *
25
27
  * **Each row carries its own index rather than being counted off from
26
28
  * `window.first`.** A host is free to place its rows whenever it likes, and
@@ -129,6 +131,15 @@ export declare class VirtualizeController implements ReactiveController {
129
131
  private readonly heights;
130
132
  /** Room `shift` added above the window, owed to the scroll offset once drawn. */
131
133
  private owed;
134
+ /**
135
+ * The drawn rows' height on the straight line, read once per estimate.
136
+ *
137
+ * Undefined until a host that offers `rows` has drawn some on the uniform
138
+ * path, and again after `forget`.
139
+ */
140
+ private sample;
141
+ /** The length of the set when `endInSight` last answered true. */
142
+ private askedAt;
132
143
  constructor(host: ReactiveControllerHost, options: VirtualizeOptions);
133
144
  hostConnected(): void;
134
145
  hostDisconnected(): void;
@@ -145,6 +156,28 @@ export declare class VirtualizeController implements ReactiveController {
145
156
  measure(): void;
146
157
  /** The straight line: one estimate, so offset and index convert by division. */
147
158
  private uniform;
159
+ /**
160
+ * How tall one item is on the straight line: the drawn rows' height once
161
+ * read, and `estimate` until then.
162
+ *
163
+ * **An estimate that is wrong on the straight line leaves the end of the
164
+ * set out of reach.** Rows of 21 pixels placed at 32 fill two thirds of the
165
+ * room they are counted for, so the window stops short of the bottom of the
166
+ * box and the spacer after it holds the rest: in Chromium, `scrollToIndex`
167
+ * on the last of 5,000 such rows scrolled to the end and drew nothing there.
168
+ * Reading the drawn rows once corrects the slope, and it is still a line.
169
+ */
170
+ private line;
171
+ /**
172
+ * Reads the drawn rows' height once for the straight line, for a host that
173
+ * offers `rows` and does not measure.
174
+ *
175
+ * The mean of the rows drawn, each item's elements counted together. A row
176
+ * with no height, such as one that is not laid out, says nothing. When the
177
+ * line moves, the scroll offset moves with it, so the item at the top of the
178
+ * box stays there.
179
+ */
180
+ private sampleRows;
148
181
  /** Whether this pass places by measurement: offered, and wanted. */
149
182
  private measuring;
150
183
  /**
@@ -176,6 +209,20 @@ export declare class VirtualizeController implements ReactiveController {
176
209
  * host draws around the rows.
177
210
  */
178
211
  remaining(): number;
212
+ /**
213
+ * Whether a reader has come within one screen of the end of the set, true
214
+ * once for each length of it.
215
+ *
216
+ * For a host that asks for more items as a reader nears the end: it sends
217
+ * its request when this answers true, and the set growing lets it answer
218
+ * true again. False while the box has no height or the set no items, so a
219
+ * list that has not been laid out asks for nothing.
220
+ *
221
+ * `length` is what the answer is kept for, the count by default. A host
222
+ * whose count is a filtered view of what it holds passes what it holds, so
223
+ * new items that the filter hides still let it ask again.
224
+ */
225
+ endInSight(length?: number): boolean;
179
226
  /**
180
227
  * The two spacers' heights for the window, with item `kept` drawn too.
181
228
  *
@@ -8,6 +8,7 @@ export class VirtualizeController {
8
8
  this.warned = false;
9
9
  this.window = { after: 0, before: 0, first: 0, last: 0 };
10
10
  this.owed = 0;
11
+ this.askedAt = -1;
11
12
  this.handleScroll = () => {
12
13
  this.settling = 0;
13
14
  this.measure();
@@ -46,7 +47,7 @@ export class VirtualizeController {
46
47
  this.watch();
47
48
  const box = this.options.container();
48
49
  const total = Math.max(0, this.options.count());
49
- const size = Math.max(1, this.options.estimate());
50
+ const size = this.line();
50
51
  if (!box) {
51
52
  return;
52
53
  }
@@ -80,6 +81,36 @@ export class VirtualizeController {
80
81
  const last = Math.min(total, first + fits);
81
82
  return { after: Math.max(0, (total - last) * size), before: first * size, first, last };
82
83
  }
84
+ line() {
85
+ const estimate = Math.max(1, this.options.estimate());
86
+ return this.sample?.estimate === estimate ? this.sample.size : estimate;
87
+ }
88
+ sampleRows() {
89
+ const estimate = Math.max(1, this.options.estimate());
90
+ if (this.sample?.estimate === estimate) {
91
+ return;
92
+ }
93
+ const heights = new Map();
94
+ for (const { element, index } of this.options.rows?.() ?? []) {
95
+ heights.set(index, (heights.get(index) ?? 0) + element.getBoundingClientRect().height);
96
+ }
97
+ const seen = [...heights.values()].filter((height) => height > 0);
98
+ if (seen.length === 0) {
99
+ return;
100
+ }
101
+ const was = this.line();
102
+ const size = Math.max(1, seen.reduce((sum, height) => sum + height, 0) / seen.length);
103
+ this.sample = { estimate, size };
104
+ if (Math.abs(size - was) < 0.5) {
105
+ return;
106
+ }
107
+ const box = this.options.container();
108
+ if (box && box.scrollTop > 0) {
109
+ box.scrollTop = (box.scrollTop / was) * size;
110
+ }
111
+ this.settling = 0;
112
+ this.measure();
113
+ }
83
114
  measuring() {
84
115
  return this.options.rows !== undefined && (this.options.measured?.() ?? true);
85
116
  }
@@ -107,7 +138,7 @@ export class VirtualizeController {
107
138
  const top = Math.max(0, box.scrollTop);
108
139
  const bottom = top + box.clientHeight;
109
140
  if (!this.measuring()) {
110
- const size = Math.max(1, this.options.estimate());
141
+ const size = this.line();
111
142
  const first = Math.min(Math.floor(top / size), total);
112
143
  return { first, last: Math.max(first, Math.min(total, Math.ceil(bottom / size))) };
113
144
  }
@@ -124,11 +155,21 @@ export class VirtualizeController {
124
155
  if (!box) {
125
156
  return 0;
126
157
  }
127
- const length = this.measuring()
128
- ? this.heights.total(total)
129
- : total * Math.max(1, this.options.estimate());
158
+ const length = this.measuring() ? this.heights.total(total) : total * this.line();
130
159
  return Math.max(0, length - Math.max(0, box.scrollTop) - box.clientHeight);
131
160
  }
161
+ endInSight(length = Math.max(0, this.options.count())) {
162
+ const screen = this.options.container()?.clientHeight ?? 0;
163
+ if (length === 0 ||
164
+ screen <= 0 ||
165
+ this.askedAt === length ||
166
+ this.options.count() <= 0 ||
167
+ this.remaining() > screen) {
168
+ return false;
169
+ }
170
+ this.askedAt = length;
171
+ return true;
172
+ }
132
173
  spacers(kept) {
133
174
  const { after, before, first, last } = this.window;
134
175
  if (kept === undefined || (kept >= first && kept < last)) {
@@ -149,6 +190,7 @@ export class VirtualizeController {
149
190
  this.owed = 0;
150
191
  }
151
192
  if (!this.measuring()) {
193
+ this.sampleRows();
152
194
  return;
153
195
  }
154
196
  const rows = this.options.rows?.();
@@ -190,7 +232,7 @@ export class VirtualizeController {
190
232
  this.owed += room;
191
233
  }
192
234
  sizeOf(index) {
193
- return this.measuring() ? this.heights.at(index) : Math.max(1, this.options.estimate());
235
+ return this.measuring() ? this.heights.at(index) : this.line();
194
236
  }
195
237
  reveal(index, inset = 0, { align = 'nearest', behavior } = {}) {
196
238
  const box = this.options.container();
@@ -231,10 +273,11 @@ export class VirtualizeController {
231
273
  const total = Math.max(0, this.options.count());
232
274
  return this.measuring()
233
275
  ? this.heights.before(index, total)
234
- : Math.max(0, Math.min(index, total)) * Math.max(1, this.options.estimate());
276
+ : Math.max(0, Math.min(index, total)) * this.line();
235
277
  }
236
278
  forget() {
237
279
  this.heights.forget();
280
+ this.sample = undefined;
238
281
  }
239
282
  report() {
240
283
  if (this.warned) {
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A reader acted on a row: Enter on a list row, or a press in a list that
3
+ * selects nothing. Sent from the row, so `target` is the row acted on.
4
+ *
5
+ * Carries nothing, because the row is the whole of the answer. Not cancelable:
6
+ * a row with a link follows it and sends nothing, so there is no default left
7
+ * to refuse.
8
+ */
9
+ export declare class HelixActionEvent extends Event {
10
+ static readonly eventName = "helix-action";
11
+ constructor();
12
+ }
@@ -0,0 +1,6 @@
1
+ export class HelixActionEvent extends Event {
2
+ static { this.eventName = 'helix-action'; }
3
+ constructor() {
4
+ super(HelixActionEvent.eventName, { bubbles: true, cancelable: false, composed: true });
5
+ }
6
+ }
@@ -0,0 +1,22 @@
1
+ import type { ActivateDetail } from './details.js';
2
+ /**
3
+ * A set has made a different child current.
4
+ *
5
+ * The notification half of `helix-before-activate`, dispatched after the state
6
+ * has moved, so `currentTarget.active` is the new value and the detail is a fact
7
+ * rather than a proposal. `previous` is the value that was current before, where
8
+ * the set knows it, as Web Awesome's `wa-video-change` carries both.
9
+ *
10
+ * **Not cancelable**, for the reason every notification here is not: the
11
+ * decision was taken by the event before it, and a second refusable event for
12
+ * one transition is two answers to one question.
13
+ *
14
+ * **Prefixed, and it has to be.** `activate` unprefixed is not in any
15
+ * `*EventMap` in the DOM library, checked rather than assumed, but the prefix is
16
+ * what stops an event dispatched inside a shadow root and retargeted to the host
17
+ * being mistaken for something the host's own contents sent.
18
+ */
19
+ export declare class HelixActivateEvent extends CustomEvent<ActivateDetail> {
20
+ static readonly eventName = "helix-activate";
21
+ constructor(detail: ActivateDetail);
22
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixActivateEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-activate'; }
3
+ constructor(detail) {
4
+ super(HelixActivateEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: false,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,12 @@
1
+ import type { AuraFallbackDetail } from './details.js';
2
+ /**
3
+ * An aura stopped drawing its shader and shows its gradient, and says why.
4
+ *
5
+ * Sent each time it falls back, from the aura, which then matches
6
+ * `:state(fallback)` until it draws again. Not cancelable: there is nothing
7
+ * left to refuse.
8
+ */
9
+ export declare class HelixAuraFallbackEvent extends CustomEvent<AuraFallbackDetail> {
10
+ static readonly eventName = "helix-aura-fallback";
11
+ constructor(detail: AuraFallbackDetail);
12
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixAuraFallbackEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-aura-fallback'; }
3
+ constructor(detail) {
4
+ super(HelixAuraFallbackEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: false,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,24 @@
1
+ import type { ChangeDetail } from './details.js';
2
+ /**
3
+ * A set is about to make a different child current, and can be refused.
4
+ *
5
+ * **Not a generic `helix-change`.** `Tabs` moving to another tab, `Tree` marking
6
+ * another row and `Steps` advancing are not a value changing, they are a set
7
+ * choosing, and the platform's word for a committed value would say the wrong
8
+ * thing. `active` names which child is current, so `activate` is the verb, and
9
+ * unlike `change` the platform has no claim on it.
10
+ *
11
+ * **This fires before the state moves.** Inside a handler `currentTarget.active`
12
+ * still holds the previous value, and `detail.value` is a proposal another
13
+ * listener may refuse, so a consumer who only wants to know which child is
14
+ * current listens for `helix-activate` instead. `helix-select` is not that
15
+ * notification either: it fires when an item is *chosen*, not when `active` is
16
+ * assigned.
17
+ *
18
+ * The shape is the one `MixinControllerOpen` already has, a cancelable request
19
+ * and a plain notification after the state has moved.
20
+ */
21
+ export declare class HelixBeforeActivateEvent extends CustomEvent<ChangeDetail> {
22
+ static readonly eventName = "helix-before-activate";
23
+ constructor(detail: ChangeDetail);
24
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeActivateEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-activate'; }
3
+ constructor(detail) {
4
+ super(HelixBeforeActivateEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,26 @@
1
+ import type { ChangeDetail } from './details.js';
2
+ /**
3
+ * A value is about to change, and the change can be refused.
4
+ *
5
+ * **The request half of every value control.** It announces the value being
6
+ * *proposed*, before anything moves, so a listener calling `preventDefault()`
7
+ * refuses it and the control stays where it was. That is how a consumer takes
8
+ * one decision without declaring a mode, which is what 294 settled: the element
9
+ * always owns and applies its state, and refusing is the way to take it over.
10
+ *
11
+ * **The notification is native and separate.** Once this has gone out and the
12
+ * value has moved, the control announces it again under the platform's own
13
+ * name, `input` while a reader is editing and `change` when they are done, so
14
+ * `onChange` in React and `onchange=` in HTML both reach it and
15
+ * `currentTarget.value` is correct by the time a handler reads it. This event
16
+ * carries the detail because at the moment it fires the value is not on the
17
+ * element yet.
18
+ *
19
+ * **`announcesInput` picks which native notification fires, not which name this
20
+ * carries.** Granularity is the platform's own distinction, `input` against
21
+ * `change`; the request is always this one event.
22
+ */
23
+ export declare class HelixBeforeChangeEvent extends CustomEvent<ChangeDetail> {
24
+ static readonly eventName = "helix-before-change";
25
+ constructor(detail: ChangeDetail);
26
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeChangeEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-change'; }
3
+ constructor(detail) {
4
+ super(HelixBeforeChangeEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { OpenDetail } from './details.js';
2
+ /** Fired when an element is about to close. See `HelixBeforeOpenEvent`. */
3
+ export declare class HelixBeforeCloseEvent extends CustomEvent<OpenDetail> {
4
+ static readonly eventName = "helix-before-close";
5
+ constructor();
6
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeCloseEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-close'; }
3
+ constructor() {
4
+ super(HelixBeforeCloseEvent.eventName, {
5
+ bubbles: false,
6
+ cancelable: true,
7
+ composed: false,
8
+ detail: { open: false },
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { ChangeDetail } from './details.js';
2
+ /** A pane is about to collapse or reopen, and can be refused. */
3
+ export declare class HelixBeforeCollapseEvent extends CustomEvent<ChangeDetail> {
4
+ static readonly eventName = "helix-before-collapse";
5
+ constructor(detail: ChangeDetail);
6
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeCollapseEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-collapse'; }
3
+ constructor(detail) {
4
+ super(HelixBeforeCollapseEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { ChangeDetail } from './details.js';
2
+ /** Source is about to be edited, and can be refused. */
3
+ export declare class HelixBeforeEditEvent extends CustomEvent<ChangeDetail> {
4
+ static readonly eventName = "helix-before-edit";
5
+ constructor(detail: ChangeDetail);
6
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeEditEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-edit'; }
3
+ constructor(detail) {
4
+ super(HelixBeforeEditEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,17 @@
1
+ import type { MoveDetail } from './details.js';
2
+ /**
3
+ * Cards are about to move, and can be refused.
4
+ *
5
+ * **This is the controlled half, the way `helix-before-open` is for a
6
+ * dialog.** A board moves its own cards by default, writing `x` and `y` onto
7
+ * each one the way an input writes its own value. A consumer who keeps the
8
+ * positions in their own state calls `preventDefault()` here, writes what the
9
+ * detail says into that state, and renders the cards where it puts them.
10
+ *
11
+ * Sent for every step of a drag, so a controlled board follows the pointer
12
+ * rather than jumping on the drop.
13
+ */
14
+ export declare class HelixBeforeMoveEvent extends CustomEvent<MoveDetail> {
15
+ static readonly eventName = "helix-before-move";
16
+ constructor(detail: MoveDetail);
17
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeMoveEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-move'; }
3
+ constructor(detail) {
4
+ super(HelixBeforeMoveEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,17 @@
1
+ import type { OpenDetail } from './details.js';
2
+ /**
3
+ * Fired when an element is about to open.
4
+ *
5
+ * Cancelable: `preventDefault()` refuses the change, and the element stays
6
+ * closed. Paired with `helix-before-close` rather than being one event carrying a
7
+ * boolean, so a listener that only cares about one direction says so by which
8
+ * event it listens for.
9
+ *
10
+ * Neither bubbles nor composed. A dialog inside a drawer inside a popover is
11
+ * three overlays, and an inner one opening must not read as the outer one
12
+ * opening.
13
+ */
14
+ export declare class HelixBeforeOpenEvent extends CustomEvent<OpenDetail> {
15
+ static readonly eventName = "helix-before-open";
16
+ constructor();
17
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeOpenEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-open'; }
3
+ constructor() {
4
+ super(HelixBeforeOpenEvent.eventName, {
5
+ bubbles: false,
6
+ cancelable: true,
7
+ composed: false,
8
+ detail: { open: true },
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,13 @@
1
+ import type { ChangeDetail } from './details.js';
2
+ /**
3
+ * A sandbox's panel is about to change height, and can be refused.
4
+ *
5
+ * The sibling of `helix-before-split`, and named for the divider rather than for
6
+ * the axis because a reader binding one of the two is choosing which divider they
7
+ * care about. `value` is pixels here and a percentage there, which is what each
8
+ * property already publishes.
9
+ */
10
+ export declare class HelixBeforePanelResizeEvent extends CustomEvent<ChangeDetail> {
11
+ static readonly eventName = "helix-before-panel-resize";
12
+ constructor(detail: ChangeDetail);
13
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforePanelResizeEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-panel-resize'; }
3
+ constructor(detail) {
4
+ super(HelixBeforePanelResizeEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { ChangeDetail } from './details.js';
2
+ /** A message is about to be pinned or unpinned, and can be refused. */
3
+ export declare class HelixBeforePinEvent extends CustomEvent<ChangeDetail> {
4
+ static readonly eventName = "helix-before-pin";
5
+ constructor(detail: ChangeDetail);
6
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforePinEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-pin'; }
3
+ constructor(detail) {
4
+ super(HelixBeforePinEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,14 @@
1
+ import type { ReconnectDetail } from './details.js';
2
+ /**
3
+ * A connection's end is about to move to another card or another side, and can
4
+ * be refused.
5
+ *
6
+ * **A move, not a request, and that is the difference from `helix-connect`.**
7
+ * The connection is already an element on the page, so the board rewrites its
8
+ * ends itself, the way it writes a card's position onto the card; a page that
9
+ * holds its connections in state refuses this and writes them there.
10
+ */
11
+ export declare class HelixBeforeReconnectEvent extends CustomEvent<ReconnectDetail> {
12
+ static readonly eventName = "helix-before-reconnect";
13
+ constructor(detail: ReconnectDetail);
14
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeReconnectEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-reconnect'; }
3
+ constructor(detail) {
4
+ super(HelixBeforeReconnectEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,15 @@
1
+ import type { RelabelDetail } from './details.js';
2
+ /**
3
+ * A label the board draws is about to change, and can be refused.
4
+ *
5
+ * **The board edits what it draws and asks for what it does not.** A
6
+ * connection's label and a group's name are drawn by the board from an
7
+ * attribute, so the board edits them in place and writes the attribute back,
8
+ * the way it writes a card's position; a page holding them in state refuses
9
+ * this and writes them there. A card's own content is the page's, which is why
10
+ * that is `helix-canvas-edit`, a request, rather than this.
11
+ */
12
+ export declare class HelixBeforeRelabelEvent extends CustomEvent<RelabelDetail> {
13
+ static readonly eventName = "helix-before-relabel";
14
+ constructor(detail: RelabelDetail);
15
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeRelabelEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-relabel'; }
3
+ constructor(detail) {
4
+ super(HelixBeforeRelabelEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { ChangeDetail } from './details.js';
2
+ /** A divider is about to move, and can be refused. */
3
+ export declare class HelixBeforeResizeEvent extends CustomEvent<ChangeDetail> {
4
+ static readonly eventName = "helix-before-resize";
5
+ constructor(detail: ChangeDetail);
6
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeResizeEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-resize'; }
3
+ constructor(detail) {
4
+ super(HelixBeforeResizeEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,12 @@
1
+ import type { ChangeDetail } from './details.js';
2
+ /**
3
+ * The divider between a sandbox's panes is about to move, and can be refused.
4
+ *
5
+ * Its own verb rather than a `helix-before-resize` carrying which divider moved:
6
+ * a sandbox has two, and they were told apart by a field on a detail every other
7
+ * request in this file also carries.
8
+ */
9
+ export declare class HelixBeforeSplitEvent extends CustomEvent<ChangeDetail> {
10
+ static readonly eventName = "helix-before-split";
11
+ constructor(detail: ChangeDetail);
12
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixBeforeSplitEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-before-split'; }
3
+ constructor(detail) {
4
+ super(HelixBeforeSplitEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: true,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,23 @@
1
+ import type { ToggleDetail } from './details.js';
2
+ /**
3
+ * A checked state is about to change, and the change can be refused.
4
+ *
5
+ * **Its own event rather than a `helix-before-change` carrying a boolean.**
6
+ * Through the value event the state arrives as `String(checked)`, so a consumer
7
+ * receives the string `"false"`, which is truthy, and a test asserting the value
8
+ * passes on that bug. A control whose state is a boolean wants an event with a
9
+ * typed boolean in it.
10
+ *
11
+ * The notification is native, as it is for a value: the control relays `change`
12
+ * from the inner input and announces `input` beside it, so `onChange` reads
13
+ * `currentTarget.checked` and gets a boolean from the platform.
14
+ *
15
+ * It also ends a collision: Checkbox Group listened for its boxes' change and
16
+ * dispatched its own under the same name from the same host, so it needed
17
+ * `stopImmediatePropagation` to keep a consumer from receiving one box's boolean
18
+ * alongside the whole set. Two names, two facts.
19
+ */
20
+ export declare class HelixBeforeToggleEvent extends CustomEvent<ToggleDetail> {
21
+ static readonly eventName = "helix-before-toggle";
22
+ constructor(detail: ToggleDetail);
23
+ }