@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
@@ -17,7 +17,6 @@ import { screen } from '@testing-library/react';
17
17
  import { renderWithProviders } from '../../../../test-utils';
18
18
  import userEvent from '@testing-library/user-event';
19
19
  import { AssistSection } from '../AssistSection';
20
- import type { EventBus } from "@semiont/core"
21
20
 
22
21
  // Mock translations
23
22
  const mockT = vi.fn((key: string) => {
@@ -68,7 +67,7 @@ describe('AssistSection', () => {
68
67
  annotationType="highlight"
69
68
  isAssisting={true}
70
69
  progress={{
71
- status: 'analyzing',
70
+ stage: 'analyzing',
72
71
  percentage: 30,
73
72
  message: 'Analyzing text for highlights...',
74
73
  }}
@@ -84,7 +83,8 @@ describe('AssistSection', () => {
84
83
  annotationType="highlight"
85
84
  isAssisting={true}
86
85
  progress={{
87
- status: 'analyzing',
86
+ stage: 'analyzing',
87
+ percentage: 0,
88
88
  message: 'Processing...',
89
89
  }}
90
90
  />
@@ -102,7 +102,8 @@ describe('AssistSection', () => {
102
102
  annotationType="highlight"
103
103
  isAssisting={true}
104
104
  progress={{
105
- status: 'analyzing',
105
+ stage: 'analyzing',
106
+ percentage: 0,
106
107
  message: 'Analyzing...',
107
108
  requestParams: [
108
109
  { label: 'Instructions', value: 'Find important points' },
@@ -125,7 +126,8 @@ describe('AssistSection', () => {
125
126
  annotationType="highlight"
126
127
  isAssisting={true}
127
128
  progress={{
128
- status: 'analyzing',
129
+ stage: 'analyzing',
130
+ percentage: 0,
129
131
  message: 'Analyzing...',
130
132
  }}
131
133
  />
@@ -170,7 +172,7 @@ describe('AssistSection', () => {
170
172
  annotationType="highlight"
171
173
  isAssisting={false}
172
174
  progress={{
173
- status: 'complete',
175
+ stage: 'complete',
174
176
  percentage: 100,
175
177
  message: 'Complete! Created 14 highlights',
176
178
  }}
@@ -433,7 +435,8 @@ describe('AssistSection', () => {
433
435
  annotationType="highlight"
434
436
  isAssisting={true}
435
437
  progress={{
436
- status: 'analyzing',
438
+ stage: 'analyzing',
439
+ percentage: 0,
437
440
  message: '',
438
441
  }}
439
442
  />
@@ -450,9 +453,9 @@ describe('AssistSection', () => {
450
453
  annotationType="highlight"
451
454
  isAssisting={true}
452
455
  progress={{
453
- status: 'analyzing',
456
+ stage: 'analyzing',
457
+ percentage: 0,
454
458
  message: 'Processing...',
455
- // no percentage
456
459
  }}
457
460
  />
458
461
  );
@@ -466,7 +469,8 @@ describe('AssistSection', () => {
466
469
  annotationType="highlight"
467
470
  isAssisting={true}
468
471
  progress={{
469
- status: 'analyzing',
472
+ stage: 'analyzing',
473
+ percentage: 0,
470
474
  message: 'Processing...',
471
475
  requestParams: [],
472
476
  }}
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, beforeEach, afterEach, 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 { CollaborationPanel } from '../CollaborationPanel';
@@ -5,10 +5,8 @@ import { renderWithProviders } from '../../../../test-utils';
5
5
  import userEvent from '@testing-library/user-event';
6
6
  import '@testing-library/jest-dom';
7
7
  import { CommentEntry } from '../CommentEntry';
8
- import type { components } from '@semiont/core';
9
- import type { EventBus } from "@semiont/core"
10
8
 
11
- import type { Annotation } from '@semiont/core';
9
+ import type { Annotation, AnnotationId } from '@semiont/core';
12
10
 
13
11
  // Mock TranslationContext
14
12
  vi.mock('../../../../contexts/TranslationContext', () => ({
@@ -42,10 +40,11 @@ const mockGetAnnotationExactText = getAnnotationExactText as MockedFunction<type
42
40
  // Test data fixtures
43
41
  const createMockComment = (overrides?: Partial<Annotation>): Annotation => ({
44
42
  '@context': 'http://www.w3.org/ns/anno.jsonld',
45
- id: 'comment-1',
43
+ id: 'comment-1' as AnnotationId,
46
44
  type: 'Annotation',
47
45
  motivation: 'commenting',
48
46
  creator: {
47
+ '@type': 'Person',
49
48
  name: 'user@example.com',
50
49
  },
51
50
  created: '2024-01-01T10:00:00Z',
@@ -98,9 +97,6 @@ describe('CommentEntry Component', () => {
98
97
  const defaultProps = {
99
98
  comment: mockCommentStates.standard,
100
99
  isFocused: false,
101
- onClick: vi.fn(),
102
- onCommentRef: vi.fn(),
103
- onCommentHover: vi.fn(),
104
100
  };
105
101
 
106
102
  beforeEach(() => {
@@ -396,19 +392,26 @@ describe('CommentEntry Component', () => {
396
392
  });
397
393
 
398
394
  it('should stop event propagation when clicking textarea in edit mode', async () => {
399
- const onClick = vi.fn();
400
- renderWithProviders(<CommentEntry {...defaultProps} onClick={onClick} />);
395
+ const clickHandler = vi.fn();
396
+ const { eventBus } = renderWithProviders(
397
+ <CommentEntry {...defaultProps} />,
398
+ { returnEventBus: true }
399
+ );
400
+
401
+ const subscription = eventBus!.get('browse:click').subscribe(clickHandler);
401
402
 
402
403
  await userEvent.click(screen.getByText('Edit'));
403
404
 
404
- // Clear the onClick calls that happened during entering edit mode
405
- onClick.mockClear();
405
+ // Clear any browse:click emissions that happened during entering edit mode
406
+ clickHandler.mockClear();
406
407
 
407
408
  const textarea = screen.getByRole('textbox');
408
409
  await userEvent.click(textarea);
409
410
 
410
- // onClick should not be called for textarea click due to stopPropagation
411
- expect(onClick).not.toHaveBeenCalled();
411
+ // browse:click should not be emitted for textarea click due to stopPropagation
412
+ expect(clickHandler).not.toHaveBeenCalled();
413
+
414
+ subscription.unsubscribe();
412
415
  });
413
416
 
414
417
  it('should update text in textarea', async () => {
@@ -484,14 +487,24 @@ describe('CommentEntry Component', () => {
484
487
  expect(screen.getByText('This is a test comment')).toBeInTheDocument();
485
488
  });
486
489
 
487
- it('should not call onUpdate when cancel is clicked', async () => {
488
- const onUpdate = vi.fn();
489
- renderWithProviders(<CommentEntry {...defaultProps} onUpdate={onUpdate} />);
490
+ it('should not emit any update when cancel is clicked', async () => {
491
+ const clickHandler = vi.fn();
492
+ const { eventBus } = renderWithProviders(
493
+ <CommentEntry {...defaultProps} />,
494
+ { returnEventBus: true }
495
+ );
496
+
497
+ const subscription = eventBus!.get('browse:click').subscribe(clickHandler);
490
498
 
491
499
  await userEvent.click(screen.getByText('Edit'));
500
+ clickHandler.mockClear();
501
+
492
502
  await userEvent.click(screen.getByText('Cancel'));
493
503
 
494
- expect(onUpdate).not.toHaveBeenCalled();
504
+ // Cancel discards the edit without emitting any event
505
+ expect(clickHandler).not.toHaveBeenCalled();
506
+
507
+ subscription.unsubscribe();
495
508
  });
496
509
  });
497
510
 
@@ -1,14 +1,14 @@
1
1
  import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
2
2
  import type { MockedFunction } from 'vitest';
3
3
  import React from 'react';
4
- import { render, screen, fireEvent, waitFor } from '@testing-library/react';
4
+ import { render, screen, waitFor } from '@testing-library/react';
5
5
  import userEvent from '@testing-library/user-event';
6
6
  import '@testing-library/jest-dom';
7
7
  import { CommentsPanel } from '../CommentsPanel';
8
- import type { components, EventBus } from '@semiont/core';
8
+ import type { EventBus } from '@semiont/core';
9
9
  import { createTestSemiontWrapper } from '../../../../test-utils';
10
10
 
11
- import type { Annotation } from '@semiont/core';
11
+ import type { Annotation, AnnotationId } from '@semiont/core';
12
12
 
13
13
  // Composition-based event tracker
14
14
  interface TrackedEvent {
@@ -68,7 +68,7 @@ vi.mock('@semiont/core', async () => {
68
68
 
69
69
  // Mock CommentEntry component to simplify testing
70
70
  vi.mock('../CommentEntry', () => ({
71
- CommentEntry: ({ comment, onClick, onCommentRef, onCommentHover }: any) => (
71
+ CommentEntry: ({ comment, onClick, onCommentHover }: any) => (
72
72
  <div
73
73
  data-testid={`comment-${comment.id}`}
74
74
  onClick={() => onClick()}
@@ -91,10 +91,11 @@ const mockGetTargetSelector = getTargetSelector as MockedFunction<typeof getTarg
91
91
  // Test data fixtures
92
92
  const createMockComment = (id: string, start: number, end: number): Annotation => ({
93
93
  '@context': 'http://www.w3.org/ns/anno.jsonld',
94
- id,
94
+ id: id as AnnotationId,
95
95
  type: 'Annotation',
96
96
  motivation: 'commenting',
97
97
  creator: {
98
+ '@type': 'Person',
98
99
  name: `user${id}@example.com`,
99
100
  },
100
101
  created: `2024-01-0${id.slice(-1)}T10:00:00Z`,
@@ -1,12 +1,10 @@
1
1
  import { describe, it, expect, beforeEach, vi } from 'vitest';
2
- import React from 'react';
3
- import { screen, fireEvent } from '@testing-library/react';
2
+ import { screen } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { renderWithProviders } from '../../../../test-utils';
6
5
  import userEvent from '@testing-library/user-event';
7
- import type { components } from '@semiont/core';
8
6
 
9
- import type { Annotation } from '@semiont/core';
7
+ import type { Annotation, AnnotationId } from '@semiont/core';
10
8
 
11
9
  // Mock @semiont/api-client
12
10
  vi.mock('@semiont/core', async () => {
@@ -25,10 +23,11 @@ const mockGetAnnotationExactText = getAnnotationExactText as MockedFunction<type
25
23
 
26
24
  const createMockHighlight = (overrides?: Partial<Annotation>): Annotation => ({
27
25
  '@context': 'http://www.w3.org/ns/anno.jsonld',
28
- id: 'highlight-1',
26
+ id: 'highlight-1' as AnnotationId,
29
27
  type: 'Annotation',
30
28
  motivation: 'highlighting',
31
29
  creator: {
30
+ '@type': 'Person',
32
31
  name: 'alice@example.com',
33
32
  },
34
33
  created: '2024-06-15T12:00:00Z',
@@ -16,9 +16,8 @@ import React from 'react';
16
16
  import { screen } from '@testing-library/react';
17
17
  import { renderWithProviders } from '../../../../test-utils';
18
18
  import { HighlightPanel } from '../HighlightPanel';
19
- import type { components } from '@semiont/core';
20
19
 
21
- import type { Annotation } from '@semiont/core';
20
+ import type { Annotation, AnnotationId } from '@semiont/core';
22
21
 
23
22
  // Mock translations - simulates useTranslations('HighlightPanel')
24
23
  // The mock receives keys like 'title', 'noHighlights', etc. and returns translated strings
@@ -55,7 +54,9 @@ describe('HighlightPanel + AssistSection Integration', () => {
55
54
 
56
55
  mockAnnotations = [
57
56
  {
58
- id: 'highlight-1',
57
+ '@context': 'http://www.w3.org/ns/anno.jsonld',
58
+ type: 'Annotation',
59
+ id: 'highlight-1' as AnnotationId,
59
60
  motivation: 'highlighting',
60
61
  target: {
61
62
  source: 'resource-1',
@@ -78,7 +79,7 @@ describe('HighlightPanel + AssistSection Integration', () => {
78
79
  pendingAnnotation={null}
79
80
  isAssisting={true}
80
81
  progress={{
81
- status: 'analyzing',
82
+ stage: 'analyzing',
82
83
  percentage: 30,
83
84
  message: 'Analyzing text for highlights...',
84
85
  }}
@@ -129,7 +130,7 @@ describe('HighlightPanel + AssistSection Integration', () => {
129
130
  pendingAnnotation={null}
130
131
  isAssisting={false}
131
132
  progress={{
132
- status: 'complete',
133
+ stage: 'complete',
133
134
  percentage: 100,
134
135
  message: 'Complete! Created 14 highlights',
135
136
  }}
@@ -150,7 +151,8 @@ describe('HighlightPanel + AssistSection Integration', () => {
150
151
  pendingAnnotation={null}
151
152
  isAssisting={true}
152
153
  progress={{
153
- status: 'analyzing',
154
+ stage: 'analyzing',
155
+ percentage: 0,
154
156
  message: 'Analyzing...',
155
157
  requestParams: [
156
158
  { label: 'Instructions', value: 'Find important points' },
@@ -203,7 +205,8 @@ describe('HighlightPanel + AssistSection Integration', () => {
203
205
  pendingAnnotation={null}
204
206
  isAssisting={true}
205
207
  progress={{
206
- status: 'analyzing',
208
+ stage: 'analyzing',
209
+ percentage: 0,
207
210
  message: 'Analyzing...',
208
211
  }}
209
212
  annotateMode={true}
@@ -219,7 +222,8 @@ describe('HighlightPanel + AssistSection Integration', () => {
219
222
  pendingAnnotation={null}
220
223
  isAssisting={true}
221
224
  progress={{
222
- status: 'analyzing',
225
+ stage: 'analyzing',
226
+ percentage: 0,
223
227
  message: 'Analyzing...',
224
228
  }}
225
229
  annotateMode={false}
@@ -254,7 +258,8 @@ describe('HighlightPanel + AssistSection Integration', () => {
254
258
  pendingAnnotation={null}
255
259
  isAssisting={false}
256
260
  progress={{
257
- status: 'complete',
261
+ stage: 'complete',
262
+ percentage: 100,
258
263
  message: 'Done!',
259
264
  }}
260
265
  annotateMode={true}
@@ -274,7 +279,7 @@ describe('HighlightPanel + AssistSection Integration', () => {
274
279
  pendingAnnotation={null}
275
280
  isAssisting={true}
276
281
  progress={{
277
- status: 'started',
282
+ stage: 'started',
278
283
  percentage: 0,
279
284
  message: 'Starting...',
280
285
  }}
@@ -291,7 +296,7 @@ describe('HighlightPanel + AssistSection Integration', () => {
291
296
  pendingAnnotation={null}
292
297
  isAssisting={true}
293
298
  progress={{
294
- status: 'analyzing',
299
+ stage: 'analyzing',
295
300
  percentage: 50,
296
301
  message: 'Analyzing...',
297
302
  }}
@@ -309,7 +314,7 @@ describe('HighlightPanel + AssistSection Integration', () => {
309
314
  pendingAnnotation={null}
310
315
  isAssisting={false}
311
316
  progress={{
312
- status: 'complete',
317
+ stage: 'complete',
313
318
  percentage: 100,
314
319
  message: 'Complete!',
315
320
  }}
@@ -330,7 +335,8 @@ describe('HighlightPanel + AssistSection Integration', () => {
330
335
  pendingAnnotation={null}
331
336
  isAssisting={true}
332
337
  progress={{
333
- status: 'analyzing',
338
+ stage: 'analyzing',
339
+ percentage: 0,
334
340
  message: 'Analyzing...',
335
341
  }}
336
342
  annotateMode={true}
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
2
- import React from 'react';
3
2
  import { render, screen, waitFor } from '@testing-library/react';
4
3
  import userEvent from '@testing-library/user-event';
5
4
  import '@testing-library/jest-dom';
@@ -12,7 +11,7 @@ type SemiontResource = components['schemas']['ResourceDescriptor'];
12
11
  vi.mock('@codemirror/view', () => {
13
12
  class MockEditorView {
14
13
  destroy = vi.fn();
15
- constructor(config: any) {
14
+ constructor() {
16
15
  // Store config if needed for assertions
17
16
  }
18
17
  static editable = { of: vi.fn() };
@@ -55,7 +54,6 @@ vi.mock('../../../lib/codemirror-json-theme', () => ({
55
54
  // Mock useLineNumbers hook (must be before import)
56
55
  vi.mock('@/hooks/useLineNumbers');
57
56
 
58
- import { EditorView } from '@codemirror/view';
59
57
  import { useLineNumbers } from '@/hooks/useLineNumbers';
60
58
 
61
59
  // Test data fixtures
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect } from 'vitest';
2
- import React from 'react';
3
2
  import { screen } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { renderWithProviders } from '../../../../test-utils';
@@ -1,14 +1,12 @@
1
1
  import { describe, it, expect, beforeEach, vi } from 'vitest';
2
- import React from 'react';
3
2
  import { screen } from '@testing-library/react';
4
3
  import '@testing-library/jest-dom';
5
4
  import { renderWithProviders } from '../../../../test-utils';
6
5
  import userEvent from '@testing-library/user-event';
7
- import type { components } from '@semiont/core';
8
6
  import { BindNamespace } from '@semiont/sdk';
9
7
  import type { RouteBuilder } from '../../../../contexts/RoutingContext';
10
8
 
11
- import type { Annotation } from '@semiont/core';
9
+ import type { Annotation, AnnotationId } from '@semiont/core';
12
10
 
13
11
  // Stable mock functions defined outside vi.mock to avoid re-render loops
14
12
  const mockGetAnnotationExactText = vi.fn();
@@ -54,7 +52,7 @@ import { ReferenceEntry } from '../ReferenceEntry';
54
52
 
55
53
  const createMockReference = (overrides?: Partial<Annotation>): Annotation => ({
56
54
  '@context': 'http://www.w3.org/ns/anno.jsonld',
57
- id: 'ref-1',
55
+ id: 'ref-1' as AnnotationId,
58
56
  type: 'Annotation',
59
57
  motivation: 'linking',
60
58
  created: '2024-06-15T12:00:00Z',
@@ -75,7 +73,9 @@ const createMockReference = (overrides?: Partial<Annotation>): Annotation => ({
75
73
 
76
74
  const mockRoutes: RouteBuilder = {
77
75
  resourceDetail: vi.fn((id: string) => `/resources/${id}`),
78
- resourceList: vi.fn(() => '/resources'),
76
+ userProfile: vi.fn((id: string) => `/users/${id}`),
77
+ search: vi.fn((query: string) => `/search?q=${query}`),
78
+ home: vi.fn(() => '/'),
79
79
  };
80
80
 
81
81
  describe('ReferenceEntry', () => {
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
2
2
  import React from 'react';
3
- import { render, screen, fireEvent, waitFor } from '@testing-library/react';
3
+ import { render, screen, waitFor } from '@testing-library/react';
4
4
  import userEvent from '@testing-library/user-event';
5
5
  import '@testing-library/jest-dom';
6
6
  import { ReferencesPanel } from '../ReferencesPanel';
@@ -316,7 +316,7 @@ describe('ReferencesPanel Component', () => {
316
316
  <ReferencesPanel
317
317
  {...defaultProps}
318
318
  isAssisting={true}
319
- progress={{ completedEntityTypes: [] }}
319
+ progress={{ stage: 'analyzing', percentage: 0, message: 'Detecting references...', completedEntityTypes: [] }}
320
320
  />
321
321
  );
322
322
 
@@ -326,6 +326,9 @@ describe('ReferencesPanel Component', () => {
326
326
  {...defaultProps}
327
327
  isAssisting={false}
328
328
  progress={{
329
+ stage: 'complete',
330
+ percentage: 100,
331
+ message: 'Annotation complete',
329
332
  completedEntityTypes: [{ entityType: 'Person', foundCount: 5 }],
330
333
  }}
331
334
  />
@@ -366,7 +369,7 @@ describe('ReferencesPanel Component', () => {
366
369
  <ReferencesPanel
367
370
  {...defaultProps}
368
371
  isAssisting={true}
369
- progress={{ completedEntityTypes: [] }}
372
+ progress={{ stage: 'analyzing', percentage: 0, message: 'Detecting references...', completedEntityTypes: [] }}
370
373
  />
371
374
  );
372
375
 
@@ -375,6 +378,9 @@ describe('ReferencesPanel Component', () => {
375
378
 
376
379
  it('should pass progress data to widget', () => {
377
380
  const progress = {
381
+ stage: 'complete',
382
+ percentage: 100,
383
+ message: 'Annotation complete',
378
384
  completedEntityTypes: [
379
385
  { entityType: 'Person', foundCount: 5 },
380
386
  { entityType: 'Organization', foundCount: 3 },
@@ -399,7 +405,7 @@ describe('ReferencesPanel Component', () => {
399
405
  <ReferencesPanel
400
406
  {...defaultProps}
401
407
  isAssisting={true}
402
- progress={{ completedEntityTypes: [] }}
408
+ progress={{ stage: 'analyzing', percentage: 0, message: 'Detecting references...', completedEntityTypes: [] }}
403
409
  />
404
410
  );
405
411
 
@@ -412,7 +418,7 @@ describe('ReferencesPanel Component', () => {
412
418
  <ReferencesPanel
413
419
  {...defaultProps}
414
420
  isAssisting={true}
415
- progress={{ completedEntityTypes: [] }}
421
+ progress={{ stage: 'analyzing', percentage: 0, message: 'Detecting references...', completedEntityTypes: [] }}
416
422
  />
417
423
  );
418
424
 
@@ -428,6 +434,9 @@ describe('ReferencesPanel Component', () => {
428
434
  {...defaultProps}
429
435
  isAssisting={false}
430
436
  progress={{
437
+ stage: 'complete',
438
+ percentage: 100,
439
+ message: 'Annotation complete',
431
440
  completedEntityTypes: [
432
441
  { entityType: 'Person', foundCount: 5 },
433
442
  { entityType: 'Organization', foundCount: 3 },
@@ -455,6 +464,9 @@ describe('ReferencesPanel Component', () => {
455
464
  {...defaultProps}
456
465
  isAssisting={false}
457
466
  progress={{
467
+ stage: 'complete',
468
+ percentage: 100,
469
+ message: 'Annotation complete',
458
470
  completedEntityTypes: [{ entityType: 'Person', foundCount: 5 }],
459
471
  }}
460
472
  />
@@ -472,6 +484,9 @@ describe('ReferencesPanel Component', () => {
472
484
  {...defaultProps}
473
485
  isAssisting={false}
474
486
  progress={{
487
+ stage: 'complete',
488
+ percentage: 100,
489
+ message: 'Annotation complete',
475
490
  completedEntityTypes: [{ entityType: 'Person', foundCount: 5 }],
476
491
  }}
477
492
  />
@@ -489,6 +504,9 @@ describe('ReferencesPanel Component', () => {
489
504
  {...defaultProps}
490
505
  isAssisting={false}
491
506
  progress={{
507
+ stage: 'complete',
508
+ percentage: 100,
509
+ message: 'Annotation complete',
492
510
  completedEntityTypes: [{ entityType: 'Person', foundCount: 5 }],
493
511
  }}
494
512
  />
@@ -509,6 +527,9 @@ describe('ReferencesPanel Component', () => {
509
527
  {...defaultProps}
510
528
  isAssisting={false}
511
529
  progress={{
530
+ stage: 'complete',
531
+ percentage: 100,
532
+ message: 'Annotation complete',
512
533
  completedEntityTypes: [{ entityType: 'Person', foundCount: 5 }],
513
534
  }}
514
535
  />
@@ -529,6 +550,9 @@ describe('ReferencesPanel Component', () => {
529
550
  {...defaultProps}
530
551
  isAssisting={false}
531
552
  progress={{
553
+ stage: 'complete',
554
+ percentage: 100,
555
+ message: 'Annotation complete',
532
556
  completedEntityTypes: [],
533
557
  }}
534
558
  />
@@ -552,7 +576,7 @@ describe('ReferencesPanel Component', () => {
552
576
  <ReferencesPanel
553
577
  {...defaultProps}
554
578
  isAssisting={true}
555
- progress={{ completedEntityTypes: [] }}
579
+ progress={{ stage: 'analyzing', percentage: 0, message: 'Detecting references...', completedEntityTypes: [] }}
556
580
  />
557
581
  );
558
582
 
@@ -566,7 +590,7 @@ describe('ReferencesPanel Component', () => {
566
590
  <ReferencesPanel
567
591
  {...defaultProps}
568
592
  isAssisting={true}
569
- progress={{ completedEntityTypes: [] }}
593
+ progress={{ stage: 'analyzing', percentage: 0, message: 'Detecting references...', completedEntityTypes: [] }}
570
594
  />
571
595
  );
572
596
 
@@ -579,6 +603,9 @@ describe('ReferencesPanel Component', () => {
579
603
  {...defaultProps}
580
604
  isAssisting={false}
581
605
  progress={{
606
+ stage: 'complete',
607
+ percentage: 100,
608
+ message: 'Annotation complete',
582
609
  completedEntityTypes: [{ entityType: 'Person', foundCount: 5 }],
583
610
  }}
584
611
  />
@@ -601,6 +628,9 @@ describe('ReferencesPanel Component', () => {
601
628
  {...defaultProps}
602
629
  isAssisting={false}
603
630
  progress={{
631
+ stage: 'complete',
632
+ percentage: 100,
633
+ message: 'Annotation complete',
604
634
  completedEntityTypes: [{ entityType: 'Person', foundCount: 5 }],
605
635
  }}
606
636
  />
@@ -692,6 +722,9 @@ describe('ReferencesPanel Component', () => {
692
722
  {...defaultProps}
693
723
  isAssisting={false}
694
724
  progress={{
725
+ stage: 'complete',
726
+ percentage: 100,
727
+ message: 'Annotation complete',
695
728
  completedEntityTypes: [{ entityType: 'Person', foundCount: 0 }],
696
729
  }}
697
730
  />
@@ -295,7 +295,7 @@ describe('ResourceInfoPanel Component', () => {
295
295
  renderWithEventBus(
296
296
  <ResourceInfoPanel
297
297
  {...defaultProps}
298
- wasAttributedTo={{ name: 'Alice', '@id': 'https://example.org/alice' }}
298
+ wasAttributedTo={{ '@type': 'Person', name: 'Alice', '@id': 'https://example.org/alice' }}
299
299
  />
300
300
  );
301
301
  expect(screen.getByText('Attributed to')).toBeInTheDocument();
@@ -307,8 +307,8 @@ describe('ResourceInfoPanel Component', () => {
307
307
  <ResourceInfoPanel
308
308
  {...defaultProps}
309
309
  wasAttributedTo={[
310
- { name: 'Alice' },
311
- { name: 'Bob' },
310
+ { '@type': 'Person', name: 'Alice' },
311
+ { '@type': 'Person', name: 'Bob' },
312
312
  ]}
313
313
  />
314
314
  );