@fusion.dev/helix-core 0.145.0 → 0.147.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 (302) hide show
  1. package/custom-elements.json +6585 -1920
  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 +8 -17
  4. package/dist/controllers/chart-pointer-controller/chart-pointer-controller.d.ts +71 -3
  5. package/dist/controllers/chart-pointer-controller/chart-pointer-controller.js +50 -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/copy-controller/copy-controller.d.ts +4 -1
  9. package/dist/controllers/copy-controller/copy-controller.js +2 -1
  10. package/dist/controllers/countdown-controller/countdown-controller.d.ts +4 -1
  11. package/dist/controllers/countdown-controller/countdown-controller.js +3 -1
  12. package/dist/controllers/keyboard-navigation-controller/keyboard-navigation-controller.d.ts +14 -55
  13. package/dist/controllers/keyboard-navigation-controller/keyboard-navigation-controller.js +7 -39
  14. package/dist/controllers/relative-clock-controller/relative-clock-controller.d.ts +44 -0
  15. package/dist/controllers/relative-clock-controller/relative-clock-controller.js +31 -0
  16. package/dist/controllers/source-controller/source-controller.d.ts +10 -3
  17. package/dist/controllers/source-controller/source-controller.js +9 -4
  18. package/dist/controllers/swipe-controller/swipe-controller.d.ts +10 -1
  19. package/dist/controllers/swipe-controller/swipe-controller.js +1 -1
  20. package/dist/controllers/virtualize-controller/virtualize-controller.d.ts +48 -1
  21. package/dist/controllers/virtualize-controller/virtualize-controller.js +52 -7
  22. package/dist/events/action.d.ts +12 -0
  23. package/dist/events/action.js +6 -0
  24. package/dist/events/activate.d.ts +22 -0
  25. package/dist/events/activate.js +11 -0
  26. package/dist/events/aura-fallback.d.ts +12 -0
  27. package/dist/events/aura-fallback.js +11 -0
  28. package/dist/events/band.d.ts +13 -0
  29. package/dist/events/band.js +11 -0
  30. package/dist/events/before-activate.d.ts +24 -0
  31. package/dist/events/before-activate.js +11 -0
  32. package/dist/events/before-change.d.ts +26 -0
  33. package/dist/events/before-change.js +11 -0
  34. package/dist/events/before-close.d.ts +6 -0
  35. package/dist/events/before-close.js +11 -0
  36. package/dist/events/before-collapse.d.ts +6 -0
  37. package/dist/events/before-collapse.js +11 -0
  38. package/dist/events/before-edit.d.ts +6 -0
  39. package/dist/events/before-edit.js +11 -0
  40. package/dist/events/before-move.d.ts +17 -0
  41. package/dist/events/before-move.js +11 -0
  42. package/dist/events/before-open.d.ts +17 -0
  43. package/dist/events/before-open.js +11 -0
  44. package/dist/events/before-panel-resize.d.ts +13 -0
  45. package/dist/events/before-panel-resize.js +11 -0
  46. package/dist/events/before-pin.d.ts +6 -0
  47. package/dist/events/before-pin.js +11 -0
  48. package/dist/events/before-reconnect.d.ts +14 -0
  49. package/dist/events/before-reconnect.js +11 -0
  50. package/dist/events/before-relabel.d.ts +15 -0
  51. package/dist/events/before-relabel.js +11 -0
  52. package/dist/events/before-resize.d.ts +6 -0
  53. package/dist/events/before-resize.js +11 -0
  54. package/dist/events/before-split.d.ts +12 -0
  55. package/dist/events/before-split.js +11 -0
  56. package/dist/events/before-toggle.d.ts +23 -0
  57. package/dist/events/before-toggle.js +11 -0
  58. package/dist/events/canvas-edit.d.ts +16 -0
  59. package/dist/events/canvas-edit.js +11 -0
  60. package/dist/events/canvas-pan.d.ts +13 -0
  61. package/dist/events/canvas-pan.js +11 -0
  62. package/dist/events/canvas-view.d.ts +14 -0
  63. package/dist/events/canvas-view.js +11 -0
  64. package/dist/events/canvas-zoom.d.ts +6 -0
  65. package/dist/events/canvas-zoom.js +11 -0
  66. package/dist/events/caret.d.ts +17 -0
  67. package/dist/events/caret.js +11 -0
  68. package/dist/events/clear.d.ts +11 -0
  69. package/dist/events/clear.js +6 -0
  70. package/dist/events/collapse.d.ts +12 -0
  71. package/dist/events/collapse.js +11 -0
  72. package/dist/events/complete.d.ts +26 -0
  73. package/dist/events/complete.js +11 -0
  74. package/dist/events/connect.d.ts +14 -0
  75. package/dist/events/connect.js +11 -0
  76. package/dist/events/console.d.ts +13 -0
  77. package/dist/events/console.js +11 -0
  78. package/dist/events/copy-error.d.ts +9 -0
  79. package/dist/events/copy-error.js +6 -0
  80. package/dist/events/copy.d.ts +12 -0
  81. package/dist/events/copy.js +10 -0
  82. package/dist/events/create.d.ts +18 -0
  83. package/dist/events/create.js +11 -0
  84. package/dist/events/details.d.ts +459 -0
  85. package/dist/events/details.js +1 -0
  86. package/dist/events/dismiss.d.ts +16 -0
  87. package/dist/events/dismiss.js +11 -0
  88. package/dist/events/edit.d.ts +12 -0
  89. package/dist/events/edit.js +11 -0
  90. package/dist/events/end.d.ts +9 -0
  91. package/dist/events/end.js +6 -0
  92. package/dist/events/events.d.ts +113 -1478
  93. package/dist/events/events.js +93 -863
  94. package/dist/events/expand.d.ts +10 -0
  95. package/dist/events/expand.js +11 -0
  96. package/dist/events/facet.d.ts +17 -0
  97. package/dist/events/facet.js +11 -0
  98. package/dist/events/filter.d.ts +12 -0
  99. package/dist/events/filter.js +11 -0
  100. package/dist/events/filtered.d.ts +12 -0
  101. package/dist/events/filtered.js +11 -0
  102. package/dist/events/graph-filter.d.ts +10 -0
  103. package/dist/events/graph-filter.js +11 -0
  104. package/dist/events/graph-layout.d.ts +10 -0
  105. package/dist/events/graph-layout.js +11 -0
  106. package/dist/events/graph-pan.d.ts +9 -0
  107. package/dist/events/graph-pan.js +11 -0
  108. package/dist/events/graph-part-change.d.ts +10 -0
  109. package/dist/events/graph-part-change.js +11 -0
  110. package/dist/events/graph-ready.d.ts +8 -0
  111. package/dist/events/graph-ready.js +6 -0
  112. package/dist/events/graph-signal.d.ts +11 -0
  113. package/dist/events/graph-signal.js +11 -0
  114. package/dist/events/graph-zoom.d.ts +6 -0
  115. package/dist/events/graph-zoom.js +11 -0
  116. package/dist/events/history.d.ts +16 -0
  117. package/dist/events/history.js +11 -0
  118. package/dist/events/load-more.d.ts +12 -0
  119. package/dist/events/load-more.js +6 -0
  120. package/dist/events/load.d.ts +12 -0
  121. package/dist/events/load.js +6 -0
  122. package/dist/events/map-cluster.d.ts +15 -0
  123. package/dist/events/map-cluster.js +11 -0
  124. package/dist/events/map-pan.d.ts +18 -0
  125. package/dist/events/map-pan.js +11 -0
  126. package/dist/events/map-part-change.d.ts +16 -0
  127. package/dist/events/map-part-change.js +11 -0
  128. package/dist/events/map-ready.d.ts +15 -0
  129. package/dist/events/map-ready.js +6 -0
  130. package/dist/events/map-rotate.d.ts +9 -0
  131. package/dist/events/map-rotate.js +11 -0
  132. package/dist/events/map-tilt.d.ts +9 -0
  133. package/dist/events/map-tilt.js +11 -0
  134. package/dist/events/map-zoom.d.ts +13 -0
  135. package/dist/events/map-zoom.js +11 -0
  136. package/dist/events/move.d.ts +11 -0
  137. package/dist/events/move.js +11 -0
  138. package/dist/events/names.d.ts +18 -0
  139. package/dist/events/names.js +13 -0
  140. package/dist/events/navigate.d.ts +13 -0
  141. package/dist/events/navigate.js +11 -0
  142. package/dist/events/next.d.ts +23 -0
  143. package/dist/events/next.js +11 -0
  144. package/dist/events/panel-resize.d.ts +12 -0
  145. package/dist/events/panel-resize.js +11 -0
  146. package/dist/events/pin.d.ts +12 -0
  147. package/dist/events/pin.js +11 -0
  148. package/dist/events/press.d.ts +19 -0
  149. package/dist/events/press.js +11 -0
  150. package/dist/events/preview.d.ts +14 -0
  151. package/dist/events/preview.js +11 -0
  152. package/dist/events/previous.d.ts +6 -0
  153. package/dist/events/previous.js +11 -0
  154. package/dist/events/range-change.d.ts +10 -0
  155. package/dist/events/range-change.js +11 -0
  156. package/dist/events/read.d.ts +19 -0
  157. package/dist/events/read.js +11 -0
  158. package/dist/events/reconnect.d.ts +6 -0
  159. package/dist/events/reconnect.js +11 -0
  160. package/dist/events/reject.d.ts +13 -0
  161. package/dist/events/reject.js +11 -0
  162. package/dist/events/relabel.d.ts +6 -0
  163. package/dist/events/relabel.js +11 -0
  164. package/dist/events/remove.d.ts +12 -0
  165. package/dist/events/remove.js +11 -0
  166. package/dist/events/reorder.d.ts +18 -0
  167. package/dist/events/reorder.js +11 -0
  168. package/dist/events/reordered.d.ts +12 -0
  169. package/dist/events/reordered.js +11 -0
  170. package/dist/events/resize.d.ts +19 -0
  171. package/dist/events/resize.js +11 -0
  172. package/dist/events/resized.d.ts +16 -0
  173. package/dist/events/resized.js +11 -0
  174. package/dist/events/sample-end.d.ts +5 -0
  175. package/dist/events/sample-end.js +6 -0
  176. package/dist/events/sample-start.d.ts +18 -0
  177. package/dist/events/sample-start.js +6 -0
  178. package/dist/events/scrolled.d.ts +32 -0
  179. package/dist/events/scrolled.js +11 -0
  180. package/dist/events/select.d.ts +12 -0
  181. package/dist/events/select.js +11 -0
  182. package/dist/events/selected.d.ts +12 -0
  183. package/dist/events/selected.js +11 -0
  184. package/dist/events/send.d.ts +18 -0
  185. package/dist/events/send.js +11 -0
  186. package/dist/events/shortcut.d.ts +13 -0
  187. package/dist/events/shortcut.js +11 -0
  188. package/dist/events/sort.d.ts +17 -0
  189. package/dist/events/sort.js +11 -0
  190. package/dist/events/sorted.d.ts +15 -0
  191. package/dist/events/sorted.js +11 -0
  192. package/dist/events/split.d.ts +12 -0
  193. package/dist/events/split.js +11 -0
  194. package/dist/events/toggle.d.ts +15 -0
  195. package/dist/events/toggle.js +11 -0
  196. package/dist/events/tour-ask.d.ts +16 -0
  197. package/dist/events/tour-ask.js +11 -0
  198. package/dist/events/tour-status.d.ts +14 -0
  199. package/dist/events/tour-status.js +11 -0
  200. package/dist/events/typing.d.ts +10 -0
  201. package/dist/events/typing.js +11 -0
  202. package/dist/helix-element/helix-element.js +9 -43
  203. package/dist/helix-element/react-bridge.d.ts +23 -0
  204. package/dist/helix-element/react-bridge.js +2 -2
  205. package/dist/helix-form-element/helix-form-element.d.ts +5 -20
  206. package/dist/helix-form-element/helix-form-element.js +4 -56
  207. package/dist/index.d.ts +30 -9
  208. package/dist/index.js +30 -9
  209. package/dist/mixins/mixin-chart-source/mixin-chart-source.d.ts +24 -2
  210. package/dist/mixins/mixin-chart-source/mixin-chart-source.js +23 -1
  211. package/dist/mixins/mixin-controller-active/mixin-controller-active.js +4 -3
  212. package/dist/mixins/mixin-controller-checked/mixin-controller-checked.d.ts +5 -2
  213. package/dist/mixins/mixin-controller-checked/mixin-controller-checked.js +2 -1
  214. package/dist/mixins/mixin-controller-value/mixin-controller-value.d.ts +4 -2
  215. package/dist/mixins/mixin-controller-value/mixin-controller-value.js +7 -2
  216. package/dist/mixins/mixin-dismissible/mixin-dismissible.js +44 -7
  217. package/dist/mixins/mixin-field/mixin-field.js +2 -2
  218. package/dist/mixins/mixin-picker-feedback/mixin-picker-feedback.d.ts +42 -0
  219. package/dist/mixins/mixin-picker-feedback/mixin-picker-feedback.js +46 -0
  220. package/dist/mixins/mixin-picker-field/mixin-picker-field.d.ts +7 -4
  221. package/dist/mixins/mixin-picker-field/mixin-picker-field.js +6 -4
  222. package/dist/mixins/mixin-segmented-field/mixin-segmented-field.js +19 -9
  223. package/dist/utils/audit-name/audit-name-off.d.ts +10 -0
  224. package/dist/utils/audit-name/audit-name-off.js +1 -0
  225. package/dist/utils/audit-name/audit-name.d.ts +26 -8
  226. package/dist/utils/audit-name/audit-name.js +22 -30
  227. package/dist/utils/audit-source/audit-source-off.d.ts +10 -0
  228. package/dist/utils/audit-source/audit-source-off.js +1 -0
  229. package/dist/utils/audit-source/audit-source.d.ts +19 -0
  230. package/dist/utils/audit-source/audit-source.js +27 -0
  231. package/dist/utils/calendar/calendar.js +7 -7
  232. package/dist/utils/call-listener/call-listener.d.ts +16 -0
  233. package/dist/utils/call-listener/call-listener.js +17 -0
  234. package/dist/utils/chord/chord.d.ts +14 -0
  235. package/dist/utils/chord/chord.js +1 -0
  236. package/dist/utils/clamp/clamp.d.ts +7 -0
  237. package/dist/utils/clamp/clamp.js +1 -0
  238. package/dist/utils/css-color/css-color.js +1 -1
  239. package/dist/utils/draw-tooltip/draw-tooltip.d.ts +1 -1
  240. package/dist/utils/draw-tooltip/draw-tooltip.js +3 -1
  241. package/dist/utils/draw-tooltip/spoken-reading.d.ts +6 -2
  242. package/dist/utils/draw-tooltip/spoken-reading.js +5 -4
  243. package/dist/utils/elapsed-time/elapsed-time.d.ts +1 -1
  244. package/dist/utils/elapsed-time/elapsed-time.js +2 -5
  245. package/dist/utils/heading-level/heading-level.d.ts +8 -0
  246. package/dist/utils/heading-level/heading-level.js +4 -0
  247. package/dist/utils/host-words/host-words.d.ts +16 -0
  248. package/dist/utils/host-words/host-words.js +13 -0
  249. package/dist/utils/implicit-submit/implicit-submit.d.ts +25 -0
  250. package/dist/utils/implicit-submit/implicit-submit.js +52 -0
  251. package/dist/utils/load-more/load-more.d.ts +25 -0
  252. package/dist/utils/load-more/load-more.js +1 -0
  253. package/dist/utils/locale-of/locale-of.d.ts +18 -0
  254. package/dist/utils/locale-of/locale-of.js +26 -0
  255. package/dist/utils/name-text/name-text.d.ts +12 -0
  256. package/dist/utils/name-text/name-text.js +25 -0
  257. package/dist/utils/nearest/nearest.d.ts +9 -0
  258. package/dist/utils/nearest/nearest.js +9 -0
  259. package/dist/utils/number-format/number-format.d.ts +11 -1
  260. package/dist/utils/number-format/number-format.js +17 -5
  261. package/dist/utils/own-rule/own-rule.d.ts +16 -0
  262. package/dist/utils/own-rule/own-rule.js +7 -0
  263. package/dist/utils/plain-click/plain-click.d.ts +10 -0
  264. package/dist/utils/plain-click/plain-click.js +1 -0
  265. package/dist/utils/platform/platform.d.ts +8 -0
  266. package/dist/utils/platform/platform.js +1 -0
  267. package/dist/utils/press-type/press-type.d.ts +20 -0
  268. package/dist/utils/press-type/press-type.js +15 -0
  269. package/dist/utils/read-series/read-series.d.ts +14 -0
  270. package/dist/utils/read-series/read-series.js +15 -0
  271. package/dist/utils/relative-time/relative-time.d.ts +8 -0
  272. package/dist/utils/relative-time/relative-time.js +5 -2
  273. package/dist/utils/report-render/report-render.js +2 -14
  274. package/dist/utils/report-runtime/report-runtime.d.ts +11 -4
  275. package/dist/utils/report-runtime/report-runtime.js +2 -14
  276. package/dist/utils/report-usage/report-usage.js +2 -14
  277. package/dist/utils/row-data/row-data.d.ts +15 -0
  278. package/dist/utils/row-data/row-data.js +17 -0
  279. package/dist/utils/row-order/row-order.d.ts +141 -0
  280. package/dist/utils/row-order/row-order.js +76 -0
  281. package/dist/utils/scroll-item-into-view/scroll-item-into-view.d.ts +33 -0
  282. package/dist/utils/scroll-item-into-view/scroll-item-into-view.js +13 -3
  283. package/dist/utils/slotted-glyph/slotted-glyph.d.ts +33 -0
  284. package/dist/utils/slotted-glyph/slotted-glyph.js +27 -0
  285. package/dist/utils/tell-disclosure/tell-disclosure.d.ts +4 -0
  286. package/dist/utils/tree-arrow/tree-arrow.d.ts +23 -0
  287. package/dist/utils/tree-arrow/tree-arrow.js +9 -0
  288. package/dist/utils/typeahead/typeahead.d.ts +75 -0
  289. package/dist/utils/typeahead/typeahead.js +37 -0
  290. package/dist/utils/value-as/value-as.d.ts +9 -0
  291. package/dist/utils/value-as/value-as.js +9 -1
  292. package/dist/utils/verdict-flags/verdict-flags.d.ts +13 -0
  293. package/dist/utils/verdict-flags/verdict-flags.js +6 -0
  294. package/dist/utils/watch-labels/watch-labels.d.ts +16 -0
  295. package/dist/utils/watch-labels/watch-labels.js +34 -0
  296. package/dist/utils/words-converter/words-converter.d.ts +14 -0
  297. package/dist/utils/words-converter/words-converter.js +15 -0
  298. package/dist/utils/written-list/written-list.d.ts +60 -0
  299. package/dist/utils/written-list/written-list.js +46 -0
  300. package/dist/version.d.ts +1 -1
  301. package/dist/version.js +1 -1
  302. package/package.json +29 -5
@@ -0,0 +1,459 @@
1
+ /** Detail carried by `helix-before-open` and `helix-before-close`. */
2
+ export interface OpenDetail {
3
+ /** The state the element is moving to. */
4
+ open: boolean;
5
+ }
6
+ /** Detail carried by `helix-next` and `helix-previous`. */
7
+ export interface SkipDetail {
8
+ /** Which way the reader asked to go. */
9
+ to: 'next' | 'previous';
10
+ }
11
+ /**
12
+ * Detail carried by a pan request, `helix-map-pan` being the one Map sends.
13
+ *
14
+ * Named for the surface rather than for the map, because the surface is shared:
15
+ * `MixinViewport` is what asks, and a canvas or a graph asking the same question
16
+ * should not be importing a type with `Map` in its name. `MapPanDetail` stays as
17
+ * an alias, that being what a consumer of Map wrote before this was split.
18
+ */
19
+ export interface ViewportPanDetail {
20
+ /** Which way the reader asked to go, in reading order rather than compass order. */
21
+ to: 'up' | 'down' | 'start' | 'end';
22
+ /** How far, as a fraction of the viewport the map is drawn in. */
23
+ by: number;
24
+ }
25
+ /** Detail carried by a zoom request, named for the surface for the same reason. */
26
+ export interface ViewportZoomDetail {
27
+ /** Which way, `1` in and `-1` out, so a consumer can multiply by their own step. */
28
+ by: number;
29
+ }
30
+ /**
31
+ * Where a move or a resize puts each card it carries, in the board's own
32
+ * units.
33
+ *
34
+ * **One contract for both**, because what a controlled page does with either
35
+ * is the same: write the geometry the detail says onto the cards it renders. A
36
+ * resize says `width` and `height` as well, and moves `x` and `y` too when it
37
+ * is dragged from a corner other than the bottom right.
38
+ */
39
+ export interface MoveDetail {
40
+ /**
41
+ * Every card the gesture moves, the one the reader took hold of first.
42
+ *
43
+ * **A list, because a group carries what is inside it.** Dragging a group
44
+ * moves its cards with it, which is what every board does, and a controlled
45
+ * consumer who refuses the move has to write every position it would have
46
+ * written, not only the one the pointer was on.
47
+ */
48
+ nodes: Array<{
49
+ name: string;
50
+ x: number;
51
+ y: number;
52
+ width?: number;
53
+ height?: number;
54
+ }>;
55
+ }
56
+ /** Which two cards a reader asked to join, by name, and the side they started from. */
57
+ export interface ConnectDetail {
58
+ from: string;
59
+ to: string;
60
+ /** The side the reader drew from, where they drew from one. */
61
+ fromSide?: 'top' | 'right' | 'bottom' | 'left' | undefined;
62
+ /** The side nearest where they let go, where they let go over a card. */
63
+ toSide?: 'top' | 'right' | 'bottom' | 'left' | undefined;
64
+ }
65
+ /** Where a connection's ends are going, and where they were. */
66
+ export interface ReconnectDetail {
67
+ /** The connection's name, where it has one. */
68
+ name: string;
69
+ /** Its ends before, so a page that named none of its connections can find it. */
70
+ was: {
71
+ from: string;
72
+ to: string;
73
+ };
74
+ from: string;
75
+ to: string;
76
+ fromSide?: 'top' | 'right' | 'bottom' | 'left' | undefined;
77
+ toSide?: 'top' | 'right' | 'bottom' | 'left' | undefined;
78
+ }
79
+ /** A label a reader rewrote on a board, and what it said before. */
80
+ export interface RelabelDetail {
81
+ /** What was relabelled: a connection, or a group, whose name the board draws. */
82
+ target: 'edge' | 'group';
83
+ /** Its name on the board. */
84
+ name: string;
85
+ /** A connection's ends, so a page that named none of its connections can find it. */
86
+ from?: string | undefined;
87
+ to?: string | undefined;
88
+ /** The new label, empty for none. */
89
+ label: string;
90
+ /** The label before. */
91
+ was: string;
92
+ }
93
+ /** Why a file field did not take a file. */
94
+ export type Refusal = 'count' | 'invalid' | 'size' | 'type';
95
+ /** One file a file field did not take, and why. */
96
+ export interface RefusedFile {
97
+ /** The file. */
98
+ readonly file: File;
99
+ /** What the field's `validate` said about it, where it was the one refusing. */
100
+ readonly message?: string;
101
+ /** Why it was not taken. */
102
+ readonly reason: Refusal;
103
+ }
104
+ /** The files a file field refused. */
105
+ export interface RejectDetail {
106
+ /** Each refused file with its reason, in the order they arrived. */
107
+ files: RefusedFile[];
108
+ }
109
+ /** What a reader asked to take off the board. */
110
+ export interface RemoveDetail {
111
+ /** The cards, by name. */
112
+ nodes: string[];
113
+ /**
114
+ * The connections, including every one attached to a card being removed,
115
+ * since a line to nothing is not drawn but its element would stay behind.
116
+ * Each carries its ends as well as its name, so a page that named none of
117
+ * its connections can still find them.
118
+ */
119
+ edges: Array<{
120
+ name: string;
121
+ from: string;
122
+ to: string;
123
+ }>;
124
+ }
125
+ /**
126
+ * Where a board is looking: the point at the middle of the view, in the
127
+ * document's own units, and how far it is zoomed.
128
+ *
129
+ * The middle rather than a corner, so a view saved in one box and restored in
130
+ * a box of another size shows the same thing in the middle of it.
131
+ */
132
+ export interface CanvasView {
133
+ x: number;
134
+ y: number;
135
+ zoom: number;
136
+ }
137
+ /** What `ViewportPanDetail` was called when only Map had one. */
138
+ export type MapPanDetail = ViewportPanDetail;
139
+ /** What `ViewportZoomDetail` was called when only Map had one. */
140
+ export type MapZoomDetail = ViewportZoomDetail;
141
+ /** Detail carried by `helix-navigate`. */
142
+ export interface NavigateDetail {
143
+ /**
144
+ * The page asked for, as a number, where the component pages by number.
145
+ *
146
+ * Beside `value` rather than in place of it, because a calendar pages by
147
+ * month and its `value` is a month.
148
+ */
149
+ page?: number;
150
+ /** Where the view is moving to, in whatever the component pages by. */
151
+ value: string;
152
+ }
153
+ /** Detail carried by `helix-filter`. */
154
+ export interface FilterDetail {
155
+ /** What the list is being narrowed to. */
156
+ value: string;
157
+ }
158
+ /**
159
+ * Detail carried by `helix-facet`.
160
+ *
161
+ * **Everything needed to draw the chip, so nothing has to be looked up again.**
162
+ * A consumer hearing this renders a `FilterChip` from it and stops: the labels
163
+ * are the reader's words and the names are their own model's, and both are here
164
+ * because only the thing that read the declarations knows both.
165
+ */
166
+ export interface FacetDetail {
167
+ /**
168
+ * How many values the comparison in force takes.
169
+ *
170
+ * **What tells an empty filter from no filter.** `values` empty usually means
171
+ * the field is not being filtered any more, and a consumer drops the chip; a
172
+ * comparison of arity `none`, `is empty` or `is set`, is a filter that has no
173
+ * values to carry and never will. Without this the two arrive identical, and
174
+ * the thing that read the declaration is the only thing that could say which.
175
+ */
176
+ arity: 'many' | 'none' | 'one';
177
+ /** What the consumer's model calls the field. */
178
+ field: string;
179
+ /** What a reader is shown for the field. */
180
+ label: string;
181
+ /** What the consumer's model calls the comparison in force. */
182
+ operator: string;
183
+ /**
184
+ * The comparison as a reader sees it, and **empty for the field's usual one**.
185
+ *
186
+ * Passed straight to a chip's `operator-label`, which draws the segment only
187
+ * where there is one. Deciding it here is the point: the thing that read the
188
+ * field knows which of its operators is the default, and the chip never has
189
+ * to.
190
+ */
191
+ operatorLabel: string;
192
+ /** What the field is compared to, as the consumer's own values. */
193
+ values: readonly string[];
194
+ }
195
+ /** Detail carried by `helix-read`. */
196
+ export interface ReadDetail {
197
+ /**
198
+ * The state being asked for, as a boolean rather than a word that reads like
199
+ * one, which is `helix-before-toggle`'s rule and for the same reason: `"false"` is
200
+ * truthy and a consumer who forgets that marks everything read.
201
+ */
202
+ read: boolean;
203
+ }
204
+ /** Detail carried by `helix-send`. */
205
+ export interface SendDetail {
206
+ /** What the reader wrote, as they left it. */
207
+ value: string;
208
+ }
209
+ /** Detail carried by `helix-sort`. */
210
+ export interface SortDetail {
211
+ /**
212
+ * The order being asked for, as `field:direction`.
213
+ *
214
+ * **One string rather than a field and a direction beside it**, because a sort
215
+ * is one fact and two properties holding half of it each is the mistake
216
+ * `helix-table`'s `columns` string already made in this family: the headings
217
+ * and the widths were two halves of one thing kept in two places with nothing
218
+ * holding them together. `name:asc` is also what a URL query carries and what
219
+ * an API takes, so a consumer syncing either does no translation.
220
+ *
221
+ * Empty means unsorted, which is a state a reader can ask for: a third click
222
+ * on a sortable heading returns the set to the order it arrived in, and that
223
+ * order is information the data came with.
224
+ */
225
+ value: string;
226
+ }
227
+ /** Detail carried by `helix-dismiss`. */
228
+ export interface DismissDetail {
229
+ /** Text content of the element asking to go, for identifying which it was. */
230
+ label: string;
231
+ }
232
+ /** What a stop's own controls ask the tour to do. */
233
+ export interface TourAskDetail {
234
+ /**
235
+ * Which control was pressed.
236
+ */
237
+ what: 'back' | 'next' | 'skip';
238
+ }
239
+ /**
240
+ * Detail carried by every request that proposes a value.
241
+ *
242
+ * **`value` is a string, and the things that are not strings are the rule
243
+ * rather than the exception to it.** Pagination's page, its page size, the
244
+ * splitter's position and the carousel's index all announce through `String()`.
245
+ * That is deliberate: an HTML value is a string, a consumer parses one back
246
+ * with `Number()`, and nothing is lost on the way.
247
+ *
248
+ * A boolean is the case where it *is* lost, because `"false"` is truthy, so a
249
+ * consumer who forgets to compare against the word gets the opposite answer and
250
+ * no error. That is why checkedness has `helix-before-toggle` and its own boolean, and
251
+ * it is the line to hold: **stringify a value, never a fact.** A new control
252
+ * whose state is a boolean wants an event with a typed detail, not a `String()`
253
+ * call here.
254
+ *
255
+ * **There is no `property` field.** Every verb in this file says by itself which
256
+ * property a request is about, and two families sharing a verb are told apart by
257
+ * the element rather than by a field: `composedPath()[0]` survives the retarget
258
+ * that `event.target` does not.
259
+ */
260
+ export interface ChangeDetail {
261
+ /** The value after the change. */
262
+ value: string;
263
+ }
264
+ /** Detail carried by `helix-activate`: the value after the move, and the one before it. */
265
+ export interface ActivateDetail extends ChangeDetail {
266
+ /** The value that was current before the move, where the set knows it. */
267
+ previous?: string;
268
+ }
269
+ /** Where each note was laid out, by its `id`, in the renderer's own units. */
270
+ export interface GraphLayoutDetail {
271
+ positions: Record<string, {
272
+ x: number;
273
+ y: number;
274
+ z?: number | undefined;
275
+ }>;
276
+ }
277
+ /** What changed on a graph frame that the renderer has to hear. */
278
+ export interface GraphPartChangeDetail {
279
+ /**
280
+ * `data` for the notes or the links, which are drawn again; `focus` for the
281
+ * selected note or the depth, which change what is emphasized and shown;
282
+ * `gestures` for which gestures the renderer takes.
283
+ */
284
+ kind: 'data' | 'focus' | 'gestures';
285
+ }
286
+ /** One signal between two notes, as the frame's `signal()` sends it. */
287
+ export interface GraphSignalDetail {
288
+ /** The note the signal leaves, by its `id`. */
289
+ from: string;
290
+ /**
291
+ * What the signal means, which colors it. Where none is given, the signal
292
+ * turns from the first note's color to the second's as it crosses.
293
+ */
294
+ tone?: 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning' | undefined;
295
+ /** The note the signal reaches, by its `id`. */
296
+ to: string;
297
+ }
298
+ /** Detail carried by `helix-graph-filter`. */
299
+ export interface GraphFilterDetail {
300
+ /** The groups the graph would hide, by name: every group the reader has turned off, after this press. */
301
+ hidden: readonly string[];
302
+ }
303
+ /** A rotate request: turn by some degrees, or turn to a bearing. */
304
+ export interface MapRotateDetail {
305
+ /** Degrees to turn the map clockwise. Negative turns it counterclockwise. */
306
+ by?: number;
307
+ /** The bearing to turn the map to, in degrees clockwise from north. `0` faces north. */
308
+ to?: number;
309
+ }
310
+ /** A tilt request, in degrees. */
311
+ export interface MapTiltDetail {
312
+ /** Degrees to tilt the map toward the horizon. Negative tilts it back toward flat. */
313
+ by?: number;
314
+ /** The tilt to go to, in degrees from looking straight down. `0` is flat. */
315
+ to?: number;
316
+ }
317
+ /** What changed on a part of a map: a line or a shape, or something standing on a place. */
318
+ export interface MapPartChangeDetail {
319
+ /**
320
+ * `layer` for a route or an area, which is redrawn; `place` for a marker or
321
+ * a position, which is moved; `cluster` for a marker gathered into another
322
+ * or let go, which moves the frame's tab stop; `menu` for the frame's layers
323
+ * menu opening, which asks for its map-type previews; `gestures` for which
324
+ * gestures the map takes, which the renderer is told.
325
+ */
326
+ kind: 'cluster' | 'gestures' | 'layer' | 'menu' | 'place';
327
+ }
328
+ /** What a cluster a reader pressed holds. */
329
+ export interface MapClusterDetail {
330
+ /**
331
+ * A points layer's count, as the connector keyed it, where the cluster is
332
+ * one the renderer drew rather than one of markers.
333
+ */
334
+ key?: string | undefined;
335
+ /** The names of the places it stands for, the one it is drawn as first, where they are known. */
336
+ labels: string[];
337
+ }
338
+ /** Detail carried by `helix-scrolled`. */
339
+ export interface ScrolledDetail {
340
+ /**
341
+ * Whether the page is scrolled away from the top, as a boolean and not a word
342
+ * that reads like one. Follows `helix-before-toggle`'s rule for the same reason.
343
+ */
344
+ scrolled: boolean;
345
+ }
346
+ /**
347
+ * What a press came from, React Aria's `PointerType`: a pointer by its kind, a
348
+ * key, or `virtual` for a press with neither behind it, which is how a screen
349
+ * reader's press and a script's `click()` arrive.
350
+ */
351
+ export type PressPointerType = 'keyboard' | 'mouse' | 'pen' | 'touch' | 'virtual';
352
+ /** Detail carried by `helix-press`. */
353
+ export interface PressDetail {
354
+ /** What the press came from. */
355
+ pointerType: PressPointerType;
356
+ }
357
+ /** Detail carried by `helix-band`. */
358
+ export interface BandDetail {
359
+ /** The band the reading is in now, or `''` where it is in none. */
360
+ band: '' | 'fair' | 'good' | 'poor';
361
+ }
362
+ /** Detail carried by `helix-tour-status`. */
363
+ export interface TourStatusDetail {
364
+ /** The stop it happened at, counting from 0. */
365
+ index: number;
366
+ /** Waiting at a `wait` stop for its target, skipped, or completed. */
367
+ status: 'completed' | 'skipped' | 'waiting';
368
+ }
369
+ /** Detail carried by `helix-before-toggle`. */
370
+ export interface ToggleDetail {
371
+ /** The state being asked for, as a boolean and not a word that reads like one. */
372
+ checked: boolean;
373
+ }
374
+ /** Detail carried by `helix-create`. */
375
+ export interface CreateDetail {
376
+ /** What the reader typed, which is being offered as a new answer. */
377
+ value: string;
378
+ }
379
+ /** Detail carried by `helix-aura-fallback`. */
380
+ export interface AuraFallbackDetail {
381
+ /**
382
+ * Why the gradient shows: `software` for a renderer that draws on the CPU,
383
+ * `unavailable` for no WebGL or a shader the browser refused, and `lost` for
384
+ * a context the browser took back, on a GPU reset or past its limit of about
385
+ * sixteen.
386
+ */
387
+ reason: 'lost' | 'software' | 'unavailable';
388
+ }
389
+ /** Detail carried by `helix-range-change`. */
390
+ export interface RangeDetail {
391
+ /** The index of the first item on screen. */
392
+ first: number;
393
+ /** One past the index of the last item on screen. */
394
+ last: number;
395
+ }
396
+ /** Detail carried by `helix-typing`. */
397
+ export interface TypingDetail {
398
+ /** Whether the user is writing now, as a boolean and not a word that reads like one. */
399
+ typing: boolean;
400
+ }
401
+ /** Detail carried by `helix-copy`. */
402
+ export interface CopyDetail {
403
+ /** What was put on the clipboard. */
404
+ value: string;
405
+ }
406
+ /** Detail carried by `helix-console`. */
407
+ export interface ConsoleDetail {
408
+ /** How the message was logged. */
409
+ level: 'log' | 'info' | 'warn' | 'error';
410
+ /** The message, already flattened to text. */
411
+ text: string;
412
+ }
413
+ /** Detail carried by `helix-resize`. */
414
+ export interface ResizeDetail {
415
+ /** How tall the content is, in CSS pixels. */
416
+ size: number;
417
+ }
418
+ /** Detail carried by `helix-caret`. */
419
+ export interface CaretDetail {
420
+ /** One-based column, counted in characters from the start of the line. */
421
+ column: number;
422
+ /** One-based line. */
423
+ line: number;
424
+ }
425
+ /** Detail carried by `helix-select`. */
426
+ export interface SelectDetail {
427
+ /**
428
+ * Whether the reader took the row's second destination rather than its first.
429
+ *
430
+ * Absent everywhere but a command palette, where a row can carry two: the
431
+ * value alone would say which was taken, since the two differ, but only by
432
+ * comparing strings a consumer would have to keep in step with the markup.
433
+ * A flag says it outright.
434
+ */
435
+ alternate?: boolean;
436
+ /**
437
+ * The link of a row that is a link, which the browser follows once the event
438
+ * is done unless it is canceled. A client-side router cancels it and follows
439
+ * the link itself.
440
+ */
441
+ href?: string;
442
+ /** Value of the item the reader chose. */
443
+ value: string;
444
+ }
445
+ /** Detail carried by `helix-complete`. */
446
+ export interface CompleteDetail {
447
+ /** What the control now holds, in full. */
448
+ value: string;
449
+ }
450
+ /** What a shortcut reports when its chord is pressed. */
451
+ export interface ShortcutDetail {
452
+ /**
453
+ * The chord that matched, as it was written.
454
+ *
455
+ * Given back rather than left to be remembered, so one handler can serve
456
+ * several keys and answer by comparing what it was told.
457
+ */
458
+ keys: string;
459
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { DismissDetail } from './details.js';
2
+ /**
3
+ * Fired when an element asks to be taken away.
4
+ *
5
+ * A request rather than a notification: the element does not remove itself,
6
+ * because the consumer owns the markup it is in and removing the node under
7
+ * them would put their state and the document out of step. Cancelable, so
8
+ * `preventDefault()` is a refusal.
9
+ *
10
+ * One verb for both shapes. A tag leaving a list and an announcement closing
11
+ * itself are the same act from the element's side.
12
+ */
13
+ export declare class HelixDismissEvent extends CustomEvent<DismissDetail> {
14
+ static readonly eventName = "helix-dismiss";
15
+ constructor(detail: DismissDetail);
16
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixDismissEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-dismiss'; }
3
+ constructor(detail) {
4
+ super(HelixDismissEvent.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
+ * Source was edited.
4
+ *
5
+ * The notification half of `helix-before-edit`, sent once the pane holds the
6
+ * new source, with that source. Not cancelable: the decision was the
7
+ * request's.
8
+ */
9
+ export declare class HelixEditEvent extends CustomEvent<ChangeDetail> {
10
+ static readonly eventName = "helix-edit";
11
+ constructor(detail: ChangeDetail);
12
+ }
@@ -0,0 +1,11 @@
1
+ export class HelixEditEvent extends CustomEvent {
2
+ static { this.eventName = 'helix-edit'; }
3
+ constructor(detail) {
4
+ super(HelixEditEvent.eventName, {
5
+ bubbles: true,
6
+ cancelable: false,
7
+ composed: true,
8
+ detail,
9
+ });
10
+ }
11
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * A sequence played to its last entry and stopped there: a video playlist
3
+ * with no `repeat`. Carries nothing, because the playlist still holds the last
4
+ * entry. Not cancelable: playback has already ended.
5
+ */
6
+ export declare class HelixEndEvent extends Event {
7
+ static readonly eventName = "helix-end";
8
+ constructor();
9
+ }
@@ -0,0 +1,6 @@
1
+ export class HelixEndEvent extends Event {
2
+ static { this.eventName = 'helix-end'; }
3
+ constructor() {
4
+ super(HelixEndEvent.eventName, { bubbles: true, cancelable: false, composed: true });
5
+ }
6
+ }