@arbidocs/react 0.5.6 → 0.5.7
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/{chunk-QVGAUQSD.js → chunk-OILCKGGB.js} +29 -61
- package/dist/chunk-OILCKGGB.js.map +1 -0
- package/dist/{chunk-TYZFRV7P.cjs → chunk-QYUL4GQC.cjs} +33 -67
- package/dist/chunk-QYUL4GQC.cjs.map +1 -0
- package/dist/index.cjs +177 -71
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-C_Fa1zTU.d.cts → index.d-CMhTWoA-.d.cts} +32 -30
- package/dist/{index.d-C_Fa1zTU.d.ts → index.d-CMhTWoA-.d.ts} +32 -30
- package/dist/index.d.cts +140 -61
- package/dist/index.d.ts +140 -61
- package/dist/index.js +123 -15
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +40 -48
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-QVGAUQSD.js.map +0 -1
- package/dist/chunk-TYZFRV7P.cjs.map +0 -1
|
@@ -220,37 +220,39 @@ declare function takeDocumentForTurn(input: TurnDocumentInput): string | null;
|
|
|
220
220
|
* beside the chat binds nothing: a new chat (the ask bar, the new-chat button, the thread
|
|
221
221
|
* launcher, home) starts unbound, so a question there never becomes an edit of whatever is open.
|
|
222
222
|
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
223
|
+
* The binding is the server's: the conversation's `bound_document_ext_id`, set by the first turn
|
|
224
|
+
* (`bound_document_ext_id` on the turn that starts it) or by a PATCH, and read under each reader's
|
|
225
|
+
* access (`bound_document_unavailable`: bound to a document this reader cannot open). It follows
|
|
226
|
+
* the person to every device, and a shared thread's members all see it. The query cache holds it
|
|
227
|
+
* (`./thread-binding`); a new chat's binding is the session's `newChatDocumentId` until its first
|
|
228
|
+
* turn creates the conversation.
|
|
229
|
+
*
|
|
230
|
+
* This module is the light half (no query client, no SDK), so the shell entry can carry it.
|
|
226
231
|
*/
|
|
227
|
-
/** What
|
|
228
|
-
interface
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
setNewChatDocumentId(documentId: string | null): void;
|
|
232
|
+
/** What a conversation row says about its binding. */
|
|
233
|
+
interface ThreadBindingRow {
|
|
234
|
+
external_id: string;
|
|
235
|
+
bound_document_ext_id?: string | null;
|
|
236
|
+
bound_document_unavailable?: boolean | null;
|
|
237
|
+
updated_at?: string | null;
|
|
234
238
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
*/
|
|
249
|
-
declare function
|
|
250
|
-
/**
|
|
251
|
-
declare function
|
|
252
|
-
/** Test seam: read the stored bindings again, as a reload does. */
|
|
253
|
-
declare function reloadThreadDocumentsForTests(): void;
|
|
239
|
+
/** A conversation's binding as this reader sees it. */
|
|
240
|
+
interface ThreadBinding {
|
|
241
|
+
/** The bound document, or null (unbound, or bound to one this reader cannot open). */
|
|
242
|
+
documentId: string | null;
|
|
243
|
+
/** Bound to a document this reader cannot open (another member's private document, or deleted). */
|
|
244
|
+
unavailable: boolean;
|
|
245
|
+
}
|
|
246
|
+
declare const UNBOUND: ThreadBinding;
|
|
247
|
+
/** A row's binding. */
|
|
248
|
+
declare function bindingOfRow(row: ThreadBindingRow | null | undefined): ThreadBinding;
|
|
249
|
+
/** The most recently active conversation bound to a document, among `conversations`, or null. */
|
|
250
|
+
declare function latestThreadOfDocument(conversations: readonly ThreadBindingRow[] | null | undefined, documentId: string): string | null;
|
|
251
|
+
declare const LEGACY_THREAD_DOCUMENTS_KEY = "arbi-thread-documents";
|
|
252
|
+
/** The bindings this browser kept locally (conversation id → document id); empty when none. */
|
|
253
|
+
declare function readLegacyThreadDocuments(): Record<string, string>;
|
|
254
|
+
/** Forget locally kept bindings (moved to the server); the key goes with the last of them. */
|
|
255
|
+
declare function forgetLegacyThreadDocuments(conversationIds: readonly string[]): void;
|
|
254
256
|
|
|
255
257
|
/**
|
|
256
258
|
* A search's state outside any component: the query last searched, its passages, and whether it
|
|
@@ -452,4 +454,4 @@ declare function NotificationBell({ renderTrigger, onNavigate, onSelectNotificat
|
|
|
452
454
|
|
|
453
455
|
declare function Toaster({ toastOptions, ...props }: ToasterProps): React$1.JSX.Element;
|
|
454
456
|
|
|
455
|
-
export { toMessageMentions as $, type AppNotification as A,
|
|
457
|
+
export { toMessageMentions as $, type AppNotification as A, hasMessageBody as B, insertMention as C, DEFAULT_NOTIFY_TONE as D, latestThreadOfDocument as E, linkMentions as F, mentionFromHref as G, type HostConfigRecord as H, notify as I, openDocumentId as J, persistNotifyHistory as K, LEGACY_THREAD_DOCUMENTS_KEY as L, MAX_SESSION_NOTIFICATIONS as M, NotificationBell as N, type OpenDocumentRegistration as O, persistSearchSession as P, readLegacyThreadDocuments as Q, requestSearch as R, type SavedDocumentInput as S, type ThreadBinding as T, UNBOUND as U, savedDocumentIdFor as V, seedNotifications as W, selectUnread as X, sharedSearchSession as Y, takeDocumentForTurn as Z, takePendingSearch as _, ArbiHost as a, useHostConfigRecord as a0, useNotify as a1, useOpenDocumentId as a2, useRegisterOpenDocument as a3, useTurnDocumentId as a4, type ArbiHostConnection as b, type ArbiHostProps as c, MENTION_HREF_PREFIX as d, type MentionCandidate as e, type MentionKind as f, type MessageMentionRef as g, type NotificationBellProps as h, type NotificationBellTriggerState as i, type NotifyConfig as j, type NotifyOptions as k, type NotifyVariant as l, type SearchSession as m, type SearchSessionState as n, type SearchStatus as o, type ThreadBindingRow as p, Toaster as q, type TurnDocumentInput as r, bindingOfRow as s, clearSearchSession as t, configureNotify as u, createSearchSession as v, extractMentions as w, filterMentionCandidates as x, findMentionQuery as y, forgetLegacyThreadDocuments as z };
|
|
@@ -220,37 +220,39 @@ declare function takeDocumentForTurn(input: TurnDocumentInput): string | null;
|
|
|
220
220
|
* beside the chat binds nothing: a new chat (the ask bar, the new-chat button, the thread
|
|
221
221
|
* launcher, home) starts unbound, so a question there never becomes an edit of whatever is open.
|
|
222
222
|
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
223
|
+
* The binding is the server's: the conversation's `bound_document_ext_id`, set by the first turn
|
|
224
|
+
* (`bound_document_ext_id` on the turn that starts it) or by a PATCH, and read under each reader's
|
|
225
|
+
* access (`bound_document_unavailable`: bound to a document this reader cannot open). It follows
|
|
226
|
+
* the person to every device, and a shared thread's members all see it. The query cache holds it
|
|
227
|
+
* (`./thread-binding`); a new chat's binding is the session's `newChatDocumentId` until its first
|
|
228
|
+
* turn creates the conversation.
|
|
229
|
+
*
|
|
230
|
+
* This module is the light half (no query client, no SDK), so the shell entry can carry it.
|
|
226
231
|
*/
|
|
227
|
-
/** What
|
|
228
|
-
interface
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
setNewChatDocumentId(documentId: string | null): void;
|
|
232
|
+
/** What a conversation row says about its binding. */
|
|
233
|
+
interface ThreadBindingRow {
|
|
234
|
+
external_id: string;
|
|
235
|
+
bound_document_ext_id?: string | null;
|
|
236
|
+
bound_document_unavailable?: boolean | null;
|
|
237
|
+
updated_at?: string | null;
|
|
234
238
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
*/
|
|
249
|
-
declare function
|
|
250
|
-
/**
|
|
251
|
-
declare function
|
|
252
|
-
/** Test seam: read the stored bindings again, as a reload does. */
|
|
253
|
-
declare function reloadThreadDocumentsForTests(): void;
|
|
239
|
+
/** A conversation's binding as this reader sees it. */
|
|
240
|
+
interface ThreadBinding {
|
|
241
|
+
/** The bound document, or null (unbound, or bound to one this reader cannot open). */
|
|
242
|
+
documentId: string | null;
|
|
243
|
+
/** Bound to a document this reader cannot open (another member's private document, or deleted). */
|
|
244
|
+
unavailable: boolean;
|
|
245
|
+
}
|
|
246
|
+
declare const UNBOUND: ThreadBinding;
|
|
247
|
+
/** A row's binding. */
|
|
248
|
+
declare function bindingOfRow(row: ThreadBindingRow | null | undefined): ThreadBinding;
|
|
249
|
+
/** The most recently active conversation bound to a document, among `conversations`, or null. */
|
|
250
|
+
declare function latestThreadOfDocument(conversations: readonly ThreadBindingRow[] | null | undefined, documentId: string): string | null;
|
|
251
|
+
declare const LEGACY_THREAD_DOCUMENTS_KEY = "arbi-thread-documents";
|
|
252
|
+
/** The bindings this browser kept locally (conversation id → document id); empty when none. */
|
|
253
|
+
declare function readLegacyThreadDocuments(): Record<string, string>;
|
|
254
|
+
/** Forget locally kept bindings (moved to the server); the key goes with the last of them. */
|
|
255
|
+
declare function forgetLegacyThreadDocuments(conversationIds: readonly string[]): void;
|
|
254
256
|
|
|
255
257
|
/**
|
|
256
258
|
* A search's state outside any component: the query last searched, its passages, and whether it
|
|
@@ -452,4 +454,4 @@ declare function NotificationBell({ renderTrigger, onNavigate, onSelectNotificat
|
|
|
452
454
|
|
|
453
455
|
declare function Toaster({ toastOptions, ...props }: ToasterProps): React$1.JSX.Element;
|
|
454
456
|
|
|
455
|
-
export { toMessageMentions as $, type AppNotification as A,
|
|
457
|
+
export { toMessageMentions as $, type AppNotification as A, hasMessageBody as B, insertMention as C, DEFAULT_NOTIFY_TONE as D, latestThreadOfDocument as E, linkMentions as F, mentionFromHref as G, type HostConfigRecord as H, notify as I, openDocumentId as J, persistNotifyHistory as K, LEGACY_THREAD_DOCUMENTS_KEY as L, MAX_SESSION_NOTIFICATIONS as M, NotificationBell as N, type OpenDocumentRegistration as O, persistSearchSession as P, readLegacyThreadDocuments as Q, requestSearch as R, type SavedDocumentInput as S, type ThreadBinding as T, UNBOUND as U, savedDocumentIdFor as V, seedNotifications as W, selectUnread as X, sharedSearchSession as Y, takeDocumentForTurn as Z, takePendingSearch as _, ArbiHost as a, useHostConfigRecord as a0, useNotify as a1, useOpenDocumentId as a2, useRegisterOpenDocument as a3, useTurnDocumentId as a4, type ArbiHostConnection as b, type ArbiHostProps as c, MENTION_HREF_PREFIX as d, type MentionCandidate as e, type MentionKind as f, type MessageMentionRef as g, type NotificationBellProps as h, type NotificationBellTriggerState as i, type NotifyConfig as j, type NotifyOptions as k, type NotifyVariant as l, type SearchSession as m, type SearchSessionState as n, type SearchStatus as o, type ThreadBindingRow as p, Toaster as q, type TurnDocumentInput as r, bindingOfRow as s, clearSearchSession as t, configureNotify as u, createSearchSession as v, extractMentions as w, filterMentionCandidates as x, findMentionQuery as y, forgetLegacyThreadDocuments as z };
|