@semiont/react-ui 0.5.22 → 0.5.24
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.
- package/dist/{ar-ZHKO4XDR.js → ar-JRTKCMTF.js} +11 -4
- package/dist/ar-JRTKCMTF.js.map +1 -0
- package/dist/{bn-3BUDKAK5.js → bn-LO6EDSCC.js} +11 -4
- package/dist/bn-LO6EDSCC.js.map +1 -0
- package/dist/{chunk-PFUXQPWJ.js → chunk-4QMTEPQ3.js} +92 -60
- package/dist/chunk-4QMTEPQ3.js.map +1 -0
- package/dist/{chunk-R52YAGHK.js → chunk-5Y5JDCKC.js} +11 -4
- package/dist/chunk-5Y5JDCKC.js.map +1 -0
- package/dist/{cs-2EFEUKTW.js → cs-LCHHOR4O.js} +11 -4
- package/dist/cs-LCHHOR4O.js.map +1 -0
- package/dist/{da-SUD3Q44Q.js → da-TARGPMJR.js} +11 -4
- package/dist/da-TARGPMJR.js.map +1 -0
- package/dist/{de-6IC5QRX7.js → de-SBH4QBPJ.js} +11 -4
- package/dist/de-SBH4QBPJ.js.map +1 -0
- package/dist/{el-Q4NAXFRC.js → el-2D2OLGWB.js} +11 -4
- package/dist/el-2D2OLGWB.js.map +1 -0
- package/dist/{en-P2L4X27N.js → en-QFIEG3CA.js} +2 -2
- package/dist/{es-YUKZBD4W.js → es-U6YK2LX6.js} +11 -4
- package/dist/es-U6YK2LX6.js.map +1 -0
- package/dist/{fa-OJ47LILE.js → fa-S7SZE37M.js} +11 -4
- package/dist/fa-S7SZE37M.js.map +1 -0
- package/dist/{fi-QFFL5CUB.js → fi-CBL3NIXN.js} +11 -4
- package/dist/fi-CBL3NIXN.js.map +1 -0
- package/dist/{fr-BOQZZWP4.js → fr-EABUHV6S.js} +11 -4
- package/dist/fr-EABUHV6S.js.map +1 -0
- package/dist/{he-LXDY3TFA.js → he-THWD244Y.js} +11 -4
- package/dist/he-THWD244Y.js.map +1 -0
- package/dist/{hi-HOJER77V.js → hi-GHGFZJ44.js} +11 -4
- package/dist/hi-GHGFZJ44.js.map +1 -0
- package/dist/{id-I5WQ6EWD.js → id-POZOUMDW.js} +11 -4
- package/dist/id-POZOUMDW.js.map +1 -0
- package/dist/index.d.ts +269 -69
- package/dist/index.js +2080 -1861
- package/dist/index.js.map +1 -1
- package/dist/{it-UYH642IJ.js → it-KDYJADSH.js} +11 -4
- package/dist/it-KDYJADSH.js.map +1 -0
- package/dist/{ja-JTVWAC4L.js → ja-Z5Z6ZF3P.js} +11 -4
- package/dist/ja-Z5Z6ZF3P.js.map +1 -0
- package/dist/{ko-IHXFMOIZ.js → ko-7X3XUXRN.js} +11 -4
- package/dist/ko-7X3XUXRN.js.map +1 -0
- package/dist/{ms-JH25VFLO.js → ms-BTWEIW43.js} +11 -4
- package/dist/ms-BTWEIW43.js.map +1 -0
- package/dist/{nl-SURXW7IQ.js → nl-IS2CGF5I.js} +11 -4
- package/dist/nl-IS2CGF5I.js.map +1 -0
- package/dist/{no-HXIKQFDZ.js → no-AAMEVA26.js} +11 -4
- package/dist/no-AAMEVA26.js.map +1 -0
- package/dist/{pl-7A4KU6XK.js → pl-PVXUQYFT.js} +11 -4
- package/dist/pl-PVXUQYFT.js.map +1 -0
- package/dist/{pt-6MGYP7Q5.js → pt-3ITQ76TL.js} +11 -4
- package/dist/pt-3ITQ76TL.js.map +1 -0
- package/dist/{ro-IROCHNIA.js → ro-FRB4IIVS.js} +11 -4
- package/dist/ro-FRB4IIVS.js.map +1 -0
- package/dist/{sv-WDJD75CV.js → sv-DS3RO24M.js} +11 -4
- package/dist/sv-DS3RO24M.js.map +1 -0
- package/dist/test-utils.js +9 -3
- package/dist/test-utils.js.map +1 -1
- package/dist/{th-RIO2E6B3.js → th-AX66MWWB.js} +11 -4
- package/dist/th-AX66MWWB.js.map +1 -0
- package/dist/{tr-TZ7ERCIN.js → tr-7KTB67TT.js} +11 -4
- package/dist/tr-7KTB67TT.js.map +1 -0
- package/dist/{uk-ZFWDKLUE.js → uk-SMQS2MAQ.js} +11 -4
- package/dist/uk-SMQS2MAQ.js.map +1 -0
- package/dist/{vi-UIOSP2JG.js → vi-D3JXL2EZ.js} +11 -4
- package/dist/vi-D3JXL2EZ.js.map +1 -0
- package/dist/{zh-6R6YUY46.js → zh-S754AWFS.js} +11 -4
- package/dist/zh-S754AWFS.js.map +1 -0
- package/package.json +4 -4
- package/src/components/annotation-popups/JsonLdView.tsx +1 -1
- package/src/components/annotation-popups/__tests__/JsonLdView.test.tsx +8 -2
- package/src/components/modals/ReferenceWizardModal.tsx +2 -1
- package/src/components/modals/ResourceGenerateModal.tsx +10 -4
- package/src/components/modals/ResourceSearchModal.tsx +3 -1
- package/src/components/modals/SearchModal.tsx +3 -1
- package/src/components/modals/__tests__/ResourceGenerateModal.test.tsx +5 -0
- package/src/components/modals/__tests__/ResourceSearchModal.test.tsx +2 -1
- package/src/components/modals/__tests__/SearchModal.search-wiring.test.tsx +2 -1
- package/src/components/resource/AnnotateView.tsx +70 -138
- package/src/components/resource/AnnotationHistory.tsx +53 -17
- package/src/components/resource/BrowseView.tsx +3 -2
- package/src/components/resource/ResourceViewer.tsx +39 -22
- package/src/components/resource/__tests__/AnnotateView.registry.test.tsx +114 -0
- package/src/components/resource/__tests__/AnnotationHistory.test.tsx +63 -41
- package/src/components/resource/__tests__/BrowseView.reference-hover.test.tsx +2 -1
- package/src/components/resource/__tests__/ResourceViewer.multi-mount-invalidation.test.tsx +140 -0
- package/src/components/resource/__tests__/ResourceViewer.registry.test.tsx +89 -0
- package/src/components/resource/annotate-renderers.tsx +155 -0
- package/src/components/resource/panels/JsonLdPanel.tsx +1 -1
- package/src/components/resource/panels/ReferencesPanel.tsx +38 -3
- package/src/components/resource/panels/TagEntry.tsx +5 -1
- package/src/components/resource/panels/TaggingPanel.tsx +6 -1
- package/src/components/resource/panels/UnifiedAnnotationsPanel.tsx +41 -0
- package/src/components/resource/panels/__tests__/JsonLdPanel.test.tsx +8 -2
- package/src/components/resource/panels/__tests__/ReferencesPanel.headless.test.tsx +90 -0
- package/src/components/resource/panels/__tests__/TagEntry.test.tsx +2 -2
- package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +2 -2
- package/src/components/resource/panels/__tests__/UnifiedAnnotationsPanel.failure.test.tsx +78 -0
- package/src/components/settings/SettingsPanel.tsx +6 -2
- package/src/components/settings/__tests__/SettingsPanel.test.tsx +28 -3
- package/src/features/admin-devops/__tests__/AdminDevOpsPage.test.tsx +3 -11
- package/src/features/admin-devops/components/AdminDevOpsPage.tsx +0 -3
- package/src/features/admin-exchange/__tests__/AdminExchangePage.test.tsx +0 -1
- package/src/features/admin-exchange/components/AdminExchangePage.tsx +0 -3
- package/src/features/admin-exchange/state/__tests__/exchange-state-unit.test.ts +1 -1
- package/src/features/admin-security/__tests__/AdminSecurityPage.test.tsx +0 -8
- package/src/features/admin-security/components/AdminSecurityPage.tsx +0 -3
- package/src/features/admin-security/state/__tests__/admin-security-state-unit.test.ts +10 -9
- package/src/features/admin-security/state/admin-security-state-unit.ts +3 -2
- package/src/features/admin-users/__tests__/AdminUsersPage.test.tsx +0 -1
- package/src/features/admin-users/components/AdminUsersPage.tsx +0 -3
- package/src/features/admin-users/state/__tests__/admin-users-state-unit.test.ts +7 -6
- package/src/features/admin-users/state/admin-users-state-unit.ts +3 -2
- package/src/features/auth-welcome/state/__tests__/welcome-state-unit.test.ts +36 -26
- package/src/features/auth-welcome/state/welcome-state-unit.ts +7 -2
- package/src/features/moderate-entity-tags/__tests__/EntityTagsPage.test.tsx +0 -2
- package/src/features/moderate-entity-tags/components/EntityTagsPage.tsx +0 -3
- package/src/features/moderate-entity-tags/state/__tests__/entity-tags-state-unit.test.ts +37 -12
- package/src/features/moderate-entity-tags/state/entity-tags-state-unit.ts +9 -10
- package/src/features/moderate-recent/__tests__/RecentDocumentsPage.test.tsx +3 -5
- package/src/features/moderate-recent/components/RecentDocumentsPage.tsx +0 -3
- package/src/features/moderate-tag-schemas/__tests__/TagSchemasPage.test.tsx +3 -5
- package/src/features/moderate-tag-schemas/components/TagSchemasPage.tsx +0 -3
- package/src/features/moderation-linked-data/__tests__/LinkedDataPage.test.tsx +0 -1
- package/src/features/moderation-linked-data/components/LinkedDataPage.tsx +0 -3
- package/src/features/resource-compose/__tests__/ResourceComposePage.test.tsx +17 -7
- package/src/features/resource-compose/components/ResourceComposePage.tsx +5 -3
- package/src/features/resource-compose/state/__tests__/compose-page-state-unit.test.ts +33 -12
- package/src/features/resource-compose/state/compose-page-state-unit.ts +9 -8
- package/src/features/resource-discovery/__tests__/ResourceDiscoveryPage.test.tsx +3 -2
- package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +25 -3
- package/src/features/resource-discovery/state/__tests__/discover-state-unit.test.ts +90 -25
- package/src/features/resource-discovery/state/discover-state-unit.ts +30 -30
- package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +9 -5
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +70 -40
- package/src/features/resource-viewer/state/__tests__/resource-loader-state-unit.test.ts +111 -8
- package/src/features/resource-viewer/state/__tests__/resource-viewer-page-state-unit.test.ts +167 -27
- package/src/features/resource-viewer/state/resource-loader-state-unit.ts +74 -9
- package/src/features/resource-viewer/state/resource-viewer-page-state-unit.ts +29 -28
- package/translations/ar.json +10 -3
- package/translations/bn.json +10 -3
- package/translations/cs.json +10 -3
- package/translations/da.json +10 -3
- package/translations/de.json +10 -3
- package/translations/el.json +10 -3
- package/translations/en.json +10 -3
- package/translations/es.json +10 -3
- package/translations/fa.json +10 -3
- package/translations/fi.json +10 -3
- package/translations/fr.json +10 -3
- package/translations/he.json +10 -3
- package/translations/hi.json +10 -3
- package/translations/id.json +10 -3
- package/translations/it.json +10 -3
- package/translations/ja.json +10 -3
- package/translations/ko.json +10 -3
- package/translations/ms.json +10 -3
- package/translations/nl.json +10 -3
- package/translations/no.json +10 -3
- package/translations/pl.json +10 -3
- package/translations/pt.json +10 -3
- package/translations/ro.json +10 -3
- package/translations/sv.json +10 -3
- package/translations/th.json +10 -3
- package/translations/tr.json +10 -3
- package/translations/uk.json +10 -3
- package/translations/vi.json +10 -3
- package/translations/zh.json +10 -3
- package/dist/ar-ZHKO4XDR.js.map +0 -1
- package/dist/bn-3BUDKAK5.js.map +0 -1
- package/dist/chunk-PFUXQPWJ.js.map +0 -1
- package/dist/chunk-R52YAGHK.js.map +0 -1
- package/dist/cs-2EFEUKTW.js.map +0 -1
- package/dist/da-SUD3Q44Q.js.map +0 -1
- package/dist/de-6IC5QRX7.js.map +0 -1
- package/dist/el-Q4NAXFRC.js.map +0 -1
- package/dist/es-YUKZBD4W.js.map +0 -1
- package/dist/fa-OJ47LILE.js.map +0 -1
- package/dist/fi-QFFL5CUB.js.map +0 -1
- package/dist/fr-BOQZZWP4.js.map +0 -1
- package/dist/he-LXDY3TFA.js.map +0 -1
- package/dist/hi-HOJER77V.js.map +0 -1
- package/dist/id-I5WQ6EWD.js.map +0 -1
- package/dist/it-UYH642IJ.js.map +0 -1
- package/dist/ja-JTVWAC4L.js.map +0 -1
- package/dist/ko-IHXFMOIZ.js.map +0 -1
- package/dist/ms-JH25VFLO.js.map +0 -1
- package/dist/nl-SURXW7IQ.js.map +0 -1
- package/dist/no-HXIKQFDZ.js.map +0 -1
- package/dist/pl-7A4KU6XK.js.map +0 -1
- package/dist/pt-6MGYP7Q5.js.map +0 -1
- package/dist/ro-IROCHNIA.js.map +0 -1
- package/dist/sv-WDJD75CV.js.map +0 -1
- package/dist/th-RIO2E6B3.js.map +0 -1
- package/dist/tr-TZ7ERCIN.js.map +0 -1
- package/dist/uk-ZFWDKLUE.js.map +0 -1
- package/dist/vi-UIOSP2JG.js.map +0 -1
- package/dist/zh-6R6YUY46.js.map +0 -1
- /package/dist/{en-P2L4X27N.js.map → en-QFIEG3CA.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../translations/zh.json"],"sourcesContent":["{\n \"Toolbar\": {\n \"annotations\": \"注释\",\n \"history\": \"历史\",\n \"resourceInfo\": \"资源信息\",\n \"collaboration\": \"协作\",\n \"userAccount\": \"用户帐户\",\n \"settings\": \"设置\",\n \"knowledgeBase\": \"知识库\"\n },\n \"ResourceInfoPanel\": {\n \"title\": \"资源信息\",\n \"locale\": \"区域设置\",\n \"notSpecified\": \"未指定\",\n \"entityTypeTags\": \"实体类型标签\",\n \"representation\": \"表示形式\",\n \"mediaType\": \"媒体类型\",\n \"byteSize\": \"大小\",\n \"storageUri\": \"存储\",\n \"clone\": \"克隆\",\n \"cloneDescription\": \"为此资源生成可共享的克隆链接\",\n \"generate\": \"生成\",\n \"generateDescription\": \"根据此资源的上下文生成新资源\",\n \"archive\": \"归档\",\n \"archiveDescription\": \"将此资源移至已归档状态\",\n \"unarchive\": \"取消归档\",\n \"unarchiveDescription\": \"将此资源恢复为活跃状态\",\n \"provenance\": \"来源\",\n \"createdAt\": \"创建时间\",\n \"modifiedAt\": \"修改时间\",\n \"attributedTo\": \"归属于\",\n \"derivedFrom\": \"派生自\"\n },\n \"CollaborationPanel\": {\n \"title\": \"协作\",\n \"connectionStatus\": \"连接状态\",\n \"live\": \"实时\",\n \"disconnected\": \"已断开\",\n \"events\": \"{{count}} 个事件\",\n \"lastSync\": \"上次同步:\",\n \"noActivity\": \"暂无活动\",\n \"justNow\": \"刚刚\",\n \"secondsAgo\": \"{{count}} 秒前\",\n \"minuteAgo\": \"1 分钟前\",\n \"minutesAgo\": \"{{count}} 分钟前\",\n \"hourAgo\": \"1 小时前\",\n \"hoursAgo\": \"{{count}} 小时前\",\n \"realtimeActive\": \"实时更新已激活\",\n \"reconnecting\": \"正在重新连接服务器...\",\n \"sharing\": \"共享\",\n \"collaborationComingSoon\": \"协作功能即将推出\"\n },\n \"AnnotationHistory\": {\n \"history\": \"历史\",\n \"loading\": \"加载中...\",\n \"user\": \"用户\",\n \"viewOriginal\": \"查看原文\",\n \"viewAnnotation\": \"查看注释:{{content}}\",\n \"resourceCreated\": \"已创建资源\",\n \"resourceCloned\": \"已克隆\",\n \"resourceArchived\": \"已归档\",\n \"resourceUnarchived\": \"已取消归档\",\n \"highlightAdded\": \"已添加高亮\",\n \"highlightRemoved\": \"已移除高亮\",\n \"referenceCreated\": \"已创建引用\",\n \"referenceResolved\": \"已解析引用\",\n \"referenceDeleted\": \"已删除引用\",\n \"entitytagAdded\": \"已添加标签\",\n \"entitytagRemoved\": \"已移除标签\",\n \"assessmentAdded\": \"已添加评估\",\n \"assessmentRemoved\": \"已移除评估\",\n \"annotationAdded\": \"已添加注释\",\n \"annotationRemoved\": \"已移除注释\",\n \"annotationBodyUpdated\": \"已更新注释\",\n \"jobEvent\": \"任务事件\",\n \"embeddingComputed\": \"嵌入计算完成\",\n \"justNow\": \"刚刚\",\n \"minutesAgo\": \"{{count}}分钟前\",\n \"hoursAgo\": \"{{count}}小时前\",\n \"daysAgo\": \"{{count}}天前\",\n \"failed\": \"无法加载历史。\",\n \"retry\": \"重试\"\n },\n \"CommentsPanel\": {\n \"title\": \"评论\",\n \"noComments\": \"暂无评论。选择文本并点击评论来添加。\",\n \"commentPlaceholder\": \"在此输入您的评论...\",\n \"save\": \"保存\",\n \"cancel\": \"取消\",\n \"edit\": \"编辑\",\n \"annotateComments\": \"注释评论\",\n \"instructions\": \"说明\",\n \"optional\": \"(可选)\",\n \"instructionsPlaceholder\": \"例如,关注技术术语...\",\n \"annotate\": \"注释\",\n \"annotating\": \"正在注释...\",\n \"toneLabel\": \"语气\",\n \"toneOptional\": \"(可选)\",\n \"toneScholarly\": \"学术\",\n \"toneExplanatory\": \"解释性\",\n \"toneConversational\": \"对话式\",\n \"toneTechnical\": \"技术性\",\n \"densityLabel\": \"密度\",\n \"densitySparse\": \"稀疏\",\n \"densityDense\": \"密集\",\n \"fragmentSelected\": \"已选择片段\",\n \"imageRegionSelected\": \"已选择图像区域\",\n \"closeProgress\": \"关闭\"\n },\n \"HighlightPanel\": {\n \"title\": \"高亮\",\n \"noHighlights\": \"暂无高亮。使用 AI 注释查找重要段落。\",\n \"annotateHighlights\": \"注释高亮\",\n \"instructions\": \"说明\",\n \"optional\": \"(可选)\",\n \"instructionsPlaceholder\": \"例如,关注关键技术概念...\",\n \"annotate\": \"注释\",\n \"annotating\": \"正在注释...\",\n \"cancel\": \"取消\",\n \"densityLabel\": \"密度\",\n \"densitySparse\": \"稀疏\",\n \"densityDense\": \"密集\",\n \"closeProgress\": \"关闭\"\n },\n \"AssessmentPanel\": {\n \"title\": \"评估\",\n \"noAssessments\": \"暂无评估。使用 AI 注释评价段落。\",\n \"assessmentPlaceholder\": \"在此输入您的评估...\",\n \"save\": \"保存\",\n \"cancel\": \"取消\",\n \"annotateAssessments\": \"注释评估\",\n \"instructions\": \"说明\",\n \"optional\": \"(可选)\",\n \"instructionsPlaceholder\": \"例如,评估声明的准确性和证据...\",\n \"annotate\": \"注释\",\n \"annotating\": \"正在注释...\",\n \"toneLabel\": \"语气\",\n \"toneOptional\": \"(可选)\",\n \"toneAnalytical\": \"分析性\",\n \"toneCritical\": \"批判性\",\n \"toneBalanced\": \"平衡\",\n \"toneConstructive\": \"建设性\",\n \"densityLabel\": \"密度\",\n \"densitySparse\": \"稀疏\",\n \"densityDense\": \"密集\",\n \"fragmentSelected\": \"已选择片段\",\n \"imageRegionSelected\": \"已选择图像区域\",\n \"closeProgress\": \"关闭\"\n },\n \"TaggingPanel\": {\n \"title\": \"标签\",\n \"noTags\": \"暂无标签。使用 AI 注释识别结构角色。\",\n \"noSchemas\": \"此知识库尚未注册任何标签模式。KB 管理员必须先注册至少一个结构分析模式(例如通过 `register-tag-schemas` 技能),然后才能使用标签功能。\",\n \"annotateTags\": \"注释标签\",\n \"selectSchema\": \"选择框架\",\n \"selectCategories\": \"选择分类\",\n \"annotate\": \"注释\",\n \"annotating\": \"正在注释...\",\n \"cancel\": \"取消\",\n \"selectAll\": \"全选\",\n \"deselectAll\": \"取消全选\",\n \"categoriesSelected\": \"{count, plural, =0 {未选择分类} =1 {已选择 1 个分类} other {已选择 # 个分类}}\",\n \"createTagForSelection\": \"为选择内容创建标签\",\n \"selectCategory\": \"选择分类\",\n \"chooseCategory\": \"选择一个分类...\",\n \"fragmentSelected\": \"已选择片段\",\n \"imageRegionSelected\": \"已选择图像区域\"\n },\n \"UnifiedAnnotationsPanel\": {\n \"title\": \"注释\",\n \"statistics\": \"统计\",\n \"highlight\": \"高亮\",\n \"reference\": \"引用\",\n \"assessment\": \"评估\",\n \"comment\": \"评论\",\n \"tag\": \"标签\",\n \"annotationsFailed\": \"无法加载注释。\",\n \"retry\": \"重试\"\n },\n \"StatisticsPanel\": {\n \"title\": \"统计\",\n \"highlights\": \"高亮\",\n \"comments\": \"评论\",\n \"assessments\": \"评估\",\n \"tags\": \"标签\",\n \"references\": \"引用\",\n \"stub\": \"存根\",\n \"resolved\": \"已解析\",\n \"entityTypes\": \"实体类型\"\n },\n \"ReferencesPanel\": {\n \"title\": \"引用\",\n \"noReferences\": \"暂无引用。选择文本以创建对其他资源的引用。\",\n \"outgoingReferences\": \"外部引用\",\n \"incomingReferences\": \"传入引用\",\n \"noIncomingReferences\": \"无传入引用\",\n \"stub\": \"存根引用(未链接)\",\n \"resolved\": \"已解析引用(已链接)\",\n \"open\": \"打开\",\n \"unlink\": \"取消链接\",\n \"resolve\": \"解析引用\",\n \"cancel\": \"取消\",\n \"createReference\": \"创建引用\",\n \"entityTypesOptional\": \"实体类型(可选)\",\n \"fragmentSelected\": \"已选择片段\",\n \"imageRegionSelected\": \"已选择图像区域\",\n \"annotateReferences\": \"注释引用\",\n \"selectEntityTypes\": \"实体类型:\",\n \"select\": \"选择\",\n \"deselect\": \"取消选择\",\n \"noEntityTypes\": \"没有可用的实体类型\",\n \"typesSelected\": \"{count, plural, =1 {已选择 1 个类型} other {已选择 # 个类型}}\",\n \"annotate\": \"注释\",\n \"annotating\": \"正在注释...\",\n \"includeDescriptiveReferences\": \"包含描述性引用\",\n \"descriptiveReferencesTooltip\": \"同时查找诸如「首席执行官」、「科技巨头」、「物理学家」等短语(除名称外)\",\n \"annotationProgressTitle\": \"正在注释实体引用\",\n \"cancelAnnotation\": \"取消注释\",\n \"found\": \"找到 {{count}} 个\",\n \"complete\": \"注释完成!\",\n \"failed\": \"注释失败\",\n \"current\": \"当前:{{entityType}}\",\n \"closeProgress\": \"关闭\",\n \"loading\": \"加载中...\",\n \"loadingEllipsis\": \"加载中...\",\n \"untitledResource\": \"无标题资源\",\n \"noText\": \"无文本\",\n \"incomingReferencesFailed\": \"无法加载传入引用。\",\n \"retry\": \"重试\",\n \"entityTypesFailed\": \"无法加载实体类型。\"\n },\n \"KeyboardShortcuts\": {\n \"title\": \"键盘快捷键\",\n \"closeDialog\": \"关闭对话框\",\n \"or\": \"或\",\n \"navigationTitle\": \"导航\",\n \"navOpenSearch\": \"打开全局搜索\",\n \"navOpenSearchAlt\": \"打开全局搜索(备选方式)\",\n \"navCreateResource\": \"创建新资源\",\n \"navCloseOverlays\": \"关闭所有覆盖层(双击)\",\n \"navShowHelp\": \"显示键盘快捷键帮助\",\n \"sidebarTitle\": \"知识侧边栏\",\n \"sidebarCollapse\": \"折叠侧边栏\",\n \"sidebarExpand\": \"展开侧边栏\",\n \"sidebarPickup\": \"拾取资源标签页(聚焦时)\",\n \"sidebarMove\": \"移动资源标签页(拖动时)\",\n \"sidebarDrop\": \"放下资源标签页(拖动时)\",\n \"sidebarCancel\": \"取消拖动操作\",\n \"annotationsTitle\": \"资源注释\",\n \"annotHighlight\": \"从注释创建高亮(直接)\",\n \"annotReference\": \"打开注释的引用弹窗\",\n \"annotDelete\": \"删除聚焦的注释\",\n \"annotNavigate\": \"浏览注释\",\n \"annotNavigateBack\": \"向后浏览注释\",\n \"listsTitle\": \"列表与网格\",\n \"listsFilterNav\": \"浏览实体类型筛选器\",\n \"listsGridNav\": \"浏览资源网格\",\n \"listsJumpFirst\": \"跳转到第一项\",\n \"listsJumpLast\": \"跳转到最后一项\",\n \"searchModalTitle\": \"在搜索模态框中\",\n \"searchNav\": \"浏览搜索结果\",\n \"searchSelect\": \"选择结果\",\n \"searchClose\": \"关闭搜索\",\n \"modalTitle\": \"模态框控制\",\n \"modalClose\": \"关闭活动模态框\",\n \"modalNavForward\": \"向前浏览按钮\",\n \"modalNavBackward\": \"向后浏览按钮\",\n \"modalActivate\": \"激活聚焦的按钮\",\n \"accessibilityTitle\": \"无障碍\",\n \"a11ySkipLinks\": \"导航到跳转链接(在页面顶部时)\",\n \"a11yFollowLink\": \"跟随跳转链接\",\n \"macNote\": \"使用 Mac 键盘快捷键。Command 是 Command 键。\",\n \"windowsNote\": \"使用 Windows/Linux 键盘快捷键。Ctrl 是 Ctrl 键。\",\n \"footerHint\": \"随时按 {{key}} 显示此帮助\",\n \"close\": \"关闭\"\n },\n \"AnnotateToolbar\": {\n \"modeGroup\": \"模式\",\n \"browse\": \"浏览\",\n \"annotate\": \"注释\",\n \"selectionGroup\": \"动机\",\n \"clickGroup\": \"点击\",\n \"shapeGroup\": \"形状\",\n \"none\": \"无\",\n \"linking\": \"引用\",\n \"highlighting\": \"高亮\",\n \"assessing\": \"评估\",\n \"commenting\": \"评论\",\n \"tagging\": \"标签\",\n \"detail\": \"详情\",\n \"follow\": \"跟随\",\n \"deleting\": \"删除\",\n \"jsonld\": \"JSON-LD\",\n \"rectangle\": \"矩形\",\n \"circle\": \"圆形\",\n \"polygon\": \"多边形\"\n },\n \"CollapsibleResourceNavigation\": {\n \"title\": \"导航\",\n \"collapseSidebar\": \"折叠侧边栏\",\n \"expandSidebar\": \"展开侧边栏\",\n \"dragToReorder\": \"拖动以重新排序\",\n \"dragToReorderDoc\": \"拖动以重新排序 {{name}}\",\n \"closeResource\": \"关闭资源\",\n \"dragInstructions\": \"要重新排序资源:使用 Tab 导航到资源。按 Alt+上箭头向上移动或 Alt+下箭头向下移动。对于拖放操作:按空格键拾取项目。使用方向键移动它。再次按空格键放下。\"\n },\n \"ResourceViewer\": {\n \"deleteConfirmationTitle\": \"删除注释\",\n \"deleteConfirmationMessage\": \"您确定要删除此注释吗?此操作无法撤消。\",\n \"deleteConfirmationCancel\": \"取消\",\n \"deleteConfirmationDelete\": \"删除\"\n },\n \"Settings\": {\n \"title\": \"设置\",\n \"lineNumbers\": \"行号\",\n \"lineNumbersVisible\": \"显示\",\n \"lineNumbersHidden\": \"隐藏\",\n \"theme\": \"主题\",\n \"themeLight\": \"浅色\",\n \"themeDark\": \"深色\",\n \"themeSystem\": \"系统\",\n \"themeSystemActive\": \"系统({{mode}})\",\n \"themeModeActive\": \"使用{{mode}}模式\",\n \"language\": \"语言\",\n \"languageHint\": \"在主导航中更改语言\",\n \"languageChanging\": \"正在更改语言...\",\n \"hoverDelay\": \"悬停延迟\",\n \"hoverDelayFast\": \"快速\",\n \"hoverDelaySlow\": \"慢速\",\n \"hoverDelayDescription\": \"悬停效果出现前延迟 {{delay}}ms\"\n },\n \"AnnotateView\": {},\n \"ResourceGenerate\": {\n \"gatherTitle\": \"配置收集\",\n \"reviewTitle\": \"查看上下文\",\n \"configureTitle\": \"配置生成\",\n \"next\": \"下一步\",\n \"back\": \"返回\",\n \"cancel\": \"取消\",\n \"gatherIntro\": \"选择要包含在收集的上下文中的内容。\",\n \"includeContent\": \"包含资源内容\",\n \"includeSummary\": \"包含摘要\",\n \"gatherDepth\": \"深度\",\n \"gatherMaxResources\": \"最大资源数\",\n \"gatherButton\": \"收集\",\n \"excludeLabel\": \"从召回中排除\",\n \"loadingContext\": \"正在收集上下文...\",\n \"failedContext\": \"收集上下文失败\",\n \"sourceContextLabel\": \"资源\",\n \"connectionsLabel\": \"连接\",\n \"citedByLabel\": \"被引用\",\n \"resourceTitle\": \"新资源标题\",\n \"resourceTitlePlaceholder\": \"生成资源的标题...\",\n \"additionalInstructions\": \"附加说明\",\n \"additionalInstructionsPlaceholder\": \"生成的可选指导...\",\n \"language\": \"语言\",\n \"languageHelp\": \"生成资源的语言\",\n \"creativity\": \"创造力\",\n \"creativityFocused\": \"专注\",\n \"creativityCreative\": \"创造性\",\n \"maxLength\": \"最大长度\",\n \"maxLengthHelp\": \"最大令牌数\",\n \"generate\": \"生成\",\n \"progressTitle\": \"正在生成资源\",\n \"progressCancel\": \"取消生成\",\n \"progressInProgress\": \"正在生成…\",\n \"progressComplete\": \"生成完成!\",\n \"progressFailed\": \"生成失败\"\n },\n \"ReferenceWizard\": {\n \"gatherTitle\": \"已收集的上下文\",\n \"configureGenerationTitle\": \"配置生成\",\n \"configureSearchTitle\": \"配置搜索\",\n \"searchResultsTitle\": \"搜索结果\",\n \"sourceContextLabel\": \"资源中的注释上下文\",\n \"connectionsLabel\": \"对等注释\",\n \"citedByLabel\": \"资源被引用\",\n \"userHintLabel\": \"提示\",\n \"userHintPlaceholder\": \"描述此注释所指的内容...\",\n \"loadingContext\": \"正在收集上下文...\",\n \"failedContext\": \"收集上下文失败\",\n \"cancel\": \"取消\",\n \"generate\": \"生成\",\n \"compose\": \"编写\",\n \"resolutionStrategyLabel\": \"解析策略\",\n \"back\": \"返回\",\n \"link\": \"链接\",\n \"score\": \"评分\",\n \"noResults\": \"未找到结果\",\n \"resourceTitle\": \"资源标题\",\n \"resourceTitlePlaceholder\": \"输入资源标题...\",\n \"additionalInstructions\": \"附加说明\",\n \"additionalInstructionsPlaceholder\": \"输入附加说明...\",\n \"language\": \"语言\",\n \"languageHelp\": \"生成内容的语言\",\n \"creativity\": \"创造力\",\n \"creativityFocused\": \"专注\",\n \"creativityCreative\": \"创造性\",\n \"maxLength\": \"最大长度\",\n \"maxLengthHelp\": \"最大令牌数\",\n \"maxResults\": \"最大结果数\",\n \"semanticScoring\": \"语义评分\",\n \"semanticScoringHelp\": \"使用 AI 按语义相关性对结果进行评分\",\n \"searching\": \"搜索中...\",\n \"search\": \"搜索\"\n }\n}\n"],"mappings":";;;;AACE,cAAW;AAAA,EACT,aAAe;AAAA,EACf,SAAW;AAAA,EACX,cAAgB;AAAA,EAChB,eAAiB;AAAA,EACjB,aAAe;AAAA,EACf,UAAY;AAAA,EACZ,eAAiB;AACnB;AACA,wBAAqB;AAAA,EACnB,OAAS;AAAA,EAC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|
{
|
|
2
2
|
"name": "@semiont/react-ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.24",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=24.0.0"
|
|
6
6
|
},
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
"directory": "packages/react-ui"
|
|
123
123
|
},
|
|
124
124
|
"dependencies": {
|
|
125
|
-
"@semiont/core": "0.5.
|
|
126
|
-
"@semiont/http-transport": "0.5.
|
|
127
|
-
"@semiont/sdk": "0.5.
|
|
125
|
+
"@semiont/core": "0.5.24",
|
|
126
|
+
"@semiont/http-transport": "0.5.24",
|
|
127
|
+
"@semiont/sdk": "0.5.24",
|
|
128
128
|
"pdfjs-dist": "^6.1.200",
|
|
129
129
|
"react-error-boundary": "^6.1.2",
|
|
130
130
|
"react-markdown": "^10.1.0",
|
|
@@ -7,7 +7,7 @@ import { json } from '@codemirror/lang-json';
|
|
|
7
7
|
import { oneDark } from '@codemirror/theme-one-dark';
|
|
8
8
|
import { syntaxHighlighting } from '@codemirror/language';
|
|
9
9
|
import { jsonLightTheme, jsonLightHighlightStyle } from '../../lib/codemirror-json-theme';
|
|
10
|
-
import { useLineNumbers } from '../../
|
|
10
|
+
import { useLineNumbers } from '../../contexts/LineNumbersContext';
|
|
11
11
|
|
|
12
12
|
import type { Annotation } from '@semiont/core';
|
|
13
13
|
|
|
@@ -47,9 +47,15 @@ vi.mock('../../../lib/codemirror-json-theme', () => ({
|
|
|
47
47
|
jsonLightHighlightStyle: {},
|
|
48
48
|
}));
|
|
49
49
|
|
|
50
|
-
vi.mock('@/
|
|
50
|
+
vi.mock('@/contexts/LineNumbersContext', async () => {
|
|
51
|
+
const actual = await vi.importActual('@/contexts/LineNumbersContext');
|
|
52
|
+
// Mock ONLY the hook: renderWithProviders mounts the real
|
|
53
|
+
// LineNumbersProvider, which an auto-mock would swallow (rendering
|
|
54
|
+
// nothing), while these tests want a fixed showLineNumbers value.
|
|
55
|
+
return { ...actual, useLineNumbers: vi.fn() };
|
|
56
|
+
});
|
|
51
57
|
|
|
52
|
-
import { useLineNumbers } from '@/
|
|
58
|
+
import { useLineNumbers } from '@/contexts/LineNumbersContext';
|
|
53
59
|
import { renderWithProviders } from '../../../test-utils';
|
|
54
60
|
import { JsonLdView } from '../JsonLdView';
|
|
55
61
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useState, useEffect, useCallback } from 'react';
|
|
4
4
|
import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react';
|
|
5
5
|
import type { GatheredContext } from '@semiont/core';
|
|
6
|
+
import { uuidV4 } from '@semiont/core';
|
|
6
7
|
import { useSemiont } from '../../session/SemiontProvider';
|
|
7
8
|
import { useObservable } from '../../hooks/useObservable';
|
|
8
9
|
import { useEventSubscription } from '../../contexts/useEventSubscription';
|
|
@@ -144,7 +145,7 @@ export function ReferenceWizardModal({
|
|
|
144
145
|
setIsSearching(true);
|
|
145
146
|
const contextWithHint = userHint ? { ...context, userHint } : context;
|
|
146
147
|
session?.client.match.requestSearch({
|
|
147
|
-
correlationId:
|
|
148
|
+
correlationId: uuidV4(),
|
|
148
149
|
resourceId,
|
|
149
150
|
referenceId: annotationId,
|
|
150
151
|
context: contextWithHint,
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
import { useState, useEffect, useCallback } from 'react';
|
|
4
4
|
import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react';
|
|
5
5
|
import { useResourceGather } from '../../hooks/useResourceGather';
|
|
6
|
-
import { useSemiont } from '../../session/SemiontProvider';
|
|
7
|
-
import { useObservable } from '../../hooks/useObservable';
|
|
8
6
|
import { ConfigureGatherStep, type ResourceGatherConfig } from './ConfigureGatherStep';
|
|
9
7
|
import { GatherContextStep } from './GatherContextStep';
|
|
10
8
|
import { ConfigureGenerationStep, type GenerationConfig } from './ConfigureGenerationStep';
|
|
@@ -53,6 +51,11 @@ export interface ResourceGenerateModalProps {
|
|
|
53
51
|
defaultTitle: string;
|
|
54
52
|
locale: string;
|
|
55
53
|
gatherDefaults?: Partial<ResourceGatherConfig>;
|
|
54
|
+
/**
|
|
55
|
+
* Entity types offered in the exclusion picker. Owner-supplied so the
|
|
56
|
+
* modal cannot present a failed load as an empty vocabulary.
|
|
57
|
+
*/
|
|
58
|
+
entityTypeOptions?: string[];
|
|
56
59
|
/**
|
|
57
60
|
* Emit the chosen generation config. The parent runs the job
|
|
58
61
|
* (`client.yield.fromResource(resourceId, …).run(…)`) — mirrors how the
|
|
@@ -76,13 +79,16 @@ export function ResourceGenerateModal({
|
|
|
76
79
|
defaultTitle,
|
|
77
80
|
locale,
|
|
78
81
|
gatherDefaults,
|
|
82
|
+
entityTypeOptions = [],
|
|
79
83
|
onGenerateSubmit,
|
|
80
84
|
translations: t,
|
|
81
85
|
}: ResourceGenerateModalProps) {
|
|
82
86
|
const [step, setStep] = useState<Step>('configure-gather');
|
|
83
87
|
const { context, loading, error, gather, reset } = useResourceGather();
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
// Supplied by the owner, which already tracks the list with its failure
|
|
89
|
+
// state. Fetching it here could only model (value | not-yet), so a failed
|
|
90
|
+
// load would render an empty exclusion picker as though the KB had no
|
|
91
|
+
// entity types. See .plans/PANEL-FAILURE-STATES.md
|
|
86
92
|
const [excludeEntityTypes, setExcludeEntityTypes] = useState<string[]>([]);
|
|
87
93
|
|
|
88
94
|
// Reset to the first step whenever the modal (re)opens.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useState, useEffect, useRef } from 'react';
|
|
4
|
+
import { readyValue } from '@semiont/sdk';
|
|
4
5
|
import { Dialog, DialogPanel, DialogTitle, Transition, TransitionChild } from '@headlessui/react';
|
|
5
6
|
import { map } from 'rxjs/operators';
|
|
6
7
|
import { getResourceId, getPrimaryRepresentation } from '@semiont/core';
|
|
@@ -75,7 +76,8 @@ export function ResourceSearchModal({
|
|
|
75
76
|
createSearchPipeline<SearchResult>(
|
|
76
77
|
(q) =>
|
|
77
78
|
semiontRef.current!.browse.resources({ search: q, limit: SEARCH_LIMIT }).pipe(
|
|
78
|
-
map((
|
|
79
|
+
map((st) => {
|
|
80
|
+
const resources = readyValue(st);
|
|
79
81
|
if (resources === undefined) return undefined;
|
|
80
82
|
return resources
|
|
81
83
|
.map(toSearchResult)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import React, { useState, useEffect, useRef } from 'react';
|
|
4
|
+
import { readyValue } from '@semiont/sdk';
|
|
4
5
|
import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react';
|
|
5
6
|
import { map } from 'rxjs/operators';
|
|
6
7
|
import { getResourceId } from '@semiont/core';
|
|
@@ -72,7 +73,8 @@ export function SearchModal({
|
|
|
72
73
|
createSearchPipeline<SearchResult>(
|
|
73
74
|
(q) =>
|
|
74
75
|
semiontRef.current!.browse.resources({ search: q, limit: SEARCH_LIMIT }).pipe(
|
|
75
|
-
map((
|
|
76
|
+
map((st) => {
|
|
77
|
+
const resources = readyValue(st);
|
|
76
78
|
if (resources === undefined) return undefined;
|
|
77
79
|
return resources
|
|
78
80
|
.map((resource): SearchResult | null => {
|
|
@@ -36,6 +36,10 @@ vi.mock('../../../hooks/useResourceGather', () => ({
|
|
|
36
36
|
}),
|
|
37
37
|
}));
|
|
38
38
|
|
|
39
|
+
// The modal no longer fetches entity types; the owner supplies them, so a
|
|
40
|
+
// failed load cannot surface as an empty vocabulary. The stable-observable
|
|
41
|
+
// note below is kept because the client mock still backs other calls.
|
|
42
|
+
// See .plans/PANEL-FAILURE-STATES.md
|
|
39
43
|
// Stable observable instance — the modal calls `entityTypes()` inline in
|
|
40
44
|
// render, so a fresh observable each call would re-subscribe every render and
|
|
41
45
|
// loop. The real SDK returns a cached observable; mirror that here.
|
|
@@ -93,6 +97,7 @@ function renderModal(props: Partial<React.ComponentProps<typeof ResourceGenerate
|
|
|
93
97
|
resourceId="res-1"
|
|
94
98
|
defaultTitle="Default Title"
|
|
95
99
|
locale="en"
|
|
100
|
+
entityTypeOptions={['Person', 'Topic']}
|
|
96
101
|
onGenerateSubmit={onGenerateSubmit}
|
|
97
102
|
translations={T}
|
|
98
103
|
{...props}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
2
|
+
import { asStates } from '../../../__tests__/test-client';
|
|
2
3
|
import { screen, fireEvent, waitFor } from '@testing-library/react';
|
|
3
4
|
import { BehaviorSubject } from 'rxjs';
|
|
4
5
|
import { renderWithProviders } from '../../../test-utils';
|
|
@@ -19,7 +20,7 @@ vi.mock('@headlessui/react', () => ({
|
|
|
19
20
|
// We mock useSemiont to return a stable browser whose activeSession$ emits a
|
|
20
21
|
// session-shaped object that carries the mock client.
|
|
21
22
|
const browseResourcesSubject = new BehaviorSubject<any[] | undefined>(undefined);
|
|
22
|
-
const browseResourcesMock = vi.fn(() => browseResourcesSubject.asObservable());
|
|
23
|
+
const browseResourcesMock = vi.fn(() => asStates(browseResourcesSubject.asObservable()));
|
|
23
24
|
const stableMockClient = { browse: { resources: browseResourcesMock } };
|
|
24
25
|
const stableMockSession = { client: stableMockClient };
|
|
25
26
|
const stableActiveSession$ = new BehaviorSubject<any>(stableMockSession);
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
15
|
+
import { asStates } from '../../../__tests__/test-client';
|
|
15
16
|
import { screen, fireEvent, waitFor, act } from '@testing-library/react';
|
|
16
17
|
import { BehaviorSubject } from 'rxjs';
|
|
17
18
|
import { renderWithProviders } from '../../../test-utils';
|
|
@@ -33,7 +34,7 @@ vi.mock('@headlessui/react', () => ({
|
|
|
33
34
|
|
|
34
35
|
// Mock the http-transport Observable surface
|
|
35
36
|
const browseResourcesSubject = new BehaviorSubject<any[] | undefined>(undefined);
|
|
36
|
-
const browseResourcesMock = vi.fn(() => browseResourcesSubject.asObservable());
|
|
37
|
+
const browseResourcesMock = vi.fn(() => asStates(browseResourcesSubject.asObservable()));
|
|
37
38
|
|
|
38
39
|
// Stable client reference — useSemiont is called on every render, so a
|
|
39
40
|
// fresh object literal would invalidate useMemo deps and restart the RxJS
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useRef, useEffect, useCallback
|
|
3
|
+
import { useRef, useEffect, useCallback } from 'react';
|
|
4
4
|
import { capabilitiesOf, resourceId as toResourceId } from '@semiont/core';
|
|
5
5
|
import { ANNOTATORS } from '../../lib/annotation-registry';
|
|
6
|
-
import { segmentTextWithAnnotations } from '../../lib/text-segmentation';
|
|
7
6
|
import { buildTextSelectors, fallbackTextPosition } from '../../lib/text-selection-handler';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
// Lazy load PDF component to avoid SSR issues with browser PDF.js loading
|
|
11
|
-
const PdfAnnotationCanvas = lazy(() => import('../pdf-annotation/PdfAnnotationCanvas.client').then(mod => ({ default: mod.PdfAnnotationCanvas })));
|
|
12
|
-
|
|
13
|
-
import { CodeMirrorRenderer } from '../CodeMirrorRenderer';
|
|
7
|
+
import { defaultAnnotateRenderers, type AnnotateMediaRenderers } from './annotate-renderers';
|
|
14
8
|
import type { EditorView } from '@codemirror/view';
|
|
15
9
|
import type { SemiontSession } from '@semiont/sdk';
|
|
16
10
|
import { useSessionEventSubscriptions } from '../../hooks/useSessionEventSubscriptions';
|
|
@@ -48,6 +42,8 @@ interface Props {
|
|
|
48
42
|
onModeChange?: (mode: boolean) => void;
|
|
49
43
|
/** Render the built-in bar (default). false → no bar; selection capture and drawing stay live. */
|
|
50
44
|
showToolbar?: boolean;
|
|
45
|
+
/** Override the annotating media renderers (render mode → renderer); merged over the defaults. */
|
|
46
|
+
renderers?: AnnotateMediaRenderers;
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
/**
|
|
@@ -73,6 +69,7 @@ export function AnnotateView({
|
|
|
73
69
|
newAnnotationIds,
|
|
74
70
|
onModeChange,
|
|
75
71
|
showToolbar = true,
|
|
72
|
+
renderers,
|
|
76
73
|
}: Props) {
|
|
77
74
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
78
75
|
|
|
@@ -81,7 +78,6 @@ export function AnnotateView({
|
|
|
81
78
|
const { highlights, references, assessments, comments, tags } = annotations;
|
|
82
79
|
|
|
83
80
|
const allAnnotations = [...highlights, ...references, ...assessments, ...comments, ...tags];
|
|
84
|
-
const segments = segmentTextWithAnnotations(content, allAnnotations);
|
|
85
81
|
|
|
86
82
|
// Extract UI state
|
|
87
83
|
const { selectedMotivation, selectedClick, selectedShape, hoveredAnnotationId, scrollToAnnotationId } = uiState;
|
|
@@ -196,135 +192,71 @@ export function AnnotateView({
|
|
|
196
192
|
};
|
|
197
193
|
}, [selectedMotivation, content, resourceUri]);
|
|
198
194
|
|
|
199
|
-
//
|
|
200
|
-
switch
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
{...(hoveredAnnotationId !== undefined && { hoveredAnnotationId })}
|
|
225
|
-
{...(scrollToAnnotationId !== undefined && { scrollToAnnotationId })}
|
|
226
|
-
sourceView={true}
|
|
227
|
-
showLineNumbers={showLineNumbers}
|
|
228
|
-
hoverDelayMs={hoverDelayMs}
|
|
229
|
-
enableWidgets={enableWidgets}
|
|
230
|
-
session={session}
|
|
231
|
-
{...(getTargetResourceName && { getTargetResourceName })}
|
|
232
|
-
{...(generatingReferenceId !== undefined && { generatingReferenceId })}
|
|
233
|
-
/>
|
|
234
|
-
|
|
235
|
-
</div>
|
|
236
|
-
</div>
|
|
237
|
-
);
|
|
238
|
-
|
|
239
|
-
case 'pdf':
|
|
240
|
-
// PDF annotation support (spatial, FragmentSelector)
|
|
241
|
-
return (
|
|
242
|
-
<div className="semiont-annotate-view" data-mime-type="pdf" ref={containerRef}>
|
|
243
|
-
{showToolbar && (
|
|
244
|
-
<AnnotateToolbar
|
|
245
|
-
selectedMotivation={selectedMotivation}
|
|
246
|
-
selectedClick={selectedClick}
|
|
247
|
-
selectedShape={selectedShape}
|
|
248
|
-
mediaType={mimeType}
|
|
249
|
-
annotateMode={annotateMode}
|
|
250
|
-
annotators={ANNOTATORS}
|
|
251
|
-
onModeChange={onModeChange}
|
|
252
|
-
onClickActionChange={handleToolbarClickActionChange}
|
|
253
|
-
onSelectionChange={handleToolbarSelectionChange}
|
|
254
|
-
onShapeChange={handleToolbarShapeChange}
|
|
255
|
-
/>
|
|
256
|
-
)}
|
|
257
|
-
<div className="semiont-annotate-view__content">
|
|
258
|
-
{content && (
|
|
259
|
-
<Suspense fallback={<div className="semiont-annotate-view__loading">Loading PDF viewer...</div>}>
|
|
260
|
-
<PdfAnnotationCanvas
|
|
261
|
-
pdfUrl={content}
|
|
262
|
-
resourceUri={resourceUri}
|
|
263
|
-
existingAnnotations={allAnnotations}
|
|
264
|
-
drawingMode={selectedMotivation ? selectedShape : null}
|
|
265
|
-
selectedMotivation={selectedMotivation}
|
|
266
|
-
session={session}
|
|
267
|
-
hoveredAnnotationId={hoveredAnnotationId || null}
|
|
268
|
-
hoverDelayMs={hoverDelayMs}
|
|
269
|
-
/>
|
|
270
|
-
</Suspense>
|
|
271
|
-
)}
|
|
272
|
-
</div>
|
|
195
|
+
// One shell for every render mode; the registry supplies the content.
|
|
196
|
+
// Previously a three-way `switch` that repeated this wrapper, the toolbar
|
|
197
|
+
// block and the content div verbatim in each branch — any toolbar prop
|
|
198
|
+
// change had to be made three times and stayed correct only by vigilance.
|
|
199
|
+
// See .plans/ANNOTATE-RENDERER-REGISTRY.md
|
|
200
|
+
const mediaRenderers: AnnotateMediaRenderers = { ...defaultAnnotateRenderers, ...renderers };
|
|
201
|
+
const Renderer = mediaRenderers[render];
|
|
202
|
+
|
|
203
|
+
// D4: a registry MISS is explicit here, unlike the browse side where it
|
|
204
|
+
// falls through to text harmlessly. Annotating an unknown type is not
|
|
205
|
+
// harmless, and the toolbar is deliberately absent in this branch.
|
|
206
|
+
if (!Renderer) {
|
|
207
|
+
return (
|
|
208
|
+
<div ref={containerRef} className="semiont-annotate-view semiont-annotate-view--unsupported" data-mime-type="unsupported">
|
|
209
|
+
<div className="semiont-annotate-view__empty">
|
|
210
|
+
<p className="semiont-annotate-view__empty-message">
|
|
211
|
+
Annotation not supported for {mimeType}
|
|
212
|
+
</p>
|
|
213
|
+
<a
|
|
214
|
+
href={`/api/resources/${resourceUri}`}
|
|
215
|
+
download
|
|
216
|
+
className="semiont-button semiont-button--primary"
|
|
217
|
+
>
|
|
218
|
+
Download File
|
|
219
|
+
</a>
|
|
273
220
|
</div>
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
case 'image':
|
|
277
|
-
// PNG, JPEG, etc. - full annotation support
|
|
278
|
-
return (
|
|
279
|
-
<div className="semiont-annotate-view" data-mime-type="image" ref={containerRef}>
|
|
280
|
-
{showToolbar && (
|
|
281
|
-
<AnnotateToolbar
|
|
282
|
-
selectedMotivation={selectedMotivation}
|
|
283
|
-
selectedClick={selectedClick}
|
|
284
|
-
selectedShape={selectedShape}
|
|
285
|
-
mediaType={mimeType}
|
|
286
|
-
annotateMode={annotateMode}
|
|
287
|
-
annotators={ANNOTATORS}
|
|
288
|
-
onModeChange={onModeChange}
|
|
289
|
-
onClickActionChange={handleToolbarClickActionChange}
|
|
290
|
-
onSelectionChange={handleToolbarSelectionChange}
|
|
291
|
-
onShapeChange={handleToolbarShapeChange}
|
|
292
|
-
/>
|
|
293
|
-
)}
|
|
294
|
-
<div className="semiont-annotate-view__content">
|
|
295
|
-
{content && (
|
|
296
|
-
<SvgDrawingCanvas
|
|
297
|
-
imageUrl={content}
|
|
298
|
-
resourceUri={resourceUri}
|
|
299
|
-
existingAnnotations={allAnnotations}
|
|
300
|
-
drawingMode={selectedMotivation ? selectedShape : null}
|
|
301
|
-
selectedMotivation={selectedMotivation}
|
|
302
|
-
session={session}
|
|
303
|
-
hoveredAnnotationId={hoveredAnnotationId || null}
|
|
304
|
-
hoverDelayMs={hoverDelayMs}
|
|
305
|
-
/>
|
|
306
|
-
)}
|
|
307
|
-
</div>
|
|
308
|
-
</div>
|
|
309
|
-
);
|
|
310
|
-
|
|
311
|
-
case 'none':
|
|
312
|
-
default:
|
|
313
|
-
return (
|
|
314
|
-
<div ref={containerRef} className="semiont-annotate-view semiont-annotate-view--unsupported" data-mime-type="unsupported">
|
|
315
|
-
<div className="semiont-annotate-view__empty">
|
|
316
|
-
<p className="semiont-annotate-view__empty-message">
|
|
317
|
-
Annotation not supported for {mimeType}
|
|
318
|
-
</p>
|
|
319
|
-
<a
|
|
320
|
-
href={`/api/resources/${resourceUri}`}
|
|
321
|
-
download
|
|
322
|
-
className="semiont-button semiont-button--primary"
|
|
323
|
-
>
|
|
324
|
-
Download File
|
|
325
|
-
</a>
|
|
326
|
-
</div>
|
|
327
|
-
</div>
|
|
328
|
-
);
|
|
221
|
+
</div>
|
|
222
|
+
);
|
|
329
223
|
}
|
|
224
|
+
|
|
225
|
+
return (
|
|
226
|
+
<div className="semiont-annotate-view" data-mime-type={render} ref={containerRef}>
|
|
227
|
+
{showToolbar && (
|
|
228
|
+
<AnnotateToolbar
|
|
229
|
+
selectedMotivation={selectedMotivation}
|
|
230
|
+
selectedClick={selectedClick}
|
|
231
|
+
selectedShape={selectedShape}
|
|
232
|
+
mediaType={mimeType}
|
|
233
|
+
annotateMode={annotateMode}
|
|
234
|
+
annotators={ANNOTATORS}
|
|
235
|
+
onModeChange={onModeChange}
|
|
236
|
+
onClickActionChange={handleToolbarClickActionChange}
|
|
237
|
+
onSelectionChange={handleToolbarSelectionChange}
|
|
238
|
+
onShapeChange={handleToolbarShapeChange}
|
|
239
|
+
/>
|
|
240
|
+
)}
|
|
241
|
+
<div className="semiont-annotate-view__content">
|
|
242
|
+
<Renderer
|
|
243
|
+
content={content}
|
|
244
|
+
mimeType={mimeType}
|
|
245
|
+
resourceUri={resourceUri}
|
|
246
|
+
annotations={allAnnotations}
|
|
247
|
+
session={session}
|
|
248
|
+
drawingMode={selectedMotivation ? selectedShape : null}
|
|
249
|
+
selectedMotivation={selectedMotivation}
|
|
250
|
+
hoveredAnnotationId={hoveredAnnotationId}
|
|
251
|
+
hoverDelayMs={hoverDelayMs}
|
|
252
|
+
newAnnotationIds={newAnnotationIds}
|
|
253
|
+
scrollToAnnotationId={scrollToAnnotationId}
|
|
254
|
+
showLineNumbers={showLineNumbers}
|
|
255
|
+
enableWidgets={enableWidgets}
|
|
256
|
+
{...(getTargetResourceName && { getTargetResourceName })}
|
|
257
|
+
generatingReferenceId={generatingReferenceId}
|
|
258
|
+
/>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
);
|
|
330
262
|
}
|
|
@@ -3,14 +3,25 @@
|
|
|
3
3
|
import React, { useEffect, useRef } from 'react';
|
|
4
4
|
import { useTranslations } from '../../contexts/TranslationContext';
|
|
5
5
|
import type { RouteBuilder, LinkComponentProps } from '../../contexts/RoutingContext';
|
|
6
|
-
import {
|
|
7
|
-
import { useObservable } from '../../hooks/useObservable';
|
|
8
|
-
import type { ResourceId } from '@semiont/core';
|
|
6
|
+
import type { Annotation } from '@semiont/core';
|
|
9
7
|
import { getAnnotationUriFromEvent, type StoredEventLike } from '@semiont/core';
|
|
10
8
|
import { HistoryEvent } from './HistoryEvent';
|
|
11
9
|
|
|
12
10
|
interface Props {
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The resource's stored events, and how their load is going. Supplied by the
|
|
13
|
+
* owner (which already holds them on its state unit) rather than fetched
|
|
14
|
+
* here: a self-fetching panel can only model (value | not-yet), so a
|
|
15
|
+
* terminal failure (B15) is indistinguishable from a request still in
|
|
16
|
+
* flight and the panel says "Loading..." for ever.
|
|
17
|
+
* See .plans/PANEL-FAILURE-STATES.md
|
|
18
|
+
*/
|
|
19
|
+
events: StoredEventLike[];
|
|
20
|
+
eventsLoading?: boolean;
|
|
21
|
+
eventsError?: Error | null;
|
|
22
|
+
onRetryEvents?: () => void;
|
|
23
|
+
/** Annotations for the same resource — used to resolve event → annotation. */
|
|
24
|
+
annotations?: Annotation[];
|
|
14
25
|
hoveredAnnotationId?: string | null;
|
|
15
26
|
onEventHover?: (annotationId: string | null) => void;
|
|
16
27
|
onEventClick?: (annotationId: string | null) => void;
|
|
@@ -18,15 +29,21 @@ interface Props {
|
|
|
18
29
|
routes: RouteBuilder;
|
|
19
30
|
}
|
|
20
31
|
|
|
21
|
-
export function AnnotationHistory({
|
|
32
|
+
export function AnnotationHistory({
|
|
33
|
+
events: eventsData,
|
|
34
|
+
eventsLoading = false,
|
|
35
|
+
eventsError = null,
|
|
36
|
+
onRetryEvents,
|
|
37
|
+
annotations = [],
|
|
38
|
+
hoveredAnnotationId,
|
|
39
|
+
onEventHover,
|
|
40
|
+
onEventClick,
|
|
41
|
+
Link,
|
|
42
|
+
routes,
|
|
43
|
+
}: Props) {
|
|
22
44
|
const t = useTranslations('AnnotationHistory');
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
const eventsData = useObservable(semiont?.browse.events(rUri));
|
|
26
|
-
const annotationsData = useObservable(semiont?.browse.annotations(rUri));
|
|
27
|
-
const loading = eventsData === undefined;
|
|
28
|
-
const error = false;
|
|
29
|
-
const annotations = annotationsData ?? [];
|
|
45
|
+
const loading = eventsLoading;
|
|
46
|
+
const error = eventsError;
|
|
30
47
|
|
|
31
48
|
// Refs to track event elements for scrolling
|
|
32
49
|
const eventRefs = useRef<Map<string, HTMLElement>>(new Map());
|
|
@@ -34,7 +51,7 @@ export function AnnotationHistory({ rUri, hoveredAnnotationId, onEventHover, onE
|
|
|
34
51
|
|
|
35
52
|
// Sort events by oldest first (most recent at bottom)
|
|
36
53
|
// Filter out job events - they're represented by mark:body-updated events instead
|
|
37
|
-
const events: StoredEventLike[] =
|
|
54
|
+
const events: StoredEventLike[] = eventsData
|
|
38
55
|
.filter((e) => {
|
|
39
56
|
return e.type !== 'job:started' && e.type !== 'job:progress' && e.type !== 'job:completed';
|
|
40
57
|
})
|
|
@@ -70,19 +87,38 @@ export function AnnotationHistory({ rUri, hoveredAnnotationId, onEventHover, onE
|
|
|
70
87
|
}
|
|
71
88
|
}, [hoveredAnnotationId]);
|
|
72
89
|
|
|
73
|
-
if (
|
|
90
|
+
if (error) {
|
|
91
|
+
// Previously `return null` behind a hard-coded `const error = false`, so
|
|
92
|
+
// this branch was unreachable and a failed load simply hung in `loading`.
|
|
74
93
|
return (
|
|
75
94
|
<div className="semiont-history-panel">
|
|
76
95
|
<h3 className="semiont-history-panel__title">
|
|
77
96
|
{t('history')}
|
|
78
97
|
</h3>
|
|
79
|
-
<
|
|
98
|
+
<p className="semiont-history-panel__error">
|
|
99
|
+
{t('failed')}
|
|
100
|
+
{onRetryEvents && (
|
|
101
|
+
<>
|
|
102
|
+
{' '}
|
|
103
|
+
<button type="button" onClick={onRetryEvents} className="semiont-panel__inline-action">
|
|
104
|
+
{t('retry')}
|
|
105
|
+
</button>
|
|
106
|
+
</>
|
|
107
|
+
)}
|
|
108
|
+
</p>
|
|
80
109
|
</div>
|
|
81
110
|
);
|
|
82
111
|
}
|
|
83
112
|
|
|
84
|
-
if (
|
|
85
|
-
return
|
|
113
|
+
if (loading) {
|
|
114
|
+
return (
|
|
115
|
+
<div className="semiont-history-panel">
|
|
116
|
+
<h3 className="semiont-history-panel__title">
|
|
117
|
+
{t('history')}
|
|
118
|
+
</h3>
|
|
119
|
+
<div className="semiont-history-panel__loading">{t('loading')}</div>
|
|
120
|
+
</div>
|
|
121
|
+
);
|
|
86
122
|
}
|
|
87
123
|
|
|
88
124
|
if (events.length === 0) {
|
|
@@ -177,8 +177,9 @@ export const BrowseView = memo(function BrowseView({
|
|
|
177
177
|
if (!referentId || !element) return;
|
|
178
178
|
referentSub?.unsubscribe();
|
|
179
179
|
referentSub = session.client.browse.resource(toResourceId(referentId)).subscribe({
|
|
180
|
-
next: (
|
|
181
|
-
if (
|
|
180
|
+
next: (st) => {
|
|
181
|
+
if (st.status !== 'ready') return; // pending/failed: never fires
|
|
182
|
+
const referent = st.value;
|
|
182
183
|
referentSub?.unsubscribe();
|
|
183
184
|
referentSub = null;
|
|
184
185
|
referenceHoverFired = true;
|