@projektemacher/storymapjs 0.10.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 +121 -0
- package/LICENSE +365 -0
- package/README.md +128 -0
- package/dist/assets/demo-DYodj6d7.js +1 -0
- package/dist/assets/harness-UkbbPmC4.js +1 -0
- package/dist/assets/index-DDsPBPZA.js +1 -0
- package/dist/assets/main-BDSRsIiB.js +17 -0
- package/dist/assets/main-Bzm6THVj.css +1 -0
- package/dist/assets/modulepreload-polyfill-P2Xu9kJm.js +1 -0
- package/dist/context.json +35 -0
- package/dist/css/fonts/files/abril-fatface-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/abril-fatface-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/amatic-sc-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/amatic-sc-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/amatic-sc-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/amatic-sc-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/average-sans-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/average-sans-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-100-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-100-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-200-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-200-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-600-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-600-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-800-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-800-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-100-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-100-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-200-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-200-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-600-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-600-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-800-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-800-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-latin-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/clicker-script-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/clicker-script-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/dancing-script-latin-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/dancing-script-latin-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-latin-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-latin-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-latin-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-latin-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/fauna-one-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/fauna-one-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-latin-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-latin-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-latin-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-latin-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-100-italic.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-100-normal.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-ext-100-italic.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-ext-100-normal.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-ext-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-ext-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-ext-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/lato-latin-ext-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/megrim-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/megrim-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-latin-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-latin-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-latin-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-latin-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-latin-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-latin-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-latin-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-latin-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-latin-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-ext-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-latin-ext-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-latin-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-latin-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-latin-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-latin-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-narrow-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-narrow-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-narrow-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-narrow-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-latin-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-latin-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-latin-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-latin-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/raleway-latin-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/raleway-latin-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/raleway-latin-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/raleway-latin-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/roboto-slab-latin-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/roboto-slab-latin-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/rufina-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/rufina-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/rufina-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/rufina-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-ext-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-ext-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-ext-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-ext-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/unica-one-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/unica-one-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-latin-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-latin-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-latin-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-latin-wght-normal.woff2 +0 -0
- package/dist/css/fonts/font.abril-droidsans.css +108 -0
- package/dist/css/fonts/font.amatic-andika.css +126 -0
- package/dist/css/fonts/font.bitter-raleway.css +162 -0
- package/dist/css/fonts/font.clicker-garamond.css +149 -0
- package/dist/css/fonts/font.dancing-ledger.css +108 -0
- package/dist/css/fonts/font.default.css +278 -0
- package/dist/css/fonts/font.fjalla-average.css +113 -0
- package/dist/css/fonts/font.georgia-helvetica.css +88 -0
- package/dist/css/fonts/font.knightlab.css +467 -0
- package/dist/css/fonts/font.lustria-lato.css +275 -0
- package/dist/css/fonts/font.medula-lato.css +270 -0
- package/dist/css/fonts/font.oldstandard.css +160 -0
- package/dist/css/fonts/font.opensans-gentiumbook.css +167 -0
- package/dist/css/fonts/font.playfair-faunaone.css +145 -0
- package/dist/css/fonts/font.playfair.css +234 -0
- package/dist/css/fonts/font.pt.css +271 -0
- package/dist/css/fonts/font.roboto-megrim.css +108 -0
- package/dist/css/fonts/font.rufina-sintony.css +126 -0
- package/dist/css/fonts/font.ubuntu.css +237 -0
- package/dist/css/fonts/font.unicaone-vollkorn.css +144 -0
- package/dist/css/icons/README.md +4 -0
- package/dist/css/icons/emoji.png +0 -0
- package/dist/css/icons/emoji@2x.png +0 -0
- package/dist/css/icons/vco-icons.eot +0 -0
- package/dist/css/icons/vco-icons.svg +63 -0
- package/dist/css/icons/vco-icons.ttf +0 -0
- package/dist/css/icons/vco-icons.woff +0 -0
- package/dist/css/icons/vco-icons.woff2 +0 -0
- package/dist/css/storymap.css +2 -0
- package/dist/demo.html +17 -0
- package/dist/demo.json +479 -0
- package/dist/docs/api/.nojekyll +1 -0
- package/dist/docs/api/assets/custom.css +47 -0
- package/dist/docs/api/assets/hierarchy.js +1 -0
- package/dist/docs/api/assets/highlight.css +22 -0
- package/dist/docs/api/assets/icons.js +18 -0
- package/dist/docs/api/assets/icons.svg +1 -0
- package/dist/docs/api/assets/main.js +60 -0
- package/dist/docs/api/assets/navigation.js +1 -0
- package/dist/docs/api/assets/search.js +1 -0
- package/dist/docs/api/assets/style.css +1648 -0
- package/dist/docs/api/classes/StoryMap.html +799 -0
- package/dist/docs/api/functions/MediaType.html +51 -0
- package/dist/docs/api/functions/loadCSS.html +64 -0
- package/dist/docs/api/functions/setLanguage.html +53 -0
- package/dist/docs/api/functions/validateStorymap.html +53 -0
- package/dist/docs/api/functions/validateStorymapAndReport.html +54 -0
- package/dist/docs/api/hierarchy.html +28 -0
- package/dist/docs/api/index.html +127 -0
- package/dist/docs/api/modules.html +42 -0
- package/dist/docs/iiif.html +912 -0
- package/dist/docs/migration.html +264 -0
- package/dist/docs/readme.html +178 -0
- package/dist/embed/index.html +95 -0
- package/dist/examples/assets/placeholder-city.jpg +0 -0
- package/dist/examples/assets/placeholder-landscape.jpg +0 -0
- package/dist/examples/assets/placeholder-portrait.jpg +0 -0
- package/dist/examples/assets/tone.mp3 +0 -0
- package/dist/examples/bob-boilen.json +123 -0
- package/dist/examples/courbet.json +32 -0
- package/dist/examples/empty.json +5 -0
- package/dist/examples/flickr-drewvigal.json +341 -0
- package/dist/examples/flickr-zach.wise.json +341 -0
- package/dist/examples/iiif-wellcome.json +28 -0
- package/dist/examples/instagram-chenpamela.json +592 -0
- package/dist/examples/instagram_brentfoster.json +565 -0
- package/dist/examples/instagram_couch.json +402 -0
- package/dist/examples/instagram_joegermuska.json +687 -0
- package/dist/examples/instagram_matteich.json +341 -0
- package/dist/examples/instagram_mirandamulligan.json +402 -0
- package/dist/examples/instagram_raymondmccrea.json +341 -0
- package/dist/examples/instagram_test.json +341 -0
- package/dist/examples/issue-134-no-lines.json +78 -0
- package/dist/examples/issue-177-color-vars.json +44 -0
- package/dist/examples/issue-211-rtl.json +44 -0
- package/dist/examples/issue-272-facebook.json +47 -0
- package/dist/examples/issue-305-start-at-slide.json +95 -0
- package/dist/examples/issue-341-distance.json +44 -0
- package/dist/examples/issue-360-juxtapose.json +35 -0
- package/dist/examples/issue-368-null-fields.json +60 -0
- package/dist/examples/issue-375-code-lists.json +35 -0
- package/dist/examples/issue-381-dateline.json +77 -0
- package/dist/examples/issue-425-many-slides.json +2723 -0
- package/dist/examples/issue-428-background.json +62 -0
- package/dist/examples/issue-435-googlemaps.json +35 -0
- package/dist/examples/issue-437-documentcloud.json +35 -0
- package/dist/examples/issue-451-webp.json +35 -0
- package/dist/examples/issue-455-audio.json +35 -0
- package/dist/examples/issue-480-shorts.json +35 -0
- package/dist/examples/issue-506-marker-sync.json +77 -0
- package/dist/examples/jansteen.json +1 -0
- package/dist/examples/katrina.json +161 -0
- package/dist/examples/marktwain.json +341 -0
- package/dist/examples/population.json +463 -0
- package/dist/examples/president.json +454 -0
- package/dist/examples/seurat.json +248 -0
- package/dist/examples-iiif/bob-boilen.json +341 -0
- package/dist/examples-iiif/courbet.json +80 -0
- package/dist/examples-iiif/empty.json +29 -0
- package/dist/examples-iiif/flickr-drewvigal.json +1189 -0
- package/dist/examples-iiif/flickr-zach.wise.json +1074 -0
- package/dist/examples-iiif/iiif-wellcome.json +97 -0
- package/dist/examples-iiif/instagram-chenpamela.json +1716 -0
- package/dist/examples-iiif/instagram_brentfoster.json +1804 -0
- package/dist/examples-iiif/instagram_couch.json +1166 -0
- package/dist/examples-iiif/instagram_joegermuska.json +1946 -0
- package/dist/examples-iiif/instagram_matteich.json +1190 -0
- package/dist/examples-iiif/instagram_mirandamulligan.json +1171 -0
- package/dist/examples-iiif/instagram_raymondmccrea.json +1165 -0
- package/dist/examples-iiif/instagram_test.json +1185 -0
- package/dist/examples-iiif/issue-134-no-lines.json +245 -0
- package/dist/examples-iiif/issue-177-color-vars.json +182 -0
- package/dist/examples-iiif/issue-211-rtl.json +182 -0
- package/dist/examples-iiif/issue-272-facebook.json +146 -0
- package/dist/examples-iiif/issue-305-start-at-slide.json +300 -0
- package/dist/examples-iiif/issue-341-distance.json +182 -0
- package/dist/examples-iiif/issue-360-juxtapose.json +112 -0
- package/dist/examples-iiif/issue-368-null-fields.json +202 -0
- package/dist/examples-iiif/issue-375-code-lists.json +111 -0
- package/dist/examples-iiif/issue-381-dateline.json +244 -0
- package/dist/examples-iiif/issue-425-many-slides.json +8476 -0
- package/dist/examples-iiif/issue-428-background.json +191 -0
- package/dist/examples-iiif/issue-435-googlemaps.json +111 -0
- package/dist/examples-iiif/issue-437-documentcloud.json +112 -0
- package/dist/examples-iiif/issue-451-webp.json +111 -0
- package/dist/examples-iiif/issue-455-audio.json +111 -0
- package/dist/examples-iiif/issue-480-shorts.json +110 -0
- package/dist/examples-iiif/issue-506-marker-sync.json +244 -0
- package/dist/examples-iiif/jansteen.json +509 -0
- package/dist/examples-iiif/katrina.json +499 -0
- package/dist/examples-iiif/marktwain.json +929 -0
- package/dist/examples-iiif/population.json +1464 -0
- package/dist/examples-iiif/president.json +1351 -0
- package/dist/examples-iiif/seurat.json +870 -0
- package/dist/football.json +344 -0
- package/dist/harness.html +15 -0
- package/dist/index.html +410 -0
- package/dist/js/storymap.js +25787 -0
- package/dist/js/storymap.js.map +1 -0
- package/dist/site.css +592 -0
- package/dist/thumbs/bosch-garden.jpg +0 -0
- package/dist/thumbs/iiif-wellcome.jpg +0 -0
- package/dist/thumbs/katrina.jpg +0 -0
- package/dist/thumbs/marktwain.jpg +0 -0
- package/dist/thumbs/population.jpg +0 -0
- package/dist/thumbs/president.jpg +0 -0
- package/dist/thumbs/seurat.jpg +0 -0
- package/dist/thumbs/southern-literary-trail.jpg +0 -0
- package/package.json +105 -0
- package/schema/storymap.schema.json +192 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Migration guide — StoryMapJS</title>
|
|
7
|
+
<meta name="description" content="Migration guide — StoryMapJS documentation" />
|
|
8
|
+
<link rel="stylesheet" href="../site.css" />
|
|
9
|
+
</head>
|
|
10
|
+
<body class="sm-site">
|
|
11
|
+
|
|
12
|
+
<nav class="navbar navbar-dark">
|
|
13
|
+
<ul>
|
|
14
|
+
<li class="logo">
|
|
15
|
+
<a href="../index.html">StoryMap <span>JS</span></a>
|
|
16
|
+
</li>
|
|
17
|
+
</ul>
|
|
18
|
+
<ul class="nav-right">
|
|
19
|
+
<li>
|
|
20
|
+
<a class="button button-dark button-active" href="https://github.com/cmahnke/StoryMapJS"
|
|
21
|
+
>GitHub</a
|
|
22
|
+
>
|
|
23
|
+
</li>
|
|
24
|
+
<li>
|
|
25
|
+
<a class="button button-dark" href="https://github.com/cmahnke/StoryMapJS/issues"
|
|
26
|
+
>Issues</a
|
|
27
|
+
>
|
|
28
|
+
</li>
|
|
29
|
+
</ul>
|
|
30
|
+
</nav>
|
|
31
|
+
<header class="header-product header-product-docs">
|
|
32
|
+
<nav id="navbar-secondary" class="navbar navbar-subnav" aria-label="Page navigation">
|
|
33
|
+
<ul>
|
|
34
|
+
<li><a class="button" href="../index.html#overview">Overview</a></li>
|
|
35
|
+
<li><a class="button" href="../index.html#examples">Examples</a></li>
|
|
36
|
+
<li><a class="button" href="./readme.html">README</a></li>
|
|
37
|
+
<li><a class="button" href="./migration.html">Migration guide</a></li>
|
|
38
|
+
<li><a class="button" href="./iiif.html">IIIF docs</a></li>
|
|
39
|
+
<li><a class="button" href="./api/index.html">API docs</a></li>
|
|
40
|
+
<li><a class="button" href="../index.html#help">Help</a></li>
|
|
41
|
+
</ul>
|
|
42
|
+
</nav>
|
|
43
|
+
</header>
|
|
44
|
+
<main class="sm-docs">
|
|
45
|
+
<h1>Migrating from the Knight Lab StoryMapJS</h1>
|
|
46
|
+
<p>This guide helps you move from the original Knight Lab StoryMapJS viewer
|
|
47
|
+
(distributed as a webpack UMD bundle with a <code>KLStoryMap</code> global) to this
|
|
48
|
+
rewritten TypeScript/OpenLayers viewer (ESM only).</p>
|
|
49
|
+
<p>The markup (<code>vco-*</code> classes), storymap JSON format and the
|
|
50
|
+
<code>new StoryMap(elem, data, options, listeners)</code> constructor signature are
|
|
51
|
+
preserved, so most stories render the same. What changed is the delivery
|
|
52
|
+
(ESM instead of UMD), the map engine (Leaflet → OpenLayers, so some
|
|
53
|
+
rendering details differ) and a few removed legacy paths.</p>
|
|
54
|
+
<h2>Bundle and loading</h2>
|
|
55
|
+
<table>
|
|
56
|
+
<thead>
|
|
57
|
+
<tr>
|
|
58
|
+
<th>Knight Lab version (master)</th>
|
|
59
|
+
<th>This version</th>
|
|
60
|
+
</tr>
|
|
61
|
+
</thead>
|
|
62
|
+
<tbody><tr>
|
|
63
|
+
<td><code><script src="https://cdn.knightlab.com/libs/storymapjs/latest/js/storymap.js"></code> + <code>new KLStoryMap.StoryMap(...)</code> (UMD global)</td>
|
|
64
|
+
<td><code>npm install</code> + ESM import: <code>import { StoryMap } from "storymapjs"</code></td>
|
|
65
|
+
</tr>
|
|
66
|
+
<tr>
|
|
67
|
+
<td><code><link rel="stylesheet" href=".../css/storymap.css"></code> loaded manually</td>
|
|
68
|
+
<td>Import the CSS once (<code>import "storymapjs/css/storymap.css"</code> or the stylesheet from <code>dist/css/</code>); font themes load automatically via the <code>font_css</code> option</td>
|
|
69
|
+
</tr>
|
|
70
|
+
<tr>
|
|
71
|
+
<td><code>main.js</code>/<code>main-min.js</code>, <code>compiled/</code></td>
|
|
72
|
+
<td>single ESM bundle <code>dist/js/storymap.js</code></td>
|
|
73
|
+
</tr>
|
|
74
|
+
</tbody></table>
|
|
75
|
+
<p>There is <strong>no UMD/IIFE bundle and no <code>KLStoryMap</code>/<code>VCO</code> global</strong> anymore. For
|
|
76
|
+
script-tag embedding use the ES module:</p>
|
|
77
|
+
<pre><code class="language-html"><script type="module">
|
|
78
|
+
import { StoryMap } from "https://example.com/storymap/js/storymap.js";
|
|
79
|
+
const storymap = new StoryMap("storymap-embed", "https://example.com/my-storymap.json");
|
|
80
|
+
</script>
|
|
81
|
+
</code></pre>
|
|
82
|
+
<h2>Constructor</h2>
|
|
83
|
+
<p>The signature is the same:</p>
|
|
84
|
+
<pre><code class="language-ts">new StoryMap(elem, data, options?, listeners?)
|
|
85
|
+
</code></pre>
|
|
86
|
+
<ul>
|
|
87
|
+
<li><code>elem</code> — container element or DOM id (unchanged).</li>
|
|
88
|
+
<li><code>data</code> — a storymap document (<code>{ storymap: ... }</code>), an <strong>IIIF Presentation 3
|
|
89
|
+
manifest</strong>, or a <strong>URL of the source file</strong>, which is fetched and validated
|
|
90
|
+
automatically (unchanged).</li>
|
|
91
|
+
<li><code>options</code> — see below for removed/changed options.</li>
|
|
92
|
+
<li><code>listeners</code> — event listeners keyed by name (unchanged); <code>storymap.on(...)</code>
|
|
93
|
+
still works.</li>
|
|
94
|
+
</ul>
|
|
95
|
+
<p>New capabilities:</p>
|
|
96
|
+
<ul>
|
|
97
|
+
<li><strong>Resize handling</strong>: the viewer re-layouts automatically when its container
|
|
98
|
+
resizes (disable with <code>trackResize: false</code>).</li>
|
|
99
|
+
<li><strong>Fullscreen</strong>: a menubar fullscreen toggle driven by the standard HTML5
|
|
100
|
+
fullscreen API (<code>fullscreen: false</code> hides the button).</li>
|
|
101
|
+
<li><strong>Raw OpenLayers options</strong>: pass <code>map_options: { controls, interactions, view, element, ... }</code> to configure the underlying OpenLayers map; <code>element</code>
|
|
102
|
+
(HTMLElement or DOM id) replaces the auto-created map container.</li>
|
|
103
|
+
<li><strong>Runtime options</strong>: <code>storymap.setMapOption(name, value)</code> /
|
|
104
|
+
<code>storymap.setMapOptions({...})</code> — e.g. switch <code>map_type</code> or line styling live.</li>
|
|
105
|
+
</ul>
|
|
106
|
+
<h2>Changed options and map types</h2>
|
|
107
|
+
<table>
|
|
108
|
+
<thead>
|
|
109
|
+
<tr>
|
|
110
|
+
<th>Old</th>
|
|
111
|
+
<th>New</th>
|
|
112
|
+
</tr>
|
|
113
|
+
</thead>
|
|
114
|
+
<tbody><tr>
|
|
115
|
+
<td><code>map_type: "zoomify"</code> (+ <code>options.zoomify</code>)</td>
|
|
116
|
+
<td>preferred: <code>map_type: "iiif"</code> with <code>options.iiif = { url, attribution }</code> (IIIF Image API 2/3); zoomify still works as a legacy image-pyramid basemap (see below)</td>
|
|
117
|
+
</tr>
|
|
118
|
+
<tr>
|
|
119
|
+
<td><code>map_type: "stamen:toner"</code> etc.</td>
|
|
120
|
+
<td><code>"stamen:*"</code> types are deprecated and remapped: <code>stamen:watercolor</code> → <code>ch-watercolor</code>, others → <code>osm:standard</code></td>
|
|
121
|
+
</tr>
|
|
122
|
+
<tr>
|
|
123
|
+
<td>Stadia Maps paid tiles via <code>map_access_token</code></td>
|
|
124
|
+
<td>Recommended: free OpenStreetMap vector styles, e.g. <code>map_type: "osm:bright"</code> (OpenFreeMap), or any style JSON URL</td>
|
|
125
|
+
</tr>
|
|
126
|
+
<tr>
|
|
127
|
+
<td>Bundled <code>map_access_token</code></td>
|
|
128
|
+
<td>removed — pass <code>map_access_token</code> in the options if you use Mapbox/Stadia tiles</td>
|
|
129
|
+
</tr>
|
|
130
|
+
<tr>
|
|
131
|
+
<td>Bundled Flickr API key</td>
|
|
132
|
+
<td>removed — pass <code>api_key_flickr</code> in the options if you use <code>flickr.com/photos</code> API URLs</td>
|
|
133
|
+
</tr>
|
|
134
|
+
<tr>
|
|
135
|
+
<td><code>relative_date: true</code> (moment.js)</td>
|
|
136
|
+
<td>removed — format dates in the story text</td>
|
|
137
|
+
</tr>
|
|
138
|
+
<tr>
|
|
139
|
+
<td><code>font_css: "stock:<name>"</code> (or a path)</td>
|
|
140
|
+
<td>unchanged, plus the font files ship via <code>@fontsource-utils/scss</code>; no separate font CSS link needed</td>
|
|
141
|
+
</tr>
|
|
142
|
+
</tbody></table>
|
|
143
|
+
<h2>Removed globals and exports</h2>
|
|
144
|
+
<table>
|
|
145
|
+
<thead>
|
|
146
|
+
<tr>
|
|
147
|
+
<th>Removed</th>
|
|
148
|
+
<th>Replacement</th>
|
|
149
|
+
</tr>
|
|
150
|
+
</thead>
|
|
151
|
+
<tbody><tr>
|
|
152
|
+
<td><code>KLStoryMap</code> / <code>VCO</code> global (UMD)</td>
|
|
153
|
+
<td>ESM import of the named exports</td>
|
|
154
|
+
</tr>
|
|
155
|
+
<tr>
|
|
156
|
+
<td><code>window.trace</code></td>
|
|
157
|
+
<td><code>console.log</code></td>
|
|
158
|
+
</tr>
|
|
159
|
+
<tr>
|
|
160
|
+
<td><code>getJSON(url, onload)</code></td>
|
|
161
|
+
<td><code>fetch</code> / the StoryMap constructor's URL loading</td>
|
|
162
|
+
</tr>
|
|
163
|
+
<tr>
|
|
164
|
+
<td><code>StamenTileLayer</code> export</td>
|
|
165
|
+
<td><code>map_type: "osm:bright"</code> or another OpenFreeMap style</td>
|
|
166
|
+
</tr>
|
|
167
|
+
<tr>
|
|
168
|
+
<td><code>ZoomifyTileLayer</code> export</td>
|
|
169
|
+
<td><code>map_type: "iiif"</code></td>
|
|
170
|
+
</tr>
|
|
171
|
+
<tr>
|
|
172
|
+
<td>Knight Lab usage tracking (gtag)</td>
|
|
173
|
+
<td>none — nothing is sent</td>
|
|
174
|
+
</tr>
|
|
175
|
+
</tbody></table>
|
|
176
|
+
<h2>Removed media types and services</h2>
|
|
177
|
+
<table>
|
|
178
|
+
<thead>
|
|
179
|
+
<tr>
|
|
180
|
+
<th>Removed</th>
|
|
181
|
+
<th>Replacement</th>
|
|
182
|
+
</tr>
|
|
183
|
+
</thead>
|
|
184
|
+
<tbody><tr>
|
|
185
|
+
<td><code>vine</code> media type (service shut down)</td>
|
|
186
|
+
<td>vine URLs fall back to the <code>website</code> iframe — use another media source for those slides</td>
|
|
187
|
+
</tr>
|
|
188
|
+
<tr>
|
|
189
|
+
<td>Juxtapose <code>frame/?uid=</code> embed URLs</td>
|
|
190
|
+
<td>the <code>juxtapose.knightlab.com/frame/?uid=</code> host is dead — use the published format <code>https://cdn.knightlab.com/libs/juxtapose/latest/embed/index.html?uid=...</code> (note: this keeps a Knight Lab CDN dependency for those slides)</td>
|
|
191
|
+
</tr>
|
|
192
|
+
<tr>
|
|
193
|
+
<td>Twitter <code>@nickname</code> rendering</td>
|
|
194
|
+
<td>tweets from <code>x.com</code> URLs are now parsed too (fixes <code>@undefined</code> nicknames); no migration needed</td>
|
|
195
|
+
</tr>
|
|
196
|
+
</tbody></table>
|
|
197
|
+
<p><code>map_type: "zoomify"</code> is supported again (legacy): the image pyramid renders
|
|
198
|
+
via the storymap data's <code>zoomify</code> options (<code>path</code>, <code>width</code>, <code>height</code>), using a
|
|
199
|
+
JS warning instead of the previous removal error. Caveat: the pyramid's
|
|
200
|
+
edge/remainder tiles render slightly stretched (the canvas renderer cannot
|
|
201
|
+
per-tile clamp like the original Leaflet renderer). Using zoomify in a IIIF
|
|
202
|
+
Presentation manifest is ignored — legacy zoomify options only work with
|
|
203
|
+
storymap JSON sources.</p>
|
|
204
|
+
<h2>Map engine: Leaflet → OpenLayers</h2>
|
|
205
|
+
<ul>
|
|
206
|
+
<li><code>storymap.map</code> now exposes the <strong>OpenLayers <code>Map</code></strong> instance instead of a
|
|
207
|
+
Leaflet map. Port any direct Leaflet calls (e.g. <code>setView</code>, <code>flyTo</code>) to the
|
|
208
|
+
OpenLayers API (<code>getView().animate(...)</code>, ...).</li>
|
|
209
|
+
<li>Markers are DOM overlays (<code>.vco-mapmarker</code> / <code>.vco-mapmarker-active</code>) like
|
|
210
|
+
before; the mini map is an OpenLayers <code>OverviewMap</code> control.</li>
|
|
211
|
+
<li>New basemap options: vector styles via <code>map_type: "osm:<style>"</code> (OpenFreeMap)
|
|
212
|
+
or a Mapbox style JSON URL.</li>
|
|
213
|
+
</ul>
|
|
214
|
+
<h2>Data and tooling</h2>
|
|
215
|
+
<ul>
|
|
216
|
+
<li>Storymap JSON is now validated against a JSON Schema
|
|
217
|
+
(<code>schema/storymap.schema.json</code>); invalid documents are reported to the
|
|
218
|
+
console at load time.</li>
|
|
219
|
+
<li>IIIF Presentation 3 manifests are accepted directly as storymap sources.</li>
|
|
220
|
+
<li>The StoryMap IIIF extension context changed to
|
|
221
|
+
<code>https://christianmahnke.de/iiif/storymap</code> — manifests produced with the old
|
|
222
|
+
<code>https://example.org/ns/storymap/v1</code> context need re-converting
|
|
223
|
+
(<code>scripts/convert-to-iiif.mjs</code>).</li>
|
|
224
|
+
<li>The editor, staging/backend infrastructure, AWS/GitHub hosting scripts and the
|
|
225
|
+
Python authoring server are gone — this is a viewer-only library.</li>
|
|
226
|
+
</ul>
|
|
227
|
+
<h2>Events (unchanged)</h2>
|
|
228
|
+
<p><code>change</code> (with <code>current_slide</code>), <code>loaded</code>, <code>title</code>, <code>dataloaded</code>,
|
|
229
|
+
<code>fontLoaded</code>, plus the listener map in the constructor — all work as before.</p>
|
|
230
|
+
|
|
231
|
+
</main>
|
|
232
|
+
|
|
233
|
+
<footer class="footer-knightlab">
|
|
234
|
+
<div class="footer-grid">
|
|
235
|
+
<div>
|
|
236
|
+
<div class="footer-brand">StoryMap <span>JS</span></div>
|
|
237
|
+
<ul class="list-social">
|
|
238
|
+
<li>
|
|
239
|
+
<a href="https://github.com/cmahnke/StoryMapJS" title="StoryMapJS fork on GitHub"
|
|
240
|
+
>GitHub</a
|
|
241
|
+
>
|
|
242
|
+
</li>
|
|
243
|
+
<li>
|
|
244
|
+
<a href="https://github.com/NUKnightLab/StoryMapJS" title="Upstream Knight Lab repository"
|
|
245
|
+
>Upstream</a
|
|
246
|
+
>
|
|
247
|
+
</li>
|
|
248
|
+
</ul>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="footer-description">
|
|
251
|
+
<p>
|
|
252
|
+
A TypeScript rewrite of
|
|
253
|
+
<a href="https://github.com/NUKnightLab/StoryMapJS">NUKnightLab/StoryMapJS</a>,
|
|
254
|
+
the original tool by
|
|
255
|
+
<a href="https://knightlab.northwestern.edu/">Northwestern University Knight Lab</a>.
|
|
256
|
+
</p>
|
|
257
|
+
<span class="copyright">
|
|
258
|
+
Released under the <a href="https://opensource.org/license/MPL-2-0">MPL-2.0</a> license.
|
|
259
|
+
</span>
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
</footer>
|
|
263
|
+
</body>
|
|
264
|
+
</html>
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>README — StoryMapJS</title>
|
|
7
|
+
<meta name="description" content="README — StoryMapJS documentation" />
|
|
8
|
+
<link rel="stylesheet" href="../site.css" />
|
|
9
|
+
</head>
|
|
10
|
+
<body class="sm-site">
|
|
11
|
+
|
|
12
|
+
<nav class="navbar navbar-dark">
|
|
13
|
+
<ul>
|
|
14
|
+
<li class="logo">
|
|
15
|
+
<a href="../index.html">StoryMap <span>JS</span></a>
|
|
16
|
+
</li>
|
|
17
|
+
</ul>
|
|
18
|
+
<ul class="nav-right">
|
|
19
|
+
<li>
|
|
20
|
+
<a class="button button-dark button-active" href="https://github.com/cmahnke/StoryMapJS"
|
|
21
|
+
>GitHub</a
|
|
22
|
+
>
|
|
23
|
+
</li>
|
|
24
|
+
<li>
|
|
25
|
+
<a class="button button-dark" href="https://github.com/cmahnke/StoryMapJS/issues"
|
|
26
|
+
>Issues</a
|
|
27
|
+
>
|
|
28
|
+
</li>
|
|
29
|
+
</ul>
|
|
30
|
+
</nav>
|
|
31
|
+
<header class="header-product header-product-docs">
|
|
32
|
+
<nav id="navbar-secondary" class="navbar navbar-subnav" aria-label="Page navigation">
|
|
33
|
+
<ul>
|
|
34
|
+
<li><a class="button" href="../index.html#overview">Overview</a></li>
|
|
35
|
+
<li><a class="button" href="../index.html#examples">Examples</a></li>
|
|
36
|
+
<li><a class="button" href="./readme.html">README</a></li>
|
|
37
|
+
<li><a class="button" href="./migration.html">Migration guide</a></li>
|
|
38
|
+
<li><a class="button" href="./iiif.html">IIIF docs</a></li>
|
|
39
|
+
<li><a class="button" href="./api/index.html">API docs</a></li>
|
|
40
|
+
<li><a class="button" href="../index.html#help">Help</a></li>
|
|
41
|
+
</ul>
|
|
42
|
+
</nav>
|
|
43
|
+
</header>
|
|
44
|
+
<main class="sm-docs">
|
|
45
|
+
<h1>StoryMapJS: Maps that tell stories.</h1>
|
|
46
|
+
<blockquote>
|
|
47
|
+
<p><strong>Important:</strong> this is an <strong>unofficial, unapproved fork</strong> of the original
|
|
48
|
+
<a href="https://github.com/NUKnightLab/StoryMapJS">NUKnightLab/StoryMapJS</a>
|
|
49
|
+
repository. It is a proof of concept for an AI-based renovation of the
|
|
50
|
+
codebase, built using the model <strong>GLM 5.3 Flash</strong>. It is not endorsed by,
|
|
51
|
+
affiliated with, or supported by Northwestern University Knight Lab.</p>
|
|
52
|
+
</blockquote>
|
|
53
|
+
<p>This fork is a <strong>viewer-only library</strong>: it renders existing StoryMap JSON
|
|
54
|
+
files (or IIIF Presentation manifests) with TypeScript + Vite + OpenLayers.
|
|
55
|
+
There is no authoring tool — create your storymap JSON by hand or with your
|
|
56
|
+
own code, and see <code>docs/</code> for the migration notes from the original
|
|
57
|
+
Knight Lab release.</p>
|
|
58
|
+
<h2>Development</h2>
|
|
59
|
+
<p>See docs/DEVELOPMENT.md to get setup for local development of StoryMapJS. This
|
|
60
|
+
repository is the viewer library only (TypeScript + Vite + OpenLayers);
|
|
61
|
+
StoryMap JSON is validated against the schema in <code>schema/</code> on load and via
|
|
62
|
+
<code>npm run validate</code>.</p>
|
|
63
|
+
<h2>Contributing language translations</h2>
|
|
64
|
+
<p>StoryMap ships locale files for dozens of languages under
|
|
65
|
+
<code>src/language/locale/</code> (for example
|
|
66
|
+
<a href="src/language/locale/es.json"><code>es.json</code></a>). To add or improve a translation,
|
|
67
|
+
copy an existing file and edit the quoted strings — please <em>don't</em> change the
|
|
68
|
+
"keys" (the unquoted strings). The file name is the language code, e.g.
|
|
69
|
+
<code>es.json</code> (codes like <code>zh-cn.json</code> and <code>zh-tw.json</code> are also supported — the
|
|
70
|
+
value of the storymap's <code>language</code> option must match the file name).</p>
|
|
71
|
+
<h2>IIIF images</h2>
|
|
72
|
+
<p>Large images served over the IIIF Image API are rendered so when set to be map_as_image the entire image is shown. When set as cartography the zoom will set so that all the markers fit.</p>
|
|
73
|
+
<p>Points are set to only display on mouseover in image mode, but you can set map_as_image to false in the config options to always show the points. The points are hidden when the intent is an image so that nothing obstructs the image the viewer is looking at. Looking at a painting is hard with a bunch of points on it.</p>
|
|
74
|
+
<h2>Map Options</h2>
|
|
75
|
+
<p>To disable connecting lines on maps set <code>map_as_image: true</code> in the storymap
|
|
76
|
+
options (the default <code>false</code> renders cartography).</p>
|
|
77
|
+
<p>The menubar buttons can be disabled individually:</p>
|
|
78
|
+
<pre><code>show_overview: false, // map overview button
|
|
79
|
+
show_back_to_start: false, // back to the beginning button
|
|
80
|
+
fullscreen: false, // fullscreen toggle
|
|
81
|
+
</code></pre>
|
|
82
|
+
<p>(true is the default; setting the option to false hides the button.)</p>
|
|
83
|
+
<p>More config options available to do what you want with the line:</p>
|
|
84
|
+
<pre><code>line_follows_path: true, // Map history path follows default line, if false it will connect previous and current only
|
|
85
|
+
line_color: "#c34528",
|
|
86
|
+
line_color_inactive: "#CCC",
|
|
87
|
+
line_join: "miter",
|
|
88
|
+
line_weight: 3,
|
|
89
|
+
line_opacity: 0.80,
|
|
90
|
+
line_dash: "5,5",
|
|
91
|
+
show_lines: true,
|
|
92
|
+
show_history_line: true,
|
|
93
|
+
</code></pre>
|
|
94
|
+
<p>To disable zoom calculation/edit zoom level set calculate_zoom to false in the config options.</p>
|
|
95
|
+
<p>Images can now be used in place of map pins.
|
|
96
|
+
Use <code>image</code> inside the location object and include a url to use, together with
|
|
97
|
+
<code>use_custom_marker: true</code> in the location object (or set <code>use_custom_markers: true</code> globally in the storymap options). Same goes for custom icons except you
|
|
98
|
+
need <code>icon</code> inside the location object.</p>
|
|
99
|
+
<h3>Limit the map to a bounding box</h3>
|
|
100
|
+
<p>Set <code>map_bbox</code> to <code>[west, south, east, north]</code> (lon/lat) to constrain the map —
|
|
101
|
+
nothing outside of the box can be visible:</p>
|
|
102
|
+
<pre><code>map_bbox: [-11, 34, 32, 71], // or null (the default) to leave the map unconstrained
|
|
103
|
+
</code></pre>
|
|
104
|
+
<p>For image-space (IIIF) maps the coordinates are raw image pixels. When the
|
|
105
|
+
slide content panel is opaque (a solid background that hides the map behind it),
|
|
106
|
+
the initial fit accounts for the covered area so the story stays inside the
|
|
107
|
+
visible region.</p>
|
|
108
|
+
<h2>Custom HTML in slide content</h2>
|
|
109
|
+
<p>Slide text is rendered as HTML: the <code>text</code> (and <code>headline</code>) fields accept
|
|
110
|
+
arbitrary markup. If the text contains no <code><p></code> tag, it is wrapped in one
|
|
111
|
+
automatically; otherwise it is used as-is. This means you can use links,
|
|
112
|
+
images, lists, emphasis and spans in your slides, e.g.:</p>
|
|
113
|
+
<pre><code>{
|
|
114
|
+
"headline": "1920: An American in the Making",
|
|
115
|
+
"text": "Immigrants arriving at <a href=\"https://example.org\">Ellis Island</a>.<br><span class='vco-note'>Photograph: Library of Congress.</span>"
|
|
116
|
+
}
|
|
117
|
+
</code></pre>
|
|
118
|
+
<p>The <code>vco-note</code> span renders as a small grey note, like the built-in credits.</p>
|
|
119
|
+
<p><strong>Caution:</strong> the text is rendered raw — it is not sanitized. Only load
|
|
120
|
+
storymaps from sources you trust.</p>
|
|
121
|
+
<h2>GDPR consent for external services</h2>
|
|
122
|
+
<p>Set the <code>consent_required</code> option to <code>true</code> to ask for permission before
|
|
123
|
+
anything is loaded from external services (media embeds such as YouTube,
|
|
124
|
+
Twitter or SoundCloud, map tiles, and external font CSS):</p>
|
|
125
|
+
<pre><code>{
|
|
126
|
+
"consent_required": true,
|
|
127
|
+
...
|
|
128
|
+
}
|
|
129
|
+
</code></pre>
|
|
130
|
+
<p>Each service asks with an Allow/Deny panel; answering one panel resolves every
|
|
131
|
+
pending panel of the same service. If a decision was already stored in the
|
|
132
|
+
cookie, the panel is skipped entirely. Denied services show a placeholder
|
|
133
|
+
instead of the media, and the map renders without tiles until they are
|
|
134
|
+
allowed. Decisions are stored in a cookie (<code>storymapjs-consent</code>) for 90
|
|
135
|
+
days — clearing cookies asks again.</p>
|
|
136
|
+
<h2>Troubleshooting</h2>
|
|
137
|
+
<p>If a storymap fails to render, open the browser console: the viewer logs
|
|
138
|
+
fetch and validation errors (e.g. "could not load storymap data from ...").
|
|
139
|
+
The <code>error</code> event also fires for programmatic consumers.</p>
|
|
140
|
+
<h2>Bundled credentials</h2>
|
|
141
|
+
<p>The viewer ships no credentials. Mapbox/Stadia tiles need a token passed via
|
|
142
|
+
<code>map_access_token</code>, and <code>flickr.com/photos</code> API URLs need <code>api_key_flickr</code>
|
|
143
|
+
(both settable in the storymap options).</p>
|
|
144
|
+
|
|
145
|
+
</main>
|
|
146
|
+
|
|
147
|
+
<footer class="footer-knightlab">
|
|
148
|
+
<div class="footer-grid">
|
|
149
|
+
<div>
|
|
150
|
+
<div class="footer-brand">StoryMap <span>JS</span></div>
|
|
151
|
+
<ul class="list-social">
|
|
152
|
+
<li>
|
|
153
|
+
<a href="https://github.com/cmahnke/StoryMapJS" title="StoryMapJS fork on GitHub"
|
|
154
|
+
>GitHub</a
|
|
155
|
+
>
|
|
156
|
+
</li>
|
|
157
|
+
<li>
|
|
158
|
+
<a href="https://github.com/NUKnightLab/StoryMapJS" title="Upstream Knight Lab repository"
|
|
159
|
+
>Upstream</a
|
|
160
|
+
>
|
|
161
|
+
</li>
|
|
162
|
+
</ul>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="footer-description">
|
|
165
|
+
<p>
|
|
166
|
+
A TypeScript rewrite of
|
|
167
|
+
<a href="https://github.com/NUKnightLab/StoryMapJS">NUKnightLab/StoryMapJS</a>,
|
|
168
|
+
the original tool by
|
|
169
|
+
<a href="https://knightlab.northwestern.edu/">Northwestern University Knight Lab</a>.
|
|
170
|
+
</p>
|
|
171
|
+
<span class="copyright">
|
|
172
|
+
Released under the <a href="https://opensource.org/license/MPL-2-0">MPL-2.0</a> license.
|
|
173
|
+
</span>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</footer>
|
|
177
|
+
</body>
|
|
178
|
+
</html>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>StoryMapJS Embed</title>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta name="description" content="StoryMapJS Embed">
|
|
7
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
8
|
+
<meta name="mobile-web-app-capable" content="yes">
|
|
9
|
+
<meta name="apple-touch-fullscreen" content="yes">
|
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
11
|
+
<link rel="stylesheet" href="../css/storymap.css">
|
|
12
|
+
<style>
|
|
13
|
+
html, body {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
padding: 0;
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
20
|
+
</head>
|
|
21
|
+
|
|
22
|
+
<body>
|
|
23
|
+
<div id="storymap-embed"></div>
|
|
24
|
+
|
|
25
|
+
<script type="module">
|
|
26
|
+
let StoryMap;
|
|
27
|
+
try {
|
|
28
|
+
// production (and preview): the built bundle next to this page
|
|
29
|
+
({ StoryMap } = await import("../js/storymap.js"));
|
|
30
|
+
} catch {
|
|
31
|
+
// dev server (npm run dev): dist/ is not served; the source entry
|
|
32
|
+
// brings the widget styles along as bundled CSS
|
|
33
|
+
({ StoryMap } = await import("/src/main.ts"));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
let storymap;
|
|
37
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
38
|
+
|
|
39
|
+
const getStartSlide = () =>
|
|
40
|
+
urlParams.has("start_at_slide") ? parseInt(urlParams.get("start_at_slide"), 10) : 0;
|
|
41
|
+
|
|
42
|
+
const onStoryMapTitle = (e) => {
|
|
43
|
+
document.title = "StoryMapJS: " + e.title;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const buildStoryMap = (data) => {
|
|
47
|
+
if (!data || !data.storymap) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const options = { start_at_slide: getStartSlide() };
|
|
51
|
+
// font theme loading is handled by the library (data.font_css / stock:default)
|
|
52
|
+
storymap = new StoryMap("storymap-embed", data, options, {
|
|
53
|
+
title: onStoryMapTitle,
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// resolve the url parameter against the SITE ROOT (the directory
|
|
58
|
+
// containing embed/), not against embed/ — works with relative
|
|
59
|
+
// ("examples/katrina.json"), root-relative ("/examples/…") and full
|
|
60
|
+
// URLs, in dev, preview and GitHub Pages project subpaths
|
|
61
|
+
const siteRoot = new URL("..", window.location.href);
|
|
62
|
+
const urlParam = urlParams.get("url");
|
|
63
|
+
|
|
64
|
+
const showEmbedError = (message) => {
|
|
65
|
+
const el = document.createElement("div");
|
|
66
|
+
el.className = "vco-consent-blocked";
|
|
67
|
+
// inline fallback styles in case the widget CSS did not load
|
|
68
|
+
el.style.cssText =
|
|
69
|
+
"display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:20px;background-color:#fff;color:#333;font-family:sans-serif;text-align:center;";
|
|
70
|
+
el.textContent = message;
|
|
71
|
+
document.getElementById("storymap-embed").append(el);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
if (!urlParam) {
|
|
75
|
+
showEmbedError(
|
|
76
|
+
"No storymap url given. Append ?url=<storymap.json> to the embed url.",
|
|
77
|
+
);
|
|
78
|
+
} else {
|
|
79
|
+
fetch(new URL(urlParam, siteRoot).href)
|
|
80
|
+
.then((response) => {
|
|
81
|
+
if (!response.ok) {
|
|
82
|
+
throw new Error("HTTP " + response.status);
|
|
83
|
+
}
|
|
84
|
+
return response.json();
|
|
85
|
+
})
|
|
86
|
+
.then((data) => buildStoryMap(data))
|
|
87
|
+
.catch(() => {
|
|
88
|
+
showEmbedError(
|
|
89
|
+
"Could not load the storymap. Check that the url parameter points at a valid storymap JSON.",
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
</script>
|
|
94
|
+
</body>
|
|
95
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|