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,607 @@
1
+ import { v4 as uuid } from 'uuid';
2
+
3
+ export default {
4
+ state: {
5
+ // slice: 'mirador' // Configure the top-level slice of state for mirador selectors
6
+ },
7
+ canvasNavigation: {
8
+ // Set the height and width of canvas thumbnails in the CanvasNavigation companion window
9
+ height: 50,
10
+ width: 50,
11
+ },
12
+ // Override the default fallback image with a custom one for loading failures
13
+ // fallbackImage: 'path/to/your/custom/fallback.jpg',
14
+ selectedTheme: 'light', // dark also available
15
+ themes: {
16
+ dark: {
17
+ palette: {
18
+ mode: 'dark',
19
+ primary: {
20
+ main: '#4db6ac',
21
+ },
22
+ secondary: {
23
+ main: '#4db6ac',
24
+ },
25
+ shades: {
26
+ dark: '#000000',
27
+ main: '#424242',
28
+ light: '#616161',
29
+ },
30
+ },
31
+ },
32
+ light: {
33
+ palette: {
34
+ mode: 'light',
35
+ },
36
+ },
37
+ },
38
+ theme: {
39
+ // Sets up a MaterialUI theme. See https://material-ui.com/customization/default-theme/
40
+ palette: {
41
+ mode: 'light',
42
+ primary: {
43
+ main: '#1967d2', // Controls the color of the Add button and current window indicator
44
+ },
45
+ secondary: {
46
+ main: '#1967d2', // Controls the color of Selects and FormControls
47
+ },
48
+ shades: {
49
+ // Shades that can be used to offset color areas of the Workspace / Window
50
+ dark: '#eeeeee',
51
+ main: '#ffffff',
52
+ light: '#f5f5f5',
53
+ },
54
+ error: {
55
+ main: '#b00020',
56
+ },
57
+ notification: {
58
+ // Color used in MUI Badge dots
59
+ main: '#ffa224',
60
+ contrastText: '#ffa224',
61
+ },
62
+ hitCounter: {
63
+ default: '#bdbdbd',
64
+ },
65
+ highlights: {
66
+ primary: '#ffff00',
67
+ secondary: '#00BFFF',
68
+ },
69
+ section_divider: 'rgba(0, 0, 0, 0.25)',
70
+ annotations: {
71
+ chipBackground: '#e0e0e0',
72
+ hidden: { globalAlpha: 0 },
73
+ default: { strokeStyle: '#00BFFF', globalAlpha: 1 },
74
+ hovered: { strokeStyle: '#BF00FF', globalAlpha: 1 },
75
+ selected: { strokeStyle: '#ffff00', globalAlpha: 1 },
76
+ },
77
+ search: {
78
+ default: { fillStyle: '#00BFFF', globalAlpha: 0.3 },
79
+ hovered: { fillStyle: '#00FFFF', globalAlpha: 0.3 },
80
+ selected: { fillStyle: '#ffff00', globalAlpha: 0.3 },
81
+ },
82
+ },
83
+ typography: {
84
+ body1: {
85
+ fontSize: '1rem',
86
+ letterSpacing: '0em',
87
+ lineHeight: '1.6em',
88
+ },
89
+ body2: {
90
+ fontSize: '0.878rem',
91
+ letterSpacing: '0.015em',
92
+ lineHeight: '1.6em',
93
+ },
94
+ button: {
95
+ fontSize: '0.878rem',
96
+ letterSpacing: '0.09em',
97
+ lineHeight: '2.25rem',
98
+ textTransform: 'uppercase',
99
+ },
100
+ caption: {
101
+ fontSize: '0.772rem',
102
+ letterSpacing: '0.033em',
103
+ lineHeight: '1.6rem',
104
+ },
105
+ body1Next: {
106
+ fontSize: '1rem',
107
+ letterSpacing: '0em',
108
+ lineHeight: '1.6em',
109
+ },
110
+ body2Next: {
111
+ fontSize: '0.878rem',
112
+ letterSpacing: '0.015em',
113
+ lineHeight: '1.6em',
114
+ },
115
+ buttonNext: {
116
+ fontSize: '0.878rem',
117
+ letterSpacing: '0.09em',
118
+ lineHeight: '2.25rem',
119
+ },
120
+ captionNext: {
121
+ fontSize: '0.772rem',
122
+ letterSpacing: '0.33em',
123
+ lineHeight: '1.6rem',
124
+ },
125
+ overline: {
126
+ fontSize: '0.678rem',
127
+ fontWeight: 500,
128
+ letterSpacing: '0.166em',
129
+ lineHeight: '2em',
130
+ textTransform: 'uppercase',
131
+ },
132
+ h1: {
133
+ fontSize: '2.822rem',
134
+ letterSpacing: '-0.015em',
135
+ lineHeight: '1.2em',
136
+ },
137
+ h2: {
138
+ fontSize: '1.575rem',
139
+ letterSpacing: '0em',
140
+ lineHeight: '1.33em',
141
+ },
142
+ h3: {
143
+ fontSize: '1.383rem',
144
+ fontWeight: 300,
145
+ letterSpacing: '0em',
146
+ lineHeight: '1.33em',
147
+ },
148
+ h4: {
149
+ fontSize: '1.215rem',
150
+ letterSpacing: '0.007em',
151
+ lineHeight: '1.45em',
152
+ },
153
+ h5: {
154
+ fontSize: '1.138rem',
155
+ letterSpacing: '0.005em',
156
+ lineHeight: '1.55em',
157
+ },
158
+ h6: {
159
+ fontSize: '1.067rem',
160
+ fontWeight: 400,
161
+ letterSpacing: '0.01em',
162
+ lineHeight: '1.6em',
163
+ },
164
+ subtitle1: {
165
+ fontSize: '0.937rem',
166
+ letterSpacing: '0.015em',
167
+ lineHeight: '1.6em',
168
+ fontWeight: 300,
169
+ },
170
+ subtitle2: {
171
+ fontSize: '0.878rem',
172
+ fontWeight: 500,
173
+ letterSpacing: '0.02em',
174
+ lineHeight: '1.75em',
175
+ },
176
+ useNextVariants: true, // set so that console deprecation warning is removed
177
+ },
178
+ components: {
179
+ MuiMenuItem: {
180
+ variants: [
181
+ {
182
+ props: { variant: 'multiline' },
183
+ style: { whiteSpace: 'normal' },
184
+ },
185
+ ],
186
+ },
187
+ CompanionWindow: {
188
+ styleOverrides: {
189
+ closeButton: {
190
+ order: 4,
191
+ },
192
+ contents: {
193
+ overflowY: 'auto',
194
+ wordBreak: 'break-word',
195
+ },
196
+ controls: ({ ownerState }) => ({
197
+ alignItems: 'center',
198
+ display: 'flex',
199
+ flexFlow: 'row wrap',
200
+ flexGrow: 1,
201
+ justifyContent:
202
+ ownerState?.position === 'bottom' || ownerState?.position === 'far-bottom' ? 'flex-end' : 'flex-start',
203
+ minHeight: 48,
204
+ order: 3,
205
+ }),
206
+ positionButton: {
207
+ marginLeft: -16,
208
+ order: -100,
209
+ width: 24,
210
+ },
211
+ resize: ({ ownerState }) => ({
212
+ display: 'flex',
213
+ flexDirection: 'column',
214
+ minHeight: 50,
215
+ minWidth: ownerState?.position === 'left' ? 235 : 100,
216
+ position: 'relative',
217
+ }),
218
+ root: ({ ownerState }) => ({
219
+ boxShadow: 'none',
220
+ boxSizing: 'border-box',
221
+ display: 'flex',
222
+ flexDirection: 'column',
223
+ minHeight: 0,
224
+ ...(ownerState?.position === 'right' && {
225
+ borderLeft: '0.5px solid rgba(0, 0, 0, 0.125)',
226
+ }),
227
+ ...(ownerState?.position === 'left' && {
228
+ borderRight: '0.5px solid rgba(0, 0, 0, 0.125)',
229
+ }),
230
+ ...(ownerState?.position === 'bottom' && {
231
+ borderTop: '0.5px solid rgba(0, 0, 0, 0.125)',
232
+ }),
233
+ }),
234
+ title: ({ theme }) => ({
235
+ ...theme.typography.subtitle1,
236
+ alignSelf: 'center',
237
+ flexGrow: 1,
238
+ width: 160,
239
+ }),
240
+ toolbar: ({ theme }) => ({
241
+ alignItems: 'flex-start',
242
+ backgroundColor: theme.palette.shades.light,
243
+ flexWrap: 'wrap',
244
+ justifyContent: 'space-between',
245
+ minHeight: 'max-content',
246
+ paddingInlineStart: '1rem',
247
+ }),
248
+ },
249
+ },
250
+ CompanionWindowSection: {
251
+ styleOverrides: {
252
+ root: {
253
+ borderBlockEnd: '.5px solid rgba(0, 0, 0, 0.25)',
254
+ },
255
+ },
256
+ },
257
+ IIIFHtmlContent: {
258
+ styleOverrides: {
259
+ root: ({ theme }) => ({
260
+ '& a': {
261
+ color: theme.palette.primary.main,
262
+ textDecoration: 'underline',
263
+ },
264
+ }),
265
+ },
266
+ },
267
+ IIIFThumbnail: {
268
+ styleOverrides: {
269
+ root: ({ ownerState }) => ({
270
+ ...(ownerState?.variant === 'inside' && {
271
+ display: 'inline-block',
272
+ height: 'inherit',
273
+ position: 'relative',
274
+ }),
275
+ }),
276
+ label: ({ ownerState }) => ({
277
+ overflow: 'hidden',
278
+ textOverflow: 'ellipsis',
279
+ lineHeight: '1.5em',
280
+ wordBreak: 'break-word',
281
+ ...(ownerState?.variant === 'inside' && {
282
+ color: '#ffffff',
283
+ WebkitLineClamp: 1,
284
+ whiteSpace: 'nowrap',
285
+ }),
286
+ ...(ownerState?.variant === 'outside' && {
287
+ display: '-webkit-box',
288
+ maxHeight: '3em',
289
+ MozBoxOrient: 'vertical',
290
+ WebkitLineClamp: 2,
291
+ }),
292
+ ...(ownerState?.variant === 'inside' && {
293
+ background: 'linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0) 100%)',
294
+ bottom: '0px',
295
+ boxSizing: 'border-box',
296
+ left: '0px',
297
+ padding: '4px',
298
+ position: 'absolute',
299
+ width: '100%',
300
+ }),
301
+ }),
302
+ image: ({ ownerState }) => ({
303
+ ...(ownerState?.border && {
304
+ border: '1px solid rgba(0, 0, 0, 0.125)',
305
+ }),
306
+ }),
307
+ },
308
+ },
309
+ ThemeIcon: {
310
+ styleOverrides: {
311
+ icon: ({ ownerState }) => ({
312
+ color: ownerState?.value === 'dark' ? '#000000' : undefined,
313
+ }),
314
+ },
315
+ },
316
+ MuiAccordion: {
317
+ variants: [
318
+ {
319
+ props: { variant: 'compact' },
320
+ style: {
321
+ '& .MuiAccordionSummary-root': {
322
+ minHeight: 'unset',
323
+ padding: 0,
324
+ },
325
+ '& .MuiAccordionSummary-content': {
326
+ margin: 0,
327
+ },
328
+ '& .MuiAccordionDetails-root': {
329
+ padding: 0,
330
+ },
331
+ },
332
+ },
333
+ ],
334
+ },
335
+ MuiButton: {
336
+ styleOverrides: {
337
+ inlineText: {
338
+ lineHeight: '1.5em',
339
+ padding: 0,
340
+ textAlign: 'inherit',
341
+ textTransform: 'none',
342
+ },
343
+ inlineTextSecondary: ({ theme }) => ({
344
+ color: theme.palette.secondary.main,
345
+ }),
346
+ },
347
+ },
348
+ MuiButtonBase: {
349
+ defaultProps: {
350
+ disableTouchRipple: true,
351
+ },
352
+ },
353
+ MuiDialog: {
354
+ variants: [
355
+ {
356
+ props: { variant: 'contained' },
357
+ style: {
358
+ position: 'absolute',
359
+ '& .MuiBackdrop-root': {
360
+ position: 'absolute',
361
+ },
362
+ },
363
+ },
364
+ ],
365
+ },
366
+ MuiFab: {
367
+ styleOverrides: {
368
+ root: {
369
+ transition: 'none',
370
+ },
371
+ },
372
+ },
373
+ MuiLink: {
374
+ defaultProps: {
375
+ underline: 'always',
376
+ },
377
+ },
378
+ MuiListSubheader: {
379
+ styleOverrides: {
380
+ root: {
381
+ '&[role="presentation"]:focus': {
382
+ outline: 0,
383
+ },
384
+ },
385
+ },
386
+ },
387
+ MuiTooltip: {
388
+ // Overridden from https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Tooltip/Tooltip.js#L40-L70
389
+ styleOverrides: {
390
+ tooltipPlacementLeft: {
391
+ ['@media (min-width:600px)']: {
392
+ margin: '0 !important',
393
+ },
394
+ },
395
+ tooltipPlacementRight: {
396
+ ['@media (min-width:600px)']: {
397
+ margin: '0 !important',
398
+ },
399
+ },
400
+ tooltipPlacementTop: {
401
+ ['@media (min-width:600px)']: {
402
+ margin: '0 !important',
403
+ },
404
+ },
405
+ tooltipPlacementBottom: {
406
+ ['@media (min-width:600px)']: {
407
+ margin: '0 !important',
408
+ },
409
+ },
410
+ },
411
+ },
412
+ MuiTouchRipple: {
413
+ styleOverrides: {
414
+ childPulsate: {
415
+ animation: 'none',
416
+ },
417
+ rippleVisible: {
418
+ animation: 'none',
419
+ },
420
+ },
421
+ },
422
+ },
423
+ },
424
+ language: 'en', // The default language set in the application
425
+ availableLanguages: {
426
+ // All the languages available in the language switcher
427
+ ar: 'العربية',
428
+ de: 'Deutsch',
429
+ en: 'English',
430
+ et: 'Eesti',
431
+ fa: 'فارسی',
432
+ fr: 'Français',
433
+ hr: 'Hrvatski',
434
+ ja: '日本語',
435
+ kr: '한국어',
436
+ lt: 'Lietuvių',
437
+ hu: 'Magyar',
438
+ nl: 'Nederlands',
439
+ 'nb-NO': 'Norwegian Bokmål',
440
+ pl: 'Polski',
441
+ 'pt-BR': 'Português do Brasil',
442
+ vi: 'Tiếng Việt',
443
+ 'zh-CN': '中文(简体)',
444
+ 'zh-TW': '中文(繁體)',
445
+ it: 'Italiano',
446
+ sr: 'Српски',
447
+ sv: 'Svenska',
448
+ bg: 'Български',
449
+ },
450
+ annotations: {
451
+ htmlSanitizationRuleSet: 'iiif', // See src/lib/htmlRules.js for acceptable values
452
+ // filteredMotivations: if empty, all annotation motivations will be shown.
453
+ // Otherwise, only annotations with motivations listed in the array will be shown.
454
+ filteredMotivations: [],
455
+ },
456
+ createGenerateClassNameOptions: {
457
+ // Options passed directly to createGenerateClassName in Material-UI https://material-ui.com/styles/api/#creategenerateclassname-options-class-name-generator
458
+ productionPrefix: 'mirador',
459
+ },
460
+ requests: {
461
+ preprocessors: [
462
+ // Functions that receive HTTP requests and manipulate them (e.g. to add headers)
463
+ // (url, options) => (url.match('info.json') && { ...options, myCustomThing: 'blah' })
464
+ ],
465
+ postprocessors: [
466
+ // Functions that receive HTTP responses and manipulates them before adding to store
467
+ // An example of manipulating the response for an annotation request
468
+ // (url, action) => {
469
+ // if (action.annotationId) {
470
+ // action.annotationJson = {};
471
+ // }
472
+ // }
473
+ ],
474
+ },
475
+ translations: {
476
+ // Translations can be added to inject new languages or override existing labels
477
+ },
478
+ window: {
479
+ //global window defaults
480
+ allowClose: true, // Configure if windows can be closed or not
481
+ allowFullscreen: false, // Configure to show a "fullscreen" button in the WindowTopBar
482
+ allowMaximize: true, // Configure if windows can be maximized or not
483
+ allowTopMenuButton: true, // Configure if window view and thumbnail display menu are visible or not
484
+ allowWindowSideBar: true, // Configure if side bar menu is visible or not
485
+ authNewWindowCenter: 'parent', // Configure how to center a new window created by the authentication flow. Options: parent, screen
486
+ sideBarPanel: 'info', // Configure which sidebar is selected by default. Options: info, attribution, canvas, annotations, search
487
+ defaultSidebarPanelHeight: 201, // Configure default sidebar height in pixels
488
+ defaultSidebarPanelWidth: 235, // Configure default sidebar width in pixels
489
+ defaultView: 'single', // Configure which viewing mode (e.g. single, book, gallery) for windows to be opened in
490
+ forceDrawAnnotations: false,
491
+ hideWindowTitle: false, // Configure if the window title is shown in the window title bar or not
492
+ highlightAllAnnotations: false, // Configure whether to display annotations on the canvas by default
493
+ showLocalePicker: false, // Configure locale picker for multi-lingual metadata
494
+ sideBarOpen: false, // Configure if the sidebar (and its content panel) is open by default
495
+ switchCanvasOnSearch: true, // Configure if Mirador should automatically switch to the canvas of the first search result
496
+ panels: {
497
+ // Configure which panels are visible in WindowSideBarButtons
498
+ info: true,
499
+ attribution: true,
500
+ canvas: true,
501
+ annotations: true,
502
+ search: true,
503
+ layers: true,
504
+ },
505
+ views: [
506
+ { key: 'single', behaviors: ['individuals'] },
507
+ { key: 'book', behaviors: ['paged'] },
508
+ { key: 'scroll', behaviors: ['continuous'] },
509
+ { key: 'gallery' },
510
+ ],
511
+ elastic: {
512
+ height: 400,
513
+ width: 480,
514
+ },
515
+ },
516
+ windows: [
517
+ // Array of windows to be open when mirador initializes (each object should at least provide a manifestId key with the value of the IIIF presentation manifest to load)
518
+ /**
519
+ Example Window:
520
+ {
521
+ manifestId: 'https://iiif.harvardartmuseums.org/manifests/object/299843',
522
+ canvasId: 'https://iiif.harvardartmuseums.org/manifests/object/299843/page_2',
523
+ thumbnailNavigationPosition: 'far-bottom',
524
+ maximized: false,
525
+ }
526
+ // ../state/actions/window.js `defaultOptions`
527
+ // ../lib/MiradorViewer.js `windowAction`
528
+ */
529
+ ],
530
+ thumbnails: {
531
+ preferredFormats: ['jpg', 'png', 'webp', 'tif'],
532
+ },
533
+ thumbnailNavigation: {
534
+ defaultPosition: 'off', // Which position for the thumbnail navigation to be be displayed. Other possible values are "far-bottom" or "far-right"
535
+ displaySettings: true, // Display the settings for this in WindowTopMenu
536
+ height: 130, // height of entire ThumbnailNavigation area when position is "far-bottom"
537
+ showThumbnailLabels: true, // Configure if thumbnail labels should be displayed
538
+ width: 100, // width of one canvas (doubled for book view) in ThumbnailNavigation area when position is "far-right"
539
+ },
540
+ workspace: {
541
+ allowNewWindows: true,
542
+ draggingEnabled: true,
543
+ height: 5000, // height of the elastic mode's virtual canvas
544
+ id: uuid(),
545
+ isWorkspaceAddVisible: false, // Catalog/Workspace add window feature visible by default
546
+ showZoomControls: true, // Configure if zoom controls should be displayed by default
547
+ type: 'mosaic', // Which workspace type to load by default. Other possible values are "elastic". If "mosaic" or "elastic" are not selected no workspace type will be used.
548
+ viewportPosition: {
549
+ // center coordinates for the elastic mode workspace
550
+ x: 0,
551
+ y: 0,
552
+ },
553
+ width: 5000, // width of the elastic mode's virtual canvas
554
+ },
555
+ workspaceControlPanel: {
556
+ enabled: true, // Configure if the control panel should be rendered. Useful if you want to lock the viewer down to only the configured manifests
557
+ },
558
+ galleryView: {
559
+ height: 120, // height of gallery view thumbnails
560
+ width: null, // width of gallery view thumbnails (or null, to auto-calculate an aspect-ratio appropriate size)
561
+ },
562
+ osdConfig: {
563
+ // Default config used for OpenSeadragon
564
+ alwaysBlend: false,
565
+ blendTime: 0.1,
566
+ preserveImageSizeOnResize: true,
567
+ preserveViewport: false,
568
+ showNavigationControl: false,
569
+ zoomPerClick: 1, // disable zoom-to-click
570
+ zoomPerDoubleClick: 2.0,
571
+ },
572
+ export: {
573
+ catalog: true,
574
+ companionWindows: true,
575
+ config: true,
576
+ elasticLayout: true,
577
+ layers: true,
578
+ // filter out anything re-retrievable:
579
+ manifests: { filter: ([id, value]) => !id.startsWith('http') },
580
+ viewers: true,
581
+ windows: true,
582
+ workspace: true,
583
+ },
584
+ audioOptions: {
585
+ // Additional props passed to <audio> element
586
+ controls: true,
587
+ crossOrigin: 'anonymous',
588
+ },
589
+ videoOptions: {
590
+ // Additional props passed to <audio> element
591
+ controls: true,
592
+ crossOrigin: 'anonymous',
593
+ },
594
+ auth: {
595
+ serviceProfiles: [
596
+ { profile: 'http://iiif.io/api/auth/1/external', external: true },
597
+ { profile: 'http://iiif.io/api/auth/1/kiosk', kiosk: true },
598
+ { profile: 'http://iiif.io/api/auth/1/clickthrough' },
599
+ { profile: 'http://iiif.io/api/auth/1/login' },
600
+ { profile: 'http://iiif.io/api/auth/0/external', external: true },
601
+ { profile: 'http://iiif.io/api/auth/0/kiosk', kiosk: true },
602
+ { profile: 'http://iiif.io/api/auth/0/clickthrough' },
603
+ { profile: 'http://iiif.io/api/auth/0/login' },
604
+ ],
605
+ },
606
+ labelValueJoiner: ', ',
607
+ };
@@ -0,0 +1,27 @@
1
+ import { compose } from 'redux';
2
+ import { connect } from 'react-redux';
3
+ import * as actions from '../state/actions';
4
+ import { withPlugins } from '../extend/withPlugins';
5
+ import { getAnnotationResourcesByMotivation, getWindow } from '../state/selectors';
6
+ import { AnnotationSettings } from '../components/AnnotationSettings';
7
+
8
+ /**
9
+ * Mapping redux state to component props using connect
10
+ */
11
+ const mapStateToProps = (state, { windowId }) => ({
12
+ displayAll: getWindow(state, { windowId }).highlightAllAnnotations,
13
+ displayAllDisabled: getAnnotationResourcesByMotivation(state, { windowId }).length < 1,
14
+ });
15
+
16
+ /**
17
+ * Mapping redux action dispatches to component props using connect
18
+ */
19
+ const mapDispatchToProps = (dispatch, { windowId }) => ({
20
+ toggleAnnotationDisplay: () => {
21
+ dispatch(actions.toggleAnnotationDisplay(windowId));
22
+ },
23
+ });
24
+
25
+ const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('AnnotationSettings'));
26
+
27
+ export default enhance(AnnotationSettings);
@@ -0,0 +1,51 @@
1
+ import { compose } from 'redux';
2
+ import { connect } from 'react-redux';
3
+ import { withPlugins } from '../extend/withPlugins';
4
+ import { AnnotationsOverlay } from '../components/AnnotationsOverlay';
5
+ import * as actions from '../state/actions';
6
+ import {
7
+ getWindow,
8
+ getSearchAnnotationsForWindow,
9
+ getCompanionWindowsForContent,
10
+ getTheme,
11
+ getConfig,
12
+ getPresentAnnotationsOnSelectedCanvases,
13
+ getSelectedAnnotationId,
14
+ getCurrentCanvasWorld,
15
+ } from '../state/selectors';
16
+
17
+ /**
18
+ * mapStateToProps - used to hook up connect to action creators
19
+ * @memberof Window
20
+ * @private
21
+ */
22
+ const mapStateToProps = (state, { windowId }) => ({
23
+ annotations: getPresentAnnotationsOnSelectedCanvases(state, { windowId }),
24
+ canvasWorld: getCurrentCanvasWorld(state, { windowId }),
25
+ drawAnnotations:
26
+ getConfig(state).window.forceDrawAnnotations ||
27
+ getCompanionWindowsForContent(state, { content: 'annotations', windowId }).length > 0,
28
+ drawSearchAnnotations:
29
+ getConfig(state).window.forceDrawAnnotations ||
30
+ getCompanionWindowsForContent(state, { content: 'search', windowId }).length > 0,
31
+ highlightAllAnnotations: getWindow(state, { windowId }).highlightAllAnnotations,
32
+ hoveredAnnotationIds: getWindow(state, { windowId }).hoveredAnnotationIds,
33
+ palette: getTheme(state).palette,
34
+ searchAnnotations: getSearchAnnotationsForWindow(state, { windowId }),
35
+ selectedAnnotationId: getSelectedAnnotationId(state, { windowId }),
36
+ });
37
+
38
+ /**
39
+ * mapDispatchToProps - used to hook up connect to action creators
40
+ * @memberof ManifestListItem
41
+ * @private
42
+ */
43
+ const mapDispatchToProps = {
44
+ deselectAnnotation: actions.deselectAnnotation,
45
+ hoverAnnotation: actions.hoverAnnotation,
46
+ selectAnnotation: actions.selectAnnotation,
47
+ };
48
+
49
+ const enhance = compose(connect(mapStateToProps, mapDispatchToProps), withPlugins('AnnotationsOverlay'));
50
+
51
+ export default enhance(AnnotationsOverlay);
@@ -0,0 +1,20 @@
1
+ import { compose } from 'redux';
2
+ import { connect } from 'react-redux';
3
+ import { withPlugins } from '../extend/withPlugins';
4
+ import { getConfig, getTheme } from '../state/selectors';
5
+ import { AppProviders } from '../components/AppProviders';
6
+
7
+ /**
8
+ * mapStateToProps - to hook up connect
9
+ * @memberof App
10
+ * @private
11
+ */
12
+ const mapStateToProps = (state) => ({
13
+ language: getConfig(state).language,
14
+ theme: getTheme(state),
15
+ translations: getConfig(state).translations,
16
+ });
17
+
18
+ const enhance = compose(connect(mapStateToProps), withPlugins('AppProviders'));
19
+
20
+ export default enhance(AppProviders);