@uvalib/web-components 1.3.0 → 1.5.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.
@@ -25326,6 +25326,16 @@
25326
25326
  "privacy": "private",
25327
25327
  "default": "null"
25328
25328
  },
25329
+ {
25330
+ "kind": "field",
25331
+ "name": "slottedList",
25332
+ "type": {
25333
+ "text": "Element | null"
25334
+ },
25335
+ "privacy": "private",
25336
+ "default": "null",
25337
+ "description": "A list slotted through a `<slot>` child (from a host element's light DOM), also observed."
25338
+ },
25329
25339
  {
25330
25340
  "kind": "field",
25331
25341
  "name": "key",
@@ -25353,6 +25363,17 @@
25353
25363
  "privacy": "private",
25354
25364
  "default": "0"
25355
25365
  },
25366
+ {
25367
+ "kind": "method",
25368
+ "name": "observe",
25369
+ "privacy": "private",
25370
+ "return": {
25371
+ "type": {
25372
+ "text": "void"
25373
+ }
25374
+ },
25375
+ "description": "Watch the children, and a list slotted from outside them (it is not in this subtree)."
25376
+ },
25356
25377
  {
25357
25378
  "kind": "method",
25358
25379
  "name": "sourceImage",
@@ -25373,7 +25394,7 @@
25373
25394
  "text": "HTMLOListElement | HTMLUListElement | null"
25374
25395
  }
25375
25396
  },
25376
- "description": "The author's list (`<ol>` or `<ul>`), wherever it is now."
25397
+ "description": "The author's list (`<ol>` or `<ul>`), wherever it is now. A `<slot>` child (this element\ninside another component's shadow root) passes on that host's list, which stays in the\npage's light DOM (so the page's styles and listeners still apply to it)."
25377
25398
  },
25378
25399
  {
25379
25400
  "kind": "field",
@@ -25644,7 +25665,7 @@
25644
25665
  }
25645
25666
  }
25646
25667
  ],
25647
- "description": "An outline was clicked: focus its entry, and say so."
25668
+ "description": "An outline was clicked: say so first (`uvalib-image-regions-activate`, cancelable), then,\nunless the page took it over, focus the entry; then `select`. `entry` is the page's own\n`<li>` (its child list or a lightbox's lent list), never one this element drew from `items`."
25648
25669
  },
25649
25670
  {
25650
25671
  "kind": "field",
@@ -25798,12 +25819,19 @@
25798
25819
  },
25799
25820
  "description": "The highlighted region changed by hover or focus: `detail` is `{ item, index }` (`item` null and `index` -1 when none is). Bubbles and is composed."
25800
25821
  },
25822
+ {
25823
+ "name": "uvalib-image-regions-activate",
25824
+ "type": {
25825
+ "text": "CustomEvent"
25826
+ },
25827
+ "description": "A region's outline was clicked, before its list entry takes focus: `detail` is `{ index, item, entry }` (`index` from 0; `item` the region's record; `entry` the page's own `<li>`, from its child list or a lightbox's lent list, or null when this element drew the list from `items`). Cancelable: `preventDefault()` keeps the entry from taking focus, so the page can focus its own control in it instead (a \"Who is this?\" field). Bubbles and is composed."
25828
+ },
25801
25829
  {
25802
25830
  "name": "select",
25803
25831
  "type": {
25804
25832
  "text": "CustomEvent"
25805
25833
  },
25806
- "description": "A region's outline was clicked (focus moved to its list entry): `detail` is `{ item, index }`. Bubbles and is composed."
25834
+ "description": "A region's outline was clicked, after its entry took focus (or the page took the activate over): `detail` is `{ item, index, entry }`. Bubbles and is composed. Prefer `uvalib-image-regions-activate`: `select` is also the name of the native text-selection event."
25807
25835
  },
25808
25836
  {
25809
25837
  "description": "For `<site-analytics>`: `['uvalib-image-regions', 'select', '<label>', <number>]` when an outline is clicked (the list's `label`, and the region's number from 1). Never a region's label (it may be a person's name). Nothing on hover or focus. Bubbles and is composed.",
@@ -26088,7 +26116,7 @@
26088
26116
  "declarations": [
26089
26117
  {
26090
26118
  "kind": "class",
26091
- "description": "An accessible image viewer over a set of plain links. With JavaScript a primary click opens\na modal dialog; without it (or with a modified click) the link opens the image as before.\nWrap the links, or point at them with `selector` (for example `a.pb-image` on a reading\npage). There is no autoplay and no carousel.\n\nThe dialog is labelled by the caption (`data-caption`, else the image alt, else the link\ntext). Focus moves to Close on open and back to the trigger on close. Escape and a click on\nthe backdrop close it. With more than one image, Previous and Next and the arrow keys move\nthrough the set (wrapping), and a polite “3 of 13” counter is shown. Full size opens the\noriginal image in a new tab. A IIIF Image API URL keeps its region; only the size becomes\n`!W,H` for the viewport. TIFF and JPEG2000 URLs are left as written. `url-param` (for\nexample `photo`) keeps `?photo=<id>` in sync, including on a hash route\n(`#/text?photo=<id>`): opening pushes a history entry, stepping replaces it, and\nBack closes.\n\nOptional details: children with `slot=\"details\"` (and `data-for` equal to the item's id or\nits position from 1; without `data-for` they show for every image), or `data-details-id` on\na link pointing at an element elsewhere on the page. Either is shown inside the dialog and\nput back when the viewer moves on or closes.",
26119
+ "description": "An accessible image viewer over a set of plain links. With JavaScript a primary click opens\na modal dialog; without it (or with a modified click) the link opens the image as before.\nWrap the links, or point at them with `selector` (for example `a.pb-image` on a reading\npage). There is no autoplay and no carousel.\n\nThe dialog is labelled by the caption (`data-caption`, else the image alt, else the link\ntext). Focus moves to Close on open and back to the trigger on close. Escape and a click on\nthe backdrop close it. With more than one image, Previous and Next and the arrow keys move\nthrough the set (wrapping), and a polite “3 of 13” counter is shown. Full size opens the\noriginal image in a new tab. A IIIF Image API URL keeps its region; only the size becomes\n`!W,H` for the viewport. TIFF and JPEG2000 URLs are left as written. `url-param` (for\nexample `photo`) keeps `?photo=<id>` in sync, including on a hash route\n(`#/text?photo=<id>`): opening pushes a history entry, stepping replaces it, and\nBack closes.\n\nOptional details: children with `slot=\"details\"` (and `data-for` equal to the item's id or\nits position from 1; without `data-for` they show for every image), or `data-details-id` on\na link pointing at an element elsewhere on the page. Either is shown inside the dialog and\nput back when the viewer moves on or closes.\n\nOptional regions (people, objects, inscriptions): `data-regions` on a link, a JSON array of\n`{ label, x, y, w, h, unit? }` or `xywh` values each followed by its label, separated by\n`;` (`percent:10,20,30,40 Person 1; percent:55,15,20,30 Sign`), or the `regions` callback.\nThe open image then shows numbered outlines (`<uvalib-image-regions>`, loaded on first use)\nand a list of the regions beside it, with a \"Show regions\" toggle (`aria-pressed`) that\nhides the outlines. Pixel regions are measured in `data-image-width` × `data-image-height`\nwhen set (the viewer shows a resized IIIF image), else in the image's natural size.\n\nOr the page's own list, with its own buttons: `data-regions-list=\"<id>\"` on a link (or the\n`regionsList` callback) names an `<ol>` or `<ul>` of `<li data-xywh>` anywhere in the page,\nusually `hidden`. While that image is open the list (the same nodes, so the page's listeners\nkeep working) is the region list: in shadow mode it becomes a child of the lightbox slotted\ninto the viewer, not moved into the shadow root, so the page's CSS still applies to it. When\nthe image changes or the viewer closes it goes back where it was, `hidden` as before. It wins\nover `data-regions`.",
26092
26120
  "name": "UvalibLightbox",
26093
26121
  "cssProperties": [
26094
26122
  {
@@ -26217,6 +26245,14 @@
26217
26245
  },
26218
26246
  "description": "Regions for each image, instead of (or as well as) `data-regions`: called with\n`{ element, id, href, index }`, it returns region objects (`{ label, x, y, w, h, unit? }`).\nAn image with regions shows their outlines over it, a list of them beside it, and a\n\"Show regions\" toggle."
26219
26247
  },
26248
+ {
26249
+ "kind": "field",
26250
+ "name": "regionsList",
26251
+ "type": {
26252
+ "text": "LightboxRegionsList | undefined"
26253
+ },
26254
+ "description": "The page's own region list for each image, instead of `data-regions-list`: called with\n`{ element, id, href, index }`, it returns an `<ol>` or `<ul>` of `<li data-xywh>` (or\nnull). While the image is open the list is shown as its region list, with the page's own\nbuttons and listeners; it is put back where it was when the image changes or the viewer\ncloses."
26255
+ },
26220
26256
  {
26221
26257
  "kind": "field",
26222
26258
  "name": "regionsLabel",
@@ -26530,6 +26566,41 @@
26530
26566
  "privacy": "private",
26531
26567
  "default": "''"
26532
26568
  },
26569
+ {
26570
+ "kind": "field",
26571
+ "name": "lent",
26572
+ "type": {
26573
+ "text": "{\n el: RegionsListElement;\n parent: Node;\n next: ChildNode | null;\n hidden: boolean;\n slot: string | null;\n } | null"
26574
+ },
26575
+ "privacy": "private",
26576
+ "default": "null",
26577
+ "description": "The page's region list lent to the viewer, and how to give it back as it was."
26578
+ },
26579
+ {
26580
+ "kind": "field",
26581
+ "name": "entryTabindex",
26582
+ "privacy": "private",
26583
+ "default": "new WeakMap<Element, string | null>()",
26584
+ "description": "Each entry's own `tabindex` (null: none), so one the viewer added is removed."
26585
+ },
26586
+ {
26587
+ "kind": "field",
26588
+ "name": "warnedList",
26589
+ "type": {
26590
+ "text": "boolean"
26591
+ },
26592
+ "privacy": "private",
26593
+ "default": "false"
26594
+ },
26595
+ {
26596
+ "kind": "field",
26597
+ "name": "refocus",
26598
+ "type": {
26599
+ "text": "boolean"
26600
+ },
26601
+ "privacy": "private",
26602
+ "default": "false"
26603
+ },
26533
26604
  {
26534
26605
  "kind": "field",
26535
26606
  "name": "isLight",
@@ -26699,6 +26770,43 @@
26699
26770
  ],
26700
26771
  "description": "`data-regions`, then whatever the `regions` callback adds."
26701
26772
  },
26773
+ {
26774
+ "kind": "method",
26775
+ "name": "listOf",
26776
+ "privacy": "private",
26777
+ "return": {
26778
+ "type": {
26779
+ "text": "RegionsListElement | null"
26780
+ }
26781
+ },
26782
+ "parameters": [
26783
+ {
26784
+ "name": "el",
26785
+ "type": {
26786
+ "text": "HTMLAnchorElement"
26787
+ }
26788
+ },
26789
+ {
26790
+ "name": "id",
26791
+ "type": {
26792
+ "text": "string"
26793
+ }
26794
+ },
26795
+ {
26796
+ "name": "href",
26797
+ "type": {
26798
+ "text": "string"
26799
+ }
26800
+ },
26801
+ {
26802
+ "name": "index",
26803
+ "type": {
26804
+ "text": "number"
26805
+ }
26806
+ }
26807
+ ],
26808
+ "description": "`data-regions-list` (an id in this root), else the `regionsList` callback's element."
26809
+ },
26702
26810
  {
26703
26811
  "kind": "method",
26704
26812
  "name": "linkText",
@@ -27147,6 +27255,55 @@
27147
27255
  }
27148
27256
  }
27149
27257
  },
27258
+ {
27259
+ "kind": "field",
27260
+ "name": "wantedList",
27261
+ "type": {
27262
+ "text": "RegionsListElement | null"
27263
+ },
27264
+ "privacy": "private",
27265
+ "description": "The list the open image shows (none while its image cannot be drawn).",
27266
+ "readonly": true
27267
+ },
27268
+ {
27269
+ "kind": "method",
27270
+ "name": "lendList",
27271
+ "privacy": "private",
27272
+ "return": {
27273
+ "type": {
27274
+ "text": "void"
27275
+ }
27276
+ },
27277
+ "parameters": [
27278
+ {
27279
+ "name": "rendered",
27280
+ "default": "false"
27281
+ }
27282
+ ],
27283
+ "description": "Lend the open image's list to the viewer, giving back any other. Shadow mode (before\nrender): the list becomes a light-DOM child of the lightbox with `slot`, and the viewer's\n`<uvalib-image-regions>` slots it on, so it stays in the page (its styles and listeners\napply). Light DOM (`rendered`, after render): it is moved into `<uvalib-image-regions>`."
27284
+ },
27285
+ {
27286
+ "kind": "method",
27287
+ "name": "noteEntries",
27288
+ "privacy": "private",
27289
+ "return": {
27290
+ "type": {
27291
+ "text": "void"
27292
+ }
27293
+ },
27294
+ "description": "Remember each entry's own tabindex before the viewer can add one."
27295
+ },
27296
+ {
27297
+ "kind": "method",
27298
+ "name": "returnList",
27299
+ "privacy": "private",
27300
+ "return": {
27301
+ "type": {
27302
+ "text": "void"
27303
+ }
27304
+ },
27305
+ "description": "Give the lent list back: same place, same `hidden` and `slot`, no marks of the viewer's."
27306
+ },
27150
27307
  {
27151
27308
  "kind": "field",
27152
27309
  "name": "statusText",
@@ -27186,7 +27343,7 @@
27186
27343
  }
27187
27344
  }
27188
27345
  ],
27189
- "description": "The image, inside `<uvalib-image-regions>` when it has regions."
27346
+ "description": "The image, inside `<uvalib-image-regions>` when it has regions (or the page's list)."
27190
27347
  },
27191
27348
  {
27192
27349
  "kind": "field",
@@ -27640,7 +27797,7 @@
27640
27797
  },
27641
27798
  {
27642
27799
  "kind": "class",
27643
- "description": "A map of places with a linked list of the same places: buildings, rooms or outdoor spaces,\neach a marker sized by a count, with a link to the place's page. It wraps\n[Leaflet](https://leafletjs.com) 1.9, which the page provides (the library never bundles\nit): set the `leaflet` property to the Leaflet module (`import * as L from 'leaflet'`), or\nload leaflet.js so that `window.L` exists. Without Leaflet only the list is shown, with\none console warning. Leaflet's leaflet.css is optional: the element carries the layout\nrules it needs, in shadow DOM and light DOM alike.\n\nPlaces come from `items` (`{ id?, name, lat, lng, count?, href?, description? }`) or from\na child `<ul>`/`<ol>` of `<li><a href data-lat data-lng data-count>Name</a></li>`, which is\nthe list before the script runs (and without it). The list always stays, under the map:\nit is the text equivalent.\n\nEach marker is a real link (a button when the place has no `href`) named like \"The\nRotunda, 2,702 photos\" (`count-label` is the noun), sized by the square root of its count\n(a 24 to 56px dot in a hit area of at least 44px). Tab or the arrow keys move between\nmarkers, Enter follows the link (or chooses the place), and Escape hides the tooltip.\nHovering or focusing a marker shows a tooltip with its name and count and highlights its\nlist entry; hovering or focusing a list entry highlights its marker (a ring and a larger\ndot, not colour alone) and brings it into view.\n\nThe map is a region named by `label`, after a \"Skip map, go to the list\" link and a line\nof key instructions. It opens on the bounds of the places, or on `center` and `zoom`. The\nzoom buttons are 44px with a visible focus ring; the attribution stays. Tiles come from\n`tile-url` (OpenStreetMap by default: low-traffic use only) with `attribution`. In the\npage's dark mode the tiles are inverted with a CSS filter (`--uvalib-map-dark-filter`)\nunless `dark-tile-url` gives dark tiles; markers and controls are never filtered. With\n`prefers-reduced-motion` nothing animates.",
27800
+ "description": "A map of places with a linked list of the same places: buildings, rooms or outdoor spaces,\neach a marker sized by a count, with a link to the place's page. It wraps\n[Leaflet](https://leafletjs.com) 1.9, which the page provides (the library never bundles\nit): set the `leaflet` property to the Leaflet module (`import * as L from 'leaflet'`), or\nload leaflet.js so that `window.L` exists. Without Leaflet only the list is shown, with\none console warning. Leaflet's leaflet.css is optional: the element carries the layout\nrules it needs, in shadow DOM and light DOM alike.\n\nPlaces come from `items` (`{ id?, name, lat, lng, count?, href?, description? }`) or from\na child `<ul>`/`<ol>` of `<li><a href data-lat data-lng data-count>Name</a></li>`, which is\nthe list before the script runs (and without it). The list always stays, under the map:\nit is the text equivalent.\n\nEach marker is a real link (a button when the place has no `href`) named like \"The\nRotunda, 2,702 photos\" (`count-label` is the noun), sized by the square root of its count\n(a 24 to 56px dot in a hit area of at least 44px). Tab or the arrow keys move between\nmarkers, Enter follows the link (or chooses the place), and Escape hides the tooltip.\nHovering or focusing a marker shows a tooltip with its name and count and highlights its\nlist entry; hovering or focusing a list entry highlights its marker (a ring and a larger\ndot, not colour alone) and brings it into view.\n\nMarkers whose 44px targets would overlap at the current zoom are drawn as one group\nmarker (regrouped after every zoom and resize): a button\nshowing how many places it holds, sized by their summed count and named like \"The Rotunda\nand 2 more places, 3,610 photos\" (the largest place's name; `place-label` is the noun).\nChoosing it zooms in until its places part; when they cannot (one point, or the\nmaximum zoom) it spreads them in a ring around it instead, with focus on the first;\nEscape or a zoom closes the ring and focus returns to the group. The arrow keys move\nbetween the markers shown (a group is one); a place in the list that is in a group\nhighlights the group, whose tooltip names the place.\n\nThe map is a region named by `label`, after a \"Skip map, go to the list\" link and a line\nof key instructions. It opens on the bounds of the places, or on `center` and `zoom`. The\nzoom buttons are 44px with a visible focus ring; the attribution stays. Tiles come from\n`tile-url` (OpenStreetMap by default: low-traffic use only) with `attribution`. In the\npage's dark mode the tiles are inverted with a CSS filter (`--uvalib-map-dark-filter`)\nunless `dark-tile-url` gives dark tiles; markers and controls are never filtered. With\n`prefers-reduced-motion` nothing animates.",
27644
27801
  "name": "UvalibMap",
27645
27802
  "cssProperties": [
27646
27803
  {
@@ -27772,6 +27929,16 @@
27772
27929
  "description": "The noun after each count, plural (\"photos\"); a count of one drops a trailing s.",
27773
27930
  "attribute": "count-label"
27774
27931
  },
27932
+ {
27933
+ "kind": "field",
27934
+ "name": "placeLabel",
27935
+ "type": {
27936
+ "text": "string"
27937
+ },
27938
+ "default": "'places'",
27939
+ "description": "The noun for places in a group's name, plural: \"The Rotunda and 2 more places\" (one\ndrops a trailing s: \"and 1 more place\"). For example \"rooms\".",
27940
+ "attribute": "place-label"
27941
+ },
27775
27942
  {
27776
27943
  "kind": "field",
27777
27944
  "name": "tileUrl",
@@ -27851,10 +28018,11 @@
27851
28018
  "kind": "field",
27852
28019
  "name": "active",
27853
28020
  "type": {
27854
- "text": "number"
28021
+ "text": "string"
27855
28022
  },
27856
28023
  "privacy": "private",
27857
- "default": "-1"
28024
+ "default": "''",
28025
+ "description": "The highlighted target: \"3\" a place, \"g:1,3\" a group, \"\" none."
27858
28026
  },
27859
28027
  {
27860
28028
  "kind": "field",
@@ -27922,6 +28090,66 @@
27922
28090
  "privacy": "private",
27923
28091
  "default": "[]"
27924
28092
  },
28093
+ {
28094
+ "kind": "field",
28095
+ "name": "dots",
28096
+ "type": {
28097
+ "text": "number[]"
28098
+ },
28099
+ "privacy": "private",
28100
+ "default": "[]"
28101
+ },
28102
+ {
28103
+ "kind": "field",
28104
+ "name": "maxCount",
28105
+ "type": {
28106
+ "text": "number"
28107
+ },
28108
+ "privacy": "private",
28109
+ "default": "0"
28110
+ },
28111
+ {
28112
+ "kind": "field",
28113
+ "name": "groups",
28114
+ "privacy": "private",
28115
+ "default": "new Map<string, MapGroup>()",
28116
+ "description": "The groups drawn at the current zoom, by key."
28117
+ },
28118
+ {
28119
+ "kind": "field",
28120
+ "name": "groupOf",
28121
+ "privacy": "private",
28122
+ "default": "new Map<number, string>()",
28123
+ "description": "A grouped place's index → its group's key."
28124
+ },
28125
+ {
28126
+ "kind": "field",
28127
+ "name": "ring",
28128
+ "type": {
28129
+ "text": "string"
28130
+ },
28131
+ "privacy": "private",
28132
+ "default": "''",
28133
+ "description": "The key of the group whose places are spread in a ring, or \"\"."
28134
+ },
28135
+ {
28136
+ "kind": "field",
28137
+ "name": "order",
28138
+ "type": {
28139
+ "text": "HTMLElement[]"
28140
+ },
28141
+ "privacy": "private",
28142
+ "default": "[]",
28143
+ "description": "The visible markers' controls, in keyboard (and document) order."
28144
+ },
28145
+ {
28146
+ "kind": "field",
28147
+ "name": "activeIcon",
28148
+ "type": {
28149
+ "text": "{ marker: Leaflet.Marker; z: number } | undefined"
28150
+ },
28151
+ "privacy": "private"
28152
+ },
27925
28153
  {
27926
28154
  "kind": "field",
27927
28155
  "name": "drawn",
@@ -27961,21 +28189,21 @@
27961
28189
  },
27962
28190
  {
27963
28191
  "kind": "field",
27964
- "name": "hoverIndex",
28192
+ "name": "hoverKey",
27965
28193
  "type": {
27966
- "text": "number"
28194
+ "text": "string"
27967
28195
  },
27968
28196
  "privacy": "private",
27969
- "default": "-1"
28197
+ "default": "''"
27970
28198
  },
27971
28199
  {
27972
28200
  "kind": "field",
27973
- "name": "focusIndex",
28201
+ "name": "focusKey",
27974
28202
  "type": {
27975
- "text": "number"
28203
+ "text": "string"
27976
28204
  },
27977
28205
  "privacy": "private",
27978
- "default": "-1"
28206
+ "default": "''"
27979
28207
  },
27980
28208
  {
27981
28209
  "kind": "field",
@@ -28209,71 +28437,223 @@
28209
28437
  },
28210
28438
  {
28211
28439
  "kind": "method",
28212
- "name": "drawMarkers",
28440
+ "name": "groupDot",
28213
28441
  "privacy": "private",
28214
28442
  "return": {
28215
28443
  "type": {
28216
- "text": "void"
28444
+ "text": "number"
28217
28445
  }
28218
- }
28446
+ },
28447
+ "parameters": [
28448
+ {
28449
+ "name": "sum",
28450
+ "type": {
28451
+ "text": "number"
28452
+ }
28453
+ }
28454
+ ],
28455
+ "description": "A group's dot: by the square root of its summed count, between MIN_GROUP_DOT and MAX_GROUP_DOT."
28219
28456
  },
28220
28457
  {
28221
28458
  "kind": "method",
28222
- "name": "fit",
28459
+ "name": "groupName",
28223
28460
  "privacy": "private",
28224
28461
  "return": {
28225
28462
  "type": {
28226
- "text": "void"
28463
+ "text": "string"
28227
28464
  }
28228
28465
  },
28229
- "description": "Open on `center`/`zoom`, else on the places' bounds, else on Grounds."
28466
+ "parameters": [
28467
+ {
28468
+ "name": "members",
28469
+ "type": {
28470
+ "text": "number[]"
28471
+ }
28472
+ }
28473
+ ],
28474
+ "description": "\"The Rotunda and 2 more places\": the largest place's name and how many more."
28230
28475
  },
28231
28476
  {
28232
28477
  "kind": "method",
28233
- "name": "underControls",
28478
+ "name": "hitOf",
28234
28479
  "privacy": "private",
28235
28480
  "return": {
28236
28481
  "type": {
28237
- "text": "boolean"
28482
+ "text": "number"
28238
28483
  }
28239
28484
  },
28240
28485
  "parameters": [
28241
28486
  {
28242
- "name": "pts",
28487
+ "name": "members",
28243
28488
  "type": {
28244
- "text": "Leaflet.LatLng[]"
28489
+ "text": "number[]"
28245
28490
  }
28246
28491
  }
28247
28492
  ],
28248
- "description": "Whether any of `pts` is under (or within 12px of) the zoom buttons or the attribution."
28493
+ "description": "A marker's hit area (px): its dot, at least 44px; a group's dot for several places."
28249
28494
  },
28250
28495
  {
28251
28496
  "kind": "method",
28252
- "name": "markerEl",
28497
+ "name": "makeMarker",
28253
28498
  "privacy": "private",
28254
28499
  "return": {
28255
28500
  "type": {
28256
- "text": "HTMLElement | undefined"
28501
+ "text": "Leaflet.Marker"
28257
28502
  }
28258
28503
  },
28259
28504
  "parameters": [
28260
28505
  {
28261
- "name": "i",
28506
+ "name": "ll",
28507
+ "type": {
28508
+ "text": "Leaflet.LatLngExpression"
28509
+ }
28510
+ },
28511
+ {
28512
+ "name": "ctl",
28513
+ "type": {
28514
+ "text": "HTMLElement"
28515
+ }
28516
+ },
28517
+ {
28518
+ "name": "d",
28519
+ "type": {
28520
+ "text": "number"
28521
+ }
28522
+ },
28523
+ {
28524
+ "name": "className",
28525
+ "type": {
28526
+ "text": "string"
28527
+ }
28528
+ }
28529
+ ]
28530
+ },
28531
+ {
28532
+ "kind": "method",
28533
+ "name": "makeControl",
28534
+ "privacy": "private",
28535
+ "return": {
28536
+ "type": {
28537
+ "text": "HTMLElement"
28538
+ }
28539
+ },
28540
+ "parameters": [
28541
+ {
28542
+ "name": "tag",
28543
+ "type": {
28544
+ "text": "'a' | 'button'"
28545
+ }
28546
+ },
28547
+ {
28548
+ "name": "d",
28549
+ "type": {
28550
+ "text": "number"
28551
+ }
28552
+ },
28553
+ {
28554
+ "name": "label",
28555
+ "type": {
28556
+ "text": "string"
28557
+ }
28558
+ },
28559
+ {
28560
+ "name": "text",
28561
+ "default": "''"
28562
+ }
28563
+ ],
28564
+ "description": "The control inside a marker: its dot (with `text`, for a group) and its hidden name."
28565
+ },
28566
+ {
28567
+ "kind": "method",
28568
+ "name": "drawMarkers",
28569
+ "privacy": "private",
28570
+ "return": {
28571
+ "type": {
28572
+ "text": "void"
28573
+ }
28574
+ },
28575
+ "description": "One marker per place, not yet on the map: `regroup()` adds the ones not in a group."
28576
+ },
28577
+ {
28578
+ "kind": "method",
28579
+ "name": "cluster",
28580
+ "privacy": "private",
28581
+ "return": {
28582
+ "type": {
28583
+ "text": "number[][]"
28584
+ }
28585
+ },
28586
+ "parameters": [
28587
+ {
28588
+ "name": "idx",
28589
+ "type": {
28590
+ "text": "number[]"
28591
+ }
28592
+ },
28593
+ {
28594
+ "name": "zoom",
28262
28595
  "type": {
28263
28596
  "text": "number"
28264
28597
  }
28265
28598
  }
28599
+ ],
28600
+ "description": "Greedy screen-space grouping at `zoom`: largest count first, each place takes every\nlater one whose hit area (plus GROUP_GAP) would overlap its own; then groups whose larger\nmarkers now overlap merge, until none do. Each group's largest place comes first."
28601
+ },
28602
+ {
28603
+ "kind": "method",
28604
+ "name": "makeGroup",
28605
+ "privacy": "private",
28606
+ "return": {
28607
+ "type": {
28608
+ "text": "MapGroup"
28609
+ }
28610
+ },
28611
+ "parameters": [
28612
+ {
28613
+ "name": "key",
28614
+ "type": {
28615
+ "text": "string"
28616
+ }
28617
+ },
28618
+ {
28619
+ "name": "members",
28620
+ "type": {
28621
+ "text": "number[]"
28622
+ }
28623
+ }
28266
28624
  ]
28267
28625
  },
28268
28626
  {
28269
28627
  "kind": "method",
28270
- "name": "hover",
28628
+ "name": "focusedControl",
28629
+ "privacy": "private",
28630
+ "return": {
28631
+ "type": {
28632
+ "text": "HTMLElement | null"
28633
+ }
28634
+ },
28635
+ "description": "The marker control that has focus, if any."
28636
+ },
28637
+ {
28638
+ "kind": "method",
28639
+ "name": "regroup",
28271
28640
  "privacy": "private",
28272
28641
  "return": {
28273
28642
  "type": {
28274
28643
  "text": "void"
28275
28644
  }
28276
28645
  },
28646
+ "description": "Group the markers whose hit areas would overlap at the current zoom, show one marker\nper group (and the ring's places, when one is open), keep the markers' document order\nthe keyboard order, and give focus back if its marker went."
28647
+ },
28648
+ {
28649
+ "kind": "method",
28650
+ "name": "spot",
28651
+ "privacy": "private",
28652
+ "return": {
28653
+ "type": {
28654
+ "text": "{ marker: Leaflet.Marker; ctl: HTMLElement }"
28655
+ }
28656
+ },
28277
28657
  "parameters": [
28278
28658
  {
28279
28659
  "name": "i",
@@ -28285,52 +28665,161 @@
28285
28665
  },
28286
28666
  {
28287
28667
  "kind": "method",
28288
- "name": "syncActive",
28668
+ "name": "splitZoom",
28669
+ "privacy": "private",
28670
+ "return": {
28671
+ "type": {
28672
+ "text": "number | undefined"
28673
+ }
28674
+ },
28675
+ "parameters": [
28676
+ {
28677
+ "name": "members",
28678
+ "type": {
28679
+ "text": "number[]"
28680
+ }
28681
+ }
28682
+ ],
28683
+ "description": "The first zoom (in zoomSnap steps, up to the maximum) at which a group's places part."
28684
+ },
28685
+ {
28686
+ "kind": "method",
28687
+ "name": "expand",
28688
+ "privacy": "private",
28689
+ "return": {
28690
+ "type": {
28691
+ "text": "void"
28692
+ }
28693
+ },
28694
+ "parameters": [
28695
+ {
28696
+ "name": "key",
28697
+ "type": {
28698
+ "text": "string"
28699
+ }
28700
+ }
28701
+ ],
28702
+ "description": "A group chosen: zoom in until its places part, or (when they cannot) spread them in a ring."
28703
+ },
28704
+ {
28705
+ "kind": "method",
28706
+ "name": "spread",
28289
28707
  "privacy": "private",
28290
28708
  "return": {
28291
28709
  "type": {
28292
28710
  "text": "void"
28293
28711
  }
28294
28712
  },
28295
- "description": "The highlighted place: the one hovered, else the one focused (none after Escape)."
28713
+ "parameters": [
28714
+ {
28715
+ "name": "g",
28716
+ "type": {
28717
+ "text": "MapGroup"
28718
+ }
28719
+ }
28720
+ ],
28721
+ "description": "Spread a group's places in a ring around it, far enough apart that each 44px target\nkeeps 24px from its neighbours and from the group's own marker; focus the first."
28296
28722
  },
28297
28723
  {
28298
28724
  "kind": "method",
28299
- "name": "showActive",
28725
+ "name": "unring",
28300
28726
  "privacy": "private",
28301
28727
  "return": {
28302
28728
  "type": {
28303
28729
  "text": "void"
28304
28730
  }
28305
28731
  },
28732
+ "description": "Put a ring's places back on their own point (the next regroup hides them)."
28733
+ },
28734
+ {
28735
+ "kind": "method",
28736
+ "name": "fit",
28737
+ "privacy": "private",
28738
+ "return": {
28739
+ "type": {
28740
+ "text": "void"
28741
+ }
28742
+ },
28743
+ "description": "Open on `center`/`zoom`, else on the places' bounds, else on Grounds."
28744
+ },
28745
+ {
28746
+ "kind": "method",
28747
+ "name": "underControls",
28748
+ "privacy": "private",
28749
+ "return": {
28750
+ "type": {
28751
+ "text": "boolean"
28752
+ }
28753
+ },
28306
28754
  "parameters": [
28307
28755
  {
28308
- "name": "prev",
28756
+ "name": "pts",
28309
28757
  "type": {
28310
- "text": "number | undefined"
28758
+ "text": "Leaflet.LatLng[]"
28311
28759
  }
28312
28760
  }
28313
28761
  ],
28314
- "description": "Highlight the active place's marker and show its tooltip (after a render)."
28762
+ "description": "Whether any of `pts` is under (or within 12px of) the zoom buttons or the attribution."
28315
28763
  },
28316
28764
  {
28317
28765
  "kind": "method",
28318
- "name": "markerDot",
28766
+ "name": "markerFor",
28319
28767
  "privacy": "private",
28320
28768
  "return": {
28321
28769
  "type": {
28322
- "text": "number"
28770
+ "text": "{ marker: Leaflet.Marker; group?: MapGroup } | undefined"
28323
28771
  }
28324
28772
  },
28325
28773
  "parameters": [
28326
28774
  {
28327
- "name": "i",
28775
+ "name": "key",
28328
28776
  "type": {
28329
- "text": "number"
28777
+ "text": "string"
28778
+ }
28779
+ }
28780
+ ],
28781
+ "description": "The marker on the map for a target (\"3\" a place, \"g:1,3\" a group): a place's own, or its group's."
28782
+ },
28783
+ {
28784
+ "kind": "method",
28785
+ "name": "hover",
28786
+ "privacy": "private",
28787
+ "return": {
28788
+ "type": {
28789
+ "text": "void"
28790
+ }
28791
+ },
28792
+ "parameters": [
28793
+ {
28794
+ "name": "key",
28795
+ "type": {
28796
+ "text": "string"
28330
28797
  }
28331
28798
  }
28332
28799
  ]
28333
28800
  },
28801
+ {
28802
+ "kind": "method",
28803
+ "name": "syncActive",
28804
+ "privacy": "private",
28805
+ "return": {
28806
+ "type": {
28807
+ "text": "void"
28808
+ }
28809
+ },
28810
+ "description": "The highlighted target: the one hovered, else the one focused (none after Escape)."
28811
+ },
28812
+ {
28813
+ "kind": "method",
28814
+ "name": "showActive",
28815
+ "privacy": "private",
28816
+ "return": {
28817
+ "type": {
28818
+ "text": "void"
28819
+ }
28820
+ },
28821
+ "description": "Highlight the active target's marker (a place inside a group highlights the group) and\nshow its tooltip: the name and count, and for a place in a group, how many share it."
28822
+ },
28334
28823
  {
28335
28824
  "kind": "method",
28336
28825
  "name": "reveal",
@@ -28342,21 +28831,40 @@
28342
28831
  },
28343
28832
  "parameters": [
28344
28833
  {
28345
- "name": "i",
28834
+ "name": "key",
28346
28835
  "type": {
28347
- "text": "number"
28836
+ "text": "string"
28348
28837
  }
28349
28838
  }
28350
28839
  ],
28351
- "description": "Bring a place into view (on focus), without animation under reduced motion."
28840
+ "description": "Bring a target's marker into view (on focus), without animation under reduced motion."
28352
28841
  },
28353
28842
  {
28354
28843
  "kind": "method",
28355
- "name": "indexOf",
28844
+ "name": "keyOf",
28356
28845
  "privacy": "private",
28357
28846
  "return": {
28358
28847
  "type": {
28359
- "text": "number"
28848
+ "text": "string"
28849
+ }
28850
+ },
28851
+ "parameters": [
28852
+ {
28853
+ "name": "ctl",
28854
+ "type": {
28855
+ "text": "HTMLElement"
28856
+ }
28857
+ }
28858
+ ],
28859
+ "description": "\"3\" for a place's marker, \"g:1,3\" for a group's."
28860
+ },
28861
+ {
28862
+ "kind": "method",
28863
+ "name": "targetOf",
28864
+ "privacy": "private",
28865
+ "return": {
28866
+ "type": {
28867
+ "text": "string"
28360
28868
  }
28361
28869
  },
28362
28870
  "parameters": [
@@ -28606,11 +29114,11 @@
28606
29114
  ],
28607
29115
  "events": [
28608
29116
  {
28609
- "description": "A marker was chosen (click, Enter or Space). `detail` is `{ item }`. Cancelable: for a place with `href`, `preventDefault()` keeps the page from following the link. Bubbles and is composed.",
29117
+ "description": "A place's marker was chosen (click, Enter or Space); never a group's. `detail` is `{ item }`. Cancelable: for a place with `href`, `preventDefault()` keeps the page from following the link. Bubbles and is composed.",
28610
29118
  "name": "select"
28611
29119
  },
28612
29120
  {
28613
- "description": "For `<site-analytics>`: `['uvalib-map', 'select', '<label>', <position from 1>]` when a marker is chosen, and `['uvalib-map', 'zoom', '<label>', <zoom level>]` 1 s after the last zoom-button press. Never a place's name, coordinates or URL. Bubbles and is composed.",
29121
+ "description": "For `<site-analytics>`: `['uvalib-map', 'select', '<label>', <position from 1>]` when a place's marker is chosen, `['uvalib-map', 'expand', '<label>', <places in it>]` when a group is chosen (it zooms in or opens its ring), and `['uvalib-map', 'zoom', '<label>', <zoom level>]` 1 s after the last zoom-button press. Never a place's name, coordinates or URL. Bubbles and is composed.",
28614
29122
  "name": "uvalib-analytics-event"
28615
29123
  }
28616
29124
  ],
@@ -28642,6 +29150,15 @@
28642
29150
  "description": "The noun after each count, plural (\"photos\"); a count of one drops a trailing s.",
28643
29151
  "fieldName": "countLabel"
28644
29152
  },
29153
+ {
29154
+ "name": "place-label",
29155
+ "type": {
29156
+ "text": "string"
29157
+ },
29158
+ "default": "'places'",
29159
+ "description": "The noun for places in a group's name, plural: \"The Rotunda and 2 more places\" (one\ndrops a trailing s: \"and 1 more place\"). For example \"rooms\".",
29160
+ "fieldName": "placeLabel"
29161
+ },
28645
29162
  {
28646
29163
  "name": "tile-url",
28647
29164
  "default": "OSM_TILE_URL",