@arbidocs/blocks 0.4.68 → 0.4.70

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 (54) hide show
  1. package/README.md +85 -1
  2. package/dist/agents/index.cjs +220 -220
  3. package/dist/agents/index.js +4 -4
  4. package/dist/chat/index.cjs +66 -66
  5. package/dist/chat/index.js +2 -2
  6. package/dist/chunk-4DVEGXZQ.cjs +72 -0
  7. package/dist/chunk-4DVEGXZQ.cjs.map +1 -0
  8. package/dist/{chunk-5ZZCS2EK.cjs → chunk-7M22KND4.cjs} +5 -5
  9. package/dist/{chunk-5ZZCS2EK.cjs.map → chunk-7M22KND4.cjs.map} +1 -1
  10. package/dist/{chunk-ZQB7HNE6.js → chunk-BMWZTNZB.js} +3 -3
  11. package/dist/{chunk-ZQB7HNE6.js.map → chunk-BMWZTNZB.js.map} +1 -1
  12. package/dist/{chunk-FAVN6VUR.js → chunk-HLMFU7L2.js} +5 -5
  13. package/dist/{chunk-FAVN6VUR.js.map → chunk-HLMFU7L2.js.map} +1 -1
  14. package/dist/chunk-ODWCTAH7.js +66 -0
  15. package/dist/chunk-ODWCTAH7.js.map +1 -0
  16. package/dist/{chunk-WKNAFILY.cjs → chunk-XNRGCQPZ.cjs} +3 -3
  17. package/dist/{chunk-WKNAFILY.cjs.map → chunk-XNRGCQPZ.cjs.map} +1 -1
  18. package/dist/document-tools/DocumentToolButtons.d.ts +29 -0
  19. package/dist/document-tools/MarkupNotices.d.ts +12 -0
  20. package/dist/document-tools/MarkupViewNote.d.ts +11 -0
  21. package/dist/document-tools/SignDocumentDialog.d.ts +20 -0
  22. package/dist/document-tools/SignatureCertificate.d.ts +26 -0
  23. package/dist/document-tools/SignatureStatus.d.ts +22 -0
  24. package/dist/document-tools/VersionSnapshotBar.d.ts +27 -0
  25. package/dist/document-tools/index.cjs +633 -0
  26. package/dist/document-tools/index.cjs.map +1 -0
  27. package/dist/document-tools/index.d.ts +7 -0
  28. package/dist/document-tools/index.js +619 -0
  29. package/dist/document-tools/index.js.map +1 -0
  30. package/dist/document-tools/viewer/AnnotatedPdfViewer.d.ts +54 -0
  31. package/dist/document-tools/viewer/SignaturePlacementViewer.d.ts +20 -0
  32. package/dist/document-tools/viewer/index.cjs +273 -0
  33. package/dist/document-tools/viewer/index.cjs.map +1 -0
  34. package/dist/document-tools/viewer/index.d.ts +2 -0
  35. package/dist/document-tools/viewer/index.js +268 -0
  36. package/dist/document-tools/viewer/index.js.map +1 -0
  37. package/dist/facts/index.cjs +1 -1
  38. package/dist/facts/index.js +1 -1
  39. package/dist/files/cells/DocumentNameCell.d.ts +3 -1
  40. package/dist/files/index.cjs +38 -67
  41. package/dist/files/index.cjs.map +1 -1
  42. package/dist/files/index.js +19 -63
  43. package/dist/files/index.js.map +1 -1
  44. package/dist/home/index.cjs +1 -1
  45. package/dist/home/index.js +1 -1
  46. package/dist/index.cjs +651 -651
  47. package/dist/index.js +10 -10
  48. package/dist/settings/index.cjs +2 -2
  49. package/dist/settings/index.js +2 -2
  50. package/dist/shell/index.cjs +1 -1
  51. package/dist/shell/index.js +1 -1
  52. package/dist/studio/index.cjs +1 -1
  53. package/dist/studio/index.js +1 -1
  54. package/package.json +20 -4
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The viewer-header buttons of the PDF document tools: Annotate, Show original, Download with
3
+ * markup and Sign. Separate parts so a host can place them among its own header actions. On a
4
+ * narrow (`compact`) header each is icon-only; its accessible name stays.
5
+ */
6
+ import type { ReactElement } from 'react';
7
+ interface ToggleProps {
8
+ /** On (pressed). */
9
+ active: boolean;
10
+ onClick: () => void;
11
+ compact?: boolean;
12
+ }
13
+ /** Annotate mode: highlight, comment, stamp, redact. */
14
+ export declare function AnnotateButton({ active, onClick, compact }: ToggleProps): ReactElement;
15
+ /** The markup is the default view of a marked-up PDF; this shows the untouched file. */
16
+ export declare function ShowOriginalButton({ active, onClick, compact }: ToggleProps): ReactElement;
17
+ /**
18
+ * "Download with markup": the PDF with its annotations, which Acrobat and Preview show. With a
19
+ * `disabledReason` (a signed, locked version) it is off and says why.
20
+ */
21
+ export declare function DownloadMarkupButton({ onClick, disabledReason, }: {
22
+ onClick: () => void;
23
+ disabledReason?: string;
24
+ }): ReactElement;
25
+ /** One line where a signed version's content can be edited: an edit is a new, unsigned version. */
26
+ export declare function SignedEditNote(): ReactElement;
27
+ /** Sign: choose where the signature goes, then sign. */
28
+ export declare function SignButton({ active, onClick, compact }: ToggleProps): ReactElement;
29
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The one-line notices above the PDF about its markup: annotations found in this browser from
3
+ * before markup was saved on the server (for a shared document: add them to the shared markup, or
4
+ * discard), and markup that sits on an older version (open it, or copy its open comments here).
5
+ */
6
+ import type { LegacyPrompt, OlderMarkupNote } from '@arbidocs/react/document-tools';
7
+ export interface MarkupNoticesProps {
8
+ legacyPrompt: LegacyPrompt | null;
9
+ olderNote: OlderMarkupNote | null;
10
+ onOpenVersion: (version: number) => void;
11
+ }
12
+ export declare function MarkupNotices({ legacyPrompt, olderNote, onOpenVersion }: MarkupNoticesProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Which view of a marked-up PDF is on screen, spelled out beside the title, with the switch to the
3
+ * other one. The narrow header's "Show original" is an unlabelled page icon, so on its own it read
4
+ * as no control at all, and nothing said whether the page showed the markup or the original.
5
+ */
6
+ import type { ReactElement } from 'react';
7
+ export interface MarkupViewNoteProps {
8
+ showOriginal: boolean;
9
+ onToggle: () => void;
10
+ }
11
+ export declare function MarkupViewNote({ showOriginal, onToggle }: MarkupViewNoteProps): ReactElement;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Sign a document electronically: confirm the name, choose whether the date is shown, read the
3
+ * statement of intent, re-enter the password. Only the signature (and the date, if ticked) is drawn
4
+ * on the page; a role, a firm or a place go on as ordinary annotation text. Anyone can click the
5
+ * signature to check it. The signed copy is saved as a new version and opened, with an offer to
6
+ * email it when the host gives the tools an `emailDocument`. Needs a `<DocumentToolsProvider>` with
7
+ * a `user` (its email) and a `deploymentDomain`, inside a React Query `QueryClientProvider`.
8
+ */
9
+ import { type ReactElement } from 'react';
10
+ import { type SignatureAppearance } from '@arbidocs/react/document-tools';
11
+ export interface SignDocumentDialogProps {
12
+ open: boolean;
13
+ onOpenChange: (open: boolean) => void;
14
+ documentId: string;
15
+ /** The PDF the viewer is showing. */
16
+ pdfBlob: Blob;
17
+ /** Where the signature goes; omitted = bottom of the last page. */
18
+ appearance?: SignatureAppearance;
19
+ }
20
+ export declare function SignDocumentDialog({ open, onOpenChange, documentId, pdfBlob, appearance, }: SignDocumentDialogProps): ReactElement;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The certificate of an ARBI signature: the page the link on a signed PDF's signature opens, for
3
+ * anyone, signed in or not. Plain English and short: who signed and when, what ARBI checks, the
4
+ * result, any counter-signatures, and "Check your copy", which hashes a PDF in the browser and
5
+ * compares it with the signed document and each signed revision (the file never leaves the
6
+ * device). No email addresses and no
7
+ * document content. Presentational: `verification` comes from `useSignatureVerification` in
8
+ * `@arbidocs/react/document-tools`.
9
+ */
10
+ import { type ReactElement } from 'react';
11
+ import { type SignatureVerification } from '@arbidocs/react/document-tools';
12
+ export interface SignatureCertificateProps {
13
+ /** The signature reference (`sig-…`), shown at the foot of the page. */
14
+ reference?: string;
15
+ verification?: SignatureVerification;
16
+ isLoading?: boolean;
17
+ /** Why the signature could not be checked. */
18
+ error?: string | null;
19
+ /** The error is a passing one (too many checks): say it calmly, not as a failure. */
20
+ isErrorTransient?: boolean;
21
+ /** How signing times are shown. Default: {@link formatSignedAt}. */
22
+ formatDate?: (iso: string) => string;
23
+ /** Offer "Check your copy". Default on. */
24
+ allowCopyCheck?: boolean;
25
+ }
26
+ export declare function SignatureCertificate({ reference, verification, isLoading, error, isErrorTransient, formatDate, allowCopyCheck, }: SignatureCertificateProps): ReactElement;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The "Signed — locked" note in the viewer header (a signed version changes only by a further
3
+ * signature), which opens the signature details: who signed and when,
4
+ * whether the document is unchanged since, and "View certificate", the public page anyone can
5
+ * check the signature on (the same page the signature on the PDF links to). Read from the PDF
6
+ * itself (GET .../signatures). A counter-signed copy lists every signature, oldest first.
7
+ */
8
+ import type { ReactElement } from 'react';
9
+ import { type SignatureStatusResponse } from '@arbidocs/react/document-tools';
10
+ /** "14 Oct 2026, 12:00" in the reader's locale and time zone. */
11
+ export declare function formatSignedAt(iso: string): string;
12
+ export interface SignatureStatusProps {
13
+ status: SignatureStatusResponse;
14
+ /** How the signing time is shown. Default: {@link formatSignedAt}. */
15
+ formatDate?: (iso: string) => string;
16
+ /**
17
+ * The certificate page of a signature, only for a record without the `certificate_url` the API
18
+ * returns. Default: `/verify/{reference}` on this origin.
19
+ */
20
+ certificateUrl?: (reference: string) => string;
21
+ }
22
+ export declare function SignatureStatus({ status, formatDate, certificateUrl, }: SignatureStatusProps): ReactElement;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The bar above an older version opened read-only: which version it is, "Ask about this version"
3
+ * (when the host has an assistant) and the way back to the current version. Put it in the viewer's
4
+ * sticky header, not the content area: a PDF view scrolls its first page into view, which would
5
+ * scroll a bar above it out of sight.
6
+ */
7
+ import type { ReactElement } from 'react';
8
+ export interface VersionSnapshotBarLabels {
9
+ /** `Version 2 · read only`; `number` is undefined when the version is not known. */
10
+ title: (number: number | undefined) => string;
11
+ ask: string;
12
+ returnToCurrent: string;
13
+ /** For documents edited live (Word, artifacts), where "current" is the live document. */
14
+ returnToLive: string;
15
+ }
16
+ export declare const DEFAULT_VERSION_SNAPSHOT_BAR_LABELS: VersionSnapshotBarLabels;
17
+ export interface VersionSnapshotBarProps {
18
+ /** The version's number, when known. */
19
+ versionNumber?: number;
20
+ /** The document is edited live: the way back says "live document". */
21
+ live?: boolean;
22
+ /** Ask the assistant about this version. Omitted: no ask action. */
23
+ onAsk?: () => void;
24
+ onReturn: () => void;
25
+ labels?: Partial<VersionSnapshotBarLabels>;
26
+ }
27
+ export declare function VersionSnapshotBar({ versionNumber, live, onAsk, onReturn, labels: overrides, }: VersionSnapshotBarProps): ReactElement;