@museumwnf/viewer-layout 3.70.1 → 3.72.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/README.md CHANGED
@@ -22,6 +22,7 @@ all the packages:
22
22
  | `@museumwnf/viewer-layout/dxa/testing` | DXA family layer | each family's smoke test, `describeGallerySmoke` / `describeExhibitionSmoke` | the site's config, texts and package, in the site's own Vitest |
23
23
  | `@museumwnf/viewer-layout/standalone` | standalone family layer | the chrome, home page, item sheet, text page and blocks of Discover Islamic Art, Discover Baroque Art and Sharing History | the entries above and `@museumwnf/viewer-core` |
24
24
  | `@museumwnf/viewer-layout/minisite` | mini-site family layer | legacy's virtual exhibitions, one website each: the frame, the home page, the introduction, the exhibition pages, legacy's three windows, the caption rules, `minisiteRoutes` / `minisiteNavigation` / `minisiteSettings` | the entries above and `@museumwnf/viewer-core` |
25
+ | `@museumwnf/viewer-layout/minisite/testing` | mini-site family layer | the family's smoke test, `describeMinisiteSmoke` | the site's config, settings, texts and chrome, in the site's own Vitest |
25
26
  | `@museumwnf/viewer-layout/style.css` | — | one stylesheet for every entry, the family styles included | — |
26
27
  | `@museumwnf/viewer-layout/tokens.reference.css` | — | every token the package reads, with its fallback | — |
27
28
 
@@ -636,12 +637,18 @@ export default galleryConfig({
636
637
  datasetPackage: '@museumwnf/carpets-data',
637
638
  siteName: 'Carpets', // for a package without manifest.site
638
639
  origin: 'https://museumwithnofrontiers.github.io/carpets',
639
- projectColors: { '<project id>': 'mwnf-chip--DCA' }, // one of the mwnf-chip--* classes
640
+ projectColors: { '<project id>': 'mwnf-chip--DCA' }, // only a project projectChips() cannot tell
640
641
  noticeProjects: ['<project id>'], // sheets with the Explore-partner notice
641
642
  creditsBody: 'carpets.credits.body',
642
643
  })
643
644
  ```
644
645
 
646
+ A record's source chip comes from the project's site
647
+ (`manifest.projects[id].home_site`, `projectChips()`): a product's own colour,
648
+ an exhibition's project in the exhibitions' colour, a project with no site in
649
+ the galleries'. `projectColors` names only what that cannot tell (an
650
+ exhibition's package carries no `home_site`), and wins where it is given.
651
+
645
652
  `exhibitionConfig` takes the same values (and `partnerObjects`, overrides of
646
653
  the shared `exhibition.partnerObjects.*` entries). The config carries the
647
654
  family's shell (`GalleryShell` / `ExhibitionShell`), menu, banner, sponsor
@@ -771,6 +778,13 @@ every value is a `--mwnf-standalone-*` token with a neutral fallback
771
778
  (`tokens.reference.css`); a site's `theme/tokens.css` sets legacy's. It ships
772
779
  in `style.css`, so a site imports nothing more.
773
780
 
781
+ A product's label set by name: `StandaloneTimelineEntrance` and
782
+ `StandaloneHistoricalCrossRef` take `texts="<product>"` and read its
783
+ `<product>.tl.*`, `<product>.db.go` and `<product>.hcr.*` entries themselves
784
+ (viewer-i18n's convention, one label set per product), so a page passes the
785
+ name instead of mapping each label. Labels a page passes still win, for a
786
+ product whose entries are named otherwise.
787
+
774
788
  ## Mini-site family pages
775
789
 
776
790
  `@museumwnf/viewer-layout/minisite` is the family layer of the mini-sites:
@@ -783,37 +797,43 @@ Art's and Sharing History's are products of their own, with pages of their own
783
797
  exhibition's own stays in its repository: its settings (`minisite`), its
784
798
  theme (`theme/tokens.css`), its legacy pictures and its texts.
785
799
 
800
+ A mini-site's `dataset.config.js` is one call to its family's factory —
801
+ `minisiteConfig` (Discover Islamic Art's exhibitions), `artintroConfig` (its
802
+ Artistic Introduction), `baroqueartMinisiteConfig` or
803
+ `sharinghistoryMinisiteConfig` — with what is the site's own:
804
+
786
805
  ```js
787
- import { languageLabels, offeredLanguages, sectionMeta } from '@museumwnf/viewer-core'
788
- import {
789
- ISLAMICART_NO_COUNTRY, MinisiteHome, MinisiteShell, minisiteNavigation, minisiteRoutes, minisiteSettings,
790
- } from '@museumwnf/viewer-layout/minisite'
806
+ import { minisiteConfig } from '@museumwnf/viewer-layout/minisite'
807
+ import exhibition from './minisite.json'
791
808
 
792
- const languages = offeredLanguages()
793
- const parent = 'https://museumwithnofrontiers.github.io/islamicart'
809
+ const chrome = import.meta.glob('../theme/assets/**/*.{jpg,jpeg,png,gif,svg}', { eager: true, query: '?url', import: 'default' })
794
810
 
795
- export default {
796
- // …datasetPackage, siteName, site, features, languages…
797
- shell: MinisiteShell,
798
- chrome: import.meta.glob('../theme/assets/**/*.{jpg,jpeg,png,gif,svg}', { eager: true, query: '?url', import: 'default' }),
799
- navigation: minisiteNavigation({ languages: languageLabels(languages), parent }),
800
- minisite: minisiteSettings({
801
- parent,
802
- menuSecondColumnFrom: 7,
803
- curators: [{ partner: '<uuid>', logo: 'legacy/JO-10.gif', space: 35 }],
804
- map: {
805
- thumbnail: 'legacy/intro_map_thumb.jpg',
806
- picture: (lang, n) => (n ? `legacy/map${n}_${lang}.jpg` : `legacy/map_${lang}.jpg`),
807
- count: 1,
808
- },
809
- noCountry: ISLAMICART_NO_COUNTRY,
810
- documentTitle: 'MWNF DISCOVER ISLAMIC ART: Exhibition',
811
- }),
812
- views: { home: MinisiteHome },
813
- extraViews: minisiteRoutes(sectionMeta()),
814
- }
811
+ export default minisiteConfig({
812
+ datasetPackage: '@museumwnf/islamicart-women-data',
813
+ siteName: 'Women', // for a package without manifest.site
814
+ origin: 'https://museumwithnofrontiers.github.io/islamicart-women',
815
+ exhibition, // minisite.json, written by inventory-app's generators
816
+ chrome,
817
+ })
815
818
  ```
816
819
 
820
+ The factory reads `minisite.json` (`menuSecondColumnFrom`, `curators`, `maps`,
821
+ and for the other families `social`, `design`, `banner`, `profiles`, `logos`,
822
+ `partnerLinks`), points the frame's links at the parent product next to the
823
+ site's own address (`parentSite(origin, 'islamicart')`), and gives the
824
+ family's no-country rule (`ISLAMICART_NO_COUNTRY`, `BAROQUEART_NO_COUNTRY`) and
825
+ Word document title unless `minisite.json` sets `noCountry` or
826
+ `documentTitle` itself. The pieces it assembles — `MinisiteShell`,
827
+ `minisiteNavigation`, `minisiteSettings`, `minisiteRoutes`, `MinisiteHome` and
828
+ each family's own — stay exported for a site that needs to assemble them
829
+ differently.
830
+
831
+ The family's smoke test is `describeMinisiteSmoke` from
832
+ `@museumwnf/viewer-layout/minisite/testing`, the site's tests/smoke.test.js
833
+ calling it with its config, `minisite.json`, texts, `SOURCES.json` and text
834
+ namespace; it also checks the chrome against `SOURCES.json`
835
+ (`checkChromeSources`, viewer-core).
836
+
817
837
  - **Routes** (`minisiteRoutes`): `home`, `introduction`,
818
838
  `exhibition` (`/exhibition/<theme>/<page>`, 1-based as legacy's addresses),
819
839
  and legacy's windows `credits`, `map` and `zoom`, marked `meta.bare` and drawn