@projektemacher/storymapjs 0.10.7 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG +431 -19
- package/README.md +168 -17
- package/dist/assets/demo-bWnOyfUw.js +1 -0
- package/dist/assets/harness-C3JUv5Ii.js +1 -0
- package/dist/assets/harness-multi-XZNex3tb.js +1 -0
- package/dist/assets/harness-support-CjfZIVeb.js +1 -0
- package/dist/assets/index-wHPqGrBS.js +1 -0
- package/dist/assets/main-DQ32hWBM.js +17 -0
- package/dist/context.json +23 -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 +84 -0
- 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 +3 -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 +2112 -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/isSlideshowCollection.html +51 -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/slideshowToStorymapData.html +51 -0
- package/dist/docs/api/functions/slideshowVersion.html +48 -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 +300 -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/MapEvents.html +116 -0
- package/dist/docs/api/interfaces/MapMarkerEvents.html +66 -0
- package/dist/docs/api/interfaces/MarkerEventPayload.html +57 -0
- package/dist/docs/api/interfaces/MediaEvents.html +78 -0
- package/dist/docs/api/interfaces/MenuBarEvents.html +114 -0
- package/dist/docs/api/interfaces/MessageEvents.html +72 -0
- package/dist/docs/api/interfaces/OlLayer.html +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/SlideBackgroundState.html +66 -0
- package/dist/docs/api/interfaces/SlideEvents.html +78 -0
- package/dist/docs/api/interfaces/SlideNavEvents.html +72 -0
- package/dist/docs/api/interfaces/SlideshowPlayerSettings.html +182 -0
- package/dist/docs/api/interfaces/SlideshowToStorymapResult.html +60 -0
- package/dist/docs/api/interfaces/SlideshowTranslatorOptions.html +65 -0
- package/dist/docs/api/interfaces/SlideshowWarning.html +72 -0
- package/dist/docs/api/interfaces/StoryMapEvents.html +146 -0
- package/dist/docs/api/interfaces/StoryMapMarker.html +763 -0
- package/dist/docs/api/interfaces/StorySliderEvents.html +102 -0
- package/dist/docs/api/interfaces/StorymapBasemap.html +69 -0
- package/dist/docs/api/interfaces/StorymapData.html +77 -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 +137 -0
- package/dist/docs/api/interfaces/StorymapManifestBackground.html +81 -0
- package/dist/docs/api/interfaces/StorymapManifestCanvas.html +188 -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 +734 -0
- package/dist/docs/api/interfaces/StorymapOverlayLayer.html +157 -0
- package/dist/docs/api/interfaces/StorymapSlide.html +186 -0
- package/dist/docs/api/interfaces/StorymapSlideBackground.html +72 -0
- package/dist/docs/api/interfaces/StorymapSlideLocation.html +161 -0
- package/dist/docs/api/interfaces/StorymapSlideMarker.html +103 -0
- package/dist/docs/api/interfaces/StorymapSlideMedia.html +149 -0
- package/dist/docs/api/interfaces/StorymapSlideNarration.html +117 -0
- package/dist/docs/api/interfaces/StorymapSlideText.html +72 -0
- package/dist/docs/api/interfaces/StorymapTilejson.html +105 -0
- package/dist/docs/api/interfaces/SwipableEvents.html +102 -0
- package/dist/docs/api/interfaces/TextEvents.html +66 -0
- package/dist/docs/api/media/es.json +31 -0
- package/dist/docs/api/media/events.md +66 -0
- package/dist/docs/api/media/migration-from-knightlab.md +399 -0
- package/dist/docs/api/media/slideshow.md +109 -0
- package/dist/docs/api/media/storymap-as-iiif-manifest.md +1007 -0
- package/dist/docs/api/modules.html +50 -0
- package/dist/docs/api/types/ContentState.html +70 -0
- package/dist/docs/api/types/FiredEvent.html +43 -0
- package/dist/docs/api/types/ImagereadyKind.html +34 -0
- package/dist/docs/api/types/MediaTypeMatch.html +78 -0
- package/dist/docs/api/types/SwipeDirection.html +36 -0
- package/dist/docs/api/types/TileSourceFactory.html +53 -0
- package/dist/docs/authoring.html +306 -0
- package/dist/docs/events.html +263 -0
- package/dist/docs/iiif.html +738 -69
- package/dist/docs/migration.html +360 -11
- package/dist/docs/readme.html +149 -17
- package/dist/embed/index.html +8 -1
- package/dist/examples/font-css-false.json +33 -0
- 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/layers-control.json +60 -0
- package/dist/examples/map-area-overlays.json +68 -0
- package/dist/examples/map-template-provider.json +36 -0
- package/dist/examples/multi-media.json +71 -0
- package/dist/examples/no-map.json +44 -0
- package/dist/examples-iiif/annotated-image.json +204 -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/font-css-false.json +114 -0
- 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/layers-control.json +226 -0
- package/dist/examples-iiif/map-area-overlays.json +289 -0
- package/dist/examples-iiif/map-template-provider.json +133 -0
- package/dist/examples-iiif/marktwain.json +255 -58
- package/dist/examples-iiif/multi-media.json +237 -0
- 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/examples-slideshow/single.json +79 -0
- package/dist/examples-slideshow/static/pixel.png +0 -0
- package/dist/examples-slideshow/static.json +44 -0
- package/dist/harness-multi.html +17 -0
- package/dist/harness.html +4 -2
- package/dist/index.html +19 -12
- package/dist/js/storymap.d.ts +2669 -307
- package/dist/js/storymap.js +10820 -6196
- package/dist/js/storymap.js.map +1 -1
- package/dist/navplace-properties.json +54 -0
- package/dist/site.css +54 -36
- package/docs/migration-from-knightlab.md +279 -19
- package/docs/storymap-as-iiif-manifest.md +633 -136
- package/package.json +12 -7
- package/schema/storymap.schema.json +733 -80
- package/src/animation/easings.ts +8 -1
- package/src/animation/tween.ts +186 -0
- package/src/core/Browser.ts +6 -5
- package/src/core/Load.ts +54 -2
- package/src/core/Util.ts +257 -193
- package/src/core/mixins.ts +66 -35
- package/src/core/viewers.ts +94 -0
- package/src/dom/DomEvent.ts +27 -8
- package/src/globals.d.ts +8 -0
- package/src/language/Language.ts +206 -25
- package/src/language/locale/.expected-gaps.json +346 -0
- package/src/language/locale/be.json +15 -2
- package/src/language/locale/bg.json +15 -2
- package/src/language/locale/cs.json +15 -2
- package/src/language/locale/de.json +23 -2
- package/src/language/locale/el.json +15 -2
- package/src/language/locale/en.json +17 -3
- package/src/language/locale/es.json +15 -2
- package/src/language/locale/et.json +5 -1
- package/src/language/locale/fr.json +15 -2
- package/src/language/locale/he.json +16 -3
- package/src/language/locale/hu.json +15 -2
- package/src/language/locale/is.json +5 -1
- package/src/language/locale/it.json +15 -2
- package/src/language/locale/jp.json +15 -2
- package/src/language/locale/ko.json +15 -2
- package/src/language/locale/nl.json +15 -2
- package/src/language/locale/nn.json +5 -1
- package/src/language/locale/no.json +15 -2
- package/src/language/locale/pl.json +15 -2
- package/src/language/locale/pt.json +15 -2
- package/src/language/locale/ru.json +15 -2
- package/src/language/locale/sk.json +15 -2
- package/src/language/locale/sr.json +5 -1
- package/src/language/locale/sv.json +15 -2
- package/src/language/locale/tr.json +15 -2
- package/src/language/locale/uk.json +15 -2
- package/src/language/locale/ur.json +5 -1
- package/src/language/locale/zh-cn.json +15 -2
- package/src/language/locale/zh-tw.json +15 -2
- package/src/main.ts +143 -0
- package/src/map/Map.ts +227 -112
- package/src/map/MapMarker.ts +44 -8
- package/src/map/georeference.ts +325 -0
- package/src/map/openlayers/Map.OpenLayers.ts +1601 -263
- package/src/map/openlayers/MapMarker.OpenLayers.ts +348 -24
- package/src/map/openlayers/zoomifyTiles.ts +1 -4
- package/src/map/slideView.ts +149 -0
- package/src/map/types.ts +2 -0
- package/src/media/EmbedUtil.ts +333 -24
- package/src/media/Media.ts +270 -59
- package/src/media/embedId.ts +110 -0
- package/src/media/types/Audio.ts +9 -82
- package/src/media/types/Blockquote.ts +2 -3
- package/src/media/types/DailyMotion.ts +5 -10
- package/src/media/types/DocumentCloud.ts +6 -35
- package/src/media/types/Facebook.ts +3 -4
- package/src/media/types/Flickr.ts +23 -12
- package/src/media/types/GoogleDoc.ts +3 -4
- package/src/media/types/HtmlMedia.ts +233 -0
- package/src/media/types/IFrame.ts +3 -4
- package/src/media/types/Image.ts +87 -9
- package/src/media/types/Juxtapose.ts +14 -5
- package/src/media/types/SoundCloud.ts +28 -6
- package/src/media/types/Text.ts +46 -21
- package/src/media/types/Twitter.ts +35 -20
- package/src/media/types/Video.ts +9 -79
- package/src/media/types/Vimeo.ts +11 -11
- package/src/media/types/Website.ts +23 -13
- package/src/media/types/Wikipedia.ts +18 -8
- package/src/media/types/YouTube.ts +72 -40
- package/src/scss/Typography.scss +16 -18
- package/src/scss/VCO.StoryMap.scss +208 -12
- package/src/scss/Variables.scss +3 -2
- package/src/scss/core/Mixins.scss +5 -63
- package/src/scss/core/Reset.scss +5 -18
- package/src/scss/fonts/font.amatic-andika.scss +3 -0
- package/src/scss/fonts/font.bitter-raleway.scss +6 -0
- package/src/scss/fonts/font.cairo.scss +79 -0
- package/src/scss/fonts/font.clicker-garamond.scss +5 -0
- package/src/scss/fonts/font.dancing-ledger.scss +1 -0
- package/src/scss/fonts/font.knightlab.scss +14 -0
- package/src/scss/fonts/font.oldstandard.scss +6 -0
- package/src/scss/fonts/font.opensans-gentiumbook.scss +5 -0
- package/src/scss/fonts/font.playfair-faunaone.scss +2 -0
- package/src/scss/fonts/font.playfair.scss +4 -0
- package/src/scss/fonts/font.pt.scss +6 -0
- package/src/scss/fonts/font.ubuntu.scss +4 -0
- package/src/scss/fonts/font.unicaone-vollkorn.scss +5 -0
- package/src/scss/map/VCO.Map.scss +1 -1
- package/src/scss/map/VCO.MapMarker.scss +114 -8
- package/src/scss/map/openlayers/VCO.Map.OpenLayers.scss +7 -4
- package/src/scss/media/VCO.Media.scss +14 -17
- package/src/scss/media/types/VCO.Media.Blockquote.scss +1 -1
- package/src/scss/media/types/VCO.Media.Text.scss +13 -5
- package/src/scss/media/types/VCO.Media.Twitter.scss +4 -4
- package/src/scss/media/types/VCO.Media.Wikipedia.scss +3 -19
- package/src/scss/site/site.scss +55 -36
- package/src/scss/slider/VCO.Slide.scss +61 -13
- package/src/scss/slider/VCO.SlideNav.scss +34 -24
- package/src/scss/slider/VCO.StorySlider.scss +53 -1
- package/src/scss/snapmap/VCO.SnapMap.scss +3 -3
- package/src/scss/ui/VCO.Consent.scss +63 -13
- package/src/scss/ui/VCO.Layers.scss +119 -0
- package/src/scss/ui/VCO.MenuBar.Button.scss +143 -14
- package/src/scss/ui/VCO.MenuBar.scss +9 -2
- package/src/scss/ui/VCO.Message.scss +16 -5
- package/src/site/site.ts +2 -1
- package/src/slider/Slide.ts +326 -74
- package/src/slider/SlideNav.ts +54 -9
- package/src/slider/StorySlider.ts +352 -60
- package/src/storymap/Consent.ts +429 -82
- package/src/storymap/StoryMap.ts +2163 -340
- package/src/storymap/content-state.ts +180 -0
- package/src/storymap/font-css.ts +72 -0
- package/src/storymap/from-slideshow.ts +785 -0
- package/src/storymap/iiif-shared.ts +228 -0
- package/src/storymap/iiif.ts +1742 -95
- package/src/storymap/to-iiif.ts +1008 -0
- package/src/storymap/validate.ts +80 -7
- package/src/types.ts +591 -29
- package/src/ui/LayersControl.ts +302 -0
- package/src/ui/MenuBar.ts +325 -61
- package/src/ui/Message.ts +44 -2
- package/src/ui/Swipable.ts +170 -85
- package/dist/assets/demo-D6cTmzn6.js +0 -1
- package/dist/assets/harness-BPFlzutp.js +0 -1
- package/dist/assets/index-DDsPBPZA.js +0 -1
- package/dist/assets/main-Y-MYUSJ4.js +0 -17
- package/src/animation/morpheus.d.ts +0 -41
- package/src/scss/VCO.StoryMap.Dark.scss +0 -138
- package/src/scss/Variables.Dark.scss +0 -56
- package/src/scss/media/types/VCO.Media.Instagram.scss +0 -7
- package/src/scss/media/types/VCO.Media.Profile.scss +0 -5
- package/src/ui/Draggable.ts +0 -374
package/src/core/Util.ts
CHANGED
|
@@ -1,104 +1,79 @@
|
|
|
1
1
|
// const debug = true;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (Object.hasOwn(src, i)) {
|
|
13
|
-
(dest as Record<string, unknown>)[i] = src[i];
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return dest;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function convertUnixTime(str: string): string {
|
|
21
|
-
// created for Instagram. It's ISO8601-ish
|
|
22
|
-
// 2013-12-09 01:56:28
|
|
23
|
-
const pattern = /^(\d{4})-(\d{2})-(\d{2})[T\s](\d{2}):(\d{2}):(\d{2})/;
|
|
24
|
-
const date_parts = str.match(pattern)?.slice(1);
|
|
25
|
-
if (!date_parts) {
|
|
3
|
+
/**
|
|
4
|
+
* Format an ISO-8601-ish timestamp (as found in `date.created_time`, originally
|
|
5
|
+
* from Instagram) as a short, locale-aware date, e.g. "Mar 3, 2013".
|
|
6
|
+
*
|
|
7
|
+
* Falls back to the raw input when it does not parse, so an unusual value
|
|
8
|
+
* shows as-is rather than "Invalid Date".
|
|
9
|
+
*/
|
|
10
|
+
export function convertUnixTime(str: string, locale?: string): string {
|
|
11
|
+
if (!str) {
|
|
26
12
|
return str;
|
|
27
13
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} // stupid javascript months
|
|
34
|
-
date_array.push(val);
|
|
14
|
+
// "2013-12-09 01:56:28" is not valid ISO-8601 (space instead of "T"), so
|
|
15
|
+
// normalise it before parsing.
|
|
16
|
+
const parsed = new Date(/^\d{4}-\d{2}-\d{2} /.test(str) ? str.replace(" ", "T") : str);
|
|
17
|
+
if (Number.isNaN(parsed.getTime())) {
|
|
18
|
+
return str;
|
|
35
19
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
date_array[4],
|
|
42
|
-
date_array[5],
|
|
43
|
-
);
|
|
44
|
-
const months = [
|
|
45
|
-
"Jan",
|
|
46
|
-
"Feb",
|
|
47
|
-
"Mar",
|
|
48
|
-
"Apr",
|
|
49
|
-
"May",
|
|
50
|
-
"Jun",
|
|
51
|
-
"Jul",
|
|
52
|
-
"Aug",
|
|
53
|
-
"Sep",
|
|
54
|
-
"Oct",
|
|
55
|
-
"Nov",
|
|
56
|
-
"Dec",
|
|
57
|
-
];
|
|
58
|
-
const year = date.getFullYear();
|
|
59
|
-
const month = months[date.getMonth()];
|
|
60
|
-
const day = date.getDate();
|
|
61
|
-
const time = month + ", " + day + " " + year;
|
|
62
|
-
return time;
|
|
20
|
+
return parsed.toLocaleDateString(locale ?? "en-US", {
|
|
21
|
+
year: "numeric",
|
|
22
|
+
month: "short",
|
|
23
|
+
day: "numeric",
|
|
24
|
+
});
|
|
63
25
|
}
|
|
64
26
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Copy the own enumerable properties of `source` onto `target`, limited to
|
|
29
|
+
* `keys` (or all of the source's keys when omitted). Shared body for the two
|
|
30
|
+
* public merge helpers below.
|
|
31
|
+
*/
|
|
32
|
+
function copyOwn(
|
|
33
|
+
target: Record<string, unknown>,
|
|
34
|
+
source: Record<string, unknown> | null | undefined,
|
|
35
|
+
keys?: Iterable<string>,
|
|
36
|
+
): void {
|
|
37
|
+
// `for...in` over a null/undefined source was a silent no-op, and several
|
|
38
|
+
// call sites pass optional values straight through — keep that behaviour.
|
|
39
|
+
if (source == null) {
|
|
40
|
+
return;
|
|
74
41
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const source = data_to_merge as Record<string, unknown>;
|
|
80
|
-
let x;
|
|
81
|
-
for (x in source) {
|
|
82
|
-
if (Object.prototype.hasOwnProperty.call(source, x)) {
|
|
83
|
-
target[x] = source[x];
|
|
42
|
+
const names = keys ?? Object.keys(source);
|
|
43
|
+
for (const name of names) {
|
|
44
|
+
if (Object.prototype.hasOwnProperty.call(source, name)) {
|
|
45
|
+
target[name] = source[name];
|
|
84
46
|
}
|
|
85
47
|
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Shallow-assign every own property of `data_to_merge` onto `data_main`.
|
|
52
|
+
*
|
|
53
|
+
* Despite the name this is *not* a deep merge, and it must not become one:
|
|
54
|
+
* every call site merges a partial options object over a defaults object, and
|
|
55
|
+
* a recursive merge would silently change how nested `map_options` and
|
|
56
|
+
* `overlays` values are combined.
|
|
57
|
+
*/
|
|
58
|
+
export function mergeData<T extends object>(data_main: T, data_to_merge?: object | null): T {
|
|
59
|
+
copyOwn(
|
|
60
|
+
data_main as Record<string, unknown>,
|
|
61
|
+
data_to_merge as Record<string, unknown> | null | undefined,
|
|
62
|
+
);
|
|
86
63
|
return data_main;
|
|
87
64
|
}
|
|
88
65
|
|
|
89
66
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
67
|
+
* Like `mergeData`, but only copies keys that already exist in `data_main`.
|
|
68
|
+
* This is what lets storymap *data* override a known option without being able
|
|
69
|
+
* to introduce new ones.
|
|
92
70
|
*/
|
|
93
|
-
export function updateData<T extends object>(data_main: T, data_to_merge
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
target[x] = source[x];
|
|
100
|
-
}
|
|
101
|
-
}
|
|
71
|
+
export function updateData<T extends object>(data_main: T, data_to_merge?: object | null): T {
|
|
72
|
+
copyOwn(
|
|
73
|
+
data_main as Record<string, unknown>,
|
|
74
|
+
data_to_merge as Record<string, unknown> | null | undefined,
|
|
75
|
+
Object.keys(data_main),
|
|
76
|
+
);
|
|
102
77
|
return data_main;
|
|
103
78
|
}
|
|
104
79
|
|
|
@@ -112,18 +87,36 @@ export function stamp(obj: object): number {
|
|
|
112
87
|
return target[_stampKey] as number;
|
|
113
88
|
}
|
|
114
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Index of the entry whose `data[prop]` equals `id`, or -1 when there is no
|
|
92
|
+
* match. Returning -1 matters: a "not found" result of 0 is indistinguishable
|
|
93
|
+
* from "the first slide", so a bad id silently jumped the story to the start
|
|
94
|
+
* (contrast StoryMap.goTo, which range-checks).
|
|
95
|
+
*/
|
|
115
96
|
export function findArrayNumberByUniqueID(
|
|
116
97
|
id: unknown,
|
|
117
98
|
array: { data: Record<string, unknown> }[],
|
|
118
99
|
prop: string,
|
|
119
100
|
): number {
|
|
120
|
-
let _n = 0;
|
|
121
101
|
for (let i = 0; i < array.length; i++) {
|
|
122
102
|
if (array[i].data[prop] === id) {
|
|
123
|
-
|
|
103
|
+
return i;
|
|
124
104
|
}
|
|
125
105
|
}
|
|
126
|
-
return
|
|
106
|
+
return -1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Clear a timer that may be null/undefined and reset the variable.
|
|
111
|
+
*
|
|
112
|
+
* `clearTimeout(null)` is a harmless no-op at runtime but not assignable to
|
|
113
|
+
* the overloads, and forgetting to null the handle afterwards is what lets a
|
|
114
|
+
* cancelled timer be cleared twice (or, worse, not cleared at all).
|
|
115
|
+
*/
|
|
116
|
+
export function clearTimer(timer: ReturnType<typeof setTimeout> | null | undefined): void {
|
|
117
|
+
if (timer !== null && timer !== undefined) {
|
|
118
|
+
clearTimeout(timer);
|
|
119
|
+
}
|
|
127
120
|
}
|
|
128
121
|
|
|
129
122
|
export function unique_ID(size: number, prefix?: string): string {
|
|
@@ -167,55 +160,153 @@ export function hexToRgb(hex: string): { r: number; g: number; b: number } | nul
|
|
|
167
160
|
|
|
168
161
|
// CSS named colors (Colors Level 4) for parseCssColor below.
|
|
169
162
|
const NAMED_COLORS: Record<string, [number, number, number]> = {
|
|
170
|
-
aliceblue: [240, 248, 255],
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
163
|
+
aliceblue: [240, 248, 255],
|
|
164
|
+
antiquewhite: [250, 235, 215],
|
|
165
|
+
aqua: [0, 255, 255],
|
|
166
|
+
aquamarine: [127, 255, 212],
|
|
167
|
+
azure: [240, 255, 255],
|
|
168
|
+
beige: [245, 245, 220],
|
|
169
|
+
bisque: [255, 228, 196],
|
|
170
|
+
black: [0, 0, 0],
|
|
171
|
+
blanchedalmond: [255, 235, 205],
|
|
172
|
+
blue: [0, 0, 255],
|
|
173
|
+
blueviolet: [138, 43, 226],
|
|
174
|
+
brown: [165, 42, 42],
|
|
175
|
+
burlywood: [222, 184, 135],
|
|
176
|
+
cadetblue: [95, 158, 160],
|
|
177
|
+
chartreuse: [127, 255, 0],
|
|
178
|
+
chocolate: [210, 105, 30],
|
|
179
|
+
coral: [255, 127, 80],
|
|
180
|
+
cornflowerblue: [100, 149, 237],
|
|
181
|
+
cornsilk: [255, 248, 220],
|
|
182
|
+
crimson: [220, 20, 60],
|
|
183
|
+
cyan: [0, 255, 255],
|
|
184
|
+
darkblue: [0, 0, 139],
|
|
185
|
+
darkcyan: [0, 139, 139],
|
|
186
|
+
darkgoldenrod: [184, 134, 11],
|
|
187
|
+
darkgray: [169, 169, 169],
|
|
188
|
+
darkgreen: [0, 100, 0],
|
|
189
|
+
darkgrey: [169, 169, 169],
|
|
190
|
+
darkkhaki: [189, 183, 107],
|
|
191
|
+
darkmagenta: [139, 0, 139],
|
|
192
|
+
darkolivegreen: [85, 107, 47],
|
|
193
|
+
darkorange: [255, 140, 0],
|
|
194
|
+
darkorchid: [153, 50, 204],
|
|
195
|
+
darkred: [139, 0, 0],
|
|
196
|
+
darksalmon: [233, 150, 122],
|
|
197
|
+
darkseagreen: [143, 188, 143],
|
|
198
|
+
darkslateblue: [72, 61, 139],
|
|
199
|
+
darkslategray: [47, 79, 79],
|
|
200
|
+
darkslategrey: [47, 79, 79],
|
|
201
|
+
darkturquoise: [0, 206, 209],
|
|
202
|
+
darkviolet: [148, 0, 211],
|
|
203
|
+
deeppink: [255, 20, 147],
|
|
204
|
+
deepskyblue: [0, 191, 255],
|
|
205
|
+
dimgray: [105, 105, 105],
|
|
206
|
+
dimgrey: [105, 105, 105],
|
|
207
|
+
dodgerblue: [30, 144, 255],
|
|
208
|
+
firebrick: [178, 34, 34],
|
|
209
|
+
floralwhite: [255, 250, 240],
|
|
210
|
+
forestgreen: [34, 139, 34],
|
|
211
|
+
fuchsia: [255, 0, 255],
|
|
212
|
+
gainsboro: [220, 220, 220],
|
|
213
|
+
ghostwhite: [248, 248, 255],
|
|
214
|
+
gold: [255, 215, 0],
|
|
215
|
+
goldenrod: [218, 165, 32],
|
|
216
|
+
gray: [128, 128, 128],
|
|
217
|
+
green: [0, 128, 0],
|
|
218
|
+
greenyellow: [173, 255, 47],
|
|
219
|
+
grey: [128, 128, 128],
|
|
220
|
+
honeydew: [240, 255, 240],
|
|
221
|
+
hotpink: [255, 105, 180],
|
|
222
|
+
indianred: [205, 92, 92],
|
|
223
|
+
indigo: [75, 0, 130],
|
|
224
|
+
ivory: [255, 255, 240],
|
|
225
|
+
khaki: [240, 230, 140],
|
|
226
|
+
lavender: [230, 230, 250],
|
|
227
|
+
lavenderblush: [255, 240, 245],
|
|
228
|
+
lawngreen: [124, 252, 0],
|
|
229
|
+
lemonchiffon: [255, 250, 205],
|
|
230
|
+
lightblue: [173, 216, 230],
|
|
231
|
+
lightcoral: [240, 128, 128],
|
|
232
|
+
lightcyan: [224, 255, 255],
|
|
233
|
+
lightgoldenrodyellow: [250, 250, 210],
|
|
234
|
+
lightgray: [211, 211, 211],
|
|
235
|
+
lightgreen: [144, 238, 144],
|
|
236
|
+
lightgrey: [211, 211, 211],
|
|
237
|
+
lightpink: [255, 182, 193],
|
|
238
|
+
lightsalmon: [255, 160, 122],
|
|
239
|
+
lightseagreen: [32, 178, 170],
|
|
240
|
+
lightskyblue: [135, 206, 250],
|
|
241
|
+
lightslategray: [119, 136, 153],
|
|
242
|
+
lightslategrey: [119, 136, 153],
|
|
243
|
+
lightsteelblue: [176, 196, 222],
|
|
244
|
+
lightyellow: [255, 255, 224],
|
|
245
|
+
lime: [0, 255, 0],
|
|
246
|
+
limegreen: [50, 205, 50],
|
|
247
|
+
linen: [250, 240, 230],
|
|
248
|
+
magenta: [255, 0, 255],
|
|
249
|
+
maroon: [128, 0, 0],
|
|
250
|
+
mediumaquamarine: [102, 205, 170],
|
|
251
|
+
mediumblue: [0, 0, 205],
|
|
252
|
+
mediumorchid: [186, 85, 211],
|
|
253
|
+
mediumpurple: [147, 112, 219],
|
|
254
|
+
mediumseagreen: [60, 179, 113],
|
|
255
|
+
mediumslateblue: [123, 104, 238],
|
|
256
|
+
mediumspringgreen: [0, 250, 154],
|
|
257
|
+
mediumturquoise: [72, 209, 204],
|
|
258
|
+
mediumvioletred: [199, 21, 133],
|
|
259
|
+
midnightblue: [25, 25, 112],
|
|
260
|
+
mintcream: [245, 255, 250],
|
|
261
|
+
mistyrose: [255, 228, 225],
|
|
262
|
+
moccasin: [255, 228, 181],
|
|
263
|
+
navajowhite: [255, 222, 173],
|
|
264
|
+
navy: [0, 0, 128],
|
|
265
|
+
oldlace: [253, 245, 230],
|
|
266
|
+
olive: [128, 128, 0],
|
|
267
|
+
olivedrab: [107, 142, 35],
|
|
268
|
+
orange: [255, 165, 0],
|
|
269
|
+
orangered: [255, 69, 0],
|
|
270
|
+
orchid: [218, 112, 214],
|
|
271
|
+
palegoldenrod: [238, 232, 170],
|
|
272
|
+
palegreen: [152, 251, 152],
|
|
273
|
+
paleturquoise: [175, 238, 238],
|
|
274
|
+
palevioletred: [219, 112, 147],
|
|
275
|
+
papayawhip: [255, 239, 213],
|
|
276
|
+
peachpuff: [255, 218, 185],
|
|
277
|
+
peru: [205, 133, 63],
|
|
278
|
+
pink: [255, 192, 203],
|
|
279
|
+
plum: [221, 160, 221],
|
|
280
|
+
powderblue: [176, 224, 230],
|
|
281
|
+
purple: [128, 0, 128],
|
|
282
|
+
rebeccapurple: [102, 51, 153],
|
|
283
|
+
red: [255, 0, 0],
|
|
284
|
+
rosybrown: [188, 143, 143],
|
|
285
|
+
royalblue: [65, 105, 225],
|
|
286
|
+
saddlebrown: [139, 69, 19],
|
|
287
|
+
salmon: [250, 128, 114],
|
|
288
|
+
sandybrown: [244, 164, 96],
|
|
289
|
+
seagreen: [46, 139, 87],
|
|
290
|
+
seashell: [255, 245, 238],
|
|
291
|
+
sienna: [160, 82, 45],
|
|
292
|
+
silver: [192, 192, 192],
|
|
293
|
+
skyblue: [135, 206, 235],
|
|
294
|
+
slateblue: [106, 90, 205],
|
|
295
|
+
slategray: [112, 128, 144],
|
|
296
|
+
slategrey: [112, 128, 144],
|
|
297
|
+
snow: [255, 250, 250],
|
|
298
|
+
springgreen: [0, 255, 127],
|
|
299
|
+
steelblue: [70, 130, 180],
|
|
300
|
+
tan: [210, 180, 140],
|
|
301
|
+
teal: [0, 128, 128],
|
|
302
|
+
thistle: [216, 191, 216],
|
|
303
|
+
tomato: [255, 99, 71],
|
|
304
|
+
turquoise: [64, 224, 208],
|
|
305
|
+
violet: [238, 130, 238],
|
|
306
|
+
wheat: [245, 222, 179],
|
|
307
|
+
white: [255, 255, 255],
|
|
308
|
+
whitesmoke: [245, 245, 245],
|
|
309
|
+
yellow: [255, 255, 0],
|
|
219
310
|
yellowgreen: [154, 205, 50],
|
|
220
311
|
};
|
|
221
312
|
|
|
@@ -263,6 +354,21 @@ export function slideTransitionDuration(from: number, to: number): number {
|
|
|
263
354
|
return Math.max(600, Math.min(1000 + steps * 120, 2000));
|
|
264
355
|
}
|
|
265
356
|
|
|
357
|
+
/**
|
|
358
|
+
* True when the user prefers reduced motion
|
|
359
|
+
* (`prefers-reduced-motion: reduce`) — slide/map glides collapse to
|
|
360
|
+
* instant changes and autoplay stays off.
|
|
361
|
+
*/
|
|
362
|
+
export const REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
|
|
363
|
+
|
|
364
|
+
export function prefersReducedMotion(): boolean {
|
|
365
|
+
return (
|
|
366
|
+
typeof window !== "undefined" &&
|
|
367
|
+
typeof window.matchMedia === "function" &&
|
|
368
|
+
window.matchMedia(REDUCED_MOTION_QUERY).matches
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
|
|
266
372
|
export function htmlify(str: string): string {
|
|
267
373
|
//if (str.match(/<\s*p[^>]*>([^<]*)<\s*\/\s*p\s*>/)) {
|
|
268
374
|
if (str.match(/<p>[\s\S]*?<\/p>/)) {
|
|
@@ -272,69 +378,27 @@ export function htmlify(str: string): string {
|
|
|
272
378
|
}
|
|
273
379
|
}
|
|
274
380
|
|
|
275
|
-
export function getUrlVars(string: string): string[] & Record<string, string> {
|
|
276
|
-
let str: string, hash: string[];
|
|
277
|
-
const vars: string[] = [];
|
|
278
|
-
str = string.toString();
|
|
279
|
-
if (str.match("&")) {
|
|
280
|
-
str = str.replace("&", "&");
|
|
281
|
-
} else if (str.match("&")) {
|
|
282
|
-
str = str.replace("&", "&");
|
|
283
|
-
} else if (str.match("&")) {
|
|
284
|
-
str = str.replace("&", "&");
|
|
285
|
-
}
|
|
286
|
-
const hashes = str.slice(str.indexOf("?") + 1).split("&");
|
|
287
|
-
for (let i = 0; i < hashes.length; i++) {
|
|
288
|
-
hash = hashes[i].split("=");
|
|
289
|
-
vars.push(hash[0]);
|
|
290
|
-
(vars as unknown as Record<string, string>)[hash[0]] = hash[1];
|
|
291
|
-
}
|
|
292
|
-
return vars as string[] & Record<string, string>;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
381
|
export const ratio = {
|
|
382
|
+
/**
|
|
383
|
+
* The 16:9 height for a given width, or the 16:9 width for a given
|
|
384
|
+
* height. Returns 0 when neither is a usable number.
|
|
385
|
+
*
|
|
386
|
+
* The old guards were `!== null && !== ""`, which an `undefined` passes
|
|
387
|
+
* through — so a caller that omitted `w` computed `Math.round(NaN)` and
|
|
388
|
+
* wrote `height: "NaNpx"`. A `typeof === "number"` check is what the
|
|
389
|
+
* arithmetic actually needs.
|
|
390
|
+
*/
|
|
296
391
|
r16_9: function (size: { w?: number; h?: number }): number {
|
|
297
|
-
if (size.w
|
|
392
|
+
if (typeof size.w === "number" && isFinite(size.w)) {
|
|
298
393
|
return Math.round((size.w / 16) * 9);
|
|
299
|
-
}
|
|
394
|
+
}
|
|
395
|
+
if (typeof size.h === "number" && isFinite(size.h)) {
|
|
300
396
|
return Math.round((size.h / 9) * 16);
|
|
301
|
-
} else {
|
|
302
|
-
return 0;
|
|
303
397
|
}
|
|
398
|
+
return 0;
|
|
304
399
|
},
|
|
305
400
|
};
|
|
306
401
|
|
|
307
|
-
export function urljoin(base_url: string, path: string): string {
|
|
308
|
-
if (base_url.length && base_url.at(-1) === "/") {
|
|
309
|
-
base_url = base_url.substring(0, base_url.length - 1);
|
|
310
|
-
}
|
|
311
|
-
if (path.length && path[0] === "/") {
|
|
312
|
-
path = path.substring(1);
|
|
313
|
-
}
|
|
314
|
-
const url1 = base_url.split("/");
|
|
315
|
-
const url2 = path.split("/");
|
|
316
|
-
const url3 = [];
|
|
317
|
-
for (let i = 0, l = url1.length; i < l; i++) {
|
|
318
|
-
if (url1[i] === "..") {
|
|
319
|
-
url3.pop();
|
|
320
|
-
} else if (url1[i] === ".") {
|
|
321
|
-
continue;
|
|
322
|
-
} else {
|
|
323
|
-
url3.push(url1[i]);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
for (let i = 0, l = url2.length; i < l; i++) {
|
|
327
|
-
if (url2[i] === "..") {
|
|
328
|
-
url3.pop();
|
|
329
|
-
} else if (url2[i] === ".") {
|
|
330
|
-
continue;
|
|
331
|
-
} else {
|
|
332
|
-
url3.push(url2[i]);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
return url3.join("/");
|
|
336
|
-
}
|
|
337
|
-
|
|
338
402
|
export function getObjectAttributeByIndex(
|
|
339
403
|
obj: Record<string, unknown> | undefined,
|
|
340
404
|
index: number,
|