@fusion.dev/helix-headless 0.114.0 → 0.115.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.
@@ -62448,9 +62448,28 @@
62448
62448
  "declarations": [
62449
62449
  {
62450
62450
  "kind": "class",
62451
- "description": "`connectMap` fills the shape as a layer of the map, under its place names.\nThe frame lists each area by its `label` and `description` for screen\nreaders.",
62451
+ "description": "`connectMap` fills the shape as a layer of the map, under its place names.\nThe frame lists each area by its `label` and `description` for screen\nreaders.\n\nSet `caption` to draw words on the map with the area, such as a letter for a\nsearch sector, in a color that reads on the map. It is drawn rather than\nfocusable, so it adds nothing to the tab order, and a screen reader reads\nthe area's `label` in the frame's list.",
62452
62452
  "name": "HelixHeadlessMapArea",
62453
62453
  "members": [
62454
+ {
62455
+ "kind": "field",
62456
+ "name": "caption",
62457
+ "type": {
62458
+ "text": "string | undefined"
62459
+ },
62460
+ "description": "Words drawn on the map with the area, such as `A` for a search sector.\nUnset, nothing is drawn. Keep it short: it is a caption on a map, and the\narea's `label` is what a screen reader hears.",
62461
+ "attribute": "caption"
62462
+ },
62463
+ {
62464
+ "kind": "field",
62465
+ "name": "captionPlacement",
62466
+ "type": {
62467
+ "text": "'inside' | 'outside'"
62468
+ },
62469
+ "default": "'inside'",
62470
+ "description": "Where the caption stands. `inside`, the default, at the point of the area\nfurthest from its edges. `outside`, just above the area's northernmost\npoint, clear of the shape, for an area whose caption would cover what is\nin it.",
62471
+ "attribute": "caption-placement"
62472
+ },
62454
62473
  {
62455
62474
  "kind": "field",
62456
62475
  "name": "description",
@@ -62834,6 +62853,23 @@
62834
62853
  }
62835
62854
  ],
62836
62855
  "attributes": [
62856
+ {
62857
+ "name": "caption",
62858
+ "type": {
62859
+ "text": "string | undefined"
62860
+ },
62861
+ "description": "Words drawn on the map with the area, such as `A` for a search sector.\nUnset, nothing is drawn. Keep it short: it is a caption on a map, and the\narea's `label` is what a screen reader hears.",
62862
+ "fieldName": "caption"
62863
+ },
62864
+ {
62865
+ "name": "caption-placement",
62866
+ "type": {
62867
+ "text": "'inside' | 'outside'"
62868
+ },
62869
+ "default": "'inside'",
62870
+ "description": "Where the caption stands. `inside`, the default, at the point of the area\nfurthest from its edges. `outside`, just above the area's northernmost\npoint, clear of the shape, for an area whose caption would cover what is\nin it.",
62871
+ "fieldName": "captionPlacement"
62872
+ },
62837
62873
  {
62838
62874
  "name": "description",
62839
62875
  "type": {
@@ -9,6 +9,11 @@ import { type MapPoint } from '../route/map-route.js';
9
9
  * The frame lists each area by its `label` and `description` for screen
10
10
  * readers.
11
11
  *
12
+ * Set `caption` to draw words on the map with the area, such as a letter for a
13
+ * search sector, in a color that reads on the map. It is drawn rather than
14
+ * focusable, so it adds nothing to the tab order, and a screen reader reads
15
+ * the area's `label` in the frame's list.
16
+ *
12
17
  * @since 0.105.0
13
18
  * @status experimental
14
19
  * @category media
@@ -18,6 +23,19 @@ import { type MapPoint } from '../route/map-route.js';
18
23
  * @event {HelixMapPartChangeEvent} helix-map-part-change - The area's points, name, or color changed. Used by `connectMap`; pages do not need to listen for it.
19
24
  */
20
25
  export declare class HelixHeadlessMapArea extends HelixElement {
26
+ /**
27
+ * Words drawn on the map with the area, such as `A` for a search sector.
28
+ * Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
29
+ * area's `label` is what a screen reader hears.
30
+ */
31
+ caption?: string;
32
+ /**
33
+ * Where the caption stands. `inside`, the default, at the point of the area
34
+ * furthest from its edges. `outside`, just above the area's northernmost
35
+ * point, clear of the shape, for an area whose caption would cover what is
36
+ * in it.
37
+ */
38
+ captionPlacement: 'inside' | 'outside';
21
39
  /** More about the area. Read after its label in the frame's list. */
22
40
  description?: string;
23
41
  /**
@@ -11,6 +11,7 @@ import { pointsConverter } from '../route/map-route.js';
11
11
  let HelixHeadlessMapArea = class HelixHeadlessMapArea extends HelixElement {
12
12
  constructor() {
13
13
  super(...arguments);
14
+ this.captionPlacement = 'inside';
14
15
  this.isMapLayer = true;
15
16
  this.layerKind = 'area';
16
17
  this.label = 'Area';
@@ -23,6 +24,12 @@ let HelixHeadlessMapArea = class HelixHeadlessMapArea extends HelixElement {
23
24
  return nothing;
24
25
  }
25
26
  };
27
+ __decorate([
28
+ property()
29
+ ], HelixHeadlessMapArea.prototype, "caption", void 0);
30
+ __decorate([
31
+ property({ attribute: 'caption-placement' })
32
+ ], HelixHeadlessMapArea.prototype, "captionPlacement", void 0);
26
33
  __decorate([
27
34
  property()
28
35
  ], HelixHeadlessMapArea.prototype, "description", void 0);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-headless",
3
3
  "description": "Headless component tier. Structure, accessibility, state, and form participation. No styling.",
4
- "version": "0.114.0",
4
+ "version": "0.115.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -46,13 +46,13 @@
46
46
  },
47
47
  "bugs": "https://github.com/project-fusion/fusion/issues",
48
48
  "dependencies": {
49
- "@fusion.dev/helix-core": "0.114.0",
50
- "@fusion.dev/helix-icons": "0.114.0",
49
+ "@fusion.dev/helix-core": "0.115.0",
50
+ "@fusion.dev/helix-icons": "0.115.0",
51
51
  "uqr": "^0.1.3"
52
52
  },
53
53
  "devDependencies": {
54
- "@fusion.dev/helix-cem": "0.114.0",
55
- "@fusion.dev/helix-testing": "0.114.0",
54
+ "@fusion.dev/helix-cem": "0.115.0",
55
+ "@fusion.dev/helix-testing": "0.115.0",
56
56
  "@fusion.dev/scripts": "0.0.0-dev",
57
57
  "@happy-dom/global-registrator": "^20.0.0",
58
58
  "@lit-labs/ssr": "^4.1.0",
package/types/jsx.d.ts CHANGED
@@ -11474,6 +11474,20 @@ export type HelixHeadlessMapAreaHelixMapPartChangeElementEvent =
11474
11474
  HelixHeadlessMapAreaElementEvent<HelixMapPartChangeEvent>;
11475
11475
 
11476
11476
  export type HelixHeadlessMapAreaProps = {
11477
+ /** Words drawn on the map with the area, such as `A` for a search sector.
11478
+ Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
11479
+ area's `label` is what a screen reader hears. */
11480
+ caption?: (HelixHeadlessMapArea["caption"]) | undefined;
11481
+ /** Where the caption stands. `inside`, the default, at the point of the area
11482
+ furthest from its edges. `outside`, just above the area's northernmost
11483
+ point, clear of the shape, for an area whose caption would cover what is
11484
+ in it. */
11485
+ "caption-placement"?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
11486
+ /** Where the caption stands. `inside`, the default, at the point of the area
11487
+ furthest from its edges. `outside`, just above the area's northernmost
11488
+ point, clear of the shape, for an area whose caption would cover what is
11489
+ in it. */
11490
+ captionPlacement?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
11477
11491
  /** More about the area. Read after its label in the frame's list. */
11478
11492
  description?: (HelixHeadlessMapArea["description"]) | undefined;
11479
11493
  /** A name this layer shares with other layers, such as a route and its
@@ -11494,6 +11508,20 @@ first. */
11494
11508
  };
11495
11509
 
11496
11510
  export type HelixHeadlessMapAreaSolidJsProps = {
11511
+ /** Words drawn on the map with the area, such as `A` for a search sector.
11512
+ Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
11513
+ area's `label` is what a screen reader hears. */
11514
+ "prop:caption"?: (HelixHeadlessMapArea["caption"]) | undefined;
11515
+ /** Where the caption stands. `inside`, the default, at the point of the area
11516
+ furthest from its edges. `outside`, just above the area's northernmost
11517
+ point, clear of the shape, for an area whose caption would cover what is
11518
+ in it. */
11519
+ "attr:caption-placement"?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
11520
+ /** Where the caption stands. `inside`, the default, at the point of the area
11521
+ furthest from its edges. `outside`, just above the area's northernmost
11522
+ point, clear of the shape, for an area whose caption would cover what is
11523
+ in it. */
11524
+ "prop:captionPlacement"?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
11497
11525
  /** More about the area. Read after its label in the frame's list. */
11498
11526
  "prop:description"?: (HelixHeadlessMapArea["description"]) | undefined;
11499
11527
  /** A name this layer shares with other layers, such as a route and its
@@ -32495,10 +32523,22 @@ export type CustomElements = {
32495
32523
  * The frame lists each area by its `label` and `description` for screen
32496
32524
  * readers.
32497
32525
  *
32526
+ * Set `caption` to draw words on the map with the area, such as a letter for a
32527
+ * search sector, in a color that reads on the map. It is drawn rather than
32528
+ * focusable, so it adds nothing to the tab order, and a screen reader reads
32529
+ * the area's `label` in the frame's list.
32530
+ *
32498
32531
  * ## Attributes & Properties
32499
32532
  *
32500
32533
  * Component attributes and properties that can be applied to the element or by using JavaScript.
32501
32534
  *
32535
+ * - `caption`: Words drawn on the map with the area, such as `A` for a search sector.
32536
+ * Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
32537
+ * area's `label` is what a screen reader hears.
32538
+ * - `caption-placement`/`captionPlacement`: Where the caption stands. `inside`, the default, at the point of the area
32539
+ * furthest from its edges. `outside`, just above the area's northernmost
32540
+ * point, clear of the shape, for an area whose caption would cover what is
32541
+ * in it.
32502
32542
  * - `description`: More about the area. Read after its label in the frame's list.
32503
32543
  * - `group`: A name this layer shares with other layers, such as a route and its
32504
32544
  * dotted legs. The layers menu shows layers in the same group as one entry,
@@ -52564,10 +52604,22 @@ export type CustomElementsSolidJs = {
52564
52604
  * The frame lists each area by its `label` and `description` for screen
52565
52605
  * readers.
52566
52606
  *
52607
+ * Set `caption` to draw words on the map with the area, such as a letter for a
52608
+ * search sector, in a color that reads on the map. It is drawn rather than
52609
+ * focusable, so it adds nothing to the tab order, and a screen reader reads
52610
+ * the area's `label` in the frame's list.
52611
+ *
52567
52612
  * ## Attributes & Properties
52568
52613
  *
52569
52614
  * Component attributes and properties that can be applied to the element or by using JavaScript.
52570
52615
  *
52616
+ * - `caption`: Words drawn on the map with the area, such as `A` for a search sector.
52617
+ * Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
52618
+ * area's `label` is what a screen reader hears.
52619
+ * - `caption-placement`/`captionPlacement`: Where the caption stands. `inside`, the default, at the point of the area
52620
+ * furthest from its edges. `outside`, just above the area's northernmost
52621
+ * point, clear of the shape, for an area whose caption would cover what is
52622
+ * in it.
52571
52623
  * - `description`: More about the area. Read after its label in the frame's list.
52572
52624
  * - `group`: A name this layer shares with other layers, such as a route and its
52573
52625
  * dotted legs. The layers menu shows layers in the same group as one entry,
package/types/vue.d.ts CHANGED
@@ -5872,6 +5872,20 @@ export type HelixHeadlessMapAreaHelixMapPartChangeElementEvent =
5872
5872
  HelixHeadlessMapAreaElementEvent<HelixMapPartChangeEvent>;
5873
5873
 
5874
5874
  export type HelixHeadlessMapAreaVueProps = {
5875
+ /** Words drawn on the map with the area, such as `A` for a search sector.
5876
+ Unset, nothing is drawn. Keep it short: it is a caption on a map, and the
5877
+ area's `label` is what a screen reader hears. */
5878
+ caption?: (HelixHeadlessMapArea["caption"]) | undefined;
5879
+ /** Where the caption stands. `inside`, the default, at the point of the area
5880
+ furthest from its edges. `outside`, just above the area's northernmost
5881
+ point, clear of the shape, for an area whose caption would cover what is
5882
+ in it. */
5883
+ "caption-placement"?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
5884
+ /** Where the caption stands. `inside`, the default, at the point of the area
5885
+ furthest from its edges. `outside`, just above the area's northernmost
5886
+ point, clear of the shape, for an area whose caption would cover what is
5887
+ in it. */
5888
+ captionPlacement?: (HelixHeadlessMapArea["captionPlacement"]) | undefined;
5875
5889
  /** More about the area. Read after its label in the frame's list. */
5876
5890
  description?: (HelixHeadlessMapArea["description"]) | undefined;
5877
5891
  /** A name this layer shares with other layers, such as a route and its
@@ -12140,7 +12154,7 @@ export interface WcToolkitVueGlobalComponents {
12140
12154
  HelixHeadlessLoaderVueProps,
12141
12155
  HelixHeadlessLoaderVueEvents
12142
12156
  >;
12143
- /** 'connectMap' fills the shape as a layer of the map, under its place names. The frame lists each area by its 'label' and 'description' for screen readers. */
12157
+ /** 'connectMap' fills the shape as a layer of the map, under its place names. The frame lists each area by its 'label' and 'description' for screen readers. Set 'caption' to draw words on the map with the area, such as a letter for a search sector, in a color that reads on the map. It is drawn rather than focusable, so it adds nothing to the tab order, and a screen reader reads the area's 'label' in the frame's list. */
12144
12158
  "helix-headless-map-area": DefineCustomElement<
12145
12159
  HelixHeadlessMapArea,
12146
12160
  HelixHeadlessMapAreaVueProps,