@projektemacher/storymapjs 0.10.0 → 0.10.1

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/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@projektemacher/storymapjs",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "StoryMapJS viewer library — unofficial TypeScript/OpenLayers rewrite of the Knight Lab StoryMapJS (viewer only)",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",
7
+ "types": "./dist/js/storymap.d.ts",
7
8
  "author": "Christian Mahnke <194820+cmahnke@users.noreply.github.com>",
8
9
  "files": [
9
10
  "dist",
@@ -23,7 +24,11 @@
23
24
  "node": ">=22"
24
25
  },
25
26
  "exports": {
26
- ".": "./dist/js/storymap.js",
27
+ ".": {
28
+ "types": "./dist/js/storymap.d.ts",
29
+ "import": "./dist/js/storymap.js",
30
+ "default": "./dist/js/storymap.js"
31
+ },
27
32
  "./css/storymap.css": "./dist/css/storymap.css",
28
33
  "./css/fonts/*": "./dist/css/fonts/*",
29
34
  "./schema/*": "./schema/*"
@@ -65,14 +70,21 @@
65
70
  "@fontsource/ubuntu": "^5.3.0",
66
71
  "@fontsource/unica-one": "^5.3.0",
67
72
  "@playwright/test": "^1.63.0",
73
+ "@rollup/plugin-commonjs": "^29.0.3",
74
+ "@rollup/plugin-json": "^6.1.0",
75
+ "@rollup/plugin-node-resolve": "^16.0.3",
76
+ "@rollup/plugin-typescript": "^12.3.0",
68
77
  "@types/d3-ease": "^3.0.2",
69
78
  "@types/js-cookie": "^3.0.6",
70
79
  "@types/node": "^26.6.2",
80
+ "@web/rollup-plugin-html": "^4.0.0",
71
81
  "eslint": "^10.11.0",
72
82
  "globals": "^17.12.0",
73
83
  "jsdom": "^30.1.0",
74
84
  "marked": "^18.0.13",
75
85
  "prettier": "^3.9.8",
86
+ "rollup": "^4.63.4",
87
+ "rollup-plugin-dts": "^6.5.1",
76
88
  "sass": "^1.104.1",
77
89
  "stylelint": "^17.15.0",
78
90
  "stylelint-config-standard": "^40.0.0",
@@ -85,8 +97,9 @@
85
97
  },
86
98
  "scripts": {
87
99
  "dev": "vite",
88
- "build": "vite build && vite build --config vite.demo.config.ts",
89
- "docs": "vite build --config vite.sitegen.config.ts",
100
+ "build": "npm run clean && npm run build:declarations && rollup -c && node -e \"fs.rmSync('dist/.dts-tmp', { recursive: true, force: true })\"",
101
+ "build:declarations": "tsc -p tsconfig.json --noEmit false --emitDeclarationOnly --declaration --declarationMap false --outDir dist/.dts-tmp",
102
+ "docs": "node tasks/sitegen.mjs",
90
103
  "docs:api": "typedoc",
91
104
  "thumbs": "node tasks/build-thumbnails.mjs",
92
105
  "preview": "vite preview",
@@ -1 +0,0 @@
1
- import{t as e}from"./main-BDSRsIiB.js";import"./modulepreload-polyfill-P2Xu9kJm.js";function t(e){document.title=`StoryMapJS: `+e.title}window.storymap=new e(`storymap-embed`,`./demo.json`,{},{title:t});
@@ -1 +0,0 @@
1
- import{t as e}from"./main-BDSRsIiB.js";import"./modulepreload-polyfill-P2Xu9kJm.js";window.__smErrors=[],window.__smReady=!1,window.addEventListener(`error`,e=>{window.__smErrors.push(String(e.message||e))});var t=new URLSearchParams(window.location.search),n=t.get(`manifest`),r=t.get(`url`),i=n===null?t.get(`example`):n,a=n===null?`/examples/`:`/examples-iiif/`,o={};if(t.get(`options`))try{o=JSON.parse(t.get(`options`))}catch(e){window.__smErrors.push(`harness: bad options param: `+e)}var s=r??a+i+`.json`;fetch(s).then(e=>e.json()).then(t=>{window.__sm=new e(`storymap-embed`,t,o,{}),window.__smReady=!0}).catch(e=>{window.__smErrors.push(`harness: `+(e&&e.message?e.message:String(e))),window.__smReady=!0});
@@ -1 +0,0 @@
1
- import"./modulepreload-polyfill-P2Xu9kJm.js";var e=[{id:`katrina`,title:`Hurricane Katrina`,kind:`Map`},{id:`population`,title:`US Population Shifts`,kind:`Map`},{id:`marktwain`,title:`Mark Twain's Travels`,kind:`Map`},{id:`seurat`,title:`A Sunday on La Grande Jatte`,kind:`Gigapixel`},{id:`iiif-wellcome`,title:`Wellcome Collection (IIIF)`,kind:`IIIF`},{id:`president`,title:`A Month in the Life of President Obama`,kind:`Map`},{url:`https://s3.amazonaws.com/uploads.knightlab.com/storymapjs/a1a349b51799ee49e96bed10cc235e7f/garden-of-earthly-delights/published.json`,thumb:`bosch-garden`,title:`The Garden of Earthly Delights – Hieronymus Bosch`,kind:`Knight Lab example`},{url:`https://uploads.knightlab.com/storymapjs/3df56e350378e51781746bfb2a2ea428/test/published.json`,thumb:`southern-literary-trail`,title:`Southern Literary Trail`,kind:`Georgia Humanities`}];function t(e){let t=e.url??`examples/`+e.id+`.json`,n=e.thumb??e.id??``,r=document.createElement(`a`);r.className=`card`,r.href=`./embed/index.html?url=${encodeURIComponent(t)}`;let i=document.createElement(`span`);i.className=`header-image`;let a=document.createElement(`span`);a.className=`header-image-background bw`,a.style.backgroundImage=`url('./thumbs/${n}.jpg'), linear-gradient(135deg, #b8b8b8, #646464)`,a.setAttribute(`role`,`img`),a.setAttribute(`aria-label`,e.title),i.append(a);let o=document.createElement(`article`);o.className=`card-content`;let s=document.createElement(`h3`);s.textContent=e.title,o.append(s);let c=document.createElement(`footer`);return c.textContent=e.kind,r.append(i,o,c),r}var n=document.getElementById(`examples-cards`);if(n){n.classList.add(`cards-link`);for(let r of e)n.append(t(r))}var r=document.getElementById(`demo-frame`);if(r){let e=()=>{r.style.height=window.innerHeight-20+`px`};e(),window.addEventListener(`resize`,e)}