@museumwnf/viewer-layout 2.14.0 → 2.15.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 +24 -0
- package/dist/BackLink-BJ16COHd.js +106 -0
- package/dist/TimelineEventList-BmfLBaTT.js +967 -0
- package/dist/TimelineLookup-DRc43FkL.js +444 -0
- package/dist/TimelineResultsView-D78PPWk-.js +1220 -0
- package/dist/content-DUXrQ-l8.js +353 -0
- package/dist/content.js +5 -3
- package/dist/dxa.js +1116 -0
- package/dist/index.js +5 -3
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +400 -1609
- package/package.json +4 -3
- package/src/tokens.reference.css +4 -0
- package/dist/TimelineLookup-D8qr1tmY.js +0 -1403
- package/dist/content-G-g7U3_2.js +0 -452
package/README.md
CHANGED
|
@@ -423,6 +423,30 @@ except where noted:
|
|
|
423
423
|
| islamicart/baroqueart `TimelineEntrance`/`TimelineResults` | the same controls, `event: (event, ctx) => ({ ..., actions: [{ label: 'timeline.action.viewItemsFromPeriod', to: itemsLink(event) }] })` for the per-event "View items from this period" link |
|
|
424
424
|
| sharinghistory `TimelineResults` (no separate entrance page in legacy; `entrance: true` on the same spec shape covers it) | `scope: 'collection'`, `controls` adding `{ key: 'collection', label: 'sharinghistory.nav.timeline' }` fed by `collections: (ctx) => [{ value: 'pc', label: t('sharinghistory.nav.permanentCollection') }, ...exhibitions]`, `event(...)` composing the "Country \| Theme" `caption` and the image/item strip as `media` |
|
|
425
425
|
|
|
426
|
+
## DXA family pages
|
|
427
|
+
|
|
428
|
+
`@museumwnf/viewer-layout/dxa` ships the gallery/exhibition thin pages
|
|
429
|
+
confirmed byte-identical within each DXA site pair on `origin/main` —
|
|
430
|
+
11 gallery pages (from carpets/amulets), 9 exhibition pages (from
|
|
431
|
+
the-use-of-colours-in-art/water-in-islam) — plus `standardRoutes(family,
|
|
432
|
+
config)`, the RouteRecord factory a site spreads into `extraViews`:
|
|
433
|
+
|
|
434
|
+
```js
|
|
435
|
+
import { standardRoutes } from '@museumwnf/viewer-layout/dxa'
|
|
436
|
+
|
|
437
|
+
extraViews: [
|
|
438
|
+
...standardRoutes('gallery', { creditsBody: 'carpets.credits.body' }),
|
|
439
|
+
// + this gallery's own routes: home, item, collection entrance,
|
|
440
|
+
// timeline entrance, partners entrance
|
|
441
|
+
]
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
Route names and paths are pinned to what every live DXA site already
|
|
445
|
+
registers, so adopting the factory keeps every existing deep link (and
|
|
446
|
+
every `legacyRoutes` resolver targeting those names) working unmodified.
|
|
447
|
+
Full page-by-page prop/slot/entry table in
|
|
448
|
+
[`docs/slot-catalogue.md`](docs/slot-catalogue.md#dxa-family-pages-museumwnfviewer-layoutdxa).
|
|
449
|
+
|
|
426
450
|
## Theming
|
|
427
451
|
|
|
428
452
|
Every color, font, spacing, radius comes from a `--mwnf-*` CSS custom property with a neutral fallback. Full list: [`tokens.reference.css`](src/tokens.reference.css) (also exported as `@museumwnf/viewer-layout/tokens.reference.css`) — copy it into your website as `theme/tokens.css` and set values.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { g as e } from "./TimelineEventList-BmfLBaTT.js";
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, openBlock as s, toDisplayString as c, withCtx as l } from "vue";
|
|
3
|
+
import { useRouter as u } from "vue-router";
|
|
4
|
+
//#region src/content/PartnerMap.vue
|
|
5
|
+
var d = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "mwnf-partner-map"
|
|
8
|
+
}, f = { class: "mwnf-partner-map__title" }, p = ["src", "title"], m = { class: "mwnf-partner-map__link" }, h = ["href"], g = {
|
|
9
|
+
__name: "PartnerMap",
|
|
10
|
+
props: {
|
|
11
|
+
latitude: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: null
|
|
14
|
+
},
|
|
15
|
+
longitude: {
|
|
16
|
+
type: Number,
|
|
17
|
+
default: null
|
|
18
|
+
},
|
|
19
|
+
zoom: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 15
|
|
22
|
+
},
|
|
23
|
+
mapTitleEntry: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "partner.map.map"
|
|
26
|
+
},
|
|
27
|
+
mapOfEntry: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "partner.map.mapOf"
|
|
30
|
+
},
|
|
31
|
+
openMapLinkEntry: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "partner.map.openInOpenStreetMap"
|
|
34
|
+
},
|
|
35
|
+
label: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ""
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
setup(e) {
|
|
41
|
+
let n = e, o = t(() => Number.isFinite(n.latitude) && Number.isFinite(n.longitude)), l = t(() => {
|
|
42
|
+
let e = 360 / 2 ** Math.max(1, Math.min(19, n.zoom || 15)), [t, r] = [n.latitude, n.longitude];
|
|
43
|
+
return [
|
|
44
|
+
r - e,
|
|
45
|
+
t - e / 2,
|
|
46
|
+
r + e,
|
|
47
|
+
t + e / 2
|
|
48
|
+
].join("%2C");
|
|
49
|
+
}), u = t(() => `https://www.openstreetmap.org/export/embed.html?bbox=${l.value}&layer=mapnik&marker=${n.latitude}%2C${n.longitude}`), g = t(() => `https://www.openstreetmap.org/?mlat=${n.latitude}&mlon=${n.longitude}#map=${n.zoom || 15}/${n.latitude}/${n.longitude}`);
|
|
50
|
+
return (t, n) => o.value ? (s(), i("div", d, [
|
|
51
|
+
a("p", f, c(t.$t(e.mapTitleEntry)), 1),
|
|
52
|
+
a("iframe", {
|
|
53
|
+
src: u.value,
|
|
54
|
+
title: e.label ? t.$t(e.mapOfEntry, { label: e.label }) : t.$t(e.mapTitleEntry),
|
|
55
|
+
loading: "lazy",
|
|
56
|
+
referrerpolicy: "no-referrer",
|
|
57
|
+
class: "mwnf-partner-map__embed"
|
|
58
|
+
}, null, 8, p),
|
|
59
|
+
a("p", m, [a("a", {
|
|
60
|
+
href: g.value,
|
|
61
|
+
target: "_blank",
|
|
62
|
+
rel: "noopener"
|
|
63
|
+
}, "↗ " + c(t.$t(e.openMapLinkEntry)), 9, h)])
|
|
64
|
+
])) : r("", !0);
|
|
65
|
+
}
|
|
66
|
+
}, _ = { class: "mwnf-back-link" }, v = {
|
|
67
|
+
__name: "BackLink",
|
|
68
|
+
props: {
|
|
69
|
+
label: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: "core.action.back"
|
|
72
|
+
},
|
|
73
|
+
to: {
|
|
74
|
+
type: [String, Object],
|
|
75
|
+
default: null
|
|
76
|
+
},
|
|
77
|
+
href: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: ""
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
setup(t) {
|
|
83
|
+
let r = u();
|
|
84
|
+
function a() {
|
|
85
|
+
return window.history.length > 1;
|
|
86
|
+
}
|
|
87
|
+
function d(e) {
|
|
88
|
+
a() && (e.preventDefault(), r.back());
|
|
89
|
+
}
|
|
90
|
+
return (r, u) => (s(), i("div", _, [!a() && (t.to || t.href) ? (s(), n(e, {
|
|
91
|
+
key: 0,
|
|
92
|
+
to: t.to,
|
|
93
|
+
href: t.href,
|
|
94
|
+
class: "mwnf-back-link__button"
|
|
95
|
+
}, {
|
|
96
|
+
default: l(() => [o(" ↩ " + c(r.$t(t.label)), 1)]),
|
|
97
|
+
_: 1
|
|
98
|
+
}, 8, ["to", "href"])) : (s(), i("button", {
|
|
99
|
+
key: 1,
|
|
100
|
+
class: "mwnf-back-link__button",
|
|
101
|
+
onClick: d
|
|
102
|
+
}, " ↩ " + c(r.$t(t.label)), 1))]));
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
//#endregion
|
|
106
|
+
export { g as n, v as t };
|