@fusion.dev/helix-headless 0.241.3 → 0.242.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 (89) hide show
  1. package/api.json +1 -1
  2. package/custom-elements.json +1 -1
  3. package/dist/chat/composer/chat-composer.d.ts +8 -1
  4. package/dist/chat/composer/chat-composer.js +15 -1
  5. package/dist/chat/message/chat-message.d.ts +12 -0
  6. package/dist/chat/message/chat-message.js +8 -0
  7. package/dist/chat/root/chat-root.d.ts +9 -0
  8. package/dist/chat/root/chat-root.js +13 -1
  9. package/dist/code-editor/root/code-editor-root.d.ts +1 -0
  10. package/dist/code-editor/root/code-editor-root.js +1 -1
  11. package/dist/column-manager/root/column-manager-root.d.ts +30 -2
  12. package/dist/column-manager/root/column-manager-root.js +73 -9
  13. package/dist/combobox/root/combobox-root.d.ts +8 -1
  14. package/dist/combobox/root/combobox-root.js +19 -2
  15. package/dist/data-table/root/data-table-root.d.ts +34 -6
  16. package/dist/data-table/root/data-table-root.js +42 -7
  17. package/dist/date-input/root/date-input-root.d.ts +8 -1
  18. package/dist/date-input/root/date-input-root.js +19 -2
  19. package/dist/date-picker/root/date-picker-root.d.ts +5 -0
  20. package/dist/date-picker/root/date-picker-root.js +3 -0
  21. package/dist/editor/root/editor-root.d.ts +1 -0
  22. package/dist/editor/root/editor-root.js +1 -1
  23. package/dist/element-events.generated.js +2 -0
  24. package/dist/file-input/root/file-input-root.d.ts +8 -1
  25. package/dist/file-input/root/file-input-root.js +19 -2
  26. package/dist/filter-input/root/filter-input-root.d.ts +8 -1
  27. package/dist/filter-input/root/filter-input-root.js +13 -1
  28. package/dist/find/root/find-root.d.ts +1 -0
  29. package/dist/find/root/find-root.js +4 -4
  30. package/dist/hover-card/index.d.ts +1 -0
  31. package/dist/hover-card/index.js +1 -0
  32. package/dist/hover-card/root/hover-card-root.d.ts +122 -0
  33. package/dist/hover-card/root/hover-card-root.js +185 -0
  34. package/dist/index.d.ts +2 -0
  35. package/dist/index.js +2 -0
  36. package/dist/line-chart/root/line-chart-root.d.ts +7 -1
  37. package/dist/line-chart/root/line-chart-root.js +6 -0
  38. package/dist/list/root/list-root.d.ts +12 -1
  39. package/dist/list/root/list-root.js +11 -1
  40. package/dist/log/line/log-line.d.ts +11 -0
  41. package/dist/log/line/log-line.js +8 -0
  42. package/dist/log/root/log-root.d.ts +9 -0
  43. package/dist/log/root/log-root.js +13 -1
  44. package/dist/meter/root/meter-root.d.ts +12 -1
  45. package/dist/meter/root/meter-root.js +31 -2
  46. package/dist/navigation/root/navigation-root.d.ts +5 -1
  47. package/dist/navigation/root/navigation-root.js +13 -1
  48. package/dist/notifications/root/notifications-root.d.ts +10 -1
  49. package/dist/notifications/root/notifications-root.js +12 -1
  50. package/dist/object-inspector/root/object-inspector-root.js +6 -6
  51. package/dist/pagination/root/pagination-root.d.ts +16 -1
  52. package/dist/pagination/root/pagination-root.js +19 -1
  53. package/dist/popover/root/popover-root.d.ts +6 -0
  54. package/dist/popover/root/popover-root.js +2 -0
  55. package/dist/progress/root/progress-root.d.ts +11 -1
  56. package/dist/progress/root/progress-root.js +29 -2
  57. package/dist/sparkline/root/sparkline-root.d.ts +3 -1
  58. package/dist/sparkline/root/sparkline-root.js +8 -1
  59. package/dist/stat/root/stat-root.d.ts +22 -1
  60. package/dist/stat/root/stat-root.js +27 -4
  61. package/dist/table/root/table-root.d.ts +22 -5
  62. package/dist/table/root/table-root.js +13 -1
  63. package/dist/tabs/root/tabs-root.d.ts +6 -1
  64. package/dist/tabs/root/tabs-root.js +12 -1
  65. package/dist/tag/group/tag-group.d.ts +13 -1
  66. package/dist/tag/group/tag-group.js +12 -1
  67. package/dist/terminal/root/terminal-root.d.ts +1 -0
  68. package/dist/terminal/root/terminal-root.js +1 -1
  69. package/dist/theme-toggle/index.d.ts +1 -0
  70. package/dist/theme-toggle/index.js +1 -0
  71. package/dist/theme-toggle/root/theme-toggle-root.d.ts +98 -0
  72. package/dist/theme-toggle/root/theme-toggle-root.js +68 -0
  73. package/dist/time-input/root/time-input-root.d.ts +8 -1
  74. package/dist/time-input/root/time-input-root.js +19 -2
  75. package/dist/timeline/root/timeline-root.d.ts +10 -1
  76. package/dist/timeline/root/timeline-root.js +11 -1
  77. package/dist/toggle/group/toggle-group.d.ts +5 -1
  78. package/dist/toggle/group/toggle-group.js +12 -2
  79. package/dist/tree/root/tree-root.d.ts +13 -1
  80. package/dist/tree/root/tree-root.js +11 -1
  81. package/dist/trend/root/trend-root.d.ts +14 -1
  82. package/dist/trend/root/trend-root.js +20 -2
  83. package/examples.json +1 -1
  84. package/lint.json +1 -1
  85. package/package.json +5 -5
  86. package/types/jsx.d.ts +425 -10
  87. package/types/svelte.d.ts +2 -0
  88. package/types/vue.d.ts +249 -8
  89. package/types/words.d.ts +8 -0
@@ -15,6 +15,7 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartStat
15
15
  this.slots = new WeakMap();
16
16
  this.names = new CategoryAxisController(this);
17
17
  this.zero = false;
18
+ this.drawnCounts = new Map();
18
19
  }
19
20
  static { this.markRules = [MIRROR_RULE]; }
20
21
  static { this.words = 'helix-line-chart'; }
@@ -106,6 +107,9 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartStat
106
107
  }
107
108
  ends(series, x, y) {
108
109
  return series.flatMap((one, depth) => {
110
+ const before = this.drawnCounts.get(one.name);
111
+ this.drawnCounts.set(one.name, one.points.length);
112
+ const jumped = before !== undefined && before !== one.points.length;
109
113
  const last = one.points.at(-1);
110
114
  if (!this.showsSeries(one.name)) {
111
115
  return [];
@@ -116,6 +120,7 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartStat
116
120
  return [
117
121
  {
118
122
  index: seriesIndex(depth),
123
+ jumped,
119
124
  x: (x(last.at) / PLOT_WIDTH) * 100,
120
125
  y: (y(last.value) / PLOT_HEIGHT) * 100,
121
126
  },
@@ -229,6 +234,7 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartStat
229
234
  }
230
235
  return html `${ends.map((end) => html `<span
231
236
  aria-hidden="true"
237
+ ?data-jumped=${end.jumped}
232
238
  part="terminus"
233
239
  style=${`--chart-series: var(--chart-series-${end.index}); --chart-terminus-x: ${end.x}%; --chart-terminus-y: ${end.y}%`}
234
240
  ></span>`)}`;
@@ -1,4 +1,4 @@
1
- import { HelixElement, KeyboardNavigationController, UpgradeController } from '@fusion.dev/helix-core';
1
+ import { HelixElement, KeyboardNavigationController, LayoutMotionController, UpgradeController } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  import { HelixHeadlessListItem } from '../item/list-item.js';
4
4
  import { type ListSelectionBehavior, type ListSelectionMode } from '../selection.js';
@@ -65,6 +65,13 @@ import { type ListSelectionBehavior, type ListSelectionMode } from '../selection
65
65
  * | Space, Enter | Drops the row. |
66
66
  * | Escape | Puts the row back where it was. |
67
67
  *
68
+ * **Rows slide to their places.** When you sort, add, remove or hide rows,
69
+ * each one moves from where it was drawn to where it is now, and a row you
70
+ * add fades in. The list times it from `--list-move-duration` and
71
+ * `--list-move-easing`, which the styled tier sets from the duration and
72
+ * easing tokens. Here neither is set, so nothing moves until you set them.
73
+ * Under reduced motion nothing moves, whatever they say.
74
+ *
68
75
  * `start` and `reversed` number an ordered list as `<ol>` does. The list
69
76
  * writes where the numbers start and which way they run as `--list-first` and
70
77
  * `--list-step` on its slot, which the styled tier counts from. Reversed with
@@ -113,6 +120,8 @@ import { type ListSelectionBehavior, type ListSelectionMode } from '../selection
113
120
  * @csspart loading - The row after the last while `loading` is set. A grid row with one cell in a list that selects.
114
121
  *
115
122
  * @cssproperty --list-first - The number of the first row, written where `start` or `reversed` moves it.
123
+ * @cssproperty --list-move-duration - How long a row takes to slide to its new place, or to fade in. Unset, nothing moves.
124
+ * @cssproperty --list-move-easing - The curve a row slides and fades in along.
116
125
  * @cssproperty --list-step - What each row adds to the number before it: `1`, or `-1` where `reversed`.
117
126
  *
118
127
  * @cssstate empty - While the list has no rows.
@@ -304,6 +313,8 @@ export declare class HelixHeadlessList extends HelixElement {
304
313
  * page's, so a drop asks the page to move them.
305
314
  */
306
315
  private readonly reorder;
316
+ /** Sliding each row to its new place when the page sorts, adds, removes or hides rows. */
317
+ protected readonly motion: LayoutMotionController;
307
318
  /** Whether the list is a grid a reader moves through. */
308
319
  private get interactive();
309
320
  /** The rows the list holds, in order. */
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { auditName, commaList, customElement, deepActiveElement, drawStatus, focusItemOf, formatWords, HelixElement, HelixLoadMoreEvent, hostAria, inlineStep, inRowOrder, internalsOf, KeyboardNavigationController, numberConverter, placeKey, pressedOwnControl, ReorderController, requestReorder, requestValue, rovingStop, StatusController, scrollingAncestor, scrollRoom, selectsAll, typeaheadByWords, UpgradeController, whenHydrated, words, } from '@fusion.dev/helix-core';
2
+ import { auditName, commaList, customElement, deepActiveElement, drawStatus, focusItemOf, formatWords, HelixElement, HelixLoadMoreEvent, hostAria, inlineStep, inRowOrder, internalsOf, KeyboardNavigationController, LayoutMotionController, numberConverter, placeKey, pressedOwnControl, ReorderController, requestReorder, requestValue, rovingStop, StatusController, scrollingAncestor, scrollRoom, selectsAll, typeaheadByWords, UpgradeController, whenHydrated, words, } from '@fusion.dev/helix-core';
3
3
  import { html, nothing } from 'lit';
4
4
  import { property } from 'lit/decorators.js';
5
5
  import { HelixActionEvent } from '../events/index.js';
@@ -59,6 +59,16 @@ let HelixHeadlessList = class HelixHeadlessList extends HelixElement {
59
59
  return first ? scrollingAncestor(first, { axis: 'y', overflowing: true }) : null;
60
60
  },
61
61
  });
62
+ this.motion = new LayoutMotionController(this, {
63
+ items: () => this.rows,
64
+ timing: () => {
65
+ const style = getComputedStyle(this);
66
+ return {
67
+ duration: style.getPropertyValue('--list-move-duration'),
68
+ easing: style.getPropertyValue('--list-move-easing'),
69
+ };
70
+ },
71
+ });
62
72
  this.rowsChanged = false;
63
73
  this.handleKeyCapture = (event) => {
64
74
  this.moving = { extend: event.shiftKey, toggle: event.ctrlKey || event.metaKey };
@@ -47,9 +47,20 @@ export type LogTimes = 'absolute' | 'relative';
47
47
  * @cssproperty --log-run-background-color - Written on a `run` with a background, in the same form as `--log-run-color`.
48
48
  * @cssproperty --log-run-color - Written on a `run` with a text color: one of the sixteen `--log-ansi-*` colors the log publishes, or the color itself.
49
49
  *
50
+ * @cssstate arriving - The line was written at the end of a log already drawn.
50
51
  * @cssstate filtered - The log's `query` does not match the line, or its `level` is quieter than the log shows, so it draws nothing.
51
52
  */
52
53
  export declare class HelixHeadlessLogLine extends HelixElement {
54
+ /**
55
+ * **Arriving, where it joins the end of a log already drawn**:
56
+ * `:state(arriving)`, which a stylesheet can bring it in by. Not where it
57
+ * was there as the log first drew, which is what the page came with, not
58
+ * history loaded above, and not inside a log that draws its lines from
59
+ * data, which marks its own.
60
+ */
61
+ connectedCallback(): void;
62
+ /** Whether it joined one already drawn, as `:state(arriving)` says, for the tier above to bring it in by. */
63
+ protected arriving: boolean;
53
64
  /** The key this family's words are registered under, its styled tag. */
54
65
  static words: string;
55
66
  /** When the line was written: milliseconds since the epoch, or anything `Date` parses. */
@@ -15,6 +15,7 @@ const elapsed = (seconds) => {
15
15
  let HelixHeadlessLogLine = class HelixHeadlessLogLine extends HelixElement {
16
16
  constructor() {
17
17
  super(...arguments);
18
+ this.arriving = false;
18
19
  this.at = '';
19
20
  this.levelWords = {
20
21
  debug: 'Debug:',
@@ -45,6 +46,13 @@ let HelixHeadlessLogLine = class HelixHeadlessLogLine extends HelixElement {
45
46
  }
46
47
  };
47
48
  }
49
+ connectedCallback() {
50
+ super.connectedCallback();
51
+ const parent = this.parentElement;
52
+ const later = (one) => one !== null && (one.localName === this.localName || later(one.nextElementSibling));
53
+ this.arriving = parent?.hasUpdated === true && !later(this.nextElementSibling);
54
+ this.toggleState('arriving', this.arriving);
55
+ }
48
56
  static { this.words = 'helix-log'; }
49
57
  willUpdate(changed) {
50
58
  super.willUpdate(changed);
@@ -552,6 +552,15 @@ export declare class HelixHeadlessLog extends HelixHeadlessLog_base {
552
552
  private get digits();
553
553
  /** The rows drawn from data, a window of them, between the room the rest would take. */
554
554
  private renderRows;
555
+ /** The highest line number drawn at the last render, to tell a line written since. */
556
+ private lastLine;
557
+ /**
558
+ * The line number after which the lines are new this render, or none: a
559
+ * line written since the last render, not one scrolled back into view.
560
+ * Those take `data-arriving` for this render, which a stylesheet can bring
561
+ * them in by.
562
+ */
563
+ private arrivingAfter;
555
564
  /**
556
565
  * The `resume` slot, with the way back drawn where nothing is slotted, behind
557
566
  * a seam: the slot answers a page, and this answers the tier above.
@@ -858,10 +858,22 @@ let HelixHeadlessLog = class HelixHeadlessLog extends MixinCollection(HelixEleme
858
858
  .slice(first, last)
859
859
  .flatMap((row) => (row.kind === 'line' ? [row.number] : []));
860
860
  const stop = this.interactive ? this.stopAmong(drawn) : 0;
861
+ const arriving = this.arrivingAfter();
861
862
  return html `<div part="before" role="presentation" style="block-size: ${before}px; flex: none"></div>
862
- ${repeat(this.view.rows.slice(first, last), (row) => (row.kind === 'group' ? `group:${row.group.id}` : `line:${row.number}`), (row, offset) => html `<div part="row" data-index=${first + offset}>${this.renderRow(row, marks, start, stop)}</div>`)}
863
+ ${repeat(this.view.rows.slice(first, last), (row) => (row.kind === 'group' ? `group:${row.group.id}` : `line:${row.number}`), (row, offset) => html `<div part="row" data-index=${first + offset} ?data-arriving=${row.kind === 'line' && row.number > arriving}>${this.renderRow(row, marks, start, stop)}</div>`)}
863
864
  <div part="after" role="presentation" style="block-size: ${after}px; flex: none"></div>`;
864
865
  }
866
+ arrivingAfter() {
867
+ let highest = 0;
868
+ for (const row of this.view.rows) {
869
+ if (row.kind === 'line' && row.number > highest) {
870
+ highest = row.number;
871
+ }
872
+ }
873
+ const was = this.lastLine;
874
+ this.lastLine = highest;
875
+ return this.hasUpdated && was !== undefined && was > 0 ? was : Number.POSITIVE_INFINITY;
876
+ }
865
877
  renderResume() {
866
878
  return html `<slot name="resume"
867
879
  ><button part="resume-button" type="button">
@@ -1,4 +1,4 @@
1
- import { HelixElement } from '@fusion.dev/helix-core';
1
+ import { CountController, HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /** Which band a value falls in, once `optimum` has said which end is good. */
4
4
  export type MeterBand = 'fair' | 'good' | 'poor';
@@ -52,6 +52,8 @@ export type MeterBand = 'fair' | 'good' | 'poor';
52
52
  *
53
53
  * @cssproperty --meter-along - Where a bound sits on the arc, as a length along it.
54
54
  * @cssproperty --meter-at - Where a bound sits on a linear track, as a percentage.
55
+ * @cssproperty --meter-count-duration - How long the number shown under `show-value` takes to count to a new value. Unset, it changes at once.
56
+ * @cssproperty --meter-count-easing - The curve the number shown counts along.
55
57
  * @cssproperty --meter-fraction - The value as a fraction of the range, 0 to 1.
56
58
  * @cssproperty --meter-span - How much the range holds, `max` less `min`, which a segment divides its own value by to find its width.
57
59
  * @cssproperty --meter-sweep - How much of the circle the arc covers, as a path length.
@@ -63,6 +65,7 @@ export type MeterBand = 'fair' | 'good' | 'poor';
63
65
  * @cssstate under - The value is below `min`.
64
66
  */
65
67
  export declare class HelixHeadlessMeter extends HelixElement {
68
+ protected static markRules: string[];
66
69
  /**
67
70
  * The key this family's words are registered under, its styled tag:
68
71
  * `registerWords('de', { 'helix-meter': { liveLabel: '{reading}, {band}' } })`.
@@ -286,6 +289,14 @@ export declare class HelixHeadlessMeter extends HelixElement {
286
289
  * keeps an unbanded meter from being painted as good news.
287
290
  */
288
291
  private get computedBand();
292
+ /**
293
+ * Counting the number shown under `show-value` from the one before, so it
294
+ * keeps pace with the fill. While it counts, the passing numbers are hidden
295
+ * from screen readers and the new reading is read in their place.
296
+ */
297
+ protected readonly count: CountController;
298
+ /** The number drawn while a count runs. */
299
+ private get countingText();
289
300
  /**
290
301
  * What the reading says: the consumer's words, or the reading in
291
302
  * `format-options`, a share of the range for a percent and the value for
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { auditName, customElement, drawStatus, formatWords, HelixElement, hostAria, internalsOf, numberConverter, readingText, StatusController, slottedWords, words, wordsConverter, wordsLocale, } from '@fusion.dev/helix-core';
2
+ import { auditName, CountController, customElement, drawStatus, formatWords, HelixElement, hostAria, internalsOf, numberConverter, readingText, SPOKEN_RULE, StatusController, slottedWords, words, wordsConverter, wordsLocale, } from '@fusion.dev/helix-core';
3
3
  import { html, nothing, svg } from 'lit';
4
4
  import { property } from 'lit/decorators.js';
5
5
  import { HelixBandEvent } from '../events/index.js';
@@ -17,10 +17,20 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
17
17
  this.value = 0;
18
18
  this.valueText = '';
19
19
  this.status = new StatusController(this);
20
+ this.count = new CountController(this, {
21
+ timing: () => {
22
+ const style = getComputedStyle(this);
23
+ return {
24
+ duration: style.getPropertyValue('--meter-count-duration'),
25
+ easing: style.getPropertyValue('--meter-count-easing'),
26
+ };
27
+ },
28
+ });
20
29
  this.renamed = () => {
21
30
  this.requestUpdate();
22
31
  };
23
32
  }
33
+ static { this.markRules = [SPOKEN_RULE]; }
24
34
  static { this.words = 'helix-meter'; }
25
35
  get segments() {
26
36
  return this.knownChildren.filter((child) => child.localName.endsWith('meter-segment'));
@@ -81,12 +91,25 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
81
91
  const distance = Math.abs(which(this.reading) - which(optimum));
82
92
  return distance === 0 ? 'good' : distance === 1 ? 'fair' : 'poor';
83
93
  }
94
+ get countingText() {
95
+ const { max, min } = this.span;
96
+ const counting = this.count.counting ?? this.amount;
97
+ return readingText(counting, (counting - min) / (max - min), wordsLocale(this), this.formatOptions);
98
+ }
84
99
  get text() {
85
100
  return (this.valueText ||
86
101
  readingText(Number.isFinite(this.amount) ? this.amount : this.span.min, this.ratio, wordsLocale(this), this.formatOptions));
87
102
  }
88
103
  willUpdate(changed) {
89
104
  super.willUpdate(changed);
105
+ const was = changed.get('value');
106
+ if (changed.has('value') &&
107
+ this.hasUpdated &&
108
+ was !== undefined &&
109
+ this.showValue &&
110
+ !this.valueText) {
111
+ this.count.start(was, this.value);
112
+ }
90
113
  const { max, min } = this.span;
91
114
  hostAria(internalsOf(this), {
92
115
  label: slottedWords(this, ['label']) || this.label,
@@ -170,7 +193,13 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
170
193
  style="--meter-fraction: ${this.fraction}"
171
194
  ></div>`}
172
195
  </div>`}
173
- ${this.showValue ? html `<span part="value">${this.text}</span>` : nothing}${drawStatus(this.status)}`;
196
+ ${this.showValue
197
+ ? this.count.counting === undefined
198
+ ? html `<span part="value">${this.text}</span>`
199
+ : html `<span part="value" aria-hidden="true">${this.countingText}</span><span data-spoken
200
+ >${this.text}</span
201
+ >`
202
+ : nothing}${drawStatus(this.status)}`;
174
203
  }
175
204
  };
176
205
  __decorate([
@@ -1,4 +1,4 @@
1
- import { AriaForwardController, HelixElement, KeyboardNavigationController } from '@fusion.dev/helix-core';
1
+ import { AriaForwardController, HelixElement, HoverMarkController, KeyboardNavigationController } from '@fusion.dev/helix-core';
2
2
  import { nothing, type PropertyValues, type TemplateResult } from 'lit';
3
3
  import '../../menu/index.js';
4
4
  /**
@@ -73,6 +73,7 @@ import '../../menu/index.js';
73
73
  * @slot menu-icon - Replaces the glyph on the overflow button where it is too narrow for words.
74
74
  * @slot more-icon - Replaces the caret on the button that opens the overflow menu.
75
75
  *
76
+ * @csspart highlight - The wash under the pointer, which glides from destination to destination while a mouse or pen moves along them. It carries the destination's place and size as the indicator does, `data-placed` while it is over one, and `data-gliding` from the frame after it arrives. Hidden until a stylesheet shows it, so the headless tier lays out as it did without it.
76
77
  * @csspart indicator - The marker that moves to the current destination. It carries the destination's place and size as `--indicator-x`, `--indicator-y`, `--indicator-inline-size` and `--indicator-block-size`, and `data-placed` once it has been placed.
77
78
  * @csspart more - The button that opens the overflow menu, drawn after the last destination on the row while any has folded.
78
79
  * @csspart more-current - The current destination's name on the button, while every destination has folded.
@@ -102,6 +103,7 @@ import '../../menu/index.js';
102
103
  * @csspart overflow-title - The name of the submenu that is showing.
103
104
  *
104
105
  * @cssstate folded - While any destination has folded into the overflow menu.
106
+ * @cssstate gliding - While a mouse or pen is over a destination, so the highlight draws the hover wash in place of each destination's own.
105
107
  * @cssstate open - While a megamenu or another disclosure among the destinations is open.
106
108
  */
107
109
  export declare class HelixHeadlessNavigation extends HelixElement {
@@ -111,6 +113,8 @@ export declare class HelixHeadlessNavigation extends HelixElement {
111
113
  */
112
114
  static words: string;
113
115
  private readonly indicator;
116
+ /** Moves the hover wash to whichever destination is under the pointer. */
117
+ protected readonly highlight: HoverMarkController;
114
118
  /**
115
119
  * Whether the arrow keys move focus between the destinations.
116
120
  *
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { AriaForwardController, customElement, focusableElements, focusItemOf, formatWords, HelixElement, IndicatorController, insideBox, KeyboardNavigationController, OverflowController, reportRuntime, untilReactHydrated, words, } from '@fusion.dev/helix-core';
2
+ import { AriaForwardController, customElement, focusableElements, focusItemOf, formatWords, HelixElement, HoverMarkController, IndicatorController, insideBox, KeyboardNavigationController, OverflowController, reportRuntime, untilReactHydrated, words, } from '@fusion.dev/helix-core';
3
3
  import { caretDown, list } from '@fusion.dev/helix-icons';
4
4
  import { nothing } from 'lit';
5
5
  import { property } from 'lit/decorators.js';
@@ -50,6 +50,17 @@ let HelixHeadlessNavigation = class HelixHeadlessNavigation extends HelixElement
50
50
  observe: () => [...this.items, ...[this.partNamed('more')].filter((one) => one !== null)],
51
51
  surface: () => this.partNamed('nav'),
52
52
  });
53
+ this.highlight = new HoverMarkController(this, {
54
+ gliding: (on) => this.toggleState('gliding', on),
55
+ item: (under) => {
56
+ const more = this.partNamed('more');
57
+ const items = this.items;
58
+ return under.find((one) => one instanceof HTMLElement && (one === more || items.includes(one)));
59
+ },
60
+ mark: () => this.partNamed('highlight'),
61
+ observe: () => this.items,
62
+ surface: () => this.partNamed('nav'),
63
+ });
53
64
  this.arrows = false;
54
65
  this.currentLabel = '{name}, more destinations';
55
66
  this.fallbackLabel = 'Main';
@@ -336,6 +347,7 @@ let HelixHeadlessNavigation = class HelixHeadlessNavigation extends HelixElement
336
347
  }
337
348
  render() {
338
349
  return html `<nav part="nav" aria-label=${this.label || this.fallbackLabel}>
350
+ <div part="highlight" aria-hidden="true" hidden></div>
339
351
  <div part="indicator" aria-hidden="true"><slot name="indicator"></slot></div>
340
352
  <slot @slotchange=${this.handleSlotChange}></slot>
341
353
  ${this.renderOverflow()}
@@ -1,4 +1,4 @@
1
- import { ChildrenController, HelixElement, UpgradeController } from '@fusion.dev/helix-core';
1
+ import { ChildrenController, HelixElement, LayoutMotionController, UpgradeController } from '@fusion.dev/helix-core';
2
2
  import { nothing, type PropertyValues, type TemplateResult } from 'lit';
3
3
  import type { HelixHeadlessNotificationGroup } from '../group/notification-group.js';
4
4
  import type { HelixHeadlessNotification } from '../notification/notification.js';
@@ -86,6 +86,9 @@ declare const HelixHeadlessNotifications_base: (new (...args: any[]) => import("
86
86
  * @csspart mark-all - The control that marks everything read.
87
87
  * @csspart more - The button after the list that asks for more, while `load-more` is set. It is `aria-disabled` while the feed is loading.
88
88
  *
89
+ * @cssproperty --notifications-move-duration - How long a row or a group takes to slide to its new place when one before it arrives or goes, or to fade in. Unset, nothing moves.
90
+ * @cssproperty --notifications-move-easing - The curve a row slides and fades in along.
91
+ *
89
92
  * @cssstate empty - While the feed holds no notification and is not loading, and `error-text` is not set. Never on the server, which cannot count the rows.
90
93
  * @cssstate error - While `error-text` is set.
91
94
  * @cssstate loading - While `loading` is set.
@@ -197,6 +200,12 @@ export declare class HelixHeadlessNotifications extends HelixHeadlessNotificatio
197
200
  * feed a flat list again.
198
201
  */
199
202
  get rows(): Element[];
203
+ /**
204
+ * Slides the rows and groups to their places when one arrives or goes, and
205
+ * fades in a row that arrives, as `List` does, timed from
206
+ * `--notifications-move-duration` and `--notifications-move-easing`.
207
+ */
208
+ protected readonly motion: LayoutMotionController;
200
209
  /**
201
210
  * The groups written into the feed, in the order they are written.
202
211
  *
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { assignSlots, ChildrenController, customElement, DelayController, deepContains, focusableElements, formatWords, HelixElement, HelixLoadMoreEvent, hostAria, internalsOf, MixinCollection, markRegion, numberConverter, rovingStop, UpgradeController, whenHydrated, words, } from '@fusion.dev/helix-core';
2
+ import { assignSlots, ChildrenController, customElement, DelayController, deepContains, focusableElements, formatWords, HelixElement, HelixLoadMoreEvent, hostAria, internalsOf, LayoutMotionController, MixinCollection, markRegion, numberConverter, rovingStop, UpgradeController, whenHydrated, words, } from '@fusion.dev/helix-core';
3
3
  import { html, nothing } from 'lit';
4
4
  import { property } from 'lit/decorators.js';
5
5
  import { HelixBeforeReadEvent, HelixReadEvent } from '../events/index.js';
@@ -15,6 +15,17 @@ let HelixHeadlessNotifications = class HelixHeadlessNotifications extends MixinC
15
15
  this.loadMoreLabel = 'Load more';
16
16
  this.markAll = false;
17
17
  this.markAllLabel = 'Mark all as read';
18
+ this.motion = new LayoutMotionController(this, {
19
+ items: () => this.rows.filter((row) => row instanceof HTMLElement),
20
+ leaving: () => this.partNamed('list'),
21
+ timing: () => {
22
+ const style = getComputedStyle(this);
23
+ return {
24
+ duration: style.getPropertyValue('--notifications-move-duration'),
25
+ easing: style.getPropertyValue('--notifications-move-easing'),
26
+ };
27
+ },
28
+ });
18
29
  this.handleSlotChange = () => {
19
30
  this.assign();
20
31
  this.requestUpdate();
@@ -1,7 +1,7 @@
1
1
  var HelixHeadlessObjectInspector_1;
2
2
  import { __decorate } from "tslib";
3
- import { AriaForwardController, CopyController, countLabel, customElement, drawStatus, elementById, formatWords, HelixActivateEvent, HelixBeforeActivateEvent, HelixBeforeCloseEvent, HelixBeforeFilterEvent, HelixBeforeOpenEvent, HelixElement, HelixFilterEvent, inlineStep, MIRROR_RULE, numberConverter, pageRows, requestChange, SCROLLER_RULE, StatusController, scrollItemIntoView, scrollRoom, searchableById, Typeahead, treeArrow, VIRTUAL_RULE, VirtualizeController, words, wordsLocale, } from '@fusion.dev/helix-core';
4
- import { caretDown, caretRight } from '@fusion.dev/helix-icons';
3
+ import { AriaForwardController, CopyController, countLabel, customElement, drawStatus, elementById, formatWords, HelixActivateEvent, HelixBeforeActivateEvent, HelixBeforeCloseEvent, HelixBeforeFilterEvent, HelixBeforeOpenEvent, HelixElement, HelixFilterEvent, inlineStep, numberConverter, pageRows, requestChange, SCROLLER_RULE, SHUT_RULE, StatusController, scrollItemIntoView, scrollRoom, searchableById, Typeahead, treeArrow, VIRTUAL_RULE, VirtualizeController, words, wordsLocale, } from '@fusion.dev/helix-core';
4
+ import { caretDown } from '@fusion.dev/helix-icons';
5
5
  import { html, nothing } from 'lit';
6
6
  import { property, state } from 'lit/decorators.js';
7
7
  import { repeat } from 'lit/directives/repeat.js';
@@ -179,7 +179,7 @@ let HelixHeadlessObjectInspector = class HelixHeadlessObjectInspector extends He
179
179
  };
180
180
  }
181
181
  static { HelixHeadlessObjectInspector_1 = this; }
182
- static { this.markRules = [SCROLLER_RULE, VIRTUAL_RULE, MIRROR_RULE]; }
182
+ static { this.markRules = [SCROLLER_RULE, VIRTUAL_RULE, SHUT_RULE]; }
183
183
  static { this.words = 'helix-object-inspector'; }
184
184
  get active() {
185
185
  return this.wanted ?? this.rows[this.cursor]?.path ?? '';
@@ -465,12 +465,12 @@ let HelixHeadlessObjectInspector = class HelixHeadlessObjectInspector extends He
465
465
  ><div role="gridcell" style="display: contents">${row.branch
466
466
  ? html `<svg
467
467
  part="toggle"
468
- ?data-mirror=${!row.open}
468
+ ?data-shut=${!row.open}
469
469
  fill="currentColor"
470
- viewBox=${(row.open ? caretDown : caretRight).viewBox}
470
+ viewBox=${caretDown.viewBox}
471
471
  aria-hidden="true"
472
472
  >
473
- ${unsafeSVG((row.open ? caretDown : caretRight).content)}
473
+ ${unsafeSVG(caretDown.content)}
474
474
  </svg>`
475
475
  : nothing}${row.key === undefined ? nothing : html `<span part="key">${row.key}</span>: `}${this.drawValue(row)}</div>
476
476
  </div>`;
@@ -1,4 +1,4 @@
1
- import { HelixElement } from '@fusion.dev/helix-core';
1
+ import { HelixElement, IndicatorController, LayoutMotionController } from '@fusion.dev/helix-core';
2
2
  import { type CSSResultGroup, type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
4
  * @summary Controls for moving between the pages of a long set of results.
@@ -45,6 +45,7 @@ import { type CSSResultGroup, type PropertyValues, type TemplateResult } from 'l
45
45
  *
46
46
  * @csspart first - The control that jumps to the first page, under `ends`.
47
47
  * @csspart gap - The control in place of hidden pages, which jumps into them.
48
+ * @csspart indicator - One mark that moves to the page you are on, inside the run. It carries the page's place and size as `--indicator-x`, `--indicator-y`, `--indicator-inline-size` and `--indicator-block-size`, and `data-placed` once it has been placed. Hidden until a stylesheet shows it, so the headless tier lays out as it did without it.
48
49
  * @csspart item - One slot in the run, holding a page or a gap.
49
50
  * @csspart last - The control that jumps to the last page, under `ends`.
50
51
  * @csspart list - The run of pages.
@@ -408,6 +409,20 @@ export declare class HelixHeadlessPagination extends HelixElement {
408
409
  protected renderPrevious(): TemplateResult;
409
410
  protected renderNext(): TemplateResult;
410
411
  protected renderLast(): TemplateResult;
412
+ /**
413
+ * The mark that moves to the page you are on, as the selection mark of
414
+ * `Toggle Group` and `Tabs` moves, so changing page is one mark traveling
415
+ * along the run. Measured against the run, which scrolls it with the pages.
416
+ */
417
+ protected readonly indicator: IndicatorController;
418
+ /**
419
+ * Sliding the pages along the run as it moves, so going to the next page
420
+ * where the run keeps the current one in its middle reads as the numbers
421
+ * moving along under the mark, and a page coming into the run fades in.
422
+ * Timed by `--pagination-move-duration` and `--pagination-move-easing`,
423
+ * which this tier never sets, so it moves nothing until a stylesheet does.
424
+ */
425
+ protected readonly motion: LayoutMotionController;
411
426
  protected render(): TemplateResult;
412
427
  /**
413
428
  * The region that says the page moved.
@@ -1,5 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
- import { customElement, deepActiveElement, fillTemplate, formatNumbers, formatWords, HelixBeforeNavigateEvent, HelixElement, HelixNavigateEvent, hostAria, internalsOf, MIRROR_RULE, numberConverter, requestChange, words, wordsLocale, } from '@fusion.dev/helix-core';
2
+ import { customElement, deepActiveElement, fillTemplate, formatNumbers, formatWords, HelixBeforeNavigateEvent, HelixElement, HelixNavigateEvent, hostAria, IndicatorController, internalsOf, LayoutMotionController, MIRROR_RULE, numberConverter, requestChange, words, wordsLocale, } from '@fusion.dev/helix-core';
3
3
  import { caretDoubleLeft, caretDoubleRight, caretLeft, caretRight, } from '@fusion.dev/helix-icons';
4
4
  import { css, html, nothing, } from 'lit';
5
5
  import { property, state } from 'lit/decorators.js';
@@ -44,6 +44,23 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
44
44
  this.used = { control, gap };
45
45
  }
46
46
  };
47
+ this.indicator = new IndicatorController(this, {
48
+ active: () => this.renderRoot?.querySelector('[part~="page"][aria-current="page"]'),
49
+ indicator: () => this.partNamed('indicator'),
50
+ observe: () => [...(this.renderRoot?.querySelectorAll('[part~="page"]') ?? [])],
51
+ surface: () => this.partNamed('list'),
52
+ });
53
+ this.motion = new LayoutMotionController(this, {
54
+ items: () => [...(this.renderRoot?.querySelectorAll('[part="item"]') ?? [])],
55
+ timing: () => {
56
+ const style = getComputedStyle(this);
57
+ return {
58
+ duration: style.getPropertyValue('--pagination-move-duration'),
59
+ easing: style.getPropertyValue('--pagination-move-easing'),
60
+ };
61
+ },
62
+ watch: 'updates',
63
+ });
47
64
  }
48
65
  static { this.markRules = [MIRROR_RULE]; }
49
66
  static { this.words = 'helix-pagination'; }
@@ -345,6 +362,7 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
345
362
  }
346
363
  return html `${this.ends ? this.renderFirst() : nothing}${this.renderPrevious()}
347
364
  <ol part="list" role="list">
365
+ <li part="indicator" role="none" aria-hidden="true" hidden></li>
348
366
  ${repeat(this.slots, (slot) => typeof slot === 'number'
349
367
  ? slot
350
368
  : slot.from < this.current
@@ -175,6 +175,12 @@ export declare class HelixHeadlessPopover extends HelixHeadlessPopover_base {
175
175
  placement: Placement;
176
176
  protected readonly phases: OpenPhaseController;
177
177
  private readonly panel;
178
+ /**
179
+ * Heard each time the panel is placed, after its new place is written, for
180
+ * a subclass that moves between two places: the styled tier glides the
181
+ * panel when it moves to another side or alignment while open. Nothing here.
182
+ */
183
+ protected placed(_placement: Placement): void;
178
184
  /**
179
185
  * The side of its trigger the panel last landed on, which names the arrow's
180
186
  * second part. Undefined until the first placement, which the server never
@@ -43,6 +43,7 @@ let HelixHeadlessPopover = class HelixHeadlessPopover extends MixinControllerOpe
43
43
  this.toggleState('placed-right', side === 'right');
44
44
  this.toggleState('placed-top', side === 'top');
45
45
  this.side = side;
46
+ this.placed(placement);
46
47
  },
47
48
  open: () => this.open,
48
49
  padding: () => this.containerPadding,
@@ -105,6 +106,7 @@ let HelixHeadlessPopover = class HelixHeadlessPopover extends MixinControllerOpe
105
106
  this.settled = false;
106
107
  }
107
108
  static { this.words = 'helix-popover'; }
109
+ placed(_placement) { }
108
110
  get slotted() {
109
111
  return (this.renderRoot
110
112
  ?.querySelector('slot:not([name])')
@@ -1,4 +1,4 @@
1
- import { HelixElement } from '@fusion.dev/helix-core';
1
+ import { CountController, HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
4
  * @summary A bar or ring that shows how far along a task is.
@@ -49,6 +49,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
49
49
  * @csspart track - The full length the work is measured against.
50
50
  * @csspart value - The value shown beside the bar when `show-value` is set.
51
51
  *
52
+ * @cssproperty --progress-count-duration - How long the number shown under `show-value` takes to count to a new value. Unset, it changes at once.
53
+ * @cssproperty --progress-count-easing - The curve the number shown counts along.
52
54
  * @cssproperty --progress-fraction - The value as a fraction of the range, 0 to 1. Pinned to 1 while indeterminate.
53
55
  *
54
56
  * @cssstate complete - The value is at `max` and the bar is not indeterminate.
@@ -180,6 +182,12 @@ export declare class HelixHeadlessProgress extends HelixElement {
180
182
  private get range();
181
183
  /** What is done, as a fraction of the whole, between 0 and 1. */
182
184
  get fraction(): number;
185
+ /**
186
+ * Counting the number shown under `show-value` from the one before, so it
187
+ * keeps pace with the fill. Only the shown number counts: the host's
188
+ * `aria-valuenow` and `aria-valuetext` hold the new reading throughout.
189
+ */
190
+ protected readonly count: CountController;
183
191
  protected willUpdate(changed: PropertyValues): void;
184
192
  protected updated(changed: PropertyValues): void;
185
193
  /**
@@ -188,6 +196,8 @@ export declare class HelixHeadlessProgress extends HelixElement {
188
196
  * anything else.
189
197
  */
190
198
  private get text();
199
+ /** The number shown under `show-value`: the count while one runs, and the reading at rest. */
200
+ private get shownText();
191
201
  /** A label's words changed, so the name is written again. */
192
202
  private readonly renamed;
193
203
  /** The words on the bar changed, so the reading is said again and the state set. */