dbf-mirador 4.3.1 → 4.3.2

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
@@ -2,6 +2,19 @@
2
2
 
3
3
  We forked the original Mirador project to create a version that is compatible with the DBF Map project. This version of Mirador is designed to work seamlessly with the DBF Map platform, providing users with an enhanced experience for viewing and interacting with digital content. More detail about the original Mirador project can be found [here](https://github.com/ProjectMirador/mirador). This readme will cover only minimal information about the original Mirador project and will focus on the changes made to support the DBF Map project.
4
4
 
5
+ We provided a ready to use component called `MapViewer` See below for more details.
6
+
7
+ <!-- TOC -->
8
+ * [DBF Map Mirador](#dbf-map-mirador)
9
+ * [Running Mirador locally for development](#running-mirador-locally-for-development)
10
+ * [Install Mirador inside your project](#install-mirador-inside-your-project-)
11
+ * [`MapViewer` component](#mapviewer-component)
12
+ * [Mirador](#mirador)
13
+ * [Running the tests](#running-the-tests)
14
+ * [Linting the project](#linting-the-project)
15
+ <!-- TOC -->
16
+
17
+
5
18
  ## Running Mirador locally for development
6
19
 
7
20
  Mirador local development requires [nodejs](https://nodejs.org/en/download/) to be installed.
@@ -11,12 +24,9 @@ git clone git@github.com:AlMadar-Digital/map-mirador.git
11
24
  cd map-mirador
12
25
  npm install
13
26
 
27
+ npm start
14
28
  ```
15
- Then run the following command to start a local development server:
16
29
 
17
- ```sh
18
- $ npm start
19
- ```
20
30
 
21
31
  Then navigate to [http://127.0.0.1:4444/](http://127.0.0.1:4444/)
22
32
 
@@ -28,21 +38,33 @@ Then navigate to [http://127.0.0.1:4444/](http://127.0.0.1:4444/)
28
38
  $ npm install dbf-mirador
29
39
  ```
30
40
 
31
- ### Mirador
41
+ ### `MapViewer` component
32
42
 
33
- Check the demo folder TODO
43
+ For consumers that just want to render a manifest as a map - without learning Mirador's own
44
+ config/plugin API - `MapViewer` is a React component that wraps `Mirador.viewer()` with a
45
+ preset config (annotation sidebar open by default, window chrome hidden, single-window
46
+ layout). The only required prop is the manifest URL:
34
47
 
35
- ### Instantiating Mirador
48
+ Here the manifestId correspond to the manifest endpoint from the map object provided by Strapi. This endpoint provides the map data as a IIIF manifest.
49
+ You can use the following code snippet to render a map in your React application.
36
50
 
37
- ```javascript
38
- var miradorInstance = Mirador.viewer({
39
- id: 'mirador' // id selector where Mirador should be instantiated
40
- });
51
+ ```jsx
52
+ import { MapViewer } from 'dbf-mirador';
41
53
 
42
- > miradorInstance
43
- { actions, store }
54
+ function App() {
55
+ return <MapViewer manifestId="https://files.tetras-libre.fr/dev/dbf/mapnile.json" />;
56
+ }
44
57
  ```
45
58
 
59
+ Run `npm start` and open `localhost:4444/demo/map-viewer.html` to see it live.
60
+
61
+ ### Mirador
62
+
63
+ Check the `demo` folder for runnable examples, including `demo/index.html` (raw
64
+ `Mirador.viewer()` usage), `demo/map-viewer.html` (the `MapViewer` component below) and
65
+ `demo/map-editor.html` (the map preset plus `dbf-mirador-annotation-editor`, so POIs and
66
+ journeys can be created/edited against browser-local storage with no backend).
67
+
46
68
 
47
69
  ## Running the tests
48
70
  We use Vitest to run our test suite.
@@ -72,9 +72,9 @@ import ni from "@mui/material/Backdrop";
72
72
  import { grey as ri } from "@mui/material/colors";
73
73
  import ii from "@mui/material/Grid";
74
74
  import ai from "@mui/material/ButtonBase";
75
- import oi from "@mui/material/GlobalStyles";
76
- import si from "@mui/material/Fab";
77
- import ci from "@mui/material/useMediaQuery";
75
+ import oi from "@mui/material/useMediaQuery";
76
+ import si from "@mui/material/GlobalStyles";
77
+ import ci from "@mui/material/Fab";
78
78
  import li from "@mui/material/Snackbar";
79
79
  //#region node_modules/lodash/union.js
80
80
  var ui = /* @__PURE__ */ D(((e, t) => {
@@ -20610,7 +20610,7 @@ function FI({ layout: e = void 0, updateWorkspaceMosaicLayout: t, windowIds: n =
20610
20610
  })) : null, l = (e) => {
20611
20611
  t(e);
20612
20612
  };
20613
- return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(oi, { styles: { ...AI } }), /* @__PURE__ */ z(jI, {
20613
+ return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(si, { styles: { ...AI } }), /* @__PURE__ */ z(jI, {
20614
20614
  dragAndDropManager: a.dragDropManager,
20615
20615
  renderTile: c,
20616
20616
  initialValue: o || FM(n),
@@ -20810,7 +20810,7 @@ function KI({ addResource: e = () => {}, catalog: t = [], setWorkspaceAddVisibil
20810
20810
  })
20811
20811
  ]
20812
20812
  }),
20813
- /* @__PURE__ */ B(si, {
20813
+ /* @__PURE__ */ B(ci, {
20814
20814
  variant: "extended",
20815
20815
  disabled: a,
20816
20816
  sx: (e) => ({
@@ -20902,11 +20902,11 @@ KI.propTypes = {
20902
20902
  function qI() {
20903
20903
  let e = Vn();
20904
20904
  return [...e.breakpoints.keys].reverse().reduce((t, n) => {
20905
- let r = ci(e.breakpoints.up(n));
20905
+ let r = oi(e.breakpoints.up(n));
20906
20906
  return !t && r ? n : t;
20907
20907
  }, null) || "xs";
20908
20908
  }
20909
- var JI = H(si, {
20909
+ var JI = H(ci, {
20910
20910
  name: "WorkspaceAddButton",
20911
20911
  slot: "root"
20912
20912
  })(({ theme: e }) => ({
@@ -22219,4 +22219,4 @@ var BL = /* @__PURE__ */ d({ default: () => VL }), VL = n(w((e) => ({
22219
22219
  //#endregion
22220
22220
  export { sI as $, Nl as $n, Xi as $r, $N as $t, $I as A, Hf as An, ga as Ar, KP as At, FI as B, nf as Bn, ta as Br, xP as Bt, sL as C, Si as Ci, Tb as Cn, xs as Cr, gF as Ct, rL as D, Kf as Dn, Ka as Dr, eF as Dt, iL as E, di as Ei, qf as En, qa as Er, tF as Et, UI as F, Cf as Fn, da as Fr, IP as Ft, SI as G, Kl as Gn, oa as Gr, fP as Gt, DI as H, $d as Hn, aa as Hr, _P as Ht, HI as I, Sf as In, fa as Ir, FP as It, _I as J, Vl as Jn, $i as Jr, aP as Jt, xI as K, Gl as Kn, na as Kr, dP as Kt, BI as L, mf as Ln, la as Lr, AP as Lt, XI as M, Lf as Mn, ha as Mr, WP as Mt, YI as N, Df as Nn, pa as Nr, UP as Nt, tL as O, Gf as On, Ga as Or, ZP as Ot, KI as P, Ef as Pn, ua as Pr, LP as Pt, lI as Q, Pl as Qn, Ji as Qr, eP as Qt, LI as R, pf as Rn, ma as Rr, EP as Rt, cL as S, Ci as Si, Eb as Sn, Cs as Sr, _F as St, aL as T, yi as Ti, Cb as Tn, Xa as Tr, oF as Tt, TI as U, yu as Un, ra as Ur, gP as Ut, kI as V, ef as Vn, ia as Vr, vP as Vt, wI as W, q as Wn, sa as Wr, hP as Wt, dI as X, zl as Xn, ea as Xr, nP as Xt, fI as Y, Bl as Yn, Qi as Yr, rP as Yt, uI as Z, Fl as Zn, Yi as Zr, tP as Zt, yL as _, Di as _i, Nb as _n, dl as _r, wF as _t, FL as a, Vi as ai, WN as an, Tl as ar, ZF as at, gL as b, ki as bi, Ob as bn, Ds as br, bF as bt, ML as c, Bi as ci, LN as cn, xl as cr, JF as ct, TL as d, ji as di, Fw as dn, vl as dr, HF as dt, Ki as ei, QN as en, Ml as er, oI as et, wL as f, Mi as fi, Pw as fn, _l as fr, VF as ft, bL as g, Ni as gi, Pb as gn, fl as gr, OF as gt, xL as h, Fi as hi, AS as hn, pl as hr, kF as ht, IL as i, Ui as ii, GN as in, El as ir, $F as it, ZI as j, Vf as jn, _a as jr, GP as jt, eL as k, Wf as kn, Wa as kr, XP as kt, DL as l, Ri as li, IN as ln, bl as lr, GF as lt, SL as m, Pi as mi, zC as mn, ml as mr, AF as mt, BL as n, Gi as ni, YN as nn, kl as nr, nI as nt, PL as o, Hi as oi, VN as on, wl as or, XF as ot, CL as p, Ii as pi, Nw as pn, hl as pr, jF as pt, vI as q, Hl as qn, Zi as qr, oP as qt, zL as r, qi as ri, JN as rn, Dl as rr, tI as rt, NL as s, Li as si, BN as sn, Sl as sr, YF as st, VL as t, Wi as ti, ZN as tn, Al as tr, iI as tt, EL as u, zi as ui, Iw as un, yl as ur, WF as ut, vL as v, Oi as vi, Mb as vn, ks as vr, CF as vt, oL as w, wi, wb as wn, Za as wr, sF as wt, lL as x, Ti as xi, Db as xn, ws as xr, yF as xt, _L as y, Ei as yi, jb as yn, Os as yr, SF as yt, II as z, rf as zn, ca as zr, SP as zt };
22221
22221
 
22222
- //# sourceMappingURL=WorkspaceArea-CAti6dTA.js.map
22222
+ //# sourceMappingURL=WorkspaceArea-7bydz9m-.js.map