@museumwnf/viewer-layout 2.15.2 → 2.16.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 +108 -28
- package/dist/BackLink-LfSIuXnL.js +45 -0
- package/dist/TimelineEventList-D5Hot788.js +1362 -0
- package/dist/{TimelineLookup-DRc43FkL.js → TimelineLookup-D-p1aQ_Z.js} +1 -1
- package/dist/TimelineResultsView-DJo_yYEK.js +1203 -0
- package/dist/{content-DUXrQ-l8.js → content-DncTPD5P.js} +46 -21
- package/dist/content.js +5 -5
- package/dist/dxa.js +418 -570
- package/dist/index.js +5 -5
- package/dist/viewer-layout.css +1 -1
- package/dist/views.js +287 -271
- package/package.json +3 -3
- package/src/tokens.reference.css +26 -0
- package/dist/BackLink-BJ16COHd.js +0 -106
- package/dist/TimelineEventList-BmfLBaTT.js +0 -967
- package/dist/TimelineResultsView-D78PPWk-.js +0 -1220
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@museumwnf/viewer-layout",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0",
|
|
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",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"test": "vitest run"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@museumwnf/viewer-core": "^
|
|
38
|
+
"@museumwnf/viewer-core": "^2.1.0",
|
|
39
39
|
"vue": "^3.5.0",
|
|
40
40
|
"vue-router": "^4.5.0 || ^5.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@museumwnf/viewer-core": "^1.
|
|
43
|
+
"@museumwnf/viewer-core": "^2.1.0",
|
|
44
44
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
45
45
|
"@vue/test-utils": "^2.4.11",
|
|
46
46
|
"jsdom": "^30.0.1",
|
package/src/tokens.reference.css
CHANGED
|
@@ -316,6 +316,7 @@
|
|
|
316
316
|
/* --mwnf-credits-gap: 0.25rem 1rem; Gap in the credits list */
|
|
317
317
|
|
|
318
318
|
/* ---------- Content: RecordSheetView (the DXA item sheet's own blocks) ---------- */
|
|
319
|
+
/* --mwnf-sheet-museum-gap: 0.25rem; Holder text to partner summary */
|
|
319
320
|
/* --mwnf-sheet-source-size: 0.875rem; Source-database block text size */
|
|
320
321
|
/* --mwnf-sheet-source-gap: 0.375rem; Gap between its lines */
|
|
321
322
|
/* --mwnf-sheet-source-uid-size: 0.75rem; backward_compatibility code size */
|
|
@@ -566,6 +567,31 @@
|
|
|
566
567
|
/* --mwnf-partner-map-link-gap: 0.375rem; Gap before the full-map link */
|
|
567
568
|
/* --mwnf-partner-map-link-size: 0.875rem; Full-map link text size */
|
|
568
569
|
|
|
570
|
+
/* ---------- Content: PartnerPanel ---------- */
|
|
571
|
+
/* --mwnf-partner-name-color: inherit; Name, section and contact headings */
|
|
572
|
+
/* --mwnf-partner-name-weight: 700; Name weight (page, heading) */
|
|
573
|
+
/* --mwnf-partner-link-color: var(--mwnf-color-accent); Links: name, actions, contact, homepage */
|
|
574
|
+
/* --mwnf-partner-muted-color: var(--mwnf-color-muted); Location, count, dividers */
|
|
575
|
+
/* --mwnf-partner-divider-gap: 0.375rem; Space around a | divider */
|
|
576
|
+
/* --mwnf-partner-logo-width: 7.5rem; Line/summary logo, max width */
|
|
577
|
+
/* --mwnf-partner-logo-height: 4.375rem; Line/summary logo, max height */
|
|
578
|
+
/* --mwnf-partner-line-gap: 0.75rem; Gap between logo and text */
|
|
579
|
+
/* --mwnf-partner-line-name-weight: 500; Name weight in a list line */
|
|
580
|
+
/* --mwnf-partner-line-meta-gap: 0.1875rem; Gap above the count and actions */
|
|
581
|
+
/* --mwnf-partner-meta-size: 0.8125rem; Count and actions text size */
|
|
582
|
+
/* --mwnf-partner-summary-name-weight: 400; Name weight in the item-page line */
|
|
583
|
+
/* --mwnf-partner-gap: 0.75rem; Gap between the page's parts */
|
|
584
|
+
/* --mwnf-partner-header-gap: 0.25rem; Gap under the name and headings */
|
|
585
|
+
/* --mwnf-partner-title-size: 1.5rem; Name size on the partner page */
|
|
586
|
+
/* --mwnf-partner-bar-padding: 0.5rem 0.75rem; Tab band padding */
|
|
587
|
+
/* --mwnf-partner-bar-background: #f0f0f0; Tab band background */
|
|
588
|
+
/* --mwnf-partner-tab-size: 0.9375rem; Tab and homepage text size */
|
|
589
|
+
/* --mwnf-partner-tab-color: inherit; Tab text color */
|
|
590
|
+
/* --mwnf-partner-body-gap: 1.625rem; Gap between pictures and panel */
|
|
591
|
+
/* --mwnf-partner-pictures-width: 38%; Pictures column width */
|
|
592
|
+
/* --mwnf-partner-line-height: 1.55; Panel line height */
|
|
593
|
+
/* --mwnf-partner-logos-width: 12.5rem; Logo tab image, max width */
|
|
594
|
+
|
|
569
595
|
/* ---------- Content: FeaturedPartners ---------- */
|
|
570
596
|
/* --mwnf-featured-partners-padding: 1.25rem 0; Vertical padding */
|
|
571
597
|
/* --mwnf-featured-partners-background: transparent; Background color */
|
|
@@ -1,106 +0,0 @@
|
|
|
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 };
|