@uvalib/web-components 1.3.0 → 1.4.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",
@@ -26088,7 +26109,7 @@
26088
26109
  "declarations": [
26089
26110
  {
26090
26111
  "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.",
26112
+ "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
26113
  "name": "UvalibLightbox",
26093
26114
  "cssProperties": [
26094
26115
  {
@@ -26217,6 +26238,14 @@
26217
26238
  },
26218
26239
  "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
26240
  },
26241
+ {
26242
+ "kind": "field",
26243
+ "name": "regionsList",
26244
+ "type": {
26245
+ "text": "LightboxRegionsList | undefined"
26246
+ },
26247
+ "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."
26248
+ },
26220
26249
  {
26221
26250
  "kind": "field",
26222
26251
  "name": "regionsLabel",
@@ -26530,6 +26559,41 @@
26530
26559
  "privacy": "private",
26531
26560
  "default": "''"
26532
26561
  },
26562
+ {
26563
+ "kind": "field",
26564
+ "name": "lent",
26565
+ "type": {
26566
+ "text": "{\n el: RegionsListElement;\n parent: Node;\n next: ChildNode | null;\n hidden: boolean;\n slot: string | null;\n } | null"
26567
+ },
26568
+ "privacy": "private",
26569
+ "default": "null",
26570
+ "description": "The page's region list lent to the viewer, and how to give it back as it was."
26571
+ },
26572
+ {
26573
+ "kind": "field",
26574
+ "name": "entryTabindex",
26575
+ "privacy": "private",
26576
+ "default": "new WeakMap<Element, string | null>()",
26577
+ "description": "Each entry's own `tabindex` (null: none), so one the viewer added is removed."
26578
+ },
26579
+ {
26580
+ "kind": "field",
26581
+ "name": "warnedList",
26582
+ "type": {
26583
+ "text": "boolean"
26584
+ },
26585
+ "privacy": "private",
26586
+ "default": "false"
26587
+ },
26588
+ {
26589
+ "kind": "field",
26590
+ "name": "refocus",
26591
+ "type": {
26592
+ "text": "boolean"
26593
+ },
26594
+ "privacy": "private",
26595
+ "default": "false"
26596
+ },
26533
26597
  {
26534
26598
  "kind": "field",
26535
26599
  "name": "isLight",
@@ -26699,6 +26763,43 @@
26699
26763
  ],
26700
26764
  "description": "`data-regions`, then whatever the `regions` callback adds."
26701
26765
  },
26766
+ {
26767
+ "kind": "method",
26768
+ "name": "listOf",
26769
+ "privacy": "private",
26770
+ "return": {
26771
+ "type": {
26772
+ "text": "RegionsListElement | null"
26773
+ }
26774
+ },
26775
+ "parameters": [
26776
+ {
26777
+ "name": "el",
26778
+ "type": {
26779
+ "text": "HTMLAnchorElement"
26780
+ }
26781
+ },
26782
+ {
26783
+ "name": "id",
26784
+ "type": {
26785
+ "text": "string"
26786
+ }
26787
+ },
26788
+ {
26789
+ "name": "href",
26790
+ "type": {
26791
+ "text": "string"
26792
+ }
26793
+ },
26794
+ {
26795
+ "name": "index",
26796
+ "type": {
26797
+ "text": "number"
26798
+ }
26799
+ }
26800
+ ],
26801
+ "description": "`data-regions-list` (an id in this root), else the `regionsList` callback's element."
26802
+ },
26702
26803
  {
26703
26804
  "kind": "method",
26704
26805
  "name": "linkText",
@@ -27147,6 +27248,55 @@
27147
27248
  }
27148
27249
  }
27149
27250
  },
27251
+ {
27252
+ "kind": "field",
27253
+ "name": "wantedList",
27254
+ "type": {
27255
+ "text": "RegionsListElement | null"
27256
+ },
27257
+ "privacy": "private",
27258
+ "description": "The list the open image shows (none while its image cannot be drawn).",
27259
+ "readonly": true
27260
+ },
27261
+ {
27262
+ "kind": "method",
27263
+ "name": "lendList",
27264
+ "privacy": "private",
27265
+ "return": {
27266
+ "type": {
27267
+ "text": "void"
27268
+ }
27269
+ },
27270
+ "parameters": [
27271
+ {
27272
+ "name": "rendered",
27273
+ "default": "false"
27274
+ }
27275
+ ],
27276
+ "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>`."
27277
+ },
27278
+ {
27279
+ "kind": "method",
27280
+ "name": "noteEntries",
27281
+ "privacy": "private",
27282
+ "return": {
27283
+ "type": {
27284
+ "text": "void"
27285
+ }
27286
+ },
27287
+ "description": "Remember each entry's own tabindex before the viewer can add one."
27288
+ },
27289
+ {
27290
+ "kind": "method",
27291
+ "name": "returnList",
27292
+ "privacy": "private",
27293
+ "return": {
27294
+ "type": {
27295
+ "text": "void"
27296
+ }
27297
+ },
27298
+ "description": "Give the lent list back: same place, same `hidden` and `slot`, no marks of the viewer's."
27299
+ },
27150
27300
  {
27151
27301
  "kind": "field",
27152
27302
  "name": "statusText",
@@ -27186,7 +27336,7 @@
27186
27336
  }
27187
27337
  }
27188
27338
  ],
27189
- "description": "The image, inside `<uvalib-image-regions>` when it has regions."
27339
+ "description": "The image, inside `<uvalib-image-regions>` when it has regions (or the page's list)."
27190
27340
  },
27191
27341
  {
27192
27342
  "kind": "field",
@@ -27640,7 +27790,7 @@
27640
27790
  },
27641
27791
  {
27642
27792
  "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.",
27793
+ "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
27794
  "name": "UvalibMap",
27645
27795
  "cssProperties": [
27646
27796
  {
@@ -27772,6 +27922,16 @@
27772
27922
  "description": "The noun after each count, plural (\"photos\"); a count of one drops a trailing s.",
27773
27923
  "attribute": "count-label"
27774
27924
  },
27925
+ {
27926
+ "kind": "field",
27927
+ "name": "placeLabel",
27928
+ "type": {
27929
+ "text": "string"
27930
+ },
27931
+ "default": "'places'",
27932
+ "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\".",
27933
+ "attribute": "place-label"
27934
+ },
27775
27935
  {
27776
27936
  "kind": "field",
27777
27937
  "name": "tileUrl",
@@ -27851,10 +28011,11 @@
27851
28011
  "kind": "field",
27852
28012
  "name": "active",
27853
28013
  "type": {
27854
- "text": "number"
28014
+ "text": "string"
27855
28015
  },
27856
28016
  "privacy": "private",
27857
- "default": "-1"
28017
+ "default": "''",
28018
+ "description": "The highlighted target: \"3\" a place, \"g:1,3\" a group, \"\" none."
27858
28019
  },
27859
28020
  {
27860
28021
  "kind": "field",
@@ -27922,6 +28083,66 @@
27922
28083
  "privacy": "private",
27923
28084
  "default": "[]"
27924
28085
  },
28086
+ {
28087
+ "kind": "field",
28088
+ "name": "dots",
28089
+ "type": {
28090
+ "text": "number[]"
28091
+ },
28092
+ "privacy": "private",
28093
+ "default": "[]"
28094
+ },
28095
+ {
28096
+ "kind": "field",
28097
+ "name": "maxCount",
28098
+ "type": {
28099
+ "text": "number"
28100
+ },
28101
+ "privacy": "private",
28102
+ "default": "0"
28103
+ },
28104
+ {
28105
+ "kind": "field",
28106
+ "name": "groups",
28107
+ "privacy": "private",
28108
+ "default": "new Map<string, MapGroup>()",
28109
+ "description": "The groups drawn at the current zoom, by key."
28110
+ },
28111
+ {
28112
+ "kind": "field",
28113
+ "name": "groupOf",
28114
+ "privacy": "private",
28115
+ "default": "new Map<number, string>()",
28116
+ "description": "A grouped place's index → its group's key."
28117
+ },
28118
+ {
28119
+ "kind": "field",
28120
+ "name": "ring",
28121
+ "type": {
28122
+ "text": "string"
28123
+ },
28124
+ "privacy": "private",
28125
+ "default": "''",
28126
+ "description": "The key of the group whose places are spread in a ring, or \"\"."
28127
+ },
28128
+ {
28129
+ "kind": "field",
28130
+ "name": "order",
28131
+ "type": {
28132
+ "text": "HTMLElement[]"
28133
+ },
28134
+ "privacy": "private",
28135
+ "default": "[]",
28136
+ "description": "The visible markers' controls, in keyboard (and document) order."
28137
+ },
28138
+ {
28139
+ "kind": "field",
28140
+ "name": "activeIcon",
28141
+ "type": {
28142
+ "text": "{ marker: Leaflet.Marker; z: number } | undefined"
28143
+ },
28144
+ "privacy": "private"
28145
+ },
27925
28146
  {
27926
28147
  "kind": "field",
27927
28148
  "name": "drawn",
@@ -27961,21 +28182,21 @@
27961
28182
  },
27962
28183
  {
27963
28184
  "kind": "field",
27964
- "name": "hoverIndex",
28185
+ "name": "hoverKey",
27965
28186
  "type": {
27966
- "text": "number"
28187
+ "text": "string"
27967
28188
  },
27968
28189
  "privacy": "private",
27969
- "default": "-1"
28190
+ "default": "''"
27970
28191
  },
27971
28192
  {
27972
28193
  "kind": "field",
27973
- "name": "focusIndex",
28194
+ "name": "focusKey",
27974
28195
  "type": {
27975
- "text": "number"
28196
+ "text": "string"
27976
28197
  },
27977
28198
  "privacy": "private",
27978
- "default": "-1"
28199
+ "default": "''"
27979
28200
  },
27980
28201
  {
27981
28202
  "kind": "field",
@@ -28209,71 +28430,223 @@
28209
28430
  },
28210
28431
  {
28211
28432
  "kind": "method",
28212
- "name": "drawMarkers",
28433
+ "name": "groupDot",
28213
28434
  "privacy": "private",
28214
28435
  "return": {
28215
28436
  "type": {
28216
- "text": "void"
28437
+ "text": "number"
28217
28438
  }
28218
- }
28439
+ },
28440
+ "parameters": [
28441
+ {
28442
+ "name": "sum",
28443
+ "type": {
28444
+ "text": "number"
28445
+ }
28446
+ }
28447
+ ],
28448
+ "description": "A group's dot: by the square root of its summed count, between MIN_GROUP_DOT and MAX_GROUP_DOT."
28219
28449
  },
28220
28450
  {
28221
28451
  "kind": "method",
28222
- "name": "fit",
28452
+ "name": "groupName",
28223
28453
  "privacy": "private",
28224
28454
  "return": {
28225
28455
  "type": {
28226
- "text": "void"
28456
+ "text": "string"
28227
28457
  }
28228
28458
  },
28229
- "description": "Open on `center`/`zoom`, else on the places' bounds, else on Grounds."
28459
+ "parameters": [
28460
+ {
28461
+ "name": "members",
28462
+ "type": {
28463
+ "text": "number[]"
28464
+ }
28465
+ }
28466
+ ],
28467
+ "description": "\"The Rotunda and 2 more places\": the largest place's name and how many more."
28230
28468
  },
28231
28469
  {
28232
28470
  "kind": "method",
28233
- "name": "underControls",
28471
+ "name": "hitOf",
28234
28472
  "privacy": "private",
28235
28473
  "return": {
28236
28474
  "type": {
28237
- "text": "boolean"
28475
+ "text": "number"
28238
28476
  }
28239
28477
  },
28240
28478
  "parameters": [
28241
28479
  {
28242
- "name": "pts",
28480
+ "name": "members",
28243
28481
  "type": {
28244
- "text": "Leaflet.LatLng[]"
28482
+ "text": "number[]"
28245
28483
  }
28246
28484
  }
28247
28485
  ],
28248
- "description": "Whether any of `pts` is under (or within 12px of) the zoom buttons or the attribution."
28486
+ "description": "A marker's hit area (px): its dot, at least 44px; a group's dot for several places."
28249
28487
  },
28250
28488
  {
28251
28489
  "kind": "method",
28252
- "name": "markerEl",
28490
+ "name": "makeMarker",
28253
28491
  "privacy": "private",
28254
28492
  "return": {
28255
28493
  "type": {
28256
- "text": "HTMLElement | undefined"
28494
+ "text": "Leaflet.Marker"
28257
28495
  }
28258
28496
  },
28259
28497
  "parameters": [
28260
28498
  {
28261
- "name": "i",
28499
+ "name": "ll",
28500
+ "type": {
28501
+ "text": "Leaflet.LatLngExpression"
28502
+ }
28503
+ },
28504
+ {
28505
+ "name": "ctl",
28506
+ "type": {
28507
+ "text": "HTMLElement"
28508
+ }
28509
+ },
28510
+ {
28511
+ "name": "d",
28262
28512
  "type": {
28263
28513
  "text": "number"
28264
28514
  }
28515
+ },
28516
+ {
28517
+ "name": "className",
28518
+ "type": {
28519
+ "text": "string"
28520
+ }
28265
28521
  }
28266
28522
  ]
28267
28523
  },
28268
28524
  {
28269
28525
  "kind": "method",
28270
- "name": "hover",
28526
+ "name": "makeControl",
28527
+ "privacy": "private",
28528
+ "return": {
28529
+ "type": {
28530
+ "text": "HTMLElement"
28531
+ }
28532
+ },
28533
+ "parameters": [
28534
+ {
28535
+ "name": "tag",
28536
+ "type": {
28537
+ "text": "'a' | 'button'"
28538
+ }
28539
+ },
28540
+ {
28541
+ "name": "d",
28542
+ "type": {
28543
+ "text": "number"
28544
+ }
28545
+ },
28546
+ {
28547
+ "name": "label",
28548
+ "type": {
28549
+ "text": "string"
28550
+ }
28551
+ },
28552
+ {
28553
+ "name": "text",
28554
+ "default": "''"
28555
+ }
28556
+ ],
28557
+ "description": "The control inside a marker: its dot (with `text`, for a group) and its hidden name."
28558
+ },
28559
+ {
28560
+ "kind": "method",
28561
+ "name": "drawMarkers",
28271
28562
  "privacy": "private",
28272
28563
  "return": {
28273
28564
  "type": {
28274
28565
  "text": "void"
28275
28566
  }
28276
28567
  },
28568
+ "description": "One marker per place, not yet on the map: `regroup()` adds the ones not in a group."
28569
+ },
28570
+ {
28571
+ "kind": "method",
28572
+ "name": "cluster",
28573
+ "privacy": "private",
28574
+ "return": {
28575
+ "type": {
28576
+ "text": "number[][]"
28577
+ }
28578
+ },
28579
+ "parameters": [
28580
+ {
28581
+ "name": "idx",
28582
+ "type": {
28583
+ "text": "number[]"
28584
+ }
28585
+ },
28586
+ {
28587
+ "name": "zoom",
28588
+ "type": {
28589
+ "text": "number"
28590
+ }
28591
+ }
28592
+ ],
28593
+ "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."
28594
+ },
28595
+ {
28596
+ "kind": "method",
28597
+ "name": "makeGroup",
28598
+ "privacy": "private",
28599
+ "return": {
28600
+ "type": {
28601
+ "text": "MapGroup"
28602
+ }
28603
+ },
28604
+ "parameters": [
28605
+ {
28606
+ "name": "key",
28607
+ "type": {
28608
+ "text": "string"
28609
+ }
28610
+ },
28611
+ {
28612
+ "name": "members",
28613
+ "type": {
28614
+ "text": "number[]"
28615
+ }
28616
+ }
28617
+ ]
28618
+ },
28619
+ {
28620
+ "kind": "method",
28621
+ "name": "focusedControl",
28622
+ "privacy": "private",
28623
+ "return": {
28624
+ "type": {
28625
+ "text": "HTMLElement | null"
28626
+ }
28627
+ },
28628
+ "description": "The marker control that has focus, if any."
28629
+ },
28630
+ {
28631
+ "kind": "method",
28632
+ "name": "regroup",
28633
+ "privacy": "private",
28634
+ "return": {
28635
+ "type": {
28636
+ "text": "void"
28637
+ }
28638
+ },
28639
+ "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."
28640
+ },
28641
+ {
28642
+ "kind": "method",
28643
+ "name": "spot",
28644
+ "privacy": "private",
28645
+ "return": {
28646
+ "type": {
28647
+ "text": "{ marker: Leaflet.Marker; ctl: HTMLElement }"
28648
+ }
28649
+ },
28277
28650
  "parameters": [
28278
28651
  {
28279
28652
  "name": "i",
@@ -28285,18 +28658,45 @@
28285
28658
  },
28286
28659
  {
28287
28660
  "kind": "method",
28288
- "name": "syncActive",
28661
+ "name": "splitZoom",
28662
+ "privacy": "private",
28663
+ "return": {
28664
+ "type": {
28665
+ "text": "number | undefined"
28666
+ }
28667
+ },
28668
+ "parameters": [
28669
+ {
28670
+ "name": "members",
28671
+ "type": {
28672
+ "text": "number[]"
28673
+ }
28674
+ }
28675
+ ],
28676
+ "description": "The first zoom (in zoomSnap steps, up to the maximum) at which a group's places part."
28677
+ },
28678
+ {
28679
+ "kind": "method",
28680
+ "name": "expand",
28289
28681
  "privacy": "private",
28290
28682
  "return": {
28291
28683
  "type": {
28292
28684
  "text": "void"
28293
28685
  }
28294
28686
  },
28295
- "description": "The highlighted place: the one hovered, else the one focused (none after Escape)."
28687
+ "parameters": [
28688
+ {
28689
+ "name": "key",
28690
+ "type": {
28691
+ "text": "string"
28692
+ }
28693
+ }
28694
+ ],
28695
+ "description": "A group chosen: zoom in until its places part, or (when they cannot) spread them in a ring."
28296
28696
  },
28297
28697
  {
28298
28698
  "kind": "method",
28299
- "name": "showActive",
28699
+ "name": "spread",
28300
28700
  "privacy": "private",
28301
28701
  "return": {
28302
28702
  "type": {
@@ -28305,32 +28705,114 @@
28305
28705
  },
28306
28706
  "parameters": [
28307
28707
  {
28308
- "name": "prev",
28708
+ "name": "g",
28309
28709
  "type": {
28310
- "text": "number | undefined"
28710
+ "text": "MapGroup"
28311
28711
  }
28312
28712
  }
28313
28713
  ],
28314
- "description": "Highlight the active place's marker and show its tooltip (after a render)."
28714
+ "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."
28315
28715
  },
28316
28716
  {
28317
28717
  "kind": "method",
28318
- "name": "markerDot",
28718
+ "name": "unring",
28319
28719
  "privacy": "private",
28320
28720
  "return": {
28321
28721
  "type": {
28322
- "text": "number"
28722
+ "text": "void"
28723
+ }
28724
+ },
28725
+ "description": "Put a ring's places back on their own point (the next regroup hides them)."
28726
+ },
28727
+ {
28728
+ "kind": "method",
28729
+ "name": "fit",
28730
+ "privacy": "private",
28731
+ "return": {
28732
+ "type": {
28733
+ "text": "void"
28734
+ }
28735
+ },
28736
+ "description": "Open on `center`/`zoom`, else on the places' bounds, else on Grounds."
28737
+ },
28738
+ {
28739
+ "kind": "method",
28740
+ "name": "underControls",
28741
+ "privacy": "private",
28742
+ "return": {
28743
+ "type": {
28744
+ "text": "boolean"
28323
28745
  }
28324
28746
  },
28325
28747
  "parameters": [
28326
28748
  {
28327
- "name": "i",
28749
+ "name": "pts",
28328
28750
  "type": {
28329
- "text": "number"
28751
+ "text": "Leaflet.LatLng[]"
28752
+ }
28753
+ }
28754
+ ],
28755
+ "description": "Whether any of `pts` is under (or within 12px of) the zoom buttons or the attribution."
28756
+ },
28757
+ {
28758
+ "kind": "method",
28759
+ "name": "markerFor",
28760
+ "privacy": "private",
28761
+ "return": {
28762
+ "type": {
28763
+ "text": "{ marker: Leaflet.Marker; group?: MapGroup } | undefined"
28764
+ }
28765
+ },
28766
+ "parameters": [
28767
+ {
28768
+ "name": "key",
28769
+ "type": {
28770
+ "text": "string"
28771
+ }
28772
+ }
28773
+ ],
28774
+ "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."
28775
+ },
28776
+ {
28777
+ "kind": "method",
28778
+ "name": "hover",
28779
+ "privacy": "private",
28780
+ "return": {
28781
+ "type": {
28782
+ "text": "void"
28783
+ }
28784
+ },
28785
+ "parameters": [
28786
+ {
28787
+ "name": "key",
28788
+ "type": {
28789
+ "text": "string"
28330
28790
  }
28331
28791
  }
28332
28792
  ]
28333
28793
  },
28794
+ {
28795
+ "kind": "method",
28796
+ "name": "syncActive",
28797
+ "privacy": "private",
28798
+ "return": {
28799
+ "type": {
28800
+ "text": "void"
28801
+ }
28802
+ },
28803
+ "description": "The highlighted target: the one hovered, else the one focused (none after Escape)."
28804
+ },
28805
+ {
28806
+ "kind": "method",
28807
+ "name": "showActive",
28808
+ "privacy": "private",
28809
+ "return": {
28810
+ "type": {
28811
+ "text": "void"
28812
+ }
28813
+ },
28814
+ "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."
28815
+ },
28334
28816
  {
28335
28817
  "kind": "method",
28336
28818
  "name": "reveal",
@@ -28342,21 +28824,40 @@
28342
28824
  },
28343
28825
  "parameters": [
28344
28826
  {
28345
- "name": "i",
28827
+ "name": "key",
28346
28828
  "type": {
28347
- "text": "number"
28829
+ "text": "string"
28348
28830
  }
28349
28831
  }
28350
28832
  ],
28351
- "description": "Bring a place into view (on focus), without animation under reduced motion."
28833
+ "description": "Bring a target's marker into view (on focus), without animation under reduced motion."
28352
28834
  },
28353
28835
  {
28354
28836
  "kind": "method",
28355
- "name": "indexOf",
28837
+ "name": "keyOf",
28356
28838
  "privacy": "private",
28357
28839
  "return": {
28358
28840
  "type": {
28359
- "text": "number"
28841
+ "text": "string"
28842
+ }
28843
+ },
28844
+ "parameters": [
28845
+ {
28846
+ "name": "ctl",
28847
+ "type": {
28848
+ "text": "HTMLElement"
28849
+ }
28850
+ }
28851
+ ],
28852
+ "description": "\"3\" for a place's marker, \"g:1,3\" for a group's."
28853
+ },
28854
+ {
28855
+ "kind": "method",
28856
+ "name": "targetOf",
28857
+ "privacy": "private",
28858
+ "return": {
28859
+ "type": {
28860
+ "text": "string"
28360
28861
  }
28361
28862
  },
28362
28863
  "parameters": [
@@ -28606,11 +29107,11 @@
28606
29107
  ],
28607
29108
  "events": [
28608
29109
  {
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.",
29110
+ "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
29111
  "name": "select"
28611
29112
  },
28612
29113
  {
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.",
29114
+ "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
29115
  "name": "uvalib-analytics-event"
28615
29116
  }
28616
29117
  ],
@@ -28642,6 +29143,15 @@
28642
29143
  "description": "The noun after each count, plural (\"photos\"); a count of one drops a trailing s.",
28643
29144
  "fieldName": "countLabel"
28644
29145
  },
29146
+ {
29147
+ "name": "place-label",
29148
+ "type": {
29149
+ "text": "string"
29150
+ },
29151
+ "default": "'places'",
29152
+ "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\".",
29153
+ "fieldName": "placeLabel"
29154
+ },
28645
29155
  {
28646
29156
  "name": "tile-url",
28647
29157
  "default": "OSM_TILE_URL",