@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.
Files changed (195) hide show
  1. package/CHANGELOG +81 -0
  2. package/README.md +129 -12
  3. package/dist/assets/{demo-DBpeF31K.js → demo-bWnOyfUw.js} +1 -1
  4. package/dist/assets/harness-C3JUv5Ii.js +1 -0
  5. package/dist/assets/{harness-multi-CYHgI0a9.js → harness-multi-XZNex3tb.js} +1 -1
  6. package/dist/assets/{harness-support-Do7sIp2j.js → harness-support-CjfZIVeb.js} +1 -1
  7. package/dist/assets/main-DQ32hWBM.js +17 -0
  8. package/dist/context.json +13 -2
  9. package/dist/css/storymap.css +1 -1
  10. package/dist/demo.html +3 -2
  11. package/dist/docs/api/assets/navigation.js +1 -1
  12. package/dist/docs/api/assets/search.js +1 -1
  13. package/dist/docs/api/classes/StoryMap.html +777 -269
  14. package/dist/docs/api/functions/MediaType.html +1 -1
  15. package/dist/docs/api/functions/isPresentation3Collection.html +1 -1
  16. package/dist/docs/api/functions/isPresentation3Manifest.html +1 -1
  17. package/dist/docs/api/functions/isSlideshowCollection.html +51 -0
  18. package/dist/docs/api/functions/loadCSS.html +1 -1
  19. package/dist/docs/api/functions/manifestToStorymapData.html +1 -1
  20. package/dist/docs/api/functions/setLanguage.html +1 -1
  21. package/dist/docs/api/functions/slideshowToStorymapData.html +51 -0
  22. package/dist/docs/api/functions/slideshowVersion.html +48 -0
  23. package/dist/docs/api/functions/storymapToManifest.html +1 -1
  24. package/dist/docs/api/functions/validateStorymap.html +1 -1
  25. package/dist/docs/api/functions/validateStorymapAndReport.html +1 -1
  26. package/dist/docs/api/index.html +115 -12
  27. package/dist/docs/api/interfaces/AnimationHandle.html +2 -2
  28. package/dist/docs/api/interfaces/ImagereadyPayload.html +4 -4
  29. package/dist/docs/api/interfaces/LanguageEntry.html +6 -6
  30. package/dist/docs/api/interfaces/LatLngLiteral.html +4 -4
  31. package/dist/docs/api/interfaces/LoadOptions.html +2 -2
  32. package/dist/docs/api/interfaces/MapEvents.html +116 -0
  33. package/dist/docs/api/interfaces/MapMarkerEvents.html +66 -0
  34. package/dist/docs/api/interfaces/MarkerEventPayload.html +57 -0
  35. package/dist/docs/api/interfaces/MediaEvents.html +78 -0
  36. package/dist/docs/api/interfaces/MenuBarEvents.html +114 -0
  37. package/dist/docs/api/interfaces/MessageEvents.html +72 -0
  38. package/dist/docs/api/interfaces/OlLayer.html +1 -1
  39. package/dist/docs/api/interfaces/OlMap.html +1 -1
  40. package/dist/docs/api/interfaces/OlSource.html +1 -1
  41. package/dist/docs/api/interfaces/OlTileLayer.html +1 -1
  42. package/dist/docs/api/interfaces/OlVectorLayer.html +1 -1
  43. package/dist/docs/api/interfaces/OlView.html +1 -1
  44. package/dist/docs/api/interfaces/SlideBackgroundState.html +66 -0
  45. package/dist/docs/api/interfaces/SlideEvents.html +78 -0
  46. package/dist/docs/api/interfaces/SlideNavEvents.html +72 -0
  47. package/dist/docs/api/interfaces/SlideshowPlayerSettings.html +182 -0
  48. package/dist/docs/api/interfaces/SlideshowToStorymapResult.html +60 -0
  49. package/dist/docs/api/interfaces/SlideshowTranslatorOptions.html +65 -0
  50. package/dist/docs/api/interfaces/SlideshowWarning.html +72 -0
  51. package/dist/docs/api/interfaces/StoryMapEvents.html +146 -0
  52. package/dist/docs/api/interfaces/StoryMapMarker.html +763 -0
  53. package/dist/docs/api/interfaces/StorySliderEvents.html +102 -0
  54. package/dist/docs/api/interfaces/StorymapBasemap.html +69 -0
  55. package/dist/docs/api/interfaces/StorymapData.html +12 -6
  56. package/dist/docs/api/interfaces/StorymapDataWrapper.html +2 -2
  57. package/dist/docs/api/interfaces/StorymapDocument.html +2 -2
  58. package/dist/docs/api/interfaces/StorymapError.html +3 -3
  59. package/dist/docs/api/interfaces/StorymapGeoreference.html +5 -5
  60. package/dist/docs/api/interfaces/StorymapGeoreferenceBody.html +4 -4
  61. package/dist/docs/api/interfaces/StorymapGroundControlPoint.html +4 -4
  62. package/dist/docs/api/interfaces/StorymapLanguageMap.html +2 -2
  63. package/dist/docs/api/interfaces/StorymapManifest.html +12 -12
  64. package/dist/docs/api/interfaces/StorymapManifestAnnotation.html +43 -11
  65. package/dist/docs/api/interfaces/StorymapManifestBackground.html +6 -6
  66. package/dist/docs/api/interfaces/StorymapManifestCanvas.html +65 -17
  67. package/dist/docs/api/interfaces/StorymapManifestContentResource.html +8 -8
  68. package/dist/docs/api/interfaces/StorymapManifestFeatureCollection.html +4 -4
  69. package/dist/docs/api/interfaces/StorymapManifestGeoreferencing.html +7 -7
  70. package/dist/docs/api/interfaces/StorymapManifestImageService.html +4 -4
  71. package/dist/docs/api/interfaces/StorymapManifestRange.html +5 -5
  72. package/dist/docs/api/interfaces/StorymapManifestService.html +4 -4
  73. package/dist/docs/api/interfaces/StorymapManifestSpecificResource.html +4 -4
  74. package/dist/docs/api/interfaces/StorymapManifestStatement.html +3 -3
  75. package/dist/docs/api/interfaces/StorymapMapOptions.html +5 -5
  76. package/dist/docs/api/interfaces/StorymapOptions.html +277 -75
  77. package/dist/docs/api/interfaces/StorymapOverlayLayer.html +42 -11
  78. package/dist/docs/api/interfaces/StorymapSlide.html +70 -16
  79. package/dist/docs/api/interfaces/StorymapSlideBackground.html +4 -4
  80. package/dist/docs/api/interfaces/StorymapSlideLocation.html +58 -14
  81. package/dist/docs/api/interfaces/StorymapSlideMarker.html +8 -9
  82. package/dist/docs/api/interfaces/StorymapSlideMedia.html +49 -10
  83. package/dist/docs/api/interfaces/StorymapSlideNarration.html +61 -9
  84. package/dist/docs/api/interfaces/StorymapSlideText.html +4 -4
  85. package/dist/docs/api/interfaces/StorymapTilejson.html +8 -8
  86. package/dist/docs/api/interfaces/SwipableEvents.html +102 -0
  87. package/dist/docs/api/interfaces/TextEvents.html +66 -0
  88. package/dist/docs/api/media/events.md +66 -0
  89. package/dist/docs/api/media/migration-from-knightlab.md +89 -49
  90. package/dist/docs/api/media/slideshow.md +109 -0
  91. package/dist/docs/api/media/storymap-as-iiif-manifest.md +1007 -0
  92. package/dist/docs/api/modules.html +6 -6
  93. package/dist/docs/api/types/ContentState.html +3 -3
  94. package/dist/docs/api/types/FiredEvent.html +43 -0
  95. package/dist/docs/api/types/ImagereadyKind.html +1 -1
  96. package/dist/docs/api/types/MediaTypeMatch.html +5 -5
  97. package/dist/docs/api/types/SwipeDirection.html +36 -0
  98. package/dist/docs/api/types/TileSourceFactory.html +1 -1
  99. package/dist/docs/authoring.html +20 -7
  100. package/dist/docs/events.html +263 -0
  101. package/dist/docs/iiif.html +136 -22
  102. package/dist/docs/migration.html +66 -19
  103. package/dist/docs/readme.html +113 -12
  104. package/dist/embed/index.html +7 -0
  105. package/dist/examples/font-css-false.json +33 -0
  106. package/dist/examples/issue-image-region.json +1 -1
  107. package/dist/examples/layers-control.json +60 -0
  108. package/dist/examples/map-template-provider.json +36 -0
  109. package/dist/examples/multi-media.json +71 -0
  110. package/dist/examples-iiif/annotated-image.json +16 -0
  111. package/dist/examples-iiif/font-css-false.json +114 -0
  112. package/dist/examples-iiif/issue-image-region.json +1 -1
  113. package/dist/examples-iiif/layers-control.json +226 -0
  114. package/dist/examples-iiif/map-template-provider.json +133 -0
  115. package/dist/examples-iiif/multi-media.json +237 -0
  116. package/dist/examples-slideshow/single.json +79 -0
  117. package/dist/examples-slideshow/static/pixel.png +0 -0
  118. package/dist/examples-slideshow/static.json +44 -0
  119. package/dist/harness-multi.html +3 -3
  120. package/dist/harness.html +4 -3
  121. package/dist/index.html +3 -2
  122. package/dist/js/storymap.d.ts +1326 -289
  123. package/dist/js/storymap.js +6690 -4784
  124. package/dist/js/storymap.js.map +1 -1
  125. package/dist/navplace-properties.json +14 -0
  126. package/dist/site.css +54 -36
  127. package/docs/migration-from-knightlab.md +89 -49
  128. package/docs/storymap-as-iiif-manifest.md +199 -126
  129. package/package.json +4 -2
  130. package/schema/storymap.schema.json +334 -34
  131. package/src/core/Util.ts +3 -1
  132. package/src/core/mixins.ts +42 -28
  133. package/src/language/Language.ts +7 -0
  134. package/src/language/locale/.expected-gaps.json +287 -27
  135. package/src/language/locale/de.json +11 -1
  136. package/src/language/locale/en.json +11 -1
  137. package/src/main.ts +51 -0
  138. package/src/map/Map.ts +44 -6
  139. package/src/map/MapMarker.ts +16 -3
  140. package/src/map/openlayers/Map.OpenLayers.ts +787 -62
  141. package/src/map/openlayers/MapMarker.OpenLayers.ts +113 -13
  142. package/src/map/slideView.ts +149 -0
  143. package/src/map/types.ts +2 -0
  144. package/src/media/EmbedUtil.ts +27 -2
  145. package/src/media/Media.ts +27 -4
  146. package/src/media/embedId.ts +6 -0
  147. package/src/media/types/Flickr.ts +14 -3
  148. package/src/media/types/HtmlMedia.ts +66 -0
  149. package/src/media/types/Image.ts +15 -3
  150. package/src/media/types/SoundCloud.ts +1 -1
  151. package/src/media/types/Text.ts +27 -8
  152. package/src/media/types/Twitter.ts +9 -7
  153. package/src/media/types/Vimeo.ts +1 -1
  154. package/src/media/types/YouTube.ts +2 -2
  155. package/src/scss/Typography.scss +15 -15
  156. package/src/scss/VCO.StoryMap.scss +173 -8
  157. package/src/scss/core/Reset.scss +5 -18
  158. package/src/scss/map/VCO.Map.scss +1 -1
  159. package/src/scss/map/VCO.MapMarker.scss +20 -9
  160. package/src/scss/map/openlayers/VCO.Map.OpenLayers.scss +7 -4
  161. package/src/scss/media/VCO.Media.scss +7 -7
  162. package/src/scss/media/types/VCO.Media.Blockquote.scss +1 -1
  163. package/src/scss/media/types/VCO.Media.Text.scss +5 -5
  164. package/src/scss/media/types/VCO.Media.Twitter.scss +4 -4
  165. package/src/scss/media/types/VCO.Media.Wikipedia.scss +2 -19
  166. package/src/scss/site/site.scss +55 -36
  167. package/src/scss/slider/VCO.Slide.scss +49 -11
  168. package/src/scss/slider/VCO.SlideNav.scss +23 -7
  169. package/src/scss/slider/VCO.StorySlider.scss +50 -0
  170. package/src/scss/snapmap/VCO.SnapMap.scss +3 -3
  171. package/src/scss/ui/VCO.Consent.scss +20 -14
  172. package/src/scss/ui/VCO.Layers.scss +119 -0
  173. package/src/scss/ui/VCO.MenuBar.Button.scss +140 -19
  174. package/src/scss/ui/VCO.MenuBar.scss +9 -2
  175. package/src/scss/ui/VCO.Message.scss +14 -0
  176. package/src/slider/Slide.ts +232 -74
  177. package/src/slider/SlideNav.ts +15 -4
  178. package/src/slider/StorySlider.ts +203 -22
  179. package/src/storymap/Consent.ts +22 -0
  180. package/src/storymap/StoryMap.ts +944 -131
  181. package/src/storymap/content-state.ts +3 -8
  182. package/src/storymap/font-css.ts +72 -0
  183. package/src/storymap/from-slideshow.ts +785 -0
  184. package/src/storymap/iiif-shared.ts +228 -0
  185. package/src/storymap/iiif.ts +289 -100
  186. package/src/storymap/to-iiif.ts +131 -44
  187. package/src/types.ts +382 -17
  188. package/src/ui/LayersControl.ts +302 -0
  189. package/src/ui/MenuBar.ts +232 -21
  190. package/src/ui/Message.ts +36 -3
  191. package/src/ui/Swipable.ts +25 -7
  192. package/dist/assets/harness-Cr0rYpvt.js +0 -1
  193. package/dist/assets/main-DXalctuR.js +0 -17
  194. package/src/scss/VCO.StoryMap.Dark.scss +0 -150
  195. package/src/scss/Variables.Dark.scss +0 -57
@@ -35,6 +35,20 @@
35
35
  "audioBadge": {
36
36
  "@id": "storymap_navplace:navplaceAudioBadge",
37
37
  "@type": "xsd:boolean"
38
+ },
39
+ "rotation": {
40
+ "@id": "storymap_navplace:navplaceRotation",
41
+ "@type": "xsd:decimal"
42
+ },
43
+ "basemap": {
44
+ "@id": "storymap_navplace:navplaceBasemap",
45
+ "@type": "@id"
46
+ },
47
+ "filter": {
48
+ "@id": "storymap_navplace:navplaceFilter"
49
+ },
50
+ "mask": {
51
+ "@id": "storymap_navplace:navplaceMask"
38
52
  }
39
53
  }
40
54
  }
package/dist/site.css CHANGED
@@ -1,3 +1,4 @@
1
+ @charset "UTF-8";
1
2
  /*
2
3
  * Site chrome for the landing/docs pages (index.html, demo.html, docs/*).
3
4
  *
@@ -12,8 +13,8 @@
12
13
  font-family: georgia, "Times New Roman", times, serif;
13
14
  font-size: 18px;
14
15
  line-height: 1.618;
15
- color: #222;
16
- background-color: #fff;
16
+ color: var(--sm-color-text, #222);
17
+ background-color: var(--sm-color-page, #fff);
17
18
  }
18
19
  .sm-site *,
19
20
  .sm-site *::before,
@@ -30,7 +31,7 @@
30
31
  .sm-site pre {
31
32
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
32
33
  font-size: 0.85em;
33
- background-color: #f0f0f0;
34
+ background-color: var(--sm-color-light, #f0f0f0);
34
35
  border-radius: 3px;
35
36
  }
36
37
  .sm-site code {
@@ -68,7 +69,7 @@
68
69
  font-style: italic;
69
70
  font-weight: normal;
70
71
  font-size: 3.82rem;
71
- color: #222;
72
+ color: var(--sm-color-text, #222);
72
73
  margin: 0;
73
74
  }
74
75
  @media (width <= 767px) {
@@ -105,10 +106,10 @@
105
106
  position: relative;
106
107
  overflow: hidden;
107
108
  padding: 0.89rem 1.78rem 0.94rem;
108
- border: 1px solid #d4d4d4;
109
+ border: 1px solid var(--sm-color-border-light, #d4d4d4);
109
110
  border-radius: 4px;
110
111
  background-color: transparent;
111
- color: #646464;
112
+ color: var(--sm-color-grey, #646464);
112
113
  font-family: "Helvetica Neue", helvetica, arial, "Segoe UI", system-ui, sans-serif;
113
114
  font-size: 0.89rem;
114
115
  text-align: center;
@@ -122,7 +123,7 @@
122
123
  .sm-site .button:hover {
123
124
  background-color: #fdfdfd;
124
125
  border-color: #d7d7d7;
125
- color: #646464;
126
+ color: var(--sm-color-grey, #646464);
126
127
  text-decoration: none;
127
128
  }
128
129
  .sm-site .button:focus-visible {
@@ -216,11 +217,11 @@
216
217
  border-color: rgba(255, 255, 255, 0.1);
217
218
  }
218
219
  .sm-site .navbar .button-active {
219
- background-color: #d4d4d4;
220
- color: #222;
220
+ background-color: var(--sm-color-border-light, #d4d4d4);
221
+ color: var(--sm-color-text, #222);
221
222
  }
222
223
  .sm-site .navbar .button-active:hover {
223
- background-color: #d4d4d4;
224
+ background-color: var(--sm-color-border-light, #d4d4d4);
224
225
  }
225
226
  .sm-site .navbar-dark {
226
227
  background-color: #484848;
@@ -233,8 +234,8 @@
233
234
  .sm-site .header-product {
234
235
  padding: 2rem 2rem 0;
235
236
  margin-bottom: 0;
236
- border-bottom: 1px solid #b8b8b8;
237
- background-color: #f0f0f0;
237
+ border-bottom: 1px solid var(--sm-color-border, #b8b8b8);
238
+ background-color: var(--sm-color-light, #f0f0f0);
238
239
  text-align: center;
239
240
  }
240
241
  .sm-site .header-product .product-tagline {
@@ -251,7 +252,7 @@
251
252
  }
252
253
  .sm-site .navbar-subnav {
253
254
  margin-top: 1rem;
254
- background-color: #f0f0f0;
255
+ background-color: var(--sm-color-light, #f0f0f0);
255
256
  }
256
257
  @media (width <= 767px) {
257
258
  .sm-site .navbar-subnav {
@@ -259,12 +260,12 @@
259
260
  }
260
261
  }
261
262
  .sm-site .navbar-subnav .button {
262
- border-color: #d4d4d4;
263
+ border-color: var(--sm-color-border-light, #d4d4d4);
263
264
  box-shadow: none;
264
- color: #646464;
265
+ color: var(--sm-color-grey, #646464);
265
266
  }
266
267
  .sm-site .navbar-subnav .button:hover {
267
- color: #222;
268
+ color: var(--sm-color-text, #222);
268
269
  background-color: rgba(255, 255, 255, 0.6);
269
270
  }
270
271
  .sm-site .container {
@@ -307,12 +308,12 @@
307
308
  margin-bottom: 0;
308
309
  }
309
310
  .sm-site .fill-color-grey {
310
- background-color: #f0f0f0;
311
+ background-color: var(--sm-color-light, #f0f0f0);
311
312
  }
312
313
  .sm-site .note {
313
- background-color: #f0f0f0;
314
+ background-color: var(--sm-color-light, #f0f0f0);
314
315
  border-radius: 8px;
315
- color: #9c9c9c;
316
+ color: var(--sm-color-muted, #9c9c9c);
316
317
  font-family: "Helvetica Neue", helvetica, arial, "Segoe UI", system-ui, sans-serif;
317
318
  font-size: 0.9em;
318
319
  font-style: italic;
@@ -328,7 +329,7 @@
328
329
  display: block;
329
330
  width: 100%;
330
331
  border: 0;
331
- background-color: #f0f0f0;
332
+ background-color: var(--sm-color-light, #f0f0f0);
332
333
  }
333
334
  .sm-site .cards {
334
335
  display: grid;
@@ -356,7 +357,7 @@
356
357
  }
357
358
  .sm-site .cards .card {
358
359
  padding: 0;
359
- border: 1px solid #d4d4d4;
360
+ border: 1px solid var(--sm-color-border-light, #d4d4d4);
360
361
  border-radius: 4px;
361
362
  background-color: #fff;
362
363
  overflow: hidden;
@@ -379,7 +380,7 @@
379
380
  height: 100%;
380
381
  background-position: center;
381
382
  background-size: cover;
382
- background-color: #646464;
383
+ background-color: var(--sm-color-grey, #646464);
383
384
  transition: filter 0.3s ease;
384
385
  }
385
386
  .sm-site .cards .card .header-image-background.bw {
@@ -391,17 +392,17 @@
391
392
  .sm-site .cards .card article.card-content h3 {
392
393
  font-size: 1rem;
393
394
  margin: 0;
394
- color: #222;
395
+ color: var(--sm-color-text, #222);
395
396
  }
396
397
  .sm-site .cards .card footer {
397
398
  margin-top: auto;
398
399
  padding: 0.6rem 1rem 0.8rem;
399
400
  font-family: "Helvetica Neue", helvetica, arial, "Segoe UI", system-ui, sans-serif;
400
401
  font-size: 0.75em;
401
- color: #9c9c9c;
402
+ color: var(--sm-color-muted, #9c9c9c);
402
403
  }
403
404
  .sm-site .cards .card:hover {
404
- border-color: #222;
405
+ border-color: var(--sm-color-text, #222);
405
406
  }
406
407
  .sm-site .cards .card:hover .header-image-background.bw {
407
408
  filter: grayscale(0%);
@@ -417,15 +418,15 @@
417
418
  position: relative;
418
419
  padding: 0.5rem;
419
420
  margin-bottom: 0.5rem;
420
- background-color: #f8f8f8;
421
- border: 1px solid #d4d4d4;
421
+ background-color: var(--sm-color-lighter, #f8f8f8);
422
+ border: 1px solid var(--sm-color-border-light, #d4d4d4);
422
423
  border-radius: 8px;
423
424
  }
424
425
  .sm-site ul.accordion li:hover {
425
426
  border-color: #484848;
426
427
  }
427
428
  .sm-site ul.accordion li:hover h3 {
428
- color: #222;
429
+ color: var(--sm-color-text, #222);
429
430
  }
430
431
  .sm-site ul.accordion li input[type=checkbox] {
431
432
  position: absolute;
@@ -461,7 +462,7 @@
461
462
  font-size: 1.2rem;
462
463
  font-weight: 700;
463
464
  margin: 0.4rem 1.5rem 0.4rem 0.6rem;
464
- color: #222;
465
+ color: var(--sm-color-text, #222);
465
466
  }
466
467
  .sm-site ul.accordion li .accordion-content {
467
468
  position: relative;
@@ -511,12 +512,12 @@
511
512
  .sm-site .sm-docs table th,
512
513
  .sm-site .sm-docs table td {
513
514
  padding: 0.5rem 0.75rem;
514
- border: 1px solid #d4d4d4;
515
+ border: 1px solid var(--sm-color-border-light, #d4d4d4);
515
516
  text-align: left;
516
517
  vertical-align: top;
517
518
  }
518
519
  .sm-site .sm-docs table th {
519
- background-color: #f0f0f0;
520
+ background-color: var(--sm-color-light, #f0f0f0);
520
521
  }
521
522
  .sm-site .sm-docs table code {
522
523
  background: none;
@@ -525,8 +526,8 @@
525
526
  .sm-site .sm-docs blockquote {
526
527
  margin: 1rem 0;
527
528
  padding: 0.25rem 1rem;
528
- border-left: 4px solid #d4d4d4;
529
- color: #646464;
529
+ border-left: 4px solid var(--sm-color-border-light, #d4d4d4);
530
+ color: var(--sm-color-grey, #646464);
530
531
  }
531
532
  .sm-site .sm-docs img {
532
533
  max-width: 100%;
@@ -538,8 +539,8 @@
538
539
  padding: 60px 80px 30px;
539
540
  font-family: "Helvetica Neue", helvetica, arial, "Segoe UI", system-ui, sans-serif;
540
541
  font-size: 0.85em;
541
- background-color: #f0f0f0;
542
- border-top: 1px solid #b8b8b8;
542
+ background-color: var(--sm-color-light, #f0f0f0);
543
+ border-top: 1px solid var(--sm-color-border, #b8b8b8);
543
544
  }
544
545
  .sm-site .footer-knightlab .footer-grid {
545
546
  display: flex;
@@ -583,10 +584,27 @@
583
584
  list-style: none;
584
585
  }
585
586
  .sm-site .footer-knightlab ul.list-social a {
586
- color: #646464;
587
+ color: var(--sm-color-grey, #646464);
587
588
  font-size: 1.1em;
588
589
  font-weight: 700;
589
590
  }
590
591
  .sm-site .footer-knightlab ul.list-social a:hover {
591
592
  color: #df4e13;
593
+ }
594
+
595
+ /* Dark landing (dark theme plan): the surfaces above redeclared. Brand
596
+ accents (badge, green, navbar, orange links) keep their light values —
597
+ they read on both. Follows the OS setting; the widget additionally
598
+ honours an explicit `theme` option. */
599
+ @media (prefers-color-scheme: dark) {
600
+ .sm-site {
601
+ --sm-color-page: #1a1a1a;
602
+ --sm-color-text: #e0e0e0;
603
+ --sm-color-grey: #a8a8a8;
604
+ --sm-color-light: #262626;
605
+ --sm-color-lighter: #2e2e2e;
606
+ --sm-color-border: #555;
607
+ --sm-color-border-light: #444;
608
+ --sm-color-muted: #b0b0b0;
609
+ }
592
610
  }
@@ -72,15 +72,16 @@ element, ... }` to configure the underlying OpenLayers map; `element`
72
72
 
73
73
  ## Changed options and map types
74
74
 
75
- | Old | New |
76
- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
77
- | `map_type: "zoomify"` (+ `options.zoomify`) | preferred: `map_type: "iiif"` with `options.iiif = { url, attribution }` (IIIF Image API 2/3); zoomify still works as a legacy image-pyramid basemap (see below) |
78
- | `map_type: "stamen:toner"` etc. | `"stamen:*"` types are deprecated and remapped: `stamen:watercolor` → `ch-watercolor`, others → `osm:standard` |
79
- | Stadia Maps paid tiles via `map_access_token` | Recommended: free OpenStreetMap vector styles, e.g. `map_type: "osm:bright"` (OpenFreeMap), or any style JSON URL |
80
- | Bundled `map_access_token` | removed — pass `map_access_token` in the options if you use Mapbox/Stadia tiles |
81
- | Bundled Flickr API key | removed — pass `api_key_flickr` in the options if you use `flickr.com/photos` API URLs |
82
- | `relative_date: true` (moment.js) | removed — format dates in the story text |
83
- | `font_css: "stock:<name>"` (or a path) | paths now resolve against the page URL (not the library location), plus the font files ship via `@fontsource-utils/scss`; no separate font CSS link needed |
75
+ | Old | New |
76
+ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
77
+ | `map_type: "zoomify"` (+ `options.zoomify`) | preferred: `map_type: "iiif"` with `options.iiif = { url, attribution }` (IIIF Image API 2/3); zoomify still works as a legacy image-pyramid basemap (see below) |
78
+ | `map_type: "stamen:toner"` etc. | `"stamen:*"` types are deprecated and remapped: `stamen:watercolor` → `ch-watercolor`, others → `osm:standard` |
79
+ | Stadia Maps paid tiles via `map_access_token` | Recommended: free OpenStreetMap vector styles, e.g. `map_type: "osm:bright"` (OpenFreeMap), or any style JSON URL |
80
+ | Bundled `map_access_token` | removed — pass `map_access_token` in the options if you use Mapbox/Stadia tiles |
81
+ | Bundled Flickr API key | removed — pass `api_key_flickr` in the options if you use `flickr.com/photos` API URLs |
82
+ | `relative_date: true` (moment.js) | removed — format dates in the story text |
83
+ | `font_css: "stock:<name>"` (or a path) | paths now resolve against the page URL (not the library location), plus the font files ship via `@fontsource-utils/scss`; no separate font CSS link needed |
84
+ | `font_css: false` (bundler consumers) | `stock:<name>` resolves via `import.meta.url`, which only survives when this package is _not_ processed by a bundler — bundling inlines `dist/js/storymap.js` into a chunk and the theme URL breaks. Instead `import "@projektemacher/storymapjs/css/fonts/font.default.css"` (fingerprinted, `files/` rebased by the bundler) and pass `font_css: false` for no injected `<link>`. `"none"` works too for JSON. A failing theme only warns |
84
85
 
85
86
  ## A story with no map
86
87
 
@@ -122,11 +123,12 @@ their neutral values, and the map setters are no-ops.
122
123
  | Twitter `@nickname` rendering | tweets from `x.com` URLs are now parsed too (fixes `@undefined` nicknames); no migration needed |
123
124
  | Ricoh360/theta360 embeds (#391) | service no longer available (won't fix) — paste the provider's `<iframe>` snippet into the slide text if the service returns |
124
125
 
125
- Extra media per slide (#358, partial): each slide still has one primary
126
- `media` item, but an `<iframe>` embed snippet pasted into the slide `text`
127
- field now renders sanitized (scripts, event handlers and non-https sources
128
- dropped) — use this for a second video/map/embed or as the migration path
129
- for removed media types:
126
+ Extra media per slide (#358, partial): a slide takes `media_extra` (a list of
127
+ further media items, rendered after the primary one) plus `media_layout`
128
+ (`stack`, the default, or `row` for two side-by-side items). An `<iframe>`
129
+ embed snippet pasted into the slide `text` field still renders sanitized
130
+ (scripts, event handlers and non-https sources dropped) — keep that as the
131
+ migration path for removed media types:
130
132
 
131
133
  ```html
132
134
  <p>Extra footage:</p>
@@ -157,9 +159,10 @@ storymap JSON sources.
157
159
  before; the mini map is an OpenLayers `OverviewMap` control.
158
160
  - New basemap options: vector styles via `map_type: "osm:<style>"` (OpenFreeMap)
159
161
  or a Mapbox style JSON URL.
160
- - All OL types (`Map`, `View`, `Layer`, `Source`, `Feature`, ...) are
161
- re-exported, so a consumer can type its own overlays without depending on
162
- `ol` directly.
162
+ - The `Ol*` aliases re-exported from `src/main.ts` (`OlMap`, `OlView`,
163
+ `OlLayer`, `OlTileLayer`, `OlVectorLayer`, `OlSource`, `OlProjection`) let
164
+ a consumer type the map and layers without depending on `ol` directly;
165
+ anything beyond those (features, geometries, coordinates) still needs `ol`.
163
166
 
164
167
  ### Direct Leaflet calls → OpenLayers
165
168
 
@@ -201,16 +204,18 @@ names and behaviour (`storymap._map.<method>()`, `marker.<method>()`); the OL
201
204
  engine implements them as thin wrappers over `storymap.map`. Two methods are
202
205
  deprecated no-ops and one is gone:
203
206
 
204
- | Original method | Status |
205
- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
206
- | `updateDisplay`, `goTo`, `panTo`, `zoomTo`, `viewTo` | unchanged |
207
- | `getBoundsZoom`, `markerOverview`, `calculateMarkerZooms` | unchanged (`getBoundsZoom()` now returns `number \| undefined` instead of a falsy value) |
208
- | `createMiniMap`, `createMarkers`, `createMarker` | unchanged |
209
- | `setMapOffset`, `calculateMinMaxZoom`, `updateMinMaxZoom`, `initialMapLocation` | unchanged |
210
- | `show()` / `hide()` (map and marker) | **deprecated no-ops** — they were already empty in the original viewer. Style `.vco-mapmarker` or use `marker.active(false)` |
211
- | `map.addTo(container)` / `map.removeFrom(container)` | unchanged — inherited from the `DomMixed` mixin: append/remove the map container and fire `added`/`removed`. The engine override re-targets and re-measures the OpenLayers viewport, so a move into a differently sized parent works |
212
- | `marker.createPopup()` | **deprecated no-op** — it never did anything upstream either (empty base body, commented-out Leaflet body), so the `map_popup` option that called it had no effect. Still accepted, still inert |
213
- | `marker.addTo()`, `marker.removeFrom()`, `marker.updateDisplay()`, `marker.active()`, `marker.location()` | unchanged |
207
+ | Original method | Status |
208
+ | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
209
+ | `updateDisplay`, `goTo`, `panTo`, `zoomTo`, `viewTo` | unchanged |
210
+ | `getBoundsZoom`, `markerOverview`, `calculateMarkerZooms` | unchanged (`getBoundsZoom()` now returns `number \| undefined` instead of a falsy value) |
211
+ | `createMiniMap`, `createMarkers`, `createMarker` | unchanged |
212
+ | `setMapOffset`, `calculateMinMaxZoom`, `updateMinMaxZoom`, `initialMapLocation` | unchanged |
213
+ | `show()` / `hide()` (map and marker) | **deprecated no-ops** — they were already empty in the original viewer. Style `.vco-mapmarker` or use `marker.active(false)` |
214
+ | `map.addTo(container)` / `map.removeFrom(container)` | unchanged — inherited from the `DomMixed` mixin: append/remove the map container and fire `added`/`removed`. The engine override re-targets and re-measures the OpenLayers viewport, so a move into a differently sized parent works |
215
+ | `marker.createPopup()` | **deprecated no-op** — it never did anything upstream either (empty base body, commented-out Leaflet body), so the `map_popup` option that called it had no effect. Still accepted, still inert. Use `marker.openPopup()` / `storymap.openMarkerPopup(n)` instead |
216
+ | `marker.addTo()`, `marker.removeFrom()`, `marker.updateDisplay()`, `marker.active()`, `marker.location()` | unchanged |
217
+ | `marker.openPopup()` / `closePopup()` / `togglePopup()` / `isPopupEnabled()` / `popupOpen` | **new** — programmatic control of the popup card (`marker: { popup: true }`); `openPopup()` returns false when disabled or not a real marker, `popupOpen` reports the state |
218
+ | `storymap.openMarkerPopup(n)` / `closeMarkerPopup(n?)` / `isPopupOpen(n)` | **new** — open/close/query a stop's card from the viewer; `openMarkerPopup` navigates to `n` first and returns false (changing nothing) when disabled, out of range, disposed or mapless |
214
219
 
215
220
  Marker helpers that Leaflet provided on the marker object (`getLatLng`,
216
221
  `setIcon`, `bindPopup`) are gone; use `marker.latLon()`, the
@@ -223,17 +228,17 @@ construction, so check it before first use in an async setup). Everything the
223
228
  viewer keeps internally is available through accessors on `storymap` (and on
224
229
  `storymap._map` for the engine methods):
225
230
 
226
- | Accessor | Returns |
227
- | ------------------------------------------------------------ | ------------------------------------------------------------------ |
228
- | `getBaseLayer()` | the base tile/vector layer |
229
- | `getOverlayLayers()` / `getOverlayLayer(i)` | overlay layers / one by index (`null` if out of range) |
230
- | `getOverlayCount()` | number of overlays |
231
- | `setOverlayVisible(i, on)` / `setOverlayOpacity(i, opacity)` | show/hide and fade one overlay |
232
- | `getMinimap()` | the `OverviewMap` control, or its inner map via `getOverviewMap()` |
233
- | `getLine()` / `getLineActive()` | the full and the travelled route `VectorLayer` |
234
- | `getMarker(n)` / `getMarkers()` | one marker or all of them, in slide order |
235
- | `setExtraAttributions(html)` | extra attribution HTML, listed after the source credits |
236
- | `isImageSpace()` | whether the map is a IIIF image in image space (see below) |
231
+ | Accessor | Returns |
232
+ | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
233
+ | `getBaseLayer()` | the base tile/vector layer |
234
+ | `getOverlayLayers()` / `getOverlayLayer(i)` | overlay layers / one by index (`null` if out of range) |
235
+ | `getOverlayCount()` | number of overlays |
236
+ | `setOverlayVisible(i, on)` / `setOverlayOpacity(i, opacity)` | show/hide and fade one overlay |
237
+ | `getMinimap()` | the inner overview `ol/Map` (`OlMap \| null`), not the `OverviewMap` control itself — there is no accessor for the control object |
238
+ | `getLine()` / `getLineActive()` | the full and the travelled route `VectorLayer` |
239
+ | `getMarker(n)` / `getMarkers()` | one marker or all of them, in slide order |
240
+ | `setExtraAttributions(html)` | extra attribution HTML, listed after the source credits |
241
+ | `isImageSpace()` | whether the map is a IIIF image in image space (see below) |
237
242
 
238
243
  `tile_source_factory` may return a full `ol/layer/Layer` (not just a source)
239
244
  anywhere a layer is built, so custom layers can carry their own opacity,
@@ -248,6 +253,22 @@ custom layer with no explicit z-index lands wherever OpenLayers puts it,
248
253
  which is above the lines — set one explicitly if the layer must sit inside
249
254
  the stack.
250
255
 
256
+ ### Layer switcher
257
+
258
+ `show_layers_control: true` adds a disclosure button to the menubar with
259
+ basemap radios and overlay checkboxes. Basemap candidates come from
260
+ `basemaps[]` (entry 0 is the initial basemap unless `map_type` says
261
+ otherwise; omit for an overlays-only control); overlay rows come from the
262
+ built `overlays[]` entries, so a malformed entry never gets a row and row
263
+ _i_ is always layer _i_. `label` may be a function for host i18n (re-invoked
264
+ on `refreshLabels()`), `locked: true` renders a row checked and disabled,
265
+ `control: false` hides a row without removing the overlay — but function
266
+ labels survive only in constructor options, because `mergeData()` lets
267
+ storymap JSON overwrite same-named option keys. A runtime basemap swap
268
+ rebuilds layers but never the view, so candidates needing another
269
+ projection are refused with a warning; switching fires `basemapchange` /
270
+ `overlaychange`, and the visitor's choice is never persisted.
271
+
251
272
  ### Image space vs. georeferenced
252
273
 
253
274
  `map_type: "iiif"` is a mercator map by default. With `map_as_image: true` the
@@ -297,8 +318,9 @@ viewer's own pan/zoom set, `view` merges over the computed default).
297
318
  For source classes the templates cannot express (WMS, authenticated or
298
319
  gridded sources), use the `tile_source_factory` option. It is consulted
299
320
  for every base, overlay and minimap layer before the built-in
300
- `map_type` handling — return a `TileLayer` (or a bare `Source`, which
301
- is wrapped in one), or `null`/`undefined` to fall through:
321
+ `map_type` handling — return any `ol/layer/Layer` (used as-is) or a bare
322
+ `Source` (which is wrapped in a `TileLayer`), or `null`/`undefined` to fall
323
+ through:
302
324
 
303
325
  ```js
304
326
  import TileLayer from "ol/layer/Tile";
@@ -306,7 +328,7 @@ import TileWMS from "ol/source/TileWMS";
306
328
 
307
329
  new StoryMap("embed", data, {
308
330
  map_type: "wms:flood",
309
- tile_source_factory: (map_type, { createDefault }) =>
331
+ tile_source_factory: (map_type, { options, createDefault }) =>
310
332
  map_type.startsWith("wms:")
311
333
  ? new TileLayer({
312
334
  source: new TileWMS({
@@ -319,6 +341,12 @@ new StoryMap("embed", data, {
319
341
  });
320
342
  ```
321
343
 
344
+ The second factory argument also carries the resolved `options`
345
+ (`{ options, createDefault }`). A factory may return any `ol/layer/Layer`
346
+ (used as-is — including sourceless layers such as Allmaps'
347
+ `WarpedMapLayer`), a bare `Source` (wrapped in a `TileLayer`), or
348
+ `null`/`undefined` to fall through to the default `map_type` handling.
349
+
322
350
  Custom sources must carry their own attributions (via the returned
323
351
  source or the `attribution` option) — only the built-in `osm*` types
324
352
  are credited automatically. `tile_source_factory` is constructor- and
@@ -342,14 +370,26 @@ factory.
342
370
  [docs/storymap-as-iiif-manifest.md](storymap-as-iiif-manifest.md#geo-referenced-layers).
343
371
  - The editor, staging/backend infrastructure, AWS/GitHub hosting scripts and the
344
372
  Python authoring server are gone — this is a viewer-only library.
345
-
346
- ## Events (unchanged, plus two new ones)
347
-
348
- `change` (with `current_slide`, and now also `current_id` — the slide's
349
- `uniqueid`, for deep-linking), `loaded`, `title`, `dataloaded`,
350
- `fontLoaded`, plus the listener map in the constructor — all work as before.
351
- `markerAdded`/`markerRemoved` still fire on the map object, and `imageready`
352
- is new (see above).
373
+ - **Slideshow tours** are a third input format: W3C `AnnotationCollection`
374
+ documents (the format of slideshow-style guided image tours) load
375
+ directly by object, file or URL, auto-detected after the IIIF branch
376
+ (`slideshow: false` opts out). A pure translator converts them to
377
+ storymap data — per-slide image regions, rotation, filter grading,
378
+ spotlight masks, per-slide basemaps, narration with playback flags and
379
+ player chrome — which renders only for slideshow tours (the internal
380
+ `slideshow_source` marker; other documents are unaffected). Convert
381
+ offline with `npm run convert:slideshow`; the full mapping is in
382
+ [docs/slideshow.md](slideshow.md).
383
+
384
+ ## Events (unchanged, plus new ones)
385
+
386
+ The canonical reference is [docs/events.md](events.md) — one table per
387
+ emitter, with payloads. What changed in migration terms: `change` gains
388
+ `current_id`, `loaded`, `title`, `dataloaded`, `fontLoaded`,
389
+ `transitionstart`/`transitionend`, `error` and the constructor listener map
390
+ all work as before; `markerAdded`/`markerRemoved` still fire on the map
391
+ object; `imageready`, `markerclick` and `popupopen`/`popupclose` are new
392
+ (see above).
353
393
 
354
394
  Two additions for IIIF tours: `await storymap.loadAnnotations()` fetches a
355
395
  manifest's externally referenced annotation pages and appends them as stops,