@semiont/react-ui 0.2.45 → 0.3.0
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/{PdfAnnotationCanvas.client-COQREPXU.mjs → PdfAnnotationCanvas.client-PVTVPDBQ.mjs} +3 -4
- package/dist/PdfAnnotationCanvas.client-PVTVPDBQ.mjs.map +1 -0
- package/dist/{ar-7SUXNE34.mjs → ar-APUOG2AP.mjs} +46 -6
- package/dist/ar-APUOG2AP.mjs.map +1 -0
- package/dist/{bn-XOET3DOI.mjs → bn-EFK2LJGK.mjs} +46 -6
- package/dist/bn-EFK2LJGK.mjs.map +1 -0
- package/dist/{chunk-JH7BXE2P.mjs → chunk-7DW2P4UE.mjs} +45 -5
- package/dist/chunk-7DW2P4UE.mjs.map +1 -0
- package/dist/{chunk-Q2KV6Y2J.mjs → chunk-7GEYABC6.mjs} +32 -32
- package/dist/{chunk-3JTO27MH.mjs → chunk-D4GAAQMM.mjs} +2 -9
- package/dist/{cs-X63DXX7L.mjs → cs-A26MEEQE.mjs} +46 -6
- package/dist/cs-A26MEEQE.mjs.map +1 -0
- package/dist/{da-OWTCV57A.mjs → da-U3L2FHSZ.mjs} +46 -6
- package/dist/da-U3L2FHSZ.mjs.map +1 -0
- package/dist/{de-77BMFDVF.mjs → de-Y5BHEBT7.mjs} +46 -6
- package/dist/de-Y5BHEBT7.mjs.map +1 -0
- package/dist/dist-YLEIY3JJ.mjs +547 -0
- package/dist/dist-YLEIY3JJ.mjs.map +1 -0
- package/dist/{el-FIBNLH2V.mjs → el-HU7LAWQY.mjs} +46 -6
- package/dist/el-HU7LAWQY.mjs.map +1 -0
- package/dist/{en-XWEPVTB4.mjs → en-HAKDCFKL.mjs} +5 -3
- package/dist/{es-726NTS53.mjs → es-4BN64QH5.mjs} +46 -6
- package/dist/es-4BN64QH5.mjs.map +1 -0
- package/dist/{fa-3N4CIWE6.mjs → fa-6ELTBARU.mjs} +46 -6
- package/dist/fa-6ELTBARU.mjs.map +1 -0
- package/dist/{fi-JOM3M7Z4.mjs → fi-DJ4WGIFW.mjs} +46 -6
- package/dist/fi-DJ4WGIFW.mjs.map +1 -0
- package/dist/{fr-56QSXS7E.mjs → fr-23XM6H6H.mjs} +46 -6
- package/dist/fr-23XM6H6H.mjs.map +1 -0
- package/dist/{he-SNAXPJEK.mjs → he-JSWJC2XU.mjs} +46 -6
- package/dist/he-JSWJC2XU.mjs.map +1 -0
- package/dist/{hi-CRBRD5TB.mjs → hi-BENHG3OJ.mjs} +46 -6
- package/dist/hi-BENHG3OJ.mjs.map +1 -0
- package/dist/{id-BRCVLICF.mjs → id-4HHQJQNF.mjs} +46 -6
- package/dist/id-4HHQJQNF.mjs.map +1 -0
- package/dist/index.css +108 -12
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +399 -147
- package/dist/index.mjs +3573 -2226
- package/dist/index.mjs.map +1 -1
- package/dist/{it-M2Z27BNB.mjs → it-U6I5PDKU.mjs} +46 -6
- package/dist/it-U6I5PDKU.mjs.map +1 -0
- package/dist/{ja-TZUKW7HD.mjs → ja-K3YBDWDP.mjs} +46 -6
- package/dist/ja-K3YBDWDP.mjs.map +1 -0
- package/dist/{ko-NKBGGOL6.mjs → ko-KC2HXRXG.mjs} +46 -6
- package/dist/ko-KC2HXRXG.mjs.map +1 -0
- package/dist/{magic-string.es-7FJ3LUGB.mjs → magic-string.es-K77I4ZQN.mjs} +2 -2
- package/dist/{ms-XFXPN6RX.mjs → ms-KY5QGBNN.mjs} +46 -6
- package/dist/ms-KY5QGBNN.mjs.map +1 -0
- package/dist/{nl-MVYXAS5C.mjs → nl-6PZFLGY2.mjs} +46 -6
- package/dist/nl-6PZFLGY2.mjs.map +1 -0
- package/dist/{no-XOLO4JPV.mjs → no-5QR7PLVJ.mjs} +46 -6
- package/dist/no-5QR7PLVJ.mjs.map +1 -0
- package/dist/{pl-TRWLMMC4.mjs → pl-4GV2NQXE.mjs} +46 -6
- package/dist/pl-4GV2NQXE.mjs.map +1 -0
- package/dist/{pt-M3TE24UI.mjs → pt-F3F5QD2P.mjs} +46 -6
- package/dist/pt-F3F5QD2P.mjs.map +1 -0
- package/dist/{ro-QBFG2T64.mjs → ro-TFYL2IQB.mjs} +46 -6
- package/dist/ro-TFYL2IQB.mjs.map +1 -0
- package/dist/{sv-IUECBXWX.mjs → sv-PRVF2QLR.mjs} +46 -6
- package/dist/sv-PRVF2QLR.mjs.map +1 -0
- package/dist/test-utils.mjs +16994 -22140
- package/dist/test-utils.mjs.map +1 -1
- package/dist/{th-US7KIN5Q.mjs → th-SUQOQFUZ.mjs} +46 -6
- package/dist/th-SUQOQFUZ.mjs.map +1 -0
- package/dist/{tr-DWJ2FFUK.mjs → tr-AYUJZOFJ.mjs} +46 -6
- package/dist/tr-AYUJZOFJ.mjs.map +1 -0
- package/dist/{uk-M4ZE4DPZ.mjs → uk-YY5WGLBM.mjs} +46 -6
- package/dist/uk-YY5WGLBM.mjs.map +1 -0
- package/dist/{vi-FERZNPSH.mjs → vi-6RO77ITD.mjs} +46 -6
- package/dist/{vi-FERZNPSH.mjs.map → vi-6RO77ITD.mjs.map} +1 -1
- package/dist/{zh-3J2I3WYK.mjs → zh-L6GA65H6.mjs} +46 -6
- package/dist/zh-L6GA65H6.mjs.map +1 -0
- package/package.json +18 -14
- package/src/components/Button/Button.tsx +23 -25
- package/src/components/annotation/AnnotateToolbar.tsx +1 -1
- package/src/components/annotation-popups/SharedPopupElements.tsx +5 -7
- package/src/components/image-annotation/SvgDrawingCanvas.tsx +3 -4
- package/src/components/modals/ConfigureGenerationStep.tsx +190 -0
- package/src/components/modals/ConfigureSearchStep.tsx +105 -0
- package/src/components/modals/ContextSummary.tsx +183 -0
- package/src/components/modals/GatherContextStep.tsx +89 -0
- package/src/components/modals/KeyboardShortcutsHelpModal.tsx +4 -6
- package/src/components/modals/ProposeEntitiesModal.tsx +4 -6
- package/src/components/modals/ReferenceWizardModal.tsx +326 -0
- package/src/components/modals/ResourceSearchModal.tsx +4 -6
- package/src/components/modals/SearchModal.css +43 -0
- package/src/components/modals/SearchModal.tsx +4 -6
- package/src/components/modals/SearchResultsStep.tsx +126 -0
- package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +3 -4
- package/src/components/pdf-annotation/__tests__/PdfAnnotationCanvas.test.tsx +36 -14
- package/src/components/resource/AnnotateView.tsx +4 -4
- package/src/components/resource/AnnotationHistory.tsx +2 -2
- package/src/components/resource/BrowseView.tsx +4 -4
- package/src/components/resource/ResourceViewer.tsx +5 -8
- package/src/components/resource/__tests__/AnnotationHistory.test.tsx +16 -16
- package/src/components/resource/__tests__/BrowseView.test.tsx +2 -2
- package/src/components/resource/__tests__/HistoryEvent.test.tsx +1 -1
- package/src/components/resource/__tests__/ResourceViewer.mode-switch.test.tsx +1 -1
- package/src/components/resource/panels/AssessmentEntry.tsx +9 -11
- package/src/components/resource/panels/AssessmentPanel.tsx +1 -1
- package/src/components/resource/panels/CommentEntry.tsx +10 -12
- package/src/components/resource/panels/CommentsPanel.tsx +1 -1
- package/src/components/resource/panels/HighlightEntry.tsx +9 -11
- package/src/components/resource/panels/HighlightPanel.tsx +2 -2
- package/src/components/resource/panels/ReferenceEntry.tsx +57 -104
- package/src/components/resource/panels/ReferencesPanel.css +85 -13
- package/src/components/resource/panels/ReferencesPanel.tsx +2 -3
- package/src/components/resource/panels/TagEntry.tsx +9 -11
- package/src/components/resource/panels/TaggingPanel.tsx +1 -1
- package/src/components/resource/panels/__tests__/AssessmentPanel.test.tsx +4 -4
- package/src/components/resource/panels/__tests__/AssistSection.test.tsx +7 -7
- package/src/components/resource/panels/__tests__/CommentsPanel.test.tsx +3 -3
- package/src/components/resource/panels/__tests__/HighlightPanel.annotationProgress.test.tsx +2 -2
- package/src/components/resource/panels/__tests__/ReferenceEntry.test.tsx +64 -101
- package/src/components/resource/panels/__tests__/StatisticsPanel.test.tsx +1 -1
- package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +7 -7
- package/src/components/viewers/ImageViewer.tsx +3 -6
- package/src/components/viewers/__tests__/ImageViewer.test.tsx +3 -3
- package/src/features/admin-devops/__tests__/AdminDevOpsPage.test.tsx +5 -5
- package/src/features/admin-exchange/__tests__/AdminExchangePage.test.tsx +141 -0
- package/src/features/admin-exchange/__tests__/ExportCard.test.tsx +41 -0
- package/src/features/admin-exchange/__tests__/ImportCard.test.tsx +148 -0
- package/src/features/admin-exchange/__tests__/ImportProgress.test.tsx +106 -0
- package/src/features/admin-exchange/components/AdminExchangePage.tsx +120 -0
- package/src/features/admin-exchange/components/ExportCard.tsx +35 -0
- package/src/features/admin-exchange/components/ImportCard.tsx +188 -0
- package/src/features/admin-exchange/components/ImportProgress.tsx +86 -0
- package/src/features/admin-security/__tests__/AdminSecurityPage.test.tsx +3 -3
- package/src/features/moderate-entity-tags/__tests__/EntityTagsPage.test.tsx +2 -2
- package/src/features/moderate-recent/__tests__/RecentDocumentsPage.test.tsx +4 -4
- package/src/features/moderate-tag-schemas/__tests__/TagSchemasPage.test.tsx +3 -3
- package/src/features/moderation-linked-data/__tests__/LinkedDataPage.test.tsx +117 -0
- package/src/features/moderation-linked-data/components/LinkedDataPage.tsx +121 -0
- package/src/features/resource-compose/__tests__/ResourceComposePage.test.tsx +5 -5
- package/src/features/resource-compose/components/ResourceComposePage.tsx +56 -1
- package/src/features/resource-discovery/__tests__/ResourceCard.test.tsx +1 -1
- package/src/features/resource-discovery/__tests__/ResourceDiscoveryPage.test.tsx +2 -2
- package/src/features/resource-viewer/__tests__/AnnotationCreationPending.test.tsx +14 -14
- package/src/features/resource-viewer/__tests__/AnnotationDeletionIntegration.test.tsx +12 -11
- package/src/features/resource-viewer/__tests__/AnnotationProgressDismissal.test.tsx +2 -2
- package/src/features/resource-viewer/__tests__/BindFlowIntegration.test.tsx +22 -115
- package/src/features/resource-viewer/__tests__/DetectionFlowBug.test.tsx +3 -3
- package/src/features/resource-viewer/__tests__/DetectionFlowIntegration.test.tsx +20 -20
- package/src/features/resource-viewer/__tests__/ResourceMutations.test.tsx +7 -7
- package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +43 -20
- package/src/features/resource-viewer/__tests__/ToastNotifications.test.tsx +2 -2
- package/src/features/resource-viewer/__tests__/YieldFlowIntegration.test.tsx +45 -82
- package/src/features/resource-viewer/__tests__/annotation-progress-flow.test.tsx +4 -4
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +151 -74
- package/src/integrations/tailwind-plugin.js +3 -3
- package/src/styles/core/buttons.css +31 -0
- package/src/styles/features/exchange.css +404 -0
- package/src/styles/index.css +1 -0
- package/translations/ar.json +42 -4
- package/translations/bn.json +42 -4
- package/translations/cs.json +42 -4
- package/translations/da.json +128 -90
- package/translations/de.json +122 -84
- package/translations/el.json +42 -4
- package/translations/en.json +42 -4
- package/translations/es.json +42 -4
- package/translations/fa.json +42 -4
- package/translations/fi.json +68 -30
- package/translations/fr.json +42 -4
- package/translations/he.json +42 -4
- package/translations/hi.json +42 -4
- package/translations/id.json +43 -5
- package/translations/it.json +62 -24
- package/translations/ja.json +43 -5
- package/translations/ko.json +42 -4
- package/translations/ms.json +43 -5
- package/translations/nl.json +41 -3
- package/translations/no.json +104 -66
- package/translations/pl.json +42 -4
- package/translations/pt.json +43 -5
- package/translations/ro.json +42 -4
- package/translations/sv.json +42 -4
- package/translations/th.json +42 -4
- package/translations/tr.json +42 -4
- package/translations/uk.json +42 -4
- package/translations/vi.json +42 -4
- package/translations/zh.json +42 -4
- package/dist/PdfAnnotationCanvas.client-COQREPXU.mjs.map +0 -1
- package/dist/ar-7SUXNE34.mjs.map +0 -1
- package/dist/bn-XOET3DOI.mjs.map +0 -1
- package/dist/chunk-JH7BXE2P.mjs.map +0 -1
- package/dist/cs-X63DXX7L.mjs.map +0 -1
- package/dist/da-OWTCV57A.mjs.map +0 -1
- package/dist/de-77BMFDVF.mjs.map +0 -1
- package/dist/el-FIBNLH2V.mjs.map +0 -1
- package/dist/es-726NTS53.mjs.map +0 -1
- package/dist/fa-3N4CIWE6.mjs.map +0 -1
- package/dist/fi-JOM3M7Z4.mjs.map +0 -1
- package/dist/fr-56QSXS7E.mjs.map +0 -1
- package/dist/he-SNAXPJEK.mjs.map +0 -1
- package/dist/hi-CRBRD5TB.mjs.map +0 -1
- package/dist/id-BRCVLICF.mjs.map +0 -1
- package/dist/it-M2Z27BNB.mjs.map +0 -1
- package/dist/ja-TZUKW7HD.mjs.map +0 -1
- package/dist/ko-NKBGGOL6.mjs.map +0 -1
- package/dist/ms-XFXPN6RX.mjs.map +0 -1
- package/dist/nl-MVYXAS5C.mjs.map +0 -1
- package/dist/no-XOLO4JPV.mjs.map +0 -1
- package/dist/pl-TRWLMMC4.mjs.map +0 -1
- package/dist/pt-M3TE24UI.mjs.map +0 -1
- package/dist/ro-QBFG2T64.mjs.map +0 -1
- package/dist/sv-IUECBXWX.mjs.map +0 -1
- package/dist/th-US7KIN5Q.mjs.map +0 -1
- package/dist/tr-DWJ2FFUK.mjs.map +0 -1
- package/dist/uk-M4ZE4DPZ.mjs.map +0 -1
- package/dist/zh-3J2I3WYK.mjs.map +0 -1
- package/src/examples/ButtonUsageExample.tsx +0 -242
- package/src/examples/button-css-modules.module.css +0 -164
- package/src/examples/button-styled-components.tsx +0 -215
- package/src/examples/button-tailwind.css +0 -51
- /package/dist/{chunk-Q2KV6Y2J.mjs.map → chunk-7GEYABC6.mjs.map} +0 -0
- /package/dist/{chunk-3JTO27MH.mjs.map → chunk-D4GAAQMM.mjs.map} +0 -0
- /package/dist/{en-XWEPVTB4.mjs.map → en-HAKDCFKL.mjs.map} +0 -0
- /package/dist/{magic-string.es-7FJ3LUGB.mjs.map → magic-string.es-K77I4ZQN.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _semiont_core from '@semiont/core';
|
|
2
|
-
import { components,
|
|
2
|
+
import { components, ResourceId, Selector, AnnotationId, ResourceEvent, EventMap, EventBus, MarkProgress, StoredEvent, paths, GatheredContext, Motivation as Motivation$9, YieldProgress } from '@semiont/core';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
|
-
import React__default, { ComponentType, ReactNode, KeyboardEvent as KeyboardEvent$1, Component, ErrorInfo } from 'react';
|
|
5
|
+
import React__default, { ComponentType, ReactNode, KeyboardEvent as KeyboardEvent$1, Component, ErrorInfo, Ref } from 'react';
|
|
6
6
|
import { O as OpenResourcesManager, S as SessionManager, T as TranslationManager } from './EventBusContext-CLnb2LmB.mjs';
|
|
7
7
|
export { E as EventBusProvider, a as EventBusProviderProps, b as OpenResourceFromManager, c as SessionState, r as resetEventBusForTesting, u as useEventBus } from './EventBusContext-CLnb2LmB.mjs';
|
|
8
8
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
@@ -14,17 +14,17 @@ import { WidgetType } from '@codemirror/view';
|
|
|
14
14
|
import { TagSchema } from '@semiont/ontology';
|
|
15
15
|
export { TAG_SCHEMAS, TagCategory, TagSchema, getAllTagSchemas, getSchemaCategory as getTagCategory, getTagSchema, getTagSchemasByDomain, isValidCategory } from '@semiont/ontology';
|
|
16
16
|
|
|
17
|
-
type Annotation$
|
|
17
|
+
type Annotation$m = components['schemas']['Annotation'];
|
|
18
18
|
/**
|
|
19
19
|
* Collection of all annotation types for a resource.
|
|
20
20
|
* Replaces separate highlights, references, assessments, comments, tags props.
|
|
21
21
|
*/
|
|
22
22
|
interface AnnotationsCollection {
|
|
23
|
-
highlights: Annotation$
|
|
24
|
-
references: Annotation$
|
|
25
|
-
assessments: Annotation$
|
|
26
|
-
comments: Annotation$
|
|
27
|
-
tags: Annotation$
|
|
23
|
+
highlights: Annotation$m[];
|
|
24
|
+
references: Annotation$m[];
|
|
25
|
+
assessments: Annotation$m[];
|
|
26
|
+
comments: Annotation$m[];
|
|
27
|
+
tags: Annotation$m[];
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Event handlers for annotation interactions.
|
|
@@ -32,7 +32,7 @@ interface AnnotationsCollection {
|
|
|
32
32
|
*/
|
|
33
33
|
interface AnnotationHandlers {
|
|
34
34
|
/** Unified click handler - routes based on annotation type and current mode */
|
|
35
|
-
onClick?: (annotation: Annotation$
|
|
35
|
+
onClick?: (annotation: Annotation$m, event?: React.MouseEvent) => void;
|
|
36
36
|
/** Unified hover handler for all annotation types */
|
|
37
37
|
onHover?: (annotationId: string | null) => void;
|
|
38
38
|
/** Hover handler specifically for comment panel highlighting */
|
|
@@ -81,7 +81,7 @@ interface UICreateAnnotationParams {
|
|
|
81
81
|
* - linking: Shows Quick Reference popup FIRST, creates when user confirms
|
|
82
82
|
*/
|
|
83
83
|
interface AnnotationCreationHandler {
|
|
84
|
-
onCreate?: (params: UICreateAnnotationParams) => void | Promise<void> | Promise<Annotation$
|
|
84
|
+
onCreate?: (params: UICreateAnnotationParams) => void | Promise<void> | Promise<Annotation$m | undefined>;
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* UI state for annotation toolbar and interactions.
|
|
@@ -114,12 +114,12 @@ interface AnnotationConfig {
|
|
|
114
114
|
annotateMode?: boolean;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
type Annotation$
|
|
117
|
+
type Annotation$l = components['schemas']['Annotation'];
|
|
118
118
|
/**
|
|
119
119
|
* Parameters for creating an annotation
|
|
120
120
|
*/
|
|
121
121
|
interface CreateAnnotationParams {
|
|
122
|
-
rUri:
|
|
122
|
+
rUri: ResourceId;
|
|
123
123
|
motivation: 'highlighting' | 'linking' | 'assessing' | 'commenting' | 'tagging';
|
|
124
124
|
selector: Selector | Selector[];
|
|
125
125
|
body?: any[];
|
|
@@ -129,7 +129,7 @@ interface CreateAnnotationParams {
|
|
|
129
129
|
*/
|
|
130
130
|
interface DeleteAnnotationParams {
|
|
131
131
|
annotationId: string;
|
|
132
|
-
rUri:
|
|
132
|
+
rUri: ResourceId;
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
135
|
* Annotation Manager Interface
|
|
@@ -161,7 +161,7 @@ interface AnnotationManager {
|
|
|
161
161
|
* @param params - Creation parameters (rUri, motivation, selector, body)
|
|
162
162
|
* @returns Promise resolving to the created annotation, or undefined if creation fails
|
|
163
163
|
*/
|
|
164
|
-
createAnnotation: (params: CreateAnnotationParams) => Promise<Annotation$
|
|
164
|
+
createAnnotation: (params: CreateAnnotationParams) => Promise<Annotation$l | undefined>;
|
|
165
165
|
/**
|
|
166
166
|
* Delete an annotation
|
|
167
167
|
* @param params - Deletion parameters (annotationId, rUri)
|
|
@@ -217,13 +217,13 @@ interface CacheManager {
|
|
|
217
217
|
* @param rUri - Resource URI
|
|
218
218
|
* @returns Promise or void (synchronous invalidation is acceptable)
|
|
219
219
|
*/
|
|
220
|
-
invalidateAnnotations: (rUri:
|
|
220
|
+
invalidateAnnotations: (rUri: ResourceId) => void | Promise<void>;
|
|
221
221
|
/**
|
|
222
222
|
* Invalidate events cache for a resource
|
|
223
223
|
* @param rUri - Resource URI
|
|
224
224
|
* @returns Promise or void (synchronous invalidation is acceptable)
|
|
225
225
|
*/
|
|
226
|
-
invalidateEvents: (rUri:
|
|
226
|
+
invalidateEvents: (rUri: ResourceId) => void | Promise<void>;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
/**
|
|
@@ -265,7 +265,7 @@ interface NavigationProps {
|
|
|
265
265
|
*/
|
|
266
266
|
|
|
267
267
|
type SemiontResource$4 = components['schemas']['ResourceDescriptor'];
|
|
268
|
-
type Annotation$
|
|
268
|
+
type Annotation$k = components['schemas']['Annotation'];
|
|
269
269
|
type Motivation$8 = components['schemas']['Motivation'];
|
|
270
270
|
/**
|
|
271
271
|
* Selection for creating annotations
|
|
@@ -293,7 +293,7 @@ interface TextSelection {
|
|
|
293
293
|
* No aliasing, wrappers, or compatibility layers elsewhere.
|
|
294
294
|
*/
|
|
295
295
|
|
|
296
|
-
type Annotation$
|
|
296
|
+
type Annotation$j = components['schemas']['Annotation'];
|
|
297
297
|
type Motivation$7 = components['schemas']['Motivation'];
|
|
298
298
|
/**
|
|
299
299
|
* Detection configuration for SSE-based annotation detection
|
|
@@ -330,7 +330,7 @@ interface Annotator {
|
|
|
330
330
|
isClickable: boolean;
|
|
331
331
|
hasHoverInteraction: boolean;
|
|
332
332
|
hasSidePanel: boolean;
|
|
333
|
-
matchesAnnotation: (annotation: Annotation$
|
|
333
|
+
matchesAnnotation: (annotation: Annotation$j) => boolean;
|
|
334
334
|
announceOnCreate: string;
|
|
335
335
|
detection?: DetectionConfig;
|
|
336
336
|
create: CreateConfig;
|
|
@@ -357,26 +357,26 @@ declare function useResources(): {
|
|
|
357
357
|
}, Error>;
|
|
358
358
|
};
|
|
359
359
|
get: {
|
|
360
|
-
useQuery: (
|
|
360
|
+
useQuery: (id: ResourceId, options?: Omit<UseQueryOptions, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<unknown, Error>;
|
|
361
361
|
};
|
|
362
362
|
events: {
|
|
363
|
-
useQuery: (
|
|
363
|
+
useQuery: (id: ResourceId) => _tanstack_react_query.UseQueryResult<{
|
|
364
364
|
events: any[];
|
|
365
365
|
}, Error>;
|
|
366
366
|
};
|
|
367
367
|
annotations: {
|
|
368
|
-
useQuery: (
|
|
368
|
+
useQuery: (id: ResourceId) => _tanstack_react_query.UseQueryResult<{
|
|
369
369
|
resource: _semiont_core.components["schemas"]["ResourceDescriptor"];
|
|
370
370
|
annotations: _semiont_core.components["schemas"]["Annotation"][];
|
|
371
371
|
}, Error>;
|
|
372
372
|
};
|
|
373
373
|
referencedBy: {
|
|
374
|
-
useQuery: (
|
|
374
|
+
useQuery: (id: ResourceId) => _tanstack_react_query.UseQueryResult<{
|
|
375
375
|
referencedBy: any[];
|
|
376
376
|
}, Error>;
|
|
377
377
|
};
|
|
378
378
|
representation: {
|
|
379
|
-
useQuery: (
|
|
379
|
+
useQuery: (id: ResourceId, mediaType: string) => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
380
380
|
};
|
|
381
381
|
search: {
|
|
382
382
|
useQuery: (query: string, limit: number) => _tanstack_react_query.UseQueryResult<{
|
|
@@ -388,8 +388,7 @@ declare function useResources(): {
|
|
|
388
388
|
};
|
|
389
389
|
create: {
|
|
390
390
|
useMutation: () => _tanstack_react_query.UseMutationResult<{
|
|
391
|
-
|
|
392
|
-
annotations: _semiont_core.components["schemas"]["Annotation"][];
|
|
391
|
+
resourceId: string;
|
|
393
392
|
}, Error, {
|
|
394
393
|
name: string;
|
|
395
394
|
file: File | Buffer;
|
|
@@ -402,12 +401,8 @@ declare function useResources(): {
|
|
|
402
401
|
}, unknown>;
|
|
403
402
|
};
|
|
404
403
|
update: {
|
|
405
|
-
useMutation: () => _tanstack_react_query.UseMutationResult<{
|
|
406
|
-
|
|
407
|
-
annotations: _semiont_core.components["schemas"]["Annotation"][];
|
|
408
|
-
entityReferences: _semiont_core.components["schemas"]["Annotation"][];
|
|
409
|
-
}, Error, {
|
|
410
|
-
rUri: ResourceUri;
|
|
404
|
+
useMutation: () => _tanstack_react_query.UseMutationResult<void, Error, {
|
|
405
|
+
id: ResourceId;
|
|
411
406
|
data: Parameters<SemiontApiClient["updateResource"]>[1];
|
|
412
407
|
}, unknown>;
|
|
413
408
|
};
|
|
@@ -416,7 +411,7 @@ declare function useResources(): {
|
|
|
416
411
|
token: string;
|
|
417
412
|
expiresAt: string;
|
|
418
413
|
resource: _semiont_core.components["schemas"]["ResourceDescriptor"];
|
|
419
|
-
}, Error,
|
|
414
|
+
}, Error, ResourceId, unknown>;
|
|
420
415
|
};
|
|
421
416
|
getByToken: {
|
|
422
417
|
useQuery: (cloneTokenStr: string) => _tanstack_react_query.UseQueryResult<{
|
|
@@ -426,8 +421,7 @@ declare function useResources(): {
|
|
|
426
421
|
};
|
|
427
422
|
createFromToken: {
|
|
428
423
|
useMutation: () => _tanstack_react_query.UseMutationResult<{
|
|
429
|
-
|
|
430
|
-
annotations: _semiont_core.components["schemas"]["Annotation"][];
|
|
424
|
+
resourceId: string;
|
|
431
425
|
}, Error, {
|
|
432
426
|
token: string;
|
|
433
427
|
name: string;
|
|
@@ -441,17 +435,17 @@ declare function useResources(): {
|
|
|
441
435
|
*/
|
|
442
436
|
declare function useAnnotations(): {
|
|
443
437
|
get: {
|
|
444
|
-
useQuery: (
|
|
438
|
+
useQuery: (id: AnnotationId) => _tanstack_react_query.UseQueryResult<never, Error>;
|
|
445
439
|
};
|
|
446
440
|
getResourceAnnotation: {
|
|
447
|
-
useQuery: (
|
|
441
|
+
useQuery: (resourceId: ResourceId, annotationId: AnnotationId) => _tanstack_react_query.UseQueryResult<{
|
|
448
442
|
annotation: _semiont_core.components["schemas"]["Annotation"];
|
|
449
443
|
resource: _semiont_core.components["schemas"]["ResourceDescriptor"] | null;
|
|
450
444
|
resolvedResource: _semiont_core.components["schemas"]["ResourceDescriptor"] | null;
|
|
451
445
|
}, Error>;
|
|
452
446
|
};
|
|
453
447
|
history: {
|
|
454
|
-
useQuery: (
|
|
448
|
+
useQuery: (resourceId: ResourceId, annotationId: AnnotationId) => _tanstack_react_query.UseQueryResult<{
|
|
455
449
|
events: {
|
|
456
450
|
id: string;
|
|
457
451
|
type: string;
|
|
@@ -504,34 +498,33 @@ declare function useAnnotations(): {
|
|
|
504
498
|
};
|
|
505
499
|
create: {
|
|
506
500
|
useMutation: () => _tanstack_react_query.UseMutationResult<{
|
|
507
|
-
|
|
501
|
+
annotationId: string;
|
|
508
502
|
}, Error, {
|
|
509
|
-
|
|
503
|
+
resourceId: ResourceId;
|
|
510
504
|
data: Parameters<SemiontApiClient["createAnnotation"]>[1];
|
|
511
505
|
}, unknown>;
|
|
512
506
|
};
|
|
513
507
|
delete: {
|
|
514
508
|
useMutation: () => _tanstack_react_query.UseMutationResult<void, Error, {
|
|
515
|
-
|
|
516
|
-
|
|
509
|
+
resourceId: ResourceId;
|
|
510
|
+
annotationId: AnnotationId;
|
|
517
511
|
}, unknown>;
|
|
518
512
|
};
|
|
519
513
|
updateBody: {
|
|
520
|
-
useMutation: () => _tanstack_react_query.UseMutationResult<{
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
data: Parameters<SemiontApiClient["updateAnnotationBody"]>[1];
|
|
514
|
+
useMutation: () => _tanstack_react_query.UseMutationResult<void, Error, {
|
|
515
|
+
resourceId: ResourceId;
|
|
516
|
+
annotationId: AnnotationId;
|
|
517
|
+
data: Parameters<SemiontApiClient["updateAnnotationBody"]>[2];
|
|
525
518
|
}, unknown>;
|
|
526
519
|
};
|
|
527
520
|
llmContext: {
|
|
528
|
-
useQuery: (
|
|
521
|
+
useQuery: (resourceId: ResourceId, annotationId: AnnotationId, options?: {
|
|
529
522
|
contextWindow?: number;
|
|
530
523
|
}) => _tanstack_react_query.UseQueryResult<{
|
|
531
524
|
annotation: _semiont_core.components["schemas"]["Annotation"];
|
|
532
525
|
sourceResource: _semiont_core.components["schemas"]["ResourceDescriptor"];
|
|
533
526
|
targetResource?: _semiont_core.components["schemas"]["ResourceDescriptor"] | null;
|
|
534
|
-
context?: _semiont_core.components["schemas"]["
|
|
527
|
+
context?: _semiont_core.components["schemas"]["GatheredContext"];
|
|
535
528
|
sourceContext?: {
|
|
536
529
|
before: string;
|
|
537
530
|
selected: string;
|
|
@@ -562,16 +555,10 @@ declare function useEntityTypes(): {
|
|
|
562
555
|
}, Error>;
|
|
563
556
|
};
|
|
564
557
|
add: {
|
|
565
|
-
useMutation: () => _tanstack_react_query.UseMutationResult<
|
|
566
|
-
success: boolean;
|
|
567
|
-
entityTypes: string[];
|
|
568
|
-
}, Error, string, unknown>;
|
|
558
|
+
useMutation: () => _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
|
|
569
559
|
};
|
|
570
560
|
addBulk: {
|
|
571
|
-
useMutation: () => _tanstack_react_query.UseMutationResult<
|
|
572
|
-
success: boolean;
|
|
573
|
-
entityTypes: string[];
|
|
574
|
-
}, Error, string[], unknown>;
|
|
561
|
+
useMutation: () => _tanstack_react_query.UseMutationResult<void, Error, string[], unknown>;
|
|
575
562
|
};
|
|
576
563
|
};
|
|
577
564
|
/**
|
|
@@ -652,6 +639,57 @@ declare function useAdmin(): {
|
|
|
652
639
|
}, Error>;
|
|
653
640
|
};
|
|
654
641
|
};
|
|
642
|
+
exchange: {
|
|
643
|
+
backup: {
|
|
644
|
+
useMutation: () => _tanstack_react_query.UseMutationResult<{
|
|
645
|
+
filename: string;
|
|
646
|
+
size: number;
|
|
647
|
+
}, Error, void, unknown>;
|
|
648
|
+
};
|
|
649
|
+
restore: {
|
|
650
|
+
useMutation: () => _tanstack_react_query.UseMutationResult<{
|
|
651
|
+
phase: string;
|
|
652
|
+
message?: string;
|
|
653
|
+
result?: Record<string, unknown>;
|
|
654
|
+
}, Error, {
|
|
655
|
+
file: File;
|
|
656
|
+
onProgress?: (event: {
|
|
657
|
+
phase: string;
|
|
658
|
+
message?: string;
|
|
659
|
+
result?: Record<string, unknown>;
|
|
660
|
+
}) => void;
|
|
661
|
+
}, unknown>;
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
/**
|
|
666
|
+
* Moderation operations (moderator or admin role required)
|
|
667
|
+
*/
|
|
668
|
+
declare function useModeration(): {
|
|
669
|
+
exchange: {
|
|
670
|
+
export: {
|
|
671
|
+
useMutation: () => _tanstack_react_query.UseMutationResult<{
|
|
672
|
+
filename: string;
|
|
673
|
+
size: number;
|
|
674
|
+
}, Error, {
|
|
675
|
+
includeArchived?: boolean;
|
|
676
|
+
} | undefined, unknown>;
|
|
677
|
+
};
|
|
678
|
+
import: {
|
|
679
|
+
useMutation: () => _tanstack_react_query.UseMutationResult<{
|
|
680
|
+
phase: string;
|
|
681
|
+
message?: string;
|
|
682
|
+
result?: Record<string, unknown>;
|
|
683
|
+
}, Error, {
|
|
684
|
+
file: File;
|
|
685
|
+
onProgress?: (event: {
|
|
686
|
+
phase: string;
|
|
687
|
+
message?: string;
|
|
688
|
+
result?: Record<string, unknown>;
|
|
689
|
+
}) => void;
|
|
690
|
+
}, unknown>;
|
|
691
|
+
};
|
|
692
|
+
};
|
|
655
693
|
};
|
|
656
694
|
/**
|
|
657
695
|
* Authentication and user operations via API
|
|
@@ -791,7 +829,7 @@ declare const jsonLightHighlightStyle: HighlightStyle;
|
|
|
791
829
|
* clicks and hovers via a single set of delegated handlers.
|
|
792
830
|
*/
|
|
793
831
|
|
|
794
|
-
type Annotation$
|
|
832
|
+
type Annotation$i = components['schemas']['Annotation'];
|
|
795
833
|
/**
|
|
796
834
|
* Reference Resolution Widget
|
|
797
835
|
* Shows a small indicator next to references with hover preview.
|
|
@@ -800,10 +838,10 @@ type Annotation$j = components['schemas']['Annotation'];
|
|
|
800
838
|
* and CodeMirrorRenderer handles events via container-level listeners.
|
|
801
839
|
*/
|
|
802
840
|
declare class ReferenceResolutionWidget extends WidgetType {
|
|
803
|
-
readonly annotation: Annotation$
|
|
841
|
+
readonly annotation: Annotation$i;
|
|
804
842
|
readonly targetDocumentName?: string | undefined;
|
|
805
843
|
readonly isGenerating?: boolean | undefined;
|
|
806
|
-
constructor(annotation: Annotation$
|
|
844
|
+
constructor(annotation: Annotation$i, targetDocumentName?: string | undefined, isGenerating?: boolean | undefined);
|
|
807
845
|
eq(other: ReferenceResolutionWidget): boolean;
|
|
808
846
|
toDOM(): HTMLSpanElement;
|
|
809
847
|
ignoreEvent(event: Event): boolean;
|
|
@@ -913,21 +951,21 @@ declare const QUERY_KEYS: {
|
|
|
913
951
|
readonly limit: number | undefined;
|
|
914
952
|
readonly archived: boolean | undefined;
|
|
915
953
|
}];
|
|
916
|
-
detail: (
|
|
954
|
+
detail: (id: ResourceId) => readonly ["resources", ResourceId];
|
|
917
955
|
byToken: (token: string) => readonly ["resources", "by-token", string];
|
|
918
956
|
search: (query: string, limit: number) => readonly ["resources", "search", {
|
|
919
957
|
readonly query: string;
|
|
920
958
|
readonly limit: number;
|
|
921
959
|
}];
|
|
922
|
-
events: (
|
|
923
|
-
annotations: (
|
|
924
|
-
referencedBy: (
|
|
925
|
-
representation: (
|
|
960
|
+
events: (id: ResourceId) => readonly ["resources", ResourceId, "events"];
|
|
961
|
+
annotations: (id: ResourceId) => readonly ["resources", ResourceId, "annotations"];
|
|
962
|
+
referencedBy: (id: ResourceId) => readonly ["resources", ResourceId, "referenced-by"];
|
|
963
|
+
representation: (id: ResourceId) => readonly ["resources", ResourceId, "representation"];
|
|
926
964
|
};
|
|
927
965
|
annotations: {
|
|
928
|
-
detail: (
|
|
929
|
-
history: (
|
|
930
|
-
llmContext: (
|
|
966
|
+
detail: (id: AnnotationId) => readonly ["annotations", AnnotationId];
|
|
967
|
+
history: (resourceId: ResourceId, annotationId: AnnotationId) => readonly ["annotations", ResourceId, AnnotationId, "history"];
|
|
968
|
+
llmContext: (resourceId: ResourceId, annotationId: AnnotationId) => readonly ["annotations", "llm-context", ResourceId, AnnotationId];
|
|
931
969
|
};
|
|
932
970
|
entityTypes: {
|
|
933
971
|
all: () => readonly ["entity-types"];
|
|
@@ -957,7 +995,7 @@ declare const QUERY_KEYS: {
|
|
|
957
995
|
* the overlay spans — no markdown re-parse, no AST walk.
|
|
958
996
|
*/
|
|
959
997
|
|
|
960
|
-
type Annotation$
|
|
998
|
+
type Annotation$h = components['schemas']['Annotation'];
|
|
961
999
|
interface OverlayAnnotation {
|
|
962
1000
|
id: string;
|
|
963
1001
|
exact: string;
|
|
@@ -1012,7 +1050,7 @@ declare function clearHighlights(container: HTMLElement): void;
|
|
|
1012
1050
|
* Convert W3C Annotations to the simplified overlay format.
|
|
1013
1051
|
* Extracts TextPositionSelector offsets and annotation type.
|
|
1014
1052
|
*/
|
|
1015
|
-
declare function toOverlayAnnotations(annotations: Annotation$
|
|
1053
|
+
declare function toOverlayAnnotations(annotations: Annotation$h[]): OverlayAnnotation[];
|
|
1016
1054
|
|
|
1017
1055
|
/**
|
|
1018
1056
|
* Resource utilities
|
|
@@ -1269,7 +1307,7 @@ storageKey }?: UsePanelWidthOptions): {
|
|
|
1269
1307
|
*/
|
|
1270
1308
|
type StreamStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
1271
1309
|
interface UseResourceEventsOptions {
|
|
1272
|
-
rUri:
|
|
1310
|
+
rUri: ResourceId;
|
|
1273
1311
|
onEvent?: (event: ResourceEvent) => void;
|
|
1274
1312
|
onAnnotationAdded?: (event: Extract<ResourceEvent, {
|
|
1275
1313
|
type: 'annotation.added';
|
|
@@ -1325,13 +1363,36 @@ declare function useResourceEvents({ rUri, onEvent, onAnnotationAdded, onAnnotat
|
|
|
1325
1363
|
isConnected: boolean;
|
|
1326
1364
|
};
|
|
1327
1365
|
|
|
1366
|
+
/**
|
|
1367
|
+
* React hook for subscribing to global system-level events via SSE
|
|
1368
|
+
*
|
|
1369
|
+
* Opens a long-lived SSE connection to GET /api/events/stream to receive
|
|
1370
|
+
* domain events that are not scoped to a specific resource (e.g., entity type changes).
|
|
1371
|
+
*
|
|
1372
|
+
* Automatically invalidates relevant React Query caches when system events arrive.
|
|
1373
|
+
*
|
|
1374
|
+
* @example
|
|
1375
|
+
* ```tsx
|
|
1376
|
+
* // In your app layout:
|
|
1377
|
+
* useGlobalEvents(); // That's it — auto-connects and invalidates queries
|
|
1378
|
+
* ```
|
|
1379
|
+
*/
|
|
1380
|
+
declare function useGlobalEvents({ autoConnect }?: {
|
|
1381
|
+
autoConnect?: boolean;
|
|
1382
|
+
}): {
|
|
1383
|
+
status: StreamStatus;
|
|
1384
|
+
connect: () => Promise<void>;
|
|
1385
|
+
disconnect: () => void;
|
|
1386
|
+
isConnected: boolean;
|
|
1387
|
+
};
|
|
1388
|
+
|
|
1328
1389
|
interface UseRovingTabIndexOptions {
|
|
1329
1390
|
orientation?: 'horizontal' | 'vertical' | 'grid';
|
|
1330
1391
|
loop?: boolean;
|
|
1331
1392
|
cols?: number;
|
|
1332
1393
|
}
|
|
1333
1394
|
declare function useRovingTabIndex<T extends HTMLElement>(itemCount: number, options?: UseRovingTabIndexOptions): {
|
|
1334
|
-
containerRef: React$1.RefObject<T>;
|
|
1395
|
+
containerRef: React$1.RefObject<T | null>;
|
|
1335
1396
|
handleKeyDown: (event: KeyboardEvent$1) => void;
|
|
1336
1397
|
focusItem: (index: number) => void;
|
|
1337
1398
|
};
|
|
@@ -1362,7 +1423,7 @@ declare function useDropdown(): {
|
|
|
1362
1423
|
toggle: () => void;
|
|
1363
1424
|
open: () => void;
|
|
1364
1425
|
close: () => void;
|
|
1365
|
-
dropdownRef: React$1.RefObject<HTMLDivElement>;
|
|
1426
|
+
dropdownRef: React$1.RefObject<HTMLDivElement | null>;
|
|
1366
1427
|
};
|
|
1367
1428
|
/**
|
|
1368
1429
|
* Hook for managing loading states with minimum display time
|
|
@@ -1389,7 +1450,7 @@ interface UseResourceContentResult {
|
|
|
1389
1450
|
* Fetches the primary representation of a resource based on its media type.
|
|
1390
1451
|
* Uses React Query for caching, deduplication, and consistent loading state.
|
|
1391
1452
|
*/
|
|
1392
|
-
declare function useResourceContent(rUri:
|
|
1453
|
+
declare function useResourceContent(rUri: ResourceId, resource: SemiontResource$3): UseResourceContentResult;
|
|
1393
1454
|
|
|
1394
1455
|
interface AnnotationProviderProps {
|
|
1395
1456
|
annotationManager: AnnotationManager;
|
|
@@ -1404,7 +1465,6 @@ interface AnnotationProviderProps {
|
|
|
1404
1465
|
* Example usage:
|
|
1405
1466
|
* ```typescript
|
|
1406
1467
|
* // In app (apps/frontend/src/hooks/useAnnotationManager.ts)
|
|
1407
|
-
* import { uriToAnnotationIdOrPassthrough } from '@semiont/core';
|
|
1408
1468
|
*
|
|
1409
1469
|
* function useAnnotationManager(): AnnotationManager {
|
|
1410
1470
|
* const annotations = useAnnotations();
|
|
@@ -1420,8 +1480,7 @@ interface AnnotationProviderProps {
|
|
|
1420
1480
|
* return result.annotation;
|
|
1421
1481
|
* },
|
|
1422
1482
|
* deleteAnnotation: async (params) => {
|
|
1423
|
-
*
|
|
1424
|
-
* await deleteMutation.mutateAsync(resourceAnnotationUri(`${params.rUri}/annotations/${annotationIdSegment}`));
|
|
1483
|
+
* await deleteMutation.mutateAsync({ resourceId: params.rUri, annotationId: params.annotationId });
|
|
1425
1484
|
* }
|
|
1426
1485
|
* };
|
|
1427
1486
|
* }
|
|
@@ -1578,11 +1637,10 @@ declare function OpenResourcesProvider({ openResourcesManager, children }: {
|
|
|
1578
1637
|
*/
|
|
1579
1638
|
declare function useOpenResources(): OpenResourcesManager;
|
|
1580
1639
|
|
|
1581
|
-
type Annotation$h = components['schemas']['Annotation'];
|
|
1582
1640
|
interface ResourceAnnotationsContextType {
|
|
1583
1641
|
newAnnotationIds: Set<string>;
|
|
1584
|
-
createAnnotation: (rUri:
|
|
1585
|
-
clearNewAnnotationId: (id:
|
|
1642
|
+
createAnnotation: (rUri: ResourceId, motivation: 'highlighting' | 'linking' | 'assessing' | 'commenting' | 'tagging', selector: Selector | Selector[], body?: any[]) => Promise<string | undefined>;
|
|
1643
|
+
clearNewAnnotationId: (id: AnnotationId) => void;
|
|
1586
1644
|
triggerSparkleAnimation: (annotationId: string) => void;
|
|
1587
1645
|
}
|
|
1588
1646
|
declare function ResourceAnnotationsProvider({ children }: {
|
|
@@ -1792,7 +1850,7 @@ declare class ErrorBoundary extends Component<Props$a, State> {
|
|
|
1792
1850
|
static getDerivedStateFromError(error: Error): State;
|
|
1793
1851
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
1794
1852
|
handleReset: () => void;
|
|
1795
|
-
render(): string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
1853
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React$1.ReactPortal | React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
1796
1854
|
}
|
|
1797
1855
|
/**
|
|
1798
1856
|
* Specialized error boundary for async components
|
|
@@ -1995,7 +2053,7 @@ declare function AnnotationOverlay({ annotations, imageWidth, imageHeight, displ
|
|
|
1995
2053
|
type Annotation$c = components['schemas']['Annotation'];
|
|
1996
2054
|
type DrawingMode = 'rectangle' | 'polygon' | 'circle' | 'freeform' | null;
|
|
1997
2055
|
interface SvgDrawingCanvasProps {
|
|
1998
|
-
resourceUri:
|
|
2056
|
+
resourceUri: ResourceId;
|
|
1999
2057
|
existingAnnotations?: Annotation$c[];
|
|
2000
2058
|
drawingMode: DrawingMode;
|
|
2001
2059
|
selectedMotivation?: SelectionMotivation | null;
|
|
@@ -2052,7 +2110,7 @@ interface Props$8 {
|
|
|
2052
2110
|
declare function AnnotateView({ content, mimeType, resourceUri, annotations, uiState, onUIStateChange, enableWidgets, getTargetDocumentName, generatingReferenceId, showLineNumbers, hoverDelayMs, annotateMode }: Props$8): react_jsx_runtime.JSX.Element;
|
|
2053
2111
|
|
|
2054
2112
|
interface Props$7 {
|
|
2055
|
-
rUri:
|
|
2113
|
+
rUri: ResourceId;
|
|
2056
2114
|
hoveredAnnotationId?: string | null;
|
|
2057
2115
|
onEventHover?: (annotationId: string | null) => void;
|
|
2058
2116
|
onEventClick?: (annotationId: string | null) => void;
|
|
@@ -2150,8 +2208,9 @@ interface AssessmentEntryProps {
|
|
|
2150
2208
|
assessment: Annotation$b;
|
|
2151
2209
|
isFocused: boolean;
|
|
2152
2210
|
isHovered?: boolean;
|
|
2211
|
+
ref?: Ref<HTMLDivElement>;
|
|
2153
2212
|
}
|
|
2154
|
-
declare
|
|
2213
|
+
declare function AssessmentEntry({ assessment, isFocused, isHovered, ref, }: AssessmentEntryProps): react_jsx_runtime.JSX.Element;
|
|
2155
2214
|
|
|
2156
2215
|
type Annotation$a = components['schemas']['Annotation'];
|
|
2157
2216
|
type Motivation$5 = components['schemas']['Motivation'];
|
|
@@ -2195,8 +2254,9 @@ interface CommentEntryProps {
|
|
|
2195
2254
|
isFocused: boolean;
|
|
2196
2255
|
isHovered?: boolean;
|
|
2197
2256
|
annotateMode?: boolean;
|
|
2257
|
+
ref?: Ref<HTMLDivElement>;
|
|
2198
2258
|
}
|
|
2199
|
-
declare
|
|
2259
|
+
declare function CommentEntry({ comment, isFocused, isHovered, annotateMode, ref, }: CommentEntryProps): react_jsx_runtime.JSX.Element;
|
|
2200
2260
|
|
|
2201
2261
|
type Annotation$8 = components['schemas']['Annotation'];
|
|
2202
2262
|
type Motivation$4 = components['schemas']['Motivation'];
|
|
@@ -2259,8 +2319,9 @@ interface HighlightEntryProps {
|
|
|
2259
2319
|
highlight: Annotation$7;
|
|
2260
2320
|
isFocused: boolean;
|
|
2261
2321
|
isHovered?: boolean;
|
|
2322
|
+
ref?: Ref<HTMLDivElement>;
|
|
2262
2323
|
}
|
|
2263
|
-
declare
|
|
2324
|
+
declare function HighlightEntry({ highlight, isFocused, isHovered, ref, }: HighlightEntryProps): react_jsx_runtime.JSX.Element;
|
|
2264
2325
|
|
|
2265
2326
|
type Annotation$6 = components['schemas']['Annotation'];
|
|
2266
2327
|
type Motivation$3 = components['schemas']['Motivation'];
|
|
@@ -2316,8 +2377,9 @@ interface ReferenceEntryProps {
|
|
|
2316
2377
|
routes: RouteBuilder;
|
|
2317
2378
|
annotateMode?: boolean;
|
|
2318
2379
|
isGenerating?: boolean;
|
|
2380
|
+
ref?: Ref<HTMLDivElement>;
|
|
2319
2381
|
}
|
|
2320
|
-
declare
|
|
2382
|
+
declare function ReferenceEntry({ reference, isFocused, isHovered, routes, annotateMode, isGenerating, ref, }: ReferenceEntryProps): react_jsx_runtime.JSX.Element;
|
|
2321
2383
|
|
|
2322
2384
|
type Annotation$4 = components['schemas']['Annotation'];
|
|
2323
2385
|
type Motivation$2 = components['schemas']['Motivation'];
|
|
@@ -2392,8 +2454,9 @@ interface TagEntryProps {
|
|
|
2392
2454
|
tag: Annotation$2;
|
|
2393
2455
|
isFocused: boolean;
|
|
2394
2456
|
isHovered?: boolean;
|
|
2457
|
+
ref?: Ref<HTMLDivElement>;
|
|
2395
2458
|
}
|
|
2396
|
-
declare
|
|
2459
|
+
declare function TagEntry({ tag, isFocused, isHovered, ref, }: TagEntryProps): react_jsx_runtime.JSX.Element;
|
|
2397
2460
|
|
|
2398
2461
|
type Annotation$1 = components['schemas']['Annotation'];
|
|
2399
2462
|
type Motivation$1 = components['schemas']['Motivation'];
|
|
@@ -2471,7 +2534,7 @@ interface UnifiedAnnotationsPanelProps {
|
|
|
2471
2534
|
declare function UnifiedAnnotationsPanel(props: UnifiedAnnotationsPanelProps): react_jsx_runtime.JSX.Element;
|
|
2472
2535
|
|
|
2473
2536
|
interface ImageViewerProps {
|
|
2474
|
-
resourceUri:
|
|
2537
|
+
resourceUri: ResourceId;
|
|
2475
2538
|
mimeType: string;
|
|
2476
2539
|
alt?: string;
|
|
2477
2540
|
}
|
|
@@ -2689,6 +2752,82 @@ interface SimpleNavigationProps {
|
|
|
2689
2752
|
dropdownContent?: ((onClose: () => void) => ReactNode) | undefined;
|
|
2690
2753
|
}
|
|
2691
2754
|
|
|
2755
|
+
interface GenerationConfig {
|
|
2756
|
+
title: string;
|
|
2757
|
+
prompt?: string;
|
|
2758
|
+
language: string;
|
|
2759
|
+
temperature: number;
|
|
2760
|
+
maxTokens: number;
|
|
2761
|
+
context: GatheredContext;
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
interface ReferenceWizardModalProps {
|
|
2765
|
+
isOpen: boolean;
|
|
2766
|
+
onClose: () => void;
|
|
2767
|
+
/** The annotation being resolved */
|
|
2768
|
+
annotationId: string | null;
|
|
2769
|
+
/** The resource containing the annotation */
|
|
2770
|
+
resourceId: string | null;
|
|
2771
|
+
/** Default title (selected text) */
|
|
2772
|
+
defaultTitle: string;
|
|
2773
|
+
/** Entity types from the annotation */
|
|
2774
|
+
entityTypes: string[];
|
|
2775
|
+
/** Current locale for generation defaults */
|
|
2776
|
+
locale: string;
|
|
2777
|
+
/** Gathered context state */
|
|
2778
|
+
context: GatheredContext | null;
|
|
2779
|
+
contextLoading: boolean;
|
|
2780
|
+
contextError: Error | null;
|
|
2781
|
+
/** Event bus for emitting downstream events */
|
|
2782
|
+
eventBus: EventBus;
|
|
2783
|
+
/** Callbacks */
|
|
2784
|
+
onGenerateSubmit: (referenceId: string, config: GenerationConfig) => void;
|
|
2785
|
+
onLinkResource: (referenceId: string, targetResourceId: string) => void;
|
|
2786
|
+
onComposeNavigate: (context: GatheredContext, annotationId: string, resourceId: string, title: string, entityTypes: string[]) => void;
|
|
2787
|
+
/** Translation strings */
|
|
2788
|
+
translations: {
|
|
2789
|
+
gatherTitle: string;
|
|
2790
|
+
configureGenerationTitle: string;
|
|
2791
|
+
configureSearchTitle: string;
|
|
2792
|
+
searchResultsTitle: string;
|
|
2793
|
+
annotationLabel: string;
|
|
2794
|
+
sourceResourceLabel: string;
|
|
2795
|
+
motivationLabel: string;
|
|
2796
|
+
sourceContextLabel: string;
|
|
2797
|
+
entityTypesLabel: string;
|
|
2798
|
+
graphContextLabel: string;
|
|
2799
|
+
connectionsLabel: string;
|
|
2800
|
+
citedByLabel: string;
|
|
2801
|
+
siblingTypesLabel: string;
|
|
2802
|
+
loadingContext: string;
|
|
2803
|
+
failedContext: string;
|
|
2804
|
+
cancel: string;
|
|
2805
|
+
search: string;
|
|
2806
|
+
searching: string;
|
|
2807
|
+
generate: string;
|
|
2808
|
+
compose: string;
|
|
2809
|
+
back: string;
|
|
2810
|
+
link: string;
|
|
2811
|
+
score: string;
|
|
2812
|
+
noResults: string;
|
|
2813
|
+
resourceTitle: string;
|
|
2814
|
+
resourceTitlePlaceholder: string;
|
|
2815
|
+
additionalInstructions: string;
|
|
2816
|
+
additionalInstructionsPlaceholder: string;
|
|
2817
|
+
language: string;
|
|
2818
|
+
languageHelp: string;
|
|
2819
|
+
creativity: string;
|
|
2820
|
+
creativityFocused: string;
|
|
2821
|
+
creativityCreative: string;
|
|
2822
|
+
maxLength: string;
|
|
2823
|
+
maxLengthHelp: string;
|
|
2824
|
+
maxResults: string;
|
|
2825
|
+
semanticScoring: string;
|
|
2826
|
+
semanticScoringHelp: string;
|
|
2827
|
+
};
|
|
2828
|
+
}
|
|
2829
|
+
declare function ReferenceWizardModal({ isOpen, onClose, annotationId, resourceId, defaultTitle, entityTypes, locale, context, contextLoading, contextError, eventBus, onGenerateSubmit, onLinkResource, onComposeNavigate, translations: t, }: ReferenceWizardModalProps): react_jsx_runtime.JSX.Element;
|
|
2830
|
+
|
|
2692
2831
|
interface SearchModalProps$1 {
|
|
2693
2832
|
isOpen: boolean;
|
|
2694
2833
|
onClose: () => void;
|
|
@@ -2755,17 +2894,6 @@ interface SearchModalProps extends BaseModalProps, NavigableModalProps {
|
|
|
2755
2894
|
close?: string;
|
|
2756
2895
|
};
|
|
2757
2896
|
}
|
|
2758
|
-
/**
|
|
2759
|
-
* Generation options
|
|
2760
|
-
*/
|
|
2761
|
-
interface GenerationOptions {
|
|
2762
|
-
title: string;
|
|
2763
|
-
prompt?: string;
|
|
2764
|
-
language?: string;
|
|
2765
|
-
temperature?: number;
|
|
2766
|
-
maxTokens?: number;
|
|
2767
|
-
context: any;
|
|
2768
|
-
}
|
|
2769
2897
|
/**
|
|
2770
2898
|
* Resource search modal props
|
|
2771
2899
|
*/
|
|
@@ -2890,14 +3018,11 @@ declare const faviconPaths: {
|
|
|
2890
3018
|
readonly manifest: "/favicons/site.webmanifest";
|
|
2891
3019
|
};
|
|
2892
3020
|
|
|
2893
|
-
/**
|
|
2894
|
-
* CSS-Agnostic Button Component
|
|
2895
|
-
*
|
|
2896
|
-
* This button uses data attributes instead of hardcoded Tailwind classes,
|
|
2897
|
-
* allowing users to style it with any CSS solution.
|
|
2898
|
-
*/
|
|
2899
|
-
|
|
2900
3021
|
interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3022
|
+
/**
|
|
3023
|
+
* Ref forwarded to the underlying button element
|
|
3024
|
+
*/
|
|
3025
|
+
ref?: React__default.Ref<HTMLButtonElement>;
|
|
2901
3026
|
/**
|
|
2902
3027
|
* The visual variant of the button
|
|
2903
3028
|
*/
|
|
@@ -2931,7 +3056,7 @@ interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElem
|
|
|
2931
3056
|
*/
|
|
2932
3057
|
active?: boolean;
|
|
2933
3058
|
}
|
|
2934
|
-
declare
|
|
3059
|
+
declare function Button({ variant, size, fullWidth, loading, leftIcon, rightIcon, iconOnly, active, className, disabled, children, type, ref, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
2935
3060
|
/**
|
|
2936
3061
|
* Button Group Component
|
|
2937
3062
|
*
|
|
@@ -3187,6 +3312,114 @@ interface AdminDevOpsPageProps {
|
|
|
3187
3312
|
}
|
|
3188
3313
|
declare function AdminDevOpsPage({ suggestedFeatures, theme, showLineNumbers, activePanel, translations: t, StatusDisplay, ToolbarPanels, Toolbar, }: AdminDevOpsPageProps): react_jsx_runtime.JSX.Element;
|
|
3189
3314
|
|
|
3315
|
+
/**
|
|
3316
|
+
* ExportCard — Backup trigger
|
|
3317
|
+
*
|
|
3318
|
+
* Pure React component. All state and handlers passed as props.
|
|
3319
|
+
*/
|
|
3320
|
+
interface ExportCardTranslations {
|
|
3321
|
+
title: string;
|
|
3322
|
+
description: string;
|
|
3323
|
+
exportButton: string;
|
|
3324
|
+
exporting: string;
|
|
3325
|
+
}
|
|
3326
|
+
interface ExportCardProps {
|
|
3327
|
+
onExport: () => void;
|
|
3328
|
+
isExporting: boolean;
|
|
3329
|
+
translations: ExportCardTranslations;
|
|
3330
|
+
}
|
|
3331
|
+
declare function ExportCard({ onExport, isExporting, translations: t }: ExportCardProps): react_jsx_runtime.JSX.Element;
|
|
3332
|
+
|
|
3333
|
+
/**
|
|
3334
|
+
* ImportCard — File drop zone, preview, and import trigger
|
|
3335
|
+
*
|
|
3336
|
+
* Pure React component. All state and handlers passed as props.
|
|
3337
|
+
*/
|
|
3338
|
+
interface ImportPreview {
|
|
3339
|
+
format: string;
|
|
3340
|
+
version: number;
|
|
3341
|
+
sourceUrl: string;
|
|
3342
|
+
stats: Record<string, number>;
|
|
3343
|
+
}
|
|
3344
|
+
interface ImportCardTranslations {
|
|
3345
|
+
title: string;
|
|
3346
|
+
description: string;
|
|
3347
|
+
dropzoneLabel: string;
|
|
3348
|
+
dropzoneActive: string;
|
|
3349
|
+
detectedFormat: string;
|
|
3350
|
+
statsPreview: string;
|
|
3351
|
+
importButton: string;
|
|
3352
|
+
importing: string;
|
|
3353
|
+
importConfirmTitle: string;
|
|
3354
|
+
importConfirmMessage: string;
|
|
3355
|
+
confirmImport: string;
|
|
3356
|
+
cancelImport: string;
|
|
3357
|
+
}
|
|
3358
|
+
interface ImportCardProps {
|
|
3359
|
+
onFileSelected: (file: File) => void;
|
|
3360
|
+
onImport: () => void;
|
|
3361
|
+
onCancel: () => void;
|
|
3362
|
+
selectedFile: File | null;
|
|
3363
|
+
preview: ImportPreview | null;
|
|
3364
|
+
isImporting: boolean;
|
|
3365
|
+
translations: ImportCardTranslations;
|
|
3366
|
+
}
|
|
3367
|
+
declare function ImportCard({ onFileSelected, onImport, onCancel, selectedFile, preview, isImporting, translations: t, }: ImportCardProps): react_jsx_runtime.JSX.Element;
|
|
3368
|
+
|
|
3369
|
+
/**
|
|
3370
|
+
* ImportProgress — Shows SSE-driven progress during restore
|
|
3371
|
+
*
|
|
3372
|
+
* Pure React component. All state passed as props.
|
|
3373
|
+
*/
|
|
3374
|
+
interface ImportProgressTranslations {
|
|
3375
|
+
phaseStarted: string;
|
|
3376
|
+
phaseEntityTypes: string;
|
|
3377
|
+
phaseResources: string;
|
|
3378
|
+
phaseAnnotations: string;
|
|
3379
|
+
phaseComplete: string;
|
|
3380
|
+
phaseError: string;
|
|
3381
|
+
hashChainValid: string;
|
|
3382
|
+
hashChainInvalid: string;
|
|
3383
|
+
streams: string;
|
|
3384
|
+
events: string;
|
|
3385
|
+
blobs: string;
|
|
3386
|
+
}
|
|
3387
|
+
interface ImportProgressProps {
|
|
3388
|
+
phase: string;
|
|
3389
|
+
message?: string;
|
|
3390
|
+
result?: Record<string, unknown>;
|
|
3391
|
+
translations: ImportProgressTranslations;
|
|
3392
|
+
}
|
|
3393
|
+
declare function ImportProgress({ phase, message, result, translations: t }: ImportProgressProps): react_jsx_runtime.JSX.Element;
|
|
3394
|
+
|
|
3395
|
+
interface AdminExchangePageTranslations {
|
|
3396
|
+
title: string;
|
|
3397
|
+
subtitle: string;
|
|
3398
|
+
export: ExportCardTranslations;
|
|
3399
|
+
import: ImportCardTranslations;
|
|
3400
|
+
progress: ImportProgressTranslations;
|
|
3401
|
+
}
|
|
3402
|
+
interface AdminExchangePageProps {
|
|
3403
|
+
onExport: () => void;
|
|
3404
|
+
isExporting: boolean;
|
|
3405
|
+
onFileSelected: (file: File) => void;
|
|
3406
|
+
onImport: () => void;
|
|
3407
|
+
onCancelImport: () => void;
|
|
3408
|
+
selectedFile: File | null;
|
|
3409
|
+
preview: ImportCardProps['preview'];
|
|
3410
|
+
isImporting: boolean;
|
|
3411
|
+
importPhase: string | null;
|
|
3412
|
+
importMessage?: string | undefined;
|
|
3413
|
+
importResult?: Record<string, unknown> | undefined;
|
|
3414
|
+
theme: 'light' | 'dark' | 'system';
|
|
3415
|
+
showLineNumbers: boolean;
|
|
3416
|
+
activePanel: string | null;
|
|
3417
|
+
translations: AdminExchangePageTranslations;
|
|
3418
|
+
ToolbarPanels: React__default.ComponentType<any>;
|
|
3419
|
+
Toolbar: React__default.ComponentType<any>;
|
|
3420
|
+
}
|
|
3421
|
+
declare function AdminExchangePage({ onExport, isExporting, onFileSelected, onImport, onCancelImport, selectedFile, preview, isImporting, importPhase, importMessage, importResult, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, }: AdminExchangePageProps): react_jsx_runtime.JSX.Element;
|
|
3422
|
+
|
|
3190
3423
|
interface OAuthProvider {
|
|
3191
3424
|
name: string;
|
|
3192
3425
|
clientId?: string;
|
|
@@ -3222,6 +3455,34 @@ interface AdminSecurityPageProps {
|
|
|
3222
3455
|
}
|
|
3223
3456
|
declare function AdminSecurityPage({ providers, allowedDomains, isLoading, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, }: AdminSecurityPageProps): react_jsx_runtime.JSX.Element;
|
|
3224
3457
|
|
|
3458
|
+
interface LinkedDataPageTranslations {
|
|
3459
|
+
title: string;
|
|
3460
|
+
subtitle: string;
|
|
3461
|
+
export: ExportCardTranslations;
|
|
3462
|
+
import: ImportCardTranslations;
|
|
3463
|
+
progress: ImportProgressTranslations;
|
|
3464
|
+
}
|
|
3465
|
+
interface LinkedDataPageProps {
|
|
3466
|
+
onExport: () => void;
|
|
3467
|
+
isExporting: boolean;
|
|
3468
|
+
onFileSelected: (file: File) => void;
|
|
3469
|
+
onImport: () => void;
|
|
3470
|
+
onCancelImport: () => void;
|
|
3471
|
+
selectedFile: File | null;
|
|
3472
|
+
preview: ImportCardProps['preview'];
|
|
3473
|
+
isImporting: boolean;
|
|
3474
|
+
importPhase: string | null;
|
|
3475
|
+
importMessage?: string | undefined;
|
|
3476
|
+
importResult?: Record<string, unknown> | undefined;
|
|
3477
|
+
theme: 'light' | 'dark' | 'system';
|
|
3478
|
+
showLineNumbers: boolean;
|
|
3479
|
+
activePanel: string | null;
|
|
3480
|
+
translations: LinkedDataPageTranslations;
|
|
3481
|
+
ToolbarPanels: React__default.ComponentType<any>;
|
|
3482
|
+
Toolbar: React__default.ComponentType<any>;
|
|
3483
|
+
}
|
|
3484
|
+
declare function LinkedDataPage({ onExport, isExporting, onFileSelected, onImport, onCancelImport, selectedFile, preview, isImporting, importPhase, importMessage, importResult, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, }: LinkedDataPageProps): react_jsx_runtime.JSX.Element;
|
|
3485
|
+
|
|
3225
3486
|
interface AdminUser {
|
|
3226
3487
|
id: string;
|
|
3227
3488
|
email: string;
|
|
@@ -3547,6 +3808,7 @@ interface ResourceComposePageProps {
|
|
|
3547
3808
|
name: string;
|
|
3548
3809
|
entityTypes: string[];
|
|
3549
3810
|
};
|
|
3811
|
+
gatheredContext?: GatheredContext | null;
|
|
3550
3812
|
availableEntityTypes: string[];
|
|
3551
3813
|
initialLocale: string;
|
|
3552
3814
|
theme: 'light' | 'dark';
|
|
@@ -3604,7 +3866,7 @@ interface SaveResourceParams {
|
|
|
3604
3866
|
annotationUri?: string;
|
|
3605
3867
|
sourceDocumentId?: string;
|
|
3606
3868
|
}
|
|
3607
|
-
declare function ResourceComposePage({ mode, cloneData, referenceData, availableEntityTypes, initialLocale, theme, showLineNumbers, hoverDelayMs, activePanel, onSaveResource, onCancel, translations: t, ToolbarPanels, Toolbar, }: ResourceComposePageProps): react_jsx_runtime.JSX.Element;
|
|
3869
|
+
declare function ResourceComposePage({ mode, cloneData, referenceData, gatheredContext, availableEntityTypes, initialLocale, theme, showLineNumbers, hoverDelayMs, activePanel, onSaveResource, onCancel, translations: t, ToolbarPanels, Toolbar, }: ResourceComposePageProps): react_jsx_runtime.JSX.Element;
|
|
3608
3870
|
|
|
3609
3871
|
type ResourceDescriptor$1 = components['schemas']['ResourceDescriptor'];
|
|
3610
3872
|
interface ResourceDiscoveryPageProps {
|
|
@@ -3659,7 +3921,7 @@ interface ResourceViewerPageProps {
|
|
|
3659
3921
|
/**
|
|
3660
3922
|
* Resource URI
|
|
3661
3923
|
*/
|
|
3662
|
-
rUri:
|
|
3924
|
+
rUri: ResourceId;
|
|
3663
3925
|
/**
|
|
3664
3926
|
* Current locale
|
|
3665
3927
|
*/
|
|
@@ -3676,8 +3938,6 @@ interface ResourceViewerPageProps {
|
|
|
3676
3938
|
* Component dependencies - passed from framework layer
|
|
3677
3939
|
*/
|
|
3678
3940
|
ToolbarPanels: React__default.ComponentType<any>;
|
|
3679
|
-
SearchResourcesModal: React__default.ComponentType<any>;
|
|
3680
|
-
GenerationConfigModal: React__default.ComponentType<any>;
|
|
3681
3941
|
/**
|
|
3682
3942
|
* Callback to refetch document from parent
|
|
3683
3943
|
*/
|
|
@@ -3710,7 +3970,7 @@ interface ResourceViewerPageProps {
|
|
|
3710
3970
|
* @subscribes browse:reference-navigate - Navigate to a referenced document
|
|
3711
3971
|
* @subscribes browse:entity-type-clicked - Navigate filtered by entity type
|
|
3712
3972
|
*/
|
|
3713
|
-
declare function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanels,
|
|
3973
|
+
declare function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanels, refetchDocument, }: ResourceViewerPageProps): react_jsx_runtime.JSX.Element;
|
|
3714
3974
|
|
|
3715
3975
|
/**
|
|
3716
3976
|
* useBeckonFlow — Annotation attention / pointer coordination hook
|
|
@@ -3827,7 +4087,7 @@ interface MarkFlowState {
|
|
|
3827
4087
|
* @subscribes mark:progress-dismiss - Manually dismiss progress display
|
|
3828
4088
|
* @returns Annotation flow state
|
|
3829
4089
|
*/
|
|
3830
|
-
declare function useMarkFlow(rUri:
|
|
4090
|
+
declare function useMarkFlow(rUri: ResourceId): MarkFlowState;
|
|
3831
4091
|
|
|
3832
4092
|
/**
|
|
3833
4093
|
* usePanelBrowse - Panel navigation and scroll coordination hook
|
|
@@ -3870,10 +4130,13 @@ declare function usePanelBrowse(): PanelBrowseState;
|
|
|
3870
4130
|
*
|
|
3871
4131
|
* Manages document generation state:
|
|
3872
4132
|
* - Generation progress tracking
|
|
3873
|
-
* -
|
|
3874
|
-
* - Reference search modal state
|
|
4133
|
+
* - SSE stream management
|
|
3875
4134
|
* - Generation completion/error handling
|
|
3876
4135
|
*
|
|
4136
|
+
* The wizard modal (ReferenceWizardModal) handles modal state and user
|
|
4137
|
+
* interaction. This hook handles the downstream SSE generation after
|
|
4138
|
+
* the wizard emits yield:request.
|
|
4139
|
+
*
|
|
3877
4140
|
* Follows react-rxjs-guide.md Layer 2 pattern: Hook bridge that
|
|
3878
4141
|
* subscribes to events and pushes values into React state.
|
|
3879
4142
|
*/
|
|
@@ -3881,18 +4144,14 @@ declare function usePanelBrowse(): PanelBrowseState;
|
|
|
3881
4144
|
interface YieldFlowState {
|
|
3882
4145
|
isGenerating: boolean;
|
|
3883
4146
|
generationProgress: YieldProgress | null;
|
|
3884
|
-
generationModalOpen: boolean;
|
|
3885
|
-
generationReferenceId: string | null;
|
|
3886
|
-
generationDefaultTitle: string;
|
|
3887
4147
|
onGenerateDocument: (referenceId: string, options: {
|
|
3888
4148
|
title: string;
|
|
3889
4149
|
prompt?: string;
|
|
3890
4150
|
language?: string;
|
|
3891
4151
|
temperature?: number;
|
|
3892
4152
|
maxTokens?: number;
|
|
3893
|
-
context
|
|
4153
|
+
context: GatheredContext;
|
|
3894
4154
|
}) => void;
|
|
3895
|
-
onCloseGenerationModal: () => void;
|
|
3896
4155
|
}
|
|
3897
4156
|
/**
|
|
3898
4157
|
* Hook for document generation flow
|
|
@@ -3900,19 +4159,15 @@ interface YieldFlowState {
|
|
|
3900
4159
|
* @param locale - Current locale for language defaults
|
|
3901
4160
|
* @param resourceId - Resource ID for generation
|
|
3902
4161
|
* @param clearNewAnnotationId - Clear animation callback
|
|
3903
|
-
* @emits yield:request - Start document generation
|
|
3904
|
-
* @emits yield:progress - SSE progress chunk from generation stream
|
|
3905
|
-
* @emits yield:finished - Generation completed successfully
|
|
3906
|
-
* @emits yield:failed - Error during generation
|
|
4162
|
+
* @emits yield:request - Start document generation
|
|
3907
4163
|
* @subscribes yield:request - Triggers SSE call to yieldResourceFromAnnotation
|
|
3908
4164
|
* @subscribes job:cancel-requested - Cancels in-flight generation stream
|
|
3909
|
-
* @subscribes
|
|
3910
|
-
* @subscribes yield:modal-open - Open the generation config modal; triggers gather:requested
|
|
4165
|
+
* @subscribes yield:progress - SSE progress chunks
|
|
3911
4166
|
* @subscribes yield:finished - Generation completed successfully
|
|
3912
4167
|
* @subscribes yield:failed - Error during generation
|
|
3913
4168
|
* @returns Generation flow state
|
|
3914
4169
|
*/
|
|
3915
|
-
declare function useYieldFlow(locale: string, resourceId: string, clearNewAnnotationId: (annotationId:
|
|
4170
|
+
declare function useYieldFlow(locale: string, resourceId: string, clearNewAnnotationId: (annotationId: AnnotationId) => void): YieldFlowState;
|
|
3916
4171
|
|
|
3917
4172
|
/**
|
|
3918
4173
|
* useContextGatherFlow - Context gather capability hook
|
|
@@ -3933,36 +4188,33 @@ declare function useYieldFlow(locale: string, resourceId: string, clearNewAnnota
|
|
|
3933
4188
|
|
|
3934
4189
|
interface ContextGatherFlowConfig {
|
|
3935
4190
|
client: SemiontApiClient;
|
|
3936
|
-
|
|
4191
|
+
resourceId: ResourceId;
|
|
3937
4192
|
}
|
|
3938
4193
|
interface ContextGatherFlowState {
|
|
3939
|
-
gatherContext:
|
|
4194
|
+
gatherContext: GatheredContext | null;
|
|
3940
4195
|
gatherLoading: boolean;
|
|
3941
4196
|
gatherError: Error | null;
|
|
3942
|
-
/** The
|
|
3943
|
-
|
|
4197
|
+
/** The annotationId for which context was most recently gathered */
|
|
4198
|
+
gatherAnnotationId: AnnotationId | null;
|
|
3944
4199
|
}
|
|
3945
4200
|
declare function useContextGatherFlow(eventBus: EventBus, config: ContextGatherFlowConfig): ContextGatherFlowState;
|
|
3946
4201
|
|
|
3947
|
-
interface BindFlowState {
|
|
3948
|
-
searchModalOpen: boolean;
|
|
3949
|
-
pendingReferenceId: string | null;
|
|
3950
|
-
onCloseSearchModal: () => void;
|
|
3951
|
-
}
|
|
3952
4202
|
/**
|
|
3953
|
-
*
|
|
3954
|
-
* to existing resources (search) or new resources (manual creation).
|
|
4203
|
+
* useBindFlow - Reference resolution flow hook
|
|
3955
4204
|
*
|
|
3956
|
-
*
|
|
3957
|
-
*
|
|
4205
|
+
* Handles the write side of reference resolution:
|
|
4206
|
+
* - Annotation body updates (linking/unlinking)
|
|
4207
|
+
* - Error notifications
|
|
3958
4208
|
*
|
|
4209
|
+
* The wizard modal (ReferenceWizardModal) handles modal state, context
|
|
4210
|
+
* gathering, search configuration, and result display. This hook handles
|
|
4211
|
+
* the downstream API calls after the wizard emits bind:update-body.
|
|
4212
|
+
*
|
|
4213
|
+
* @subscribes bind:update-body - Update annotation body via API
|
|
3959
4214
|
* @emits bind:body-updated - Annotation body successfully updated
|
|
3960
4215
|
* @emits bind:body-update-failed - Annotation body update failed
|
|
3961
|
-
* @emits bind:search-requested - Search modal requested
|
|
3962
|
-
* @subscribes bind:update-body - Update annotation body via API
|
|
3963
|
-
* @subscribes bind:link - User clicked "Link Document"; opens search modal
|
|
3964
|
-
* @subscribes bind:search-requested - Opens search modal with pending reference
|
|
3965
4216
|
*/
|
|
3966
|
-
declare function useBindFlow(rUri: ResourceUri): BindFlowState;
|
|
3967
4217
|
|
|
3968
|
-
|
|
4218
|
+
declare function useBindFlow(rUri: ResourceId): void;
|
|
4219
|
+
|
|
4220
|
+
export { ANNOTATORS, AUTH_EVENTS, AVAILABLE_LOCALES, AdminDevOpsPage, type AdminDevOpsPageProps, AdminExchangePage, type AdminExchangePageProps, type AdminExchangePageTranslations, AdminSecurityPage, type AdminSecurityPageProps, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, AnnotateReferencesProgressWidget, AnnotateToolbar, AnnotateView, type Annotation$k as Annotation, type AnnotationConfig, type AnnotationCreationHandler, type AnnotationHandlers, AnnotationHistory, type AnnotationManager, AnnotationOverlay, AnnotationProvider, type AnnotationProviderProps, type AnnotationUIState, type AnnotationsCollection, type Annotator, ApiClientProvider, type ApiClientProviderProps, AssessmentEntry, AssessmentPanel, AssistSection, AsyncErrorBoundary, AuthErrorDisplay, type AuthErrorDisplayProps, type AuthEventDetail, type AuthEventType, AuthTokenProvider, type AuthTokenProviderProps, type AvailableLocale, type BeckonFlowState, type BorderRadiusToken, BrowseView, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, COMMON_PANELS, type CacheManager, CacheProvider, type CacheProviderProps, type ClickAction, CodeMirrorRenderer, CollaborationPanel, CollapsibleResourceNavigation, type CollapsibleResourceNavigationProps, type ColorToken, CommentEntry, CommentsPanel, ComposeLoadingState, type ComposeLoadingStateProps, type ContextGatherFlowConfig, type ContextGatherFlowState, type CreateAnnotationParams, type CreateConfig, type DeleteAnnotationParams, type DetectionConfig, type DevOpsFeature, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, EntityTypeBadges, ErrorBoundary, ExportCard, type ExportCardProps, type ExportCardTranslations, Footer, HOVER_DELAY_MS, HighlightEntry, HighlightPanel, HistoryEvent, type HoverEmitterProps, type HoverHandlers, ImageURLSchema, ImageViewer, ImportCard, type ImportCardProps, type ImportCardTranslations, type ImportPreview, ImportProgress, type ImportProgressProps, type ImportProgressTranslations, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LinkedDataPage, type LinkedDataPageProps, type LinkedDataPageTranslations, LiveRegionProvider, type MarkFlowState, type Motivation$8 as Motivation, type NavigationItem, NavigationMenu, type NavigationMenuHelper, type NavigationProps, type OAuthProvider, type OAuthUser, OAuthUserSchema, ObservableLink, type ObservableLinkProps, type OpenResource, OpenResourcesManager, OpenResourcesProvider, type OverlayAnnotation, PageLayout, type PanelBrowseState, PanelHeader, PopupContainer, PopupHeader, ProposeEntitiesModal, QUERY_KEYS, RESOURCE_PANELS, RecentDocumentsPage, type RecentDocumentsPageProps, ReferenceEntry, ReferenceResolutionWidget, ReferenceWizardModal, type ReferenceWizardModalProps, 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 SelectionMotivation, type SelectorType, SemiontBranding, SemiontFavicon, type SemiontResource$4 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, ThemeProvider, ToastContainer, type ToastMessage, ToastProvider, type ToastType, Toolbar, type ToolbarPanelType, type TransitionToken, TranslationManager, TranslationProvider, type TranslationProviderProps, type TypographyToken, type UICreateAnnotationParams, UnifiedAnnotationsPanel, UnifiedHeader, type UseResourceContentResult, UserMenuSkeleton, WelcomePage, type WelcomePageProps, type YieldFlowState, applyHighlights, buildSourceToRenderedMap, buildTextNodeIndex, buttonStyles, clearHighlights, createHoverHandlers, cssVariables, dispatch401Error, dispatch403Error, dispatchAuthEvent, faviconPaths, formatTime, generateCSSVariables, getResourceIcon, getSelectedShapeForSelectorType, getSelectorType, getShortcutDisplay, getSupportedShapes, hideWidgetPreview, isShapeSupported, jsonLightHighlightStyle, jsonLightTheme, onAuthEvent, resolveAnnotationRanges, sanitizeImageURL, saveSelectedShapeForSelectorType, showWidgetPreview, supportsDetection, toOverlayAnnotations, tokens, useAdmin, useAnnotationManager, useAnnotations, useApiClient, useAuthApi, useAuthToken, useBeckonFlow, useBindFlow, useCacheManager, useContextGatherFlow, useDebounce, useDebouncedCallback, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEntityTypes, useEventSubscription, useEventSubscriptions, useFormAnnouncements, useGlobalEvents, useHealth, useHoverDelay, useHoverEmitter, useIsTyping, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useMarkFlow, useModeration, useObservableExternalNavigation, useObservableRouter, useOpenResources, usePanelBrowse, usePanelWidth, usePreloadTranslations, useResourceAnnotations, useResourceContent, useResourceEvents, useResourceLoadingAnnouncements, useResources, useRovingTabIndex, useSearchAnnouncements, useSessionContext, useSessionExpiry, useTheme, useToast, useTranslations, useYieldFlow };
|