diva.js 6.0.2 → 7.2.4
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/.clang-format +7 -0
- package/.github/workflows/npm-publish.yml +45 -0
- package/LICENSE +55 -0
- package/Makefile +75 -0
- package/README.md +15 -114
- package/elm.json +32 -0
- package/package.json +12 -59
- package/review/elm.json +52 -0
- package/review/src/ReviewConfig.elm +87 -0
- package/scripts/elm-esm.sh +40 -0
- package/scripts/minify-css.mjs +31 -0
- package/src/Filters.elm +1044 -0
- package/src/Main.elm +1217 -0
- package/src/Model.elm +213 -0
- package/src/Msg.elm +59 -0
- package/src/Utilities.elm +46 -0
- package/src/View/CollectionExplorer.elm +172 -0
- package/src/View/Helpers.elm +86 -0
- package/src/View/HtmlRenderer.elm +136 -0
- package/src/View/Icons.elm +159 -0
- package/src/View/ManifestInfoModal.elm +363 -0
- package/src/View/PageViewModal.elm +1046 -0
- package/src/View/Sidebar.elm +786 -0
- package/src/View/Toolbar.elm +189 -0
- package/src/View.elm +244 -0
- package/src/diva.ts +802 -0
- package/src/filters.ts +1843 -0
- package/src/styles/app.css +328 -0
- package/src/styles/collection.css +75 -0
- package/src/styles/modal.css +388 -0
- package/src/styles/sidebar.css +215 -0
- package/src/styles/theme.css +39 -0
- package/src/styles/toolbar.css +154 -0
- package/src/viewer-element.ts +1307 -0
- package/testing/index.html +52 -0
- package/testing/testing.html +231 -0
- package/tsconfig.json +12 -0
- package/AUTHORS +0 -22
- package/build/diva.css +0 -554
- package/build/diva.css.map +0 -1
- package/build/diva.js +0 -9
- package/build/diva.js.map +0 -1
- package/build/plugins/download.js +0 -2
- package/build/plugins/download.js.map +0 -1
- package/build/plugins/manipulation.js +0 -2
- package/build/plugins/manipulation.js.map +0 -1
- package/build/plugins/metadata.js +0 -2
- package/build/plugins/metadata.js.map +0 -1
- package/index.html +0 -28
- package/karma.conf.js +0 -87
- package/source/css/_mixins.scss +0 -43
- package/source/css/_variables.scss +0 -50
- package/source/css/_viewer.scss +0 -462
- package/source/css/diva.scss +0 -15
- package/source/css/plugins/_manipulation.scss +0 -228
- package/source/css/plugins/_metadata.scss +0 -31
- package/source/img/adjust.svg +0 -11
- package/source/img/book-view.svg +0 -6
- package/source/img/close.svg +0 -6
- package/source/img/download.svg +0 -6
- package/source/img/from-fullscreen.svg +0 -8
- package/source/img/grid-fewer.svg +0 -6
- package/source/img/grid-more.svg +0 -6
- package/source/img/grid-view.svg +0 -6
- package/source/img/link.svg +0 -6
- package/source/img/metadata.svg +0 -9
- package/source/img/page-view.svg +0 -6
- package/source/img/to-fullscreen.svg +0 -11
- package/source/img/zoom-in.svg +0 -6
- package/source/img/zoom-out.svg +0 -7
- package/source/js/composite-image.js +0 -174
- package/source/js/diva-global.js +0 -7
- package/source/js/diva.js +0 -1543
- package/source/js/document-handler.js +0 -180
- package/source/js/document-layout.js +0 -286
- package/source/js/exceptions.js +0 -26
- package/source/js/gesture-events.js +0 -190
- package/source/js/grid-handler.js +0 -122
- package/source/js/iiif-source-adapter.js +0 -63
- package/source/js/image-cache.js +0 -113
- package/source/js/image-manifest.js +0 -157
- package/source/js/image-request-handler.js +0 -76
- package/source/js/interpolate-animation.js +0 -122
- package/source/js/page-layouts/book-layout.js +0 -161
- package/source/js/page-layouts/grid-layout.js +0 -97
- package/source/js/page-layouts/index.js +0 -38
- package/source/js/page-layouts/page-dimensions.js +0 -9
- package/source/js/page-layouts/singles-layout.js +0 -27
- package/source/js/page-overlay-manager.js +0 -102
- package/source/js/page-tools-overlay.js +0 -95
- package/source/js/parse-iiif-manifest.js +0 -302
- package/source/js/plugins/_filters.js +0 -679
- package/source/js/plugins/download.js +0 -83
- package/source/js/plugins/manipulation.js +0 -837
- package/source/js/plugins/metadata.js +0 -190
- package/source/js/renderer.js +0 -584
- package/source/js/settings-view.js +0 -30
- package/source/js/tile-coverage-map.js +0 -25
- package/source/js/toolbar.js +0 -573
- package/source/js/utils/dragscroll.js +0 -106
- package/source/js/utils/elt.js +0 -94
- package/source/js/utils/events.js +0 -190
- package/source/js/utils/get-scrollbar-width.js +0 -29
- package/source/js/utils/hash-params.js +0 -86
- package/source/js/utils/parse-label-value.js +0 -34
- package/source/js/utils/vanilla.kinetic.js +0 -527
- package/source/js/validation-runner.js +0 -177
- package/source/js/viewer-core.js +0 -1514
- package/source/js/viewport.js +0 -143
- package/test/_setup.js +0 -13
- package/test/composite-image_test.js +0 -94
- package/test/diva_test.js +0 -43
- package/test/hash-params_test.js +0 -221
- package/test/image-cache_test.js +0 -106
- package/test/main.js +0 -6
- package/test/manifests/beromunsterManifest.json +0 -15514
- package/test/manifests/iiifv2.json +0 -11032
- package/test/manifests/iiifv2pages.json +0 -30437
- package/test/manifests/iiifv3.json +0 -10965
- package/test/navigation_test.js +0 -355
- package/test/parse-iiif-manifest_test.js +0 -68
- package/test/public_test.js +0 -881
- package/test/settings_test.js +0 -487
- package/test/utils/book-layout_test.js +0 -148
- package/test/utils/elt_test.js +0 -102
- package/test/utils/events_test.js +0 -245
- package/test/utils/hash-params_test.js +0 -79
- package/test/utils/parse-label-value_test.js +0 -45
- package/test/z_plugins_test.js +0 -180
- package/webpack.config.js +0 -58
- package/webpack.config.test.js +0 -45
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/* Toolbar-only styles to replace elm-css for the toolbar components. */
|
|
2
|
+
|
|
3
|
+
.canvas-toolbar-stack {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 2px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
min-width: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.canvas-toolbar {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
margin-bottom: 0;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.canvas-toolbar-section {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: flex-start;
|
|
21
|
+
gap: 8px;
|
|
22
|
+
min-width: 0;
|
|
23
|
+
flex: 0 0 auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.canvas-toolbar-section.is-right {
|
|
27
|
+
margin-left: auto;
|
|
28
|
+
flex: 0 0 auto;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.canvas-toolbar-item {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: 6px;
|
|
35
|
+
align-items: center;
|
|
36
|
+
width: 80px;
|
|
37
|
+
flex: 0 0 auto;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.canvas-toolbar-button {
|
|
41
|
+
background-color: var(--diva-toolbar-button-bg);
|
|
42
|
+
color: var(--diva-toolbar-button-icon);
|
|
43
|
+
border: 2px solid var(--diva-toolbar-button-icon);
|
|
44
|
+
border-radius: 6px;
|
|
45
|
+
box-shadow: var(--diva-toolbar-button-shadow);
|
|
46
|
+
backdrop-filter: blur(10px) saturate(140%);
|
|
47
|
+
-webkit-backdrop-filter: blur(10px) saturate(140%);
|
|
48
|
+
width: 80%;
|
|
49
|
+
height: 36px;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
padding: 4px 6px;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.canvas-toolbar-button:focus-visible {
|
|
57
|
+
outline: 2px solid var(--diva-accent);
|
|
58
|
+
outline-offset: 2px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.canvas-toolbar-button:hover {
|
|
62
|
+
background-color: var(--diva-toolbar-button-bg-hover);
|
|
63
|
+
border-color: var(--diva-toolbar-button-icon);
|
|
64
|
+
box-shadow: var(--diva-toolbar-button-shadow-hover);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.canvas-toolbar-button.is-fullscreen {
|
|
68
|
+
color: var(--diva-white);
|
|
69
|
+
background-color: var(--diva-toolbar-button-bg-fullscreen);
|
|
70
|
+
border-color: var(--diva-toolbar-button-border-hover);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.canvas-toolbar-button.is-fullscreen:hover {
|
|
74
|
+
background-color: var(--diva-toolbar-button-bg-fullscreen-hover);
|
|
75
|
+
border-color: var(--diva-toolbar-button-border-fullscreen-hover);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.canvas-toolbar-button.is-disabled {
|
|
79
|
+
opacity: 0.4;
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.canvas-toolbar-button.is-disabled:hover {
|
|
84
|
+
background-color: var(--diva-toolbar-button-bg);
|
|
85
|
+
border-color: var(--diva-toolbar-button-icon);
|
|
86
|
+
box-shadow: var(--diva-toolbar-button-shadow);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.canvas-toolbar-button.is-fullscreen.is-disabled:hover {
|
|
90
|
+
background-color: var(--diva-toolbar-button-bg-fullscreen);
|
|
91
|
+
border-color: var(--diva-toolbar-button-border-hover);
|
|
92
|
+
box-shadow: var(--diva-toolbar-button-shadow);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.canvas-toolbar-label {
|
|
96
|
+
font-size: var(--diva-font-sm);
|
|
97
|
+
color: var(--diva-text-primary);
|
|
98
|
+
font-weight: 500;
|
|
99
|
+
white-space: normal;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
line-height: 1;
|
|
103
|
+
min-height: 1.4em;
|
|
104
|
+
text-align: center;
|
|
105
|
+
text-transform: uppercase;
|
|
106
|
+
word-break: break-word;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.canvas-toolbar-label.is-fullscreen {
|
|
110
|
+
color: var(--diva-white);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.canvas-label {
|
|
114
|
+
font-size: var(--diva-font-lg);
|
|
115
|
+
color: var(--diva-text-muted);
|
|
116
|
+
width: 100%;
|
|
117
|
+
text-align: left;
|
|
118
|
+
white-space: normal;
|
|
119
|
+
overflow-wrap: anywhere;
|
|
120
|
+
word-break: break-word;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.canvas-label.is-fullscreen {
|
|
124
|
+
color: var(--diva-white);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.status {
|
|
128
|
+
font-size: var(--diva-font-lg);
|
|
129
|
+
margin-bottom: 0;
|
|
130
|
+
color: var(--diva-text-muted);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.status.is-error {
|
|
134
|
+
color: var(--diva-danger);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media (max-width: 720px) {
|
|
138
|
+
.canvas-toolbar {
|
|
139
|
+
flex-wrap: wrap;
|
|
140
|
+
gap: 8px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.canvas-toolbar-item {
|
|
144
|
+
width: 64px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.canvas-label {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.status {
|
|
152
|
+
display: none;
|
|
153
|
+
}
|
|
154
|
+
}
|