@cu-mkp/editioncrafter 1.3.1-beta.8 → 1.3.1-beta.9

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.
@@ -216,6 +216,7 @@ function parseSingleManifest(manifest, transcriptionTypes, document) {
216
216
  annotations: canvas.annotations
217
217
  ? canvas.annotations.filter(a => a.motivation === 'tagging')
218
218
  : [],
219
+ metadata: canvas.metadata,
219
220
  }
220
221
 
221
222
  folios.push(folio)
@@ -0,0 +1,13 @@
1
+ export default function ImageMetadata(props) {
2
+ const { data } = props
3
+
4
+ return (
5
+ <div className="image-metadata">
6
+ { Object.keys(data)?.map(key => (
7
+ <div key={key}>
8
+ { `${key}: ${data[key]}` }
9
+ </div>
10
+ ))}
11
+ </div>
12
+ )
13
+ }
@@ -10,6 +10,7 @@ import {
10
10
  useSearchParams,
11
11
  } from 'react-router-dom'
12
12
  import TagFilterContext from '../context/TagFilterContext'
13
+ import ImageMetadata from './ImageMetadata'
13
14
  import ImageZoomControl from './ImageZoomControl'
14
15
  import Navigation from './Navigation'
15
16
 
@@ -187,6 +188,11 @@ function ImageView(props) {
187
188
  initViewer={initViewer}
188
189
  loading={folio.loading}
189
190
  />
191
+ {
192
+ folio.metadata && (
193
+ <ImageMetadata data={folio.metadata} />
194
+ )
195
+ }
190
196
  </div>
191
197
  )
192
198
  : (
@@ -0,0 +1,16 @@
1
+ .editioncrafter {
2
+
3
+ .image-metadata {
4
+ position: absolute;
5
+ bottom: 8px;
6
+ left: 8px;
7
+ background-color: rgba(128, 128, 128, 0.5);
8
+ color: white;
9
+ display: flex;
10
+ flex-direction: row;
11
+ gap: 16px;
12
+ flex-wrap: wrap;
13
+ padding: 4px 6px;
14
+ }
15
+
16
+ }
@@ -99,6 +99,7 @@ animation: #{$str};
99
99
 
100
100
  @import "diplomatic";
101
101
  @import "imageGridView";
102
+ @import "imageMetadata";
102
103
  @import "splitPaneView";
103
104
  @import "imageView";
104
105
  @import "imageZoomControl";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cu-mkp/editioncrafter",
3
3
  "type": "module",
4
- "version": "1.3.1-beta.8",
4
+ "version": "1.3.1-beta.9",
5
5
  "private": false,
6
6
  "description": "A simple digital critical edition publication tool",
7
7
  "license": "MIT",