@museumwnf/viewer-layout 2.17.0 → 2.18.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 +56 -28
- package/dist/FeaturedRecord-mRyLN7Mt.js +88 -0
- package/dist/OnDisplayIn-D6r_KvpI.js +1819 -0
- package/dist/PictureNarrative-B_GPQvYP.js +444 -0
- package/dist/SiteShell-C3OgZO8p.js +154 -0
- package/dist/Theme-Caz0E8w1.js +140 -0
- package/dist/TimelineResultsView-CMqrkr9z.js +1911 -0
- package/dist/components.js +2 -154
- package/dist/content-CHXh6D_q.js +84 -0
- package/dist/content.js +5 -5
- package/dist/data-BfyYB8ff.js +33 -0
- package/dist/data-G8uXeEfE.js +35 -0
- package/dist/dxa.js +1216 -343
- package/dist/index.js +5 -5
- package/dist/themeSpecs-Bgn-K6R6.js +34 -0
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +43 -751
- package/package.json +3 -3
- package/src/tokens.reference.css +12 -3
- package/dist/BackLink-CYgmd0iX.js +0 -73
- package/dist/OnDisplayIn-ZfRUtPd1.js +0 -547
- package/dist/TimelineEventList-D5Hot788.js +0 -1362
- package/dist/TimelineResultsView-DJo_yYEK.js +0 -1203
- package/dist/content-CvUktO-g.js +0 -454
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ all the packages:
|
|
|
17
17
|
| `@museumwnf/viewer-layout/content` | building blocks | the blocks alone, without the shell | the same |
|
|
18
18
|
| `@museumwnf/viewer-layout/views` | composed views | whole pages driven by a spec the website declares, with slots it fills | viewer-core's data layer, the site config and the router |
|
|
19
19
|
| `@museumwnf/viewer-layout/components` | composed views | `SiteShell`, the frame composed from `dataset.config.js` | the site config and the current route |
|
|
20
|
-
| `@museumwnf/viewer-layout/dxa` | DXA family layer | the gallery and exhibition pages, `standardRoutes` | the entries above, `@museumwnf/viewer-core` and `@museumwnf/viewer-core/dxa` |
|
|
20
|
+
| `@museumwnf/viewer-layout/dxa` | DXA family layer | the gallery and exhibition pages and shells, the family-only blocks, `standardRoutes`, `galleryConfig` / `exhibitionConfig` | the entries above, `@museumwnf/viewer-core` and `@museumwnf/viewer-core/dxa` |
|
|
21
21
|
| `@museumwnf/viewer-layout/style.css` | — | one stylesheet for every entry, the family styles included | — |
|
|
22
22
|
| `@museumwnf/viewer-layout/tokens.reference.css` | — | every token the package reads, with its fallback | — |
|
|
23
23
|
|
|
@@ -46,14 +46,15 @@ entries publish, and `@museumwnf/viewer-core`. A component that moves
|
|
|
46
46
|
between entries keeps its old export as an alias until the websites have
|
|
47
47
|
moved; a major release then removes the alias.
|
|
48
48
|
|
|
49
|
-
Where the package does not follow these rules yet, milestone M10 moves it:
|
|
50
49
|
`FeaturedPartners`, `SiblingGalleries`, `PopupLogo`, `PictureGallery`,
|
|
51
|
-
`PictureNarrative` (blocks) and `
|
|
52
|
-
only by the DXA family and
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
does not
|
|
50
|
+
`PictureNarrative` (blocks) and `ItemDetailView` (the composed view that was
|
|
51
|
+
`RecordSheetView`) are used only by the DXA family and live under `/dxa`
|
|
52
|
+
since 2.18.0; `/content` and `/views` keep their old names as deprecated
|
|
53
|
+
aliases until the next major
|
|
54
|
+
([inventory-app#2055](https://github.com/museumwithnofrontiers/inventory-app/issues/2055)).
|
|
55
|
+
Where the package does not follow the rules yet: `PictureGallery`,
|
|
56
|
+
`PictureNarrative` and `EssayView` default to `exhibition.*` entries
|
|
57
|
+
(inventory-app#2019).
|
|
57
58
|
|
|
58
59
|
Two companion docs give a more scannable version of who-owns-what and the
|
|
59
60
|
full slot list: [`docs/designer-contract.md`](docs/designer-contract.md) (the
|
|
@@ -355,14 +356,15 @@ every bundle of `@museumwnf/viewer-i18n` from 1.7.0. `GlossaryTool` also reads
|
|
|
355
356
|
`.additionalContent`, `.addRelatedWorks`, `.hideRelatedWorks` and
|
|
356
357
|
`exhibition.related.items`, `.reciprocal`, which only the `exhibition` and
|
|
357
358
|
`standalone` bundles of `@museumwnf/viewer-i18n` carry — a family default
|
|
358
|
-
in
|
|
359
|
+
in the family's entry now, where the two live since 2.18.0 (see
|
|
359
360
|
[Entry points and layers](#entry-points-and-layers)). Every other text is a
|
|
360
361
|
prop.
|
|
361
362
|
|
|
362
363
|
`FeaturedPartners`, `SiblingGalleries`, `PopupLogo`, `PictureGallery` and
|
|
363
|
-
`PictureNarrative` are used only by the DXA family, and
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
`PictureNarrative` are used only by the DXA family, and live under `/dxa`
|
|
365
|
+
since 2.18.0; their exports here are deprecated aliases until the next
|
|
366
|
+
major. `FeaturedPartners`' heading defaults to `partner.list.featured`
|
|
367
|
+
(viewer-i18n 4.3.0).
|
|
366
368
|
|
|
367
369
|
## Content classes
|
|
368
370
|
|
|
@@ -386,8 +388,9 @@ Building blocks copied from the legacy sites' own `site.css` files, available as
|
|
|
386
388
|
Whole pages, made of the content components on viewer-core's
|
|
387
389
|
composables and driven by a declaration the website writes instead of a
|
|
388
390
|
page. They are the broad page structures every kind of website shares;
|
|
389
|
-
`RecordSheetView`, used only by the DXA family,
|
|
390
|
-
|
|
391
|
+
`RecordSheetView`, used only by the DXA family, is `/dxa`'s `ItemDetailView`
|
|
392
|
+
since 2.18.0, and stays here as a deprecated alias until the next major.
|
|
393
|
+
They are exported from `@museumwnf/viewer-layout/views` — and only from
|
|
391
394
|
there: they read the records and the engine from `@museumwnf/viewer-core`
|
|
392
395
|
itself, whose entry point carries `.vue` files, and a website's test runner
|
|
393
396
|
that loads this package natively would fail on the first one if the package
|
|
@@ -505,24 +508,49 @@ it, and a website can still replace any family page with its own component
|
|
|
505
508
|
on the same route name. Texts stay in `@museumwnf/viewer-i18n`'s `gallery`
|
|
506
509
|
and `exhibition` sections.
|
|
507
510
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
families: `PartnerDetail`, the partner page (`PartnerPanel`'s `full`
|
|
511
|
-
variant), fed by each family's own half — `galleryPartnerDetail` /
|
|
512
|
-
`exhibitionPartnerDetail`, which `standardRoutes` passes as its `family`
|
|
513
|
-
prop; `GalleryPartnerProfile`/`ExhibitionPartnerProfile` are the same page
|
|
514
|
-
under their old names.
|
|
511
|
+
Since 2.18.0 it holds a whole DXA site but its values. A gallery's or an
|
|
512
|
+
exhibition's `dataset.config.js` is one call:
|
|
515
513
|
|
|
516
514
|
```js
|
|
517
|
-
import {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
515
|
+
import { galleryConfig } from '@museumwnf/viewer-layout/dxa'
|
|
516
|
+
|
|
517
|
+
export default galleryConfig({
|
|
518
|
+
datasetPackage: '@museumwnf/carpets-data',
|
|
519
|
+
siteName: 'Carpets', // for a package without manifest.site
|
|
520
|
+
origin: 'https://museumwithnofrontiers.github.io/carpets',
|
|
521
|
+
projectColors: { '<project id>': 'mwnf-chip--DCA' }, // one of the mwnf-chip--* classes
|
|
522
|
+
noticeProjects: ['<project id>'], // sheets with the Explore-partner notice
|
|
523
|
+
creditsBody: 'carpets.credits.body',
|
|
524
|
+
})
|
|
524
525
|
```
|
|
525
526
|
|
|
527
|
+
`exhibitionConfig` takes the same values (and `partnerObjects`, overrides of
|
|
528
|
+
the shared `exhibition.partnerObjects.*` entries). The config carries the
|
|
529
|
+
family's shell (`GalleryShell` / `ExhibitionShell`), menu, banner, sponsor
|
|
530
|
+
strip, legacy redirects, and every page through
|
|
531
|
+
`standardRoutes(family, { pages: true, … })`:
|
|
532
|
+
|
|
533
|
+
- the eleven pages every site of a family already served from here
|
|
534
|
+
(search, partners, partner and institution pages, timeline results and
|
|
535
|
+
gallery, collection search and results, and a gallery's about and
|
|
536
|
+
credits);
|
|
537
|
+
- with `pages: true`, the pages each site used to carry itself: the home
|
|
538
|
+
page, the item page (`GalleryItemDetail` / `ExhibitionItemDetail`, on
|
|
539
|
+
`ItemDetailView` and viewer-core's `useGalleryItemDetail` /
|
|
540
|
+
`useExhibitionItemDetail`), the timeline entrance, and an exhibition's
|
|
541
|
+
about page, themes, theme pages, theme galleries, related content and
|
|
542
|
+
credits.
|
|
543
|
+
|
|
544
|
+
One page serves both families: `PartnerDetail`, the partner page
|
|
545
|
+
(`PartnerPanel`'s `full` variant), fed by each family's own half —
|
|
546
|
+
`galleryPartnerDetail` / `exhibitionPartnerDetail`, which `standardRoutes`
|
|
547
|
+
passes as its `family` prop; `GalleryPartnerProfile` /
|
|
548
|
+
`ExhibitionPartnerProfile` are the same page under their old names.
|
|
549
|
+
|
|
550
|
+
An exhibition's theme pages read its three theme colours as
|
|
551
|
+
`--mwnf-dxa-theme-*` tokens; a record with no project gets the
|
|
552
|
+
`mwnf-chip--Explore` chip.
|
|
553
|
+
|
|
526
554
|
Route names and paths are pinned to what every live DXA site already
|
|
527
555
|
registers, so adopting the factory keeps every existing deep link (and
|
|
528
556
|
every `legacyRoutes` resolver targeting those names) working unmodified.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { T as e } from "./OnDisplayIn-D6r_KvpI.js";
|
|
2
|
+
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, openBlock as s, renderList as c, renderSlot as l, toDisplayString as u, useSlots as d, withCtx as f } from "vue";
|
|
3
|
+
//#region src/content/FeaturedRecord.vue
|
|
4
|
+
var p = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "mwnf-featured"
|
|
7
|
+
}, m = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "mwnf-featured__heading"
|
|
10
|
+
}, h = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "mwnf-featured__media"
|
|
13
|
+
}, g = ["src", "alt"], _ = { class: "mwnf-featured__body" }, v = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "mwnf-featured__eyebrow"
|
|
16
|
+
}, y = ["innerHTML"], b = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "mwnf-featured__action"
|
|
19
|
+
}, x = {
|
|
20
|
+
__name: "FeaturedRecord",
|
|
21
|
+
props: {
|
|
22
|
+
image: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
imageAlt: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
eyebrow: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
name: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
meta: {
|
|
39
|
+
type: Array,
|
|
40
|
+
default: () => []
|
|
41
|
+
},
|
|
42
|
+
action: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ""
|
|
45
|
+
},
|
|
46
|
+
to: {
|
|
47
|
+
type: [String, Object],
|
|
48
|
+
default: null
|
|
49
|
+
},
|
|
50
|
+
href: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ""
|
|
53
|
+
},
|
|
54
|
+
heading: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ""
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
setup(x) {
|
|
60
|
+
let S = x, C = d(), w = n(() => !!(S.name || S.image || C.default));
|
|
61
|
+
return (n, d) => w.value ? (s(), i("section", p, [x.heading ? (s(), i("h2", m, u(x.heading), 1)) : r("", !0), l(n.$slots, "default", {}, () => [o(e, {
|
|
62
|
+
class: "mwnf-featured__link",
|
|
63
|
+
to: x.to,
|
|
64
|
+
href: x.href
|
|
65
|
+
}, {
|
|
66
|
+
default: f(() => [x.image ? (s(), i("span", h, [a("img", {
|
|
67
|
+
class: "mwnf-featured__image",
|
|
68
|
+
src: x.image,
|
|
69
|
+
alt: x.imageAlt,
|
|
70
|
+
loading: "eager"
|
|
71
|
+
}, null, 8, g)])) : r("", !0), a("span", _, [
|
|
72
|
+
x.eyebrow ? (s(), i("span", v, u(x.eyebrow), 1)) : r("", !0),
|
|
73
|
+
a("span", {
|
|
74
|
+
class: "mwnf-featured__name",
|
|
75
|
+
innerHTML: x.name
|
|
76
|
+
}, null, 8, y),
|
|
77
|
+
(s(!0), i(t, null, c(x.meta, (e, t) => (s(), i("span", {
|
|
78
|
+
key: t,
|
|
79
|
+
class: "mwnf-featured__meta"
|
|
80
|
+
}, u(e), 1))), 128)),
|
|
81
|
+
x.action ? (s(), i("span", b, u(x.action) + " →", 1)) : r("", !0)
|
|
82
|
+
])]),
|
|
83
|
+
_: 1
|
|
84
|
+
}, 8, ["to", "href"])])])) : r("", !0);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { x as t };
|