@uvalib/web-components 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +193 -54
  3. package/dist/base.css +135 -2
  4. package/dist/components/uvalib-audio/UvalibAudio.d.ts +186 -0
  5. package/dist/components/uvalib-audio/UvalibAudio.js +1154 -0
  6. package/dist/components/uvalib-audio/UvalibAudio.js.map +1 -0
  7. package/dist/components/uvalib-audio/uvalib-audio.d.ts +1 -0
  8. package/dist/components/uvalib-audio/uvalib-audio.js +4 -0
  9. package/dist/components/uvalib-audio/uvalib-audio.js.map +1 -0
  10. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.d.ts +25 -5
  11. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js +62 -9
  12. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js.map +1 -1
  13. package/dist/custom-elements.json +1431 -132
  14. package/dist/edition-epub.css +511 -0
  15. package/dist/edition-print.css +51 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +1 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/styles/base.js +169 -1
  20. package/dist/styles/base.js.map +1 -1
  21. package/dist/styles/edition.d.ts +6 -0
  22. package/dist/styles/edition.js +20 -0
  23. package/dist/styles/edition.js.map +1 -1
  24. package/dist-cdn/base.css +135 -2
  25. package/dist-cdn/chunks/{base-DmImIMld.js → base-D_oPO5cX.js} +147 -4
  26. package/dist-cdn/chunks/base-D_oPO5cX.js.map +1 -0
  27. package/dist-cdn/custom-elements.json +1431 -132
  28. package/dist-cdn/edition-epub.css +511 -0
  29. package/dist-cdn/edition-print.css +51 -0
  30. package/dist-cdn/manifest.json +6 -3
  31. package/dist-cdn/site-page.js +1 -1
  32. package/dist-cdn/site-style.js +1 -1
  33. package/dist-cdn/skills/uvalib-web-components/SKILL.md +36 -5
  34. package/dist-cdn/skills/uvalib-web-components/reference/components.md +53 -1
  35. package/dist-cdn/uvalib-audio.js +747 -0
  36. package/dist-cdn/uvalib-audio.js.map +1 -0
  37. package/dist-cdn/uvalib-pagefind-search.js +70 -44
  38. package/dist-cdn/uvalib-pagefind-search.js.map +1 -1
  39. package/package.json +7 -1
  40. package/skills/uvalib-web-components/SKILL.md +36 -5
  41. package/skills/uvalib-web-components/reference/components.md +53 -1
  42. package/dist-cdn/chunks/base-DmImIMld.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.12.0 — 2026-11-30
4
+
5
+ ### Features
6
+
7
+ - <uvalib-audio>, a long recording played by chapter (issue #41)
8
+ - edition-epub.css and edition-print.css for EPUB and PDF downloads (issue #42)
9
+ - filter-flags for one-value filters linked as ?x=1 (issue #40)
10
+
11
+ ### Fixes
12
+
13
+ - allow a blob: URL for download-href (a recording made in the page)
14
+
15
+ ### Other
16
+
17
+ - Merge branch 'integrate/xtf2': filter-flags (issue #40), <uvalib-audio> (issue #41), edition-epub.css and edition-print.css (issue #42)
18
+ - Merge branch 'feat/uvalib-audio' into integrate/xtf2
19
+ - Merge branch 'feat/edition-epub' into integrate/xtf2
20
+ - Merge branch 'feat/pagefind-filter-flags' into integrate/xtf2
21
+ - Audiobook by chapter example, with chapters made in the page as WAV tones (issue #41)
22
+ - register uvalib-audio (vite, manifest, exports, index, size budgets, base.css pre-upgrade hold, catalogue tests)
23
+
24
+ ## v1.11.1 — 2026-11-26
25
+
26
+ ### Fixes
27
+
28
+ - hold <uvalib-pager>'s space before it upgrades (issue #39)
29
+
30
+ ### Other
31
+
32
+ - Merge branch 'fix/pager-preupgrade': hold <uvalib-pager>'s space before it upgrades (issue #39)
33
+
3
34
  ## v1.11.0 — 2026-11-25
4
35
 
5
36
  ### Features
package/README.md CHANGED
@@ -13,7 +13,8 @@ Reusable web components for UVA Library sites, built with Lit and TypeScript:
13
13
  - **Images:** `<uvalib-lightbox>` (an image viewer over plain links), `<uvalib-photo-grid>` (justified rows of thumbnails) and `<uvalib-image-regions>` (numbered region outlines on an image, with their list).
14
14
  - **Maps:** `<uvalib-map>` (places on the page's own Leaflet map, sized by a count, with a linked list).
15
15
  - **Search:** `<uvalib-filter>`, `<uvalib-date-range>`, `<uvalib-date-histogram>`, `<uvalib-combobox>` (a text field that suggests values as you type), `<uvalib-list-filter>` (a field that filters a long list on the page as you type), `<uvalib-filter-drawer>` (the filters as a sidebar, or a modal panel on phones), `<uvalib-dialog>` (a modal dialog for search tips, Cite or a short form) and `<uvalib-pagefind-search>` (with `pagefind.css`, the library theme for Pagefind static-site search).
16
- - **Reading texts:** `edition.css` (reading styles for TEI texts converted to class-annotated HTML).
16
+ - **Reading texts:** `edition.css` (reading styles for TEI texts converted to class-annotated HTML), and `edition-epub.css` / `edition-print.css` for the same texts as EPUB and PDF downloads.
17
+ - **Audio:** `<uvalib-audio>` (a long recording played by chapter: an audiobook, an oral history).
17
18
  - **Library hours:** `<site-hours-section>`, `<library-weekly-hours>` and `<library-hours-setup>`.
18
19
  - **Library events:** `<events-section>`.
19
20
  - **Search results:** `<bento-box>` (library.virginia.edu/search), with its `<catalog-section>`, `<articles-section>`, `<libguides-section>` and `<website-section>`.
@@ -402,6 +403,7 @@ When a visitor prints a page (meeting minutes, a finding aid, an article), `<sit
402
403
  - **Previous/next.** `prev-href` and `next-href` (either may be omitted; with neither, nothing is rendered). Each link shows a “Previous” or “Next” kicker and, when set, `prev-label` or `next-label`. A long title truncates; the full text stays in the accessible name. The links use `rel="prev"` and `rel="next"`. The landmark’s name is `label`, or “Sections”.
403
404
  - **Numbered pages.** Set `pages` (a positive count; it wins over previous/next, with one warning if those are set too). `page` is the current page, clamped to that range, and is text with `aria-current="page"`, not a link. Other pages use `href-template`, which must contain `{page}` (the default is `?page={page}`). A long range keeps the first page, a window around the current page, the last page, and an ellipsis where numbers are skipped. The landmark’s name is `label`, or “Pagination”.
404
405
  - **One landmark name.** Two pagers with the same accessible name fail the accessibility check. Give the second a different `label`.
406
+ - **Before the script runs.** base.css draws the pager invisibly from its attributes, laid out as it will be, so the text under a top pager does not move when it upgrades. Put the titles in `prev-label` and `next-label` (not set later from script) for the hold to be exact. Numbered pages are exact except near the end of a long range on a container of about 280–310px. For load more, set `has-more="false"` on the last page: without it the button's room is held. If the script never loads, the space stays empty (nothing is shown that is not a link).
405
407
  - **Load more.** `mode="load-more"` replaces the landmark with a group: a “Load more” button (`.uvalib-button`) and a polite “Showing N of M” (`shown` and `total`). It wins over numbered pages and previous/next, with one warning when those are also set. The button hides once `shown` has reached a positive `total`. Without a known total (ranked or semantic search), leave `total` unset (or 0): the count reads “Showing N” and the button stays. Add `has-more` while there is more and remove it (or set `hasMore = false`; `has-more="false"` also works, for templates that print false) after the last page. Once set, `has-more` alone decides whether the button shows, over `total`; `hasMore = undefined` returns to following `total`. It is one flag rather than a `has-more`/`no-more` pair, so the two can never contradict each other. If the button goes away while it has focus and `loaded()` was not called first, focus moves to the first new item of the `for` list, or else to the count, never to the page. `page` is the last loaded page (default 1). A click fires `load-more` with `{ page }` set to the next page. Call `loaded(firstNewElement)`, or set `for` to the list’s id and call `loaded()`, and focus moves to that new item (an element that cannot take focus gets `tabindex="-1"`). The group’s name is `label`, or “More results”.
406
408
  - **Single-page apps.** A plain click fires `uvalib-card-navigate` (`detail: { href, position }`) or `uvalib-pager-navigate` (`detail: { href, kind, page? }`). Cancel it with `preventDefault()` and route in the app. `position` is `'single'` or `'1'`, `'2'`, …. `kind` is `'next'`, `'previous'` or `'number'`, and `page` is set only for `'number'`.
407
409
  - **Styles.** A raised surface, a 1px border, and on hover or focus the shadow `0 0 20px 0 #DADADA`. Focusing the heading link draws the focus ring on the card. The chip is `--uva-blue-alt-300` on `--uva-blue-alt-dark` (6.13:1: WCAG AA for normal text, short of AAA’s 7:1). Dark mode follows the role tokens. `no-style` keeps the stretch, the grid and the truncation, and drops the colours.
@@ -1266,6 +1268,74 @@ A sidebar beside the main content on wide screens, stacked on narrow ones: libra
1266
1268
  - **Page images:** `<uvalib-lightbox selector=".uvalib-edition a.pb-image">` opens each `a.pb-image` in the viewer (Previous and Next through the pages); without JavaScript the link opens the image. A page break that starts a section sits on its own line at the end.
1267
1269
  - **Dark mode** via the role tokens; **forced colors** keeps the page labels, the note box and the checked toggle visible; **print** shows the text full width in black, keeps the page-break labels, shows every reading, and hides the toggles. Wide tables in `table-wrap` scroll sideways; give the wrapper `tabindex="0"` and a name in the converter if it can scroll. See the [edition example](https://uvalib.github.io/reusable-web-library/#edition).
1268
1270
 
1271
+ ### Downloads: EPUB and PDF (edition-epub.css, edition-print.css)
1272
+
1273
+ For the same text offered as an EPUB 3 file or a PDF printed from the same HTML, `edition-epub.css` is `edition.css` rewritten at build time (from the same source, so the two can't drift) in CSS that reading systems handle: the same class names and look, with plain unscoped selectors (`.lg`, `.sp > :not(.speaker):not(.stage)`; no `:where()`, `:is()` or `:has()`), fixed light colours (muted text 7.5:1 on white) instead of the role tokens, physical properties instead of logical ones, `:before`/`:after`, and no `@layer`, `@supports`, `var()`, `min()`/`max()`/`clamp()`, `@media` or `@page`. An EPUB content document holds only the text, so no `.uvalib-edition` wrapper is needed (the wrapper's rule applies to `body`). `edition-print.css`, linked after it for a PDF, adds the page (`@page` margins 2cm 2.2cm 2.4cm and the page number at the foot, none on the first page) and `edition.css`'s print rules (black text at 11pt, readings shown inline, no breaks inside stanzas or notes).
1274
+
1275
+ ```xml
1276
+ <!-- In each EPUB content document (copy the file into the EPUB and list it in the manifest) -->
1277
+ <link rel="stylesheet" type="text/css" href="edition-epub.css" />
1278
+ ```
1279
+
1280
+ ```html
1281
+ <!-- The HTML a PDF is printed from (for example by headless Chromium) -->
1282
+ <link
1283
+ rel="stylesheet"
1284
+ href="https://unpkg.internal.lib.virginia.edu/web-components/v1/edition-epub.css"
1285
+ />
1286
+ <link
1287
+ rel="stylesheet"
1288
+ href="https://unpkg.internal.lib.virginia.edu/web-components/v1/edition-print.css"
1289
+ />
1290
+ ```
1291
+
1292
+ - **The reader's choices win:** no font family (the reading system's or the reader's own; a PDF printed with no font of its own gets the browser's default, which the site may set: the UX team's no-serif rule is for the web), no font size, no body text colour (a reading system's night mode sets it) and no measure. Headings stay in the library's blue and muted text in its grey.
1293
+ - **Nothing interactive:** no line-break or readings toggles (prose reflows; verse lines break), no hover, focus or target rules, and readings (`title` on `orig`, `reg`, `sic`, `corr`) keep no dotted underline in the EPUB, where nothing shows a title; the PDF shows them inline.
1294
+ - **Differences from the web edition:** room for a line number is kept on numbered lines only (no `:has()` to find a numbered stanza); the inline note box has its start rule but no grey fill (a night mode that lightens the text and not the fill would hide it); the gap after a note number is a margin, not flex `gap`.
1295
+ - **Screen readers:** the hidden "added:", "deleted:" and "Note" words use `clip` as well as `clip-path`. Generated content can't carry alternative text in these sheets (`content: x / ''` is too new), so line numbers, the ⁂ ornament, "[?]" and "[…]" are read as they are, if the reading system reads generated content at all; VoiceOver in Apple Books usually does, and some readers read none of it.
1296
+ - **Not tested here:** real reading systems (Apple Books, Kobo, Thorium, Adobe Digital Editions) and epubcheck; the test suite checks the sheets avoid the features above and that the text renders as the web edition does in Chromium. Right-to-left texts get left-to-right margins (physical properties).
1297
+
1298
+ ## Audio by chapter
1299
+
1300
+ `<uvalib-audio>` plays a long recording that comes in parts, an audiobook's chapters or an oral history's sessions: one player for the whole list, so starting a chapter stops the one playing. Its children are a plain list of links to the files, so the page works before (and without) the script. Entry: `uvalib-audio.js` on the CDN, `@uvalib/web-components/uvalib-audio.js` on npm. See the [Audiobook by chapter](https://uvalib.github.io/reusable-web-library/#audiobook) example.
1301
+
1302
+ ```html
1303
+ <script
1304
+ type="module"
1305
+ src="https://unpkg.internal.lib.virginia.edu/web-components/v1/uvalib-audio.js"
1306
+ ></script>
1307
+
1308
+ <uvalib-audio
1309
+ label="Alice’s Adventures in Wonderland"
1310
+ download-href="alice.m4b"
1311
+ download-label="Download the whole book"
1312
+ download-size="161234567"
1313
+ >
1314
+ <ol>
1315
+ <li><a href="ch00.mp3" data-duration="1:12">Front matter</a></li>
1316
+ <li>
1317
+ <a href="ch01.mp3" data-duration="12:31">1. Down the Rabbit-Hole</a>
1318
+ <a href="../CarAlic.html#ch1">Read the text</a>
1319
+ </li>
1320
+ <li data-download data-size="9800000">
1321
+ <a href="ch02.mp3" data-duration="10:02">2. The Pool of Tears</a>
1322
+ </li>
1323
+ </ol>
1324
+ </uvalib-audio>
1325
+ ```
1326
+
1327
+ - **Chapters.** The first link in each `<li>` is the chapter: its text is the title (inline markup such as `<i>` and `lang` is kept) and `data-duration` (`12:31`, `1:02:03` or seconds) is shown beside it and gives the slider its length before the file loads. Other links in the item (the chapter's text, a transcript) stay links, after it. `data-download` on the `<li>` adds a Download link for that chapter (its own file, or the URL given), with `data-size`. An item with no link to a file is skipped with a warning.
1328
+ - **Upgraded**, each chapter is a real button whose visible text is its name (“Play 1. Down the Rabbit-Hole”, 44px), with its duration. The current chapter gets `aria-current="true"` and says “Now playing” or “Paused” in text (white on the library blue, AAA), beside an orange bar. Above the list, the player for the current chapter: what is playing (plain text), Back 15 s, Play/Pause and Forward 30 s (the podcast convention: back a missed phrase, ahead past a pause), a native range slider named “Position” and read as “12 minutes 30 seconds of 41 minutes” (the arrow keys move it 1 s), the elapsed and total time as text (never a live region), and a native Speed select (0.75×, 1×, 1.25×, 1.5×, 1.75×, 2×; native for its keyboard and screen-reader support everywhere). Every control is 44px with the library focus ring; keys are the native controls' own (no page-wide shortcuts).
1329
+ - **Nothing plays on its own** and nothing loads until a Play press: one `<audio preload="none">` plays every chapter. `continuous` plays the next chapter when one ends (off by default). Starting one `<uvalib-audio>` pauses any other on the page. Removing the element stops it.
1330
+ - **Resume.** The chapter, position and speed are kept in localStorage for the page (its path, plus `storage-key` when a page has more than one recording), saved on pause, every 5 s while playing and when the page is left, and cleared when the last chapter ends. On the next visit a “Resume “4. The Rabbit Sends in a Little Bill” at 12:30” button offers to carry on; it never plays by itself. `no-resume` turns it off; blocked storage just forgets.
1331
+ - **Announcements** go to one polite status: “Playing <chapter>”, “Paused”, “Speed 1.5 times”, and after Back or Forward where it landed (a burst of presses once, where it ends). The running time is never announced.
1332
+ - **Errors.** A chapter that cannot be played says “This chapter could not be played.” in text, with a link to its file.
1333
+ - **Download.** `download-href` adds a link to the whole recording (an M4B audiobook with chapters plays in Apple Books, most podcast apps and VLC), `download-label` its text (default “Download the whole recording”), `download-size` its size: bytes are shown in decimal units (“161 MB”), text as written.
1334
+ - **Media Session.** Where the browser has it, the lock screen and media keys show the chapter (and `label`, else the page title) and can play, pause, seek and change chapter.
1335
+ - **Before it upgrades**, `base.css` holds the player's height above the list (one, two or three rows of controls by the element's width, and the download line) and lays the links out as the upgraded rows, so the page does not move. On a phone a title or label that wraps differently can still move it a line.
1336
+ - **Analytics.** `['uvalib-audio', 'play', 'chapter <N>', N]` the first time each chapter plays in a page view (N is its place in the list, never the title or URL), `complete` when it plays to its end, `speed` once the visitor settles on one (name and value the speed), `resume` with the chapter, and `download` (`recording` or `chapter <N>`).
1337
+ - Shadow DOM by default; `no-shadow-dom` and `no-style` as for the other components; dark mode, forced colors and 320px reflow. Room for a cast or credits is the page's: a `.uvalib-table` after it.
1338
+
1269
1339
  ## Back to top
1270
1340
 
1271
1341
  `<uvalib-back-to-top>` is a “Back to top” button for long pages: minutes, finding aids, transcriptions, long result lists. Entry: `uvalib-back-to-top.js` on the CDN, `@uvalib/web-components/uvalib-back-to-top.js` on npm. See the [Back to top](https://uvalib.github.io/reusable-web-library/#back-to-top) example.
@@ -2051,6 +2121,18 @@ Static sites that search with [Pagefind](https://pagefind.app) (such as Electron
2051
2121
  - **What it fixes in the stock UI:** text at 16px and up (the stock scale makes it 12.8px), a readable placeholder (stock: 20% opacity), the library focus ring on every control, a hidden Clear button that can no longer take focus (stock: invisible but focusable), native checkboxes (the stock ones vanish in forced colors), 44px targets for the filter headings, rows and buttons, no fixed heights that clip zoomed or spaced text, no arrow glyph read out before each sub-result, and a 320px reflow. Text is 7:1 or more (WCAG AAA) in light and dark, except the Load more button's white on blue-alt in light mode (4.7:1, as on every `.uvalib-button`).
2052
2122
  - **What needs script, done by `<uvalib-pagefind-search>`:** a visible `<label>` for the field (the stock field is named only by its `title` and has no id to point a label at), a polite status region that announces "7 results for virginia" once results settle (the stock message is not a live region), focus kept in the field after Clear and Escape (the stock UI blurs it) and moved to the first new result after "Load more results", and the loading placeholders' dots hidden from screen readers. It also reads `?q=` when it starts (and again on Back and Forward) and writes the settled query back with `history.replaceState` (`query-param`, default `q`; empty turns it off), and reports to `<site-analytics>`: the settled search (`trackSearch`, category `Pagefind`, with the result count, once per query and filter set) and `['uvalib-pagefind-search', 'filter-change', '<filter>: <value>', 1 | 0]`.
2053
2123
  - **Filters in the URL: `filter-params`.** List Pagefind filter names, space-separated (`filter-params="collection author"`), and each becomes a URL parameter of the same name, so a collection page can link to `/search/?collection=Manuscripts` ("Search this collection") or `/search/?q=virginia&collection=Manuscripts`. A repeated parameter (`?collection=A&collection=B`) checks several values; as with boxes checked by hand, Pagefind then wants pages with every one. At start (and on Back and Forward) the element loads the index, waits for Pagefind's filter list, checks the URL's values and applies them with the query, so there is one search; those filter groups start open (added to any `openFilters` in `options`), so the visitor sees why the results are narrowed. Values the index does not have are dropped without an error (matched without regard to case, then written back in the index's own case), so a stale link searches everything rather than showing no results; if the filter list never appears (an index with no filters), it searches without them after 10 s. Checking or unchecking a named filter writes it back with `history.replaceState`, keeping every other parameter; unchecking the last value removes the parameter. Filters not named stay out of the URL. A filter set from the URL is not a `filter-change` event; the settled search is still reported once, with the filters in its key. Without a query, the filters wait for the first search, as in Pagefind. Do not add your own `triggerFilters` script for this.
2124
+ - **One-value filters as on/off links: `filter-flags`.** A "has X" filter (has an audiobook, has page images, digitized) has one value in the index, such as `Available`, and is usually linked as `?audiobook=1`, which `filter-params` would ignore (the index has no value `1`). List such filters in `filter-flags` (`filter-flags="audiobook"`, space-separated): the parameter with any value, or none (`?audiobook`, `?audiobook=1`, `?audiobook=yes`), checks the filter's one value, however the index spells it; `0`, `false`, `no` and `off` (any case) leave it unchecked. Checking its box writes `?audiobook=1`, unchecking removes it, keeping every other parameter. Everything else is as with `filter-params`: read at start with the query as one search, its group open, Back and Forward, the `searching` hold, no `filter-change` event for a value set from the URL. A name in `filter-flags` need not be in `filter-params` too (listing it in both is allowed: it is a flag). If the index has no value or several for a flag filter, the element does not guess: it warns once in the console and reads that filter as `filter-params` (exact values). A page that rewrote `?audiobook=1` to `?audiobook=Available` with its own inline script before the element can drop the script:
2125
+
2126
+ ```html
2127
+ <uvalib-pagefind-search
2128
+ bundle-path="/pagefind/s0/"
2129
+ filter-params="collection"
2130
+ filter-flags="audiobook"
2131
+ ></uvalib-pagefind-search>
2132
+ ```
2133
+
2134
+ There is no general value-alias attribute (`?x=1` meaning some other value of a filter with several values); link with the index's own values for those.
2135
+
2054
2136
  - **A search from the URL holds the page still: `searching`.** Pagefind's results arrive after the page has painted, so a page opened with `?q=` used to push everything below the search (the footer) down as they loaded: Lighthouse measured CLS 0.274 on Electronic Text Collections. Mark the element `searching` when the URL has a query, in the page's HTML before any script runs, with one line after the element (or server-side):
2055
2137
 
2056
2138
  ```html
@@ -2130,59 +2212,64 @@ Static sites that search with [Pagefind](https://pagefind.app) (such as Electron
2130
2212
  - **`<site-page matomo-id="N">`** (and optional `matomo-url` and `matomo-downloads`) adds one `<site-analytics>` for that site and loads its code only then. Off by default. While that code loads, what the components report is kept and handed over, so an early bento search is not lost. If the page already has a `<site-analytics>` or `<uvalib-analytics>` (including the old v0.0.12 one), site-page adds none and that element does the recording.
2131
2213
  - **What the library's components send.** They only fire `uvalib-analytics-*` events, so nothing happens without an analytics element (the old v0.0.12 element records them too). Every event is `[category, action, name?, value?]`: the category is the component's tag, the action a fixed verb, the name a short label from the library's own chrome or data (never a URL, never typed text), the value a number. Each one follows a visitor's action or a real failure: nothing is sent on render, re-render, the initial state or a restored one (a filter value set by the app, a remembered colour scheme). Errors are sent once per element and kind of failure.
2132
2214
 
2133
- | Component | Action | Name | Value |
2134
- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
2135
- | `site-header` | `link-click` (a utility or site link) | the link's label | |
2136
- | `site-header` | `menu-open` (the phone Menu popover) | | |
2137
- | `site-header` | `skip-link`, `logo-click` | | |
2138
- | `site-header` | `color-scheme` | `light`, `dark` or `system` | |
2139
- | `site-main-nav` | `menu-open` (a group opens, not closes) | the group's label | |
2140
- | `site-main-nav` | `link-click` | `Group > Link` (a top-level link: its label) | |
2141
- | `site-footer` | `link-click` (not the pre-footer's) | `Column: Link`, e.g. `About: Staff directory`; `Contact us: Phone`, `Contact us: Email`; `Social: Facebook`, `Social: Instagram` | |
2142
- | `uvalib-breadcrumbs` | `link-click` | `level N` (never the label) | N, from 1 |
2143
- | `uvalib-card` | `card-click` | `single`, or the card's place in its grid (`1`, `2`, …); never the title or URL | that place, from 1, in a grid |
2144
- | `uvalib-pager` | `page-change` | `next`, `previous` or `number` (never the label or URL) | the page, for `number` only |
2145
- | `uvalib-pager` | `load-more` | (empty) | the next page |
2146
- | `uvalib-tabs` | `change` | the tab's label (capped at 100 characters; not a URL) | |
2147
- | `uvalib-contents` | `link-click` | `level N` (never the label or URL) | N, from 1 (the top level) |
2148
- | `uvalib-contents` | `toggle` (the narrow-screen disclosure) | `open` or `close` | |
2149
- | `uvalib-metadata` | `copy-citation` (downloads are left to Matomo's, or to `downloads="event"`) | | |
2150
- | `uvalib-metadata` | `show-all`, `show-fewer` (a long list's toggle) | `row N` (the row's place in the list; never its label or values) | |
2151
- | `uvalib-citation` | `format` (once the visitor settles on one), `copy`, `download` (the RIS link) | the format's name (`MLA`, `APA`…), or `ris` for `download`; never the citation | |
2152
- | `uvalib-lightbox` | `open`, `next`, `previous`, `full-size` | `image N` (never the URL or the caption) | N, from 1 |
2153
- | `uvalib-lightbox` (versions) | `compare` | `switch`, `wipe` or `fade` (never a version's label or URL) | the version's place, from 1 |
2154
- | `uvalib-image-regions` | `select` (an outline clicked; nothing on hover or focus) | the list's `label` (never a region's label) | the region's number, from 1 |
2155
- | `uvalib-tag-list` | `tag-click` | `list N` (the list's place on the page), or with `track-label` the list's own fixed `label`; never the tag's text or URL | the tag's place, from 1 |
2156
- | `uvalib-tag-list` | `show-all`, `show-fewer` | `list N`, or with `track-label` the `label` | |
2157
- | `site-alerts` | a content impression, once per alert per page view: `trackContentImpression('Library alert', '<severity>: <title>')` | | |
2158
- | `site-alerts` | `dismiss`, `link-click` (a link in an alert's text) | `<severity>: <title>` | |
2159
- | `site-alerts` | `error` (the alerts script failed to load) | `alerts-script` | |
2160
- | `events-section` | `event-click` | the `category` id, or `all` | the event's position, from 1 |
2161
- | `events-section` | `error` | `events-load` | |
2162
- | `site-hours-section` | `link-click` | `See all hours` | |
2163
- | `site-hours-section`, `library-weekly-hours` | `error` | `hours-load` | |
2164
- | `library-weekly-hours` | `week-change` | `next` or `previous` | |
2165
- | `uvalib-chip-group` | `change` (single: 1 s after the last change, and only if it differs from where it started; multi: each toggle) | `<group label>: <chip label>` | the chip's count, when it has one |
2166
- | `uvalib-chip-group` | `select` (links mode) | the group's label (never the chip or its URL) | |
2167
- | `uvalib-combobox` | `select` (a suggestion chosen) | the field's label (never the typed text or the suggestion) | the suggestion's position, from 1 |
2168
- | `uvalib-combobox` | `clear` (the clear button, or Escape on a closed list) | the field's label | |
2169
- | `uvalib-combobox` | `error` (`src` failed to load) | `load` | |
2170
- | `uvalib-list-filter` | `filter` (once the typing settles on a new query, 1 s after the last keystroke) | empty (never the typed text) | how many items match |
2171
- | `uvalib-list-filter` | `clear` (the clear button, Escape, or the field emptied by typing) | | |
2172
- | `uvalib-filter-drawer` | `open`, `close` (by the visitor: the button, Close, Escape or the backdrop; not a resize or a script) | the drawer's `label` | |
2173
- | `uvalib-back-to-top` | `click` | | |
2215
+ | Component | Action | Name | Value |
2216
+ | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
2217
+ | `site-header` | `link-click` (a utility or site link) | the link's label | |
2218
+ | `site-header` | `menu-open` (the phone Menu popover) | | |
2219
+ | `site-header` | `skip-link`, `logo-click` | | |
2220
+ | `site-header` | `color-scheme` | `light`, `dark` or `system` | |
2221
+ | `site-main-nav` | `menu-open` (a group opens, not closes) | the group's label | |
2222
+ | `site-main-nav` | `link-click` | `Group > Link` (a top-level link: its label) | |
2223
+ | `site-footer` | `link-click` (not the pre-footer's) | `Column: Link`, e.g. `About: Staff directory`; `Contact us: Phone`, `Contact us: Email`; `Social: Facebook`, `Social: Instagram` | |
2224
+ | `uvalib-breadcrumbs` | `link-click` | `level N` (never the label) | N, from 1 |
2225
+ | `uvalib-card` | `card-click` | `single`, or the card's place in its grid (`1`, `2`, …); never the title or URL | that place, from 1, in a grid |
2226
+ | `uvalib-pager` | `page-change` | `next`, `previous` or `number` (never the label or URL) | the page, for `number` only |
2227
+ | `uvalib-pager` | `load-more` | (empty) | the next page |
2228
+ | `uvalib-tabs` | `change` | the tab's label (capped at 100 characters; not a URL) | |
2229
+ | `uvalib-contents` | `link-click` | `level N` (never the label or URL) | N, from 1 (the top level) |
2230
+ | `uvalib-contents` | `toggle` (the narrow-screen disclosure) | `open` or `close` | |
2231
+ | `uvalib-metadata` | `copy-citation` (downloads are left to Matomo's, or to `downloads="event"`) | | |
2232
+ | `uvalib-metadata` | `show-all`, `show-fewer` (a long list's toggle) | `row N` (the row's place in the list; never its label or values) | |
2233
+ | `uvalib-citation` | `format` (once the visitor settles on one), `copy`, `download` (the RIS link) | the format's name (`MLA`, `APA`…), or `ris` for `download`; never the citation | |
2234
+ | `uvalib-lightbox` | `open`, `next`, `previous`, `full-size` | `image N` (never the URL or the caption) | N, from 1 |
2235
+ | `uvalib-lightbox` (versions) | `compare` | `switch`, `wipe` or `fade` (never a version's label or URL) | the version's place, from 1 |
2236
+ | `uvalib-image-regions` | `select` (an outline clicked; nothing on hover or focus) | the list's `label` (never a region's label) | the region's number, from 1 |
2237
+ | `uvalib-tag-list` | `tag-click` | `list N` (the list's place on the page), or with `track-label` the list's own fixed `label`; never the tag's text or URL | the tag's place, from 1 |
2238
+ | `uvalib-tag-list` | `show-all`, `show-fewer` | `list N`, or with `track-label` the `label` | |
2239
+ | `site-alerts` | a content impression, once per alert per page view: `trackContentImpression('Library alert', '<severity>: <title>')` | | |
2240
+ | `site-alerts` | `dismiss`, `link-click` (a link in an alert's text) | `<severity>: <title>` | |
2241
+ | `site-alerts` | `error` (the alerts script failed to load) | `alerts-script` | |
2242
+ | `events-section` | `event-click` | the `category` id, or `all` | the event's position, from 1 |
2243
+ | `events-section` | `error` | `events-load` | |
2244
+ | `site-hours-section` | `link-click` | `See all hours` | |
2245
+ | `site-hours-section`, `library-weekly-hours` | `error` | `hours-load` | |
2246
+ | `library-weekly-hours` | `week-change` | `next` or `previous` | |
2247
+ | `uvalib-chip-group` | `change` (single: 1 s after the last change, and only if it differs from where it started; multi: each toggle) | `<group label>: <chip label>` | the chip's count, when it has one |
2248
+ | `uvalib-chip-group` | `select` (links mode) | the group's label (never the chip or its URL) | |
2249
+ | `uvalib-combobox` | `select` (a suggestion chosen) | the field's label (never the typed text or the suggestion) | the suggestion's position, from 1 |
2250
+ | `uvalib-combobox` | `clear` (the clear button, or Escape on a closed list) | the field's label | |
2251
+ | `uvalib-combobox` | `error` (`src` failed to load) | `load` | |
2252
+ | `uvalib-list-filter` | `filter` (once the typing settles on a new query, 1 s after the last keystroke) | empty (never the typed text) | how many items match |
2253
+ | `uvalib-list-filter` | `clear` (the clear button, Escape, or the field emptied by typing) | | |
2254
+ | `uvalib-audio` | `play` (the first time each chapter plays in a page view) | `chapter <N>` (never the title or URL) | N, the chapter's place in the list |
2255
+ | `uvalib-audio` | `complete` (a chapter played to its end) | `chapter <N>` | N |
2256
+ | `uvalib-audio` | `speed` (1 s after the last change, if it differs) | the speed, such as `1.5` | the speed |
2257
+ | `uvalib-audio` | `resume` (the Resume button) | `chapter <N>` | N |
2258
+ | `uvalib-audio` | `download` | `recording`, or `chapter <N>` | |
2259
+ | `uvalib-filter-drawer` | `open`, `close` (by the visitor: the button, Close, Escape or the backdrop; not a resize or a script) | the drawer's `label` | |
2260
+ | `uvalib-back-to-top` | `click` | | |
2174
2261
  | `uvalib-dialog` | `open` (a visitor's button), `close` (by the visitor: Close, a close button, Escape, the backdrop or a dialog form; not a script) | the dialog's `label` (never its content) |
2175
- | `uvalib-map` | `select` (a marker chosen: click, Enter or Space) | the map's label (never the place's name, coordinates or URL) | the place's position, from 1 |
2176
- | `uvalib-map` | `zoom` (1 s after the last zoom-button press) | the map's label | the zoom level |
2177
- | `uvalib-map` | `expand` (a group of places chosen: it zooms in or opens its ring) | the map's label | the number of places in the group |
2178
- | `uvalib-filter` | `facet-change` | `<filter title>: <value>` (the facet value as the search service returns it, such as a format, library or subject; cut at 100 characters) | 1 checked, 0 unchecked |
2179
- | `uvalib-filter` | `scope-change` | the scope's label | 1 pressed, 0 not |
2180
- | `uvalib-filter` | `see-more`, `see-less` | the filter's title | |
2181
- | `uvalib-date-range` | `range-change` (1 s after the last change, and only if the years differ) | `<from year>–<to year>` | |
2182
- | `uvalib-date-histogram` | `select` (not when the selection is cleared, set in script, or restored from a date range) | `<from>–<to>` when both ends are ISO dates, otherwise `other` | |
2183
- | `bento-box` | `result-click` | the section (`Virgo catalog`, `Virgo articles`, `Subject guides`, `Library website`) | the result's position, from 1 |
2184
- | `bento-box` | `see-all-click`, `retry` | the section | |
2185
- | `bento-box` | `error` | `section-load: <section>` | |
2262
+ | `uvalib-map` | `select` (a marker chosen: click, Enter or Space) | the map's label (never the place's name, coordinates or URL) | the place's position, from 1 |
2263
+ | `uvalib-map` | `zoom` (1 s after the last zoom-button press) | the map's label | the zoom level |
2264
+ | `uvalib-map` | `expand` (a group of places chosen: it zooms in or opens its ring) | the map's label | the number of places in the group |
2265
+ | `uvalib-filter` | `facet-change` | `<filter title>: <value>` (the facet value as the search service returns it, such as a format, library or subject; cut at 100 characters) | 1 checked, 0 unchecked |
2266
+ | `uvalib-filter` | `scope-change` | the scope's label | 1 pressed, 0 not |
2267
+ | `uvalib-filter` | `see-more`, `see-less` | the filter's title | |
2268
+ | `uvalib-date-range` | `range-change` (1 s after the last change, and only if the years differ) | `<from year>–<to year>` | |
2269
+ | `uvalib-date-histogram` | `select` (not when the selection is cleared, set in script, or restored from a date range) | `<from>–<to>` when both ends are ISO dates, otherwise `other` | |
2270
+ | `bento-box` | `result-click` | the section (`Virgo catalog`, `Virgo articles`, `Subject guides`, `Library website`) | the result's position, from 1 |
2271
+ | `bento-box` | `see-all-click`, `retry` | the section | |
2272
+ | `bento-box` | `error` | `section-load: <section>` | |
2186
2273
 
2187
2274
  `<bento-box>` also sends a Matomo site search per section once its results are in (not on an error, not again on a re-render): the query, the section as category, and the section's total (0 when nothing was found). A new query, also by Back or Forward, is a new search. The `<library-weekly-hours>` elements `<library-hours-setup>` creates report as `library-weekly-hours`. Alert severities are `Critical`, `Warning`, `Information`, `Header` or `Regional warning` / `Regional information`. Names are capped at 100 characters. `<uvalib-photo-grid>` and `<uvalib-results-count>` report nothing.
2188
2275
 
@@ -2782,6 +2869,57 @@ Compatibility element. Light mode (`no-shadow-dom`) installs the tokens and base
2782
2869
  | `site-analytics-event` | Listened for on `document` too: the same as `uvalib-analytics-event`. |
2783
2870
  | `site-analytics-content` | Listened for on `document` too: the same as `uvalib-analytics-content`. |
2784
2871
 
2872
+ ### `<uvalib-audio>`
2873
+
2874
+ A long recording played by chapter: an audiobook, an oral history's sessions. One player for the whole list, so starting a chapter stops the one playing. Give the chapters as a list of links to their files, so the page works before (and without) the script: `<ol><li><a href="ch1.mp3" data-duration="12:31">Chapter 1. Down the Rabbit-Hole</a></li>…</ol>`. The first link in each item is the chapter (its text is the title; inline markup such as `<i>` or `lang` is kept); `data-duration` (`12:31`, `1:02:03` or seconds) is shown beside it and gives the slider its length before the file loads. Other links in the item (the chapter's text, a transcript) are kept as links after it. `data-download` on the `<li>` adds a Download link for that chapter (its own file, or the URL given), with `data-size` (bytes or text) after it. Upgraded, each chapter is a real button (“Play Chapter 1. Down the Rabbit-Hole”, its visible text), with its duration; the current chapter gets `aria-current="true"` and says “Now playing” or “Paused” in text, beside an orange bar. Above the list, a player for the current chapter: what is playing (as text, not a live region), Back 15 s, Play/Pause, Forward 30 s, a position slider (a native range, read as “12 minutes 30 seconds of 41 minutes”), the elapsed and total time, and a native Speed select (0.75× to 2×). One `<audio preload="none">` plays everything: nothing loads until the visitor presses Play, and nothing ever plays without a press. `continuous` plays the next chapter when one ends. The position is remembered per page in localStorage (the page's path, plus `storage-key` when a page has more than one recording): on the next visit a “Resume “Chapter 4” at 12:30” button offers to carry on, never playing by itself. Saved on pause, every few seconds while playing, and when the page is left; cleared when the last chapter ends. `no-resume` turns it off. Without storage it simply forgets. Chapter changes, pauses, speed changes and skips are announced politely in one status (a burst of skips once, where it ends); the time is never announced as it runs. A chapter that fails to load says so in text, with a direct link to its file. `download-href` adds a link to the whole recording (an M4B audiobook), with `download-label` and `download-size` (bytes, shown as “312 MB”, or text). Where the browser has the Media Session API, the system's media keys and lock screen show the chapter and can play, pause, seek and change chapter. Before it upgrades, `base.css` holds the player's height above the list and gives each item the height of its upgraded row, so the list does not move.
2875
+
2876
+ #### Attributes
2877
+
2878
+ | Attribute | Type | Default | Description |
2879
+ |---|---|---|---|
2880
+ | `label` | `string` | `''` | The player's accessible name, such as the book's title (default “Player”). |
2881
+ | `continuous` | `boolean` | `false` | Play the next chapter when one ends. |
2882
+ | `no-resume` | `boolean` | `false` | Don't remember the position (nothing is read from or written to localStorage). |
2883
+ | `storage-key` | `string` | `''` | Added to the page's path to name what is remembered, for a page with several recordings. |
2884
+ | `download-href` | `string` | `''` | The whole recording to download (an M4B audiobook with chapters, an MP3). |
2885
+ | `download-label` | `string` | `'Download the whole recording'` | The download link's text. |
2886
+ | `download-size` | `string` | `''` | The download's size: bytes (shown as “312 MB”) or text. |
2887
+ | `no-shadow-dom` | `boolean` | `false` | |
2888
+ | `no-style` | `boolean` | `false` | |
2889
+
2890
+ #### CSS parts
2891
+
2892
+ | Part | Description |
2893
+ |---|---|
2894
+ | `player` | The player box above the list. |
2895
+ | `now` | The line saying what is playing (or the Resume button). |
2896
+ | `controls` | The player's buttons, slider, time and speed. |
2897
+ | `download` | The whole recording's download line. |
2898
+ | `list` | The list of chapters. |
2899
+ | `chapter` | Each chapter's row. |
2900
+
2901
+ #### Events
2902
+
2903
+ | Event | Description |
2904
+ |---|---|
2905
+ | `uvalib-analytics-event` | For `<site-analytics>`, on the visitor's actions only, never titles or URLs: `['uvalib-audio', 'play', 'chapter <N>', N]` the first time each chapter plays in a page view (N is its place in the list), `['uvalib-audio', 'complete', 'chapter <N>', N]` when it plays to its end, `['uvalib-audio', 'speed', '<speed>', speed]` once the visitor settles on a speed, `['uvalib-audio', 'resume', 'chapter <N>', N]`, and `['uvalib-audio', 'download', 'recording' \| 'chapter <N>']`. Bubbles and is composed. |
2906
+
2907
+ #### CSS custom properties
2908
+
2909
+ | Property | Default | Description |
2910
+ |---|---|---|
2911
+ | `--uva-color-text` | | Dark-mode role token: text (else `--uva-grey-darkest`). |
2912
+ | `--uva-color-text-muted` | | Dark-mode role token: durations (else #4b5563). |
2913
+ | `--uva-color-link` | | Dark-mode role token: links and the outline buttons (else `--uva-brand-blue`). |
2914
+ | `--uva-color-button-bg` | | Dark-mode role token: Play/Pause and the slider (else `--uva-blue-alt`). |
2915
+ | `--uva-color-button-text` | | Dark-mode role token: Play/Pause text (else #fff). |
2916
+ | `--uva-color-surface-raised` | | Dark-mode role token: the player's and the controls' background (else #fff). |
2917
+ | `--uva-color-table-border` | | Dark-mode role token: the player's border and the rules between chapters (else #dadada). |
2918
+ | `--uva-color-accent-bg` | | Dark-mode role token: the “Now playing” marker (else `--uva-brand-blue`). |
2919
+ | `--uva-color-on-accent` | | Dark-mode role token: the marker's text (else #fff). |
2920
+ | `--uva-color-current` | | Dark-mode role token: the current chapter's bar (else `--uva-brand-orange`). |
2921
+ | `--uva-color-focus` | | Dark-mode role token: focus ring (else `--uva-brand-orange`). |
2922
+
2785
2923
  ### `<uvalib-back-to-top>`
2786
2924
 
2787
2925
  A “Back to top” button for long pages: minutes, finding aids, transcriptions, long result lists. It stays hidden (`visibility: hidden`, so it is neither a tab stop nor in the accessibility tree) until the top `offset` pixels of the page (default 400) have scrolled out of view, watched with an IntersectionObserver on a small sentinel at the top of the page, never a scroll listener. If it has focus as it hides, focus moves to the target. Activating it scrolls to the top (smoothly unless the visitor prefers reduced motion) and moves focus to the page's `<h1>` (the first in `<main>`, else the first anywhere, else `#top`), or to `target` (a selector), adding `tabindex="-1"` when it is not focusable, so keyboard and screen reader users land at the top too. The button is fixed in the bottom corner (end side), inside the safe-area insets. The element itself is an empty block 4.75rem tall: put it last in the page's main content and that is the space the button needs, so the last lines can always scroll clear of it. When that space comes into view the button sits in it instead of floating, so it never covers the footer either. It is hidden in print.
@@ -3707,7 +3845,7 @@ A record's details as a description list, as on the library's digital collection
3707
3845
 
3708
3846
  ### `<uvalib-pagefind-search>`
3709
3847
 
3710
- Pagefind's default search UI (`PagefindUI`, from the site's own Pagefind bundle) with the library's defaults and the accessibility fixes that need script. Use it with pagefind.css, in place of Pagefind's pagefind-ui.css. It renders in light DOM, so the page's styles reach Pagefind's markup. It loads `<bundle-path>pagefind-ui.js` unless `window.PagefindUI` already exists. What it adds to the stock UI: a visible `<label>` for the field (the stock field is named only by its title); a polite status region that announces the result count ("12 results for virginia") once results settle (the stock message is not a live region); focus kept in the field after Clear or Escape (the stock UI blurs it, dropping focus to the page) and moved to the first new result after "Load more results"; the loading placeholders' dots hidden from screen readers; `?q=` read at start (and on Back and Forward) and the settled query written back with `history.replaceState`, so a search can be shared; with `filter-params`, the named Pagefind filters read from and written to the URL the same way; and reports to `<site-analytics>`. While a search from the URL loads, it can hold the page still (issue #37): with `searching` set in the page's HTML when the URL has a query, the element holds a screen's height from first paint, and placeholder results (aria-hidden) stand in for Pagefind's until they, or "no results", are drawn; the element then still reaches the bottom of the window until the visitor uses the search, so a short list does not pull the footer up. It does the same on Back and Forward to a new query. The `ui` property is the `PagefindUI` instance (for `triggerFilters`), and `ready` resolves with it. Attributes are read once, when the element is first connected.
3848
+ Pagefind's default search UI (`PagefindUI`, from the site's own Pagefind bundle) with the library's defaults and the accessibility fixes that need script. Use it with pagefind.css, in place of Pagefind's pagefind-ui.css. It renders in light DOM, so the page's styles reach Pagefind's markup. It loads `<bundle-path>pagefind-ui.js` unless `window.PagefindUI` already exists. What it adds to the stock UI: a visible `<label>` for the field (the stock field is named only by its title); a polite status region that announces the result count ("12 results for virginia") once results settle (the stock message is not a live region); focus kept in the field after Clear or Escape (the stock UI blurs it, dropping focus to the page) and moved to the first new result after "Load more results"; the loading placeholders' dots hidden from screen readers; `?q=` read at start (and on Back and Forward) and the settled query written back with `history.replaceState`, so a search can be shared; with `filter-params`, the named Pagefind filters read from and written to the URL the same way (and with `filter-flags`, one-value filters linked as `?audiobook=1`); and reports to `<site-analytics>`. While a search from the URL loads, it can hold the page still (issue #37): with `searching` set in the page's HTML when the URL has a query, the element holds a screen's height from first paint, and placeholder results (aria-hidden) stand in for Pagefind's until they, or "no results", are drawn; the element then still reaches the bottom of the window until the visitor uses the search, so a short list does not pull the footer up. It does the same on Back and Forward to a new query. The `ui` property is the `PagefindUI` instance (for `triggerFilters`), and `ready` resolves with it. Attributes are read once, when the element is first connected.
3711
3849
 
3712
3850
  #### Attributes
3713
3851
 
@@ -3728,6 +3866,7 @@ Pagefind's default search UI (`PagefindUI`, from the site's own Pagefind bundle)
3728
3866
  | `searching` | `boolean` | | Set it in the page's HTML when the URL has a query (server-side, or with a one-line inline script after the element): from first paint, before any script loads, it holds a screen's height for the results, and placeholder results show until they are drawn. The element removes it then (and at start without a query), and sets it itself on Back and Forward to a new query. |
3729
3867
  | `no-skeleton` | `boolean` | | Never hold space or show placeholder results (`searching` is ignored). |
3730
3868
  | `filter-params` | `string` | | Space-separated Pagefind filter names read from and written to URL parameters of the same name (`collection author`: `?collection=A&collection=B`). URL filters are applied with the query as one search, their filter groups open; values not in the index are ignored. Empty (the default) turns it off. |
3869
+ | `filter-flags` | `string` | | Space-separated names of one-value Pagefind filters ("has an audiobook": its one value is `Available`), read from and written to the URL as on/off flags (issue #40). The parameter with any value, or none (`?audiobook`, `?audiobook=1`, `?audiobook=yes`), checks the filter's one value, whatever its spelling in the index; `0`, `false`, `no` and `off` leave it unchecked. Checking it writes `?audiobook=1`; unchecking removes it. Otherwise as `filter-params` (one search with the query, Back and Forward); a name need not be repeated there, and a name in both is a flag. If the index has more or fewer than one value for it, a console warning says so once and the filter is read as `filter-params` (exact values). |
3731
3870
 
3732
3871
  #### Events
3733
3872