@semiont/react-ui 0.5.4 → 0.5.6

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 (410) hide show
  1. package/README.md +59 -55
  2. package/dist/{PdfAnnotationCanvas.client-CN3C3S55.js → PdfAnnotationCanvas.client-NIMALXNZ.js} +7 -27
  3. package/dist/PdfAnnotationCanvas.client-NIMALXNZ.js.map +1 -0
  4. package/dist/index.css +6 -0
  5. package/dist/index.css.map +1 -1
  6. package/dist/index.d.ts +3704 -149
  7. package/dist/index.js +539 -405
  8. package/dist/index.js.map +1 -1
  9. package/dist/test-utils.d.ts +34 -16
  10. package/package.json +19 -13
  11. package/src/components/Button/__tests__/Button.test.tsx +0 -2
  12. package/src/components/CodeMirrorRenderer.tsx +2 -0
  13. package/src/components/ErrorBoundary.tsx +0 -9
  14. package/src/components/ProtectedErrorBoundary.tsx +6 -2
  15. package/src/components/__tests__/AnnotateReferencesProgressWidget.test.tsx +0 -1
  16. package/src/components/__tests__/ErrorBoundary.test.tsx +20 -13
  17. package/src/components/__tests__/LiveRegion.hooks.test.tsx +1 -1
  18. package/src/components/__tests__/ProtectedErrorBoundary.test.tsx +2 -1
  19. package/src/components/__tests__/ResizeHandle.test.tsx +0 -1
  20. package/src/components/__tests__/SessionExpiryBanner.test.tsx +0 -1
  21. package/src/components/__tests__/StatusDisplay.test.tsx +0 -1
  22. package/src/components/__tests__/Toast.test.tsx +2 -3
  23. package/src/components/__tests__/Toolbar.test.tsx +0 -1
  24. package/src/components/annotation/annotations.css +14 -0
  25. package/src/components/annotation-popups/__tests__/JsonLdView.test.tsx +3 -5
  26. package/src/components/annotation-popups/__tests__/SharedPopupElements.test.tsx +0 -1
  27. package/src/components/branding/__tests__/SemiontBranding.test.tsx +1 -2
  28. package/src/components/layout/__tests__/LeftSidebar.test.tsx +5 -6
  29. package/src/components/layout/__tests__/PageLayout.test.tsx +1 -3
  30. package/src/components/layout/__tests__/SkipLinks.a11y.test.tsx +8 -8
  31. package/src/components/layout/__tests__/UnifiedHeader.test.tsx +12 -1
  32. package/src/components/modals/__tests__/KeyboardShortcutsHelpModal.test.tsx +0 -1
  33. package/src/components/modals/__tests__/PermissionDeniedModal.test.tsx +3 -4
  34. package/src/components/modals/__tests__/ResourceSearchModal.test.tsx +0 -1
  35. package/src/components/modals/__tests__/SearchModal.basic.test.tsx +1 -1
  36. package/src/components/modals/__tests__/SearchModal.keyboard.test.tsx +0 -5
  37. package/src/components/modals/__tests__/SearchModal.search-wiring.test.tsx +0 -1
  38. package/src/components/modals/__tests__/SearchModal.visual.test.tsx +2 -2
  39. package/src/components/modals/__tests__/SessionExpiredModal.test.tsx +0 -1
  40. package/src/components/navigation/NavigationMenu.tsx +1 -1
  41. package/src/components/navigation/__tests__/Footer.a11y.test.tsx +4 -0
  42. package/src/components/navigation/__tests__/Footer.test.tsx +3 -6
  43. package/src/components/navigation/__tests__/NavigationMenu.a11y.test.tsx +1 -1
  44. package/src/components/navigation/__tests__/NavigationMenu.test.tsx +7 -9
  45. package/src/components/navigation/__tests__/ObservableLink.test.tsx +0 -1
  46. package/src/components/navigation/__tests__/SimpleNavigation.test.tsx +1 -2
  47. package/src/components/navigation/__tests__/SortableResourceTab.test.tsx +0 -1
  48. package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +6 -4
  49. package/src/components/pdf-annotation/__tests__/PdfAnnotationCanvas.test.tsx +10 -19
  50. package/src/components/resource/__tests__/BrowseView.test.tsx +8 -6
  51. package/src/components/resource/__tests__/HistoryEvent.test.tsx +0 -4
  52. package/src/components/resource/__tests__/ResourceViewer.mode-switch.test.tsx +4 -6
  53. package/src/components/resource/panels/ReferencesPanel.tsx +1 -1
  54. package/src/components/resource/panels/__tests__/AssessmentEntry.test.tsx +3 -4
  55. package/src/components/resource/panels/__tests__/AssessmentPanel.test.tsx +7 -6
  56. package/src/components/resource/panels/__tests__/AssistSection.test.tsx +14 -10
  57. package/src/components/resource/panels/__tests__/CollaborationPanel.test.tsx +0 -1
  58. package/src/components/resource/panels/__tests__/CommentEntry.test.tsx +30 -17
  59. package/src/components/resource/panels/__tests__/CommentsPanel.test.tsx +6 -5
  60. package/src/components/resource/panels/__tests__/HighlightEntry.test.tsx +4 -5
  61. package/src/components/resource/panels/__tests__/HighlightPanel.annotationProgress.test.tsx +19 -13
  62. package/src/components/resource/panels/__tests__/JsonLdPanel.test.tsx +1 -3
  63. package/src/components/resource/panels/__tests__/PanelHeader.test.tsx +0 -1
  64. package/src/components/resource/panels/__tests__/ReferenceEntry.test.tsx +5 -5
  65. package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +40 -7
  66. package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +3 -3
  67. package/src/components/resource/panels/__tests__/StatisticsPanel.test.tsx +30 -32
  68. package/src/components/resource/panels/__tests__/TagEntry.test.tsx +5 -5
  69. package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +6 -5
  70. package/src/components/settings/__tests__/SettingsPanel.test.tsx +0 -1
  71. package/src/components/viewers/__tests__/ImageViewer.test.tsx +0 -1
  72. package/src/features/auth/__tests__/SignInForm.a11y.test.tsx +2 -0
  73. package/src/features/auth/__tests__/SignUpForm.a11y.test.tsx +11 -12
  74. package/src/features/auth/__tests__/SignUpForm.test.tsx +3 -3
  75. package/src/features/moderate-tag-schemas/components/TagSchemasPage.tsx +1 -0
  76. package/src/features/resource-compose/__tests__/ResourceComposePage.test.tsx +2 -1
  77. package/src/features/resource-discovery/__tests__/ResourceCard.test.tsx +0 -1
  78. package/src/features/resource-discovery/__tests__/ResourceDiscoveryPage.test.tsx +33 -35
  79. package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +12 -11
  80. package/src/features/resource-discovery/state/__tests__/discover-state-unit.test.ts +204 -11
  81. package/src/features/resource-discovery/state/discover-state-unit.ts +70 -11
  82. package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +2 -2
  83. package/src/features/resource-viewer/components/ResourceViewerPage.tsx +3 -2
  84. package/src/features/resource-viewer/state/__tests__/resource-viewer-page-state-unit.test.ts +0 -1
  85. package/src/features/resource-viewer/state/resource-viewer-page-state-unit.ts +5 -2
  86. package/src/integrations/__tests__/css-modules-helper.test.tsx +2 -3
  87. package/src/integrations/__tests__/styled-components-theme.test.ts +1 -3
  88. package/dist/PdfAnnotationCanvas.client-CN3C3S55.js.map +0 -1
  89. package/dist/assets/favicons/SemiontFavicon.d.ts +0 -9
  90. package/dist/assets/favicons/SemiontFavicon.d.ts.map +0 -1
  91. package/dist/assets/favicons/index.d.ts +0 -12
  92. package/dist/assets/favicons/index.d.ts.map +0 -1
  93. package/dist/components/AnnotateReferencesProgressWidget.d.ts +0 -15
  94. package/dist/components/AnnotateReferencesProgressWidget.d.ts.map +0 -1
  95. package/dist/components/Button/Button.d.ts +0 -69
  96. package/dist/components/Button/Button.d.ts.map +0 -1
  97. package/dist/components/CodeMirrorRenderer.d.ts +0 -25
  98. package/dist/components/CodeMirrorRenderer.d.ts.map +0 -1
  99. package/dist/components/ErrorBoundary.d.ts +0 -30
  100. package/dist/components/ErrorBoundary.d.ts.map +0 -1
  101. package/dist/components/LiveRegion.d.ts +0 -41
  102. package/dist/components/LiveRegion.d.ts.map +0 -1
  103. package/dist/components/ProtectedErrorBoundary.d.ts +0 -27
  104. package/dist/components/ProtectedErrorBoundary.d.ts.map +0 -1
  105. package/dist/components/ResizeHandle.d.ts +0 -39
  106. package/dist/components/ResizeHandle.d.ts.map +0 -1
  107. package/dist/components/ResourceTagsInline.d.ts +0 -10
  108. package/dist/components/ResourceTagsInline.d.ts.map +0 -1
  109. package/dist/components/SessionExpiryBanner.d.ts +0 -2
  110. package/dist/components/SessionExpiryBanner.d.ts.map +0 -1
  111. package/dist/components/SessionTimer.d.ts +0 -2
  112. package/dist/components/SessionTimer.d.ts.map +0 -1
  113. package/dist/components/StatusDisplay.d.ts +0 -9
  114. package/dist/components/StatusDisplay.d.ts.map +0 -1
  115. package/dist/components/Toast.d.ts +0 -27
  116. package/dist/components/Toast.d.ts.map +0 -1
  117. package/dist/components/Toolbar.d.ts +0 -15
  118. package/dist/components/Toolbar.d.ts.map +0 -1
  119. package/dist/components/UserMenuSkeleton.d.ts +0 -2
  120. package/dist/components/UserMenuSkeleton.d.ts.map +0 -1
  121. package/dist/components/annotation/AnnotateToolbar.d.ts +0 -29
  122. package/dist/components/annotation/AnnotateToolbar.d.ts.map +0 -1
  123. package/dist/components/annotation-popups/JsonLdView.d.ts +0 -8
  124. package/dist/components/annotation-popups/JsonLdView.d.ts.map +0 -1
  125. package/dist/components/annotation-popups/SharedPopupElements.d.ts +0 -28
  126. package/dist/components/annotation-popups/SharedPopupElements.d.ts.map +0 -1
  127. package/dist/components/branding/SemiontBranding.d.ts +0 -13
  128. package/dist/components/branding/SemiontBranding.d.ts.map +0 -1
  129. package/dist/components/error-states/ResourceErrorState.d.ts +0 -11
  130. package/dist/components/error-states/ResourceErrorState.d.ts.map +0 -1
  131. package/dist/components/image-annotation/AnnotationOverlay.d.ts +0 -22
  132. package/dist/components/image-annotation/AnnotationOverlay.d.ts.map +0 -1
  133. package/dist/components/image-annotation/SvgDrawingCanvas.d.ts +0 -23
  134. package/dist/components/image-annotation/SvgDrawingCanvas.d.ts.map +0 -1
  135. package/dist/components/layout/LeftSidebar.d.ts +0 -24
  136. package/dist/components/layout/LeftSidebar.d.ts.map +0 -1
  137. package/dist/components/layout/PageLayout.d.ts +0 -21
  138. package/dist/components/layout/PageLayout.d.ts.map +0 -1
  139. package/dist/components/layout/SkipLinks.d.ts +0 -8
  140. package/dist/components/layout/SkipLinks.d.ts.map +0 -1
  141. package/dist/components/layout/UnifiedHeader.d.ts +0 -21
  142. package/dist/components/layout/UnifiedHeader.d.ts.map +0 -1
  143. package/dist/components/loading-states/ComposeLoadingState.d.ts +0 -10
  144. package/dist/components/loading-states/ComposeLoadingState.d.ts.map +0 -1
  145. package/dist/components/loading-states/ResourceLoadingState.d.ts +0 -7
  146. package/dist/components/loading-states/ResourceLoadingState.d.ts.map +0 -1
  147. package/dist/components/modals/ConfigureGenerationStep.d.ts +0 -36
  148. package/dist/components/modals/ConfigureGenerationStep.d.ts.map +0 -1
  149. package/dist/components/modals/ConfigureSearchStep.d.ts +0 -21
  150. package/dist/components/modals/ConfigureSearchStep.d.ts.map +0 -1
  151. package/dist/components/modals/ContextSummary.d.ts +0 -14
  152. package/dist/components/modals/ContextSummary.d.ts.map +0 -1
  153. package/dist/components/modals/GatherContextStep.d.ts +0 -23
  154. package/dist/components/modals/GatherContextStep.d.ts.map +0 -1
  155. package/dist/components/modals/KeyboardShortcutsHelpModal.d.ts +0 -8
  156. package/dist/components/modals/KeyboardShortcutsHelpModal.d.ts.map +0 -1
  157. package/dist/components/modals/PermissionDeniedModal.d.ts +0 -12
  158. package/dist/components/modals/PermissionDeniedModal.d.ts.map +0 -1
  159. package/dist/components/modals/ReferenceWizardModal.d.ts +0 -64
  160. package/dist/components/modals/ReferenceWizardModal.d.ts.map +0 -1
  161. package/dist/components/modals/ResourceSearchModal.d.ts +0 -16
  162. package/dist/components/modals/ResourceSearchModal.d.ts.map +0 -1
  163. package/dist/components/modals/SearchModal.d.ts +0 -20
  164. package/dist/components/modals/SearchModal.d.ts.map +0 -1
  165. package/dist/components/modals/SearchResultsStep.d.ts +0 -22
  166. package/dist/components/modals/SearchResultsStep.d.ts.map +0 -1
  167. package/dist/components/modals/SessionExpiredModal.d.ts +0 -12
  168. package/dist/components/modals/SessionExpiredModal.d.ts.map +0 -1
  169. package/dist/components/navigation/CollapsibleResourceNavigation.d.ts +0 -13
  170. package/dist/components/navigation/CollapsibleResourceNavigation.d.ts.map +0 -1
  171. package/dist/components/navigation/Footer.d.ts +0 -20
  172. package/dist/components/navigation/Footer.d.ts.map +0 -1
  173. package/dist/components/navigation/NavigationMenu.d.ts +0 -18
  174. package/dist/components/navigation/NavigationMenu.d.ts.map +0 -1
  175. package/dist/components/navigation/ObservableLink.d.ts +0 -52
  176. package/dist/components/navigation/ObservableLink.d.ts.map +0 -1
  177. package/dist/components/navigation/SimpleNavigation.d.ts +0 -35
  178. package/dist/components/navigation/SimpleNavigation.d.ts.map +0 -1
  179. package/dist/components/navigation/SortableResourceTab.d.ts +0 -7
  180. package/dist/components/navigation/SortableResourceTab.d.ts.map +0 -1
  181. package/dist/components/pdf-annotation/PdfAnnotationCanvas.client.d.ts +0 -8
  182. package/dist/components/pdf-annotation/PdfAnnotationCanvas.client.d.ts.map +0 -1
  183. package/dist/components/pdf-annotation/PdfAnnotationCanvas.d.ts +0 -25
  184. package/dist/components/pdf-annotation/PdfAnnotationCanvas.d.ts.map +0 -1
  185. package/dist/components/resource/AnnotateView.d.ts +0 -29
  186. package/dist/components/resource/AnnotateView.d.ts.map +0 -1
  187. package/dist/components/resource/AnnotationHistory.d.ts +0 -14
  188. package/dist/components/resource/AnnotationHistory.d.ts.map +0 -1
  189. package/dist/components/resource/BrowseView.d.ts +0 -28
  190. package/dist/components/resource/BrowseView.d.ts.map +0 -1
  191. package/dist/components/resource/HistoryEvent.d.ts +0 -19
  192. package/dist/components/resource/HistoryEvent.d.ts.map +0 -1
  193. package/dist/components/resource/ResourceViewer.d.ts +0 -46
  194. package/dist/components/resource/ResourceViewer.d.ts.map +0 -1
  195. package/dist/components/resource/event-formatting.d.ts +0 -61
  196. package/dist/components/resource/event-formatting.d.ts.map +0 -1
  197. package/dist/components/resource/panels/AssessmentEntry.d.ts +0 -11
  198. package/dist/components/resource/panels/AssessmentEntry.d.ts.map +0 -1
  199. package/dist/components/resource/panels/AssessmentPanel.d.ts +0 -32
  200. package/dist/components/resource/panels/AssessmentPanel.d.ts.map +0 -1
  201. package/dist/components/resource/panels/AssistSection.d.ts +0 -27
  202. package/dist/components/resource/panels/AssistSection.d.ts.map +0 -1
  203. package/dist/components/resource/panels/CollaborationPanel.d.ts +0 -28
  204. package/dist/components/resource/panels/CollaborationPanel.d.ts.map +0 -1
  205. package/dist/components/resource/panels/CommentEntry.d.ts +0 -12
  206. package/dist/components/resource/panels/CommentEntry.d.ts.map +0 -1
  207. package/dist/components/resource/panels/CommentsPanel.d.ts +0 -32
  208. package/dist/components/resource/panels/CommentsPanel.d.ts.map +0 -1
  209. package/dist/components/resource/panels/HighlightEntry.d.ts +0 -11
  210. package/dist/components/resource/panels/HighlightEntry.d.ts.map +0 -1
  211. package/dist/components/resource/panels/HighlightPanel.d.ts +0 -30
  212. package/dist/components/resource/panels/HighlightPanel.d.ts.map +0 -1
  213. package/dist/components/resource/panels/JsonLdPanel.d.ts +0 -9
  214. package/dist/components/resource/panels/JsonLdPanel.d.ts.map +0 -1
  215. package/dist/components/resource/panels/PanelHeader.d.ts +0 -13
  216. package/dist/components/resource/panels/PanelHeader.d.ts.map +0 -1
  217. package/dist/components/resource/panels/ReferenceEntry.d.ts +0 -15
  218. package/dist/components/resource/panels/ReferenceEntry.d.ts.map +0 -1
  219. package/dist/components/resource/panels/ReferencesPanel.d.ts +0 -43
  220. package/dist/components/resource/panels/ReferencesPanel.d.ts.map +0 -1
  221. package/dist/components/resource/panels/ResourceInfoPanel.d.ts +0 -27
  222. package/dist/components/resource/panels/ResourceInfoPanel.d.ts.map +0 -1
  223. package/dist/components/resource/panels/StatisticsPanel.d.ts +0 -12
  224. package/dist/components/resource/panels/StatisticsPanel.d.ts.map +0 -1
  225. package/dist/components/resource/panels/TagEntry.d.ts +0 -11
  226. package/dist/components/resource/panels/TagEntry.d.ts.map +0 -1
  227. package/dist/components/resource/panels/TaggingPanel.d.ts +0 -34
  228. package/dist/components/resource/panels/TaggingPanel.d.ts.map +0 -1
  229. package/dist/components/resource/panels/UnifiedAnnotationsPanel.d.ts +0 -52
  230. package/dist/components/resource/panels/UnifiedAnnotationsPanel.d.ts.map +0 -1
  231. package/dist/components/resource/panels/agent-label.d.ts +0 -11
  232. package/dist/components/resource/panels/agent-label.d.ts.map +0 -1
  233. package/dist/components/settings/SettingsPanel.d.ts +0 -19
  234. package/dist/components/settings/SettingsPanel.d.ts.map +0 -1
  235. package/dist/components/viewers/ImageViewer.d.ts +0 -8
  236. package/dist/components/viewers/ImageViewer.d.ts.map +0 -1
  237. package/dist/components/viewers/index.d.ts +0 -2
  238. package/dist/components/viewers/index.d.ts.map +0 -1
  239. package/dist/contexts/AnnotationContext.d.ts +0 -46
  240. package/dist/contexts/AnnotationContext.d.ts.map +0 -1
  241. package/dist/contexts/ResourceAnnotationsContext.d.ts +0 -14
  242. package/dist/contexts/ResourceAnnotationsContext.d.ts.map +0 -1
  243. package/dist/contexts/RoutingContext.d.ts +0 -59
  244. package/dist/contexts/RoutingContext.d.ts.map +0 -1
  245. package/dist/contexts/ThemeContext.d.ts +0 -15
  246. package/dist/contexts/ThemeContext.d.ts.map +0 -1
  247. package/dist/contexts/TranslationContext.d.ts +0 -51
  248. package/dist/contexts/TranslationContext.d.ts.map +0 -1
  249. package/dist/contexts/useEventSubscription.d.ts +0 -41
  250. package/dist/contexts/useEventSubscription.d.ts.map +0 -1
  251. package/dist/design-tokens/index.d.ts +0 -178
  252. package/dist/design-tokens/index.d.ts.map +0 -1
  253. package/dist/features/admin-devops/components/AdminDevOpsPage.d.ts +0 -33
  254. package/dist/features/admin-devops/components/AdminDevOpsPage.d.ts.map +0 -1
  255. package/dist/features/admin-exchange/components/AdminExchangePage.d.ts +0 -37
  256. package/dist/features/admin-exchange/components/AdminExchangePage.d.ts.map +0 -1
  257. package/dist/features/admin-exchange/components/ExportCard.d.ts +0 -18
  258. package/dist/features/admin-exchange/components/ExportCard.d.ts.map +0 -1
  259. package/dist/features/admin-exchange/components/ImportCard.d.ts +0 -32
  260. package/dist/features/admin-exchange/components/ImportCard.d.ts.map +0 -1
  261. package/dist/features/admin-exchange/components/ImportProgress.d.ts +0 -26
  262. package/dist/features/admin-exchange/components/ImportProgress.d.ts.map +0 -1
  263. package/dist/features/admin-exchange/state/exchange-state-unit.d.ts +0 -31
  264. package/dist/features/admin-exchange/state/exchange-state-unit.d.ts.map +0 -1
  265. package/dist/features/admin-security/components/AdminSecurityPage.d.ts +0 -42
  266. package/dist/features/admin-security/components/AdminSecurityPage.d.ts.map +0 -1
  267. package/dist/features/admin-security/state/admin-security-state-unit.d.ts +0 -12
  268. package/dist/features/admin-security/state/admin-security-state-unit.d.ts.map +0 -1
  269. package/dist/features/admin-users/components/AdminUsersPage.d.ts +0 -88
  270. package/dist/features/admin-users/components/AdminUsersPage.d.ts.map +0 -1
  271. package/dist/features/admin-users/state/admin-users-state-unit.d.ts +0 -17
  272. package/dist/features/admin-users/state/admin-users-state-unit.d.ts.map +0 -1
  273. package/dist/features/auth/components/AuthErrorDisplay.d.ts +0 -34
  274. package/dist/features/auth/components/AuthErrorDisplay.d.ts.map +0 -1
  275. package/dist/features/auth/components/SignInForm.d.ts +0 -80
  276. package/dist/features/auth/components/SignInForm.d.ts.map +0 -1
  277. package/dist/features/auth/components/SignUpForm.d.ts +0 -39
  278. package/dist/features/auth/components/SignUpForm.d.ts.map +0 -1
  279. package/dist/features/auth-welcome/components/WelcomePage.d.ts +0 -62
  280. package/dist/features/auth-welcome/components/WelcomePage.d.ts.map +0 -1
  281. package/dist/features/auth-welcome/state/welcome-state-unit.d.ts +0 -12
  282. package/dist/features/auth-welcome/state/welcome-state-unit.d.ts.map +0 -1
  283. package/dist/features/moderate-entity-tags/components/EntityTagsPage.d.ts +0 -32
  284. package/dist/features/moderate-entity-tags/components/EntityTagsPage.d.ts.map +0 -1
  285. package/dist/features/moderate-entity-tags/state/entity-tags-state-unit.d.ts +0 -16
  286. package/dist/features/moderate-entity-tags/state/entity-tags-state-unit.d.ts.map +0 -1
  287. package/dist/features/moderate-recent/components/RecentDocumentsPage.d.ts +0 -27
  288. package/dist/features/moderate-recent/components/RecentDocumentsPage.d.ts.map +0 -1
  289. package/dist/features/moderate-tag-schemas/components/TagSchemasPage.d.ts +0 -25
  290. package/dist/features/moderate-tag-schemas/components/TagSchemasPage.d.ts.map +0 -1
  291. package/dist/features/moderation-linked-data/components/LinkedDataPage.d.ts +0 -38
  292. package/dist/features/moderation-linked-data/components/LinkedDataPage.d.ts.map +0 -1
  293. package/dist/features/resource-compose/components/ResourceComposePage.d.ts +0 -83
  294. package/dist/features/resource-compose/components/ResourceComposePage.d.ts.map +0 -1
  295. package/dist/features/resource-compose/components/UploadProgressBar.d.ts +0 -23
  296. package/dist/features/resource-compose/components/UploadProgressBar.d.ts.map +0 -1
  297. package/dist/features/resource-compose/state/compose-page-state-unit.d.ts +0 -59
  298. package/dist/features/resource-compose/state/compose-page-state-unit.d.ts.map +0 -1
  299. package/dist/features/resource-discovery/components/ResourceCard.d.ts +0 -17
  300. package/dist/features/resource-discovery/components/ResourceCard.d.ts.map +0 -1
  301. package/dist/features/resource-discovery/components/ResourceDiscoveryPage.d.ts +0 -43
  302. package/dist/features/resource-discovery/components/ResourceDiscoveryPage.d.ts.map +0 -1
  303. package/dist/features/resource-discovery/state/discover-state-unit.d.ts +0 -15
  304. package/dist/features/resource-discovery/state/discover-state-unit.d.ts.map +0 -1
  305. package/dist/features/resource-viewer/components/ResourceViewerPage.d.ts +0 -80
  306. package/dist/features/resource-viewer/components/ResourceViewerPage.d.ts.map +0 -1
  307. package/dist/features/resource-viewer/state/resource-loader-state-unit.d.ts +0 -11
  308. package/dist/features/resource-viewer/state/resource-loader-state-unit.d.ts.map +0 -1
  309. package/dist/features/resource-viewer/state/resource-viewer-page-state-unit.d.ts +0 -48
  310. package/dist/features/resource-viewer/state/resource-viewer-page-state-unit.d.ts.map +0 -1
  311. package/dist/hooks/useDebounce.d.ts +0 -29
  312. package/dist/hooks/useDebounce.d.ts.map +0 -1
  313. package/dist/hooks/useDragAnnouncements.d.ts +0 -12
  314. package/dist/hooks/useDragAnnouncements.d.ts.map +0 -1
  315. package/dist/hooks/useHoverDelay.d.ts +0 -8
  316. package/dist/hooks/useHoverDelay.d.ts.map +0 -1
  317. package/dist/hooks/useHoverEmitter.d.ts +0 -8
  318. package/dist/hooks/useHoverEmitter.d.ts.map +0 -1
  319. package/dist/hooks/useKeyboardShortcuts.d.ts +0 -29
  320. package/dist/hooks/useKeyboardShortcuts.d.ts.map +0 -1
  321. package/dist/hooks/useLineNumbers.d.ts +0 -8
  322. package/dist/hooks/useLineNumbers.d.ts.map +0 -1
  323. package/dist/hooks/useMediaToken.d.ts +0 -7
  324. package/dist/hooks/useMediaToken.d.ts.map +0 -1
  325. package/dist/hooks/useObservable.d.ts +0 -23
  326. package/dist/hooks/useObservable.d.ts.map +0 -1
  327. package/dist/hooks/useObservableBrowse.d.ts +0 -70
  328. package/dist/hooks/useObservableBrowse.d.ts.map +0 -1
  329. package/dist/hooks/usePanelWidth.d.ts +0 -37
  330. package/dist/hooks/usePanelWidth.d.ts.map +0 -1
  331. package/dist/hooks/useResourceContent.d.ts +0 -7
  332. package/dist/hooks/useResourceContent.d.ts.map +0 -1
  333. package/dist/hooks/useRovingTabIndex.d.ts +0 -13
  334. package/dist/hooks/useRovingTabIndex.d.ts.map +0 -1
  335. package/dist/hooks/useSearchAnnouncements.d.ts +0 -10
  336. package/dist/hooks/useSearchAnnouncements.d.ts.map +0 -1
  337. package/dist/hooks/useSessionExpiry.d.ts +0 -10
  338. package/dist/hooks/useSessionExpiry.d.ts.map +0 -1
  339. package/dist/hooks/useShellStateUnit.d.ts +0 -9
  340. package/dist/hooks/useShellStateUnit.d.ts.map +0 -1
  341. package/dist/hooks/useStateUnit.d.ts +0 -3
  342. package/dist/hooks/useStateUnit.d.ts.map +0 -1
  343. package/dist/hooks/useUI.d.ts +0 -24
  344. package/dist/hooks/useUI.d.ts.map +0 -1
  345. package/dist/index.d.ts.map +0 -1
  346. package/dist/integrations/css-modules-helper.d.ts +0 -114
  347. package/dist/integrations/css-modules-helper.d.ts.map +0 -1
  348. package/dist/integrations/styled-components-theme.d.ts +0 -95
  349. package/dist/integrations/styled-components-theme.d.ts.map +0 -1
  350. package/dist/integrations/tailwind-plugin.d.cts +0 -3
  351. package/dist/integrations/tailwind-plugin.d.cts.map +0 -1
  352. package/dist/lib/annotation-overlay.d.ts +0 -71
  353. package/dist/lib/annotation-overlay.d.ts.map +0 -1
  354. package/dist/lib/annotation-registry.d.ts +0 -62
  355. package/dist/lib/annotation-registry.d.ts.map +0 -1
  356. package/dist/lib/browser-pdfjs.d.ts +0 -93
  357. package/dist/lib/browser-pdfjs.d.ts.map +0 -1
  358. package/dist/lib/button-styles.d.ts +0 -27
  359. package/dist/lib/button-styles.d.ts.map +0 -1
  360. package/dist/lib/codemirror-handlers.d.ts +0 -52
  361. package/dist/lib/codemirror-handlers.d.ts.map +0 -1
  362. package/dist/lib/codemirror-json-theme.d.ts +0 -8
  363. package/dist/lib/codemirror-json-theme.d.ts.map +0 -1
  364. package/dist/lib/codemirror-logic.d.ts +0 -66
  365. package/dist/lib/codemirror-logic.d.ts.map +0 -1
  366. package/dist/lib/codemirror-widgets.d.ts +0 -39
  367. package/dist/lib/codemirror-widgets.d.ts.map +0 -1
  368. package/dist/lib/formatTime.d.ts +0 -2
  369. package/dist/lib/formatTime.d.ts.map +0 -1
  370. package/dist/lib/media-shapes.d.ts +0 -51
  371. package/dist/lib/media-shapes.d.ts.map +0 -1
  372. package/dist/lib/pdf-coordinates.d.ts +0 -69
  373. package/dist/lib/pdf-coordinates.d.ts.map +0 -1
  374. package/dist/lib/resource-utils.d.ts +0 -22
  375. package/dist/lib/resource-utils.d.ts.map +0 -1
  376. package/dist/lib/scroll-utils.d.ts +0 -20
  377. package/dist/lib/scroll-utils.d.ts.map +0 -1
  378. package/dist/lib/text-segmentation.d.ts +0 -25
  379. package/dist/lib/text-segmentation.d.ts.map +0 -1
  380. package/dist/lib/text-selection-handler.d.ts +0 -46
  381. package/dist/lib/text-selection-handler.d.ts.map +0 -1
  382. package/dist/lib/validation.d.ts +0 -47
  383. package/dist/lib/validation.d.ts.map +0 -1
  384. package/dist/session/SemiontProvider.d.ts +0 -28
  385. package/dist/session/SemiontProvider.d.ts.map +0 -1
  386. package/dist/session/web-browser-storage.d.ts +0 -19
  387. package/dist/session/web-browser-storage.d.ts.map +0 -1
  388. package/dist/state/session-state-unit.d.ts +0 -9
  389. package/dist/state/session-state-unit.d.ts.map +0 -1
  390. package/dist/state/shell-state-unit.d.ts +0 -33
  391. package/dist/state/shell-state-unit.d.ts.map +0 -1
  392. package/dist/test-utils.d.ts.map +0 -1
  393. package/dist/types/AnnotationManager.d.ts +0 -53
  394. package/dist/types/AnnotationManager.d.ts.map +0 -1
  395. package/dist/types/TranslationManager.d.ts +0 -15
  396. package/dist/types/TranslationManager.d.ts.map +0 -1
  397. package/dist/types/annotation-props.d.ts +0 -108
  398. package/dist/types/annotation-props.d.ts.map +0 -1
  399. package/dist/types/collapsible-navigation.d.ts +0 -69
  400. package/dist/types/collapsible-navigation.d.ts.map +0 -1
  401. package/dist/types/modals.d.ts +0 -77
  402. package/dist/types/modals.d.ts.map +0 -1
  403. package/dist/types/navigation.d.ts +0 -35
  404. package/dist/types/navigation.d.ts.map +0 -1
  405. package/dist/types/resource-viewer.d.ts +0 -19
  406. package/dist/types/resource-viewer.d.ts.map +0 -1
  407. package/dist/types/simple-navigation.d.ts +0 -15
  408. package/dist/types/simple-navigation.d.ts.map +0 -1
  409. package/dist/types/translation.d.ts +0 -5
  410. package/dist/types/translation.d.ts.map +0 -1
@@ -1,30 +1,48 @@
1
+ import React, { ReactElement } from 'react';
2
+ import { RenderOptions, RenderResult } from '@testing-library/react';
3
+ export * from '@testing-library/react';
4
+ import { SemiontBrowser, SemiontClient } from '@semiont/sdk';
5
+ import { EventBus } from '@semiont/core';
6
+ export { vi } from 'vitest';
7
+
8
+ /**
9
+ * Translation management interface
10
+ * Apps implement this to provide translations using their preferred i18n library
11
+ */
12
+ interface TranslationManager {
13
+ /**
14
+ * Translate a key within a namespace
15
+ * @param namespace - Translation namespace (e.g., 'Toolbar', 'ResourceViewer')
16
+ * @param key - Translation key within the namespace
17
+ * @param params - Optional parameters for interpolation
18
+ * @returns Translated string
19
+ */
20
+ t: (namespace: string, key: string, params?: Record<string, any>) => string;
21
+ }
22
+
1
23
  /**
2
24
  * Test utilities for @semiont/react-ui
3
25
  *
4
26
  * Provides a renderWithProviders helper that wraps components with all necessary providers
5
27
  * for testing, with customizable mock implementations.
6
28
  */
7
- import React, { ReactElement } from 'react';
8
- import { RenderOptions, RenderResult } from '@testing-library/react';
9
- import { SemiontClient, type SemiontBrowser } from '@semiont/sdk';
10
- import { EventBus } from '@semiont/core';
11
- import type { TranslationManager } from './types/TranslationManager';
29
+
12
30
  /**
13
31
  * Default mock implementations
14
32
  */
15
- export declare const defaultMocks: {
33
+ declare const defaultMocks: {
16
34
  translationManager: TranslationManager;
17
35
  };
18
36
  /**
19
37
  * Options for renderWithProviders
20
38
  */
21
- export interface TestProvidersOptions {
39
+ interface TestProvidersOptions {
22
40
  translationManager?: TranslationManager;
23
41
  apiBaseUrl?: string;
24
42
  /** Inject a specific SemiontBrowser (e.g. one seeded with a kbs list). */
25
43
  browser?: SemiontBrowser;
26
44
  }
27
- export interface RenderWithProvidersOptions extends TestProvidersOptions, Omit<RenderOptions, 'wrapper'> {
45
+ interface RenderWithProvidersOptions extends TestProvidersOptions, Omit<RenderOptions, 'wrapper'> {
28
46
  /**
29
47
  * If true, returns the session (client) EventBus — session-scoped
30
48
  * channels (mark:*, beckon:*, gather:*, match:*, bind:*, yield:*,
@@ -37,20 +55,20 @@ export interface RenderWithProvidersOptions extends TestProvidersOptions, Omit<R
37
55
  */
38
56
  returnShellBus?: boolean;
39
57
  }
40
- export interface RenderWithProvidersResult extends RenderResult {
58
+ interface RenderWithProvidersResult extends RenderResult {
41
59
  /** Session-scoped bus (from the fake client inside the fake browser). */
42
60
  eventBus?: EventBus;
43
61
  /** App-scoped bus (the fake browser's own bus). */
44
62
  shellBus?: EventBus;
45
63
  }
46
- export declare function renderWithProviders(ui: ReactElement, options?: RenderWithProvidersOptions): RenderWithProvidersResult;
64
+ declare function renderWithProviders(ui: ReactElement, options?: RenderWithProvidersOptions): RenderWithProvidersResult;
47
65
  /**
48
66
  * Build a minimal `<SemiontProvider>` wrapper for tests that roll their
49
67
  * own render wrapper (instead of `renderWithProviders`). The returned
50
68
  * `eventBus` is the bus backing the fake session's client — same
51
69
  * reference production code pokes via `session.client.emit(...)`.
52
70
  */
53
- export declare function createTestSemiontWrapper(apiBaseUrl?: string): {
71
+ declare function createTestSemiontWrapper(apiBaseUrl?: string): {
54
72
  SemiontWrapper: React.ComponentType<{
55
73
  children: React.ReactNode;
56
74
  }>;
@@ -64,14 +82,14 @@ export declare function createTestSemiontWrapper(apiBaseUrl?: string): {
64
82
  /**
65
83
  * Create a mock translation manager with custom translations
66
84
  */
67
- export declare function createMockTranslationManager(translations: Record<string, Record<string, string>>): TranslationManager;
85
+ declare function createMockTranslationManager(translations: Record<string, Record<string, string>>): TranslationManager;
68
86
  /**
69
87
  * Build a fake SemiontBrowser with the active SessionSignals
70
88
  * observables pre-populated. Used by SessionExpiredModal and
71
89
  * PermissionDeniedModal tests that need to control the modal flags
72
90
  * without driving a real session through its state machine.
73
91
  */
74
- export declare function createMockKnowledgeBaseSession(overrides?: {
92
+ declare function createMockKnowledgeBaseSession(overrides?: {
75
93
  permissionDeniedAt?: number | null;
76
94
  permissionDeniedMessage?: string | null;
77
95
  sessionExpiredAt?: number | null;
@@ -79,6 +97,6 @@ export declare function createMockKnowledgeBaseSession(overrides?: {
79
97
  acknowledgePermissionDenied?: () => void;
80
98
  acknowledgeSessionExpired?: () => void;
81
99
  }): SemiontBrowser;
82
- export * from '@testing-library/react';
83
- export { vi } from 'vitest';
84
- //# sourceMappingURL=test-utils.d.ts.map
100
+
101
+ export { createMockKnowledgeBaseSession, createMockTranslationManager, createTestSemiontWrapper, defaultMocks, renderWithProviders };
102
+ export type { RenderWithProvidersOptions, RenderWithProvidersResult, TestProvidersOptions };
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@semiont/react-ui",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
+ "engines": {
5
+ "node": ">=24.0.0"
6
+ },
4
7
  "description": "React components and hooks for Semiont",
5
8
  "type": "module",
6
9
  "main": "./dist/index.js",
@@ -45,9 +48,9 @@
45
48
  ],
46
49
  "scripts": {
47
50
  "lint:css": "stylelint 'src/**/*.css' --config ../../.stylelintrc.json",
48
- "build": "npm run lint:css && npm run typecheck && tsup && tsc -p tsconfig.build.json",
51
+ "build": "npm run lint:css && npm run typecheck && tsup && tsc -p tsconfig.build.json && rollup -c rollup.dts.config.mjs && rm -rf dist-types",
49
52
  "typecheck": "tsc --noEmit",
50
- "clean": "rm -rf dist",
53
+ "clean": "rm -rf dist dist-types",
51
54
  "audit:compliance": "./scripts/generate-compliance-report.sh",
52
55
  "audit:compliance:tests": "./scripts/generate-test-compliance-report.sh",
53
56
  "test": "npm run test:split",
@@ -74,23 +77,26 @@
74
77
  "test:split:coverage": "npm run test:coverage"
75
78
  },
76
79
  "peerDependencies": {
77
- "react": "^18.0.0 || ^19.0.0",
78
- "react-dom": "^18.0.0 || ^19.0.0"
80
+ "react": "^19.0.0",
81
+ "react-dom": "^19.0.0"
79
82
  },
80
83
  "devDependencies": {
81
84
  "@testing-library/jest-dom": "^6.1.5",
82
85
  "@testing-library/react": "^16.1.0",
83
- "@types/react": "^19",
86
+ "@types/react": "^19.2.16",
84
87
  "@types/react-dom": "^19",
85
- "@vitest/coverage-v8": "^4.1.0",
86
- "autoprefixer": "^10.4.23",
87
- "axe-core": "^4.11.0",
88
- "cssnano": "^7.1.2",
88
+ "@vitest/coverage-v8": "^4.1.8",
89
+ "autoprefixer": "^10.5.0",
90
+ "axe-core": "^4.11.4",
91
+ "cssnano": "^8.0.1",
89
92
  "jest-axe": "^10.0.0",
90
- "jsdom": "^28.0.0",
93
+ "jsdom": "^29.1.1",
91
94
  "postcss-import": "^16.1.1",
95
+ "rollup": "^4.61.0",
96
+ "rollup-plugin-dts": "^6.4.1",
92
97
  "tsup": "^8.0.1",
93
- "typescript": "^6.0.2"
98
+ "typescript": "^6.0.2",
99
+ "vitest": "^4.1.8"
94
100
  },
95
101
  "publishConfig": {
96
102
  "access": "public"
@@ -106,6 +112,6 @@
106
112
  "@semiont/api-client": "*",
107
113
  "@semiont/core": "*",
108
114
  "@semiont/sdk": "*",
109
- "react-error-boundary": "^4.1.2"
115
+ "react-error-boundary": "^6.1.2"
110
116
  }
111
117
  }
@@ -157,7 +157,6 @@ describe('Button Component', () => {
157
157
  const icon = <span data-testid="left-icon">←</span>;
158
158
  render(<Button leftIcon={icon}>Button</Button>);
159
159
 
160
- const button = screen.getByRole('button');
161
160
  const leftIcon = screen.getByTestId('left-icon');
162
161
  const iconWrapper = leftIcon.parentElement;
163
162
 
@@ -169,7 +168,6 @@ describe('Button Component', () => {
169
168
  const icon = <span data-testid="right-icon">→</span>;
170
169
  render(<Button rightIcon={icon}>Button</Button>);
171
170
 
172
- const button = screen.getByRole('button');
173
171
  const rightIcon = screen.getByTestId('right-icon');
174
172
  const iconWrapper = rightIcon.parentElement;
175
173
 
@@ -81,6 +81,8 @@ function buildAnnotationDecorations(
81
81
  attributes: {
82
82
  'data-annotation-id': meta.annotationId,
83
83
  'data-annotation-type': meta.annotationType,
84
+ ...(meta.strategy ? { 'data-anchor-strategy': meta.strategy } : {}),
85
+ ...(meta.confidence ? { 'data-anchor-confidence': meta.confidence } : {}),
84
86
  title: meta.tooltip,
85
87
  },
86
88
  });
@@ -11,7 +11,6 @@ interface Props {
11
11
  interface State {
12
12
  hasError: boolean;
13
13
  error: Error | null;
14
- errorInfo: ErrorInfo | null;
15
14
  }
16
15
 
17
16
  /**
@@ -24,7 +23,6 @@ export class ErrorBoundary extends Component<Props, State> {
24
23
  this.state = {
25
24
  hasError: false,
26
25
  error: null,
27
- errorInfo: null,
28
26
  };
29
27
  }
30
28
 
@@ -33,7 +31,6 @@ export class ErrorBoundary extends Component<Props, State> {
33
31
  return {
34
32
  hasError: true,
35
33
  error,
36
- errorInfo: null,
37
34
  };
38
35
  }
39
36
 
@@ -48,11 +45,6 @@ export class ErrorBoundary extends Component<Props, State> {
48
45
  this.props.onError(error, errorInfo);
49
46
  }
50
47
 
51
- // Update state with error info
52
- this.setState({
53
- errorInfo,
54
- });
55
-
56
48
  // In production, you might want to log to an error reporting service
57
49
  // Example: logErrorToService(error, errorInfo);
58
50
  }
@@ -61,7 +53,6 @@ export class ErrorBoundary extends Component<Props, State> {
61
53
  this.setState({
62
54
  hasError: false,
63
55
  error: null,
64
- errorInfo: null,
65
56
  });
66
57
  };
67
58
 
@@ -45,6 +45,10 @@ export function ProtectedErrorBoundary({
45
45
  }
46
46
 
47
47
  function ProtectedErrorFallback({ error, resetErrorBoundary }: FallbackProps) {
48
+ // react-error-boundary v6 types `error` as `unknown` — a thrown value can be
49
+ // anything, so narrow before reading Error fields.
50
+ const message = error instanceof Error ? error.message : String(error);
51
+ const stack = error instanceof Error ? error.stack : undefined;
48
52
  return (
49
53
  <div className="min-h-[400px] flex items-center justify-center p-4">
50
54
  <div className="max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6">
@@ -69,8 +73,8 @@ function ProtectedErrorFallback({ error, resetErrorBoundary }: FallbackProps) {
69
73
  Error details (development only)
70
74
  </summary>
71
75
  <pre className="mt-2 text-xs bg-gray-100 dark:bg-gray-900 p-2 rounded-sm overflow-auto">
72
- {error.message}
73
- {error.stack}
76
+ {message}
77
+ {stack}
74
78
  </pre>
75
79
  </details>
76
80
  )}
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, vi } from 'vitest';
2
- import React from 'react';
3
2
  import { screen, fireEvent } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { renderWithProviders } from '../../test-utils';
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
2
- import React from 'react';
2
+ import type { ReactNode } from 'react';
3
3
  import { render, screen, fireEvent } from '@testing-library/react';
4
4
  import '@testing-library/jest-dom';
5
5
  import { ErrorBoundary, AsyncErrorBoundary } from '../ErrorBoundary';
@@ -146,7 +146,7 @@ describe('ErrorBoundary Component', () => {
146
146
  });
147
147
 
148
148
  it('should not render default fallback when custom fallback is provided', () => {
149
- const customFallback = (error: Error) => <div>Custom Fallback</div>;
149
+ const customFallback = () => <div>Custom Fallback</div>;
150
150
 
151
151
  render(
152
152
  <ErrorBoundary fallback={customFallback}>
@@ -223,7 +223,7 @@ describe('ErrorBoundary Component', () => {
223
223
 
224
224
  it('should call custom reset handler in custom fallback', () => {
225
225
  const resetHandler = vi.fn();
226
- const customFallback = (error: Error, reset: () => void) => (
226
+ const customFallback = (_error: Error, reset: () => void) => (
227
227
  <div>
228
228
  <button onClick={() => { resetHandler(); reset(); }}>Reset</button>
229
229
  </div>
@@ -242,9 +242,9 @@ describe('ErrorBoundary Component', () => {
242
242
  });
243
243
 
244
244
  it('should clear error state when reset is called', () => {
245
- let resetFn: (() => void) | null = null;
245
+ const resetRef: { current: (() => void) | null } = { current: null };
246
246
  const customFallback = (error: Error, reset: () => void) => {
247
- resetFn = reset;
247
+ resetRef.current = reset;
248
248
  return <div>Error: {error.message}</div>;
249
249
  };
250
250
 
@@ -255,11 +255,11 @@ describe('ErrorBoundary Component', () => {
255
255
  );
256
256
 
257
257
  expect(screen.getByText('Error: Initial error')).toBeInTheDocument();
258
- expect(resetFn).not.toBeNull();
258
+ expect(resetRef.current).not.toBeNull();
259
259
 
260
260
  // Call reset
261
- if (resetFn) {
262
- resetFn();
261
+ if (resetRef.current) {
262
+ resetRef.current();
263
263
  }
264
264
 
265
265
  // Rerender with non-throwing component after reset
@@ -286,8 +286,11 @@ describe('ErrorBoundary Component', () => {
286
286
 
287
287
  it('should navigate to home when Go Home button clicked', () => {
288
288
  const originalLocation = window.location;
289
- delete (window as any).location;
290
- window.location = { href: '' } as any;
289
+ Object.defineProperty(window, 'location', {
290
+ value: { href: '' },
291
+ writable: true,
292
+ configurable: true,
293
+ });
291
294
 
292
295
  render(
293
296
  <ErrorBoundary>
@@ -300,7 +303,11 @@ describe('ErrorBoundary Component', () => {
300
303
 
301
304
  expect(window.location.href).toBe('/');
302
305
 
303
- window.location = originalLocation;
306
+ Object.defineProperty(window, 'location', {
307
+ value: originalLocation,
308
+ writable: true,
309
+ configurable: true,
310
+ });
304
311
  });
305
312
  });
306
313
 
@@ -336,7 +343,7 @@ describe('ErrorBoundary Component', () => {
336
343
 
337
344
  describe('Edge Cases', () => {
338
345
  it('should handle error with no message', () => {
339
- function ThrowEmptyError() {
346
+ function ThrowEmptyError(): ReactNode {
340
347
  throw new Error();
341
348
  }
342
349
 
@@ -433,7 +440,7 @@ describe('AsyncErrorBoundary Component', () => {
433
440
  });
434
441
 
435
442
  it('should handle error with no message', () => {
436
- function ThrowEmptyError() {
443
+ function ThrowEmptyError(): ReactNode {
437
444
  throw new Error();
438
445
  }
439
446
 
@@ -1,7 +1,7 @@
1
1
  import { describe, it, expect } from 'vitest';
2
2
  import React from 'react';
3
3
  import { renderHook, act } from '@testing-library/react';
4
- import { render, screen } from '@testing-library/react';
4
+ import { render } from '@testing-library/react';
5
5
  import '@testing-library/jest-dom';
6
6
  import {
7
7
  LiveRegionProvider,
@@ -186,7 +186,8 @@ describe('ProtectedErrorBoundary', () => {
186
186
  // Multiple console.error calls happen (React's own logs, plus ours).
187
187
  // Look for the boundary's prefix specifically.
188
188
  const ourCall = consoleErrorSpy.mock.calls.find(
189
- call => typeof call[0] === 'string' && call[0].includes('ProtectedErrorBoundary caught:')
189
+ (call: Parameters<typeof console.error>) =>
190
+ typeof call[0] === 'string' && call[0].includes('ProtectedErrorBoundary caught:')
190
191
  );
191
192
  expect(ourCall).toBeDefined();
192
193
  } finally {
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, vi } from 'vitest';
2
- import React from 'react';
3
2
  import { render, screen, fireEvent } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { ResizeHandle } from '../ResizeHandle';
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, beforeEach, vi } from 'vitest';
2
- import React from 'react';
3
2
  import { screen, fireEvent } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { renderWithProviders } from '../../test-utils';
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, beforeEach, vi } from 'vitest';
2
- import React from 'react';
3
2
  import { screen, waitFor } from '@testing-library/react';
4
3
  import { BehaviorSubject } from 'rxjs';
5
4
  import '@testing-library/jest-dom';
@@ -1,7 +1,6 @@
1
1
  import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
2
- import { render, screen, waitFor, act } from '@testing-library/react';
3
- import userEvent from '@testing-library/user-event';
4
- import { ToastProvider, useToast, ToastContainer, type ToastMessage } from '../Toast';
2
+ import { render, screen } from '@testing-library/react';
3
+ import { ToastProvider, useToast } from '../Toast';
5
4
 
6
5
  describe('Toast System', () => {
7
6
  beforeEach(() => {
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, vi } from 'vitest';
2
- import React from 'react';
3
2
  import { screen, fireEvent } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { renderWithProviders } from '../../test-utils';
@@ -36,6 +36,20 @@
36
36
  position: relative;
37
37
  }
38
38
 
39
+ /* Low-confidence anchor affordance.
40
+ *
41
+ * Annotations whose anchor was resolved by something other than a clean
42
+ * fast-path or unique-occurrence match (i.e. `confidence !== 'high'`)
43
+ * get a dotted underline so operators can see at a glance which
44
+ * highlights were rescued by score-resolved tiebreaking, fuzzy matching,
45
+ * or a position-fallback. The hover tooltip (added by
46
+ * `getAnnotationDecorationMeta`) names the strategy. */
47
+ .annotation-low-confidence {
48
+ text-decoration: underline dotted var(--semiont-color-warning-500, #d97706);
49
+ text-decoration-thickness: 2px;
50
+ text-underline-offset: 2px;
51
+ }
52
+
39
53
  /* Print styles */
40
54
  @media print {
41
55
  .annotation-highlight,
@@ -1,11 +1,9 @@
1
1
  import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
2
- import React from 'react';
3
2
  import { screen, fireEvent, waitFor } from '@testing-library/react';
4
3
  import userEvent from '@testing-library/user-event';
5
4
  import '@testing-library/jest-dom';
6
- import type { components } from '@semiont/core';
7
5
 
8
- import type { Annotation } from '@semiont/core';
6
+ import type { Annotation, AnnotationId } from '@semiont/core';
9
7
 
10
8
  // Mock CodeMirror modules
11
9
  vi.mock('@codemirror/view', () => {
@@ -57,10 +55,10 @@ import { JsonLdView } from '../JsonLdView';
57
55
 
58
56
  const createMockAnnotation = (overrides?: Partial<Annotation>): Annotation => ({
59
57
  '@context': 'http://www.w3.org/ns/anno.jsonld',
60
- id: 'anno-1',
58
+ id: 'anno-1' as AnnotationId,
61
59
  type: 'Annotation',
62
60
  motivation: 'highlighting',
63
- creator: { name: 'user@example.com' },
61
+ creator: { '@type': 'Person', name: 'user@example.com' },
64
62
  created: '2024-01-01T10:00:00Z',
65
63
  target: {
66
64
  source: 'resource-1',
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, vi } from 'vitest';
2
- import React from 'react';
3
2
  import { screen, fireEvent } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { renderWithProviders } from '../../../test-utils';
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, vi, beforeEach } from 'vitest';
2
- import React from 'react';
3
2
  import { render, screen } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { SemiontBranding } from '../SemiontBranding';
@@ -305,7 +304,7 @@ describe('SemiontBranding Component', () => {
305
304
 
306
305
  describe('Edge Cases', () => {
307
306
  it('should handle missing translation gracefully', () => {
308
- const emptyTranslate = vi.fn((key: string) => '');
307
+ const emptyTranslate = vi.fn(() => '');
309
308
 
310
309
  render(<SemiontBranding t={emptyTranslate} />);
311
310
 
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, vi, beforeEach } from 'vitest';
2
- import React from 'react';
3
2
  import { render, screen, fireEvent } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { LeftSidebar } from '../LeftSidebar';
@@ -159,7 +158,7 @@ describe('LeftSidebar Component', () => {
159
158
  });
160
159
 
161
160
  it('should save collapsed state to localStorage', () => {
162
- const mockChildren = vi.fn((isCollapsed, toggleCollapsed) => (
161
+ const mockChildren = vi.fn((_isCollapsed, toggleCollapsed) => (
163
162
  <button onClick={toggleCollapsed} data-testid="toggle-btn">Toggle</button>
164
163
  ));
165
164
 
@@ -183,7 +182,7 @@ describe('LeftSidebar Component', () => {
183
182
  });
184
183
 
185
184
  it('should not collapse when collapsible is false', () => {
186
- const mockChildren = vi.fn((isCollapsed, toggleCollapsed) => (
185
+ const mockChildren = vi.fn((_isCollapsed, toggleCollapsed) => (
187
186
  <button onClick={toggleCollapsed} data-testid="toggle-btn">Toggle</button>
188
187
  ));
189
188
 
@@ -208,7 +207,7 @@ describe('LeftSidebar Component', () => {
208
207
  });
209
208
 
210
209
  it('should use default storage key', () => {
211
- const mockChildren = vi.fn((isCollapsed, toggleCollapsed) => (
210
+ const mockChildren = vi.fn((_isCollapsed, toggleCollapsed) => (
212
211
  <button onClick={toggleCollapsed} data-testid="toggle-btn">Toggle</button>
213
212
  ));
214
213
 
@@ -233,7 +232,7 @@ describe('LeftSidebar Component', () => {
233
232
 
234
233
  describe('Navigation Menu Helper', () => {
235
234
  it('should provide navigationMenu helper to function children', () => {
236
- const mockChildren = vi.fn((isCollapsed, toggleCollapsed, navigationMenu) => {
235
+ const mockChildren = vi.fn((_isCollapsed, _toggleCollapsed, navigationMenu) => {
237
236
  // Test that navigationMenu helper returns NavigationMenu component
238
237
  const menuElement = navigationMenu(() => {});
239
238
  return <div data-testid="children-content">{menuElement}</div>;
@@ -259,7 +258,7 @@ describe('LeftSidebar Component', () => {
259
258
 
260
259
  it('should pass onClose callback to NavigationMenu', () => {
261
260
  const mockOnClose = vi.fn();
262
- const mockChildren = vi.fn((isCollapsed, toggleCollapsed, navigationMenu) => {
261
+ const mockChildren = vi.fn((_isCollapsed, _toggleCollapsed, navigationMenu) => {
263
262
  const menuElement = navigationMenu(mockOnClose);
264
263
  return <div>{menuElement}</div>;
265
264
  });
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, vi } from 'vitest';
2
- import React from 'react';
3
2
  import { render, screen } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { PageLayout } from '../PageLayout';
@@ -247,7 +246,6 @@ describe('PageLayout Component', () => {
247
246
  );
248
247
 
249
248
  // Real Footer renders copyright with dynamic year
250
- const currentYear = new Date().getFullYear();
251
249
  expect(screen.getByText(`translated.copyright`)).toBeInTheDocument();
252
250
  });
253
251
  });
@@ -270,7 +268,7 @@ describe('PageLayout Component', () => {
270
268
  });
271
269
 
272
270
  it('should render with CookiePreferences component', () => {
273
- const MockCookiePreferences = ({ isOpen, onClose }: any) => (
271
+ const MockCookiePreferences = ({ }: any) => (
274
272
  <div data-testid="cookie-prefs">Cookie Preferences</div>
275
273
  );
276
274
 
@@ -63,7 +63,7 @@ describe('SkipLinks - Accessibility', () => {
63
63
 
64
64
  it('should become visible on focus', async () => {
65
65
  const user = userEvent.setup();
66
- const { container } = render(<SkipLinks />);
66
+ render(<SkipLinks />);
67
67
 
68
68
  const firstLink = screen.getAllByRole('link')[0];
69
69
 
@@ -76,12 +76,12 @@ describe('SkipLinks - Accessibility', () => {
76
76
 
77
77
  it('should hide when focus leaves', async () => {
78
78
  const user = userEvent.setup();
79
- const { container } = render(
80
- <div>
81
- <SkipLinks />
82
- <button>Next focusable element</button>
83
- </div>
84
- );
79
+ render(
80
+ <div>
81
+ <SkipLinks />
82
+ <button>Next focusable element</button>
83
+ </div>
84
+ );
85
85
 
86
86
  // Tab to first skip link
87
87
  await user.tab();
@@ -239,7 +239,7 @@ describe('SkipLinks - Accessibility', () => {
239
239
 
240
240
  it('should maintain focus management with multiple links', async () => {
241
241
  const user = userEvent.setup();
242
- const { container } = render(<SkipLinks />);
242
+ render(<SkipLinks />);
243
243
 
244
244
  // Tab to first link
245
245
  await user.tab();