@museumwnf/viewer-layout 3.70.1 → 3.71.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
@@ -783,37 +790,43 @@ Art's and Sharing History's are products of their own, with pages of their own
783
790
  exhibition's own stays in its repository: its settings (`minisite`), its
784
791
  theme (`theme/tokens.css`), its legacy pictures and its texts.
785
792
 
793
+ A mini-site's `dataset.config.js` is one call to its family's factory —
794
+ `minisiteConfig` (Discover Islamic Art's exhibitions), `artintroConfig` (its
795
+ Artistic Introduction), `baroqueartMinisiteConfig` or
796
+ `sharinghistoryMinisiteConfig` — with what is the site's own:
797
+
786
798
  ```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'
799
+ import { minisiteConfig } from '@museumwnf/viewer-layout/minisite'
800
+ import exhibition from './minisite.json'
791
801
 
792
- const languages = offeredLanguages()
793
- const parent = 'https://museumwithnofrontiers.github.io/islamicart'
802
+ const chrome = import.meta.glob('../theme/assets/**/*.{jpg,jpeg,png,gif,svg}', { eager: true, query: '?url', import: 'default' })
794
803
 
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
- }
804
+ export default minisiteConfig({
805
+ datasetPackage: '@museumwnf/islamicart-women-data',
806
+ siteName: 'Women', // for a package without manifest.site
807
+ origin: 'https://museumwithnofrontiers.github.io/islamicart-women',
808
+ exhibition, // minisite.json, written by inventory-app's generators
809
+ chrome,
810
+ })
815
811
  ```
816
812
 
813
+ The factory reads `minisite.json` (`menuSecondColumnFrom`, `curators`, `maps`,
814
+ and for the other families `social`, `design`, `banner`, `profiles`, `logos`,
815
+ `partnerLinks`), points the frame's links at the parent product next to the
816
+ site's own address (`parentSite(origin, 'islamicart')`), and gives the
817
+ family's no-country rule (`ISLAMICART_NO_COUNTRY`, `BAROQUEART_NO_COUNTRY`) and
818
+ Word document title unless `minisite.json` sets `noCountry` or
819
+ `documentTitle` itself. The pieces it assembles — `MinisiteShell`,
820
+ `minisiteNavigation`, `minisiteSettings`, `minisiteRoutes`, `MinisiteHome` and
821
+ each family's own — stay exported for a site that needs to assemble them
822
+ differently.
823
+
824
+ The family's smoke test is `describeMinisiteSmoke` from
825
+ `@museumwnf/viewer-layout/minisite/testing`, the site's tests/smoke.test.js
826
+ calling it with its config, `minisite.json`, texts, `SOURCES.json` and text
827
+ namespace; it also checks the chrome against `SOURCES.json`
828
+ (`checkChromeSources`, viewer-core).
829
+
817
830
  - **Routes** (`minisiteRoutes`): `home`, `introduction`,
818
831
  `exhibition` (`/exhibition/<theme>/<page>`, 1-based as legacy's addresses),
819
832
  and legacy's windows `credits`, `map` and `zoom`, marked `meta.bare` and drawn