@uvalib/web-components 1.10.0 → 1.11.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 (32) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +43 -5
  3. package/dist/base.css +7 -1
  4. package/dist/components/uvalib-contents/UvalibContents.d.ts +66 -2
  5. package/dist/components/uvalib-contents/UvalibContents.js +277 -29
  6. package/dist/components/uvalib-contents/UvalibContents.js.map +1 -1
  7. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.d.ts +27 -1
  8. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js +92 -1
  9. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js.map +1 -1
  10. package/dist/custom-elements.json +400 -6
  11. package/dist/pagefind.css +144 -0
  12. package/dist/styles/base.js +7 -1
  13. package/dist/styles/base.js.map +1 -1
  14. package/dist/styles/pagefind.js +150 -0
  15. package/dist/styles/pagefind.js.map +1 -1
  16. package/dist-cdn/base.css +7 -1
  17. package/dist-cdn/chunks/{base-DXkGlSgH.js → base-DmImIMld.js} +8 -2
  18. package/dist-cdn/chunks/{base-DXkGlSgH.js.map → base-DmImIMld.js.map} +1 -1
  19. package/dist-cdn/custom-elements.json +400 -6
  20. package/dist-cdn/manifest.json +1 -1
  21. package/dist-cdn/pagefind.css +144 -0
  22. package/dist-cdn/site-page.js +1 -1
  23. package/dist-cdn/site-style.js +1 -1
  24. package/dist-cdn/skills/uvalib-web-components/SKILL.md +2 -2
  25. package/dist-cdn/skills/uvalib-web-components/reference/components.md +13 -4
  26. package/dist-cdn/uvalib-contents.js +185 -47
  27. package/dist-cdn/uvalib-contents.js.map +1 -1
  28. package/dist-cdn/uvalib-pagefind-search.js +64 -34
  29. package/dist-cdn/uvalib-pagefind-search.js.map +1 -1
  30. package/package.json +1 -1
  31. package/skills/uvalib-web-components/SKILL.md +2 -2
  32. package/skills/uvalib-web-components/reference/components.md +13 -4
@@ -2903,7 +2903,7 @@
2903
2903
  {
2904
2904
  "kind": "variable",
2905
2905
  "name": "base",
2906
- "default": "css` *, *::before, *::after { box-sizing: border-box; } html, body { font-family: var( --uva-font-family, franklin-gothic-urw, 'UVA Franklin Fallback', Arial, Helvetica, sans-serif ); } html { font-size: var(--uva-font-size-base, 17px); } body { margin: 0; line-height: 1.5; min-height: 100vh; color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b)); background-color: var(--uva-color-surface); } site-page:not(:defined) { display: flow-root; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-breadcrumbs:not(:defined), uvalib-card:not(:defined), uvalib-card-grid:not(:defined), uvalib-pager:not(:defined), uvalib-contents:not(:defined), uvalib-metadata:not(:defined), uvalib-tag-list:not(:defined) { display: block; line-height: 1.5; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } /* A chip row: hidden, one 44px row tall (with the scrolling row's padding), the raw children kept on one line so they cannot make it taller. */ uvalib-chip-group:not(:defined) { display: block; min-height: 44px; max-width: 100%; overflow: hidden; white-space: nowrap; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-chip-group[scroll]:not(:defined) { min-height: calc(44px + 0.75rem); } /* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */ uvalib-chip-group[description]:not(:defined) { padding-block-end: 1.5625rem; } /* Its text is drawn from attributes: hold one line until it upgrades. */ uvalib-results-count:not(:defined) { display: block; min-block-size: 1.5em; } uvalib-tag-list:not(:defined)[hidden], uvalib-results-count:not(:defined)[hidden] { display: none; } /* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7). More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */ :where( site-page, uvalib-breadcrumbs, uvalib-card, uvalib-card-grid, uvalib-pager, uvalib-contents, uvalib-metadata, uvalib-chip-group, uvalib-tabs, uvalib-combobox, uvalib-image-regions, uvalib-map, uvalib-filter-drawer, uvalib-filter, uvalib-list-filter ):not(:defined)[hidden], :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] { display: none; } /* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid out as it lays them out (label beside value from 36rem of its own width, stacked below; 8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart), so the page does not move when it upgrades. Rows the attributes add (creator, rights, citation) are not in the page's <dl> and cannot be held. */ uvalib-metadata:not(:defined) { container-type: inline-size; font-size: 1rem; } uvalib-metadata:not(:defined) > dl { display: grid; grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr); column-gap: 1.5rem; margin: 0; } uvalib-metadata:not(:defined) > dl > dt { grid-column: 1; margin: 0; padding-block: 0.5rem; font-weight: 700; } uvalib-metadata:not(:defined) > dl > dd { grid-column: 2; margin: 0; padding-block: 0.5rem; } uvalib-metadata:not(:defined) > dl > dt:not(:first-child), uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd { border-block-start: 1px solid transparent; } uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) { margin: 0; padding: 0; list-style: none; } uvalib-metadata:not(:defined) > dl > dd li + li { margin-block-start: 0.25rem; } @container (width < 36rem) { uvalib-metadata:not(:defined) > dl { grid-template-columns: minmax(0, 1fr); } uvalib-metadata:not(:defined) > dl > :is(dt, dd) { grid-column: 1; } uvalib-metadata:not(:defined) > dl > dt { padding-block-end: 0; } uvalib-metadata:not(:defined) > dl > dd { padding-block-start: 0; } uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd { border-block-start: 0; } } ${metadataLimits} /* Tabs stay readable before the script runs: a block, one panel, and a gap the size of the tab row (44px) plus its 1rem margin, so the first panel does not jump when the element upgrades. Later data-tab panels stay hidden. */ uvalib-tabs:not(:defined) { display: block; padding-block-start: calc(44px + 1rem); } uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] { display: none; } /* A combobox: its label (from the attribute) and one 44px field (plus a one-line description) held, so nothing moves when it upgrades. A fallback <input list> child works meanwhile; the other children (options, a datalist) stay out of sight. */ uvalib-combobox:not(:defined) { display: block; min-block-size: calc(1.5em + 0.25rem + 44px); line-height: 1.5; } uvalib-combobox[description]:not(:defined) { min-block-size: calc(3em + 0.5rem + 44px); } uvalib-combobox:not(:defined)::before { content: attr(label); display: block; margin-block-end: 0.25rem; font-weight: 600; } uvalib-combobox:not(:defined) > :not(input) { display: none; } uvalib-combobox:not(:defined) > input { display: block; box-sizing: border-box; inline-size: 100%; min-block-size: 44px; font: inherit; line-height: 1.2; } /* A list filter draws its label, a 44px field and a one-line count from attributes: hold their height (less the label with hide-label, less the count with results-count), so the list below does not move when it upgrades. The list itself is the page's and stays fully shown until then. */ uvalib-list-filter:not(:defined) { display: block; font-size: 1rem; line-height: 1.5; min-block-size: calc(1.5em + 0.25rem + 44px + 0.25rem + 1.5em); } uvalib-list-filter[hide-label]:not(:defined) { min-block-size: calc(44px + 0.25rem + 1.5em); } uvalib-list-filter[results-count]:not(:defined) { min-block-size: calc(1.5em + 0.25rem + 44px); } uvalib-list-filter[hide-label][results-count]:not(:defined) { min-block-size: 44px; } /* Image regions: the image at its own width and the list beside it (or under it), the layout the element keeps once it upgrades, so the image does not move. */ uvalib-image-regions:not(:defined) { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; } uvalib-image-regions:not(:defined) > :is(img, picture) { display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; height: auto; } uvalib-image-regions:not(:defined) > :is(ol, ul) { flex: 1 1 14rem; min-width: 0; } /* A map: its key instructions (the same text it shows) and the map's height held above the child list, so the list does not move when the map is drawn over the page's Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */ uvalib-map:not(:defined) { display: block; } uvalib-map:not(:defined)::before { content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.'; display: block; padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw)))); font-size: 0.875rem; line-height: 1.5; color: var(--uva-color-text-muted, #4b5563); } /* A collapsed filter group (<uvalib-filter collapsible collapsed>) draws only its 44px legend button once it upgrades: hold that height. Low specificity, so the [hidden] rule above still wins. */ :where(uvalib-filter[collapsible][collapsed]):not(:defined) { display: block; min-block-size: 44px; } /* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px \"Search and filters\" button shows, so hold that height and keep the form and filters out of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the same two rules in a media query of that width (see the README). Low specificity, so the [hidden] rule above still wins. */ @media (max-width: 48rem) { :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) { display: block; min-block-size: 44px; } :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * { display: none; } } /* A contents list before <uvalib-contents> upgrades (a .uvalib-sidebar-layout sidebar): the headline's line held above, the links already padded as it pads them (the rules drawn transparent while hidden), so the list does not move. Narrow (the default 64rem collapse-below, closed): only its 44px button shows once it upgrades, so hold that and clip the list; the reveal releases it, so the list still shows if the script never loads. The [hidden] rule above still wins (it alone sets display). */ uvalib-contents:not(:defined) { padding-block-start: calc(1.125rem * 1.3 + 0.5rem); animation-name: uvalib-contents-reveal; } :where(uvalib-contents):not(:defined) :is(ol, ul) { margin: 0; padding: 0; list-style: none; } :where(uvalib-contents):not(:defined) > :is(ol, ul) { border-block: 1px solid transparent; } :where(uvalib-contents):not(:defined) > :is(ol, ul) > li + li { border-block-start: 1px solid transparent; } :where(uvalib-contents):not(:defined) li > a { display: block; padding: 0.5rem 0.75rem 0.5rem calc(0.75rem + 4px); } :where(uvalib-contents):not(:defined) li li > a { padding-block: 0.25rem; } :where(uvalib-contents):not(:defined) li :is(ol, ul) { padding-inline-start: 1rem; border-inline-start: 2px solid transparent; } /* In light DOM (no-shadow-dom) a nested list is indented by a margin, with 0.5rem below. */ :where(uvalib-contents[no-shadow-dom]):not(:defined) li :is(ol, ul) { margin: 0 0 0.5rem 0.75rem; padding-inline-start: 0; } @media (max-width: 64rem) { uvalib-contents:not([collapse-below], [open]):not(:defined) { max-block-size: 44px; padding-block-start: 0; overflow: hidden; } } @keyframes uvalib-contents-reveal { to { visibility: visible; max-block-size: none; overflow: visible; } } /* A dialog before <uvalib-dialog> upgrades: its children are the dialog's content, never shown in the page, so nothing flashes or moves. Once defined, a closed dialog renders nothing (its host is display: contents around a closed <dialog>). */ uvalib-dialog:not(:defined) { display: none; } /* A citation before <uvalib-citation> upgrades: only the first format's citation, boxed as it will be, with the label and 44px format bar held above it (none for hide-label) and the 44px Copy citation row below, so nothing moves when it upgrades (an app's citations property cannot be held). */ uvalib-citation:not(:defined) { display: block; font-size: 1rem; line-height: 1.5; } uvalib-citation:not(:defined):has(> [data-format]) { padding-block: calc(2rem + 44px + 0.75rem) calc(0.75rem + 44px); } uvalib-citation[hide-label]:not(:defined):has(> [data-format]) { padding-block-start: calc(44px + 0.75rem); } uvalib-citation:not(:defined) > [data-format] { margin: 0; padding: 0.75rem 1rem; border: 1px solid transparent; overflow-wrap: anywhere; text-wrap: pretty; } uvalib-citation:not(:defined) > [data-format] ~ [data-format], uvalib-citation:not(:defined) > [slot] { display: none; } /* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme prints light (the role tokens resolve to their light values), and the content's links are black and underlined, so they are told apart without colour. Content is <main> in light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is shown, apart from the light scheme. */ @media print { :root[data-uva-color-scheme]:has(site-page) { color-scheme: light; --uva-color-scheme: light; } /* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */ site-page:not([print-chrome]) > [slot='breadcrumbs'] { display: none; } site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link, site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) { color: #000; text-decoration: underline; } } @keyframes uvalib-site-page-reveal { to { visibility: visible; } } `"
2906
+ "default": "css` *, *::before, *::after { box-sizing: border-box; } html, body { font-family: var( --uva-font-family, franklin-gothic-urw, 'UVA Franklin Fallback', Arial, Helvetica, sans-serif ); } html { font-size: var(--uva-font-size-base, 17px); } body { margin: 0; line-height: 1.5; min-height: 100vh; color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b)); background-color: var(--uva-color-surface); } site-page:not(:defined) { display: flow-root; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-breadcrumbs:not(:defined), uvalib-card:not(:defined), uvalib-card-grid:not(:defined), uvalib-pager:not(:defined), uvalib-contents:not(:defined), uvalib-metadata:not(:defined), uvalib-tag-list:not(:defined) { display: block; line-height: 1.5; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } /* A chip row: hidden, one 44px row tall (with the scrolling row's padding), the raw children kept on one line so they cannot make it taller. */ uvalib-chip-group:not(:defined) { display: block; min-height: 44px; max-width: 100%; overflow: hidden; white-space: nowrap; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-chip-group[scroll]:not(:defined) { min-height: calc(44px + 0.75rem); } /* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */ uvalib-chip-group[description]:not(:defined) { padding-block-end: 1.5625rem; } /* Its text is drawn from attributes: hold one line until it upgrades. */ uvalib-results-count:not(:defined) { display: block; min-block-size: 1.5em; } uvalib-tag-list:not(:defined)[hidden], uvalib-results-count:not(:defined)[hidden] { display: none; } /* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7). More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */ :where( site-page, uvalib-breadcrumbs, uvalib-card, uvalib-card-grid, uvalib-pager, uvalib-contents, uvalib-metadata, uvalib-chip-group, uvalib-tabs, uvalib-combobox, uvalib-image-regions, uvalib-map, uvalib-filter-drawer, uvalib-filter, uvalib-list-filter ):not(:defined)[hidden], :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] { display: none; } /* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid out as it lays them out (label beside value from 36rem of its own width, stacked below; 8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart), so the page does not move when it upgrades. Rows the attributes add (creator, rights, citation) are not in the page's <dl> and cannot be held. */ uvalib-metadata:not(:defined) { container-type: inline-size; font-size: 1rem; } uvalib-metadata:not(:defined) > dl { display: grid; grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr); column-gap: 1.5rem; margin: 0; } uvalib-metadata:not(:defined) > dl > dt { grid-column: 1; margin: 0; padding-block: 0.5rem; font-weight: 700; } uvalib-metadata:not(:defined) > dl > dd { grid-column: 2; margin: 0; padding-block: 0.5rem; } uvalib-metadata:not(:defined) > dl > dt:not(:first-child), uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd { border-block-start: 1px solid transparent; } uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) { margin: 0; padding: 0; list-style: none; } uvalib-metadata:not(:defined) > dl > dd li + li { margin-block-start: 0.25rem; } @container (width < 36rem) { uvalib-metadata:not(:defined) > dl { grid-template-columns: minmax(0, 1fr); } uvalib-metadata:not(:defined) > dl > :is(dt, dd) { grid-column: 1; } uvalib-metadata:not(:defined) > dl > dt { padding-block-end: 0; } uvalib-metadata:not(:defined) > dl > dd { padding-block-start: 0; } uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd { border-block-start: 0; } } ${metadataLimits} /* Tabs stay readable before the script runs: a block, one panel, and a gap the size of the tab row (44px) plus its 1rem margin, so the first panel does not jump when the element upgrades. Later data-tab panels stay hidden. */ uvalib-tabs:not(:defined) { display: block; padding-block-start: calc(44px + 1rem); } uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] { display: none; } /* A combobox: its label (from the attribute) and one 44px field (plus a one-line description) held, so nothing moves when it upgrades. A fallback <input list> child works meanwhile; the other children (options, a datalist) stay out of sight. */ uvalib-combobox:not(:defined) { display: block; min-block-size: calc(1.5em + 0.25rem + 44px); line-height: 1.5; } uvalib-combobox[description]:not(:defined) { min-block-size: calc(3em + 0.5rem + 44px); } uvalib-combobox:not(:defined)::before { content: attr(label); display: block; margin-block-end: 0.25rem; font-weight: 600; } uvalib-combobox:not(:defined) > :not(input) { display: none; } uvalib-combobox:not(:defined) > input { display: block; box-sizing: border-box; inline-size: 100%; min-block-size: 44px; font: inherit; line-height: 1.2; } /* A list filter draws its label, a 44px field and a one-line count from attributes: hold their height (less the label with hide-label, less the count with results-count), so the list below does not move when it upgrades. The list itself is the page's and stays fully shown until then. */ uvalib-list-filter:not(:defined) { display: block; font-size: 1rem; line-height: 1.5; min-block-size: calc(1.5em + 0.25rem + 44px + 0.25rem + 1.5em); } uvalib-list-filter[hide-label]:not(:defined) { min-block-size: calc(44px + 0.25rem + 1.5em); } uvalib-list-filter[results-count]:not(:defined) { min-block-size: calc(1.5em + 0.25rem + 44px); } uvalib-list-filter[hide-label][results-count]:not(:defined) { min-block-size: 44px; } /* Image regions: the image at its own width and the list beside it (or under it), the layout the element keeps once it upgrades, so the image does not move. */ uvalib-image-regions:not(:defined) { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; } uvalib-image-regions:not(:defined) > :is(img, picture) { display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; height: auto; } uvalib-image-regions:not(:defined) > :is(ol, ul) { flex: 1 1 14rem; min-width: 0; } /* A map: its key instructions (the same text it shows) and the map's height held above the child list, so the list does not move when the map is drawn over the page's Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */ uvalib-map:not(:defined) { display: block; } uvalib-map:not(:defined)::before { content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.'; display: block; padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw)))); font-size: 0.875rem; line-height: 1.5; color: var(--uva-color-text-muted, #4b5563); } /* A collapsed filter group (<uvalib-filter collapsible collapsed>) draws only its 44px legend button once it upgrades: hold that height. Low specificity, so the [hidden] rule above still wins. */ :where(uvalib-filter[collapsible][collapsed]):not(:defined) { display: block; min-block-size: 44px; } /* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px \"Search and filters\" button shows, so hold that height and keep the form and filters out of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the same two rules in a media query of that width (see the README). Low specificity, so the [hidden] rule above still wins. */ @media (max-width: 48rem) { :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) { display: block; min-block-size: 44px; } :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * { display: none; } } /* A contents list before <uvalib-contents> upgrades (a .uvalib-sidebar-layout sidebar): the headline's line held above, the links already padded as it pads them (the rules drawn transparent while hidden), so the list does not move. Narrow (the default 64rem collapse-below, closed): only its 44px button shows once it upgrades, so hold that and clip the list; the reveal releases it, so the list still shows if the script never loads. The [hidden] rule above still wins (it alone sets display). */ uvalib-contents:not(:defined) { padding-block-start: calc(1.125rem * 1.3 + 0.5rem); animation-name: uvalib-contents-reveal; } /* With full-href (issue #38): the full-contents link's line held below the list (0.5rem above a 44px link). A window=\"N\" list is not held: the whole list shows until it upgrades (in a sidebar beside the content, nothing else moves). */ uvalib-contents[full-href]:not(:defined) { padding-block-end: calc(44px + 0.5rem); } :where(uvalib-contents):not(:defined) :is(ol, ul) { margin: 0; padding: 0; list-style: none; } :where(uvalib-contents):not(:defined) > :is(ol, ul) { border-block: 1px solid transparent; } :where(uvalib-contents):not(:defined) > :is(ol, ul) > li + li { border-block-start: 1px solid transparent; } :where(uvalib-contents):not(:defined) li > a { display: block; padding: 0.5rem 0.75rem 0.5rem calc(0.75rem + 4px); } :where(uvalib-contents):not(:defined) li li > a { padding-block: 0.25rem; } :where(uvalib-contents):not(:defined) li :is(ol, ul) { padding-inline-start: 1rem; border-inline-start: 2px solid transparent; } /* In light DOM (no-shadow-dom) a nested list is indented by a margin, with 0.5rem below. */ :where(uvalib-contents[no-shadow-dom]):not(:defined) li :is(ol, ul) { margin: 0 0 0.5rem 0.75rem; padding-inline-start: 0; } @media (max-width: 64rem) { uvalib-contents:not([collapse-below], [open]):not(:defined) { max-block-size: 44px; padding-block: 0; overflow: hidden; } } @keyframes uvalib-contents-reveal { to { visibility: visible; max-block-size: none; overflow: visible; } } /* A dialog before <uvalib-dialog> upgrades: its children are the dialog's content, never shown in the page, so nothing flashes or moves. Once defined, a closed dialog renders nothing (its host is display: contents around a closed <dialog>). */ uvalib-dialog:not(:defined) { display: none; } /* A citation before <uvalib-citation> upgrades: only the first format's citation, boxed as it will be, with the label and 44px format bar held above it (none for hide-label) and the 44px Copy citation row below, so nothing moves when it upgrades (an app's citations property cannot be held). */ uvalib-citation:not(:defined) { display: block; font-size: 1rem; line-height: 1.5; } uvalib-citation:not(:defined):has(> [data-format]) { padding-block: calc(2rem + 44px + 0.75rem) calc(0.75rem + 44px); } uvalib-citation[hide-label]:not(:defined):has(> [data-format]) { padding-block-start: calc(44px + 0.75rem); } uvalib-citation:not(:defined) > [data-format] { margin: 0; padding: 0.75rem 1rem; border: 1px solid transparent; overflow-wrap: anywhere; text-wrap: pretty; } uvalib-citation:not(:defined) > [data-format] ~ [data-format], uvalib-citation:not(:defined) > [slot] { display: none; } /* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme prints light (the role tokens resolve to their light values), and the content's links are black and underlined, so they are told apart without colour. Content is <main> in light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is shown, apart from the light scheme. */ @media print { :root[data-uva-color-scheme]:has(site-page) { color-scheme: light; --uva-color-scheme: light; } /* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */ site-page:not([print-chrome]) > [slot='breadcrumbs'] { display: none; } site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link, site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) { color: #000; text-decoration: underline; } } @keyframes uvalib-site-page-reveal { to { visibility: visible; } } `"
2907
2907
  }
2908
2908
  ],
2909
2909
  "exports": [
@@ -3158,7 +3158,7 @@
3158
3158
  {
3159
3159
  "kind": "variable",
3160
3160
  "name": "pagefind",
3161
- "default": "css` ${props} ${p} { inline-size: 100%; color: var(--pagefind-ui-text); font-family: var(--pagefind-ui-font); line-height: 1.5; overflow-wrap: anywhere; } ${p} *, ${p} *::before, ${p} *::after { box-sizing: border-box; } ${p} .pagefind-ui__hidden { display: none !important; } /* The Clear button while the field is empty: hidden from sight, the tab order and screen readers (the stock opacity: 0 left an invisible, focusable button). It keeps its width, which Pagefind measures to pad the field. */ ${p} .pagefind-ui__suppressed { visibility: hidden; pointer-events: none; } /* The field: .uvalib-input, taller, with the search icon inside it. */ ${p} .pagefind-ui__form { position: relative; margin: 0; } ${p} .pagefind-ui__form::before { content: ''; position: absolute; z-index: 1; inset-block-start: calc(${FIELD / 2}px - 0.55rem); inset-inline-start: 0.9rem; inline-size: 1.1rem; block-size: 1.1rem; background-color: var(--uva-color-text-muted, #4b5563); -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M12.75 11.25h-.79l-.28-.27a6.5 6.5 0 1 0-.7.7l.27.28v.79l5 4.99 1.49-1.49-4.99-5Zm-6 0a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9Z'/%3E%3C/svg%3E\") center / contain no-repeat; mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M12.75 11.25h-.79l-.28-.27a6.5 6.5 0 1 0-.7.7l.27.28v.79l5 4.99 1.49-1.49-4.99-5Zm-6 0a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9Z'/%3E%3C/svg%3E\") center / contain no-repeat; pointer-events: none; } ${p} .pagefind-ui__search-input { display: block; inline-size: 100%; min-block-size: ${FIELD}px; margin: 0; padding: 0.5rem 5rem 0.5rem 2.6rem; border: var(--pagefind-ui-border-width) solid var(--pagefind-ui-border); border-radius: var(--pagefind-ui-border-radius); background: var(--pagefind-ui-background); color: var(--uva-color-input-text, var(--uva-grey-darkest, #2b2b2b)); font: inherit; font-size: 1.1rem; line-height: 1.2; appearance: none; } ${p} .pagefind-ui__search-input::placeholder { color: var(--uva-color-text-muted, #4b5563); opacity: 1; } /* Clear: a small outline .uvalib-button inside the field's end. */ ${p} .pagefind-ui__search-clear { position: absolute; z-index: 1; inset-block-start: 6px; inset-inline-end: 6px; display: inline-flex; align-items: center; min-block-size: ${FIELD - 12}px; min-inline-size: 44px; margin: 0; padding: 0.25rem 0.875rem; border: 2px solid currentColor; border-radius: 0.25rem; background: var(--pagefind-ui-background); color: var(--uva-color-utility-link, var(--uva-blue-alt-dark, #005679)); font: inherit; font-size: 0.9rem; line-height: 1.2; cursor: pointer; } ${p} .pagefind-ui__search-clear:hover { background: var(--uva-color-surface-hover, var(--uva-grey-100, #dadada)); } /* Filters on the start side and results beside them; stacked when there is no room. */ ${p} .pagefind-ui__drawer { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem 2.5rem; } ${p} fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; } ${p} .pagefind-ui__filter-panel { flex: 1 1 15rem; min-inline-size: min(15rem, 100%); margin-block-start: 1.25rem; } ${p} .pagefind-ui__filter-panel-label { margin: 0 0 0.25rem; padding: 0; font-size: 1.1rem; font-weight: 700; } ${p} .pagefind-ui__filter-block { border-block-end: 1px solid var(--pagefind-ui-tag); } ${p} .pagefind-ui__filter-name { display: list-item; min-block-size: 44px; padding: 0.6rem 0.25rem; font-weight: 700; cursor: pointer; } ${p} .pagefind-ui__filter-name:hover { color: var(--uva-color-link, var(--uva-brand-blue, #232d4b)); text-decoration: underline; } /* The facet's own legend repeats the summary above it: kept for screen readers only. */ ${p} .pagefind-ui__filter-group-label { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* A long facet (every author) scrolls in its own box; the padding keeps focus rings in. */ ${p} .pagefind-ui__filter-group { max-block-size: 22rem; overflow-y: auto; padding: 0 6px 0.5rem; } ${p} .pagefind-ui__filter-value { display: flex; align-items: center; gap: 0.6rem; min-block-size: 44px; } ${p} .pagefind-ui__filter-checkbox { flex: none; inline-size: 24px; block-size: 24px; margin: 0; accent-color: var(--pagefind-ui-primary); cursor: pointer; } ${p} .pagefind-ui__filter-label { display: flex; flex: 1; align-items: center; align-self: stretch; padding-block: 0.25rem; cursor: pointer; } ${p} .pagefind-ui__filter-value--checked .pagefind-ui__filter-label { font-weight: 700; } /* Results. */ ${p} .pagefind-ui__results-area { flex: 1000 1 25rem; min-inline-size: min(25rem, 100%); margin-block-start: 1.25rem; } ${p} .pagefind-ui__message { margin: 0 0 0.75rem; padding-block: 0.6rem; font-weight: 700; } ${p} .pagefind-ui__results { margin: 0; padding: 0; list-style: none; } ${p} .pagefind-ui__result { display: flex; align-items: flex-start; gap: 1rem; margin: 0; padding-block: 1.25rem; border-block-start: 1px solid var(--pagefind-ui-tag); } ${p} .pagefind-ui__result:last-of-type { border-block-end: 1px solid var(--pagefind-ui-tag); } ${p} .pagefind-ui__result-thumb { position: relative; flex: 0 0 min(7.5rem, 25%); aspect-ratio: var(--pagefind-ui-image-box-ratio); } ${p} .pagefind-ui__result-image { display: block; max-inline-size: 100%; max-block-size: 100%; margin-inline: auto; border-radius: var(--pagefind-ui-image-border-radius); } ${p} .pagefind-ui__result-inner { flex: 1; min-inline-size: 0; } ${p} .pagefind-ui__result-title { margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.3; } ${p} .pagefind-ui__result-link { color: var(--uva-color-link, var(--uva-brand-blue, #232d4b)); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; } ${p} .pagefind-ui__result-link:hover { text-decoration-thickness: 3px; } ${p} .pagefind-ui__result-excerpt { margin: 0.35rem 0 0; } /* library.virginia.edu's <mark>: orange-200 with dark text (9.5:1). In the opt-in dark mode, a dark orange with white text (7.6:1). Here, not in tokens.css, so the header's colour-scheme switch does not carry it. */ ${p} mark { padding-inline: 0.1em; border-radius: 2px; background: var(--uva-brand-orange-200, #ffc999); color: var(--uva-grey-darkest, #2b2b2b); } @supports (color: light-dark(#000, #fff)) { :root[data-uva-color-scheme] ${p} mark { background: light-dark(var(--uva-brand-orange-200, #ffc999), #854200); color: light-dark(var(--uva-grey-darkest, #2b2b2b), #ffffff); } } /* A page's sections (showSubResults): indented under the page, with no arrow glyph. */ ${p} .pagefind-ui__result-nested { margin-block-start: 0.75rem; padding-inline-start: 1rem; border-inline-start: 3px solid var(--pagefind-ui-tag); } ${p} .pagefind-ui__result-nested .pagefind-ui__result-title { font-size: 1rem; } ${p} .pagefind-ui__result-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 0; padding: 0; list-style: none; } ${p} .pagefind-ui__result-tag { padding: 0.1rem 0.6rem; border: 1px solid transparent; border-radius: var(--pagefind-ui-border-radius); background: var(--pagefind-ui-tag); font-size: 0.85rem; } /* The placeholder while a result loads: a grey bar (its dots hidden). */ ${p} .pagefind-ui__loading { border-radius: var(--pagefind-ui-border-radius); background: var(--pagefind-ui-tag); color: transparent; } /* Load more results: .uvalib-button. */ ${p} .pagefind-ui__button { display: inline-flex; align-items: center; justify-content: center; min-block-size: 44px; margin: 1.5rem 0 0; padding: 0.5rem 1.25rem; border: 2px solid var(--pagefind-ui-primary); border-radius: var(--pagefind-ui-border-radius); background: var(--pagefind-ui-primary); color: var(--uva-color-button-text, #ffffff); font: inherit; font-size: 1rem; line-height: 1.2; cursor: pointer; } ${p} .pagefind-ui__button:hover { border-color: var(--uva-color-button-hover-bg, var(--uva-blue-alt-A, #005679)); background: var(--uva-color-button-hover-bg, var(--uva-blue-alt-A, #005679)); } ${p} .pagefind-ui__button:active { border-color: var(--uva-color-accent-bg, var(--uva-brand-blue, #232d4b)); background: var(--uva-color-accent-bg, var(--uva-brand-blue, #232d4b)); } /* <uvalib-pagefind-search>: the field's label above it. */ /* Before Pagefind's script has drawn the field, hold its height (the label's line and the field), so what follows does not jump. */ uvalib-pagefind-search { display: block; min-block-size: calc(1.5em + 0.35rem + ${FIELD}px); } uvalib-pagefind-search[label-hidden] { min-block-size: ${FIELD}px; } .uvalib-pagefind-search__label { display: block; margin: 0 0 0.35rem; font-weight: 700; line-height: 1.5; } /* Both set display, which would beat the hidden attribute's (issue #7). */ :where(uvalib-pagefind-search, .uvalib-pagefind-search__label)[hidden] { display: none !important; } ${p} :is(a, button, input, summary):focus-visible { outline: 3px solid var(--uva-color-focus, var(--uva-brand-orange, #e57200)); outline-offset: 2px; } @media (forced-colors: active) { ${p} .pagefind-ui__form::before { forced-color-adjust: none; background-color: CanvasText; } ${p} :is(.pagefind-ui__search-clear, .pagefind-ui__button) { border-color: ButtonText; } /* Forced colors drop the fills: tags keep a visible outline, and a loading result a grey outlined bar with its dots in GrayText. */ ${p} .pagefind-ui__result-tag { border-color: CanvasText; } ${p} .pagefind-ui__loading { border: 1px solid GrayText; color: GrayText; } ${p} :is(.pagefind-ui__search-clear, .pagefind-ui__button):hover { border-color: Highlight; color: Highlight; } } `"
3161
+ "default": "css` ${props} ${p} { inline-size: 100%; color: var(--pagefind-ui-text); font-family: var(--pagefind-ui-font); line-height: 1.5; overflow-wrap: anywhere; } ${p} *, ${p} *::before, ${p} *::after { box-sizing: border-box; } ${p} .pagefind-ui__hidden { display: none !important; } /* The Clear button while the field is empty: hidden from sight, the tab order and screen readers (the stock opacity: 0 left an invisible, focusable button). It keeps its width, which Pagefind measures to pad the field. */ ${p} .pagefind-ui__suppressed { visibility: hidden; pointer-events: none; } /* The field: .uvalib-input, taller, with the search icon inside it. */ ${p} .pagefind-ui__form { position: relative; margin: 0; } ${p} .pagefind-ui__form::before { content: ''; position: absolute; z-index: 1; inset-block-start: calc(${FIELD / 2}px - 0.55rem); inset-inline-start: 0.9rem; inline-size: 1.1rem; block-size: 1.1rem; background-color: var(--uva-color-text-muted, #4b5563); -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M12.75 11.25h-.79l-.28-.27a6.5 6.5 0 1 0-.7.7l.27.28v.79l5 4.99 1.49-1.49-4.99-5Zm-6 0a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9Z'/%3E%3C/svg%3E\") center / contain no-repeat; mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M12.75 11.25h-.79l-.28-.27a6.5 6.5 0 1 0-.7.7l.27.28v.79l5 4.99 1.49-1.49-4.99-5Zm-6 0a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9Z'/%3E%3C/svg%3E\") center / contain no-repeat; pointer-events: none; } ${p} .pagefind-ui__search-input { display: block; inline-size: 100%; min-block-size: ${FIELD}px; margin: 0; padding: 0.5rem 5rem 0.5rem 2.6rem; border: var(--pagefind-ui-border-width) solid var(--pagefind-ui-border); border-radius: var(--pagefind-ui-border-radius); background: var(--pagefind-ui-background); color: var(--uva-color-input-text, var(--uva-grey-darkest, #2b2b2b)); font: inherit; font-size: 1.1rem; line-height: 1.2; appearance: none; } ${p} .pagefind-ui__search-input::placeholder { color: var(--uva-color-text-muted, #4b5563); opacity: 1; } /* Clear: a small outline .uvalib-button inside the field's end. */ ${p} .pagefind-ui__search-clear { position: absolute; z-index: 1; inset-block-start: 6px; inset-inline-end: 6px; display: inline-flex; align-items: center; min-block-size: ${FIELD - 12}px; min-inline-size: 44px; margin: 0; padding: 0.25rem 0.875rem; border: 2px solid currentColor; border-radius: 0.25rem; background: var(--pagefind-ui-background); color: var(--uva-color-utility-link, var(--uva-blue-alt-dark, #005679)); font: inherit; font-size: 0.9rem; line-height: 1.2; cursor: pointer; } ${p} .pagefind-ui__search-clear:hover { background: var(--uva-color-surface-hover, var(--uva-grey-100, #dadada)); } /* Filters on the start side and results beside them; stacked when there is no room. */ ${p} .pagefind-ui__drawer { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem 2.5rem; } ${p} fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; } ${p} .pagefind-ui__filter-panel { flex: 1 1 15rem; min-inline-size: min(15rem, 100%); margin-block-start: 1.25rem; } ${p} .pagefind-ui__filter-panel-label { margin: 0 0 0.25rem; padding: 0; font-size: 1.1rem; font-weight: 700; } ${p} .pagefind-ui__filter-block { border-block-end: 1px solid var(--pagefind-ui-tag); } ${p} .pagefind-ui__filter-name { display: list-item; min-block-size: 44px; padding: 0.6rem 0.25rem; font-weight: 700; cursor: pointer; } ${p} .pagefind-ui__filter-name:hover { color: var(--uva-color-link, var(--uva-brand-blue, #232d4b)); text-decoration: underline; } /* The facet's own legend repeats the summary above it: kept for screen readers only. */ ${p} .pagefind-ui__filter-group-label { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* A long facet (every author) scrolls in its own box; the padding keeps focus rings in. */ ${p} .pagefind-ui__filter-group { max-block-size: 22rem; overflow-y: auto; padding: 0 6px 0.5rem; } ${p} .pagefind-ui__filter-value { display: flex; align-items: center; gap: 0.6rem; min-block-size: 44px; } ${p} .pagefind-ui__filter-checkbox { flex: none; inline-size: 24px; block-size: 24px; margin: 0; accent-color: var(--pagefind-ui-primary); cursor: pointer; } ${p} .pagefind-ui__filter-label { display: flex; flex: 1; align-items: center; align-self: stretch; padding-block: 0.25rem; cursor: pointer; } ${p} .pagefind-ui__filter-value--checked .pagefind-ui__filter-label { font-weight: 700; } /* Results. */ ${p} .pagefind-ui__results-area { flex: 1000 1 25rem; min-inline-size: min(25rem, 100%); margin-block-start: 1.25rem; } ${p} .pagefind-ui__message { margin: 0 0 0.75rem; padding-block: 0.6rem; font-weight: 700; } ${p} .pagefind-ui__results { margin: 0; padding: 0; list-style: none; } ${p} .pagefind-ui__result { display: flex; align-items: flex-start; gap: 1rem; margin: 0; padding-block: 1.25rem; border-block-start: 1px solid var(--pagefind-ui-tag); } ${p} .pagefind-ui__result:last-of-type { border-block-end: 1px solid var(--pagefind-ui-tag); } ${p} .pagefind-ui__result-thumb { position: relative; flex: 0 0 min(7.5rem, 25%); aspect-ratio: var(--pagefind-ui-image-box-ratio); } ${p} .pagefind-ui__result-image { display: block; max-inline-size: 100%; max-block-size: 100%; margin-inline: auto; border-radius: var(--pagefind-ui-image-border-radius); } ${p} .pagefind-ui__result-inner { flex: 1; min-inline-size: 0; } ${p} .pagefind-ui__result-title { margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.3; } ${p} .pagefind-ui__result-link { color: var(--uva-color-link, var(--uva-brand-blue, #232d4b)); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; } ${p} .pagefind-ui__result-link:hover { text-decoration-thickness: 3px; } ${p} .pagefind-ui__result-excerpt { margin: 0.35rem 0 0; } /* library.virginia.edu's <mark>: orange-200 with dark text (9.5:1). In the opt-in dark mode, a dark orange with white text (7.6:1). Here, not in tokens.css, so the header's colour-scheme switch does not carry it. */ ${p} mark { padding-inline: 0.1em; border-radius: 2px; background: var(--uva-brand-orange-200, #ffc999); color: var(--uva-grey-darkest, #2b2b2b); } @supports (color: light-dark(#000, #fff)) { :root[data-uva-color-scheme] ${p} mark { background: light-dark(var(--uva-brand-orange-200, #ffc999), #854200); color: light-dark(var(--uva-grey-darkest, #2b2b2b), #ffffff); } } /* A page's sections (showSubResults): indented under the page, with no arrow glyph. */ ${p} .pagefind-ui__result-nested { margin-block-start: 0.75rem; padding-inline-start: 1rem; border-inline-start: 3px solid var(--pagefind-ui-tag); } ${p} .pagefind-ui__result-nested .pagefind-ui__result-title { font-size: 1rem; } ${p} .pagefind-ui__result-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 0; padding: 0; list-style: none; } ${p} .pagefind-ui__result-tag { padding: 0.1rem 0.6rem; border: 1px solid transparent; border-radius: var(--pagefind-ui-border-radius); background: var(--pagefind-ui-tag); font-size: 0.85rem; } /* The placeholder while a result loads: a grey bar (its dots hidden). */ ${p} .pagefind-ui__loading { border-radius: var(--pagefind-ui-border-radius); background: var(--pagefind-ui-tag); color: transparent; } /* Load more results: .uvalib-button. */ ${p} .pagefind-ui__button { display: inline-flex; align-items: center; justify-content: center; min-block-size: 44px; margin: 1.5rem 0 0; padding: 0.5rem 1.25rem; border: 2px solid var(--pagefind-ui-primary); border-radius: var(--pagefind-ui-border-radius); background: var(--pagefind-ui-primary); color: var(--uva-color-button-text, #ffffff); font: inherit; font-size: 1rem; line-height: 1.2; cursor: pointer; } ${p} .pagefind-ui__button:hover { border-color: var(--uva-color-button-hover-bg, var(--uva-blue-alt-A, #005679)); background: var(--uva-color-button-hover-bg, var(--uva-blue-alt-A, #005679)); } ${p} .pagefind-ui__button:active { border-color: var(--uva-color-accent-bg, var(--uva-brand-blue, #232d4b)); background: var(--uva-color-accent-bg, var(--uva-brand-blue, #232d4b)); } /* <uvalib-pagefind-search>: the field's label above it. */ /* Before Pagefind's script has drawn the field, hold its height (the label's line and the field), so what follows does not jump. */ uvalib-pagefind-search { display: block; min-block-size: calc(1.5em + 0.35rem + ${FIELD}px); } uvalib-pagefind-search[label-hidden] { min-block-size: ${FIELD}px; } .uvalib-pagefind-search__label { display: block; margin: 0 0 0.35rem; font-weight: 700; line-height: 1.5; } /* While a search from the URL loads (issue #37): at least a screen's height, so what follows stays below the fold, and placeholder results in place of Pagefind's results area until they are drawn. A page may set searching in its HTML, so this holds from first paint. */ uvalib-pagefind-search[searching]:not([no-skeleton]) { min-block-size: 100vh; } uvalib-pagefind-search[searching]:not([no-skeleton]) .pagefind-ui__drawer { display: none; } /* Before the element's script runs: the same placeholders, drawn as still bars where the label, field, results message and rows will be (::before the message, ::after the rows, each row a repeating tile of gradient bars; with show-sub-results, two sections a row). */ ${pre} { --_bar: var(--uva-color-track, var(--uva-grey-200, #f1f1f1)); --_top: calc(1.5em + 0.35rem + ${FIELD}px + 1.25rem); --_msg: calc(1.95rem + 1.5em); --_row: calc(1px + 4.41rem + 4.5em); /* A row: its top border, title and short last line (60% wide), then two full lines. */ --_l: calc(1px + 3.16rem + 0.25em); --_rows: linear-gradient(var(--_bar) 0 1px, transparent 0), ${bands(['1px + 1.43rem', '1px + 2.63rem'], ['var(--_l) + 3em', 'var(--_l) + 4em'])}, ${bands(['var(--_l)', 'var(--_l) + 1em'], ['var(--_l) + 1.5em', 'var(--_l) + 2.5em'])}; --_sizes: 100% var(--_row), 60% var(--_row), 100% var(--_row); } ${pre}[label-hidden] { --_top: calc(${FIELD}px + 1.25rem); } ${pre}::before, ${pre}::after { content: ''; display: block; background-repeat: no-repeat; } ${pre}::before { /* No margin: it would collapse with the margin above the element. */ block-size: calc(var(--_top) + var(--_msg)); background-image: linear-gradient(var(--_bar) 0 0); background-position: 0 calc(var(--_top) + 0.6rem + 0.25em); background-size: min(14rem, 70%) 1em; } ${pre}::after { block-size: calc(100vh - var(--_top) - var(--_msg)); background-repeat: repeat-y; background-image: var(--_rows); background-size: var(--_sizes); } /* Each section: a 3px bar beside a title and two lines (the last 60%), 0.75rem below. */ ${pre}[show-sub-results] { --_row: calc(1px + 8.51rem + 10.5em); --_s: calc(1px + 3.91rem + 4.5em); --_t: calc(var(--_s) + 2.05rem + 3em); } ${pre}[show-sub-results]::after { --_in: calc(100% - 1rem - 3px); background-image: var(--_rows), ${bands(['var(--_s)', 'var(--_s) + 1.3rem + 3em'], ['var(--_t)', 'var(--_t) + 1.3rem + 3em'])}, ${bands(['var(--_s) + 0.15rem', 'var(--_s) + 1.15rem'], ['var(--_t) + 0.15rem', 'var(--_t) + 1.15rem'])}, ${bands(['var(--_s) + 1.3rem + 0.25em', 'var(--_s) + 1.3rem + 1.25em'], ['var(--_t) + 1.3rem + 0.25em', 'var(--_t) + 1.3rem + 1.25em'])}, ${bands(['var(--_s) + 1.3rem + 1.75em', 'var(--_s) + 1.3rem + 2.75em'], ['var(--_t) + 1.3rem + 1.75em', 'var(--_t) + 1.3rem + 2.75em'])}; background-position: 0 0, 0 0, 0 0, 0 0, calc(1rem + 3px) 0, calc(1rem + 3px) 0, calc(1rem + 3px) 0; background-size: var(--_sizes), 3px var(--_row), calc(var(--_in) * 0.45) var(--_row), var(--_in) var(--_row), calc(var(--_in) * 0.6) var(--_row); } /* The field's height before Pagefind draws it, so the placeholders below it stay put. */ uvalib-pagefind-search[searching] > .uvalib-pagefind-search__ui { min-block-size: ${FIELD}px; } /* Sized like the results area: its message, then rows like .pagefind-ui__result. The bars are base.css's .uvalib-skeleton-text (its shimmer, reduced motion and forced colors); the sizes and colour here hold without base.css. */ /* Flex columns, so the bars' margins add up (no collapsing) to 1.5em lines. */ .uvalib-pagefind-search__skeleton, .uvalib-pagefind-search__skeleton-result, .uvalib-pagefind-search__skeleton-sub { display: flex; flex-direction: column; } .uvalib-pagefind-search__skeleton { margin-block-start: 1.25rem; line-height: 1.5; } .uvalib-pagefind-search__skeleton .uvalib-skeleton-text { display: block; box-sizing: border-box; inline-size: 100%; block-size: 1em; margin-block: 0.25em; border-radius: 0.2rem; background-color: var(--uva-color-track, var(--uva-grey-200, #f1f1f1)); } .uvalib-pagefind-search__skeleton .uvalib-pagefind-search__skeleton-message { inline-size: min(14rem, 70%); margin-block: calc(0.6rem + 0.25em) calc(1.35rem + 0.25em); } .uvalib-pagefind-search__skeleton-result { padding-block: 1.25rem; border-block-start: 1px solid var(--pagefind-ui-tag); } .uvalib-pagefind-search__skeleton-result:last-child { border-block-end: 1px solid var(--pagefind-ui-tag); } .uvalib-pagefind-search__skeleton .uvalib-pagefind-search__skeleton-title { inline-size: 60%; block-size: 1.2rem; margin-block: 0.18rem 0.53rem; } .uvalib-pagefind-search__skeleton .uvalib-pagefind-search__skeleton-short { inline-size: 60%; } .uvalib-pagefind-search__skeleton-sub { margin-block-start: 0.75rem; padding-inline-start: 1rem; border-inline-start: 3px solid var(--pagefind-ui-tag); } .uvalib-pagefind-search__skeleton-sub .uvalib-pagefind-search__skeleton-title { inline-size: 45%; block-size: 1rem; margin-block: 0.15rem; } /* Both set display, which would beat the hidden attribute's (issue #7). */ :where(uvalib-pagefind-search, .uvalib-pagefind-search__label)[hidden] { display: none !important; } ${p} :is(a, button, input, summary):focus-visible { outline: 3px solid var(--uva-color-focus, var(--uva-brand-orange, #e57200)); outline-offset: 2px; } @media (forced-colors: active) { ${p} .pagefind-ui__form::before { forced-color-adjust: none; background-color: CanvasText; } ${p} :is(.pagefind-ui__search-clear, .pagefind-ui__button) { border-color: ButtonText; } /* Forced colors drop the fills: tags keep a visible outline, and a loading result a grey outlined bar with its dots in GrayText. */ ${p} .pagefind-ui__result-tag { border-color: CanvasText; } ${p} .pagefind-ui__loading { border: 1px solid GrayText; color: GrayText; } /* The drawn bars in GrayText (forced colors would drop the gradients). */ ${pre} { --_bar: GrayText; } ${pre}::before, ${pre}::after { forced-color-adjust: none; } /* As base.css's skeletons: an outline, for a page without base.css. */ .uvalib-pagefind-search__skeleton .uvalib-skeleton-text { border: 1px solid GrayText; } ${p} :is(.pagefind-ui__search-clear, .pagefind-ui__button):hover { border-color: Highlight; color: Highlight; } } `"
3162
3162
  }
3163
3163
  ],
3164
3164
  "exports": [
@@ -22364,7 +22364,7 @@
22364
22364
  "declarations": [
22365
22365
  {
22366
22366
  "kind": "class",
22367
- "description": "Sub-navigation or a table of contents, as library.virginia.edu's sub-navigation: a\n`<nav>` landmark (named by `label`, \"Contents\" by default) with the label as a visible\nheadline, and a nested list of links with dividers between the top-level entries and a bar\nbeside each nested level.\n\nGive the list as a child: an `<ol>` or `<ul>` of `<li>` elements, each with an `<a href>`\n(or plain text for a group label) and, for sub-entries, a nested `<ol>`/`<ul>`, to any\ndepth. Other children (a heading) are ignored. The list follows changes to the children.\nApps set the `items` property instead (`{ label, href?, children? }`, winning over the\nchildren while set).\n\nThe current entry gets `aria-current`: `page` for the link to this page, `location` for the\nlink to the section of it in the URL's hash. It is found from the page URL (path, and hash\nfor in-page sections), followed through same-document navigations (`hashchange`,\n`popstate` and the Navigation API), or from the `current` attribute (a URL, resolved like\nthe links). An entry whose href has a query string matches only that query (`?part=2`); one\nwithout matches the page whatever its query. Hash-only hrefs are places on that page. With\n`current` unset, a valid `aria-current` on a source link (`page`, `location` or `true`) is\nused instead, the first of each kind. `lang` and `dir` on the source links and items, and\ninline markup in their text (`em`, `cite`, `code`, `abbr`…, copied element by element,\nnever as HTML), are kept.\n\nOn narrow screens the list collapses into a disclosure: the headline becomes a button with\n`aria-expanded`, and the list starts closed (as the Electronic Text Collections' Contents\ndoes on phones, so the text comes first) until the reader opens it, or while the `open`\nattribute is set; opening it shows the current entry. Narrow means the viewport\n(`collapse-below`, 64rem by default), not the element's own width: a contents sidebar is\nalways far narrower than 64rem, so a container query could not tell a phone from a\ndesktop. `sticky` keeps it in view in a sidebar on wide\nscreens; a list longer than the window then scrolls, and the current entry is scrolled\ninto view inside it (never the page).\n\nA table of contents for a long document: `headings-from=\"#article\"` builds the list from the\nheadings in that element (`levels`, `2-3` by default; nothing shown below `min` top-level\nentries, 2 by default). Headings without text or hidden with `aria-hidden` are skipped;\none without an id gets one from its text (`budget-report`, then `budget-report-2`), and\nexisting ids are kept, so links to sections keep working. It follows headings added,\nremoved or retitled; `refresh()` reads them again after other changes. The children and\n`items` win while they give a list. Without JavaScript there is no list: a list rendered\nat build time, as children, works everywhere.\n\nSingle-page apps: the list is drawn from copies of the children, so a router's own click\nhandlers on them do not run. Listen for `uvalib-contents-navigate` and cancel it to route in\nplace; hash links need nothing.",
22367
+ "description": "Sub-navigation or a table of contents, as library.virginia.edu's sub-navigation: a\n`<nav>` landmark (named by `label`, \"Contents\" by default) with the label as a visible\nheadline, and a nested list of links with dividers between the top-level entries and a bar\nbeside each nested level.\n\nGive the list as a child: an `<ol>` or `<ul>` of `<li>` elements, each with an `<a href>`\n(or plain text for a group label) and, for sub-entries, a nested `<ol>`/`<ul>`, to any\ndepth. Other children (a heading) are ignored. The list follows changes to the children.\nApps set the `items` property instead (`{ label, href?, children? }`, winning over the\nchildren while set).\n\nThe current entry gets `aria-current`: `page` for the link to this page, `location` for the\nlink to the section of it in the URL's hash. It is found from the page URL (path, and hash\nfor in-page sections), followed through same-document navigations (`hashchange`,\n`popstate` and the Navigation API), or from the `current` attribute (a URL, resolved like\nthe links). An entry whose href has a query string matches only that query (`?part=2`); one\nwithout matches the page whatever its query. Hash-only hrefs are places on that page. With\n`current` unset, a valid `aria-current` on a source link (`page`, `location` or `true`) is\nused instead, the first of each kind. `lang` and `dir` on the source links and items, and\ninline markup in their text (`em`, `cite`, `code`, `abbr`…, copied element by element,\nnever as HTML), are kept.\n\nOn narrow screens the list collapses into a disclosure: the headline becomes a button with\n`aria-expanded`, and the list starts closed (as the Electronic Text Collections' Contents\ndoes on phones, so the text comes first) until the reader opens it, or while the `open`\nattribute is set; opening it shows the current entry. Narrow means the viewport\n(`collapse-below`, 64rem by default), not the element's own width: a contents sidebar is\nalways far narrower than 64rem, so a container query could not tell a phone from a\ndesktop. `sticky` keeps it in view in a sidebar on wide\nscreens; a list longer than the window then scrolls, and the current entry is scrolled\ninto view inside it (never the page).\n\nA table of contents for a long document: `headings-from=\"#article\"` builds the list from the\nheadings in that element (`levels`, `2-3` by default; nothing shown below `min` top-level\nentries, 2 by default). Headings without text or hidden with `aria-hidden` are skipped;\none without an id gets one from its text (`budget-report`, then `budget-report-2`), and\nexisting ids are kept, so links to sections keep working. It follows headings added,\nremoved or retitled; `refresh()` reads them again after other changes. The children and\n`items` win while they give a list. Without JavaScript there is no list: a list rendered\nat build time, as children, works everywhere.\n\nA very long contents (a text with hundreds of sections, each its own page) can show only\npart of the list, with a link to the whole. `full-href` adds that link after the list: not\nan entry but a call to action (bold, underlined, with an arrow), its text `full-label`\n(\"Full contents\") followed by the count when `total` (the entries in the full contents) is\nset: \"Full contents (243 sections)\" (`noun`, \"sections\" by default; `singular` for one). A\nstatic site writes only the entries near the current one (with their parents) and sets\nthese. `window=\"12\"` does it in the browser when the whole list is given: only the current\nentry and the 12 before and after it in document order (25 entries, shifted at either end)\nare shown, with their parents so the nesting still makes sense; the others are hidden, not\nremoved, and a gap between the entries shown is marked with an ellipsis (hidden from\nassistive technology). It follows the current entry, and applies to `items` and\n`headings-from` too. Without `full-href`, a \"Show all 243 sections\" button shows the rest in\nplace (\"Show fewer\" goes back). While part of the list is shown, a visually hidden line\nbefore it says so (\"Showing 25 of 243 sections.\"); the headline and the landmark keep the\nvisible label as their name. On narrow screens the link and the button are inside the\ndisclosure.\n\nSingle-page apps: the list is drawn from copies of the children, so a router's own click\nhandlers on them do not run. Listen for `uvalib-contents-navigate` and cancel it to route in\nplace; hash links need nothing.",
22368
22368
  "name": "UvalibContents",
22369
22369
  "cssProperties": [
22370
22370
  {
@@ -22413,6 +22413,10 @@
22413
22413
  "description": "Dark-mode role token: the nested levels' bar (else `--uva-brand-orange`).",
22414
22414
  "name": "--uva-color-current"
22415
22415
  },
22416
+ {
22417
+ "description": "Dark-mode role token: the ellipsis between the entries a window shows (else #4f4f4f).",
22418
+ "name": "--uva-color-text-muted"
22419
+ },
22416
22420
  {
22417
22421
  "description": "Dark-mode role token: dividers (else #dadada).",
22418
22422
  "name": "--uva-color-border"
@@ -22529,6 +22533,73 @@
22529
22533
  "text": "number"
22530
22534
  }
22531
22535
  },
22536
+ {
22537
+ "kind": "field",
22538
+ "name": "fullHref",
22539
+ "type": {
22540
+ "text": "string | undefined"
22541
+ },
22542
+ "description": "The URL of the full contents, when the list is only part of it: a \"Full contents\" link\nafter the list (`full-label`, with the count from `total`).",
22543
+ "attribute": "full-href"
22544
+ },
22545
+ {
22546
+ "kind": "field",
22547
+ "name": "fullLabel",
22548
+ "default": "'Full contents'",
22549
+ "description": "The full-contents link's text, before the count: \"Full contents\" by default.",
22550
+ "attribute": "full-label",
22551
+ "type": {
22552
+ "text": "string"
22553
+ }
22554
+ },
22555
+ {
22556
+ "kind": "field",
22557
+ "name": "total",
22558
+ "type": {
22559
+ "text": "number | undefined"
22560
+ },
22561
+ "description": "How many entries the full contents has, for the link (\"Full contents (243 sections)\") and\nthe screen-reader line (\"Showing 25 of 243 sections.\"). With `window`, the whole list's\ncount when unset.",
22562
+ "attribute": "total"
22563
+ },
22564
+ {
22565
+ "kind": "field",
22566
+ "name": "noun",
22567
+ "default": "'sections'",
22568
+ "description": "What the entries are, plural, in the counts: \"sections\" by default.",
22569
+ "attribute": "noun",
22570
+ "type": {
22571
+ "text": "string"
22572
+ }
22573
+ },
22574
+ {
22575
+ "kind": "field",
22576
+ "name": "singular",
22577
+ "type": {
22578
+ "text": "string"
22579
+ },
22580
+ "default": "''",
22581
+ "description": "What an entry is, singular, for a count of one. Default: \"section\" for the default `noun`, else `noun`.",
22582
+ "attribute": "singular"
22583
+ },
22584
+ {
22585
+ "kind": "field",
22586
+ "name": "windowSize",
22587
+ "type": {
22588
+ "text": "number | undefined"
22589
+ },
22590
+ "description": "Show only the current entry and this many before and after it in document order (and\ntheir parents); the others are hidden. Unset or blank: every entry.",
22591
+ "attribute": "window"
22592
+ },
22593
+ {
22594
+ "kind": "field",
22595
+ "name": "expanded",
22596
+ "type": {
22597
+ "text": "boolean"
22598
+ },
22599
+ "privacy": "private",
22600
+ "default": "false",
22601
+ "description": "Whether \"Show all\" was pressed (a window without `full-href`)."
22602
+ },
22532
22603
  {
22533
22604
  "kind": "field",
22534
22605
  "name": "headingItems",
@@ -22633,6 +22704,16 @@
22633
22704
  },
22634
22705
  "privacy": "private"
22635
22706
  },
22707
+ {
22708
+ "kind": "field",
22709
+ "name": "hasMore",
22710
+ "type": {
22711
+ "text": "boolean"
22712
+ },
22713
+ "privacy": "private",
22714
+ "default": "false",
22715
+ "description": "Whether the last render drew the full-contents link or the window's button."
22716
+ },
22636
22717
  {
22637
22718
  "kind": "field",
22638
22719
  "name": "scrolledTo",
@@ -22886,6 +22967,70 @@
22886
22967
  "privacy": "private",
22887
22968
  "readonly": true
22888
22969
  },
22970
+ {
22971
+ "kind": "method",
22972
+ "name": "word",
22973
+ "privacy": "private",
22974
+ "return": {
22975
+ "type": {
22976
+ "text": "string"
22977
+ }
22978
+ },
22979
+ "parameters": [
22980
+ {
22981
+ "name": "n",
22982
+ "type": {
22983
+ "text": "number"
22984
+ }
22985
+ }
22986
+ ],
22987
+ "description": "The noun for `n` entries."
22988
+ },
22989
+ {
22990
+ "kind": "field",
22991
+ "name": "fullLink",
22992
+ "type": {
22993
+ "text": "string | undefined"
22994
+ },
22995
+ "privacy": "private",
22996
+ "description": "The safe `full-href`, or undefined (unset, blank, or not http(s), mailto, tel or relative).",
22997
+ "readonly": true
22998
+ },
22999
+ {
23000
+ "kind": "method",
23001
+ "name": "windowOf",
23002
+ "privacy": "private",
23003
+ "return": {
23004
+ "type": {
23005
+ "text": "Set<Entry> | undefined"
23006
+ }
23007
+ },
23008
+ "parameters": [
23009
+ {
23010
+ "name": "entries",
23011
+ "type": {
23012
+ "text": "Entry[]"
23013
+ }
23014
+ },
23015
+ {
23016
+ "name": "current",
23017
+ "type": {
23018
+ "text": "Map<Entry, Current>"
23019
+ }
23020
+ }
23021
+ ],
23022
+ "description": "With `window`: the entries shown (the current one, `window` before and after it in\ndocument order, shifted at either end, and their parents), or undefined when every entry\nshows. The current entry is the section's (`location`), else the page's; with none, the\nwindow starts at the top."
23023
+ },
23024
+ {
23025
+ "kind": "method",
23026
+ "name": "showAll",
23027
+ "privacy": "private",
23028
+ "return": {
23029
+ "type": {
23030
+ "text": "void"
23031
+ }
23032
+ }
23033
+ },
22889
23034
  {
22890
23035
  "kind": "method",
22891
23036
  "name": "toggle",
@@ -22953,9 +23098,112 @@
22953
23098
  "type": {
22954
23099
  "text": "number"
22955
23100
  }
23101
+ },
23102
+ {
23103
+ "name": "shown",
23104
+ "optional": true,
23105
+ "type": {
23106
+ "text": "Set<Entry>"
23107
+ }
23108
+ }
23109
+ ]
23110
+ },
23111
+ {
23112
+ "kind": "method",
23113
+ "name": "renderEntry",
23114
+ "privacy": "private",
23115
+ "return": {
23116
+ "type": {
23117
+ "text": "TemplateResult"
23118
+ }
23119
+ },
23120
+ "parameters": [
23121
+ {
23122
+ "name": "e",
23123
+ "type": {
23124
+ "text": "Entry"
23125
+ }
23126
+ },
23127
+ {
23128
+ "name": "current",
23129
+ "type": {
23130
+ "text": "Map<Entry, Current>"
23131
+ }
23132
+ },
23133
+ {
23134
+ "name": "level",
23135
+ "type": {
23136
+ "text": "number"
23137
+ }
23138
+ },
23139
+ {
23140
+ "name": "out",
23141
+ "type": {
23142
+ "text": "boolean"
23143
+ }
23144
+ },
23145
+ {
23146
+ "name": "shown",
23147
+ "optional": true,
23148
+ "type": {
23149
+ "text": "Set<Entry>"
23150
+ }
22956
23151
  }
22957
23152
  ]
22958
23153
  },
23154
+ {
23155
+ "kind": "method",
23156
+ "name": "size",
23157
+ "privacy": "private",
23158
+ "static": true,
23159
+ "return": {
23160
+ "type": {
23161
+ "text": "number"
23162
+ }
23163
+ },
23164
+ "parameters": [
23165
+ {
23166
+ "name": "entries",
23167
+ "type": {
23168
+ "text": "Entry[]"
23169
+ }
23170
+ },
23171
+ {
23172
+ "name": "shown",
23173
+ "optional": true,
23174
+ "type": {
23175
+ "text": "Set<Entry>"
23176
+ }
23177
+ }
23178
+ ],
23179
+ "description": "The count of entries shown (all, or the window's)."
23180
+ },
23181
+ {
23182
+ "kind": "method",
23183
+ "name": "renderMore",
23184
+ "privacy": "private",
23185
+ "parameters": [
23186
+ {
23187
+ "name": "entries",
23188
+ "type": {
23189
+ "text": "Entry[]"
23190
+ }
23191
+ },
23192
+ {
23193
+ "name": "shown",
23194
+ "type": {
23195
+ "text": "Set<Entry> | undefined"
23196
+ }
23197
+ },
23198
+ {
23199
+ "name": "collapsed",
23200
+ "type": {
23201
+ "text": "boolean"
23202
+ }
23203
+ }
23204
+ ],
23205
+ "description": "After the list: the full-contents link, or a window's Show all / Show fewer button; and\nthe visually hidden line before the list that says it is partial."
23206
+ },
22959
23207
  {
22960
23208
  "kind": "field",
22961
23209
  "name": "hostColorScheme",
@@ -23088,11 +23336,11 @@
23088
23336
  ],
23089
23337
  "events": [
23090
23338
  {
23091
- "description": "For `<site-analytics>`: a click on an entry, `['uvalib-contents', 'link-click', 'level <N>', <N>]` (N from 1, the top level), and opening or closing the disclosure, `['uvalib-contents', 'toggle', 'open' | 'close']`; never the label or URL. Bubbles and is composed.",
23339
+ "description": "For `<site-analytics>`: a click on an entry, `['uvalib-contents', 'link-click', 'level <N>', <N>]` (N from 1, the top level), on the full-contents link, `['uvalib-contents', 'full-contents-click']`, opening or closing the disclosure, `['uvalib-contents', 'toggle', 'open' | 'close']`, and the window's button, `['uvalib-contents', 'show-all' | 'show-fewer']`; never the label or URL. Bubbles and is composed.",
23092
23340
  "name": "uvalib-analytics-event"
23093
23341
  },
23094
23342
  {
23095
- "description": "A plain click on an entry: `detail` is `{ href, level }` (href as written). Cancel it (`preventDefault()`) to navigate in the app; the click's default is then prevented. Bubbles and is composed.",
23343
+ "description": "A plain click on an entry or the full-contents link: `detail` is `{ href, level }` (href as written; level 0 for the full-contents link). Cancel it (`preventDefault()`) to navigate in the app; the click's default is then prevented. Bubbles and is composed.",
23096
23344
  "name": "uvalib-contents-navigate"
23097
23345
  }
23098
23346
  ],
@@ -23161,6 +23409,51 @@
23161
23409
  "description": "With `headings-from`: the fewest top-level entries worth a list (default 2). With fewer,\nnothing is shown.",
23162
23410
  "fieldName": "min"
23163
23411
  },
23412
+ {
23413
+ "name": "full-href",
23414
+ "type": {
23415
+ "text": "string | undefined"
23416
+ },
23417
+ "description": "The URL of the full contents, when the list is only part of it: a \"Full contents\" link\nafter the list (`full-label`, with the count from `total`).",
23418
+ "fieldName": "fullHref"
23419
+ },
23420
+ {
23421
+ "name": "full-label",
23422
+ "default": "DEFAULT_FULL_LABEL",
23423
+ "description": "The full-contents link's text, before the count: \"Full contents\" by default.",
23424
+ "fieldName": "fullLabel"
23425
+ },
23426
+ {
23427
+ "name": "total",
23428
+ "type": {
23429
+ "text": "number | undefined"
23430
+ },
23431
+ "description": "How many entries the full contents has, for the link (\"Full contents (243 sections)\") and\nthe screen-reader line (\"Showing 25 of 243 sections.\"). With `window`, the whole list's\ncount when unset.",
23432
+ "fieldName": "total"
23433
+ },
23434
+ {
23435
+ "name": "noun",
23436
+ "default": "DEFAULT_NOUN",
23437
+ "description": "What the entries are, plural, in the counts: \"sections\" by default.",
23438
+ "fieldName": "noun"
23439
+ },
23440
+ {
23441
+ "name": "singular",
23442
+ "type": {
23443
+ "text": "string"
23444
+ },
23445
+ "default": "''",
23446
+ "description": "What an entry is, singular, for a count of one. Default: \"section\" for the default `noun`, else `noun`.",
23447
+ "fieldName": "singular"
23448
+ },
23449
+ {
23450
+ "name": "window",
23451
+ "type": {
23452
+ "text": "number | undefined"
23453
+ },
23454
+ "description": "Show only the current entry and this many before and after it in document order (and\ntheir parents); the others are hidden. Unset or blank: every entry.",
23455
+ "fieldName": "windowSize"
23456
+ },
23164
23457
  {
23165
23458
  "name": "no-shadow-dom",
23166
23459
  "type": {
@@ -34884,6 +35177,11 @@
34884
35177
  "default": "10000",
34885
35178
  "description": "How long to wait for Pagefind's filter list before searching without the URL's filters."
34886
35179
  },
35180
+ {
35181
+ "kind": "variable",
35182
+ "name": "HOLD_MAX_MS",
35183
+ "description": "The longest a skeleton holds the results' space before Pagefind's own state shows."
35184
+ },
34887
35185
  {
34888
35186
  "kind": "function",
34889
35187
  "name": "withSlash",
@@ -34935,7 +35233,7 @@
34935
35233
  },
34936
35234
  {
34937
35235
  "kind": "class",
34938
- "description": "Pagefind's default search UI (`PagefindUI`, from the site's own Pagefind bundle) with the\nlibrary's defaults and the accessibility fixes that need script. Use it with pagefind.css,\nin place of Pagefind's pagefind-ui.css. It renders in light DOM, so the page's styles reach\nPagefind's markup. It loads `<bundle-path>pagefind-ui.js` unless `window.PagefindUI`\nalready exists.\n\nWhat it adds to the stock UI: a visible `<label>` for the field (the stock field is named\nonly by its title); a polite status region that announces the result count (\"12 results\nfor virginia\") once results settle (the stock message is not a live region); focus kept in\nthe field after Clear or Escape (the stock UI blurs it, dropping focus to the page) and\nmoved to the first new result after \"Load more results\"; the loading placeholders' dots\nhidden from screen readers; `?q=` read at start (and on Back and Forward) and the settled\nquery written back with `history.replaceState`, so a search can be shared; with\n`filter-params`, the named Pagefind filters read from and written to the URL the same way;\nand reports to `<site-analytics>`. The\n`ui` property is the `PagefindUI` instance (for `triggerFilters`), and `ready` resolves\nwith it. Attributes are read once, when the element is first connected.",
35236
+ "description": "Pagefind's default search UI (`PagefindUI`, from the site's own Pagefind bundle) with the\nlibrary's defaults and the accessibility fixes that need script. Use it with pagefind.css,\nin place of Pagefind's pagefind-ui.css. It renders in light DOM, so the page's styles reach\nPagefind's markup. It loads `<bundle-path>pagefind-ui.js` unless `window.PagefindUI`\nalready exists.\n\nWhat it adds to the stock UI: a visible `<label>` for the field (the stock field is named\nonly by its title); a polite status region that announces the result count (\"12 results\nfor virginia\") once results settle (the stock message is not a live region); focus kept in\nthe field after Clear or Escape (the stock UI blurs it, dropping focus to the page) and\nmoved to the first new result after \"Load more results\"; the loading placeholders' dots\nhidden from screen readers; `?q=` read at start (and on Back and Forward) and the settled\nquery written back with `history.replaceState`, so a search can be shared; with\n`filter-params`, the named Pagefind filters read from and written to the URL the same way;\nand reports to `<site-analytics>`. While a search from the URL loads, it can hold the page\nstill (issue #37): with `searching` set in the page's HTML when the URL has a query, the\nelement holds a screen's height from first paint, and placeholder results (aria-hidden) stand\nin for Pagefind's until they, or \"no results\", are drawn; the element then still reaches the\nbottom of the window until the visitor uses the search, so a short list does not pull the\nfooter up. It does the same on Back and Forward to a new query. The\n`ui` property is the `PagefindUI` instance (for `triggerFilters`), and `ready` resolves\nwith it. Attributes are read once, when the element is first connected.",
34939
35237
  "name": "UvalibPagefindSearch",
34940
35238
  "members": [
34941
35239
  {
@@ -35066,6 +35364,41 @@
35066
35364
  "privacy": "private",
35067
35365
  "description": "Resolves once Pagefind has drawn its filter checkboxes (set only while waiting for them)."
35068
35366
  },
35367
+ {
35368
+ "kind": "field",
35369
+ "name": "skeleton",
35370
+ "type": {
35371
+ "text": "HTMLElement | undefined"
35372
+ },
35373
+ "privacy": "private",
35374
+ "description": "The placeholder results, while a search from the URL loads."
35375
+ },
35376
+ {
35377
+ "kind": "field",
35378
+ "name": "heldList",
35379
+ "type": {
35380
+ "text": "Element | null | undefined"
35381
+ },
35382
+ "privacy": "private",
35383
+ "description": "The results list when the hold began (Pagefind draws a new one for the new results)."
35384
+ },
35385
+ {
35386
+ "kind": "field",
35387
+ "name": "holdTimer",
35388
+ "type": {
35389
+ "text": "ReturnType<typeof setTimeout> | undefined"
35390
+ },
35391
+ "privacy": "private"
35392
+ },
35393
+ {
35394
+ "kind": "field",
35395
+ "name": "ownMinSize",
35396
+ "type": {
35397
+ "text": "string | undefined"
35398
+ },
35399
+ "privacy": "private",
35400
+ "description": "The page's own inline min-block-size, while the element keeps the fold after a hold."
35401
+ },
35069
35402
  {
35070
35403
  "kind": "method",
35071
35404
  "name": "newReady",
@@ -35253,6 +35586,45 @@
35253
35586
  },
35254
35587
  "description": "Back and Forward: search for the URL's query, or clear the field when it has none."
35255
35588
  },
35589
+ {
35590
+ "kind": "method",
35591
+ "name": "hold",
35592
+ "privacy": "private",
35593
+ "return": {
35594
+ "type": {
35595
+ "text": "void"
35596
+ }
35597
+ },
35598
+ "description": "Show placeholder results in place of Pagefind's until the new results are drawn."
35599
+ },
35600
+ {
35601
+ "kind": "method",
35602
+ "name": "release",
35603
+ "privacy": "private",
35604
+ "return": {
35605
+ "type": {
35606
+ "text": "void"
35607
+ }
35608
+ },
35609
+ "parameters": [
35610
+ {
35611
+ "name": "keepFold",
35612
+ "default": "false"
35613
+ }
35614
+ ],
35615
+ "description": "Drop the placeholders and show Pagefind's results area again. With `keepFold` (the results\nare drawn), the element keeps reaching the bottom of the window until the visitor uses the\nsearch, so a short list does not pull the footer up into view (a layout shift)."
35616
+ },
35617
+ {
35618
+ "kind": "method",
35619
+ "name": "unkeep",
35620
+ "privacy": "private",
35621
+ "return": {
35622
+ "type": {
35623
+ "text": "void"
35624
+ }
35625
+ },
35626
+ "description": "Let go of the fold kept after a hold (the page's own inline min-block-size, if any, back)."
35627
+ },
35256
35628
  {
35257
35629
  "kind": "method",
35258
35630
  "name": "listen",
@@ -35496,6 +35868,20 @@
35496
35868
  "name": "query-param",
35497
35869
  "default": "q"
35498
35870
  },
35871
+ {
35872
+ "type": {
35873
+ "text": "boolean"
35874
+ },
35875
+ "description": "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.",
35876
+ "name": "searching"
35877
+ },
35878
+ {
35879
+ "type": {
35880
+ "text": "boolean"
35881
+ },
35882
+ "description": "Never hold space or show placeholder results (`searching` is ignored).",
35883
+ "name": "no-skeleton"
35884
+ },
35499
35885
  {
35500
35886
  "type": {
35501
35887
  "text": "string"
@@ -35548,6 +35934,14 @@
35548
35934
  "module": "src/components/uvalib-pagefind-search/UvalibPagefindSearch.ts"
35549
35935
  }
35550
35936
  },
35937
+ {
35938
+ "kind": "js",
35939
+ "name": "HOLD_MAX_MS",
35940
+ "declaration": {
35941
+ "name": "HOLD_MAX_MS",
35942
+ "module": "src/components/uvalib-pagefind-search/UvalibPagefindSearch.ts"
35943
+ }
35944
+ },
35551
35945
  {
35552
35946
  "kind": "js",
35553
35947
  "name": "withSlash",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.10.0",
2
+ "version": "1.11.0",
3
3
  "elements": {
4
4
  "site-page": "site-page.js",
5
5
  "site-header": "site-header.js",