@projektemacher/storymapjs 0.10.6 → 0.10.8
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 +358 -16
- package/README.md +43 -9
- package/dist/assets/demo-DBpeF31K.js +1 -0
- package/dist/assets/harness-Cr0rYpvt.js +1 -0
- package/dist/assets/harness-multi-CYHgI0a9.js +1 -0
- package/dist/assets/harness-support-Do7sIp2j.js +1 -0
- package/dist/assets/index-wHPqGrBS.js +1 -0
- package/dist/assets/main-DXalctuR.js +17 -0
- package/dist/context.json +12 -9
- package/dist/css/fonts/files/amatic-sc-cyrillic-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/amatic-sc-cyrillic-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/amatic-sc-hebrew-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/amatic-sc-hebrew-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/amatic-sc-vietnamese-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/amatic-sc-vietnamese-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-100-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-100-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-200-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-200-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-600-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-600-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-800-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-800-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-100-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-100-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-200-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-200-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-600-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-600-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-800-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-800-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-cyrillic-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-100-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-100-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-200-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-200-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-600-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-600-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-800-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-800-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/bitter-vietnamese-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-arabic-200-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-arabic-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-arabic-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-arabic-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-arabic-600-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-arabic-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-arabic-800-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-arabic-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-200-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-600-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-800-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-ext-200-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-ext-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-ext-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-ext-600-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-ext-800-normal.woff2 +0 -0
- package/dist/css/fonts/files/cairo-latin-ext-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/dancing-script-vietnamese-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-cyrillic-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-cyrillic-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-cyrillic-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-greek-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-greek-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-greek-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-greek-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-vietnamese-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/eb-garamond-vietnamese-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-cyrillic-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-cyrillic-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-cyrillic-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-cyrillic-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-cyrillic-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-cyrillic-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-greek-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-greek-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-greek-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-greek-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-greek-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-greek-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-greek-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-greek-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-vietnamese-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-vietnamese-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-vietnamese-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/gentium-book-plus-vietnamese-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-cyrillic-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-cyrillic-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-cyrillic-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-cyrillic-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-vietnamese-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-vietnamese-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/old-standard-tt-vietnamese-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-cyrillic-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-cyrillic-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-cyrillic-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-greek-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-greek-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-greek-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-greek-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-hebrew-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-hebrew-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-vietnamese-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/open-sans-vietnamese-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-cyrillic-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-cyrillic-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-cyrillic-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-cyrillic-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-cyrillic-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-cyrillic-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-cyrillic-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-cyrillic-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-vietnamese-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-vietnamese-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-vietnamese-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-vietnamese-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-vietnamese-900-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-sc-vietnamese-900-normal.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-vietnamese-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/playfair-display-vietnamese-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-cyrillic-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-cyrillic-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-cyrillic-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-cyrillic-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-cyrillic-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-cyrillic-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-narrow-cyrillic-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-narrow-cyrillic-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-narrow-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-sans-narrow-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-cyrillic-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-cyrillic-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-cyrillic-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-cyrillic-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-cyrillic-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-cyrillic-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/pt-serif-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/raleway-cyrillic-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/raleway-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/raleway-cyrillic-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/raleway-cyrillic-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/raleway-vietnamese-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/raleway-vietnamese-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/roboto-slab-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/roboto-slab-cyrillic-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/roboto-slab-greek-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/roboto-slab-greek-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/roboto-slab-vietnamese-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-ext-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-ext-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-ext-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-ext-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-cyrillic-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-ext-300-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-ext-300-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-ext-400-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-ext-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-ext-500-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-ext-500-normal.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-ext-700-italic.woff2 +0 -0
- package/dist/css/fonts/files/ubuntu-greek-ext-700-normal.woff2 +0 -0
- package/dist/css/fonts/files/unica-one-vietnamese-400-normal.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-cyrillic-ext-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-cyrillic-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-cyrillic-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-greek-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-greek-wght-normal.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-vietnamese-wght-italic.woff2 +0 -0
- package/dist/css/fonts/files/vollkorn-vietnamese-wght-normal.woff2 +0 -0
- package/dist/css/fonts/font.abril-droidsans.css +3 -0
- package/dist/css/fonts/font.amatic-andika.css +57 -0
- package/dist/css/fonts/font.bitter-raleway.css +111 -0
- package/dist/css/fonts/font.cairo.css +312 -0
- package/dist/css/fonts/font.clicker-garamond.css +93 -0
- package/dist/css/fonts/font.dancing-ledger.css +12 -0
- package/dist/css/fonts/font.default.css +183 -0
- package/dist/css/fonts/font.fjalla-average.css +3 -0
- package/dist/css/fonts/font.georgia-helvetica.css +3 -0
- package/dist/css/fonts/font.knightlab.css +642 -0
- package/dist/css/fonts/font.lustria-lato.css +3 -0
- package/dist/css/fonts/font.medula-lato.css +3 -0
- package/dist/css/fonts/font.oldstandard.css +101 -21
- package/dist/css/fonts/font.opensans-gentiumbook.css +183 -0
- package/dist/css/fonts/font.playfair-faunaone.css +39 -0
- package/dist/css/fonts/font.playfair.css +147 -0
- package/dist/css/fonts/font.pt.css +183 -0
- package/dist/css/fonts/font.roboto-megrim.css +3 -0
- package/dist/css/fonts/font.rufina-sintony.css +3 -0
- package/dist/css/fonts/font.ubuntu.css +291 -0
- package/dist/css/fonts/font.unicaone-vollkorn.css +84 -0
- package/dist/css/storymap.css +1 -1
- package/dist/demo.html +2 -2
- 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 +57 -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 +1604 -0
- package/dist/docs/api/functions/MediaType.html +51 -0
- package/dist/docs/api/functions/isPresentation3Collection.html +47 -0
- package/dist/docs/api/functions/isPresentation3Manifest.html +53 -0
- package/dist/docs/api/functions/loadCSS.html +63 -0
- package/dist/docs/api/functions/manifestToStorymapData.html +49 -0
- package/dist/docs/api/functions/setLanguage.html +54 -0
- package/dist/docs/api/functions/storymapToManifest.html +57 -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 +197 -0
- package/dist/docs/api/interfaces/AnimationHandle.html +60 -0
- package/dist/docs/api/interfaces/ImagereadyPayload.html +71 -0
- package/dist/docs/api/interfaces/LanguageEntry.html +102 -0
- package/dist/docs/api/interfaces/LatLngLiteral.html +73 -0
- package/dist/docs/api/interfaces/LoadOptions.html +59 -0
- package/dist/docs/api/interfaces/OlLayer.html +1400 -0
- package/dist/docs/api/interfaces/OlMap.html +1656 -0
- package/dist/docs/api/interfaces/OlProjection.html +332 -0
- package/dist/docs/api/interfaces/OlSource.html +784 -0
- package/dist/docs/api/interfaces/OlTileLayer.html +1497 -0
- package/dist/docs/api/interfaces/OlVectorLayer.html +1559 -0
- package/dist/docs/api/interfaces/OlView.html +1958 -0
- package/dist/docs/api/interfaces/StorymapData.html +71 -0
- package/dist/docs/api/interfaces/StorymapDataWrapper.html +60 -0
- package/dist/docs/api/interfaces/StorymapDocument.html +68 -0
- package/dist/docs/api/interfaces/StorymapError.html +63 -0
- package/dist/docs/api/interfaces/StorymapGeoreference.html +93 -0
- package/dist/docs/api/interfaces/StorymapGeoreferenceBody.html +74 -0
- package/dist/docs/api/interfaces/StorymapGroundControlPoint.html +69 -0
- package/dist/docs/api/interfaces/StorymapLanguageMap.html +57 -0
- package/dist/docs/api/interfaces/StorymapManifest.html +118 -0
- package/dist/docs/api/interfaces/StorymapManifestAnnotation.html +105 -0
- package/dist/docs/api/interfaces/StorymapManifestBackground.html +81 -0
- package/dist/docs/api/interfaces/StorymapManifestCanvas.html +140 -0
- package/dist/docs/api/interfaces/StorymapManifestContentResource.html +97 -0
- package/dist/docs/api/interfaces/StorymapManifestFeatureCollection.html +82 -0
- package/dist/docs/api/interfaces/StorymapManifestGeoreferencing.html +87 -0
- package/dist/docs/api/interfaces/StorymapManifestImageService.html +69 -0
- package/dist/docs/api/interfaces/StorymapManifestRange.html +75 -0
- package/dist/docs/api/interfaces/StorymapManifestService.html +77 -0
- package/dist/docs/api/interfaces/StorymapManifestSpecificResource.html +69 -0
- package/dist/docs/api/interfaces/StorymapManifestStatement.html +63 -0
- package/dist/docs/api/interfaces/StorymapMapOptions.html +92 -0
- package/dist/docs/api/interfaces/StorymapOptions.html +532 -0
- package/dist/docs/api/interfaces/StorymapOverlayLayer.html +126 -0
- package/dist/docs/api/interfaces/StorymapSlide.html +132 -0
- package/dist/docs/api/interfaces/StorymapSlideBackground.html +72 -0
- package/dist/docs/api/interfaces/StorymapSlideLocation.html +117 -0
- package/dist/docs/api/interfaces/StorymapSlideMarker.html +104 -0
- package/dist/docs/api/interfaces/StorymapSlideMedia.html +110 -0
- package/dist/docs/api/interfaces/StorymapSlideNarration.html +65 -0
- package/dist/docs/api/interfaces/StorymapSlideText.html +72 -0
- package/dist/docs/api/interfaces/StorymapTilejson.html +105 -0
- package/dist/docs/api/media/es.json +31 -0
- package/dist/docs/api/media/migration-from-knightlab.md +359 -0
- package/dist/docs/api/modules.html +50 -0
- package/dist/docs/api/types/ContentState.html +70 -0
- package/dist/docs/api/types/ImagereadyKind.html +34 -0
- package/dist/docs/api/types/MediaTypeMatch.html +78 -0
- package/dist/docs/api/types/TileSourceFactory.html +53 -0
- package/dist/docs/authoring.html +293 -0
- package/dist/docs/iiif.html +617 -62
- package/dist/docs/migration.html +314 -12
- package/dist/docs/readme.html +40 -9
- package/dist/embed/index.html +130 -5
- package/dist/examples/issue-242-nonlatin.json +55 -0
- package/dist/examples/issue-305-start-at-slide-data.json +96 -0
- package/dist/examples/issue-358-iframe.json +57 -0
- package/dist/examples/issue-iiif-geo.json +32 -0
- package/dist/examples/issue-image-alt.json +23 -0
- package/dist/examples/issue-image-region.json +42 -0
- package/dist/examples/issue-image-srcset.json +24 -0
- package/dist/examples/map-area-overlays.json +68 -0
- package/dist/examples/no-map.json +44 -0
- package/dist/examples-iiif/annotated-image.json +188 -0
- package/dist/examples-iiif/bob-boilen.json +11 -5
- package/dist/examples-iiif/courbet.json +9 -6
- package/dist/examples-iiif/empty.json +8 -4
- package/dist/examples-iiif/flickr-drewvigal.json +248 -24
- package/dist/examples-iiif/flickr-zach.wise.json +8 -4
- package/dist/examples-iiif/georeferenced-layer-unsupported.json +153 -0
- package/dist/examples-iiif/georeferenced-layer.json +318 -0
- package/dist/examples-iiif/iiif-wellcome.json +9 -6
- package/dist/examples-iiif/instagram-chenpamela.json +381 -36
- package/dist/examples-iiif/instagram_brentfoster.json +429 -40
- package/dist/examples-iiif/instagram_couch.json +261 -26
- package/dist/examples-iiif/instagram_joegermuska.json +441 -41
- package/dist/examples-iiif/instagram_matteich.json +261 -26
- package/dist/examples-iiif/instagram_mirandamulligan.json +261 -26
- package/dist/examples-iiif/instagram_raymondmccrea.json +261 -26
- package/dist/examples-iiif/instagram_test.json +261 -26
- package/dist/examples-iiif/issue-134-no-lines.json +9 -5
- package/dist/examples-iiif/issue-177-color-vars.json +9 -5
- package/dist/examples-iiif/issue-211-rtl.json +9 -5
- package/dist/examples-iiif/issue-242-nonlatin.json +239 -0
- package/dist/examples-iiif/issue-272-facebook.json +9 -5
- package/dist/examples-iiif/issue-305-start-at-slide-data.json +305 -0
- package/dist/examples-iiif/issue-305-start-at-slide.json +9 -5
- package/dist/examples-iiif/issue-341-distance.json +9 -5
- package/dist/examples-iiif/issue-358-iframe.json +190 -0
- package/dist/examples-iiif/issue-360-juxtapose.json +22 -7
- package/dist/examples-iiif/issue-368-null-fields.json +9 -5
- package/dist/examples-iiif/issue-375-code-lists.json +9 -5
- package/dist/examples-iiif/issue-381-dateline.json +9 -5
- package/dist/examples-iiif/issue-405-custom-icon.json +203 -0
- package/dist/examples-iiif/issue-425-many-slides.json +9 -5
- package/dist/examples-iiif/issue-428-background.json +20 -8
- package/dist/examples-iiif/issue-435-googlemaps.json +9 -5
- package/dist/examples-iiif/issue-437-documentcloud.json +22 -7
- package/dist/examples-iiif/issue-451-webp.json +9 -5
- package/dist/examples-iiif/issue-455-audio.json +9 -5
- package/dist/examples-iiif/issue-480-shorts.json +9 -5
- package/dist/examples-iiif/issue-506-marker-sync.json +9 -5
- package/dist/examples-iiif/issue-iiif-geo.json +200 -0
- package/dist/examples-iiif/issue-image-alt.json +90 -0
- package/dist/examples-iiif/issue-image-region.json +203 -0
- package/dist/examples-iiif/issue-image-srcset.json +87 -0
- package/dist/examples-iiif/jansteen.json +9 -6
- package/dist/examples-iiif/katrina.json +197 -41
- package/dist/examples-iiif/map-area-overlays.json +289 -0
- package/dist/examples-iiif/marktwain.json +255 -58
- package/dist/examples-iiif/no-map.json +148 -0
- package/dist/examples-iiif/population.json +440 -76
- package/dist/examples-iiif/president.json +456 -83
- package/dist/examples-iiif/scroll-hint.json +190 -0
- package/dist/examples-iiif/seurat.json +113 -22
- package/dist/examples-iiif/zoomify-clamp.json +153 -0
- package/dist/harness-multi.html +17 -0
- package/dist/harness.html +3 -2
- package/dist/index.html +33 -10
- package/dist/js/storymap.d.ts +1558 -114
- package/dist/js/storymap.js +10113 -6490
- package/dist/js/storymap.js.map +1 -1
- package/dist/navplace-properties.json +40 -0
- package/docs/migration-from-knightlab.md +359 -0
- package/docs/storymap-as-iiif-manifest.md +934 -0
- package/package.json +16 -10
- package/schema/storymap.schema.json +431 -78
- package/src/animation/easings.ts +25 -0
- package/src/animation/tween.ts +186 -0
- package/src/core/Browser.ts +20 -0
- package/src/core/Load.ts +232 -0
- package/src/core/Util.ts +416 -0
- package/src/core/mixins.ts +188 -0
- package/src/core/viewers.ts +94 -0
- package/src/dom/Dom.ts +31 -0
- package/src/dom/DomEvent.ts +80 -0
- package/src/globals.d.ts +24 -0
- package/src/language/Language.ts +281 -0
- package/src/language/locale/.expected-gaps.json +86 -0
- package/src/language/locale/be.json +31 -0
- package/src/language/locale/bg.json +31 -0
- package/src/language/locale/cs.json +31 -0
- package/src/language/locale/de.json +31 -0
- package/src/language/locale/el.json +31 -0
- package/src/language/locale/en.json +32 -0
- package/src/language/locale/es.json +31 -0
- package/src/language/locale/et.json +22 -0
- package/src/language/locale/fr.json +31 -0
- package/src/language/locale/he.json +31 -0
- package/src/language/locale/hu.json +31 -0
- package/src/language/locale/is.json +22 -0
- package/src/language/locale/it.json +31 -0
- package/src/language/locale/jp.json +31 -0
- package/src/language/locale/ko.json +31 -0
- package/src/language/locale/nl.json +31 -0
- package/src/language/locale/nn.json +22 -0
- package/src/language/locale/no.json +31 -0
- package/src/language/locale/pl.json +31 -0
- package/src/language/locale/pt.json +31 -0
- package/src/language/locale/ru.json +31 -0
- package/src/language/locale/sk.json +31 -0
- package/src/language/locale/sr.json +21 -0
- package/src/language/locale/sv.json +31 -0
- package/src/language/locale/tr.json +31 -0
- package/src/language/locale/uk.json +31 -0
- package/src/language/locale/ur.json +22 -0
- package/src/language/locale/zh-cn.json +31 -0
- package/src/language/locale/zh-tw.json +31 -0
- package/src/main.ts +143 -0
- package/src/map/Map.ts +794 -0
- package/src/map/MapMarker.ts +172 -0
- package/src/map/georeference.ts +325 -0
- package/src/map/openlayers/Map.OpenLayers.ts +2492 -0
- package/src/map/openlayers/MapMarker.OpenLayers.ts +400 -0
- package/src/map/openlayers/zoomifyTiles.ts +25 -0
- package/src/map/types.ts +17 -0
- package/src/media/EmbedUtil.ts +452 -0
- package/src/media/Media.ts +597 -0
- package/src/media/MediaType.ts +163 -0
- package/src/media/embedId.ts +104 -0
- package/src/media/types/Audio.ts +14 -0
- package/src/media/types/Blockquote.ts +39 -0
- package/src/media/types/DailyMotion.ts +53 -0
- package/src/media/types/DocumentCloud.ts +12 -0
- package/src/media/types/Facebook.ts +40 -0
- package/src/media/types/Flickr.ts +115 -0
- package/src/media/types/GoogleDoc.ts +58 -0
- package/src/media/types/HtmlMedia.ts +167 -0
- package/src/media/types/IFrame.ts +50 -0
- package/src/media/types/Image.ts +115 -0
- package/src/media/types/Juxtapose.ts +41 -0
- package/src/media/types/SoundCloud.ts +99 -0
- package/src/media/types/Text.ts +178 -0
- package/src/media/types/Twitter.ts +109 -0
- package/src/media/types/Video.ts +14 -0
- package/src/media/types/Vimeo.ts +65 -0
- package/src/media/types/Website.ts +46 -0
- package/src/media/types/Wikipedia.ts +134 -0
- package/src/media/types/YouTube.ts +224 -0
- package/src/scss/Typography.scss +235 -0
- package/src/scss/VCO.StoryMap.Dark.scss +150 -0
- package/src/scss/VCO.StoryMap.scss +195 -0
- package/src/scss/Variables.Dark.scss +57 -0
- package/src/scss/Variables.scss +48 -0
- package/src/scss/core/Mixins.scss +54 -0
- package/src/scss/core/Reset.scss +206 -0
- package/src/scss/fonts/_font.base.scss +113 -0
- package/src/scss/fonts/font.abril-droidsans.scss +75 -0
- package/src/scss/fonts/font.amatic-andika.scss +76 -0
- package/src/scss/fonts/font.bitter-raleway.scss +92 -0
- package/src/scss/fonts/font.cairo.scss +79 -0
- package/src/scss/fonts/font.clicker-garamond.scss +97 -0
- package/src/scss/fonts/font.dancing-ledger.scss +75 -0
- package/src/scss/fonts/font.default.scss +9 -0
- package/src/scss/fonts/font.fjalla-average.scss +80 -0
- package/src/scss/fonts/font.georgia-helvetica.scss +58 -0
- package/src/scss/fonts/font.knightlab.scss +111 -0
- package/src/scss/fonts/font.lustria-lato.scss +80 -0
- package/src/scss/fonts/font.medula-lato.scss +73 -0
- package/src/scss/fonts/font.oldstandard.scss +94 -0
- package/src/scss/fonts/font.opensans-gentiumbook.scss +85 -0
- package/src/scss/fonts/font.playfair-faunaone.scss +88 -0
- package/src/scss/fonts/font.playfair.scss +89 -0
- package/src/scss/fonts/font.pt.scss +96 -0
- package/src/scss/fonts/font.roboto-megrim.scss +73 -0
- package/src/scss/fonts/font.rufina-sintony.scss +73 -0
- package/src/scss/fonts/font.ubuntu.scss +82 -0
- package/src/scss/fonts/font.unicaone-vollkorn.scss +90 -0
- package/src/scss/icons/Icons.scss +239 -0
- package/src/scss/map/VCO.ImageMarker.scss +23 -0
- package/src/scss/map/VCO.Map.scss +21 -0
- package/src/scss/map/VCO.MapMarker.scss +242 -0
- package/src/scss/map/openlayers/VCO.Map.OpenLayers.scss +126 -0
- package/src/scss/media/VCO.Media.scss +219 -0
- package/src/scss/media/types/VCO.Media.Blockquote.scss +76 -0
- package/src/scss/media/types/VCO.Media.IFrame.scss +11 -0
- package/src/scss/media/types/VCO.Media.Image.scss +13 -0
- package/src/scss/media/types/VCO.Media.Text.scss +98 -0
- package/src/scss/media/types/VCO.Media.Twitter.scss +87 -0
- package/src/scss/media/types/VCO.Media.Wikipedia.scss +65 -0
- package/src/scss/site/site.scss +748 -0
- package/src/scss/slider/VCO.Slide.scss +457 -0
- package/src/scss/slider/VCO.SlideNav.scss +332 -0
- package/src/scss/slider/VCO.StorySlider.scss +66 -0
- package/src/scss/snapmap/VCO.SnapMap.scss +103 -0
- package/src/scss/ui/VCO.Consent.scss +121 -0
- package/src/scss/ui/VCO.MenuBar.Button.scss +107 -0
- package/src/scss/ui/VCO.MenuBar.scss +20 -0
- package/src/scss/ui/VCO.Message.scss +101 -0
- package/src/site/site.ts +88 -0
- package/src/slider/Slide.ts +554 -0
- package/src/slider/SlideNav.ts +246 -0
- package/src/slider/StorySlider.ts +833 -0
- package/src/storymap/Consent.ts +471 -0
- package/src/storymap/StoryMap.ts +2118 -0
- package/src/storymap/content-state.ts +185 -0
- package/src/storymap/iiif.ts +1844 -0
- package/src/storymap/to-iiif.ts +921 -0
- package/src/storymap/validate.ts +257 -0
- package/src/types.ts +494 -0
- package/src/ui/MenuBar.ts +376 -0
- package/src/ui/Message.ts +127 -0
- package/src/ui/Swipable.ts +455 -0
- package/dist/assets/demo-CVQ7kFek.js +0 -1
- package/dist/assets/harness-C-VZV-ou.js +0 -1
- package/dist/assets/index-DDsPBPZA.js +0 -1
- package/dist/assets/main-DwbXrrYn.js +0 -17
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
import { mergeData, ratio, clearTimer } from "../core/Util";
|
|
2
|
+
import { Evented, type EventedInstance } from "../core/mixins";
|
|
3
|
+
import Dom from "../dom/Dom";
|
|
4
|
+
import Message from "../ui/Message";
|
|
5
|
+
import { Browser } from "../core/Browser";
|
|
6
|
+
import { MediaState, StorymapSlideMedia } from "../types";
|
|
7
|
+
import { Language } from "../language/Language";
|
|
8
|
+
import { consentManagerOf, consentMessage, mediaService } from "../storymap/Consent";
|
|
9
|
+
import { validateWebURL, sanitizeSlideText } from "./EmbedUtil";
|
|
10
|
+
import { loadJS } from "../core/Load";
|
|
11
|
+
/* VCO.Media
|
|
12
|
+
Main media template for media assets.
|
|
13
|
+
Takes a data object and populates a dom object
|
|
14
|
+
================================================== */
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The icon glyph each media type shows in its error state.
|
|
18
|
+
*
|
|
19
|
+
* The icon font does not carry a glyph for every registered type, and the
|
|
20
|
+
* class used to be built straight from `media_type`, so dailymotion, audio,
|
|
21
|
+
* googledocs, iframe, documentcloud, juxtapose and website rendered an empty
|
|
22
|
+
* box next to the error text. The mapping is explicit rather than derived, so
|
|
23
|
+
* a type added later falls back to a real glyph instead of a blank one —
|
|
24
|
+
* `tests/embed-util-media.test.ts` checks the whole table against the font.
|
|
25
|
+
*/
|
|
26
|
+
const LOAD_ERROR_ICONS: Record<string, string> = {
|
|
27
|
+
youtube: "youtube",
|
|
28
|
+
vimeo: "vimeo",
|
|
29
|
+
dailymotion: "video",
|
|
30
|
+
soundcloud: "soundcloud",
|
|
31
|
+
twitter: "twitter",
|
|
32
|
+
flickr: "flickr",
|
|
33
|
+
image: "image",
|
|
34
|
+
video: "video",
|
|
35
|
+
audio: "music",
|
|
36
|
+
googledocs: "doc",
|
|
37
|
+
wikipedia: "wikipedia",
|
|
38
|
+
iframe: "web",
|
|
39
|
+
facebook: "facebook",
|
|
40
|
+
documentcloud: "doc",
|
|
41
|
+
juxtapose: "image",
|
|
42
|
+
blockquote: "blockquote",
|
|
43
|
+
website: "web",
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const GENERIC_LOAD_ERROR_ICON = "web";
|
|
47
|
+
|
|
48
|
+
export function loadErrorIcon(media_type: unknown): string {
|
|
49
|
+
const type = typeof media_type === "string" ? media_type : "";
|
|
50
|
+
return LOAD_ERROR_ICONS[type] ?? GENERIC_LOAD_ERROR_ICON;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Options for Media and its subclasses: the fields Media itself sets
|
|
54
|
+
or reads. Everything else merged in via mergeData is absorbed by the
|
|
55
|
+
index signature. */
|
|
56
|
+
export interface MediaOptions {
|
|
57
|
+
width?: number;
|
|
58
|
+
height?: number;
|
|
59
|
+
layout?: string;
|
|
60
|
+
media_name?: string;
|
|
61
|
+
media_type?: string;
|
|
62
|
+
credit_height?: number;
|
|
63
|
+
caption_height?: number;
|
|
64
|
+
api_key_flickr?: string;
|
|
65
|
+
[key: string]: unknown;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Data for media assets: the shared exchange format plus the link
|
|
69
|
+
fields the base layout renders. */
|
|
70
|
+
export interface MediaData extends StorymapSlideMedia {
|
|
71
|
+
uniqueid?: string | null;
|
|
72
|
+
link?: string | null;
|
|
73
|
+
link_target?: string | null;
|
|
74
|
+
[key: string]: unknown;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The media element cache.
|
|
79
|
+
*
|
|
80
|
+
* `content_item`, `content_link`, `caption` and `credit` are only created
|
|
81
|
+
* once `_loadMedia()` / `showMeta()` have run, so they start out null rather
|
|
82
|
+
* than as an empty element — that is what the "did the load happen?" check is
|
|
83
|
+
* for, and pretending otherwise with `{} as HTMLElement` is what let the
|
|
84
|
+
* consent-denied path dereference `undefined.style`.
|
|
85
|
+
*/
|
|
86
|
+
type MediaElements = {
|
|
87
|
+
container: HTMLElement;
|
|
88
|
+
content_container: HTMLElement;
|
|
89
|
+
content: HTMLElement;
|
|
90
|
+
content_item: HTMLElement | null;
|
|
91
|
+
content_link: HTMLElement | null;
|
|
92
|
+
source_item: HTMLSourceElement | null;
|
|
93
|
+
caption: HTMLElement | null;
|
|
94
|
+
credit: HTMLElement | null;
|
|
95
|
+
parent: HTMLElement;
|
|
96
|
+
link: HTMLElement | null;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export class MediaBase {
|
|
100
|
+
declare "_el": MediaElements;
|
|
101
|
+
declare "player": unknown;
|
|
102
|
+
declare "timer": ReturnType<typeof setTimeout> | null;
|
|
103
|
+
declare "load_timer": ReturnType<typeof setTimeout> | null;
|
|
104
|
+
declare "load_controller": AbortController | null;
|
|
105
|
+
declare "message": Message | null;
|
|
106
|
+
declare "media_id": unknown;
|
|
107
|
+
declare "_state": MediaState;
|
|
108
|
+
declare "_disposed": boolean;
|
|
109
|
+
declare "data": MediaData;
|
|
110
|
+
declare "options": MediaOptions;
|
|
111
|
+
declare "animator": unknown;
|
|
112
|
+
declare "_media": unknown;
|
|
113
|
+
declare "fire": EventedInstance["fire"];
|
|
114
|
+
|
|
115
|
+
/* Constructor
|
|
116
|
+
================================================== */
|
|
117
|
+
constructor(data: MediaData, options?: MediaOptions, add_to_container?: HTMLElement) {
|
|
118
|
+
// DOM ELEMENTS
|
|
119
|
+
this._el = {
|
|
120
|
+
container: {} as HTMLElement,
|
|
121
|
+
content_container: {} as HTMLElement,
|
|
122
|
+
content: {} as HTMLElement,
|
|
123
|
+
content_item: null,
|
|
124
|
+
content_link: null,
|
|
125
|
+
source_item: null,
|
|
126
|
+
caption: null,
|
|
127
|
+
credit: null,
|
|
128
|
+
parent: {} as HTMLElement,
|
|
129
|
+
link: null,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// Player (If Needed)
|
|
133
|
+
this.player = null;
|
|
134
|
+
|
|
135
|
+
// Timer (If Needed)
|
|
136
|
+
this.timer = null;
|
|
137
|
+
this.load_timer = null;
|
|
138
|
+
this.load_controller = null;
|
|
139
|
+
|
|
140
|
+
// Message
|
|
141
|
+
this.message = null;
|
|
142
|
+
|
|
143
|
+
// Media ID
|
|
144
|
+
this.media_id = null;
|
|
145
|
+
|
|
146
|
+
// State
|
|
147
|
+
this._state = {
|
|
148
|
+
loaded: false,
|
|
149
|
+
show_meta: false,
|
|
150
|
+
media_loaded: false,
|
|
151
|
+
};
|
|
152
|
+
this._disposed = false;
|
|
153
|
+
|
|
154
|
+
// Data
|
|
155
|
+
this.data = {
|
|
156
|
+
uniqueid: null,
|
|
157
|
+
url: null,
|
|
158
|
+
credit: null,
|
|
159
|
+
caption: null,
|
|
160
|
+
link: null,
|
|
161
|
+
link_target: null,
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
//Options
|
|
165
|
+
this.options = {
|
|
166
|
+
api_key_flickr: "", // no bundled key: pass api_key_flickr in the options
|
|
167
|
+
credit_height: 0,
|
|
168
|
+
caption_height: 0,
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
this.animator = {};
|
|
172
|
+
|
|
173
|
+
// Merge Data and Options
|
|
174
|
+
mergeData(this.options, options);
|
|
175
|
+
mergeData(this.data, data);
|
|
176
|
+
|
|
177
|
+
this._el.container = Dom.create("div", "vco-media");
|
|
178
|
+
|
|
179
|
+
if (this.data.uniqueid) {
|
|
180
|
+
this._el.container.id = this.data.uniqueid;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
this._initLayout();
|
|
184
|
+
|
|
185
|
+
if (add_to_container) {
|
|
186
|
+
add_to_container.appendChild(this._el.container);
|
|
187
|
+
this._el.parent = add_to_container;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
async loadMedia() {
|
|
192
|
+
if (!this._state.loaded) {
|
|
193
|
+
const manager = consentManagerOf(this.options);
|
|
194
|
+
if (this.options.consent_required && manager && this.options.media_type) {
|
|
195
|
+
// GDPR consent mode: ask before loading anything from this
|
|
196
|
+
// external service. media_type is the stable identity (the
|
|
197
|
+
// MediaType slug) and media_name is the display name — using
|
|
198
|
+
// the slug as the label made this panel ask "Load content from
|
|
199
|
+
// youtube?" where the start-of-story dialog said "YouTube".
|
|
200
|
+
const service = mediaService(
|
|
201
|
+
this.options.media_type,
|
|
202
|
+
(this.options.media_name as string | undefined) ?? "",
|
|
203
|
+
);
|
|
204
|
+
let host = "";
|
|
205
|
+
try {
|
|
206
|
+
host = new URL((this.data as { url?: string })?.url ?? "").host;
|
|
207
|
+
} catch {
|
|
208
|
+
// keep the empty host
|
|
209
|
+
}
|
|
210
|
+
// content_item is only created by the (deferred) media load —
|
|
211
|
+
// render the ask into the existing content container
|
|
212
|
+
const target = (this._el.content_container ?? this._el.container) as HTMLElement;
|
|
213
|
+
if (await manager.request(service, host, target)) {
|
|
214
|
+
this._beginLoad();
|
|
215
|
+
} else {
|
|
216
|
+
this._showBlocked();
|
|
217
|
+
}
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
this._beginLoad();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
_beginLoad() {
|
|
225
|
+
// a sync throw inside a media type's _loadMedia (e.g. an unparseable
|
|
226
|
+
// media URL) must not escape the timer callback as an uncaught error
|
|
227
|
+
this.load_timer = setTimeout(() => {
|
|
228
|
+
try {
|
|
229
|
+
this._loadMedia();
|
|
230
|
+
this._state.loaded = true;
|
|
231
|
+
this._updateDisplay();
|
|
232
|
+
} catch (e) {
|
|
233
|
+
console.log("Error loading media for ", this._media);
|
|
234
|
+
console.log(e);
|
|
235
|
+
this.loadErrorDisplay("Error loading media.");
|
|
236
|
+
}
|
|
237
|
+
}, 1200);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
_showBlocked() {
|
|
241
|
+
// denied: show a placeholder instead of the media
|
|
242
|
+
const target = (this._el.content_container ?? this._el.container) as HTMLElement;
|
|
243
|
+
const blocked = document.createElement("div");
|
|
244
|
+
blocked.className = "vco-consent-blocked";
|
|
245
|
+
// the display name, not the slug — see loadMedia()
|
|
246
|
+
const service_name =
|
|
247
|
+
(this.options.media_name as string | undefined) ||
|
|
248
|
+
(this.options.media_type as string | undefined) ||
|
|
249
|
+
"";
|
|
250
|
+
blocked.textContent = (
|
|
251
|
+
consentMessage("consent_blocked", "Content from {service} is blocked.") as string
|
|
252
|
+
).replace("{service}", service_name);
|
|
253
|
+
target.append(blocked);
|
|
254
|
+
this.onLoaded(true);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Look up a UI string for the active language, falling back to the
|
|
259
|
+
* English default (which `setLanguage` already merges in) and finally to
|
|
260
|
+
* the key itself, so a missing translation degrades to something visible
|
|
261
|
+
* rather than "undefined".
|
|
262
|
+
*/
|
|
263
|
+
_(key: string): string {
|
|
264
|
+
return Language.messages[key] ?? key;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** Show the loading overlay for this media item. */
|
|
268
|
+
loadingMessage(): void {
|
|
269
|
+
this.message?.updateMessage(this._("loading") + " " + this.options.media_name);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
updateMediaDisplay(layout?: string) {
|
|
273
|
+
// `content_item` only exists once a media type's `_loadMedia()` has
|
|
274
|
+
// run. It stays null when a consent decision blocked the load, so the
|
|
275
|
+
// sizing below has to be skipped rather than dereference a
|
|
276
|
+
// placeholder — that was the crash on the denied path.
|
|
277
|
+
const content_item = this._el.content_item;
|
|
278
|
+
if (!this._state.loaded || !content_item) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
this._updateMediaDisplay(layout);
|
|
283
|
+
|
|
284
|
+
if (!Browser.mobile && layout !== "portrait") {
|
|
285
|
+
content_item.style.maxHeight = Number(this.options.height ?? 0) / 2 + "px";
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (layout === "portrait") {
|
|
289
|
+
content_item.style.maxHeight = "none";
|
|
290
|
+
}
|
|
291
|
+
if (this._state.media_loaded) {
|
|
292
|
+
const width = content_item.offsetWidth + "px";
|
|
293
|
+
if (this._el.credit) {
|
|
294
|
+
this._el.credit.style.width = width;
|
|
295
|
+
}
|
|
296
|
+
if (this._el.caption) {
|
|
297
|
+
this._el.caption.style.width = width;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Media Specific
|
|
304
|
+
================================================== */
|
|
305
|
+
_loadMedia() {}
|
|
306
|
+
|
|
307
|
+
_updateMediaDisplay(l?: string) {
|
|
308
|
+
//this._el.content_item.style.maxHeight = (this.options.height - this.options.credit_height - this.options.caption_height - 16) + "px";
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** Size the media box to the `height` option, in pixels. */
|
|
312
|
+
_sizeContentItemToOptionHeight(): void {
|
|
313
|
+
if (this._el.content_item) {
|
|
314
|
+
this._el.content_item.style.height = Number(this.options.height ?? 0) + "px";
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Size the media box to a 16:9 box matching its current width — the
|
|
320
|
+
* aspect ratio every video provider embeds at.
|
|
321
|
+
*/
|
|
322
|
+
_sizeContentItemTo16x9(): void {
|
|
323
|
+
const item = this._el.content_item;
|
|
324
|
+
if (item) {
|
|
325
|
+
item.style.height = ratio.r16_9({ w: item.offsetWidth }) + "px";
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* Public
|
|
330
|
+
================================================== */
|
|
331
|
+
show() {}
|
|
332
|
+
|
|
333
|
+
hide() {}
|
|
334
|
+
|
|
335
|
+
addTo(container: HTMLElement) {
|
|
336
|
+
container.appendChild(this._el.container);
|
|
337
|
+
this.onAdd();
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
removeFrom(container: HTMLElement) {
|
|
341
|
+
container.removeChild(this._el.container);
|
|
342
|
+
this.onRemove();
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Terminal teardown: cancel pending work, stop playback, release the
|
|
347
|
+
* media-specific player and drop the DOM. Called by `Slide.dispose()`;
|
|
348
|
+
* the media must not be used afterwards.
|
|
349
|
+
*/
|
|
350
|
+
dispose() {
|
|
351
|
+
if (this._disposed) {
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
this._disposed = true;
|
|
355
|
+
|
|
356
|
+
// a load queued by loadMedia() that never started
|
|
357
|
+
if (this.load_timer) {
|
|
358
|
+
clearTimer(this.load_timer);
|
|
359
|
+
this.load_timer = null;
|
|
360
|
+
}
|
|
361
|
+
if (this.timer) {
|
|
362
|
+
clearTimer(this.timer);
|
|
363
|
+
this.timer = null;
|
|
364
|
+
}
|
|
365
|
+
// an external script still in flight (YouTube, Vimeo, Twitter, ...)
|
|
366
|
+
this.load_controller?.abort();
|
|
367
|
+
this.load_controller = null;
|
|
368
|
+
|
|
369
|
+
// let the concrete type tear down its player before the DOM goes away
|
|
370
|
+
this._disposeMedia();
|
|
371
|
+
|
|
372
|
+
this._el.container?.getAnimations?.().forEach((a) => a.cancel());
|
|
373
|
+
this.message?.dispose?.();
|
|
374
|
+
this.message = null;
|
|
375
|
+
this._el.container?.remove();
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Media-specific teardown. Overridden by types that own a player, an
|
|
380
|
+
* embedded document or a listening widget.
|
|
381
|
+
*/
|
|
382
|
+
_disposeMedia() {}
|
|
383
|
+
|
|
384
|
+
// Update Display
|
|
385
|
+
updateDisplay(w?: number, h?: number, l?: string) {
|
|
386
|
+
this._updateDisplay(w, h, l);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
stopMedia() {
|
|
390
|
+
// Cancel a load that hasn't started yet (navigated away within the
|
|
391
|
+
// load delay): avoids building iframes and injecting scripts for a
|
|
392
|
+
// slide the visitor already skipped past
|
|
393
|
+
if (!this._state.loaded && this.load_timer) {
|
|
394
|
+
clearTimer(this.load_timer);
|
|
395
|
+
this.load_timer = null;
|
|
396
|
+
this.load_timer = null;
|
|
397
|
+
}
|
|
398
|
+
// Abort an in-flight external script load, if any
|
|
399
|
+
if (this.load_controller) {
|
|
400
|
+
this.load_controller.abort();
|
|
401
|
+
this.load_controller = null;
|
|
402
|
+
}
|
|
403
|
+
this._stopMedia();
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Load an external script for this media, abortable via stopMedia().
|
|
408
|
+
* Rejects with AbortError when the load is cancelled.
|
|
409
|
+
*/
|
|
410
|
+
async loadScript(url: string): Promise<void> {
|
|
411
|
+
this.load_controller?.abort();
|
|
412
|
+
const controller = new AbortController();
|
|
413
|
+
this.load_controller = controller;
|
|
414
|
+
try {
|
|
415
|
+
await loadJS(url, { signal: controller.signal });
|
|
416
|
+
} finally {
|
|
417
|
+
if (this.load_controller === controller) {
|
|
418
|
+
this.load_controller = null;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
loadErrorDisplay(message: string) {
|
|
424
|
+
if (this._el.content_item && this._el.content_item.parentNode === this._el.content) {
|
|
425
|
+
this._el.content.removeChild(this._el.content_item);
|
|
426
|
+
}
|
|
427
|
+
this._el.content_item = Dom.create(
|
|
428
|
+
"div",
|
|
429
|
+
"vco-media-item vco-media-loaderror",
|
|
430
|
+
this._el.content,
|
|
431
|
+
);
|
|
432
|
+
// The icon font has no glyph for every media type (dailymotion, audio,
|
|
433
|
+
// googledocs, iframe, documentcloud, juxtapose and website had none),
|
|
434
|
+
// and the class was built by string concatenation, so those error
|
|
435
|
+
// states rendered an empty box. Map the missing ones to a glyph that
|
|
436
|
+
// exists, and fall back to a generic "web" icon for anything added
|
|
437
|
+
// later.
|
|
438
|
+
this._el.content_item.appendChild(
|
|
439
|
+
Dom.create("div", `vco-icon-${loadErrorIcon(this.options.media_type)}`),
|
|
440
|
+
);
|
|
441
|
+
const text = Dom.create("p", "");
|
|
442
|
+
text.appendChild(document.createTextNode(message));
|
|
443
|
+
this._el.content_item.appendChild(text);
|
|
444
|
+
|
|
445
|
+
// After Loaded
|
|
446
|
+
this.onLoaded(true);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/* Events
|
|
450
|
+
================================================== */
|
|
451
|
+
onLoaded(error?: boolean) {
|
|
452
|
+
this._state.loaded = true;
|
|
453
|
+
this.fire("loaded", this.data);
|
|
454
|
+
if (this.message) {
|
|
455
|
+
this.message.hide();
|
|
456
|
+
}
|
|
457
|
+
if (!error) {
|
|
458
|
+
this.showMeta();
|
|
459
|
+
}
|
|
460
|
+
this.updateDisplay();
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
onMediaLoaded(e?: unknown) {
|
|
464
|
+
this._state.media_loaded = true;
|
|
465
|
+
this.fire("media_loaded", this.data);
|
|
466
|
+
const width = (this._el.content_item?.offsetWidth ?? 0) + "px";
|
|
467
|
+
if (this._el.credit) {
|
|
468
|
+
this._el.credit.style.width = width;
|
|
469
|
+
}
|
|
470
|
+
if (this._el.caption) {
|
|
471
|
+
this._el.caption.style.width = width;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/** Render the media credit and caption, if the slide has them. */
|
|
476
|
+
showMeta(): void {
|
|
477
|
+
this._state.show_meta = true;
|
|
478
|
+
// Credit and caption are author-supplied strings that may legitimately
|
|
479
|
+
// contain formatting (they are documented as HTML), so they go through
|
|
480
|
+
// the same sanitizer as the slide text rather than straight to
|
|
481
|
+
// innerHTML — the JSON is untrusted input, and these were the two
|
|
482
|
+
// easiest stored-XSS sinks in the viewer.
|
|
483
|
+
const credit = this._credit();
|
|
484
|
+
if (credit && credit !== "" && !this._el.credit) {
|
|
485
|
+
this._el.credit = Dom.create("div", "vco-credit", this._el.content_container);
|
|
486
|
+
this._el.credit.appendChild(sanitizeSlideText(credit));
|
|
487
|
+
this.options.credit_height = this._el.credit.offsetHeight;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// Caption
|
|
491
|
+
const caption = this._caption();
|
|
492
|
+
if (caption && caption !== "" && !this._el.caption) {
|
|
493
|
+
this._el.caption = Dom.create("div", "vco-caption", this._el.content_container);
|
|
494
|
+
this._el.caption.appendChild(sanitizeSlideText(caption));
|
|
495
|
+
this.options.caption_height = this._el.caption.offsetHeight;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
onAdd() {
|
|
500
|
+
this.fire("added", this.data);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
onRemove() {
|
|
504
|
+
this.fire("removed", this.data);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/* Private Methods
|
|
508
|
+
================================================== */
|
|
509
|
+
/** The media URL, normalised to a string. */
|
|
510
|
+
_url(): string {
|
|
511
|
+
return typeof this.data.url === "string" ? this.data.url : "";
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/** The media caption, or null when the slide has none. */
|
|
515
|
+
_caption(): string | null {
|
|
516
|
+
return typeof this.data.caption === "string" ? this.data.caption : null;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/** The media credit, or null when the slide has none. */
|
|
520
|
+
_credit(): string | null {
|
|
521
|
+
return typeof this.data.credit === "string" ? this.data.credit : null;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
_initLayout() {
|
|
525
|
+
// Message
|
|
526
|
+
this.message = new Message({}, this.options);
|
|
527
|
+
this.message.addTo(this._el.container);
|
|
528
|
+
|
|
529
|
+
// Create Layout
|
|
530
|
+
this._el.content_container = Dom.create(
|
|
531
|
+
"div",
|
|
532
|
+
"vco-media-content-container",
|
|
533
|
+
this._el.container,
|
|
534
|
+
);
|
|
535
|
+
|
|
536
|
+
// Link
|
|
537
|
+
// The link target comes from the storymap JSON, so it has to pass the
|
|
538
|
+
// same protocol check as every other author-supplied URL — otherwise a
|
|
539
|
+
// `javascript:` href is a click-through XSS. A rejected link falls
|
|
540
|
+
// through to the unlinked layout below rather than rendering a
|
|
541
|
+
// dead anchor.
|
|
542
|
+
// (`_el.content` starts as a truthy `{}` placeholder, so the branch is
|
|
543
|
+
// tracked with a local flag rather than a truthiness test.)
|
|
544
|
+
const raw_link = this.data.link;
|
|
545
|
+
const href = typeof raw_link === "string" ? validateWebURL(raw_link) : null;
|
|
546
|
+
if (href) {
|
|
547
|
+
this._el.link = Dom.create("a", "vco-media-link", this._el.content_container);
|
|
548
|
+
const link = this._el.link as HTMLAnchorElement;
|
|
549
|
+
link.href = href;
|
|
550
|
+
if (this.data.link_target && this.data.link_target !== "") {
|
|
551
|
+
link.target = this.data.link_target;
|
|
552
|
+
} else {
|
|
553
|
+
link.target = "_blank";
|
|
554
|
+
}
|
|
555
|
+
if (link.target === "_blank") {
|
|
556
|
+
// rel=noopener so the opened page cannot reach back through
|
|
557
|
+
// window.opener
|
|
558
|
+
link.rel = "noopener noreferrer";
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
this._el.content = Dom.create("div", "vco-media-content", this._el.link);
|
|
562
|
+
} else {
|
|
563
|
+
this._el.content = Dom.create("div", "vco-media-content", this._el.content_container);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
// Update Display
|
|
568
|
+
_updateDisplay(w?: number, h?: number, l?: string) {
|
|
569
|
+
if (w) {
|
|
570
|
+
this.options.width = w;
|
|
571
|
+
}
|
|
572
|
+
if (h) {
|
|
573
|
+
this.options.height = h;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
if (l) {
|
|
577
|
+
this.options.layout = l;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
if (this._el.credit) {
|
|
581
|
+
this.options.credit_height = this._el.credit.offsetHeight;
|
|
582
|
+
}
|
|
583
|
+
if (this._el.caption) {
|
|
584
|
+
this.options.caption_height = this._el.caption.offsetHeight + 5;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
this.updateMediaDisplay(this.options.layout);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
_stopMedia() {}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
export class Media extends Evented(MediaBase) {
|
|
594
|
+
constructor(...args: ConstructorParameters<typeof MediaBase>) {
|
|
595
|
+
super(...args);
|
|
596
|
+
}
|
|
597
|
+
}
|