dbf-mirador 4.2.5 → 4.3.0-testing2

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.
Files changed (53) hide show
  1. package/README.md +17 -80
  2. package/dist/AudioViewer-tRH73pbt.js +40 -0
  3. package/dist/AudioViewer-tRH73pbt.js.map +1 -0
  4. package/dist/{CommentSharp-NUjBddtU.js → CommentSharp-DaW0oBJy.js} +40 -43
  5. package/dist/CommentSharp-DaW0oBJy.js.map +1 -0
  6. package/dist/{FailedImageContext-CMg_Behz.js → FailedImageContext-DYZ9cZx9.js} +6 -6
  7. package/dist/FailedImageContext-DYZ9cZx9.js.map +1 -0
  8. package/dist/GalleryView-DyLH1kk0.js +176 -0
  9. package/dist/GalleryView-DyLH1kk0.js.map +1 -0
  10. package/dist/OpenSeadragonViewer-CBmX5sYE.js +7852 -0
  11. package/dist/OpenSeadragonViewer-CBmX5sYE.js.map +1 -0
  12. package/dist/{PluginHook-D8r77ZZu.js → PluginHook-DWFCXIIp.js} +3 -3
  13. package/dist/PluginHook-DWFCXIIp.js.map +1 -0
  14. package/dist/SelectCollection-BK9ZDkK3.js +67 -0
  15. package/dist/SelectCollection-BK9ZDkK3.js.map +1 -0
  16. package/dist/TextViewer-D_1qzQE4.js +38 -0
  17. package/dist/TextViewer-D_1qzQE4.js.map +1 -0
  18. package/dist/VideoViewer-DzNjgLWE.js +42 -0
  19. package/dist/VideoViewer-DzNjgLWE.js.map +1 -0
  20. package/dist/{WindowCanvasNavigationControls-BTkfeaAf.js → WindowCanvasNavigationControls-D2uLtL_A.js} +7 -7
  21. package/dist/WindowCanvasNavigationControls-D2uLtL_A.js.map +1 -0
  22. package/dist/WindowViewer-BW0_w7wv.js +27 -0
  23. package/dist/WindowViewer-BW0_w7wv.js.map +1 -0
  24. package/dist/WorkspaceArea-C0RjqnIL.js +22222 -0
  25. package/dist/WorkspaceArea-C0RjqnIL.js.map +1 -0
  26. package/dist/{canvas-BqYerOKD.js → canvas-2ACcnS9Y.js} +2 -2
  27. package/dist/{canvas-BqYerOKD.js.map → canvas-2ACcnS9Y.js.map} +1 -1
  28. package/dist/{canvases-DU_CwLPL.js → canvases-DTR37lo-.js} +190 -90
  29. package/dist/canvases-DTR37lo-.js.map +1 -0
  30. package/dist/{getters-_7oCN-rP.js → getters-B4oepJRC.js} +257 -280
  31. package/dist/getters-B4oepJRC.js.map +1 -0
  32. package/dist/{index.module-D9wVojda.js → index.module-CgUBfaXx.js} +6 -6
  33. package/dist/index.module-CgUBfaXx.js.map +1 -0
  34. package/dist/mirador.es.js +8778 -39138
  35. package/dist/mirador.es.js.map +1 -1
  36. package/dist/mirador.min.js +75 -74
  37. package/dist/mirador.min.js.map +1 -1
  38. package/dist/{react-error-boundary.esm-B_pT-oCS.js → react-error-boundary.esm-ByHqCaxk.js} +2 -2
  39. package/dist/react-error-boundary.esm-ByHqCaxk.js.map +1 -0
  40. package/dist/{visuallyHidden-qk1C0S9l.js → visuallyHidden-C4mhQkB0.js} +4 -4
  41. package/dist/visuallyHidden-C4mhQkB0.js.map +1 -0
  42. package/dist/{window-BYD7F_2a.js → window-COQOIAli.js} +2 -2
  43. package/dist/{window-BYD7F_2a.js.map → window-COQOIAli.js.map} +1 -1
  44. package/package.json +3 -2
  45. package/dist/CommentSharp-NUjBddtU.js.map +0 -1
  46. package/dist/FailedImageContext-CMg_Behz.js.map +0 -1
  47. package/dist/PluginHook-D8r77ZZu.js.map +0 -1
  48. package/dist/WindowCanvasNavigationControls-BTkfeaAf.js.map +0 -1
  49. package/dist/canvases-DU_CwLPL.js.map +0 -1
  50. package/dist/getters-_7oCN-rP.js.map +0 -1
  51. package/dist/index.module-D9wVojda.js.map +0 -1
  52. package/dist/react-error-boundary.esm-B_pT-oCS.js.map +0 -1
  53. package/dist/visuallyHidden-qk1C0S9l.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { at as e, ft as t, it as n, p as r, ut as i } from "./getters-_7oCN-rP.js";
1
+ import { at as e, ft as t, it as n, p as r, ut as i } from "./getters-B4oepJRC.js";
2
2
  import { cloneElement as a, createElement as o, forwardRef as s, isValidElement as c, useContext as l } from "react";
3
- //#region ../node_modules/classnames/index.js
3
+ //#region node_modules/classnames/index.js
4
4
  var u = /* @__PURE__ */ i(((e, t) => {
5
5
  (function() {
6
6
  var e = {}.hasOwnProperty;
@@ -51,4 +51,4 @@ m.displayName = "PluginHook", m.propTypes = {
51
51
  //#endregion
52
52
  export { u as i, p as n, d as r, m as t };
53
53
 
54
- //# sourceMappingURL=PluginHook-D8r77ZZu.js.map
54
+ //# sourceMappingURL=PluginHook-DWFCXIIp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PluginHook-DWFCXIIp.js","names":[],"sources":["../node_modules/classnames/index.js","../src/config/css-ns.js","../src/extend/usePlugins.js","../src/components/PluginHook.jsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import settings from './settings';\n/**\n * export ns - sets up css namespacing for everything to be `mirador-`\n */\nconst ns = (classNames) =>\n [classNames].flat()\n .map((className) => [settings.createGenerateClassNameOptions.productionPrefix, className].join('-'))\n .join(' ');\n\nexport default ns;\n","import { useContext } from 'react';\nimport PluginContext from './PluginContext';\n\n/** withPlugins should be the innermost HOC */\nexport function usePlugins(targetName) {\n const pluginMap = useContext(PluginContext);\n\n const plugins = (pluginMap || {})[targetName];\n\n const PluginComponents = (plugins?.add || []).map((plugin) => plugin.component);\n\n return { PluginComponents };\n}\n","/* eslint-disable react/no-array-index-key */\nimport { forwardRef, isValidElement, cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { usePlugins } from '../extend/usePlugins';\n\n/** Renders plugins */\nexport const PluginHook = forwardRef(({ classes = {}, targetName, ...otherProps }, ref) => {\n const { PluginComponents } = usePlugins(targetName);\n\n return PluginComponents\n ? PluginComponents.map((PluginComponent, index) =>\n isValidElement(PluginComponent) ? (\n cloneElement(PluginComponent, { ...otherProps, ref })\n ) : (\n <PluginComponent ref={ref} {...otherProps} key={index} />\n ),\n )\n : null;\n});\n\nPluginHook.displayName = 'PluginHook';\n\nPluginHook.propTypes = {\n // eslint-disable-next-line react/require-default-props\n classes: PropTypes.object,\n targetName: PropTypes.string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AE,oBANS,EAAW,CAEZ,KAAa,CAAC,EAAA,CAAG,EAER,EAAS,OAAO,CAAC,EAAA,CAAG,KAAK,MAAW,EAAO,SAE5D,EAAiB;AAC5B;;;ACNA,IAAa,IAAa,GAAY,EAAE,aAAU,CAAC,GAAG,eAAY,GAAG,KAAc,MAAQ;CACzF,IAAM,EAAE,wBAAqB,EAAW,CAAU;CAElD,OAAO,IACH,EAAiB,KAAK,GAAiB,MACrC,EAAe,CAAe,IAC5B,EAAa,GAAiB;EAAE,GAAG;EAAY;CAAI,CAAC,IAEpD,kBAAC,GAAD;EAAsB;EAAK,GAAI;EAAY,KAAK;CAAQ,CAAA,CAE5D,IACA;AACN,CAAC;AAED,EAAW,cAAc,cAEzB,EAAW,YAAY;CAErB,SAAS,EAAA,QAAU;CACnB,YAAY,EAAA,QAAU,OAAO;AAC/B"}
@@ -0,0 +1,67 @@
1
+ import { U as e, a as t, at as n, dt as r, ft as i, g as a, st as o } from "./getters-B4oepJRC.js";
2
+ import { u as s } from "./window-COQOIAli.js";
3
+ import { t as c } from "./createSvgIcon-Cwt8YPfm.js";
4
+ import { useCallback as l } from "react";
5
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
6
+ import { useTranslation as f } from "react-i18next";
7
+ import p from "@mui/material/Typography";
8
+ import m from "@mui/material/Button";
9
+ import h from "@mui/material/Stack";
10
+ import g from "@mui/material/Grid";
11
+ //#region node_modules/@mui/icons-material/esm/ListSharp.js
12
+ var _ = /* @__PURE__ */ i(n(), 1), v = c(/*#__PURE__*/ u("path", { d: "M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7zm-4 6h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z" }), "ListSharp");
13
+ //#endregion
14
+ //#region src/components/SelectCollection.jsx
15
+ function y({ collectionPath: e = [], manifestId: t = null, showCollectionDialog: n, windowId: r = null }) {
16
+ let { t: i } = f(), a = l(() => {
17
+ n(t, e.slice(0, -1), r);
18
+ }, [
19
+ e,
20
+ t,
21
+ n,
22
+ r
23
+ ]);
24
+ return /* @__PURE__ */ u(g, {
25
+ container: !0,
26
+ sx: {
27
+ alignContent: "center",
28
+ justifyContent: "center",
29
+ width: "100%"
30
+ },
31
+ children: /* @__PURE__ */ d(h, { children: [/* @__PURE__ */ u(p, {
32
+ variant: "h4",
33
+ component: "p",
34
+ sx: {
35
+ mb: 2,
36
+ textAlign: "center"
37
+ },
38
+ children: /* @__PURE__ */ u("em", { children: i("noItemSelected") })
39
+ }), /* @__PURE__ */ u(m, {
40
+ "aria-label": "show collection",
41
+ color: "primary",
42
+ variant: "contained",
43
+ onClick: a,
44
+ startIcon: /* @__PURE__ */ u(v, {}),
45
+ children: i("showCollection")
46
+ })] })
47
+ });
48
+ }
49
+ y.propTypes = {
50
+ collectionPath: _.default.arrayOf(_.default.string),
51
+ manifestId: _.default.string,
52
+ showCollectionDialog: _.default.func.isRequired,
53
+ windowId: _.default.string
54
+ };
55
+ //#endregion
56
+ //#region src/containers/SelectCollection.js
57
+ var b = /* @__PURE__ */ r({ default: () => x }), x = e(o((e, { windowId: n }) => {
58
+ let { collectionPath: r, manifestId: i } = t(e, { windowId: n }) || {};
59
+ return {
60
+ collectionPath: r,
61
+ manifestId: i
62
+ };
63
+ }, { showCollectionDialog: s }), a("SelectCollection"))(y);
64
+ //#endregion
65
+ export { b as n, y as r, x as t };
66
+
67
+ //# sourceMappingURL=SelectCollection-BK9ZDkK3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectCollection-BK9ZDkK3.js","names":["createSvgIcon"],"sources":["../node_modules/@mui/icons-material/esm/ListSharp.js","../src/components/SelectCollection.jsx","../src/containers/SelectCollection.js"],"sourcesContent":["\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7zm-4 6h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z\"\n}), 'ListSharp');","import { useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@mui/material/Button';\nimport Grid from '@mui/material/Grid';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport ListSharpIcon from '@mui/icons-material/ListSharp';\nimport { useTranslation } from 'react-i18next';\n\n/**\n *\n */\nexport function SelectCollection({ collectionPath = [], manifestId = null, showCollectionDialog, windowId = null }) {\n const { t } = useTranslation();\n const openCollectionDialog = useCallback(() => {\n showCollectionDialog(manifestId, collectionPath.slice(0, -1), windowId);\n }, [collectionPath, manifestId, showCollectionDialog, windowId]);\n\n return (\n <Grid container sx={{ alignContent: 'center', justifyContent: 'center', width: '100%' }}>\n <Stack>\n <Typography variant=\"h4\" component=\"p\" sx={{ mb: 2, textAlign: 'center' }}>\n <em>{t('noItemSelected')}</em>\n </Typography>\n <Button\n aria-label=\"show collection\"\n color=\"primary\"\n variant=\"contained\"\n onClick={openCollectionDialog}\n startIcon={<ListSharpIcon />}\n >\n {t('showCollection')}\n </Button>\n </Stack>\n </Grid>\n );\n}\n\nSelectCollection.propTypes = {\n collectionPath: PropTypes.arrayOf(PropTypes.string),\n manifestId: PropTypes.string,\n showCollectionDialog: PropTypes.func.isRequired,\n windowId: PropTypes.string,\n};\n","import { compose } from 'redux';\nimport { connect } from 'react-redux';\nimport * as actions from '../state/actions';\nimport { withPlugins } from '../extend/withPlugins';\nimport { getWindow } from '../state/selectors';\nimport { SelectCollection } from '../components/SelectCollection';\n\n/** */\nconst mapStateToProps = (state, { windowId }) => {\n const { collectionPath, manifestId } = getWindow(state, { windowId }) || {};\n\n return {\n collectionPath,\n manifestId,\n };\n};\n\nconst mapDispatchToProps = {\n showCollectionDialog: actions.showCollectionDialog,\n};\n\nconst enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('SelectCollection'));\n\nexport default enhance(SelectCollection);\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;mCAIA,IAAeA,EAA2B,gBAAK,QAAQ,EACrD,GAAG,uJACL,CAAC,GAAG,WAAW;;;ACMf,SAAgB,EAAiB,EAAE,oBAAiB,CAAC,GAAG,gBAAa,MAAM,yBAAsB,cAAW,QAAQ;CAClH,IAAM,EAAE,SAAM,EAAe,GACvB,IAAuB,QAAkB;EAC7C,EAAqB,GAAY,EAAe,MAAM,GAAG,EAAE,GAAG,CAAQ;CACxE,GAAG;EAAC;EAAgB;EAAY;EAAsB;CAAQ,CAAC;CAE/D,OACE,kBAAC,GAAD;EAAM,WAAA;EAAU,IAAI;GAAE,cAAc;GAAU,gBAAgB;GAAU,OAAO;EAAO;EACpF,UAAA,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;GAAY,SAAQ;GAAK,WAAU;GAAI,IAAI;IAAE,IAAI;IAAG,WAAW;GAAS;GACtE,UAAA,kBAAC,MAAD,EAAA,UAAK,EAAE,gBAAgB,EAAM,CAAA;EACnB,CAAA,GACZ,kBAAC,GAAD;GACE,cAAW;GACX,OAAM;GACN,SAAQ;GACR,SAAS;GACT,WAAW,kBAAC,GAAD,CAAgB,CAAA;GAE1B,UAAA,EAAE,gBAAgB;EACb,CAAA,CACH,EAAA,CAAA;CACH,CAAA;AAEV;AAEA,EAAiB,YAAY;CAC3B,gBAAgB,EAAA,QAAU,QAAQ,EAAA,QAAU,MAAM;CAClD,YAAY,EAAA,QAAU;CACtB,sBAAsB,EAAA,QAAU,KAAK;CACrC,UAAU,EAAA,QAAU;AACtB;;;iDCpBA,IAFgB,EAAQ,GAbC,GAAO,EAAE,kBAAe;CAC/C,IAAM,EAAE,mBAAgB,kBAAe,EAAU,GAAO,EAAE,YAAS,CAAC,KAAK,CAAC;CAE1E,OAAO;EACL;EACA;CACF;AACF,GAMiD,EAHzB,wBAGyB,CAAkB,GAAG,EAAY,kBAAkB,CAErF,CAAA,CAAQ,CAAgB"}
@@ -0,0 +1,38 @@
1
+ import { U as e, at as t, dt as n, ft as r, g as i, st as a } from "./getters-B4oepJRC.js";
2
+ import { h as o, mt as s } from "./canvases-DTR37lo-.js";
3
+ import { t as c } from "./WindowCanvasNavigationControls-D2uLtL_A.js";
4
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
+ import { styled as d } from "@mui/material/styles";
6
+ //#region src/components/TextViewer.jsx
7
+ var f = /* @__PURE__ */ r(t(), 1), p = d("div")(() => ({
8
+ alignItems: "center",
9
+ display: "flex",
10
+ width: "100%"
11
+ })), m = d("div")(() => ({
12
+ maxHeight: "100%",
13
+ width: "100%"
14
+ }));
15
+ function h({ textOptions: e = {}, textResources: t = [], windowId: n }) {
16
+ return /* @__PURE__ */ l(p, { children: /* @__PURE__ */ u(m, {
17
+ ...e,
18
+ children: [t.map((e) => /* @__PURE__ */ l("source", {
19
+ src: e.id,
20
+ type: e.getFormat()
21
+ }, e.id)), /* @__PURE__ */ l(c, { windowId: n })]
22
+ }) });
23
+ }
24
+ h.propTypes = {
25
+ textOptions: f.default.object,
26
+ textResources: f.default.arrayOf(f.default.object),
27
+ windowId: f.default.string.isRequired
28
+ };
29
+ //#endregion
30
+ //#region src/containers/TextViewer.js
31
+ var g = /* @__PURE__ */ n({ default: () => _ }), _ = e(a((e, { windowId: t }) => ({
32
+ textOptions: s(e).textOptions,
33
+ textResources: o(e, { windowId: t }) || []
34
+ }), null), i("TextViewer"))(h);
35
+ //#endregion
36
+ export { g as n, h as r, _ as t };
37
+
38
+ //# sourceMappingURL=TextViewer-D_1qzQE4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextViewer-D_1qzQE4.js","names":[],"sources":["../src/components/TextViewer.jsx","../src/containers/TextViewer.js"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport PropTypes from 'prop-types';\nimport WindowCanvasNavigationControls from '../containers/WindowCanvasNavigationControls';\n\nconst StyledContainer = styled('div')(() => ({\n alignItems: 'center',\n display: 'flex',\n width: '100%',\n}));\n\nconst StyledText = styled('div')(() => ({\n maxHeight: '100%',\n width: '100%',\n}));\n\n/**\n * Simple divs with canvas navigation, which should mimic v3 fallthrough to WindowViewer\n * with non-image resources and provide a target for plugin overrides with minimal disruption.\n */\nexport function TextViewer({ textOptions = {}, textResources = [], windowId }) {\n return (\n <StyledContainer>\n <StyledText {...textOptions}>\n {textResources.map((text) => (\n <source key={text.id} src={text.id} type={text.getFormat()} />\n ))}\n <WindowCanvasNavigationControls windowId={windowId} />\n </StyledText>\n </StyledContainer>\n );\n}\n\nTextViewer.propTypes = {\n textOptions: PropTypes.object,\n textResources: PropTypes.arrayOf(PropTypes.object),\n windowId: PropTypes.string.isRequired,\n};\n","import { compose } from 'redux';\nimport { connect } from 'react-redux';\nimport { withPlugins } from '../extend/withPlugins';\nimport { getConfig, getVisibleCanvasTextResources } from '../state/selectors';\nimport { TextViewer } from '../components/TextViewer';\n\n/** */\nconst mapStateToProps = (state, { windowId }) => ({\n textOptions: getConfig(state).textOptions,\n textResources: getVisibleCanvasTextResources(state, { windowId }) || [],\n});\n\nconst enhance = compose(\n connect(mapStateToProps, null),\n withPlugins('TextViewer'),\n // further HOC go here\n);\n\nexport default enhance(TextViewer);\n"],"mappings":";;;;;;mCAIM,IAAkB,EAAO,KAAK,CAAC,QAAQ;CAC3C,YAAY;CACZ,SAAS;CACT,OAAO;AACT,EAAE,GAEI,IAAa,EAAO,KAAK,CAAC,QAAQ;CACtC,WAAW;CACX,OAAO;AACT,EAAE;AAMF,SAAgB,EAAW,EAAE,iBAAc,CAAC,GAAG,mBAAgB,CAAC,GAAG,eAAY;CAC7E,OACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EAAY,GAAI;EAAhB,UAAA,CACG,EAAc,KAAK,MAClB,kBAAC,UAAD;GAAsB,KAAK,EAAK;GAAI,MAAM,EAAK,UAAU;EAAI,GAAhD,EAAK,EAA2C,CAC9D,GACD,kBAAC,GAAD,EAA0C,YAAW,CAAA,CAC3C;CACG,CAAA,EAAA,CAAA;AAErB;AAEA,EAAW,YAAY;CACrB,aAAa,EAAA,QAAU;CACvB,eAAe,EAAA,QAAU,QAAQ,EAAA,QAAU,MAAM;CACjD,UAAU,EAAA,QAAU,OAAO;AAC7B;;;iDClBA,IANgB,EACd,GANuB,GAAO,EAAE,mBAAgB;CAChD,aAAa,EAAU,CAAK,CAAC,CAAC;CAC9B,eAAe,EAA8B,GAAO,EAAE,YAAS,CAAC,KAAK,CAAC;AACxE,IAG2B,IAAI,GAC7B,EAAY,YAAY,CAIX,CAAA,CAAQ,CAAU"}
@@ -0,0 +1,42 @@
1
+ import { U as e, at as t, dt as n, ft as r, g as i, st as a } from "./getters-B4oepJRC.js";
2
+ import { f as o, g as s, mt as c } from "./canvases-DTR37lo-.js";
3
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
4
+ import { styled as d } from "@mui/material/styles";
5
+ //#region src/components/VideoViewer.jsx
6
+ var f = /* @__PURE__ */ r(t(), 1), p = d("div")(() => ({
7
+ alignItems: "center",
8
+ display: "flex",
9
+ width: "100%"
10
+ })), m = d("video")(() => ({
11
+ maxHeight: "100%",
12
+ width: "100%"
13
+ }));
14
+ function h({ captions: e = [], videoOptions: t = {}, videoResources: n = [] }) {
15
+ return /* @__PURE__ */ l(p, { children: /* @__PURE__ */ u(m, {
16
+ ...t,
17
+ children: [n.map((e) => /* @__PURE__ */ l("source", {
18
+ src: e.id,
19
+ type: e.getFormat()
20
+ }, e.io)), e.map((e) => /* @__PURE__ */ l("track", {
21
+ src: e.id,
22
+ label: e.getDefaultLabel(),
23
+ srcLang: e.getProperty("language")
24
+ }, e.id))]
25
+ }) });
26
+ }
27
+ h.propTypes = {
28
+ captions: f.default.arrayOf(f.default.object),
29
+ videoOptions: f.default.object,
30
+ videoResources: f.default.arrayOf(f.default.object)
31
+ };
32
+ //#endregion
33
+ //#region src/containers/VideoViewer.js
34
+ var g = /* @__PURE__ */ n({ default: () => _ }), _ = e(a((e, { windowId: t }) => ({
35
+ captions: o(e, { windowId: t }) || [],
36
+ videoOptions: c(e).videoOptions,
37
+ videoResources: s(e, { windowId: t }) || []
38
+ }), null), i("VideoViewer"))(h);
39
+ //#endregion
40
+ export { g as n, h as r, _ as t };
41
+
42
+ //# sourceMappingURL=VideoViewer-DzNjgLWE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoViewer-DzNjgLWE.js","names":[],"sources":["../src/components/VideoViewer.jsx","../src/containers/VideoViewer.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\n\nconst StyledContainer = styled('div')(() => ({\n alignItems: 'center',\n display: 'flex',\n width: '100%',\n}));\n\nconst StyledVideo = styled('video')(() => ({\n maxHeight: '100%',\n width: '100%',\n}));\n\n/** */\nexport function VideoViewer({ captions = [], videoOptions = {}, videoResources = [] }) {\n return (\n <StyledContainer>\n <StyledVideo {...videoOptions}>\n {videoResources.map((video) => (\n <source key={video.io} src={video.id} type={video.getFormat()} />\n ))}\n {captions.map((caption) => (\n <track key={caption.id} src={caption.id} label={caption.getDefaultLabel()} srcLang={caption.getProperty('language')} />\n ))}\n </StyledVideo>\n </StyledContainer>\n );\n}\n\nVideoViewer.propTypes = {\n captions: PropTypes.arrayOf(PropTypes.object),\n videoOptions: PropTypes.object,\n videoResources: PropTypes.arrayOf(PropTypes.object),\n};\n","import { connect } from 'react-redux';\nimport { compose } from 'redux';\nimport { withPlugins } from '../extend/withPlugins';\nimport { VideoViewer } from '../components/VideoViewer';\nimport { getConfig, getVisibleCanvasCaptions, getVisibleCanvasVideoResources } from '../state/selectors';\n\n/** */\nconst mapStateToProps = (state, { windowId }) => ({\n captions: getVisibleCanvasCaptions(state, { windowId }) || [],\n videoOptions: getConfig(state).videoOptions,\n videoResources: getVisibleCanvasVideoResources(state, { windowId }) || [],\n});\n\nconst enhance = compose(connect(mapStateToProps, null), withPlugins('VideoViewer'));\n\nexport default enhance(VideoViewer);\n"],"mappings":";;;;;mCAGM,IAAkB,EAAO,KAAK,CAAC,QAAQ;CAC3C,YAAY;CACZ,SAAS;CACT,OAAO;AACT,EAAE,GAEI,IAAc,EAAO,OAAO,CAAC,QAAQ;CACzC,WAAW;CACX,OAAO;AACT,EAAE;AAGF,SAAgB,EAAY,EAAE,cAAW,CAAC,GAAG,kBAAe,CAAC,GAAG,oBAAiB,CAAC,KAAK;CACrF,OACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EAAa,GAAI;EAAjB,UAAA,CACG,EAAe,KAAK,MACnB,kBAAC,UAAD;GAAuB,KAAK,EAAM;GAAI,MAAM,EAAM,UAAU;EAAI,GAAnD,EAAM,EAA6C,CACjE,GACA,EAAS,KAAK,MACb,kBAAC,SAAD;GAAwB,KAAK,EAAQ;GAAI,OAAO,EAAQ,gBAAgB;GAAG,SAAS,EAAQ,YAAY,UAAU;EAAI,GAA1G,EAAQ,EAAkG,CACvH,CACU;CACE,CAAA,EAAA,CAAA;AAErB;AAEA,EAAY,YAAY;CACtB,UAAU,EAAA,QAAU,QAAQ,EAAA,QAAU,MAAM;CAC5C,cAAc,EAAA,QAAU;CACxB,gBAAgB,EAAA,QAAU,QAAQ,EAAA,QAAU,MAAM;AACpD;;;iDCnBA,IAFgB,EAAQ,GANC,GAAO,EAAE,mBAAgB;CAChD,UAAU,EAAyB,GAAO,EAAE,YAAS,CAAC,KAAK,CAAC;CAC5D,cAAc,EAAU,CAAK,CAAC,CAAC;CAC/B,gBAAgB,EAA+B,GAAO,EAAE,YAAS,CAAC,KAAK,CAAC;AAC1E,IAEiD,IAAI,GAAG,EAAY,aAAa,CAElE,CAAA,CAAQ,CAAW"}
@@ -1,9 +1,9 @@
1
- import { U as e, at as t, ft as n, g as r, i, l as a, st as o } from "./getters-_7oCN-rP.js";
2
- import { I as s, M as c, a as l, c as u, l as d, s as f, u as p, yt as m } from "./canvases-DU_CwLPL.js";
3
- import { i as h, n as g, r as _ } from "./canvas-BqYerOKD.js";
4
- import { i as v, r as y, t as b } from "./PluginHook-D8r77ZZu.js";
1
+ import { U as e, at as t, ft as n, g as r, i, l as a, st as o } from "./getters-B4oepJRC.js";
2
+ import { I as s, M as c, a as l, c as u, l as d, s as f, u as p, yt as m } from "./canvases-DTR37lo-.js";
3
+ import { i as h, n as g, r as _ } from "./canvas-2ACcnS9Y.js";
4
+ import { i as v, r as y, t as b } from "./PluginHook-DWFCXIIp.js";
5
5
  import { t as x } from "./createSvgIcon-Cwt8YPfm.js";
6
- import { i as S, n as C, r as w, t as T } from "./visuallyHidden-qk1C0S9l.js";
6
+ import { i as S, n as C, r as w, t as T } from "./visuallyHidden-C4mhQkB0.js";
7
7
  import { forwardRef as E } from "react";
8
8
  import { jsx as D, jsxs as O } from "react/jsx-runtime";
9
9
  import k from "@mui/material/Paper";
@@ -13,7 +13,7 @@ import N from "@mui/material/Typography";
13
13
  import P from "@mui/material/SvgIcon";
14
14
  import F from "@mui/material/Stack";
15
15
  import I from "@mui/material/Divider";
16
- //#region ../node_modules/@mui/icons-material/esm/AddCircleOutlineSharp.js
16
+ //#region node_modules/@mui/icons-material/esm/AddCircleOutlineSharp.js
17
17
  var L = /* @__PURE__ */ n(t(), 1), R = /* @__PURE__ */ n(v(), 1), z = w(), B = x(/*#__PURE__*/ D("path", { d: "M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" }), "AddCircleOutlineSharp"), V = x(/*#__PURE__*/ D("path", { d: "M7 11v2h10v-2zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" }), "RemoveCircleOutlineSharp");
18
18
  //#endregion
19
19
  //#region src/components/icons/RestoreZoomIcon.jsx
@@ -239,4 +239,4 @@ var ee = e(o((e, { windowId: t }) => ({
239
239
  //#endregion
240
240
  export { J as a, W as c, X as i, H as l, $ as n, q as o, Z as r, G as s, ee as t };
241
241
 
242
- //# sourceMappingURL=WindowCanvasNavigationControls-BTkfeaAf.js.map
242
+ //# sourceMappingURL=WindowCanvasNavigationControls-D2uLtL_A.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WindowCanvasNavigationControls-D2uLtL_A.js","names":["createSvgIcon","createSvgIcon","createSvgIcon"],"sources":["../node_modules/@mui/icons-material/esm/AddCircleOutlineSharp.js","../node_modules/@mui/icons-material/esm/RemoveCircleOutlineSharp.js","../src/components/icons/RestoreZoomIcon.jsx","../src/components/ZoomControls.jsx","../src/containers/ZoomControls.js","../src/components/ViewerInfo.jsx","../src/containers/ViewerInfo.js","../node_modules/@mui/icons-material/esm/PlayCircleOutlineSharp.js","../src/components/ViewerNavigation.jsx","../src/containers/ViewerNavigation.js","../src/components/WindowCanvasNavigationControls.jsx","../src/containers/WindowCanvasNavigationControls.js"],"sourcesContent":["\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8\"\n}), 'AddCircleOutlineSharp');","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M7 11v2h10v-2zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8\"\n}), 'RemoveCircleOutlineSharp');","import SvgIcon from '@mui/material/SvgIcon';\n\n/**\n * RestoreZoomIcon ~\n */\nexport default function RestoreZoomIcon(props) {\n return (\n <SvgIcon {...props}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n <path d=\"M6,15H9v3h2V13H6Zm9-6V6H13v5h5V9Z\" />\n <path d=\"M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8,8,8,0,0,1-8,8Z\" />\n </svg>\n </SvgIcon>\n );\n}\n","import AddCircleIcon from '@mui/icons-material/AddCircleOutlineSharp';\nimport RemoveCircleIcon from '@mui/icons-material/RemoveCircleOutlineSharp';\nimport { styled } from '@mui/material/styles';\nimport PropTypes from 'prop-types';\nimport { useTranslation } from 'react-i18next';\nimport RestoreZoomIcon from './icons/RestoreZoomIcon';\nimport MiradorMenuButton from '../containers/MiradorMenuButton';\n\nconst StyledZoomControlsWrapper = styled('div')({\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n});\n\n/**\n */\nexport function ZoomControls({ windowId = '', updateViewport = () => {}, viewer = {}, zoomToWorld }) {\n const { t } = useTranslation();\n /** */\n const handleZoomInClick = () => {\n updateViewport(windowId, {\n zoom: viewer.zoom * 2,\n });\n };\n\n /** */\n const handleZoomOutClick = () => {\n updateViewport(windowId, {\n zoom: viewer.zoom / 2,\n });\n };\n\n return (\n <StyledZoomControlsWrapper>\n <MiradorMenuButton aria-label={t('zoomIn')} onClick={handleZoomInClick}>\n <AddCircleIcon />\n </MiradorMenuButton>\n <MiradorMenuButton aria-label={t('zoomOut')} onClick={handleZoomOutClick}>\n <RemoveCircleIcon />\n </MiradorMenuButton>\n <MiradorMenuButton aria-label={t('zoomReset')} onClick={() => zoomToWorld(false)}>\n <RestoreZoomIcon />\n </MiradorMenuButton>\n </StyledZoomControlsWrapper>\n );\n}\n\nZoomControls.propTypes = {\n updateViewport: PropTypes.func,\n viewer: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number,\n zoom: PropTypes.number,\n }),\n windowId: PropTypes.string,\n zoomToWorld: PropTypes.func.isRequired,\n};\n","import { compose } from 'redux';\nimport { connect } from 'react-redux';\nimport { withPlugins } from '../extend/withPlugins';\nimport * as actions from '../state/actions';\nimport { getViewer } from '../state/selectors';\nimport { ZoomControls } from '../components/ZoomControls';\n\n/**\n * mapStateToProps - to hook up connect\n * @memberof Workspace\n * @private\n */\nconst mapStateToProps = (state, { windowId }) => ({\n viewer: getViewer(state, { windowId }),\n});\n\n/**\n * mapDispatchToProps - used to hook up connect to action creators\n * @memberof Workspace\n * @private\n */\nconst mapDispatchToProps = { updateViewport: actions.updateViewport };\n\nconst enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('ZoomControls'));\n\nexport default enhance(ZoomControls);\n","import Typography from '@mui/material/Typography';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport classNames from 'classnames';\nimport { useTranslation } from 'react-i18next';\nimport ns from '../config/css-ns';\n\nconst StyledOsdInfo = styled('div')(({ theme }) => ({\n overflow: 'hidden',\n boxSizing: 'border-box',\n paddingBottom: 0.5,\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n textOverflow: 'ellipsis',\n unicodeBidi: 'plaintext',\n whiteSpace: 'nowrap',\n width: '100%',\n}));\n\n/**\n *\n */\nexport function ViewerInfo({ canvasCount, canvasIndex, canvasLabel = undefined }) {\n const { t } = useTranslation();\n return (\n <StyledOsdInfo className={classNames(ns('osd-info'))}>\n <Typography\n variant=\"caption\"\n className={ns('canvas-count')}\n role=\"status\"\n sx={{\n display: 'inline',\n }}\n >\n {t('pagination', { current: canvasIndex + 1, total: canvasCount })}\n </Typography>\n <Typography\n variant=\"caption\"\n className={ns('canvas-label')}\n role=\"status\"\n sx={{\n display: 'inline',\n }}\n >\n {canvasLabel && ` • ${canvasLabel}`}\n </Typography>\n </StyledOsdInfo>\n );\n}\n\nViewerInfo.propTypes = {\n canvasCount: PropTypes.number.isRequired,\n canvasIndex: PropTypes.number.isRequired,\n canvasLabel: PropTypes.string,\n};\n","import { compose } from 'redux';\nimport { connect } from 'react-redux';\nimport { withPlugins } from '../extend/withPlugins';\nimport { ViewerInfo } from '../components/ViewerInfo';\nimport { getCanvasLabel, getCanvases, getCanvasIndex, getCurrentCanvas } from '../state/selectors';\n\n/**\n * mapStateToProps - to hook up connect\n * @memberof Window\n * @private\n */\nconst mapStateToProps = (state, props) => {\n const { windowId } = props;\n const canvases = getCanvases(state, { windowId });\n const canvasIndex = getCanvasIndex(state, { windowId });\n const canvasId = (getCurrentCanvas(state, { windowId }) || {}).id;\n\n return {\n canvasCount: canvases.length,\n canvasIndex,\n canvasLabel: getCanvasLabel(state, {\n canvasId,\n windowId,\n }),\n };\n};\n\nconst enhance = compose(connect(mapStateToProps, null), withPlugins('ViewerInfo'));\n\nexport default enhance(ViewerInfo);\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"m10 16.5 6-4.5-6-4.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8\"\n}), 'PlayCircleOutlineSharp');","import NavigationIcon from '@mui/icons-material/PlayCircleOutlineSharp';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { useTranslation } from 'react-i18next';\nimport MiradorMenuButton from '../containers/MiradorMenuButton';\nimport ns from '../config/css-ns';\n\n/**\n */\nexport function ViewerNavigation({\n hasNextCanvas = false,\n hasPreviousCanvas = false,\n setNextCanvas = () => {},\n setPreviousCanvas = () => {},\n viewingDirection = '',\n}) {\n const { t } = useTranslation();\n let htmlDir = 'ltr';\n let previousIconStyle;\n let nextIconStyle;\n switch (viewingDirection) {\n case 'top-to-bottom':\n previousIconStyle = { transform: 'rotate(270deg)' };\n nextIconStyle = { transform: 'rotate(90deg)' };\n break;\n case 'bottom-to-top':\n previousIconStyle = { transform: 'rotate(90deg)' };\n nextIconStyle = { transform: 'rotate(270deg)' };\n break;\n case 'right-to-left':\n htmlDir = 'rtl';\n previousIconStyle = {};\n nextIconStyle = { transform: 'rotate(180deg)' };\n break;\n default:\n previousIconStyle = { transform: 'rotate(180deg)' };\n nextIconStyle = {};\n }\n\n return (\n <div className={classNames(ns('osd-navigation'))} dir={htmlDir}>\n <MiradorMenuButton\n aria-label={t('previousCanvas')}\n className={ns('previous-canvas-button')}\n disabled={!hasPreviousCanvas}\n onClick={() => {\n hasPreviousCanvas && setPreviousCanvas();\n }}\n >\n <NavigationIcon style={previousIconStyle} />\n </MiradorMenuButton>\n <MiradorMenuButton\n aria-label={t('nextCanvas')}\n className={ns('next-canvas-button')}\n disabled={!hasNextCanvas}\n onClick={() => {\n hasNextCanvas && setNextCanvas();\n }}\n >\n <NavigationIcon style={nextIconStyle} />\n </MiradorMenuButton>\n </div>\n );\n}\n\nViewerNavigation.propTypes = {\n hasNextCanvas: PropTypes.bool,\n hasPreviousCanvas: PropTypes.bool,\n setNextCanvas: PropTypes.func,\n setPreviousCanvas: PropTypes.func,\n viewingDirection: PropTypes.string,\n};\n","import { compose } from 'redux';\nimport { connect } from 'react-redux';\nimport { withPlugins } from '../extend/withPlugins';\nimport * as actions from '../state/actions';\nimport { getSequenceViewingDirection, getNextCanvasGrouping, getPreviousCanvasGrouping } from '../state/selectors';\nimport { ViewerNavigation } from '../components/ViewerNavigation';\n\n/** */\nconst mapStateToProps = (state, { windowId }) => ({\n hasNextCanvas: !!getNextCanvasGrouping(state, { windowId }),\n hasPreviousCanvas: !!getPreviousCanvasGrouping(state, { windowId }),\n viewingDirection: getSequenceViewingDirection(state, { windowId }),\n});\n\n/**\n * mapDispatchToProps - used to hook up connect to action creators\n * @memberof ManifestForm\n * @private\n */\nconst mapDispatchToProps = (dispatch, { windowId }) => ({\n setNextCanvas: (...args) => dispatch(actions.setNextCanvas(windowId)),\n setPreviousCanvas: (...args) => dispatch(actions.setPreviousCanvas(windowId)),\n});\n\nconst enhance = compose(\n connect(mapStateToProps, mapDispatchToProps),\n withPlugins('ViewerNavigation'),\n // further HOC go here\n);\n\nexport default enhance(ViewerNavigation);\n","import { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { alpha, styled } from '@mui/material/styles';\nimport classNames from 'classnames';\nimport Paper from '@mui/material/Paper';\nimport Stack from '@mui/material/Stack';\nimport Divider from '@mui/material/Divider';\nimport Typography from '@mui/material/Typography';\nimport { visuallyHidden } from '@mui/utils';\nimport { useElementSize } from '@custom-react-hooks/use-element-size';\nimport mergeRefs from 'merge-refs';\nimport ZoomControls from '../containers/ZoomControls';\nimport ViewerInfo from '../containers/ViewerInfo';\nimport ViewerNavigation from '../containers/ViewerNavigation';\nimport ns from '../config/css-ns';\nimport { PluginHook } from './PluginHook';\n\nconst Root = styled(Paper, { name: 'WindowCanvasNavigationControls', slot: 'root' })(({ theme }) => ({\n alignItems: 'center',\n backgroundColor: alpha(theme.palette.background.paper, 0.5),\n bottom: 0,\n cursor: 'default',\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'wrap',\n justifyContent: 'center',\n position: 'absolute',\n textAlign: 'center',\n width: '100%',\n zIndex: 50,\n}));\n\n/**\n * Represents the viewer controls in the mirador workspace.\n */\nexport const WindowCanvasNavigationControls = forwardRef(\n ({ showZoomControls = false, visible = true, windowId, zoomToWorld, ...rest }, ref) => {\n const [sizeRef, size] = useElementSize();\n\n const pluginProps = {\n showZoomControls,\n size,\n visible,\n windowId,\n ...rest,\n };\n /**\n * Determine if canvasNavControls are stacked (based on a hard-coded width)\n */\n const canvasNavControlsAreStacked = size && size.width && size.width <= 253;\n\n if (!visible)\n return (\n <Typography style={visuallyHidden} component=\"div\">\n <ViewerInfo windowId={windowId} />\n </Typography>\n );\n\n return (\n <Root\n square\n className={classNames(ns('canvas-nav'), canvasNavControlsAreStacked ? ns('canvas-nav-stacked') : null)}\n elevation={0}\n ref={mergeRefs(ref, sizeRef)}\n >\n <Stack\n direction={canvasNavControlsAreStacked ? 'column' : 'row'}\n divider={<Divider orientation={canvasNavControlsAreStacked ? 'horizontal' : 'vertical'} variant=\"middle\" flexItem />}\n spacing={0}\n >\n <ViewerNavigation windowId={windowId} />\n {showZoomControls && <ZoomControls windowId={windowId} zoomToWorld={zoomToWorld} />}\n </Stack>\n <ViewerInfo windowId={windowId} />\n\n <PluginHook targetName=\"WindowCanvasNavigationControls\" {...pluginProps} />\n </Root>\n );\n },\n);\n\nWindowCanvasNavigationControls.propTypes = {\n // eslint-disable-next-line react/require-default-props -- this rule doesn't detect default args through forwardRef's inner callback (see the default arg on line 37); https://github.com/jsx-eslint/eslint-plugin-react/issues/2856\n showZoomControls: PropTypes.bool,\n // eslint-disable-next-line react/require-default-props -- same forwardRef detection gap as above\n visible: PropTypes.bool,\n windowId: PropTypes.string.isRequired,\n zoomToWorld: PropTypes.func.isRequired,\n};\n\nWindowCanvasNavigationControls.displayName = 'WindowCanvasNavigationControls';\n","import { connect } from 'react-redux';\nimport { compose } from 'redux';\nimport { withPlugins } from '../extend/withPlugins';\nimport { getShowZoomControlsConfig, getWorkspace } from '../state/selectors';\nimport { WindowCanvasNavigationControls } from '../components/WindowCanvasNavigationControls';\n\n/** */\nconst mapStateToProps = (state, { windowId }) => ({\n showZoomControls: getShowZoomControlsConfig(state),\n visible: getWorkspace(state).focusedWindowId === windowId,\n});\n\nconst enhance = compose(connect(mapStateToProps), withPlugins('WindowCanvasNavigationControls'));\n\nexport default enhance(WindowCanvasNavigationControls);\n"],"x_google_ignoreList":[0,1,7],"mappings":";;;;;;;;;;;;;;;;2EAIA,IAAeA,EAA2B,gBAAK,QAAQ,EAC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A,QAAA,CAAW,EAAG,YAAY,GAAG,IAA8B,EAAG,oBAAoB,IAAI,IAAI;EACrG,WAAW;EACX,KAAK,EAAU,GAAK,CAAO;EAJ7B,UAAA;GAME,kBAAC,GAAD;IACE,WAAW,IAA8B,WAAW;IACpD,SAAS,kBAAC,GAAD;KAAS,aAAa,IAA8B,eAAe;KAAY,SAAQ;KAAS,UAAA;IAAU,CAAA;IACnH,SAAS;IAHX,UAAA,CAKE,kBAAC,GAAD,EAA4B,YAAW,CAAA,GACtC,KAAoB,kBAAC,GAAD;KAAwB;KAAuB;IAAc,CAAA,CAC7E;;GACP,kBAAC,GAAD,EAAsB,YAAW,CAAA;GAEjC,kBAAC,GAAD;IAAY,YAAW;IAAiC,GAAI;GAAc,CAAA;EACtE;MAvBJ,kBAAC,GAAD;EAAY,OAAO;EAAgB,WAAU;EAC3C,UAAA,kBAAC,GAAD,EAAsB,YAAW,CAAA;CACvB,CAAA;AAuBlB,CACF;AAEA,EAA+B,YAAY;CAEzC,kBAAkB,EAAA,QAAU;CAE5B,SAAS,EAAA,QAAU;CACnB,UAAU,EAAA,QAAU,OAAO;CAC3B,aAAa,EAAA,QAAU,KAAK;AAC9B,GAEA,EAA+B,cAAc;AC5E7C,IAAA,KAFgB,EAAQ,GALC,GAAO,EAAE,mBAAgB;CAChD,kBAAkB,EAA0B,CAAK;CACjD,SAAS,EAAa,CAAK,CAAC,CAAC,oBAAoB;AACnD,EAE+C,GAAG,EAAY,gCAAgC,CAE/E,CAAA,CAAQ,CAA8B"}
@@ -0,0 +1,27 @@
1
+ import { U as e, at as t, dt as n, ft as r, g as i } from "./getters-B4oepJRC.js";
2
+ import { t as a } from "./react-error-boundary.esm-ByHqCaxk.js";
3
+ import { t as o } from "./WindowCanvasNavigationControls-D2uLtL_A.js";
4
+ import { Suspense as s, lazy as c } from "react";
5
+ import { jsx as l } from "react/jsx-runtime";
6
+ //#region src/components/WindowViewer.jsx
7
+ var u = /* @__PURE__ */ r(t(), 1), d = c(() => import("./OpenSeadragonViewer-CBmX5sYE.js").then((e) => e.n));
8
+ function f({ windowId: e }) {
9
+ return /* @__PURE__ */ l(a, {
10
+ fallback: null,
11
+ children: /* @__PURE__ */ l(s, {
12
+ fallback: /* @__PURE__ */ l("div", {}),
13
+ children: /* @__PURE__ */ l(d, {
14
+ windowId: e,
15
+ children: /* @__PURE__ */ l(o, { windowId: e })
16
+ })
17
+ })
18
+ });
19
+ }
20
+ f.propTypes = { windowId: u.default.string.isRequired };
21
+ //#endregion
22
+ //#region src/containers/WindowViewer.js
23
+ var p = /* @__PURE__ */ n({ default: () => m }), m = e(i("WindowViewer"))(f);
24
+ //#endregion
25
+ export { p as n, f as r, m as t };
26
+
27
+ //# sourceMappingURL=WindowViewer-BW0_w7wv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WindowViewer-BW0_w7wv.js","names":[],"sources":["../src/components/WindowViewer.jsx","../src/containers/WindowViewer.js"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport PropTypes from 'prop-types';\nimport WindowCanvasNavigationControls from '../containers/WindowCanvasNavigationControls';\n\nconst OSDViewer = lazy(() => import('../containers/OpenSeadragonViewer'));\n\n/**\n * Represents a WindowViewer in the mirador workspace. Responsible for mounting\n * OSD and Navigation\n */\nexport function WindowViewer({ windowId }) {\n return (\n <ErrorBoundary fallback={null}>\n <Suspense fallback={<div />}>\n <OSDViewer windowId={windowId}>\n <WindowCanvasNavigationControls windowId={windowId} />\n </OSDViewer>\n </Suspense>\n </ErrorBoundary>\n );\n}\n\nWindowViewer.propTypes = {\n windowId: PropTypes.string.isRequired,\n};\n","import { compose } from 'redux';\nimport { withPlugins } from '../extend/withPlugins';\nimport { WindowViewer } from '../components/WindowViewer';\n\nconst enhance = compose(\n withPlugins('WindowViewer'),\n // further HOC go here\n);\n\nexport default enhance(WindowViewer);\n"],"mappings":";;;;;;mCAKM,IAAY,QAAW,OAAO,oCAAoC,CAAA,MAAA,MAAA,EAAA,CAAA,CAAA;AAMxE,SAAgB,EAAa,EAAE,eAAY;CACzC,OACE,kBAAC,GAAD;EAAe,UAAU;EACvB,UAAA,kBAAC,GAAD;GAAU,UAAU,kBAAC,OAAD,CAAM,CAAA;GACxB,UAAA,kBAAC,GAAD;IAAqB;IACnB,UAAA,kBAAC,GAAD,EAA0C,YAAW,CAAA;GAC5C,CAAA;EACH,CAAA;CACG,CAAA;AAEnB;AAEA,EAAa,YAAY,EACvB,UAAU,EAAA,QAAU,OAAO,WAC7B;;;iDChBA,IALgB,EACd,EAAY,cAAc,CAIb,CAAA,CAAQ,CAAY"}