@museumwnf/viewer-layout 3.65.1 → 3.66.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@museumwnf/viewer-layout",
3
- "version": "3.65.1",
3
+ "version": "3.66.1",
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",
@@ -11,6 +11,11 @@
11
11
  // package resolve from the site.
12
12
  import { describe, expect, it, vi } from 'vitest'
13
13
  import { loadEntities, mergeMessages } from '@museumwnf/viewer-core'
14
+ import * as viewerCore from '@museumwnf/viewer-core'
15
+
16
+ // A link to a legacy site that has a new one is drawn with the new site's
17
+ // address from viewer-core 2.18.0 on (inventory-app#2482), as stored before.
18
+ const drawnAs = (url) => (url && typeof viewerCore.toNewSite === 'function' ? viewerCore.toNewSite(url) : url)
14
19
  import {
15
20
  checkOfferedLanguages, checkRoutes, checkSectionMeta, checkTextsRendered, mountSite as mountOn,
16
21
  } from '@museumwnf/viewer-core/testing'
@@ -396,10 +401,10 @@ export function describeGallerySmoke({ config, sharedTexts, ownTexts, manifest,
396
401
 
397
402
  expect(project.related_database_url).toBeTruthy()
398
403
  expect(host.textContent).toContain('Search Related Database')
399
- expect(links().some((a) => a.getAttribute('href') === project.related_database_url)).toBe(true)
404
+ expect(links().some((a) => a.getAttribute('href') === drawnAs(project.related_database_url))).toBe(true)
400
405
  if (project.artistic_introduction_url) {
401
406
  expect(host.textContent).toContain('Artistic Introduction')
402
- expect(links().some((a) => a.getAttribute('href') === project.artistic_introduction_url)).toBe(true)
407
+ expect(links().some((a) => a.getAttribute('href') === drawnAs(project.artistic_introduction_url))).toBe(true)
403
408
  } else {
404
409
  expect(host.textContent).not.toContain('Artistic Introduction')
405
410
  }
@@ -718,8 +723,8 @@ export function describeExhibitionSmoke({
718
723
  const project = manifest.projects[item.project_id]
719
724
  const { app, host } = await mountSite(`#/item/${item.id}`)
720
725
  await vi.waitFor(() => expect(host.querySelector('.mwnf-sheet-related')).not.toBeNull(), WAIT)
721
- expect(!!host.querySelector(`a[href="${project.related_database_url}"]`)).toBe(!!project.related_database_url)
722
- expect(!!host.querySelector(`a[href="${project.artistic_introduction_url}"]`)).toBe(!!project.artistic_introduction_url)
726
+ expect(!!host.querySelector(`a[href="${drawnAs(project.related_database_url)}"]`)).toBe(!!project.related_database_url)
727
+ expect(!!host.querySelector(`a[href="${drawnAs(project.artistic_introduction_url)}"]`)).toBe(!!project.artistic_introduction_url)
723
728
  expect(!!host.querySelector('.mwnf-sheet-notice')).toBe(noticeProjects.includes(item.project_id))
724
729
  // Every project needs its chip colour, or the chip falls back to the
725
730
  // layout's default swatch.
@@ -882,6 +882,7 @@
882
882
  /* --mwnf-standalone-home-banner-title-weight: 400; Its title weight */
883
883
  /* --mwnf-standalone-home-banner-line-size: 1.125rem; Its line under the title: size */
884
884
  /* --mwnf-standalone-banner-background: transparent; Band colour under its picture */
885
+ /* --mwnf-standalone-banner-position: center; Where its picture sits (legacy's products: 0 0) */
885
886
  /* --mwnf-standalone-banner-title-size: 1.875rem; Band title size */
886
887
  /* --mwnf-standalone-banner-title-color: inherit; Band title colour */
887
888
  /* --mwnf-standalone-banner-title-background: transparent; The title's own strip across the band */
@@ -950,6 +951,8 @@
950
951
  /* --mwnf-standalone-home-footer-margin: 0; Room under the home page's footer, in the page's colour */
951
952
  /* --mwnf-standalone-footer-social-top: calc(var(--mwnf-footer-padding) + 1px); The icons' distance from the footer's top */
952
953
  /* --mwnf-standalone-footer-social-right: the content's right edge; Their distance from the right */
954
+ /* --mwnf-standalone-footer-social-left: auto; Their distance from the left (both set: centred between) */
955
+ /* --mwnf-standalone-footer-social-direction: inherit; Their order (ltr keeps it on a right-to-left page) */
953
956
  /* --mwnf-standalone-footer-social-margin: 5px; The space either side of each icon */
954
957
  /* --mwnf-standalone-inner-footer-social-margin: var(--mwnf-standalone-footer-social-margin); That space on the inner pages */
955
958
  /* --mwnf-standalone-pill: transparent; The partner profile's rounded tab and items bars */