@uvalib/web-components 1.8.0 → 1.8.4
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.
- package/CHANGELOG.md +35 -0
- package/README.md +26 -3
- package/dist/base.css +157 -1
- package/dist/components/site-main-nav/SiteMainNav.d.ts +1 -1
- package/dist/components/site-main-nav/SiteMainNav.js +9 -2
- package/dist/components/site-main-nav/SiteMainNav.js.map +1 -1
- package/dist/components/site-page/SitePage.d.ts +1 -1
- package/dist/components/site-page/SitePage.js +3 -2
- package/dist/components/site-page/SitePage.js.map +1 -1
- package/dist/components/site-style/SiteStyle.d.ts +1 -1
- package/dist/components/site-style/SiteStyle.js +3 -2
- package/dist/components/site-style/SiteStyle.js.map +1 -1
- package/dist/custom-elements.json +27 -5
- package/dist/pagefind.css +8 -1
- package/dist/styles/base.js +82 -2
- package/dist/styles/base.js.map +1 -1
- package/dist/styles/font-fallback.d.ts +17 -0
- package/dist/styles/font-fallback.js +64 -0
- package/dist/styles/font-fallback.js.map +1 -0
- package/dist/styles/pagefind.js +8 -1
- package/dist/styles/pagefind.js.map +1 -1
- package/dist/styles/tokens.js +1 -1
- package/dist/tokens.css +47 -1
- package/dist-cdn/base.css +157 -1
- package/dist-cdn/chunks/{base-BI8h0Gf3.js → base-DfLI8lpa.js} +119 -8
- package/dist-cdn/chunks/base-DfLI8lpa.js.map +1 -0
- package/dist-cdn/chunks/{site-header-DYRMpdBj.js → site-header-CEmNtmk5.js} +2 -2
- package/dist-cdn/chunks/{site-header-DYRMpdBj.js.map → site-header-CEmNtmk5.js.map} +1 -1
- package/dist-cdn/chunks/{site-main-nav-DURrQMal.js → site-main-nav-CAwKq_x5.js} +9 -2
- package/dist-cdn/chunks/site-main-nav-CAwKq_x5.js.map +1 -0
- package/dist-cdn/custom-elements.json +27 -5
- package/dist-cdn/manifest.json +1 -1
- package/dist-cdn/pagefind.css +8 -1
- package/dist-cdn/site-header.js +1 -1
- package/dist-cdn/site-main-nav.js +1 -1
- package/dist-cdn/site-page.js +50 -46
- package/dist-cdn/site-page.js.map +1 -1
- package/dist-cdn/site-style.js +6 -6
- package/dist-cdn/site-style.js.map +1 -1
- package/dist-cdn/skills/uvalib-web-components/SKILL.md +2 -2
- package/dist-cdn/skills/uvalib-web-components/reference/components.md +3 -3
- package/dist-cdn/tokens.css +47 -1
- package/package.json +1 -1
- package/skills/uvalib-web-components/SKILL.md +2 -2
- package/skills/uvalib-web-components/reference/components.md +3 -3
- package/dist-cdn/chunks/base-BI8h0Gf3.js.map +0 -1
- package/dist-cdn/chunks/site-main-nav-DURrQMal.js.map +0 -1
|
@@ -2764,7 +2764,7 @@
|
|
|
2764
2764
|
{
|
|
2765
2765
|
"kind": "variable",
|
|
2766
2766
|
"name": "base",
|
|
2767
|
-
"default": "css` *, *::before, *::after { box-sizing: border-box; } html, body { font-family: var(--uva-font-family, franklin-gothic-urw, 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 ):not(:defined)[hidden], :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] { display: none; } /* 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; } /* 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 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; } } /* 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; } } `"
|
|
2767
|
+
"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 ):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; } /* 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 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; } } /* 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; } } `"
|
|
2768
2768
|
}
|
|
2769
2769
|
],
|
|
2770
2770
|
"exports": [
|
|
@@ -2844,6 +2844,28 @@
|
|
|
2844
2844
|
}
|
|
2845
2845
|
]
|
|
2846
2846
|
},
|
|
2847
|
+
{
|
|
2848
|
+
"kind": "javascript-module",
|
|
2849
|
+
"path": "src/styles/font-fallback.ts",
|
|
2850
|
+
"declarations": [
|
|
2851
|
+
{
|
|
2852
|
+
"kind": "variable",
|
|
2853
|
+
"name": "fontFallback",
|
|
2854
|
+
"default": "css` @font-face { font-family: 'UVA Franklin Fallback'; src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'); font-weight: 100 450; font-style: normal; size-adjust: 94.52%; ascent-override: 100.93%; descent-override: 26.56%; line-gap-override: 0%; } @font-face { font-family: 'UVA Franklin Fallback'; src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'); font-weight: 451 599; font-style: normal; size-adjust: 95.99%; ascent-override: 99.18%; descent-override: 26.04%; line-gap-override: 0%; } @font-face { font-family: 'UVA Franklin Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold'); font-weight: 600 1000; font-style: normal; size-adjust: 91.32%; ascent-override: 104.03%; descent-override: 27.38%; line-gap-override: 0%; } @font-face { font-family: 'UVA Franklin Fallback'; src: local('Arial Italic'), local('Arial-ItalicMT'), local('Liberation Sans Italic'), local('LiberationSans-Italic'); font-weight: 100 599; font-style: italic; size-adjust: 95.06%; ascent-override: 101.09%; descent-override: 26.4%; line-gap-override: 0%; } `",
|
|
2855
|
+
"description": "A metric-matched fallback for Franklin Gothic URW (issue #32). The Adobe Fonts kit uses\n`font-display: auto`, so on a slow connection text is drawn in the next font of\n`--uva-font-family` and redrawn when the kit's files arrive. Plain Arial is wider than\nFranklin Gothic (by 6% regular, 9% bold), so paragraphs rewrapped and the page moved\n(layout shift). \"UVA Franklin Fallback\" is the system's Arial scaled to Franklin Gothic's\naverage widths, with its ascent and descent, for each face the kit serves (400, 500, 700 and\n400 italic; a 600 rule gets the 700 face, as the kit's own matching does). Measured against\nthe kit in Chromium: the fallback wraps a paragraph like Franklin Gothic in about 99% of\nwidths from 260 to 700px at 16 to 20px, against 55 to 82% for plain Arial.\n\n`size-adjust` scales Arial's glyphs; the overrides are Franklin Gothic's ascent (0.95 em) and\ndescent (0.25 em) divided by that scale, with no line gap, so a line is as tall in both.\nLiberation Sans (Linux) has Arial's metrics. Where neither is installed (Android has Roboto),\nthe face is skipped and the next font in the stack is used, as before."
|
|
2856
|
+
}
|
|
2857
|
+
],
|
|
2858
|
+
"exports": [
|
|
2859
|
+
{
|
|
2860
|
+
"kind": "js",
|
|
2861
|
+
"name": "fontFallback",
|
|
2862
|
+
"declaration": {
|
|
2863
|
+
"name": "fontFallback",
|
|
2864
|
+
"module": "src/styles/font-fallback.ts"
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
]
|
|
2868
|
+
},
|
|
2847
2869
|
{
|
|
2848
2870
|
"kind": "javascript-module",
|
|
2849
2871
|
"path": "src/styles/hidden.ts",
|
|
@@ -2971,7 +2993,7 @@
|
|
|
2971
2993
|
{
|
|
2972
2994
|
"kind": "variable",
|
|
2973
2995
|
"name": "tokens",
|
|
2974
|
-
"default": "css` :root { --uva-brand-blue-lightest: #87B9D9; --uva-brand-blue-lighter: #3395D4; --uva-brand-blue-light: #0370B7; --uva-brand-blue-base: #232D4B; --uva-brand-blue-300: #87B9D9; --uva-brand-blue-200: #3395D4; --uva-brand-blue-100: #0370B7; --uva-brand-blue: #232D4B; --uva-brand-orange-lightest: #FFEAD6; --uva-brand-orange-lighter: #FFC999; --uva-brand-orange-light: #FFB370; --uva-brand-orange-base: #E57200; --uva-brand-orange-dark: #B35900; --uva-brand-orange-darker: #854200; --uva-brand-orange-300: #FFEAD6; --uva-brand-orange-200: #FFC999; --uva-brand-orange-100: #FFB370; --uva-brand-orange: #E57200; --uva-brand-orange-A: #B35900; --uva-brand-orange-B: #854200; --uva-blue-alt-lightest: #BFE7F7; --uva-blue-alt-lighter: #91D8F2; --uva-blue-alt-light: #55C4EC; --uva-blue-alt-base: #007BAC; --uva-blue-alt-dark: #005679; --uva-blue-alt-darkest: #141E3C; --uva-blue-alt-400: #e6f2f7; --uva-blue-alt-300: #BFE7F7; --uva-blue-alt-200: #91D8F2; --uva-blue-alt-100: #55C4EC; --uva-blue-alt: #007BAC; --uva-blue-alt-A: #005679; --uva-blue-alt-B: #141E3C; --uva-teal-lightest: #C8F2F4; --uva-teal-light: #5BD7DE; --uva-teal-base: #25CAD3; --uva-teal-dark: #1DA1A8; --uva-teal-darker: #16777C; --uva-teal-200: #C8F2F4; --uva-teal-100: #5BD7DE; --uva-teal: #25CAD3; --uva-teal-A: #1DA1A8; --uva-teal-B: #16777C; --uva-green-lightest: #DDEFDC; --uva-green-lighter: #89CC74; --uva-green-base: #62BB46; --uva-green-dark: #4E9737; --uva-green-200: #DDEFDC; --uva-green-100: #89CC74; --uva-green: #62BB46; --uva-green-A: #4E9737; --uva-red-lightest: #FBCFDA; --uva-red-base: #EF3F6B; --uva-red-dark: #DF1E43; --uva-red-darker: #B30000; --uva-red-100: #FBCFDA; --uva-red: #EF3F6B; --uva-red-A: #DF1E43; --uva-red-B: #B30000; --uva-yellow-lightest: #FEF6C8; --uva-yellow-base: #ECC602; --uva-yellow-dark: #B99C02; --uva-yellow-100: #FEF6C8; --uva-yellow: #ECC602; --uva-yellow-A: #B99C02; --uva-grey-lightest: #F1F1F1; --uva-grey-light: #DADADA; --uva-grey-base: #808080; --uva-grey-dark: #4F4F4F; --uva-grey-darkest: #2B2B2B; --uva-grey-200: #F1F1F1; --uva-grey-100: #DADADA; --uva-grey-50: #ADADAD; --uva-grey: #808080; --uva-grey-A: #4F4F4F; --uva-grey-B: #2B2B2B; --uva-font-family: franklin-gothic-urw, Arial, Helvetica, sans-serif; --uva-font-size-base: 17px; } `"
|
|
2996
|
+
"default": "css` :root { --uva-brand-blue-lightest: #87B9D9; --uva-brand-blue-lighter: #3395D4; --uva-brand-blue-light: #0370B7; --uva-brand-blue-base: #232D4B; --uva-brand-blue-300: #87B9D9; --uva-brand-blue-200: #3395D4; --uva-brand-blue-100: #0370B7; --uva-brand-blue: #232D4B; --uva-brand-orange-lightest: #FFEAD6; --uva-brand-orange-lighter: #FFC999; --uva-brand-orange-light: #FFB370; --uva-brand-orange-base: #E57200; --uva-brand-orange-dark: #B35900; --uva-brand-orange-darker: #854200; --uva-brand-orange-300: #FFEAD6; --uva-brand-orange-200: #FFC999; --uva-brand-orange-100: #FFB370; --uva-brand-orange: #E57200; --uva-brand-orange-A: #B35900; --uva-brand-orange-B: #854200; --uva-blue-alt-lightest: #BFE7F7; --uva-blue-alt-lighter: #91D8F2; --uva-blue-alt-light: #55C4EC; --uva-blue-alt-base: #007BAC; --uva-blue-alt-dark: #005679; --uva-blue-alt-darkest: #141E3C; --uva-blue-alt-400: #e6f2f7; --uva-blue-alt-300: #BFE7F7; --uva-blue-alt-200: #91D8F2; --uva-blue-alt-100: #55C4EC; --uva-blue-alt: #007BAC; --uva-blue-alt-A: #005679; --uva-blue-alt-B: #141E3C; --uva-teal-lightest: #C8F2F4; --uva-teal-light: #5BD7DE; --uva-teal-base: #25CAD3; --uva-teal-dark: #1DA1A8; --uva-teal-darker: #16777C; --uva-teal-200: #C8F2F4; --uva-teal-100: #5BD7DE; --uva-teal: #25CAD3; --uva-teal-A: #1DA1A8; --uva-teal-B: #16777C; --uva-green-lightest: #DDEFDC; --uva-green-lighter: #89CC74; --uva-green-base: #62BB46; --uva-green-dark: #4E9737; --uva-green-200: #DDEFDC; --uva-green-100: #89CC74; --uva-green: #62BB46; --uva-green-A: #4E9737; --uva-red-lightest: #FBCFDA; --uva-red-base: #EF3F6B; --uva-red-dark: #DF1E43; --uva-red-darker: #B30000; --uva-red-100: #FBCFDA; --uva-red: #EF3F6B; --uva-red-A: #DF1E43; --uva-red-B: #B30000; --uva-yellow-lightest: #FEF6C8; --uva-yellow-base: #ECC602; --uva-yellow-dark: #B99C02; --uva-yellow-100: #FEF6C8; --uva-yellow: #ECC602; --uva-yellow-A: #B99C02; --uva-grey-lightest: #F1F1F1; --uva-grey-light: #DADADA; --uva-grey-base: #808080; --uva-grey-dark: #4F4F4F; --uva-grey-darkest: #2B2B2B; --uva-grey-200: #F1F1F1; --uva-grey-100: #DADADA; --uva-grey-50: #ADADAD; --uva-grey: #808080; --uva-grey-A: #4F4F4F; --uva-grey-B: #2B2B2B; --uva-font-family: franklin-gothic-urw, \"UVA Franklin Fallback\", Arial, Helvetica, sans-serif; --uva-font-size-base: 17px; } `"
|
|
2975
2997
|
}
|
|
2976
2998
|
],
|
|
2977
2999
|
"exports": [
|
|
@@ -14282,7 +14304,7 @@
|
|
|
14282
14304
|
{
|
|
14283
14305
|
"description": "Font family.",
|
|
14284
14306
|
"name": "--uva-font-family",
|
|
14285
|
-
"default": "franklin-gothic-urw, Arial, Helvetica, sans-serif"
|
|
14307
|
+
"default": "franklin-gothic-urw, \"UVA Franklin Fallback\", Arial, Helvetica, sans-serif"
|
|
14286
14308
|
},
|
|
14287
14309
|
{
|
|
14288
14310
|
"description": "Dark-mode role token: top-level button text (else `--uva-grey-darkest`).",
|
|
@@ -15272,7 +15294,7 @@
|
|
|
15272
15294
|
{
|
|
15273
15295
|
"description": "Page font family (global styles).",
|
|
15274
15296
|
"name": "--uva-font-family",
|
|
15275
|
-
"default": "franklin-gothic-urw, Arial, Helvetica, sans-serif"
|
|
15297
|
+
"default": "franklin-gothic-urw, \"UVA Franklin Fallback\", Arial, Helvetica, sans-serif"
|
|
15276
15298
|
},
|
|
15277
15299
|
{
|
|
15278
15300
|
"description": "Page base font size (global styles).",
|
|
@@ -16184,7 +16206,7 @@
|
|
|
16184
16206
|
{
|
|
16185
16207
|
"description": "Font family.",
|
|
16186
16208
|
"name": "--uva-font-family",
|
|
16187
|
-
"default": "franklin-gothic-urw, Arial, Helvetica, sans-serif"
|
|
16209
|
+
"default": "franklin-gothic-urw, \"UVA Franklin Fallback\", Arial, Helvetica, sans-serif"
|
|
16188
16210
|
},
|
|
16189
16211
|
{
|
|
16190
16212
|
"description": "Base font size.",
|
package/dist-cdn/manifest.json
CHANGED
package/dist-cdn/pagefind.css
CHANGED
|
@@ -38,7 +38,14 @@
|
|
|
38
38
|
--pagefind-ui-border-radius: 5px;
|
|
39
39
|
--pagefind-ui-image-border-radius: 5px;
|
|
40
40
|
--pagefind-ui-image-box-ratio: 3 / 2;
|
|
41
|
-
--pagefind-ui-font: var(
|
|
41
|
+
--pagefind-ui-font: var(
|
|
42
|
+
--uva-font-family,
|
|
43
|
+
franklin-gothic-urw,
|
|
44
|
+
'UVA Franklin Fallback',
|
|
45
|
+
Arial,
|
|
46
|
+
Helvetica,
|
|
47
|
+
sans-serif
|
|
48
|
+
);
|
|
42
49
|
}
|
|
43
50
|
|
|
44
51
|
.pagefind-ui {
|
package/dist-cdn/site-header.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./chunks/site-header-
|
|
1
|
+
import "./chunks/site-header-CEmNtmk5.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./chunks/site-main-nav-
|
|
1
|
+
import "./chunks/site-main-nav-CAwKq_x5.js";
|
package/dist-cdn/site-page.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { a as e, f as t, i as n, l as r, m as i, n as a, o, r as s, t as c } from "./chunks/UvalibElement-pGONDAwB.js";
|
|
2
|
-
import { i as l } from "./chunks/site-main-nav-
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { a as
|
|
7
|
-
import { r as
|
|
8
|
-
import { a as
|
|
2
|
+
import { i as l } from "./chunks/site-main-nav-CAwKq_x5.js";
|
|
3
|
+
import { i as u, n as d, r as f, t as p } from "./chunks/base-DfLI8lpa.js";
|
|
4
|
+
import { t as m } from "./chunks/accessible-DJv7YOtS.js";
|
|
5
|
+
import { t as h } from "./chunks/site-header-CEmNtmk5.js";
|
|
6
|
+
import { a as g } from "./chunks/analytics-DTTihuBD.js";
|
|
7
|
+
import { r as _ } from "./chunks/analytics-state-Ce8DKe4F.js";
|
|
8
|
+
import { a as v, i as y, r as b, t as x } from "./chunks/alerts-C5vkeb-f.js";
|
|
9
9
|
// src/components/site-page/SitePage.ts
|
|
10
|
-
var
|
|
10
|
+
var S = "site-alerts", C = "Library alerts", w = (e) => e instanceof Element ? e.getAttribute("slot") : null, T = class extends c {
|
|
11
11
|
constructor(...e) {
|
|
12
|
-
super(...e), this.rootLinkDomain = "https://www.library.virginia.edu", this.headerVariant = "full", this.noGlobalStyles = !1, this.noFooter = !1, this.printChrome = !1, this.noMainNav = !1, this.alertsEnv = "production", this.noAlerts = !1, this.colorSchemeSwitch = !1, this.scheme = new
|
|
13
|
-
this.hasBreadcrumbs = [...this.children].some((e) =>
|
|
12
|
+
super(...e), this.rootLinkDomain = "https://www.library.virginia.edu", this.headerVariant = "full", this.noGlobalStyles = !1, this.noFooter = !1, this.printChrome = !1, this.noMainNav = !1, this.alertsEnv = "production", this.noAlerts = !1, this.colorSchemeSwitch = !1, this.scheme = new h(this, () => this.colorSchemeSwitch, () => this.noStyle, !1), this.chrome = /* @__PURE__ */ new WeakSet(), this.globalsInstalled = !1, this.alertsUrl = x, this.alertsUiRequested = !1, this.listShown = !1, this.hasBreadcrumbs = !1, this.syncHasBreadcrumbs = () => {
|
|
13
|
+
this.hasBreadcrumbs = [...this.children].some((e) => w(e) === "breadcrumbs");
|
|
14
14
|
}, this.syncPrintSource = () => {
|
|
15
15
|
let e = this.renderRoot.querySelector(this.lightDom ? ":scope > main" : "main");
|
|
16
16
|
if (!e) return;
|
|
@@ -22,7 +22,7 @@ var x = "site-alerts", S = "Library alerts", C = (e) => e instanceof Element ? e
|
|
|
22
22
|
this.hostColorScheme = !1;
|
|
23
23
|
}
|
|
24
24
|
static {
|
|
25
|
-
this.styles = [
|
|
25
|
+
this.styles = [m, t`
|
|
26
26
|
:host {
|
|
27
27
|
display: block;
|
|
28
28
|
}
|
|
@@ -131,16 +131,20 @@ var x = "site-alerts", S = "Library alerts", C = (e) => e instanceof Element ? e
|
|
|
131
131
|
super.disconnectedCallback(), this.observer?.disconnect(), this.breadcrumbsObserver?.disconnect(), this.ownerDocument.defaultView?.removeEventListener("beforeprint", this.syncPrintSource);
|
|
132
132
|
}
|
|
133
133
|
installGlobalStyles(e) {
|
|
134
|
-
if (s("uvalib-tokens", [
|
|
134
|
+
if (s("uvalib-tokens", [f], {
|
|
135
135
|
root: e,
|
|
136
136
|
scope: !1
|
|
137
|
-
}), s("uvalib-global", [
|
|
137
|
+
}), s("uvalib-global", [
|
|
138
|
+
u,
|
|
139
|
+
d,
|
|
140
|
+
m
|
|
141
|
+
], {
|
|
138
142
|
root: e,
|
|
139
143
|
scope: !1,
|
|
140
144
|
layer: !1
|
|
141
145
|
}), !e.head.querySelector("link[href=\"https://use.typekit.net/oym8nvz.css\"]")) {
|
|
142
146
|
let t = e.createElement("link");
|
|
143
|
-
t.rel = "stylesheet", t.href =
|
|
147
|
+
t.rel = "stylesheet", t.href = p, e.head.append(t);
|
|
144
148
|
}
|
|
145
149
|
}
|
|
146
150
|
onListChange(e) {
|
|
@@ -149,21 +153,21 @@ var x = "site-alerts", S = "Library alerts", C = (e) => e instanceof Element ? e
|
|
|
149
153
|
this.listShown = typeof t == "number" && t > 0;
|
|
150
154
|
}
|
|
151
155
|
willUpdate(e) {
|
|
152
|
-
e.has("colorSchemeSwitch") && this.scheme.sync(), e.has("noAlerts") && this.noAlerts && (this.listShown = !1), e.has("alertsEnv") && this.alertsEnv && !
|
|
156
|
+
e.has("colorSchemeSwitch") && this.scheme.sync(), e.has("noAlerts") && this.noAlerts && (this.listShown = !1), e.has("alertsEnv") && this.alertsEnv && !y(this.alertsEnv) && console.warn(`${this.localName}: unknown alerts-env "${this.alertsEnv}"; using production. Valid values: production, staging.`);
|
|
153
157
|
try {
|
|
154
|
-
this.alertsUrl =
|
|
158
|
+
this.alertsUrl = b(this.alertsEnv, this.alertsSrc, this.ownerDocument.baseURI);
|
|
155
159
|
} catch {
|
|
156
|
-
e.has("alertsSrc") && console.warn(`${this.localName}: alerts-src "${this.alertsSrc}" is not a URL; ignoring it.`), this.alertsUrl =
|
|
160
|
+
e.has("alertsSrc") && console.warn(`${this.localName}: alerts-src "${this.alertsSrc}" is not a URL; ignoring it.`), this.alertsUrl = b(this.alertsEnv, null, this.ownerDocument.baseURI);
|
|
157
161
|
}
|
|
158
162
|
}
|
|
159
163
|
updated() {
|
|
160
|
-
this.lightDom && this.syncLightAlerts(), this.syncPrintSource(), this.noAlerts || (
|
|
164
|
+
this.lightDom && this.syncLightAlerts(), this.syncPrintSource(), this.noAlerts || (v(this.ownerDocument, this.alertsUrl), this.defineAlerts()), this.syncAnalytics();
|
|
161
165
|
}
|
|
162
166
|
loadAlertsUi() {
|
|
163
167
|
return import("./site-alerts.js");
|
|
164
168
|
}
|
|
165
169
|
defineAlerts() {
|
|
166
|
-
this.alertsUiRequested || customElements.get(
|
|
170
|
+
this.alertsUiRequested || customElements.get(S) || (this.alertsUiRequested = !0, this.loadAlertsUi().catch((e) => console.error(`${this.localName}: failed to load site-alerts`, e)));
|
|
167
171
|
}
|
|
168
172
|
loadAnalytics() {
|
|
169
173
|
return import("./site-analytics.js");
|
|
@@ -178,7 +182,7 @@ var x = "site-alerts", S = "Library alerts", C = (e) => e instanceof Element ? e
|
|
|
178
182
|
if (this.ownerDocument.querySelector("site-analytics, uvalib-analytics")) return;
|
|
179
183
|
let e = this.analytics = this.ownerDocument.createElement("site-analytics");
|
|
180
184
|
if (this.chrome.add(e), !customElements.get("site-analytics")) {
|
|
181
|
-
let t =
|
|
185
|
+
let t = _(this.ownerDocument);
|
|
182
186
|
this.loadAnalytics().then(() => customElements.whenDefined("site-analytics")).then(() => e.updateComplete).then(() => t.flush(), (e) => {
|
|
183
187
|
t.drop(), console.error(`${this.localName}: failed to load site-analytics`, e);
|
|
184
188
|
});
|
|
@@ -202,14 +206,14 @@ var x = "site-alerts", S = "Library alerts", C = (e) => e instanceof Element ? e
|
|
|
202
206
|
}
|
|
203
207
|
if (!this.lightAlerts) {
|
|
204
208
|
let e = this.ownerDocument, t = (t) => {
|
|
205
|
-
let n = e.createElement(
|
|
209
|
+
let n = e.createElement(S);
|
|
206
210
|
return n.setAttribute("show", t), n.setAttribute("no-shadow-dom", ""), this.chrome.add(n), n;
|
|
207
211
|
}, n = t("header");
|
|
208
212
|
n.slot = "alerts";
|
|
209
213
|
let r = t("list");
|
|
210
214
|
r.addEventListener("site-alerts-change", (e) => this.onListChange(e));
|
|
211
215
|
let i = e.createElement("section");
|
|
212
|
-
i.className = "alerts-list", i.setAttribute("aria-label",
|
|
216
|
+
i.className = "alerts-list", i.setAttribute("aria-label", C), i.append(r), this.chrome.add(i), this.lightAlerts = {
|
|
213
217
|
top: n,
|
|
214
218
|
band: i,
|
|
215
219
|
list: r,
|
|
@@ -246,11 +250,11 @@ var x = "site-alerts", S = "Library alerts", C = (e) => e instanceof Element ? e
|
|
|
246
250
|
}
|
|
247
251
|
reslot(e) {
|
|
248
252
|
let t = this.querySelector(":scope > main"), n = this.querySelector(":scope > site-header");
|
|
249
|
-
t && n && !this.chrome.has(e) && (e.parentNode === t &&
|
|
253
|
+
t && n && !this.chrome.has(e) && (e.parentNode === t && w(e) === "breadcrumbs" ? this.placeBreadcrumbs(e, n) : e.parentNode === this && w(e) !== "breadcrumbs" && t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_PRECEDING && t.append(e));
|
|
250
254
|
}
|
|
251
255
|
placeBreadcrumbs(e, t) {
|
|
252
256
|
let n = t;
|
|
253
|
-
for (let t = n.nextSibling; t && (t === this.lightAlerts?.band ||
|
|
257
|
+
for (let t = n.nextSibling; t && (t === this.lightAlerts?.band || w(t) === "breadcrumbs"); t = n.nextSibling) {
|
|
254
258
|
if (t === e) return;
|
|
255
259
|
n = t;
|
|
256
260
|
}
|
|
@@ -260,12 +264,12 @@ var x = "site-alerts", S = "Library alerts", C = (e) => e instanceof Element ? e
|
|
|
260
264
|
let t = this.querySelector(":scope > main"), n = this.querySelector(":scope > site-header"), r = this.querySelector(":scope > site-footer");
|
|
261
265
|
if (t && n && r) for (let i of [...e]) {
|
|
262
266
|
if (i.parentNode !== this || this.chrome.has(i) || i.nodeType === Node.TEXT_NODE && !i.textContent?.trim()) continue;
|
|
263
|
-
let e =
|
|
267
|
+
let e = w(i);
|
|
264
268
|
e === "breadcrumbs" ? this.placeBreadcrumbs(i, n) : (e === "pre-footer" ? r : e === "site-links" || e === "main-nav" ? n : t).append(i);
|
|
265
269
|
}
|
|
266
270
|
}
|
|
267
271
|
onSkip(e) {
|
|
268
|
-
e.preventDefault(), this.lightDom &&
|
|
272
|
+
e.preventDefault(), this.lightDom && g(this, ["site-header", "skip-link"]), this.renderRoot.querySelector("main")?.focus();
|
|
269
273
|
}
|
|
270
274
|
render() {
|
|
271
275
|
let e = this.lightDom, t = r`<a
|
|
@@ -281,7 +285,7 @@ var x = "site-alerts", S = "Library alerts", C = (e) => e instanceof Element ? e
|
|
|
281
285
|
?no-style=${this.noStyle}
|
|
282
286
|
></site-alerts>`, a = r`<section
|
|
283
287
|
class="alerts-list"
|
|
284
|
-
aria-label=${
|
|
288
|
+
aria-label=${C}
|
|
285
289
|
?hidden=${!this.listShown}
|
|
286
290
|
>
|
|
287
291
|
<site-alerts
|
|
@@ -336,62 +340,62 @@ var x = "site-alerts", S = "Library alerts", C = (e) => e instanceof Element ? e
|
|
|
336
340
|
a([e({
|
|
337
341
|
type: String,
|
|
338
342
|
attribute: "root-link-domain"
|
|
339
|
-
})],
|
|
343
|
+
})], T.prototype, "rootLinkDomain", void 0), a([e({
|
|
340
344
|
type: String,
|
|
341
345
|
attribute: "header-variant"
|
|
342
|
-
})],
|
|
346
|
+
})], T.prototype, "headerVariant", void 0), a([e({
|
|
343
347
|
type: Boolean,
|
|
344
348
|
attribute: "no-global-styles"
|
|
345
|
-
})],
|
|
349
|
+
})], T.prototype, "noGlobalStyles", void 0), a([e({
|
|
346
350
|
type: Boolean,
|
|
347
351
|
attribute: "no-footer",
|
|
348
352
|
reflect: !0
|
|
349
|
-
})],
|
|
353
|
+
})], T.prototype, "noFooter", void 0), a([e({
|
|
350
354
|
type: Boolean,
|
|
351
355
|
attribute: "print-chrome",
|
|
352
356
|
reflect: !0
|
|
353
|
-
})],
|
|
357
|
+
})], T.prototype, "printChrome", void 0), a([e({
|
|
354
358
|
type: String,
|
|
355
359
|
attribute: "site-links-label"
|
|
356
|
-
})],
|
|
360
|
+
})], T.prototype, "siteLinksLabel", void 0), a([e({
|
|
357
361
|
type: String,
|
|
358
362
|
attribute: "site-name"
|
|
359
|
-
})],
|
|
363
|
+
})], T.prototype, "siteName", void 0), a([e({
|
|
360
364
|
type: String,
|
|
361
365
|
attribute: "site-name-href"
|
|
362
|
-
})],
|
|
366
|
+
})], T.prototype, "siteNameHref", void 0), a([e({
|
|
363
367
|
type: Boolean,
|
|
364
368
|
attribute: "no-main-nav"
|
|
365
|
-
})],
|
|
369
|
+
})], T.prototype, "noMainNav", void 0), a([e({
|
|
366
370
|
type: String,
|
|
367
371
|
attribute: "main-nav-label"
|
|
368
|
-
})],
|
|
372
|
+
})], T.prototype, "mainNavLabel", void 0), a([e({
|
|
369
373
|
type: String,
|
|
370
374
|
attribute: "main-nav-src"
|
|
371
|
-
})],
|
|
375
|
+
})], T.prototype, "mainNavSrc", void 0), a([e({
|
|
372
376
|
type: String,
|
|
373
377
|
attribute: "main-nav-current"
|
|
374
|
-
})],
|
|
378
|
+
})], T.prototype, "mainNavCurrent", void 0), a([e({
|
|
375
379
|
type: String,
|
|
376
380
|
attribute: "alerts-env"
|
|
377
|
-
})],
|
|
381
|
+
})], T.prototype, "alertsEnv", void 0), a([e({
|
|
378
382
|
type: String,
|
|
379
383
|
attribute: "alerts-src"
|
|
380
|
-
})],
|
|
384
|
+
})], T.prototype, "alertsSrc", void 0), a([e({
|
|
381
385
|
type: Boolean,
|
|
382
386
|
attribute: "no-alerts"
|
|
383
|
-
})],
|
|
387
|
+
})], T.prototype, "noAlerts", void 0), a([e({
|
|
384
388
|
type: Boolean,
|
|
385
389
|
attribute: "color-scheme-switch"
|
|
386
|
-
})],
|
|
390
|
+
})], T.prototype, "colorSchemeSwitch", void 0), a([e({
|
|
387
391
|
type: Number,
|
|
388
392
|
attribute: "matomo-id"
|
|
389
|
-
})],
|
|
393
|
+
})], T.prototype, "matomoId", void 0), a([e({
|
|
390
394
|
type: String,
|
|
391
395
|
attribute: "matomo-url"
|
|
392
|
-
})],
|
|
396
|
+
})], T.prototype, "matomoUrl", void 0), a([e({
|
|
393
397
|
type: String,
|
|
394
398
|
attribute: "matomo-downloads"
|
|
395
|
-
})],
|
|
399
|
+
})], T.prototype, "matomoDownloads", void 0), a([n()], T.prototype, "listShown", void 0), a([n()], T.prototype, "hasBreadcrumbs", void 0), import("./site-footer.js").catch((e) => console.error("site-page: failed to load site-footer", e)), i("site-page", T);
|
|
396
400
|
|
|
397
401
|
//# sourceMappingURL=site-page.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-page.js","names":["ifDefined","nothing","_decorate","property","state","n","i","r","b","define","__decorate","installLightDomStyles","UvalibElement","o","base","tokens","TYPEKIT_URL","accessible","ColorSchemeController","trackEvent","bufferAnalytics","loadAlerts","isAlertsEnv","alertsBase","ALERTS_PRODUCTION_SRC","ALERTS_UI","ALERTS_LIST_LABEL","slotOf","SitePage","_args","c","main","doc","name","value","link","count","changed","err","id","a","buffer","header","make","show","top","list","band","regional","content","records","el","ref","next","footer","nodes","slot","light","skip","alerts","alert","A"],"sources":["../src/components/site-page/SitePage.ts","../src/components/site-page/site-page.ts"],"sourcesContent":["import { html, css, nothing, type PropertyValues } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { property, state } from 'lit/decorators.js';\nimport { UvalibElement } from '../../base/UvalibElement.js';\nimport { installLightDomStyles } from '../../base/light-dom-styles.js';\nimport { tokens } from '../../styles/tokens.js';\nimport { base, TYPEKIT_URL } from '../../styles/base.js';\nimport { accessible } from '../../styles/accessible.js';\nimport { ColorSchemeController } from '../../base/color-scheme.js';\nimport { trackEvent } from '../../base/analytics.js';\nimport { bufferAnalytics } from '../../base/analytics-state.js';\nimport {\n ALERTS_PRODUCTION_SRC,\n alertsBase,\n isAlertsEnv,\n loadAlerts,\n} from '../site-alerts/alerts.js';\n\nexport { ALERTS_PRODUCTION_SRC, ALERTS_STAGING_SRC } from '../site-alerts/alerts.js';\nexport type { AlertsEnv } from '../site-alerts/alerts.js';\n\n/** The `<site-alerts>` elements' `show` values: header banner, alert list, regional alerts. */\ntype AlertShow = 'header' | 'list' | 'regional';\nconst ALERTS_UI = 'site-alerts';\n/** Accessible name of the list band region. */\nconst ALERTS_LIST_LABEL = 'Library alerts';\n\nconst slotOf = (n: Node): string | null => (n instanceof Element ? n.getAttribute('slot') : null);\n\n/**\n * Page wrapper: skip link (inside the header landmark in shadow mode), header, a single `<main>`, footer (unless `no-footer`), and global page styles.\n * Side-effect free: `site-page.ts` registers `<site-header>` (and its `<site-main-nav>`) and `<site-footer>`.\n *\n * The header shows the UVA Library main navigation by default (`no-main-nav` turns it off;\n * `header-variant=\"vendor\"` never shows it).\n *\n * Shows live UVA Library alerts by default with `<site-alerts>` (its code loads only then),\n * placed as Virgo places them: a full-bleed `<site-alerts show=\"header\">` banner at the top\n * of the header landmark (after the skip link), a full-bleed band between the header and\n * `<main>` holding `<site-alerts show=\"list\">` (a `<section aria-label=\"Library alerts\">`\n * region, hidden while the list has nothing to show), and `<site-alerts show=\"regional\">` as\n * the first child of `<main>`, inside its padding. Their data comes from one headless\n * `<uvalib-alerts>`, loaded once per document, with a module script, from the alerts CDN\n * (`alerts-env`, or `alerts-src`); if it fails to load, one console warning is logged and\n * the page works as before. `no-alerts` renders no alert elements and loads nothing.\n *\n * A `slot=\"breadcrumbs\"` child (a `<uvalib-breadcrumbs>`) is placed where library.virginia.edu\n * puts the trail: after the header and the alert list band, before `<main>` and outside it (so\n * the skip link lands past it), with the same gutters as `<main>`.\n *\n * Printing leaves out the chrome: the skip link, header (with the main navigation and the\n * header alert), alert list band, regional alerts, breadcrumbs, pre-footer and footer are not\n * printed, `<main>` loses its gutters, and the content prints black on white (a dark scheme\n * prints light), its links underlined. A short line above the content says where the page\n * came from (\"UVA Library — <site name or page title>\" and the page's URL). `print-chrome`\n * prints the page as it is shown instead. With `no-style` none of this applies.\n *\n * @tagname site-page\n * @slot - Main page content, rendered inside the single `<main>`.\n * @slot breadcrumbs - Optional breadcrumb trail (a `<uvalib-breadcrumbs>`), shown between the header (and alert list band) and `<main>`. In light mode it is moved there, never into `<main>`.\n * @slot pre-footer - Optional content shown in a band above the footer.\n * @slot site-links - Optional `<a href>` elements, forwarded to `<site-header>`, that replace the library utility links in the header (inline nav and Menu popover). Ignored with `header-variant=\"vendor\"`.\n * @slot main-nav - Optional `<nav>` forwarded to `<site-header>`, whose list replaces the UVA Library main navigation's links (see `<site-main-nav>`). Ignored with `no-main-nav` and `header-variant=\"vendor\"`.\n * @csspart main - The `<main>` landmark.\n * @csspart header - The `<header>` element inside `<site-header>` (shadow mode; exported through `exportparts`).\n * @csspart footer - The `<footer>` element inside `<site-footer>` (shadow mode; exported through `exportparts`).\n * @cssprop [--uva-brand-blue=#232d4b] - Skip link background.\n * @cssprop [--uva-brand-orange=#e57200] - Focus ring colour (focus-visible outline).\n * @cssprop [--uva-font-family=franklin-gothic-urw, Arial, Helvetica, sans-serif] - Page font family (global styles).\n * @cssprop [--uva-font-size-base=17px] - Page base font size (global styles).\n * @cssprop [--uva-grey-darkest=#2b2b2b] - Page text colour (global styles).\n * @cssprop --uva-color-surface - Dark-mode role token: page background (global styles; else none).\n * @cssprop --uva-color-text - Dark-mode role token: page text (global styles; else `--uva-grey-darkest`).\n * @cssprop --uva-color-accent-bg - Dark-mode role token: skip-link background (else `--uva-brand-blue`).\n * @cssprop --uva-color-on-accent - Dark-mode role token: skip-link text (else #fff).\n * @cssprop --uva-color-focus - Dark-mode role token: focus ring (else `--uva-brand-orange`).\n */\nexport class SitePage extends UvalibElement {\n /** The page's content keeps the page's own colour scheme. */\n protected static override hostColorScheme = false;\n @property({ type: String, attribute: 'root-link-domain' }) rootLinkDomain =\n 'https://www.library.virginia.edu';\n @property({ type: String, attribute: 'header-variant' }) headerVariant: 'full' | 'vendor' =\n 'full';\n @property({ type: Boolean, attribute: 'no-global-styles' }) noGlobalStyles = false;\n /**\n * Hide the footer (and any pre-footer band), for tools and app-like pages where the site\n * footer does not belong. The footer is kept hidden rather than removed, so toggling the\n * attribute keeps pre-footer content.\n */\n @property({ type: Boolean, attribute: 'no-footer', reflect: true }) noFooter = false;\n /**\n * Print the header, alerts, breadcrumbs and footer too. By default printing leaves them out\n * and prints only `<main>`, black on white.\n */\n @property({ type: Boolean, attribute: 'print-chrome', reflect: true }) printChrome = false;\n /** Accessible name of the header navigation when site links are given (default \"Site\"). */\n @property({ type: String, attribute: 'site-links-label' }) siteLinksLabel?: string;\n /** The sub-site's name, forwarded to `<site-header site-name>`: shown after the logo as a link to the site's home. */\n @property({ type: String, attribute: 'site-name' }) siteName?: string;\n /** Where the site name links, forwarded to `<site-header site-name-href>` (default `/`). */\n @property({ type: String, attribute: 'site-name-href' }) siteNameHref?: string;\n /** Hide the UVA Library main navigation in the header. */\n @property({ type: Boolean, attribute: 'no-main-nav' }) noMainNav = false;\n /** Accessible name of the header's main navigation (default \"Main\"). */\n @property({ type: String, attribute: 'main-nav-label' }) mainNavLabel?: string;\n /** URL of JSON main navigation items, forwarded to `<site-header main-nav-src>`. */\n @property({ type: String, attribute: 'main-nav-src' }) mainNavSrc?: string;\n /**\n * The URL whose main-navigation link is marked current, forwarded to `<site-header\n * main-nav-current>`. Default: the page location, followed through same-document\n * navigations; set it when a single-page app's route is not its URL.\n */\n @property({ type: String, attribute: 'main-nav-current' }) mainNavCurrent?: string;\n /**\n * Alerts environment: `production` (default) or `staging`. Any other value logs one\n * console warning and uses production. Ignored when `alerts-src` is set.\n */\n @property({ type: String, attribute: 'alerts-env' }) alertsEnv = 'production';\n /**\n * Alerts base URL (holding `config.json`, `alerts.json` and `v1/uvalib-alerts.js`); overrides\n * `alerts-env`. For a custom domain, local development and tests.\n */\n @property({ type: String, attribute: 'alerts-src' }) alertsSrc?: string;\n /** Render no alert elements and load no alerts script. */\n @property({ type: Boolean, attribute: 'no-alerts' }) noAlerts = false;\n /**\n * Opt in to dark mode, forwarded to `<site-header color-scheme-switch>`: the page follows\n * the OS preference, and a Light / Dark / System control in the header lets the visitor\n * override it (remembered per site). Off by default: the page is always light. The page's\n * own content must support it (see the README's \"Dark mode\").\n */\n @property({ type: Boolean, attribute: 'color-scheme-switch' }) colorSchemeSwitch = false;\n /**\n * Opt in to Matomo analytics: the site's Matomo id. The page then adds one\n * `<site-analytics>` for it (loading its code only then), which records the page view and\n * what the library's components report (see the README's \"Analytics\"). Off by default. With\n * an analytics element or a Matomo snippet already on the page nothing is counted twice.\n */\n @property({ type: Number, attribute: 'matomo-id' }) matomoId?: number;\n /** The Matomo server for `matomo-id`, ending in `/` (default: the library's). */\n @property({ type: String, attribute: 'matomo-url' }) matomoUrl?: string;\n /**\n * `event`: the `<site-analytics downloads=\"event\">` option for `matomo-id`, counting\n * downloads as `['download', '<extension>']` events without their URLs.\n */\n @property({ type: String, attribute: 'matomo-downloads' }) matomoDownloads?: string;\n\n /**\n * Sets the stored scheme on <html> as soon as the page connects, before the header renders,\n * so pages without the inline snippet flash as little as possible; without the switch it\n * removes a stray attribute. It renders nothing itself.\n */\n private readonly scheme = new ColorSchemeController(\n this,\n () => this.colorSchemeSwitch,\n () => this.noStyle,\n false,\n );\n\n static styles = [\n accessible,\n css`\n :host {\n display: block;\n }\n site-header,\n site-footer,\n main {\n display: block;\n width: 100%;\n }\n site-footer[hidden] {\n display: none;\n }\n /* Virgo's alert list: a full-bleed band flush under the header, above main's padding. */\n .alerts-list {\n display: block;\n width: 100%;\n margin: 0;\n padding: 0;\n }\n .alerts-list[hidden] {\n display: none;\n }\n .alerts-list > site-alerts {\n display: block;\n }\n /* The breadcrumb trail lines up with main's content (same max width and side padding). */\n ::slotted([slot='breadcrumbs']) {\n display: block;\n box-sizing: border-box;\n max-width: 1600px;\n margin: 0 auto;\n padding: 16px 40px 0;\n }\n /* An empty or hidden trail takes no space. */\n ::slotted([slot='breadcrumbs']:is([hidden], [data-empty])) {\n display: none;\n }\n /* Light mode (this stylesheet is rewritten to \\`site-page > …\\` there). */\n :host > [slot='breadcrumbs']:is([hidden], [data-empty]) {\n display: none;\n }\n :host > [slot='breadcrumbs'] {\n display: block;\n box-sizing: border-box;\n max-width: 1600px;\n margin: 0 auto;\n padding: 16px 40px 0;\n }\n /* Old layout: .main-container-inner (max 1600px, centred) > .w3-row-padding 8px\n > .w3-col 8px > .d8-fade 24px = 40px each side; 12px margin + 24px padding below. */\n main {\n box-sizing: border-box;\n max-width: 1600px;\n margin: 0 auto;\n padding: 36px 40px;\n }\n @media screen and (min-width: 993px) {\n main {\n padding-top: 24px; /* old: .breadcrumb-found dropped its 12px top margin */\n }\n }\n /* Print (issue #20): only <main>, black on white, unless print-chrome. In shadow mode\n the breadcrumbs slot is hidden, which hides what is assigned to it; in light mode\n (rewritten to site-page …) the trail is a direct child. The pre-footer is in the\n footer. The base styles underline the content's links and print a dark scheme light. */\n @media print {\n :host(:not([print-chrome])) {\n color: #000;\n background: #fff;\n }\n :host(:not([print-chrome])) :is(site-header, site-footer, .alerts-list, .skip-link),\n :host(:not([print-chrome])) main > site-alerts,\n :host(:not([print-chrome])) slot[name='breadcrumbs'],\n :host(:not([print-chrome])) > [slot='breadcrumbs'] {\n display: none;\n }\n :host(:not([print-chrome])) main {\n max-width: none;\n padding: 0;\n }\n /* Where the page came from: a line above the content, from --uvalib-print-source\n (set on <main>: \"UVA Library — <site name or title> <URL>\"). Print only, so never\n read out on screen. */\n :host(:not([print-chrome])) main::before {\n content: var(--uvalib-print-source, none);\n display: block;\n margin: 0 0 1rem;\n padding: 0 0 0.25rem;\n border-bottom: 1px solid #000;\n color: #000;\n font-size: 0.875rem;\n overflow-wrap: anywhere;\n }\n }\n `,\n ];\n\n /** Light mode: nodes this element rendered itself (incl. Lit markers), never routed. */\n private chrome = new WeakSet<Node>();\n private observer?: MutationObserver;\n private globalsInstalled = false;\n /** The alerts base URL in use, from `alerts-src` or `alerts-env`. */\n private alertsUrl = ALERTS_PRODUCTION_SRC;\n /** Light mode: the alert elements this element created, and the list band. */\n private lightAlerts?: {\n top: HTMLElement;\n band: HTMLElement;\n list: HTMLElement;\n regional: HTMLElement;\n };\n /** The `<site-analytics>` this element added for `matomo-id`. */\n private analytics?: HTMLElement;\n /** Whether this element asked for `<site-alerts>`' code. */\n private alertsUiRequested = false;\n /** Whether the list alerts have anything to show, from their last update event. */\n @state() private listShown = false;\n /**\n * Shadow mode: whether a `slot=\"breadcrumbs\"` child exists, so the slot is rendered only\n * then and the page without breadcrumbs renders exactly what it did before them.\n */\n @state() private hasBreadcrumbs = false;\n private breadcrumbsObserver?: MutationObserver;\n\n private syncHasBreadcrumbs = (): void => {\n this.hasBreadcrumbs = [...this.children].some((c) => slotOf(c) === 'breadcrumbs');\n };\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (!this.lightDom) {\n this.syncHasBreadcrumbs();\n this.breadcrumbsObserver ??= new MutationObserver(this.syncHasBreadcrumbs);\n this.breadcrumbsObserver.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n this.ownerDocument.defaultView?.addEventListener('beforeprint', this.syncPrintSource);\n if (!this.noGlobalStyles && !this.globalsInstalled) {\n this.globalsInstalled = true;\n this.installGlobalStyles(this.ownerDocument);\n }\n // Reconnect after a disconnect; the first connect starts routing in update().\n if (this.lightDom && this.hasUpdated) {\n this.route(this.childNodes);\n this.observe();\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.observer?.disconnect();\n this.breadcrumbsObserver?.disconnect();\n this.ownerDocument.defaultView?.removeEventListener('beforeprint', this.syncPrintSource);\n }\n\n /**\n * The printed \"where from\" line, as a CSS string on <main> (`--uvalib-print-source`), read\n * by the print styles. Set on each update and again just before printing, so a single-page\n * app prints its current title and URL.\n */\n private syncPrintSource = (): void => {\n const main = this.renderRoot.querySelector<HTMLElement>(\n this.lightDom ? ':scope > main' : 'main',\n );\n if (!main) return;\n const doc = this.ownerDocument;\n const name = (this.siteName || doc.title || '').trim();\n const text = `UVA Library${name ? ` — ${name}` : ''} ${doc.defaultView?.location.href ?? ''}`;\n const value = `\"${text\n .trim()\n .replace(/[\\\\\"]/g, '\\\\$&')\n .replace(/[\\n\\r\\f]/g, ' ')}\"`;\n if (main.style.getPropertyValue('--uvalib-print-source') !== value)\n main.style.setProperty('--uvalib-print-source', value);\n };\n\n private installGlobalStyles(doc: Document): void {\n // Tokens stay layered so a host's own `:root { --uva-*: … }` wins; base and accessibility\n // rules are unlayered so they beat host resets.\n installLightDomStyles('uvalib-tokens', [tokens], { root: doc, scope: false });\n installLightDomStyles('uvalib-global', [base, accessible], {\n root: doc,\n scope: false,\n layer: false,\n });\n if (!doc.head.querySelector(`link[href=\"${TYPEKIT_URL}\"]`)) {\n const link = doc.createElement('link');\n link.rel = 'stylesheet';\n link.href = TYPEKIT_URL;\n doc.head.append(link);\n }\n }\n\n /** The list element's `site-alerts-change`: show the band only while it lists alerts. */\n private onListChange(e: Event): void {\n if (e.target !== e.currentTarget) return;\n const count = (e as CustomEvent<{ count?: unknown }>).detail?.count;\n this.listShown = typeof count === 'number' && count > 0;\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n if (changed.has('colorSchemeSwitch')) this.scheme.sync();\n if (changed.has('noAlerts') && this.noAlerts) this.listShown = false;\n if (changed.has('alertsEnv') && this.alertsEnv && !isAlertsEnv(this.alertsEnv)) {\n console.warn(\n `${this.localName}: unknown alerts-env \"${this.alertsEnv}\"; using production. Valid values: production, staging.`,\n );\n }\n try {\n this.alertsUrl = alertsBase(this.alertsEnv, this.alertsSrc, this.ownerDocument.baseURI);\n } catch {\n if (changed.has('alertsSrc')) {\n console.warn(\n `${this.localName}: alerts-src \"${this.alertsSrc}\" is not a URL; ignoring it.`,\n );\n }\n this.alertsUrl = alertsBase(this.alertsEnv, null, this.ownerDocument.baseURI);\n }\n }\n\n protected override updated(): void {\n if (this.lightDom) this.syncLightAlerts();\n this.syncPrintSource();\n if (!this.noAlerts) {\n // The alerts script starts loading at once, alongside <site-alerts>' own code.\n loadAlerts(this.ownerDocument, this.alertsUrl);\n this.defineAlerts();\n }\n this.syncAnalytics();\n }\n\n /** Loads `<site-alerts>` (and registers it) on first use of the alerts. */\n protected loadAlertsUi(): Promise<unknown> {\n return import('../site-alerts/site-alerts.js');\n }\n\n private defineAlerts(): void {\n if (this.alertsUiRequested || customElements.get(ALERTS_UI)) return;\n this.alertsUiRequested = true;\n this.loadAlertsUi().catch((err) =>\n console.error(`${this.localName}: failed to load site-alerts`, err),\n );\n }\n\n /** Loads `<site-analytics>` (and registers it) on first use of `matomo-id`. */\n protected loadAnalytics(): Promise<unknown> {\n return import('../site-analytics/site-analytics.js');\n }\n\n /**\n * `matomo-id`: one `<site-analytics>`, at the very start of the render root, before Lit's\n * markers, so no render ever clears it and (being chrome) light DOM routing never moves it.\n * The element's own one-tracker guard keeps a second element or snippet from double-counting.\n */\n private syncAnalytics(): void {\n const id = Number(this.matomoId);\n if (!(id > 0)) {\n this.analytics?.remove();\n this.analytics = undefined;\n return;\n }\n if (!this.analytics) {\n // An analytics element the page has already (say the old v0.0.12 <uvalib-analytics>,\n // which does not share the one-tracker guard) records the page: don't add a second.\n if (this.ownerDocument.querySelector('site-analytics, uvalib-analytics')) return;\n const a = (this.analytics = this.ownerDocument.createElement('site-analytics'));\n this.chrome.add(a);\n if (!customElements.get('site-analytics')) {\n // Until the code arrives nothing forwards: keep what the components report meanwhile\n // (a bento search can settle first) and hand it over once the element is running.\n const buffer = bufferAnalytics(this.ownerDocument);\n this.loadAnalytics()\n .then(() => customElements.whenDefined('site-analytics'))\n .then(() => (a as HTMLElement & { updateComplete?: Promise<unknown> }).updateComplete)\n .then(\n () => buffer.flush(),\n (err) => {\n buffer.drop();\n console.error(`${this.localName}: failed to load site-analytics`, err);\n },\n );\n }\n }\n const a = this.analytics;\n if (a.getAttribute('matomoid') !== String(id)) a.setAttribute('matomoid', String(id));\n if (this.matomoUrl) a.setAttribute('matomourl', this.matomoUrl);\n else a.removeAttribute('matomourl');\n if (this.matomoDownloads) a.setAttribute('downloads', this.matomoDownloads);\n else a.removeAttribute('downloads');\n if (a.parentNode !== this.renderRoot) this.renderRoot.prepend(a);\n }\n\n /**\n * Light mode keeps <main> free of Lit parts, so the alert elements are managed here: the\n * header one is handed to <site-header> as a `slot=\"alerts\"` child (it moves it into its\n * <header>), the list band goes right after <site-header>, and regional stays the first\n * child of <main>. The band and the elements are chrome, so route() never moves them.\n */\n private syncLightAlerts(): void {\n const main = this.querySelector(':scope > main');\n const header = this.querySelector(':scope > site-header');\n if (!main || !header) return;\n if (this.noAlerts) {\n const a = this.lightAlerts;\n for (const n of a ? [a.top, a.band, a.regional] : []) n.remove();\n this.lightAlerts = undefined;\n return;\n }\n if (!this.lightAlerts) {\n const doc = this.ownerDocument;\n const make = (show: AlertShow) => {\n const a = doc.createElement(ALERTS_UI);\n a.setAttribute('show', show);\n a.setAttribute('no-shadow-dom', '');\n this.chrome.add(a);\n return a;\n };\n const top = make('header');\n top.slot = 'alerts';\n const list = make('list');\n list.addEventListener('site-alerts-change', (e) => this.onListChange(e));\n const band = doc.createElement('section');\n band.className = 'alerts-list';\n band.setAttribute('aria-label', ALERTS_LIST_LABEL);\n band.append(list);\n this.chrome.add(band);\n this.lightAlerts = { top, band, list, regional: make('regional') };\n }\n const { top, band, list, regional } = this.lightAlerts;\n for (const a of [top, list, regional]) {\n if (a.getAttribute('alerts-src') !== this.alertsUrl)\n a.setAttribute('alerts-src', this.alertsUrl);\n a.toggleAttribute('no-style', this.noStyle);\n }\n band.hidden = !this.listShown;\n if (!header.contains(top)) header.append(top);\n // Directly after <site-header>, before any Lit marker, so no part ever clears it.\n if (header.nextSibling !== band) header.after(band);\n if (main.firstChild !== regional) main.prepend(regional);\n }\n\n protected override update(changed: PropertyValues): void {\n if (this.hasUpdated || !this.lightDom) {\n super.update(changed);\n return;\n }\n const content = [...this.childNodes];\n super.update(changed); // first render appends the chrome after the content\n for (const n of this.childNodes) if (!content.includes(n)) this.chrome.add(n);\n this.route(content);\n this.observe();\n }\n\n private observe(): void {\n this.observer ??= new MutationObserver((records) => {\n for (const r of records) {\n if (r.type === 'attributes') this.reslot(r.target as Element);\n else if (r.target === this) this.route(r.addedNodes);\n }\n });\n // One call: observing the same node again would replace these options. Children added to\n // the page are routed; a content node given slot=\"breadcrumbs\" later (or losing it) moves\n // out of (or back into) <main>.\n this.observer.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n\n /** Light mode: a top-level content node's `slot` changed to or from `breadcrumbs`. */\n private reslot(el: Element): void {\n const main = this.querySelector(':scope > main');\n const header = this.querySelector(':scope > site-header');\n if (!main || !header || this.chrome.has(el)) return;\n if (el.parentNode === main && slotOf(el) === 'breadcrumbs') this.placeBreadcrumbs(el, header);\n else if (\n el.parentNode === this &&\n slotOf(el) !== 'breadcrumbs' &&\n main.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_PRECEDING\n )\n main.append(el);\n }\n\n /**\n * Light mode: a `slot=\"breadcrumbs\"` node goes after the header, the alert list band and any\n * breadcrumbs already there, before Lit's markers (so no render clears it) and `<main>`.\n */\n private placeBreadcrumbs(n: Node, header: Element): void {\n let ref: Node = header;\n for (let next = ref.nextSibling; next; next = ref.nextSibling) {\n if (next !== this.lightAlerts?.band && slotOf(next) !== 'breadcrumbs') break;\n if (next === n) return; // already in place\n ref = next;\n }\n (ref as ChildNode).after(n);\n }\n\n /**\n * Light mode has no slots: move content into `<main>`, pre-footer nodes to the footer,\n * site links and main-nav markup to the header and breadcrumbs before `<main>`.\n */\n private route(nodes: Iterable<Node>): void {\n const main = this.querySelector(':scope > main');\n const header = this.querySelector(':scope > site-header');\n const footer = this.querySelector(':scope > site-footer');\n if (!main || !header || !footer) return;\n for (const n of [...nodes]) {\n if (n.parentNode !== this || this.chrome.has(n)) continue;\n if (n.nodeType === Node.TEXT_NODE && !n.textContent?.trim()) continue;\n // The header and footer adopt their own slotted children, even before they upgrade.\n const slot = slotOf(n);\n if (slot === 'breadcrumbs') {\n this.placeBreadcrumbs(n, header);\n continue;\n }\n const to =\n slot === 'pre-footer'\n ? footer\n : slot === 'site-links' || slot === 'main-nav'\n ? header\n : main;\n to.append(n);\n }\n }\n\n private onSkip(e: Event): void {\n e.preventDefault();\n // Shadow mode: the link is in <site-header>'s skip-link slot, and the header reports it.\n if (this.lightDom) trackEvent(this, ['site-header', 'skip-link']);\n this.renderRoot.querySelector<HTMLElement>('main')?.focus();\n }\n\n protected override render() {\n const light = this.lightDom;\n // Light mode keeps <main> and <site-footer> free of Lit parts so moved content is never cleared.\n const skip = html`<a\n class=\"skip-link\"\n href=\"#main-content\"\n slot=${ifDefined(light ? undefined : 'skip-link')}\n @click=${this.onSkip}\n >Skip to main content</a\n >`;\n // Shadow mode: the link is slotted into <site-header>'s <header> landmark, because axe\n // looks the #main-content target up on the document and cannot see it in this shadow root,\n // so it would flag a skip link that sits outside every landmark (\"region\").\n // Light mode: the link stays the first child, where the target resolves.\n const alerts = !this.noAlerts && !light;\n const alert = (show: AlertShow) =>\n html`<site-alerts\n slot=${ifDefined(show === 'header' ? 'alerts' : undefined)}\n show=${show}\n alerts-src=${this.alertsUrl}\n ?no-style=${this.noStyle}\n ></site-alerts>`;\n // Shadow mode's list band; light mode builds the same in syncLightAlerts().\n const band = html`<section\n class=\"alerts-list\"\n aria-label=${ALERTS_LIST_LABEL}\n ?hidden=${!this.listShown}\n >\n <site-alerts\n show=\"list\"\n alerts-src=${this.alertsUrl}\n ?no-style=${this.noStyle}\n @site-alerts-change=${this.onListChange}\n ></site-alerts>\n </section>`;\n return html`\n ${light ? skip : nothing}\n <site-header\n exportparts=\"header\"\n ?no-shadow-dom=${light}\n ?no-style=${this.noStyle}\n variant=${this.headerVariant}\n root-link-domain=${this.rootLinkDomain}\n site-links-label=${ifDefined(this.siteLinksLabel)}\n site-name=${ifDefined(this.siteName)}\n site-name-href=${ifDefined(this.siteNameHref)}\n ?no-main-nav=${this.noMainNav}\n main-nav-label=${ifDefined(this.mainNavLabel)}\n main-nav-src=${ifDefined(this.mainNavSrc)}\n main-nav-current=${ifDefined(this.mainNavCurrent)}\n ?color-scheme-switch=${this.colorSchemeSwitch}\n >${\n light\n ? nothing\n : html`${skip}${alerts ? alert('header') : nothing}<slot\n name=\"site-links\"\n slot=\"site-links\"\n ></slot\n ><slot name=\"main-nav\" slot=\"main-nav\"></slot>`\n }</site-header\n >\n ${alerts ? band : nothing}\n ${!light && this.hasBreadcrumbs ? html`<slot name=\"breadcrumbs\"></slot>` : nothing}\n ${\n light\n ? html`<main id=\"main-content\" tabindex=\"-1\" part=\"main\"></main>`\n : html`<main id=\"main-content\" tabindex=\"-1\" part=\"main\">\n ${alerts ? alert('regional') : nothing}<slot></slot>\n </main>`\n }\n ${\n light\n ? html`<site-footer\n no-shadow-dom\n ?hidden=${this.noFooter}\n ?no-style=${this.noStyle}\n root-link-domain=${this.rootLinkDomain}\n ></site-footer>`\n : html`<site-footer\n exportparts=\"footer\"\n ?hidden=${this.noFooter}\n ?no-style=${this.noStyle}\n root-link-domain=${this.rootLinkDomain}\n ><slot name=\"pre-footer\" slot=\"pre-footer\"></slot\n ></site-footer>`\n }\n `;\n }\n}\n","import { define } from '../../base/define.js';\nimport { SitePage } from './SitePage.js';\nimport '../site-header/site-header.js';\n// The footer sits at the bottom of the page, so it loads asynchronously.\nimport('../site-footer/site-footer.js').catch((err) =>\n console.error('site-page: failed to load site-footer', err),\n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KN1B,EAAA,CAAAE,EAAM,CAAA,GAAAwB,EAAA,WAAA,kBAAA,KAAA,CAAA,GCvRT,OAAO,mBAAgC,CAAC,OAAO,MAC7C,QAAQ,MAAM,yCAAyCU,CAAG,CAC5D,GAEA7B,EAAO,aAAamB,CAAQ"}
|
|
1
|
+
{"version":3,"file":"site-page.js","names":["ifDefined","nothing","_decorate","property","state","n","i","r","b","define","__decorate","installLightDomStyles","UvalibElement","o","fontFallback","base","tokens","TYPEKIT_URL","accessible","ColorSchemeController","trackEvent","bufferAnalytics","loadAlerts","isAlertsEnv","alertsBase","ALERTS_PRODUCTION_SRC","ALERTS_UI","ALERTS_LIST_LABEL","slotOf","SitePage","_args","c","main","doc","name","value","link","count","changed","err","id","a","buffer","header","make","show","top","list","band","regional","content","records","el","ref","next","footer","nodes","slot","light","skip","alerts","alert","A"],"sources":["../src/components/site-page/SitePage.ts","../src/components/site-page/site-page.ts"],"sourcesContent":["import { html, css, nothing, type PropertyValues } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { property, state } from 'lit/decorators.js';\nimport { UvalibElement } from '../../base/UvalibElement.js';\nimport { installLightDomStyles } from '../../base/light-dom-styles.js';\nimport { fontFallback } from '../../styles/font-fallback.js';\nimport { tokens } from '../../styles/tokens.js';\nimport { base, TYPEKIT_URL } from '../../styles/base.js';\nimport { accessible } from '../../styles/accessible.js';\nimport { ColorSchemeController } from '../../base/color-scheme.js';\nimport { trackEvent } from '../../base/analytics.js';\nimport { bufferAnalytics } from '../../base/analytics-state.js';\nimport {\n ALERTS_PRODUCTION_SRC,\n alertsBase,\n isAlertsEnv,\n loadAlerts,\n} from '../site-alerts/alerts.js';\n\nexport { ALERTS_PRODUCTION_SRC, ALERTS_STAGING_SRC } from '../site-alerts/alerts.js';\nexport type { AlertsEnv } from '../site-alerts/alerts.js';\n\n/** The `<site-alerts>` elements' `show` values: header banner, alert list, regional alerts. */\ntype AlertShow = 'header' | 'list' | 'regional';\nconst ALERTS_UI = 'site-alerts';\n/** Accessible name of the list band region. */\nconst ALERTS_LIST_LABEL = 'Library alerts';\n\nconst slotOf = (n: Node): string | null => (n instanceof Element ? n.getAttribute('slot') : null);\n\n/**\n * Page wrapper: skip link (inside the header landmark in shadow mode), header, a single `<main>`, footer (unless `no-footer`), and global page styles.\n * Side-effect free: `site-page.ts` registers `<site-header>` (and its `<site-main-nav>`) and `<site-footer>`.\n *\n * The header shows the UVA Library main navigation by default (`no-main-nav` turns it off;\n * `header-variant=\"vendor\"` never shows it).\n *\n * Shows live UVA Library alerts by default with `<site-alerts>` (its code loads only then),\n * placed as Virgo places them: a full-bleed `<site-alerts show=\"header\">` banner at the top\n * of the header landmark (after the skip link), a full-bleed band between the header and\n * `<main>` holding `<site-alerts show=\"list\">` (a `<section aria-label=\"Library alerts\">`\n * region, hidden while the list has nothing to show), and `<site-alerts show=\"regional\">` as\n * the first child of `<main>`, inside its padding. Their data comes from one headless\n * `<uvalib-alerts>`, loaded once per document, with a module script, from the alerts CDN\n * (`alerts-env`, or `alerts-src`); if it fails to load, one console warning is logged and\n * the page works as before. `no-alerts` renders no alert elements and loads nothing.\n *\n * A `slot=\"breadcrumbs\"` child (a `<uvalib-breadcrumbs>`) is placed where library.virginia.edu\n * puts the trail: after the header and the alert list band, before `<main>` and outside it (so\n * the skip link lands past it), with the same gutters as `<main>`.\n *\n * Printing leaves out the chrome: the skip link, header (with the main navigation and the\n * header alert), alert list band, regional alerts, breadcrumbs, pre-footer and footer are not\n * printed, `<main>` loses its gutters, and the content prints black on white (a dark scheme\n * prints light), its links underlined. A short line above the content says where the page\n * came from (\"UVA Library — <site name or page title>\" and the page's URL). `print-chrome`\n * prints the page as it is shown instead. With `no-style` none of this applies.\n *\n * @tagname site-page\n * @slot - Main page content, rendered inside the single `<main>`.\n * @slot breadcrumbs - Optional breadcrumb trail (a `<uvalib-breadcrumbs>`), shown between the header (and alert list band) and `<main>`. In light mode it is moved there, never into `<main>`.\n * @slot pre-footer - Optional content shown in a band above the footer.\n * @slot site-links - Optional `<a href>` elements, forwarded to `<site-header>`, that replace the library utility links in the header (inline nav and Menu popover). Ignored with `header-variant=\"vendor\"`.\n * @slot main-nav - Optional `<nav>` forwarded to `<site-header>`, whose list replaces the UVA Library main navigation's links (see `<site-main-nav>`). Ignored with `no-main-nav` and `header-variant=\"vendor\"`.\n * @csspart main - The `<main>` landmark.\n * @csspart header - The `<header>` element inside `<site-header>` (shadow mode; exported through `exportparts`).\n * @csspart footer - The `<footer>` element inside `<site-footer>` (shadow mode; exported through `exportparts`).\n * @cssprop [--uva-brand-blue=#232d4b] - Skip link background.\n * @cssprop [--uva-brand-orange=#e57200] - Focus ring colour (focus-visible outline).\n * @cssprop [--uva-font-family=franklin-gothic-urw, \"UVA Franklin Fallback\", Arial, Helvetica, sans-serif] - Page font family (global styles).\n * @cssprop [--uva-font-size-base=17px] - Page base font size (global styles).\n * @cssprop [--uva-grey-darkest=#2b2b2b] - Page text colour (global styles).\n * @cssprop --uva-color-surface - Dark-mode role token: page background (global styles; else none).\n * @cssprop --uva-color-text - Dark-mode role token: page text (global styles; else `--uva-grey-darkest`).\n * @cssprop --uva-color-accent-bg - Dark-mode role token: skip-link background (else `--uva-brand-blue`).\n * @cssprop --uva-color-on-accent - Dark-mode role token: skip-link text (else #fff).\n * @cssprop --uva-color-focus - Dark-mode role token: focus ring (else `--uva-brand-orange`).\n */\nexport class SitePage extends UvalibElement {\n /** The page's content keeps the page's own colour scheme. */\n protected static override hostColorScheme = false;\n @property({ type: String, attribute: 'root-link-domain' }) rootLinkDomain =\n 'https://www.library.virginia.edu';\n @property({ type: String, attribute: 'header-variant' }) headerVariant: 'full' | 'vendor' =\n 'full';\n @property({ type: Boolean, attribute: 'no-global-styles' }) noGlobalStyles = false;\n /**\n * Hide the footer (and any pre-footer band), for tools and app-like pages where the site\n * footer does not belong. The footer is kept hidden rather than removed, so toggling the\n * attribute keeps pre-footer content.\n */\n @property({ type: Boolean, attribute: 'no-footer', reflect: true }) noFooter = false;\n /**\n * Print the header, alerts, breadcrumbs and footer too. By default printing leaves them out\n * and prints only `<main>`, black on white.\n */\n @property({ type: Boolean, attribute: 'print-chrome', reflect: true }) printChrome = false;\n /** Accessible name of the header navigation when site links are given (default \"Site\"). */\n @property({ type: String, attribute: 'site-links-label' }) siteLinksLabel?: string;\n /** The sub-site's name, forwarded to `<site-header site-name>`: shown after the logo as a link to the site's home. */\n @property({ type: String, attribute: 'site-name' }) siteName?: string;\n /** Where the site name links, forwarded to `<site-header site-name-href>` (default `/`). */\n @property({ type: String, attribute: 'site-name-href' }) siteNameHref?: string;\n /** Hide the UVA Library main navigation in the header. */\n @property({ type: Boolean, attribute: 'no-main-nav' }) noMainNav = false;\n /** Accessible name of the header's main navigation (default \"Main\"). */\n @property({ type: String, attribute: 'main-nav-label' }) mainNavLabel?: string;\n /** URL of JSON main navigation items, forwarded to `<site-header main-nav-src>`. */\n @property({ type: String, attribute: 'main-nav-src' }) mainNavSrc?: string;\n /**\n * The URL whose main-navigation link is marked current, forwarded to `<site-header\n * main-nav-current>`. Default: the page location, followed through same-document\n * navigations; set it when a single-page app's route is not its URL.\n */\n @property({ type: String, attribute: 'main-nav-current' }) mainNavCurrent?: string;\n /**\n * Alerts environment: `production` (default) or `staging`. Any other value logs one\n * console warning and uses production. Ignored when `alerts-src` is set.\n */\n @property({ type: String, attribute: 'alerts-env' }) alertsEnv = 'production';\n /**\n * Alerts base URL (holding `config.json`, `alerts.json` and `v1/uvalib-alerts.js`); overrides\n * `alerts-env`. For a custom domain, local development and tests.\n */\n @property({ type: String, attribute: 'alerts-src' }) alertsSrc?: string;\n /** Render no alert elements and load no alerts script. */\n @property({ type: Boolean, attribute: 'no-alerts' }) noAlerts = false;\n /**\n * Opt in to dark mode, forwarded to `<site-header color-scheme-switch>`: the page follows\n * the OS preference, and a Light / Dark / System control in the header lets the visitor\n * override it (remembered per site). Off by default: the page is always light. The page's\n * own content must support it (see the README's \"Dark mode\").\n */\n @property({ type: Boolean, attribute: 'color-scheme-switch' }) colorSchemeSwitch = false;\n /**\n * Opt in to Matomo analytics: the site's Matomo id. The page then adds one\n * `<site-analytics>` for it (loading its code only then), which records the page view and\n * what the library's components report (see the README's \"Analytics\"). Off by default. With\n * an analytics element or a Matomo snippet already on the page nothing is counted twice.\n */\n @property({ type: Number, attribute: 'matomo-id' }) matomoId?: number;\n /** The Matomo server for `matomo-id`, ending in `/` (default: the library's). */\n @property({ type: String, attribute: 'matomo-url' }) matomoUrl?: string;\n /**\n * `event`: the `<site-analytics downloads=\"event\">` option for `matomo-id`, counting\n * downloads as `['download', '<extension>']` events without their URLs.\n */\n @property({ type: String, attribute: 'matomo-downloads' }) matomoDownloads?: string;\n\n /**\n * Sets the stored scheme on <html> as soon as the page connects, before the header renders,\n * so pages without the inline snippet flash as little as possible; without the switch it\n * removes a stray attribute. It renders nothing itself.\n */\n private readonly scheme = new ColorSchemeController(\n this,\n () => this.colorSchemeSwitch,\n () => this.noStyle,\n false,\n );\n\n static styles = [\n accessible,\n css`\n :host {\n display: block;\n }\n site-header,\n site-footer,\n main {\n display: block;\n width: 100%;\n }\n site-footer[hidden] {\n display: none;\n }\n /* Virgo's alert list: a full-bleed band flush under the header, above main's padding. */\n .alerts-list {\n display: block;\n width: 100%;\n margin: 0;\n padding: 0;\n }\n .alerts-list[hidden] {\n display: none;\n }\n .alerts-list > site-alerts {\n display: block;\n }\n /* The breadcrumb trail lines up with main's content (same max width and side padding). */\n ::slotted([slot='breadcrumbs']) {\n display: block;\n box-sizing: border-box;\n max-width: 1600px;\n margin: 0 auto;\n padding: 16px 40px 0;\n }\n /* An empty or hidden trail takes no space. */\n ::slotted([slot='breadcrumbs']:is([hidden], [data-empty])) {\n display: none;\n }\n /* Light mode (this stylesheet is rewritten to \\`site-page > …\\` there). */\n :host > [slot='breadcrumbs']:is([hidden], [data-empty]) {\n display: none;\n }\n :host > [slot='breadcrumbs'] {\n display: block;\n box-sizing: border-box;\n max-width: 1600px;\n margin: 0 auto;\n padding: 16px 40px 0;\n }\n /* Old layout: .main-container-inner (max 1600px, centred) > .w3-row-padding 8px\n > .w3-col 8px > .d8-fade 24px = 40px each side; 12px margin + 24px padding below. */\n main {\n box-sizing: border-box;\n max-width: 1600px;\n margin: 0 auto;\n padding: 36px 40px;\n }\n @media screen and (min-width: 993px) {\n main {\n padding-top: 24px; /* old: .breadcrumb-found dropped its 12px top margin */\n }\n }\n /* Print (issue #20): only <main>, black on white, unless print-chrome. In shadow mode\n the breadcrumbs slot is hidden, which hides what is assigned to it; in light mode\n (rewritten to site-page …) the trail is a direct child. The pre-footer is in the\n footer. The base styles underline the content's links and print a dark scheme light. */\n @media print {\n :host(:not([print-chrome])) {\n color: #000;\n background: #fff;\n }\n :host(:not([print-chrome])) :is(site-header, site-footer, .alerts-list, .skip-link),\n :host(:not([print-chrome])) main > site-alerts,\n :host(:not([print-chrome])) slot[name='breadcrumbs'],\n :host(:not([print-chrome])) > [slot='breadcrumbs'] {\n display: none;\n }\n :host(:not([print-chrome])) main {\n max-width: none;\n padding: 0;\n }\n /* Where the page came from: a line above the content, from --uvalib-print-source\n (set on <main>: \"UVA Library — <site name or title> <URL>\"). Print only, so never\n read out on screen. */\n :host(:not([print-chrome])) main::before {\n content: var(--uvalib-print-source, none);\n display: block;\n margin: 0 0 1rem;\n padding: 0 0 0.25rem;\n border-bottom: 1px solid #000;\n color: #000;\n font-size: 0.875rem;\n overflow-wrap: anywhere;\n }\n }\n `,\n ];\n\n /** Light mode: nodes this element rendered itself (incl. Lit markers), never routed. */\n private chrome = new WeakSet<Node>();\n private observer?: MutationObserver;\n private globalsInstalled = false;\n /** The alerts base URL in use, from `alerts-src` or `alerts-env`. */\n private alertsUrl = ALERTS_PRODUCTION_SRC;\n /** Light mode: the alert elements this element created, and the list band. */\n private lightAlerts?: {\n top: HTMLElement;\n band: HTMLElement;\n list: HTMLElement;\n regional: HTMLElement;\n };\n /** The `<site-analytics>` this element added for `matomo-id`. */\n private analytics?: HTMLElement;\n /** Whether this element asked for `<site-alerts>`' code. */\n private alertsUiRequested = false;\n /** Whether the list alerts have anything to show, from their last update event. */\n @state() private listShown = false;\n /**\n * Shadow mode: whether a `slot=\"breadcrumbs\"` child exists, so the slot is rendered only\n * then and the page without breadcrumbs renders exactly what it did before them.\n */\n @state() private hasBreadcrumbs = false;\n private breadcrumbsObserver?: MutationObserver;\n\n private syncHasBreadcrumbs = (): void => {\n this.hasBreadcrumbs = [...this.children].some((c) => slotOf(c) === 'breadcrumbs');\n };\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (!this.lightDom) {\n this.syncHasBreadcrumbs();\n this.breadcrumbsObserver ??= new MutationObserver(this.syncHasBreadcrumbs);\n this.breadcrumbsObserver.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n this.ownerDocument.defaultView?.addEventListener('beforeprint', this.syncPrintSource);\n if (!this.noGlobalStyles && !this.globalsInstalled) {\n this.globalsInstalled = true;\n this.installGlobalStyles(this.ownerDocument);\n }\n // Reconnect after a disconnect; the first connect starts routing in update().\n if (this.lightDom && this.hasUpdated) {\n this.route(this.childNodes);\n this.observe();\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.observer?.disconnect();\n this.breadcrumbsObserver?.disconnect();\n this.ownerDocument.defaultView?.removeEventListener('beforeprint', this.syncPrintSource);\n }\n\n /**\n * The printed \"where from\" line, as a CSS string on <main> (`--uvalib-print-source`), read\n * by the print styles. Set on each update and again just before printing, so a single-page\n * app prints its current title and URL.\n */\n private syncPrintSource = (): void => {\n const main = this.renderRoot.querySelector<HTMLElement>(\n this.lightDom ? ':scope > main' : 'main',\n );\n if (!main) return;\n const doc = this.ownerDocument;\n const name = (this.siteName || doc.title || '').trim();\n const text = `UVA Library${name ? ` — ${name}` : ''} ${doc.defaultView?.location.href ?? ''}`;\n const value = `\"${text\n .trim()\n .replace(/[\\\\\"]/g, '\\\\$&')\n .replace(/[\\n\\r\\f]/g, ' ')}\"`;\n if (main.style.getPropertyValue('--uvalib-print-source') !== value)\n main.style.setProperty('--uvalib-print-source', value);\n };\n\n private installGlobalStyles(doc: Document): void {\n // Tokens stay layered so a host's own `:root { --uva-*: … }` wins; base and accessibility\n // rules are unlayered so they beat host resets.\n installLightDomStyles('uvalib-tokens', [tokens], { root: doc, scope: false });\n installLightDomStyles('uvalib-global', [fontFallback, base, accessible], {\n root: doc,\n scope: false,\n layer: false,\n });\n if (!doc.head.querySelector(`link[href=\"${TYPEKIT_URL}\"]`)) {\n const link = doc.createElement('link');\n link.rel = 'stylesheet';\n link.href = TYPEKIT_URL;\n doc.head.append(link);\n }\n }\n\n /** The list element's `site-alerts-change`: show the band only while it lists alerts. */\n private onListChange(e: Event): void {\n if (e.target !== e.currentTarget) return;\n const count = (e as CustomEvent<{ count?: unknown }>).detail?.count;\n this.listShown = typeof count === 'number' && count > 0;\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n if (changed.has('colorSchemeSwitch')) this.scheme.sync();\n if (changed.has('noAlerts') && this.noAlerts) this.listShown = false;\n if (changed.has('alertsEnv') && this.alertsEnv && !isAlertsEnv(this.alertsEnv)) {\n console.warn(\n `${this.localName}: unknown alerts-env \"${this.alertsEnv}\"; using production. Valid values: production, staging.`,\n );\n }\n try {\n this.alertsUrl = alertsBase(this.alertsEnv, this.alertsSrc, this.ownerDocument.baseURI);\n } catch {\n if (changed.has('alertsSrc')) {\n console.warn(\n `${this.localName}: alerts-src \"${this.alertsSrc}\" is not a URL; ignoring it.`,\n );\n }\n this.alertsUrl = alertsBase(this.alertsEnv, null, this.ownerDocument.baseURI);\n }\n }\n\n protected override updated(): void {\n if (this.lightDom) this.syncLightAlerts();\n this.syncPrintSource();\n if (!this.noAlerts) {\n // The alerts script starts loading at once, alongside <site-alerts>' own code.\n loadAlerts(this.ownerDocument, this.alertsUrl);\n this.defineAlerts();\n }\n this.syncAnalytics();\n }\n\n /** Loads `<site-alerts>` (and registers it) on first use of the alerts. */\n protected loadAlertsUi(): Promise<unknown> {\n return import('../site-alerts/site-alerts.js');\n }\n\n private defineAlerts(): void {\n if (this.alertsUiRequested || customElements.get(ALERTS_UI)) return;\n this.alertsUiRequested = true;\n this.loadAlertsUi().catch((err) =>\n console.error(`${this.localName}: failed to load site-alerts`, err),\n );\n }\n\n /** Loads `<site-analytics>` (and registers it) on first use of `matomo-id`. */\n protected loadAnalytics(): Promise<unknown> {\n return import('../site-analytics/site-analytics.js');\n }\n\n /**\n * `matomo-id`: one `<site-analytics>`, at the very start of the render root, before Lit's\n * markers, so no render ever clears it and (being chrome) light DOM routing never moves it.\n * The element's own one-tracker guard keeps a second element or snippet from double-counting.\n */\n private syncAnalytics(): void {\n const id = Number(this.matomoId);\n if (!(id > 0)) {\n this.analytics?.remove();\n this.analytics = undefined;\n return;\n }\n if (!this.analytics) {\n // An analytics element the page has already (say the old v0.0.12 <uvalib-analytics>,\n // which does not share the one-tracker guard) records the page: don't add a second.\n if (this.ownerDocument.querySelector('site-analytics, uvalib-analytics')) return;\n const a = (this.analytics = this.ownerDocument.createElement('site-analytics'));\n this.chrome.add(a);\n if (!customElements.get('site-analytics')) {\n // Until the code arrives nothing forwards: keep what the components report meanwhile\n // (a bento search can settle first) and hand it over once the element is running.\n const buffer = bufferAnalytics(this.ownerDocument);\n this.loadAnalytics()\n .then(() => customElements.whenDefined('site-analytics'))\n .then(() => (a as HTMLElement & { updateComplete?: Promise<unknown> }).updateComplete)\n .then(\n () => buffer.flush(),\n (err) => {\n buffer.drop();\n console.error(`${this.localName}: failed to load site-analytics`, err);\n },\n );\n }\n }\n const a = this.analytics;\n if (a.getAttribute('matomoid') !== String(id)) a.setAttribute('matomoid', String(id));\n if (this.matomoUrl) a.setAttribute('matomourl', this.matomoUrl);\n else a.removeAttribute('matomourl');\n if (this.matomoDownloads) a.setAttribute('downloads', this.matomoDownloads);\n else a.removeAttribute('downloads');\n if (a.parentNode !== this.renderRoot) this.renderRoot.prepend(a);\n }\n\n /**\n * Light mode keeps <main> free of Lit parts, so the alert elements are managed here: the\n * header one is handed to <site-header> as a `slot=\"alerts\"` child (it moves it into its\n * <header>), the list band goes right after <site-header>, and regional stays the first\n * child of <main>. The band and the elements are chrome, so route() never moves them.\n */\n private syncLightAlerts(): void {\n const main = this.querySelector(':scope > main');\n const header = this.querySelector(':scope > site-header');\n if (!main || !header) return;\n if (this.noAlerts) {\n const a = this.lightAlerts;\n for (const n of a ? [a.top, a.band, a.regional] : []) n.remove();\n this.lightAlerts = undefined;\n return;\n }\n if (!this.lightAlerts) {\n const doc = this.ownerDocument;\n const make = (show: AlertShow) => {\n const a = doc.createElement(ALERTS_UI);\n a.setAttribute('show', show);\n a.setAttribute('no-shadow-dom', '');\n this.chrome.add(a);\n return a;\n };\n const top = make('header');\n top.slot = 'alerts';\n const list = make('list');\n list.addEventListener('site-alerts-change', (e) => this.onListChange(e));\n const band = doc.createElement('section');\n band.className = 'alerts-list';\n band.setAttribute('aria-label', ALERTS_LIST_LABEL);\n band.append(list);\n this.chrome.add(band);\n this.lightAlerts = { top, band, list, regional: make('regional') };\n }\n const { top, band, list, regional } = this.lightAlerts;\n for (const a of [top, list, regional]) {\n if (a.getAttribute('alerts-src') !== this.alertsUrl)\n a.setAttribute('alerts-src', this.alertsUrl);\n a.toggleAttribute('no-style', this.noStyle);\n }\n band.hidden = !this.listShown;\n if (!header.contains(top)) header.append(top);\n // Directly after <site-header>, before any Lit marker, so no part ever clears it.\n if (header.nextSibling !== band) header.after(band);\n if (main.firstChild !== regional) main.prepend(regional);\n }\n\n protected override update(changed: PropertyValues): void {\n if (this.hasUpdated || !this.lightDom) {\n super.update(changed);\n return;\n }\n const content = [...this.childNodes];\n super.update(changed); // first render appends the chrome after the content\n for (const n of this.childNodes) if (!content.includes(n)) this.chrome.add(n);\n this.route(content);\n this.observe();\n }\n\n private observe(): void {\n this.observer ??= new MutationObserver((records) => {\n for (const r of records) {\n if (r.type === 'attributes') this.reslot(r.target as Element);\n else if (r.target === this) this.route(r.addedNodes);\n }\n });\n // One call: observing the same node again would replace these options. Children added to\n // the page are routed; a content node given slot=\"breadcrumbs\" later (or losing it) moves\n // out of (or back into) <main>.\n this.observer.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n\n /** Light mode: a top-level content node's `slot` changed to or from `breadcrumbs`. */\n private reslot(el: Element): void {\n const main = this.querySelector(':scope > main');\n const header = this.querySelector(':scope > site-header');\n if (!main || !header || this.chrome.has(el)) return;\n if (el.parentNode === main && slotOf(el) === 'breadcrumbs') this.placeBreadcrumbs(el, header);\n else if (\n el.parentNode === this &&\n slotOf(el) !== 'breadcrumbs' &&\n main.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_PRECEDING\n )\n main.append(el);\n }\n\n /**\n * Light mode: a `slot=\"breadcrumbs\"` node goes after the header, the alert list band and any\n * breadcrumbs already there, before Lit's markers (so no render clears it) and `<main>`.\n */\n private placeBreadcrumbs(n: Node, header: Element): void {\n let ref: Node = header;\n for (let next = ref.nextSibling; next; next = ref.nextSibling) {\n if (next !== this.lightAlerts?.band && slotOf(next) !== 'breadcrumbs') break;\n if (next === n) return; // already in place\n ref = next;\n }\n (ref as ChildNode).after(n);\n }\n\n /**\n * Light mode has no slots: move content into `<main>`, pre-footer nodes to the footer,\n * site links and main-nav markup to the header and breadcrumbs before `<main>`.\n */\n private route(nodes: Iterable<Node>): void {\n const main = this.querySelector(':scope > main');\n const header = this.querySelector(':scope > site-header');\n const footer = this.querySelector(':scope > site-footer');\n if (!main || !header || !footer) return;\n for (const n of [...nodes]) {\n if (n.parentNode !== this || this.chrome.has(n)) continue;\n if (n.nodeType === Node.TEXT_NODE && !n.textContent?.trim()) continue;\n // The header and footer adopt their own slotted children, even before they upgrade.\n const slot = slotOf(n);\n if (slot === 'breadcrumbs') {\n this.placeBreadcrumbs(n, header);\n continue;\n }\n const to =\n slot === 'pre-footer'\n ? footer\n : slot === 'site-links' || slot === 'main-nav'\n ? header\n : main;\n to.append(n);\n }\n }\n\n private onSkip(e: Event): void {\n e.preventDefault();\n // Shadow mode: the link is in <site-header>'s skip-link slot, and the header reports it.\n if (this.lightDom) trackEvent(this, ['site-header', 'skip-link']);\n this.renderRoot.querySelector<HTMLElement>('main')?.focus();\n }\n\n protected override render() {\n const light = this.lightDom;\n // Light mode keeps <main> and <site-footer> free of Lit parts so moved content is never cleared.\n const skip = html`<a\n class=\"skip-link\"\n href=\"#main-content\"\n slot=${ifDefined(light ? undefined : 'skip-link')}\n @click=${this.onSkip}\n >Skip to main content</a\n >`;\n // Shadow mode: the link is slotted into <site-header>'s <header> landmark, because axe\n // looks the #main-content target up on the document and cannot see it in this shadow root,\n // so it would flag a skip link that sits outside every landmark (\"region\").\n // Light mode: the link stays the first child, where the target resolves.\n const alerts = !this.noAlerts && !light;\n const alert = (show: AlertShow) =>\n html`<site-alerts\n slot=${ifDefined(show === 'header' ? 'alerts' : undefined)}\n show=${show}\n alerts-src=${this.alertsUrl}\n ?no-style=${this.noStyle}\n ></site-alerts>`;\n // Shadow mode's list band; light mode builds the same in syncLightAlerts().\n const band = html`<section\n class=\"alerts-list\"\n aria-label=${ALERTS_LIST_LABEL}\n ?hidden=${!this.listShown}\n >\n <site-alerts\n show=\"list\"\n alerts-src=${this.alertsUrl}\n ?no-style=${this.noStyle}\n @site-alerts-change=${this.onListChange}\n ></site-alerts>\n </section>`;\n return html`\n ${light ? skip : nothing}\n <site-header\n exportparts=\"header\"\n ?no-shadow-dom=${light}\n ?no-style=${this.noStyle}\n variant=${this.headerVariant}\n root-link-domain=${this.rootLinkDomain}\n site-links-label=${ifDefined(this.siteLinksLabel)}\n site-name=${ifDefined(this.siteName)}\n site-name-href=${ifDefined(this.siteNameHref)}\n ?no-main-nav=${this.noMainNav}\n main-nav-label=${ifDefined(this.mainNavLabel)}\n main-nav-src=${ifDefined(this.mainNavSrc)}\n main-nav-current=${ifDefined(this.mainNavCurrent)}\n ?color-scheme-switch=${this.colorSchemeSwitch}\n >${\n light\n ? nothing\n : html`${skip}${alerts ? alert('header') : nothing}<slot\n name=\"site-links\"\n slot=\"site-links\"\n ></slot\n ><slot name=\"main-nav\" slot=\"main-nav\"></slot>`\n }</site-header\n >\n ${alerts ? band : nothing}\n ${!light && this.hasBreadcrumbs ? html`<slot name=\"breadcrumbs\"></slot>` : nothing}\n ${\n light\n ? html`<main id=\"main-content\" tabindex=\"-1\" part=\"main\"></main>`\n : html`<main id=\"main-content\" tabindex=\"-1\" part=\"main\">\n ${alerts ? alert('regional') : nothing}<slot></slot>\n </main>`\n }\n ${\n light\n ? html`<site-footer\n no-shadow-dom\n ?hidden=${this.noFooter}\n ?no-style=${this.noStyle}\n root-link-domain=${this.rootLinkDomain}\n ></site-footer>`\n : html`<site-footer\n exportparts=\"footer\"\n ?hidden=${this.noFooter}\n ?no-style=${this.noStyle}\n root-link-domain=${this.rootLinkDomain}\n ><slot name=\"pre-footer\" slot=\"pre-footer\"></slot\n ></site-footer>`\n }\n `;\n }\n}\n","import { define } from '../../base/define.js';\nimport { SitePage } from './SitePage.js';\nimport '../site-header/site-header.js';\n// The footer sits at the bottom of the page, so it loads asynchronously.\nimport('../site-footer/site-footer.js').catch((err) =>\n console.error('site-page: failed to load site-footer', err),\n);\n\ndefine('site-page', SitePage);\n"],"mappings":";;;;;;;;;AAwBA,IAAM0B,IAAY,eAEZC,IAAoB,kBAEpBC,KAAU,MAA4BvB,aAAa,UAAUA,EAAE,aAAa,MAAM,IAAI,MAkD/EwB,IAAb,cAA8BjB,EAAc;;EAyPJ,A,aArPpC,KAAA,iBAAA,oCAEA,KAAA,gBAAA,QAC2E,KAAA,iBAAA,IAME,KAAA,WAAA,IAKM,KAAA,cAAA,IAQlB,KAAA,YAAA,IAeF,KAAA,YAAA,cAOD,KAAA,WAAA,IAOmB,KAAA,oBAAA,IAqBzD,KAAA,SAAA,IAAIO,EAC5B,YACM,KAAK,yBACL,KAAK,SACX,EACF,GAuGiB,KAAA,yBAAA,IAAI,QAAc,GAER,KAAA,mBAAA,IAEP,KAAA,YAA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