@semiont/react-ui 0.5.21 → 0.5.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ar-ZHKO4XDR.js → ar-JRTKCMTF.js} +11 -4
- package/dist/ar-JRTKCMTF.js.map +1 -0
- package/dist/{bn-3BUDKAK5.js → bn-LO6EDSCC.js} +11 -4
- package/dist/bn-LO6EDSCC.js.map +1 -0
- package/dist/{chunk-R52YAGHK.js → chunk-5Y5JDCKC.js} +11 -4
- package/dist/chunk-5Y5JDCKC.js.map +1 -0
- package/dist/{chunk-PFUXQPWJ.js → chunk-RO5CRVIA.js} +31 -31
- package/dist/{cs-2EFEUKTW.js → cs-LCHHOR4O.js} +11 -4
- package/dist/cs-LCHHOR4O.js.map +1 -0
- package/dist/{da-SUD3Q44Q.js → da-TARGPMJR.js} +11 -4
- package/dist/da-TARGPMJR.js.map +1 -0
- package/dist/{de-6IC5QRX7.js → de-SBH4QBPJ.js} +11 -4
- package/dist/de-SBH4QBPJ.js.map +1 -0
- package/dist/{el-Q4NAXFRC.js → el-2D2OLGWB.js} +11 -4
- package/dist/el-2D2OLGWB.js.map +1 -0
- package/dist/{en-P2L4X27N.js → en-QFIEG3CA.js} +2 -2
- package/dist/{es-YUKZBD4W.js → es-U6YK2LX6.js} +11 -4
- package/dist/es-U6YK2LX6.js.map +1 -0
- package/dist/{fa-OJ47LILE.js → fa-S7SZE37M.js} +11 -4
- package/dist/fa-S7SZE37M.js.map +1 -0
- package/dist/{fi-QFFL5CUB.js → fi-CBL3NIXN.js} +11 -4
- package/dist/fi-CBL3NIXN.js.map +1 -0
- package/dist/{fr-BOQZZWP4.js → fr-EABUHV6S.js} +11 -4
- package/dist/fr-EABUHV6S.js.map +1 -0
- package/dist/{he-LXDY3TFA.js → he-THWD244Y.js} +11 -4
- package/dist/he-THWD244Y.js.map +1 -0
- package/dist/{hi-HOJER77V.js → hi-GHGFZJ44.js} +11 -4
- package/dist/hi-GHGFZJ44.js.map +1 -0
- package/dist/{id-I5WQ6EWD.js → id-POZOUMDW.js} +11 -4
- package/dist/id-POZOUMDW.js.map +1 -0
- package/dist/index.d.ts +253 -41
- package/dist/index.js +1935 -1678
- package/dist/index.js.map +1 -1
- package/dist/{it-UYH642IJ.js → it-KDYJADSH.js} +11 -4
- package/dist/it-KDYJADSH.js.map +1 -0
- package/dist/{ja-JTVWAC4L.js → ja-Z5Z6ZF3P.js} +11 -4
- package/dist/ja-Z5Z6ZF3P.js.map +1 -0
- package/dist/{ko-IHXFMOIZ.js → ko-7X3XUXRN.js} +11 -4
- package/dist/ko-7X3XUXRN.js.map +1 -0
- package/dist/{ms-JH25VFLO.js → ms-BTWEIW43.js} +11 -4
- package/dist/ms-BTWEIW43.js.map +1 -0
- package/dist/{nl-SURXW7IQ.js → nl-IS2CGF5I.js} +11 -4
- package/dist/nl-IS2CGF5I.js.map +1 -0
- package/dist/{no-HXIKQFDZ.js → no-AAMEVA26.js} +11 -4
- package/dist/no-AAMEVA26.js.map +1 -0
- package/dist/{pl-7A4KU6XK.js → pl-PVXUQYFT.js} +11 -4
- package/dist/pl-PVXUQYFT.js.map +1 -0
- package/dist/{pt-6MGYP7Q5.js → pt-3ITQ76TL.js} +11 -4
- package/dist/pt-3ITQ76TL.js.map +1 -0
- package/dist/{ro-IROCHNIA.js → ro-FRB4IIVS.js} +11 -4
- package/dist/ro-FRB4IIVS.js.map +1 -0
- package/dist/{sv-WDJD75CV.js → sv-DS3RO24M.js} +11 -4
- package/dist/sv-DS3RO24M.js.map +1 -0
- package/dist/test-utils.js +7 -2
- package/dist/test-utils.js.map +1 -1
- package/dist/{th-RIO2E6B3.js → th-AX66MWWB.js} +11 -4
- package/dist/th-AX66MWWB.js.map +1 -0
- package/dist/{tr-TZ7ERCIN.js → tr-7KTB67TT.js} +11 -4
- package/dist/tr-7KTB67TT.js.map +1 -0
- package/dist/{uk-ZFWDKLUE.js → uk-SMQS2MAQ.js} +11 -4
- package/dist/uk-SMQS2MAQ.js.map +1 -0
- package/dist/{vi-UIOSP2JG.js → vi-D3JXL2EZ.js} +11 -4
- package/dist/vi-D3JXL2EZ.js.map +1 -0
- package/dist/{zh-6R6YUY46.js → zh-S754AWFS.js} +11 -4
- package/dist/zh-S754AWFS.js.map +1 -0
- package/package.json +4 -4
- package/src/components/modals/ResourceGenerateModal.tsx +10 -4
- package/src/components/modals/ResourceSearchModal.tsx +3 -1
- package/src/components/modals/SearchModal.tsx +3 -1
- package/src/components/modals/__tests__/ResourceGenerateModal.test.tsx +5 -0
- package/src/components/modals/__tests__/ResourceSearchModal.test.tsx +2 -1
- package/src/components/modals/__tests__/SearchModal.search-wiring.test.tsx +2 -1
- package/src/components/resource/AnnotateView.tsx +70 -138
- package/src/components/resource/AnnotationHistory.tsx +53 -17
- package/src/components/resource/BrowseView.tsx +3 -2
- package/src/components/resource/ResourceViewer.tsx +39 -22
- package/src/components/resource/__tests__/AnnotateView.registry.test.tsx +114 -0
- package/src/components/resource/__tests__/AnnotationHistory.test.tsx +63 -41
- package/src/components/resource/__tests__/BrowseView.reference-hover.test.tsx +2 -1
- package/src/components/resource/__tests__/ResourceViewer.multi-mount-invalidation.test.tsx +140 -0
- package/src/components/resource/__tests__/ResourceViewer.registry.test.tsx +89 -0
- package/src/components/resource/annotate-renderers.tsx +155 -0
- package/src/components/resource/panels/ReferencesPanel.tsx +38 -3
- package/src/components/resource/panels/TagEntry.tsx +5 -1
- package/src/components/resource/panels/TaggingPanel.tsx +6 -1
- package/src/components/resource/panels/UnifiedAnnotationsPanel.tsx +41 -0
- package/src/components/resource/panels/__tests__/ReferencesPanel.headless.test.tsx +90 -0
- package/src/components/resource/panels/__tests__/TagEntry.test.tsx +2 -2
- package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +2 -2
- package/src/components/resource/panels/__tests__/UnifiedAnnotationsPanel.failure.test.tsx +78 -0
- package/src/features/admin-security/state/__tests__/admin-security-state-unit.test.ts +9 -8
- package/src/features/admin-security/state/admin-security-state-unit.ts +3 -2
- package/src/features/admin-users/state/__tests__/admin-users-state-unit.test.ts +6 -5
- package/src/features/admin-users/state/admin-users-state-unit.ts +3 -2
- package/src/features/auth-welcome/state/__tests__/welcome-state-unit.test.ts +34 -24
- package/src/features/auth-welcome/state/welcome-state-unit.ts +7 -2
- package/src/features/moderate-entity-tags/state/__tests__/entity-tags-state-unit.test.ts +36 -11
- package/src/features/moderate-entity-tags/state/entity-tags-state-unit.ts +9 -10
- package/src/features/resource-compose/state/__tests__/compose-page-state-unit.test.ts +32 -11
- package/src/features/resource-compose/state/compose-page-state-unit.ts +9 -8
- package/src/features/resource-discovery/__tests__/ResourceDiscoveryPage.test.tsx +3 -1
- package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +25 -0
- package/src/features/resource-discovery/state/__tests__/discover-state-unit.test.ts +89 -24
- package/src/features/resource-discovery/state/discover-state-unit.ts +30 -30
- package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +1 -0
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +67 -30
- package/src/features/resource-viewer/state/__tests__/resource-loader-state-unit.test.ts +110 -7
- package/src/features/resource-viewer/state/__tests__/resource-viewer-page-state-unit.test.ts +166 -26
- package/src/features/resource-viewer/state/resource-loader-state-unit.ts +74 -9
- package/src/features/resource-viewer/state/resource-viewer-page-state-unit.ts +27 -26
- package/translations/ar.json +10 -3
- package/translations/bn.json +10 -3
- package/translations/cs.json +10 -3
- package/translations/da.json +10 -3
- package/translations/de.json +10 -3
- package/translations/el.json +10 -3
- package/translations/en.json +10 -3
- package/translations/es.json +10 -3
- package/translations/fa.json +10 -3
- package/translations/fi.json +10 -3
- package/translations/fr.json +10 -3
- package/translations/he.json +10 -3
- package/translations/hi.json +10 -3
- package/translations/id.json +10 -3
- package/translations/it.json +10 -3
- package/translations/ja.json +10 -3
- package/translations/ko.json +10 -3
- package/translations/ms.json +10 -3
- package/translations/nl.json +10 -3
- package/translations/no.json +10 -3
- package/translations/pl.json +10 -3
- package/translations/pt.json +10 -3
- package/translations/ro.json +10 -3
- package/translations/sv.json +10 -3
- package/translations/th.json +10 -3
- package/translations/tr.json +10 -3
- package/translations/uk.json +10 -3
- package/translations/vi.json +10 -3
- package/translations/zh.json +10 -3
- package/dist/ar-ZHKO4XDR.js.map +0 -1
- package/dist/bn-3BUDKAK5.js.map +0 -1
- package/dist/chunk-R52YAGHK.js.map +0 -1
- package/dist/cs-2EFEUKTW.js.map +0 -1
- package/dist/da-SUD3Q44Q.js.map +0 -1
- package/dist/de-6IC5QRX7.js.map +0 -1
- package/dist/el-Q4NAXFRC.js.map +0 -1
- package/dist/es-YUKZBD4W.js.map +0 -1
- package/dist/fa-OJ47LILE.js.map +0 -1
- package/dist/fi-QFFL5CUB.js.map +0 -1
- package/dist/fr-BOQZZWP4.js.map +0 -1
- package/dist/he-LXDY3TFA.js.map +0 -1
- package/dist/hi-HOJER77V.js.map +0 -1
- package/dist/id-I5WQ6EWD.js.map +0 -1
- package/dist/it-UYH642IJ.js.map +0 -1
- package/dist/ja-JTVWAC4L.js.map +0 -1
- package/dist/ko-IHXFMOIZ.js.map +0 -1
- package/dist/ms-JH25VFLO.js.map +0 -1
- package/dist/nl-SURXW7IQ.js.map +0 -1
- package/dist/no-HXIKQFDZ.js.map +0 -1
- package/dist/pl-7A4KU6XK.js.map +0 -1
- package/dist/pt-6MGYP7Q5.js.map +0 -1
- package/dist/ro-IROCHNIA.js.map +0 -1
- package/dist/sv-WDJD75CV.js.map +0 -1
- package/dist/th-RIO2E6B3.js.map +0 -1
- package/dist/tr-TZ7ERCIN.js.map +0 -1
- package/dist/uk-ZFWDKLUE.js.map +0 -1
- package/dist/vi-UIOSP2JG.js.map +0 -1
- package/dist/zh-6R6YUY46.js.map +0 -1
- /package/dist/{chunk-PFUXQPWJ.js.map → chunk-RO5CRVIA.js.map} +0 -0
- /package/dist/{en-P2L4X27N.js.map → en-QFIEG3CA.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _semiont_react_ui from '@semiont/react-ui';
|
|
2
|
+
import { BrowseMediaRenderers as BrowseMediaRenderers$1, AnnotateMediaRenderers as AnnotateMediaRenderers$1 } from '@semiont/react-ui';
|
|
2
3
|
import { Annotation, ResourceId, Selector, components, ResourceDescriptor, ValidationResult, StateUnit, GatheredContext, EventMap, DiscoveredKB, AnnotationId, AnchorStrategy, AnchorConfidence, StoredEventLike, ConnectionState, BackendDownload, ProgressEvent, AccessToken } from '@semiont/core';
|
|
3
4
|
export { Annotation } from '@semiont/core';
|
|
4
5
|
import * as React$1 from 'react';
|
|
@@ -6,7 +7,7 @@ import React__default, { ComponentType, ReactNode, KeyboardEvent as KeyboardEven
|
|
|
6
7
|
import * as _codemirror_state from '@codemirror/state';
|
|
7
8
|
import { HighlightStyle } from '@codemirror/language';
|
|
8
9
|
import { WidgetType } from '@codemirror/view';
|
|
9
|
-
import {
|
|
10
|
+
import { SemiontSession, SemiontClient, DiscoveryTransport, DiscoveryState, SemiontBrowser, SessionStorage, SessionFactory, OpenResource, TagSchema, UploadProgress, BeckonStateUnit, MarkStateUnit, GatherStateUnit, YieldStateUnit, ReferencedByEntry } from '@semiont/sdk';
|
|
10
11
|
export { BeckonStateUnit, GatherStateUnit, GenerateDocumentOptions, HOVER_DELAY_MS, HoverHandlers, MarkStateUnit, MatchStateUnit, PendingAnnotation, SearchPipeline, SearchPipelineOptions, SearchState, TagSchema, YieldStateUnit, createBeckonStateUnit, createGatherStateUnit, createHoverHandlers, createMarkStateUnit, createMatchStateUnit, createSearchPipeline, createYieldStateUnit } from '@semiont/sdk';
|
|
11
12
|
import { Observable } from 'rxjs';
|
|
12
13
|
|
|
@@ -765,6 +766,37 @@ declare function sanitizeImageURL(url: string): string | null;
|
|
|
765
766
|
|
|
766
767
|
declare function useStateUnit<T extends StateUnit>(factory: () => T): T;
|
|
767
768
|
|
|
769
|
+
/**
|
|
770
|
+
* Construct a state unit whose lifetime is bound to a live `SemiontSession`
|
|
771
|
+
* (.plans/SESSION-TYPED-FACTORIES.md — the session gate as API shape).
|
|
772
|
+
*
|
|
773
|
+
* Contract, in the order the KB-switch bug family demands it:
|
|
774
|
+
* - one construction per live session, however often the component rerenders;
|
|
775
|
+
* - on session swap, the OLD unit's `dispose()` runs strictly BEFORE the new
|
|
776
|
+
* factory — a unit must never coexist with its successor, or it keeps
|
|
777
|
+
* serving a disposed client's inert (B16) caches;
|
|
778
|
+
* - no session → no construction, and the `T | undefined` return makes the
|
|
779
|
+
* caller handle it — the null-check lives at exactly this one layer, not
|
|
780
|
+
* inside `!`-asserted factories (the auth/welcome production crash);
|
|
781
|
+
* - unmount disposes.
|
|
782
|
+
*
|
|
783
|
+
* Keying is by session OBJECT identity, which coincides with `session.id`:
|
|
784
|
+
* successive sessions are distinct objects with distinct ids by construction
|
|
785
|
+
* (`SemiontSession`'s instance counter exists for exactly this).
|
|
786
|
+
*
|
|
787
|
+
* The unit is created inside the effect, not during render — render stays
|
|
788
|
+
* pure (StrictMode-safe: its probe mount cleanly disposes the probe unit),
|
|
789
|
+
* and React's cleanup-before-next-effect ordering is what GUARANTEES
|
|
790
|
+
* dispose-before-create on swap. Consequence: the unit is `undefined` on the
|
|
791
|
+
* very first render frame; session-gated pages already render a loading
|
|
792
|
+
* state for exactly that frame.
|
|
793
|
+
*
|
|
794
|
+
* The factory is read through a ref so the effect keys ONLY on the session —
|
|
795
|
+
* an inline-closure factory (the universal call-site idiom) must not retrigger
|
|
796
|
+
* construction on every render.
|
|
797
|
+
*/
|
|
798
|
+
declare function useSessionStateUnit<T extends StateUnit>(session: SemiontSession | undefined, factory: (session: SemiontSession) => T): T | undefined;
|
|
799
|
+
|
|
768
800
|
/**
|
|
769
801
|
* Creates a debounced version of a callback function
|
|
770
802
|
*
|
|
@@ -1810,6 +1842,49 @@ declare function PermissionDeniedModal(): React$1.JSX.Element;
|
|
|
1810
1842
|
*/
|
|
1811
1843
|
declare function SessionExpiredModal(): React$1.JSX.Element;
|
|
1812
1844
|
|
|
1845
|
+
/**
|
|
1846
|
+
* Common props for an ANNOTATING media renderer. The read-only sibling is
|
|
1847
|
+
* `MediaRendererProps` in `browse-renderers.tsx`; this one additionally
|
|
1848
|
+
* carries the active tool, because annotating is an interaction, not a paint.
|
|
1849
|
+
*
|
|
1850
|
+
* `content` is decoded text for the text renderer, or a media URL for the
|
|
1851
|
+
* image / PDF renderers. `annotations` is the FLAT list — a renderer derives
|
|
1852
|
+
* whatever shape it needs (the text one segments it), so a custom renderer is
|
|
1853
|
+
* never handed a projection only one implementation can use.
|
|
1854
|
+
* See .plans/ANNOTATE-RENDERER-REGISTRY.md (D1)
|
|
1855
|
+
*/
|
|
1856
|
+
interface AnnotateMediaRendererProps {
|
|
1857
|
+
content: string;
|
|
1858
|
+
mimeType: string;
|
|
1859
|
+
resourceUri: string;
|
|
1860
|
+
annotations: Annotation[];
|
|
1861
|
+
/** Session for interaction routing — the canvases emit via `session.client`. */
|
|
1862
|
+
session: SemiontSession | null;
|
|
1863
|
+
/** Active drawing tool, or null when nothing is selected (read-only paint). */
|
|
1864
|
+
drawingMode: ShapeType | null;
|
|
1865
|
+
selectedMotivation: SelectionMotivation | null;
|
|
1866
|
+
hoveredAnnotationId?: string | null;
|
|
1867
|
+
hoverDelayMs?: number;
|
|
1868
|
+
newAnnotationIds?: Set<string>;
|
|
1869
|
+
scrollToAnnotationId?: string | null;
|
|
1870
|
+
showLineNumbers?: boolean;
|
|
1871
|
+
enableWidgets?: boolean;
|
|
1872
|
+
getTargetResourceName?: (resourceId: string) => string | undefined;
|
|
1873
|
+
generatingReferenceId?: string | null;
|
|
1874
|
+
}
|
|
1875
|
+
/** Annotating media dispatch, keyed by the registry render mode. */
|
|
1876
|
+
type AnnotateMediaRenderers = Partial<Record<string, ComponentType<AnnotateMediaRendererProps>>>;
|
|
1877
|
+
declare function TextAnnotateRenderer({ content, annotations, session, newAnnotationIds, hoveredAnnotationId, scrollToAnnotationId, showLineNumbers, hoverDelayMs, enableWidgets, getTargetResourceName, generatingReferenceId, }: AnnotateMediaRendererProps): React$1.JSX.Element;
|
|
1878
|
+
declare function ImageAnnotateRenderer({ content, resourceUri, annotations, session, drawingMode, selectedMotivation, hoveredAnnotationId, hoverDelayMs, }: AnnotateMediaRendererProps): React$1.JSX.Element | null;
|
|
1879
|
+
declare function PdfAnnotateRenderer({ content, resourceUri, annotations, session, drawingMode, selectedMotivation, hoveredAnnotationId, hoverDelayMs, }: AnnotateMediaRendererProps): React$1.JSX.Element | null;
|
|
1880
|
+
/**
|
|
1881
|
+
* Default annotating media renderers. `AnnotateView` merges a caller's
|
|
1882
|
+
* `renderers` override on top of these, so a host can swap one renderer (its
|
|
1883
|
+
* own PDF viewer, say) or add a mode without forking the view — the same seam
|
|
1884
|
+
* `defaultBrowseRenderers` gives the read-only path.
|
|
1885
|
+
*/
|
|
1886
|
+
declare const defaultAnnotateRenderers: Record<'text' | 'image' | 'pdf', ComponentType<AnnotateMediaRendererProps>>;
|
|
1887
|
+
|
|
1813
1888
|
interface Props$8 {
|
|
1814
1889
|
content: string;
|
|
1815
1890
|
mimeType?: string;
|
|
@@ -1833,6 +1908,8 @@ interface Props$8 {
|
|
|
1833
1908
|
onModeChange?: (mode: boolean) => void;
|
|
1834
1909
|
/** Render the built-in bar (default). false → no bar; selection capture and drawing stay live. */
|
|
1835
1910
|
showToolbar?: boolean;
|
|
1911
|
+
/** Override the annotating media renderers (render mode → renderer); merged over the defaults. */
|
|
1912
|
+
renderers?: AnnotateMediaRenderers;
|
|
1836
1913
|
}
|
|
1837
1914
|
/**
|
|
1838
1915
|
* View component for annotating resources with text selection and drawing
|
|
@@ -1840,17 +1917,30 @@ interface Props$8 {
|
|
|
1840
1917
|
* @emits mark:requested - User requested to create annotation. Payload: { selector: Selector | Selector[], motivation: SelectionMotivation }
|
|
1841
1918
|
* @subscribes beckon:hover - Annotation hovered. Payload: { annotationId: string | null }
|
|
1842
1919
|
*/
|
|
1843
|
-
declare function AnnotateView({ content, mimeType, resourceUri, annotations, uiState, onUIStateChange, enableWidgets, getTargetResourceName, generatingReferenceId, showLineNumbers, hoverDelayMs, annotateMode, session, newAnnotationIds, onModeChange, showToolbar, }: Props$8): React$1.JSX.Element;
|
|
1920
|
+
declare function AnnotateView({ content, mimeType, resourceUri, annotations, uiState, onUIStateChange, enableWidgets, getTargetResourceName, generatingReferenceId, showLineNumbers, hoverDelayMs, annotateMode, session, newAnnotationIds, onModeChange, showToolbar, renderers, }: Props$8): React$1.JSX.Element;
|
|
1844
1921
|
|
|
1845
1922
|
interface Props$7 {
|
|
1846
|
-
|
|
1923
|
+
/**
|
|
1924
|
+
* The resource's stored events, and how their load is going. Supplied by the
|
|
1925
|
+
* owner (which already holds them on its state unit) rather than fetched
|
|
1926
|
+
* here: a self-fetching panel can only model (value | not-yet), so a
|
|
1927
|
+
* terminal failure (B15) is indistinguishable from a request still in
|
|
1928
|
+
* flight and the panel says "Loading..." for ever.
|
|
1929
|
+
* See .plans/PANEL-FAILURE-STATES.md
|
|
1930
|
+
*/
|
|
1931
|
+
events: StoredEventLike[];
|
|
1932
|
+
eventsLoading?: boolean;
|
|
1933
|
+
eventsError?: Error | null;
|
|
1934
|
+
onRetryEvents?: () => void;
|
|
1935
|
+
/** Annotations for the same resource — used to resolve event → annotation. */
|
|
1936
|
+
annotations?: Annotation[];
|
|
1847
1937
|
hoveredAnnotationId?: string | null;
|
|
1848
1938
|
onEventHover?: (annotationId: string | null) => void;
|
|
1849
1939
|
onEventClick?: (annotationId: string | null) => void;
|
|
1850
1940
|
Link: React__default.ComponentType<LinkComponentProps>;
|
|
1851
1941
|
routes: RouteBuilder;
|
|
1852
1942
|
}
|
|
1853
|
-
declare function AnnotationHistory({
|
|
1943
|
+
declare function AnnotationHistory({ events: eventsData, eventsLoading, eventsError, onRetryEvents, annotations, hoveredAnnotationId, onEventHover, onEventClick, Link, routes, }: Props$7): React__default.JSX.Element | null;
|
|
1854
1944
|
|
|
1855
1945
|
/**
|
|
1856
1946
|
* Common props for a read-only ("browse") media renderer. `content` is decoded
|
|
@@ -1955,19 +2045,21 @@ declare function HistoryEvent({ event, annotations, allEvents, isRelated, t, Lin
|
|
|
1955
2045
|
/**
|
|
1956
2046
|
* ResourceViewer - Display and interact with resource content and annotations
|
|
1957
2047
|
*
|
|
1958
|
-
*
|
|
1959
|
-
*
|
|
1960
|
-
*
|
|
1961
|
-
* -
|
|
2048
|
+
* Real-time updates arrive through the sdk, not through this component:
|
|
2049
|
+
* the client's BrowseNamespace invalidates the right resource's annotation
|
|
2050
|
+
* list on mark:added/mark:removed (payload-keyed) and patches
|
|
2051
|
+
* mark:body-updated in place, so the live queries feeding `annotations`
|
|
2052
|
+
* refresh on their own. The viewer subscribes only to `browse:click`
|
|
2053
|
+
* (annotation-click routing).
|
|
1962
2054
|
*
|
|
1963
2055
|
* Bring-your-own-session: the `session` (SemiontSession) and the host's
|
|
1964
2056
|
* navigation / panel callbacks come in as props — no SemiontProvider required.
|
|
1965
|
-
* Every event it subscribes to is session-scoped
|
|
1966
|
-
*
|
|
1967
|
-
*
|
|
2057
|
+
* Every event it subscribes to is session-scoped and reaches it via
|
|
2058
|
+
* `session.subscribe`. Translations fall back to built-in English when no
|
|
2059
|
+
* TranslationProvider is mounted; caching flows through `session.client.browse.*`.
|
|
1968
2060
|
*
|
|
1969
2061
|
* Event flow:
|
|
1970
|
-
* make-meaning → EventLog → SSE → EventBus →
|
|
2062
|
+
* make-meaning → EventLog → SSE → EventBus → sdk cache invalidation → live queries
|
|
1971
2063
|
*/
|
|
1972
2064
|
interface Props$4 {
|
|
1973
2065
|
resource: ResourceDescriptor & {
|
|
@@ -2019,18 +2111,31 @@ interface Props$4 {
|
|
|
2019
2111
|
* this makes that opt-out a contract instead of a CSS override.
|
|
2020
2112
|
*/
|
|
2021
2113
|
showToolbar?: boolean;
|
|
2114
|
+
/**
|
|
2115
|
+
* Override the read-only / annotating media renderers respectively; each is
|
|
2116
|
+
* merged over its defaults by the view below.
|
|
2117
|
+
*
|
|
2118
|
+
* Two flat props rather than one nested object: the registries are
|
|
2119
|
+
* separately typed (`MediaRendererProps` vs `AnnotateMediaRendererProps`)
|
|
2120
|
+
* and nesting them would imply an interchangeability that does not exist.
|
|
2121
|
+
*
|
|
2122
|
+
* Forwarding them is what makes the registries reachable at all for a host
|
|
2123
|
+
* that imports `ResourceViewer` — the documented entry point. Before this,
|
|
2124
|
+
* reaching `BrowseView`'s `renderers` meant dropping to `BrowseView`
|
|
2125
|
+
* directly and reimplementing the browse/annotate switching this component
|
|
2126
|
+
* exists to provide. See .plans/ANNOTATE-RENDERER-REGISTRY.md (D5)
|
|
2127
|
+
*/
|
|
2128
|
+
browseRenderers?: BrowseMediaRenderers;
|
|
2129
|
+
annotateRenderers?: AnnotateMediaRenderers;
|
|
2022
2130
|
}
|
|
2023
2131
|
/**
|
|
2024
2132
|
* Deletion calls `session.client.mark.delete(...)` directly (no bus emit);
|
|
2025
2133
|
* panel opening invokes the host's `onOpenPanel` callback — the host owns
|
|
2026
2134
|
* the panel and any `panel:open` emission.
|
|
2027
2135
|
*
|
|
2028
|
-
* @subscribes mark:added - New annotation was added. Payload: { annotation: Annotation }
|
|
2029
|
-
* @subscribes mark:removed - Annotation was removed. Payload: { annotationId: string }
|
|
2030
|
-
* @subscribes mark:body-updated - Annotation was updated. Payload: { annotation: Annotation }
|
|
2031
2136
|
* @subscribes browse:click - User clicked on annotation. Payload: { annotationId: string, motivation, anchorRect? }
|
|
2032
2137
|
*/
|
|
2033
|
-
declare function ResourceViewer({ resource, annotations, session, onOpenResource, onOpenPanel, onLinkClick, onReferenceHover, inline, newAnnotationIds, generatingReferenceId, showLineNumbers, hoverDelayMs, hoveredAnnotationId: hoveredAnnotationIdProp, annotateMode: annotateModeProp, onAnnotateModeChange, clickAction: clickActionProp, onClickActionChange, selectionMotivation: selectionMotivationProp, onSelectionMotivationChange, shape: shapeProp, onShapeChange, showToolbar, }: Props$4): React__default.JSX.Element;
|
|
2138
|
+
declare function ResourceViewer({ resource, annotations, session, onOpenResource, onOpenPanel, onLinkClick, onReferenceHover, inline, newAnnotationIds, generatingReferenceId, showLineNumbers, hoverDelayMs, hoveredAnnotationId: hoveredAnnotationIdProp, annotateMode: annotateModeProp, onAnnotateModeChange, clickAction: clickActionProp, onClickActionChange, selectionMotivation: selectionMotivationProp, onSelectionMotivationChange, shape: shapeProp, onShapeChange, showToolbar, browseRenderers, annotateRenderers, }: Props$4): React__default.JSX.Element;
|
|
2034
2139
|
|
|
2035
2140
|
interface AssessmentEntryProps {
|
|
2036
2141
|
/** Session for interaction routing (browse.click etc.); the panel threads it. */
|
|
@@ -2266,9 +2371,25 @@ interface Props$1 {
|
|
|
2266
2371
|
Link: React__default.ComponentType<LinkComponentProps>;
|
|
2267
2372
|
routes: RouteBuilder;
|
|
2268
2373
|
allEntityTypes: string[];
|
|
2374
|
+
/**
|
|
2375
|
+
* The entity-type list failed to load. Without it the picker's empty branch
|
|
2376
|
+
* asserts "no entity types available" — a claim about the knowledge base
|
|
2377
|
+
* that a failed load cannot support.
|
|
2378
|
+
* See .plans/PANEL-FAILURE-STATES.md
|
|
2379
|
+
*/
|
|
2380
|
+
entityTypesError?: Error | null;
|
|
2269
2381
|
generatingReferenceId?: string | null;
|
|
2270
2382
|
referencedBy?: ReferencedBy[];
|
|
2271
2383
|
referencedByLoading?: boolean;
|
|
2384
|
+
/**
|
|
2385
|
+
* The incoming-references load failed terminally (B15). Distinct from
|
|
2386
|
+
* `referencedByLoading` — without it a dead request is indistinguishable
|
|
2387
|
+
* from one still in flight, and the panel says "Loading..." forever.
|
|
2388
|
+
* See .plans/PANEL-FAILURE-STATES.md
|
|
2389
|
+
*/
|
|
2390
|
+
referencedByError?: Error | null;
|
|
2391
|
+
/** Retry the failed incoming-references load. */
|
|
2392
|
+
onRetryReferencedBy?: () => void;
|
|
2272
2393
|
pendingAnnotation: PendingAnnotation$2 | null;
|
|
2273
2394
|
scrollToAnnotationId?: string | null;
|
|
2274
2395
|
onScrollCompleted?: () => void;
|
|
@@ -2286,7 +2407,7 @@ interface Props$1 {
|
|
|
2286
2407
|
* @emits mark:cancel-pending - Cancel pending reference annotation. Payload: undefined
|
|
2287
2408
|
* @subscribes browse:click - Annotation clicked. Payload: { annotationId: string }
|
|
2288
2409
|
*/
|
|
2289
|
-
declare function ReferencesPanel({ session, onOpenResource, resourceId, annotations, isAssisting, progress, annotateMode, Link, routes, allEntityTypes, generatingReferenceId, referencedBy, referencedByLoading, pendingAnnotation, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId, locale, sourceLanguage, }: Props$1): React__default.JSX.Element;
|
|
2410
|
+
declare function ReferencesPanel({ session, onOpenResource, resourceId, annotations, isAssisting, progress, annotateMode, Link, routes, allEntityTypes, entityTypesError, generatingReferenceId, referencedBy, referencedByLoading, referencedByError, onRetryReferencedBy, pendingAnnotation, scrollToAnnotationId, onScrollCompleted, hoveredAnnotationId, locale, sourceLanguage, }: Props$1): React__default.JSX.Element;
|
|
2290
2411
|
|
|
2291
2412
|
type Agent = components['schemas']['Agent'];
|
|
2292
2413
|
interface Props {
|
|
@@ -2396,6 +2517,14 @@ interface UnifiedAnnotationsPanelProps {
|
|
|
2396
2517
|
/** Host-owned navigation: called with the resolved resource id when a reference entry opens. */
|
|
2397
2518
|
onOpenResource?: (resourceId: string) => void;
|
|
2398
2519
|
annotations: Annotation[];
|
|
2520
|
+
/**
|
|
2521
|
+
* The annotations load failed terminally (B15). Every tab here derives from
|
|
2522
|
+
* the one `annotations` array, so without this the panel presents an empty
|
|
2523
|
+
* array as fact — "no highlights" for a resource that may be full of them.
|
|
2524
|
+
* See .plans/PANEL-FAILURE-STATES.md
|
|
2525
|
+
*/
|
|
2526
|
+
annotationsError?: Error | null;
|
|
2527
|
+
onRetryAnnotations?: () => void;
|
|
2399
2528
|
annotators: Record<string, Annotator>;
|
|
2400
2529
|
annotateMode?: boolean;
|
|
2401
2530
|
assistingMotivation?: Motivation | null;
|
|
@@ -2405,6 +2534,9 @@ interface UnifiedAnnotationsPanelProps {
|
|
|
2405
2534
|
generatingReferenceId?: string | null;
|
|
2406
2535
|
referencedBy?: any[];
|
|
2407
2536
|
referencedByLoading?: boolean;
|
|
2537
|
+
entityTypesError?: Error | null;
|
|
2538
|
+
referencedByError?: Error | null;
|
|
2539
|
+
onRetryReferencedBy?: () => void;
|
|
2408
2540
|
resourceId: string;
|
|
2409
2541
|
initialTab?: TabKey;
|
|
2410
2542
|
initialTabGeneration?: number;
|
|
@@ -2751,6 +2883,11 @@ interface ResourceGenerateModalProps {
|
|
|
2751
2883
|
defaultTitle: string;
|
|
2752
2884
|
locale: string;
|
|
2753
2885
|
gatherDefaults?: Partial<ResourceGatherConfig>;
|
|
2886
|
+
/**
|
|
2887
|
+
* Entity types offered in the exclusion picker. Owner-supplied so the
|
|
2888
|
+
* modal cannot present a failed load as an empty vocabulary.
|
|
2889
|
+
*/
|
|
2890
|
+
entityTypeOptions?: string[];
|
|
2754
2891
|
/**
|
|
2755
2892
|
* Emit the chosen generation config. The parent runs the job
|
|
2756
2893
|
* (`client.yield.fromResource(resourceId, …).run(…)`) — mirrors how the
|
|
@@ -2764,7 +2901,7 @@ interface ResourceGenerateModalProps {
|
|
|
2764
2901
|
* `gather.resource` → review the gathered `GatheredContext` → configure
|
|
2765
2902
|
* generation → emit. Reuses the kind-aware `GatherContextStep` for the review.
|
|
2766
2903
|
*/
|
|
2767
|
-
declare function ResourceGenerateModal({ isOpen, onClose, resourceId, defaultTitle, locale, gatherDefaults, onGenerateSubmit, translations: t, }: ResourceGenerateModalProps): React$1.JSX.Element;
|
|
2904
|
+
declare function ResourceGenerateModal({ isOpen, onClose, resourceId, defaultTitle, locale, gatherDefaults, entityTypeOptions, onGenerateSubmit, translations: t, }: ResourceGenerateModalProps): React$1.JSX.Element;
|
|
2768
2905
|
|
|
2769
2906
|
interface SearchModalProps$1 {
|
|
2770
2907
|
isOpen: boolean;
|
|
@@ -3889,6 +4026,43 @@ interface TagSchemasPageProps {
|
|
|
3889
4026
|
}
|
|
3890
4027
|
declare function TagSchemasPage({ schemas, isLoading, theme, showLineNumbers, activePanel, translations: t, ToolbarPanels, Toolbar, }: TagSchemasPageProps): React__default.JSX.Element;
|
|
3891
4028
|
|
|
4029
|
+
/**
|
|
4030
|
+
* A cache-backed list in its real states.
|
|
4031
|
+
*
|
|
4032
|
+
* `loading$` is true only until THIS subscription's first value; once a value
|
|
4033
|
+
* has arrived it never re-enters — even `retry()` routes through
|
|
4034
|
+
* `revalidating$` then — so a blocking spinner keyed on it structurally
|
|
4035
|
+
* cannot latch over rendered rows. The one deliberate exception is BEFORE any
|
|
4036
|
+
* value: `retry()` on a never-loaded list returns to the blocking state,
|
|
4037
|
+
* because there is nothing to render behind a non-blocking indicator.
|
|
4038
|
+
* `revalidating$` is the non-blocking sibling: the thunk's chain has moved to
|
|
4039
|
+
* a cache key that is not resolved yet (the cache emits `undefined` for it)
|
|
4040
|
+
* while `value$` still holds the previous key's rows. Views keep rendering the
|
|
4041
|
+
* stale list; a subtle indicator is optional.
|
|
4042
|
+
*
|
|
4043
|
+
* Why two signals instead of routing a late `undefined` back into `loading$`:
|
|
4044
|
+
* a stable cache key can never go value→undefined (`invalidate()` keeps the
|
|
4045
|
+
* value per B7; `remove()` is not used on list caches), so a late `undefined`
|
|
4046
|
+
* only ever means "new key, fetch in flight". Treating that as blocking
|
|
4047
|
+
* turns a routine filter switch into a full-page spinner — and if the fetch
|
|
4048
|
+
* is lost, into a spinner that never resolves. The failure path stays B14 →
|
|
4049
|
+
* B15 → `error$`, which views check before either signal.
|
|
4050
|
+
* See .plans/PANEL-FAILURE-STATES.md
|
|
4051
|
+
*/
|
|
4052
|
+
interface ListState<T> {
|
|
4053
|
+
value$: Observable<T>;
|
|
4054
|
+
/**
|
|
4055
|
+
* True until the first value. Never re-enters after one — a `retry()`
|
|
4056
|
+
* before any value (nothing to render) is the sole way back in.
|
|
4057
|
+
*/
|
|
4058
|
+
loading$: Observable<boolean>;
|
|
4059
|
+
/** True while a NEW key's fetch is pending behind a stale `value$`. */
|
|
4060
|
+
revalidating$: Observable<boolean>;
|
|
4061
|
+
error$: Observable<Error | null>;
|
|
4062
|
+
/** Re-subscribe: B15 clears the failure marker on a fresh `observe()`. */
|
|
4063
|
+
retry(): void;
|
|
4064
|
+
}
|
|
4065
|
+
|
|
3892
4066
|
type ComposeMode = 'new' | 'clone' | 'reference';
|
|
3893
4067
|
interface ComposeParams {
|
|
3894
4068
|
mode?: string | undefined;
|
|
@@ -3930,7 +4104,7 @@ interface ComposePageStateUnit extends StateUnit {
|
|
|
3930
4104
|
cloneData$: Observable<CloneData | null>;
|
|
3931
4105
|
referenceData$: Observable<ReferenceData | null>;
|
|
3932
4106
|
gatheredContext$: Observable<GatheredContext | null>;
|
|
3933
|
-
entityTypes
|
|
4107
|
+
entityTypes: ListState<string[]>;
|
|
3934
4108
|
/**
|
|
3935
4109
|
* Live upload-progress for the in-flight `save(...)` call. Emits the
|
|
3936
4110
|
* full `UploadProgress` lifecycle (started → finished) while a save is
|
|
@@ -3940,7 +4114,7 @@ interface ComposePageStateUnit extends StateUnit {
|
|
|
3940
4114
|
uploadProgress$: Observable<UploadProgress | null>;
|
|
3941
4115
|
save(params: SaveResourceParams$1): Promise<string>;
|
|
3942
4116
|
}
|
|
3943
|
-
declare function createComposePageStateUnit(
|
|
4117
|
+
declare function createComposePageStateUnit(session: SemiontSession, browse: ShellStateUnit, params: ComposeParams, auth?: AccessToken): ComposePageStateUnit;
|
|
3944
4118
|
|
|
3945
4119
|
/**
|
|
3946
4120
|
* ResourceComposePage Component
|
|
@@ -4056,6 +4230,13 @@ interface ResourceDiscoveryPageProps {
|
|
|
4056
4230
|
searchDocuments: ResourceDescriptor[];
|
|
4057
4231
|
entityTypes: string[];
|
|
4058
4232
|
isLoadingRecent: boolean;
|
|
4233
|
+
/**
|
|
4234
|
+
* The recent-resources load failed terminally (B15). Without it, "loading"
|
|
4235
|
+
* derived from an absent value never resolves and this route freezes.
|
|
4236
|
+
* See .plans/PANEL-FAILURE-STATES.md
|
|
4237
|
+
*/
|
|
4238
|
+
recentError?: Error | null;
|
|
4239
|
+
onRetryRecent?: () => void;
|
|
4059
4240
|
isSearching: boolean;
|
|
4060
4241
|
searchQuery: string;
|
|
4061
4242
|
onSearchQueryChange: (query: string) => void;
|
|
@@ -4083,10 +4264,12 @@ interface ResourceDiscoveryPageProps {
|
|
|
4083
4264
|
archived: string;
|
|
4084
4265
|
created: string;
|
|
4085
4266
|
loadingKnowledgeBase: string;
|
|
4267
|
+
recentFailed: string;
|
|
4268
|
+
retry: string;
|
|
4086
4269
|
};
|
|
4087
4270
|
ToolbarPanels: React__default.ComponentType<any>;
|
|
4088
4271
|
}
|
|
4089
|
-
declare function ResourceDiscoveryPage({ recentDocuments, searchDocuments, entityTypes, isLoadingRecent, isSearching, searchQuery, onSearchQueryChange, selectedEntityType, onSelectedEntityTypeChange, theme, showLineNumbers, activePanel, onNavigateToResource, onNavigateToCompose, translations: t, ToolbarPanels, }: ResourceDiscoveryPageProps): React__default.JSX.Element;
|
|
4272
|
+
declare function ResourceDiscoveryPage({ recentDocuments, searchDocuments, entityTypes, isLoadingRecent, recentError, onRetryRecent, isSearching, searchQuery, onSearchQueryChange, selectedEntityType, onSelectedEntityTypeChange, theme, showLineNumbers, activePanel, onNavigateToResource, onNavigateToCompose, translations: t, ToolbarPanels, }: ResourceDiscoveryPageProps): React__default.JSX.Element;
|
|
4090
4273
|
|
|
4091
4274
|
/**
|
|
4092
4275
|
* ResourceCard Component
|
|
@@ -4151,6 +4334,13 @@ interface ResourceViewerPageProps {
|
|
|
4151
4334
|
* Name of the active knowledge base (for display in panels)
|
|
4152
4335
|
*/
|
|
4153
4336
|
knowledgeBaseName?: string | undefined;
|
|
4337
|
+
/**
|
|
4338
|
+
* Media-renderer overrides, forwarded to `ResourceViewer`. Present at this
|
|
4339
|
+
* tier too so a host embedding the whole page — not just the viewer — can
|
|
4340
|
+
* still swap a renderer. See .plans/ANNOTATE-RENDERER-REGISTRY.md (D5)
|
|
4341
|
+
*/
|
|
4342
|
+
browseRenderers?: BrowseMediaRenderers$1;
|
|
4343
|
+
annotateRenderers?: AnnotateMediaRenderers$1;
|
|
4154
4344
|
}
|
|
4155
4345
|
/**
|
|
4156
4346
|
* ResourceViewerPage - Main component
|
|
@@ -4174,7 +4364,7 @@ interface ResourceViewerPageProps {
|
|
|
4174
4364
|
* bind:body-error, job:complete, job:fail, mark:assist-timeout) are
|
|
4175
4365
|
* subscribed by useOutcomeToasts.
|
|
4176
4366
|
*/
|
|
4177
|
-
declare function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanels, refetchDocument, streamStatus, knowledgeBaseName, }: ResourceViewerPageProps): React__default.JSX.Element;
|
|
4367
|
+
declare function ResourceViewerPage({ resource, rUri, locale, Link, routes, ToolbarPanels, refetchDocument, streamStatus, knowledgeBaseName, browseRenderers, annotateRenderers, }: ResourceViewerPageProps): React__default.JSX.Element;
|
|
4178
4368
|
|
|
4179
4369
|
interface HoverEmitterProps {
|
|
4180
4370
|
onMouseEnter: () => void;
|
|
@@ -4186,7 +4376,7 @@ interface SessionStateUnit extends StateUnit {
|
|
|
4186
4376
|
isLoggingOut$: Observable<boolean>;
|
|
4187
4377
|
logout(): Promise<void>;
|
|
4188
4378
|
}
|
|
4189
|
-
declare function createSessionStateUnit(
|
|
4379
|
+
declare function createSessionStateUnit(session: SemiontSession): SessionStateUnit;
|
|
4190
4380
|
|
|
4191
4381
|
interface AnnotationGroups {
|
|
4192
4382
|
highlights: Annotation[];
|
|
@@ -4209,27 +4399,42 @@ interface ResourceViewerPageStateUnit extends StateUnit {
|
|
|
4209
4399
|
mark: MarkStateUnit;
|
|
4210
4400
|
gather: GatherStateUnit;
|
|
4211
4401
|
yield: YieldStateUnit;
|
|
4212
|
-
annotations
|
|
4402
|
+
annotations: ListState<Annotation[]>;
|
|
4403
|
+
entityTypes: ListState<string[]>;
|
|
4404
|
+
events: ListState<StoredEventResponse[]>;
|
|
4405
|
+
referencedBy: ListState<ReferencedByEntry[]>;
|
|
4406
|
+
/** Derived from `annotations.value$`; failure/loading live on `annotations`. */
|
|
4213
4407
|
annotationGroups$: Observable<AnnotationGroups>;
|
|
4214
|
-
entityTypes$: Observable<string[]>;
|
|
4215
|
-
events$: Observable<StoredEventResponse[]>;
|
|
4216
|
-
referencedBy$: Observable<ReferencedByEntry[]>;
|
|
4217
4408
|
content$: Observable<string>;
|
|
4218
4409
|
contentLoading$: Observable<boolean>;
|
|
4219
4410
|
mediaToken$: Observable<string | null>;
|
|
4220
4411
|
wizard$: Observable<WizardState>;
|
|
4221
4412
|
closeWizard(): void;
|
|
4222
4413
|
}
|
|
4223
|
-
declare function createResourceViewerPageStateUnit(
|
|
4414
|
+
declare function createResourceViewerPageStateUnit(session: SemiontSession, resourceId: ResourceId, locale: string, browse: ShellStateUnit, options?: {
|
|
4224
4415
|
mediaType?: string;
|
|
4225
4416
|
}): ResourceViewerPageStateUnit;
|
|
4226
4417
|
|
|
4227
4418
|
interface ResourceLoaderStateUnit extends StateUnit {
|
|
4228
4419
|
resource$: Observable<ResourceDescriptor | undefined>;
|
|
4229
4420
|
isLoading$: Observable<boolean>;
|
|
4421
|
+
/** Terminal load failure (B15), or null. Cleared by any value or `invalidate()`. */
|
|
4422
|
+
error$: Observable<Error | null>;
|
|
4230
4423
|
invalidate(): void;
|
|
4231
4424
|
}
|
|
4232
|
-
|
|
4425
|
+
/**
|
|
4426
|
+
* Load one resource, in three states: loading, loaded, failed.
|
|
4427
|
+
*
|
|
4428
|
+
* The third state is not optional. `browse.resource()` delivers a terminal
|
|
4429
|
+
* failure as an RxJS *error* notification (B15) when the B14 retry is
|
|
4430
|
+
* exhausted with nothing cached — and a key that failed has no value either,
|
|
4431
|
+
* so a (value | no value) model reports a dead request as an eternal spinner
|
|
4432
|
+
* and drops the reason entirely. This unit catches the notification here so
|
|
4433
|
+
* that (a) consumers can render the failure and retry it, and (b) it never
|
|
4434
|
+
* escapes to RxJS as an unhandled rethrow.
|
|
4435
|
+
* See .plans/bugs/resource-page-frozen-on-disposed-client-after-kb-switch.md (D4)
|
|
4436
|
+
*/
|
|
4437
|
+
declare function createResourceLoaderStateUnit(session: SemiontSession, resourceId: ResourceId): ResourceLoaderStateUnit;
|
|
4233
4438
|
|
|
4234
4439
|
interface AdminUsersStateUnit extends StateUnit {
|
|
4235
4440
|
browse: ShellStateUnit;
|
|
@@ -4242,7 +4447,7 @@ interface AdminUsersStateUnit extends StateUnit {
|
|
|
4242
4447
|
isActive?: boolean;
|
|
4243
4448
|
}): Promise<void>;
|
|
4244
4449
|
}
|
|
4245
|
-
declare function createAdminUsersStateUnit(
|
|
4450
|
+
declare function createAdminUsersStateUnit(session: SemiontSession, browse: ShellStateUnit): AdminUsersStateUnit;
|
|
4246
4451
|
|
|
4247
4452
|
interface AdminSecurityStateUnit extends StateUnit {
|
|
4248
4453
|
browse: ShellStateUnit;
|
|
@@ -4250,7 +4455,7 @@ interface AdminSecurityStateUnit extends StateUnit {
|
|
|
4250
4455
|
allowedDomains$: Observable<string[]>;
|
|
4251
4456
|
isLoading$: Observable<boolean>;
|
|
4252
4457
|
}
|
|
4253
|
-
declare function createAdminSecurityStateUnit(
|
|
4458
|
+
declare function createAdminSecurityStateUnit(session: SemiontSession, browse: ShellStateUnit): AdminSecurityStateUnit;
|
|
4254
4459
|
|
|
4255
4460
|
interface WelcomeStateUnit extends StateUnit {
|
|
4256
4461
|
userData$: Observable<{
|
|
@@ -4259,7 +4464,7 @@ interface WelcomeStateUnit extends StateUnit {
|
|
|
4259
4464
|
isProcessing$: Observable<boolean>;
|
|
4260
4465
|
acceptTerms(): Promise<void>;
|
|
4261
4466
|
}
|
|
4262
|
-
declare function createWelcomeStateUnit(
|
|
4467
|
+
declare function createWelcomeStateUnit(session: SemiontSession): WelcomeStateUnit;
|
|
4263
4468
|
|
|
4264
4469
|
interface DiscoverSearchPipeline {
|
|
4265
4470
|
query$: Observable<string>;
|
|
@@ -4272,25 +4477,23 @@ interface DiscoverSearchPipeline {
|
|
|
4272
4477
|
interface DiscoverStateUnit extends StateUnit {
|
|
4273
4478
|
browse: ShellStateUnit;
|
|
4274
4479
|
search: DiscoverSearchPipeline;
|
|
4275
|
-
|
|
4276
|
-
entityTypes
|
|
4277
|
-
isLoadingRecent$: Observable<boolean>;
|
|
4480
|
+
recent: ListState<ResourceDescriptor[]>;
|
|
4481
|
+
entityTypes: ListState<string[]>;
|
|
4278
4482
|
selectedEntityType$: Observable<string>;
|
|
4279
4483
|
setSelectedEntityType(value: string): void;
|
|
4280
4484
|
}
|
|
4281
|
-
declare function createDiscoverStateUnit(
|
|
4485
|
+
declare function createDiscoverStateUnit(session: SemiontSession, browse: ShellStateUnit): DiscoverStateUnit;
|
|
4282
4486
|
|
|
4283
4487
|
interface EntityTagsStateUnit extends StateUnit {
|
|
4284
4488
|
browse: ShellStateUnit;
|
|
4285
|
-
entityTypes
|
|
4286
|
-
isLoading$: Observable<boolean>;
|
|
4489
|
+
entityTypes: ListState<string[]>;
|
|
4287
4490
|
newTag$: Observable<string>;
|
|
4288
4491
|
error$: Observable<string>;
|
|
4289
4492
|
isAdding$: Observable<boolean>;
|
|
4290
4493
|
setNewTag(value: string): void;
|
|
4291
4494
|
addTag(): Promise<void>;
|
|
4292
4495
|
}
|
|
4293
|
-
declare function createEntityTagsStateUnit(
|
|
4496
|
+
declare function createEntityTagsStateUnit(session: SemiontSession, browse: ShellStateUnit): EntityTagsStateUnit;
|
|
4294
4497
|
|
|
4295
4498
|
/**
|
|
4296
4499
|
* `ShellStateUnit` is app-scoped — it owns toolbar panel state and lives on
|
|
@@ -4319,8 +4522,17 @@ declare function useShellStateUnit(): ShellStateUnit;
|
|
|
4319
4522
|
* ready yet (e.g. `semiont?.browse.events(rUri)` when the active session is
|
|
4320
4523
|
* still loading). In that case the hook is a no-op and returns undefined.
|
|
4321
4524
|
* - Unsubscribes automatically on unmount or when `obs$` changes.
|
|
4525
|
+
* - A source ERROR is terminal absence: the hook keeps its last value and
|
|
4526
|
+
* reports the reason. It does not surface the error as state — a hook whose
|
|
4527
|
+
* whole contract is "the current value" has nowhere to put one. Callers that
|
|
4528
|
+
* must RENDER a failure need it modelled by the thing they observe (see
|
|
4529
|
+
* `createResourceLoaderStateUnit`'s `error$`); this handler exists so the
|
|
4530
|
+
* error is not left unhandled, which RxJS rethrows asynchronously — the
|
|
4531
|
+
* `Uncaught BusRequestError` seen in the field whenever a cache key
|
|
4532
|
+
* exhausted its B14 retry with nothing stored (B15).
|
|
4533
|
+
* See .plans/bugs/resource-page-frozen-on-disposed-client-after-kb-switch.md
|
|
4322
4534
|
*/
|
|
4323
4535
|
declare function useObservable<T>(obs$: Observable<T> | null | undefined): T | undefined;
|
|
4324
4536
|
|
|
4325
|
-
export { ANNOTATORS, AVAILABLE_LOCALES, AdminDevOpsPage, AdminExchangePage, AdminSecurityPage, AdminUsersPage, AnnotateToolbar, AnnotateView, AnnotationHistory, AnnotationOverlay, AnnotationProvider, AssessmentEntry, AssessmentPanel, AssistProgress, AssistSection, AssistShell, AsyncErrorBoundary, AuthErrorDisplay, BrowseView, Button, ButtonGroup, COMMON_PANELS, CodeMirrorRenderer, CollaborationPanel, CollapsibleResourceNavigation, CommentEntry, CommentsPanel, ComposeLoadingState, EntityTagsPage, EntityTypeBadges, ErrorBoundary, ExportCard, Footer, HighlightEntry, HighlightPanel, HistoryEvent, ImageBrowseRenderer, ImageURLSchema, ImageViewer, ImportCard, ImportProgress, JsonLdPanel, JsonLdView, KeyboardShortcutsHelpModal, LeftSidebar, LinkedDataPage, LiveRegionProvider, NavigationMenu, OAuthUserSchema, ObservableLink, PageLayout, PanelHeader, PdfBrowseRenderer, PermissionDeniedModal, PopupContainer, PopupHeader, ProtectedErrorBoundary, RESOURCE_PANELS, RecentDocumentsPage, ReferenceEntry, ReferenceResolutionWidget, ReferenceWizardModal, ReferencesPanel, ResizeHandle, ResourceAnnotationsProvider, ResourceCard, ResourceComposePage, ResourceDiscoveryPage, ResourceErrorState, ResourceGenerateModal, ResourceInfoPanel, ResourceLoadingState, ResourceSearchModal, ResourceTagsInline, ResourceViewer, ResourceViewerPage, SearchModal, SelectedTextDisplay, SemiontBranding, SemiontFavicon, SemiontProvider, SessionExpiredModal, SessionExpiryBanner, SessionTimer, SettingsPanel, SignInForm, SignUpForm, SimpleNavigation, SkipLinks, SortableResourceTab, StatisticsPanel, StatusDisplay, SvgDrawingCanvas, TagEntry, TagSchemasPage, TaggingPanel, TextBrowseRenderer, ThemeProvider, ToastContainer, ToastProvider, Toolbar, TranslationProvider, UnifiedAnnotationsPanel, UnifiedHeader, UploadProgressBar, UserMenuSkeleton, WebBrowserStorage, WelcomePage, annotatorKeyForMotivation, applyHighlights, buildSourceToRenderedMap, buildTextNodeIndex, buttonStyles, clearHighlights, createAdminSecurityStateUnit, createAdminUsersStateUnit, createComposePageStateUnit, createDiscoverStateUnit, createEntityTagsStateUnit, createExchangeStateUnit, createResourceLoaderStateUnit, createResourceViewerPageStateUnit, createSessionStateUnit, createShellStateUnit, createWelcomeStateUnit, cssVariables, defaultBrowseRenderers, faviconPaths, formatTime, generateCSSVariables, getResourceIcon, getSelectedShapeForSelectorType, getSelectorType, getShortcutDisplay, getSupportedShapes, hideWidgetPreview, isShapeSupported, jsonLightHighlightStyle, jsonLightTheme, resolveAnnotationRanges, sanitizeImageURL, saveSelectedShapeForSelectorType, setPdfWorkerSrc, showWidgetPreview, supportsDetection, toOverlayAnnotations, tokens, useAnnotationManager, useDebounce, useDebouncedCallback, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEventSubscription, useEventSubscriptions, useFormAnnouncements, useHoverDelay, useHoverEmitter, useIsTyping, useKBDiscovery, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useMediaToken, useObservable, useObservableExternalNavigation, useObservableRouter, usePanelWidth, usePendingCreation, usePreloadTranslations, useResourceAnnotations, useResourceContent, useResourceGather, useResourceLoader, useResourceLoadingAnnouncements, useRovingTabIndex, useSearchAnnouncements, useSemiont, useSessionEventSubscriptions, useSessionExpiry, useShellStateUnit, useStateUnit, useTheme, useToast, useToolbarPrefs, useTranslations };
|
|
4326
|
-
export type { AdminDevOpsPageProps, AdminExchangePageProps, AdminExchangePageTranslations, AdminSecurityPageProps, AdminSecurityStateUnit, AdminUser, AdminUserStats, AdminUsersPageProps, AdminUsersStateUnit, AnnotationConfig, AnnotationCreationHandler, AnnotationGroups, AnnotationHandlers, AnnotationManager, AnnotationProviderProps, AnnotationUIState, AnnotationsCollection, Annotator, AnnotatorKey, AssistProgressProps, AssistProgressTranslations, AssistShellProps, AuthErrorDisplayProps, AvailableLocale, BorderRadiusToken, BrowseMediaRenderers, ButtonGroupProps, ButtonProps, ClickAction, CloneData, CollapsibleResourceNavigationProps, ColorToken, ComposeLoadingStateProps, ComposeMode, ComposePageStateUnit, ComposeParams, CreateAnnotationParams, CreateConfig, DeleteAnnotationParams, DetectionConfig, DevOpsFeature, DiscoverStateUnit, DrawingMode, EntityTagsPageProps, EntityTagsStateUnit, ExchangeStateUnit, ExportCardProps, ExportCardTranslations, HoverEmitterProps, ImportCardProps, ImportCardTranslations, ImportPreview, ImportProgressProps, ImportProgressTranslations, KBDiscoveryOptions, KBDiscoveryResult, KeyboardShortcut, LinkComponentProps, LinkedDataPageProps, LinkedDataPageTranslations, MediaRendererProps, Motivation$7 as Motivation, NavigationItem, NavigationMenuHelper, NavigationProps, OAuthProvider, OAuthUser, ObservableLinkProps, OverlayAnnotation, PendingCreation, RecentDocumentsPageProps, ReferenceData, ReferenceHover, ReferenceWizardModalProps, ResolvedTheme, ResourceCardProps, ResourceComposePageProps, ResourceDiscoveryPageProps, ResourceErrorStateProps, ResourceGatherOptions, ResourceGenerateModalProps, ResourceGenerateModalTranslations, ResourceLoaderStateUnit, ResourceSearchModalProps, ResourceViewerPageProps, ResourceViewerPageStateUnit, RouteBuilder, SaveResourceParams$1 as SaveResourceParams, SearchModalProps, SelectionMotivation, SelectorType, SemiontProviderProps, SemiontResource$1 as SemiontResource, SessionStateUnit, ShadowToken, ShapeType, ShellStateUnit, ShellStateUnitOptions, SignInFormProps, SignUpFormProps, SimpleNavigationItem, SimpleNavigationProps, SortableResourceTabProps, SpacingToken, TagSchemasPageProps, TextSegment, TextSelection, Theme, ToastMessage, ToastType, ToolbarPanelType, ToolbarPart, ToolbarPrefs, TransitionToken, TranslationManager, TranslationProviderProps, TypographyToken, UICreateAnnotationParams, UploadProgressBarProps, UseMediaTokenResult, UseResourceContentResult, UseResourceGatherResult, UseResourceLoaderResult, WelcomePageProps, WelcomeStateUnit, WizardState };
|
|
4537
|
+
export { ANNOTATORS, AVAILABLE_LOCALES, AdminDevOpsPage, AdminExchangePage, AdminSecurityPage, AdminUsersPage, AnnotateToolbar, AnnotateView, AnnotationHistory, AnnotationOverlay, AnnotationProvider, AssessmentEntry, AssessmentPanel, AssistProgress, AssistSection, AssistShell, AsyncErrorBoundary, AuthErrorDisplay, BrowseView, Button, ButtonGroup, COMMON_PANELS, CodeMirrorRenderer, CollaborationPanel, CollapsibleResourceNavigation, CommentEntry, CommentsPanel, ComposeLoadingState, EntityTagsPage, EntityTypeBadges, ErrorBoundary, ExportCard, Footer, HighlightEntry, HighlightPanel, HistoryEvent, ImageAnnotateRenderer, ImageBrowseRenderer, ImageURLSchema, ImageViewer, ImportCard, ImportProgress, JsonLdPanel, JsonLdView, KeyboardShortcutsHelpModal, LeftSidebar, LinkedDataPage, LiveRegionProvider, NavigationMenu, OAuthUserSchema, ObservableLink, PageLayout, PanelHeader, PdfAnnotateRenderer, PdfBrowseRenderer, PermissionDeniedModal, PopupContainer, PopupHeader, ProtectedErrorBoundary, RESOURCE_PANELS, RecentDocumentsPage, ReferenceEntry, ReferenceResolutionWidget, ReferenceWizardModal, ReferencesPanel, ResizeHandle, ResourceAnnotationsProvider, ResourceCard, ResourceComposePage, ResourceDiscoveryPage, ResourceErrorState, ResourceGenerateModal, ResourceInfoPanel, ResourceLoadingState, ResourceSearchModal, ResourceTagsInline, ResourceViewer, ResourceViewerPage, SearchModal, SelectedTextDisplay, SemiontBranding, SemiontFavicon, SemiontProvider, SessionExpiredModal, SessionExpiryBanner, SessionTimer, SettingsPanel, SignInForm, SignUpForm, SimpleNavigation, SkipLinks, SortableResourceTab, StatisticsPanel, StatusDisplay, SvgDrawingCanvas, TagEntry, TagSchemasPage, TaggingPanel, TextAnnotateRenderer, TextBrowseRenderer, ThemeProvider, ToastContainer, ToastProvider, Toolbar, TranslationProvider, UnifiedAnnotationsPanel, UnifiedHeader, UploadProgressBar, UserMenuSkeleton, WebBrowserStorage, WelcomePage, annotatorKeyForMotivation, applyHighlights, buildSourceToRenderedMap, buildTextNodeIndex, buttonStyles, clearHighlights, createAdminSecurityStateUnit, createAdminUsersStateUnit, createComposePageStateUnit, createDiscoverStateUnit, createEntityTagsStateUnit, createExchangeStateUnit, createResourceLoaderStateUnit, createResourceViewerPageStateUnit, createSessionStateUnit, createShellStateUnit, createWelcomeStateUnit, cssVariables, defaultAnnotateRenderers, defaultBrowseRenderers, faviconPaths, formatTime, generateCSSVariables, getResourceIcon, getSelectedShapeForSelectorType, getSelectorType, getShortcutDisplay, getSupportedShapes, hideWidgetPreview, isShapeSupported, jsonLightHighlightStyle, jsonLightTheme, resolveAnnotationRanges, sanitizeImageURL, saveSelectedShapeForSelectorType, setPdfWorkerSrc, showWidgetPreview, supportsDetection, toOverlayAnnotations, tokens, useAnnotationManager, useDebounce, useDebouncedCallback, useDocumentAnnouncements, useDoubleKeyPress, useDropdown, useEventSubscription, useEventSubscriptions, useFormAnnouncements, useHoverDelay, useHoverEmitter, useIsTyping, useKBDiscovery, useKeyboardShortcuts, useLanguageChangeAnnouncements, useLineNumbers, useLiveRegion, useLoadingState, useLocalStorage, useMediaToken, useObservable, useObservableExternalNavigation, useObservableRouter, usePanelWidth, usePendingCreation, usePreloadTranslations, useResourceAnnotations, useResourceContent, useResourceGather, useResourceLoader, useResourceLoadingAnnouncements, useRovingTabIndex, useSearchAnnouncements, useSemiont, useSessionEventSubscriptions, useSessionExpiry, useSessionStateUnit, useShellStateUnit, useStateUnit, useTheme, useToast, useToolbarPrefs, useTranslations };
|
|
4538
|
+
export type { AdminDevOpsPageProps, AdminExchangePageProps, AdminExchangePageTranslations, AdminSecurityPageProps, AdminSecurityStateUnit, AdminUser, AdminUserStats, AdminUsersPageProps, AdminUsersStateUnit, AnnotateMediaRendererProps, AnnotateMediaRenderers, AnnotationConfig, AnnotationCreationHandler, AnnotationGroups, AnnotationHandlers, AnnotationManager, AnnotationProviderProps, AnnotationUIState, AnnotationsCollection, Annotator, AnnotatorKey, AssistProgressProps, AssistProgressTranslations, AssistShellProps, AuthErrorDisplayProps, AvailableLocale, BorderRadiusToken, BrowseMediaRenderers, ButtonGroupProps, ButtonProps, ClickAction, CloneData, CollapsibleResourceNavigationProps, ColorToken, ComposeLoadingStateProps, ComposeMode, ComposePageStateUnit, ComposeParams, CreateAnnotationParams, CreateConfig, DeleteAnnotationParams, DetectionConfig, DevOpsFeature, DiscoverStateUnit, DrawingMode, EntityTagsPageProps, EntityTagsStateUnit, ExchangeStateUnit, ExportCardProps, ExportCardTranslations, HoverEmitterProps, ImportCardProps, ImportCardTranslations, ImportPreview, ImportProgressProps, ImportProgressTranslations, KBDiscoveryOptions, KBDiscoveryResult, KeyboardShortcut, LinkComponentProps, LinkedDataPageProps, LinkedDataPageTranslations, MediaRendererProps, Motivation$7 as Motivation, NavigationItem, NavigationMenuHelper, NavigationProps, OAuthProvider, OAuthUser, ObservableLinkProps, OverlayAnnotation, PendingCreation, RecentDocumentsPageProps, ReferenceData, ReferenceHover, ReferenceWizardModalProps, ResolvedTheme, ResourceCardProps, ResourceComposePageProps, ResourceDiscoveryPageProps, ResourceErrorStateProps, ResourceGatherOptions, ResourceGenerateModalProps, ResourceGenerateModalTranslations, ResourceLoaderStateUnit, ResourceSearchModalProps, ResourceViewerPageProps, ResourceViewerPageStateUnit, RouteBuilder, SaveResourceParams$1 as SaveResourceParams, SearchModalProps, SelectionMotivation, SelectorType, SemiontProviderProps, SemiontResource$1 as SemiontResource, SessionStateUnit, ShadowToken, ShapeType, ShellStateUnit, ShellStateUnitOptions, SignInFormProps, SignUpFormProps, SimpleNavigationItem, SimpleNavigationProps, SortableResourceTabProps, SpacingToken, TagSchemasPageProps, TextSegment, TextSelection, Theme, ToastMessage, ToastType, ToolbarPanelType, ToolbarPart, ToolbarPrefs, TransitionToken, TranslationManager, TranslationProviderProps, TypographyToken, UICreateAnnotationParams, UploadProgressBarProps, UseMediaTokenResult, UseResourceContentResult, UseResourceGatherResult, UseResourceLoaderResult, WelcomePageProps, WelcomeStateUnit, WizardState };
|