dbf-mirador 4.2.3

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 (384) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +133 -0
  3. package/dist/CommentSharp-B0J_-jEq.js +325 -0
  4. package/dist/CommentSharp-B0J_-jEq.js.map +1 -0
  5. package/dist/FailedImageContext-aQXnWSHN.js +318 -0
  6. package/dist/FailedImageContext-aQXnWSHN.js.map +1 -0
  7. package/dist/PluginHook-CFw_6P5c.js +54 -0
  8. package/dist/PluginHook-CFw_6P5c.js.map +1 -0
  9. package/dist/WindowCanvasNavigationControls-CUX723BQ.js +242 -0
  10. package/dist/WindowCanvasNavigationControls-CUX723BQ.js.map +1 -0
  11. package/dist/action-types-DjIbTE-A.js +74 -0
  12. package/dist/action-types-DjIbTE-A.js.map +1 -0
  13. package/dist/canvas-C8oHvXFN.js +41 -0
  14. package/dist/canvas-C8oHvXFN.js.map +1 -0
  15. package/dist/canvases-gRqhr-IH.js +3154 -0
  16. package/dist/canvases-gRqhr-IH.js.map +1 -0
  17. package/dist/createSvgIcon-Cwt8YPfm.js +2 -0
  18. package/dist/getters-COus7Mvg.js +2066 -0
  19. package/dist/getters-COus7Mvg.js.map +1 -0
  20. package/dist/index.module-CbBRf_R8.js +403 -0
  21. package/dist/index.module-CbBRf_R8.js.map +1 -0
  22. package/dist/mirador.es.js +39600 -0
  23. package/dist/mirador.es.js.map +1 -0
  24. package/dist/mirador.min.js +334 -0
  25. package/dist/mirador.min.js.map +1 -0
  26. package/dist/react-error-boundary.esm-B_pT-oCS.js +67 -0
  27. package/dist/react-error-boundary.esm-B_pT-oCS.js.map +1 -0
  28. package/dist/visuallyHidden-DmYvwNdU.js +98 -0
  29. package/dist/visuallyHidden-DmYvwNdU.js.map +1 -0
  30. package/dist/window-zelwU7wz.js +138 -0
  31. package/dist/window-zelwU7wz.js.map +1 -0
  32. package/package.json +138 -0
  33. package/src/components/AccessTokenSender.jsx +34 -0
  34. package/src/components/AnnotationSettings.jsx +31 -0
  35. package/src/components/AnnotationsOverlay.jsx +328 -0
  36. package/src/components/App.jsx +34 -0
  37. package/src/components/AppProviders.jsx +129 -0
  38. package/src/components/AttributionPanel.jsx +78 -0
  39. package/src/components/AudioViewer.jsx +39 -0
  40. package/src/components/BackgroundPluginArea.jsx +9 -0
  41. package/src/components/Branding.jsx +33 -0
  42. package/src/components/CanvasAnnotations.jsx +125 -0
  43. package/src/components/CanvasInfo.jsx +46 -0
  44. package/src/components/CanvasLayers.jsx +367 -0
  45. package/src/components/ChangeThemeDialog.jsx +65 -0
  46. package/src/components/CollapsibleSection.jsx +53 -0
  47. package/src/components/CollectionDialog.jsx +236 -0
  48. package/src/components/CollectionInfo.jsx +48 -0
  49. package/src/components/CompanionArea.jsx +140 -0
  50. package/src/components/CompanionWindow.jsx +228 -0
  51. package/src/components/CompanionWindowFactory.jsx +38 -0
  52. package/src/components/CompanionWindowSection.jsx +11 -0
  53. package/src/components/CustomPanel.jsx +22 -0
  54. package/src/components/ErrorContent.jsx +65 -0
  55. package/src/components/ErrorDialog.jsx +47 -0
  56. package/src/components/FullScreenButton.jsx +47 -0
  57. package/src/components/GalleryView.jsx +36 -0
  58. package/src/components/GalleryViewThumbnail.jsx +160 -0
  59. package/src/components/IIIFAuthentication.jsx +144 -0
  60. package/src/components/IIIFDropTarget.jsx +168 -0
  61. package/src/components/IIIFIFrameCommunication.jsx +45 -0
  62. package/src/components/IIIFResourceLabel.jsx +26 -0
  63. package/src/components/IIIFThumbnail.jsx +214 -0
  64. package/src/components/ImageFailureMessage.jsx +42 -0
  65. package/src/components/LabelValueMetadata.jsx +46 -0
  66. package/src/components/LanguageSettings.jsx +46 -0
  67. package/src/components/LayersPanel.jsx +24 -0
  68. package/src/components/LocalePicker.jsx +56 -0
  69. package/src/components/ManifestForm.jsx +79 -0
  70. package/src/components/ManifestInfo.jsx +67 -0
  71. package/src/components/ManifestListItem.jsx +209 -0
  72. package/src/components/ManifestListItemError.jsx +53 -0
  73. package/src/components/ManifestRelatedLinks.jsx +154 -0
  74. package/src/components/MinimalWindow.jsx +104 -0
  75. package/src/components/MiradorMenuButton.jsx +71 -0
  76. package/src/components/MosaicRenderPreview.jsx +16 -0
  77. package/src/components/NestedMenu.jsx +42 -0
  78. package/src/components/NewBrowserWindow.jsx +34 -0
  79. package/src/components/OpenSeadragonComponent.jsx +258 -0
  80. package/src/components/OpenSeadragonTileSource.jsx +105 -0
  81. package/src/components/OpenSeadragonViewer.jsx +161 -0
  82. package/src/components/PluginHook.jsx +27 -0
  83. package/src/components/PrimaryWindow.jsx +115 -0
  84. package/src/components/SanitizedHtml.jsx +37 -0
  85. package/src/components/ScrollIndicatedDialogContent.jsx +60 -0
  86. package/src/components/ScrollTo.jsx +61 -0
  87. package/src/components/SearchHit.jsx +220 -0
  88. package/src/components/SearchPanel.jsx +80 -0
  89. package/src/components/SearchPanelControls.jsx +174 -0
  90. package/src/components/SearchPanelNavigation.jsx +84 -0
  91. package/src/components/SearchResults.jsx +138 -0
  92. package/src/components/SelectCollection.jsx +44 -0
  93. package/src/components/SidebarIndexItem.jsx +11 -0
  94. package/src/components/SidebarIndexList.jsx +73 -0
  95. package/src/components/SidebarIndexTableOfContents.jsx +170 -0
  96. package/src/components/SidebarIndexThumbnail.jsx +22 -0
  97. package/src/components/TextViewer.jsx +37 -0
  98. package/src/components/ThumbnailCanvasGrouping.jsx +122 -0
  99. package/src/components/ThumbnailNavigation.jsx +231 -0
  100. package/src/components/VideoViewer.jsx +35 -0
  101. package/src/components/ViewerInfo.jsx +55 -0
  102. package/src/components/ViewerNavigation.jsx +72 -0
  103. package/src/components/Window.jsx +150 -0
  104. package/src/components/WindowAuthenticationBar.jsx +176 -0
  105. package/src/components/WindowCanvasNavigationControls.jsx +91 -0
  106. package/src/components/WindowList.jsx +71 -0
  107. package/src/components/WindowListButton.jsx +57 -0
  108. package/src/components/WindowSideBar.jsx +48 -0
  109. package/src/components/WindowSideBarAnnotationsPanel.jsx +51 -0
  110. package/src/components/WindowSideBarButtons.jsx +151 -0
  111. package/src/components/WindowSideBarCanvasPanel.jsx +165 -0
  112. package/src/components/WindowSideBarCollectionPanel.jsx +179 -0
  113. package/src/components/WindowSideBarInfoPanel.jsx +67 -0
  114. package/src/components/WindowThumbnailSettings.jsx +130 -0
  115. package/src/components/WindowTopBar.jsx +125 -0
  116. package/src/components/WindowTopBarPluginArea.jsx +8 -0
  117. package/src/components/WindowTopBarPluginMenu.jsx +78 -0
  118. package/src/components/WindowTopBarTitle.jsx +73 -0
  119. package/src/components/WindowTopMenu.jsx +81 -0
  120. package/src/components/WindowTopMenuButton.jsx +49 -0
  121. package/src/components/WindowViewSettings.jsx +95 -0
  122. package/src/components/WindowViewer.jsx +26 -0
  123. package/src/components/Workspace.jsx +124 -0
  124. package/src/components/WorkspaceAdd.jsx +221 -0
  125. package/src/components/WorkspaceAddButton.jsx +73 -0
  126. package/src/components/WorkspaceArea.jsx +66 -0
  127. package/src/components/WorkspaceControlPanel.jsx +85 -0
  128. package/src/components/WorkspaceControlPanelButtons.jsx +20 -0
  129. package/src/components/WorkspaceDialog.jsx +11 -0
  130. package/src/components/WorkspaceElastic.jsx +88 -0
  131. package/src/components/WorkspaceElasticWindow.jsx +79 -0
  132. package/src/components/WorkspaceExport.jsx +99 -0
  133. package/src/components/WorkspaceImport.jsx +89 -0
  134. package/src/components/WorkspaceMenu.jsx +126 -0
  135. package/src/components/WorkspaceMenuButton.jsx +42 -0
  136. package/src/components/WorkspaceMosaic.jsx +149 -0
  137. package/src/components/WorkspaceOptionsButton.jsx +35 -0
  138. package/src/components/WorkspaceOptionsMenu.jsx +112 -0
  139. package/src/components/WorkspaceSelectionDialog.jsx +165 -0
  140. package/src/components/ZoomControls.jsx +57 -0
  141. package/src/components/icons/BookViewIcon.jsx +14 -0
  142. package/src/components/icons/CanvasIndexIcon.jsx +14 -0
  143. package/src/components/icons/GalleryViewIcon.jsx +17 -0
  144. package/src/components/icons/MiradorIcon.jsx +14 -0
  145. package/src/components/icons/RestoreZoomIcon.jsx +15 -0
  146. package/src/components/icons/ThumbnailNavigationBottomIcon.jsx +15 -0
  147. package/src/components/icons/ThumbnailNavigationRightIcon.jsx +16 -0
  148. package/src/components/icons/WindowMaxIcon.jsx +15 -0
  149. package/src/components/icons/WindowMinIcon.jsx +15 -0
  150. package/src/components/icons/WindowOptionsIcon.jsx +16 -0
  151. package/src/components/icons/WorkspaceTypeElasticIcon.jsx +157 -0
  152. package/src/components/icons/WorkspaceTypeMosaicIcon.jsx +162 -0
  153. package/src/components/icons/index.js +27 -0
  154. package/src/components/index.js +108 -0
  155. package/src/config/css-ns.js +10 -0
  156. package/src/config/index.js +2 -0
  157. package/src/config/settings.js +607 -0
  158. package/src/containers/AnnotationSettings.js +27 -0
  159. package/src/containers/AnnotationsOverlay.js +51 -0
  160. package/src/containers/AppProviders.js +20 -0
  161. package/src/containers/AttributionPanel.js +20 -0
  162. package/src/containers/AudioViewer.js +16 -0
  163. package/src/containers/BackgroundPluginArea.js +4 -0
  164. package/src/containers/Branding.js +4 -0
  165. package/src/containers/CanvasAnnotations.js +32 -0
  166. package/src/containers/CanvasInfo.js +20 -0
  167. package/src/containers/CanvasLayers.js +25 -0
  168. package/src/containers/ChangeThemeDialog.js +29 -0
  169. package/src/containers/CollapsibleSection.js +3 -0
  170. package/src/containers/CollectionDialog.js +48 -0
  171. package/src/containers/CollectionInfo.js +29 -0
  172. package/src/containers/CompanionArea.js +22 -0
  173. package/src/containers/CompanionWindow.js +40 -0
  174. package/src/containers/CompanionWindowFactory.js +23 -0
  175. package/src/containers/CustomPanel.js +13 -0
  176. package/src/containers/ErrorContent.js +20 -0
  177. package/src/containers/ErrorDialog.js +28 -0
  178. package/src/containers/FullScreenButton.js +22 -0
  179. package/src/containers/GalleryView.js +23 -0
  180. package/src/containers/GalleryViewThumbnail.js +51 -0
  181. package/src/containers/IIIFAuthentication.js +86 -0
  182. package/src/containers/IIIFThumbnail.js +17 -0
  183. package/src/containers/LabelValueMetadata.js +14 -0
  184. package/src/containers/LanguageSettings.js +26 -0
  185. package/src/containers/LayersPanel.js +16 -0
  186. package/src/containers/LocalePicker.js +3 -0
  187. package/src/containers/ManifestForm.js +16 -0
  188. package/src/containers/ManifestInfo.js +29 -0
  189. package/src/containers/ManifestListItem.js +52 -0
  190. package/src/containers/ManifestListItemError.js +15 -0
  191. package/src/containers/ManifestRelatedLinks.js +28 -0
  192. package/src/containers/MinimalWindow.js +25 -0
  193. package/src/containers/MiradorMenuButton.js +7 -0
  194. package/src/containers/MosaicRenderPreview.js +14 -0
  195. package/src/containers/OpenSeadragonViewer.js +59 -0
  196. package/src/containers/PrimaryWindow.js +27 -0
  197. package/src/containers/SanitizedHtml.js +3 -0
  198. package/src/containers/ScrollIndicatedDialogContent.js +3 -0
  199. package/src/containers/SearchHit.js +71 -0
  200. package/src/containers/SearchPanel.js +23 -0
  201. package/src/containers/SearchPanelControls.js +36 -0
  202. package/src/containers/SearchPanelNavigation.js +39 -0
  203. package/src/containers/SearchResults.js +38 -0
  204. package/src/containers/SelectCollection.js +24 -0
  205. package/src/containers/SidebarIndexItem.js +8 -0
  206. package/src/containers/SidebarIndexList.js +28 -0
  207. package/src/containers/SidebarIndexTableOfContents.js +31 -0
  208. package/src/containers/SidebarIndexThumbnail.js +18 -0
  209. package/src/containers/TextViewer.js +19 -0
  210. package/src/containers/ThumbnailCanvasGrouping.js +29 -0
  211. package/src/containers/ThumbnailNavigation.js +48 -0
  212. package/src/containers/VideoViewer.js +16 -0
  213. package/src/containers/ViewerInfo.js +30 -0
  214. package/src/containers/ViewerNavigation.js +31 -0
  215. package/src/containers/Window.js +45 -0
  216. package/src/containers/WindowAuthenticationBar.js +7 -0
  217. package/src/containers/WindowCanvasNavigationControls.js +15 -0
  218. package/src/containers/WindowList.js +30 -0
  219. package/src/containers/WindowListButton.js +15 -0
  220. package/src/containers/WindowSideBar.js +20 -0
  221. package/src/containers/WindowSideBarAnnotationsPanel.js +23 -0
  222. package/src/containers/WindowSideBarButtons.js +75 -0
  223. package/src/containers/WindowSideBarCanvasPanel.js +50 -0
  224. package/src/containers/WindowSideBarCollectionPanel.js +48 -0
  225. package/src/containers/WindowSideBarInfoPanel.js +35 -0
  226. package/src/containers/WindowThumbnailSettings.js +31 -0
  227. package/src/containers/WindowTopBar.js +39 -0
  228. package/src/containers/WindowTopBarPluginArea.js +8 -0
  229. package/src/containers/WindowTopBarPluginMenu.js +7 -0
  230. package/src/containers/WindowTopBarTitle.js +17 -0
  231. package/src/containers/WindowTopMenu.js +28 -0
  232. package/src/containers/WindowTopMenuButton.js +7 -0
  233. package/src/containers/WindowViewSettings.js +30 -0
  234. package/src/containers/WindowViewer.js +10 -0
  235. package/src/containers/Workspace.js +36 -0
  236. package/src/containers/WorkspaceAdd.js +27 -0
  237. package/src/containers/WorkspaceAddButton.js +30 -0
  238. package/src/containers/WorkspaceArea.js +21 -0
  239. package/src/containers/WorkspaceControlPanel.js +10 -0
  240. package/src/containers/WorkspaceControlPanelButtons.js +7 -0
  241. package/src/containers/WorkspaceElastic.js +41 -0
  242. package/src/containers/WorkspaceElasticWindow.js +36 -0
  243. package/src/containers/WorkspaceExport.js +18 -0
  244. package/src/containers/WorkspaceImport.js +19 -0
  245. package/src/containers/WorkspaceMenu.js +30 -0
  246. package/src/containers/WorkspaceMenuButton.js +10 -0
  247. package/src/containers/WorkspaceMosaic.js +32 -0
  248. package/src/containers/WorkspaceOptionsButton.js +7 -0
  249. package/src/containers/WorkspaceOptionsMenu.js +3 -0
  250. package/src/containers/WorkspaceSelectionDialog.js +26 -0
  251. package/src/containers/ZoomControls.js +26 -0
  252. package/src/containers/index.js +94 -0
  253. package/src/contexts/FailedImageContext.js +8 -0
  254. package/src/contexts/FailedImageProvider.jsx +34 -0
  255. package/src/contexts/FullScreenContext.js +5 -0
  256. package/src/contexts/LocaleContext.js +5 -0
  257. package/src/contexts/OpenSeadragonViewerContext.js +5 -0
  258. package/src/contexts/WorkspaceContext.js +5 -0
  259. package/src/contexts/index.js +4 -0
  260. package/src/extend/PluginContext.js +5 -0
  261. package/src/extend/PluginProvider.jsx +22 -0
  262. package/src/extend/index.js +9 -0
  263. package/src/extend/pluginMapping.js +44 -0
  264. package/src/extend/pluginPreprocessing.js +45 -0
  265. package/src/extend/pluginValidation.js +58 -0
  266. package/src/extend/usePlugins.js +13 -0
  267. package/src/extend/withPlugins.jsx +46 -0
  268. package/src/hooks/index.js +4 -0
  269. package/src/hooks/useCanvasWorldService.js +10 -0
  270. package/src/hooks/useThumbnailService.js +8 -0
  271. package/src/i18n.js +71 -0
  272. package/src/index.js +18 -0
  273. package/src/init.js +20 -0
  274. package/src/lib/AnnotationFactory.js +23 -0
  275. package/src/lib/AnnotationItem.js +123 -0
  276. package/src/lib/AnnotationList.js +31 -0
  277. package/src/lib/AnnotationPage.js +41 -0
  278. package/src/lib/AnnotationResource.js +122 -0
  279. package/src/lib/CanvasAnnotationDisplay.js +148 -0
  280. package/src/lib/CanvasGroupings.js +55 -0
  281. package/src/lib/CanvasWorld.js +214 -0
  282. package/src/lib/CompanionWindowRegistry.js +23 -0
  283. package/src/lib/FullScreenHandle.jsx +76 -0
  284. package/src/lib/MiradorCanvas.js +211 -0
  285. package/src/lib/MiradorManifest.js +44 -0
  286. package/src/lib/MiradorViewer.jsx +53 -0
  287. package/src/lib/MosaicLayout.js +77 -0
  288. package/src/lib/OpenSeadragonCanvasOverlay.js +114 -0
  289. package/src/lib/ThumbnailFactory.js +310 -0
  290. package/src/lib/TruncatedHit.js +34 -0
  291. package/src/lib/asArray.js +11 -0
  292. package/src/lib/htmlRules.js +28 -0
  293. package/src/lib/iiif.js +12 -0
  294. package/src/lib/index.js +23 -0
  295. package/src/lib/readImageMetadata.js +21 -0
  296. package/src/lib/svgShapesToPath.js +49 -0
  297. package/src/locales/README.md +60 -0
  298. package/src/locales/ar/translation.json +141 -0
  299. package/src/locales/bg/translation.json +164 -0
  300. package/src/locales/de/translation.json +169 -0
  301. package/src/locales/en/translation.json +170 -0
  302. package/src/locales/et/translation.json +164 -0
  303. package/src/locales/fa/translation.json +164 -0
  304. package/src/locales/fr/translation.json +158 -0
  305. package/src/locales/hr/translation.json +164 -0
  306. package/src/locales/hu/translation.json +166 -0
  307. package/src/locales/it/translation.json +162 -0
  308. package/src/locales/ja/translation.json +156 -0
  309. package/src/locales/kr/translation.json +162 -0
  310. package/src/locales/lt/translation.json +153 -0
  311. package/src/locales/nbNo/translation.json +162 -0
  312. package/src/locales/nl/translation.json +139 -0
  313. package/src/locales/pl/translation.json +162 -0
  314. package/src/locales/ptBr/translation.json +133 -0
  315. package/src/locales/sr/translation.json +155 -0
  316. package/src/locales/sv/translation.json +157 -0
  317. package/src/locales/ta/translation.json +167 -0
  318. package/src/locales/vi/translation.json +156 -0
  319. package/src/locales/zhCn/translation.json +163 -0
  320. package/src/locales/zhTw/translation.json +163 -0
  321. package/src/plugins/OSDReferences.js +15 -0
  322. package/src/plugins/index.js +1 -0
  323. package/src/state/actions/action-types.js +76 -0
  324. package/src/state/actions/annotation.js +123 -0
  325. package/src/state/actions/auth.js +109 -0
  326. package/src/state/actions/canvas.js +65 -0
  327. package/src/state/actions/catalog.js +22 -0
  328. package/src/state/actions/companionWindow.js +107 -0
  329. package/src/state/actions/config.js +49 -0
  330. package/src/state/actions/elasticLayout.js +10 -0
  331. package/src/state/actions/errors.js +22 -0
  332. package/src/state/actions/index.js +19 -0
  333. package/src/state/actions/infoResponse.js +90 -0
  334. package/src/state/actions/layers.js +14 -0
  335. package/src/state/actions/manifest.js +65 -0
  336. package/src/state/actions/search.js +97 -0
  337. package/src/state/actions/window.js +209 -0
  338. package/src/state/actions/workspace.js +84 -0
  339. package/src/state/createPluggableStore.js +24 -0
  340. package/src/state/createStore.js +33 -0
  341. package/src/state/index.js +21 -0
  342. package/src/state/reducers/accessTokens.js +59 -0
  343. package/src/state/reducers/annotations.js +48 -0
  344. package/src/state/reducers/auth.js +43 -0
  345. package/src/state/reducers/catalog.js +30 -0
  346. package/src/state/reducers/companionWindows.js +49 -0
  347. package/src/state/reducers/config.js +39 -0
  348. package/src/state/reducers/elasticLayout.js +29 -0
  349. package/src/state/reducers/errors.js +51 -0
  350. package/src/state/reducers/index.js +15 -0
  351. package/src/state/reducers/infoResponses.js +61 -0
  352. package/src/state/reducers/layers.js +23 -0
  353. package/src/state/reducers/manifests.js +52 -0
  354. package/src/state/reducers/rootReducer.js +44 -0
  355. package/src/state/reducers/search.js +145 -0
  356. package/src/state/reducers/utils.js +45 -0
  357. package/src/state/reducers/viewers.js +42 -0
  358. package/src/state/reducers/windows.js +185 -0
  359. package/src/state/reducers/workspace.js +111 -0
  360. package/src/state/sagas/annotations.js +48 -0
  361. package/src/state/sagas/app.js +56 -0
  362. package/src/state/sagas/auth.js +151 -0
  363. package/src/state/sagas/iiif.js +233 -0
  364. package/src/state/sagas/index.js +30 -0
  365. package/src/state/sagas/windows.js +293 -0
  366. package/src/state/selectors/annotations.js +138 -0
  367. package/src/state/selectors/auth.js +100 -0
  368. package/src/state/selectors/canvases.js +260 -0
  369. package/src/state/selectors/companionWindows.js +182 -0
  370. package/src/state/selectors/config.js +100 -0
  371. package/src/state/selectors/getters.js +90 -0
  372. package/src/state/selectors/index.js +17 -0
  373. package/src/state/selectors/layers.js +79 -0
  374. package/src/state/selectors/manifests.js +433 -0
  375. package/src/state/selectors/ranges.js +147 -0
  376. package/src/state/selectors/searches.js +249 -0
  377. package/src/state/selectors/sequences.js +134 -0
  378. package/src/state/selectors/thumbnails.js +28 -0
  379. package/src/state/selectors/utils.js +18 -0
  380. package/src/state/selectors/viewer.js +19 -0
  381. package/src/state/selectors/windows.js +98 -0
  382. package/src/state/selectors/workspace.js +52 -0
  383. package/src/state/selectors/wrappers.js +15 -0
  384. package/src/styles/react-mosaic-component.js +288 -0
@@ -0,0 +1,221 @@
1
+ import { useRef, useState, useEffect } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { styled } from '@mui/material/styles';
4
+ import classNames from 'classnames';
5
+ import AddIcon from '@mui/icons-material/AddSharp';
6
+ import ExpandMoreIcon from '@mui/icons-material/ExpandMoreSharp';
7
+ import AppBar from '@mui/material/AppBar';
8
+ import Drawer from '@mui/material/Drawer';
9
+ import Grid from '@mui/material/Grid';
10
+ import Fab from '@mui/material/Fab';
11
+ import List from '@mui/material/List';
12
+ import Paper from '@mui/material/Paper';
13
+ import Toolbar from '@mui/material/Toolbar';
14
+ import Typography from '@mui/material/Typography';
15
+ import { visuallyHidden } from '@mui/utils';
16
+ import { useTranslation } from 'react-i18next';
17
+ import ns from '../config/css-ns';
18
+ import ManifestForm from '../containers/ManifestForm';
19
+ import ManifestListItem from '../containers/ManifestListItem';
20
+ import MiradorMenuButton from '../containers/MiradorMenuButton';
21
+ import { IIIFDropTarget } from './IIIFDropTarget';
22
+ import { PluginHook } from './PluginHook';
23
+
24
+ const StyledWorkspaceAdd = styled('div')(() => ({
25
+ boxSizing: 'border-box',
26
+ height: '100%',
27
+ overflowX: 'hidden',
28
+ overflowY: 'auto',
29
+ }));
30
+
31
+ const StyledMiradorMenuButton = styled(MiradorMenuButton)(() => ({
32
+ marginLeft: -12,
33
+ marginRight: 20,
34
+ }));
35
+
36
+ /**
37
+ * An area for managing manifests and adding them to workspace
38
+ * @memberof Workspace
39
+ * @private
40
+ */
41
+ export function WorkspaceAdd({ addResource = () => {}, catalog = [], setWorkspaceAddVisibility, ...rest }) {
42
+ const { t } = useTranslation();
43
+ const [addResourcesOpen, setAddResourcesVisibility] = useState(false);
44
+ const ref = useRef();
45
+ const [refWidth, setRefWidth] = useState('100%');
46
+
47
+ /** */
48
+ const updateRefWidth = () => {
49
+ if (ref.current) {
50
+ setRefWidth(ref.current.offsetWidth);
51
+ }
52
+ };
53
+
54
+ /** */
55
+ const handleDrop = ({ manifestId, manifestJson }, props, monitor) => {
56
+ if (manifestJson) {
57
+ addResource(manifestId, manifestJson, { provider: 'file' });
58
+ } else {
59
+ addResource(manifestId);
60
+ }
61
+
62
+ scrollToTop();
63
+ };
64
+
65
+ /** @private */
66
+ const onSubmit = () => {
67
+ setAddResourcesVisibility(false);
68
+ scrollToTop();
69
+ };
70
+
71
+ /** Scroll the list back to the top */
72
+ const scrollToTop = () => {
73
+ if (ref.current) {
74
+ const el = ref.current;
75
+ el.scrollTo({ behavior: 'smooth', left: 0, top: 0 });
76
+ }
77
+ };
78
+
79
+ const manifestList = catalog.map((resource, index) => (
80
+ <ManifestListItem
81
+ {...(index === 0 && { buttonRef: (buttonRef) => buttonRef && buttonRef.focus() })}
82
+ key={resource.manifestId}
83
+ manifestId={resource.manifestId}
84
+ provider={resource.provider}
85
+ handleClose={() => setWorkspaceAddVisibility(false)}
86
+ />
87
+ ));
88
+
89
+ const pluginProps = {
90
+ addResource,
91
+ catalog,
92
+ setWorkspaceAddVisibility,
93
+ t,
94
+ ...rest,
95
+ };
96
+
97
+ useEffect(() => {
98
+ window.addEventListener('resize', updateRefWidth);
99
+
100
+ updateRefWidth();
101
+
102
+ return () => {
103
+ window.removeEventListener('resize', updateRefWidth);
104
+ };
105
+ }, []);
106
+
107
+ return (
108
+ <IIIFDropTarget onDrop={handleDrop}>
109
+ <StyledWorkspaceAdd className={classNames(ns('workspace-add'))} ref={ref}>
110
+ {catalog.length < 1 ? (
111
+ <Grid
112
+ container
113
+ style={{
114
+ height: '100%',
115
+ }}
116
+ sx={{
117
+ alignItems: 'center',
118
+ }}
119
+ >
120
+ <Grid size={12}>
121
+ <Typography variant="h1" component="div" align="center">
122
+ {t('emptyResourceList')}
123
+ </Typography>
124
+ </Grid>
125
+ </Grid>
126
+ ) : (
127
+ <Paper sx={{ margin: 2 }}>
128
+ <Typography style={visuallyHidden} component="h1">
129
+ {t('miradorResources')}
130
+ </Typography>
131
+ <PluginHook targetName="WorkspaceAdd" {...pluginProps} />
132
+ <List disablePadding>{manifestList}</List>
133
+ </Paper>
134
+ )}
135
+ <Fab
136
+ variant="extended"
137
+ disabled={addResourcesOpen}
138
+ sx={(theme) => ({
139
+ bottom: theme.spacing(2),
140
+ position: 'absolute',
141
+ right: theme.spacing(2),
142
+ })}
143
+ className={classNames(ns('add-resource-button'))}
144
+ aria-label={t('addResource')}
145
+ color="primary"
146
+ onClick={() => setAddResourcesVisibility(true)}
147
+ >
148
+ <AddIcon />
149
+ {t('addResource')}
150
+ </Fab>
151
+
152
+ <Drawer
153
+ sx={(theme) => ({
154
+ '.MuiDrawer-paper': {
155
+ borderTop: '0',
156
+ left: 'unset',
157
+ width: refWidth,
158
+ },
159
+ ...(!addResourcesOpen && {
160
+ display: 'none',
161
+ }),
162
+ })}
163
+ variant="persistent"
164
+ anchor="bottom"
165
+ open={addResourcesOpen}
166
+ ModalProps={{
167
+ disablePortal: true,
168
+ hideBackdrop: true,
169
+ style: { position: 'absolute' },
170
+ }}
171
+ >
172
+ <Paper
173
+ sx={{
174
+ left: '0',
175
+ marginTop: 6,
176
+ paddingBottom: 2,
177
+ paddingLeft: { sm: 3, xs: 2 },
178
+ paddingRight: { sm: 3, xs: 2 },
179
+ paddingTop: 2,
180
+ right: '0',
181
+ }}
182
+ >
183
+ <AppBar position="absolute" color="primary" enableColorOnDark onClick={() => setAddResourcesVisibility(false)}>
184
+ <Toolbar variant="dense">
185
+ <StyledMiradorMenuButton aria-label={t('closeAddResourceForm')} color="inherit">
186
+ <ExpandMoreIcon />
187
+ </StyledMiradorMenuButton>
188
+ <Typography
189
+ variant="h2"
190
+ noWrap
191
+ sx={{
192
+ color: 'inherit',
193
+ flexGrow: 1,
194
+ }}
195
+ >
196
+ {t('addResource')}
197
+ </Typography>
198
+ </Toolbar>
199
+ </AppBar>
200
+ <ManifestForm
201
+ addResourcesOpen={addResourcesOpen}
202
+ onSubmit={onSubmit}
203
+ onCancel={() => setAddResourcesVisibility(false)}
204
+ />
205
+ </Paper>
206
+ </Drawer>
207
+ </StyledWorkspaceAdd>
208
+ </IIIFDropTarget>
209
+ );
210
+ }
211
+
212
+ WorkspaceAdd.propTypes = {
213
+ addResource: PropTypes.func,
214
+ catalog: PropTypes.arrayOf(
215
+ PropTypes.shape({
216
+ manifestId: PropTypes.string.isRequired,
217
+ provider: PropTypes.string,
218
+ }),
219
+ ),
220
+ setWorkspaceAddVisibility: PropTypes.func.isRequired,
221
+ };
@@ -0,0 +1,73 @@
1
+ import PropTypes from 'prop-types';
2
+ import Fab from '@mui/material/Fab';
3
+ import Tooltip from '@mui/material/Tooltip';
4
+ import AddIcon from '@mui/icons-material/AddSharp';
5
+ import CloseIcon from '@mui/icons-material/CloseSharp';
6
+ import { styled, useTheme } from '@mui/material/styles';
7
+ import useMediaQuery from '@mui/material/useMediaQuery';
8
+ import { useTranslation } from 'react-i18next';
9
+
10
+ /**
11
+ * Be careful using this hook. It only works because the number of
12
+ * breakpoints in theme is static. It will break once you change the number of
13
+ * breakpoints. See https://legacy.reactjs.org/docs/hooks-rules.html#only-call-hooks-at-the-top-level
14
+ */
15
+ function useWidth() {
16
+ const theme = useTheme();
17
+ const keys = [...theme.breakpoints.keys].reverse();
18
+ return (
19
+ keys.reduce((output, key) => {
20
+ // eslint-disable-next-line react-hooks/rules-of-hooks
21
+ const matches = useMediaQuery(theme.breakpoints.up(key));
22
+ return !output && matches ? key : output;
23
+ }, null) || 'xs'
24
+ );
25
+ }
26
+
27
+ const Root = styled(Fab, { name: 'WorkspaceAddButton', slot: 'root' })(({ theme }) => ({
28
+ marginBottom: theme.spacing(1),
29
+ '&:hover, &.Mui-focusVisible': {
30
+ backgroundColor: (theme.vars || theme).palette.primary.dark,
31
+ },
32
+ ...theme.applyStyles('dark', {
33
+ '&:hover, &.Mui-focusVisible': {
34
+ backgroundColor: (theme.vars || theme).palette.primary.light,
35
+ },
36
+ }),
37
+ }));
38
+
39
+ /**
40
+ */
41
+ export function WorkspaceAddButton({ setWorkspaceAddVisibility, isWorkspaceAddVisible = false, useExtendedFab }) {
42
+ const width = useWidth();
43
+ const { t } = useTranslation();
44
+
45
+ return (
46
+ <Tooltip title={isWorkspaceAddVisible ? t('closeAddResourceMenu') : t('addResource')}>
47
+ <Root
48
+ size="medium"
49
+ color="primary"
50
+ id="addBtn"
51
+ focusRipple={false}
52
+ aria-label={
53
+ isWorkspaceAddVisible
54
+ ? t('closeAddResourceMenu')
55
+ : (useExtendedFab && width !== 'xs' && t('startHere')) || t('addResource')
56
+ }
57
+ variant={useExtendedFab && width !== 'xs' ? 'extended' : 'circular'}
58
+ onClick={() => {
59
+ setWorkspaceAddVisibility(!isWorkspaceAddVisible);
60
+ }}
61
+ >
62
+ {isWorkspaceAddVisible ? <CloseIcon /> : <AddIcon />}
63
+ {useExtendedFab && width !== 'xs' && t('startHere')}
64
+ </Root>
65
+ </Tooltip>
66
+ );
67
+ }
68
+
69
+ WorkspaceAddButton.propTypes = {
70
+ isWorkspaceAddVisible: PropTypes.bool,
71
+ setWorkspaceAddVisibility: PropTypes.func.isRequired,
72
+ useExtendedFab: PropTypes.bool.isRequired,
73
+ };
@@ -0,0 +1,66 @@
1
+ import PropTypes from 'prop-types';
2
+ import { styled, lighten, darken } from '@mui/material/styles';
3
+ import { useTranslation } from 'react-i18next';
4
+ import ErrorDialog from '../containers/ErrorDialog';
5
+ import WorkspaceControlPanel from '../containers/WorkspaceControlPanel';
6
+ import Workspace from '../containers/Workspace';
7
+ import WorkspaceAdd from '../containers/WorkspaceAdd';
8
+ import BackgroundPluginArea from '../containers/BackgroundPluginArea';
9
+ import ns from '../config/css-ns';
10
+
11
+ const Root = styled('div', { name: 'WorkspaceArea', slot: 'root' })(({ theme }) => ({
12
+ background: darken(theme.palette.shades.light, 0.1),
13
+ ...theme.applyStyles('dark', {
14
+ background: lighten(theme.palette.shades.light, 0.1),
15
+ }),
16
+ bottom: 0,
17
+ display: 'flex',
18
+ flexDirection: 'column',
19
+ left: 0,
20
+ position: 'absolute',
21
+ right: 0,
22
+ top: 0,
23
+ [theme.breakpoints.up('sm')]: {
24
+ flexDirection: 'row',
25
+ },
26
+ }));
27
+
28
+ const ViewerArea = styled('main', { name: 'WorkspaceArea', slot: 'viewer' })(() => ({
29
+ flexGrow: 1,
30
+ position: 'relative',
31
+ }));
32
+
33
+ /**
34
+ * This is the top level Mirador component.
35
+ * @prop {Object} manifests
36
+ */
37
+ export function WorkspaceArea({
38
+ areaRef = null,
39
+ controlPanelVariant = undefined,
40
+ isWorkspaceAddVisible = false,
41
+ isWorkspaceControlPanelVisible,
42
+ lang = undefined,
43
+ }) {
44
+ const { t } = useTranslation();
45
+ // eslint-disable-next-line prefer-rest-params
46
+ const ownerState = arguments[0];
47
+
48
+ return (
49
+ <Root ownerState={ownerState}>
50
+ {isWorkspaceControlPanelVisible && <WorkspaceControlPanel variant={controlPanelVariant} />}
51
+ <ViewerArea className={ns('viewer')} lang={lang} aria-label={t('workspace')} {...(areaRef ? { ref: areaRef } : {})}>
52
+ {isWorkspaceAddVisible ? <WorkspaceAdd /> : <Workspace />}
53
+ <ErrorDialog />
54
+ <BackgroundPluginArea />
55
+ </ViewerArea>
56
+ </Root>
57
+ );
58
+ }
59
+
60
+ WorkspaceArea.propTypes = {
61
+ areaRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
62
+ controlPanelVariant: PropTypes.string,
63
+ isWorkspaceAddVisible: PropTypes.bool,
64
+ isWorkspaceControlPanelVisible: PropTypes.bool.isRequired,
65
+ lang: PropTypes.string,
66
+ };
@@ -0,0 +1,85 @@
1
+ import PropTypes from 'prop-types';
2
+ import { styled } from '@mui/material/styles';
3
+ import classNames from 'classnames';
4
+ import AppBar from '@mui/material/AppBar';
5
+ import Toolbar from '@mui/material/Toolbar';
6
+ import { useTranslation } from 'react-i18next';
7
+ import WorkspaceAddButton from '../containers/WorkspaceAddButton';
8
+ import WorkspaceControlPanelButtons from '../containers/WorkspaceControlPanelButtons';
9
+ import Branding from '../containers/Branding';
10
+ import ns from '../config/css-ns';
11
+
12
+ const Root = styled(AppBar, { name: 'WorkspaceControlPanel', slot: 'root' })(({ ownerState, theme }) => ({
13
+ display: 'flex',
14
+ height: 64,
15
+ padding: theme.spacing(1),
16
+ paddingBottom: 0,
17
+ position: 'relative',
18
+ [theme.breakpoints.up('sm')]: {
19
+ height: 'auto',
20
+ width: ownerState.variant === 'wide' ? 'auto' : 64,
21
+ },
22
+ ...(ownerState.variant === 'wide' && {
23
+ width: 'auto',
24
+ }),
25
+ }));
26
+
27
+ const StyledToolbar = styled(Toolbar, { name: 'WorkspaceControlPanel', slot: 'toolbar' })(({ theme }) => ({
28
+ display: 'flex',
29
+ flexGrow: 1,
30
+ justifyContent: 'space-between',
31
+ [theme.breakpoints.up('sm')]: {
32
+ flexDirection: 'column',
33
+ justifyContent: 'flex-start',
34
+ minHeight: 0,
35
+ },
36
+ }));
37
+
38
+ const StyledWorkspaceButtons = styled('div', { name: 'WorkspaceControlPanel', slot: 'buttonArea' })(({ theme }) => ({
39
+ [theme.breakpoints.up('sm')]: {
40
+ display: 'flex',
41
+ flexDirection: 'column',
42
+ gap: theme.spacing(2),
43
+ marginBottom: theme.spacing(1),
44
+ marginTop: theme.spacing(1),
45
+ },
46
+ }));
47
+
48
+ const StyledBranding = styled(Branding, { name: 'WorkspaceControlPanel', slot: 'branding' })(({ theme }) => ({
49
+ [theme.breakpoints.up('xs')]: {
50
+ display: 'none',
51
+ },
52
+ [theme.breakpoints.up('sm')]: {
53
+ display: 'flex',
54
+ },
55
+ }));
56
+
57
+ /**
58
+ * Provides the panel responsible for controlling the entire workspace
59
+ */
60
+ export function WorkspaceControlPanel({ variant = 'default', ...rest }) {
61
+ const { t } = useTranslation();
62
+ return (
63
+ <Root
64
+ ownerState={{ t, variant, ...rest }}
65
+ className={classNames(ns('workspace-control-panel'))}
66
+ color="default"
67
+ enableColorOnDark
68
+ position="absolute"
69
+ component="nav"
70
+ aria-label={t('workspaceNavigation')}
71
+ >
72
+ <StyledToolbar disableGutters>
73
+ <WorkspaceAddButton />
74
+ <StyledWorkspaceButtons>
75
+ <WorkspaceControlPanelButtons />
76
+ </StyledWorkspaceButtons>
77
+ </StyledToolbar>
78
+ <StyledBranding variant={variant} />
79
+ </Root>
80
+ );
81
+ }
82
+
83
+ WorkspaceControlPanel.propTypes = {
84
+ variant: PropTypes.oneOf(['default', 'wide']),
85
+ };
@@ -0,0 +1,20 @@
1
+ import FullScreenButton from '../containers/FullScreenButton';
2
+ import WorkspaceMenuButton from '../containers/WorkspaceMenuButton';
3
+ import WorkspaceOptionsButton from '../containers/WorkspaceOptionsButton';
4
+ import WindowListButton from '../containers/WindowListButton';
5
+ import { PluginHook } from './PluginHook';
6
+
7
+ /**
8
+ *
9
+ */
10
+ export function WorkspaceControlPanelButtons({ ...rest }) {
11
+ return (
12
+ <>
13
+ <WindowListButton />
14
+ <WorkspaceMenuButton />
15
+ <WorkspaceOptionsButton />
16
+ <FullScreenButton />
17
+ <PluginHook targetName="WorkspaceControlPanelButtons" {...rest} />
18
+ </>
19
+ );
20
+ }
@@ -0,0 +1,11 @@
1
+ import { Dialog } from '@mui/material';
2
+ import { styled } from '@mui/material/styles';
3
+
4
+ export const WorkspaceDialog = styled(Dialog, { name: 'WorkspaceDialog', slot: 'root' })(({ theme, variant }) => ({
5
+ '& .MuiDialogTitle-root': theme.unstable_sx({ typography: 'h2' }),
6
+ ...(variant === 'menu' && {
7
+ '& .MuiDialogContent-root': {
8
+ padding: 0,
9
+ },
10
+ }),
11
+ }));
@@ -0,0 +1,88 @@
1
+ import PropTypes from 'prop-types';
2
+ import { useState, useRef, useLayoutEffect } from 'react';
3
+ import { styled } from '@mui/material/styles';
4
+ import { Rnd } from 'react-rnd';
5
+ import useResizeObserver from '@react-hook/resize-observer';
6
+ import WorkspaceElasticWindow from '../containers/WorkspaceElasticWindow';
7
+ import ns from '../config/css-ns';
8
+
9
+ const Root = styled('div', { name: 'WorkspaceElastic', slot: 'root' })({
10
+ height: '100%',
11
+ overflow: 'hidden',
12
+ position: 'relative',
13
+ width: '100%',
14
+ });
15
+
16
+ const StyledRnd = styled(Rnd)({
17
+ boxSizing: 'border-box',
18
+ margin: 0,
19
+ position: 'absolute',
20
+ transitionDuration: '.7s',
21
+ '&.react-draggable-dragging': {
22
+ transitionDuration: 'unset',
23
+ },
24
+ });
25
+
26
+ /**
27
+ * Represents a work area that contains any number of windows
28
+ * @memberof Workspace
29
+ * @private
30
+ */
31
+ function WorkspaceElastic({ workspace, elasticLayout, setWorkspaceViewportDimensions, setWorkspaceViewportPosition }) {
32
+ const { viewportPosition } = workspace;
33
+ const offsetX = workspace.width / 2;
34
+ const offsetY = workspace.height / 2;
35
+ const target = useRef(null);
36
+
37
+ useLayoutEffect(() => {
38
+ if (target.current) setWorkspaceViewportDimensions(target.current.getBoundingClientRect());
39
+ }, [target, setWorkspaceViewportDimensions]);
40
+
41
+ useResizeObserver(target, (entry) => {
42
+ setWorkspaceViewportDimensions(entry.contentRect);
43
+ });
44
+
45
+ return (
46
+ <Root ref={target}>
47
+ <StyledRnd
48
+ size={{
49
+ height: workspace.height,
50
+ width: workspace.width,
51
+ }}
52
+ position={{
53
+ x: -1 * viewportPosition.x - offsetX,
54
+ y: -1 * viewportPosition.y - offsetY,
55
+ }}
56
+ enableResizing={{
57
+ bottom: false,
58
+ bottomLeft: false,
59
+ bottomRight: false,
60
+ left: false,
61
+ right: false,
62
+ top: false,
63
+ topLeft: false,
64
+ topRight: false,
65
+ }}
66
+ onDragStop={(e, d) => {
67
+ setWorkspaceViewportPosition({ x: -1 * d.x - offsetX, y: -1 * d.y - offsetY });
68
+ }}
69
+ cancel={`.${ns('window')}`}
70
+ className={ns('workspace')}
71
+ disableDragging={!workspace.draggingEnabled}
72
+ >
73
+ {Object.keys(elasticLayout).map((windowId) => (
74
+ <WorkspaceElasticWindow key={windowId} windowId={windowId} />
75
+ ))}
76
+ </StyledRnd>
77
+ </Root>
78
+ );
79
+ }
80
+
81
+ WorkspaceElastic.propTypes = {
82
+ elasticLayout: PropTypes.object.isRequired,
83
+ setWorkspaceViewportDimensions: PropTypes.func.isRequired,
84
+ setWorkspaceViewportPosition: PropTypes.func.isRequired,
85
+ workspace: PropTypes.object.isRequired,
86
+ };
87
+
88
+ export default WorkspaceElastic;
@@ -0,0 +1,79 @@
1
+ import PropTypes from 'prop-types';
2
+ import { styled } from '@mui/material/styles';
3
+ import { Rnd } from 'react-rnd';
4
+ import Window from '../containers/Window';
5
+ import ns from '../config/css-ns';
6
+
7
+ const StyledRnd = styled(Rnd, { shouldForwardProp: (prop) => prop !== 'focused' })(({ focused, theme }) => ({
8
+ zIndex: focused ? theme.zIndex.modal - 1 : 'auto',
9
+ }));
10
+
11
+ /**
12
+ * Represents a work area that contains any number of windows
13
+ * @memberof Workspace
14
+ * @private
15
+ */
16
+ function WorkspaceElasticWindow({
17
+ classes = {},
18
+ companionWindowDimensions = { height: 0, width: 0 },
19
+ focused = false,
20
+ focusWindow = () => {},
21
+ layout,
22
+ workspace,
23
+ updateElasticWindowLayout,
24
+ }) {
25
+ const offsetX = workspace.width / 2;
26
+ const offsetY = workspace.height / 2;
27
+
28
+ return (
29
+ <StyledRnd
30
+ focused={focused}
31
+ className={focused ? classes.focused : undefined}
32
+ key={`${layout.windowId}-${workspace.id}`}
33
+ size={{
34
+ height: layout.height + companionWindowDimensions.height,
35
+ width: layout.width + companionWindowDimensions.width,
36
+ }}
37
+ position={{ x: layout.x + offsetX, y: layout.y + offsetY }}
38
+ bounds="parent"
39
+ onDragStop={(e, d) => {
40
+ updateElasticWindowLayout(layout.windowId, { x: d.x - offsetX, y: d.y - offsetY });
41
+ }}
42
+ onDragStart={focusWindow}
43
+ onResize={(e, direction, ref, delta, position) => {
44
+ updateElasticWindowLayout(layout.windowId, {
45
+ height: Number.parseInt(ref.style.height, 10) - companionWindowDimensions.height,
46
+ width: Number.parseInt(ref.style.width, 10) - companionWindowDimensions.width,
47
+ x: position.x - offsetX,
48
+ y: position.y - offsetY,
49
+ });
50
+ }}
51
+ dragHandleClassName={ns('window-top-bar')}
52
+ cancel={`.${ns('window-menu-btn')}`}
53
+ >
54
+ <Window windowId={layout.windowId} />
55
+ </StyledRnd>
56
+ );
57
+ }
58
+
59
+ WorkspaceElasticWindow.propTypes = {
60
+ classes: PropTypes.objectOf(PropTypes.string),
61
+ companionWindowDimensions: PropTypes.shape({
62
+ height: PropTypes.number,
63
+ width: PropTypes.number,
64
+ }),
65
+ focused: PropTypes.bool,
66
+ focusWindow: PropTypes.func,
67
+ layout: PropTypes.shape({
68
+ height: PropTypes.number,
69
+ id: PropTypes.string,
70
+ width: PropTypes.number,
71
+ windowId: PropTypes.string,
72
+ x: PropTypes.number,
73
+ y: PropTypes.number,
74
+ }).isRequired,
75
+ updateElasticWindowLayout: PropTypes.func.isRequired,
76
+ workspace: PropTypes.object.isRequired,
77
+ };
78
+
79
+ export default WorkspaceElasticWindow;