@fusion.dev/helix-headless 0.201.1 → 0.203.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.
@@ -114946,7 +114946,7 @@
114946
114946
  "name": "handleKeyDown",
114947
114947
  "privacy": "private",
114948
114948
  "readonly": true,
114949
- "description": "Down Arrow on the trigger of an open panel moves focus to the panel's first\nlink or control, as Radix's navigation menu does."
114949
+ "description": "Down Arrow on the trigger moves focus to the panel's first link or\ncontrol, opening the panel first where it is closed, as Radix's\nnavigation menu does.\n\n**Opening is the half a trigger that is a link needs.** A page may slot\nan anchor as the trigger, so the word in the bar goes to its product's\npage on a press and the panel opens on hover. Enter on that anchor goes\nto the page, which leaves a keyboard the arrow as its way into the panel."
114950
114950
  },
114951
114951
  {
114952
114952
  "kind": "field",
@@ -156917,6 +156917,10 @@
156917
156917
  "description": "The outline around the bar the pointer or the keys rest on, painted after it, so the bars in front of it cover it.",
156918
156918
  "name": "ring"
156919
156919
  },
156920
+ {
156921
+ "description": "The same outline, faint and dashed, drawn over every bar, so the part of the bar the pointer or the keys rest on that others hide still shows.",
156922
+ "name": "ring-behind"
156923
+ },
156920
156924
  {
156921
156925
  "description": "The number of bars, series, and categories, and the range of values, written as a sentence for screen readers, which describes the plot. Hide it visually.",
156922
156926
  "name": "summary"
@@ -167252,6 +167256,10 @@
167252
167256
  "description": "The outline around the block the pointer or the keys rest on, painted after it, so the blocks in front of it cover it.",
167253
167257
  "name": "ring"
167254
167258
  },
167259
+ {
167260
+ "description": "The same outline, faint and dashed, drawn over every block, so the part of the block the pointer or the keys rest on that others hide still shows.",
167261
+ "name": "ring-behind"
167262
+ },
167255
167263
  {
167256
167264
  "description": "The number of items and groups and the range of their sizes, written as a sentence for screen readers, which describes the plot. Hide it visually.",
167257
167265
  "name": "summary"
@@ -219285,6 +219293,6 @@
219285
219293
  ],
219286
219294
  "helix": {
219287
219295
  "package": "@fusion.dev/helix-headless",
219288
- "version": "0.201.1"
219296
+ "version": "0.203.0"
219289
219297
  }
219290
219298
  }
@@ -3,7 +3,7 @@ export type GraphNodeShape = 'circle' | 'diamond' | 'ring' | 'square';
3
3
  /** How heavily a note is drawn, from the `emphasis` axis. */
4
4
  export type GraphNodeEmphasis = 'outlined' | 'solid' | 'subtle';
5
5
  /** What a note is drawn as made of, from the `material` axis. */
6
- export type GraphNodeMaterial = 'frosted' | 'glass';
6
+ export type GraphNodeMaterial = 'frosted' | 'glass' | 'mark';
7
7
  /** What a note means, from the `tone` axis, which colors it over its group. */
8
8
  export type GraphNodeTone = 'accent' | 'danger' | 'info' | 'neutral' | 'primary' | 'success' | 'warning';
9
9
  /** One note in a graph. */
@@ -20,7 +20,7 @@ export interface GraphNode {
20
20
  emphasis?: GraphNodeEmphasis | undefined;
21
21
  /** A kind the note belongs to, such as a tag, which a renderer colors it by. */
22
22
  group?: string | undefined;
23
- /** What it is drawn as made of: `glass` or `frosted`. Unset is the renderer's own. */
23
+ /** What it is drawn as made of: `glass`, `frosted`, or `mark`. Unset is the renderer's own. */
24
24
  material?: GraphNodeMaterial | undefined;
25
25
  /**
26
26
  * Its shape, which says what kind of note it is at a glance: a person as a
@@ -224,8 +224,14 @@ export declare class HelixHeadlessMegamenu extends HelixHeadlessMegamenu_base {
224
224
  */
225
225
  protected readonly keys: KeyboardNavigationController;
226
226
  /**
227
- * Down Arrow on the trigger of an open panel moves focus to the panel's first
228
- * link or control, as Radix's navigation menu does.
227
+ * Down Arrow on the trigger moves focus to the panel's first link or
228
+ * control, opening the panel first where it is closed, as Radix's
229
+ * navigation menu does.
230
+ *
231
+ * **Opening is the half a trigger that is a link needs.** A page may slot
232
+ * an anchor as the trigger, so the word in the bar goes to its product's
233
+ * page on a press and the panel opens on hover. Enter on that anchor goes
234
+ * to the page, which leaves a keyboard the arrow as its way into the panel.
229
235
  */
230
236
  private readonly handleKeyDown;
231
237
  /** Watches the panel's links for the one that is the page you are on. */
@@ -39,17 +39,24 @@ let HelixHeadlessMegamenu = class HelixHeadlessMegamenu extends MixinControllerO
39
39
  wrap: false,
40
40
  });
41
41
  this.handleKeyDown = (event) => {
42
- if (event.key !== 'ArrowDown' || !this.open || event.defaultPrevented) {
42
+ if (event.key !== 'ArrowDown' || event.defaultPrevented) {
43
43
  return;
44
44
  }
45
45
  const trigger = this.trigger;
46
46
  if (!event.composedPath().includes(trigger)) {
47
47
  return;
48
48
  }
49
- const first = focusableElements(this).find((element) => element !== trigger && !element.closest('[slot="trigger"]'));
50
- if (first) {
51
- event.preventDefault();
52
- first.focus();
49
+ event.preventDefault();
50
+ const enter = () => {
51
+ focusableElements(this)
52
+ .find((element) => element !== trigger && !element.closest('[slot="trigger"]'))
53
+ ?.focus();
54
+ };
55
+ if (this.open) {
56
+ enter();
57
+ }
58
+ else if (this.requestOpen(true)) {
59
+ this.updateComplete.then(enter);
53
60
  }
54
61
  };
55
62
  this.handleScroll = () => {
@@ -85,6 +85,7 @@ declare const HelixHeadlessSpatialBarChart_base: typeof HelixElement & (new (...
85
85
  * @csspart mark - The invisible point the tooltip is anchored to, where the renderer draws the reading.
86
86
  * @csspart plot - The box the drawing fills, which takes focus to be read by key. It is named by the host's `aria-labelledby` or `aria-label`, then by `label`, then by the caption of the table.
87
87
  * @csspart ring - The outline around the bar the pointer or the keys rest on, painted after it, so the bars in front of it cover it.
88
+ * @csspart ring-behind - The same outline, faint and dashed, drawn over every bar, so the part of the bar the pointer or the keys rest on that others hide still shows.
88
89
  * @csspart summary - The number of bars, series, and categories, and the range of values, written as a sentence for screen readers, which describes the plot. Hide it visually.
89
90
  * @csspart table - The readings as a table, for a screen reader, rendered only where they were drawn from `data`. Hide it visually.
90
91
  * @csspart tick - A category's or a series' name, or a value at a tick, along its edge of the box, in the chart's own drawing.
@@ -177,7 +177,7 @@ let HelixHeadlessSpatialBarChart = class HelixHeadlessSpatialBarChart extends Mi
177
177
  @pointermove=${this.onDrawingMove}
178
178
  @pointerup=${this.onDrawingTap}
179
179
  >${this.noBox ? nothing : drawBox(view)}${depthOrder(view.projection, bars).map((bar) => svg `${this.renderBar(field, bar, at)}${bar === active ? svg `<path d=${active.drawn.outline} part="ring"></path>` : nothing}`)}${active
180
- ? svg `<foreignObject height="0.001" overflow="visible" width="0.001" x=${active.drawn.peak.x} y=${active.drawn.peak.y}>${this.renderOwnTooltip(cell?.row)}</foreignObject>`
180
+ ? svg `<path d=${active.drawn.outline} part="ring-behind"></path><foreignObject height="0.001" overflow="visible" width="0.001" x=${active.drawn.peak.x} y=${active.drawn.peak.y}>${this.renderOwnTooltip(cell?.row)}</foreignObject>`
181
181
  : nothing}</svg>
182
182
  </div>`;
183
183
  }
@@ -85,6 +85,7 @@ declare const HelixHeadlessSpatialTreemap_base: typeof HelixElement & (new (...a
85
85
  * @csspart mark - The invisible point the tooltip is anchored to, where the renderer draws the reading.
86
86
  * @csspart plot - The box the drawing fills, which takes focus to be read by key. It is named by the host's `aria-labelledby` or `aria-label`, then by `label`, then by the caption of the table.
87
87
  * @csspart ring - The outline around the block the pointer or the keys rest on, painted after it, so the blocks in front of it cover it.
88
+ * @csspart ring-behind - The same outline, faint and dashed, drawn over every block, so the part of the block the pointer or the keys rest on that others hide still shows.
88
89
  * @csspart summary - The number of items and groups and the range of their sizes, written as a sentence for screen readers, which describes the plot. Hide it visually.
89
90
  * @csspart table - The readings as a table, for a screen reader, rendered only where they were drawn from `data`. Hide it visually.
90
91
  * @csspart tick - A height at a tick, along its edge of the box, in the chart's own drawing.
@@ -174,7 +174,7 @@ let HelixHeadlessSpatialTreemap = class HelixHeadlessSpatialTreemap extends Mixi
174
174
  @pointermove=${this.onDrawingMove}
175
175
  @pointerup=${this.onDrawingTap}
176
176
  >${this.noBox ? nothing : drawBox(view)}${paintOrder(view.projection, blocks).map((block) => svg `${this.renderBlock(field, block, at)}${block === active ? svg `<path d=${active.drawn.outline} part="ring"></path>` : nothing}`)}${active
177
- ? svg `<foreignObject height="0.001" overflow="visible" width="0.001" x=${active.drawn.peak.x} y=${active.drawn.peak.y}>${this.renderOwnTooltip(field.blocks[at]?.row)}</foreignObject>`
177
+ ? svg `<path d=${active.drawn.outline} part="ring-behind"></path><foreignObject height="0.001" overflow="visible" width="0.001" x=${active.drawn.peak.x} y=${active.drawn.peak.y}>${this.renderOwnTooltip(field.blocks[at]?.row)}</foreignObject>`
178
178
  : nothing}</svg>
179
179
  </div>`;
180
180
  }