@semiont/react-ui 0.5.3 → 0.5.4

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 (470) hide show
  1. package/dist/{PdfAnnotationCanvas.client-5QESNO5H.mjs → PdfAnnotationCanvas.client-CN3C3S55.js} +2 -2
  2. package/dist/{ar-UUMMNQKF.mjs → ar-U2EXWUMQ.js} +2 -5
  3. package/dist/ar-U2EXWUMQ.js.map +1 -0
  4. package/dist/assets/favicons/SemiontFavicon.d.ts +9 -0
  5. package/dist/assets/favicons/SemiontFavicon.d.ts.map +1 -0
  6. package/dist/assets/favicons/index.d.ts +12 -0
  7. package/dist/assets/favicons/index.d.ts.map +1 -0
  8. package/dist/{bn-AL5BJSR3.mjs → bn-DRJGV772.js} +2 -5
  9. package/dist/bn-DRJGV772.js.map +1 -0
  10. package/dist/{chunk-EBBL3VJI.mjs → chunk-3Q3TUKWP.js} +32 -32
  11. package/dist/{chunk-OJSRLEER.mjs → chunk-GERSK2DY.js} +2 -5
  12. package/dist/chunk-GERSK2DY.js.map +1 -0
  13. package/dist/{chunk-D4GAAQMM.mjs → chunk-K6BJDL2I.js} +1 -1
  14. package/dist/components/AnnotateReferencesProgressWidget.d.ts +15 -0
  15. package/dist/components/AnnotateReferencesProgressWidget.d.ts.map +1 -0
  16. package/dist/components/Button/Button.d.ts +69 -0
  17. package/dist/components/Button/Button.d.ts.map +1 -0
  18. package/dist/components/CodeMirrorRenderer.d.ts +25 -0
  19. package/dist/components/CodeMirrorRenderer.d.ts.map +1 -0
  20. package/dist/components/ErrorBoundary.d.ts +30 -0
  21. package/dist/components/ErrorBoundary.d.ts.map +1 -0
  22. package/dist/components/LiveRegion.d.ts +41 -0
  23. package/dist/components/LiveRegion.d.ts.map +1 -0
  24. package/dist/components/ProtectedErrorBoundary.d.ts +27 -0
  25. package/dist/components/ProtectedErrorBoundary.d.ts.map +1 -0
  26. package/dist/components/ResizeHandle.d.ts +39 -0
  27. package/dist/components/ResizeHandle.d.ts.map +1 -0
  28. package/dist/components/ResourceTagsInline.d.ts +10 -0
  29. package/dist/components/ResourceTagsInline.d.ts.map +1 -0
  30. package/dist/components/SessionExpiryBanner.d.ts +2 -0
  31. package/dist/components/SessionExpiryBanner.d.ts.map +1 -0
  32. package/dist/components/SessionTimer.d.ts +2 -0
  33. package/dist/components/SessionTimer.d.ts.map +1 -0
  34. package/dist/components/StatusDisplay.d.ts +9 -0
  35. package/dist/components/StatusDisplay.d.ts.map +1 -0
  36. package/dist/components/Toast.d.ts +27 -0
  37. package/dist/components/Toast.d.ts.map +1 -0
  38. package/dist/components/Toolbar.d.ts +15 -0
  39. package/dist/components/Toolbar.d.ts.map +1 -0
  40. package/dist/components/UserMenuSkeleton.d.ts +2 -0
  41. package/dist/components/UserMenuSkeleton.d.ts.map +1 -0
  42. package/dist/components/annotation/AnnotateToolbar.d.ts +29 -0
  43. package/dist/components/annotation/AnnotateToolbar.d.ts.map +1 -0
  44. package/dist/components/annotation-popups/JsonLdView.d.ts +8 -0
  45. package/dist/components/annotation-popups/JsonLdView.d.ts.map +1 -0
  46. package/dist/components/annotation-popups/SharedPopupElements.d.ts +28 -0
  47. package/dist/components/annotation-popups/SharedPopupElements.d.ts.map +1 -0
  48. package/dist/components/branding/SemiontBranding.d.ts +13 -0
  49. package/dist/components/branding/SemiontBranding.d.ts.map +1 -0
  50. package/dist/components/error-states/ResourceErrorState.d.ts +11 -0
  51. package/dist/components/error-states/ResourceErrorState.d.ts.map +1 -0
  52. package/dist/components/image-annotation/AnnotationOverlay.d.ts +22 -0
  53. package/dist/components/image-annotation/AnnotationOverlay.d.ts.map +1 -0
  54. package/dist/components/image-annotation/SvgDrawingCanvas.d.ts +23 -0
  55. package/dist/components/image-annotation/SvgDrawingCanvas.d.ts.map +1 -0
  56. package/dist/components/layout/LeftSidebar.d.ts +24 -0
  57. package/dist/components/layout/LeftSidebar.d.ts.map +1 -0
  58. package/dist/components/layout/PageLayout.d.ts +21 -0
  59. package/dist/components/layout/PageLayout.d.ts.map +1 -0
  60. package/dist/components/layout/SkipLinks.d.ts +8 -0
  61. package/dist/components/layout/SkipLinks.d.ts.map +1 -0
  62. package/dist/components/layout/UnifiedHeader.d.ts +21 -0
  63. package/dist/components/layout/UnifiedHeader.d.ts.map +1 -0
  64. package/dist/components/loading-states/ComposeLoadingState.d.ts +10 -0
  65. package/dist/components/loading-states/ComposeLoadingState.d.ts.map +1 -0
  66. package/dist/components/loading-states/ResourceLoadingState.d.ts +7 -0
  67. package/dist/components/loading-states/ResourceLoadingState.d.ts.map +1 -0
  68. package/dist/components/modals/ConfigureGenerationStep.d.ts +36 -0
  69. package/dist/components/modals/ConfigureGenerationStep.d.ts.map +1 -0
  70. package/dist/components/modals/ConfigureSearchStep.d.ts +21 -0
  71. package/dist/components/modals/ConfigureSearchStep.d.ts.map +1 -0
  72. package/dist/components/modals/ContextSummary.d.ts +14 -0
  73. package/dist/components/modals/ContextSummary.d.ts.map +1 -0
  74. package/dist/components/modals/GatherContextStep.d.ts +23 -0
  75. package/dist/components/modals/GatherContextStep.d.ts.map +1 -0
  76. package/dist/components/modals/KeyboardShortcutsHelpModal.d.ts +8 -0
  77. package/dist/components/modals/KeyboardShortcutsHelpModal.d.ts.map +1 -0
  78. package/dist/components/modals/PermissionDeniedModal.d.ts +12 -0
  79. package/dist/components/modals/PermissionDeniedModal.d.ts.map +1 -0
  80. package/dist/components/modals/ReferenceWizardModal.d.ts +64 -0
  81. package/dist/components/modals/ReferenceWizardModal.d.ts.map +1 -0
  82. package/dist/components/modals/ResourceSearchModal.d.ts +16 -0
  83. package/dist/components/modals/ResourceSearchModal.d.ts.map +1 -0
  84. package/dist/components/modals/SearchModal.d.ts +20 -0
  85. package/dist/components/modals/SearchModal.d.ts.map +1 -0
  86. package/dist/components/modals/SearchResultsStep.d.ts +22 -0
  87. package/dist/components/modals/SearchResultsStep.d.ts.map +1 -0
  88. package/dist/components/modals/SessionExpiredModal.d.ts +12 -0
  89. package/dist/components/modals/SessionExpiredModal.d.ts.map +1 -0
  90. package/dist/components/navigation/CollapsibleResourceNavigation.d.ts +13 -0
  91. package/dist/components/navigation/CollapsibleResourceNavigation.d.ts.map +1 -0
  92. package/dist/components/navigation/Footer.d.ts +20 -0
  93. package/dist/components/navigation/Footer.d.ts.map +1 -0
  94. package/dist/components/navigation/NavigationMenu.d.ts +18 -0
  95. package/dist/components/navigation/NavigationMenu.d.ts.map +1 -0
  96. package/dist/components/navigation/ObservableLink.d.ts +52 -0
  97. package/dist/components/navigation/ObservableLink.d.ts.map +1 -0
  98. package/dist/components/navigation/SimpleNavigation.d.ts +35 -0
  99. package/dist/components/navigation/SimpleNavigation.d.ts.map +1 -0
  100. package/dist/components/navigation/SortableResourceTab.d.ts +7 -0
  101. package/dist/components/navigation/SortableResourceTab.d.ts.map +1 -0
  102. package/dist/components/pdf-annotation/PdfAnnotationCanvas.client.d.ts +8 -0
  103. package/dist/components/pdf-annotation/PdfAnnotationCanvas.client.d.ts.map +1 -0
  104. package/dist/components/pdf-annotation/PdfAnnotationCanvas.d.ts +25 -0
  105. package/dist/components/pdf-annotation/PdfAnnotationCanvas.d.ts.map +1 -0
  106. package/dist/components/resource/AnnotateView.d.ts +29 -0
  107. package/dist/components/resource/AnnotateView.d.ts.map +1 -0
  108. package/dist/components/resource/AnnotationHistory.d.ts +14 -0
  109. package/dist/components/resource/AnnotationHistory.d.ts.map +1 -0
  110. package/dist/components/resource/BrowseView.d.ts +28 -0
  111. package/dist/components/resource/BrowseView.d.ts.map +1 -0
  112. package/dist/components/resource/HistoryEvent.d.ts +19 -0
  113. package/dist/components/resource/HistoryEvent.d.ts.map +1 -0
  114. package/dist/components/resource/ResourceViewer.d.ts +46 -0
  115. package/dist/components/resource/ResourceViewer.d.ts.map +1 -0
  116. package/dist/components/resource/event-formatting.d.ts +61 -0
  117. package/dist/components/resource/event-formatting.d.ts.map +1 -0
  118. package/dist/components/resource/panels/AssessmentEntry.d.ts +11 -0
  119. package/dist/components/resource/panels/AssessmentEntry.d.ts.map +1 -0
  120. package/dist/components/resource/panels/AssessmentPanel.d.ts +32 -0
  121. package/dist/components/resource/panels/AssessmentPanel.d.ts.map +1 -0
  122. package/dist/components/resource/panels/AssistSection.d.ts +27 -0
  123. package/dist/components/resource/panels/AssistSection.d.ts.map +1 -0
  124. package/dist/components/resource/panels/CollaborationPanel.d.ts +28 -0
  125. package/dist/components/resource/panels/CollaborationPanel.d.ts.map +1 -0
  126. package/dist/components/resource/panels/CommentEntry.d.ts +12 -0
  127. package/dist/components/resource/panels/CommentEntry.d.ts.map +1 -0
  128. package/dist/components/resource/panels/CommentsPanel.d.ts +32 -0
  129. package/dist/components/resource/panels/CommentsPanel.d.ts.map +1 -0
  130. package/dist/components/resource/panels/HighlightEntry.d.ts +11 -0
  131. package/dist/components/resource/panels/HighlightEntry.d.ts.map +1 -0
  132. package/dist/components/resource/panels/HighlightPanel.d.ts +30 -0
  133. package/dist/components/resource/panels/HighlightPanel.d.ts.map +1 -0
  134. package/dist/components/resource/panels/JsonLdPanel.d.ts +9 -0
  135. package/dist/components/resource/panels/JsonLdPanel.d.ts.map +1 -0
  136. package/dist/components/resource/panels/PanelHeader.d.ts +13 -0
  137. package/dist/components/resource/panels/PanelHeader.d.ts.map +1 -0
  138. package/dist/components/resource/panels/ReferenceEntry.d.ts +15 -0
  139. package/dist/components/resource/panels/ReferenceEntry.d.ts.map +1 -0
  140. package/dist/components/resource/panels/ReferencesPanel.d.ts +43 -0
  141. package/dist/components/resource/panels/ReferencesPanel.d.ts.map +1 -0
  142. package/dist/components/resource/panels/ResourceInfoPanel.d.ts +27 -0
  143. package/dist/components/resource/panels/ResourceInfoPanel.d.ts.map +1 -0
  144. package/dist/components/resource/panels/StatisticsPanel.d.ts +12 -0
  145. package/dist/components/resource/panels/StatisticsPanel.d.ts.map +1 -0
  146. package/dist/components/resource/panels/TagEntry.d.ts +11 -0
  147. package/dist/components/resource/panels/TagEntry.d.ts.map +1 -0
  148. package/dist/components/resource/panels/TaggingPanel.d.ts +34 -0
  149. package/dist/components/resource/panels/TaggingPanel.d.ts.map +1 -0
  150. package/dist/components/resource/panels/UnifiedAnnotationsPanel.d.ts +52 -0
  151. package/dist/components/resource/panels/UnifiedAnnotationsPanel.d.ts.map +1 -0
  152. package/dist/components/resource/panels/agent-label.d.ts +11 -0
  153. package/dist/components/resource/panels/agent-label.d.ts.map +1 -0
  154. package/dist/components/settings/SettingsPanel.d.ts +19 -0
  155. package/dist/components/settings/SettingsPanel.d.ts.map +1 -0
  156. package/dist/components/viewers/ImageViewer.d.ts +8 -0
  157. package/dist/components/viewers/ImageViewer.d.ts.map +1 -0
  158. package/dist/components/viewers/index.d.ts +2 -0
  159. package/dist/components/viewers/index.d.ts.map +1 -0
  160. package/dist/contexts/AnnotationContext.d.ts +46 -0
  161. package/dist/contexts/AnnotationContext.d.ts.map +1 -0
  162. package/dist/contexts/ResourceAnnotationsContext.d.ts +14 -0
  163. package/dist/contexts/ResourceAnnotationsContext.d.ts.map +1 -0
  164. package/dist/contexts/RoutingContext.d.ts +59 -0
  165. package/dist/contexts/RoutingContext.d.ts.map +1 -0
  166. package/dist/contexts/ThemeContext.d.ts +15 -0
  167. package/dist/contexts/ThemeContext.d.ts.map +1 -0
  168. package/dist/contexts/TranslationContext.d.ts +51 -0
  169. package/dist/contexts/TranslationContext.d.ts.map +1 -0
  170. package/dist/contexts/useEventSubscription.d.ts +41 -0
  171. package/dist/contexts/useEventSubscription.d.ts.map +1 -0
  172. package/dist/{cs-UMINALSU.mjs → cs-PTWDM23V.js} +2 -5
  173. package/dist/{cs-UMINALSU.mjs.map → cs-PTWDM23V.js.map} +1 -1
  174. package/dist/{da-FKUX6CDL.mjs → da-KSNIKYSS.js} +2 -5
  175. package/dist/da-KSNIKYSS.js.map +1 -0
  176. package/dist/{de-XSJ3E25S.mjs → de-F2XBEWFY.js} +2 -5
  177. package/dist/de-F2XBEWFY.js.map +1 -0
  178. package/dist/design-tokens/index.d.ts +178 -0
  179. package/dist/design-tokens/index.d.ts.map +1 -0
  180. package/dist/{el-UJXNRCBP.mjs → el-DLD2GWAP.js} +2 -5
  181. package/dist/el-DLD2GWAP.js.map +1 -0
  182. package/dist/{en-J5DHKLQ5.mjs → en-L45VK7BS.js} +3 -3
  183. package/dist/{es-VURP62BU.mjs → es-WLPYWGB5.js} +2 -5
  184. package/dist/es-WLPYWGB5.js.map +1 -0
  185. package/dist/{fa-TIT5ZPZY.mjs → fa-BAXHSDZG.js} +2 -5
  186. package/dist/fa-BAXHSDZG.js.map +1 -0
  187. package/dist/features/admin-devops/components/AdminDevOpsPage.d.ts +33 -0
  188. package/dist/features/admin-devops/components/AdminDevOpsPage.d.ts.map +1 -0
  189. package/dist/features/admin-exchange/components/AdminExchangePage.d.ts +37 -0
  190. package/dist/features/admin-exchange/components/AdminExchangePage.d.ts.map +1 -0
  191. package/dist/features/admin-exchange/components/ExportCard.d.ts +18 -0
  192. package/dist/features/admin-exchange/components/ExportCard.d.ts.map +1 -0
  193. package/dist/features/admin-exchange/components/ImportCard.d.ts +32 -0
  194. package/dist/features/admin-exchange/components/ImportCard.d.ts.map +1 -0
  195. package/dist/features/admin-exchange/components/ImportProgress.d.ts +26 -0
  196. package/dist/features/admin-exchange/components/ImportProgress.d.ts.map +1 -0
  197. package/dist/features/admin-exchange/state/exchange-state-unit.d.ts +31 -0
  198. package/dist/features/admin-exchange/state/exchange-state-unit.d.ts.map +1 -0
  199. package/dist/features/admin-security/components/AdminSecurityPage.d.ts +42 -0
  200. package/dist/features/admin-security/components/AdminSecurityPage.d.ts.map +1 -0
  201. package/dist/features/admin-security/state/admin-security-state-unit.d.ts +12 -0
  202. package/dist/features/admin-security/state/admin-security-state-unit.d.ts.map +1 -0
  203. package/dist/features/admin-users/components/AdminUsersPage.d.ts +88 -0
  204. package/dist/features/admin-users/components/AdminUsersPage.d.ts.map +1 -0
  205. package/dist/features/admin-users/state/admin-users-state-unit.d.ts +17 -0
  206. package/dist/features/admin-users/state/admin-users-state-unit.d.ts.map +1 -0
  207. package/dist/features/auth/components/AuthErrorDisplay.d.ts +34 -0
  208. package/dist/features/auth/components/AuthErrorDisplay.d.ts.map +1 -0
  209. package/dist/features/auth/components/SignInForm.d.ts +80 -0
  210. package/dist/features/auth/components/SignInForm.d.ts.map +1 -0
  211. package/dist/features/auth/components/SignUpForm.d.ts +39 -0
  212. package/dist/features/auth/components/SignUpForm.d.ts.map +1 -0
  213. package/dist/features/auth-welcome/components/WelcomePage.d.ts +62 -0
  214. package/dist/features/auth-welcome/components/WelcomePage.d.ts.map +1 -0
  215. package/dist/features/auth-welcome/state/welcome-state-unit.d.ts +12 -0
  216. package/dist/features/auth-welcome/state/welcome-state-unit.d.ts.map +1 -0
  217. package/dist/features/moderate-entity-tags/components/EntityTagsPage.d.ts +32 -0
  218. package/dist/features/moderate-entity-tags/components/EntityTagsPage.d.ts.map +1 -0
  219. package/dist/features/moderate-entity-tags/state/entity-tags-state-unit.d.ts +16 -0
  220. package/dist/features/moderate-entity-tags/state/entity-tags-state-unit.d.ts.map +1 -0
  221. package/dist/features/moderate-recent/components/RecentDocumentsPage.d.ts +27 -0
  222. package/dist/features/moderate-recent/components/RecentDocumentsPage.d.ts.map +1 -0
  223. package/dist/features/moderate-tag-schemas/components/TagSchemasPage.d.ts +25 -0
  224. package/dist/features/moderate-tag-schemas/components/TagSchemasPage.d.ts.map +1 -0
  225. package/dist/features/moderation-linked-data/components/LinkedDataPage.d.ts +38 -0
  226. package/dist/features/moderation-linked-data/components/LinkedDataPage.d.ts.map +1 -0
  227. package/dist/features/resource-compose/components/ResourceComposePage.d.ts +83 -0
  228. package/dist/features/resource-compose/components/ResourceComposePage.d.ts.map +1 -0
  229. package/dist/features/resource-compose/components/UploadProgressBar.d.ts +23 -0
  230. package/dist/features/resource-compose/components/UploadProgressBar.d.ts.map +1 -0
  231. package/dist/features/resource-compose/state/compose-page-state-unit.d.ts +59 -0
  232. package/dist/features/resource-compose/state/compose-page-state-unit.d.ts.map +1 -0
  233. package/dist/features/resource-discovery/components/ResourceCard.d.ts +17 -0
  234. package/dist/features/resource-discovery/components/ResourceCard.d.ts.map +1 -0
  235. package/dist/features/resource-discovery/components/ResourceDiscoveryPage.d.ts +43 -0
  236. package/dist/features/resource-discovery/components/ResourceDiscoveryPage.d.ts.map +1 -0
  237. package/dist/features/resource-discovery/state/discover-state-unit.d.ts +15 -0
  238. package/dist/features/resource-discovery/state/discover-state-unit.d.ts.map +1 -0
  239. package/dist/features/resource-viewer/components/ResourceViewerPage.d.ts +80 -0
  240. package/dist/features/resource-viewer/components/ResourceViewerPage.d.ts.map +1 -0
  241. package/dist/features/resource-viewer/state/resource-loader-state-unit.d.ts +11 -0
  242. package/dist/features/resource-viewer/state/resource-loader-state-unit.d.ts.map +1 -0
  243. package/dist/features/resource-viewer/state/resource-viewer-page-state-unit.d.ts +48 -0
  244. package/dist/features/resource-viewer/state/resource-viewer-page-state-unit.d.ts.map +1 -0
  245. package/dist/{fi-F7VTGT4H.mjs → fi-FCHSYVOT.js} +2 -5
  246. package/dist/fi-FCHSYVOT.js.map +1 -0
  247. package/dist/{fr-2ZR26VF7.mjs → fr-3UERBSL6.js} +2 -5
  248. package/dist/fr-3UERBSL6.js.map +1 -0
  249. package/dist/{he-BXP2KYVZ.mjs → he-F6F3FV2K.js} +2 -5
  250. package/dist/he-F6F3FV2K.js.map +1 -0
  251. package/dist/{hi-PSWTP3NC.mjs → hi-4BK6IK7Q.js} +2 -5
  252. package/dist/hi-4BK6IK7Q.js.map +1 -0
  253. package/dist/hooks/useDebounce.d.ts +29 -0
  254. package/dist/hooks/useDebounce.d.ts.map +1 -0
  255. package/dist/hooks/useDragAnnouncements.d.ts +12 -0
  256. package/dist/hooks/useDragAnnouncements.d.ts.map +1 -0
  257. package/dist/hooks/useHoverDelay.d.ts +8 -0
  258. package/dist/hooks/useHoverDelay.d.ts.map +1 -0
  259. package/dist/hooks/useHoverEmitter.d.ts +8 -0
  260. package/dist/hooks/useHoverEmitter.d.ts.map +1 -0
  261. package/dist/hooks/useKeyboardShortcuts.d.ts +29 -0
  262. package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  263. package/dist/hooks/useLineNumbers.d.ts +8 -0
  264. package/dist/hooks/useLineNumbers.d.ts.map +1 -0
  265. package/dist/hooks/useMediaToken.d.ts +7 -0
  266. package/dist/hooks/useMediaToken.d.ts.map +1 -0
  267. package/dist/hooks/useObservable.d.ts +23 -0
  268. package/dist/hooks/useObservable.d.ts.map +1 -0
  269. package/dist/hooks/useObservableBrowse.d.ts +70 -0
  270. package/dist/hooks/useObservableBrowse.d.ts.map +1 -0
  271. package/dist/hooks/usePanelWidth.d.ts +37 -0
  272. package/dist/hooks/usePanelWidth.d.ts.map +1 -0
  273. package/dist/hooks/useResourceContent.d.ts +7 -0
  274. package/dist/hooks/useResourceContent.d.ts.map +1 -0
  275. package/dist/hooks/useRovingTabIndex.d.ts +13 -0
  276. package/dist/hooks/useRovingTabIndex.d.ts.map +1 -0
  277. package/dist/hooks/useSearchAnnouncements.d.ts +10 -0
  278. package/dist/hooks/useSearchAnnouncements.d.ts.map +1 -0
  279. package/dist/hooks/useSessionExpiry.d.ts +10 -0
  280. package/dist/hooks/useSessionExpiry.d.ts.map +1 -0
  281. package/dist/hooks/useShellStateUnit.d.ts +9 -0
  282. package/dist/hooks/useShellStateUnit.d.ts.map +1 -0
  283. package/dist/hooks/useStateUnit.d.ts +3 -0
  284. package/dist/hooks/useStateUnit.d.ts.map +1 -0
  285. package/dist/hooks/useUI.d.ts +24 -0
  286. package/dist/hooks/useUI.d.ts.map +1 -0
  287. package/dist/{id-HO6TXGTO.mjs → id-7ECCWP3J.js} +2 -5
  288. package/dist/id-7ECCWP3J.js.map +1 -0
  289. package/dist/index.d.ts +150 -0
  290. package/dist/index.d.ts.map +1 -0
  291. package/dist/{index.mjs → index.js} +43 -46
  292. package/dist/index.js.map +1 -0
  293. package/dist/integrations/css-modules-helper.d.ts +114 -0
  294. package/dist/integrations/css-modules-helper.d.ts.map +1 -0
  295. package/dist/integrations/styled-components-theme.d.ts +95 -0
  296. package/dist/integrations/styled-components-theme.d.ts.map +1 -0
  297. package/dist/integrations/tailwind-plugin.d.cts +3 -0
  298. package/dist/integrations/tailwind-plugin.d.cts.map +1 -0
  299. package/dist/{it-AGTDMBL3.mjs → it-234Z6XK6.js} +2 -5
  300. package/dist/it-234Z6XK6.js.map +1 -0
  301. package/dist/{ja-TTGOVF5K.mjs → ja-PJWQI4OQ.js} +2 -5
  302. package/dist/ja-PJWQI4OQ.js.map +1 -0
  303. package/dist/{ko-FF77IQ7N.mjs → ko-APUEW2RS.js} +2 -5
  304. package/dist/ko-APUEW2RS.js.map +1 -0
  305. package/dist/lib/annotation-overlay.d.ts +71 -0
  306. package/dist/lib/annotation-overlay.d.ts.map +1 -0
  307. package/dist/lib/annotation-registry.d.ts +62 -0
  308. package/dist/lib/annotation-registry.d.ts.map +1 -0
  309. package/dist/lib/browser-pdfjs.d.ts +93 -0
  310. package/dist/lib/browser-pdfjs.d.ts.map +1 -0
  311. package/dist/lib/button-styles.d.ts +27 -0
  312. package/dist/lib/button-styles.d.ts.map +1 -0
  313. package/dist/lib/codemirror-handlers.d.ts +52 -0
  314. package/dist/lib/codemirror-handlers.d.ts.map +1 -0
  315. package/dist/lib/codemirror-json-theme.d.ts +8 -0
  316. package/dist/lib/codemirror-json-theme.d.ts.map +1 -0
  317. package/dist/lib/codemirror-logic.d.ts +66 -0
  318. package/dist/lib/codemirror-logic.d.ts.map +1 -0
  319. package/dist/lib/codemirror-widgets.d.ts +39 -0
  320. package/dist/lib/codemirror-widgets.d.ts.map +1 -0
  321. package/dist/lib/formatTime.d.ts +2 -0
  322. package/dist/lib/formatTime.d.ts.map +1 -0
  323. package/dist/lib/media-shapes.d.ts +51 -0
  324. package/dist/lib/media-shapes.d.ts.map +1 -0
  325. package/dist/lib/pdf-coordinates.d.ts +69 -0
  326. package/dist/lib/pdf-coordinates.d.ts.map +1 -0
  327. package/dist/lib/resource-utils.d.ts +22 -0
  328. package/dist/lib/resource-utils.d.ts.map +1 -0
  329. package/dist/lib/scroll-utils.d.ts +20 -0
  330. package/dist/lib/scroll-utils.d.ts.map +1 -0
  331. package/dist/lib/text-segmentation.d.ts +25 -0
  332. package/dist/lib/text-segmentation.d.ts.map +1 -0
  333. package/dist/lib/text-selection-handler.d.ts +46 -0
  334. package/dist/lib/text-selection-handler.d.ts.map +1 -0
  335. package/dist/lib/validation.d.ts +47 -0
  336. package/dist/lib/validation.d.ts.map +1 -0
  337. package/dist/{ms-UPQWWIL4.mjs → ms-PJBZWZWD.js} +2 -5
  338. package/dist/ms-PJBZWZWD.js.map +1 -0
  339. package/dist/{nl-W75HEPFL.mjs → nl-L4C3ZBCU.js} +2 -5
  340. package/dist/nl-L4C3ZBCU.js.map +1 -0
  341. package/dist/{no-R4W7W7ZU.mjs → no-QE5N5KNG.js} +2 -5
  342. package/dist/no-QE5N5KNG.js.map +1 -0
  343. package/dist/{pl-GQC2ELWO.mjs → pl-5Q2D23PD.js} +2 -5
  344. package/dist/pl-5Q2D23PD.js.map +1 -0
  345. package/dist/{pt-YGVT62RU.mjs → pt-AIGUOIOC.js} +2 -5
  346. package/dist/pt-AIGUOIOC.js.map +1 -0
  347. package/dist/{ro-TST6XS6X.mjs → ro-T56CSHTY.js} +2 -5
  348. package/dist/ro-T56CSHTY.js.map +1 -0
  349. package/dist/session/SemiontProvider.d.ts +28 -0
  350. package/dist/session/SemiontProvider.d.ts.map +1 -0
  351. package/dist/session/web-browser-storage.d.ts +19 -0
  352. package/dist/session/web-browser-storage.d.ts.map +1 -0
  353. package/dist/state/session-state-unit.d.ts +9 -0
  354. package/dist/state/session-state-unit.d.ts.map +1 -0
  355. package/dist/state/shell-state-unit.d.ts +33 -0
  356. package/dist/state/shell-state-unit.d.ts.map +1 -0
  357. package/dist/{sv-TQLF6HV7.mjs → sv-L4TJQ2UH.js} +2 -5
  358. package/dist/sv-L4TJQ2UH.js.map +1 -0
  359. package/dist/{test-utils.d.mts → test-utils.d.ts} +18 -21
  360. package/dist/test-utils.d.ts.map +1 -0
  361. package/dist/{test-utils.mjs → test-utils.js} +5 -5
  362. package/dist/{th-HJUIETVR.mjs → th-6O7Y6O2Q.js} +2 -5
  363. package/dist/th-6O7Y6O2Q.js.map +1 -0
  364. package/dist/{tr-CW3C46TW.mjs → tr-D4CQCSNO.js} +2 -5
  365. package/dist/tr-D4CQCSNO.js.map +1 -0
  366. package/dist/types/AnnotationManager.d.ts +53 -0
  367. package/dist/types/AnnotationManager.d.ts.map +1 -0
  368. package/dist/{TranslationManager-9Xj3MIWQ.d.mts → types/TranslationManager.d.ts} +2 -3
  369. package/dist/types/TranslationManager.d.ts.map +1 -0
  370. package/dist/types/annotation-props.d.ts +108 -0
  371. package/dist/types/annotation-props.d.ts.map +1 -0
  372. package/dist/types/collapsible-navigation.d.ts +69 -0
  373. package/dist/types/collapsible-navigation.d.ts.map +1 -0
  374. package/dist/types/modals.d.ts +77 -0
  375. package/dist/types/modals.d.ts.map +1 -0
  376. package/dist/types/navigation.d.ts +35 -0
  377. package/dist/types/navigation.d.ts.map +1 -0
  378. package/dist/types/resource-viewer.d.ts +19 -0
  379. package/dist/types/resource-viewer.d.ts.map +1 -0
  380. package/dist/types/simple-navigation.d.ts +15 -0
  381. package/dist/types/simple-navigation.d.ts.map +1 -0
  382. package/dist/types/translation.d.ts +5 -0
  383. package/dist/types/translation.d.ts.map +1 -0
  384. package/dist/{uk-WTHZQB2U.mjs → uk-2HMQG6ND.js} +2 -5
  385. package/dist/uk-2HMQG6ND.js.map +1 -0
  386. package/dist/{vi-PHWHJLKP.mjs → vi-XVJ4RUEJ.js} +2 -5
  387. package/dist/{vi-PHWHJLKP.mjs.map → vi-XVJ4RUEJ.js.map} +1 -1
  388. package/dist/{zh-MO3FCUD6.mjs → zh-K2KDPGHK.js} +2 -5
  389. package/dist/zh-K2KDPGHK.js.map +1 -0
  390. package/package.json +19 -18
  391. package/src/components/resource/HistoryEvent.tsx +0 -3
  392. package/src/components/resource/__tests__/HistoryEvent.test.tsx +1 -4
  393. package/src/components/resource/__tests__/event-formatting.test.ts +2 -14
  394. package/src/components/resource/event-formatting.ts +3 -4
  395. package/src/components/resource/panels/AssessmentEntry.tsx +4 -1
  396. package/src/components/resource/panels/CommentEntry.tsx +4 -1
  397. package/src/components/resource/panels/HighlightEntry.tsx +4 -1
  398. package/src/components/resource/panels/ReferenceEntry.tsx +4 -1
  399. package/src/components/resource/panels/ResourceInfoPanel.tsx +11 -23
  400. package/src/components/resource/panels/TagEntry.tsx +4 -1
  401. package/src/components/resource/panels/__tests__/CommentEntry.test.tsx +2 -2
  402. package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +12 -16
  403. package/src/components/resource/panels/__tests__/agent-label.test.ts +93 -0
  404. package/src/components/resource/panels/agent-label.ts +20 -0
  405. package/src/features/resource-compose/state/compose-page-state-unit.ts +0 -1
  406. package/src/features/resource-viewer/components/ResourceViewerPage.tsx +0 -1
  407. package/translations/ar.json +0 -3
  408. package/translations/bn.json +0 -3
  409. package/translations/cs.json +0 -3
  410. package/translations/da.json +0 -3
  411. package/translations/de.json +0 -3
  412. package/translations/el.json +0 -3
  413. package/translations/en.json +2 -5
  414. package/translations/es.json +0 -3
  415. package/translations/fa.json +0 -3
  416. package/translations/fi.json +0 -3
  417. package/translations/fr.json +0 -3
  418. package/translations/he.json +0 -3
  419. package/translations/hi.json +0 -3
  420. package/translations/id.json +0 -3
  421. package/translations/it.json +0 -3
  422. package/translations/ja.json +0 -3
  423. package/translations/ko.json +0 -3
  424. package/translations/ms.json +0 -3
  425. package/translations/nl.json +0 -3
  426. package/translations/no.json +0 -3
  427. package/translations/pl.json +0 -3
  428. package/translations/pt.json +0 -3
  429. package/translations/ro.json +0 -3
  430. package/translations/sv.json +0 -3
  431. package/translations/th.json +0 -3
  432. package/translations/tr.json +0 -3
  433. package/translations/uk.json +0 -3
  434. package/translations/vi.json +0 -3
  435. package/translations/zh.json +0 -3
  436. package/dist/ar-UUMMNQKF.mjs.map +0 -1
  437. package/dist/bn-AL5BJSR3.mjs.map +0 -1
  438. package/dist/chunk-OJSRLEER.mjs.map +0 -1
  439. package/dist/da-FKUX6CDL.mjs.map +0 -1
  440. package/dist/de-XSJ3E25S.mjs.map +0 -1
  441. package/dist/el-UJXNRCBP.mjs.map +0 -1
  442. package/dist/es-VURP62BU.mjs.map +0 -1
  443. package/dist/fa-TIT5ZPZY.mjs.map +0 -1
  444. package/dist/fi-F7VTGT4H.mjs.map +0 -1
  445. package/dist/fr-2ZR26VF7.mjs.map +0 -1
  446. package/dist/he-BXP2KYVZ.mjs.map +0 -1
  447. package/dist/hi-PSWTP3NC.mjs.map +0 -1
  448. package/dist/id-HO6TXGTO.mjs.map +0 -1
  449. package/dist/index.d.mts +0 -3546
  450. package/dist/index.mjs.map +0 -1
  451. package/dist/it-AGTDMBL3.mjs.map +0 -1
  452. package/dist/ja-TTGOVF5K.mjs.map +0 -1
  453. package/dist/ko-FF77IQ7N.mjs.map +0 -1
  454. package/dist/ms-UPQWWIL4.mjs.map +0 -1
  455. package/dist/nl-W75HEPFL.mjs.map +0 -1
  456. package/dist/no-R4W7W7ZU.mjs.map +0 -1
  457. package/dist/pl-GQC2ELWO.mjs.map +0 -1
  458. package/dist/pt-YGVT62RU.mjs.map +0 -1
  459. package/dist/ro-TST6XS6X.mjs.map +0 -1
  460. package/dist/sv-TQLF6HV7.mjs.map +0 -1
  461. package/dist/th-HJUIETVR.mjs.map +0 -1
  462. package/dist/tr-CW3C46TW.mjs.map +0 -1
  463. package/dist/uk-WTHZQB2U.mjs.map +0 -1
  464. package/dist/zh-MO3FCUD6.mjs.map +0 -1
  465. /package/dist/{PdfAnnotationCanvas.client-5QESNO5H.mjs.map → PdfAnnotationCanvas.client-CN3C3S55.js.map} +0 -0
  466. /package/dist/{chunk-EBBL3VJI.mjs.map → chunk-3Q3TUKWP.js.map} +0 -0
  467. /package/dist/{chunk-D4GAAQMM.mjs.map → chunk-K6BJDL2I.js.map} +0 -0
  468. /package/dist/{en-J5DHKLQ5.mjs.map → en-L45VK7BS.js.map} +0 -0
  469. /package/dist/{test-utils.mjs.map → test-utils.js.map} +0 -0
  470. /package/src/integrations/{tailwind-plugin.js → tailwind-plugin.cjs} +0 -0
package/dist/index.d.mts DELETED
@@ -1,3546 +0,0 @@
1
- import { Annotation, ResourceId, Selector, components, ResourceDescriptor, ValidationResult, EventMap, AnnotationId, StoredEventLike, ConnectionState, GatheredContext, BackendDownload, ProgressEvent, AccessToken } from '@semiont/core';
2
- export { Annotation } from '@semiont/core';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import * as React$1 from 'react';
5
- import React__default, { ComponentType, ReactNode, KeyboardEvent as KeyboardEvent$1, Component, ErrorInfo, Ref } from 'react';
6
- import { T as TranslationManager } from './TranslationManager-9Xj3MIWQ.mjs';
7
- import * as _codemirror_state from '@codemirror/state';
8
- import { HighlightStyle } from '@codemirror/language';
9
- import { WidgetType } from '@codemirror/view';
10
- import { StateUnit, SemiontBrowser, SessionStorage, SessionFactory, SemiontSession, OpenResource, TagSchema, UploadProgress, SemiontClient, BeckonStateUnit, MarkStateUnit, GatherStateUnit, YieldStateUnit, ReferencedByEntry, SearchPipeline } from '@semiont/sdk';
11
- export { BeckonStateUnit, GatherStateUnit, GenerateDocumentOptions, HOVER_DELAY_MS, HoverHandlers, MarkStateUnit, MatchStateUnit, PendingAnnotation, SearchPipeline, SearchPipelineOptions, SearchState, YieldStateUnit, createBeckonStateUnit, createGatherStateUnit, createHoverHandlers, createMarkStateUnit, createMatchStateUnit, createSearchPipeline, createYieldStateUnit } from '@semiont/sdk';
12
- import { Observable } from 'rxjs';
13
-
14
- /**
15
- * Collection of all annotation types for a resource.
16
- * Replaces separate highlights, references, assessments, comments, tags props.
17
- */
18
- interface AnnotationsCollection {
19
- highlights: Annotation[];
20
- references: Annotation[];
21
- assessments: Annotation[];
22
- comments: Annotation[];
23
- tags: Annotation[];
24
- }
25
- /**
26
- * Event handlers for annotation interactions.
27
- * Groups multiple click and hover handlers into a single interface.
28
- */
29
- interface AnnotationHandlers {
30
- /** Unified click handler - routes based on annotation type and current mode */
31
- onClick?: (annotation: Annotation, event?: React.MouseEvent) => void;
32
- /** Unified hover handler for all annotation types */
33
- onHover?: (annotationId: string | null) => void;
34
- /** Hover handler specifically for comment panel highlighting */
35
- onCommentHover?: (commentId: string | null) => void;
36
- }
37
- /**
38
- * UI-level parameters for annotation creation.
39
- * Works for both text selections and image shapes.
40
- * Used by annotation UI components before converting to AnnotationManager params.
41
- */
42
- interface UICreateAnnotationParams {
43
- /** The motivation for creating this annotation */
44
- motivation: SelectionMotivation;
45
- /** Selector information - text, SVG, or fragment */
46
- selector: {
47
- /** Selector type */
48
- type: 'TextQuoteSelector' | 'SvgSelector' | 'FragmentSelector';
49
- /** For TextQuoteSelector: the exact text selected */
50
- exact?: string;
51
- /** For TextQuoteSelector: context before selection */
52
- prefix?: string;
53
- /** For TextQuoteSelector: context after selection */
54
- suffix?: string;
55
- /** For TextPositionSelector: start position in document */
56
- start?: number;
57
- /** For TextPositionSelector: end position in document */
58
- end?: number;
59
- /** For SvgSelector: the SVG shape string */
60
- value?: string;
61
- /** For FragmentSelector: conformsTo URI (RFC 3778 for PDF) */
62
- conformsTo?: string;
63
- };
64
- /** Optional position for popup placement (text: near selection, image: shape center) */
65
- position?: {
66
- x: number;
67
- y: number;
68
- };
69
- }
70
- /**
71
- * Unified creation handler for new annotations.
72
- * Works for both text and image annotations.
73
- *
74
- * Behavior by motivation:
75
- * - highlighting/assessing: Creates annotation immediately
76
- * - commenting: Creates annotation, then opens Comment Panel
77
- * - linking: Shows Quick Reference popup FIRST, creates when user confirms
78
- */
79
- interface AnnotationCreationHandler {
80
- onCreate?: (params: UICreateAnnotationParams) => void | Promise<void> | Promise<Annotation | undefined>;
81
- }
82
- /**
83
- * UI state for annotation toolbar and interactions.
84
- * Groups multiple UI state props into a single object.
85
- */
86
- interface AnnotationUIState {
87
- /** Currently selected annotation motivation (linking, highlighting, etc.) */
88
- selectedMotivation: SelectionMotivation | null;
89
- /** Currently selected click mode (detail, follow, delete, jsonld) */
90
- selectedClick: ClickAction;
91
- /** Currently selected shape for image annotations */
92
- selectedShape: ShapeType;
93
- /** ID of currently hovered annotation (optional - only set when hovering) */
94
- hoveredAnnotationId?: string | null;
95
- /** ID of annotation to scroll to (optional - only set when scrolling needed) */
96
- scrollToAnnotationId?: string | null;
97
- }
98
- /**
99
- * Configuration options for annotation views.
100
- * Groups feature flags and settings.
101
- */
102
- interface AnnotationConfig {
103
- /** Whether content is editable */
104
- editable?: boolean;
105
- /** Whether to show annotation widgets (entity types, reference buttons) */
106
- enableWidgets?: boolean;
107
- /** Whether to show line numbers in code view */
108
- showLineNumbers?: boolean;
109
- /** Whether view is in annotate mode or browse mode */
110
- annotateMode?: boolean;
111
- }
112
-
113
- /**
114
- * Parameters for creating an annotation
115
- */
116
- interface CreateAnnotationParams {
117
- rUri: ResourceId;
118
- motivation: 'highlighting' | 'linking' | 'assessing' | 'commenting' | 'tagging';
119
- selector: Selector | Selector[];
120
- body?: any[];
121
- }
122
- /**
123
- * Parameters for deleting an annotation
124
- */
125
- interface DeleteAnnotationParams {
126
- annotationId: string;
127
- rUri: ResourceId;
128
- }
129
- /**
130
- * Annotation Manager Interface
131
- *
132
- * Framework-agnostic interface for annotation mutations.
133
- * Apps provide implementations via AnnotationProvider.
134
- *
135
- * Example implementation:
136
- * ```typescript
137
- * function useAnnotationManager(client: SemiontClient): AnnotationManager {
138
- * return {
139
- * markAnnotation: async (params) => {
140
- * const result = await client.mark.annotation({ target: { source: params.rUri, ... }, ... });
141
- * return result.annotation;
142
- * },
143
- * deleteAnnotation: async (params) => {
144
- * await client.mark.delete(params.rUri, params.annotationId);
145
- * }
146
- * };
147
- * }
148
- * ```
149
- */
150
- interface AnnotationManager {
151
- /**
152
- * Create a new annotation
153
- * @param params - Creation parameters (rUri, motivation, selector, body)
154
- * @returns Promise resolving to the created annotation, or undefined if creation fails
155
- */
156
- markAnnotation: (params: CreateAnnotationParams) => Promise<Annotation | undefined>;
157
- /**
158
- * Delete an annotation
159
- * @param params - Deletion parameters (annotationId, rUri)
160
- * @returns Promise resolving when deletion completes
161
- */
162
- deleteAnnotation: (params: DeleteAnnotationParams) => Promise<void>;
163
- }
164
-
165
- /**
166
- * Represents a single navigation item
167
- */
168
- interface NavigationItem {
169
- /** Display name for the navigation item */
170
- name: string;
171
- /** Target URL/path for the navigation item */
172
- href: string;
173
- /** Icon component to display */
174
- icon: ComponentType<any>;
175
- /** Optional description/tooltip text */
176
- description?: string;
177
- }
178
- /**
179
- * Props for navigation components that need framework-specific routing
180
- */
181
- interface NavigationProps {
182
- /** List of navigation items to display */
183
- items: NavigationItem[];
184
- /** Current active path for highlighting */
185
- currentPath: string;
186
- /** Framework-specific Link component (e.g., Next.js Link) */
187
- LinkComponent: ComponentType<{
188
- href: string;
189
- className?: string;
190
- children: ReactNode;
191
- title?: string;
192
- }>;
193
- /** Optional CSS class name */
194
- className?: string;
195
- /** Optional section title */
196
- title?: string;
197
- }
198
-
199
- /**
200
- * Type definitions for resource viewer feature
201
- */
202
-
203
- type SemiontResource$2 = ResourceDescriptor;
204
- type Motivation$8 = components['schemas']['Motivation'];
205
- /**
206
- * Selection for creating annotations
207
- */
208
- interface TextSelection {
209
- exact: string;
210
- start: number;
211
- end: number;
212
- prefix?: string;
213
- suffix?: string;
214
- svgSelector?: string;
215
- }
216
-
217
- /**
218
- * Centralized annotation type registry
219
- *
220
- * Single source of truth for W3C annotation motivation metadata including:
221
- * - Visual styling (CSS classes)
222
- * - Behavior flags (clickable, hover, side panel)
223
- * - Type guards (motivation matching)
224
- * - Accessibility (screen reader announcements)
225
- * - Runtime handlers (click, hover, detect, update, create)
226
- *
227
- * Per CLAUDE.md: This is the ONLY place to define annotation type metadata.
228
- * No aliasing, wrappers, or compatibility layers elsewhere.
229
- */
230
-
231
- type Motivation$7 = components['schemas']['Motivation'];
232
- /**
233
- * Detection configuration for SSE-based annotation detection
234
- */
235
- interface DetectionConfig {
236
- sseMethod: 'detectReferences' | 'detectHighlights' | 'detectAssessments' | 'detectComments' | 'detectTags';
237
- countField: 'foundCount' | 'createdCount' | 'tagsCreated';
238
- displayNamePlural: string;
239
- displayNameSingular: string;
240
- formatRequestParams?: (args: unknown[]) => Array<{
241
- label: string;
242
- value: string;
243
- }>;
244
- }
245
- /**
246
- * Creation configuration - describes how to create annotations of this type
247
- */
248
- interface CreateConfig {
249
- bodyBuilder: 'empty' | 'text' | 'entityTag' | 'dualTag';
250
- refetchAfter: boolean;
251
- successMessage?: string;
252
- }
253
- /**
254
- * Annotator: Encapsulates all motivation-specific behavior
255
- * Handles clicks, hovers, detection, and other operations for one annotation type
256
- */
257
- interface Annotator {
258
- motivation: Motivation$7;
259
- internalType: string;
260
- displayName: string;
261
- description: string;
262
- className: string;
263
- iconEmoji?: string;
264
- isClickable: boolean;
265
- hasHoverInteraction: boolean;
266
- hasSidePanel: boolean;
267
- matchesAnnotation: (annotation: Annotation) => boolean;
268
- announceOnCreate: string;
269
- detection?: DetectionConfig;
270
- create: CreateConfig;
271
- }
272
- /**
273
- * Static annotator definitions - single source of truth
274
- */
275
- declare const ANNOTATORS: Record<string, Annotator>;
276
-
277
- /**
278
- * Centralized button styles matching Figma design
279
- * Two primary styles from authenticated home page:
280
- * 1. Primary (cyan/blue gradient) - for main CTAs
281
- * 2. Secondary (gray with black outline) - for secondary actions
282
- */
283
- declare const buttonStyles: {
284
- readonly primary: {
285
- readonly base: "semiont-button semiont-button--primary";
286
- readonly large: "semiont-button semiont-button--primary semiont-button--large";
287
- };
288
- readonly secondary: {
289
- readonly base: "semiont-button semiont-button--secondary";
290
- readonly withScale: "semiont-button semiont-button--secondary semiont-button--scale";
291
- };
292
- readonly tertiary: {
293
- readonly base: "semiont-button semiont-button--tertiary";
294
- };
295
- readonly danger: {
296
- readonly base: "semiont-button semiont-button--danger";
297
- };
298
- readonly warning: {
299
- readonly base: "semiont-button semiont-button--warning";
300
- };
301
- readonly combine: (...classes: string[]) => string;
302
- };
303
-
304
- declare const jsonLightTheme: _codemirror_state.Extension;
305
- declare const jsonLightHighlightStyle: HighlightStyle;
306
-
307
- /**
308
- * CodeMirror Inline Widgets
309
- *
310
- * Custom widgets for enhancing the document editing experience:
311
- * - Reference resolution indicators (resolved 🔗, generating ✨, stub ❓)
312
- *
313
- * Event handling uses delegation — no per-widget listeners.
314
- * Data attributes on the container enable CodeMirrorRenderer to handle
315
- * clicks and hovers via a single set of delegated handlers.
316
- */
317
-
318
- /**
319
- * Reference Resolution Widget
320
- * Shows a small indicator next to references with hover preview.
321
- *
322
- * All event handling is delegated — the widget sets data attributes
323
- * and CodeMirrorRenderer handles events via container-level listeners.
324
- */
325
- declare class ReferenceResolutionWidget extends WidgetType {
326
- readonly annotation: Annotation;
327
- readonly targetDocumentName?: string | undefined;
328
- readonly isGenerating?: boolean | undefined;
329
- constructor(annotation: Annotation, targetDocumentName?: string | undefined, isGenerating?: boolean | undefined);
330
- eq(other: ReferenceResolutionWidget): boolean;
331
- toDOM(): HTMLSpanElement;
332
- ignoreEvent(event: Event): boolean;
333
- }
334
- /**
335
- * Show a tooltip preview on a widget container.
336
- * Called from delegated mouseenter handler in CodeMirrorRenderer.
337
- */
338
- declare function showWidgetPreview(container: HTMLElement, documentName: string): void;
339
- /**
340
- * Hide the tooltip preview from a widget container.
341
- * Called from delegated mouseleave handler in CodeMirrorRenderer.
342
- */
343
- declare function hideWidgetPreview(container: HTMLElement): void;
344
-
345
- type SelectionMotivation = 'linking' | 'highlighting' | 'assessing' | 'commenting' | 'tagging';
346
- type ClickAction = 'detail' | 'follow' | 'jsonld' | 'deleting';
347
- type ShapeType = 'rectangle' | 'circle' | 'polygon';
348
- interface AnnotateToolbarProps {
349
- selectedMotivation: SelectionMotivation | null;
350
- selectedClick: ClickAction;
351
- showSelectionGroup?: boolean;
352
- showDeleteButton?: boolean;
353
- showShapeGroup?: boolean;
354
- selectedShape?: ShapeType;
355
- mediaType?: string | null;
356
- annotateMode: boolean;
357
- annotators: Record<string, Annotator>;
358
- }
359
- /**
360
- * Toolbar for annotation controls with mode, selection, click, and shape options
361
- *
362
- * @emits mark:selection-changed - Selection motivation changed. Payload: { motivation: SelectionMotivation | null }
363
- * @emits mark:click-changed - Click action mode changed. Payload: { action: ClickAction }
364
- * @emits mark:shape-changed - Drawing shape changed. Payload: { shape: ShapeType }
365
- * @emits mark:mode-toggled - View mode toggled between browse and annotate. Payload: undefined
366
- */
367
- declare function AnnotateToolbar({ selectedMotivation, selectedClick, showSelectionGroup, showDeleteButton, showShapeGroup, selectedShape, mediaType, annotateMode, annotators }: AnnotateToolbarProps): react_jsx_runtime.JSX.Element;
368
-
369
- /**
370
- * Media Type Shape Support
371
- *
372
- * Defines which annotation shapes are supported for each media type.
373
- * Shapes are tracked per selector type (FragmentSelector, SvgSelector).
374
- */
375
-
376
- /**
377
- * Selector types that support shape selection
378
- */
379
- type SelectorType = 'fragment' | 'svg' | 'text';
380
- /**
381
- * Get supported annotation shapes for a given media type
382
- *
383
- * PDF: Only rectangles (FragmentSelector with RFC 3778 viewrect)
384
- * Images: All shapes (SvgSelector supports rect, circle, polygon)
385
- *
386
- * @param mediaType - MIME type of the resource (e.g., 'application/pdf', 'image/png')
387
- * @returns Array of supported shape types for annotation
388
- */
389
- declare function getSupportedShapes(mediaType: string | undefined | null): ShapeType[];
390
- /**
391
- * Check if a shape type is supported for a given media type
392
- *
393
- * @param mediaType - MIME type of the resource
394
- * @param shape - Shape type to check
395
- * @returns true if the shape is supported for this media type
396
- */
397
- declare function isShapeSupported(mediaType: string | undefined | null, shape: ShapeType): boolean;
398
- /**
399
- * Get the selector type used for a given media type
400
- *
401
- * @param mediaType - MIME type of the resource
402
- * @returns Selector type (fragment, svg, or text)
403
- */
404
- declare function getSelectorType(mediaType: string | undefined | null): SelectorType;
405
- /**
406
- * Get the selected shape for a given selector type from localStorage
407
- *
408
- * @param selectorType - The selector type
409
- * @returns The selected shape, or default for that selector type
410
- */
411
- declare function getSelectedShapeForSelectorType(selectorType: SelectorType): ShapeType;
412
- /**
413
- * Save the selected shape for a given selector type to localStorage
414
- *
415
- * @param selectorType - The selector type
416
- * @param shape - The shape to save
417
- */
418
- declare function saveSelectedShapeForSelectorType(selectorType: SelectorType, shape: ShapeType): void;
419
-
420
- /**
421
- * Annotation overlay: decouples annotation highlighting from markdown rendering.
422
- *
423
- * Instead of weaving annotations into the markdown AST via remark/rehype plugins
424
- * (which forces O(ASTnodes × annotations) work on every render), this module:
425
- *
426
- * 1. Builds a source→rendered offset map once after the markdown DOM paints
427
- * 2. Resolves W3C TextPositionSelector offsets to DOM Ranges via binary search
428
- * 3. Wraps matched ranges with <span> elements carrying data-annotation-* attributes
429
- *
430
- * Markdown renders once (cached by React.memo). Annotation changes only touch
431
- * the overlay spans — no markdown re-parse, no AST walk.
432
- */
433
-
434
- interface OverlayAnnotation {
435
- id: string;
436
- exact: string;
437
- offset: number;
438
- length: number;
439
- type: string;
440
- source: string | null;
441
- }
442
- interface TextNodeEntry {
443
- node: Text;
444
- start: number;
445
- end: number;
446
- }
447
- /**
448
- * Build a map from markdown source offsets to rendered text offsets.
449
- * Character-by-character alignment: walks source and rendered text in parallel,
450
- * matching characters and skipping markdown syntax in the source.
451
- *
452
- * Complexity: O(sourceLength) — runs once per content change.
453
- */
454
- declare function buildSourceToRenderedMap(markdownSource: string, container: HTMLElement): Map<number, number>;
455
- /**
456
- * Build a sorted array of text nodes with cumulative rendered offsets
457
- * for efficient offset→node lookups via binary search.
458
- *
459
- * Complexity: O(textNodes) — runs once per overlay application.
460
- */
461
- declare function buildTextNodeIndex(container: HTMLElement): TextNodeEntry[];
462
- /**
463
- * Resolve annotations to DOM Ranges using the cached offset map.
464
- *
465
- * Complexity: O(annotations × log(textNodes)).
466
- */
467
- declare function resolveAnnotationRanges(annotations: OverlayAnnotation[], offsetMap: Map<number, number>, textNodeIndex: TextNodeEntry[]): Map<string, {
468
- range: Range;
469
- annotation: OverlayAnnotation;
470
- }>;
471
- /**
472
- * Wrap annotation Ranges with styled <span> elements.
473
- * Handles cross-element ranges by splitting into per-text-node segments.
474
- */
475
- declare function applyHighlights(ranges: Map<string, {
476
- range: Range;
477
- annotation: OverlayAnnotation;
478
- }>): void;
479
- /**
480
- * Remove all annotation highlight spans, restoring the original DOM.
481
- * Unwraps spans and merges adjacent text nodes.
482
- */
483
- declare function clearHighlights(container: HTMLElement): void;
484
- /**
485
- * Convert W3C Annotations to the simplified overlay format.
486
- * Extracts TextPositionSelector offsets and annotation type.
487
- */
488
- declare function toOverlayAnnotations(annotations: Annotation[]): OverlayAnnotation[];
489
-
490
- /**
491
- * Resource utilities
492
- * Shared helper functions for resource display and metadata
493
- */
494
- /**
495
- * Get icon emoji based on media type
496
- */
497
- declare function getResourceIcon(mediaType: string | undefined): string;
498
- /**
499
- * Check if a resource supports text-based AI detection features
500
- *
501
- * Currently returns true for any text/* media type.
502
- * Future enhancements may include:
503
- * - Checking resource language/locale compatibility
504
- * - Validating content size limits
505
- * - Checking for specific text format requirements
506
- *
507
- * @param mediaType - The media type string (e.g., 'text/plain', 'text/markdown')
508
- * @returns true if the resource supports AI detection features
509
- */
510
- declare function supportsDetection(mediaType: string | undefined): boolean;
511
-
512
- /**
513
- * Frontend-specific validation utilities
514
- *
515
- * Browser and Next.js specific validation with security checks.
516
- * For generic validation utilities, see @semiont/api-client/utils/validation
517
- */
518
-
519
- /**
520
- * Image URL validation with security checks (browser-specific)
521
- *
522
- * Validates image URLs for use in browser environments with XSS prevention.
523
- * Only allows HTTPS for external images, blocks suspicious patterns.
524
- */
525
- declare const ImageURLSchema: {
526
- parse(url: unknown): string;
527
- safeParse(url: unknown): ValidationResult<string>;
528
- };
529
- /**
530
- * OAuth user validation (Next.js NextAuth specific)
531
- *
532
- * Validates user objects returned from OAuth providers.
533
- * Includes domain validation for access control.
534
- */
535
- interface OAuthUser {
536
- id: string;
537
- email: string;
538
- name?: string | null;
539
- image?: string | null;
540
- domain: string;
541
- isAdmin: boolean;
542
- isModerator: boolean;
543
- }
544
- declare const OAuthUserSchema: {
545
- parse(data: unknown): OAuthUser;
546
- safeParse(data: unknown): ValidationResult<OAuthUser>;
547
- };
548
- /**
549
- * URL sanitization for images (browser-specific security)
550
- *
551
- * Sanitizes image URLs by validating and reconstructing with only safe parts.
552
- * Returns null if validation fails.
553
- *
554
- * @param url - Image URL to sanitize
555
- * @returns Sanitized URL or null if invalid
556
- */
557
- declare function sanitizeImageURL(url: string): string | null;
558
-
559
- declare function useStateUnit<T extends StateUnit>(factory: () => T): T;
560
-
561
- /**
562
- * Creates a debounced version of a callback function
563
- *
564
- * @param callback - The function to debounce
565
- * @param delay - Debounce delay in milliseconds
566
- * @returns Debounced function
567
- *
568
- * @example
569
- * const debouncedSearch = useDebouncedCallback(
570
- * (query) => performSearch(query),
571
- * 500
572
- * );
573
- */
574
- declare function useDebouncedCallback<T extends (...args: any[]) => any>(callback: T, delay: number): (...args: Parameters<T>) => void;
575
- /**
576
- * useDebounce Hook
577
- *
578
- * Custom hook for debouncing values (e.g., search input).
579
- * Returns a debounced value that updates after the specified delay.
580
- *
581
- * @param value - The value to debounce
582
- * @param delay - Debounce delay in milliseconds
583
- * @returns Debounced value
584
- *
585
- * @example
586
- * const debouncedQuery = useDebounce(searchQuery, 500);
587
- */
588
- declare function useDebounce<T>(value: T, delay: number): T;
589
-
590
- declare function formatTime(milliseconds: number | null): string | null;
591
-
592
- interface KeyboardShortcut {
593
- key: string;
594
- ctrlOrCmd?: boolean;
595
- shift?: boolean;
596
- alt?: boolean;
597
- handler: (event: KeyboardEvent) => void;
598
- description?: string;
599
- enabled?: boolean;
600
- }
601
- /**
602
- * Hook for managing keyboard shortcuts
603
- * Handles platform differences (Cmd on Mac, Ctrl on Windows/Linux)
604
- * Prevents conflicts with browser shortcuts
605
- */
606
- declare function useKeyboardShortcuts(shortcuts: KeyboardShortcut[]): void;
607
- /**
608
- * Hook for double key press detection (e.g., double Escape)
609
- */
610
- declare function useDoubleKeyPress(key: string, handler: () => void, timeout?: number): void;
611
- /**
612
- * Get keyboard shortcut display text based on platform
613
- */
614
- declare function getShortcutDisplay(shortcut: KeyboardShortcut): string;
615
- /**
616
- * Hook to check if user is currently typing in an input field
617
- * Keyboard shortcuts should generally be disabled when typing
618
- */
619
- declare function useIsTyping(): boolean;
620
-
621
- /**
622
- * Hook to manage line numbers display setting with localStorage persistence
623
- */
624
- declare function useLineNumbers(): {
625
- showLineNumbers: boolean;
626
- toggleLineNumbers: () => void;
627
- };
628
-
629
- /**
630
- * Hook to manage hover delay setting with localStorage persistence
631
- */
632
- declare function useHoverDelay(): {
633
- hoverDelayMs: number;
634
- setHoverDelayMs: (delayMs: number) => void;
635
- };
636
-
637
- /**
638
- * Generic router interface - works with any router that has push/replace methods
639
- * (Next.js App Router, Next.js Pages Router, React Router, etc.)
640
- */
641
- interface Router {
642
- push: (path: string) => void;
643
- replace?: (path: string) => void;
644
- [key: string]: any;
645
- }
646
- /**
647
- * Hook that wraps any router with event emission for observability
648
- *
649
- * Use this to wrap your router (Next.js, React Router, etc.) when you want
650
- * navigation actions to be observable through the NavigationEventBus.
651
- *
652
- * @emits nav:push - Router navigation requested. Payload: { path: string, reason?: string }
653
- *
654
- * @example
655
- * ```typescript
656
- * // Next.js App Router
657
- * import { useRouter } from 'next/navigation';
658
- * const nextRouter = useRouter();
659
- * const router = useObservableRouter(nextRouter);
660
- * router.push('/know/discover', { reason: 'resource-closed' });
661
- *
662
- * // React Router
663
- * import { useNavigate } from 'react-router-dom';
664
- * const navigate = useNavigate();
665
- * const router = useObservableRouter({ push: navigate });
666
- * router.push('/know/discover', { reason: 'resource-closed' });
667
- * ```
668
- */
669
- declare function useObservableRouter<T extends Router>(baseRouter: T): T;
670
- /**
671
- * Request navigation with event emission
672
- *
673
- * This hook emits a navigation request event. The app must subscribe to
674
- * 'nav:external' and perform the actual navigation using
675
- * its router (Next.js, React Router, etc.) to enable client-side routing.
676
- *
677
- * If no subscriber handles the event, falls back to window.location.href
678
- * after a brief delay to allow for event handling.
679
- *
680
- * @emits nav:external - External navigation requested. Payload: { url: string, resourceId?: string, cancelFallback: () => void }
681
- *
682
- * The payload includes a `cancelFallback` function that subscribers must call to
683
- * prevent the window.location fallback from firing. Subscribers that handle the
684
- * navigation (e.g. via client-side routing) should always call cancelFallback().
685
- *
686
- * @example
687
- * ```typescript
688
- * // In component (react-ui package)
689
- * const navigate = useObservableExternalNavigation();
690
- * navigate('/know/resource/123', { resourceId: '123' });
691
- *
692
- * // In app (frontend package) - subscribe, cancel fallback, and handle with Next.js router
693
- * const router = useRouter();
694
- * useEventSubscriptions({
695
- * 'nav:external': ({ url, cancelFallback }) => {
696
- * cancelFallback(); // Prevent window.location fallback
697
- * router.push(url); // Client-side navigation
698
- * },
699
- * });
700
- * ```
701
- */
702
- declare function useObservableExternalNavigation(): (url: string, metadata?: {
703
- resourceId?: string;
704
- }) => void;
705
-
706
- interface UsePanelWidthOptions {
707
- defaultWidth?: number;
708
- minWidth?: number;
709
- maxWidth?: number;
710
- storageKey?: string;
711
- }
712
- /**
713
- * Custom hook for managing resizable panel width with localStorage persistence
714
- *
715
- * @param options Configuration options for panel width behavior
716
- * @param options.defaultWidth Default width in pixels (default: 384px / 24rem)
717
- * @param options.minWidth Minimum allowed width in pixels (default: 256px / 16rem)
718
- * @param options.maxWidth Maximum allowed width in pixels (default: 800px / 50rem)
719
- * @param options.storageKey localStorage key for persistence (default: 'semiont-panel-width')
720
- *
721
- * @returns Object containing current width, setter function, and constraints
722
- *
723
- * @example
724
- * ```tsx
725
- * const { width, setWidth, minWidth, maxWidth } = usePanelWidth();
726
- *
727
- * <div style={{ width: `${width}px` }}>
728
- * <ResizeHandle onResize={setWidth} minWidth={minWidth} maxWidth={maxWidth} />
729
- * </div>
730
- * ```
731
- */
732
- declare function usePanelWidth({ defaultWidth, // 24rem
733
- minWidth, // 16rem
734
- maxWidth, // 50rem
735
- storageKey }?: UsePanelWidthOptions): {
736
- width: number;
737
- setWidth: (newWidth: number) => void;
738
- minWidth: number;
739
- maxWidth: number;
740
- };
741
-
742
- interface UseRovingTabIndexOptions {
743
- orientation?: 'horizontal' | 'vertical' | 'grid';
744
- loop?: boolean;
745
- cols?: number;
746
- }
747
- declare function useRovingTabIndex<T extends HTMLElement>(itemCount: number, options?: UseRovingTabIndexOptions): {
748
- containerRef: React$1.RefObject<T | null>;
749
- handleKeyDown: (event: KeyboardEvent$1) => void;
750
- focusItem: (index: number) => void;
751
- };
752
-
753
- /**
754
- * Tracks the time remaining on the active KB session's JWT and whether it's
755
- * expiring soon (< 5 minutes). Reads the session's `expiresAt` getter (which
756
- * derives from the current `token$` value) and re-derives once per second.
757
- */
758
- declare function useSessionExpiry(): {
759
- timeRemaining: number | null;
760
- isExpiringSoon: boolean;
761
- };
762
-
763
- type Theme = 'light' | 'dark' | 'system';
764
- type ResolvedTheme = 'light' | 'dark';
765
- interface ThemeContextValue {
766
- theme: Theme;
767
- setTheme: (theme: Theme) => void;
768
- resolvedTheme: ResolvedTheme;
769
- systemTheme: ResolvedTheme;
770
- }
771
- declare function ThemeProvider({ children }: {
772
- children: ReactNode;
773
- }): react_jsx_runtime.JSX.Element;
774
- declare function useTheme(): ThemeContextValue;
775
-
776
- /**
777
- * Hook for managing dropdown/menu visibility with click outside handling
778
- */
779
- declare function useDropdown(): {
780
- isOpen: boolean;
781
- toggle: () => void;
782
- open: () => void;
783
- close: () => void;
784
- dropdownRef: React$1.RefObject<HTMLDivElement | null>;
785
- };
786
- /**
787
- * Hook for managing loading states with minimum display time
788
- */
789
- declare function useLoadingState(minLoadingTime?: number): {
790
- isLoading: boolean;
791
- showLoading: boolean;
792
- startLoading: () => void;
793
- stopLoading: () => void;
794
- };
795
- /**
796
- * Hook for local storage with SSR safety
797
- */
798
- declare function useLocalStorage<T>(key: string, initialValue: T): [T, (value: T | ((val: T) => T)) => void];
799
-
800
- interface UseResourceContentResult {
801
- content: string;
802
- loading: boolean;
803
- }
804
- declare function useResourceContent(rUri: ResourceId, resource: ResourceDescriptor, enabled?: boolean): UseResourceContentResult;
805
-
806
- interface SemiontProviderProps {
807
- /** Inject a fully-constructed browser (tests, embedded hosts that build their own). Omit to use the default. */
808
- browser?: SemiontBrowser;
809
- /** Override the default `WebBrowserStorage`. Useful for non-browser hosts (Electron/Tauri filesystem-backed adapters). */
810
- storage?: SessionStorage;
811
- /** Override the default HTTP session factory. Useful for in-process or future non-HTTP transports. */
812
- sessionFactory?: SessionFactory;
813
- children: ReactNode;
814
- }
815
- declare function SemiontProvider({ browser, storage, sessionFactory, children }: SemiontProviderProps): react_jsx_runtime.JSX.Element;
816
- declare function useSemiont(): SemiontBrowser;
817
-
818
- /**
819
- * WebBrowserStorage — browser-backed `SessionStorage` implementation.
820
- * Wraps `localStorage` for reads/writes and `window`'s `storage` event
821
- * for cross-tab change notifications.
822
- *
823
- * Construction requires a browser context. The guard matches the
824
- * existing registry behavior: server rendering that accidentally
825
- * instantiates this gets a loud error rather than a silent no-op
826
- * that would mask token leaks.
827
- */
828
-
829
- declare class WebBrowserStorage implements SessionStorage {
830
- constructor();
831
- get(key: string): string | null;
832
- set(key: string, value: string): void;
833
- delete(key: string): void;
834
- subscribe(handler: (key: string, newValue: string | null) => void): () => void;
835
- }
836
-
837
- interface AnnotationProviderProps {
838
- annotationManager: AnnotationManager;
839
- children: React__default.ReactNode;
840
- }
841
- /**
842
- * Annotation Provider
843
- *
844
- * Provides annotation mutation capabilities (create, delete) via the Provider Pattern.
845
- * Apps inject their own AnnotationManager implementation.
846
- *
847
- * Example usage:
848
- * ```typescript
849
- * function useAnnotationManager(client: SemiontClient): AnnotationManager {
850
- * return {
851
- * markAnnotation: async (params) => {
852
- * const result = await client.mark.annotation({
853
- * motivation: params.motivation,
854
- * target: { source: params.rUri, selector: params.selector },
855
- * body: params.body,
856
- * });
857
- * return result.annotation;
858
- * },
859
- * deleteAnnotation: async (params) => {
860
- * await client.mark.delete(params.rUri, params.annotationId);
861
- * }
862
- * };
863
- * }
864
- *
865
- * // In app layout
866
- * const annotationManager = useAnnotationManager();
867
- * <AnnotationProvider annotationManager={annotationManager}>
868
- * <YourComponents />
869
- * </AnnotationProvider>
870
- * ```
871
- */
872
- declare function AnnotationProvider({ annotationManager, children }: AnnotationProviderProps): react_jsx_runtime.JSX.Element;
873
- /**
874
- * Hook to access the AnnotationManager
875
- *
876
- * @throws Error if used outside AnnotationProvider
877
- * @returns AnnotationManager instance
878
- */
879
- declare function useAnnotationManager(): AnnotationManager;
880
-
881
- /**
882
- * Subscribe to a bus event with automatic cleanup.
883
- *
884
- * Two buses exist: the app-scoped bus on `SemiontBrowser` (panel, shell,
885
- * tabs, nav, settings — events that must work without a KB session) and
886
- * the per-session bus on `SemiontClient` (mark, beckon, gather,
887
- * match, bind, yield, browse — events tied to a live KB). This hook
888
- * subscribes to BOTH so components don't need to know which scope a
889
- * channel is on. Each channel only fires on one bus, so there's no
890
- * double-delivery.
891
- *
892
- * Stable-handler pattern: the ref-wrapped handler means `handler` itself
893
- * can change on every render without causing a re-subscription.
894
- *
895
- * @example
896
- * ```tsx
897
- * useEventSubscription('mark:create-ok', ({ annotationId }) => {
898
- * triggerSparkleAnimation(annotationId);
899
- * });
900
- * ```
901
- */
902
- declare function useEventSubscription<K extends keyof EventMap>(eventName: K, handler: (payload: EventMap[K]) => void): void;
903
- /**
904
- * Subscribe to multiple bus events at once. Same semantics as
905
- * `useEventSubscription`, batched — each channel is subscribed on both
906
- * the app bus (`SemiontBrowser`) and the session bus
907
- * (`SemiontClient`, when a session is active).
908
- *
909
- * @example
910
- * ```tsx
911
- * useEventSubscriptions({
912
- * 'mark:create-ok': ({ annotationId }) => handleCreated(annotationId),
913
- * 'panel:toggle': ({ panel }) => console.log('toggled', panel),
914
- * });
915
- * ```
916
- */
917
- declare function useEventSubscriptions(subscriptions: {
918
- [K in keyof EventMap]?: (payload: EventMap[K]) => void;
919
- }): void;
920
-
921
- interface ResourceAnnotationsContextType {
922
- newAnnotationIds: Set<string>;
923
- markAnnotation: (rUri: ResourceId, motivation: 'highlighting' | 'linking' | 'assessing' | 'commenting' | 'tagging', selector: Selector | Selector[], body?: any[]) => Promise<string | undefined>;
924
- clearNewAnnotationId: (id: AnnotationId) => void;
925
- triggerSparkleAnimation: (annotationId: string) => void;
926
- }
927
- declare function ResourceAnnotationsProvider({ children }: {
928
- children: React__default.ReactNode;
929
- }): react_jsx_runtime.JSX.Element;
930
- declare function useResourceAnnotations(): ResourceAnnotationsContextType;
931
-
932
- /**
933
- * Standard Link component interface
934
- * Compatible with Next.js Link, React Router Link, etc.
935
- *
936
- * Components accept Link as a prop to remain framework-agnostic.
937
- * Apps provide their framework-specific Link component (Next.js, React Router, etc.)
938
- */
939
- interface LinkComponentProps {
940
- href: string;
941
- children: React__default.ReactNode;
942
- className?: string;
943
- title?: string;
944
- onClick?: (e: React__default.MouseEvent) => void;
945
- [key: string]: any;
946
- }
947
- /**
948
- * Route builder interface
949
- * Apps provide concrete implementations for their routing scheme
950
- *
951
- * Components accept routes as a prop to build URLs without framework dependencies.
952
- *
953
- * @example
954
- * ```tsx
955
- * // In app (e.g., frontend/src/lib/routing.ts)
956
- * export const routes: RouteBuilder = {
957
- * resourceDetail: (id) => `/know/resource/${id}`,
958
- * userProfile: (id) => `/users/${id}`,
959
- * search: (query) => `/search?q=${query}`,
960
- * home: () => '/',
961
- * };
962
- *
963
- * // Pass to components as props
964
- * <MyComponent Link={Link} routes={routes} />
965
- * ```
966
- */
967
- interface RouteBuilder {
968
- /** Resource detail page */
969
- resourceDetail: (id: string) => string;
970
- /** User profile page */
971
- userProfile: (id: string) => string;
972
- /** Search page with query */
973
- search: (query: string) => string;
974
- /** Home/root page */
975
- home: () => string;
976
- /** About page */
977
- about?: () => string;
978
- /** Privacy policy page */
979
- privacy?: () => string;
980
- /** Terms of service page */
981
- terms?: () => string;
982
- /** Knowledge base page */
983
- knowledge?: () => string;
984
- /** Moderation dashboard */
985
- moderate?: () => string;
986
- /** Admin dashboard */
987
- admin?: () => string;
988
- }
989
-
990
- declare const AVAILABLE_LOCALES: readonly ["ar", "bn", "cs", "da", "de", "el", "en", "es", "fa", "fi", "fr", "he", "hi", "id", "it", "ja", "ko", "ms", "nl", "no", "pl", "pt", "ro", "sv", "th", "tr", "uk", "vi", "zh"];
991
- type AvailableLocale = typeof AVAILABLE_LOCALES[number];
992
- interface TranslationProviderProps {
993
- /**
994
- * Option 1: Provide a complete TranslationManager implementation
995
- */
996
- translationManager?: TranslationManager;
997
- /**
998
- * Option 2: Use built-in translations by specifying a locale
999
- * When adding new locales, just add the JSON file and update AVAILABLE_LOCALES
1000
- */
1001
- locale?: string;
1002
- /**
1003
- * Loading component to show while translations are being loaded
1004
- * Only relevant when using dynamic locale loading
1005
- */
1006
- loadingComponent?: ReactNode;
1007
- children: ReactNode;
1008
- }
1009
- /**
1010
- * Provider for translation management with dynamic loading
1011
- *
1012
- * Three modes of operation:
1013
- * 1. No provider: Components use default English strings
1014
- * 2. With locale prop: Dynamically loads translations for that locale
1015
- * 3. With translationManager: Use custom translation implementation
1016
- */
1017
- declare function TranslationProvider({ translationManager, locale, loadingComponent, children, }: TranslationProviderProps): react_jsx_runtime.JSX.Element;
1018
- /**
1019
- * Hook to access translations within a namespace
1020
- *
1021
- * Works in three modes:
1022
- * 1. Without provider: Returns default English translations
1023
- * 2. With provider using locale: Returns dynamically loaded translations for that locale
1024
- * 3. With custom provider: Uses the custom translation manager
1025
- *
1026
- * @param namespace - Translation namespace (e.g., 'Toolbar', 'ResourceViewer')
1027
- * @returns Function to translate keys within the namespace
1028
- */
1029
- declare function useTranslations(namespace: string): (key: string, params?: Record<string, any>) => string;
1030
- /**
1031
- * Hook to preload translations for a locale
1032
- * Useful for preloading translations before navigation
1033
- */
1034
- declare function usePreloadTranslations(): {
1035
- preload: (locale: string) => Promise<boolean>;
1036
- isLoaded: (locale: string) => boolean;
1037
- };
1038
-
1039
- /**
1040
- * Pure logic extracted from CodeMirrorRenderer
1041
- *
1042
- * These functions have zero dependency on CodeMirror's DOM or React.
1043
- * They handle position conversion, tooltip generation, and decoration metadata.
1044
- */
1045
-
1046
- interface TextSegment {
1047
- exact: string;
1048
- annotation?: Annotation;
1049
- start: number;
1050
- end: number;
1051
- }
1052
-
1053
- interface Props$b {
1054
- content: string;
1055
- segments?: TextSegment[];
1056
- onTextSelect?: (exact: string, position: {
1057
- start: number;
1058
- end: number;
1059
- }) => void;
1060
- onChange?: (content: string) => void;
1061
- editable?: boolean;
1062
- newAnnotationIds?: Set<string>;
1063
- hoveredAnnotationId?: string | null;
1064
- scrollToAnnotationId?: string | null;
1065
- sourceView?: boolean;
1066
- showLineNumbers?: boolean;
1067
- enableWidgets?: boolean;
1068
- session?: SemiontSession | null | undefined;
1069
- getTargetResourceName?: (resourceId: string) => string | undefined;
1070
- generatingReferenceId?: string | null;
1071
- hoverDelayMs: number;
1072
- }
1073
- declare function CodeMirrorRenderer({ content, segments, onChange, editable, newAnnotationIds, hoveredAnnotationId, scrollToAnnotationId, sourceView, showLineNumbers, enableWidgets, session, getTargetResourceName, generatingReferenceId, hoverDelayMs }: Props$b): react_jsx_runtime.JSX.Element;
1074
-
1075
- type Motivation$6 = components['schemas']['Motivation'];
1076
- type JobProgress$7 = components['schemas']['JobProgress'];
1077
- interface AnnotateReferencesProgressWidgetProps {
1078
- progress: JobProgress$7 | null;
1079
- annotationType?: Motivation$6 | 'reference';
1080
- }
1081
- /**
1082
- * Widget for displaying reference annotation progress with cancel functionality
1083
- *
1084
- * @emits job:cancel-requested - User requested to cancel annotation job. Payload: { jobType: string }
1085
- */
1086
- declare function AnnotateReferencesProgressWidget({ progress, annotationType }: AnnotateReferencesProgressWidgetProps): react_jsx_runtime.JSX.Element | null;
1087
-
1088
- interface Props$a {
1089
- children: ReactNode;
1090
- fallback?: (error: Error, reset: () => void) => ReactNode;
1091
- onError?: (error: Error, errorInfo: ErrorInfo) => void;
1092
- }
1093
- interface State {
1094
- hasError: boolean;
1095
- error: Error | null;
1096
- errorInfo: ErrorInfo | null;
1097
- }
1098
- /**
1099
- * Generic Error Boundary component that catches JavaScript errors
1100
- * in child components and displays a fallback UI.
1101
- */
1102
- declare class ErrorBoundary extends Component<Props$a, State> {
1103
- constructor(props: Props$a);
1104
- static getDerivedStateFromError(error: Error): State;
1105
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
1106
- handleReset: () => void;
1107
- render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
1108
- }
1109
- /**
1110
- * Specialized error boundary for async components
1111
- */
1112
- declare function AsyncErrorBoundary({ children }: {
1113
- children: ReactNode;
1114
- }): react_jsx_runtime.JSX.Element;
1115
-
1116
- interface ProtectedErrorBoundaryProps {
1117
- children: React__default.ReactNode;
1118
- /**
1119
- * Values that, when any change, reset the boundary back to its non-error
1120
- * state. Apps typically pass `[location.pathname]` so navigating away from
1121
- * a crashed page automatically recovers.
1122
- */
1123
- resetKeys?: unknown[];
1124
- }
1125
- /**
1126
- * Error boundary for protected (authenticated) routes.
1127
- *
1128
- * Catches unexpected render-time crashes inside the protected tree and
1129
- * shows a generic "something went wrong" fallback with a refresh option.
1130
- *
1131
- * NOT auth-specific. Auth state changes (sign-in, sign-out, expiry) flow
1132
- * through the KnowledgeBaseSession context, not exceptions — so this
1133
- * boundary will never catch an "auth error" in normal operation. Its job
1134
- * is purely to keep a render bug from blanking the screen.
1135
- *
1136
- * The optional `resetKeys` prop lets callers wire automatic recovery on
1137
- * navigation (e.g. `resetKeys={[location.pathname]}`).
1138
- */
1139
- declare function ProtectedErrorBoundary({ children, resetKeys, }: ProtectedErrorBoundaryProps): react_jsx_runtime.JSX.Element;
1140
-
1141
- interface LiveRegionContextType {
1142
- announce: (message: string, priority?: 'polite' | 'assertive') => void;
1143
- }
1144
- declare function useLiveRegion(): LiveRegionContextType;
1145
- interface LiveRegionProviderProps {
1146
- children: React__default.ReactNode;
1147
- }
1148
- declare function LiveRegionProvider({ children }: LiveRegionProviderProps): react_jsx_runtime.JSX.Element;
1149
- declare function useSearchAnnouncements(): {
1150
- announceSearchResults: (count: number, query: string) => void;
1151
- announceSearching: () => void;
1152
- };
1153
- declare function useDocumentAnnouncements(annotators?: Record<string, Annotator>): {
1154
- announceDocumentSaved: () => void;
1155
- announceDocumentDeleted: () => void;
1156
- announceAnnotationCreated: (annotation: Annotation) => void;
1157
- announceAnnotationDeleted: () => void;
1158
- announceAnnotationUpdated: (annotation: Annotation) => void;
1159
- announceError: (message: string) => void;
1160
- };
1161
- declare function useResourceLoadingAnnouncements(): {
1162
- announceResourceLoading: (resourceName?: string) => void;
1163
- announceResourceLoaded: (resourceName: string) => void;
1164
- announceResourceLoadError: (resourceName?: string) => void;
1165
- announceResourceUpdating: (resourceName: string) => void;
1166
- };
1167
- declare function useFormAnnouncements(): {
1168
- announceFormSubmitting: () => void;
1169
- announceFormSuccess: (message?: string) => void;
1170
- announceFormError: (message?: string) => void;
1171
- announceFormValidationError: (fieldCount: number) => void;
1172
- };
1173
- declare function useLanguageChangeAnnouncements(): {
1174
- announceLanguageChanging: (newLanguage: string) => void;
1175
- announceLanguageChanged: (newLanguage: string) => void;
1176
- };
1177
-
1178
- interface ResizeHandleProps {
1179
- /** Callback fired when resize occurs */
1180
- onResize: (newWidth: number) => void;
1181
- /** Minimum allowed width in pixels */
1182
- minWidth: number;
1183
- /** Maximum allowed width in pixels */
1184
- maxWidth: number;
1185
- /** Position of handle - left or right edge */
1186
- position?: 'left' | 'right';
1187
- /** Aria label for accessibility */
1188
- ariaLabel?: string;
1189
- }
1190
- /**
1191
- * Draggable resize handle for panels and sidebars
1192
- *
1193
- * Features:
1194
- * - Mouse drag to resize
1195
- * - Keyboard navigation (Arrow keys: ±10px, Shift+Arrow: ±50px)
1196
- * - Enforces min/max constraints
1197
- * - Visual feedback on hover and drag
1198
- * - Accessible (WCAG compliant)
1199
- *
1200
- * @example
1201
- * ```tsx
1202
- * <div className="panel" style={{ width: `${width}px` }}>
1203
- * <ResizeHandle
1204
- * onResize={setWidth}
1205
- * minWidth={256}
1206
- * maxWidth={800}
1207
- * position="left"
1208
- * />
1209
- * <div>Panel content</div>
1210
- * </div>
1211
- * ```
1212
- */
1213
- declare function ResizeHandle({ onResize, minWidth, maxWidth, position, ariaLabel }: ResizeHandleProps): react_jsx_runtime.JSX.Element;
1214
-
1215
- interface ResourceTagsInlineProps {
1216
- resourceId: string;
1217
- tags: string[];
1218
- isEditing: boolean;
1219
- onUpdate: (tags: string[]) => Promise<void>;
1220
- disabled?: boolean;
1221
- }
1222
- declare function ResourceTagsInline({ tags }: ResourceTagsInlineProps): react_jsx_runtime.JSX.Element | null;
1223
-
1224
- type ToastType = 'success' | 'error' | 'info' | 'warning';
1225
- interface ToastMessage {
1226
- id: string;
1227
- message: string;
1228
- type: ToastType;
1229
- duration?: number;
1230
- }
1231
- interface ToastContainerProps {
1232
- toasts: ToastMessage[];
1233
- onClose: (id: string) => void;
1234
- }
1235
- declare function ToastContainer({ toasts, onClose }: ToastContainerProps): React__default.ReactPortal | null;
1236
- interface ToastContextType {
1237
- showToast: (message: string, type?: ToastType, duration?: number) => void;
1238
- showSuccess: (message: string, duration?: number) => void;
1239
- showError: (message: string, duration?: number) => void;
1240
- showWarning: (message: string, duration?: number) => void;
1241
- showInfo: (message: string, duration?: number) => void;
1242
- }
1243
- declare function ToastProvider({ children }: {
1244
- children: React__default.ReactNode;
1245
- }): react_jsx_runtime.JSX.Element;
1246
- declare function useToast(): ToastContextType;
1247
-
1248
- type ToolbarContext = 'document' | 'simple';
1249
- interface Props$9<T extends string = string> {
1250
- context: ToolbarContext;
1251
- activePanel: T | null;
1252
- isArchived?: boolean;
1253
- }
1254
- /**
1255
- * Toolbar component for panel navigation
1256
- *
1257
- * @emits panel:toggle - Toggle panel visibility. Payload: { panel: string }
1258
- */
1259
- declare function Toolbar<T extends string = string>({ context, activePanel, isArchived }: Props$9<T>): react_jsx_runtime.JSX.Element;
1260
-
1261
- interface SettingsPanelProps {
1262
- showLineNumbers: boolean;
1263
- theme: 'light' | 'dark' | 'system';
1264
- locale: string;
1265
- isPendingLocaleChange?: boolean;
1266
- hoverDelayMs: number;
1267
- }
1268
- /**
1269
- * Settings panel for application preferences
1270
- *
1271
- * @emits settings:locale-changed - Locale changed by user. Payload: { locale: string }
1272
- * @emits settings:line-numbers-toggled - Line numbers toggled on/off. Payload: undefined
1273
- * @emits settings:theme-changed - Theme changed by user. Payload: { theme: 'light' | 'dark' | 'system' }
1274
- * @emits settings:hover-delay-changed - Hover delay changed by user. Payload: { hoverDelayMs: number }
1275
- */
1276
- declare function SettingsPanel({ showLineNumbers, theme, locale, isPendingLocaleChange, hoverDelayMs }: SettingsPanelProps): react_jsx_runtime.JSX.Element;
1277
-
1278
- interface JsonLdViewProps {
1279
- annotation: Annotation;
1280
- onBack: () => void;
1281
- }
1282
- declare function JsonLdView({ annotation, onBack }: JsonLdViewProps): react_jsx_runtime.JSX.Element;
1283
-
1284
- interface SelectedTextDisplayProps {
1285
- exact: string;
1286
- }
1287
- declare function SelectedTextDisplay({ exact }: SelectedTextDisplayProps): react_jsx_runtime.JSX.Element;
1288
- interface EntityTypeBadgesProps {
1289
- entityTypes: string;
1290
- }
1291
- declare function EntityTypeBadges({ entityTypes }: EntityTypeBadgesProps): react_jsx_runtime.JSX.Element | null;
1292
- interface PopupHeaderProps {
1293
- title: string;
1294
- selectedText?: string;
1295
- onClose: () => void;
1296
- }
1297
- declare function PopupHeader({ title, selectedText, onClose }: PopupHeaderProps): react_jsx_runtime.JSX.Element;
1298
- interface PopupContainerProps {
1299
- children: React__default.ReactNode;
1300
- position: {
1301
- x: number;
1302
- y: number;
1303
- };
1304
- onClose: () => void;
1305
- isOpen: boolean;
1306
- wide?: boolean;
1307
- }
1308
- declare function PopupContainer({ children, position, onClose, isOpen, wide }: PopupContainerProps): react_jsx_runtime.JSX.Element;
1309
-
1310
- interface AnnotationOverlayProps {
1311
- annotations: Annotation[];
1312
- imageWidth: number;
1313
- imageHeight: number;
1314
- displayWidth: number;
1315
- displayHeight: number;
1316
- session?: SemiontSession | null | undefined;
1317
- hoveredAnnotationId?: string | null;
1318
- selectedAnnotationId?: string | null;
1319
- hoverDelayMs: number;
1320
- }
1321
- /**
1322
- * Render annotation overlay - displays existing annotations as SVG shapes
1323
- *
1324
- * @emits beckon:hover - Annotation hovered or unhovered. Payload: { annotationId: string | null }
1325
- * @emits browse:click - Annotation clicked. Payload: { annotationId: string, motivation: Motivation }
1326
- */
1327
- declare function AnnotationOverlay({ annotations, imageWidth, imageHeight, displayWidth, displayHeight, session, hoveredAnnotationId, selectedAnnotationId, hoverDelayMs }: AnnotationOverlayProps): react_jsx_runtime.JSX.Element;
1328
-
1329
- type DrawingMode = 'rectangle' | 'polygon' | 'circle' | 'freeform' | null;
1330
- interface SvgDrawingCanvasProps {
1331
- imageUrl: string;
1332
- existingAnnotations?: Annotation[];
1333
- drawingMode: DrawingMode;
1334
- selectedMotivation?: SelectionMotivation | null;
1335
- session?: SemiontSession | null | undefined;
1336
- hoveredAnnotationId?: string | null;
1337
- selectedAnnotationId?: string | null;
1338
- hoverDelayMs?: number;
1339
- }
1340
- /**
1341
- * SVG-based drawing canvas for creating image annotations with shapes
1342
- *
1343
- * @emits browse:click - Annotation clicked on canvas. Payload: { annotationId: string, motivation: Motivation }
1344
- * @emits mark:requested - New annotation drawn on canvas. Payload: { selector: SvgSelector, motivation: SelectionMotivation }
1345
- */
1346
- declare function SvgDrawingCanvas({ imageUrl, existingAnnotations, drawingMode, selectedMotivation, session, hoveredAnnotationId, selectedAnnotationId }: SvgDrawingCanvasProps): react_jsx_runtime.JSX.Element;
1347
-
1348
- interface KeyboardShortcutsHelpModalProps {
1349
- isOpen: boolean;
1350
- onClose: () => void;
1351
- }
1352
- declare function KeyboardShortcutsHelpModal({ isOpen, onClose }: KeyboardShortcutsHelpModalProps): react_jsx_runtime.JSX.Element;
1353
-
1354
- /**
1355
- * Modal that surfaces when a 403 forbidden error is reported via
1356
- * the active session's `signals.notifyPermissionDenied(...)`.
1357
- *
1358
- * Reads `permissionDeniedAt$` and `permissionDeniedMessage$` from the
1359
- * active `SessionSignals`. The signals instance clears the
1360
- * flag when the user dismisses the modal. Modal state lives on
1361
- * signals (not the session itself) so headless sessions
1362
- * (workers/CLIs) don't carry dead observables.
1363
- */
1364
- declare function PermissionDeniedModal(): react_jsx_runtime.JSX.Element;
1365
-
1366
- /**
1367
- * Modal that surfaces when the active KB's session expires (a 401
1368
- * surfaced by the session's own JWT validation or by the host's
1369
- * error-routing path).
1370
- *
1371
- * Reads `sessionExpiredAt$` from the active `SessionSignals`.
1372
- * When the user dismisses the modal, the signals instance clears the
1373
- * flag. Modal state lives on signals (not the session itself) so
1374
- * headless sessions (workers/CLIs) don't carry dead observables.
1375
- */
1376
- declare function SessionExpiredModal(): react_jsx_runtime.JSX.Element;
1377
-
1378
- interface Props$8 {
1379
- content: string;
1380
- mimeType?: string;
1381
- resourceUri?: string;
1382
- annotations: AnnotationsCollection;
1383
- uiState: AnnotationUIState;
1384
- onUIStateChange?: (state: Partial<AnnotationUIState>) => void;
1385
- editable?: boolean;
1386
- enableWidgets?: boolean;
1387
- getTargetResourceName?: (resourceId: string) => string | undefined;
1388
- generatingReferenceId?: string | null;
1389
- showLineNumbers?: boolean;
1390
- hoverDelayMs?: number;
1391
- annotateMode: boolean;
1392
- }
1393
- /**
1394
- * View component for annotating resources with text selection and drawing
1395
- *
1396
- * @emits mark:requested - User requested to create annotation. Payload: { selector: Selector | Selector[], motivation: SelectionMotivation }
1397
- * @subscribes mark:selection-changed - Toolbar selection changed. Payload: { motivation: string | null }
1398
- * @subscribes mark:click-changed - Toolbar click action changed. Payload: { action: string }
1399
- * @subscribes mark:shape-changed - Toolbar shape changed. Payload: { shape: string }
1400
- * @subscribes beckon:hover - Annotation hovered. Payload: { annotationId: string | null }
1401
- */
1402
- declare function AnnotateView({ content, mimeType, resourceUri, annotations, uiState, onUIStateChange, enableWidgets, getTargetResourceName, generatingReferenceId, showLineNumbers, hoverDelayMs, annotateMode }: Props$8): react_jsx_runtime.JSX.Element;
1403
-
1404
- interface Props$7 {
1405
- rUri: ResourceId;
1406
- hoveredAnnotationId?: string | null;
1407
- onEventHover?: (annotationId: string | null) => void;
1408
- onEventClick?: (annotationId: string | null) => void;
1409
- Link: React__default.ComponentType<LinkComponentProps>;
1410
- routes: RouteBuilder;
1411
- }
1412
- declare function AnnotationHistory({ rUri, hoveredAnnotationId, onEventHover, onEventClick, Link, routes }: Props$7): react_jsx_runtime.JSX.Element | null;
1413
-
1414
- interface Props$6 {
1415
- content: string;
1416
- mimeType: string;
1417
- resourceUri: string;
1418
- annotations: AnnotationsCollection;
1419
- hoveredAnnotationId?: string | null;
1420
- selectedClick?: ClickAction;
1421
- annotateMode: boolean;
1422
- hoverDelayMs?: number;
1423
- }
1424
- /**
1425
- * View component for browsing annotated resources in read-only mode.
1426
- *
1427
- * Two-layer rendering:
1428
- * - Layer 1: Markdown renders once (MemoizedMarkdown, cached by content)
1429
- * - Layer 2: Annotation overlay applied via DOM Range API after paint
1430
- *
1431
- * @emits browse:click - User clicked on annotation. Payload: { annotationId: string, motivation: Motivation }
1432
- * @emits beckon:hover - User hovered over annotation. Payload: { annotationId: string | null }
1433
- *
1434
- * @subscribes beckon:hover - Highlight annotation on hover. Payload: { annotationId: string | null }
1435
- * @subscribes beckon:focus - Scroll to and highlight annotation. Payload: { annotationId: string }
1436
- */
1437
- declare const BrowseView: React$1.NamedExoticComponent<Props$6>;
1438
-
1439
- type TranslateFn$4 = (key: string, params?: Record<string, string | number>) => string;
1440
- interface Props$5 {
1441
- event: StoredEventLike;
1442
- annotations: any[];
1443
- allEvents: StoredEventLike[];
1444
- isRelated: boolean;
1445
- t: TranslateFn$4;
1446
- Link: React__default.ComponentType<LinkComponentProps>;
1447
- routes: RouteBuilder;
1448
- onEventRef?: (annotationId: string | null, element: HTMLElement | null) => void;
1449
- onEventClick?: (annotationId: string | null) => void;
1450
- onEventHover?: (annotationId: string | null) => void;
1451
- }
1452
- declare function HistoryEvent({ event, annotations, allEvents, isRelated, t, Link, routes, onEventRef, onEventClick, onEventHover }: Props$5): react_jsx_runtime.JSX.Element;
1453
-
1454
- /**
1455
- * ResourceViewer - Display and interact with resource content and annotations
1456
- *
1457
- * This component uses event-driven architecture for real-time updates:
1458
- * - Subscribes to make-meaning events (mark:added, mark:removed, mark:body-updated)
1459
- * - Automatically invalidates cache when annotations change
1460
- * - No manual refetch needed - events handle cache invalidation
1461
- *
1462
- * Requirements:
1463
- * - Must be wrapped in SemiontProvider (which owns the session's event bus)
1464
- * - Must be wrapped in CacheContext (provides cache manager)
1465
- *
1466
- * Event flow:
1467
- * make-meaning → EventLog → SSE → EventBus → ResourceViewer → Cache invalidation
1468
- *
1469
- * Phase 2 complete: Event-based cache invalidation replaces manual refetch
1470
- * Phase 3 complete: Fully event-driven - all user interactions use unified event bus
1471
- */
1472
- interface Props$4 {
1473
- resource: ResourceDescriptor & {
1474
- content: string;
1475
- };
1476
- annotations: AnnotationsCollection;
1477
- generatingReferenceId?: string | null;
1478
- showLineNumbers?: boolean;
1479
- hoverDelayMs?: number;
1480
- hoveredAnnotationId?: string | null;
1481
- }
1482
- /**
1483
- * @emits mark:delete - User requested to delete annotation. Payload: { annotationId: string }
1484
- * @emits panel:open - Request to open panel with annotation. Payload: { panel: string, scrollToAnnotationId?: string, motivation?: Motivation }
1485
- *
1486
- * @subscribes mark:mode-toggled - Toggles between browse and annotate mode. Payload: { mode: 'browse' | 'annotate' }
1487
- * @subscribes mark:added - New annotation was added. Payload: { annotation: Annotation }
1488
- * @subscribes mark:removed - Annotation was removed. Payload: { annotationId: string }
1489
- * @subscribes mark:body-updated - Annotation was updated. Payload: { annotation: Annotation }
1490
- * @subscribes mark:selection-changed - Text selection tool changed. Payload: { selection: boolean }
1491
- * @subscribes mark:click-changed - Click annotation tool changed. Payload: { click: 'detail' | 'scroll' | null }
1492
- * @subscribes mark:shape-changed - Drawing shape changed. Payload: { shape: string }
1493
- * @subscribes browse:click - User clicked on annotation. Payload: { annotationId: string }
1494
- */
1495
- declare function ResourceViewer({ resource, annotations, generatingReferenceId, showLineNumbers, hoverDelayMs, hoveredAnnotationId: hoveredAnnotationIdProp }: Props$4): react_jsx_runtime.JSX.Element;
1496
-
1497
- interface AssessmentEntryProps {
1498
- assessment: Annotation;
1499
- isFocused: boolean;
1500
- isHovered?: boolean;
1501
- ref?: Ref<HTMLDivElement>;
1502
- }
1503
- declare function AssessmentEntry({ assessment, isFocused, isHovered, ref, }: AssessmentEntryProps): react_jsx_runtime.JSX.Element;
1504
-
1505
- type Motivation$5 = components['schemas']['Motivation'];
1506
- type JobProgress$6 = components['schemas']['JobProgress'];
1507
- interface PendingAnnotation$5 {
1508
- selector: Selector | Selector[];
1509
- motivation: Motivation$5;
1510
- }
1511
- interface AssessmentPanelProps {
1512
- annotations: Annotation[];
1513
- pendingAnnotation: PendingAnnotation$5 | null;
1514
- isAssisting?: boolean;
1515
- progress?: JobProgress$6 | null;
1516
- locale?: string;
1517
- /** BCP-47 tag of the resource being analyzed — forwarded to the assist call. */
1518
- sourceLanguage?: string;
1519
- annotateMode?: boolean;
1520
- scrollToAnnotationId?: string | null;
1521
- onScrollCompleted?: () => void;
1522
- hoveredAnnotationId?: string | null;
1523
- }
1524
- /**
1525
- * Panel for managing assessment annotations with text input
1526
- *
1527
- * @emits mark:create - Create new assessment annotation. Payload: { motivation: 'assessing', selector: Selector | Selector[], body: Body[] }
1528
- * @emits mark:cancel-pending - Cancel pending assessment annotation. Payload: undefined
1529
- * @subscribes browse:click - Annotation clicked. Payload: { annotationId: string }
1530
- */
1531
- declare function AssessmentPanel({ annotations, pendingAnnotation, isAssisting, progress, locale, sourceLanguage, annotateMode, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId, }: AssessmentPanelProps): react_jsx_runtime.JSX.Element;
1532
-
1533
- interface Props$3 {
1534
- /**
1535
- * Connection state from `client.actor.state$`. See
1536
- * `packages/api-client/src/state/domain/actor-state-unit.ts`.
1537
- *
1538
- * UI mapping:
1539
- * `open` | `reconnecting` | `initial` | `connecting`
1540
- * → treated as "healthy" (green dot, "Live" label, event count visible).
1541
- * `reconnecting` is specifically INCLUDED in healthy because a
1542
- * brief reconnect (mount churn, channel-set change, quick blip)
1543
- * shouldn't alarm the user. The 100 ms reconnect debounce and
1544
- * sub-second fetch retry make `reconnecting` a transient state.
1545
- * `degraded` | `closed`
1546
- * → treated as "disconnected" (red dot, "Disconnected" label).
1547
- * `degraded` is the 3 s threshold at which the state machine
1548
- * decides the disconnect is sustained; this is the UI-banner
1549
- * trigger the plan was designed around.
1550
- */
1551
- state: ConnectionState;
1552
- eventCount: number;
1553
- lastEventTimestamp?: string;
1554
- knowledgeBaseName?: string;
1555
- }
1556
- declare function CollaborationPanel({ state, eventCount, lastEventTimestamp, knowledgeBaseName }: Props$3): react_jsx_runtime.JSX.Element;
1557
-
1558
- interface CommentEntryProps {
1559
- comment: Annotation;
1560
- isFocused: boolean;
1561
- isHovered?: boolean;
1562
- annotateMode?: boolean;
1563
- ref?: Ref<HTMLDivElement>;
1564
- }
1565
- declare function CommentEntry({ comment, isFocused, isHovered, annotateMode, ref, }: CommentEntryProps): react_jsx_runtime.JSX.Element;
1566
-
1567
- type Motivation$4 = components['schemas']['Motivation'];
1568
- type JobProgress$5 = components['schemas']['JobProgress'];
1569
- interface PendingAnnotation$4 {
1570
- selector: Selector | Selector[];
1571
- motivation: Motivation$4;
1572
- }
1573
- interface CommentsPanelProps {
1574
- annotations: Annotation[];
1575
- pendingAnnotation: PendingAnnotation$4 | null;
1576
- annotateMode?: boolean;
1577
- isAssisting?: boolean;
1578
- progress?: JobProgress$5 | null;
1579
- locale?: string;
1580
- /** BCP-47 tag of the resource being analyzed — forwarded to the assist call. */
1581
- sourceLanguage?: string;
1582
- scrollToAnnotationId?: string | null;
1583
- onScrollCompleted?: () => void;
1584
- hoveredAnnotationId?: string | null;
1585
- }
1586
- /**
1587
- * Panel for managing comment annotations with text input
1588
- *
1589
- * @emits mark:create - Create new comment annotation. Payload: { motivation: 'commenting', selector: Selector | Selector[], body: Body[] }
1590
- * @emits mark:cancel-pending - Cancel pending comment annotation. Payload: undefined
1591
- * @subscribes browse:click - Annotation clicked. Payload: { annotationId: string }
1592
- */
1593
- declare function CommentsPanel({ annotations, pendingAnnotation, annotateMode, isAssisting, progress, locale, sourceLanguage, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId, }: CommentsPanelProps): react_jsx_runtime.JSX.Element;
1594
-
1595
- type JobProgress$4 = components['schemas']['JobProgress'];
1596
- interface AssistSectionProps {
1597
- annotationType: 'highlight' | 'assessment' | 'comment';
1598
- isAssisting: boolean;
1599
- /** User UI locale — written into the annotation body's `language` field for comment/assessment. */
1600
- locale?: string;
1601
- /** BCP-47 tag of the resource being analyzed. Forwarded to the prompt so the LLM analyzes non-English source correctly. */
1602
- sourceLanguage?: string;
1603
- progress?: JobProgress$4 | null | undefined;
1604
- }
1605
- /**
1606
- * Shared assist section for Highlight, Assessment, and Comment panels
1607
- *
1608
- * Provides:
1609
- * - Optional instructions textarea
1610
- * - Optional tone selector (for comments)
1611
- * - Assist button with sparkle animation
1612
- * - Progress display during annotation assist
1613
- *
1614
- * @emits mark:assist-request - Start assist for annotation type. Payload: { motivation: Motivation, options: { instructions?: string, tone?: string, density?: number } }
1615
- * @emits mark:progress-dismiss - Dismiss the annotation progress display
1616
- */
1617
- declare function AssistSection({ annotationType, isAssisting, locale, sourceLanguage, progress, }: AssistSectionProps): react_jsx_runtime.JSX.Element;
1618
-
1619
- interface HighlightEntryProps {
1620
- highlight: Annotation;
1621
- isFocused: boolean;
1622
- isHovered?: boolean;
1623
- ref?: Ref<HTMLDivElement>;
1624
- }
1625
- declare function HighlightEntry({ highlight, isFocused, isHovered, ref, }: HighlightEntryProps): react_jsx_runtime.JSX.Element;
1626
-
1627
- type Motivation$3 = components['schemas']['Motivation'];
1628
- type JobProgress$3 = components['schemas']['JobProgress'];
1629
- interface PendingAnnotation$3 {
1630
- selector: Selector | Selector[];
1631
- motivation: Motivation$3;
1632
- }
1633
- interface HighlightPanelProps {
1634
- annotations: Annotation[];
1635
- pendingAnnotation: PendingAnnotation$3 | null;
1636
- isAssisting?: boolean;
1637
- progress?: JobProgress$3 | null;
1638
- annotateMode?: boolean;
1639
- scrollToAnnotationId?: string | null;
1640
- onScrollCompleted?: () => void;
1641
- hoveredAnnotationId?: string | null;
1642
- /** BCP-47 tag of the resource being analyzed — forwarded to the assist call so the LLM analyzes non-English source correctly. */
1643
- sourceLanguage?: string;
1644
- }
1645
- /**
1646
- * Panel for managing highlight annotations with auto-creation
1647
- *
1648
- * @emits mark:create - Create new highlight annotation (auto-triggered). Payload: { motivation: 'highlighting', selector: Selector | Selector[], body: Body[] }
1649
- * @subscribes browse:click - Annotation clicked. Payload: { annotationId: string }
1650
- */
1651
- declare function HighlightPanel({ annotations, pendingAnnotation, isAssisting, progress, annotateMode, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId, sourceLanguage, }: HighlightPanelProps): react_jsx_runtime.JSX.Element;
1652
-
1653
- type SemiontResource$1 = components['schemas']['ResourceDescriptor'];
1654
- interface Props$2 {
1655
- resource: SemiontResource$1;
1656
- }
1657
- declare function JsonLdPanel({ resource: semiontResource }: Props$2): react_jsx_runtime.JSX.Element;
1658
-
1659
- interface PanelHeaderProps {
1660
- annotationType: 'highlight' | 'reference' | 'assessment' | 'comment' | 'tag';
1661
- count: number;
1662
- title: string;
1663
- }
1664
- /**
1665
- * Shared header for annotation panels
1666
- *
1667
- * Displays the annotation icon, translated title, and count in a consistent format
1668
- */
1669
- declare function PanelHeader({ count, title }: PanelHeaderProps): react_jsx_runtime.JSX.Element;
1670
-
1671
- interface ReferenceEntryProps {
1672
- reference: Annotation;
1673
- isFocused: boolean;
1674
- isHovered?: boolean;
1675
- routes: RouteBuilder;
1676
- annotateMode?: boolean;
1677
- isGenerating?: boolean;
1678
- ref?: Ref<HTMLDivElement>;
1679
- }
1680
- declare function ReferenceEntry({ reference, isFocused, isHovered, routes, annotateMode, isGenerating, ref, }: ReferenceEntryProps): react_jsx_runtime.JSX.Element;
1681
-
1682
- type JobProgress$2 = components['schemas']['JobProgress'];
1683
-
1684
- type Motivation$2 = components['schemas']['Motivation'];
1685
- type ReferencedBy = components['schemas']['GetReferencedByResponse']['referencedBy'][number];
1686
- interface PendingAnnotation$2 {
1687
- selector: Selector | Selector[];
1688
- motivation: Motivation$2;
1689
- }
1690
- interface Props$1 {
1691
- annotations?: Annotation[];
1692
- isAssisting: boolean;
1693
- progress: JobProgress$2 | null;
1694
- annotateMode?: boolean;
1695
- Link: React__default.ComponentType<LinkComponentProps>;
1696
- routes: RouteBuilder;
1697
- allEntityTypes: string[];
1698
- generatingReferenceId?: string | null;
1699
- referencedBy?: ReferencedBy[];
1700
- referencedByLoading?: boolean;
1701
- pendingAnnotation: PendingAnnotation$2 | null;
1702
- scrollToAnnotationId?: string | null;
1703
- onScrollCompleted?: () => void;
1704
- hoveredAnnotationId?: string | null;
1705
- /** User UI locale — stamped on the unresolved-reference body's `language` field. */
1706
- locale?: string;
1707
- /** BCP-47 tag of the resource being analyzed — fed into the prompt for source-aware analysis. */
1708
- sourceLanguage?: string;
1709
- }
1710
- /**
1711
- * Panel for managing reference annotations with entity type annotation
1712
- *
1713
- * @emits annotate:detect-request - Start reference annotation. Payload: { motivation: 'linking', options: { entityTypes: string[], includeDescriptiveReferences: boolean } }
1714
- * @emits mark:create - Create new reference annotation. Payload: { motivation: 'linking', selector: Selector | Selector[], body: Body[] }
1715
- * @emits mark:cancel-pending - Cancel pending reference annotation. Payload: undefined
1716
- * @subscribes browse:click - Annotation clicked. Payload: { annotationId: string }
1717
- */
1718
- declare function ReferencesPanel({ annotations, isAssisting, progress, annotateMode, Link, routes, allEntityTypes, generatingReferenceId, referencedBy, referencedByLoading, pendingAnnotation, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId, locale, sourceLanguage, }: Props$1): react_jsx_runtime.JSX.Element;
1719
-
1720
- type Agent = components['schemas']['Agent'];
1721
- interface Props {
1722
- resourceId: string;
1723
- documentEntityTypes: string[];
1724
- documentLocale?: string | undefined;
1725
- primaryMediaType?: string | undefined;
1726
- primaryByteSize?: number | undefined;
1727
- storageUri?: string | undefined;
1728
- isArchived?: boolean;
1729
- dateCreated?: string | undefined;
1730
- dateModified?: string | undefined;
1731
- creationMethod?: string | undefined;
1732
- wasAttributedTo?: Agent | Agent[] | undefined;
1733
- wasDerivedFrom?: string | string[] | undefined;
1734
- generator?: Agent | Agent[] | undefined;
1735
- }
1736
- /**
1737
- * Panel for displaying resource metadata and management actions
1738
- *
1739
- * @emits yield:clone - Clone this resource
1740
- * @emits mark:unarchive - Unarchive this resource
1741
- * @emits mark:archive - Archive this resource
1742
- */
1743
- declare function ResourceInfoPanel({ resourceId, documentEntityTypes, documentLocale, primaryMediaType, primaryByteSize, storageUri, isArchived, dateCreated, dateModified, creationMethod, wasAttributedTo, wasDerivedFrom, generator, }: Props): react_jsx_runtime.JSX.Element;
1744
-
1745
- interface StatisticsPanelProps {
1746
- highlights: Annotation[];
1747
- comments: Annotation[];
1748
- assessments: Annotation[];
1749
- references: Annotation[];
1750
- tags: Annotation[];
1751
- }
1752
- declare function StatisticsPanel({ highlights, comments, assessments, references, tags }: StatisticsPanelProps): react_jsx_runtime.JSX.Element;
1753
-
1754
- interface TagEntryProps {
1755
- tag: Annotation;
1756
- isFocused: boolean;
1757
- isHovered?: boolean;
1758
- ref?: Ref<HTMLDivElement>;
1759
- }
1760
- declare function TagEntry({ tag, isFocused, isHovered, ref, }: TagEntryProps): react_jsx_runtime.JSX.Element;
1761
-
1762
- type Motivation$1 = components['schemas']['Motivation'];
1763
- type JobProgress$1 = components['schemas']['JobProgress'];
1764
- interface PendingAnnotation$1 {
1765
- selector: Selector | Selector[];
1766
- motivation: Motivation$1;
1767
- }
1768
- interface TaggingPanelProps {
1769
- annotations: Annotation[];
1770
- annotateMode?: boolean;
1771
- isAssisting?: boolean;
1772
- progress?: JobProgress$1 | null;
1773
- pendingAnnotation: PendingAnnotation$1 | null;
1774
- scrollToAnnotationId?: string | null;
1775
- onScrollCompleted?: () => void;
1776
- hoveredAnnotationId?: string | null;
1777
- /** User UI locale — stamped on the tagging body's `language` field. */
1778
- locale?: string;
1779
- /** BCP-47 tag of the resource being analyzed — fed into the prompt for source-aware analysis. */
1780
- sourceLanguage?: string;
1781
- }
1782
- /**
1783
- * Panel for managing tag annotations with schema-based annotation
1784
- *
1785
- * @emits annotate:detect-request - Start tag annotation. Payload: { motivation: 'tagging', options: { schemaId: string, categories: string[] } }
1786
- * @emits mark:cancel-pending - Cancel pending tag annotation. Payload: undefined
1787
- * @emits mark:create - Create new tag annotation. Payload: { motivation: 'tagging', selector: Selector | Selector[], body: Body[] }
1788
- * @subscribes browse:click - Annotation clicked. Payload: { annotationId: string }
1789
- */
1790
- declare function TaggingPanel({ annotations, annotateMode, isAssisting, progress, pendingAnnotation, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId, locale, sourceLanguage, }: TaggingPanelProps): react_jsx_runtime.JSX.Element;
1791
-
1792
- type JobProgress = components['schemas']['JobProgress'];
1793
-
1794
- type Motivation = components['schemas']['Motivation'];
1795
- type TabKey = 'statistics' | 'reference' | 'highlight' | 'assessment' | 'comment' | 'tag';
1796
- interface PendingAnnotation {
1797
- selector: Selector | Selector[];
1798
- motivation: Motivation;
1799
- }
1800
- /**
1801
- * Simplified UnifiedAnnotationsPanel using event-driven architecture
1802
- *
1803
- * Key simplifications:
1804
- * - Single annotations array (grouped internally by motivation)
1805
- * - Single focusedAnnotationId (motivation-agnostic)
1806
- * - Hover state managed via event bus (no props needed)
1807
- * - All operations managed via event bus (no callback props)
1808
- */
1809
- interface UnifiedAnnotationsPanelProps {
1810
- annotations: Annotation[];
1811
- annotators: Record<string, Annotator>;
1812
- annotateMode?: boolean;
1813
- assistingMotivation?: Motivation | null;
1814
- progress?: JobProgress | null;
1815
- pendingAnnotation: PendingAnnotation | null;
1816
- allEntityTypes?: string[];
1817
- generatingReferenceId?: string | null;
1818
- referencedBy?: any[];
1819
- referencedByLoading?: boolean;
1820
- resourceId?: string;
1821
- initialTab?: TabKey;
1822
- initialTabGeneration?: number;
1823
- scrollToAnnotationId?: string | null;
1824
- onScrollCompleted?: () => void;
1825
- hoveredAnnotationId?: string | null;
1826
- locale?: string;
1827
- /**
1828
- * BCP-47 tag of the resource being analyzed (source-resource locale).
1829
- * Independent from `locale` — a German user can analyze a French source
1830
- * and get German bodies back. Fed into detection prompts.
1831
- */
1832
- sourceLanguage?: string;
1833
- Link: React__default.ComponentType<LinkComponentProps>;
1834
- routes: RouteBuilder;
1835
- }
1836
- declare function UnifiedAnnotationsPanel(props: UnifiedAnnotationsPanelProps): react_jsx_runtime.JSX.Element;
1837
-
1838
- interface ImageViewerProps {
1839
- imageUrl: string;
1840
- mimeType: string;
1841
- alt?: string;
1842
- }
1843
- declare function ImageViewer({ imageUrl, alt }: ImageViewerProps): react_jsx_runtime.JSX.Element;
1844
-
1845
- type TranslateFn$3 = (key: string, params?: Record<string, any>) => string;
1846
- interface FooterProps {
1847
- Link: React__default.ComponentType<LinkComponentProps>;
1848
- routes: RouteBuilder;
1849
- t: TranslateFn$3;
1850
- CookiePreferences?: React__default.ComponentType<{
1851
- isOpen: boolean;
1852
- onClose: () => void;
1853
- }>;
1854
- onOpenKeyboardHelp?: () => void;
1855
- sourceCodeUrl?: string;
1856
- /** Show About, Privacy Policy, Terms of Service, Cookie Preferences links. False for desktop apps. */
1857
- showPolicyLinks?: boolean;
1858
- }
1859
- declare function Footer({ Link, routes, t, CookiePreferences, onOpenKeyboardHelp, sourceCodeUrl, showPolicyLinks, }: FooterProps): react_jsx_runtime.JSX.Element;
1860
-
1861
- type TranslateFn$2 = (key: string, params?: Record<string, any>) => string;
1862
- interface NavigationMenuProps {
1863
- Link: React__default.ComponentType<LinkComponentProps>;
1864
- routes: RouteBuilder;
1865
- t: TranslateFn$2;
1866
- isAdmin?: boolean;
1867
- isModerator?: boolean;
1868
- brandingLink?: string;
1869
- onItemClick?: () => void;
1870
- className?: string;
1871
- currentPath?: string;
1872
- }
1873
- declare function NavigationMenu({ Link, routes, t, isAdmin, isModerator, onItemClick, className, currentPath }: NavigationMenuProps): react_jsx_runtime.JSX.Element;
1874
-
1875
- /**
1876
- * Props for ObservableLink component
1877
- *
1878
- * Accepts any props that a standard anchor element accepts,
1879
- * plus optional navigation metadata for event emission.
1880
- */
1881
- interface ObservableLinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement> {
1882
- /** The URL to navigate to */
1883
- href: string;
1884
- /** Optional label for the link (used in event metadata) */
1885
- label?: string;
1886
- /** Children to render inside the link */
1887
- children: React__default.ReactNode;
1888
- }
1889
- /**
1890
- * Link component that emits navigation events for observability
1891
- *
1892
- * Use this instead of Next.js <Link> when you want link clicks to be
1893
- * observable through the NavigationEventBus. This is useful for:
1894
- * - Analytics tracking
1895
- * - State coordination before navigation
1896
- * - Logging navigation flows
1897
- *
1898
- * The component emits 'nav:link-clicked' event before allowing
1899
- * the browser to follow the link.
1900
- *
1901
- * @example
1902
- * ```typescript
1903
- * <ObservableLink
1904
- * href="/know/discover"
1905
- * label="Discover"
1906
- * >
1907
- * Discover Resources
1908
- * </ObservableLink>
1909
- * ```
1910
- *
1911
- * @example With Next.js Link integration
1912
- * ```typescript
1913
- * import Link from 'next/link';
1914
- *
1915
- * <Link href="/know/discover" legacyBehavior passHref>
1916
- * <ObservableLink label="Discover">
1917
- * Discover Resources
1918
- * </ObservableLink>
1919
- * </Link>
1920
- * ```
1921
- *
1922
- * @emits nav:link-clicked - Link clicked by user. Payload: { href: string, label?: string }
1923
- */
1924
- declare function ObservableLink({ href, label, onClick, children, ...anchorProps }: ObservableLinkProps): react_jsx_runtime.JSX.Element;
1925
-
1926
- interface SimpleNavigationItem$1 {
1927
- name: string;
1928
- href: string;
1929
- icon: React__default.ComponentType<{
1930
- className?: string;
1931
- }>;
1932
- description?: string;
1933
- }
1934
- interface SimpleNavigationProps$1 {
1935
- title: string;
1936
- items: SimpleNavigationItem$1[];
1937
- currentPath: string;
1938
- LinkComponent: React__default.ComponentType<any>;
1939
- dropdownContent?: (onClose: () => void) => React__default.ReactNode;
1940
- isCollapsed: boolean;
1941
- icons: {
1942
- chevronLeft: React__default.ComponentType<{
1943
- className?: string;
1944
- }>;
1945
- bars: React__default.ComponentType<{
1946
- className?: string;
1947
- }>;
1948
- };
1949
- collapseSidebarLabel: string;
1950
- expandSidebarLabel: string;
1951
- }
1952
- /**
1953
- * Simple navigation component for Admin and Moderation modes.
1954
- * Renders a section header with optional dropdown and static navigation tabs.
1955
- *
1956
- * @emits shell:sidebar-toggle - Toggle sidebar collapsed/expanded state. Payload: undefined
1957
- */
1958
- declare function SimpleNavigation({ title, items, currentPath, LinkComponent, dropdownContent, isCollapsed, icons, collapseSidebarLabel, expandSidebarLabel }: SimpleNavigationProps$1): react_jsx_runtime.JSX.Element;
1959
-
1960
- /**
1961
- * Props for the sortable resource tab component
1962
- */
1963
- interface SortableResourceTabProps {
1964
- resource: OpenResource;
1965
- isCollapsed: boolean;
1966
- isActive: boolean;
1967
- href: string;
1968
- onClose: (id: string, e: React.MouseEvent) => void;
1969
- onReorder?: (resourceId: string, direction: 'up' | 'down') => void;
1970
- index?: number;
1971
- totalCount?: number;
1972
- LinkComponent: ComponentType<any>;
1973
- dragHandleProps?: any;
1974
- isDragging?: boolean;
1975
- translations: {
1976
- dragToReorder?: string;
1977
- dragToReorderDoc?: string;
1978
- closeResource?: string;
1979
- moveUp?: string;
1980
- moveDown?: string;
1981
- };
1982
- }
1983
- /**
1984
- * Props for the collapsible resource navigation component
1985
- */
1986
- interface CollapsibleResourceNavigationProps {
1987
- fixedItems: Array<{
1988
- name: string;
1989
- href: string;
1990
- icon: ComponentType<any>;
1991
- description?: string;
1992
- }>;
1993
- resources: OpenResource[];
1994
- isCollapsed: boolean;
1995
- currentPath: string;
1996
- LinkComponent: ComponentType<any>;
1997
- onNavigate?: (path: string) => void;
1998
- getResourceHref: (resourceId: string) => string;
1999
- className?: string;
2000
- translations: {
2001
- title?: string;
2002
- collapseSidebar?: string;
2003
- expandSidebar?: string;
2004
- dragToReorder?: string;
2005
- dragToReorderDoc?: string;
2006
- closeResource?: string;
2007
- dragInstructions?: string;
2008
- };
2009
- icons: {
2010
- chevronLeft: ComponentType<any>;
2011
- bars: ComponentType<any>;
2012
- close: ComponentType<any>;
2013
- };
2014
- navigationMenu?: ((onClose: () => void) => ReactNode) | undefined;
2015
- }
2016
-
2017
- /**
2018
- * A comprehensive collapsible navigation component with fixed items and dynamic resource tabs.
2019
- * Supports drag and drop for resource reordering when expanded.
2020
- * Platform-agnostic design for use across different React environments.
2021
- *
2022
- * @emits tabs:reorder - Resource tab reordered. Payload: { oldIndex: number, newIndex: number }
2023
- * @emits tabs:close - Resource tab closed. Payload: { resourceId: string }
2024
- * @emits shell:sidebar-toggle - Toggle sidebar collapsed/expanded state. Payload: undefined
2025
- */
2026
- declare function CollapsibleResourceNavigation({ fixedItems, resources, isCollapsed, currentPath, LinkComponent, onNavigate, getResourceHref, className, translations, icons, navigationMenu }: CollapsibleResourceNavigationProps): react_jsx_runtime.JSX.Element;
2027
-
2028
- /**
2029
- * A sortable tab for an open resource in the navigation sidebar.
2030
- * Supports drag and drop when expanded, and compact icon-only view when collapsed.
2031
- */
2032
- declare function SortableResourceTab({ resource, isCollapsed, isActive, href, onClose, onReorder, index, totalCount, LinkComponent, translations, isDragging }: SortableResourceTabProps): react_jsx_runtime.JSX.Element;
2033
-
2034
- interface SimpleNavigationItem {
2035
- name: string;
2036
- href: string;
2037
- icon: React.ComponentType<any>;
2038
- description?: string;
2039
- }
2040
- interface SimpleNavigationProps {
2041
- title: string;
2042
- items: SimpleNavigationItem[];
2043
- currentPath: string;
2044
- LinkComponent: React.ComponentType<any>;
2045
- dropdownContent?: ((onClose: () => void) => ReactNode) | undefined;
2046
- }
2047
-
2048
- interface GenerationConfig {
2049
- title: string;
2050
- storagePath: string;
2051
- prompt?: string;
2052
- language: string;
2053
- temperature: number;
2054
- maxTokens: number;
2055
- context: GatheredContext;
2056
- }
2057
-
2058
- interface ReferenceWizardModalProps {
2059
- isOpen: boolean;
2060
- onClose: () => void;
2061
- /** The annotation being resolved */
2062
- annotationId: string | null;
2063
- /** The resource containing the annotation */
2064
- resourceId: string | null;
2065
- /** Default title (selected text) */
2066
- defaultTitle: string;
2067
- /** Entity types from the annotation */
2068
- entityTypes: string[];
2069
- /** Current locale for generation defaults */
2070
- locale: string;
2071
- /** Gathered context state */
2072
- context: GatheredContext | null;
2073
- contextLoading: boolean;
2074
- contextError: Error | null;
2075
- /** Callbacks */
2076
- onGenerateSubmit: (referenceId: string, config: GenerationConfig) => void;
2077
- onLinkResource: (referenceId: string, targetResourceId: string) => void;
2078
- onComposeNavigate: (context: GatheredContext, annotationId: string, resourceId: string, title: string, entityTypes: string[]) => void;
2079
- /** Translation strings */
2080
- translations: {
2081
- gatherTitle: string;
2082
- configureGenerationTitle: string;
2083
- configureSearchTitle: string;
2084
- searchResultsTitle: string;
2085
- sourceContextLabel: string;
2086
- connectionsLabel: string;
2087
- citedByLabel: string;
2088
- userHintLabel: string;
2089
- userHintPlaceholder: string;
2090
- loadingContext: string;
2091
- failedContext: string;
2092
- cancel: string;
2093
- search: string;
2094
- searching: string;
2095
- generate: string;
2096
- compose: string;
2097
- resolutionStrategyLabel: string;
2098
- back: string;
2099
- link: string;
2100
- score: string;
2101
- noResults: string;
2102
- resourceTitle: string;
2103
- resourceTitlePlaceholder: string;
2104
- additionalInstructions: string;
2105
- additionalInstructionsPlaceholder: string;
2106
- language: string;
2107
- languageHelp: string;
2108
- creativity: string;
2109
- creativityFocused: string;
2110
- creativityCreative: string;
2111
- maxLength: string;
2112
- maxLengthHelp: string;
2113
- maxResults: string;
2114
- semanticScoring: string;
2115
- semanticScoringHelp: string;
2116
- };
2117
- }
2118
- declare function ReferenceWizardModal({ isOpen, onClose, annotationId, resourceId, defaultTitle, entityTypes, locale, context, contextLoading, contextError, onGenerateSubmit, onLinkResource, onComposeNavigate, translations: t, }: ReferenceWizardModalProps): react_jsx_runtime.JSX.Element;
2119
-
2120
- interface SearchModalProps$1 {
2121
- isOpen: boolean;
2122
- onClose: () => void;
2123
- onNavigate: (type: 'resource' | 'entity', id: string) => void;
2124
- translations?: {
2125
- placeholder?: string;
2126
- searching?: string;
2127
- noResults?: string;
2128
- startTyping?: string;
2129
- navigate?: string;
2130
- select?: string;
2131
- close?: string;
2132
- enter?: string;
2133
- esc?: string;
2134
- };
2135
- }
2136
- declare function SearchModal({ isOpen, onClose, onNavigate, translations }: SearchModalProps$1): react_jsx_runtime.JSX.Element;
2137
-
2138
- interface ResourceSearchModalProps$1 {
2139
- isOpen: boolean;
2140
- onClose: () => void;
2141
- onSelect: (resourceId: string) => void;
2142
- searchTerm?: string;
2143
- translations?: {
2144
- title?: string;
2145
- placeholder?: string;
2146
- searching?: string;
2147
- noResults?: string;
2148
- close?: string;
2149
- };
2150
- }
2151
- declare function ResourceSearchModal({ isOpen, onClose, onSelect, searchTerm, translations }: ResourceSearchModalProps$1): react_jsx_runtime.JSX.Element;
2152
-
2153
- /**
2154
- * Base modal props that all modals share
2155
- */
2156
- interface BaseModalProps {
2157
- /** Whether the modal is open */
2158
- isOpen: boolean;
2159
- /** Callback when the modal should close */
2160
- onClose: () => void;
2161
- /** Optional CSS class name */
2162
- className?: string;
2163
- }
2164
- /**
2165
- * Props for modals that navigate
2166
- */
2167
- interface NavigableModalProps {
2168
- /** Navigation function */
2169
- onNavigate: (path: string) => void;
2170
- }
2171
- /**
2172
- * Search modal specific props
2173
- */
2174
- interface SearchModalProps extends BaseModalProps, NavigableModalProps {
2175
- /** Optional translation support */
2176
- translations?: {
2177
- placeholder?: string;
2178
- searching?: string;
2179
- noResults?: string;
2180
- startTyping?: string;
2181
- navigate?: string;
2182
- select?: string;
2183
- close?: string;
2184
- };
2185
- }
2186
- /**
2187
- * Resource search modal props
2188
- */
2189
- interface ResourceSearchModalProps extends BaseModalProps {
2190
- /** Callback when a resource is selected */
2191
- onSelect: (resourceId: string) => void;
2192
- /** Initial search term */
2193
- searchTerm?: string;
2194
- /** Optional translation support */
2195
- translations?: {
2196
- title?: string;
2197
- placeholder?: string;
2198
- searching?: string;
2199
- noResults?: string;
2200
- };
2201
- }
2202
-
2203
- /**
2204
- * Skip links for keyboard navigation accessibility
2205
- * These links are visually hidden but become visible when focused
2206
- * They allow keyboard users to quickly jump to main content areas
2207
- */
2208
- declare function SkipLinks(): react_jsx_runtime.JSX.Element;
2209
-
2210
- interface StatusDisplayProps {
2211
- isFullyAuthenticated?: boolean;
2212
- isAuthenticated?: boolean;
2213
- hasValidBackendToken?: boolean;
2214
- }
2215
- declare function StatusDisplay({ isFullyAuthenticated, isAuthenticated, hasValidBackendToken }: StatusDisplayProps): react_jsx_runtime.JSX.Element;
2216
-
2217
- declare function SessionTimer(): react_jsx_runtime.JSX.Element | null;
2218
-
2219
- declare function SessionExpiryBanner(): react_jsx_runtime.JSX.Element | null;
2220
-
2221
- declare function UserMenuSkeleton(): react_jsx_runtime.JSX.Element;
2222
-
2223
- type TranslateFn$1 = (key: string) => string;
2224
- interface SemiontBrandingProps {
2225
- t: TranslateFn$1;
2226
- className?: string;
2227
- size?: 'sm' | 'md' | 'lg' | 'xl';
2228
- showTagline?: boolean;
2229
- animated?: boolean;
2230
- compactTagline?: boolean;
2231
- }
2232
- declare function SemiontBranding({ t, className, size, showTagline, animated, compactTagline }: SemiontBrandingProps): react_jsx_runtime.JSX.Element;
2233
-
2234
- /**
2235
- * Translation function type for framework-agnostic components
2236
- */
2237
- type TranslateFn = (key: string, params?: Record<string, any>) => string;
2238
-
2239
- interface UnifiedHeaderProps {
2240
- Link: React__default.ComponentType<LinkComponentProps>;
2241
- routes: RouteBuilder;
2242
- t: TranslateFn;
2243
- tHome: TranslateFn;
2244
- showBranding?: boolean;
2245
- showAuthLinks?: boolean;
2246
- brandingLink?: string;
2247
- variant?: 'standalone' | 'embedded' | 'floating';
2248
- isAuthenticated?: boolean;
2249
- isAdmin?: boolean;
2250
- isModerator?: boolean;
2251
- currentPath?: string;
2252
- }
2253
- declare function UnifiedHeader({ Link, routes, t, tHome, showBranding, brandingLink, variant, isAuthenticated, isAdmin, isModerator, currentPath }: UnifiedHeaderProps): react_jsx_runtime.JSX.Element;
2254
-
2255
- interface NavigationMenuHelper {
2256
- (onClose: () => void): React__default.ReactNode;
2257
- }
2258
- interface LeftSidebarProps {
2259
- Link: React__default.ComponentType<LinkComponentProps>;
2260
- routes: RouteBuilder;
2261
- t: TranslateFn;
2262
- tHome: TranslateFn;
2263
- children: React__default.ReactNode | ((isCollapsed: boolean, toggleCollapsed: () => void, navigationMenu: NavigationMenuHelper) => React__default.ReactNode);
2264
- brandingLink?: string;
2265
- collapsible?: boolean;
2266
- storageKey?: string;
2267
- isAuthenticated?: boolean;
2268
- isAdmin?: boolean;
2269
- isModerator?: boolean;
2270
- currentPath?: string;
2271
- }
2272
- declare function LeftSidebar({ Link, routes, t, tHome, children, brandingLink, collapsible, storageKey, isAdmin, isModerator, currentPath }: LeftSidebarProps): react_jsx_runtime.JSX.Element;
2273
-
2274
- interface PageLayoutProps {
2275
- Link: React__default.ComponentType<LinkComponentProps>;
2276
- routes: RouteBuilder;
2277
- t: TranslateFn;
2278
- tNav: TranslateFn;
2279
- tHome: TranslateFn;
2280
- children: React__default.ReactNode;
2281
- className?: string;
2282
- showAuthLinks?: boolean;
2283
- CookiePreferences?: React__default.ComponentType<{
2284
- isOpen: boolean;
2285
- onClose: () => void;
2286
- }>;
2287
- onOpenKeyboardHelp?: () => void;
2288
- }
2289
- declare function PageLayout({ Link, routes, t, tNav, tHome, children, className, showAuthLinks, CookiePreferences, onOpenKeyboardHelp }: PageLayoutProps): react_jsx_runtime.JSX.Element;
2290
-
2291
- interface SemiontFaviconProps {
2292
- size?: number;
2293
- className?: string;
2294
- variant?: 'gradient' | 'solid' | 'outline';
2295
- background?: boolean;
2296
- }
2297
- declare function SemiontFavicon({ size, className, variant, background }: SemiontFaviconProps): react_jsx_runtime.JSX.Element;
2298
-
2299
- declare const faviconPaths: {
2300
- readonly ico: "/favicons/favicon.ico";
2301
- readonly svg: "/favicons/favicon.svg";
2302
- readonly appleTouchIcon: "/favicons/apple-touch-icon.png";
2303
- readonly favicon32: "/favicons/favicon-32x32.png";
2304
- readonly favicon16: "/favicons/favicon-16x16.png";
2305
- readonly androidChrome192: "/favicons/android-chrome-192x192.png";
2306
- readonly androidChrome512: "/favicons/android-chrome-512x512.png";
2307
- readonly manifest: "/favicons/site.webmanifest";
2308
- };
2309
-
2310
- interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
2311
- /**
2312
- * Ref forwarded to the underlying button element
2313
- */
2314
- ref?: React__default.Ref<HTMLButtonElement>;
2315
- /**
2316
- * The visual variant of the button
2317
- */
2318
- variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning' | 'ghost';
2319
- /**
2320
- * The size of the button
2321
- */
2322
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2323
- /**
2324
- * Whether the button should take full width of its container
2325
- */
2326
- fullWidth?: boolean;
2327
- /**
2328
- * Whether the button is in a loading state
2329
- */
2330
- loading?: boolean;
2331
- /**
2332
- * Icon to display before the button text
2333
- */
2334
- leftIcon?: React__default.ReactNode;
2335
- /**
2336
- * Icon to display after the button text
2337
- */
2338
- rightIcon?: React__default.ReactNode;
2339
- /**
2340
- * Whether the button should only show an icon (no text padding)
2341
- */
2342
- iconOnly?: boolean;
2343
- /**
2344
- * Whether to show the button in an active/pressed state
2345
- */
2346
- active?: boolean;
2347
- }
2348
- declare function Button({ variant, size, fullWidth, loading, leftIcon, rightIcon, iconOnly, active, className, disabled, children, type, ref, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
2349
- /**
2350
- * Button Group Component
2351
- *
2352
- * Groups multiple buttons together
2353
- */
2354
- interface ButtonGroupProps {
2355
- children: React__default.ReactNode;
2356
- /**
2357
- * How to arrange the buttons
2358
- */
2359
- orientation?: 'horizontal' | 'vertical';
2360
- /**
2361
- * Whether buttons should be connected (no gap between them)
2362
- */
2363
- attached?: boolean;
2364
- /**
2365
- * Size of the gap between buttons (when not attached)
2366
- */
2367
- spacing?: 'xs' | 'sm' | 'md' | 'lg';
2368
- className?: string;
2369
- }
2370
- declare const ButtonGroup: React__default.FC<ButtonGroupProps>;
2371
-
2372
- /**
2373
- * Semiont Design Tokens
2374
- *
2375
- * Core design tokens for the Semiont design system.
2376
- * These tokens provide the foundation for all component styling
2377
- * and can be consumed via JavaScript or CSS variables.
2378
- */
2379
- declare const tokens: {
2380
- colors: {
2381
- primary: {
2382
- 50: string;
2383
- 100: string;
2384
- 200: string;
2385
- 300: string;
2386
- 400: string;
2387
- 500: string;
2388
- 600: string;
2389
- 700: string;
2390
- 800: string;
2391
- 900: string;
2392
- };
2393
- secondary: {
2394
- 50: string;
2395
- 100: string;
2396
- 200: string;
2397
- 300: string;
2398
- 400: string;
2399
- 500: string;
2400
- 600: string;
2401
- 700: string;
2402
- 800: string;
2403
- 900: string;
2404
- };
2405
- semantic: {
2406
- error: string;
2407
- errorLight: string;
2408
- errorDark: string;
2409
- warning: string;
2410
- warningLight: string;
2411
- warningDark: string;
2412
- success: string;
2413
- successLight: string;
2414
- successDark: string;
2415
- info: string;
2416
- infoLight: string;
2417
- infoDark: string;
2418
- };
2419
- neutral: {
2420
- 0: string;
2421
- 50: string;
2422
- 100: string;
2423
- 200: string;
2424
- 300: string;
2425
- 400: string;
2426
- 500: string;
2427
- 600: string;
2428
- 700: string;
2429
- 800: string;
2430
- 900: string;
2431
- 950: string;
2432
- 1000: string;
2433
- };
2434
- background: {
2435
- primary: string;
2436
- secondary: string;
2437
- tertiary: string;
2438
- inverse: string;
2439
- };
2440
- text: {
2441
- primary: string;
2442
- secondary: string;
2443
- tertiary: string;
2444
- disabled: string;
2445
- inverse: string;
2446
- };
2447
- };
2448
- spacing: {
2449
- 0: string;
2450
- xs: string;
2451
- sm: string;
2452
- md: string;
2453
- lg: string;
2454
- xl: string;
2455
- '2xl': string;
2456
- '3xl': string;
2457
- '4xl': string;
2458
- '5xl': string;
2459
- };
2460
- typography: {
2461
- fontFamily: {
2462
- sans: string;
2463
- mono: string;
2464
- };
2465
- fontSize: {
2466
- xs: string;
2467
- sm: string;
2468
- base: string;
2469
- lg: string;
2470
- xl: string;
2471
- '2xl': string;
2472
- '3xl': string;
2473
- '4xl': string;
2474
- '5xl': string;
2475
- };
2476
- fontWeight: {
2477
- thin: number;
2478
- light: number;
2479
- normal: number;
2480
- medium: number;
2481
- semibold: number;
2482
- bold: number;
2483
- black: number;
2484
- };
2485
- lineHeight: {
2486
- none: number;
2487
- tight: number;
2488
- snug: number;
2489
- normal: number;
2490
- relaxed: number;
2491
- loose: number;
2492
- };
2493
- };
2494
- borderRadius: {
2495
- none: string;
2496
- sm: string;
2497
- base: string;
2498
- md: string;
2499
- lg: string;
2500
- xl: string;
2501
- '2xl': string;
2502
- '3xl': string;
2503
- full: string;
2504
- };
2505
- shadows: {
2506
- none: string;
2507
- xs: string;
2508
- sm: string;
2509
- base: string;
2510
- md: string;
2511
- lg: string;
2512
- xl: string;
2513
- inner: string;
2514
- };
2515
- transitions: {
2516
- duration: {
2517
- fast: string;
2518
- base: string;
2519
- slow: string;
2520
- slower: string;
2521
- };
2522
- timing: {
2523
- linear: string;
2524
- ease: string;
2525
- easeIn: string;
2526
- easeOut: string;
2527
- easeInOut: string;
2528
- };
2529
- };
2530
- breakpoints: {
2531
- sm: string;
2532
- md: string;
2533
- lg: string;
2534
- xl: string;
2535
- '2xl': string;
2536
- };
2537
- };
2538
- /**
2539
- * Generate CSS custom properties from design tokens
2540
- */
2541
- declare function generateCSSVariables(): string;
2542
- declare const cssVariables: string;
2543
- type ColorToken = keyof typeof tokens.colors;
2544
- type SpacingToken = keyof typeof tokens.spacing;
2545
- type TypographyToken = keyof typeof tokens.typography;
2546
- type BorderRadiusToken = keyof typeof tokens.borderRadius;
2547
- type ShadowToken = keyof typeof tokens.shadows;
2548
- type TransitionToken = keyof typeof tokens.transitions;
2549
-
2550
- /**
2551
- * ComposeLoadingState Component
2552
- *
2553
- * Simple loading state display for the compose page.
2554
- */
2555
- interface ComposeLoadingStateProps {
2556
- message: string;
2557
- }
2558
- declare function ComposeLoadingState({ message }: ComposeLoadingStateProps): react_jsx_runtime.JSX.Element;
2559
-
2560
- /**
2561
- * ResourceLoadingState - Loading state component for resource viewer
2562
- *
2563
- * Pure React component - no Next.js dependencies.
2564
- */
2565
- declare function ResourceLoadingState(): react_jsx_runtime.JSX.Element;
2566
-
2567
- /**
2568
- * ResourceErrorState - Error state component for resource viewer
2569
- *
2570
- * Pure React component - no Next.js dependencies.
2571
- */
2572
- interface ResourceErrorStateProps {
2573
- error: unknown;
2574
- onRetry: () => void;
2575
- }
2576
- declare function ResourceErrorState({ error, onRetry }: ResourceErrorStateProps): react_jsx_runtime.JSX.Element;
2577
-
2578
- interface DevOpsFeature {
2579
- title: string;
2580
- description: string;
2581
- icon: React__default.ComponentType<any>;
2582
- available: string;
2583
- }
2584
- interface AdminDevOpsPageProps {
2585
- suggestedFeatures: DevOpsFeature[];
2586
- theme: 'light' | 'dark' | 'system';
2587
- showLineNumbers: boolean;
2588
- activePanel: string | null;
2589
- translations: {
2590
- title: string;
2591
- subtitle: string;
2592
- systemStatus: string;
2593
- cliOperations: string;
2594
- cliOperationsDescription: string;
2595
- cliTitle: string;
2596
- cliDescription: string;
2597
- };
2598
- StatusDisplay: React__default.ComponentType<any>;
2599
- ToolbarPanels: React__default.ComponentType<any>;
2600
- Toolbar: React__default.ComponentType<any>;
2601
- }
2602
- declare function AdminDevOpsPage({ suggestedFeatures, theme, showLineNumbers, activePanel, translations: t, StatusDisplay, ToolbarPanels, Toolbar, }: AdminDevOpsPageProps): react_jsx_runtime.JSX.Element;
2603
-
2604
- /**
2605
- * ExportCard — Backup trigger
2606
- *
2607
- * Pure React component. All state and handlers passed as props.
2608
- */
2609
- interface ExportCardTranslations {
2610
- title: string;
2611
- description: string;
2612
- exportButton: string;
2613
- exporting: string;
2614
- }
2615
- interface ExportCardProps {
2616
- onExport: () => void;
2617
- isExporting: boolean;
2618
- translations: ExportCardTranslations;
2619
- }
2620
- declare function ExportCard({ onExport, isExporting, translations: t }: ExportCardProps): react_jsx_runtime.JSX.Element;
2621
-
2622
- /**
2623
- * ShellStateUnit — app-shell state: which toolbar panel is open, tab-bar
2624
- * coordination helpers, scroll-to-annotation signals. Lives on
2625
- * `SemiontBrowser`'s app-scoped bus (not the per-session client bus)
2626
- * because panel toggles and shell chrome must work regardless of
2627
- * whether a KB session is active.
2628
- *
2629
- * Channels: `panel:toggle`, `panel:open`, `panel:close`.
2630
- */
2631
-
2632
- type ToolbarPanelType = 'history' | 'info' | 'annotations' | 'settings' | 'collaboration' | 'user' | 'jsonld' | 'knowledge-base';
2633
- declare const COMMON_PANELS: readonly ToolbarPanelType[];
2634
- declare const RESOURCE_PANELS: readonly ToolbarPanelType[];
2635
- interface ShellStateUnit extends StateUnit {
2636
- activePanel$: Observable<ToolbarPanelType | null>;
2637
- scrollToAnnotationId$: Observable<string | null>;
2638
- panelInitialTab$: Observable<{
2639
- tab: string;
2640
- generation: number;
2641
- } | null>;
2642
- openPanel(panel: string): void;
2643
- closePanel(): void;
2644
- togglePanel(panel: string): void;
2645
- onScrollCompleted(): void;
2646
- }
2647
- interface ShellStateUnitOptions {
2648
- initialPanel?: ToolbarPanelType | null;
2649
- onPanelChange?: (panel: ToolbarPanelType | null) => void;
2650
- }
2651
- declare function createShellStateUnit(browser: SemiontBrowser, options?: ShellStateUnitOptions): ShellStateUnit;
2652
-
2653
- interface ImportPreview {
2654
- format: string;
2655
- version: number;
2656
- sourceUrl: string;
2657
- stats: Record<string, number>;
2658
- }
2659
- interface ExchangeStateUnit extends StateUnit {
2660
- browse: ShellStateUnit;
2661
- selectedFile$: Observable<File | null>;
2662
- preview$: Observable<ImportPreview | null>;
2663
- importPhase$: Observable<string | null>;
2664
- importMessage$: Observable<string | undefined>;
2665
- importResult$: Observable<Record<string, unknown> | undefined>;
2666
- isExporting$: Observable<boolean>;
2667
- isImporting$: Observable<boolean>;
2668
- selectFile(file: File): void;
2669
- cancelImport(): void;
2670
- doExport(): Promise<{
2671
- blob: Blob;
2672
- filename: string;
2673
- }>;
2674
- doImport(): Promise<void>;
2675
- }
2676
- declare function createExchangeStateUnit(browse: ShellStateUnit, exportFn: (params?: {
2677
- includeArchived?: boolean;
2678
- }) => Promise<BackendDownload>, importFn: (file: File) => Observable<ProgressEvent>): ExchangeStateUnit;
2679
-
2680
- interface ImportCardTranslations {
2681
- title: string;
2682
- description: string;
2683
- dropzoneLabel: string;
2684
- dropzoneActive: string;
2685
- detectedFormat: string;
2686
- statsPreview: string;
2687
- importButton: string;
2688
- importing: string;
2689
- importConfirmTitle: string;
2690
- importConfirmMessage: string;
2691
- confirmImport: string;
2692
- cancelImport: string;
2693
- }
2694
- interface ImportCardProps {
2695
- onFileSelected: (file: File) => void;
2696
- onImport: () => void;
2697
- onCancel: () => void;
2698
- selectedFile: File | null;
2699
- preview: ImportPreview | null;
2700
- isImporting: boolean;
2701
- translations: ImportCardTranslations;
2702
- }
2703
- declare function ImportCard({ onFileSelected, onImport, onCancel, selectedFile, preview, isImporting, translations: t, }: ImportCardProps): react_jsx_runtime.JSX.Element;
2704
-
2705
- /**
2706
- * ImportProgress — Shows SSE-driven progress during restore
2707
- *
2708
- * Pure React component. All state passed as props.
2709
- */
2710
- interface ImportProgressTranslations {
2711
- phaseStarted: string;
2712
- phaseEntityTypes: string;
2713
- phaseResources: string;
2714
- phaseAnnotations: string;
2715
- phaseComplete: string;
2716
- phaseError: string;
2717
- hashChainValid: string;
2718
- hashChainInvalid: string;
2719
- streams: string;
2720
- events: string;
2721
- blobs: string;
2722
- }
2723
- interface ImportProgressProps {
2724
- phase: string;
2725
- message?: string;
2726
- result?: Record<string, unknown>;
2727
- translations: ImportProgressTranslations;
2728
- }
2729
- declare function ImportProgress({ phase, message, result, translations: t }: ImportProgressProps): react_jsx_runtime.JSX.Element;
2730
-
2731
- interface AdminExchangePageTranslations {
2732
- title: string;
2733
- subtitle: string;
2734
- export: ExportCardTranslations;
2735
- import: ImportCardTranslations;
2736
- progress: ImportProgressTranslations;
2737
- }
2738
- interface AdminExchangePageProps {
2739
- onExport: () => void;
2740
- isExporting: boolean;
2741
- onFileSelected: (file: File) => void;
2742
- onImport: () => void;
2743
- onCancelImport: () => void;
2744
- selectedFile: File | null;
2745
- preview: ImportCardProps['preview'];
2746
- isImporting: boolean;
2747
- importPhase: string | null;
2748
- importMessage?: string | undefined;
2749
- importResult?: Record<string, unknown> | undefined;
2750
- theme: 'light' | 'dark' | 'system';
2751
- showLineNumbers: boolean;
2752
- activePanel: string | null;
2753
- translations: AdminExchangePageTranslations;
2754
- ToolbarPanels: React__default.ComponentType<any>;
2755
- Toolbar: React__default.ComponentType<any>;
2756
- }
2757
- declare function AdminExchangePage({ onExport, isExporting, onFileSelected, onImport, onCancelImport, selectedFile, preview, isImporting, importPhase, importMessage, importResult, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, }: AdminExchangePageProps): react_jsx_runtime.JSX.Element;
2758
-
2759
- interface OAuthProvider {
2760
- name: string;
2761
- clientId?: string;
2762
- }
2763
- interface AdminSecurityPageProps {
2764
- providers: OAuthProvider[];
2765
- allowedDomains: string[];
2766
- isLoading: boolean;
2767
- theme: 'light' | 'dark' | 'system';
2768
- showLineNumbers: boolean;
2769
- activePanel: string | null;
2770
- translations: {
2771
- title: string;
2772
- subtitle: string;
2773
- oauthProviders: string;
2774
- oauthProvidersDescription: string;
2775
- clientId: string;
2776
- configured: string;
2777
- noProvidersConfigured: string;
2778
- allowedDomains: string;
2779
- allowedDomainsDescription: string;
2780
- noDomainsConfigured: string;
2781
- configManagementTitle: string;
2782
- configManagementDescription: string;
2783
- configLocalDev: string;
2784
- configCloudDeploy: string;
2785
- configCloudDeployCommand: string;
2786
- configCloudDeployEnd: string;
2787
- configAWS: string;
2788
- };
2789
- ToolbarPanels: React__default.ComponentType<any>;
2790
- Toolbar: React__default.ComponentType<any>;
2791
- }
2792
- declare function AdminSecurityPage({ providers, allowedDomains, isLoading, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, }: AdminSecurityPageProps): react_jsx_runtime.JSX.Element;
2793
-
2794
- interface LinkedDataPageTranslations {
2795
- title: string;
2796
- subtitle: string;
2797
- export: ExportCardTranslations;
2798
- import: ImportCardTranslations;
2799
- progress: ImportProgressTranslations;
2800
- }
2801
- interface LinkedDataPageProps {
2802
- onExport: () => void;
2803
- isExporting: boolean;
2804
- onFileSelected: (file: File) => void;
2805
- onImport: () => void;
2806
- onCancelImport: () => void;
2807
- selectedFile: File | null;
2808
- preview: ImportCardProps['preview'];
2809
- isImporting: boolean;
2810
- importPhase: string | null;
2811
- importMessage?: string | undefined;
2812
- importResult?: Record<string, unknown> | undefined;
2813
- theme: 'light' | 'dark' | 'system';
2814
- showLineNumbers: boolean;
2815
- activePanel: string | null;
2816
- translations: LinkedDataPageTranslations;
2817
- ToolbarPanels: React__default.ComponentType<any>;
2818
- Toolbar: React__default.ComponentType<any>;
2819
- }
2820
- declare function LinkedDataPage({ onExport, isExporting, onFileSelected, onImport, onCancelImport, selectedFile, preview, isImporting, importPhase, importMessage, importResult, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, }: LinkedDataPageProps): react_jsx_runtime.JSX.Element;
2821
-
2822
- interface AdminUser {
2823
- id: string;
2824
- email: string;
2825
- name?: string | null;
2826
- domain: string;
2827
- isAdmin: boolean;
2828
- isActive: boolean;
2829
- lastLogin?: string | null;
2830
- created: string;
2831
- }
2832
- interface AdminUserStats {
2833
- totalUsers: number;
2834
- activeUsers: number;
2835
- adminUsers: number;
2836
- recentSignups: string[];
2837
- }
2838
- interface AdminUsersPageProps {
2839
- users: AdminUser[];
2840
- userStats: AdminUserStats | null;
2841
- isLoadingUsers: boolean;
2842
- isLoadingStats: boolean;
2843
- onUpdateUser: (id: string, data: {
2844
- isAdmin?: boolean;
2845
- isActive?: boolean;
2846
- }) => void;
2847
- onDeleteUser: (id: string) => void;
2848
- onAddUser: () => void;
2849
- onExportUsers: () => void;
2850
- theme: 'light' | 'dark' | 'system';
2851
- showLineNumbers: boolean;
2852
- activePanel: string | null;
2853
- translations: {
2854
- title: string;
2855
- subtitle: string;
2856
- addUser: string;
2857
- totalUsers: string;
2858
- activeUsers: string;
2859
- administrators: string;
2860
- recentUsers: string;
2861
- searchUsers: string;
2862
- searchPlaceholder: string;
2863
- role: string;
2864
- allRoles: string;
2865
- admin: string;
2866
- user: string;
2867
- status: string;
2868
- allStatus: string;
2869
- active: string;
2870
- inactive: string;
2871
- exportUsers: string;
2872
- loadingUsers: string;
2873
- userColumn: string;
2874
- domainColumn: string;
2875
- roleColumn: string;
2876
- statusColumn: string;
2877
- lastLoginColumn: string;
2878
- joinedColumn: string;
2879
- actionsColumn: string;
2880
- noUsersFound: string;
2881
- noUsersFoundDescription: string;
2882
- noName: string;
2883
- never: string;
2884
- removeAdmin: string;
2885
- makeAdmin: string;
2886
- deactivateUser: string;
2887
- activateUser: string;
2888
- deleteUser: string;
2889
- };
2890
- ToolbarPanels: React__default.ComponentType<any>;
2891
- Toolbar: React__default.ComponentType<any>;
2892
- buttonStyles: {
2893
- primary: {
2894
- base: string;
2895
- };
2896
- secondary: {
2897
- base: string;
2898
- };
2899
- };
2900
- }
2901
- declare function AdminUsersPage({ users, userStats, isLoadingUsers, isLoadingStats, onUpdateUser, onDeleteUser, onAddUser, onExportUsers, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, buttonStyles, }: AdminUsersPageProps): react_jsx_runtime.JSX.Element;
2902
-
2903
- interface SignInFormProps {
2904
- /**
2905
- * Callback when user clicks Google sign-in.
2906
- * Receives the backend URL (either the locked one or what the user typed).
2907
- */
2908
- onGoogleSignIn: (backendUrl: string) => Promise<void>;
2909
- /**
2910
- * Callback when user submits email/password credentials.
2911
- * Receives the backend URL along with email and password.
2912
- */
2913
- onCredentialsSignIn?: ((backendUrl: string, email: string, password: string) => Promise<void>) | undefined;
2914
- /**
2915
- * Pre-filled backend URL. When provided the field is read-only (re-auth to known workspace).
2916
- * When omitted the user enters the URL themselves (new connection).
2917
- */
2918
- backendUrl?: string;
2919
- /**
2920
- * Error message to display (if any)
2921
- */
2922
- error?: string | null;
2923
- /**
2924
- * Whether to show email/password auth form
2925
- */
2926
- showCredentialsAuth?: boolean;
2927
- /**
2928
- * Whether the auth providers are still loading
2929
- */
2930
- isLoading?: boolean;
2931
- /**
2932
- * Link component for routing - passed from parent
2933
- */
2934
- Link: React__default.ComponentType<any>;
2935
- /**
2936
- * Translation strings
2937
- */
2938
- translations: {
2939
- pageTitle: string;
2940
- welcomeBack: string;
2941
- signInPrompt: string;
2942
- continueWithGoogle: string;
2943
- backendUrlLabel: string;
2944
- backendUrlPlaceholder: string;
2945
- emailLabel: string;
2946
- emailPlaceholder: string;
2947
- passwordLabel: string;
2948
- passwordPlaceholder: string;
2949
- signInWithCredentials: string;
2950
- or: string;
2951
- credentialsAuthEnabled: string;
2952
- approvedDomainsOnly: string;
2953
- backToHome: string;
2954
- learnMore: string;
2955
- signUpInstead: string;
2956
- errorBackendUrlRequired: string;
2957
- errorBackendUrlInvalid: string;
2958
- errorBackendUrlUnreachable: string;
2959
- errorEmailRequired: string;
2960
- errorPasswordRequired: string;
2961
- tagline: string;
2962
- };
2963
- }
2964
- /**
2965
- * SignInForm - Main sign-in / connect component.
2966
- *
2967
- * When backendUrl is provided (re-auth to known workspace) the URL field is locked.
2968
- * When backendUrl is omitted (new connection) the user enters the URL themselves.
2969
- */
2970
- declare function SignInForm({ onGoogleSignIn, onCredentialsSignIn, backendUrl, error, showCredentialsAuth, isLoading, translations: t, }: SignInFormProps): react_jsx_runtime.JSX.Element;
2971
-
2972
- interface SignUpFormProps {
2973
- /**
2974
- * Link component for routing - passed from parent
2975
- */
2976
- Link: React__default.ComponentType<any>;
2977
- /**
2978
- * Callback when user clicks the Google sign-up button
2979
- */
2980
- onSignUp: () => Promise<void>;
2981
- /**
2982
- * Translation strings for the form
2983
- */
2984
- translations: {
2985
- pageTitle: string;
2986
- signUpPrompt: string;
2987
- signUpWithGoogle: string;
2988
- creatingAccount: string;
2989
- approvedDomainsInfo: string;
2990
- termsAgreement: string;
2991
- alreadyHaveAccount: string;
2992
- tagline: string;
2993
- backToHome: string;
2994
- };
2995
- }
2996
- /**
2997
- * SignUpForm component
2998
- *
2999
- * Renders the sign-up form with Google OAuth button.
3000
- * Manages loading state internally.
3001
- */
3002
- declare function SignUpForm({ onSignUp, Link, translations: t }: SignUpFormProps): react_jsx_runtime.JSX.Element;
3003
-
3004
- interface AuthErrorDisplayProps {
3005
- /**
3006
- * Link component for routing - passed from parent
3007
- */
3008
- Link: React__default.ComponentType<any>;
3009
- /**
3010
- * Error type from URL parameter
3011
- */
3012
- errorType: string | null;
3013
- /**
3014
- * Translation strings
3015
- */
3016
- translations: {
3017
- pageTitle: string;
3018
- tryAgain: string;
3019
- errorConfiguration: string;
3020
- errorAccessDenied: string;
3021
- errorVerification: string;
3022
- errorGeneric: string;
3023
- };
3024
- }
3025
- /**
3026
- * AuthErrorDisplay component
3027
- *
3028
- * Displays authentication error messages with a link to try again.
3029
- */
3030
- declare function AuthErrorDisplay({ errorType, Link, translations: t }: AuthErrorDisplayProps): react_jsx_runtime.JSX.Element;
3031
-
3032
- interface WelcomePageProps {
3033
- userName?: string;
3034
- termsAcceptedAt?: string | null;
3035
- isNewUser?: boolean;
3036
- status: 'loading' | 'accepted' | 'form';
3037
- isProcessing: boolean;
3038
- onAccept: () => void;
3039
- onDecline: () => void;
3040
- translations: {
3041
- loading: string;
3042
- welcomeTitle: string;
3043
- thanksForAccepting: string;
3044
- welcomeUser: string;
3045
- reviewTermsPrompt: string;
3046
- termsSummaryTitle: string;
3047
- termsSummaryIntro: string;
3048
- acceptableUseTitle: string;
3049
- acceptableUseResponsible: string;
3050
- acceptableUseRespect: string;
3051
- acceptableUseConduct: string;
3052
- prohibitedContentTitle: string;
3053
- prohibitedContentIntro: string;
3054
- prohibitedIllegal: string;
3055
- prohibitedAdult: string;
3056
- prohibitedHate: string;
3057
- prohibitedViolence: string;
3058
- prohibitedMisinformation: string;
3059
- prohibitedPrivacy: string;
3060
- prohibitedCopyright: string;
3061
- prohibitedMalware: string;
3062
- prohibitedSpam: string;
3063
- conductTitle: string;
3064
- conductDescription: string;
3065
- conductLink: string;
3066
- conductPromotion: string;
3067
- responsibilitiesTitle: string;
3068
- responsibilitiesSecure: string;
3069
- responsibilitiesReport: string;
3070
- responsibilitiesAccurate: string;
3071
- responsibilitiesComply: string;
3072
- violationsWarning: string;
3073
- readFullTerms: string;
3074
- termsOfService: string;
3075
- and: string;
3076
- privacyPolicy: string;
3077
- declineAndSignOut: string;
3078
- acceptAndContinue: string;
3079
- processing: string;
3080
- legallyBound: string;
3081
- };
3082
- PageLayout: React__default.ComponentType<any>;
3083
- Link: React__default.ComponentType<any>;
3084
- }
3085
- declare function WelcomePage({ userName, status, isProcessing, onAccept, onDecline, translations: t, PageLayout, Link, }: WelcomePageProps): react_jsx_runtime.JSX.Element;
3086
-
3087
- interface EntityTagsPageProps {
3088
- entityTypes: string[];
3089
- isLoading: boolean;
3090
- error: string;
3091
- newTag: string;
3092
- onNewTagChange: (value: string) => void;
3093
- onAddTag: () => void;
3094
- isAddingTag: boolean;
3095
- theme: 'light' | 'dark' | 'system';
3096
- showLineNumbers: boolean;
3097
- activePanel: string | null;
3098
- translations: {
3099
- pageTitle: string;
3100
- pageDescription: string;
3101
- sectionTitle: string;
3102
- sectionDescription: string;
3103
- inputPlaceholder: string;
3104
- addTag: string;
3105
- adding: string;
3106
- };
3107
- ToolbarPanels: React__default.ComponentType<any>;
3108
- Toolbar: React__default.ComponentType<any>;
3109
- }
3110
- declare function EntityTagsPage({ entityTypes, error, newTag, onNewTagChange, onAddTag, isAddingTag, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, }: EntityTagsPageProps): react_jsx_runtime.JSX.Element;
3111
-
3112
- interface RecentDocumentsPageProps {
3113
- hasDocuments: boolean;
3114
- isLoading: boolean;
3115
- theme: 'light' | 'dark' | 'system';
3116
- showLineNumbers: boolean;
3117
- activePanel: string | null;
3118
- translations: {
3119
- pageTitle: string;
3120
- pageDescription: string;
3121
- sectionTitle: string;
3122
- sectionDescription: string;
3123
- noDocuments: string;
3124
- activityWillAppear: string;
3125
- loading: string;
3126
- };
3127
- ToolbarPanels: React__default.ComponentType<any>;
3128
- Toolbar: React__default.ComponentType<any>;
3129
- }
3130
- declare function RecentDocumentsPage({ isLoading, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, }: RecentDocumentsPageProps): react_jsx_runtime.JSX.Element;
3131
-
3132
- interface TagSchemasPageProps {
3133
- schemas: TagSchema[];
3134
- isLoading: boolean;
3135
- theme: 'light' | 'dark' | 'system';
3136
- showLineNumbers: boolean;
3137
- activePanel: string | null;
3138
- translations: {
3139
- pageTitle: string;
3140
- pageDescription: string;
3141
- categories: string;
3142
- loading: string;
3143
- };
3144
- ToolbarPanels: React__default.ComponentType<any>;
3145
- Toolbar: React__default.ComponentType<any>;
3146
- }
3147
- declare function TagSchemasPage({ schemas, isLoading, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, }: TagSchemasPageProps): react_jsx_runtime.JSX.Element;
3148
-
3149
- type ComposeMode = 'new' | 'clone' | 'reference';
3150
- interface ComposeParams {
3151
- mode?: string | undefined;
3152
- token?: string | undefined;
3153
- annotationUri?: string | undefined;
3154
- sourceDocumentId?: string | undefined;
3155
- name?: string | undefined;
3156
- entityTypes?: string | undefined;
3157
- storedContext?: string | undefined;
3158
- }
3159
- interface CloneData {
3160
- sourceResource: ResourceDescriptor;
3161
- sourceContent: string;
3162
- }
3163
- interface ReferenceData {
3164
- annotationUri: string;
3165
- sourceDocumentId: string;
3166
- name: string;
3167
- entityTypes: string[];
3168
- }
3169
- interface SaveResourceParams$1 {
3170
- mode: ComposeMode;
3171
- name: string;
3172
- storageUri: string;
3173
- content?: string;
3174
- file?: File;
3175
- format?: string;
3176
- charset?: string;
3177
- entityTypes?: string[];
3178
- language: string;
3179
- archiveOriginal?: boolean;
3180
- annotationUri?: string;
3181
- sourceDocumentId?: string;
3182
- }
3183
- interface ComposePageStateUnit extends StateUnit {
3184
- browse: ShellStateUnit;
3185
- mode$: Observable<ComposeMode>;
3186
- loading$: Observable<boolean>;
3187
- cloneData$: Observable<CloneData | null>;
3188
- referenceData$: Observable<ReferenceData | null>;
3189
- gatheredContext$: Observable<GatheredContext | null>;
3190
- entityTypes$: Observable<string[]>;
3191
- /**
3192
- * Live upload-progress for the in-flight `save(...)` call. Emits the
3193
- * full `UploadProgress` lifecycle (started → finished) while a save is
3194
- * underway; resets to `null` between saves and after completion. UI
3195
- * components can subscribe to render an upload-in-progress indicator.
3196
- */
3197
- uploadProgress$: Observable<UploadProgress | null>;
3198
- save(params: SaveResourceParams$1): Promise<string>;
3199
- }
3200
- declare function createComposePageStateUnit(client: SemiontClient, browse: ShellStateUnit, params: ComposeParams, auth?: AccessToken): ComposePageStateUnit;
3201
-
3202
- interface ResourceComposePageProps {
3203
- mode: 'new' | 'clone' | 'reference';
3204
- cloneData?: CloneData | null;
3205
- referenceData?: ReferenceData | null;
3206
- gatheredContext?: GatheredContext | null;
3207
- availableEntityTypes: string[];
3208
- initialLocale: string;
3209
- theme: 'light' | 'dark';
3210
- showLineNumbers: boolean;
3211
- hoverDelayMs: number;
3212
- activePanel: string | null;
3213
- onSaveResource: (params: SaveResourceParams) => Promise<void>;
3214
- onCancel: () => void;
3215
- /**
3216
- * Live upload-progress for the in-flight save. Resolved by the route
3217
- * shell from `composeVM.uploadProgress$`. `null` between saves and
3218
- * after completion. When non-null, the form disables Save and the
3219
- * inline `<UploadProgressBar />` below the action buttons renders.
3220
- */
3221
- uploadProgress?: UploadProgress | null;
3222
- translations: {
3223
- title: string;
3224
- titleEditClone: string;
3225
- titleCompleteReference: string;
3226
- subtitleClone: string;
3227
- subtitleReference: string;
3228
- linkedNoticePrefix: string;
3229
- resourceName: string;
3230
- resourceNamePlaceholder: string;
3231
- entityTypes: string;
3232
- language: string;
3233
- contentSource: string;
3234
- uploadFile: string;
3235
- uploadFileDescription: string;
3236
- writeContent: string;
3237
- writeContentDescription: string;
3238
- dropFileOrClick: string;
3239
- supportedFormats: string;
3240
- mediaType: string;
3241
- autoDetected: string;
3242
- format: string;
3243
- content: string;
3244
- resourceContent: string;
3245
- encoding: string;
3246
- archiveOriginal: string;
3247
- cancel: string;
3248
- saving: string;
3249
- creating: string;
3250
- creatingAndLinking: string;
3251
- saveClonedResource: string;
3252
- createAndLinkResource: string;
3253
- createResource: string;
3254
- };
3255
- ToolbarPanels: React__default.ComponentType<any>;
3256
- Toolbar: React__default.ComponentType<any>;
3257
- }
3258
- interface SaveResourceParams {
3259
- mode: 'new' | 'clone' | 'reference';
3260
- name: string;
3261
- storageUri: string;
3262
- content?: string;
3263
- file?: File;
3264
- format?: string;
3265
- charset?: string;
3266
- entityTypes?: string[];
3267
- language: string;
3268
- archiveOriginal?: boolean;
3269
- annotationUri?: string;
3270
- sourceDocumentId?: string;
3271
- }
3272
- declare function ResourceComposePage({ mode, cloneData, referenceData, gatheredContext, availableEntityTypes, initialLocale, theme, showLineNumbers, hoverDelayMs, activePanel, onSaveResource, onCancel, uploadProgress, translations: t, ToolbarPanels, Toolbar, }: ResourceComposePageProps): react_jsx_runtime.JSX.Element;
3273
-
3274
- /**
3275
- * Inline upload-progress affordance for the compose page.
3276
- *
3277
- * Subscribes (via prop) to a `UploadProgress | null` value derived from
3278
- * `composeVM.uploadProgress$`. Renders nothing when null; renders an
3279
- * indeterminate state on `started`; renders a labeled bar with byte
3280
- * counts on `progress`; renders a brief "Uploaded" success state on
3281
- * `finished` (cleared by the state unit's `null` push on complete).
3282
- *
3283
- * Designed to live below the Save button in the compose form so the
3284
- * visual association with the action that triggered the upload is
3285
- * direct. Uses the existing `.semiont-progress` styles in
3286
- * `packages/react-ui/src/styles/core/progress.css`.
3287
- */
3288
-
3289
- interface UploadProgressBarProps {
3290
- progress: UploadProgress | null;
3291
- /** Optional label for the "starting" / "uploaded" lines. Defaults to "Upload". */
3292
- label?: string;
3293
- }
3294
- declare function UploadProgressBar({ progress, label }: UploadProgressBarProps): React__default.ReactElement | null;
3295
-
3296
- interface ResourceDiscoveryPageProps {
3297
- recentDocuments: ResourceDescriptor[];
3298
- searchDocuments: ResourceDescriptor[];
3299
- entityTypes: string[];
3300
- isLoadingRecent: boolean;
3301
- isSearching: boolean;
3302
- searchQuery: string;
3303
- onSearchQueryChange: (query: string) => void;
3304
- theme: 'light' | 'dark';
3305
- showLineNumbers: boolean;
3306
- activePanel: string | null;
3307
- onNavigateToResource: (resourceId: string) => void;
3308
- onNavigateToCompose: () => void;
3309
- translations: {
3310
- title: string;
3311
- subtitle: string;
3312
- searchPlaceholder: string;
3313
- searchButton: string;
3314
- searching: string;
3315
- filterByEntityType: string;
3316
- all: string;
3317
- recentResources: string;
3318
- searchResults: (count: number) => string;
3319
- documentsTaggedWith: (entityType: string) => string;
3320
- noResultsFound: (query: string) => string;
3321
- noResourcesAvailable: string;
3322
- composeFirstResource: string;
3323
- archived: string;
3324
- created: string;
3325
- loadingKnowledgeBase: string;
3326
- };
3327
- ToolbarPanels: React__default.ComponentType<any>;
3328
- }
3329
- declare function ResourceDiscoveryPage({ recentDocuments, searchDocuments, entityTypes, isLoadingRecent, isSearching, searchQuery, onSearchQueryChange, theme, showLineNumbers, activePanel, onNavigateToResource, onNavigateToCompose, translations: t, ToolbarPanels, }: ResourceDiscoveryPageProps): react_jsx_runtime.JSX.Element;
3330
-
3331
- interface ResourceCardProps {
3332
- resource: ResourceDescriptor;
3333
- onOpen: (resource: ResourceDescriptor) => void;
3334
- tabIndex?: number;
3335
- archivedLabel: string;
3336
- createdLabel: string;
3337
- }
3338
- declare const ResourceCard: React__default.MemoExoticComponent<({ resource, onOpen, tabIndex, archivedLabel, createdLabel }: ResourceCardProps) => react_jsx_runtime.JSX.Element>;
3339
-
3340
- type SemiontResource = ResourceDescriptor;
3341
- interface ResourceViewerPageProps {
3342
- /**
3343
- * The resource to display
3344
- */
3345
- resource: SemiontResource;
3346
- /**
3347
- * Resource URI
3348
- */
3349
- rUri: ResourceId;
3350
- /**
3351
- * Current locale
3352
- */
3353
- locale: string;
3354
- /**
3355
- * Link component for routing
3356
- */
3357
- Link: React__default.ComponentType<any>;
3358
- /**
3359
- * Routes configuration
3360
- */
3361
- routes: any;
3362
- /**
3363
- * Component dependencies - passed from framework layer
3364
- */
3365
- ToolbarPanels: React__default.ComponentType<any>;
3366
- /**
3367
- * Callback to refetch document from parent
3368
- */
3369
- refetchDocument: () => Promise<unknown>;
3370
- /**
3371
- * Bus connection state for the active workspace. Six-valued state
3372
- * machine from `actor.state$`; CollaborationPanel maps it to the
3373
- * "Live" / "Disconnected" visual.
3374
- */
3375
- streamStatus: ConnectionState;
3376
- /**
3377
- * Name of the active knowledge base (for display in panels)
3378
- */
3379
- knowledgeBaseName?: string | undefined;
3380
- }
3381
- /**
3382
- * ResourceViewerPage - Main component
3383
- *
3384
- * Uses hooks directly (NO containers, NO render props, NO ResourceViewerPageContent wrapper)
3385
- *
3386
- * @emits nav:push - Navigate to a resource or filtered view
3387
- * @emits beckon:sparkle - Trigger sparkle animation on an annotation
3388
- * @emits bind:update-body - Update annotation body content
3389
- * @subscribes mark:archive - Archive the current resource
3390
- * @subscribes mark:unarchive - Unarchive the current resource
3391
- * @subscribes yield:clone - Clone the current resource
3392
- * @subscribes beckon:sparkle - Trigger sparkle animation
3393
- * @subscribes mark:added - Annotation was created
3394
- * @subscribes mark:removed - Annotation was deleted
3395
- * @subscribes mark:create-failed - Annotation creation failed
3396
- * @subscribes mark:delete-failed - Annotation deletion failed
3397
- * @subscribes mark:body-updated - Annotation body was updated
3398
- * @subscribes annotate:body-update-failed - Annotation body update failed
3399
- * @subscribes settings:theme-changed - UI theme changed
3400
- * @subscribes settings:line-numbers-toggled - Line numbers display toggled
3401
- * @subscribes detection:complete - Detection completed
3402
- * @subscribes detection:failed - Detection failed
3403
- * @subscribes generation:complete - Generation completed
3404
- * @subscribes generation:failed - Generation failed
3405
- * @subscribes browse:reference-navigate - Navigate to a referenced document
3406
- * @subscribes browse:entity-type-clicked - Navigate filtered by entity type
3407
- */
3408
- declare function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanels, refetchDocument, streamStatus, knowledgeBaseName, }: ResourceViewerPageProps): react_jsx_runtime.JSX.Element;
3409
-
3410
- interface HoverEmitterProps {
3411
- onMouseEnter: () => void;
3412
- onMouseLeave: () => void;
3413
- }
3414
- declare function useHoverEmitter(annotationId: AnnotationId, hoverDelayMs?: number): HoverEmitterProps;
3415
-
3416
- interface SessionStateUnit extends StateUnit {
3417
- isLoggingOut$: Observable<boolean>;
3418
- logout(): Promise<void>;
3419
- }
3420
- declare function createSessionStateUnit(client: SemiontClient): SessionStateUnit;
3421
-
3422
- interface AnnotationGroups {
3423
- highlights: Annotation[];
3424
- comments: Annotation[];
3425
- assessments: Annotation[];
3426
- references: Annotation[];
3427
- tags: Annotation[];
3428
- }
3429
- type StoredEventResponse = components['schemas']['StoredEventResponse'];
3430
- interface WizardState {
3431
- open: boolean;
3432
- annotationId: string | null;
3433
- resourceId: string | null;
3434
- defaultTitle: string;
3435
- entityTypes: string[];
3436
- }
3437
- interface ResourceViewerPageStateUnit extends StateUnit {
3438
- beckon: BeckonStateUnit;
3439
- browse: ShellStateUnit;
3440
- mark: MarkStateUnit;
3441
- gather: GatherStateUnit;
3442
- yield: YieldStateUnit;
3443
- annotations$: Observable<Annotation[]>;
3444
- annotationGroups$: Observable<AnnotationGroups>;
3445
- entityTypes$: Observable<string[]>;
3446
- events$: Observable<StoredEventResponse[]>;
3447
- referencedBy$: Observable<ReferencedByEntry[]>;
3448
- content$: Observable<string>;
3449
- contentLoading$: Observable<boolean>;
3450
- mediaToken$: Observable<string | null>;
3451
- wizard$: Observable<WizardState>;
3452
- closeWizard(): void;
3453
- }
3454
- declare function createResourceViewerPageStateUnit(client: SemiontClient, resourceId: ResourceId, locale: string, browse: ShellStateUnit, options?: {
3455
- mediaType?: string;
3456
- }): ResourceViewerPageStateUnit;
3457
-
3458
- interface ResourceLoaderStateUnit extends StateUnit {
3459
- resource$: Observable<ResourceDescriptor | undefined>;
3460
- isLoading$: Observable<boolean>;
3461
- invalidate(): void;
3462
- }
3463
- declare function createResourceLoaderStateUnit(client: SemiontClient, resourceId: ResourceId): ResourceLoaderStateUnit;
3464
-
3465
- interface AdminUsersStateUnit extends StateUnit {
3466
- browse: ShellStateUnit;
3467
- users$: Observable<unknown[]>;
3468
- stats$: Observable<unknown | null>;
3469
- usersLoading$: Observable<boolean>;
3470
- statsLoading$: Observable<boolean>;
3471
- updateUser(id: string, data: {
3472
- isAdmin?: boolean;
3473
- isActive?: boolean;
3474
- }): Promise<void>;
3475
- }
3476
- declare function createAdminUsersStateUnit(client: SemiontClient, browse: ShellStateUnit): AdminUsersStateUnit;
3477
-
3478
- interface AdminSecurityStateUnit extends StateUnit {
3479
- browse: ShellStateUnit;
3480
- providers$: Observable<unknown[]>;
3481
- allowedDomains$: Observable<string[]>;
3482
- isLoading$: Observable<boolean>;
3483
- }
3484
- declare function createAdminSecurityStateUnit(client: SemiontClient, browse: ShellStateUnit): AdminSecurityStateUnit;
3485
-
3486
- interface WelcomeStateUnit extends StateUnit {
3487
- userData$: Observable<{
3488
- termsAcceptedAt?: string;
3489
- } | null>;
3490
- isProcessing$: Observable<boolean>;
3491
- acceptTerms(): Promise<void>;
3492
- }
3493
- declare function createWelcomeStateUnit(client: SemiontClient): WelcomeStateUnit;
3494
-
3495
- interface DiscoverStateUnit extends StateUnit {
3496
- browse: ShellStateUnit;
3497
- search: SearchPipeline<ResourceDescriptor>;
3498
- recentResources$: Observable<ResourceDescriptor[]>;
3499
- entityTypes$: Observable<string[]>;
3500
- isLoadingRecent$: Observable<boolean>;
3501
- }
3502
- declare function createDiscoverStateUnit(client: SemiontClient, browse: ShellStateUnit): DiscoverStateUnit;
3503
-
3504
- interface EntityTagsStateUnit extends StateUnit {
3505
- browse: ShellStateUnit;
3506
- entityTypes$: Observable<string[]>;
3507
- isLoading$: Observable<boolean>;
3508
- newTag$: Observable<string>;
3509
- error$: Observable<string>;
3510
- isAdding$: Observable<boolean>;
3511
- setNewTag(value: string): void;
3512
- addTag(): Promise<void>;
3513
- }
3514
- declare function createEntityTagsStateUnit(client: SemiontClient, browse: ShellStateUnit): EntityTagsStateUnit;
3515
-
3516
- /**
3517
- * `ShellStateUnit` is app-scoped — it owns toolbar panel state and lives on
3518
- * the `SemiontBrowser`'s own bus. Unlike session-scoped VMs, this hook
3519
- * does not need to wait for an active KB session; `useSemiont()`
3520
- * always returns the module-scoped `SemiontBrowser` singleton.
3521
- */
3522
- declare function useShellStateUnit(): ShellStateUnit;
3523
-
3524
- /**
3525
- * Subscribe to an RxJS Observable and return its current value as React state.
3526
- *
3527
- * - For a `BehaviorSubject` (or anything with a `getValue()` method), returns
3528
- * its current value synchronously at the first render. This matters for
3529
- * callers that build derived objects in a `useState(factory)` initializer
3530
- * at first render — they need the subject's value present immediately, not
3531
- * after a second render triggered by the useEffect subscribe.
3532
- *
3533
- * We duck-type on `.getValue` rather than using `instanceof BehaviorSubject`
3534
- * because rxjs can be loaded through multiple module realms in tests (e.g.
3535
- * a bundled CJS copy inside `@semiont/react-ui/dist` vs a fresh ESM import
3536
- * in the test file), which makes `instanceof` unreliable.
3537
- * - For non-BehaviorSubject Observables, starts at `undefined` and emits
3538
- * asynchronously after the subscribe.
3539
- * - Accepts `undefined`/`null` for cases where the observable's source isn't
3540
- * ready yet (e.g. `semiont?.browse.events(rUri)` when the active session is
3541
- * still loading). In that case the hook is a no-op and returns undefined.
3542
- * - Unsubscribes automatically on unmount or when `obs$` changes.
3543
- */
3544
- declare function useObservable<T>(obs$: Observable<T> | null | undefined): T | undefined;
3545
-
3546
- export { ANNOTATORS, AVAILABLE_LOCALES, AdminDevOpsPage, type AdminDevOpsPageProps, AdminExchangePage, type AdminExchangePageProps, type AdminExchangePageTranslations, AdminSecurityPage, type AdminSecurityPageProps, type AdminSecurityStateUnit, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, type AdminUsersStateUnit, AnnotateReferencesProgressWidget, AnnotateToolbar, AnnotateView, type AnnotationConfig, type AnnotationCreationHandler, type AnnotationGroups, type AnnotationHandlers, AnnotationHistory, type AnnotationManager, AnnotationOverlay, AnnotationProvider, type AnnotationProviderProps, type AnnotationUIState, type AnnotationsCollection, type Annotator, AssessmentEntry, AssessmentPanel, AssistSection, AsyncErrorBoundary, AuthErrorDisplay, type AuthErrorDisplayProps, type AvailableLocale, type BorderRadiusToken, BrowseView, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, COMMON_PANELS, type ClickAction, type CloneData, CodeMirrorRenderer, CollaborationPanel, CollapsibleResourceNavigation, type CollapsibleResourceNavigationProps, type ColorToken, CommentEntry, CommentsPanel, ComposeLoadingState, type ComposeLoadingStateProps, type ComposeMode, type ComposePageStateUnit, type ComposeParams, type CreateAnnotationParams, type CreateConfig, type DeleteAnnotationParams, type DetectionConfig, type DevOpsFeature, type DiscoverStateUnit, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, type EntityTagsStateUnit, EntityTypeBadges, ErrorBoundary, type ExchangeStateUnit, ExportCard, type ExportCardProps, type ExportCardTranslations, Footer, HighlightEntry, HighlightPanel, HistoryEvent, type HoverEmitterProps, ImageURLSchema, ImageViewer, ImportCard, type ImportCardProps, type ImportCardTranslations, type ImportPreview, ImportProgress, type ImportProgressProps, type ImportProgressTranslations, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LinkedDataPage, type LinkedDataPageProps, type LinkedDataPageTranslations, LiveRegionProvider, type Motivation$8 as Motivation, type NavigationItem, NavigationMenu, type NavigationMenuHelper, type NavigationProps, type OAuthProvider, type OAuthUser, OAuthUserSchema, ObservableLink, type ObservableLinkProps, type OverlayAnnotation, PageLayout, PanelHeader, PermissionDeniedModal, PopupContainer, PopupHeader, ProtectedErrorBoundary, RESOURCE_PANELS, RecentDocumentsPage, type RecentDocumentsPageProps, type ReferenceData, ReferenceEntry, ReferenceResolutionWidget, ReferenceWizardModal, type ReferenceWizardModalProps, ReferencesPanel, ResizeHandle, type ResolvedTheme, ResourceAnnotationsProvider, ResourceCard, type ResourceCardProps, ResourceComposePage, type ResourceComposePageProps, ResourceDiscoveryPage, type ResourceDiscoveryPageProps, ResourceErrorState, type ResourceErrorStateProps, ResourceInfoPanel, type ResourceLoaderStateUnit, ResourceLoadingState, ResourceSearchModal, type ResourceSearchModalProps, ResourceTagsInline, ResourceViewer, ResourceViewerPage, type ResourceViewerPageProps, type ResourceViewerPageStateUnit, type RouteBuilder, type SaveResourceParams$1 as SaveResourceParams, SearchModal, type SearchModalProps, SelectedTextDisplay, type SelectionMotivation, type SelectorType, SemiontBranding, SemiontFavicon, SemiontProvider, type SemiontProviderProps, type SemiontResource$2 as SemiontResource, SessionExpiredModal, SessionExpiryBanner, type SessionStateUnit, SessionTimer, SettingsPanel, type ShadowToken, type ShapeType, type ShellStateUnit, type ShellStateUnitOptions, SignInForm, type SignInFormProps, SignUpForm, type SignUpFormProps, SimpleNavigation, type SimpleNavigationItem, type SimpleNavigationProps, SkipLinks, SortableResourceTab, type SortableResourceTabProps, type SpacingToken, StatisticsPanel, StatusDisplay, SvgDrawingCanvas, TagEntry, TagSchemasPage, type TagSchemasPageProps, TaggingPanel, type TextSegment, type TextSelection, type Theme, ThemeProvider, ToastContainer, type ToastMessage, ToastProvider, type ToastType, Toolbar, type ToolbarPanelType, type TransitionToken, TranslationManager, TranslationProvider, type TranslationProviderProps, type TypographyToken, type UICreateAnnotationParams, UnifiedAnnotationsPanel, UnifiedHeader, UploadProgressBar, type UploadProgressBarProps, type UseResourceContentResult, UserMenuSkeleton, WebBrowserStorage, WelcomePage, type WelcomePageProps, type WelcomeStateUnit, type WizardState, applyHighlights, buildSourceToRenderedMap, buildTextNodeIndex, buttonStyles, clearHighlights, createAdminSecurityStateUnit, createAdminUsersStateUnit, createComposePageStateUnit, createDiscoverStateUnit, createEntityTagsStateUnit, createExchangeStateUnit, createResourceLoaderStateUnit, createResourceViewerPageStateUnit, createSessionStateUnit, createShellStateUnit, createWelcomeStateUnit, cssVariables, faviconPaths, formatTime, generateCSSVariables, getResourceIcon, getSelectedShapeForSelectorType, getSelectorType, getShortcutDisplay, getSupportedShapes, hideWidgetPreview, isShapeSupported, jsonLightHighlightStyle, jsonLightTheme, resolveAnnotationRanges, sanitizeImageURL, saveSelectedShapeForSelectorType, showWidgetPreview, supportsDetection, toOverlayAnnotations, tokens, useAnnotationManager, useDebounce, useDebouncedCallback, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEventSubscription, useEventSubscriptions, useFormAnnouncements, useHoverDelay, useHoverEmitter, useIsTyping, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useObservable, useObservableExternalNavigation, useObservableRouter, usePanelWidth, usePreloadTranslations, useResourceAnnotations, useResourceContent, useResourceLoadingAnnouncements, useRovingTabIndex, useSearchAnnouncements, useSemiont, useSessionExpiry, useShellStateUnit, useStateUnit, useTheme, useToast, useTranslations };