@semiont/react-ui 0.2.33-build.77 → 0.2.33-build.79
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-RNNSPLQB.mjs → ar-EMHEHPCJ.mjs} +2 -1
- package/dist/ar-EMHEHPCJ.mjs.map +1 -0
- package/dist/{bn-S2CDL7EC.mjs → bn-OVCI4F6X.mjs} +2 -1
- package/dist/bn-OVCI4F6X.mjs.map +1 -0
- package/dist/{chunk-35LLVRFK.mjs → chunk-JZIO2A3B.mjs} +31 -31
- package/dist/{chunk-UDX2Q35T.mjs → chunk-LIHZTECW.mjs} +2 -1
- package/dist/chunk-LIHZTECW.mjs.map +1 -0
- package/dist/{cs-RSV675WU.mjs → cs-FAN66Q2F.mjs} +2 -1
- package/dist/cs-FAN66Q2F.mjs.map +1 -0
- package/dist/{da-CHXNPWJC.mjs → da-YBBIHI2O.mjs} +2 -1
- package/dist/da-YBBIHI2O.mjs.map +1 -0
- package/dist/{de-KPEZ53D4.mjs → de-MAYU33LB.mjs} +2 -1
- package/dist/de-MAYU33LB.mjs.map +1 -0
- package/dist/{el-MW2BME5T.mjs → el-MKGSWN4O.mjs} +2 -1
- package/dist/el-MKGSWN4O.mjs.map +1 -0
- package/dist/{en-EVMIX24Y.mjs → en-DDLIXJCU.mjs} +2 -2
- package/dist/{es-HQ24NYS3.mjs → es-52LHUWJD.mjs} +2 -1
- package/dist/es-52LHUWJD.mjs.map +1 -0
- package/dist/{fa-W34LRLHG.mjs → fa-FJICRANB.mjs} +2 -1
- package/dist/fa-FJICRANB.mjs.map +1 -0
- package/dist/{fi-3U44IGOA.mjs → fi-O455XFCR.mjs} +2 -1
- package/dist/fi-O455XFCR.mjs.map +1 -0
- package/dist/{fr-N7DKX6NN.mjs → fr-TXIXHOOE.mjs} +2 -1
- package/dist/fr-TXIXHOOE.mjs.map +1 -0
- package/dist/{he-CS4WRXN3.mjs → he-JBSOX5IN.mjs} +2 -1
- package/dist/he-JBSOX5IN.mjs.map +1 -0
- package/dist/{hi-GJDY46KA.mjs → hi-KGHI3XVT.mjs} +2 -1
- package/dist/hi-KGHI3XVT.mjs.map +1 -0
- package/dist/{id-WAEZJK2Y.mjs → id-5OCPPZLO.mjs} +2 -1
- package/dist/id-5OCPPZLO.mjs.map +1 -0
- package/dist/index.d.mts +102 -106
- package/dist/index.mjs +1814 -1450
- package/dist/index.mjs.map +1 -1
- package/dist/{it-VDNDMZPU.mjs → it-PNBBZSM2.mjs} +2 -1
- package/dist/it-PNBBZSM2.mjs.map +1 -0
- package/dist/{ja-5PEH56J5.mjs → ja-LDD7R3TJ.mjs} +2 -1
- package/dist/ja-LDD7R3TJ.mjs.map +1 -0
- package/dist/{ko-JYPL3WVA.mjs → ko-F47ZDEY3.mjs} +2 -1
- package/dist/ko-F47ZDEY3.mjs.map +1 -0
- package/dist/{ms-5PZVW76T.mjs → ms-Z7LMXJWL.mjs} +2 -1
- package/dist/ms-Z7LMXJWL.mjs.map +1 -0
- package/dist/{nl-YXES36KM.mjs → nl-6SJFBPJ3.mjs} +2 -1
- package/dist/nl-6SJFBPJ3.mjs.map +1 -0
- package/dist/{no-XRA2UCQD.mjs → no-YXPBPSGF.mjs} +2 -1
- package/dist/no-YXPBPSGF.mjs.map +1 -0
- package/dist/{pl-WH6LJA5G.mjs → pl-P4AZ2QME.mjs} +2 -1
- package/dist/pl-P4AZ2QME.mjs.map +1 -0
- package/dist/{pt-7GAG57BM.mjs → pt-LHWUS6U6.mjs} +2 -1
- package/dist/pt-LHWUS6U6.mjs.map +1 -0
- package/dist/{ro-BTDDRB7N.mjs → ro-EA5J2ZON.mjs} +2 -1
- package/dist/ro-EA5J2ZON.mjs.map +1 -0
- package/dist/{sv-7V5C2IT4.mjs → sv-DATBS3UQ.mjs} +2 -1
- package/dist/sv-DATBS3UQ.mjs.map +1 -0
- package/dist/test-utils.mjs +2 -2
- package/dist/{th-LPKYLBX5.mjs → th-WTFJRWPT.mjs} +2 -1
- package/dist/th-WTFJRWPT.mjs.map +1 -0
- package/dist/{tr-DU4RQL4M.mjs → tr-IKO3RXOX.mjs} +2 -1
- package/dist/tr-IKO3RXOX.mjs.map +1 -0
- package/dist/{uk-36UHTDDI.mjs → uk-CF6CTTRK.mjs} +2 -1
- package/dist/uk-CF6CTTRK.mjs.map +1 -0
- package/dist/{vi-GDHOUZDH.mjs → vi-AJLTXPZQ.mjs} +2 -1
- package/dist/vi-AJLTXPZQ.mjs.map +1 -0
- package/dist/{zh-TYUID4XZ.mjs → zh-U3ORHHYH.mjs} +2 -1
- package/dist/zh-U3ORHHYH.mjs.map +1 -0
- package/package.json +6 -2
- package/src/components/resource/AnnotateView.tsx +0 -4
- package/src/components/resource/AnnotationHistory.tsx +12 -13
- package/src/components/resource/BrowseView.tsx +8 -16
- package/src/components/resource/HistoryEvent.tsx +3 -4
- package/src/components/resource/ResourceViewer.tsx +174 -201
- package/src/components/resource/event-formatting.ts +316 -0
- package/src/components/resource/panels/AssessmentPanel.tsx +37 -9
- package/src/components/resource/panels/CollaborationPanel.tsx +20 -13
- package/src/components/resource/panels/CommentsPanel.tsx +38 -9
- package/src/components/resource/panels/ReferencesPanel.tsx +39 -14
- package/src/components/resource/panels/StatisticsPanel.tsx +9 -19
- package/src/components/resource/panels/TaggingPanel.tsx +27 -0
- package/src/components/resource/panels/UnifiedAnnotationsPanel.tsx +28 -21
- package/src/components/resource/panels/__tests__/AssessmentPanel.test.tsx +547 -0
- package/src/components/resource/panels/__tests__/CommentsPanel.test.tsx +10 -0
- package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +10 -0
- package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +564 -0
- package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +8 -15
- package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +13 -6
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +147 -78
- package/src/styles/motivations/motivation-assessment.css +28 -0
- package/src/styles/patterns/panel-helpers.css +26 -0
- package/translations/ar.json +1 -0
- package/translations/bn.json +1 -0
- package/translations/cs.json +1 -0
- package/translations/da.json +1 -0
- package/translations/de.json +1 -0
- package/translations/el.json +1 -0
- package/translations/en.json +1 -0
- package/translations/es.json +1 -0
- package/translations/fa.json +1 -0
- package/translations/fi.json +1 -0
- package/translations/fr.json +1 -0
- package/translations/he.json +1 -0
- package/translations/hi.json +1 -0
- package/translations/id.json +1 -0
- package/translations/it.json +1 -0
- package/translations/ja.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/nl.json +1 -0
- package/translations/no.json +1 -0
- package/translations/pl.json +1 -0
- package/translations/pt.json +1 -0
- package/translations/ro.json +1 -0
- package/translations/sv.json +1 -0
- package/translations/th.json +1 -0
- package/translations/tr.json +1 -0
- package/translations/uk.json +1 -0
- package/translations/vi.json +1 -0
- package/translations/zh.json +1 -0
- package/dist/ar-RNNSPLQB.mjs.map +0 -1
- package/dist/bn-S2CDL7EC.mjs.map +0 -1
- package/dist/chunk-UDX2Q35T.mjs.map +0 -1
- package/dist/cs-RSV675WU.mjs.map +0 -1
- package/dist/da-CHXNPWJC.mjs.map +0 -1
- package/dist/de-KPEZ53D4.mjs.map +0 -1
- package/dist/el-MW2BME5T.mjs.map +0 -1
- package/dist/es-HQ24NYS3.mjs.map +0 -1
- package/dist/fa-W34LRLHG.mjs.map +0 -1
- package/dist/fi-3U44IGOA.mjs.map +0 -1
- package/dist/fr-N7DKX6NN.mjs.map +0 -1
- package/dist/he-CS4WRXN3.mjs.map +0 -1
- package/dist/hi-GJDY46KA.mjs.map +0 -1
- package/dist/id-WAEZJK2Y.mjs.map +0 -1
- package/dist/it-VDNDMZPU.mjs.map +0 -1
- package/dist/ja-5PEH56J5.mjs.map +0 -1
- package/dist/ko-JYPL3WVA.mjs.map +0 -1
- package/dist/ms-5PZVW76T.mjs.map +0 -1
- package/dist/nl-YXES36KM.mjs.map +0 -1
- package/dist/no-XRA2UCQD.mjs.map +0 -1
- package/dist/pl-WH6LJA5G.mjs.map +0 -1
- package/dist/pt-7GAG57BM.mjs.map +0 -1
- package/dist/ro-BTDDRB7N.mjs.map +0 -1
- package/dist/sv-7V5C2IT4.mjs.map +0 -1
- package/dist/th-LPKYLBX5.mjs.map +0 -1
- package/dist/tr-DU4RQL4M.mjs.map +0 -1
- package/dist/uk-36UHTDDI.mjs.map +0 -1
- package/dist/vi-GDHOUZDH.mjs.map +0 -1
- package/dist/zh-TYUID4XZ.mjs.map +0 -1
- /package/dist/{chunk-35LLVRFK.mjs.map → chunk-JZIO2A3B.mjs.map} +0 -0
- /package/dist/{en-EVMIX24Y.mjs.map → en-DDLIXJCU.mjs.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../translations/id.json"],"sourcesContent":["{\n \"Toolbar\": {\n \"annotations\": \"Annotations\",\n \"history\": \"History\",\n \"resourceInfo\": \"Resource Info\",\n \"collaboration\": \"Collaboration\",\n \"userAccount\": \"User Account\",\n \"settings\": \"Settings\"\n },\n \"ResourceInfoPanel\": {\n \"title\": \"Resource Info\",\n \"locale\": \"Locale\",\n \"notSpecified\": \"Not specified\",\n \"entityTypeTags\": \"Entity Type Tags\",\n \"representation\": \"Representation\",\n \"mediaType\": \"Media Type\",\n \"byteSize\": \"Size\",\n \"clone\": \"Clone\",\n \"cloneDescription\": \"Generate a shareable clone link for this resource\",\n \"archive\": \"Archive\",\n \"archiveDescription\": \"Move this resource to archived status\",\n \"unarchive\": \"Unarchive\",\n \"unarchiveDescription\": \"Restore this resource to active status\"\n },\n \"CollaborationPanel\": {\n \"title\": \"Collaboration\",\n \"connectionStatus\": \"Connection Status\",\n \"live\": \"Live\",\n \"disconnected\": \"Disconnected\",\n \"events\": \"{count} events\",\n \"lastSync\": \"Last sync:\",\n \"noActivity\": \"No activity yet\",\n \"justNow\": \"Just now\",\n \"secondsAgo\": \"{count} seconds ago\",\n \"minuteAgo\": \"1 minute ago\",\n \"minutesAgo\": \"{count} minutes ago\",\n \"hourAgo\": \"1 hour ago\",\n \"hoursAgo\": \"{count} hours ago\",\n \"realtimeActive\": \"Real-time updates are active\",\n \"reconnecting\": \"Reconnecting to server...\",\n \"sharing\": \"Sharing\",\n \"collaborationComingSoon\": \"Collaboration features coming soon\"\n },\n \"AnnotationHistory\": {\n \"history\": \"History\",\n \"loading\": \"Loading...\",\n \"user\": \"User\",\n \"method\": \"Method\",\n \"viewOriginal\": \"View original\",\n \"viewAnnotation\": \"View annotation: {content}\",\n \"resourceCreated\": \"Created Resource\",\n \"resourceCloned\": \"Cloned\",\n \"resourceArchived\": \"Archived\",\n \"resourceUnarchived\": \"Unarchived\",\n \"highlightAdded\": \"Highlight Added\",\n \"highlightRemoved\": \"Highlight Removed\",\n \"referenceCreated\": \"Reference Created\",\n \"referenceResolved\": \"Reference Resolved\",\n \"referenceDeleted\": \"Reference Deleted\",\n \"entitytagAdded\": \"Tag Added\",\n \"entitytagRemoved\": \"Tag Removed\",\n \"assessmentAdded\": \"Assessment Added\",\n \"assessmentRemoved\": \"Assessment Removed\",\n \"annotationAdded\": \"Annotation Added\",\n \"annotationRemoved\": \"Annotation Removed\",\n \"annotationBodyUpdated\": \"Annotation Updated\",\n \"jobEvent\": \"Job Event\",\n \"justNow\": \"just now\",\n \"minutesAgo\": \"{count}m ago\",\n \"hoursAgo\": \"{count}h ago\",\n \"daysAgo\": \"{count}d ago\"\n },\n \"CommentsPanel\": {\n \"title\": \"Comments\",\n \"noComments\": \"No comments yet. Select text and click Comment to add one.\",\n \"commentPlaceholder\": \"Type your comment here...\",\n \"save\": \"Save\",\n \"cancel\": \"Cancel\",\n \"edit\": \"Edit\",\n \"detectComments\": \"Detect Comments\",\n \"instructions\": \"Instructions\",\n \"optional\": \"(optional)\",\n \"instructionsPlaceholder\": \"e.g., Focus on technical terminology...\",\n \"detect\": \"Detect\",\n \"detecting\": \"Detecting...\",\n \"toneLabel\": \"Tone\",\n \"toneOptional\": \"(optional)\",\n \"toneScholarly\": \"Scholarly\",\n \"toneExplanatory\": \"Explanatory\",\n \"toneConversational\": \"Conversational\",\n \"toneTechnical\": \"Technical\",\n \"densityLabel\": \"Density\",\n \"densitySparse\": \"Sparse\",\n \"densityDense\": \"Dense\",\n \"fragmentSelected\": \"Fragment selected\",\n \"imageRegionSelected\": \"Image region selected\"\n },\n \"HighlightPanel\": {\n \"title\": \"Highlights\",\n \"noHighlights\": \"No highlights yet. Use AI detection to find important passages.\",\n \"detectHighlights\": \"Detect Highlights\",\n \"instructions\": \"Instructions\",\n \"optional\": \"(optional)\",\n \"instructionsPlaceholder\": \"e.g., Focus on key technical concepts...\",\n \"detect\": \"Detect\",\n \"detecting\": \"Detecting...\",\n \"cancel\": \"Cancel\",\n \"densityLabel\": \"Density\",\n \"densitySparse\": \"Sparse\",\n \"densityDense\": \"Dense\"\n },\n \"AssessmentPanel\": {\n \"title\": \"Assessments\",\n \"noAssessments\": \"No assessments yet. Use AI detection to evaluate passages.\",\n \"assessmentPlaceholder\": \"Type your assessment here...\",\n \"save\": \"Save\",\n \"cancel\": \"Cancel\",\n \"detectAssessments\": \"Detect Assessments\",\n \"instructions\": \"Instructions\",\n \"optional\": \"(optional)\",\n \"instructionsPlaceholder\": \"e.g., Evaluate claims for accuracy and evidence...\",\n \"detect\": \"Detect\",\n \"detecting\": \"Detecting...\",\n \"toneLabel\": \"Tone\",\n \"toneOptional\": \"(optional)\",\n \"toneAnalytical\": \"Analytical\",\n \"toneCritical\": \"Critical\",\n \"toneBalanced\": \"Balanced\",\n \"toneConstructive\": \"Constructive\",\n \"densityLabel\": \"Density\",\n \"densitySparse\": \"Sparse\",\n \"densityDense\": \"Dense\",\n \"fragmentSelected\": \"Fragment selected\",\n \"imageRegionSelected\": \"Image region selected\"\n },\n \"TaggingPanel\": {\n \"title\": \"Tags\",\n \"noTags\": \"No tags yet. Use AI detection to identify structural roles.\",\n \"detectTags\": \"Detect Tags\",\n \"selectSchema\": \"Select Framework\",\n \"schemaLegal\": \"Legal Analysis (IRAC)\",\n \"schemaScientific\": \"Scientific Paper (IMRAD)\",\n \"schemaArgument\": \"Argument Structure (Toulmin)\",\n \"selectCategories\": \"Select Categories\",\n \"categoryIssue\": \"Issue\",\n \"categoryRule\": \"Rule\",\n \"categoryApplication\": \"Application\",\n \"categoryConclusion\": \"Conclusion\",\n \"categoryIntroduction\": \"Introduction\",\n \"categoryMethods\": \"Methods\",\n \"categoryResults\": \"Results\",\n \"categoryDiscussion\": \"Discussion\",\n \"categoryClaim\": \"Claim\",\n \"categoryEvidence\": \"Evidence\",\n \"categoryWarrant\": \"Warrant\",\n \"categoryCounterargument\": \"Counterargument\",\n \"categoryRebuttal\": \"Rebuttal\",\n \"detect\": \"Detect\",\n \"detecting\": \"Detecting...\",\n \"cancel\": \"Cancel\",\n \"selectAll\": \"Select All\",\n \"deselectAll\": \"Deselect All\",\n \"categoriesSelected\": \"{count, plural, =0 {No categories selected} =1 {1 category selected} other {# categories selected}}\",\n \"createTagForSelection\": \"Create Tag for Selection\",\n \"selectCategory\": \"Select Category\",\n \"chooseCategory\": \"Choose a category...\",\n \"fragmentSelected\": \"Fragment selected\",\n \"imageRegionSelected\": \"Image region selected\"\n },\n \"UnifiedAnnotationsPanel\": {\n \"title\": \"Annotations\",\n \"statistics\": \"Statistics\",\n \"highlight\": \"Highlights\",\n \"reference\": \"References\",\n \"assessment\": \"Assessments\",\n \"comment\": \"Comments\",\n \"tag\": \"Tags\"\n },\n \"StatisticsPanel\": {\n \"title\": \"Statistics\",\n \"highlights\": \"Highlights\",\n \"comments\": \"Comments\",\n \"assessments\": \"Assessments\",\n \"tags\": \"Tags\",\n \"references\": \"References\",\n \"stub\": \"Stub\",\n \"resolved\": \"Resolved\",\n \"entityTypes\": \"Entity Types\"\n },\n \"DetectPanel\": {\n \"title\": \"Detect References\",\n \"selectEntityTypes\": \"Entity types:\",\n \"select\": \"Select\",\n \"deselect\": \"Deselect\",\n \"noEntityTypes\": \"No entity types available\",\n \"typesSelected\": \"{count, plural, =1 {1 type selected} other {# types selected}}\",\n \"startDetection\": \"Detect\",\n \"found\": \"{count} found\",\n \"more\": \"More\"\n },\n \"DetectionProgressWidget\": {\n \"title\": \"Detecting Entity References\",\n \"cancelDetection\": \"Cancel detection\",\n \"found\": \"{count} found\",\n \"complete\": \"Detection complete!\",\n \"failed\": \"Detection failed\",\n \"current\": \"Current: {entityType}\"\n },\n \"ReferencesPanel\": {\n \"referencesTitle\": \"References\",\n \"outgoingReferences\": \"Outgoing References\",\n \"noReferences\": \"No references yet\",\n \"stub\": \"Stub reference (not linked)\",\n \"resolved\": \"Resolved reference (linked)\",\n \"open\": \"Open\",\n \"unlink\": \"Unlink\",\n \"generate\": \"Generate\",\n \"find\": \"Find\",\n \"create\": \"Create\",\n \"cancel\": \"Cancel\",\n \"incomingReferences\": \"Incoming References\",\n \"loading\": \"loading...\",\n \"loadingEllipsis\": \"Loading...\",\n \"noIncomingReferences\": \"No incoming references\",\n \"untitledResource\": \"Untitled Resource\",\n \"noText\": \"No text\",\n \"createReference\": \"Create Reference\",\n \"entityTypesOptional\": \"Entity Types (Optional)\",\n \"fragmentSelected\": \"Fragment selected\",\n \"imageRegionSelected\": \"Image region selected\",\n \"includeDescriptiveReferences\": \"Include descriptive references\",\n \"descriptiveReferencesTooltip\": \"Also find phrases like 'the CEO', 'the tech giant', 'the physicist' (in addition to names)\"\n },\n \"KeyboardShortcuts\": {\n \"title\": \"Keyboard Shortcuts\",\n \"closeDialog\": \"Close dialog\",\n \"or\": \"or\",\n \"navigationTitle\": \"Navigation\",\n \"navOpenSearch\": \"Open global search\",\n \"navOpenSearchAlt\": \"Open global search (alternative)\",\n \"navCreateResource\": \"Create new resource\",\n \"navCloseOverlays\": \"Close all overlays (double press)\",\n \"navShowHelp\": \"Show keyboard shortcuts help\",\n \"sidebarTitle\": \"Knowledge Sidebar\",\n \"sidebarCollapse\": \"Collapse sidebar\",\n \"sidebarExpand\": \"Expand sidebar\",\n \"sidebarPickup\": \"Pick up resource tab (when focused)\",\n \"sidebarMove\": \"Move resource tab (when dragging)\",\n \"sidebarDrop\": \"Drop resource tab (when dragging)\",\n \"sidebarCancel\": \"Cancel drag operation\",\n \"annotationsTitle\": \"Resource Annotations\",\n \"annotHighlight\": \"Create highlight from annotation (direct)\",\n \"annotReference\": \"Open reference popup for annotation\",\n \"annotDelete\": \"Delete focused annotation\",\n \"annotNavigate\": \"Navigate through annotations\",\n \"annotNavigateBack\": \"Navigate annotations backward\",\n \"listsTitle\": \"Lists & Grids\",\n \"listsFilterNav\": \"Navigate entity type filters\",\n \"listsGridNav\": \"Navigate resource grid\",\n \"listsJumpFirst\": \"Jump to first item\",\n \"listsJumpLast\": \"Jump to last item\",\n \"searchModalTitle\": \"In Search Modal\",\n \"searchNav\": \"Navigate search results\",\n \"searchSelect\": \"Select result\",\n \"searchClose\": \"Close search\",\n \"modalTitle\": \"Modal Controls\",\n \"modalClose\": \"Close active modal\",\n \"modalNavForward\": \"Navigate forward through buttons\",\n \"modalNavBackward\": \"Navigate backward through buttons\",\n \"modalActivate\": \"Activate focused button\",\n \"accessibilityTitle\": \"Accessibility\",\n \"a11ySkipLinks\": \"Navigate to skip links (when at page start)\",\n \"a11yFollowLink\": \"Follow skip link\",\n \"macNote\": \"Using Mac keyboard shortcuts. ⌘ is the Command key.\",\n \"windowsNote\": \"Using Windows/Linux keyboard shortcuts. Ctrl is the Control key.\",\n \"footerHint\": \"Press {key} anytime to show this help\",\n \"close\": \"Close\"\n },\n \"AnnotateToolbar\": {\n \"modeGroup\": \"Mode\",\n \"browse\": \"Browse\",\n \"annotate\": \"Annotate\",\n \"selectionGroup\": \"Motivation\",\n \"clickGroup\": \"Click\",\n \"shapeGroup\": \"Shape\",\n \"none\": \"None\",\n \"linking\": \"Reference\",\n \"highlighting\": \"Highlight\",\n \"assessing\": \"Assess\",\n \"commenting\": \"Comment\",\n \"tagging\": \"Tag\",\n \"detail\": \"Detail\",\n \"follow\": \"Follow\",\n \"deleting\": \"Delete\",\n \"jsonld\": \"JSON-LD\",\n \"rectangle\": \"Rectangle\",\n \"circle\": \"Circle\",\n \"polygon\": \"Polygon\"\n },\n \"CollapsibleResourceNavigation\": {\n \"title\": \"Navigation\",\n \"collapseSidebar\": \"Collapse sidebar\",\n \"expandSidebar\": \"Expand sidebar\",\n \"dragToReorder\": \"Drag to reorder\",\n \"dragToReorderDoc\": \"Drag to reorder {name}\",\n \"closeResource\": \"Close resource\",\n \"dragInstructions\": \"To reorder resources: Use Tab to navigate to a resource. Press Alt+Up arrow to move up or Alt+Down arrow to move down. For drag and drop: Press space bar to pick up the item. Use arrow keys to move it. Press space bar again to drop.\"\n },\n \"ResourceViewer\": {\n \"deleteConfirmationTitle\": \"Delete Annotation\",\n \"deleteConfirmationMessage\": \"Are you sure you want to delete this annotation? This action cannot be undone.\",\n \"deleteConfirmationCancel\": \"Cancel\",\n \"deleteConfirmationDelete\": \"Delete\"\n },\n \"Settings\": {\n \"title\": \"Settings\",\n \"lineNumbers\": \"Line Numbers\",\n \"lineNumbersVisible\": \"Visible\",\n \"lineNumbersHidden\": \"Hidden\",\n \"theme\": \"Theme\",\n \"themeLight\": \"Light\",\n \"themeDark\": \"Dark\",\n \"themeSystem\": \"System\",\n \"themeSystemActive\": \"System ({mode})\",\n \"themeModeActive\": \"Using {mode} mode\",\n \"language\": \"Language\",\n \"languageHint\": \"Change language in the main navigation\",\n \"languageChanging\": \"Changing language...\"\n },\n \"AnnotateView\": {}\n}\n"],"mappings":";;;;AACE,cAAW;AAAA,EACT,aAAe;AAAA,EACf,SAAW;AAAA,EACX,cAAgB;AAAA,EAChB,eAAiB;AAAA,EACjB,aAAe;AAAA,EACf,UAAY;AACd;AACA,wBAAqB;AAAA,EACnB,OAAS;AAAA,EACT,QAAU;AAAA,EACV,cAAgB;AAAA,EAChB,gBAAkB;AAAA,EAClB,gBAAkB;AAAA,EAClB,WAAa;AAAA,EACb,UAAY;AAAA,EACZ,OAAS;AAAA,EACT,kBAAoB;AAAA,EACpB,SAAW;AAAA,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U;AAAA,EACV,SAAW;AACb;AACA,oCAAiC;AAAA,EAC/B,OAAS;AAAA,EACT,iBAAmB;AAAA,EACnB,eAAiB;AAAA,EACjB,eAAiB;AAAA,EACjB,kBAAoB;AAAA,EACpB,eAAiB;AAAA,EACjB,kBAAoB;AACtB;AACA,qBAAkB;AAAA,EAChB,yBAA2B;AAAA,EAC3B,2BAA6B;AAAA,EAC7B,0BAA4B;AAAA,EAC5B,0BAA4B;AAC9B;AACA,eAAY;AAAA,EACV,OAAS;AAAA,EACT,aAAe;AAAA,EACf,oBAAsB;AAAA,EACtB,mBAAqB;AAAA,EACrB,OAAS;AAAA,EACT,YAAc;AAAA,EACd,WAAa;AAAA,EACb,aAAe;AAAA,EACf,mBAAqB;AAAA,EACrB,iBAAmB;AAAA,EACnB,UAAY;AAAA,EACZ,cAAgB;AAAA,EAChB,kBAAoB;AACtB;AACA,mBAAgB,CAAC;AAzUnB;AAAA,EACE;AAAA,EAQA;AAAA,EAeA;AAAA,EAmBA;AAAA,EA6BA;AAAA,EAyBA;AAAA,EAcA;AAAA,EAwBA;AAAA,EAkCA;AAAA,EASA;AAAA,EAWA;AAAA,EAWA;AAAA,EAQA;AAAA,EAyBA;AAAA,EA6CA;AAAA,EAqBA;AAAA,EASA;AAAA,EAMA;AAAA,EAeA;AACF;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _semiont_api_client from '@semiont/api-client';
|
|
2
|
-
import { components, ResourceUri, Selector, SemiontApiClient, AnnotationUri, ResourceAnnotationUri, ValidationResult, DetectionProgress as DetectionProgress$1, GenerationProgress as GenerationProgress$1, GenerationContext,
|
|
2
|
+
import { components, ResourceUri, Selector, SemiontApiClient, AnnotationUri, ResourceAnnotationUri, ValidationResult, DetectionProgress as DetectionProgress$1, GenerationProgress as GenerationProgress$1, GenerationContext, paths } from '@semiont/api-client';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import React__default, { ComponentType, ReactNode, MutableRefObject, KeyboardEvent as KeyboardEvent$1, Component, ErrorInfo } from 'react';
|
|
@@ -15,6 +15,8 @@ import { Root as Root$1 } from 'mdast';
|
|
|
15
15
|
import { VFile } from 'vfile';
|
|
16
16
|
import { TagSchema } from '@semiont/ontology';
|
|
17
17
|
export { TAG_SCHEMAS, TagCategory, TagSchema, getAllTagSchemas, getSchemaCategory as getTagCategory, getTagSchema, getTagSchemasByDomain, isValidCategory } from '@semiont/ontology';
|
|
18
|
+
import { ResourceEvent, StoredEvent } from '@semiont/core';
|
|
19
|
+
import mitt from 'mitt';
|
|
18
20
|
|
|
19
21
|
type Annotation$p = components['schemas']['Annotation'];
|
|
20
22
|
/**
|
|
@@ -1248,11 +1250,6 @@ storageKey }?: UsePanelWidthOptions): {
|
|
|
1248
1250
|
maxWidth: number;
|
|
1249
1251
|
};
|
|
1250
1252
|
|
|
1251
|
-
/**
|
|
1252
|
-
* Resource event structure from the event store
|
|
1253
|
-
* (Re-exported from api-client for consistency)
|
|
1254
|
-
*/
|
|
1255
|
-
type ResourceEvent = ResourceEvent$1;
|
|
1256
1253
|
/**
|
|
1257
1254
|
* Stream connection status
|
|
1258
1255
|
*/
|
|
@@ -1260,13 +1257,27 @@ type StreamStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
|
1260
1257
|
interface UseResourceEventsOptions {
|
|
1261
1258
|
rUri: ResourceUri;
|
|
1262
1259
|
onEvent?: (event: ResourceEvent) => void;
|
|
1263
|
-
onAnnotationAdded?: (event: ResourceEvent
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1260
|
+
onAnnotationAdded?: (event: Extract<ResourceEvent, {
|
|
1261
|
+
type: 'annotation.added';
|
|
1262
|
+
}>) => void;
|
|
1263
|
+
onAnnotationRemoved?: (event: Extract<ResourceEvent, {
|
|
1264
|
+
type: 'annotation.removed';
|
|
1265
|
+
}>) => void;
|
|
1266
|
+
onAnnotationBodyUpdated?: (event: Extract<ResourceEvent, {
|
|
1267
|
+
type: 'annotation.body.updated';
|
|
1268
|
+
}>) => void;
|
|
1269
|
+
onEntityTagAdded?: (event: Extract<ResourceEvent, {
|
|
1270
|
+
type: 'entitytag.added';
|
|
1271
|
+
}>) => void;
|
|
1272
|
+
onEntityTagRemoved?: (event: Extract<ResourceEvent, {
|
|
1273
|
+
type: 'entitytag.removed';
|
|
1274
|
+
}>) => void;
|
|
1275
|
+
onDocumentArchived?: (event: Extract<ResourceEvent, {
|
|
1276
|
+
type: 'resource.archived';
|
|
1277
|
+
}>) => void;
|
|
1278
|
+
onDocumentUnarchived?: (event: Extract<ResourceEvent, {
|
|
1279
|
+
type: 'resource.unarchived';
|
|
1280
|
+
}>) => void;
|
|
1270
1281
|
onError?: (error: string) => void;
|
|
1271
1282
|
autoConnect?: boolean;
|
|
1272
1283
|
}
|
|
@@ -1293,7 +1304,7 @@ interface UseResourceEventsOptions {
|
|
|
1293
1304
|
*/
|
|
1294
1305
|
declare function useResourceEvents({ rUri, onEvent, onAnnotationAdded, onAnnotationRemoved, onAnnotationBodyUpdated, onEntityTagAdded, onEntityTagRemoved, onDocumentArchived, onDocumentUnarchived, onError, autoConnect, }: UseResourceEventsOptions): {
|
|
1295
1306
|
status: StreamStatus;
|
|
1296
|
-
lastEvent: ResourceEvent
|
|
1307
|
+
lastEvent: ResourceEvent | null;
|
|
1297
1308
|
eventCount: number;
|
|
1298
1309
|
connect: () => Promise<void>;
|
|
1299
1310
|
disconnect: () => void;
|
|
@@ -1501,6 +1512,61 @@ declare function CacheProvider({ cacheManager, children }: CacheProviderProps):
|
|
|
1501
1512
|
*/
|
|
1502
1513
|
declare function useCacheManager(): CacheManager;
|
|
1503
1514
|
|
|
1515
|
+
/**
|
|
1516
|
+
* Selection data for annotation creation
|
|
1517
|
+
*/
|
|
1518
|
+
interface SelectionData {
|
|
1519
|
+
exact: string;
|
|
1520
|
+
start: number;
|
|
1521
|
+
end: number;
|
|
1522
|
+
svgSelector?: string;
|
|
1523
|
+
fragmentSelector?: string;
|
|
1524
|
+
conformsTo?: string;
|
|
1525
|
+
prefix?: string;
|
|
1526
|
+
suffix?: string;
|
|
1527
|
+
}
|
|
1528
|
+
type EventBus = ReturnType<typeof mitt<MakeMeaningEventMap>>;
|
|
1529
|
+
interface MakeMeaningEventBusProviderProps {
|
|
1530
|
+
rUri: ResourceUri;
|
|
1531
|
+
children: ReactNode;
|
|
1532
|
+
}
|
|
1533
|
+
/**
|
|
1534
|
+
* Unified event bus provider for all events (backend + UI)
|
|
1535
|
+
*
|
|
1536
|
+
* Backend events: Make-meaning's event-sourced domain events from SSE
|
|
1537
|
+
* UI events: Local user interactions (enables real-time collaboration)
|
|
1538
|
+
*
|
|
1539
|
+
* This unified bus allows:
|
|
1540
|
+
* 1. Components to emit UI events (selections, requests)
|
|
1541
|
+
* 2. Other components to react to those events
|
|
1542
|
+
* 3. Backend events to flow through the same bus
|
|
1543
|
+
* 4. Foundation for peer-to-peer real-time collaboration
|
|
1544
|
+
*/
|
|
1545
|
+
declare function MakeMeaningEventBusProvider({ rUri, children }: MakeMeaningEventBusProviderProps): react_jsx_runtime.JSX.Element;
|
|
1546
|
+
/**
|
|
1547
|
+
* Hook to access make-meaning event bus
|
|
1548
|
+
*
|
|
1549
|
+
* Use this to subscribe to make-meaning's domain events directly.
|
|
1550
|
+
* Think in detection, generation, annotation semantics - not HTTP.
|
|
1551
|
+
*
|
|
1552
|
+
* @example
|
|
1553
|
+
* ```typescript
|
|
1554
|
+
* const eventBus = useMakeMeaningEvents();
|
|
1555
|
+
*
|
|
1556
|
+
* useEffect(() => {
|
|
1557
|
+
* // Listen to make-meaning's detection progress
|
|
1558
|
+
* const handler = (event) => {
|
|
1559
|
+
* console.log('Make-meaning is detecting:', event.payload.currentStep);
|
|
1560
|
+
* console.log('Found so far:', event.payload.foundCount);
|
|
1561
|
+
* };
|
|
1562
|
+
*
|
|
1563
|
+
* eventBus.on('detection:progress', handler);
|
|
1564
|
+
* return () => eventBus.off('detection:progress', handler);
|
|
1565
|
+
* }, [eventBus]);
|
|
1566
|
+
* ```
|
|
1567
|
+
*/
|
|
1568
|
+
declare function useMakeMeaningEvents(): EventBus;
|
|
1569
|
+
|
|
1504
1570
|
/**
|
|
1505
1571
|
* Provider Pattern: Accepts OpenResourcesManager implementation as prop
|
|
1506
1572
|
* and makes it available to child components via Context.
|
|
@@ -1529,11 +1595,6 @@ declare function OpenResourcesProvider({ openResourcesManager, children }: {
|
|
|
1529
1595
|
declare function useOpenResources(): OpenResourcesManager;
|
|
1530
1596
|
|
|
1531
1597
|
type Annotation$j = components['schemas']['Annotation'];
|
|
1532
|
-
interface SelectionData {
|
|
1533
|
-
exact: string;
|
|
1534
|
-
start: number;
|
|
1535
|
-
end: number;
|
|
1536
|
-
}
|
|
1537
1598
|
interface ResourceAnnotationsContextType {
|
|
1538
1599
|
newAnnotationIds: Set<string>;
|
|
1539
1600
|
createAnnotation: (rUri: ResourceUri, motivation: 'highlighting' | 'linking' | 'assessing' | 'commenting' | 'tagging', selector: Selector | Selector[], body?: any[]) => Promise<Annotation$j | undefined>;
|
|
@@ -1988,40 +2049,6 @@ interface Props$8 {
|
|
|
1988
2049
|
annotateMode: boolean;
|
|
1989
2050
|
onAnnotateModeToggle: () => void;
|
|
1990
2051
|
onAnnotationRequested?: (pending: PendingAnnotation$7) => void;
|
|
1991
|
-
onCommentCreationRequested?: (selection: {
|
|
1992
|
-
exact: string;
|
|
1993
|
-
start: number;
|
|
1994
|
-
end: number;
|
|
1995
|
-
svgSelector?: string;
|
|
1996
|
-
fragmentSelector?: string;
|
|
1997
|
-
conformsTo?: string;
|
|
1998
|
-
}) => void;
|
|
1999
|
-
onTagCreationRequested?: (selection: {
|
|
2000
|
-
exact: string;
|
|
2001
|
-
start: number;
|
|
2002
|
-
end: number;
|
|
2003
|
-
svgSelector?: string;
|
|
2004
|
-
fragmentSelector?: string;
|
|
2005
|
-
conformsTo?: string;
|
|
2006
|
-
}) => void;
|
|
2007
|
-
onAssessmentCreationRequested?: (selection: {
|
|
2008
|
-
exact: string;
|
|
2009
|
-
start: number;
|
|
2010
|
-
end: number;
|
|
2011
|
-
svgSelector?: string;
|
|
2012
|
-
fragmentSelector?: string;
|
|
2013
|
-
conformsTo?: string;
|
|
2014
|
-
}) => void;
|
|
2015
|
-
onReferenceCreationRequested?: (selection: {
|
|
2016
|
-
exact: string;
|
|
2017
|
-
start: number;
|
|
2018
|
-
end: number;
|
|
2019
|
-
prefix?: string;
|
|
2020
|
-
suffix?: string;
|
|
2021
|
-
svgSelector?: string;
|
|
2022
|
-
fragmentSelector?: string;
|
|
2023
|
-
conformsTo?: string;
|
|
2024
|
-
}) => void;
|
|
2025
2052
|
annotators: Record<string, Annotator>;
|
|
2026
2053
|
}
|
|
2027
2054
|
declare function AnnotateView({ content, mimeType, resourceUri, annotations, handlers, creationHandler, uiState, onUIStateChange, enableWidgets, onEntityTypeClick, onReferenceNavigate, onUnresolvedReferenceClick, getTargetDocumentName, generatingReferenceId, onDeleteAnnotation, showLineNumbers, annotateMode, onAnnotateModeToggle, onAnnotationRequested, annotators }: Props$8): react_jsx_runtime.JSX.Element;
|
|
@@ -2073,64 +2100,35 @@ interface PendingAnnotation$6 {
|
|
|
2073
2100
|
selector: Selector | Selector[];
|
|
2074
2101
|
motivation: Motivation$7;
|
|
2075
2102
|
}
|
|
2103
|
+
/**
|
|
2104
|
+
* ResourceViewer - Display and interact with resource content and annotations
|
|
2105
|
+
*
|
|
2106
|
+
* This component uses event-driven architecture for real-time updates:
|
|
2107
|
+
* - Subscribes to make-meaning events (annotation:added, annotation:removed, annotation:updated)
|
|
2108
|
+
* - Automatically invalidates cache when annotations change
|
|
2109
|
+
* - No manual refetch needed - events handle cache invalidation
|
|
2110
|
+
*
|
|
2111
|
+
* Requirements:
|
|
2112
|
+
* - Must be wrapped in MakeMeaningEventBusProvider (provides event bus)
|
|
2113
|
+
* - Must be wrapped in CacheContext (provides cache manager)
|
|
2114
|
+
*
|
|
2115
|
+
* Event flow:
|
|
2116
|
+
* make-meaning → EventLog → SSE → EventBus → ResourceViewer → Cache invalidation
|
|
2117
|
+
*
|
|
2118
|
+
* Phase 2 complete: Event-based cache invalidation replaces manual refetch
|
|
2119
|
+
* Phase 3 complete: Fully event-driven - all user interactions use unified event bus
|
|
2120
|
+
*/
|
|
2076
2121
|
interface Props$4 {
|
|
2077
2122
|
resource: SemiontResource$2 & {
|
|
2078
2123
|
content: string;
|
|
2079
2124
|
};
|
|
2080
2125
|
annotations: AnnotationsCollection;
|
|
2081
|
-
onRefetchAnnotations?: () => void;
|
|
2082
|
-
annotateMode: boolean;
|
|
2083
|
-
onAnnotateModeToggle: () => void;
|
|
2084
2126
|
generatingReferenceId?: string | null;
|
|
2085
|
-
onAnnotationHover?: (annotationId: string | null) => void;
|
|
2086
|
-
onCommentHover?: (commentId: string | null) => void;
|
|
2087
|
-
hoveredAnnotationId?: string | null;
|
|
2088
|
-
hoveredCommentId?: string | null;
|
|
2089
|
-
scrollToAnnotationId?: string | null;
|
|
2090
2127
|
showLineNumbers?: boolean;
|
|
2091
2128
|
onAnnotationRequested?: (pending: PendingAnnotation$6) => void;
|
|
2092
|
-
onCommentCreationRequested?: (selection: {
|
|
2093
|
-
exact: string;
|
|
2094
|
-
start: number;
|
|
2095
|
-
end: number;
|
|
2096
|
-
svgSelector?: string;
|
|
2097
|
-
fragmentSelector?: string;
|
|
2098
|
-
conformsTo?: string;
|
|
2099
|
-
}) => void;
|
|
2100
|
-
onTagCreationRequested?: (selection: {
|
|
2101
|
-
exact: string;
|
|
2102
|
-
start: number;
|
|
2103
|
-
end: number;
|
|
2104
|
-
svgSelector?: string;
|
|
2105
|
-
fragmentSelector?: string;
|
|
2106
|
-
conformsTo?: string;
|
|
2107
|
-
}) => void;
|
|
2108
|
-
onAssessmentCreationRequested?: (selection: {
|
|
2109
|
-
exact: string;
|
|
2110
|
-
start: number;
|
|
2111
|
-
end: number;
|
|
2112
|
-
svgSelector?: string;
|
|
2113
|
-
fragmentSelector?: string;
|
|
2114
|
-
conformsTo?: string;
|
|
2115
|
-
}) => void;
|
|
2116
|
-
onReferenceCreationRequested?: (selection: {
|
|
2117
|
-
exact: string;
|
|
2118
|
-
start: number;
|
|
2119
|
-
end: number;
|
|
2120
|
-
prefix?: string;
|
|
2121
|
-
suffix?: string;
|
|
2122
|
-
svgSelector?: string;
|
|
2123
|
-
fragmentSelector?: string;
|
|
2124
|
-
conformsTo?: string;
|
|
2125
|
-
}) => void;
|
|
2126
|
-
onCommentClick?: (commentId: string) => void;
|
|
2127
|
-
onReferenceClick?: (referenceId: string) => void;
|
|
2128
|
-
onHighlightClick?: (highlightId: string) => void;
|
|
2129
|
-
onAssessmentClick?: (assessmentId: string) => void;
|
|
2130
|
-
onTagClick?: (tagId: string) => void;
|
|
2131
2129
|
annotators: Record<string, Annotator>;
|
|
2132
2130
|
}
|
|
2133
|
-
declare function ResourceViewer({ resource, annotations,
|
|
2131
|
+
declare function ResourceViewer({ resource, annotations, generatingReferenceId, showLineNumbers, onAnnotationRequested, annotators }: Props$4): react_jsx_runtime.JSX.Element;
|
|
2134
2132
|
|
|
2135
2133
|
type Annotation$c = components['schemas']['Annotation'];
|
|
2136
2134
|
interface AssessmentEntryProps {
|
|
@@ -2346,12 +2344,11 @@ interface Props$1 {
|
|
|
2346
2344
|
}) => void;
|
|
2347
2345
|
onCreateDocument?: (annotationUri: string, title: string, entityTypes: string[]) => void;
|
|
2348
2346
|
generatingReferenceId?: string | null;
|
|
2349
|
-
mediaType?: string | undefined;
|
|
2350
2347
|
referencedBy?: ReferencedBy[];
|
|
2351
2348
|
referencedByLoading?: boolean;
|
|
2352
2349
|
pendingAnnotation: PendingAnnotation$2 | null;
|
|
2353
2350
|
}
|
|
2354
|
-
declare function ReferencesPanel({ annotations, onAnnotationClick, focusedAnnotationId, hoveredAnnotationId, onAnnotationHover, onDetect, onCreate, isDetecting, detectionProgress, annotateMode, Link, routes, allEntityTypes, onCancelDetection, onSearchDocuments, onGenerateDocument, onCreateDocument, generatingReferenceId,
|
|
2351
|
+
declare function ReferencesPanel({ annotations, onAnnotationClick, focusedAnnotationId, hoveredAnnotationId, onAnnotationHover, onDetect, onCreate, isDetecting, detectionProgress, annotateMode, Link, routes, allEntityTypes, onCancelDetection, onSearchDocuments, onGenerateDocument, onCreateDocument, generatingReferenceId, referencedBy, referencedByLoading, pendingAnnotation, }: Props$1): react_jsx_runtime.JSX.Element;
|
|
2355
2352
|
|
|
2356
2353
|
interface Props {
|
|
2357
2354
|
documentEntityTypes: string[];
|
|
@@ -3695,7 +3692,6 @@ interface ResourceViewerPageProps {
|
|
|
3695
3692
|
onUnarchive: () => Promise<void>;
|
|
3696
3693
|
onClone: () => Promise<void>;
|
|
3697
3694
|
onUpdateAnnotationBody: (annotationUri: string, data: any) => Promise<void>;
|
|
3698
|
-
onRefetchAnnotations: () => Promise<void>;
|
|
3699
3695
|
/**
|
|
3700
3696
|
* Annotation CRUD callbacks
|
|
3701
3697
|
*/
|
|
@@ -3730,6 +3726,6 @@ interface ResourceViewerPageProps {
|
|
|
3730
3726
|
SearchResourcesModal: React__default.ComponentType<any>;
|
|
3731
3727
|
GenerationConfigModal: React__default.ComponentType<any>;
|
|
3732
3728
|
}
|
|
3733
|
-
declare function ResourceViewerPage(
|
|
3729
|
+
declare function ResourceViewerPage(props: ResourceViewerPageProps): react_jsx_runtime.JSX.Element;
|
|
3734
3730
|
|
|
3735
|
-
export { ANNOTATORS, AUTH_EVENTS, AVAILABLE_LOCALES, AdminDevOpsPage, type AdminDevOpsPageProps, AdminSecurityPage, type AdminSecurityPageProps, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, AnnotateToolbar, AnnotateView, type Annotation$n as Annotation, type AnnotationConfig, type AnnotationCreationHandler, type AnnotationHandlers, AnnotationHistory, type AnnotationManager, AnnotationOverlay, AnnotationProvider, type AnnotationProviderProps, AnnotationUIProvider, type AnnotationUIProviderProps, type AnnotationUIState, type AnnotationsCollection, type Annotator, ApiClientManager, ApiClientProvider, type ApiClientProviderProps, AssessmentEntry, AssessmentPanel, AsyncErrorBoundary, AuthErrorDisplay, type AuthErrorDisplayProps, type AuthEventDetail, type AuthEventType, type AvailableLocale, type BorderRadiusToken, BrowseView, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type CacheManager, CacheProvider, type CacheProviderProps, type ClickAction, CodeMirrorRenderer, CollaborationPanel, CollapsibleResourceNavigation, type CollapsibleResourceNavigationProps, type ColorToken, CommentEntry, CommentsPanel, ComposeLoadingState, type ComposeLoadingStateProps, type CreateAnnotationParams, type CreateConfig, type DeleteAnnotationParams, DetectSection, type DetectionConfig, type DetectionProgress, DetectionProgressWidget, type DevOpsFeature, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, EntityTypeBadges, ErrorBoundary, Footer, type GenerationOptions, type GenerationProgress, HighlightEntry, HighlightPanel, HistoryEvent, ImageURLSchema, ImageViewer, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LiveRegionProvider, type Motivation$b as Motivation, type NavigationItem, NavigationMenu, type NavigationMenuHelper, type NavigationProps, type OAuthProvider, type OAuthUser, OAuthUserSchema, type OpenResource, OpenResourcesManager, OpenResourcesProvider, PageLayout, PanelHeader, PopupContainer, PopupHeader, type PreparedAnnotation, ProposeEntitiesModal, QUERY_KEYS, RecentDocumentsPage, type RecentDocumentsPageProps, ReferenceEntry, ReferenceResolutionWidget, ReferencesPanel, ResizeHandle, type ResolvedTheme, ResourceAnnotationsProvider, ResourceCard, type ResourceCardProps, ResourceComposePage, type ResourceComposePageProps, ResourceDiscoveryPage, type ResourceDiscoveryPageProps, ResourceErrorState, type ResourceErrorStateProps,
|
|
3731
|
+
export { ANNOTATORS, AUTH_EVENTS, AVAILABLE_LOCALES, AdminDevOpsPage, type AdminDevOpsPageProps, AdminSecurityPage, type AdminSecurityPageProps, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, AnnotateToolbar, AnnotateView, type Annotation$n as Annotation, type AnnotationConfig, type AnnotationCreationHandler, type AnnotationHandlers, AnnotationHistory, type AnnotationManager, AnnotationOverlay, AnnotationProvider, type AnnotationProviderProps, AnnotationUIProvider, type AnnotationUIProviderProps, type AnnotationUIState, type AnnotationsCollection, type Annotator, ApiClientManager, ApiClientProvider, type ApiClientProviderProps, AssessmentEntry, AssessmentPanel, AsyncErrorBoundary, AuthErrorDisplay, type AuthErrorDisplayProps, type AuthEventDetail, type AuthEventType, type AvailableLocale, type BorderRadiusToken, BrowseView, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type CacheManager, CacheProvider, type CacheProviderProps, type ClickAction, CodeMirrorRenderer, CollaborationPanel, CollapsibleResourceNavigation, type CollapsibleResourceNavigationProps, type ColorToken, CommentEntry, CommentsPanel, ComposeLoadingState, type ComposeLoadingStateProps, type CreateAnnotationParams, type CreateConfig, type DeleteAnnotationParams, DetectSection, type DetectionConfig, type DetectionProgress, DetectionProgressWidget, type DevOpsFeature, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, EntityTypeBadges, ErrorBoundary, Footer, type GenerationOptions, type GenerationProgress, HighlightEntry, HighlightPanel, HistoryEvent, ImageURLSchema, ImageViewer, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LiveRegionProvider, MakeMeaningEventBusProvider, type MakeMeaningEventBusProviderProps, type Motivation$b as Motivation, type NavigationItem, NavigationMenu, type NavigationMenuHelper, type NavigationProps, type OAuthProvider, type OAuthUser, OAuthUserSchema, type OpenResource, OpenResourcesManager, OpenResourcesProvider, PageLayout, PanelHeader, PopupContainer, PopupHeader, type PreparedAnnotation, ProposeEntitiesModal, QUERY_KEYS, RecentDocumentsPage, type RecentDocumentsPageProps, ReferenceEntry, ReferenceResolutionWidget, ReferencesPanel, ResizeHandle, type ResolvedTheme, ResourceAnnotationsProvider, ResourceCard, type ResourceCardProps, ResourceComposePage, type ResourceComposePageProps, ResourceDiscoveryPage, type ResourceDiscoveryPageProps, ResourceErrorState, type ResourceErrorStateProps, ResourceInfoPanel, ResourceLoadingState, ResourceSearchModal, type ResourceSearchModalProps, ResourceTagsInline, ResourceViewer, ResourceViewerPage, type ResourceViewerPageProps, type RouteBuilder, type SaveResourceParams, SearchModal, type SearchModalProps, SelectedTextDisplay, type SelectionData, type SelectionMotivation, type SelectorType, SemiontBranding, SemiontFavicon, type SemiontResource$3 as SemiontResource, SessionExpiryBanner, SessionManager, SessionProvider, SessionTimer, SettingsPanel, type ShadowToken, type ShapeType, SignInForm, type SignInFormProps, SignUpForm, type SignUpFormProps, SimpleNavigation, type SimpleNavigationItem, type SimpleNavigationProps, SkipLinks, SortableResourceTab, type SortableResourceTabProps, type SpacingToken, StatisticsPanel, StatusDisplay, type StreamStatus, SvgDrawingCanvas, TagEntry, TagSchemasPage, type TagSchemasPageProps, TaggingPanel, type TextSegment, type TextSelection, type Theme, ToastContainer, type ToastMessage, ToastProvider, type ToastType, Toolbar, type ToolbarPanelType, type TransitionToken, TranslationManager, TranslationProvider, type TranslationProviderProps, type TypographyToken, type UICreateAnnotationParams, UnifiedAnnotationsPanel, UnifiedHeader, UserMenuSkeleton, WelcomePage, type WelcomePageProps, buttonStyles, createCancelDetectionHandler, createDetectionHandler, cssVariables, dispatch401Error, dispatch403Error, dispatchAuthEvent, faviconPaths, generateCSSVariables, getResourceIcon, getSelectedShapeForSelectorType, getSelectorType, getShortcutDisplay, getSupportedShapes, isShapeSupported, jsonLightHighlightStyle, jsonLightTheme, onAuthEvent, rehypeRenderAnnotations, remarkAnnotations, sanitizeImageURL, saveSelectedShapeForSelectorType, supportsDetection, tokens, useAdmin, useAnnotationManager, useAnnotationPanel, useAnnotationUI, useAnnotations, useApiClient, useAuthApi, useCacheManager, useDebounce, useDebouncedCallback, useDetectionProgress, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEntityTypes, useFormAnnouncements, useFormValidation, useFormattedTime, useGenerationProgress, useHealth, useIsTyping, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useMakeMeaningEvents, useOpenResources, usePanelWidth, usePreloadTranslations, useResourceAnnotations, useResourceEvents, useResourceLoadingAnnouncements, useResources, useRovingTabIndex, useSearchAnnouncements, useSessionContext, useSessionExpiry, useTheme, useToast, useToolbar, useTranslations, validationRules };
|