@uvalib/web-components 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +105 -0
- package/README.md +849 -47
- package/dist/analytics.d.ts +10 -0
- package/dist/analytics.js +9 -0
- package/dist/analytics.js.map +1 -0
- package/dist/base/UvalibElement.js +8 -5
- package/dist/base/UvalibElement.js.map +1 -1
- package/dist/base/analytics-state.d.ts +7 -0
- package/dist/base/analytics-state.js.map +1 -1
- package/dist/base/light-dom-styles.d.ts +13 -0
- package/dist/base/light-dom-styles.js +26 -0
- package/dist/base/light-dom-styles.js.map +1 -1
- package/dist/base/search-tracker.d.ts +57 -0
- package/dist/base/search-tracker.js +51 -0
- package/dist/base/search-tracker.js.map +1 -0
- package/dist/base.css +286 -14
- package/dist/base.d.ts +2 -0
- package/dist/base.js +1 -0
- package/dist/base.js.map +1 -1
- package/dist/components/site-analytics/SiteAnalytics.d.ts +20 -1
- package/dist/components/site-analytics/SiteAnalytics.js +93 -12
- package/dist/components/site-analytics/SiteAnalytics.js.map +1 -1
- package/dist/components/site-page/SitePage.d.ts +23 -0
- package/dist/components/site-page/SitePage.js +77 -0
- package/dist/components/site-page/SitePage.js.map +1 -1
- package/dist/components/uvalib-back-to-top/UvalibBackToTop.d.ts +58 -0
- package/dist/components/uvalib-back-to-top/UvalibBackToTop.js +250 -0
- package/dist/components/uvalib-back-to-top/UvalibBackToTop.js.map +1 -0
- package/dist/components/uvalib-back-to-top/uvalib-back-to-top.d.ts +1 -0
- package/dist/components/uvalib-back-to-top/uvalib-back-to-top.js +4 -0
- package/dist/components/uvalib-back-to-top/uvalib-back-to-top.js.map +1 -0
- package/dist/components/uvalib-breadcrumbs/UvalibBreadcrumbs.d.ts +14 -0
- package/dist/components/uvalib-breadcrumbs/UvalibBreadcrumbs.js +56 -4
- package/dist/components/uvalib-breadcrumbs/UvalibBreadcrumbs.js.map +1 -1
- package/dist/components/uvalib-chip-group/UvalibChipGroup.d.ts +25 -3
- package/dist/components/uvalib-chip-group/UvalibChipGroup.js +80 -10
- package/dist/components/uvalib-chip-group/UvalibChipGroup.js.map +1 -1
- package/dist/components/uvalib-combobox/UvalibCombobox.d.ts +212 -0
- package/dist/components/uvalib-combobox/UvalibCombobox.js +1088 -0
- package/dist/components/uvalib-combobox/UvalibCombobox.js.map +1 -0
- package/dist/components/uvalib-combobox/uvalib-combobox.d.ts +1 -0
- package/dist/components/uvalib-combobox/uvalib-combobox.js +4 -0
- package/dist/components/uvalib-combobox/uvalib-combobox.js.map +1 -0
- package/dist/components/uvalib-contents/UvalibContents.d.ts +53 -0
- package/dist/components/uvalib-contents/UvalibContents.js +202 -3
- package/dist/components/uvalib-contents/UvalibContents.js.map +1 -1
- package/dist/components/uvalib-date-histogram/UvalibDateHistogram.d.ts +56 -17
- package/dist/components/uvalib-date-histogram/UvalibDateHistogram.js +285 -81
- package/dist/components/uvalib-date-histogram/UvalibDateHistogram.js.map +1 -1
- package/dist/components/uvalib-date-range/UvalibDateRange.d.ts +6 -0
- package/dist/components/uvalib-date-range/UvalibDateRange.js +23 -0
- package/dist/components/uvalib-date-range/UvalibDateRange.js.map +1 -1
- package/dist/components/uvalib-filter-drawer/UvalibFilterDrawer.d.ts +113 -0
- package/dist/components/uvalib-filter-drawer/UvalibFilterDrawer.js +589 -0
- package/dist/components/uvalib-filter-drawer/UvalibFilterDrawer.js.map +1 -0
- package/dist/components/uvalib-filter-drawer/uvalib-filter-drawer.d.ts +1 -0
- package/dist/components/uvalib-filter-drawer/uvalib-filter-drawer.js +4 -0
- package/dist/components/uvalib-filter-drawer/uvalib-filter-drawer.js.map +1 -0
- package/dist/components/uvalib-image-regions/UvalibImageRegions.d.ts +138 -0
- package/dist/components/uvalib-image-regions/UvalibImageRegions.js +689 -0
- package/dist/components/uvalib-image-regions/UvalibImageRegions.js.map +1 -0
- package/dist/components/uvalib-image-regions/regions.d.ts +57 -0
- package/dist/components/uvalib-image-regions/regions.js +117 -0
- package/dist/components/uvalib-image-regions/regions.js.map +1 -0
- package/dist/components/uvalib-image-regions/uvalib-image-regions.d.ts +1 -0
- package/dist/components/uvalib-image-regions/uvalib-image-regions.js +4 -0
- package/dist/components/uvalib-image-regions/uvalib-image-regions.js.map +1 -0
- package/dist/components/uvalib-lightbox/UvalibLightbox.d.ts +79 -0
- package/dist/components/uvalib-lightbox/UvalibLightbox.js +295 -16
- package/dist/components/uvalib-lightbox/UvalibLightbox.js.map +1 -1
- package/dist/components/uvalib-map/UvalibMap.d.ts +251 -0
- package/dist/components/uvalib-map/UvalibMap.js +1395 -0
- package/dist/components/uvalib-map/UvalibMap.js.map +1 -0
- package/dist/components/uvalib-map/uvalib-map.d.ts +1 -0
- package/dist/components/uvalib-map/uvalib-map.js +4 -0
- package/dist/components/uvalib-map/uvalib-map.js.map +1 -0
- package/dist/components/uvalib-metadata/UvalibMetadata.d.ts +39 -2
- package/dist/components/uvalib-metadata/UvalibMetadata.js +214 -8
- package/dist/components/uvalib-metadata/UvalibMetadata.js.map +1 -1
- package/dist/components/uvalib-pager/UvalibPager.d.ts +22 -3
- package/dist/components/uvalib-pager/UvalibPager.js +42 -4
- package/dist/components/uvalib-pager/UvalibPager.js.map +1 -1
- package/dist/custom-elements.json +9641 -3131
- package/dist/index.d.ts +8 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/pagefind.css +4 -0
- package/dist/styles/base.js +119 -0
- package/dist/styles/base.js.map +1 -1
- package/dist/styles/color-scheme.js +5 -0
- package/dist/styles/color-scheme.js.map +1 -1
- package/dist/styles/controls.js +6 -0
- package/dist/styles/controls.js.map +1 -1
- package/dist/styles/hidden.d.ts +2 -0
- package/dist/styles/hidden.js +51 -0
- package/dist/styles/hidden.js.map +1 -0
- package/dist/styles/message.d.ts +1 -0
- package/dist/styles/message.js +82 -0
- package/dist/styles/message.js.map +1 -0
- package/dist/styles/pagefind.js +4 -0
- package/dist/styles/pagefind.js.map +1 -1
- package/dist/styles/result-list.d.ts +1 -0
- package/dist/styles/result-list.js +111 -0
- package/dist/styles/result-list.js.map +1 -0
- package/dist/styles/results.js +0 -15
- package/dist/styles/results.js.map +1 -1
- package/dist/testing/index.d.ts +110 -0
- package/dist/testing/index.js +100 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/lighthouse-rules.d.ts +10 -0
- package/dist/testing/lighthouse-rules.js +44 -0
- package/dist/testing/lighthouse-rules.js.map +1 -0
- package/dist/tokens.css +5 -0
- package/dist-cdn/analytics.js +32 -0
- package/dist-cdn/analytics.js.map +1 -0
- package/dist-cdn/base.css +286 -14
- package/dist-cdn/bento-box.js +3 -3
- package/dist-cdn/chunks/{SiteAnalytics-Cm-FyhYS.js → SiteAnalytics-B9gu5aGO.js} +59 -30
- package/dist-cdn/chunks/SiteAnalytics-B9gu5aGO.js.map +1 -0
- package/dist-cdn/chunks/{UvalibElement-BnI-eRRR.js → UvalibElement-pGONDAwB.js} +108 -101
- package/dist-cdn/chunks/UvalibElement-pGONDAwB.js.map +1 -0
- package/dist-cdn/chunks/{accessible-GqhVn5_H.js → accessible-DJv7YOtS.js} +2 -2
- package/dist-cdn/chunks/{accessible-GqhVn5_H.js.map → accessible-DJv7YOtS.js.map} +1 -1
- package/dist-cdn/chunks/analytics-state-Ce8DKe4F.js.map +1 -1
- package/dist-cdn/chunks/{base-p5pk0vb2.js → base-BI8h0Gf3.js} +121 -2
- package/dist-cdn/chunks/base-BI8h0Gf3.js.map +1 -0
- package/dist-cdn/chunks/{library-weekly-hours-COE7Vv6V.js → library-weekly-hours-CrV3TlP5.js} +3 -3
- package/dist-cdn/chunks/{library-weekly-hours-COE7Vv6V.js.map → library-weekly-hours-CrV3TlP5.js.map} +1 -1
- package/dist-cdn/chunks/regions-B8ExwUGP.js +86 -0
- package/dist-cdn/chunks/regions-B8ExwUGP.js.map +1 -0
- package/dist-cdn/chunks/{repeat-CIFUYkyh.js → repeat-m5Zd_QeP.js} +2 -2
- package/dist-cdn/chunks/{repeat-CIFUYkyh.js.map → repeat-m5Zd_QeP.js.map} +1 -1
- package/dist-cdn/chunks/{site-header-BlOYvQg1.js → site-header-DYRMpdBj.js} +9 -4
- package/dist-cdn/chunks/{site-header-BlOYvQg1.js.map → site-header-DYRMpdBj.js.map} +1 -1
- package/dist-cdn/chunks/{site-main-nav-AaxZ9rQf.js → site-main-nav-DURrQMal.js} +3 -3
- package/dist-cdn/chunks/{site-main-nav-AaxZ9rQf.js.map → site-main-nav-DURrQMal.js.map} +1 -1
- package/dist-cdn/chunks/{static-html-1mTAG6nS.js → static-html-C1rhtCHu.js} +2 -2
- package/dist-cdn/chunks/{static-html-1mTAG6nS.js.map → static-html-C1rhtCHu.js.map} +1 -1
- package/dist-cdn/custom-elements.json +9641 -3131
- package/dist-cdn/events-section.js +3 -3
- package/dist-cdn/library-hours-setup.js +2 -2
- package/dist-cdn/library-weekly-hours.js +1 -1
- package/dist-cdn/manifest.json +10 -2
- package/dist-cdn/pagefind.css +4 -0
- package/dist-cdn/site-alerts.js +4 -4
- package/dist-cdn/site-analytics.js +2 -2
- package/dist-cdn/site-footer.js +2 -2
- package/dist-cdn/site-header.js +1 -1
- package/dist-cdn/site-hours-section.js +4 -4
- package/dist-cdn/site-main-nav.js +1 -1
- package/dist-cdn/site-page.js +56 -11
- package/dist-cdn/site-page.js.map +1 -1
- package/dist-cdn/site-style.js +2 -2
- package/dist-cdn/skills/uvalib-web-components/SKILL.md +98 -13
- package/dist-cdn/skills/uvalib-web-components/reference/accessibility-testing.md +34 -2
- package/dist-cdn/skills/uvalib-web-components/reference/components.md +302 -14
- package/dist-cdn/skills/uvalib-web-components/reference/snippets.md +1 -1
- package/dist-cdn/tokens.css +5 -0
- package/dist-cdn/uvalib-analytics.js +2 -2
- package/dist-cdn/uvalib-back-to-top.js +156 -0
- package/dist-cdn/uvalib-back-to-top.js.map +1 -0
- package/dist-cdn/uvalib-breadcrumbs.js +31 -11
- package/dist-cdn/uvalib-breadcrumbs.js.map +1 -1
- package/dist-cdn/uvalib-card-grid.js +1 -1
- package/dist-cdn/uvalib-card.js +3 -3
- package/dist-cdn/uvalib-chip-group.js +53 -14
- package/dist-cdn/uvalib-chip-group.js.map +1 -1
- package/dist-cdn/uvalib-combobox.js +667 -0
- package/dist-cdn/uvalib-combobox.js.map +1 -0
- package/dist-cdn/uvalib-contents.js +100 -22
- package/dist-cdn/uvalib-contents.js.map +1 -1
- package/dist-cdn/uvalib-date-histogram.js +237 -127
- package/dist-cdn/uvalib-date-histogram.js.map +1 -1
- package/dist-cdn/uvalib-date-range.js +14 -2
- package/dist-cdn/uvalib-date-range.js.map +1 -1
- package/dist-cdn/uvalib-filter-drawer.js +355 -0
- package/dist-cdn/uvalib-filter-drawer.js.map +1 -0
- package/dist-cdn/uvalib-filter.js +3 -3
- package/dist-cdn/uvalib-image-regions.js +460 -0
- package/dist-cdn/uvalib-image-regions.js.map +1 -0
- package/dist-cdn/uvalib-lightbox.js +214 -59
- package/dist-cdn/uvalib-lightbox.js.map +1 -1
- package/dist-cdn/uvalib-map.js +667 -0
- package/dist-cdn/uvalib-map.js.map +1 -0
- package/dist-cdn/uvalib-metadata.js +150 -24
- package/dist-cdn/uvalib-metadata.js.map +1 -1
- package/dist-cdn/uvalib-pager.js +29 -17
- package/dist-cdn/uvalib-pager.js.map +1 -1
- package/dist-cdn/uvalib-photo-grid.js +2 -2
- package/dist-cdn/uvalib-results-count.js +2 -2
- package/dist-cdn/uvalib-tabs.js +2 -2
- package/dist-cdn/uvalib-tag-list.js +2 -2
- package/package.json +43 -1
- package/skills/uvalib-web-components/SKILL.md +98 -13
- package/skills/uvalib-web-components/reference/accessibility-testing.md +34 -2
- package/skills/uvalib-web-components/reference/components.md +302 -14
- package/skills/uvalib-web-components/reference/snippets.md +1 -1
- package/dist-cdn/chunks/SiteAnalytics-Cm-FyhYS.js.map +0 -1
- package/dist-cdn/chunks/UvalibElement-BnI-eRRR.js.map +0 -1
- package/dist-cdn/chunks/base-p5pk0vb2.js.map +0 -1
package/dist-cdn/base.css
CHANGED
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
uvalib-chip-group[scroll]:not(:defined) {
|
|
50
50
|
min-height: calc(44px + 0.75rem);
|
|
51
51
|
}
|
|
52
|
+
/* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */
|
|
53
|
+
uvalib-chip-group[description]:not(:defined) {
|
|
54
|
+
padding-block-end: 1.5625rem;
|
|
55
|
+
}
|
|
52
56
|
/* Its text is drawn from attributes: hold one line until it upgrades. */
|
|
53
57
|
uvalib-results-count:not(:defined) {
|
|
54
58
|
display: block;
|
|
@@ -58,6 +62,26 @@
|
|
|
58
62
|
uvalib-results-count:not(:defined)[hidden] {
|
|
59
63
|
display: none;
|
|
60
64
|
}
|
|
65
|
+
/* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7).
|
|
66
|
+
More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */
|
|
67
|
+
:where(
|
|
68
|
+
site-page,
|
|
69
|
+
uvalib-breadcrumbs,
|
|
70
|
+
uvalib-card,
|
|
71
|
+
uvalib-card-grid,
|
|
72
|
+
uvalib-pager,
|
|
73
|
+
uvalib-contents,
|
|
74
|
+
uvalib-metadata,
|
|
75
|
+
uvalib-chip-group,
|
|
76
|
+
uvalib-tabs,
|
|
77
|
+
uvalib-combobox,
|
|
78
|
+
uvalib-image-regions,
|
|
79
|
+
uvalib-map,
|
|
80
|
+
uvalib-filter-drawer
|
|
81
|
+
):not(:defined)[hidden],
|
|
82
|
+
:where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
61
85
|
/* Tabs stay readable before the script runs: a block, one panel, and a gap the
|
|
62
86
|
size of the tab row (44px) plus its 1rem margin, so the first panel does not
|
|
63
87
|
jump when the element upgrades. Later data-tab panels stay hidden. */
|
|
@@ -68,6 +92,101 @@
|
|
|
68
92
|
uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] {
|
|
69
93
|
display: none;
|
|
70
94
|
}
|
|
95
|
+
/* A combobox: its label (from the attribute) and one 44px field (plus a one-line
|
|
96
|
+
description) held, so nothing moves when it upgrades. A fallback <input list> child
|
|
97
|
+
works meanwhile; the other children (options, a datalist) stay out of sight. */
|
|
98
|
+
uvalib-combobox:not(:defined) {
|
|
99
|
+
display: block;
|
|
100
|
+
min-block-size: calc(1.5em + 0.25rem + 44px);
|
|
101
|
+
line-height: 1.5;
|
|
102
|
+
}
|
|
103
|
+
uvalib-combobox[description]:not(:defined) {
|
|
104
|
+
min-block-size: calc(3em + 0.5rem + 44px);
|
|
105
|
+
}
|
|
106
|
+
uvalib-combobox:not(:defined)::before {
|
|
107
|
+
content: attr(label);
|
|
108
|
+
display: block;
|
|
109
|
+
margin-block-end: 0.25rem;
|
|
110
|
+
font-weight: 600;
|
|
111
|
+
}
|
|
112
|
+
uvalib-combobox:not(:defined) > :not(input) {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
uvalib-combobox:not(:defined) > input {
|
|
116
|
+
display: block;
|
|
117
|
+
box-sizing: border-box;
|
|
118
|
+
inline-size: 100%;
|
|
119
|
+
min-block-size: 44px;
|
|
120
|
+
font: inherit;
|
|
121
|
+
line-height: 1.2;
|
|
122
|
+
}
|
|
123
|
+
/* Image regions: the image at its own width and the list beside it (or under it), the
|
|
124
|
+
layout the element keeps once it upgrades, so the image does not move. */
|
|
125
|
+
uvalib-image-regions:not(:defined) {
|
|
126
|
+
display: flex;
|
|
127
|
+
flex-wrap: wrap;
|
|
128
|
+
gap: 1rem;
|
|
129
|
+
align-items: flex-start;
|
|
130
|
+
}
|
|
131
|
+
uvalib-image-regions:not(:defined) > :is(img, picture) {
|
|
132
|
+
display: block;
|
|
133
|
+
flex: 0 1 auto;
|
|
134
|
+
min-width: 0;
|
|
135
|
+
max-width: 100%;
|
|
136
|
+
height: auto;
|
|
137
|
+
}
|
|
138
|
+
uvalib-image-regions:not(:defined) > :is(ol, ul) {
|
|
139
|
+
flex: 1 1 14rem;
|
|
140
|
+
min-width: 0;
|
|
141
|
+
}
|
|
142
|
+
/* A map: its key instructions (the same text it shows) and the map's height held above
|
|
143
|
+
the child list, so the list does not move when the map is drawn over the page's
|
|
144
|
+
Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */
|
|
145
|
+
uvalib-map:not(:defined) {
|
|
146
|
+
display: block;
|
|
147
|
+
}
|
|
148
|
+
uvalib-map:not(:defined)::before {
|
|
149
|
+
content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.';
|
|
150
|
+
display: block;
|
|
151
|
+
padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw))));
|
|
152
|
+
font-size: 0.875rem;
|
|
153
|
+
line-height: 1.5;
|
|
154
|
+
color: var(--uva-color-text-muted, #4b5563);
|
|
155
|
+
}
|
|
156
|
+
/* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px
|
|
157
|
+
"Search and filters" button shows, so hold that height and keep the form and filters out
|
|
158
|
+
of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the
|
|
159
|
+
same two rules in a media query of that width (see the README). Low specificity, so the
|
|
160
|
+
[hidden] rule above still wins. */
|
|
161
|
+
@media (max-width: 48rem) {
|
|
162
|
+
:where(uvalib-filter-drawer:not([breakpoint])):not(:defined) {
|
|
163
|
+
display: block;
|
|
164
|
+
min-block-size: 44px;
|
|
165
|
+
}
|
|
166
|
+
:where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * {
|
|
167
|
+
display: none;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme
|
|
171
|
+
prints light (the role tokens resolve to their light values), and the content's links
|
|
172
|
+
are black and underlined, so they are told apart without colour. Content is <main> in
|
|
173
|
+
light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is
|
|
174
|
+
shown, apart from the light scheme. */
|
|
175
|
+
@media print {
|
|
176
|
+
:root[data-uva-color-scheme]:has(site-page) {
|
|
177
|
+
color-scheme: light;
|
|
178
|
+
--uva-color-scheme: light;
|
|
179
|
+
}
|
|
180
|
+
/* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */
|
|
181
|
+
site-page:not([print-chrome]) > [slot='breadcrumbs'] {
|
|
182
|
+
display: none;
|
|
183
|
+
}
|
|
184
|
+
site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link,
|
|
185
|
+
site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) {
|
|
186
|
+
color: #000;
|
|
187
|
+
text-decoration: underline;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
71
190
|
@keyframes uvalib-site-page-reveal {
|
|
72
191
|
to {
|
|
73
192
|
visibility: visible;
|
|
@@ -78,6 +197,7 @@
|
|
|
78
197
|
:root[data-uva-color-scheme] {
|
|
79
198
|
--uva-color-text: light-dark(var(--uva-grey-darkest, #2b2b2b), #e8e8e8);
|
|
80
199
|
--uva-color-surface: light-dark(#ffffff, #10172b);
|
|
200
|
+
--uva-color-text-muted: light-dark(#4b5563, #adadad);
|
|
81
201
|
--uva-color-button-bg: light-dark(var(--uva-blue-alt, #007bac), #55c4ec);
|
|
82
202
|
--uva-color-button-text: light-dark(#ffffff, #10172b);
|
|
83
203
|
--uva-color-button-hover-bg: light-dark(var(--uva-blue-alt-A, #005679), #91d8f2);
|
|
@@ -86,7 +206,6 @@
|
|
|
86
206
|
--uva-color-button-subtle-hover-bg: light-dark(var(--uva-blue-alt-200, #91d8f2), #134a66);
|
|
87
207
|
--uva-color-focus: light-dark(var(--uva-brand-orange, #e57200), #ffb370);
|
|
88
208
|
--uva-color-track: light-dark(#e5e7eb, #2c3858);
|
|
89
|
-
--uva-color-text-muted: light-dark(#4b5563, #adadad);
|
|
90
209
|
--uva-color-control-border: light-dark(var(--uva-grey, #808080), #7a84a0);
|
|
91
210
|
--uva-color-surface-raised: light-dark(#ffffff, #232d4b);
|
|
92
211
|
--uva-color-input-text: light-dark(#1f2937, #e8e8e8);
|
|
@@ -100,6 +219,10 @@
|
|
|
100
219
|
--uva-color-alert-info-border: light-dark(var(--uva-blue-alt, #007bac), #55c4ec);
|
|
101
220
|
--uva-color-alert-info-bg: light-dark(var(--uva-blue-alt-300, #bfe7f7), #0d3247);
|
|
102
221
|
--uva-color-on-accent: light-dark(#ffffff, #10172b);
|
|
222
|
+
--uva-color-alert-link: light-dark(var(--uva-blue-alt-B, #141e3c), #ffffff);
|
|
223
|
+
--uva-color-link: light-dark(var(--uva-brand-blue, #232d4b), #87b9d9);
|
|
224
|
+
--uva-color-highlight: light-dark(var(--uva-brand-orange-200, #ffc999), #854200);
|
|
225
|
+
--uva-color-on-highlight: light-dark(var(--uva-grey-darkest, #2b2b2b), #ffffff);
|
|
103
226
|
}
|
|
104
227
|
:root[data-uva-color-scheme='system'] {
|
|
105
228
|
color-scheme: light dark;
|
|
@@ -499,19 +622,168 @@
|
|
|
499
622
|
animation: none;
|
|
500
623
|
}
|
|
501
624
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
.
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
.
|
|
513
|
-
|
|
514
|
-
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
.uvalib-message {
|
|
628
|
+
display: block;
|
|
629
|
+
box-sizing: border-box;
|
|
630
|
+
max-inline-size: 100%;
|
|
631
|
+
margin-block: 1rem;
|
|
632
|
+
padding: 0.75rem 1rem;
|
|
633
|
+
border: 1px solid transparent;
|
|
634
|
+
border-inline-start: 6px solid var(--uva-color-alert-info-border, var(--uva-blue-alt, #007bac));
|
|
635
|
+
border-radius: 0.3rem;
|
|
636
|
+
background: var(--uva-color-alert-info-bg, var(--uva-blue-alt-300, #bfe7f7));
|
|
637
|
+
color: var(--uva-color-alert-text, var(--uva-grey-darkest, #2b2b2b));
|
|
638
|
+
line-height: 1.5;
|
|
639
|
+
overflow-wrap: anywhere;
|
|
640
|
+
}
|
|
641
|
+
.uvalib-message > :first-child {
|
|
642
|
+
margin-block-start: 0;
|
|
643
|
+
}
|
|
644
|
+
.uvalib-message > :last-child {
|
|
645
|
+
margin-block-end: 0;
|
|
646
|
+
}
|
|
647
|
+
.uvalib-message a,
|
|
648
|
+
.uvalib-message a:visited {
|
|
649
|
+
color: var(--uva-color-alert-link, var(--uva-blue-alt-B, #141e3c));
|
|
650
|
+
text-decoration: underline;
|
|
651
|
+
}
|
|
652
|
+
/* The ring follows the text colour, chosen to read on the message's own background. */
|
|
653
|
+
.uvalib-message a:focus-visible {
|
|
654
|
+
outline: 2px solid currentColor;
|
|
655
|
+
outline-offset: 2px;
|
|
656
|
+
}
|
|
657
|
+
.uvalib-message__label {
|
|
658
|
+
font-weight: 700;
|
|
659
|
+
}
|
|
660
|
+
.uvalib-message__icon {
|
|
661
|
+
display: inline-block;
|
|
662
|
+
inline-size: 1.25em;
|
|
663
|
+
block-size: 1.25em;
|
|
664
|
+
margin-inline-end: 0.35em;
|
|
665
|
+
vertical-align: -0.25em;
|
|
666
|
+
}
|
|
667
|
+
.uvalib-message--error {
|
|
668
|
+
border-inline-start-color: var(--uva-color-alert-critical-border, var(--uva-red-B, #b30000));
|
|
669
|
+
background: var(--uva-color-alert-critical-bg, var(--uva-red-100, #fbcfda));
|
|
670
|
+
}
|
|
671
|
+
.uvalib-message--warning {
|
|
672
|
+
border-inline-start-color: var(--uva-color-alert-warning-border, var(--uva-yellow, #ecc602));
|
|
673
|
+
background: var(--uva-color-alert-warning-bg, var(--uva-yellow-100, #fef6c8));
|
|
674
|
+
}
|
|
675
|
+
.uvalib-message:is(.uvalib-message--info, .uvalib-message--notice) {
|
|
676
|
+
border-inline-start-color: var(--uva-color-alert-info-border, var(--uva-blue-alt, #007bac));
|
|
677
|
+
background: var(--uva-color-alert-info-bg, var(--uva-blue-alt-300, #bfe7f7));
|
|
678
|
+
}
|
|
679
|
+
.uvalib-message--success {
|
|
680
|
+
border-inline-start-color: var(--uva-color-status-success-border, var(--uva-green-A, #4e9737));
|
|
681
|
+
background: var(--uva-color-status-success-bg, var(--uva-green-200, #ddefdc));
|
|
682
|
+
}
|
|
683
|
+
@media (forced-colors: active) {
|
|
684
|
+
.uvalib-message {
|
|
685
|
+
border-color: CanvasText;
|
|
686
|
+
}
|
|
687
|
+
.uvalib-message a:focus-visible {
|
|
688
|
+
outline-color: Highlight;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
.uvalib-result-list {
|
|
694
|
+
display: block;
|
|
695
|
+
margin: 0 0 1rem;
|
|
696
|
+
padding: 0;
|
|
697
|
+
list-style: none;
|
|
698
|
+
}
|
|
699
|
+
.uvalib-result {
|
|
700
|
+
display: grid;
|
|
701
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
702
|
+
column-gap: 1rem;
|
|
703
|
+
align-items: start;
|
|
704
|
+
margin: 0;
|
|
705
|
+
padding: 0.75rem 0.5rem;
|
|
706
|
+
border-block-end: 1px solid var(--uva-color-track, #e5e7eb);
|
|
707
|
+
line-height: 1.5;
|
|
708
|
+
overflow-wrap: anywhere;
|
|
709
|
+
content-visibility: auto;
|
|
710
|
+
contain-intrinsic-block-size: auto 7rem;
|
|
711
|
+
}
|
|
712
|
+
.uvalib-result > * {
|
|
713
|
+
grid-column: 1;
|
|
714
|
+
min-inline-size: 0;
|
|
715
|
+
margin: 0;
|
|
716
|
+
}
|
|
717
|
+
.uvalib-result__meta {
|
|
718
|
+
display: flex;
|
|
719
|
+
flex-wrap: wrap;
|
|
720
|
+
align-items: center;
|
|
721
|
+
gap: 0.25rem 0.75rem;
|
|
722
|
+
color: var(--uva-color-text-muted, var(--uva-grey-A, #4f4f4f));
|
|
723
|
+
font-size: 0.875rem;
|
|
724
|
+
}
|
|
725
|
+
/* Only as wide as its text, so the space beside a short title is not a link. */
|
|
726
|
+
.uvalib-result__title {
|
|
727
|
+
display: block;
|
|
728
|
+
justify-self: start;
|
|
729
|
+
font-size: 1.125rem;
|
|
730
|
+
font-weight: 600;
|
|
731
|
+
line-height: 1.4;
|
|
732
|
+
}
|
|
733
|
+
:is(a.uvalib-result__title, .uvalib-result__title a) {
|
|
734
|
+
color: var(--uva-color-link, var(--uva-brand-blue, #232d4b));
|
|
735
|
+
text-decoration: underline;
|
|
736
|
+
text-decoration-thickness: 1px;
|
|
737
|
+
text-underline-offset: 0.15em;
|
|
738
|
+
}
|
|
739
|
+
:is(a.uvalib-result__title, .uvalib-result__title a):hover {
|
|
740
|
+
text-decoration-thickness: 3px;
|
|
741
|
+
}
|
|
742
|
+
:is(a.uvalib-result__title, .uvalib-result__title a):focus-visible {
|
|
743
|
+
outline: 3px solid var(--uva-color-focus, var(--uva-brand-orange, #e57200));
|
|
744
|
+
outline-offset: 2px;
|
|
745
|
+
}
|
|
746
|
+
.uvalib-result__snippet {
|
|
747
|
+
display: block;
|
|
748
|
+
margin-block-start: 0.25rem;
|
|
749
|
+
}
|
|
750
|
+
.uvalib-result__snippet mark {
|
|
751
|
+
padding-inline: 0.1em;
|
|
752
|
+
border-radius: 2px;
|
|
753
|
+
background: var(--uva-color-highlight, var(--uva-brand-orange-200, #ffc999));
|
|
754
|
+
color: var(--uva-color-on-highlight, var(--uva-grey-darkest, #2b2b2b));
|
|
755
|
+
font-weight: 700;
|
|
756
|
+
}
|
|
757
|
+
/* Wide: the actions at the end of the row, beside its first lines. */
|
|
758
|
+
.uvalib-result > .uvalib-result__actions {
|
|
759
|
+
display: flex;
|
|
760
|
+
flex-wrap: wrap;
|
|
761
|
+
justify-content: flex-end;
|
|
762
|
+
gap: 0.5rem;
|
|
763
|
+
grid-column: 2;
|
|
764
|
+
grid-row: 1 / span 4;
|
|
765
|
+
}
|
|
766
|
+
/* Phones: the actions below the row's text, wrapping. */
|
|
767
|
+
@media (max-width: 40em) {
|
|
768
|
+
.uvalib-result > .uvalib-result__actions {
|
|
769
|
+
justify-content: flex-start;
|
|
770
|
+
grid-column: 1;
|
|
771
|
+
grid-row: auto;
|
|
772
|
+
margin-block-start: 0.5rem;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
@media (forced-colors: active) {
|
|
776
|
+
.uvalib-result__snippet mark {
|
|
777
|
+
forced-color-adjust: none;
|
|
778
|
+
background: Highlight;
|
|
779
|
+
color: HighlightText;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
/* hidden hides every base.css class, though each sets display (see hidden.ts). */
|
|
785
|
+
:where(.uvalib-button, .uvalib-input, .uvalib-search-form, .uvalib-badge, .uvalib-media, .uvalib-media__badges, .uvalib-toolbar, .uvalib-toolbar__field, .uvalib-toolbar__group, .uvalib-toolbar__summary, .uvalib-empty-state, .uvalib-skeleton, .uvalib-skeleton-text, .uvalib-message, .uvalib-message__icon, .uvalib-result-list, .uvalib-result, .uvalib-result__title, .uvalib-result__meta, .uvalib-result__snippet, .uvalib-result__actions)[hidden],
|
|
786
|
+
:where(.uvalib-media > :is(img, video, picture))[hidden] {
|
|
515
787
|
display: none !important;
|
|
516
788
|
}
|
|
517
789
|
|
package/dist-cdn/bento-box.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as e, f as t, i as n, l as r, m as i, n as a, o, p as s, r as c, t as l } from "./chunks/UvalibElement-
|
|
2
|
-
import { n as u, t as d } from "./chunks/static-html-
|
|
1
|
+
import { a as e, f as t, i as n, l as r, m as i, n as a, o, p as s, r as c, t as l } from "./chunks/UvalibElement-pGONDAwB.js";
|
|
2
|
+
import { n as u, t as d } from "./chunks/static-html-C1rhtCHu.js";
|
|
3
3
|
import { a as f, i as p, o as m } from "./chunks/analytics-DTTihuBD.js";
|
|
4
4
|
import { t as h } from "./chunks/heading-level-DIuNS44-.js";
|
|
5
|
-
import { t as g } from "./chunks/accessible-
|
|
5
|
+
import { t as g } from "./chunks/accessible-DJv7YOtS.js";
|
|
6
6
|
import { n as ee, t as _ } from "./chunks/fetch-json-Cyqv-gLU.js";
|
|
7
7
|
// src/components/bento-box/BentoSection.ts
|
|
8
8
|
var te = 5, v = 3, ne = 50, y = (e) => `
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, f as t, n, t as r } from "./UvalibElement-
|
|
1
|
+
import { a as e, f as t, n, t as r } from "./UvalibElement-pGONDAwB.js";
|
|
2
2
|
import { a as i, n as a, t as o } from "./analytics-DTTihuBD.js";
|
|
3
3
|
import { n as s, t as c } from "./analytics-state-Ce8DKe4F.js";
|
|
4
4
|
// src/data/sites.ts
|
|
@@ -93,22 +93,36 @@ var d = s;
|
|
|
93
93
|
function f(e) {
|
|
94
94
|
return !!document.querySelector("script[src*=\"matomo.js\"]") || e.some((e) => Array.isArray(e) && e[0] === "setSiteId");
|
|
95
95
|
}
|
|
96
|
-
var p = "epub|mobi|csv|tsv|json|xml|zip|tar|gz|mp3|mp4|m4a|tif|tiff|jp2|mrc|ris|bib|txt", m = "
|
|
97
|
-
function g() {
|
|
96
|
+
var p = "epub|mobi|csv|tsv|json|xml|zip|tar|gz|mp3|mp4|m4a|tif|tiff|jp2|mrc|ris|bib|txt", m = new Set(`7z|aac|apk|arc|arj|asc|asf|asx|avi|azw3|bin|csv|deb|dmg|doc|docx|epub|exe|flv|gif|gz|gzip|hqx|ibooks|jar|jpg|jpeg|js|mobi|mp2|mp3|mp4|mpg|mpeg|mov|movie|msi|msp|odb|odf|odg|ods|odt|ogg|ogv|pdf|phps|png|ppt|pptx|qt|qtm|ra|ram|rar|rpm|rtf|sea|sit|tar|tbz|tbz2|bz|bz2|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xlsx|xml|z|zip|${p}`.split("|")), h = (e) => /\.([a-z0-9]{1,10})$/i.exec(e)?.[1]?.toLowerCase();
|
|
97
|
+
function g(e) {
|
|
98
|
+
let t = "";
|
|
99
|
+
try {
|
|
100
|
+
t = new URL(e.href).pathname;
|
|
101
|
+
} catch {}
|
|
102
|
+
let n = h(t);
|
|
103
|
+
if (n && m.has(n)) return n;
|
|
104
|
+
if (e.hasAttribute("download")) return h(e.getAttribute("download") ?? "") ?? n ?? "file";
|
|
105
|
+
}
|
|
106
|
+
var _ = (e) => e.classList.contains("matomo_ignore") || e.classList.contains("piwik_ignore");
|
|
107
|
+
function v(e) {
|
|
108
|
+
return /^https?:$/.test(e.protocol) && e.hostname !== location.hostname;
|
|
109
|
+
}
|
|
110
|
+
var y = "uvalib-analytics-pushstate", b = Symbol.for("@uvalib/web-components/analytics-pushstate");
|
|
111
|
+
function x() {
|
|
98
112
|
let e = history;
|
|
99
|
-
if (e[
|
|
100
|
-
e[
|
|
113
|
+
if (e[b]) return;
|
|
114
|
+
e[b] = !0;
|
|
101
115
|
let t = e.pushState;
|
|
102
116
|
e.pushState = function(...e) {
|
|
103
|
-
t.apply(this, e), window.dispatchEvent(new Event(
|
|
117
|
+
t.apply(this, e), window.dispatchEvent(new Event(y));
|
|
104
118
|
};
|
|
105
119
|
}
|
|
106
|
-
var
|
|
120
|
+
var S = [
|
|
107
121
|
"hashchange",
|
|
108
122
|
"popstate",
|
|
109
|
-
|
|
110
|
-
],
|
|
111
|
-
function
|
|
123
|
+
y
|
|
124
|
+
], C = () => window.navigation;
|
|
125
|
+
function w(e) {
|
|
112
126
|
let [t, n, r, i] = e.split(",").map((e) => e.trim());
|
|
113
127
|
if (!t || !n) return null;
|
|
114
128
|
let a = [t, n];
|
|
@@ -116,12 +130,12 @@ function y(e) {
|
|
|
116
130
|
let o = Number(i);
|
|
117
131
|
return r && i && Number.isFinite(o) && a.push(o), a;
|
|
118
132
|
}
|
|
119
|
-
function
|
|
133
|
+
function T(e) {
|
|
120
134
|
if (e == null || e === "") return !1;
|
|
121
135
|
let t = Number(e);
|
|
122
136
|
return Number.isFinite(t) ? t : !1;
|
|
123
137
|
}
|
|
124
|
-
var
|
|
138
|
+
var E = class extends r {
|
|
125
139
|
constructor(...e) {
|
|
126
140
|
super(...e), this.matomoURL = "https://analytics.lib.virginia.edu/", this.spa = !1, this.variables = null, this.tracker = { off: !1 }, this.onEvent = (e) => {
|
|
127
141
|
if (!this.forwards()) return;
|
|
@@ -130,13 +144,7 @@ var x = class extends r {
|
|
|
130
144
|
let n = e.detail ?? {};
|
|
131
145
|
t === "event" ? this.logEvent(n) : t === "search" ? this.logSearch(n) : t === "content" ? this.logContent(n) : this.logPageView(n);
|
|
132
146
|
}, this.onClick = (e) => {
|
|
133
|
-
|
|
134
|
-
let e = t instanceof Element ? t.getAttribute("data-uvalib-track") : null;
|
|
135
|
-
if (e === null) continue;
|
|
136
|
-
let n = y(e);
|
|
137
|
-
n && i(t, n);
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
147
|
+
this.forwards() && (e.type === "click" && this.trackTagged(e), d().downloads === "event" && this.trackLink(e));
|
|
140
148
|
}, this.routeFrame = 0, this.onRoute = () => {
|
|
141
149
|
cancelAnimationFrame(this.routeFrame), this.routeFrame = requestAnimationFrame(() => this.autoPageView());
|
|
142
150
|
}, this.onNavigation = (e) => {
|
|
@@ -151,6 +159,26 @@ var x = class extends r {
|
|
|
151
159
|
}
|
|
152
160
|
`;
|
|
153
161
|
}
|
|
162
|
+
trackLink(e) {
|
|
163
|
+
if (e.button !== +(e.type === "auxclick")) return;
|
|
164
|
+
let t = e.composedPath().find((e) => (e instanceof HTMLAnchorElement || e instanceof HTMLAreaElement) && e.hasAttribute("href"));
|
|
165
|
+
if (!t || _(t)) return;
|
|
166
|
+
let n = g(t);
|
|
167
|
+
n ? i(t, ["download", n]) : d().outlinks && t.getRootNode() === document && v(t) && o(t) && this.paq.push([
|
|
168
|
+
"trackLink",
|
|
169
|
+
t.href,
|
|
170
|
+
"link"
|
|
171
|
+
]);
|
|
172
|
+
}
|
|
173
|
+
trackTagged(e) {
|
|
174
|
+
for (let t of e.composedPath()) {
|
|
175
|
+
let e = t instanceof Element ? t.getAttribute("data-uvalib-track") : null;
|
|
176
|
+
if (e === null) continue;
|
|
177
|
+
let n = w(e);
|
|
178
|
+
n && i(t, n);
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
154
182
|
autoPageView() {
|
|
155
183
|
let e = d(), t = location.href;
|
|
156
184
|
if (!this.forwards() || !e.booted || t === e.pageUrl || !o(this)) return;
|
|
@@ -159,17 +187,17 @@ var x = class extends r {
|
|
|
159
187
|
}
|
|
160
188
|
listenRoutes(e) {
|
|
161
189
|
let t = e ? "addEventListener" : "removeEventListener";
|
|
162
|
-
for (let e of
|
|
163
|
-
|
|
190
|
+
for (let e of S) window[t](e, this.onRoute);
|
|
191
|
+
C()?.[t]("currententrychange", this.onNavigation), e || cancelAnimationFrame(this.routeFrame);
|
|
164
192
|
}
|
|
165
193
|
connectedCallback() {
|
|
166
194
|
super.connectedCallback(), (a() || document.documentElement.dataset.uvalibAnalytics === "off") && (this.tracker.off = !0), d().trackers.push(this.tracker);
|
|
167
195
|
for (let e of c) document.addEventListener(e, this.onEvent);
|
|
168
|
-
document.addEventListener("click", this.onClick, !0), this.spa === "auto" && (
|
|
196
|
+
document.addEventListener("click", this.onClick, !0), document.addEventListener("auxclick", this.onClick, !0), this.spa === "auto" && (x(), this.listenRoutes(!0));
|
|
169
197
|
}
|
|
170
198
|
disconnectedCallback() {
|
|
171
199
|
for (let e of c) document.removeEventListener(e, this.onEvent);
|
|
172
|
-
document.removeEventListener("click", this.onClick, !0), this.listenRoutes(!1);
|
|
200
|
+
document.removeEventListener("click", this.onClick, !0), document.removeEventListener("auxclick", this.onClick, !0), this.listenRoutes(!1);
|
|
173
201
|
let { trackers: e } = d(), t = e.indexOf(this.tracker);
|
|
174
202
|
t >= 0 && e.splice(t, 1), super.disconnectedCallback();
|
|
175
203
|
}
|
|
@@ -197,9 +225,10 @@ var x = class extends r {
|
|
|
197
225
|
e,
|
|
198
226
|
t
|
|
199
227
|
]);
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
228
|
+
let r = this.downloads === "event";
|
|
229
|
+
r ? t.downloads = "event" : n.push(["addDownloadExtensions", p]), this.spa === "auto" ? n.push(["trackPageView"]) : this.spa || (n.push(["trackPageView"]), r ? t.outlinks = !0 : n.push(["enableLinkTracking"]));
|
|
230
|
+
let i = document.createElement("script");
|
|
231
|
+
i.async = !0, i.src = `${this.matomoURL}matomo.js`, document.head.append(i);
|
|
203
232
|
}
|
|
204
233
|
logPageView(e) {
|
|
205
234
|
let t = e.customTitle || document.title, n = e.referrer ? e.referrer.startsWith("http") ? e.referrer : location.origin + e.referrer : document.referrer;
|
|
@@ -210,7 +239,7 @@ var x = class extends r {
|
|
|
210
239
|
"trackSiteSearch",
|
|
211
240
|
e.searchQuery,
|
|
212
241
|
e.searchCategory || !1,
|
|
213
|
-
|
|
242
|
+
T(e.resultCount)
|
|
214
243
|
]);
|
|
215
244
|
}
|
|
216
245
|
logContent(e) {
|
|
@@ -237,7 +266,7 @@ var x = class extends r {
|
|
|
237
266
|
return null;
|
|
238
267
|
}
|
|
239
268
|
};
|
|
240
|
-
n([e({ type: String })],
|
|
241
|
-
export {
|
|
269
|
+
n([e({ type: String })], E.prototype, "matomoURL", void 0), n([e({ type: Number })], E.prototype, "matomoId", void 0), n([e({ converter: (e) => e === null ? !1 : e !== "auto" || "auto" })], E.prototype, "spa", void 0), n([e({ type: Object })], E.prototype, "variables", void 0), n([e({ type: String })], E.prototype, "downloads", void 0);
|
|
270
|
+
export { E as t };
|
|
242
271
|
|
|
243
|
-
//# sourceMappingURL=SiteAnalytics-
|
|
272
|
+
//# sourceMappingURL=SiteAnalytics-B9gu5aGO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SiteAnalytics-B9gu5aGO.js","names":["_decorate","property","n","i","UvalibElement","trackEvent","privacySignal","analyticsAllowed","analyticsState","ANALYTICS_EVENTS","sites","findMatomoId","matched","list","s","href","u","fallback","shared","matomoOnPage","paq","c","DOWNLOADS","DOWNLOAD_TYPES","extensionOf","name","downloadType","path","link","ext","ignoredLink","isOutlink","PUSH_STATE","WRAPPED","wrapPushState","h","push","args","ROUTE_EVENTS","navigationApi","trackedEvent","category","action","value","spec","p","event","v","countOf","SiteAnalytics","_args","type","detail","state","url","referrer","method","on","t","trackers","id","key","events","script","title","d","target","tail","parts","__decorate"],"sources":["../../src/data/sites.ts","../../src/components/site-analytics/SiteAnalytics.ts"],"sourcesContent":["export interface Site {\n name: string;\n /** Absent for sites that are listed but have no Matomo property. */\n matomoSiteId?: number;\n description?: string;\n urls?: string[];\n inactive?: boolean;\n matomoDefault?: boolean;\n}\n\nexport const sites: Site[] = [\n {\n name: '100 Objects',\n matomoSiteId: 31,\n urls: ['https://100objects.lib.virginia.edu/'],\n },\n {\n name: 'Avalon',\n matomoSiteId: 42,\n urls: ['https://avalon.lib.virginia.edu/'],\n },\n {\n name: 'Explore',\n matomoSiteId: 2,\n urls: ['https://explore.lib.virginia.edu/'],\n },\n {\n name: 'Faculty Newsletter',\n matomoSiteId: 22,\n inactive: true,\n },\n {\n name: 'Library Cluster',\n matomoSiteId: 3,\n urls: ['https://jti.lib.virginia.edu/', 'https://etext.virginia.edu/'],\n inactive: true,\n },\n {\n name: 'Library Web Site',\n matomoSiteId: 10,\n urls: ['https://www.library.virginia.edu/', 'https://library.virginia.edu/'],\n },\n {\n name: 'Mobile',\n matomoSiteId: 13,\n inactive: true,\n },\n {\n name: 'Research Guides',\n matomoSiteId: 5,\n urls: ['https://guides.lib.virginia.edu/'],\n },\n {\n name: 'Staff newsletter',\n matomoSiteId: 26,\n inactive: true,\n },\n {\n name: 'Tedium Reducer III',\n matomoSiteId: 41,\n urls: ['https://fillholdreader.internal.lib.virginia.edu/'],\n },\n {\n name: 'Test UX',\n matomoSiteId: 23,\n description: 'Test Matomo Id for development/testing purposes',\n matomoDefault: true,\n },\n {\n name: 'The Taper',\n matomoSiteId: 25,\n urls: ['https://thetaper.library.virginia.edu/'],\n },\n {\n name: 'Virgo',\n matomoSiteId: 1,\n urls: ['https://search.lib.virginia.edu/'],\n },\n {\n name: 'Virgo Lite',\n matomoSiteId: 40,\n urls: ['https://search-kiosk.lib.virginia.edu/'],\n },\n {\n name: 'Modern Library Bibliography',\n urls: ['https://mlbib.library.virginia.edu/'],\n },\n {\n name: 'Board of Visitors Minutes',\n urls: ['https://bov.library.virginia.edu/'],\n },\n];\n\n/** Matomo site id for an href: first site whose url prefixes it, else the matomoDefault site's id. */\nexport function findMatomoId(href: string, list: Site[] = sites): number | undefined {\n const matched = list.find((s) => s.urls?.some((u) => href.startsWith(u)));\n const fallback = list.find((s) => s.matomoDefault === true);\n return matched?.matomoSiteId || fallback?.matomoSiteId;\n}\n","import { css } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { UvalibElement } from '../../base/UvalibElement.js';\nimport { findMatomoId } from '../../data/sites.js';\nimport {\n analyticsAllowed,\n privacySignal,\n trackEvent,\n type AnalyticsContent,\n type AnalyticsEvent,\n} from '../../base/analytics.js';\nimport {\n analyticsState,\n ANALYTICS_EVENTS,\n type AnalyticsTracker,\n} from '../../base/analytics-state.js';\n\n/** The page's window with Matomo's command queue, which matomo.js replays when it loads. */\ntype MatomoWindow = Window & { _paq?: unknown[][] };\n\ninterface PageViewDetail {\n customTitle?: string;\n referrer?: string;\n}\n\ninterface SearchDetail {\n searchQuery?: string;\n searchCategory?: string | null;\n resultCount?: number | string | null;\n}\n\ninterface EventDetail {\n event?: unknown[];\n /** The old name of `event`. */\n track?: unknown[];\n}\n\ntype Tracker = AnalyticsTracker;\nconst shared = analyticsState;\n\n/** Matomo is already on the page: a matomo.js script, or a queue that sets a site id. */\nfunction matomoOnPage(paq: unknown[][]): boolean {\n return (\n !!document.querySelector('script[src*=\"matomo.js\"]') ||\n paq.some((c) => Array.isArray(c) && c[0] === 'setSiteId')\n );\n}\n\n/** File types Matomo's link tracking counts as downloads, besides its own (pdf, doc*, xls*, …). */\nconst DOWNLOADS = 'epub|mobi|csv|tsv|json|xml|zip|tar|gz|mp3|mp4|m4a|tif|tiff|jp2|mrc|ris|bib|txt';\n\n/** Matomo's own download extensions (matomo.js `configDownloadExtensions`). */\nconst MATOMO_DOWNLOADS =\n '7z|aac|apk|arc|arj|asc|asf|asx|avi|azw3|bin|csv|deb|dmg|doc|docx|epub|exe|flv|gif|gz|gzip|' +\n 'hqx|ibooks|jar|jpg|jpeg|js|mobi|mp2|mp3|mp4|mpg|mpeg|mov|movie|msi|msp|odb|odf|odg|ods|odt|' +\n 'ogg|ogv|pdf|phps|png|ppt|pptx|qt|qtm|ra|ram|rar|rpm|rtf|sea|sit|tar|tbz|tbz2|bz|bz2|tgz|' +\n 'torrent|txt|wav|wma|wmv|wpd|xls|xlsx|xml|z|zip';\n\n/** What `downloads=\"event\"` counts as a download: Matomo's types and the library's. */\nconst DOWNLOAD_TYPES = new Set(`${MATOMO_DOWNLOADS}|${DOWNLOADS}`.split('|'));\n\n/** A file name's extension, lowercase (up to 10 letters or digits), or undefined. */\nconst extensionOf = (name: string): string | undefined =>\n /\\.([a-z0-9]{1,10})$/i.exec(name)?.[1]?.toLowerCase();\n\n/**\n * `downloads=\"event\"`: the extension a link to a file is counted under, or undefined when it\n * is not a download. A download is a link with the `download` attribute (named by its file\n * name's extension, its URL's, or `file`) or to a file of a download type.\n */\nfunction downloadType(link: HTMLAnchorElement | HTMLAreaElement): string | undefined {\n let path = '';\n try {\n path = new URL(link.href).pathname;\n } catch {\n /* not a URL: only the download attribute can make it a download */\n }\n const ext = extensionOf(path);\n if (ext && DOWNLOAD_TYPES.has(ext)) return ext;\n if (!link.hasAttribute('download')) return undefined;\n return extensionOf(link.getAttribute('download') ?? '') ?? ext ?? 'file';\n}\n\n/** Matomo's own opt-out classes for a link. */\nconst ignoredLink = (link: Element) =>\n link.classList.contains('matomo_ignore') || link.classList.contains('piwik_ignore');\n\n/** An http(s) link to another host: what Matomo's link tracking counts as an outlink. */\nfunction isOutlink(link: HTMLAnchorElement | HTMLAreaElement): boolean {\n return /^https?:$/.test(link.protocol) && link.hostname !== location.hostname;\n}\n\n/** Fired on `window` after `history.pushState`, by the one wrapper on the page. */\nconst PUSH_STATE = 'uvalib-analytics-pushstate';\nconst WRAPPED = Symbol.for('@uvalib/web-components/analytics-pushstate');\n\n/**\n * Wrap `history.pushState` once per page, whichever copy of this library comes first, to fire\n * `PUSH_STATE` after each call. The wrapper stays: other code may have wrapped it since.\n */\nfunction wrapPushState(): void {\n const h = history as History & { [WRAPPED]?: true };\n if (h[WRAPPED]) return;\n h[WRAPPED] = true;\n const push = h.pushState;\n h.pushState = function (this: History, ...args: Parameters<History['pushState']>) {\n push.apply(this, args);\n window.dispatchEvent(new Event(PUSH_STATE));\n };\n}\n\n/** The route-change events `spa=\"auto\"` listens for on `window`, and on `navigation`. */\nconst ROUTE_EVENTS = ['hashchange', 'popstate', PUSH_STATE];\n\ntype NavigationTarget = EventTarget | undefined;\nconst navigationApi = (): NavigationTarget =>\n (window as Window & { navigation?: EventTarget }).navigation;\n\n/** `data-uvalib-track=\"category,action[,name[,value]]\"` as an event, or null. */\nfunction trackedEvent(spec: string): AnalyticsEvent | null {\n const [category, action, name, value] = spec.split(',').map((p) => p.trim());\n if (!category || !action) return null;\n const event: AnalyticsEvent = [category, action];\n if (name) event.push(name);\n const v = Number(value);\n if (name && value && Number.isFinite(v)) event.push(v);\n return event;\n}\n\n/** A result count for Matomo: a number, or `false` (Matomo's \"unknown\"). */\nfunction countOf(n: SearchDetail['resultCount']): number | false {\n if (n === null || n === undefined || n === '') return false;\n const v = Number(n);\n return Number.isFinite(v) ? v : false;\n}\n\n/**\n * Matomo analytics, with no visual output. Loads matomo.js for the site and records the\n * page view, then forwards the events below, fired anywhere in the page, to Matomo. Every\n * call goes through Matomo's `_paq` queue, so events fired before matomo.js loads are kept.\n *\n * One tracker per page: however many `<site-analytics>` and `<uvalib-analytics>` elements\n * there are (from any copy of this library), matomo.js is loaded and the page view recorded\n * once, and only one element forwards each event; if it is removed, the next takes over. A\n * Matomo snippet already on the page is used as it is (nothing is loaded or recorded again).\n *\n * When the browser sends Do Not Track or Global Privacy Control, or the page has `<html\n * data-uvalib-analytics=\"off\">`, it loads nothing and records nothing. A click on an element with `data-uvalib-track=\"category,action[,name[,value]]\"`\n * (or inside one, in light or shadow DOM) sends that event, unless `<html\n * data-uvalib-analytics=\"off\">` or a `no-analytics` ancestor opts it out.\n * With `downloads=\"event\"` downloads are counted as `['download', '<extension>']` events,\n * without their URLs, instead of by Matomo's link tracking.\n *\n * The same element is registered as `<uvalib-analytics>` by `uvalib-analytics.js`.\n *\n * @tagname site-analytics\n * @fires uvalib-analytics-pageview - Listened for on `document` (not fired): records a page view; `detail` is `{ customTitle?, referrer? }` (default: the document's title and referrer; a referrer without `http` is taken as a path on this origin).\n * @fires uvalib-analytics-search - Listened for on `document` (not fired): a Matomo site search; `detail` is `{ searchQuery, searchCategory?, resultCount? }`.\n * @fires uvalib-analytics-event - Listened for on `document` (not fired): a Matomo event; `detail` is `{ event: [category, action, name?, value?] }` (`track` is the old name of `event`).\n * @fires uvalib-analytics-content - Listened for on `document` (not fired): a Matomo content impression; `detail` is `{ name, piece, target?, interaction? }` (with `interaction`, a content interaction instead).\n * @fires site-analytics-pageview - Listened for on `document` too: the same as `uvalib-analytics-pageview`.\n * @fires site-analytics-search - Listened for on `document` too: the same as `uvalib-analytics-search`.\n * @fires site-analytics-event - Listened for on `document` too: the same as `uvalib-analytics-event`.\n * @fires site-analytics-content - Listened for on `document` too: the same as `uvalib-analytics-content`.\n */\nexport class SiteAnalytics extends UvalibElement {\n static styles = css`\n :host {\n display: none;\n }\n `;\n\n /** The Matomo server, ending in `/` (attribute `matomourl`). */\n @property({ type: String }) matomoURL: string = 'https://analytics.lib.virginia.edu/';\n /** The Matomo site id (attribute `matomoid`). Default: the site whose URL the page is under. */\n @property({ type: Number }) matomoId?: number;\n /**\n * A single-page app. `spa` (no value): it records its own page views\n * (`uvalib-analytics-pageview`), none on load. `spa=\"auto\"`: a page view on load and one per\n * same-document route change (hash change, Back and Forward, `history.pushState`), once the\n * title has settled, never twice in a row for the same URL, with the previous URL as the\n * referrer. Either way Matomo's link tracking is off.\n */\n @property({\n converter: (v: string | null) => (v === null ? false : v === 'auto' ? 'auto' : true),\n })\n spa: boolean | 'auto' = false;\n /** Custom dimensions, a JSON object of `{ id: value }`, set before the page view. */\n @property({ type: Object }) variables: Record<string, unknown> | null = null;\n /**\n * `event`: count downloads without their URLs. Matomo's link tracking is left off; a left or\n * middle click on a link to a file (the `download` attribute, or a download file type)\n * sends the event `['download', '<extension>']` (no URL, no file name), and a click on a\n * link to another site is still sent as an outlink (`trackLink`), as Matomo's link tracking\n * would. Off by default. Read when Matomo is set up; no effect with a Matomo snippet already\n * on the page.\n */\n @property({ type: String }) downloads?: string;\n\n private readonly tracker: Tracker = { off: false };\n\n private readonly onEvent = (e: Event) => {\n if (!this.forwards()) return;\n const type = e.type.slice(e.type.lastIndexOf('-') + 1);\n // What the helpers fire is checked already; this covers events fired by hand (mixins,\n // an app's own page views), with the privacy signals read now, not only at connect.\n if (!analyticsAllowed(e.composedPath()[0])) return;\n const detail = (e as CustomEvent).detail ?? {};\n if (type === 'event') this.logEvent(detail as EventDetail);\n else if (type === 'search') this.logSearch(detail as SearchDetail);\n else if (type === 'content') this.logContent(detail as Partial<AnalyticsContent>);\n else this.logPageView(detail as PageViewDetail);\n };\n\n /** A click (or a middle click): `data-uvalib-track`, and with `downloads=\"event\"` links. */\n private readonly onClick = (e: Event) => {\n if (!this.forwards()) return;\n if (e.type === 'click') this.trackTagged(e);\n if (shared().downloads === 'event') this.trackLink(e as MouseEvent);\n };\n\n /**\n * `downloads=\"event\"`: a click on a link to a file sends `['download', '<extension>']`; with\n * `outlinks`, one on a light DOM link to another site sends Matomo's `trackLink` (the URL,\n * as Matomo's own link tracking would).\n */\n private trackLink(e: MouseEvent) {\n if (e.button !== (e.type === 'auxclick' ? 1 : 0)) return;\n const link = e\n .composedPath()\n .find(\n (n): n is HTMLAnchorElement | HTMLAreaElement =>\n (n instanceof HTMLAnchorElement || n instanceof HTMLAreaElement) &&\n n.hasAttribute('href'),\n );\n if (!link || ignoredLink(link)) return;\n const type = downloadType(link);\n if (type) trackEvent(link, ['download', type]);\n else if (\n shared().outlinks &&\n link.getRootNode() === document &&\n isOutlink(link) &&\n analyticsAllowed(link)\n )\n this.paq.push(['trackLink', link.href, 'link']);\n }\n\n /** `data-uvalib-track`: the nearest tagged element on the click's path sends its event. */\n private trackTagged(e: Event) {\n for (const n of e.composedPath()) {\n const spec = n instanceof Element ? n.getAttribute('data-uvalib-track') : null;\n if (spec === null) continue;\n const event = trackedEvent(spec);\n if (event) trackEvent(n, event);\n return;\n }\n }\n\n /** `spa=\"auto\"`: a route change records a page view on the next frame (the new title). */\n private routeFrame = 0;\n private readonly onRoute = () => {\n cancelAnimationFrame(this.routeFrame);\n this.routeFrame = requestAnimationFrame(() => this.autoPageView());\n };\n\n /** The Navigation API also reports replaceState and reloads: neither is a new page. */\n private readonly onNavigation = (e: Event) => {\n const type = (e as Event & { navigationType?: string }).navigationType;\n if (type === 'replace' || type === 'reload') return;\n this.onRoute();\n };\n\n private autoPageView() {\n const state = shared();\n const url = location.href;\n if (!this.forwards() || !state.booted || url === state.pageUrl) return;\n if (!analyticsAllowed(this)) return; // Do Not Track or GPC turned on, or the page opted out\n const referrer = state.pageUrl;\n state.pageUrl = url;\n if (referrer) this.paq.push(['setReferrerUrl', referrer]);\n this.paq.push(['setCustomUrl', url], ['setDocumentTitle', document.title], ['trackPageView']);\n }\n\n /** Listen for route changes (`on`), or stop. */\n private listenRoutes(on: boolean) {\n const method = on ? 'addEventListener' : 'removeEventListener';\n for (const t of ROUTE_EVENTS) window[method](t, this.onRoute);\n navigationApi()?.[method]('currententrychange', this.onNavigation);\n if (!on) cancelAnimationFrame(this.routeFrame);\n }\n\n override connectedCallback() {\n super.connectedCallback();\n // Do Not Track, Global Privacy Control or the page's own off switch: load nothing,\n // record nothing, forward nothing.\n if (privacySignal() || document.documentElement.dataset.uvalibAnalytics === 'off')\n this.tracker.off = true;\n shared().trackers.push(this.tracker);\n for (const t of ANALYTICS_EVENTS) document.addEventListener(t, this.onEvent);\n // Capture: a component that stops a click's propagation does not hide a tagged ancestor.\n document.addEventListener('click', this.onClick, true);\n document.addEventListener('auxclick', this.onClick, true);\n if (this.spa === 'auto') {\n wrapPushState();\n this.listenRoutes(true);\n }\n }\n\n override disconnectedCallback() {\n for (const t of ANALYTICS_EVENTS) document.removeEventListener(t, this.onEvent);\n document.removeEventListener('click', this.onClick, true);\n document.removeEventListener('auxclick', this.onClick, true);\n this.listenRoutes(false);\n const { trackers } = shared();\n const i = trackers.indexOf(this.tracker);\n if (i >= 0) trackers.splice(i, 1);\n super.disconnectedCallback();\n }\n\n /** Whether this element is the page's one forwarder: the first connected one with a site id. */\n private forwards(): boolean {\n return shared().trackers.find((t) => !t.off) === this.tracker;\n }\n\n private get paq(): unknown[][] {\n return ((window as MatomoWindow)._paq ??= []);\n }\n\n protected override firstUpdated() {\n if (this.tracker.off) return; // Do Not Track or Global Privacy Control\n const id = this.matomoId || findMatomoId(window.location.href);\n if (!id) {\n this.tracker.off = true;\n return;\n }\n const state = shared();\n if (this.spa === 'auto') state.pageUrl ??= location.href;\n if (state.booted) return;\n state.booted = true;\n const paq = this.paq;\n if (matomoOnPage(paq)) return;\n paq.push(['setTrackerUrl', `${this.matomoURL}matomo.php`]);\n paq.push(['setSiteId', String(id)]);\n for (const [key, value] of Object.entries(this.variables ?? {}))\n paq.push(['setCustomDimension', key, value]);\n // downloads=\"event\": no Matomo link tracking (it would log each file's URL); this\n // element sends download events, and the outlinks Matomo would have sent.\n const events = this.downloads === 'event';\n if (events) state.downloads = 'event';\n else paq.push(['addDownloadExtensions', DOWNLOADS]);\n if (this.spa === 'auto') {\n paq.push(['trackPageView']);\n } else if (!this.spa) {\n paq.push(['trackPageView']);\n if (events) state.outlinks = true;\n else paq.push(['enableLinkTracking']);\n }\n const script = document.createElement('script');\n script.async = true;\n script.src = `${this.matomoURL}matomo.js`;\n document.head.append(script);\n }\n\n private logPageView(d: PageViewDetail) {\n const title = d.customTitle || document.title;\n const referrer = d.referrer\n ? d.referrer.startsWith('http')\n ? d.referrer\n : location.origin + d.referrer\n : document.referrer;\n this.paq.push(\n ['setDocumentTitle', title],\n ['setReferrerUrl', referrer],\n ['trackPageView', title],\n );\n }\n\n private logSearch(d: SearchDetail) {\n if (!d.searchQuery) return;\n this.paq.push([\n 'trackSiteSearch',\n d.searchQuery,\n d.searchCategory || false,\n countOf(d.resultCount),\n ]);\n }\n\n private logContent(d: Partial<AnalyticsContent>) {\n if (!d.name || !d.piece) return;\n const target = d.target || undefined;\n const tail = target === undefined ? [] : [target];\n this.paq.push(\n d.interaction\n ? ['trackContentInteraction', d.interaction, d.name, d.piece, ...tail]\n : ['trackContentImpression', d.name, d.piece, ...tail],\n );\n }\n\n private logEvent(d: EventDetail) {\n const parts = d.event ?? d.track;\n if (Array.isArray(parts) && parts.length >= 2) this.paq.push(['trackEvent', ...parts]);\n }\n\n protected override render() {\n return null;\n }\n}\n"],"mappings":";;;;AAUA,IAAaU,IAAgB;CAC3B;EACE,MAAM;EACN,cAAc;EACd,MAAM,CAAC,sCAAsC;CAC/C;CACA;EACE,MAAM;EACN,cAAc;EACd,MAAM,CAAC,kCAAkC;CAC3C;CACA;EACE,MAAM;EACN,cAAc;EACd,MAAM,CAAC,mCAAmC;CAC5C;CACA;EACE,MAAM;EACN,cAAc;EACd,UAAU;CACZ;CACA;EACE,MAAM;EACN,cAAc;EACd,MAAM,CAAC,iCAAiC,6BAA6B;EACrE,UAAU;CACZ;CACA;EACE,MAAM;EACN,cAAc;EACd,MAAM,CAAC,qCAAqC,+BAA+B;CAC7E;CACA;EACE,MAAM;EACN,cAAc;EACd,UAAU;CACZ;CACA;EACE,MAAM;EACN,cAAc;EACd,MAAM,CAAC,kCAAkC;CAC3C;CACA;EACE,MAAM;EACN,cAAc;EACd,UAAU;CACZ;CACA;EACE,MAAM;EACN,cAAc;EACd,MAAM,CAAC,mDAAmD;CAC5D;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