@semiont/react-ui 0.2.33-build.81 → 0.2.33-build.82
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/index.d.mts +47 -28
- package/dist/index.mjs +555 -537
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/features/resource-viewer/__tests__/GenerationFlowIntegration.test.tsx +4 -8
- package/src/features/resource-viewer/__tests__/ResolutionFlowIntegration.test.tsx +266 -0
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +5 -3
package/dist/index.d.mts
CHANGED
|
@@ -1482,27 +1482,6 @@ declare function CacheProvider({ cacheManager, children }: CacheProviderProps):
|
|
|
1482
1482
|
*/
|
|
1483
1483
|
declare function useCacheManager(): CacheManager;
|
|
1484
1484
|
|
|
1485
|
-
interface ResolutionFlowConfig {
|
|
1486
|
-
client: SemiontApiClient;
|
|
1487
|
-
resourceUri: ResourceUri;
|
|
1488
|
-
}
|
|
1489
|
-
interface ResolutionFlowState {
|
|
1490
|
-
searchModalOpen: boolean;
|
|
1491
|
-
pendingReferenceId: string | null;
|
|
1492
|
-
onCloseSearchModal: () => void;
|
|
1493
|
-
}
|
|
1494
|
-
/**
|
|
1495
|
-
* Hook that handles the Resolution capability: resolving reference annotations
|
|
1496
|
-
* to existing resources (search) or new resources (manual creation).
|
|
1497
|
-
*
|
|
1498
|
-
* Handles: annotation:update-body, reference:link, resolution:search-requested
|
|
1499
|
-
*
|
|
1500
|
-
* @param emitter - The mitt event bus instance
|
|
1501
|
-
* @param config - Configuration including API client and resource URI
|
|
1502
|
-
* @returns Resolution flow state (search modal open state and close handler)
|
|
1503
|
-
*/
|
|
1504
|
-
declare function useResolutionFlow(emitter: Emitter<EventMap>, config: ResolutionFlowConfig): ResolutionFlowState;
|
|
1505
|
-
|
|
1506
1485
|
/**
|
|
1507
1486
|
* Subscribe to an event bus event with automatic cleanup.
|
|
1508
1487
|
*
|
|
@@ -3686,13 +3665,37 @@ interface ResourceViewerPageProps {
|
|
|
3686
3665
|
*/
|
|
3687
3666
|
declare function ResourceViewerPage({ resource, rUri, locale, cacheManager, Link, routes, ToolbarPanels, SearchResourcesModal, GenerationConfigModal, refetchDocument, }: ResourceViewerPageProps): react_jsx_runtime.JSX.Element;
|
|
3688
3667
|
|
|
3668
|
+
/**
|
|
3669
|
+
* useAttentionFlow — Annotation attention / pointer coordination hook
|
|
3670
|
+
*
|
|
3671
|
+
* Manages which annotation currently has the user's attention:
|
|
3672
|
+
* - Hover state (hoveredAnnotationId)
|
|
3673
|
+
* - Hover → sparkle relay
|
|
3674
|
+
* - Click → focus relay
|
|
3675
|
+
*
|
|
3676
|
+
* Follows react-rxjs-guide.md Layer 2 pattern: Hook bridge that
|
|
3677
|
+
* subscribes to events and pushes values into React state.
|
|
3678
|
+
*
|
|
3679
|
+
* Note: annotation:sparkle visual effect (triggerSparkleAnimation) is owned by
|
|
3680
|
+
* ResourceViewerPage, which subscribes to annotation:sparkle and delegates to
|
|
3681
|
+
* ResourceAnnotationsContext. This hook emits the signal; it does not render the effect.
|
|
3682
|
+
*
|
|
3683
|
+
* @subscribes annotation:hover - Sets hoveredAnnotationId; emits annotation:sparkle
|
|
3684
|
+
* @subscribes annotation:click - Emits annotation:focus (attention relay only)
|
|
3685
|
+
* @emits annotation:sparkle
|
|
3686
|
+
* @emits annotation:focus
|
|
3687
|
+
*/
|
|
3688
|
+
interface AttentionFlowState {
|
|
3689
|
+
hoveredAnnotationId: string | null;
|
|
3690
|
+
}
|
|
3691
|
+
declare function useAttentionFlow(): AttentionFlowState;
|
|
3692
|
+
|
|
3689
3693
|
/**
|
|
3690
3694
|
* useDetectionFlow - Detection state management hook
|
|
3691
3695
|
*
|
|
3692
3696
|
* Manages all annotation detection (manual and AI-driven):
|
|
3693
3697
|
* - Pending annotation state (user selected text, waiting for confirmation)
|
|
3694
3698
|
* - Selection events → pending annotation conversion
|
|
3695
|
-
* - Annotation interaction (hover, click)
|
|
3696
3699
|
* - Annotation request routing to appropriate panel
|
|
3697
3700
|
* - Tracking currently detecting motivation (AI-driven detection)
|
|
3698
3701
|
* - Detection progress updates from SSE
|
|
@@ -3715,7 +3718,6 @@ interface PendingAnnotation {
|
|
|
3715
3718
|
}
|
|
3716
3719
|
interface DetectionFlowState {
|
|
3717
3720
|
pendingAnnotation: PendingAnnotation | null;
|
|
3718
|
-
hoveredAnnotationId: string | null;
|
|
3719
3721
|
detectingMotivation: Motivation$9 | null;
|
|
3720
3722
|
detectionProgress: DetectionProgress | null;
|
|
3721
3723
|
detectionStreamRef: React.MutableRefObject<AbortController | null>;
|
|
@@ -3725,8 +3727,6 @@ interface DetectionFlowState {
|
|
|
3725
3727
|
*
|
|
3726
3728
|
* @param rUri - Resource URI being detected
|
|
3727
3729
|
* @emits panel:open - Open the annotations panel when annotation is requested
|
|
3728
|
-
* @emits annotation:sparkle - Trigger sparkle animation on hovered annotation
|
|
3729
|
-
* @emits annotation:focus - Focus/scroll to clicked annotation
|
|
3730
3730
|
* @emits annotation:created - Annotation successfully created
|
|
3731
3731
|
* @emits annotation:create-failed - Annotation creation failed
|
|
3732
3732
|
* @emits annotation:deleted - Annotation successfully deleted
|
|
@@ -3743,8 +3743,6 @@ interface DetectionFlowState {
|
|
|
3743
3743
|
* @subscribes selection:assessment-requested - User selected text for an assessment
|
|
3744
3744
|
* @subscribes selection:reference-requested - User selected text for a reference
|
|
3745
3745
|
* @subscribes annotation:cancel-pending - Cancel pending annotation creation
|
|
3746
|
-
* @subscribes annotation:hover - Annotation hover state change
|
|
3747
|
-
* @subscribes annotation:click - Annotation clicked
|
|
3748
3746
|
* @subscribes detection:start - Trigger AI detection SSE stream
|
|
3749
3747
|
* @subscribes job:cancel-requested - Cancels in-flight detection stream (detection half only)
|
|
3750
3748
|
* @subscribes detection:progress - Progress update during detection
|
|
@@ -3869,4 +3867,25 @@ interface ContextRetrievalFlowState {
|
|
|
3869
3867
|
}
|
|
3870
3868
|
declare function useContextRetrievalFlow(emitter: Emitter<EventMap>, config: ContextRetrievalFlowConfig): ContextRetrievalFlowState;
|
|
3871
3869
|
|
|
3872
|
-
|
|
3870
|
+
interface ResolutionFlowState {
|
|
3871
|
+
searchModalOpen: boolean;
|
|
3872
|
+
pendingReferenceId: string | null;
|
|
3873
|
+
onCloseSearchModal: () => void;
|
|
3874
|
+
}
|
|
3875
|
+
/**
|
|
3876
|
+
* Hook that handles the Resolution capability: resolving reference annotations
|
|
3877
|
+
* to existing resources (search) or new resources (manual creation).
|
|
3878
|
+
*
|
|
3879
|
+
* @param rUri - Resource URI being viewed
|
|
3880
|
+
* @returns Resolution flow state (search modal open state and close handler)
|
|
3881
|
+
*
|
|
3882
|
+
* @emits annotation:body-updated - Annotation body successfully updated
|
|
3883
|
+
* @emits annotation:body-update-failed - Annotation body update failed
|
|
3884
|
+
* @emits resolution:search-requested - Search modal requested
|
|
3885
|
+
* @subscribes annotation:update-body - Update annotation body via API
|
|
3886
|
+
* @subscribes reference:link - User clicked "Link Document"; opens search modal
|
|
3887
|
+
* @subscribes resolution:search-requested - Opens search modal with pending reference
|
|
3888
|
+
*/
|
|
3889
|
+
declare function useResolutionFlow(rUri: ResourceUri): ResolutionFlowState;
|
|
3890
|
+
|
|
3891
|
+
export { ANNOTATORS, AUTH_EVENTS, AVAILABLE_LOCALES, AdminDevOpsPage, type AdminDevOpsPageProps, AdminSecurityPage, type AdminSecurityPageProps, type AdminUser, type AdminUserStats, AdminUsersPage, type AdminUsersPageProps, 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, AsyncErrorBoundary, type AttentionFlowState, AuthErrorDisplay, type AuthErrorDisplayProps, type AuthEventDetail, type AuthEventType, AuthTokenProvider, type AuthTokenProviderProps, 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 ContextRetrievalFlowConfig, type ContextRetrievalFlowState, type CreateAnnotationParams, type CreateConfig, type DeleteAnnotationParams, DetectSection, type DetectionConfig, type DetectionFlowState, DetectionProgress, DetectionProgressWidget, type DevOpsFeature, type DrawingMode, EntityTagsPage, type EntityTagsPageProps, EntityTypeBadges, ErrorBoundary, EventBus, EventMap, Footer, type GenerationFlowState, type GenerationOptions, GenerationProgress, HighlightEntry, HighlightPanel, HistoryEvent, ImageURLSchema, ImageViewer, JsonLdPanel, JsonLdView, type KeyboardShortcut, KeyboardShortcutsHelpModal, LeftSidebar, type LinkComponentProps, LiveRegionProvider, type Motivation$8 as Motivation, type NavigationItem, NavigationMenu, type NavigationMenuHelper, type NavigationProps, type OAuthProvider, type OAuthUser, OAuthUserSchema, ObservableLink, type ObservableLinkProps, type OpenResource, OpenResourcesManager, OpenResourcesProvider, PageLayout, PanelHeader, type PanelNavigationState, PopupContainer, PopupHeader, type PreparedAnnotation, ProposeEntitiesModal, QUERY_KEYS, RecentDocumentsPage, type RecentDocumentsPageProps, ReferenceEntry, ReferenceResolutionWidget, ReferencesPanel, ResizeHandle, type ResolutionFlowState, 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, buttonStyles, createCancelDetectionHandler, createDetectionHandler, cssVariables, dispatch401Error, dispatch403Error, dispatchAuthEvent, faviconPaths, formatTime, generateCSSVariables, getResourceIcon, getSelectedShapeForSelectorType, getSelectorType, getShortcutDisplay, getSupportedShapes, isShapeSupported, jsonLightHighlightStyle, jsonLightTheme, onAuthEvent, rehypeRenderAnnotations, remarkAnnotations, sanitizeImageURL, saveSelectedShapeForSelectorType, supportsDetection, tokens, useAdmin, useAnnotationManager, useAnnotations, useApiClient, useAttentionFlow, useAuthApi, useAuthToken, useCacheManager, useContextRetrievalFlow, useDebounce, useDebouncedCallback, useDetectionFlow, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEntityTypes, useEventSubscription, useEventSubscriptions, useFormAnnouncements, useGenerationFlow, useHealth, useIsTyping, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useObservableExternalNavigation, useObservableRouter, useOpenResources, usePanelNavigation, usePanelWidth, usePreloadTranslations, useResolutionFlow, useResourceAnnotations, useResourceContent, useResourceEvents, useResourceLoadingAnnouncements, useResources, useRovingTabIndex, useSearchAnnouncements, useSessionContext, useSessionExpiry, useTheme, useToast, useTranslations };
|