@projektemacher/storymapjs 0.10.8 → 0.11.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/CHANGELOG +81 -0
- package/README.md +129 -12
- package/dist/assets/{demo-DBpeF31K.js → demo-bWnOyfUw.js} +1 -1
- package/dist/assets/harness-C3JUv5Ii.js +1 -0
- package/dist/assets/{harness-multi-CYHgI0a9.js → harness-multi-XZNex3tb.js} +1 -1
- package/dist/assets/{harness-support-Do7sIp2j.js → harness-support-CjfZIVeb.js} +1 -1
- package/dist/assets/main-DQ32hWBM.js +17 -0
- package/dist/context.json +13 -2
- package/dist/css/storymap.css +1 -1
- package/dist/demo.html +3 -2
- package/dist/docs/api/assets/navigation.js +1 -1
- package/dist/docs/api/assets/search.js +1 -1
- package/dist/docs/api/classes/StoryMap.html +777 -269
- package/dist/docs/api/functions/MediaType.html +1 -1
- package/dist/docs/api/functions/isPresentation3Collection.html +1 -1
- package/dist/docs/api/functions/isPresentation3Manifest.html +1 -1
- package/dist/docs/api/functions/isSlideshowCollection.html +51 -0
- package/dist/docs/api/functions/loadCSS.html +1 -1
- package/dist/docs/api/functions/manifestToStorymapData.html +1 -1
- package/dist/docs/api/functions/setLanguage.html +1 -1
- package/dist/docs/api/functions/slideshowToStorymapData.html +51 -0
- package/dist/docs/api/functions/slideshowVersion.html +48 -0
- package/dist/docs/api/functions/storymapToManifest.html +1 -1
- package/dist/docs/api/functions/validateStorymap.html +1 -1
- package/dist/docs/api/functions/validateStorymapAndReport.html +1 -1
- package/dist/docs/api/index.html +115 -12
- package/dist/docs/api/interfaces/AnimationHandle.html +2 -2
- package/dist/docs/api/interfaces/ImagereadyPayload.html +4 -4
- package/dist/docs/api/interfaces/LanguageEntry.html +6 -6
- package/dist/docs/api/interfaces/LatLngLiteral.html +4 -4
- package/dist/docs/api/interfaces/LoadOptions.html +2 -2
- package/dist/docs/api/interfaces/MapEvents.html +116 -0
- package/dist/docs/api/interfaces/MapMarkerEvents.html +66 -0
- package/dist/docs/api/interfaces/MarkerEventPayload.html +57 -0
- package/dist/docs/api/interfaces/MediaEvents.html +78 -0
- package/dist/docs/api/interfaces/MenuBarEvents.html +114 -0
- package/dist/docs/api/interfaces/MessageEvents.html +72 -0
- package/dist/docs/api/interfaces/OlLayer.html +1 -1
- package/dist/docs/api/interfaces/OlMap.html +1 -1
- package/dist/docs/api/interfaces/OlSource.html +1 -1
- package/dist/docs/api/interfaces/OlTileLayer.html +1 -1
- package/dist/docs/api/interfaces/OlVectorLayer.html +1 -1
- package/dist/docs/api/interfaces/OlView.html +1 -1
- package/dist/docs/api/interfaces/SlideBackgroundState.html +66 -0
- package/dist/docs/api/interfaces/SlideEvents.html +78 -0
- package/dist/docs/api/interfaces/SlideNavEvents.html +72 -0
- package/dist/docs/api/interfaces/SlideshowPlayerSettings.html +182 -0
- package/dist/docs/api/interfaces/SlideshowToStorymapResult.html +60 -0
- package/dist/docs/api/interfaces/SlideshowTranslatorOptions.html +65 -0
- package/dist/docs/api/interfaces/SlideshowWarning.html +72 -0
- package/dist/docs/api/interfaces/StoryMapEvents.html +146 -0
- package/dist/docs/api/interfaces/StoryMapMarker.html +763 -0
- package/dist/docs/api/interfaces/StorySliderEvents.html +102 -0
- package/dist/docs/api/interfaces/StorymapBasemap.html +69 -0
- package/dist/docs/api/interfaces/StorymapData.html +12 -6
- package/dist/docs/api/interfaces/StorymapDataWrapper.html +2 -2
- package/dist/docs/api/interfaces/StorymapDocument.html +2 -2
- package/dist/docs/api/interfaces/StorymapError.html +3 -3
- package/dist/docs/api/interfaces/StorymapGeoreference.html +5 -5
- package/dist/docs/api/interfaces/StorymapGeoreferenceBody.html +4 -4
- package/dist/docs/api/interfaces/StorymapGroundControlPoint.html +4 -4
- package/dist/docs/api/interfaces/StorymapLanguageMap.html +2 -2
- package/dist/docs/api/interfaces/StorymapManifest.html +12 -12
- package/dist/docs/api/interfaces/StorymapManifestAnnotation.html +43 -11
- package/dist/docs/api/interfaces/StorymapManifestBackground.html +6 -6
- package/dist/docs/api/interfaces/StorymapManifestCanvas.html +65 -17
- package/dist/docs/api/interfaces/StorymapManifestContentResource.html +8 -8
- package/dist/docs/api/interfaces/StorymapManifestFeatureCollection.html +4 -4
- package/dist/docs/api/interfaces/StorymapManifestGeoreferencing.html +7 -7
- package/dist/docs/api/interfaces/StorymapManifestImageService.html +4 -4
- package/dist/docs/api/interfaces/StorymapManifestRange.html +5 -5
- package/dist/docs/api/interfaces/StorymapManifestService.html +4 -4
- package/dist/docs/api/interfaces/StorymapManifestSpecificResource.html +4 -4
- package/dist/docs/api/interfaces/StorymapManifestStatement.html +3 -3
- package/dist/docs/api/interfaces/StorymapMapOptions.html +5 -5
- package/dist/docs/api/interfaces/StorymapOptions.html +277 -75
- package/dist/docs/api/interfaces/StorymapOverlayLayer.html +42 -11
- package/dist/docs/api/interfaces/StorymapSlide.html +70 -16
- package/dist/docs/api/interfaces/StorymapSlideBackground.html +4 -4
- package/dist/docs/api/interfaces/StorymapSlideLocation.html +58 -14
- package/dist/docs/api/interfaces/StorymapSlideMarker.html +8 -9
- package/dist/docs/api/interfaces/StorymapSlideMedia.html +49 -10
- package/dist/docs/api/interfaces/StorymapSlideNarration.html +61 -9
- package/dist/docs/api/interfaces/StorymapSlideText.html +4 -4
- package/dist/docs/api/interfaces/StorymapTilejson.html +8 -8
- package/dist/docs/api/interfaces/SwipableEvents.html +102 -0
- package/dist/docs/api/interfaces/TextEvents.html +66 -0
- package/dist/docs/api/media/events.md +66 -0
- package/dist/docs/api/media/migration-from-knightlab.md +89 -49
- package/dist/docs/api/media/slideshow.md +109 -0
- package/dist/docs/api/media/storymap-as-iiif-manifest.md +1007 -0
- package/dist/docs/api/modules.html +6 -6
- package/dist/docs/api/types/ContentState.html +3 -3
- package/dist/docs/api/types/FiredEvent.html +43 -0
- package/dist/docs/api/types/ImagereadyKind.html +1 -1
- package/dist/docs/api/types/MediaTypeMatch.html +5 -5
- package/dist/docs/api/types/SwipeDirection.html +36 -0
- package/dist/docs/api/types/TileSourceFactory.html +1 -1
- package/dist/docs/authoring.html +20 -7
- package/dist/docs/events.html +263 -0
- package/dist/docs/iiif.html +136 -22
- package/dist/docs/migration.html +66 -19
- package/dist/docs/readme.html +113 -12
- package/dist/embed/index.html +7 -0
- package/dist/examples/font-css-false.json +33 -0
- package/dist/examples/issue-image-region.json +1 -1
- package/dist/examples/layers-control.json +60 -0
- package/dist/examples/map-template-provider.json +36 -0
- package/dist/examples/multi-media.json +71 -0
- package/dist/examples-iiif/annotated-image.json +16 -0
- package/dist/examples-iiif/font-css-false.json +114 -0
- package/dist/examples-iiif/issue-image-region.json +1 -1
- package/dist/examples-iiif/layers-control.json +226 -0
- package/dist/examples-iiif/map-template-provider.json +133 -0
- package/dist/examples-iiif/multi-media.json +237 -0
- package/dist/examples-slideshow/single.json +79 -0
- package/dist/examples-slideshow/static/pixel.png +0 -0
- package/dist/examples-slideshow/static.json +44 -0
- package/dist/harness-multi.html +3 -3
- package/dist/harness.html +4 -3
- package/dist/index.html +3 -2
- package/dist/js/storymap.d.ts +1326 -289
- package/dist/js/storymap.js +6690 -4784
- package/dist/js/storymap.js.map +1 -1
- package/dist/navplace-properties.json +14 -0
- package/dist/site.css +54 -36
- package/docs/migration-from-knightlab.md +89 -49
- package/docs/storymap-as-iiif-manifest.md +199 -126
- package/package.json +4 -2
- package/schema/storymap.schema.json +334 -34
- package/src/core/Util.ts +3 -1
- package/src/core/mixins.ts +42 -28
- package/src/language/Language.ts +7 -0
- package/src/language/locale/.expected-gaps.json +287 -27
- package/src/language/locale/de.json +11 -1
- package/src/language/locale/en.json +11 -1
- package/src/main.ts +51 -0
- package/src/map/Map.ts +44 -6
- package/src/map/MapMarker.ts +16 -3
- package/src/map/openlayers/Map.OpenLayers.ts +787 -62
- package/src/map/openlayers/MapMarker.OpenLayers.ts +113 -13
- package/src/map/slideView.ts +149 -0
- package/src/map/types.ts +2 -0
- package/src/media/EmbedUtil.ts +27 -2
- package/src/media/Media.ts +27 -4
- package/src/media/embedId.ts +6 -0
- package/src/media/types/Flickr.ts +14 -3
- package/src/media/types/HtmlMedia.ts +66 -0
- package/src/media/types/Image.ts +15 -3
- package/src/media/types/SoundCloud.ts +1 -1
- package/src/media/types/Text.ts +27 -8
- package/src/media/types/Twitter.ts +9 -7
- package/src/media/types/Vimeo.ts +1 -1
- package/src/media/types/YouTube.ts +2 -2
- package/src/scss/Typography.scss +15 -15
- package/src/scss/VCO.StoryMap.scss +173 -8
- package/src/scss/core/Reset.scss +5 -18
- package/src/scss/map/VCO.Map.scss +1 -1
- package/src/scss/map/VCO.MapMarker.scss +20 -9
- package/src/scss/map/openlayers/VCO.Map.OpenLayers.scss +7 -4
- package/src/scss/media/VCO.Media.scss +7 -7
- package/src/scss/media/types/VCO.Media.Blockquote.scss +1 -1
- package/src/scss/media/types/VCO.Media.Text.scss +5 -5
- package/src/scss/media/types/VCO.Media.Twitter.scss +4 -4
- package/src/scss/media/types/VCO.Media.Wikipedia.scss +2 -19
- package/src/scss/site/site.scss +55 -36
- package/src/scss/slider/VCO.Slide.scss +49 -11
- package/src/scss/slider/VCO.SlideNav.scss +23 -7
- package/src/scss/slider/VCO.StorySlider.scss +50 -0
- package/src/scss/snapmap/VCO.SnapMap.scss +3 -3
- package/src/scss/ui/VCO.Consent.scss +20 -14
- package/src/scss/ui/VCO.Layers.scss +119 -0
- package/src/scss/ui/VCO.MenuBar.Button.scss +140 -19
- package/src/scss/ui/VCO.MenuBar.scss +9 -2
- package/src/scss/ui/VCO.Message.scss +14 -0
- package/src/slider/Slide.ts +232 -74
- package/src/slider/SlideNav.ts +15 -4
- package/src/slider/StorySlider.ts +203 -22
- package/src/storymap/Consent.ts +22 -0
- package/src/storymap/StoryMap.ts +944 -131
- package/src/storymap/content-state.ts +3 -8
- package/src/storymap/font-css.ts +72 -0
- package/src/storymap/from-slideshow.ts +785 -0
- package/src/storymap/iiif-shared.ts +228 -0
- package/src/storymap/iiif.ts +289 -100
- package/src/storymap/to-iiif.ts +131 -44
- package/src/types.ts +382 -17
- package/src/ui/LayersControl.ts +302 -0
- package/src/ui/MenuBar.ts +232 -21
- package/src/ui/Message.ts +36 -3
- package/src/ui/Swipable.ts +25 -7
- package/dist/assets/harness-Cr0rYpvt.js +0 -1
- package/dist/assets/main-DXalctuR.js +0 -17
- package/src/scss/VCO.StoryMap.Dark.scss +0 -150
- package/src/scss/Variables.Dark.scss +0 -57
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use "../core/Mixins" as *;
|
|
2
|
+
@use "../Variables" as *;
|
|
2
3
|
|
|
3
4
|
/* StorySlider
|
|
4
5
|
================================================== */
|
|
@@ -10,6 +11,12 @@
|
|
|
10
11
|
height: 100%;
|
|
11
12
|
overflow: hidden;
|
|
12
13
|
|
|
14
|
+
// the container itself is in the tab order: keyboard focus gets a ring
|
|
15
|
+
&:focus-visible {
|
|
16
|
+
outline: 2px solid var(--vco-color-dark, #{$color-dark});
|
|
17
|
+
outline-offset: -2px;
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
// horizontal drags belong to the slider; vertical panning passes
|
|
14
21
|
// through to the page (mobile navigation, #288)
|
|
15
22
|
touch-action: pan-y;
|
|
@@ -36,6 +43,9 @@
|
|
|
36
43
|
}
|
|
37
44
|
|
|
38
45
|
.vco-slider-touch-mask {
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
position: absolute;
|
|
39
49
|
z-index: 25;
|
|
40
50
|
top: 0;
|
|
41
51
|
left: 0;
|
|
@@ -43,8 +53,11 @@
|
|
|
43
53
|
|
|
44
54
|
.vco-slider-container-mask {
|
|
45
55
|
text-align: center;
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
46
58
|
|
|
47
59
|
// overflow: scroll;
|
|
60
|
+
position: relative;
|
|
48
61
|
z-index: 5;
|
|
49
62
|
|
|
50
63
|
.vco-slider-container {
|
|
@@ -63,4 +76,41 @@
|
|
|
63
76
|
}
|
|
64
77
|
}
|
|
65
78
|
}
|
|
79
|
+
|
|
80
|
+
/* Static reading mode (mode: "static"): all slides stacked in a
|
|
81
|
+
scrollable list instead of a translating strip; the scroll-spy in
|
|
82
|
+
StorySlider follows the reading position. The container chain gets
|
|
83
|
+
definite heights so the slides' percentage min-height resolves and
|
|
84
|
+
the list actually overflows into a scroll. Specificity is raised via
|
|
85
|
+
.vco-storymap because this block compiles before the entry-file
|
|
86
|
+
landscape/base rules it must beat. Standard mode is untouched.
|
|
87
|
+
================================================== */
|
|
88
|
+
@at-root .vco-storymap &.vco-static {
|
|
89
|
+
overflow-y: auto;
|
|
90
|
+
|
|
91
|
+
.vco-slider-container-mask {
|
|
92
|
+
overflow: visible;
|
|
93
|
+
height: 100%;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.vco-slider-container {
|
|
97
|
+
position: relative;
|
|
98
|
+
height: 100%;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.vco-slider-item-container {
|
|
102
|
+
position: relative;
|
|
103
|
+
display: block;
|
|
104
|
+
height: 100%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.vco-slide {
|
|
108
|
+
position: relative;
|
|
109
|
+
left: auto !important;
|
|
110
|
+
top: auto !important;
|
|
111
|
+
height: auto;
|
|
112
|
+
min-height: 60%;
|
|
113
|
+
margin-bottom: 24px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
66
116
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
text-transform: none !important;
|
|
11
11
|
|
|
12
12
|
a {
|
|
13
|
-
color: color.adjust($color-dark, $lightness: 40%);
|
|
13
|
+
color: var(--vco-color-text-muted, #{color.adjust($color-dark, $lightness: 40%)});
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
font-weight: bold;
|
|
22
22
|
margin-top: 10px;
|
|
23
23
|
font-size: 12px;
|
|
24
|
-
color: color.adjust($color-dark, $lightness: 40%);
|
|
24
|
+
color: var(--vco-color-text-muted, #{color.adjust($color-dark, $lightness: 40%)});
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
&:before {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
display: none;
|
|
52
52
|
|
|
53
53
|
a {
|
|
54
|
-
color: #
|
|
54
|
+
color: var(--vco-color-dark, #{$color-dark});
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.vco-snapmap-instagram-posts,
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
.vco-consent-title {
|
|
21
21
|
margin: 0;
|
|
22
22
|
font-weight: bold;
|
|
23
|
-
color: $color-foreground;
|
|
23
|
+
color: var(--vco-color-foreground, #{$color-foreground});
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.vco-consent-message {
|
|
27
27
|
margin: 0;
|
|
28
|
-
color: $color-dark;
|
|
28
|
+
color: var(--vco-color-dark, #{$color-dark});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.vco-consent-buttons {
|
|
@@ -35,26 +35,32 @@
|
|
|
35
35
|
|
|
36
36
|
button {
|
|
37
37
|
padding: 8px 18px;
|
|
38
|
-
|
|
38
|
+
min-height: 44px;
|
|
39
|
+
border: 1px solid var(--vco-color-dark, #{$color-dark});
|
|
39
40
|
border-radius: 4px;
|
|
40
41
|
background-color: transparent;
|
|
41
|
-
color: $color-dark;
|
|
42
|
+
color: var(--vco-color-dark, #{$color-dark});
|
|
42
43
|
font-family: $font-sanserif;
|
|
43
44
|
cursor: pointer;
|
|
44
45
|
|
|
45
46
|
&:hover {
|
|
46
|
-
background-color: $color-dark;
|
|
47
|
-
color: $color-background;
|
|
47
|
+
background-color: var(--vco-color-dark, #{$color-dark});
|
|
48
|
+
color: var(--vco-color-background, #{$color-background});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:focus-visible {
|
|
52
|
+
outline: 2px solid var(--vco-color-dark, #{$color-dark});
|
|
53
|
+
outline-offset: 2px;
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
&.vco-consent-allow {
|
|
51
|
-
background-color: $color-theme;
|
|
52
|
-
border-color: $color-theme;
|
|
53
|
-
color: $color-background;
|
|
57
|
+
background-color: var(--vco-color-theme, #{$color-theme});
|
|
58
|
+
border-color: var(--vco-color-theme, #{$color-theme});
|
|
59
|
+
color: var(--vco-color-background, #{$color-background});
|
|
54
60
|
|
|
55
61
|
&:hover {
|
|
56
|
-
background-color: $color-theme-dark;
|
|
57
|
-
border-color: $color-theme-dark;
|
|
62
|
+
background-color: var(--vco-color-theme-dark, #{$color-theme-dark});
|
|
63
|
+
border-color: var(--vco-color-theme-dark, #{$color-theme-dark});
|
|
58
64
|
}
|
|
59
65
|
}
|
|
60
66
|
}
|
|
@@ -69,8 +75,8 @@
|
|
|
69
75
|
height: 100%;
|
|
70
76
|
min-height: 120px;
|
|
71
77
|
padding: 20px;
|
|
72
|
-
background-color: $color-background;
|
|
73
|
-
color: $color-dark;
|
|
78
|
+
background-color: var(--vco-color-background, #{$color-background});
|
|
79
|
+
color: var(--vco-color-dark, #{$color-dark});
|
|
74
80
|
font-family: $font-sanserif;
|
|
75
81
|
font-size: $base-font-size;
|
|
76
82
|
text-align: center;
|
|
@@ -102,7 +108,7 @@
|
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
.vco-consent-service-label {
|
|
105
|
-
color: $color-dark;
|
|
111
|
+
color: var(--vco-color-dark, #{$color-dark});
|
|
106
112
|
text-align: left;
|
|
107
113
|
}
|
|
108
114
|
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
@use "../Variables" as *;
|
|
3
|
+
|
|
4
|
+
/* Layers control (show_layers_control option)
|
|
5
|
+
================================================== */
|
|
6
|
+
|
|
7
|
+
// Disclosure button. The open/active state lives on the button itself:
|
|
8
|
+
// MenuBar.setColor() replaces the .vco-menubar className wholesale, so a
|
|
9
|
+
// state class on the menubar would not survive a repaint.
|
|
10
|
+
.vco-menubar-button.vco-menubar-layers {
|
|
11
|
+
&.vco-active {
|
|
12
|
+
background: var(--vco-color-theme, #{$color-theme});
|
|
13
|
+
color: var(--vco-color-background, #{$color-background});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// The panel is absolutely positioned under the disclosure button so it never
|
|
18
|
+
// contributes to .vco-menubar.offsetHeight (menubar_height drives the map and
|
|
19
|
+
// slider heights).
|
|
20
|
+
.vco-layers {
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 100%;
|
|
23
|
+
left: 0;
|
|
24
|
+
z-index: 12;
|
|
25
|
+
min-width: 200px;
|
|
26
|
+
max-width: min(320px, 90vw);
|
|
27
|
+
max-height: 70vh;
|
|
28
|
+
overflow-y: auto;
|
|
29
|
+
padding: 8px 0;
|
|
30
|
+
border: 1px solid var(--vco-color-border, #{color.adjust($color-background, $lightness: -10%)});
|
|
31
|
+
border-radius: 0 0 7px;
|
|
32
|
+
background-color: var(--vco-color-background, #{$color-background});
|
|
33
|
+
color: var(--vco-color-foreground, #{$color-foreground});
|
|
34
|
+
font-family: $font-sanserif;
|
|
35
|
+
font-size: $base-font-size-small;
|
|
36
|
+
text-align: left;
|
|
37
|
+
|
|
38
|
+
&[hidden] {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.vco-layers-group {
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 4px 0;
|
|
45
|
+
border: 0;
|
|
46
|
+
border-top: 1px solid
|
|
47
|
+
var(--vco-color-border, #{color.adjust($color-background, $lightness: -10%)});
|
|
48
|
+
|
|
49
|
+
&:first-child {
|
|
50
|
+
border-top: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
legend {
|
|
54
|
+
padding: 0 12px;
|
|
55
|
+
font-weight: bold;
|
|
56
|
+
color: var(--vco-color-text, #{$color-text});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
label {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
gap: 8px;
|
|
63
|
+
min-height: 44px;
|
|
64
|
+
padding: 4px 12px;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
|
|
67
|
+
&:hover {
|
|
68
|
+
background-color: var(
|
|
69
|
+
--vco-color-hover,
|
|
70
|
+
#{color.adjust($color-background, $lightness: -5%)}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:has(input:checked) {
|
|
75
|
+
font-weight: bold;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:has(input:disabled) {
|
|
79
|
+
opacity: 0.55;
|
|
80
|
+
cursor: default;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
input[type="radio"],
|
|
84
|
+
input[type="checkbox"] {
|
|
85
|
+
flex-shrink: 0;
|
|
86
|
+
margin: 0;
|
|
87
|
+
accent-color: var(--vco-color-theme, #{$color-theme});
|
|
88
|
+
|
|
89
|
+
&:disabled {
|
|
90
|
+
cursor: default;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:focus-visible {
|
|
94
|
+
outline: 2px solid var(--vco-color-theme, #{$color-theme});
|
|
95
|
+
outline-offset: 2px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Right to Left: anchor the panel under the button from the right
|
|
103
|
+
================================================== */
|
|
104
|
+
.vco-rtl {
|
|
105
|
+
.vco-layers {
|
|
106
|
+
right: 0;
|
|
107
|
+
left: auto;
|
|
108
|
+
text-align: right;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Mobile: cap the panel width so it never covers the slide
|
|
113
|
+
================================================== */
|
|
114
|
+
.vco-mobile {
|
|
115
|
+
.vco-layers {
|
|
116
|
+
min-width: 0;
|
|
117
|
+
max-width: 240px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -4,18 +4,49 @@
|
|
|
4
4
|
/* MenuBar Button
|
|
5
5
|
================================================== */
|
|
6
6
|
|
|
7
|
-
.vco-menubar-button {
|
|
8
|
-
|
|
7
|
+
.vco-menubar .vco-menubar-button {
|
|
8
|
+
// scoped under .vco-menubar on purpose: the ported normalize reset in
|
|
9
|
+
// core/Reset.scss targets `.vco-storymap button` (0,1,1) and would
|
|
10
|
+
// otherwise zero the padding, border, size and weight below
|
|
11
|
+
border-left: 1px solid
|
|
12
|
+
var(--vco-color-border, #{color.adjust($color-background, $lightness: -10%)});
|
|
9
13
|
font-size: 14px;
|
|
14
|
+
|
|
15
|
+
// real <button>s do not inherit the typeface: without this they render
|
|
16
|
+
// in the UA system font instead of the storymap stack the pre-0.9.0
|
|
17
|
+
// divs inherited. No `font` shorthand: it would reset font-weight.
|
|
18
|
+
font-family: inherit;
|
|
19
|
+
line-height: inherit;
|
|
10
20
|
padding: 6px 12px;
|
|
11
21
|
|
|
22
|
+
// pointer targets stay usable for coarse pointers and low vision
|
|
23
|
+
min-height: 44px;
|
|
24
|
+
|
|
25
|
+
// the widget root is content-box (see VCO.StoryMap.scss): without this
|
|
26
|
+
// the 6px+6px padding lands on top of the 44px instead of inside it
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
|
|
29
|
+
// the 44px box dwarfs the label: center it so the original padding
|
|
30
|
+
// reads as padding, not as dead space below the text
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
|
|
35
|
+
// text-to-icon spacing lives here, not as a literal space in the
|
|
36
|
+
// button markup: flex ignores inter-item whitespace, and a gap stays
|
|
37
|
+
// consistent across locales, RTL and icon-only mobile buttons
|
|
38
|
+
gap: 6px;
|
|
39
|
+
|
|
12
40
|
// position:relative;
|
|
13
41
|
// top:-24px;
|
|
14
|
-
background-color: fadeout($ui-background-color, 10%);
|
|
15
|
-
background-color: $color-background;
|
|
42
|
+
background-color: var(--vco-color-ui-fade, #{fadeout($ui-background-color, 10%)});
|
|
43
|
+
background-color: var(--vco-color-background, #{$color-background});
|
|
16
44
|
cursor: pointer;
|
|
17
45
|
font-weight: bold;
|
|
18
|
-
|
|
46
|
+
|
|
47
|
+
// pre-0.9.0 gray, not the body text color: the classic menubar buttons
|
|
48
|
+
// read as chrome, not content. 4.7:1 on white, so no contrast cost.
|
|
49
|
+
color: #737373;
|
|
19
50
|
|
|
20
51
|
.vco-icon-arrow-up,
|
|
21
52
|
.vco-icon-arrow-down {
|
|
@@ -28,29 +59,61 @@
|
|
|
28
59
|
}
|
|
29
60
|
|
|
30
61
|
&:hover {
|
|
31
|
-
background: $color-theme;
|
|
32
|
-
color: $color-background;
|
|
62
|
+
background: var(--vco-color-theme, #{$color-theme});
|
|
63
|
+
color: var(--vco-color-background, #{$color-background});
|
|
33
64
|
}
|
|
34
65
|
|
|
35
|
-
// keyboard focus parity with the hover state
|
|
66
|
+
// keyboard focus parity with the hover state. The ring is dark on the
|
|
67
|
+
// theme background (a theme-coloured ring on itself is 1:1) and sits
|
|
68
|
+
// outside the button edge so it is never covered.
|
|
36
69
|
&:focus-visible {
|
|
37
|
-
background: $color-theme;
|
|
38
|
-
color: $color-background;
|
|
39
|
-
outline: 2px solid $color-
|
|
40
|
-
outline-offset:
|
|
70
|
+
background: var(--vco-color-theme, #{$color-theme});
|
|
71
|
+
color: var(--vco-color-background, #{$color-background});
|
|
72
|
+
outline: 2px solid var(--vco-color-dark, #{$color-dark});
|
|
73
|
+
outline-offset: 2px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// dark mode keeps a lighter gray for the same chrome look: #737373 on the
|
|
78
|
+
// dark panel would fail contrast (the themed text it replaces passed).
|
|
79
|
+
// Mirrors the data-vco-theme / prefers-color-scheme switching in
|
|
80
|
+
// VCO.StoryMap.scss.
|
|
81
|
+
.vco-storymap[data-vco-theme="dark"] .vco-menubar-button {
|
|
82
|
+
color: #b3b3b3;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@media (prefers-color-scheme: dark) {
|
|
86
|
+
.vco-storymap:not([data-vco-theme="light"]) .vco-menubar-button {
|
|
87
|
+
color: #b3b3b3;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// the dark resting color above ties with :hover/:focus-visible (0,3,0)
|
|
92
|
+
// and wins by source order, leaving gray text on the theme background —
|
|
93
|
+
// restate the inverted interactive look explicitly so dark hover matches
|
|
94
|
+
// light hover (panel text on the theme background, high contrast both ways)
|
|
95
|
+
.vco-storymap[data-vco-theme="dark"] .vco-menubar-button:hover,
|
|
96
|
+
.vco-storymap[data-vco-theme="dark"] .vco-menubar-button:focus-visible {
|
|
97
|
+
color: var(--vco-color-background, #222);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@media (prefers-color-scheme: dark) {
|
|
101
|
+
.vco-storymap:not([data-vco-theme="light"]) .vco-menubar-button:hover,
|
|
102
|
+
.vco-storymap:not([data-vco-theme="light"]) .vco-menubar-button:focus-visible {
|
|
103
|
+
color: var(--vco-color-background, #222);
|
|
41
104
|
}
|
|
42
105
|
}
|
|
43
106
|
|
|
44
107
|
.vco-mobile {
|
|
45
108
|
.vco-menubar-button {
|
|
46
109
|
&:hover {
|
|
47
|
-
background-color: fadeout($ui-background-color, 33%);
|
|
48
|
-
color: $color-text;
|
|
110
|
+
background-color: var(--vco-color-ui-faint, #{fadeout($ui-background-color, 33%)});
|
|
111
|
+
color: var(--vco-color-text, #{$color-text});
|
|
49
112
|
}
|
|
50
113
|
|
|
51
114
|
&:active {
|
|
52
|
-
background: $color-theme;
|
|
53
|
-
color: $color-background;
|
|
115
|
+
background: var(--vco-color-theme, #{$color-theme});
|
|
116
|
+
color: var(--vco-color-background, #{$color-background});
|
|
54
117
|
}
|
|
55
118
|
}
|
|
56
119
|
}
|
|
@@ -83,7 +146,7 @@
|
|
|
83
146
|
height: 6px;
|
|
84
147
|
margin: 0 12px;
|
|
85
148
|
vertical-align: middle;
|
|
86
|
-
background-color: color.adjust($color-background, $lightness: -10%);
|
|
149
|
+
background-color: var(--vco-color-border, #{color.adjust($color-background, $lightness: -10%)});
|
|
87
150
|
border-radius: 3px;
|
|
88
151
|
overflow: hidden;
|
|
89
152
|
|
|
@@ -91,9 +154,67 @@
|
|
|
91
154
|
display: block;
|
|
92
155
|
height: 100%;
|
|
93
156
|
width: 0;
|
|
94
|
-
background-color: $color-theme;
|
|
157
|
+
background-color: var(--vco-color-theme, #{$color-theme});
|
|
95
158
|
border-radius: 3px;
|
|
96
159
|
}
|
|
160
|
+
|
|
161
|
+
// height variants of the fill bar (progressbar block/thinblock)
|
|
162
|
+
&.vco-menubar-progress-block {
|
|
163
|
+
height: 12px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&.vco-menubar-progress-thinblock {
|
|
167
|
+
height: 3px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// per-slide steps (progressbar dots/squares): buttons jumping to
|
|
171
|
+
// their slide, built by MenuBar._renderProgressSteps
|
|
172
|
+
&.vco-menubar-progress-dots,
|
|
173
|
+
&.vco-menubar-progress-squares {
|
|
174
|
+
width: auto;
|
|
175
|
+
height: auto;
|
|
176
|
+
background: none;
|
|
177
|
+
overflow: visible;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.vco-menubar-progress-step {
|
|
181
|
+
display: inline-block;
|
|
182
|
+
min-height: 0;
|
|
183
|
+
min-width: 0;
|
|
184
|
+
margin: 0 3px;
|
|
185
|
+
padding: 0;
|
|
186
|
+
border: 1px solid var(--vco-color-theme, #{$color-theme});
|
|
187
|
+
background: transparent;
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
vertical-align: middle;
|
|
190
|
+
|
|
191
|
+
&.vco-menubar-progress-dots {
|
|
192
|
+
width: 10px;
|
|
193
|
+
height: 10px;
|
|
194
|
+
border-radius: 50%;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&.vco-menubar-progress-squares {
|
|
198
|
+
width: 10px;
|
|
199
|
+
height: 10px;
|
|
200
|
+
border-radius: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&.vco-past {
|
|
204
|
+
background-color: var(--vco-color-theme, #{$color-theme});
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&.vco-active {
|
|
208
|
+
background-color: var(--vco-color-theme, #{$color-theme});
|
|
209
|
+
outline: 2px solid var(--vco-color-dark, #{$color-dark});
|
|
210
|
+
outline-offset: 1px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&:focus-visible {
|
|
214
|
+
outline: 2px solid var(--vco-color-dark, #{$color-dark});
|
|
215
|
+
outline-offset: 2px;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
97
218
|
}
|
|
98
219
|
|
|
99
220
|
/* Route distance display (issue #341)
|
|
@@ -103,5 +224,5 @@
|
|
|
103
224
|
margin: 0 12px;
|
|
104
225
|
vertical-align: middle;
|
|
105
226
|
font-size: $base-font-size-small;
|
|
106
|
-
color: $color-dark;
|
|
227
|
+
color: var(--vco-color-dark, #{$color-dark});
|
|
107
228
|
}
|
|
@@ -9,11 +9,18 @@
|
|
|
9
9
|
z-index: 11;
|
|
10
10
|
text-align: left;
|
|
11
11
|
overflow: hidden;
|
|
12
|
-
border-bottom: 1px solid
|
|
13
|
-
|
|
12
|
+
border-bottom: 1px solid
|
|
13
|
+
var(--vco-color-border, #{color.adjust($color-background, $lightness: -10%)});
|
|
14
|
+
border-right: 1px solid
|
|
15
|
+
var(--vco-color-border, #{color.adjust($color-background, $lightness: -10%)});
|
|
14
16
|
border-bottom-right-radius: 7px;
|
|
15
17
|
left: 0;
|
|
16
18
|
|
|
19
|
+
// opt-in HUD palette (hudcolor/hudbgcolor): the theme values stay the
|
|
20
|
+
// default, so stories without the options render unchanged
|
|
21
|
+
background-color: var(--vco-hud-bg, transparent);
|
|
22
|
+
color: var(--vco-hud-fg, inherit);
|
|
23
|
+
|
|
17
24
|
.vco-menubar-button:first-child {
|
|
18
25
|
border-left: 0;
|
|
19
26
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use "../core/Mixins" as *;
|
|
2
|
+
@use "../Variables" as *;
|
|
2
3
|
|
|
3
4
|
/* MESSAGE
|
|
4
5
|
================================================== */
|
|
@@ -10,6 +11,12 @@
|
|
|
10
11
|
height: 100%;
|
|
11
12
|
position: absolute;
|
|
12
13
|
|
|
14
|
+
// dismissable by click and keyboard: keyboard focus gets a ring
|
|
15
|
+
&.vco-message-dismiss:focus-visible {
|
|
16
|
+
outline: 2px solid var(--vco-color-dark, #{$color-dark});
|
|
17
|
+
outline-offset: -2px;
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
// position: relative;
|
|
14
21
|
|
|
15
22
|
display: table;
|
|
@@ -49,6 +56,13 @@
|
|
|
49
56
|
|
|
50
57
|
// margin: 100px auto;
|
|
51
58
|
animation: rotateplane 1.2s infinite ease-in-out;
|
|
59
|
+
|
|
60
|
+
// an infinite loader is vestibular-hostile: freeze it for
|
|
61
|
+
// reduced-motion visitors (a static square still reads "busy"
|
|
62
|
+
// next to the loading text)
|
|
63
|
+
@media (prefers-reduced-motion: reduce) {
|
|
64
|
+
animation: none;
|
|
65
|
+
}
|
|
52
66
|
}
|
|
53
67
|
|
|
54
68
|
@keyframes rotateplane {
|