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 +65 -11
- package/build/diva.debug.js +29165 -0
- package/build/diva.esm.js +17 -0
- package/build/diva.js +17 -0
- package/package.json +16 -3
- package/.clang-format +0 -7
- package/.github/workflows/npm-publish.yml +0 -45
- package/Makefile +0 -75
- package/elm.json +0 -32
- package/review/elm.json +0 -52
- package/review/src/ReviewConfig.elm +0 -87
- package/scripts/elm-esm.sh +0 -40
- package/scripts/minify-css.mjs +0 -31
- package/src/Filters.elm +0 -1044
- package/src/Main.elm +0 -1217
- package/src/Model.elm +0 -213
- package/src/Msg.elm +0 -59
- package/src/Utilities.elm +0 -46
- package/src/View/CollectionExplorer.elm +0 -172
- package/src/View/Helpers.elm +0 -86
- package/src/View/HtmlRenderer.elm +0 -136
- package/src/View/Icons.elm +0 -159
- package/src/View/ManifestInfoModal.elm +0 -363
- package/src/View/PageViewModal.elm +0 -1046
- package/src/View/Sidebar.elm +0 -786
- package/src/View/Toolbar.elm +0 -189
- package/src/View.elm +0 -244
- package/src/diva.ts +0 -802
- package/src/filters.ts +0 -1843
- package/src/styles/app.css +0 -328
- package/src/styles/collection.css +0 -75
- package/src/styles/modal.css +0 -388
- package/src/styles/sidebar.css +0 -215
- package/src/styles/theme.css +0 -39
- package/src/styles/toolbar.css +0 -154
- package/src/viewer-element.ts +0 -1307
- package/testing/index.html +0 -52
- package/testing/testing.html +0 -231
- package/tsconfig.json +0 -12
package/README.md
CHANGED
|
@@ -1,24 +1,78 @@
|
|
|
1
1
|
# Diva.js
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
72
|
+
Serve the repo locally for testing:
|
|
12
73
|
|
|
13
74
|
```sh
|
|
14
75
|
python3 -m http.server 8000
|
|
15
76
|
```
|
|
16
77
|
|
|
17
|
-
|
|
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`.
|