@semiont/react-ui 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/{PdfAnnotationCanvas.client-PVTVPDBQ.mjs → PdfAnnotationCanvas.client-LF6DDTCV.mjs} +3 -3
  2. package/dist/chunk-5JZFKRLW.mjs +62 -0
  3. package/dist/chunk-5JZFKRLW.mjs.map +1 -0
  4. package/dist/{chunk-PFQYNPQJ.mjs → chunk-F74ZQJMA.mjs} +31 -62
  5. package/dist/chunk-F74ZQJMA.mjs.map +1 -0
  6. package/dist/{chunk-ZPV43WN2.mjs → chunk-XMCUHQ2Y.mjs} +72 -3
  7. package/dist/chunk-XMCUHQ2Y.mjs.map +1 -0
  8. package/dist/index.d.mts +26 -9
  9. package/dist/index.mjs +1140 -1149
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/test-utils.mjs +3 -3
  12. package/package.json +3 -5
  13. package/src/components/resource/BrowseView.tsx +2 -2
  14. package/src/features/resource-viewer/__tests__/AnnotationCreationPending.test.tsx +6 -6
  15. package/src/features/resource-viewer/__tests__/AnnotationProgressDismissal.test.tsx +4 -4
  16. package/src/features/resource-viewer/__tests__/BindFlowIntegration.test.tsx +23 -17
  17. package/src/features/resource-viewer/__tests__/DetectionFlowBug.test.tsx +4 -4
  18. package/src/features/resource-viewer/__tests__/DetectionFlowIntegration.test.tsx +14 -14
  19. package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +2 -2
  20. package/src/features/resource-viewer/__tests__/YieldFlowIntegration.test.tsx +2 -2
  21. package/src/features/resource-viewer/__tests__/annotation-progress-flow.test.tsx +4 -4
  22. package/dist/chunk-2HGWOLVN.mjs +0 -31
  23. package/dist/chunk-2HGWOLVN.mjs.map +0 -1
  24. package/dist/chunk-PFQYNPQJ.mjs.map +0 -1
  25. package/dist/chunk-ZPV43WN2.mjs.map +0 -1
  26. /package/dist/{PdfAnnotationCanvas.client-PVTVPDBQ.mjs.map → PdfAnnotationCanvas.client-LF6DDTCV.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -144,7 +144,7 @@ interface DeleteAnnotationParams {
144
144
  * const deleteMutation = useAnnotations().delete.useMutation();
145
145
  *
146
146
  * return {
147
- * createAnnotation: async (params) => {
147
+ * markAnnotation: async (params) => {
148
148
  * const result = await createMutation.mutateAsync({...});
149
149
  * return result.annotation;
150
150
  * },
@@ -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$l | undefined>;
164
+ markAnnotation: (params: CreateAnnotationParams) => Promise<Annotation$l | undefined>;
165
165
  /**
166
166
  * Delete an annotation
167
167
  * @param params - Deletion parameters (annotationId, rUri)
@@ -438,7 +438,7 @@ declare function useAnnotations(): {
438
438
  get: {
439
439
  useQuery: (id: AnnotationId) => _tanstack_react_query.UseQueryResult<never, Error>;
440
440
  };
441
- getResourceAnnotation: {
441
+ browseAnnotation: {
442
442
  useQuery: (resourceId: ResourceId, annotationId: AnnotationId) => _tanstack_react_query.UseQueryResult<{
443
443
  annotation: _semiont_core.components["schemas"]["Annotation"];
444
444
  resource: _semiont_core.components["schemas"]["ResourceDescriptor"] | null;
@@ -502,7 +502,7 @@ declare function useAnnotations(): {
502
502
  annotationId: string;
503
503
  }, Error, {
504
504
  resourceId: ResourceId;
505
- data: Parameters<SemiontApiClient["createAnnotation"]>[1];
505
+ data: Parameters<SemiontApiClient["markAnnotation"]>[1];
506
506
  }, unknown>;
507
507
  };
508
508
  delete: {
@@ -515,7 +515,7 @@ declare function useAnnotations(): {
515
515
  useMutation: () => _tanstack_react_query.UseMutationResult<void, Error, {
516
516
  resourceId: ResourceId;
517
517
  annotationId: AnnotationId;
518
- data: Parameters<SemiontApiClient["updateAnnotationBody"]>[2];
518
+ data: Parameters<SemiontApiClient["bindAnnotation"]>[2];
519
519
  }, unknown>;
520
520
  };
521
521
  llmContext: {
@@ -1473,7 +1473,7 @@ interface AnnotationProviderProps {
1473
1473
  * const deleteMutation = annotations.delete.useMutation();
1474
1474
  *
1475
1475
  * return {
1476
- * createAnnotation: async (params) => {
1476
+ * markAnnotation: async (params) => {
1477
1477
  * const result = await createMutation.mutateAsync({
1478
1478
  * rUri: params.rUri,
1479
1479
  * data: { motivation: params.motivation, target: { source: params.rUri, selector: params.selector }, body: params.body }
@@ -1640,7 +1640,7 @@ declare function useOpenResources(): OpenResourcesManager;
1640
1640
 
1641
1641
  interface ResourceAnnotationsContextType {
1642
1642
  newAnnotationIds: Set<string>;
1643
- createAnnotation: (rUri: ResourceId, motivation: 'highlighting' | 'linking' | 'assessing' | 'commenting' | 'tagging', selector: Selector | Selector[], body?: any[]) => Promise<string | undefined>;
1643
+ markAnnotation: (rUri: ResourceId, motivation: 'highlighting' | 'linking' | 'assessing' | 'commenting' | 'tagging', selector: Selector | Selector[], body?: any[]) => Promise<string | undefined>;
1644
1644
  clearNewAnnotationId: (id: AnnotationId) => void;
1645
1645
  triggerSparkleAnimation: (annotationId: string) => void;
1646
1646
  }
@@ -3987,6 +3987,7 @@ declare function ResourceViewerPage({ resource, rUri, locale, Link, routes, Tool
3987
3987
  * @emits beckon:sparkle
3988
3988
  * @emits beckon:focus
3989
3989
  */
3990
+
3990
3991
  interface BeckonFlowState {
3991
3992
  hoveredAnnotationId: string | null;
3992
3993
  }
@@ -4020,6 +4021,22 @@ interface HoverEmitterProps {
4020
4021
  * @param hoverDelayMs - Hover delay in milliseconds (defaults to HOVER_DELAY_MS for panel entries)
4021
4022
  */
4022
4023
  declare function useHoverEmitter(annotationId: string, hoverDelayMs?: number): HoverEmitterProps;
4024
+ /**
4025
+ * Opens a participant-scoped SSE connection to receive cross-participant
4026
+ * beckon signals. Each incoming signal is emitted as beckon:focus on the
4027
+ * EventBus — the existing scroll/highlight machinery handles it automatically.
4028
+ *
4029
+ * Signals are ephemeral: delivered if connected, silently dropped if not.
4030
+ *
4031
+ * @example
4032
+ * ```tsx
4033
+ * // In your layout (render-nothing connector):
4034
+ * useAttentionStream();
4035
+ * ```
4036
+ */
4037
+ declare function useAttentionStream(): {
4038
+ status: StreamStatus;
4039
+ };
4023
4040
 
4024
4041
  /**
4025
4042
  * useMarkFlow - Annotation state management hook
@@ -4156,7 +4173,7 @@ interface YieldFlowState {
4156
4173
  * @param resourceId - Resource ID for generation
4157
4174
  * @param clearNewAnnotationId - Clear animation callback
4158
4175
  * @emits yield:request - Start document generation
4159
- * @subscribes yield:request - Triggers SSE call to yieldResourceFromAnnotation
4176
+ * @subscribes yield:request - Triggers SSE call to yieldResource
4160
4177
  * @subscribes job:cancel-requested - Cancels in-flight generation stream
4161
4178
  * @subscribes yield:progress - SSE progress chunks
4162
4179
  * @subscribes yield:finished - Generation completed successfully
@@ -4213,4 +4230,4 @@ declare function useContextGatherFlow(eventBus: EventBus, config: ContextGatherF
4213
4230
 
4214
4231
  declare function useBindFlow(rUri: ResourceId): void;
4215
4232
 
4216
- 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, 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 };
4233
+ 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, 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, useAttentionStream, 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 };