@semiont/react-ui 0.4.14 → 0.4.15

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 (49) hide show
  1. package/README.md +18 -12
  2. package/dist/KnowledgeBaseSessionContext-CpYaCbnC.d.mts +174 -0
  3. package/dist/{PdfAnnotationCanvas.client-CW6SKH2U.mjs → PdfAnnotationCanvas.client-CHDCGQBR.mjs} +3 -3
  4. package/dist/{chunk-HNZOXH4L.mjs → chunk-OZICDVH7.mjs} +5 -3
  5. package/dist/chunk-OZICDVH7.mjs.map +1 -0
  6. package/dist/chunk-R2U7P4TK.mjs +865 -0
  7. package/dist/chunk-R2U7P4TK.mjs.map +1 -0
  8. package/dist/{chunk-BQJWOK4C.mjs → chunk-VN5NY4SN.mjs} +9 -8
  9. package/dist/chunk-VN5NY4SN.mjs.map +1 -0
  10. package/dist/index.d.mts +139 -169
  11. package/dist/index.mjs +2197 -1947
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/test-utils.d.mts +13 -62
  14. package/dist/test-utils.mjs +40 -21
  15. package/dist/test-utils.mjs.map +1 -1
  16. package/package.json +5 -3
  17. package/src/components/ProtectedErrorBoundary.tsx +95 -0
  18. package/src/components/__tests__/ProtectedErrorBoundary.test.tsx +197 -0
  19. package/src/components/modals/PermissionDeniedModal.tsx +140 -0
  20. package/src/components/modals/ReferenceWizardModal.tsx +3 -2
  21. package/src/components/modals/SessionExpiredModal.tsx +101 -0
  22. package/src/components/modals/__tests__/PermissionDeniedModal.test.tsx +150 -0
  23. package/src/components/modals/__tests__/SessionExpiredModal.test.tsx +115 -0
  24. package/src/components/resource/AnnotationHistory.tsx +5 -6
  25. package/src/components/resource/HistoryEvent.tsx +7 -7
  26. package/src/components/resource/__tests__/AnnotationHistory.test.tsx +33 -34
  27. package/src/components/resource/__tests__/HistoryEvent.test.tsx +17 -19
  28. package/src/components/resource/__tests__/event-formatting.test.ts +70 -94
  29. package/src/components/resource/event-formatting.ts +56 -56
  30. package/src/components/resource/panels/ReferenceEntry.tsx +7 -5
  31. package/src/components/resource/panels/ResourceInfoPanel.tsx +8 -6
  32. package/src/components/resource/panels/__tests__/ReferenceEntry.test.tsx +12 -12
  33. package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +1 -0
  34. package/src/features/resource-viewer/__tests__/AnnotationCreationPending.test.tsx +1 -1
  35. package/src/features/resource-viewer/__tests__/AnnotationDeletionIntegration.test.tsx +4 -4
  36. package/src/features/resource-viewer/__tests__/AnnotationProgressDismissal.test.tsx +5 -10
  37. package/src/features/resource-viewer/__tests__/BindFlowIntegration.test.tsx +23 -54
  38. package/src/features/resource-viewer/__tests__/DetectionFlowBug.test.tsx +6 -6
  39. package/src/features/resource-viewer/__tests__/DetectionFlowIntegration.test.tsx +7 -19
  40. package/src/features/resource-viewer/__tests__/ToastNotifications.test.tsx +1 -1
  41. package/src/features/resource-viewer/__tests__/YieldFlowIntegration.test.tsx +18 -44
  42. package/src/features/resource-viewer/__tests__/annotation-progress-flow.test.tsx +6 -6
  43. package/src/features/resource-viewer/components/ResourceViewerPage.tsx +24 -26
  44. package/dist/TranslationManager-CudgH3gw.d.mts +0 -107
  45. package/dist/chunk-BQJWOK4C.mjs.map +0 -1
  46. package/dist/chunk-HNZOXH4L.mjs.map +0 -1
  47. package/dist/chunk-OL5UST25.mjs +0 -413
  48. package/dist/chunk-OL5UST25.mjs.map +0 -1
  49. /package/dist/{PdfAnnotationCanvas.client-CW6SKH2U.mjs.map → PdfAnnotationCanvas.client-CHDCGQBR.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as _semiont_core from '@semiont/core';
2
- import { components, ResourceId, Selector, AnnotationId, ResourceEvent, EventBus, EventMap, MarkProgress, StoredEventLike, paths, GatheredContext, Motivation as Motivation$9, YieldProgress } from '@semiont/core';
2
+ import { components, ResourceId, Selector, AnnotationId, PersistedEvent, EventBus, EventMap, MarkProgress, StoredEventLike, 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
5
  import React__default, { ComponentType, ReactNode, KeyboardEvent as KeyboardEvent$1, Component, ErrorInfo, Ref } from 'react';
6
- import { O as OpenResourcesManager, S as SessionManager, T as TranslationManager, a as OpenResource } from './TranslationManager-CudgH3gw.mjs';
7
- export { b as SessionState } from './TranslationManager-CudgH3gw.mjs';
6
+ import { O as OpenResourcesManager, K as KbSessionStatus, a as KnowledgeBase, T as TranslationManager, b as OpenResource } from './KnowledgeBaseSessionContext-CpYaCbnC.mjs';
7
+ export { A as AuthSession, c as KnowledgeBaseSessionContext, d as KnowledgeBaseSessionProvider, e as KnowledgeBaseSessionValue, N as NewKnowledgeBase, u as useKnowledgeBaseSession } from './KnowledgeBaseSessionContext-CpYaCbnC.mjs';
8
8
  import * as _tanstack_react_query from '@tanstack/react-query';
9
9
  import { UseQueryOptions } from '@tanstack/react-query';
10
- import { SemiontApiClient, ValidationResult } from '@semiont/api-client';
10
+ import { SemiontApiClient, ValidationResult, TokenRefresher } from '@semiont/api-client';
11
11
  import * as _codemirror_state from '@codemirror/state';
12
12
  import { HighlightStyle } from '@codemirror/language';
13
13
  import { WidgetType } from '@codemirror/view';
@@ -362,21 +362,7 @@ declare function useResources(): {
362
362
  };
363
363
  events: {
364
364
  useQuery: (id: ResourceId) => _tanstack_react_query.UseQueryResult<{
365
- events: {
366
- event: {
367
- id: string;
368
- type: string;
369
- timestamp: string;
370
- userId: string;
371
- resourceId: string;
372
- payload?: unknown;
373
- };
374
- metadata: {
375
- sequenceNumber: number;
376
- prevEventHash?: string;
377
- checksum?: string;
378
- };
379
- }[];
365
+ events: _semiont_core.components["schemas"]["StoredEventResponse"][];
380
366
  total: number;
381
367
  resourceId: string;
382
368
  }, Error>;
@@ -478,51 +464,7 @@ declare function useAnnotations(): {
478
464
  };
479
465
  history: {
480
466
  useQuery: (resourceId: ResourceId, annotationId: AnnotationId) => _tanstack_react_query.UseQueryResult<{
481
- events: {
482
- id: string;
483
- type: string;
484
- timestamp: string;
485
- userId: string;
486
- resourceId: string;
487
- payload: {
488
- name: string;
489
- format: _semiont_core.components["schemas"]["ContentFormat"];
490
- contentChecksum: string;
491
- creationMethod: "api" | "upload" | "ui" | "reference" | "clone" | "generated";
492
- entityTypes?: string[];
493
- metadata?: {
494
- [key: string]: unknown;
495
- };
496
- } | {
497
- name: string;
498
- format: _semiont_core.components["schemas"]["ContentFormat"];
499
- contentChecksum: string;
500
- parentResourceId: string;
501
- creationMethod: "api" | "upload" | "ui" | "reference" | "clone" | "generated";
502
- entityTypes?: string[];
503
- metadata?: {
504
- [key: string]: unknown;
505
- };
506
- } | {
507
- reason?: string;
508
- } | Record<string, never> | {
509
- annotation: _semiont_core.components["schemas"]["Annotation"];
510
- } | {
511
- annotationId: string;
512
- } | {
513
- annotationId: string;
514
- targetResourceId: string;
515
- } | {
516
- entityType: string;
517
- } | {
518
- entityType: string;
519
- };
520
- metadata: {
521
- sequenceNumber: number;
522
- prevEventHash?: string;
523
- checksum?: string;
524
- };
525
- }[];
467
+ events: _semiont_core.components["schemas"]["StoredEventResponse"][];
526
468
  total: number;
527
469
  annotationId: string;
528
470
  resourceId: string;
@@ -543,7 +485,9 @@ declare function useAnnotations(): {
543
485
  }, unknown>;
544
486
  };
545
487
  updateBody: {
546
- useMutation: () => _tanstack_react_query.UseMutationResult<void, Error, {
488
+ useMutation: () => _tanstack_react_query.UseMutationResult<{
489
+ correlationId: string;
490
+ }, Error, {
547
491
  resourceId: ResourceId;
548
492
  annotationId: AnnotationId;
549
493
  data: Parameters<SemiontApiClient["bindAnnotation"]>[2];
@@ -767,37 +711,6 @@ declare function useHealth(): {
767
711
  };
768
712
  };
769
713
 
770
- /**
771
- * Global authentication event system for coordinating auth state across components
772
- */
773
- declare const AUTH_EVENTS: {
774
- readonly UNAUTHORIZED: "auth:unauthorized";
775
- readonly FORBIDDEN: "auth:forbidden";
776
- readonly SESSION_EXPIRED: "auth:session-expired";
777
- };
778
- type AuthEventType = typeof AUTH_EVENTS[keyof typeof AUTH_EVENTS];
779
- interface AuthEventDetail {
780
- message?: string;
781
- statusCode?: number;
782
- timestamp: number;
783
- }
784
- /**
785
- * Dispatch an authentication event
786
- */
787
- declare function dispatchAuthEvent(type: AuthEventType, detail?: Partial<AuthEventDetail>): void;
788
- /**
789
- * Listen for authentication events
790
- */
791
- declare function onAuthEvent(type: AuthEventType, handler: (event: CustomEvent<AuthEventDetail>) => void): () => void;
792
- /**
793
- * Dispatch a 401 Unauthorized event
794
- */
795
- declare function dispatch401Error(message?: string): void;
796
- /**
797
- * Dispatch a 403 Forbidden event
798
- */
799
- declare function dispatch403Error(message?: string): void;
800
-
801
714
  /**
802
715
  * Centralized button styles matching Figma design
803
716
  * Two primary styles from authenticated home page:
@@ -1318,27 +1231,27 @@ storageKey }?: UsePanelWidthOptions): {
1318
1231
  type StreamStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
1319
1232
  interface UseResourceEventsOptions {
1320
1233
  rUri: ResourceId;
1321
- onEvent?: (event: ResourceEvent) => void;
1322
- onAnnotationAdded?: (event: Extract<ResourceEvent, {
1323
- type: 'annotation.added';
1234
+ onEvent?: (event: PersistedEvent) => void;
1235
+ onAnnotationAdded?: (event: Extract<PersistedEvent, {
1236
+ type: 'mark:added';
1324
1237
  }>) => void;
1325
- onAnnotationRemoved?: (event: Extract<ResourceEvent, {
1326
- type: 'annotation.removed';
1238
+ onAnnotationRemoved?: (event: Extract<PersistedEvent, {
1239
+ type: 'mark:removed';
1327
1240
  }>) => void;
1328
- onAnnotationBodyUpdated?: (event: Extract<ResourceEvent, {
1329
- type: 'annotation.body.updated';
1241
+ onAnnotationBodyUpdated?: (event: Extract<PersistedEvent, {
1242
+ type: 'mark:body-updated';
1330
1243
  }>) => void;
1331
- onEntityTagAdded?: (event: Extract<ResourceEvent, {
1332
- type: 'entitytag.added';
1244
+ onEntityTagAdded?: (event: Extract<PersistedEvent, {
1245
+ type: 'mark:entity-tag-added';
1333
1246
  }>) => void;
1334
- onEntityTagRemoved?: (event: Extract<ResourceEvent, {
1335
- type: 'entitytag.removed';
1247
+ onEntityTagRemoved?: (event: Extract<PersistedEvent, {
1248
+ type: 'mark:entity-tag-removed';
1336
1249
  }>) => void;
1337
- onDocumentArchived?: (event: Extract<ResourceEvent, {
1338
- type: 'resource.archived';
1250
+ onDocumentArchived?: (event: Extract<PersistedEvent, {
1251
+ type: 'mark:archived';
1339
1252
  }>) => void;
1340
- onDocumentUnarchived?: (event: Extract<ResourceEvent, {
1341
- type: 'resource.unarchived';
1253
+ onDocumentUnarchived?: (event: Extract<PersistedEvent, {
1254
+ type: 'mark:unarchived';
1342
1255
  }>) => void;
1343
1256
  onError?: (error: string) => void;
1344
1257
  autoConnect?: boolean;
@@ -1360,7 +1273,7 @@ interface UseResourceEventsOptions {
1360
1273
  */
1361
1274
  declare function useResourceEvents({ rUri, onEvent, onAnnotationAdded, onAnnotationRemoved, onAnnotationBodyUpdated, onEntityTagAdded, onEntityTagRemoved, onDocumentArchived, onDocumentUnarchived, onError, autoConnect, }: UseResourceEventsOptions): {
1362
1275
  status: StreamStatus;
1363
- lastEvent: ResourceEvent | null;
1276
+ lastEvent: PersistedEvent | null;
1364
1277
  eventCount: number;
1365
1278
  connect: () => void;
1366
1279
  disconnect: () => void;
@@ -1401,6 +1314,11 @@ declare function useRovingTabIndex<T extends HTMLElement>(itemCount: number, opt
1401
1314
  focusItem: (index: number) => void;
1402
1315
  };
1403
1316
 
1317
+ /**
1318
+ * Tracks the time remaining on the active KB session's JWT and whether it's
1319
+ * expiring soon (< 5 minutes). Re-derives once per second from the
1320
+ * KnowledgeBaseSession context.
1321
+ */
1404
1322
  declare function useSessionExpiry(): {
1405
1323
  timeRemaining: number | null;
1406
1324
  isExpiringSoon: boolean;
@@ -1508,6 +1426,13 @@ declare function useAnnotationManager(): AnnotationManager;
1508
1426
 
1509
1427
  interface ApiClientProviderProps {
1510
1428
  baseUrl: string;
1429
+ /**
1430
+ * Optional 401-recovery hook. If provided, the api-client will retry
1431
+ * requests once with a fresh token when a 401 is encountered. The
1432
+ * frontend's protected layouts pass `useKnowledgeBaseSession().refreshActive`
1433
+ * here so the api-client can transparently recover from expired access tokens.
1434
+ */
1435
+ tokenRefresher?: TokenRefresher;
1511
1436
  children: ReactNode;
1512
1437
  }
1513
1438
  /**
@@ -1516,7 +1441,7 @@ interface ApiClientProviderProps {
1516
1441
  * The EventBus is taken from EventBusContext so client and UI components
1517
1442
  * share the same workspace-scoped bus.
1518
1443
  */
1519
- declare function ApiClientProvider({ baseUrl: url, children, }: ApiClientProviderProps): react_jsx_runtime.JSX.Element;
1444
+ declare function ApiClientProvider({ baseUrl: url, tokenRefresher, children, }: ApiClientProviderProps): react_jsx_runtime.JSX.Element;
1520
1445
  /**
1521
1446
  * Hook to access the stateless API client singleton
1522
1447
  * Must be used within an ApiClientProvider
@@ -1636,7 +1561,7 @@ declare function useEventBus(): EventBus;
1636
1561
  *
1637
1562
  * @example
1638
1563
  * ```tsx
1639
- * useEventSubscription('mark:created', ({ annotation }) => {
1564
+ * useEventSubscription('mark:create-ok', ({ annotationId }) => {
1640
1565
  * // This always uses the latest props/state
1641
1566
  * triggerSparkleAnimation(annotation.id);
1642
1567
  * });
@@ -1649,8 +1574,8 @@ declare function useEventSubscription<K extends keyof EventMap>(eventName: K, ha
1649
1574
  * @example
1650
1575
  * ```tsx
1651
1576
  * useEventSubscriptions({
1652
- * 'mark:created': ({ annotation }) => setNewAnnotation(annotation),
1653
- * 'mark:deleted': ({ annotationId }) => removeAnnotation(annotationId),
1577
+ * 'mark:create-ok': ({ annotationId }) => handleCreated(annotationId),
1578
+ * 'mark:delete-ok': ({ annotationId }) => removeAnnotation(annotationId),
1654
1579
  * });
1655
1580
  * ```
1656
1581
  */
@@ -1755,31 +1680,38 @@ interface RouteBuilder {
1755
1680
  }
1756
1681
 
1757
1682
  /**
1758
- * Provider Pattern: Accepts SessionManager implementation as prop
1759
- * and makes it available to child components via Context.
1760
- *
1761
- * Apps provide their own implementation (next-auth, custom auth, etc.)
1762
- * and pass it to this provider at the root level.
1683
+ * Pure helpers for the KnowledgeBaseSession provider.
1763
1684
  *
1764
- * @example
1765
- * ```tsx
1766
- * // In app root
1767
- * const sessionManager = useSessionManager(); // App's implementation
1685
+ * Contains:
1686
+ * - localStorage shape and read/write helpers for KB list, active KB id,
1687
+ * and per-KB sessions
1688
+ * - JWT expiry parsing and "is expired" check
1689
+ * - URL/protocol helpers for KB instances
1690
+ * - The public `getKbSessionStatus(kbId)` helper that the KB-list UI uses
1691
+ * to color status dots without subscribing to context changes
1768
1692
  *
1769
- * <SessionProvider sessionManager={sessionManager}>
1770
- * <App />
1771
- * </SessionProvider>
1772
- * ```
1693
+ * No React imports, no module-scoped state, no side effects beyond
1694
+ * localStorage. Splitting these out of the provider file makes them
1695
+ * unit-testable in isolation and keeps the React provider focused on
1696
+ * lifecycle and state.
1773
1697
  */
1774
- declare function SessionProvider({ sessionManager, children }: {
1775
- sessionManager: SessionManager;
1776
- children: ReactNode;
1777
- }): react_jsx_runtime.JSX.Element;
1698
+
1699
+ /** The shape persisted to localStorage per KB. */
1700
+ interface StoredSession {
1701
+ access: string;
1702
+ refresh: string;
1703
+ }
1704
+ declare function defaultProtocol(host: string): 'http' | 'https';
1705
+ declare function kbBackendUrl(kb: KnowledgeBase): string;
1778
1706
  /**
1779
- * Hook to access SessionManager from Context
1780
- * Components use this hook to access session state and expiry information
1707
+ * Read the locally-stored credential status for a KB. Pure / synchronous —
1708
+ * does not subscribe to context changes. Used by KB-list UI to color status
1709
+ * dots without requiring re-renders on every tick.
1781
1710
  */
1782
- declare function useSessionContext(): SessionManager;
1711
+ declare function getKbSessionStatus(kbId: string): KbSessionStatus;
1712
+
1713
+ declare function notifySessionExpired(message?: string): void;
1714
+ declare function notifyPermissionDenied(message?: string): void;
1783
1715
 
1784
1716
  declare const AVAILABLE_LOCALES: readonly ["ar", "bn", "cs", "da", "de", "el", "en", "es", "fa", "fi", "fr", "he", "hi", "id", "it", "ja", "ko", "ms", "nl", "no", "pl", "pt", "ro", "sv", "th", "tr", "uk", "vi", "zh"];
1785
1717
  type AvailableLocale = typeof AVAILABLE_LOCALES[number];
@@ -1907,6 +1839,31 @@ declare function AsyncErrorBoundary({ children }: {
1907
1839
  children: ReactNode;
1908
1840
  }): react_jsx_runtime.JSX.Element;
1909
1841
 
1842
+ interface ProtectedErrorBoundaryProps {
1843
+ children: React__default.ReactNode;
1844
+ /**
1845
+ * Values that, when any change, reset the boundary back to its non-error
1846
+ * state. Apps typically pass `[location.pathname]` so navigating away from
1847
+ * a crashed page automatically recovers.
1848
+ */
1849
+ resetKeys?: unknown[];
1850
+ }
1851
+ /**
1852
+ * Error boundary for protected (authenticated) routes.
1853
+ *
1854
+ * Catches unexpected render-time crashes inside the protected tree and
1855
+ * shows a generic "something went wrong" fallback with a refresh option.
1856
+ *
1857
+ * NOT auth-specific. Auth state changes (sign-in, sign-out, expiry) flow
1858
+ * through the KnowledgeBaseSession context, not exceptions — so this
1859
+ * boundary will never catch an "auth error" in normal operation. Its job
1860
+ * is purely to keep a render bug from blanking the screen.
1861
+ *
1862
+ * The optional `resetKeys` prop lets callers wire automatic recovery on
1863
+ * navigation (e.g. `resetKeys={[location.pathname]}`).
1864
+ */
1865
+ declare function ProtectedErrorBoundary({ children, resetKeys, }: ProtectedErrorBoundaryProps): react_jsx_runtime.JSX.Element;
1866
+
1910
1867
  type Annotation$f = components['schemas']['Annotation'];
1911
1868
  interface LiveRegionContextType {
1912
1869
  announce: (message: string, priority?: 'polite' | 'assertive') => void;
@@ -2124,6 +2081,18 @@ interface KeyboardShortcutsHelpModalProps {
2124
2081
  }
2125
2082
  declare function KeyboardShortcutsHelpModal({ isOpen, onClose }: KeyboardShortcutsHelpModalProps): react_jsx_runtime.JSX.Element;
2126
2083
 
2084
+ /**
2085
+ * Modal that surfaces when a 403 forbidden error is reported via
2086
+ * `notifyPermissionDenied` (called from QueryCache.onError).
2087
+ *
2088
+ * Reads `permissionDeniedAt` and `permissionDeniedMessage` from
2089
+ * KnowledgeBaseSessionContext. The provider clears the flag when the user
2090
+ * dismisses the modal.
2091
+ *
2092
+ * Must be mounted inside KnowledgeBaseSessionProvider.
2093
+ */
2094
+ declare function PermissionDeniedModal(): react_jsx_runtime.JSX.Element;
2095
+
2127
2096
  interface ProposeEntitiesModalProps {
2128
2097
  isOpen: boolean;
2129
2098
  onConfirm: (selectedTypes: string[]) => void;
@@ -2131,6 +2100,18 @@ interface ProposeEntitiesModalProps {
2131
2100
  }
2132
2101
  declare function ProposeEntitiesModal({ isOpen, onConfirm, onCancel }: ProposeEntitiesModalProps): react_jsx_runtime.JSX.Element;
2133
2102
 
2103
+ /**
2104
+ * Modal that surfaces when the active KB's session expires (a 401 from
2105
+ * either the provider's own JWT validation or from any React Query call
2106
+ * via the QueryCache.onError handler).
2107
+ *
2108
+ * Reads `sessionExpiredAt` from KnowledgeBaseSessionContext. When the user
2109
+ * dismisses the modal, the provider clears the flag.
2110
+ *
2111
+ * Must be mounted inside KnowledgeBaseSessionProvider.
2112
+ */
2113
+ declare function SessionExpiredModal(): react_jsx_runtime.JSX.Element;
2114
+
2134
2115
  interface Props$8 {
2135
2116
  content: string;
2136
2117
  mimeType?: string;
@@ -2477,6 +2458,7 @@ declare function ReferencesPanel({ annotations, isAssisting, progress, annotateM
2477
2458
 
2478
2459
  type Agent = components['schemas']['Agent'];
2479
2460
  interface Props {
2461
+ resourceId: string;
2480
2462
  documentEntityTypes: string[];
2481
2463
  documentLocale?: string | undefined;
2482
2464
  primaryMediaType?: string | undefined;
@@ -2492,11 +2474,11 @@ interface Props {
2492
2474
  /**
2493
2475
  * Panel for displaying resource metadata and management actions
2494
2476
  *
2495
- * @emits yield:clone - Clone this resource. Payload: undefined
2496
- * @emits mark:unarchive - Unarchive this resource. Payload: undefined
2497
- * @emits mark:archive - Archive this resource. Payload: undefined
2477
+ * @emits yield:clone - Clone this resource
2478
+ * @emits mark:unarchive - Unarchive this resource
2479
+ * @emits mark:archive - Archive this resource
2498
2480
  */
2499
- declare function ResourceInfoPanel({ documentEntityTypes, documentLocale, primaryMediaType, primaryByteSize, isArchived, dateCreated, dateModified, creationMethod, wasAttributedTo, wasDerivedFrom, generator, }: Props): react_jsx_runtime.JSX.Element;
2481
+ declare function ResourceInfoPanel({ resourceId, documentEntityTypes, documentLocale, primaryMediaType, primaryByteSize, isArchived, dateCreated, dateModified, creationMethod, wasAttributedTo, wasDerivedFrom, generator, }: Props): react_jsx_runtime.JSX.Element;
2500
2482
 
2501
2483
  type Annotation$3 = components['schemas']['Annotation'];
2502
2484
  interface StatisticsPanelProps {
@@ -4119,14 +4101,14 @@ declare function useAttentionStream(): {
4119
4101
  /**
4120
4102
  * useMarkFlow - Annotation state management hook
4121
4103
  *
4122
- * Activates mark orchestration (CRUD + AI assist) by delegating to
4123
- * client.flows.mark(). Manages UI state (pendingAnnotation, assistingMotivation,
4104
+ * Bridges EventBus commands to namespace API methods for annotation CRUD
4105
+ * and AI assist. Manages UI state (pendingAnnotation, assistingMotivation,
4124
4106
  * progress) via EventBus subscriptions — the React-specific portion.
4125
4107
  *
4126
- * @subscribes mark:submit, mark:delete, mark:assist-request, job:cancel-requested
4127
- * @subscribes mark:requested, mark:select-*, mark:cancel-pending
4128
- * @subscribes mark:progress, mark:assist-finished, mark:assist-failed
4129
- * @returns Annotation flow state
4108
+ * The FlowEngine's HTTP bridging role is replaced by namespace methods:
4109
+ * - mark:submit semiont.mark.annotation()
4110
+ * - mark:delete semiont.mark.delete()
4111
+ * - mark:assist-request semiont.mark.assist() (Observable)
4130
4112
  */
4131
4113
 
4132
4114
  interface PendingAnnotation {
@@ -4180,13 +4162,9 @@ declare function usePanelBrowse(): PanelBrowseState;
4180
4162
  /**
4181
4163
  * useYieldFlow - Document generation flow hook
4182
4164
  *
4183
- * Activates yield orchestration by delegating to client.flows.yield().
4184
- * Manages generation progress state (React-specific) via EventBus subscriptions.
4185
- *
4186
- * @subscribes yield:request - Triggers SSE call to yieldResource
4187
- * @subscribes job:cancel-requested - Cancels in-flight generation stream
4188
- * @subscribes yield:progress, yield:finished, yield:failed
4189
- * @returns Generation flow state
4165
+ * Triggers yield.fromAnnotation() on the namespace API.
4166
+ * Manages generation progress state (React-specific) via EventBus subscriptions
4167
+ * from the events-stream auto-router.
4190
4168
  */
4191
4169
 
4192
4170
  interface YieldFlowState {
@@ -4207,15 +4185,10 @@ declare function useYieldFlow(locale: string, resourceId: string, clearNewAnnota
4207
4185
  /**
4208
4186
  * useContextGatherFlow - Context gather capability hook
4209
4187
  *
4210
- * Activates gather orchestration for a resource by delegating to
4211
- * client.flows.gatherContext(). Manages UI state (gatherContext, gatherLoading,
4212
- * gatherError, gatherAnnotationId) via EventBus subscriptions the
4213
- * React-specific portion.
4214
- *
4215
- * @subscribes gather:requested - Triggers loading state
4216
- * @subscribes gather:complete - Sets gathered context
4217
- * @subscribes gather:failed - Sets error state
4218
- * @returns Gather flow state
4188
+ * Manages UI state for context gathering. The actual gather trigger
4189
+ * comes from components emitting gather:requested on the EventBus.
4190
+ * This hook bridges to semiont.gather.annotation() and manages the
4191
+ * React state (loading, context, error).
4219
4192
  */
4220
4193
 
4221
4194
  interface ContextGatherFlowConfig {
@@ -4233,14 +4206,11 @@ declare function useContextGatherFlow(config: ContextGatherFlowConfig): ContextG
4233
4206
  /**
4234
4207
  * useBindFlow - Reference resolution flow hook
4235
4208
  *
4236
- * Activates bind + search orchestration for a resource by delegating to
4237
- * client.flows.bind(). All subscription logic lives in FlowEngine (api-client).
4209
+ * Bridges EventBus commands to namespace API methods.
4210
+ * Components emit bind:update-body / match:search-requested on the EventBus;
4211
+ * this hook calls semiont.bind.body() / semiont.match.search() in response.
4238
4212
  *
4239
4213
  * Toast notifications for resolution errors remain here (React-specific).
4240
- *
4241
- * @subscribes bind:update-body - Update annotation body via API
4242
- * @subscribes match:search-requested - Bridge to backend Matcher via SSE
4243
- * @emits bind:body-updated, bind:body-update-failed
4244
4214
  */
4245
4215
 
4246
4216
  declare function useBindFlow(rUri: ResourceId): void;
@@ -4270,4 +4240,4 @@ declare function useObservable<T>(obs$: Observable<T>): T | undefined;
4270
4240
  */
4271
4241
  declare function useStoreTokenSync(): void;
4272
4242
 
4273
- 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, EventBusProvider, type EventBusProviderProps, 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, useEventBus, useEventSubscription, useEventSubscriptions, useFormAnnouncements, useGlobalEvents, useHealth, useHoverDelay, useHoverEmitter, useIsTyping, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useMarkFlow, useModeration, useObservable, useObservableExternalNavigation, useObservableRouter, useOpenResources, usePanelBrowse, usePanelWidth, usePreloadTranslations, useResourceAnnotations, useResourceContent, useResourceEvents, useResourceLoadingAnnouncements, useResources, useRovingTabIndex, useSearchAnnouncements, useSessionContext, useSessionExpiry, useStoreTokenSync, useTheme, useToast, useTranslations, useYieldFlow };
4243
+ export { ANNOTATORS, 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, 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, EventBusProvider, type EventBusProviderProps, 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, KbSessionStatus, type KeyboardShortcut, KeyboardShortcutsHelpModal, KnowledgeBase, 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, PermissionDeniedModal, PopupContainer, PopupHeader, ProposeEntitiesModal, ProtectedErrorBoundary, 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, SessionExpiredModal, SessionExpiryBanner, 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 StoredSession, 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, defaultProtocol, faviconPaths, formatTime, generateCSSVariables, getKbSessionStatus, getResourceIcon, getSelectedShapeForSelectorType, getSelectorType, getShortcutDisplay, getSupportedShapes, hideWidgetPreview, isShapeSupported, jsonLightHighlightStyle, jsonLightTheme, kbBackendUrl, notifyPermissionDenied, notifySessionExpired, resolveAnnotationRanges, sanitizeImageURL, saveSelectedShapeForSelectorType, showWidgetPreview, supportsDetection, toOverlayAnnotations, tokens, useAdmin, useAnnotationManager, useAnnotations, useApiClient, useAttentionStream, useAuthApi, useAuthToken, useBeckonFlow, useBindFlow, useCacheManager, useContextGatherFlow, useDebounce, useDebouncedCallback, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEntityTypes, useEventBus, useEventSubscription, useEventSubscriptions, useFormAnnouncements, useGlobalEvents, useHealth, useHoverDelay, useHoverEmitter, useIsTyping, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useMarkFlow, useModeration, useObservable, useObservableExternalNavigation, useObservableRouter, useOpenResources, usePanelBrowse, usePanelWidth, usePreloadTranslations, useResourceAnnotations, useResourceContent, useResourceEvents, useResourceLoadingAnnouncements, useResources, useRovingTabIndex, useSearchAnnouncements, useSessionExpiry, useStoreTokenSync, useTheme, useToast, useTranslations, useYieldFlow };