@arbidocs/blocks 0.4.105 → 0.4.107
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/bin/arbidocs-render-take.mjs +27 -0
- package/dist/NativeDocxEditor-3VKJT43D.js +10 -0
- package/dist/NativeDocxEditor-3VKJT43D.js.map +1 -0
- package/dist/NativeDocxEditor-GNG5QV7V.cjs +31 -0
- package/dist/NativeDocxEditor-GNG5QV7V.cjs.map +1 -0
- package/dist/agents/index.cjs +210 -210
- package/dist/agents/index.js +5 -5
- package/dist/chat/index.cjs +125 -125
- package/dist/chat/index.js +3 -3
- package/dist/{chunk-PIT2YZCK.js → chunk-2PYENCW5.js} +3 -3
- package/dist/{chunk-PIT2YZCK.js.map → chunk-2PYENCW5.js.map} +1 -1
- package/dist/{chunk-W2RTZOK3.js → chunk-2SJTXYRM.js} +1749 -1778
- package/dist/chunk-2SJTXYRM.js.map +1 -0
- package/dist/{chunk-S7RHJI5Q.js → chunk-7NLPKJV5.js} +3 -3
- package/dist/{chunk-S7RHJI5Q.js.map → chunk-7NLPKJV5.js.map} +1 -1
- package/dist/{chunk-ZWWN4CUL.cjs → chunk-BHKFENKT.cjs} +1748 -1778
- package/dist/chunk-BHKFENKT.cjs.map +1 -0
- package/dist/{chunk-3R6XBYL7.cjs → chunk-DTBSGG36.cjs} +7 -2
- package/dist/chunk-DTBSGG36.cjs.map +1 -0
- package/dist/{chunk-IU542FPZ.js → chunk-EB7QAZLH.js} +6 -6
- package/dist/{chunk-IU542FPZ.js.map → chunk-EB7QAZLH.js.map} +1 -1
- package/dist/{chunk-TP3FAP5J.cjs → chunk-FZGMY6NQ.cjs} +5 -5
- package/dist/{chunk-TP3FAP5J.cjs.map → chunk-FZGMY6NQ.cjs.map} +1 -1
- package/dist/{chunk-W7NZRZ54.js → chunk-GFYGYME3.js} +3 -3
- package/dist/{chunk-W7NZRZ54.js.map → chunk-GFYGYME3.js.map} +1 -1
- package/dist/chunk-GYAUJ4KT.js +71 -0
- package/dist/chunk-GYAUJ4KT.js.map +1 -0
- package/dist/{chunk-XMBYDLZQ.cjs → chunk-HUJLKDWX.cjs} +4 -4
- package/dist/{chunk-XMBYDLZQ.cjs.map → chunk-HUJLKDWX.cjs.map} +1 -1
- package/dist/{chunk-4GFB5U3K.js → chunk-LHBJJ2GE.js} +4 -3
- package/dist/chunk-LHBJJ2GE.js.map +1 -0
- package/dist/{chunk-MP6FK43E.cjs → chunk-O5NDG4EA.cjs} +3 -3
- package/dist/{chunk-MP6FK43E.cjs.map → chunk-O5NDG4EA.cjs.map} +1 -1
- package/dist/{chunk-5YXG342J.cjs → chunk-OR4CO743.cjs} +3 -3
- package/dist/{chunk-5YXG342J.cjs.map → chunk-OR4CO743.cjs.map} +1 -1
- package/dist/{chunk-LGX6UFYG.js → chunk-P2KPDPFF.js} +8 -3
- package/dist/chunk-P2KPDPFF.js.map +1 -0
- package/dist/{chunk-DDF5GPIJ.js → chunk-P5ST47VY.js} +3 -3
- package/dist/{chunk-DDF5GPIJ.js.map → chunk-P5ST47VY.js.map} +1 -1
- package/dist/{chunk-EWSEQEPL.js → chunk-PFA43QNX.js} +3 -3
- package/dist/{chunk-EWSEQEPL.js.map → chunk-PFA43QNX.js.map} +1 -1
- package/dist/{chunk-7LLLQUM7.cjs → chunk-Q57MEBCK.cjs} +6 -5
- package/dist/chunk-Q57MEBCK.cjs.map +1 -0
- package/dist/{chunk-3PCHGUL5.cjs → chunk-R6APX23R.cjs} +12 -12
- package/dist/{chunk-3PCHGUL5.cjs.map → chunk-R6APX23R.cjs.map} +1 -1
- package/dist/{chunk-24ND4S6Y.cjs → chunk-RILMICOP.cjs} +5 -5
- package/dist/{chunk-24ND4S6Y.cjs.map → chunk-RILMICOP.cjs.map} +1 -1
- package/dist/chunk-S24XEVPS.cjs +73 -0
- package/dist/chunk-S24XEVPS.cjs.map +1 -0
- package/dist/{chunk-XQDM6T6C.js → chunk-WDD255XQ.js} +3 -3
- package/dist/{chunk-XQDM6T6C.js.map → chunk-WDD255XQ.js.map} +1 -1
- package/dist/{chunk-Z5VUZ6YD.cjs → chunk-ZV3BKLFY.cjs} +3 -3
- package/dist/{chunk-Z5VUZ6YD.cjs.map → chunk-ZV3BKLFY.cjs.map} +1 -1
- package/dist/collaboration/index.cjs +15 -15
- package/dist/collaboration/index.js +1 -1
- package/dist/collaboration/mail/MailMessageView.d.ts +3 -1
- package/dist/connect/docx.cjs +7 -6
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/docx.js +5 -4
- package/dist/connect/docx.js.map +1 -1
- package/dist/connect/index.cjs +409 -93
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +363 -48
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/mail/ConnectedMailComposer.d.ts +12 -2
- package/dist/connection/mail/ConnectedMailMessage.d.ts +19 -0
- package/dist/connection/mail/ConnectedMailbox.d.ts +7 -3
- package/dist/connection/mail/MailComposerForm.d.ts +12 -2
- package/dist/connection/mail/index.d.ts +2 -1
- package/dist/connection/mail/types.d.ts +15 -0
- package/dist/connection/mail/useWordBody.d.ts +48 -0
- package/dist/docx/NativeDocxEditor.d.ts +9 -1
- package/dist/docx/index.cjs +51 -50
- package/dist/docx/index.cjs.map +1 -1
- package/dist/docx/index.js +4 -3
- package/dist/docx/index.js.map +1 -1
- package/dist/facts/index.cjs +2 -2
- package/dist/facts/index.js +2 -2
- package/dist/files/index.cjs +2 -2
- package/dist/files/index.js +2 -2
- package/dist/home/index.cjs +17 -17
- package/dist/home/index.js +3 -3
- package/dist/index.cjs +451 -451
- package/dist/index.js +9 -9
- package/dist/record/index.cjs +307 -66
- package/dist/record/index.cjs.map +1 -1
- package/dist/record/index.d.ts +145 -26
- package/dist/record/index.js +301 -67
- package/dist/record/index.js.map +1 -1
- package/dist/retrieval/index.cjs +1 -1
- package/dist/retrieval/index.js +1 -1
- package/dist/settings/index.cjs +36 -36
- package/dist/settings/index.js +3 -3
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +4 -4
- package/dist/studio/index.js +3 -3
- package/dist/workflow-canvas/index.cjs +12 -12
- package/dist/workflow-canvas/index.js +5 -5
- package/dist/workspaces/index.cjs +2 -2
- package/dist/workspaces/index.js +2 -2
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +8 -5
- package/record/render-overlays.mjs +152 -0
- package/record/render-take.py +985 -0
- package/src/docx/styles.css +22 -0
- package/dist/chunk-3R6XBYL7.cjs.map +0 -1
- package/dist/chunk-4GFB5U3K.js.map +0 -1
- package/dist/chunk-7LLLQUM7.cjs.map +0 -1
- package/dist/chunk-LGX6UFYG.js.map +0 -1
- package/dist/chunk-W2RTZOK3.js.map +0 -1
- package/dist/chunk-ZWWN4CUL.cjs.map +0 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { type RefObject } from 'react';
|
|
9
9
|
import { type MailAccount, type MailCompose, type MailMessage } from '@arbidocs/react';
|
|
10
|
-
import type { MailDocumentSource, MailNotify, MailOfflineSupport } from './types';
|
|
10
|
+
import type { MailDocumentSource, MailNotify, MailOfflineSupport, MailWordEditor } from './types';
|
|
11
11
|
export interface ConnectedMailComposerProps {
|
|
12
12
|
/** Open this saved draft (from the account's Drafts) instead of a new message. */
|
|
13
13
|
draftId?: string;
|
|
@@ -36,5 +36,15 @@ export interface ConnectedMailComposerProps {
|
|
|
36
36
|
/** Workspace documents to attach ("From workspace"). Absent: not offered. */
|
|
37
37
|
documents?: MailDocumentSource;
|
|
38
38
|
notify?: MailNotify;
|
|
39
|
+
/** A native draft's body in the Word editor (see {@link MailWordEditor}). Absent: the rich-text body. */
|
|
40
|
+
word?: MailWordEditor;
|
|
41
|
+
/** This compose session, stable across remounts (its Word room is kept for it). */
|
|
42
|
+
sessionKey?: string;
|
|
43
|
+
/** Open this Word room as the body (a new message whose body ARBI wrote). */
|
|
44
|
+
roomId?: string;
|
|
45
|
+
/** A reply to this email (its id): the composer starts addressed and threaded as one; the body is `roomId`. */
|
|
46
|
+
replyTo?: string;
|
|
47
|
+
/** The host's header for this message (a panel's title bar): who ARBI's work is billed to shows there. */
|
|
48
|
+
headerSlot?: HTMLElement | null;
|
|
39
49
|
}
|
|
40
|
-
export declare function ConnectedMailComposer({ draftId, initial, account: accountProp, mailbox, maxBytes: maxBytesProp, ready: readyProp, drafts: draftsProp, notify, offline, ...rest }: ConnectedMailComposerProps): import("react").JSX.Element;
|
|
50
|
+
export declare function ConnectedMailComposer({ draftId, initial, account: accountProp, mailbox, maxBytes: maxBytesProp, ready: readyProp, drafts: draftsProp, notify, offline, replyTo, ...rest }: ConnectedMailComposerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One email of the mail client in scope, shown on its own (e.g. in a panel beside a chat): its actions,
|
|
3
|
+
* sender, recipients, attachments and body, as the mailbox shows it. Replying hands the new message to
|
|
4
|
+
* the host (`onCompose`), and so does asking ARBI to draft the reply (`onReplyWithArbi`).
|
|
5
|
+
*/
|
|
6
|
+
import { type MailAccount, type MailCompose, type MailMessage } from '@arbidocs/react';
|
|
7
|
+
export interface ConnectedMailMessageProps {
|
|
8
|
+
messageId: string;
|
|
9
|
+
/** The account the message is in: an id, or `'native'` (default). */
|
|
10
|
+
mailbox?: string;
|
|
11
|
+
/** The folder it is in (replying from Sent goes to its recipients). Default: the inbox. */
|
|
12
|
+
folderRole?: string;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
/** Reply / reply all / forward: the new message, to open in a composer. */
|
|
15
|
+
onCompose: (initial: MailCompose) => void;
|
|
16
|
+
/** Ask ARBI to draft the reply. Absent: not offered. */
|
|
17
|
+
onReplyWithArbi?: (message: MailMessage, account: MailAccount) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function ConnectedMailMessage({ messageId, mailbox, folderRole, onClose, onCompose, onReplyWithArbi, }: ConnectedMailMessageProps): import("react").JSX.Element;
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { type ReactNode } from 'react';
|
|
12
12
|
import type { GridState } from 'ag-grid-community';
|
|
13
|
-
import { type MailAddress, type MailAttachment } from '@arbidocs/react';
|
|
13
|
+
import { type MailAddress, type MailAccount, type MailAttachment, type MailMessage } from '@arbidocs/react';
|
|
14
14
|
import { type MailAliasUser } from './ConnectedMailAccounts';
|
|
15
|
-
import type { MailDocumentSource, MailNotify, MailOfflineSupport, MailPanelProps, MailSaveToWorkspace } from './types';
|
|
15
|
+
import type { MailDocumentSource, MailNotify, MailOfflineSupport, MailPanelProps, MailSaveToWorkspace, MailWordEditor } from './types';
|
|
16
16
|
export interface ConnectedMailboxProps {
|
|
17
17
|
/** Which mailbox: an account id, or `'native'` for the user's own inbox. Default: the first. */
|
|
18
18
|
mailbox?: string;
|
|
@@ -44,6 +44,10 @@ export interface ConnectedMailboxProps {
|
|
|
44
44
|
documents?: MailDocumentSource;
|
|
45
45
|
/** Saving an email into a workspace ("Save to workspace" on native mail). */
|
|
46
46
|
saveToWorkspace?: MailSaveToWorkspace;
|
|
47
|
+
/** Native drafts' bodies in the Word editor, where ARBI's edits are suggestions. Absent: rich text. */
|
|
48
|
+
word?: MailWordEditor;
|
|
49
|
+
/** "Reply with ARBI" on a native message: the host starts the chat that drafts it. Absent: not offered. */
|
|
50
|
+
onReplyWithArbi?: (message: MailMessage, account: MailAccount) => void;
|
|
47
51
|
/** A calendar invite card for a message with an .ics part. */
|
|
48
52
|
renderInvite?: (props: {
|
|
49
53
|
accountId: string;
|
|
@@ -62,4 +66,4 @@ export interface ConnectedMailboxProps {
|
|
|
62
66
|
initialMessageId?: string | null;
|
|
63
67
|
notify?: MailNotify;
|
|
64
68
|
}
|
|
65
|
-
export declare function ConnectedMailbox({ mailbox, draftId, onDraftOpened, folder: requestedFolder, onFolderOpened, composeAttachments, onComposeOpened, onOpenDocument, user, productName, oauthReturnPath, personLabel, offline, documents, saveToWorkspace, renderInvite, renderPanel, onViewerOpenChange, gridState, onGridStateChange, initialMessageId, notify, }: ConnectedMailboxProps): import("react").JSX.Element;
|
|
69
|
+
export declare function ConnectedMailbox({ mailbox, draftId, onDraftOpened, folder: requestedFolder, onFolderOpened, composeAttachments, onComposeOpened, onOpenDocument, user, productName, oauthReturnPath, personLabel, offline, documents, saveToWorkspace, word, onReplyWithArbi, renderInvite, renderPanel, onViewerOpenChange, gridState, onGridStateChange, initialMessageId, notify, }: ConnectedMailboxProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type RefObject } from 'react';
|
|
2
2
|
import { type MailAccount, type MailCompose, type MailMessage } from '@arbidocs/react';
|
|
3
|
-
import type { MailDocumentSource, MailNotify, MailOfflineSupport } from './types';
|
|
3
|
+
import type { MailDocumentSource, MailNotify, MailOfflineSupport, MailWordEditor } from './types';
|
|
4
4
|
export interface MailComposerFormProps {
|
|
5
5
|
account?: MailAccount;
|
|
6
6
|
initial: MailCompose;
|
|
@@ -11,6 +11,8 @@ export interface MailComposerFormProps {
|
|
|
11
11
|
onClose: () => void;
|
|
12
12
|
/** Open a saved draft (from the "already in Drafts" notice). Absent: the notice has no button. */
|
|
13
13
|
onOpenDraft?: (id: string) => void;
|
|
14
|
+
/** Reopen this form on a newer version of its draft, saved elsewhere (by ARBI, or in another tab). */
|
|
15
|
+
onReload?: (draftId: string) => void;
|
|
14
16
|
/** Reports every edit so the parent can re-seed this form if it remounts (e.g. docked → overlay). */
|
|
15
17
|
onChange?: (value: MailCompose) => void;
|
|
16
18
|
embedded?: boolean;
|
|
@@ -20,6 +22,14 @@ export interface MailComposerFormProps {
|
|
|
20
22
|
offline?: MailOfflineSupport;
|
|
21
23
|
documents?: MailDocumentSource;
|
|
22
24
|
notify: MailNotify;
|
|
25
|
+
/** A native draft's body in the Word editor. Absent: the rich-text body. */
|
|
26
|
+
word?: MailWordEditor;
|
|
27
|
+
/** This compose session, stable across remounts (its Word room is kept for it). */
|
|
28
|
+
sessionKey?: string;
|
|
29
|
+
/** Open this Word room as the body (a new message whose body ARBI wrote) instead of a new one. */
|
|
30
|
+
roomId?: string;
|
|
31
|
+
/** The host's header for this message (a panel's title bar): who ARBI's work is billed to shows there. */
|
|
32
|
+
headerSlot?: HTMLElement | null;
|
|
23
33
|
}
|
|
24
34
|
/** Write, save and send one message. */
|
|
25
|
-
export declare function MailComposerForm({ account, initial, maxBytes, ready, drafts, onClose, onOpenDraft, onChange, embedded, closeRequestRef, localDraftId: initialLocalDraftId, offline, documents, notify, }: MailComposerFormProps): import("react").JSX.Element;
|
|
35
|
+
export declare function MailComposerForm({ account, initial, maxBytes, ready, drafts, onClose, onOpenDraft, onReload, onChange, embedded, closeRequestRef, localDraftId: initialLocalDraftId, offline, documents, notify, word, sessionKey, roomId, headerSlot, }: MailComposerFormProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ConnectedMailbox, type ConnectedMailboxProps } from './ConnectedMailbox';
|
|
2
2
|
export { ConnectedMailComposer, type ConnectedMailComposerProps } from './ConnectedMailComposer';
|
|
3
|
+
export { ConnectedMailMessage, type ConnectedMailMessageProps } from './ConnectedMailMessage';
|
|
3
4
|
export { defaultMailNotify, resolveMailbox } from './mailbox';
|
|
4
5
|
export { ConnectedMailAccounts, type ConnectedMailAccountsProps, type MailAliasUser, } from './ConnectedMailAccounts';
|
|
5
6
|
export { ConnectedMailSetup } from './ConnectedMailSetup';
|
|
6
|
-
export type { MailNotify, MailLocalDraft, MailOutboxEntry, MailOutboxRequest, MailOfflineSupport, MailDocumentSource, MailSaveToWorkspace, MailPanelProps, } from './types';
|
|
7
|
+
export type { MailNotify, MailLocalDraft, MailOutboxEntry, MailOutboxRequest, MailOfflineSupport, MailDocumentSource, MailSaveToWorkspace, MailPanelProps, MailWordEditor, } from './types';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { MailAccount, MailAttachment, MailCompose } from '@arbidocs/react';
|
|
3
3
|
import type { MailAttachableDocument } from '../../collaboration/mail/MailDocumentPicker';
|
|
4
|
+
import type { NativeDocxAdapter } from '../../docx/NativeDocxEditor';
|
|
4
5
|
/** Tell the user how an action went (a toast). Default: `notify` from `@arbidocs/react`. */
|
|
5
6
|
export type MailNotify = (message: string, variant: 'success' | 'info' | 'error', options?: {
|
|
6
7
|
description?: string;
|
|
@@ -83,6 +84,20 @@ export interface MailSaveToWorkspace {
|
|
|
83
84
|
/** Upload the .eml; resolves with the new document's id when known. */
|
|
84
85
|
save(workspaceId: string, file: File): Promise<string | void>;
|
|
85
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* A native draft's body in the Word editor (the compact `NativeDocxEditor`), so it is edited like a
|
|
89
|
+
* document: ARBI's edits arrive as tracked changes to accept or reject before sending. Sessions come
|
|
90
|
+
* from the mail client (`openDraftEditor`); the host supplies the editor's integration.
|
|
91
|
+
*/
|
|
92
|
+
export interface MailWordEditor {
|
|
93
|
+
/** Fonts, the collaboration base URL, notices and token renewal: the host's document adapter. */
|
|
94
|
+
adapter: Pick<NativeDocxAdapter, 'request' | 'loadFonts' | 'baseUrl' | 'notify' | 'subscribeTokenChanges' | 'author'>;
|
|
95
|
+
/**
|
|
96
|
+
* The draft's room opened (its id): the host shows it to the chat as the open document, so ARBI
|
|
97
|
+
* edits it there. Returns what to do when it closes.
|
|
98
|
+
*/
|
|
99
|
+
onRoomOpened?: (roomId: string) => (() => void) | void;
|
|
100
|
+
}
|
|
86
101
|
/** Where the reader and the composer open. */
|
|
87
102
|
export interface MailPanelProps {
|
|
88
103
|
isOpen: boolean;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A composer's body in the Word editor: its draft room (opened, reopened after a reconnect or a
|
|
3
|
+
* remount, shown to the chat while open) and the room's save, send and body calls.
|
|
4
|
+
*
|
|
5
|
+
* The room is the body: it saves itself as it is typed into, ARBI's edits land in it as tracked
|
|
6
|
+
* changes, and the draft's text and HTML are made from it on the server when it is saved or sent.
|
|
7
|
+
*/
|
|
8
|
+
import { type MailClient, type MailCompose, type MailProject } from '@arbidocs/react';
|
|
9
|
+
import type { NativeDocxAdapter } from '../../docx/NativeDocxEditor';
|
|
10
|
+
import type { MailWordEditor } from './types';
|
|
11
|
+
export interface WordBody {
|
|
12
|
+
adapter: NativeDocxAdapter;
|
|
13
|
+
/** The editor's document key: stable for this compose session. */
|
|
14
|
+
documentKey: string;
|
|
15
|
+
stateRef: React.MutableRefObject<(() => string | undefined) | null>;
|
|
16
|
+
/** Opened: saving and sending can go through the room. */
|
|
17
|
+
ready: boolean;
|
|
18
|
+
save(compose: MailCompose): Promise<{
|
|
19
|
+
id: string;
|
|
20
|
+
}>;
|
|
21
|
+
/** Send it (`request_id`: the send's idempotency key, as `/send` takes). */
|
|
22
|
+
send(compose: MailCompose & {
|
|
23
|
+
request_id: string;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
id: string;
|
|
26
|
+
status: string;
|
|
27
|
+
}>;
|
|
28
|
+
/** The body as text and HTML (`final`: refused while suggestions wait). */
|
|
29
|
+
body(final: boolean): Promise<{
|
|
30
|
+
text: string;
|
|
31
|
+
html: string;
|
|
32
|
+
}>;
|
|
33
|
+
/** The project ARBI's work on this email is billed to (known once the room opens). */
|
|
34
|
+
project?: MailProject | null;
|
|
35
|
+
/** Bill another project the person may bill (null: their own). */
|
|
36
|
+
chooseProject(projectExtId: string | null): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export declare function useWordBody({ word, client, initial, sessionKey, roomId: givenRoomId, onBodyChange, }: {
|
|
39
|
+
word: MailWordEditor;
|
|
40
|
+
client: MailClient;
|
|
41
|
+
initial: MailCompose;
|
|
42
|
+
/** This compose session (stable across remounts); absent: one per mount. */
|
|
43
|
+
sessionKey?: string;
|
|
44
|
+
/** An existing room to open as the body (a new message whose body ARBI wrote). */
|
|
45
|
+
roomId?: string;
|
|
46
|
+
/** The person changed the body (it is not in Drafts until saved). */
|
|
47
|
+
onBodyChange: () => void;
|
|
48
|
+
}): WordBody;
|
|
@@ -79,6 +79,14 @@ export interface NativeDocxEditorProps {
|
|
|
79
79
|
busy: boolean;
|
|
80
80
|
error?: string | null;
|
|
81
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* Embedded as a body field (an email draft): a small formatting toolbar instead of the ribbon, no
|
|
84
|
+
* page furniture or save bar (the host saves), and the person types directly; others' edits (ARBI's)
|
|
85
|
+
* still arrive as tracked changes to accept or reject.
|
|
86
|
+
*/
|
|
87
|
+
compact?: boolean;
|
|
88
|
+
/** Receives a reader of the live room's state, so the host's save can include the latest keystrokes. */
|
|
89
|
+
stateRef?: React.MutableRefObject<(() => string | undefined) | null>;
|
|
82
90
|
}
|
|
83
91
|
export declare function DocxParticipants({ session }: {
|
|
84
92
|
session?: DocxCollaborationSession;
|
|
@@ -90,4 +98,4 @@ export declare function DocxRibbon({ onSave, badge, imageGeneration, }: {
|
|
|
90
98
|
/** A short state label at the end of the row, such as "Co-edit mode". */
|
|
91
99
|
badge?: React.ReactNode;
|
|
92
100
|
}): React.JSX.Element;
|
|
93
|
-
export declare function NativeDocxEditor({ documentId, title, draftContent, initialCommentId, snapshot, onSaved, stream, adapter, }: NativeDocxEditorProps): React.JSX.Element;
|
|
101
|
+
export declare function NativeDocxEditor({ documentId, title, draftContent, initialCommentId, snapshot, onSaved, stream, adapter, compact, stateRef, }: NativeDocxEditorProps): React.JSX.Element;
|
package/dist/docx/index.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkFZGMY6NQ_cjs = require('../chunk-FZGMY6NQ.cjs');
|
|
5
|
+
var chunkS24XEVPS_cjs = require('../chunk-S24XEVPS.cjs');
|
|
6
|
+
var chunkBHKFENKT_cjs = require('../chunk-BHKFENKT.cjs');
|
|
6
7
|
require('../chunk-5FYU7ZIU.cjs');
|
|
7
8
|
require('../chunk-2A4MDHJR.cjs');
|
|
8
9
|
require('../chunk-RC25WMVB.cjs');
|
|
@@ -61,7 +62,7 @@ function NativeDocxComparison({
|
|
|
61
62
|
if (!documentId)
|
|
62
63
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "native-docx-error", role: "status", children: "Comparing Word documents\u2026" });
|
|
63
64
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
64
|
-
|
|
65
|
+
chunkBHKFENKT_cjs.NativeDocxEditor,
|
|
65
66
|
{
|
|
66
67
|
adapter,
|
|
67
68
|
documentId,
|
|
@@ -73,179 +74,179 @@ function NativeDocxComparison({
|
|
|
73
74
|
|
|
74
75
|
Object.defineProperty(exports, "StreamedWordArtifact", {
|
|
75
76
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkFZGMY6NQ_cjs.StreamedWordArtifact; }
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "loadDocxFonts", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function () { return chunkS24XEVPS_cjs.loadDocxFonts; }
|
|
77
82
|
});
|
|
78
83
|
Object.defineProperty(exports, "BUILTIN_TEMPLATE_NAME", {
|
|
79
84
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkBHKFENKT_cjs.BUILTIN_TEMPLATE_NAME; }
|
|
81
86
|
});
|
|
82
87
|
Object.defineProperty(exports, "CrossReferenceDialog", {
|
|
83
88
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkBHKFENKT_cjs.CrossReferenceDialog; }
|
|
85
90
|
});
|
|
86
91
|
Object.defineProperty(exports, "CrossReferencesProvider", {
|
|
87
92
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkBHKFENKT_cjs.CrossReferencesProvider; }
|
|
89
94
|
});
|
|
90
95
|
Object.defineProperty(exports, "DEFAULT_CROSS_REFERENCES_LABELS", {
|
|
91
96
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkBHKFENKT_cjs.DEFAULT_CROSS_REFERENCES_LABELS; }
|
|
93
98
|
});
|
|
94
99
|
Object.defineProperty(exports, "DEFAULT_DEFINED_TERMS_LABELS", {
|
|
95
100
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkBHKFENKT_cjs.DEFAULT_DEFINED_TERMS_LABELS; }
|
|
97
102
|
});
|
|
98
103
|
Object.defineProperty(exports, "DEFINED_TERM_TRIGGER", {
|
|
99
104
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkBHKFENKT_cjs.DEFINED_TERM_TRIGGER; }
|
|
101
106
|
});
|
|
102
107
|
Object.defineProperty(exports, "DefinedTermsProvider", {
|
|
103
108
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkBHKFENKT_cjs.DefinedTermsProvider; }
|
|
105
110
|
});
|
|
106
111
|
Object.defineProperty(exports, "DocxAuthorContext", {
|
|
107
112
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunkBHKFENKT_cjs.DocxAuthorContext; }
|
|
109
114
|
});
|
|
110
115
|
Object.defineProperty(exports, "DocxCommentActivity", {
|
|
111
116
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkBHKFENKT_cjs.DocxCommentActivity; }
|
|
113
118
|
});
|
|
114
119
|
Object.defineProperty(exports, "DocxEditorReview", {
|
|
115
120
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkBHKFENKT_cjs.DocxEditorReview; }
|
|
117
122
|
});
|
|
118
123
|
Object.defineProperty(exports, "DocxMentions", {
|
|
119
124
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkBHKFENKT_cjs.DocxMentions; }
|
|
121
126
|
});
|
|
122
127
|
Object.defineProperty(exports, "DocxParticipants", {
|
|
123
128
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkBHKFENKT_cjs.DocxParticipants; }
|
|
125
130
|
});
|
|
126
131
|
Object.defineProperty(exports, "DocxRibbon", {
|
|
127
132
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkBHKFENKT_cjs.DocxRibbon; }
|
|
129
134
|
});
|
|
130
135
|
Object.defineProperty(exports, "GenerateImageButton", {
|
|
131
136
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkBHKFENKT_cjs.GenerateImageButton; }
|
|
133
138
|
});
|
|
134
139
|
Object.defineProperty(exports, "HouseTemplateProvider", {
|
|
135
140
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkBHKFENKT_cjs.HouseTemplateProvider; }
|
|
137
142
|
});
|
|
138
143
|
Object.defineProperty(exports, "LinkHoverCard", {
|
|
139
144
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkBHKFENKT_cjs.LinkHoverCard; }
|
|
141
146
|
});
|
|
142
147
|
Object.defineProperty(exports, "NativeDocxEditor", {
|
|
143
148
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunkBHKFENKT_cjs.NativeDocxEditor; }
|
|
145
150
|
});
|
|
146
151
|
Object.defineProperty(exports, "builtinHouseTemplate", {
|
|
147
152
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkBHKFENKT_cjs.builtinHouseTemplate; }
|
|
149
154
|
});
|
|
150
155
|
Object.defineProperty(exports, "contentPath", {
|
|
151
156
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkBHKFENKT_cjs.contentPath; }
|
|
153
158
|
});
|
|
154
159
|
Object.defineProperty(exports, "editorPort", {
|
|
155
160
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkBHKFENKT_cjs.editorPort; }
|
|
157
162
|
});
|
|
158
163
|
Object.defineProperty(exports, "findDefinitionsSection", {
|
|
159
164
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunkBHKFENKT_cjs.findDefinitionsSection; }
|
|
161
166
|
});
|
|
162
167
|
Object.defineProperty(exports, "insertCrossReference", {
|
|
163
168
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
169
|
+
get: function () { return chunkBHKFENKT_cjs.insertCrossReference; }
|
|
165
170
|
});
|
|
166
171
|
Object.defineProperty(exports, "insertDefinedTerm", {
|
|
167
172
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunkBHKFENKT_cjs.insertDefinedTerm; }
|
|
169
174
|
});
|
|
170
175
|
Object.defineProperty(exports, "insertDocumentReference", {
|
|
171
176
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
177
|
+
get: function () { return chunkBHKFENKT_cjs.insertDocumentReference; }
|
|
173
178
|
});
|
|
174
179
|
Object.defineProperty(exports, "listTargets", {
|
|
175
180
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
177
|
-
});
|
|
178
|
-
Object.defineProperty(exports, "loadDocxFonts", {
|
|
179
|
-
enumerable: true,
|
|
180
|
-
get: function () { return chunkZWWN4CUL_cjs.loadDocxFonts; }
|
|
181
|
+
get: function () { return chunkBHKFENKT_cjs.listTargets; }
|
|
181
182
|
});
|
|
182
183
|
Object.defineProperty(exports, "normalizeDocxExport", {
|
|
183
184
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
185
|
+
get: function () { return chunkBHKFENKT_cjs.normalizeDocxExport; }
|
|
185
186
|
});
|
|
186
187
|
Object.defineProperty(exports, "paragraphNumber", {
|
|
187
188
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
189
|
+
get: function () { return chunkBHKFENKT_cjs.paragraphNumber; }
|
|
189
190
|
});
|
|
190
191
|
Object.defineProperty(exports, "referenceText", {
|
|
191
192
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
193
|
+
get: function () { return chunkBHKFENKT_cjs.referenceText; }
|
|
193
194
|
});
|
|
194
195
|
Object.defineProperty(exports, "referencesPort", {
|
|
195
196
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
197
|
+
get: function () { return chunkBHKFENKT_cjs.referencesPort; }
|
|
197
198
|
});
|
|
198
199
|
Object.defineProperty(exports, "resolveHouseTemplate", {
|
|
199
200
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
201
|
+
get: function () { return chunkBHKFENKT_cjs.resolveHouseTemplate; }
|
|
201
202
|
});
|
|
202
203
|
Object.defineProperty(exports, "reviewModule", {
|
|
203
204
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
205
|
+
get: function () { return chunkBHKFENKT_cjs.reviewModule; }
|
|
205
206
|
});
|
|
206
207
|
Object.defineProperty(exports, "shortTitle", {
|
|
207
208
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
209
|
+
get: function () { return chunkBHKFENKT_cjs.shortTitle; }
|
|
209
210
|
});
|
|
210
211
|
Object.defineProperty(exports, "structuralPort", {
|
|
211
212
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
213
|
+
get: function () { return chunkBHKFENKT_cjs.structuralPort; }
|
|
213
214
|
});
|
|
214
215
|
Object.defineProperty(exports, "templateFileName", {
|
|
215
216
|
enumerable: true,
|
|
216
|
-
get: function () { return
|
|
217
|
+
get: function () { return chunkBHKFENKT_cjs.templateFileName; }
|
|
217
218
|
});
|
|
218
219
|
Object.defineProperty(exports, "trackedOrNoted", {
|
|
219
220
|
enumerable: true,
|
|
220
|
-
get: function () { return
|
|
221
|
+
get: function () { return chunkBHKFENKT_cjs.trackedOrNoted; }
|
|
221
222
|
});
|
|
222
223
|
Object.defineProperty(exports, "useCrossReferences", {
|
|
223
224
|
enumerable: true,
|
|
224
|
-
get: function () { return
|
|
225
|
+
get: function () { return chunkBHKFENKT_cjs.useCrossReferences; }
|
|
225
226
|
});
|
|
226
227
|
Object.defineProperty(exports, "useDefinedTerms", {
|
|
227
228
|
enumerable: true,
|
|
228
|
-
get: function () { return
|
|
229
|
+
get: function () { return chunkBHKFENKT_cjs.useDefinedTerms; }
|
|
229
230
|
});
|
|
230
231
|
Object.defineProperty(exports, "useHouseTemplate", {
|
|
231
232
|
enumerable: true,
|
|
232
|
-
get: function () { return
|
|
233
|
+
get: function () { return chunkBHKFENKT_cjs.useHouseTemplate; }
|
|
233
234
|
});
|
|
234
235
|
Object.defineProperty(exports, "useReview", {
|
|
235
236
|
enumerable: true,
|
|
236
|
-
get: function () { return
|
|
237
|
+
get: function () { return chunkBHKFENKT_cjs.useReview; }
|
|
237
238
|
});
|
|
238
239
|
Object.defineProperty(exports, "useReviewItem", {
|
|
239
240
|
enumerable: true,
|
|
240
|
-
get: function () { return
|
|
241
|
+
get: function () { return chunkBHKFENKT_cjs.useReviewItem; }
|
|
241
242
|
});
|
|
242
243
|
Object.defineProperty(exports, "useTrackedOrNoted", {
|
|
243
244
|
enumerable: true,
|
|
244
|
-
get: function () { return
|
|
245
|
+
get: function () { return chunkBHKFENKT_cjs.useTrackedOrNoted; }
|
|
245
246
|
});
|
|
246
247
|
Object.defineProperty(exports, "withDirectEditing", {
|
|
247
248
|
enumerable: true,
|
|
248
|
-
get: function () { return
|
|
249
|
+
get: function () { return chunkBHKFENKT_cjs.withDirectEditing; }
|
|
249
250
|
});
|
|
250
251
|
Object.defineProperty(exports, "DocxEditor", {
|
|
251
252
|
enumerable: true,
|
package/dist/docx/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/docx/NativeDocxComparison.tsx"],"names":["parseVersionRef","useRef","useState","useEffect","error","jsxs","jsx","NativeDocxEditor"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/docx/NativeDocxComparison.tsx"],"names":["parseVersionRef","useRef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,CAAA,EAAG,QAAA,EAAA,kBAAA,EAAgB;AAAA,KAAA,EAC3E,CAAA;AAEJ,EAAA,IAAI,CAAC,UAAA;AACH,IAAA,sCACG,KAAA,EAAA,EAAI,SAAA,EAAU,mBAAA,EAAoB,IAAA,EAAK,UAAS,QAAA,EAAA,gCAAA,EAEjD,CAAA;AAEJ,EAAA,uBACEA,cAAA;AAAA,IAACC,kCAAA;AAAA,IAAA;AAAA,MAEC,OAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAO,CAAA,EAAG,KAAA,CAAM,OAAA,CAAQ,UAAA,EAAY,EAAE,CAAC,CAAA,eAAA;AAAA,KAAA;AAAA,IAHlC;AAAA,GAIP;AAEJ","file":"index.cjs","sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { parseVersionRef } from '@arbidocs/react/artifacts'\nimport { NativeDocxEditor, type NativeDocxAdapter } from './NativeDocxEditor'\n\nexport interface NativeDocxComparisonProps {\n adapter: NativeDocxAdapter\n baseId: string\n revisedId: string\n title: string\n onCompared?: (documentId: string) => void | Promise<void>\n}\n\n/** A `doc-…@v{n}` side names an older version: the endpoint takes its document and version apart. */\nfunction redlineQuery(baseId: string, revisedId: string): URLSearchParams {\n const base = parseVersionRef(baseId)\n const revised = parseVersionRef(revisedId)\n const query = new URLSearchParams({ base_ext_id: base.docId, revised_ext_id: revised.docId })\n if (base.version) query.set('base_version', String(base.version))\n if (revised.version) query.set('revised_version', String(revised.version))\n return query\n}\n\n/** Word comparison through the host's authenticated transport and LibreOffice service. */\nexport function NativeDocxComparison({\n adapter,\n baseId,\n revisedId,\n title,\n onCompared,\n}: NativeDocxComparisonProps) {\n const host = useRef({ adapter, onCompared })\n host.current = { adapter, onCompared }\n const [documentId, setDocumentId] = useState('')\n const [error, setError] = useState('')\n const [attempt, setAttempt] = useState(0)\n useEffect(() => {\n let cancelled = false\n setDocumentId('')\n setError('')\n void host.current.adapter\n .request(`/redline?${redlineQuery(baseId, revisedId)}`, { method: 'POST' })\n .then((response) => response.json())\n .then((result: { document_ext_id: string }) => {\n if (!result.document_ext_id) throw new Error('Comparison did not return a Word document.')\n if (!cancelled) {\n setDocumentId(result.document_ext_id)\n void Promise.resolve(host.current.onCompared?.(result.document_ext_id)).catch(() => {})\n }\n })\n .catch((error) => {\n if (!cancelled) setError(error instanceof Error ? error.message : String(error))\n })\n return () => {\n cancelled = true\n }\n }, [baseId, revisedId, attempt])\n if (error)\n return (\n <div className=\"native-docx-error\" role=\"alert\">\n <p>{error}</p>\n <button onClick={() => setAttempt((value) => value + 1)}>Retry comparison</button>\n </div>\n )\n if (!documentId)\n return (\n <div className=\"native-docx-error\" role=\"status\">\n Comparing Word documents…\n </div>\n )\n return (\n <NativeDocxEditor\n key={documentId}\n adapter={adapter}\n documentId={documentId}\n title={`${title.replace(/\\.[^.]+$/, '')} (redline).docx`}\n />\n )\n}\n"]}
|
package/dist/docx/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { StreamedWordArtifact } from '../chunk-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export { StreamedWordArtifact } from '../chunk-2PYENCW5.js';
|
|
3
|
+
export { loadDocxFonts } from '../chunk-GYAUJ4KT.js';
|
|
4
|
+
import { NativeDocxEditor } from '../chunk-2SJTXYRM.js';
|
|
5
|
+
export { BUILTIN_TEMPLATE_NAME, CrossReferenceDialog, CrossReferencesProvider, DEFAULT_CROSS_REFERENCES_LABELS, DEFAULT_DEFINED_TERMS_LABELS, DEFINED_TERM_TRIGGER, DefinedTermsProvider, DocxAuthorContext, DocxCommentActivity, DocxEditorReview, DocxMentions, DocxParticipants, DocxRibbon, GenerateImageButton, HouseTemplateProvider, LinkHoverCard, NativeDocxEditor, builtinHouseTemplate, contentPath, editorPort, findDefinitionsSection, insertCrossReference, insertDefinedTerm, insertDocumentReference, listTargets, normalizeDocxExport, paragraphNumber, referenceText, referencesPort, resolveHouseTemplate, reviewModule, shortTitle, structuralPort, templateFileName, trackedOrNoted, useCrossReferences, useDefinedTerms, useHouseTemplate, useReview, useReviewItem, useTrackedOrNoted, withDirectEditing } from '../chunk-2SJTXYRM.js';
|
|
5
6
|
import '../chunk-HFZ45FD3.js';
|
|
6
7
|
import '../chunk-EPHGD4YV.js';
|
|
7
8
|
import '../chunk-AF6RDAJF.js';
|
package/dist/docx/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/docx/NativeDocxComparison.tsx"],"names":["error"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/docx/NativeDocxComparison.tsx"],"names":["error"],"mappings":";;;;;;;;;;;;;;;;AAaA,SAAS,YAAA,CAAa,QAAgB,SAAA,EAAoC;AACxE,EAAA,MAAM,IAAA,GAAO,gBAAgB,MAAM,CAAA;AACnC,EAAA,MAAM,OAAA,GAAU,gBAAgB,SAAS,CAAA;AACzC,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,EAAE,WAAA,EAAa,KAAK,KAAA,EAAO,cAAA,EAAgB,OAAA,CAAQ,KAAA,EAAO,CAAA;AAC5F,EAAA,IAAI,IAAA,CAAK,SAAS,KAAA,CAAM,GAAA,CAAI,gBAAgB,MAAA,CAAO,IAAA,CAAK,OAAO,CAAC,CAAA;AAChE,EAAA,IAAI,OAAA,CAAQ,SAAS,KAAA,CAAM,GAAA,CAAI,mBAAmB,MAAA,CAAO,OAAA,CAAQ,OAAO,CAAC,CAAA;AACzE,EAAA,OAAO,KAAA;AACT;AAGO,SAAS,oBAAA,CAAqB;AAAA,EACnC,OAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,EAA8B;AAC5B,EAAA,MAAM,IAAA,GAAO,MAAA,CAAO,EAAE,OAAA,EAAS,YAAY,CAAA;AAC3C,EAAA,IAAA,CAAK,OAAA,GAAU,EAAE,OAAA,EAAS,UAAA,EAAW;AACrC,EAAA,MAAM,CAAC,UAAA,E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A,EAAW,OAAO,CAAC,CAAA;AAC/B,EAAA,IAAI,KAAA;AACF,IAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,mBAAA,EAAoB,MAAK,OAAA,EACtC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,OAAG,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,sBACV,GAAA,CAAC,QAAA,EAAA,EAAO,OAAA,EAAS,MAAM,UAAA,CAAW,CAAC,KAAA,KAAU,KAAA,GAAQ,CAAC,CAAA,EAAG,QAAA,EAAA,kBAAA,EAAgB;AAAA,KAAA,EAC3E,CAAA;AAEJ,EAAA,IAAI,CAAC,UAAA;AACH,IAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAU,mBAAA,EAAoB,IAAA,EAAK,UAAS,QAAA,EAAA,gCAAA,EAEjD,CAAA;AAEJ,EAAA,uBACE,GAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MAEC,OAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAO,CAAA,EAAG,KAAA,CAAM,OAAA,CAAQ,UAAA,EAAY,EAAE,CAAC,CAAA,eAAA;AAAA,KAAA;AAAA,IAHlC;AAAA,GAIP;AAEJ","file":"index.js","sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { parseVersionRef } from '@arbidocs/react/artifacts'\nimport { NativeDocxEditor, type NativeDocxAdapter } from './NativeDocxEditor'\n\nexport interface NativeDocxComparisonProps {\n adapter: NativeDocxAdapter\n baseId: string\n revisedId: string\n title: string\n onCompared?: (documentId: string) => void | Promise<void>\n}\n\n/** A `doc-…@v{n}` side names an older version: the endpoint takes its document and version apart. */\nfunction redlineQuery(baseId: string, revisedId: string): URLSearchParams {\n const base = parseVersionRef(baseId)\n const revised = parseVersionRef(revisedId)\n const query = new URLSearchParams({ base_ext_id: base.docId, revised_ext_id: revised.docId })\n if (base.version) query.set('base_version', String(base.version))\n if (revised.version) query.set('revised_version', String(revised.version))\n return query\n}\n\n/** Word comparison through the host's authenticated transport and LibreOffice service. */\nexport function NativeDocxComparison({\n adapter,\n baseId,\n revisedId,\n title,\n onCompared,\n}: NativeDocxComparisonProps) {\n const host = useRef({ adapter, onCompared })\n host.current = { adapter, onCompared }\n const [documentId, setDocumentId] = useState('')\n const [error, setError] = useState('')\n const [attempt, setAttempt] = useState(0)\n useEffect(() => {\n let cancelled = false\n setDocumentId('')\n setError('')\n void host.current.adapter\n .request(`/redline?${redlineQuery(baseId, revisedId)}`, { method: 'POST' })\n .then((response) => response.json())\n .then((result: { document_ext_id: string }) => {\n if (!result.document_ext_id) throw new Error('Comparison did not return a Word document.')\n if (!cancelled) {\n setDocumentId(result.document_ext_id)\n void Promise.resolve(host.current.onCompared?.(result.document_ext_id)).catch(() => {})\n }\n })\n .catch((error) => {\n if (!cancelled) setError(error instanceof Error ? error.message : String(error))\n })\n return () => {\n cancelled = true\n }\n }, [baseId, revisedId, attempt])\n if (error)\n return (\n <div className=\"native-docx-error\" role=\"alert\">\n <p>{error}</p>\n <button onClick={() => setAttempt((value) => value + 1)}>Retry comparison</button>\n </div>\n )\n if (!documentId)\n return (\n <div className=\"native-docx-error\" role=\"status\">\n Comparing Word documents…\n </div>\n )\n return (\n <NativeDocxEditor\n key={documentId}\n adapter={adapter}\n documentId={documentId}\n title={`${title.replace(/\\.[^.]+$/, '')} (redline).docx`}\n />\n )\n}\n"]}
|
package/dist/facts/index.cjs
CHANGED
|
@@ -10,11 +10,11 @@ var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
|
|
|
10
10
|
var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
11
11
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
12
12
|
var chunkPPCATBOY_cjs = require('../chunk-PPCATBOY.cjs');
|
|
13
|
-
require('../chunk-C54XEN5T.cjs');
|
|
14
|
-
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
15
13
|
var chunkIXALYQT7_cjs = require('../chunk-IXALYQT7.cjs');
|
|
16
14
|
require('../chunk-FX3K6LNZ.cjs');
|
|
17
15
|
var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
|
|
16
|
+
require('../chunk-C54XEN5T.cjs');
|
|
17
|
+
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
18
18
|
require('../chunk-DES3K4SD.cjs');
|
|
19
19
|
var lucideReact = require('lucide-react');
|
|
20
20
|
var ui = require('@arbidocs/react/ui');
|
package/dist/facts/index.js
CHANGED
|
@@ -10,11 +10,11 @@ import { SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
|
|
|
10
10
|
import { FilterInput } from '../chunk-YU2KUMGE.js';
|
|
11
11
|
export { DEFAULT_FILTER_INPUT_LABELS as DEFAULT_FACTS_FILTER_INPUT_LABELS, DEFAULT_FILTER_FIELDS as FACTS_SEARCH_FIELD_OPTIONS, FilterInput as FactsFilterInput } from '../chunk-YU2KUMGE.js';
|
|
12
12
|
import { observeResize } from '../chunk-NPLYHR2E.js';
|
|
13
|
-
import '../chunk-76JDDMSP.js';
|
|
14
|
-
import { initials } from '../chunk-OXF2IFXG.js';
|
|
15
13
|
import { GridView } from '../chunk-ZPLG7QYF.js';
|
|
16
14
|
import '../chunk-SLSBJRWW.js';
|
|
17
15
|
import { testIdOr } from '../chunk-7F6CBP3Z.js';
|
|
16
|
+
import '../chunk-76JDDMSP.js';
|
|
17
|
+
import { initials } from '../chunk-OXF2IFXG.js';
|
|
18
18
|
import '../chunk-VUNV25KB.js';
|
|
19
19
|
import { PencilLine, Check, MoreVertical, Pencil, Trash2, CalendarDays, X, Columns3, ChevronDown, RotateCcw, Milestone, CalendarClock, Scale, Lightbulb, ArrowRight, Loader2, Info, Paperclip, Tags, MoreHorizontal, FolderUp, BookMarked, Plus, Search, CheckCircle2, CornerDownLeft, Quote, ChevronLeft, ChevronRight, Table2, CalendarRange, GanttChartSquare } from 'lucide-react';
|
|
20
20
|
import { Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, cn, Input, Button, CommandSeparator, Tooltip, TooltipTrigger, TooltipContent } from '@arbidocs/react/ui';
|
package/dist/files/index.cjs
CHANGED
|
@@ -13,13 +13,13 @@ var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
|
13
13
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
14
14
|
var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
|
|
15
15
|
require('../chunk-PPCATBOY.cjs');
|
|
16
|
-
require('../chunk-C54XEN5T.cjs');
|
|
17
|
-
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
18
16
|
var chunkVLCY46K6_cjs = require('../chunk-VLCY46K6.cjs');
|
|
19
17
|
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
20
18
|
var chunkIXALYQT7_cjs = require('../chunk-IXALYQT7.cjs');
|
|
21
19
|
require('../chunk-FX3K6LNZ.cjs');
|
|
22
20
|
var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
|
|
21
|
+
require('../chunk-C54XEN5T.cjs');
|
|
22
|
+
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
23
23
|
require('../chunk-DES3K4SD.cjs');
|
|
24
24
|
var classVarianceAuthority = require('class-variance-authority');
|
|
25
25
|
var ui = require('@arbidocs/react/ui');
|
package/dist/files/index.js
CHANGED
|
@@ -13,14 +13,14 @@ export { DEFAULT_SELECTION_BAR_LABELS, SelectionBar, SelectionBarAction } from '
|
|
|
13
13
|
import { FilterInput } from '../chunk-YU2KUMGE.js';
|
|
14
14
|
import { ActionLink } from '../chunk-S7PSMMRG.js';
|
|
15
15
|
import '../chunk-NPLYHR2E.js';
|
|
16
|
-
import '../chunk-76JDDMSP.js';
|
|
17
|
-
import { formatCount } from '../chunk-OXF2IFXG.js';
|
|
18
16
|
import { ShareControl } from '../chunk-K4BGOPGG.js';
|
|
19
17
|
import { ModalSection, ModalSectionTitle, ModalHeader } from '../chunk-TX2ZICS7.js';
|
|
20
18
|
import { GridView } from '../chunk-ZPLG7QYF.js';
|
|
21
19
|
export { GridView } from '../chunk-ZPLG7QYF.js';
|
|
22
20
|
import '../chunk-SLSBJRWW.js';
|
|
23
21
|
import { testIdOr } from '../chunk-7F6CBP3Z.js';
|
|
22
|
+
import '../chunk-76JDDMSP.js';
|
|
23
|
+
import { formatCount } from '../chunk-OXF2IFXG.js';
|
|
24
24
|
import '../chunk-VUNV25KB.js';
|
|
25
25
|
import { cva } from 'class-variance-authority';
|
|
26
26
|
import { cn, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, Tooltip, TooltipTrigger, TooltipContent, Button, Progress, Badge, RadioGroup, RadioGroupItem, Label, ScrollArea, Checkbox, Dialog, DialogContent, DialogTitle, DialogDescription, TooltipProvider, IconToggle, Textarea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem, DialogTrigger, Input, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, DialogHeader, CommandSeparator, getTagTypeIcon, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, Switch } from '@arbidocs/react/ui';
|