@semiont/react-ui 0.5.24 → 0.5.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PdfAnnotationCanvas.client-6ZSF6ZTJ.js +677 -0
- package/dist/PdfAnnotationCanvas.client-6ZSF6ZTJ.js.map +1 -0
- package/dist/PdfAnnotationCanvas.client-JCJMXWWJ.css +180 -0
- package/dist/PdfAnnotationCanvas.client-JCJMXWWJ.css.map +1 -0
- package/dist/{ar-JRTKCMTF.js → ar-YTUUGK2O.js} +32 -6
- package/dist/ar-YTUUGK2O.js.map +1 -0
- package/dist/{bn-LO6EDSCC.js → bn-ASGNGPMD.js} +32 -6
- package/dist/bn-ASGNGPMD.js.map +1 -0
- package/dist/{chunk-4QMTEPQ3.js → chunk-BTUG3VJJ.js} +18 -298
- package/dist/chunk-BTUG3VJJ.js.map +1 -0
- package/dist/{chunk-5Y5JDCKC.js → chunk-L3WKRWP3.js} +32 -6
- package/dist/chunk-L3WKRWP3.js.map +1 -0
- package/dist/chunk-OBQOZCJE.js +287 -0
- package/dist/chunk-OBQOZCJE.js.map +1 -0
- package/dist/{cs-LCHHOR4O.js → cs-WMYVAOZY.js} +32 -6
- package/dist/cs-WMYVAOZY.js.map +1 -0
- package/dist/{da-TARGPMJR.js → da-FSHHN4D6.js} +32 -6
- package/dist/da-FSHHN4D6.js.map +1 -0
- package/dist/{de-SBH4QBPJ.js → de-FJFO3TPT.js} +32 -6
- package/dist/de-FJFO3TPT.js.map +1 -0
- package/dist/{el-2D2OLGWB.js → el-XOH4QIAG.js} +32 -6
- package/dist/el-XOH4QIAG.js.map +1 -0
- package/dist/{en-QFIEG3CA.js → en-3FCBW3YD.js} +6 -2
- package/dist/{es-U6YK2LX6.js → es-HDX4QI7E.js} +32 -6
- package/dist/es-HDX4QI7E.js.map +1 -0
- package/dist/{fa-S7SZE37M.js → fa-DJ6WTFTJ.js} +32 -6
- package/dist/fa-DJ6WTFTJ.js.map +1 -0
- package/dist/{fi-CBL3NIXN.js → fi-4S7H7W7U.js} +32 -6
- package/dist/fi-4S7H7W7U.js.map +1 -0
- package/dist/{fr-EABUHV6S.js → fr-6UJSYHXC.js} +32 -6
- package/dist/fr-6UJSYHXC.js.map +1 -0
- package/dist/{he-THWD244Y.js → he-ZZJOHJX2.js} +32 -6
- package/dist/he-ZZJOHJX2.js.map +1 -0
- package/dist/{hi-GHGFZJ44.js → hi-HZJTAW7U.js} +32 -6
- package/dist/hi-HZJTAW7U.js.map +1 -0
- package/dist/{id-POZOUMDW.js → id-E3I6ILEM.js} +32 -6
- package/dist/id-E3I6ILEM.js.map +1 -0
- package/dist/index.css +140 -94
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +85 -24
- package/dist/index.js +1782 -1697
- package/dist/index.js.map +1 -1
- package/dist/{it-KDYJADSH.js → it-ULAPAD7U.js} +32 -6
- package/dist/it-ULAPAD7U.js.map +1 -0
- package/dist/{ja-Z5Z6ZF3P.js → ja-SAHZQ4CZ.js} +32 -6
- package/dist/ja-SAHZQ4CZ.js.map +1 -0
- package/dist/{ko-7X3XUXRN.js → ko-DFU2ADQ4.js} +32 -6
- package/dist/ko-DFU2ADQ4.js.map +1 -0
- package/dist/{ms-BTWEIW43.js → ms-NWL76XNT.js} +32 -6
- package/dist/ms-NWL76XNT.js.map +1 -0
- package/dist/{nl-IS2CGF5I.js → nl-ATCM76WN.js} +32 -6
- package/dist/nl-ATCM76WN.js.map +1 -0
- package/dist/{no-AAMEVA26.js → no-UIAQ5RJF.js} +32 -6
- package/dist/no-UIAQ5RJF.js.map +1 -0
- package/dist/{pl-PVXUQYFT.js → pl-NOECQDXD.js} +32 -6
- package/dist/pl-NOECQDXD.js.map +1 -0
- package/dist/{pt-3ITQ76TL.js → pt-SVWIIUPC.js} +32 -6
- package/dist/pt-SVWIIUPC.js.map +1 -0
- package/dist/{ro-FRB4IIVS.js → ro-NR2DRTZG.js} +32 -6
- package/dist/ro-NR2DRTZG.js.map +1 -0
- package/dist/{sv-DS3RO24M.js → sv-STVJ37JP.js} +32 -6
- package/dist/sv-STVJ37JP.js.map +1 -0
- package/dist/test-utils.js +5 -3
- package/dist/test-utils.js.map +1 -1
- package/dist/{th-AX66MWWB.js → th-UWQR4K54.js} +32 -6
- package/dist/th-UWQR4K54.js.map +1 -0
- package/dist/{tr-7KTB67TT.js → tr-WNXZSD27.js} +32 -6
- package/dist/tr-WNXZSD27.js.map +1 -0
- package/dist/{uk-SMQS2MAQ.js → uk-SJRMB47Y.js} +32 -6
- package/dist/uk-SJRMB47Y.js.map +1 -0
- package/dist/{vi-D3JXL2EZ.js → vi-TMRQFES2.js} +32 -6
- package/dist/vi-TMRQFES2.js.map +1 -0
- package/dist/{zh-S754AWFS.js → zh-QOL3LYEM.js} +32 -6
- package/dist/zh-QOL3LYEM.js.map +1 -0
- package/package.json +8 -8
- package/src/components/AssistProgress.tsx +42 -30
- package/src/components/EntityFoundLog.tsx +38 -0
- package/src/components/StatusDisplay.css +35 -35
- package/src/components/__tests__/AssistProgress.test.tsx +86 -28
- package/src/components/annotation/annotations.css +1 -1
- package/src/components/modals/SearchModal.css +5 -5
- package/src/components/pdf-annotation/PdfAnnotationCanvas.css +143 -6
- package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +689 -198
- package/src/components/pdf-annotation/__tests__/PdfAnnotationCanvas.test.tsx +1008 -3
- package/src/components/pdf-annotation/__tests__/estimate-slot-height.test.ts +53 -0
- package/src/components/pdf-annotation/estimate-slot-height.ts +31 -0
- package/src/components/resource/AnnotateView.tsx +14 -7
- package/src/components/resource/BrowseView.tsx +2 -7
- package/src/components/resource/DownloadFileLink.tsx +49 -0
- package/src/components/resource/__tests__/AnnotateView.focus.test.tsx +58 -0
- package/src/components/resource/__tests__/browse-renderers.dispatch.test.tsx +33 -0
- package/src/components/resource/__tests__/download-link.test.tsx +129 -0
- package/src/components/resource/annotate-renderers.tsx +10 -1
- package/src/components/resource/browse-renderers.tsx +10 -1
- package/src/components/resource/panels/AssistSection.css +0 -43
- package/src/components/resource/panels/AssistSection.tsx +11 -2
- package/src/components/resource/panels/AssistShell.tsx +5 -1
- package/src/components/resource/panels/ReferencesPanel.tsx +12 -13
- package/src/components/resource/panels/TaggingPanel.tsx +21 -1
- package/src/components/resource/panels/__tests__/AssistSection.test.tsx +2 -2
- package/src/components/resource/panels/__tests__/AssistShell.test.tsx +9 -4
- package/src/components/resource/panels/__tests__/HighlightPanel.annotationProgress.test.tsx +1 -1
- package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +26 -0
- package/src/features/auth/auth.css +10 -10
- package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +58 -3
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +18 -7
- package/src/styles/core/inputs.css +1 -1
- package/src/styles/features/compose.css +1 -1
- package/src/styles/features/resource-viewer.css +1 -1
- package/src/styles/features/static-pages.css +11 -11
- package/src/styles/motivations/motivation-comment.css +2 -2
- package/src/styles/motivations/motivation-reference.css +2 -2
- package/src/styles/patterns/panels-base.css +4 -4
- package/src/styles/utilities/motion.css +15 -15
- package/src/styles/variables.css +29 -1
- package/translations/ar.json +27 -5
- package/translations/bn.json +27 -5
- package/translations/cs.json +27 -5
- package/translations/da.json +27 -5
- package/translations/de.json +27 -5
- package/translations/el.json +27 -5
- package/translations/en.json +27 -5
- package/translations/es.json +27 -5
- package/translations/fa.json +27 -5
- package/translations/fi.json +27 -5
- package/translations/fr.json +27 -5
- package/translations/he.json +27 -5
- package/translations/hi.json +27 -5
- package/translations/id.json +27 -5
- package/translations/it.json +27 -5
- package/translations/ja.json +27 -5
- package/translations/ko.json +27 -5
- package/translations/ms.json +27 -5
- package/translations/nl.json +27 -5
- package/translations/no.json +27 -5
- package/translations/pl.json +27 -5
- package/translations/pt.json +27 -5
- package/translations/ro.json +27 -5
- package/translations/sv.json +27 -5
- package/translations/th.json +27 -5
- package/translations/tr.json +27 -5
- package/translations/uk.json +27 -5
- package/translations/vi.json +27 -5
- package/translations/zh.json +27 -5
- package/dist/PdfAnnotationCanvas.client-SU5KNT7G.css +0 -98
- package/dist/PdfAnnotationCanvas.client-SU5KNT7G.css.map +0 -1
- package/dist/PdfAnnotationCanvas.client-V7Q3BEEQ.js +0 -427
- package/dist/PdfAnnotationCanvas.client-V7Q3BEEQ.js.map +0 -1
- package/dist/ar-JRTKCMTF.js.map +0 -1
- package/dist/bn-LO6EDSCC.js.map +0 -1
- package/dist/chunk-4QMTEPQ3.js.map +0 -1
- package/dist/chunk-5Y5JDCKC.js.map +0 -1
- package/dist/cs-LCHHOR4O.js.map +0 -1
- package/dist/da-TARGPMJR.js.map +0 -1
- package/dist/de-SBH4QBPJ.js.map +0 -1
- package/dist/el-2D2OLGWB.js.map +0 -1
- package/dist/es-U6YK2LX6.js.map +0 -1
- package/dist/fa-S7SZE37M.js.map +0 -1
- package/dist/fi-CBL3NIXN.js.map +0 -1
- package/dist/fr-EABUHV6S.js.map +0 -1
- package/dist/he-THWD244Y.js.map +0 -1
- package/dist/hi-GHGFZJ44.js.map +0 -1
- package/dist/id-POZOUMDW.js.map +0 -1
- package/dist/it-KDYJADSH.js.map +0 -1
- package/dist/ja-Z5Z6ZF3P.js.map +0 -1
- package/dist/ko-7X3XUXRN.js.map +0 -1
- package/dist/ms-BTWEIW43.js.map +0 -1
- package/dist/nl-IS2CGF5I.js.map +0 -1
- package/dist/no-AAMEVA26.js.map +0 -1
- package/dist/pl-PVXUQYFT.js.map +0 -1
- package/dist/pt-3ITQ76TL.js.map +0 -1
- package/dist/ro-FRB4IIVS.js.map +0 -1
- package/dist/sv-DS3RO24M.js.map +0 -1
- package/dist/th-AX66MWWB.js.map +0 -1
- package/dist/tr-7KTB67TT.js.map +0 -1
- package/dist/uk-SMQS2MAQ.js.map +0 -1
- package/dist/vi-D3JXL2EZ.js.map +0 -1
- package/dist/zh-S754AWFS.js.map +0 -1
- /package/dist/{en-QFIEG3CA.js.map → en-3FCBW3YD.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import React__default, { ComponentType, ReactNode, KeyboardEvent as KeyboardEven
|
|
|
7
7
|
import * as _codemirror_state from '@codemirror/state';
|
|
8
8
|
import { HighlightStyle } from '@codemirror/language';
|
|
9
9
|
import { WidgetType } from '@codemirror/view';
|
|
10
|
-
import {
|
|
10
|
+
import { SemiontClient, SemiontSession, DiscoveryTransport, DiscoveryState, SemiontBrowser, SessionStorage, SessionFactory, OpenResource, TagSchema, UploadProgress, BeckonStateUnit, MarkStateUnit, GatherStateUnit, YieldStateUnit, ReferencedByEntry } from '@semiont/sdk';
|
|
11
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';
|
|
12
12
|
import { Observable } from 'rxjs';
|
|
13
13
|
|
|
@@ -599,6 +599,27 @@ declare function getSelectedShapeForSelectorType(selectorType: SelectorType): Sh
|
|
|
599
599
|
*/
|
|
600
600
|
declare function saveSelectedShapeForSelectorType(selectorType: SelectorType, shape: ShapeType): void;
|
|
601
601
|
|
|
602
|
+
/**
|
|
603
|
+
* The URL for a resource's raw bytes — the one shape `GET /api/resources/:id`
|
|
604
|
+
* accepts from a browser. Pair with `useMediaToken`, which mints (and keeps
|
|
605
|
+
* refreshing) the token.
|
|
606
|
+
*
|
|
607
|
+
* Two things a hand-written `/api/resources/${id}` gets wrong, both of them
|
|
608
|
+
* silent until the byte never arrives:
|
|
609
|
+
*
|
|
610
|
+
* - **It must carry `?token=`.** That route is the browser-facing alias of the
|
|
611
|
+
* pipe, and exists only as the auth affordance for `<img>`, PDF.js and
|
|
612
|
+
* `<a download>` — none of which can attach an Authorization header. Auth is
|
|
613
|
+
* bearer + `?token=` only, no cookie, so a bare URL 401s.
|
|
614
|
+
* - **It must be absolute.** react-ui embeds into a host app with its own
|
|
615
|
+
* origin, so a relative path resolves against the HOST, not the backend.
|
|
616
|
+
*
|
|
617
|
+
* Returns `undefined` when either input is missing — no client, or a token
|
|
618
|
+
* that has not landed yet. There is no partially-correct URL worth rendering;
|
|
619
|
+
* callers show a not-yet-ready affordance instead of a known-bad link.
|
|
620
|
+
*/
|
|
621
|
+
declare function mediaUrl(client: SemiontClient | null | undefined, id: ResourceId, token: string | undefined): string | undefined;
|
|
622
|
+
|
|
602
623
|
/**
|
|
603
624
|
* Annotation overlay: decouples annotation highlighting from markdown rendering.
|
|
604
625
|
*
|
|
@@ -1445,7 +1466,7 @@ interface TextSegment {
|
|
|
1445
1466
|
confidence?: AnchorConfidence;
|
|
1446
1467
|
}
|
|
1447
1468
|
|
|
1448
|
-
interface Props$
|
|
1469
|
+
interface Props$c {
|
|
1449
1470
|
content: string;
|
|
1450
1471
|
segments?: TextSegment[];
|
|
1451
1472
|
onTextSelect?: (exact: string, position: {
|
|
@@ -1465,26 +1486,37 @@ interface Props$b {
|
|
|
1465
1486
|
generatingReferenceId?: string | null;
|
|
1466
1487
|
hoverDelayMs: number;
|
|
1467
1488
|
}
|
|
1468
|
-
declare function CodeMirrorRenderer({ content, segments, onChange, editable, newAnnotationIds, hoveredAnnotationId, scrollToAnnotationId, sourceView, showLineNumbers, enableWidgets, session, getTargetResourceName, generatingReferenceId, hoverDelayMs }: Props$
|
|
1489
|
+
declare function CodeMirrorRenderer({ content, segments, onChange, editable, newAnnotationIds, hoveredAnnotationId, scrollToAnnotationId, sourceView, showLineNumbers, enableWidgets, session, getTargetResourceName, generatingReferenceId, hoverDelayMs }: Props$c): React$1.JSX.Element;
|
|
1469
1490
|
|
|
1470
1491
|
type JobProgress$8 = components['schemas']['JobProgress'];
|
|
1492
|
+
/**
|
|
1493
|
+
* Every string this component renders. Required by default and with NO
|
|
1494
|
+
* English fallbacks (ASSIST-SURFACE-WARTS Lane A): a `tr.x || 'X'` default
|
|
1495
|
+
* turns a forgotten key into English text in a Japanese UI, silently and
|
|
1496
|
+
* only at runtime. Required keys make the same mistake a type error at the
|
|
1497
|
+
* call site. Only genuinely conditional copy is optional.
|
|
1498
|
+
*/
|
|
1471
1499
|
interface AssistProgressTranslations {
|
|
1472
1500
|
/** Header title (e.g. "Annotating Entity References" / "Generating Resource"). Omit for the headerless inline style. */
|
|
1473
1501
|
title?: string;
|
|
1474
1502
|
/** Cancel-button title attribute. */
|
|
1475
|
-
cancel
|
|
1503
|
+
cancel: string;
|
|
1476
1504
|
/** Default in-progress status message (used when the job sends no `message`). */
|
|
1477
|
-
inProgress
|
|
1505
|
+
inProgress: string;
|
|
1478
1506
|
/** Status copy for the terminal 'complete' stage. */
|
|
1479
|
-
complete
|
|
1507
|
+
complete: string;
|
|
1480
1508
|
/** Fallback status copy for the terminal 'error' stage. */
|
|
1481
|
-
failed
|
|
1482
|
-
/**
|
|
1509
|
+
failed: string;
|
|
1510
|
+
/** Request-parameters block heading. */
|
|
1511
|
+
paramsTitle: string;
|
|
1512
|
+
/** Current-work detail line — the generic form, used by every flow. */
|
|
1513
|
+
processing: (label: string) => string;
|
|
1514
|
+
/** Completed entity-type log line (reference flow only). */
|
|
1483
1515
|
found?: (count: number) => string;
|
|
1484
|
-
/** Current-work detail line
|
|
1516
|
+
/** Current-work detail line, reference-flow wording; falls back to `processing`. */
|
|
1485
1517
|
current?: (label: string) => string;
|
|
1486
1518
|
/** Dismiss-button label. */
|
|
1487
|
-
close
|
|
1519
|
+
close: string;
|
|
1488
1520
|
}
|
|
1489
1521
|
interface AssistProgressProps {
|
|
1490
1522
|
progress: JobProgress$8;
|
|
@@ -1500,7 +1532,7 @@ interface AssistProgressProps {
|
|
|
1500
1532
|
onDismiss?: () => void;
|
|
1501
1533
|
/** Render the percentage bar (tag flow's visual; percentage itself comes from `progress`). */
|
|
1502
1534
|
showPercentBar?: boolean;
|
|
1503
|
-
translations
|
|
1535
|
+
translations: AssistProgressTranslations;
|
|
1504
1536
|
}
|
|
1505
1537
|
/**
|
|
1506
1538
|
* The one job-progress renderer (#7) — unifies the three previous shapes
|
|
@@ -1527,8 +1559,12 @@ interface AssistShellProps {
|
|
|
1527
1559
|
* Pass-through config for the progress renderer (cancel/dismiss wiring,
|
|
1528
1560
|
* translations, percent bar). Dismiss policy lives HERE: the shell forwards
|
|
1529
1561
|
* `onDismiss` only once the assist is no longer running.
|
|
1562
|
+
*
|
|
1563
|
+
* Required because `translations` is: the shell renders the progress display
|
|
1564
|
+
* itself, so a caller that omitted this would render untranslated chrome —
|
|
1565
|
+
* the failure Lane A exists to make impossible.
|
|
1530
1566
|
*/
|
|
1531
|
-
progressProps
|
|
1567
|
+
progressProps: Omit<AssistProgressProps, 'progress' | 'dataType'>;
|
|
1532
1568
|
}
|
|
1533
1569
|
/**
|
|
1534
1570
|
* The one assist-section chrome (#7): collapsible header with persisted expand
|
|
@@ -1539,7 +1575,7 @@ interface AssistShellProps {
|
|
|
1539
1575
|
*/
|
|
1540
1576
|
declare function AssistShell({ assistType, title, isAssisting, progress, form, progressProps }: AssistShellProps): React$1.JSX.Element;
|
|
1541
1577
|
|
|
1542
|
-
interface Props$
|
|
1578
|
+
interface Props$b {
|
|
1543
1579
|
children: ReactNode;
|
|
1544
1580
|
fallback?: (error: Error, reset: () => void) => ReactNode;
|
|
1545
1581
|
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
@@ -1552,8 +1588,8 @@ interface State {
|
|
|
1552
1588
|
* Generic Error Boundary component that catches JavaScript errors
|
|
1553
1589
|
* in child components and displays a fallback UI.
|
|
1554
1590
|
*/
|
|
1555
|
-
declare class ErrorBoundary extends Component<Props$
|
|
1556
|
-
constructor(props: Props$
|
|
1591
|
+
declare class ErrorBoundary extends Component<Props$b, State> {
|
|
1592
|
+
constructor(props: Props$b);
|
|
1557
1593
|
static getDerivedStateFromError(error: Error): State;
|
|
1558
1594
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
1559
1595
|
handleReset: () => void;
|
|
@@ -1712,7 +1748,7 @@ declare function ToastProvider({ children }: {
|
|
|
1712
1748
|
declare function useToast(): ToastContextType;
|
|
1713
1749
|
|
|
1714
1750
|
type ToolbarContext = 'document' | 'simple';
|
|
1715
|
-
interface Props$
|
|
1751
|
+
interface Props$a<T extends string = string> {
|
|
1716
1752
|
context: ToolbarContext;
|
|
1717
1753
|
activePanel: T | null;
|
|
1718
1754
|
isArchived?: boolean;
|
|
@@ -1722,7 +1758,7 @@ interface Props$9<T extends string = string> {
|
|
|
1722
1758
|
*
|
|
1723
1759
|
* @emits panel:toggle - Toggle panel visibility. Payload: { panel: string }
|
|
1724
1760
|
*/
|
|
1725
|
-
declare function Toolbar<T extends string = string>({ context, activePanel, isArchived }: Props$
|
|
1761
|
+
declare function Toolbar<T extends string = string>({ context, activePanel, isArchived }: Props$a<T>): React$1.JSX.Element;
|
|
1726
1762
|
|
|
1727
1763
|
interface SettingsPanelProps {
|
|
1728
1764
|
theme: 'light' | 'dark' | 'system';
|
|
@@ -1885,7 +1921,7 @@ declare function PdfAnnotateRenderer({ content, resourceUri, annotations, sessio
|
|
|
1885
1921
|
*/
|
|
1886
1922
|
declare const defaultAnnotateRenderers: Record<'text' | 'image' | 'pdf', ComponentType<AnnotateMediaRendererProps>>;
|
|
1887
1923
|
|
|
1888
|
-
interface Props$
|
|
1924
|
+
interface Props$9 {
|
|
1889
1925
|
content: string;
|
|
1890
1926
|
mimeType?: string;
|
|
1891
1927
|
/** The '@id' of the shown resource — stamped as `source` on mark:requested (multi-viewer routing). */
|
|
@@ -1916,10 +1952,11 @@ interface Props$8 {
|
|
|
1916
1952
|
*
|
|
1917
1953
|
* @emits mark:requested - User requested to create annotation. Payload: { selector: Selector | Selector[], motivation: SelectionMotivation }
|
|
1918
1954
|
* @subscribes beckon:hover - Annotation hovered. Payload: { annotationId: string | null }
|
|
1955
|
+
* @subscribes beckon:focus - Scroll to and highlight annotation. Payload: { annotationId: string }
|
|
1919
1956
|
*/
|
|
1920
|
-
declare function AnnotateView({ content, mimeType, resourceUri, annotations, uiState, onUIStateChange, enableWidgets, getTargetResourceName, generatingReferenceId, showLineNumbers, hoverDelayMs, annotateMode, session, newAnnotationIds, onModeChange, showToolbar, renderers, }: Props$
|
|
1957
|
+
declare function AnnotateView({ content, mimeType, resourceUri, annotations, uiState, onUIStateChange, enableWidgets, getTargetResourceName, generatingReferenceId, showLineNumbers, hoverDelayMs, annotateMode, session, newAnnotationIds, onModeChange, showToolbar, renderers, }: Props$9): React$1.JSX.Element;
|
|
1921
1958
|
|
|
1922
|
-
interface Props$
|
|
1959
|
+
interface Props$8 {
|
|
1923
1960
|
/**
|
|
1924
1961
|
* The resource's stored events, and how their load is going. Supplied by the
|
|
1925
1962
|
* owner (which already holds them on its state unit) rather than fetched
|
|
@@ -1940,7 +1977,7 @@ interface Props$7 {
|
|
|
1940
1977
|
Link: React__default.ComponentType<LinkComponentProps>;
|
|
1941
1978
|
routes: RouteBuilder;
|
|
1942
1979
|
}
|
|
1943
|
-
declare function AnnotationHistory({ events: eventsData, eventsLoading, eventsError, onRetryEvents, annotations, hoveredAnnotationId, onEventHover, onEventClick, Link, routes, }: Props$
|
|
1980
|
+
declare function AnnotationHistory({ events: eventsData, eventsLoading, eventsError, onRetryEvents, annotations, hoveredAnnotationId, onEventHover, onEventClick, Link, routes, }: Props$8): React__default.JSX.Element | null;
|
|
1944
1981
|
|
|
1945
1982
|
/**
|
|
1946
1983
|
* Common props for a read-only ("browse") media renderer. `content` is decoded
|
|
@@ -1972,7 +2009,7 @@ declare function PdfBrowseRenderer({ content, resourceUri, annotations, session
|
|
|
1972
2009
|
*/
|
|
1973
2010
|
declare const defaultBrowseRenderers: Record<'text' | 'image' | 'pdf', ComponentType<MediaRendererProps>>;
|
|
1974
2011
|
|
|
1975
|
-
interface Props$
|
|
2012
|
+
interface Props$7 {
|
|
1976
2013
|
content: string;
|
|
1977
2014
|
mimeType: string;
|
|
1978
2015
|
resourceUri: string;
|
|
@@ -2025,7 +2062,31 @@ interface ReferenceHover {
|
|
|
2025
2062
|
* @subscribes beckon:hover - Highlight annotation on hover. Payload: { annotationId: string | null }
|
|
2026
2063
|
* @subscribes beckon:focus - Scroll to and highlight annotation. Payload: { annotationId: string }
|
|
2027
2064
|
*/
|
|
2028
|
-
declare const BrowseView: React$1.MemoExoticComponent<({ content, mimeType, resourceUri, annotations, selectedClick, onModeChange, onClickActionChange, showToolbar, annotateMode, hoverDelayMs, session, newAnnotationIds, renderers, onLinkClick, onReferenceHover, inline, }: Props$
|
|
2065
|
+
declare const BrowseView: React$1.MemoExoticComponent<({ content, mimeType, resourceUri, annotations, selectedClick, onModeChange, onClickActionChange, showToolbar, annotateMode, hoverDelayMs, session, newAnnotationIds, renderers, onLinkClick, onReferenceHover, inline, }: Props$7) => React$1.JSX.Element>;
|
|
2066
|
+
|
|
2067
|
+
interface Props$6 {
|
|
2068
|
+
/** The '@id' of the resource whose bytes to offer. */
|
|
2069
|
+
resourceUri: string;
|
|
2070
|
+
/** Session for that resource — its client mints the media token and supplies the backend origin. */
|
|
2071
|
+
session: SemiontSession | null;
|
|
2072
|
+
}
|
|
2073
|
+
/**
|
|
2074
|
+
* The "Download File" affordance on the unsupported-media fallback, shared by
|
|
2075
|
+
* the browse and annotate views.
|
|
2076
|
+
*
|
|
2077
|
+
* Its own component rather than inline markup for two reasons. The token is a
|
|
2078
|
+
* hook, and this fallback is a branch — mounting the component only in that
|
|
2079
|
+
* branch keeps every text/image/PDF view from minting a media token it will
|
|
2080
|
+
* never use. And the URL rule (absolute + `?token=`) lives in `mediaUrl`,
|
|
2081
|
+
* where both views and the viewer page read the same one.
|
|
2082
|
+
*
|
|
2083
|
+
* Before the token lands the anchor renders as a disabled button: a tokenless
|
|
2084
|
+
* URL is a guaranteed 401, and a link that silently fails is worse than one
|
|
2085
|
+
* visibly not ready yet. A client with no `auth` namespace (a host on a bare
|
|
2086
|
+
* transport) stays in that state permanently, which is the honest answer —
|
|
2087
|
+
* it cannot mint tokens at all.
|
|
2088
|
+
*/
|
|
2089
|
+
declare function DownloadFileLink({ resourceUri, session }: Props$6): React$1.JSX.Element;
|
|
2029
2090
|
|
|
2030
2091
|
type TranslateFn$4 = (key: string, params?: Record<string, string | number>) => string;
|
|
2031
2092
|
interface Props$5 {
|
|
@@ -4522,5 +4583,5 @@ declare function useShellStateUnit(): ShellStateUnit;
|
|
|
4522
4583
|
*/
|
|
4523
4584
|
declare function useObservable<T>(obs$: Observable<T> | null | undefined): T | undefined;
|
|
4524
4585
|
|
|
4525
|
-
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, LineNumbersProvider, 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 };
|
|
4586
|
+
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, DownloadFileLink, EntityTagsPage, EntityTypeBadges, ErrorBoundary, ExportCard, Footer, HighlightEntry, HighlightPanel, HistoryEvent, ImageAnnotateRenderer, ImageBrowseRenderer, ImageURLSchema, ImageViewer, ImportCard, ImportProgress, JsonLdPanel, JsonLdView, KeyboardShortcutsHelpModal, LeftSidebar, LineNumbersProvider, 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, mediaUrl, 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 };
|
|
4526
4587
|
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 };
|