@museumwnf/viewer-layout 3.59.0 → 3.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/{FeaturedRecord-CTqnQFox.js → FeaturedRecord-DaGLHyhD.js} +2 -3
  2. package/dist/{GlossaryPopover-B7E6BsjS.js → GlossaryPopover-DbQKXhx9.js} +1 -2
  3. package/dist/ItemDetailView-D7m2C1Mg.js +310 -0
  4. package/dist/{OnDisplayIn-DZHRKjL0.js → OnDisplayIn-DW4iC5BB.js} +10 -5
  5. package/dist/{PageShell-CcaLOuXI.js → PageShell-CPtgzcxv.js} +1 -2
  6. package/dist/{PartnerMap-BIKd-AGP.js → PartnerMap-U-Hi2FBi.js} +17 -14
  7. package/dist/RecordView-BE4mbj6G.js +363 -0
  8. package/dist/{SiteShell-CYQxXosD.js → SiteShell-qvsZO4Iz.js} +3 -4
  9. package/dist/{Theme-Co1bf81Z.js → Theme-4RmyRY0x.js} +29 -30
  10. package/dist/{TimelineEventList-CTJJOWGh.js → TimelineEventList-1feZA5t7.js} +3 -4
  11. package/dist/{TimelineResultsView-D15BMWZM.js → TimelineResultsView-CkH3NDqL.js} +264 -255
  12. package/dist/{chrome-DNsZQXrL.js → chrome-Bv_mLlHM.js} +1 -2
  13. package/dist/components.js +1 -2
  14. package/dist/{content-PQeMx8U5.js → content-BNS5U0Xv.js} +3 -4
  15. package/dist/content.js +6 -6
  16. package/dist/{data-CXRsGwLQ.js → data-EKYeMQcC.js} +16 -11
  17. package/dist/{data-BINc9QjV.js → data-kqAkoQvf.js} +2 -3
  18. package/dist/dxa.js +1006 -669
  19. package/dist/index.js +8 -8
  20. package/dist/minisite.js +14 -26
  21. package/dist/standalone.js +209 -217
  22. package/dist/{themeSpecs-DP9xWiVJ.js → themeSpecs-CsDpl4rR.js} +2 -3
  23. package/dist/viewer-layout.css +1 -1
  24. package/dist/views.js +5 -6
  25. package/package.json +10 -10
  26. package/src/dxa/testing.js +98 -57
  27. package/src/styles/dxa-gallery.css +32 -4
  28. package/src/tokens.reference.css +12 -1
  29. package/dist/ItemDetailView-Bbn-uNaR.js +0 -304
  30. package/dist/RecordView-DEKHp1A3.js +0 -348
package/dist/views.js CHANGED
@@ -1,10 +1,10 @@
1
- import { t as e } from "./FeaturedRecord-CTqnQFox.js";
2
- import { s as t } from "./TimelineEventList-CTJJOWGh.js";
3
- import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "./TimelineResultsView-D15BMWZM.js";
4
- import { t as l } from "./RecordView-DEKHp1A3.js";
1
+ import { t as e } from "./FeaturedRecord-DaGLHyhD.js";
2
+ import { s as t } from "./TimelineEventList-1feZA5t7.js";
3
+ import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "./TimelineResultsView-CkH3NDqL.js";
4
+ import { t as l } from "./RecordView-BE4mbj6G.js";
5
5
  import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createVNode as m, mergeProps as h, normalizeClass as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b } from "vue";
6
6
  import { I18nText as x, renderInline as S, renderPlain as C, useDataPackage as w, useFeaturedRecord as T, useI18n as E, useSiteConfig as D } from "@museumwnf/viewer-core";
7
- //#region src/views/HomeView.vue
7
+ // src/views/HomeView.vue
8
8
  var O = { class: "mwnf-home" }, k = {
9
9
  key: 0,
10
10
  class: "mwnf-home__title"
@@ -99,5 +99,4 @@ var O = { class: "mwnf-home" }, k = {
99
99
  ]));
100
100
  }
101
101
  };
102
- //#endregion
103
102
  export { s as CatalogueResultsView, a as EssayView, A as HomeView, n as LinkListView, r as PartnerListView, l as RecordView, i as SearchFormView, o as TextPageView, c as TimelineResultsView };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@museumwnf/viewer-layout",
3
- "version": "3.59.0",
3
+ "version": "3.61.0",
4
4
  "description": "Page structure for MWNF websites: PageShell composing seven optional, token-styled sections, the content components a page is made of, and the composed views a website names instead of writing a page.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -43,18 +43,18 @@
43
43
  "test": "vitest run"
44
44
  },
45
45
  "peerDependencies": {
46
- "@museumwnf/viewer-core": "^2.14.0",
46
+ "@museumwnf/viewer-core": "^2.17.0",
47
47
  "vue": "^3.5.0",
48
48
  "vue-router": "^4.5.0 || ^5.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@museumwnf/viewer-core": "^2.14.0",
52
- "@vitejs/plugin-vue": "^6.0.8",
53
- "@vue/test-utils": "^2.4.11",
54
- "jsdom": "^30.0.1",
55
- "vite": "^8.2.2",
56
- "vitest": "^4.1.11",
57
- "vue": "^3.5.0",
58
- "vue-router": "^5.3.1"
51
+ "@museumwnf/viewer-core": "^2.17.0",
52
+ "@vitejs/plugin-vue": "^6.0.10",
53
+ "@vue/test-utils": "^2.5.1",
54
+ "jsdom": "^30.1.3",
55
+ "vite": "^8.3.5",
56
+ "vitest": "^5.1.0",
57
+ "vue": "^3.5.44",
58
+ "vue-router": "^5.4.0"
59
59
  }
60
60
  }
@@ -55,29 +55,49 @@ function rightsTest(mountSite, manifest, messages) {
55
55
  }, 20000)
56
56
  }
57
57
 
58
+ // A gallery's tiles (legacy's ObjectGrid, dxa/gallery/ObjectGrid.vue), and
59
+ // how many a first page holds: legacy's twenty, or fewer when there are
60
+ // fewer (inventory-app#2423).
61
+ const TILE = '.mwnf-dxa-grid__entry'
62
+ const GALLERY_PAGE = 20
63
+ const firstPage = (count) => Math.min(GALLERY_PAGE, Number(count))
64
+
65
+ // An exhibition's tiles: the platform's record grid, nine a page.
66
+ const EXHIBITION_TILE = '.mwnf-grid__tile'
67
+
58
68
  // The collection results: the tiles, the "filter further by" column, the
59
- // summary and the page links. A site may pin its own counts.
60
- function collectionTest(mountSite, collection = {}) {
69
+ // summary and the page links. A gallery's first page holds twenty tiles, or
70
+ // every object when there are fewer, and offers page links only when there
71
+ // is a second page, as legacy; a site may pin its count of page links.
72
+ // (A gallery's `collection.tiles` is no longer read: it counted the old nine
73
+ // a page. An exhibition may still pin its own.)
74
+ function collectionTest(mountSite, collection = {}, { gallery = false } = {}) {
75
+ const tile = gallery ? TILE : EXHIBITION_TILE
61
76
  it('renders the collection results on the composed results view', async () => {
62
77
  const { app, host } = await mountSite('#/collection-results')
63
- await vi.waitFor(() => expect(host.querySelector('.mwnf-grid__tile')).not.toBeNull(), WAIT)
78
+ await vi.waitFor(() => expect(host.querySelector(tile)).not.toBeNull(), WAIT)
64
79
  expect(host.querySelector('.mwnf-catalogue')).not.toBeNull()
65
80
  expect(host.querySelector('.mwnf-catalogue__aside .mwnf-filter')).not.toBeNull()
66
- expect(host.querySelector('.mwnf-summary__count')).not.toBeNull()
67
- const tiles = host.querySelectorAll('.mwnf-grid__tile').length
81
+ const count = host.querySelector('.mwnf-summary__count')
82
+ expect(count).not.toBeNull()
83
+ const objects = Number(count.textContent.replace(/\D/g, ''))
84
+ const tiles = host.querySelectorAll(tile).length
68
85
  const paginations = host.querySelectorAll('.mwnf-pagination').length
69
- if (collection.tiles) expect(tiles).toBe(collection.tiles)
86
+ if (gallery) expect(tiles).toBe(firstPage(objects))
87
+ else if (collection.tiles) expect(tiles).toBe(collection.tiles)
70
88
  else expect(tiles).toBeGreaterThan(0)
71
- if (collection.paginations) expect(paginations).toBe(collection.paginations)
89
+ if (gallery && objects <= GALLERY_PAGE) expect(paginations).toBe(0)
90
+ else if (collection.paginations) expect(paginations).toBe(collection.paginations)
72
91
  else expect(paginations).toBeGreaterThan(0)
73
92
  app.unmount()
74
93
  }, 60000)
75
94
  }
76
95
 
77
- function searchTests(mountSite, loadItems) {
96
+ function searchTests(mountSite, loadItems, { gallery = false } = {}) {
97
+ const tile = gallery ? TILE : EXHIBITION_TILE
78
98
  it('returns every renderable object for the all-objects sentinel', async () => {
79
99
  const { app, host } = await mountSite('#/search?q=all-objects')
80
- await vi.waitFor(() => expect(host.querySelector('.mwnf-grid__tile')).not.toBeNull(), WAIT)
100
+ await vi.waitFor(() => expect(host.querySelector(tile)).not.toBeNull(), WAIT)
81
101
  expect(host.textContent).toContain('All objects')
82
102
  app.unmount()
83
103
  }, 30000)
@@ -86,7 +106,7 @@ function searchTests(mountSite, loadItems) {
86
106
  const item = await loadItems()
87
107
  const term = firstWord(item.internal_name)
88
108
  const { app, host } = await mountSite(`#/search?q=${encodeURIComponent(term)}`)
89
- await vi.waitFor(() => expect(host.querySelector('.mwnf-grid__tile')).not.toBeNull(), WAIT)
109
+ await vi.waitFor(() => expect(host.querySelector(tile)).not.toBeNull(), WAIT)
90
110
  expect(host.textContent).toContain(`“${term}”`)
91
111
  app.unmount()
92
112
  }, 30000)
@@ -175,13 +195,15 @@ function configTests(config, routes) {
175
195
  * items in: its legacy two-letter code, its inventory id, its name; and,
176
196
  * optionally, the exact `rows` the results' first page shows, the events
177
197
  * `found` when that is more, an `event` text, the `gallery` count the
178
- * results offer, the `galleryTiles` the gallery's first page shows and a
179
- * `galleryItem` text on it;
198
+ * results offer and a `galleryItem` text on the gallery's first page;
180
199
  * - `partner`: `{ id, name, city, country, objects }` — a partner with
181
- * objects, a position and a translated city — and `tiles`, its objects
182
- * page's first page, when that is fewer than `objects`;
183
- * - optionally `collection: { tiles, paginations }`, and the `about` and
184
- * `credits` texts their pages show.
200
+ * objects, a position and a translated city;
201
+ * - optionally `collection: { paginations }` (read only when the results
202
+ * have a second page), and the `about` and `credits` texts their pages
203
+ * show.
204
+ * A first page of tiles holds legacy's twenty, or every object when there
205
+ * are fewer; the suite counts that itself, so `collection.tiles`,
206
+ * `timeline.galleryTiles` and `partner.tiles` are no longer read.
185
207
  */
186
208
  export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest, namespace, picks }) {
187
209
  const { messages, mountSite } = mounter(config, sharedTexts, ownTexts)
@@ -200,7 +222,7 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
200
222
  app.unmount()
201
223
  }, 20000)
202
224
 
203
- collectionTest(mountSite, picks.collection)
225
+ collectionTest(mountSite, picks.collection, { gallery: true })
204
226
 
205
227
  it('renders the collection entrance on the composed search form view', async () => {
206
228
  const { app, host } = await mountSite('#/collection')
@@ -213,19 +235,19 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
213
235
  app.unmount()
214
236
  }, 30000)
215
237
 
216
- searchTests(mountSite, async () => (await loadEntities(['items']))[0][0])
238
+ searchTests(mountSite, async () => (await loadEntities(['items']))[0][0], { gallery: true })
217
239
 
218
- it('renders the about page on the composed text page view', async () => {
240
+ it("renders the about page as legacy's text page", async () => {
219
241
  const { app, host } = await mountSite('#/about')
220
- const prose = host.querySelector('.mwnf-prose')
242
+ const prose = host.querySelector('.mwnf-dxa-gallery-text__body')
221
243
  expect(prose.textContent.trim().length).toBeGreaterThan(0)
222
244
  if (picks.about) expect(host.textContent).toContain(picks.about)
223
245
  app.unmount()
224
246
  }, 20000)
225
247
 
226
- it('renders the credits page on the composed text page view', async () => {
248
+ it("renders the credits page as legacy's text page", async () => {
227
249
  const { app, host } = await mountSite('#/credits')
228
- const prose = host.querySelector('.mwnf-prose')
250
+ const prose = host.querySelector('.mwnf-dxa-gallery-text__body')
229
251
  expect(prose.textContent.trim().length).toBeGreaterThan(0)
230
252
  if (picks.credits) expect(host.textContent).toContain(picks.credits)
231
253
  app.unmount()
@@ -242,22 +264,24 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
242
264
  // is never shown.
243
265
  expect(host.querySelector('.mwnf-record__aside .mwnf-sheet-related')).not.toBeNull()
244
266
  expect(host.textContent).not.toContain('mwnf3:')
245
- // The "Source database" line names the item's project from the manifest.
267
+ // Legacy's sheet (inventory-app#2423): Source and My Collection under
268
+ // the pictures, and the citation names the item's project from the
269
+ // manifest.
270
+ expect(host.querySelectorAll('.mwnf-record__media .mwnf-dxa-gallery-item__links a')).toHaveLength(2)
246
271
  const projectName = manifest.projects[items[0].project_id]?.name?.en ?? ''
247
- expect(host.querySelector('.mwnf-sheet-source').textContent).toContain(projectName)
272
+ expect(host.querySelector('.mwnf-dxa-gallery-item__credits').textContent).toContain(projectName)
248
273
  app.unmount()
249
274
  }, 60000)
250
275
 
251
276
  outsideReferenceTest(mountSite, manifest, sharedTexts)
252
277
 
253
- // The chip's colour and text come from `projectColors` and the manifest's
254
- // project name, keyed by the item's `project_id`.
255
- it('colours and names the source-database chip from the manifest projects section', async () => {
278
+ // The Source box takes the colour `projectColors` gives the item's
279
+ // project, and the citation its name from the manifest.
280
+ it("colours the Source box and names the citation's project from the manifest projects section", async () => {
256
281
  const { app, host } = await mountSite(`#/item/${chip.item}`)
257
- await vi.waitFor(() => expect(host.querySelector('.mwnf-sheet-source .mwnf-chip')).not.toBeNull(), WAIT)
258
- const line = host.querySelector('.mwnf-sheet-source__line')
259
- expect(line.textContent).toContain(chip.project)
260
- expect(line.querySelector('.mwnf-chip').classList.contains(chip.className)).toBe(true)
282
+ await vi.waitFor(() => expect(host.querySelector('.mwnf-dxa-gallery-item__source')).not.toBeNull(), WAIT)
283
+ expect(host.querySelector('.mwnf-dxa-gallery-item__project').textContent).toContain(chip.project)
284
+ expect(host.querySelector('.mwnf-dxa-gallery-item__source').classList.contains(chip.className)).toBe(true)
261
285
  app.unmount()
262
286
  }, 60000)
263
287
 
@@ -265,12 +289,12 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
265
289
  // lists, and stays off every other.
266
290
  it.skipIf(!noticeItem)('shows the explore-partner notice only for the project dataset.config.js lists', async () => {
267
291
  const epm = await mountSite(`#/item/${noticeItem}`)
268
- await vi.waitFor(() => expect(epm.host.querySelector('.mwnf-sheet-source')).not.toBeNull(), WAIT)
292
+ await vi.waitFor(() => expect(epm.host.querySelector('.mwnf-dxa-gallery-item__source')).not.toBeNull(), WAIT)
269
293
  expect(epm.host.querySelector('.mwnf-sheet-notice')).not.toBeNull()
270
294
  epm.app.unmount()
271
295
 
272
296
  const other = await mountSite(`#/item/${chip.item}`)
273
- await vi.waitFor(() => expect(other.host.querySelector('.mwnf-sheet-source')).not.toBeNull(), WAIT)
297
+ await vi.waitFor(() => expect(other.host.querySelector('.mwnf-dxa-gallery-item__source')).not.toBeNull(), WAIT)
274
298
  expect(other.host.querySelector('.mwnf-sheet-notice')).toBeNull()
275
299
  other.app.unmount()
276
300
  }, 60000)
@@ -297,25 +321,35 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
297
321
  app.unmount()
298
322
  }, 60000)
299
323
 
300
- // A borrowed item's tile names its project. A long name is truncated on
301
- // the tile, so a prefix is matched.
324
+ // A borrowed item's tile names its project on its card.
302
325
  it('shows the source project on a collection-results tile, from the manifest', async () => {
303
326
  const [items] = await loadEntities(['items'])
304
327
  const item = items.find((i) => i.id === chip.item)
305
328
  const { app, host } = await mountSite(`#/search?q=${encodeURIComponent(item.internal_name.replace(/[*_]/g, ''))}`)
306
- await vi.waitFor(() => expect(host.querySelector('.mwnf-grid__tile')).not.toBeNull(), WAIT)
307
- expect(host.textContent).toContain(`for project ${chip.project.slice(0, 15)}`)
329
+ await vi.waitFor(() => expect(host.querySelector(TILE)).not.toBeNull(), WAIT)
330
+ const projects = [...host.querySelectorAll('.mwnf-dxa-grid__project span')].map((span) => span.textContent)
331
+ expect(projects.some((name) => name.startsWith(chip.project.slice(0, 15)))).toBe(true)
308
332
  app.unmount()
309
333
  }, 30000)
310
334
 
311
- it('renders the source credit on the item sheet, addressed to this deployed site', async () => {
335
+ // Legacy's Source box pointed at the record in its home database: now the
336
+ // record's page on its project's home site, a sibling of this one
337
+ // (`manifest.projects`' `home_site`), or this page when it has none.
338
+ it("points the Source box at the record's home site, or this page", async () => {
312
339
  const [items] = await loadEntities(['items'])
313
340
  const item = items[0]
314
341
  const { app, host } = await mountSite(`#/item/${item.id}`)
315
- await vi.waitFor(() => expect(host.querySelector('.mwnf-source-credit')).not.toBeNull(), WAIT)
316
- const link = host.querySelector('.mwnf-source-credit a')
342
+ await vi.waitFor(() => expect(host.querySelector('.mwnf-dxa-gallery-item__source a')).not.toBeNull(), WAIT)
343
+ const link = host.querySelector('.mwnf-dxa-gallery-item__source a')
317
344
  expect(link.textContent).toBe(link.getAttribute('href'))
318
- expect(link.getAttribute('href').startsWith(`${config.site.origin}/#/item/${item.id}`)).toBe(true)
345
+ const home = manifest.projects[item.project_id]?.home_site
346
+ let origin = config.site.origin
347
+ while (origin.endsWith('/')) origin = origin.slice(0, -1)
348
+ const expected = home && home !== manifest.site?.key
349
+ ? `${origin.slice(0, origin.lastIndexOf('/'))}/${home}/#/item/${item.id}`
350
+ : `${origin}/#/item/${item.id}`
351
+ expect(link.getAttribute('href').startsWith(expected)).toBe(true)
352
+ expect(host.querySelector('.mwnf-source-credit')).toBeNull()
319
353
  app.unmount()
320
354
  }, 60000)
321
355
 
@@ -345,37 +379,43 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
345
379
  }, 60000)
346
380
  }
347
381
 
382
+ // (`timeline.galleryTiles` is no longer read: it counted the old nine a
383
+ // page. The `gallery` count is the results' own period's, while this
384
+ // address takes every date, so only legacy's twenty a page is checked.)
348
385
  it('renders the timeline gallery on the composed results view', async () => {
349
386
  const { app, host } = await mountSite(`#/timeline/gallery?country=${timeline.code}`)
350
- await vi.waitFor(() => expect(host.querySelectorAll('.mwnf-grid__tile').length).toBeGreaterThan(0), WAIT)
351
- if (timeline.galleryTiles) expect(host.querySelectorAll('.mwnf-grid__tile').length).toBe(timeline.galleryTiles)
387
+ await vi.waitFor(() => expect(host.querySelectorAll(TILE).length).toBeGreaterThan(0), WAIT)
388
+ expect(host.querySelectorAll(TILE).length).toBeLessThanOrEqual(GALLERY_PAGE)
352
389
  expect(host.querySelector('.mwnf-summary').textContent).toContain(timeline.country)
353
390
  if (timeline.galleryItem) expect(host.textContent).toContain(timeline.galleryItem)
354
391
  app.unmount()
355
392
  }, 60000)
356
393
 
357
- // The entrance's country control writes the inventory id, and the results
358
- // it submits to filter on it.
359
- it("submits the timeline entrance's country control (an id) to a results address that actually filters", async () => {
394
+ // Legacy's entrance (TimelinePage.vue): the country list, then Go, which
395
+ // fills in the first and last dates on offer; the results filter on the
396
+ // country chosen.
397
+ it("submits the timeline entrance's country with Go to results that actually filter", async () => {
360
398
  const { app, host } = await mountSite('#/timeline')
361
- await vi.waitFor(() => expect(host.querySelector('.mwnf-facet__select')).not.toBeNull(), WAIT)
362
- const countrySelect = host.querySelectorAll('.mwnf-facet__select')[0]
363
- countrySelect.value = timeline.id
399
+ await vi.waitFor(() => expect(host.querySelectorAll('.mwnf-dxa-timeline__country option').length).toBeGreaterThan(2), WAIT)
400
+ const countrySelect = host.querySelector('.mwnf-dxa-timeline__country')
401
+ const option = [...countrySelect.options].find((o) => o.value === timeline.id || o.value === timeline.code)
402
+ countrySelect.value = option.value
364
403
  countrySelect.dispatchEvent(new window.Event('change', { bubbles: true }))
365
- host.querySelector('form.mwnf-timeline__filters').dispatchEvent(new window.Event('submit', { bubbles: true, cancelable: true }))
404
+ host.querySelector('.mwnf-dxa-timeline__go button').click()
366
405
  await vi.waitFor(() => expect(host.querySelectorAll('.mwnf-timeline__row').length).toBeGreaterThan(0), WAIT)
367
- if (timeline.rows) expect(host.querySelectorAll('.mwnf-timeline__row').length).toBe(timeline.rows)
368
406
  expect(host.querySelector('.mwnf-timeline__caption').textContent).toContain(timeline.country)
369
407
  app.unmount()
370
408
  }, 60000)
371
409
 
372
- // The object count is the gallery's own entry over the shared one.
373
- it('renders the partners list on the composed partner-list view', async () => {
410
+ // Legacy's list (PartnersPage.vue): each partner's name and its links,
411
+ // View objects for one holding something; no object count.
412
+ it("renders the partners list as legacy's", async () => {
374
413
  const { app, host } = await mountSite('#/partners')
375
- await vi.waitFor(() => expect(host.querySelector('.mwnf-partner-list__row')).not.toBeNull(), WAIT)
414
+ await vi.waitFor(() => expect(host.querySelector('.mwnf-dxa-gallery-partners__partner')).not.toBeNull(), WAIT)
376
415
  expect(host.textContent).toContain(partner.country)
377
416
  expect(host.textContent).toContain(partner.name)
378
- expect(host.textContent).toContain(`${partner.objects} object(s) in this site`)
417
+ expect(host.querySelector(`.mwnf-dxa-gallery-partners__links a[href="#/partner/${partner.id}/objects"]`)).not.toBeNull()
418
+ expect(host.textContent).not.toContain('object(s) in this site')
379
419
  app.unmount()
380
420
  }, 60000)
381
421
 
@@ -390,9 +430,10 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
390
430
  app.unmount()
391
431
  }, 60000)
392
432
 
393
- it("renders a partner's objects on the composed grid results view", async () => {
433
+ // (`partner.tiles` is no longer read: the first page holds twenty, or all.)
434
+ it("renders a partner's objects on legacy's grid", async () => {
394
435
  const { app, host } = await mountSite(`#/partner/${partner.id}/objects`)
395
- await vi.waitFor(() => expect(host.querySelectorAll('.mwnf-grid__tile').length).toBe(partner.tiles ?? partner.objects), WAIT)
436
+ await vi.waitFor(() => expect(host.querySelectorAll(TILE).length).toBe(firstPage(partner.objects)), WAIT)
396
437
  expect(host.textContent).toContain(partner.name)
397
438
  app.unmount()
398
439
  }, 60000)
@@ -20,11 +20,17 @@
20
20
  * --theme-light light menu items
21
21
  * --background-color page background
22
22
  *
23
+ * and, where legacy's `text-color` mixin took the medium-dark tone rather
24
+ * than the dark one, `--theme-text` (the item sidebar's headings).
25
+ *
23
26
  * Every token below can be set again in the gallery's theme/tokens.css; the
24
27
  * gallery's value wins. Legacy drew white text on both menu shades and on the
25
28
  * header buttons whatever the palette, and so does this file.
26
29
  */
27
- @import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,400;0,700;1,400&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');
30
+ /* Roboto Condensed upright only, as legacy loaded it (400 and 700): its
31
+ italics are the upright face slanted, as wide as the upright text. A true
32
+ italic face is narrower (inventory-app#2423, the partner badges). */
33
+ @import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400;700&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');
28
34
 
29
35
  /* ── Theme: the family's tokens, read from the palette ───────────────────── */
30
36
  :root {
@@ -224,10 +230,12 @@
224
230
  --mwnf-dxa-heading-color: var(--theme-dark);
225
231
  --mwnf-dxa-band-background: var(--background-color);
226
232
  /* The item sheet's Related Content sidebar: white on the light tone, its
227
- headings underlined in the dark tone (legacy's `$theme-light`). */
233
+ headings underlined and its description in the gallery's text colour
234
+ (legacy's `$theme-light` and `text-color` mixin, which ten galleries set
235
+ to their medium-dark tone: a gallery sets `--theme-text` for that). */
228
236
  --mwnf-dxa-related-background: var(--theme-light);
229
237
  --mwnf-dxa-related-text: #ffffff;
230
- --mwnf-dxa-related-heading-color: var(--theme-dark);
238
+ --mwnf-dxa-related-heading-color: var(--theme-text, var(--theme-dark));
231
239
  }
232
240
 
233
241
  /* ── Page reset ──────────────────────────────────────────────────────────── */
@@ -303,12 +311,17 @@ a { color: inherit; }
303
311
  }
304
312
  .mwnf-nav__links li:nth-child(odd) { background: var(--theme-medium-dark); }
305
313
  .mwnf-nav__links li:nth-child(even) { background: var(--theme-light); }
314
+ /* Legacy's entries are their 28px line, no taller; the notice under them its
315
+ text's own line (inventory-app#2423). */
306
316
  .mwnf-nav__link {
307
317
  width: 100%;
308
318
  text-align: center;
309
- padding: 2px 4px;
319
+ padding: 0 4px;
310
320
  text-transform: uppercase;
311
321
  }
322
+ .mwnf-nav__notice {
323
+ line-height: normal;
324
+ }
312
325
  .mwnf-nav__link--active {
313
326
  background: rgba(0, 0, 0, 0.18);
314
327
  text-decoration: none;
@@ -346,6 +359,21 @@ a { color: inherit; }
346
359
  .mwnf-nav__toggle { width: 100%; justify-content: center; font-size: 20px; }
347
360
  }
348
361
 
362
+ /* Back as legacy's BackComponent: bold, flush left with 8px after the label;
363
+ the arrow takes the place of its icon, 20px wide and 4px from the label,
364
+ and no taller than the text (the glyph comes from a fallback font whose
365
+ line is taller). */
366
+ .mwnf-back-link__button {
367
+ padding: 2px 8px 2px 0;
368
+ }
369
+ .mwnf-back-link__arrow {
370
+ display: inline-block;
371
+ width: 20px;
372
+ margin-inline-end: 4px;
373
+ line-height: 0;
374
+ text-align: center;
375
+ }
376
+
349
377
  /* ── The header mark and tools, the footer's icons (inventory-app#2233) ──── */
350
378
 
351
379
  /* The tools keep to the row's end whether or not a title cell sits between
@@ -717,6 +717,7 @@
717
717
  /* --mwnf-back-link-size: 0.875rem; Back link text size */
718
718
  /* --mwnf-back-link-line-height: 1; Back link line height */
719
719
  /* --mwnf-back-link-color: var(--mwnf-link-text); Back link color */
720
+ /* --mwnf-back-link-arrow-gap: 0.25em; Back link: the space after its arrow */
720
721
 
721
722
  /* ---------- Content: SearchFormView ---------- */
722
723
  /* --mwnf-search-form-row-gap: 0.5rem; Gap between a row's own parts, and between facet columns */
@@ -821,7 +822,16 @@
821
822
 
822
823
  /* ---------- DXA family pages (src/dxa/) ---------- */
823
824
  /* --mwnf-dxa-heading-color: #1c1c1c; Partner name / profile heading color */
824
- /* --mwnf-dxa-band-background: #f0f0f0; Language switcher / tab strip / timeline-link box background */
825
+ /* --mwnf-dxa-band-background: #f0f0f0; Language switcher / tab strip / timeline-link box / gallery partner list country band background */
826
+ /* --mwnf-dxa-gallery-partners-background: #ffffff; The gallery partner list's page ground */
827
+ /* --mwnf-dxa-gallery-text-background: #ffffff; A gallery's About / Credits / How to search / Timeline panel */
828
+ /* --mwnf-dxa-timeline-go-background: var(--theme-light); A gallery's Timeline: the Go button */ /* --mwnf-dxa-badge-dga: #0059bf; Partner badge colours by project, as legacy's (white text): Discover Glass Art */
829
+ /* --mwnf-dxa-badge-isl: #ffcc00; Discover Islamic Art, Explore Islamic Art Collections (black text) */
830
+ /* --mwnf-dxa-badge-awe: #900000; Sharing History */
831
+ /* --mwnf-dxa-badge-dba: #001d66; Discover Baroque Art */
832
+ /* --mwnf-dxa-badge-galleries: #263238; MWNF Galleries */
833
+ /* --mwnf-dxa-badge-dca: #6b612b; Discover Carpet Art */
834
+ /* --mwnf-dxa-badge-exh: #7f01d4; Any online exhibition's project */
825
835
  /* --mwnf-dxa-item-background: #ffffff; Item page ground (white on a gallery's tinted page) */
826
836
  /* --mwnf-dxa-item-link: var(--mwnf-link-text); Item sheet value links */
827
837
  /* --mwnf-dxa-item-padding: 3.125rem 1.25rem; Item page: the photo and sheet columns' side padding */
@@ -829,6 +839,7 @@
829
839
  /* --mwnf-dxa-related-background: #f0f0f0; Its background */
830
840
  /* --mwnf-dxa-related-text: inherit; Its text and links */
831
841
  /* --mwnf-dxa-related-heading-color: inherit; Its underlined headings */
842
+ /* --mwnf-dxa-languages-background: var(--theme-dark); A gallery item page's language band (legacy's dark tone) */
832
843
  /* --mwnf-dxa-glossary-image: none; The glossary entry header's picture (set by ItemDetailView from the site's world.png) */
833
844
  /* --mwnf-dxa-popup-image-width: 13.25rem; An exhibition popup notice's pictures: their widest (legacy sized them 191 to 211px) */
834
845
  /* --mwnf-dxa-theme-background: #ffffff; Exhibition theme pages: the ground (legacy's secondary colour) */