diva.js 7.2.4 → 7.2.6

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/README.md CHANGED
@@ -1,24 +1,78 @@
1
1
  # Diva.js
2
2
 
3
- Version 7.2.2
3
+ Diva.js is a web viewer for IIIF manifests and collections. It combines a document-style scrolling interface with OpenSeadragon-based zooming, collection browsing, table-of-contents navigation, and support for multiple images on a canvas.
4
4
 
5
- ## Build
5
+ ## Links
6
+
7
+ - Website: https://diva.simssa.ca/
8
+ - Documentation: https://diva.simssa.ca/docs/
9
+ - Getting started: https://diva.simssa.ca/docs/getting-started/
10
+ - npm package: https://www.npmjs.com/package/diva.js
11
+ - GitHub repository: https://github.com/DDMAL/diva.js
12
+
13
+ ## Getting Started
14
+
15
+ Include OpenSeadragon and Diva.js in your page:
16
+
17
+ ```html
18
+ <script src="https://cdn.jsdelivr.net/npm/openseadragon@6.0.1/build/openseadragon/openseadragon.min.js"></script>
19
+ <script src="path/to/diva.js"></script>
20
+ ```
21
+
22
+ Create a container and initialize the viewer with a IIIF manifest or collection URL:
23
+
24
+ ```html
25
+ <div id="diva-wrapper"></div>
26
+
27
+ <script>
28
+ const viewer = new Diva("diva-wrapper", {
29
+ objectData: "https://example.org/iiif/manifest.json"
30
+ });
31
+ </script>
32
+ ```
33
+
34
+ Give the container a height so the viewer can render correctly:
35
+
36
+ ```css
37
+ #diva-wrapper {
38
+ display: flex;
39
+ width: 100%;
40
+ height: 80vh;
41
+ }
42
+ ```
43
+
44
+ All CSS and image assets are bundled into the built library.
45
+
46
+ ## Install From npm
47
+
48
+ ```sh
49
+ npm install diva.js
50
+ ```
51
+
52
+ The package publishes browser and ESM builds. For detailed integration guidance, configuration options, and examples, use the documentation site:
53
+
54
+ - https://diva.simssa.ca/docs/getting-started/
55
+
56
+ ## Features
57
+
58
+ - IIIF Presentation API v2 and v3 support
59
+ - Manifest and collection viewing
60
+ - Range-based table of contents navigation
61
+ - Multiple image choices per canvas
62
+ - OpenSeadragon-powered zooming and panning
63
+
64
+ ## Development
65
+
66
+ Build the production bundles:
6
67
 
7
68
  ```sh
8
69
  make build
9
70
  ```
10
71
 
11
- ## Run
72
+ Serve the repo locally for testing:
12
73
 
13
74
  ```sh
14
75
  python3 -m http.server 8000
15
76
  ```
16
77
 
17
- Open http://localhost:8000 in a browser.
18
-
19
- ## Notes
20
- - Build output is a single `build/diva.js` bundle (Elm + TS) plus the OpenSeadragon CDN script. A debug build is available as `build/diva.debug.js`.
21
- - Initialize the viewer in `public/index.html` with `new Diva("diva-wrapper", { objectData, acceptHeaders })`.
22
- - `src/viewer-element.ts` defines the `osd-viewer` custom element used by the Elm view.
23
- - `src/diva.ts` owns the Elm ports and the filter preview OpenSeadragon instance.
24
- - `make clean` removes generated artifacts in `build/` and `public/`.
78
+ Then open `http://localhost:8000/testing/index.html` or `http://localhost:8000/testing/testing.html`.