first commit

This commit is contained in:
Robert Nasarek 2022-01-11 07:50:49 +01:00
commit 44146b7801
8 changed files with 11658 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules

7
README.md Normal file
View file

@ -0,0 +1,7 @@
# WissKI Mirador Integration
Package bundle to integration Mirador 3 Image Viewer with Annotations in the WissKI framework. Thanks to Mirador, you will find detailed contribution in the package.json.
## Build
The index.js and mirador-integration.js are ready to use, anyway if, you want to rebuild, type
~~~bash
npm i && npm run rebuild
~~~

22
index.js Normal file
View file

@ -0,0 +1,22 @@
import Mirador from 'mirador/dist/es/src/index';
import { miradorImageToolsPlugin } from 'mirador-image-tools';
import miradorAnnotationPlugins from 'mirador-annotations';
import LocalStorageAdapter from 'mirador-annotations/lib/LocalStorageAdapter'
import AnnototAdapter from 'mirador-annotations/lib/AnnototAdapter';
window.Mirador = Mirador;
// The used plugins is specified in the main js.
window.miradorPlugins = [
{name: "annotations", plugin: miradorAnnotationPlugins},
{name: "image-tools", plugin: miradorImageToolsPlugin}
,];
// The endpoint of the external annotation server is set in the main js.
const annotationEndpoint = 'http://localhost/wisski/mirador-annotations';
// Bridge to store annotations.
window.miradorAnnotationServerAdapter = typeof annotationEndpoint !== 'undefined' && annotationEndpoint
? function (canvasId, annotationEndpoint) {
return new AnnototAdapter(canvasId, annotationEndpoint) }
: function (canvasId) { return new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`); };

183
mirador-integration.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

11385
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

40
package.json Normal file
View file

@ -0,0 +1,40 @@
{
"name": "wisski-mirador-integration",
"version": "0.0.1",
"description": "WissKI Integration of the Mirador 3 Image Viewer. More at https://projectmirador.org/ and https://github.com/ProjectMirador/mirador-integration",
"private": true,
"scripts": {
"build": "webpack --config webpack.config.js"
},
"author": "Mark Fichtner",
"contributors": [
{
"name": "Jack Reed",
"url": "https://www.jack-reed.com/"
},
{
"name": "Chris Beer",
"email": "chris@cbeer.info",
"url": "http://cbeer.info"
},
{
"name": "D-Groenewegen"
},
{
"name": "Régis Robineau ",
"url": "https://regisrob.fr/cv/"
}
],
"license": "ISC",
"dependencies": {
"css-loader": "^3.6.0",
"mirador": "^3.0.0",
"mirador-annotations": "~0.4.0",
"mirador-image-tools": "^0.10.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"style-loader": "^1.2.1",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12"
}
}

19
webpack.config.js Normal file
View file

@ -0,0 +1,19 @@
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './index.js',
// debug: true,
devtool: 'source-map',
output: {
filename: 'mirador-integration.js',
path: path.resolve(__dirname, './'),
publicPath: './',
},
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1, // disable creating additional chunks
})
],
};