@uvalib/web-components 1.0.1 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +772 -33
  3. package/dist/base/analytics-state.d.ts +36 -0
  4. package/dist/base/analytics-state.js +44 -0
  5. package/dist/base/analytics-state.js.map +1 -0
  6. package/dist/base/analytics.d.ts +31 -27
  7. package/dist/base/analytics.js +48 -37
  8. package/dist/base/analytics.js.map +1 -1
  9. package/dist/base/inline-copy.d.ts +16 -0
  10. package/dist/base/inline-copy.js +92 -0
  11. package/dist/base/inline-copy.js.map +1 -0
  12. package/dist/base/source-children.d.ts +46 -0
  13. package/dist/base/source-children.js +116 -0
  14. package/dist/base/source-children.js.map +1 -0
  15. package/dist/base.css +199 -0
  16. package/dist/base.d.ts +2 -2
  17. package/dist/base.js +1 -1
  18. package/dist/base.js.map +1 -1
  19. package/dist/components/bento-box/BentoSection.d.ts +1 -1
  20. package/dist/components/bento-box/BentoSection.js +7 -2
  21. package/dist/components/bento-box/BentoSection.js.map +1 -1
  22. package/dist/components/events-section/EventsSection.d.ts +3 -0
  23. package/dist/components/events-section/EventsSection.js +12 -1
  24. package/dist/components/events-section/EventsSection.js.map +1 -1
  25. package/dist/components/library-weekly-hours/LibraryWeeklyHours.d.ts +1 -0
  26. package/dist/components/library-weekly-hours/LibraryWeeklyHours.js +5 -0
  27. package/dist/components/library-weekly-hours/LibraryWeeklyHours.js.map +1 -1
  28. package/dist/components/site-alerts/SiteAlerts.d.ts +109 -0
  29. package/dist/components/site-alerts/SiteAlerts.js +542 -0
  30. package/dist/components/site-alerts/SiteAlerts.js.map +1 -0
  31. package/dist/components/site-alerts/alerts-source.d.ts +36 -0
  32. package/dist/components/site-alerts/alerts-source.js +115 -0
  33. package/dist/components/site-alerts/alerts-source.js.map +1 -0
  34. package/dist/components/{site-page → site-alerts}/alerts.js +8 -3
  35. package/dist/components/site-alerts/alerts.js.map +1 -0
  36. package/dist/components/site-alerts/body.d.ts +10 -0
  37. package/dist/components/site-alerts/body.js +48 -0
  38. package/dist/components/site-alerts/body.js.map +1 -0
  39. package/dist/components/site-alerts/dismissed.d.ts +12 -0
  40. package/dist/components/site-alerts/dismissed.js +72 -0
  41. package/dist/components/site-alerts/dismissed.js.map +1 -0
  42. package/dist/components/site-alerts/icons.d.ts +8 -0
  43. package/dist/components/site-alerts/icons.js +15 -0
  44. package/dist/components/site-alerts/icons.js.map +1 -0
  45. package/dist/components/site-alerts/site-alerts.d.ts +1 -0
  46. package/dist/components/site-alerts/site-alerts.js +4 -0
  47. package/dist/components/site-alerts/site-alerts.js.map +1 -0
  48. package/dist/components/site-analytics/SiteAnalytics.d.ts +26 -2
  49. package/dist/components/site-analytics/SiteAnalytics.js +140 -4
  50. package/dist/components/site-analytics/SiteAnalytics.js.map +1 -1
  51. package/dist/components/site-footer/SiteFooter.d.ts +4 -0
  52. package/dist/components/site-footer/SiteFooter.js +28 -4
  53. package/dist/components/site-footer/SiteFooter.js.map +1 -1
  54. package/dist/components/site-header/SiteHeader.d.ts +47 -3
  55. package/dist/components/site-header/SiteHeader.js +198 -21
  56. package/dist/components/site-header/SiteHeader.js.map +1 -1
  57. package/dist/components/site-hours-section/SiteHoursSection.d.ts +4 -1
  58. package/dist/components/site-hours-section/SiteHoursSection.js +18 -3
  59. package/dist/components/site-hours-section/SiteHoursSection.js.map +1 -1
  60. package/dist/components/site-main-nav/SiteMainNav.d.ts +1 -1
  61. package/dist/components/site-main-nav/SiteMainNav.js +11 -1
  62. package/dist/components/site-main-nav/SiteMainNav.js.map +1 -1
  63. package/dist/components/site-page/SitePage.d.ts +43 -15
  64. package/dist/components/site-page/SitePage.js +161 -34
  65. package/dist/components/site-page/SitePage.js.map +1 -1
  66. package/dist/components/uvalib-breadcrumbs/UvalibBreadcrumbs.d.ts +91 -0
  67. package/dist/components/uvalib-breadcrumbs/UvalibBreadcrumbs.js +310 -0
  68. package/dist/components/uvalib-breadcrumbs/UvalibBreadcrumbs.js.map +1 -0
  69. package/dist/components/uvalib-breadcrumbs/uvalib-breadcrumbs.d.ts +1 -0
  70. package/dist/components/uvalib-breadcrumbs/uvalib-breadcrumbs.js +4 -0
  71. package/dist/components/uvalib-breadcrumbs/uvalib-breadcrumbs.js.map +1 -0
  72. package/dist/components/uvalib-card/UvalibCard.d.ts +113 -0
  73. package/dist/components/uvalib-card/UvalibCard.js +643 -0
  74. package/dist/components/uvalib-card/UvalibCard.js.map +1 -0
  75. package/dist/components/uvalib-card/uvalib-card.d.ts +1 -0
  76. package/dist/components/uvalib-card/uvalib-card.js +4 -0
  77. package/dist/components/uvalib-card/uvalib-card.js.map +1 -0
  78. package/dist/components/uvalib-card-grid/UvalibCardGrid.d.ts +60 -0
  79. package/dist/components/uvalib-card-grid/UvalibCardGrid.js +305 -0
  80. package/dist/components/uvalib-card-grid/UvalibCardGrid.js.map +1 -0
  81. package/dist/components/uvalib-card-grid/uvalib-card-grid.d.ts +1 -0
  82. package/dist/components/uvalib-card-grid/uvalib-card-grid.js +4 -0
  83. package/dist/components/uvalib-card-grid/uvalib-card-grid.js.map +1 -0
  84. package/dist/components/uvalib-contents/UvalibContents.d.ts +134 -0
  85. package/dist/components/uvalib-contents/UvalibContents.js +613 -0
  86. package/dist/components/uvalib-contents/UvalibContents.js.map +1 -0
  87. package/dist/components/uvalib-contents/uvalib-contents.d.ts +1 -0
  88. package/dist/components/uvalib-contents/uvalib-contents.js +4 -0
  89. package/dist/components/uvalib-contents/uvalib-contents.js.map +1 -0
  90. package/dist/components/uvalib-date-range/UvalibDateRange.d.ts +10 -0
  91. package/dist/components/uvalib-date-range/UvalibDateRange.js +21 -0
  92. package/dist/components/uvalib-date-range/UvalibDateRange.js.map +1 -1
  93. package/dist/components/uvalib-filter/UvalibFilter.d.ts +1 -0
  94. package/dist/components/uvalib-filter/UvalibFilter.js +11 -1
  95. package/dist/components/uvalib-filter/UvalibFilter.js.map +1 -1
  96. package/dist/components/uvalib-lightbox/UvalibLightbox.d.ts +204 -0
  97. package/dist/components/uvalib-lightbox/UvalibLightbox.js +1115 -0
  98. package/dist/components/uvalib-lightbox/UvalibLightbox.js.map +1 -0
  99. package/dist/components/uvalib-lightbox/media.d.ts +51 -0
  100. package/dist/components/uvalib-lightbox/media.js +127 -0
  101. package/dist/components/uvalib-lightbox/media.js.map +1 -0
  102. package/dist/components/uvalib-lightbox/uvalib-lightbox.d.ts +1 -0
  103. package/dist/components/uvalib-lightbox/uvalib-lightbox.js +4 -0
  104. package/dist/components/uvalib-lightbox/uvalib-lightbox.js.map +1 -0
  105. package/dist/components/uvalib-metadata/UvalibMetadata.d.ts +124 -0
  106. package/dist/components/uvalib-metadata/UvalibMetadata.js +443 -0
  107. package/dist/components/uvalib-metadata/UvalibMetadata.js.map +1 -0
  108. package/dist/components/uvalib-metadata/rights.d.ts +8 -0
  109. package/dist/components/uvalib-metadata/rights.js +47 -0
  110. package/dist/components/uvalib-metadata/rights.js.map +1 -0
  111. package/dist/components/uvalib-metadata/uvalib-metadata.d.ts +1 -0
  112. package/dist/components/uvalib-metadata/uvalib-metadata.js +4 -0
  113. package/dist/components/uvalib-metadata/uvalib-metadata.js.map +1 -0
  114. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.d.ts +103 -0
  115. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js +410 -0
  116. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js.map +1 -0
  117. package/dist/components/uvalib-pagefind-search/uvalib-pagefind-search.d.ts +1 -0
  118. package/dist/components/uvalib-pagefind-search/uvalib-pagefind-search.js +7 -0
  119. package/dist/components/uvalib-pagefind-search/uvalib-pagefind-search.js.map +1 -0
  120. package/dist/components/uvalib-pager/UvalibPager.d.ts +94 -0
  121. package/dist/components/uvalib-pager/UvalibPager.js +390 -0
  122. package/dist/components/uvalib-pager/UvalibPager.js.map +1 -0
  123. package/dist/components/uvalib-pager/uvalib-pager.d.ts +1 -0
  124. package/dist/components/uvalib-pager/uvalib-pager.js +4 -0
  125. package/dist/components/uvalib-pager/uvalib-pager.js.map +1 -0
  126. package/dist/components/uvalib-photo-grid/UvalibPhotoGrid.d.ts +59 -0
  127. package/dist/components/uvalib-photo-grid/UvalibPhotoGrid.js +350 -0
  128. package/dist/components/uvalib-photo-grid/UvalibPhotoGrid.js.map +1 -0
  129. package/dist/components/uvalib-photo-grid/uvalib-photo-grid.d.ts +1 -0
  130. package/dist/components/uvalib-photo-grid/uvalib-photo-grid.js +4 -0
  131. package/dist/components/uvalib-photo-grid/uvalib-photo-grid.js.map +1 -0
  132. package/dist/custom-elements.json +10916 -3049
  133. package/dist/index.d.ts +16 -0
  134. package/dist/index.js +11 -0
  135. package/dist/index.js.map +1 -1
  136. package/dist/pagefind.css +388 -0
  137. package/dist/styles/base.js +11 -0
  138. package/dist/styles/base.js.map +1 -1
  139. package/dist/styles/color-scheme.js +24 -11
  140. package/dist/styles/color-scheme.js.map +1 -1
  141. package/dist/styles/controls.d.ts +2 -0
  142. package/dist/styles/controls.js +200 -0
  143. package/dist/styles/controls.js.map +1 -0
  144. package/dist/styles/pagefind.d.ts +1 -0
  145. package/dist/styles/pagefind.js +395 -0
  146. package/dist/styles/pagefind.js.map +1 -0
  147. package/dist/tokens.css +23 -20
  148. package/dist-cdn/base.css +199 -0
  149. package/dist-cdn/bento-box.js +103 -95
  150. package/dist-cdn/bento-box.js.map +1 -1
  151. package/dist-cdn/chunks/SiteAnalytics-Cm-FyhYS.js +243 -0
  152. package/dist-cdn/chunks/SiteAnalytics-Cm-FyhYS.js.map +1 -0
  153. package/dist-cdn/chunks/alerts-C5vkeb-f.js +39 -0
  154. package/dist-cdn/chunks/alerts-C5vkeb-f.js.map +1 -0
  155. package/dist-cdn/chunks/analytics-DTTihuBD.js +43 -0
  156. package/dist-cdn/chunks/analytics-DTTihuBD.js.map +1 -0
  157. package/dist-cdn/chunks/analytics-state-Ce8DKe4F.js +39 -0
  158. package/dist-cdn/chunks/analytics-state-Ce8DKe4F.js.map +1 -0
  159. package/dist-cdn/chunks/{base-DCGd2Oii.js → base-CAFQWnZG.js} +12 -1
  160. package/dist-cdn/chunks/{base-DCGd2Oii.js.map → base-CAFQWnZG.js.map} +1 -1
  161. package/dist-cdn/chunks/{library-weekly-hours-ByQ8ugxh.js → library-weekly-hours-COE7Vv6V.js} +47 -38
  162. package/dist-cdn/chunks/library-weekly-hours-COE7Vv6V.js.map +1 -0
  163. package/dist-cdn/chunks/{site-header-BwDkZ2LL.js → site-header-C9V7Wuw2.js} +169 -49
  164. package/dist-cdn/chunks/site-header-C9V7Wuw2.js.map +1 -0
  165. package/dist-cdn/chunks/{site-main-nav-BLAAunnr.js → site-main-nav-AaxZ9rQf.js} +11 -2
  166. package/dist-cdn/chunks/site-main-nav-AaxZ9rQf.js.map +1 -0
  167. package/dist-cdn/chunks/source-children-RuAec527.js +119 -0
  168. package/dist-cdn/chunks/source-children-RuAec527.js.map +1 -0
  169. package/dist-cdn/custom-elements.json +10916 -3049
  170. package/dist-cdn/events-section.js +78 -66
  171. package/dist-cdn/events-section.js.map +1 -1
  172. package/dist-cdn/library-hours-setup.js +1 -1
  173. package/dist-cdn/library-weekly-hours.js +1 -1
  174. package/dist-cdn/manifest.json +13 -2
  175. package/dist-cdn/pagefind.css +388 -0
  176. package/dist-cdn/site-alerts.js +516 -0
  177. package/dist-cdn/site-alerts.js.map +1 -0
  178. package/dist-cdn/site-analytics.js +1 -1
  179. package/dist-cdn/site-footer.js +33 -18
  180. package/dist-cdn/site-footer.js.map +1 -1
  181. package/dist-cdn/site-header.js +1 -1
  182. package/dist-cdn/site-hours-section.js +33 -21
  183. package/dist-cdn/site-hours-section.js.map +1 -1
  184. package/dist-cdn/site-main-nav.js +1 -1
  185. package/dist-cdn/site-page.js +116 -81
  186. package/dist-cdn/site-page.js.map +1 -1
  187. package/dist-cdn/site-style.js +1 -1
  188. package/dist-cdn/skills/uvalib-web-components/SKILL.md +394 -11
  189. package/dist-cdn/skills/uvalib-web-components/reference/accessibility-testing.md +170 -0
  190. package/dist-cdn/skills/uvalib-web-components/reference/components.md +414 -12
  191. package/dist-cdn/skills/uvalib-web-components/reference/migration.md +15 -0
  192. package/dist-cdn/tokens.css +23 -20
  193. package/dist-cdn/uvalib-analytics.js +1 -1
  194. package/dist-cdn/uvalib-breadcrumbs.js +176 -0
  195. package/dist-cdn/uvalib-breadcrumbs.js.map +1 -0
  196. package/dist-cdn/uvalib-card-grid.js +163 -0
  197. package/dist-cdn/uvalib-card-grid.js.map +1 -0
  198. package/dist-cdn/uvalib-card.js +424 -0
  199. package/dist-cdn/uvalib-card.js.map +1 -0
  200. package/dist-cdn/uvalib-contents.js +381 -0
  201. package/dist-cdn/uvalib-contents.js.map +1 -0
  202. package/dist-cdn/uvalib-date-range.js +33 -18
  203. package/dist-cdn/uvalib-date-range.js.map +1 -1
  204. package/dist-cdn/uvalib-filter.js +32 -11
  205. package/dist-cdn/uvalib-filter.js.map +1 -1
  206. package/dist-cdn/uvalib-lightbox.js +662 -0
  207. package/dist-cdn/uvalib-lightbox.js.map +1 -0
  208. package/dist-cdn/uvalib-metadata.js +313 -0
  209. package/dist-cdn/uvalib-metadata.js.map +1 -0
  210. package/dist-cdn/uvalib-pagefind-search.js +207 -0
  211. package/dist-cdn/uvalib-pagefind-search.js.map +1 -0
  212. package/dist-cdn/uvalib-pager.js +278 -0
  213. package/dist-cdn/uvalib-pager.js.map +1 -0
  214. package/dist-cdn/uvalib-photo-grid.js +202 -0
  215. package/dist-cdn/uvalib-photo-grid.js.map +1 -0
  216. package/package.json +43 -1
  217. package/skills/uvalib-web-components/SKILL.md +394 -11
  218. package/skills/uvalib-web-components/reference/accessibility-testing.md +170 -0
  219. package/skills/uvalib-web-components/reference/components.md +414 -12
  220. package/skills/uvalib-web-components/reference/migration.md +15 -0
  221. package/dist/components/site-page/alerts.js.map +0 -1
  222. package/dist-cdn/chunks/SiteAnalytics-T1Wx3lsb.js +0 -174
  223. package/dist-cdn/chunks/SiteAnalytics-T1Wx3lsb.js.map +0 -1
  224. package/dist-cdn/chunks/analytics-C8D8n_wt.js +0 -55
  225. package/dist-cdn/chunks/analytics-C8D8n_wt.js.map +0 -1
  226. package/dist-cdn/chunks/library-weekly-hours-ByQ8ugxh.js.map +0 -1
  227. package/dist-cdn/chunks/site-header-BwDkZ2LL.js.map +0 -1
  228. package/dist-cdn/chunks/site-main-nav-BLAAunnr.js.map +0 -1
  229. /package/dist/components/{site-page → site-alerts}/alerts.d.ts +0 -0
@@ -1,11 +1,11 @@
1
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-BnI-eRRR.js";
2
2
  import { n as u, t as d } from "./chunks/static-html-1mTAG6nS.js";
3
- import { a as f, i as p } from "./chunks/analytics-C8D8n_wt.js";
4
- import { t as m } from "./chunks/heading-level-DIuNS44-.js";
5
- import { t as h } from "./chunks/accessible-GqhVn5_H.js";
6
- import { n as ee, t as g } from "./chunks/fetch-json-Cyqv-gLU.js";
3
+ import { a as f, i as p, o as m } from "./chunks/analytics-DTTihuBD.js";
4
+ import { t as h } from "./chunks/heading-level-DIuNS44-.js";
5
+ import { t as g } from "./chunks/accessible-GqhVn5_H.js";
6
+ import { n as ee, t as _ } from "./chunks/fetch-json-Cyqv-gLU.js";
7
7
  // src/components/bento-box/BentoSection.ts
8
- var te = 5, _ = 3, v = 50, y = (e) => `
8
+ var te = 5, v = 3, ne = 50, y = (e) => `
9
9
  ${e} { display: block; }
10
10
  ${e} .bs-results--placeholder { visibility: hidden; }
11
11
  ${e} .bs-results--stack { display: grid; }
@@ -67,7 +67,7 @@ var te = 5, _ = 3, v = 50, y = (e) => `
67
67
  `, b = s(y(":host")), x = (e) => e.map((e) => e.mark ? u`<mark>${e.text}</mark>` : e.text), S = class extends l {
68
68
  static {
69
69
  this.styles = [
70
- h,
70
+ g,
71
71
  b,
72
72
  t`
73
73
  :host {
@@ -181,13 +181,21 @@ var te = 5, _ = 3, v = 50, y = (e) => `
181
181
  return e;
182
182
  }
183
183
  constructor() {
184
- super(), this.query = "", this.limit = 5, this.noResultDescribe = "No results found.", this.entryClass = "bs-results--list--entry", this._state = "loading", this.retrying = !1, this.inferredLevel = _, this.loadId = 0, this.onClick = (e) => {
184
+ super(), this.query = "", this.limit = 5, this.noResultDescribe = "No results found.", this.entryClass = "bs-results--list--entry", this._state = "loading", this.retrying = !1, this.inferredLevel = v, this.loadId = 0, this.onClick = (e) => {
185
185
  let t = e.composedPath(), n = this.renderRoot.querySelector(".bs-results--list");
186
186
  for (let e of t) {
187
187
  if (e === this) return;
188
188
  if (e instanceof Element) {
189
+ if (e.matches(".bs-results--message button:not([aria-disabled])")) {
190
+ f(this, [
191
+ "bento-box",
192
+ "retry",
193
+ this.analyticsName
194
+ ]);
195
+ return;
196
+ }
189
197
  if (e.matches(".bs-results--see-all button")) {
190
- p(this, [
198
+ f(this, [
191
199
  "bento-box",
192
200
  "see-all-click",
193
201
  this.analyticsName
@@ -198,7 +206,7 @@ var te = 5, _ = 3, v = 50, y = (e) => `
198
206
  let e = t.find((e) => e instanceof HTMLLIElement && e.parentNode === n);
199
207
  if (!e || e.classList.contains("bs-results--placeholder")) return;
200
208
  let r = [...n.children].indexOf(e) + 1;
201
- p(this, [
209
+ f(this, [
202
210
  "bento-box",
203
211
  "result-click",
204
212
  this.analyticsName,
@@ -212,8 +220,8 @@ var te = 5, _ = 3, v = 50, y = (e) => `
212
220
  }
213
221
  connectedCallback() {
214
222
  super.connectedCallback();
215
- let e = m(this);
216
- if (this.inferredLevel = e === null ? _ : Math.min(e + 1, 6), this.lightDom && this.noStyle) {
223
+ let e = h(this);
224
+ if (this.inferredLevel = e === null ? v : Math.min(e + 1, 6), this.lightDom && this.noStyle) {
217
225
  let e = this.getRootNode(), t = e instanceof ShadowRoot || e instanceof Document ? e : void 0;
218
226
  c(`${this.localName}::structure`, s(y(this.localName)), {
219
227
  root: t,
@@ -227,7 +235,7 @@ var te = 5, _ = 3, v = 50, y = (e) => `
227
235
  }
228
236
  get count() {
229
237
  let e = Math.trunc(this.limit);
230
- return Number.isFinite(e) && e > 0 ? Math.min(e, v) : te;
238
+ return Number.isFinite(e) && e > 0 ? Math.min(e, ne) : te;
231
239
  }
232
240
  get level() {
233
241
  let e = Math.trunc(this.headingLevel ?? NaN);
@@ -261,10 +269,10 @@ var te = 5, _ = 3, v = 50, y = (e) => `
261
269
  this.results = {
262
270
  ...r,
263
271
  items: r.items.slice(0, this.count)
264
- }, this._state = this.results.items.length ? "ready" : "empty", t !== this.reportedQuery && (this.reportedQuery = t, f(this, t, this.analyticsName, r.total ?? (this._state === "empty" ? 0 : void 0)));
272
+ }, this._state = this.results.items.length ? "ready" : "empty", t !== this.reportedQuery && (this.reportedQuery = t, m(this, t, this.analyticsName, r.total ?? (this._state === "empty" ? 0 : void 0)));
265
273
  } catch {
266
274
  if (e !== this.loadId) return;
267
- this.results = void 0, this._state = "error", this.reportedQuery = void 0;
275
+ this.results = void 0, this._state = "error", this.reportedQuery = void 0, p(this, "bento-box", `section-load: ${this.analyticsName}`);
268
276
  } finally {
269
277
  this.controller === n && (this.controller = void 0);
270
278
  }
@@ -360,7 +368,7 @@ var C = {
360
368
  retries: 2,
361
369
  retryDelay: 1e3,
362
370
  timeout: 1e4
363
- }, ne = [
371
+ }, re = [
364
372
  "authorize",
365
373
  "catalog",
366
374
  "articles",
@@ -368,7 +376,7 @@ var C = {
368
376
  "website"
369
377
  ];
370
378
  function T(e) {
371
- for (let t of ne) {
379
+ for (let t of re) {
372
380
  let n = e?.[t];
373
381
  typeof n == "string" && n && (C[t] = n);
374
382
  }
@@ -407,7 +415,7 @@ function A(e, t, n) {
407
415
  })) : i.promise;
408
416
  }
409
417
  var j, M;
410
- function N() {
418
+ function ie() {
411
419
  if (!j) {
412
420
  M = void 0;
413
421
  let e = ee(D().authorize, w, {
@@ -424,24 +432,24 @@ function N() {
424
432
  }
425
433
  return j;
426
434
  }
427
- function re(e) {
435
+ function ae(e) {
428
436
  M === e && (j = M = void 0);
429
437
  }
430
- var ie = {
438
+ var oe = {
431
439
  catalog: "https://search.lib.virginia.edu/sources/uva_library/items/",
432
440
  articles: "https://search.lib.virginia.edu/sources/articles/items/"
433
- }, ae = /^please sign in to see more/i, oe = "Article details available after signing in to Virgo", P = 5, F = (e) => typeof e == "string" ? e.replace(/\s+/g, " ").trim() : "";
434
- function se(e, t) {
441
+ }, se = /^please sign in to see more/i, ce = "Article details available after signing in to Virgo", N = 5, P = (e) => typeof e == "string" ? e.replace(/\s+/g, " ").trim() : "";
442
+ function le(e, t) {
435
443
  let n = e, r = Array.isArray(n?.group_list) ? n.group_list : [], i = [];
436
444
  for (let e of r) {
437
- let n = Array.isArray(e?.record_list) ? e.record_list[0] : void 0, r = Array.isArray(n?.fields) ? n.fields : [], a = (e) => r.filter(e).map((e) => F(e.value)), o = (e) => a(e).find(Boolean) ?? "", s = o((e) => e.type === "title"), c = o((e) => e.type === "identifier");
445
+ let n = Array.isArray(e?.record_list) ? e.record_list[0] : void 0, r = Array.isArray(n?.fields) ? n.fields : [], a = (e) => r.filter(e).map((e) => P(e.value)), o = (e) => a(e).find(Boolean) ?? "", s = o((e) => e.type === "title"), c = o((e) => e.type === "identifier");
438
446
  if (!s || !c) continue;
439
- let l = t === "articles" && ae.test(s), u = a((e) => e.type === "author").filter(Boolean);
440
- u.length > P && (u = [...u.slice(0, P), `and ${u.length - P} more`]);
447
+ let l = t === "articles" && se.test(s), u = a((e) => e.type === "author").filter(Boolean);
448
+ u.length > N && (u = [...u.slice(0, N), `and ${u.length - N} more`]);
441
449
  let d = Math.trunc(Number(e.count));
442
450
  i.push({
443
- title: l ? oe : s,
444
- url: ie[t] + encodeURIComponent(c),
451
+ title: l ? ce : s,
452
+ url: oe[t] + encodeURIComponent(c),
445
453
  authors: u,
446
454
  published: o((e) => e.name === "published_date") || void 0,
447
455
  formats: a((e) => e.name === (t === "articles" ? "pub_type" : "format")).filter(Boolean),
@@ -455,12 +463,12 @@ function se(e, t) {
455
463
  total: Number.isFinite(a) && a >= 0 ? a : void 0
456
464
  };
457
465
  }
458
- function I(e) {
466
+ function F(e) {
459
467
  return `keyword: {${e.replace(/[{}]/g, " ")}}`;
460
468
  }
461
- function ce(e, t) {
469
+ function ue(e, t) {
462
470
  return JSON.stringify({
463
- query: I(e),
471
+ query: F(e),
464
472
  pagination: {
465
473
  start: 0,
466
474
  rows: t
@@ -475,11 +483,11 @@ function ce(e, t) {
475
483
  }]
476
484
  });
477
485
  }
478
- function le(e, t, n, r) {
479
- let i = D()[e], a = ce(t, n);
486
+ function de(e, t, n, r) {
487
+ let i = D()[e], a = ue(t, n);
480
488
  return A(`POST ${i}\n${a}`, async (t) => {
481
489
  for (let n = 0;; n++) {
482
- let r = await N();
490
+ let r = await ie();
483
491
  if (t.aborted) throw t.reason;
484
492
  let o = {
485
493
  method: "POST",
@@ -493,10 +501,10 @@ function le(e, t, n, r) {
493
501
  retryStatus: O
494
502
  };
495
503
  try {
496
- return se(await g(i, w, o), e);
504
+ return le(await _(i, w, o), e);
497
505
  } catch (e) {
498
506
  if (n === 0 && e.status === 401) {
499
- re(r);
507
+ ae(r);
500
508
  continue;
501
509
  }
502
510
  throw e;
@@ -504,16 +512,16 @@ function le(e, t, n, r) {
504
512
  }
505
513
  }, r);
506
514
  }
507
- function ue(e, t) {
515
+ function fe(e, t) {
508
516
  return `https://search.lib.virginia.edu/?${new URLSearchParams(e === "catalog" ? {
509
517
  q: t,
510
518
  pool: "uva_library"
511
519
  } : {
512
- q: I(t),
520
+ q: F(t),
513
521
  pool: "articles"
514
522
  })}`;
515
523
  }
516
- var de = [
524
+ var I = [
517
525
  "Jan",
518
526
  "Feb",
519
527
  "Mar",
@@ -527,10 +535,10 @@ var de = [
527
535
  "Nov",
528
536
  "Dec"
529
537
  ];
530
- function fe(e) {
538
+ function L(e) {
531
539
  let t = /^(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?$/.exec(e);
532
540
  if (!t) return e;
533
- let [, n, r, i] = t, a = r ? de[Number(r) - 1] : void 0;
541
+ let [, n, r, i] = t, a = r ? I[Number(r) - 1] : void 0;
534
542
  if (!r) return n;
535
543
  if (!a) return e;
536
544
  if (!i) return `${a} ${n}`;
@@ -542,23 +550,23 @@ function fe(e) {
542
550
  day: "numeric"
543
551
  }).format(s) : e;
544
552
  }
545
- var L = /* @__PURE__ */ new Set(["http:", "https:"]);
546
- function R(e, t) {
553
+ var R = /* @__PURE__ */ new Set(["http:", "https:"]);
554
+ function z(e, t) {
547
555
  if (typeof e == "string" && e.trim()) try {
548
556
  let n = new URL(e.trim(), t);
549
- return L.has(n.protocol) ? n.href : void 0;
557
+ return R.has(n.protocol) ? n.href : void 0;
550
558
  } catch {
551
559
  return;
552
560
  }
553
561
  }
554
- var z = "https://guides.lib.virginia.edu/", B = (e) => {
555
- let t = R(e?.getAttribute("href"), z), n = F(e?.textContent);
562
+ var B = "https://guides.lib.virginia.edu/", V = (e) => {
563
+ let t = z(e?.getAttribute("href"), B), n = P(e?.textContent);
556
564
  return t && n ? {
557
565
  text: n,
558
566
  url: t
559
567
  } : void 0;
560
568
  };
561
- function V(e, t) {
569
+ function H(e, t) {
562
570
  let n = [], r = (e, t) => {
563
571
  if (!e) return;
564
572
  let r = n[n.length - 1];
@@ -579,39 +587,39 @@ function V(e, t) {
579
587
  for (let e of n) e.text = e.text.replace(/\s+/g, " ");
580
588
  return n.length && (n[0].text = n[0].text.trimStart(), n[n.length - 1].text = n[n.length - 1].text.trimEnd()), n.filter((e) => e.text);
581
589
  }
582
- var H = (e) => new DOMParser().parseFromString(e, "text/html");
590
+ var U = (e) => new DOMParser().parseFromString(e, "text/html");
583
591
  function pe(e) {
584
592
  let t = e?.data, n = typeof t?.results == "string" ? t.results : "", r = [];
585
- for (let e of H(n).querySelectorAll(".s-srch-result")) {
586
- let t = e.querySelector(".s-srch-result-title"), n = B(t?.querySelector(":scope > a"));
593
+ for (let e of U(n).querySelectorAll(".s-srch-result")) {
594
+ let t = e.querySelector(".s-srch-result-title"), n = V(t?.querySelector(":scope > a"));
587
595
  if (!n) continue;
588
596
  let i = e.querySelectorAll(".s-srch-result-meta")[1], a = i?.querySelector(".s-srch-result-highlights");
589
597
  r.push({
590
598
  title: n.text,
591
599
  url: n.url,
592
- guide: B(t?.querySelector(".s-srch-result-guide a")),
593
- author: B(i?.querySelector(".s-srch-result-author a")),
594
- subjects: [...i?.querySelectorAll(".s-srch-result-subjects a") ?? []].map(B).filter((e) => !!e),
595
- highlights: a ? V(a, "mark") : []
600
+ guide: V(t?.querySelector(".s-srch-result-guide a")),
601
+ author: V(i?.querySelector(".s-srch-result-author a")),
602
+ subjects: [...i?.querySelectorAll(".s-srch-result-subjects a") ?? []].map(V).filter((e) => !!e),
603
+ highlights: a ? H(a, "mark") : []
596
604
  });
597
605
  }
598
606
  return {
599
607
  items: r,
600
- seeAll: R(t?.fulllink)
608
+ seeAll: z(t?.fulllink)
601
609
  };
602
610
  }
603
611
  function me(e) {
604
- return `${z}srch.php?${new URLSearchParams({
612
+ return `${B}srch.php?${new URLSearchParams({
605
613
  default_lg: "1",
606
614
  q: e
607
615
  })}`;
608
616
  }
609
- function U(e, t) {
617
+ function W(e, t) {
610
618
  return `${e}${e.includes("?") ? "&" : "?"}${t}`;
611
619
  }
612
620
  function he(e, t, n) {
613
- let r = U(D().guides, new URLSearchParams({ q: e }));
614
- return A(`GET ${r}`, async (e) => pe(await g(r, w, {
621
+ let r = W(D().guides, new URLSearchParams({ q: e }));
622
+ return A(`GET ${r}`, async (e) => pe(await _(r, w, {
615
623
  signal: e,
616
624
  retryStatus: O
617
625
  })), n).then((e) => ({
@@ -624,7 +632,7 @@ var ge = [
624
632
  "person",
625
633
  "library",
626
634
  "article"
627
- ], W = "https://library.virginia.edu";
635
+ ], G = "https://library.virginia.edu";
628
636
  function _e(e, t) {
629
637
  let n = new URLSearchParams();
630
638
  n.set("filter[fulltext]", e), n.set("page[limit]", String(t)), n.set("filter[types-group][group][conjunction]", "OR");
@@ -634,11 +642,11 @@ function _e(e, t) {
634
642
  function ve(e) {
635
643
  let t = e, n = Array.isArray(t?.data) ? t.data : [], r = [];
636
644
  for (let e of n) {
637
- let n = e?.attributes ?? {}, i = F(n.title), a = F(n.path?.alias), o = n.drupal_internal__nid, s = a.startsWith("/") ? a : o == null ? "" : `/node/${encodeURI(String(o))}`, c = s ? R(s, W) : void 0;
645
+ let n = e?.attributes ?? {}, i = P(n.title), a = P(n.path?.alias), o = n.drupal_internal__nid, s = a.startsWith("/") ? a : o == null ? "" : `/node/${encodeURI(String(o))}`, c = s ? z(s, G) : void 0;
638
646
  if (!i || !c || !c.startsWith("https://library.virginia.edu/")) continue;
639
- let l = t?.meta?.extra_data?.[String(o)]?.excerpt, u = typeof l == "string" && l ? V(H(l).body, "strong") : [];
647
+ let l = t?.meta?.extra_data?.[String(o)]?.excerpt, u = typeof l == "string" && l ? H(U(l).body, "strong") : [];
640
648
  if (!u.length && e.type === "node--person") {
641
- let e = n.field_uva_ldap_title, t = (Array.isArray(e) ? e : [e]).map(F).filter(Boolean).join("; ");
649
+ let e = n.field_uva_ldap_title, t = (Array.isArray(e) ? e : [e]).map(P).filter(Boolean).join("; ");
642
650
  t && (u = [{ text: t }]);
643
651
  }
644
652
  r.push({
@@ -654,22 +662,22 @@ function ve(e) {
654
662
  };
655
663
  }
656
664
  function ye(e, t, n) {
657
- let r = U(D().website, _e(e, t));
658
- return A(`GET ${r}`, async (e) => ve(await g(r, w, {
665
+ let r = W(D().website, _e(e, t));
666
+ return A(`GET ${r}`, async (e) => ve(await _(r, w, {
659
667
  signal: e,
660
668
  retryStatus: O
661
669
  })), n);
662
670
  }
663
671
  function be(e) {
664
- return `${W}/search/content?${new URLSearchParams({ search_api_fulltext: e })}`;
672
+ return `${G}/search/content?${new URLSearchParams({ search_api_fulltext: e })}`;
665
673
  }
666
674
  // src/components/bento-box/VirgoSection.ts
667
- var G = class extends S {
675
+ var K = class extends S {
668
676
  fetchResults(e, t, n) {
669
- return le(this.pool, e, t, n);
677
+ return de(this.pool, e, t, n);
670
678
  }
671
679
  seeAllUrl(e) {
672
- return ue(this.pool, e);
680
+ return fe(this.pool, e);
673
681
  }
674
682
  line(e, t) {
675
683
  return t ? r`<li class="${e} li-1">${t}</li>` : r`<li class="${e} li-1" aria-hidden="true"> </li>`;
@@ -683,7 +691,7 @@ var G = class extends S {
683
691
  ${this.line("bs-results--author", e.authors.join("; "))}
684
692
  <li>
685
693
  <ul class="ul-1">
686
- ${this.line("bs-results--date", e.published ? r`<time datetime=${e.published}>${fe(e.published)}</time>` : "")}
694
+ ${this.line("bs-results--date", e.published ? r`<time datetime=${e.published}>${L(e.published)}</time>` : "")}
687
695
  ${this.line("bs-results--format", n)}
688
696
  </ul>
689
697
  </li>
@@ -701,7 +709,7 @@ var G = class extends S {
701
709
  </li>
702
710
  </ul>`;
703
711
  }
704
- }, xe = class extends G {
712
+ }, xe = class extends K {
705
713
  constructor(...e) {
706
714
  super(...e), this.pool = "articles", this.analyticsName = "Virgo articles", this.heading = "Article", this.sourceName = "Virgo article", this.describe = "An aggregation of tens of millions of articles made available through Library subscriptions.", this.home = {
707
715
  text: "Search articles",
@@ -711,13 +719,13 @@ var G = class extends S {
711
719
  get seeAllIn() {
712
720
  return "Virgo articles";
713
721
  }
714
- }, K = [
722
+ }, q = [
715
723
  "catalog",
716
724
  "articles",
717
725
  "libguides",
718
726
  "website"
719
- ], q = 2;
720
- function J(e) {
727
+ ], J = 2;
728
+ function Y(e) {
721
729
  let t = e;
722
730
  if (typeof e == "string") {
723
731
  let n = e.trim();
@@ -727,14 +735,14 @@ function J(e) {
727
735
  t = [];
728
736
  }
729
737
  }
730
- let n = new Set(K), r = [...new Set((Array.isArray(t) ? t : []).map((e) => typeof e == "string" ? e.trim().toLowerCase() : "").filter((e) => n.has(e)))];
731
- return r.length ? r : [...K];
738
+ let n = new Set(q), r = [...new Set((Array.isArray(t) ? t : []).map((e) => typeof e == "string" ? e.trim().toLowerCase() : "").filter((e) => n.has(e)))];
739
+ return r.length ? r : [...q];
732
740
  }
733
- function Y(e = location.search) {
741
+ function X(e = location.search) {
734
742
  let t = new URLSearchParams(e);
735
743
  return t.get("q") ?? t.get("query");
736
744
  }
737
- var X = (e) => `
745
+ var Z = (e) => `
738
746
  ${e} { display: block; }
739
747
  ${e} .bs-results-container > * { min-width: 0; }
740
748
  ${e}[hidden], ${e} [hidden] { display: none !important; }
@@ -749,15 +757,15 @@ var X = (e) => `
749
757
  white-space: nowrap;
750
758
  border: 0;
751
759
  }
752
- `, Z = s(X(":host")), Se = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 0 1 6.32 12.9l5.39 5.4-1.41 1.41-5.4-5.39A8 8 0 1 1 10 2zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12z'/%3E%3C/svg%3E\")", Ce = 0, Q = class extends l {
760
+ `, Q = s(Z(":host")), Se = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 0 1 6.32 12.9l5.39 5.4-1.41 1.41-5.4-5.39A8 8 0 1 1 10 2zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12z'/%3E%3C/svg%3E\")", Ce = 0, $ = class extends l {
753
761
  constructor(...e) {
754
762
  super(...e), this.query = "", this.limit = 5, this.searchDescribe = "This page searches Virgo, Virgo articles, subject guides, and the Library website.", this.noResultDescribe = "No results found.", this.placeholder = "Search anything...", this.boxes = [
755
763
  "catalog",
756
764
  "articles",
757
765
  "libguides",
758
766
  "website"
759
- ], this.inferredLevel = q, this.status = "", this.uid = `bento-box-${++Ce}`, this.announcePending = !1, this.onPopState = () => {
760
- this.query = Y() ?? this.fallbackQuery ?? "";
767
+ ], this.inferredLevel = J, this.status = "", this.uid = `bento-box-${++Ce}`, this.announcePending = !1, this.onPopState = () => {
768
+ this.query = X() ?? this.fallbackQuery ?? "";
761
769
  }, this.onSectionState = () => {
762
770
  let e = this.sections();
763
771
  e.some((e) => e.state === "loading") ? (this.announcePending = !0, this.status = "") : this.announcePending && (this.announcePending = !1, this.status = e.some((e) => e.state === "error") ? "Results updated. Some results are unavailable." : "Results updated.");
@@ -765,8 +773,8 @@ var X = (e) => `
765
773
  }
766
774
  static {
767
775
  this.styles = [
768
- h,
769
- Z,
776
+ g,
777
+ Q,
770
778
  t`
771
779
  :host {
772
780
  container-type: inline-size;
@@ -851,23 +859,23 @@ var X = (e) => `
851
859
  createRenderRoot() {
852
860
  let e = super.createRenderRoot();
853
861
  if (e instanceof ShadowRoot && this.noStyle) {
854
- let t = Z.styleSheet;
862
+ let t = Q.styleSheet;
855
863
  t && (e.adoptedStyleSheets = [t]);
856
864
  }
857
865
  return e;
858
866
  }
859
867
  connectedCallback() {
860
868
  super.connectedCallback();
861
- let e = m(this);
862
- if (this.inferredLevel = e === null ? q : Math.min(e + 1, 6), this.lightDom && this.noStyle) {
869
+ let e = h(this);
870
+ if (this.inferredLevel = e === null ? J : Math.min(e + 1, 6), this.lightDom && this.noStyle) {
863
871
  let e = this.getRootNode(), t = e instanceof ShadowRoot || e instanceof Document ? e : void 0;
864
- c(`${this.localName}::structure`, s(X(this.localName)), {
872
+ c(`${this.localName}::structure`, s(Z(this.localName)), {
865
873
  root: t,
866
874
  scope: !1
867
875
  });
868
876
  }
869
877
  this.fallbackQuery ??= this.query;
870
- let t = Y();
878
+ let t = X();
871
879
  t !== null && (this.query = t), window.addEventListener("popstate", this.onPopState), this.addEventListener("bento-state", this.onSectionState);
872
880
  }
873
881
  disconnectedCallback() {
@@ -906,7 +914,7 @@ var X = (e) => `
906
914
  ></${n}>`;
907
915
  }
908
916
  render() {
909
- let e = this.level, t = d(`h${e}`), n = this.q, r = J(this.boxes), i = `${this.uid}-q`, a = `${this.uid}-describe`;
917
+ let e = this.level, t = d(`h${e}`), n = this.q, r = Y(this.boxes), i = `${this.uid}-q`, a = `${this.uid}-describe`;
910
918
  return u`<bento-search class="bento-search-bar">
911
919
  <search>
912
920
  <form action="https://search.lib.virginia.edu/search" method="get" @submit=${this.search}>
@@ -941,25 +949,25 @@ var X = (e) => `
941
949
  <div class="visually-hidden" role="status">${this.status}</div>`;
942
950
  }
943
951
  };
944
- a([e({ type: String })], Q.prototype, "query", void 0), a([e({ type: Number })], Q.prototype, "limit", void 0), a([e({
952
+ a([e({ type: String })], $.prototype, "query", void 0), a([e({ type: Number })], $.prototype, "limit", void 0), a([e({
945
953
  type: String,
946
954
  attribute: "search-describe"
947
- })], Q.prototype, "searchDescribe", void 0), a([e({
955
+ })], $.prototype, "searchDescribe", void 0), a([e({
948
956
  type: String,
949
957
  attribute: "no-result-describe"
950
- })], Q.prototype, "noResultDescribe", void 0), a([e({ type: String })], Q.prototype, "placeholder", void 0), a([e({ converter: { fromAttribute: J } })], Q.prototype, "boxes", void 0), a([e({
958
+ })], $.prototype, "noResultDescribe", void 0), a([e({ type: String })], $.prototype, "placeholder", void 0), a([e({ converter: { fromAttribute: Y } })], $.prototype, "boxes", void 0), a([e({
951
959
  type: Number,
952
960
  attribute: "heading-level"
953
- })], Q.prototype, "headingLevel", void 0), a([n()], Q.prototype, "inferredLevel", void 0), a([n()], Q.prototype, "status", void 0);
961
+ })], $.prototype, "headingLevel", void 0), a([n()], $.prototype, "inferredLevel", void 0), a([n()], $.prototype, "status", void 0);
954
962
  // src/components/bento-box/CatalogSection.ts
955
- var $ = class extends G {
963
+ var we = class extends K {
956
964
  constructor(...e) {
957
965
  super(...e), this.pool = "catalog", this.analyticsName = "Virgo catalog", this.heading = "Virgo Catalog", this.sourceName = "Virgo catalog", this.describe = "Books, journals, manuscripts & archival material, maps, music and sound recordings, theses and dissertations, and videos.", this.home = {
958
966
  text: "Search Virgo",
959
967
  url: "https://search.lib.virginia.edu/"
960
968
  };
961
969
  }
962
- }, we = class extends S {
970
+ }, Te = class extends S {
963
971
  constructor(...e) {
964
972
  super(...e), this.analyticsName = "Subject guides", this.heading = "Subject Guides", this.sourceName = "subject guide", this.describe = "Subject guides contain topic-specific information to help with research and coursework.", this.home = {
965
973
  text: "Search Guides",
@@ -1008,7 +1016,7 @@ var $ = class extends G {
1008
1016
  </li>
1009
1017
  </ul>`;
1010
1018
  }
1011
- }, Te = class extends S {
1019
+ }, Ee = class extends S {
1012
1020
  constructor(...e) {
1013
1021
  super(...e), this.analyticsName = "Library website", this.heading = "Website", this.sourceName = "Library website", this.describe = "Results from the main Library website.", this.home = {
1014
1022
  text: "Search Library website",
@@ -1030,6 +1038,6 @@ var $ = class extends G {
1030
1038
  <div class="bento-section-desc">Library website page</div>`;
1031
1039
  }
1032
1040
  };
1033
- i("catalog-section", $), i("articles-section", xe), i("libguides-section", we), i("website-section", Te), i("bento-box", Q);
1041
+ i("catalog-section", we), i("articles-section", xe), i("libguides-section", Te), i("website-section", Ee), i("bento-box", $);
1034
1042
 
1035
1043
  //# sourceMappingURL=bento-box.js.map