@nivaro/react 0.3.136 → 0.3.138
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +95 -4
- package/dist/index.js +748 -743
- package/dist/shared/components/CollectionBrowserView.js +392 -389
- package/dist/shared/components/DelegateCoverLine.js +80 -87
- package/dist/shared/components/ItemEditForm.js +589 -588
- package/dist/shared/components/MyWorkView.js +284 -286
- package/dist/shared/components/NotificationBell.js +251 -205
- package/dist/shared/components/ai/AiAnalyticsView.js +878 -417
- package/dist/shared/components/ai/AiPlanCard.js +164 -122
- package/dist/shared/components/ai/AiPlanUndo.js +291 -0
- package/dist/shared/components/ai/call-log/CallDrawer.js +357 -0
- package/dist/shared/components/ai/call-log/RawJson.js +126 -0
- package/dist/shared/components/ai/call-log/ThreadView.js +223 -0
- package/dist/shared/components/ai/call-log/TranscriptView.js +227 -0
- package/dist/shared/components/ai/call-log/controls.js +364 -0
- package/dist/shared/components/ai/call-log/format.js +46 -0
- package/dist/shared/components/ai/call-log/url.js +105 -0
- package/dist/shared/components/chat/ChatPanel.js +86 -86
- package/dist/shared/components/chat/chat-core.js +422 -346
- package/dist/shared/components/integrations/IntegrationObligationsView.js +98 -98
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +102 -93
- package/dist/shared/components/integrations/console/api.js +11 -1
- package/dist/shared/components/item-edit/HeaderRollupExplainer.js +5 -1
- package/dist/shared/components/item-edit/RecordLiveSync.js +241 -229
- package/dist/shared/components/item-edit/RecordRecapChanges.js +166 -0
- package/dist/shared/components/item-edit/RecordRecapStrip.js +254 -84
- package/dist/shared/components/item-edit/live-related.js +34 -18
- package/dist/shared/components/panels/RevisionsPanel.js +735 -683
- package/dist/shared/components/queue/QueueWorklist.js +323 -316
- package/dist/shared/components/support/SupportRequestDialog.js +198 -181
- package/dist/shared/components/trackers/use-tracker-link.js +74 -65
- package/dist/shared/lib/config-update-refresh.js +34 -0
- package/dist/shared/lib/config-watch.js +17 -17
- package/dist/shared/lib/gap-refresh.js +49 -0
- package/dist/shared/lib/integration-dots.js +8 -8
- package/dist/shared/lib/live-ops.js +26 -23
- package/dist/shared/lib/live-pickers.js +1 -1
- package/dist/shared/lib/live-queries.js +223 -195
- package/dist/shared/lib/live.js +56 -51
- package/dist/shared/lib/obligation-banner.js +11 -10
- package/dist/shared/lib/obligation-filters.js +22 -18
- package/dist/shared/lib/obligation-reason-text.js +18 -8
- package/dist/shared/lib/presence-hooks.js +133 -132
- package/dist/shared/lib/reconnect-resync.js +90 -0
- package/dist/shared/lib/record-room-holds.js +43 -0
- package/dist/shared/lib/socket-realtime.js +116 -105
- package/dist/shared/lib/user-sync.js +1 -6
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import { noteReplayIdle as Me, createReplayIdleState as Ne, REPLAY_IDLE_RESTART_
|
|
|
10
10
|
import { noteReplayEvent as Ue, createReplayCheckoutState as We } from "../shared/lib/replay-checkout.js";
|
|
11
11
|
import { instrumentConsole as He, instrumentRequests as Ke, redactSecrets as $e } from "../shared/lib/replay-context.js";
|
|
12
12
|
import { instrumentSocket as Be } from "../shared/lib/replay-socket.js";
|
|
13
|
-
const ze = "nivaro-react@0.3.
|
|
13
|
+
const ze = "nivaro-react@0.3.138", V = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, X = () => typeof navigator > "u" || navigator.onLine !== !1;
|
|
14
14
|
function Je(o) {
|
|
15
15
|
return typeof o.url != "string" || typeof fetch != "function" ? null : (f, u) => {
|
|
16
16
|
const l = typeof o.getToken == "function" ? o.getToken() : void 0, d = { "Content-Type": "application/json" };
|
package/dist/index.d.ts
CHANGED
|
@@ -421,7 +421,13 @@ export declare function agentSentence(a: RecordAgent, meId?: string | null, shor
|
|
|
421
421
|
|
|
422
422
|
export declare function agingBucket(hours: number | null): string;
|
|
423
423
|
|
|
424
|
-
export declare function AiAnalyticsView(
|
|
424
|
+
export declare function AiAnalyticsView({ search, onSearchChange }?: {
|
|
425
|
+
/** The host's URL query; pass it with `onSearchChange` so filters and open calls are links. */
|
|
426
|
+
search?: URLSearchParams;
|
|
427
|
+
onSearchChange?: (next: URLSearchParams, opts: {
|
|
428
|
+
replace?: boolean;
|
|
429
|
+
}) => void;
|
|
430
|
+
}): JSX.Element;
|
|
425
431
|
|
|
426
432
|
/**
|
|
427
433
|
* Thumbs up / down on one assistant answer, keyed by the chat request id the
|
|
@@ -494,9 +500,14 @@ export declare interface AiPlan {
|
|
|
494
500
|
} | null;
|
|
495
501
|
flow_id?: string | null;
|
|
496
502
|
made_steps?: string[];
|
|
503
|
+
/** Proposed by an administrator on their own session: no record limit. */
|
|
504
|
+
admin_unbounded?: boolean;
|
|
505
|
+
/** The reader may undo it (GET /ai/plans/:id). */
|
|
506
|
+
can_undo?: boolean;
|
|
507
|
+
undo_run?: AiUndoRun | null;
|
|
497
508
|
}
|
|
498
509
|
|
|
499
|
-
export declare function AiPlanCard({ plan: initial, subscribe, className, beforeSteps, stepExtra, extraActions, runDisabled, onPlan, quiet, stepChanges }: {
|
|
510
|
+
export declare function AiPlanCard({ plan: initial, subscribe, className, beforeSteps, stepExtra, extraActions, runDisabled, onPlan, quiet, stepChanges, hideUndo }: {
|
|
500
511
|
plan: AiPlan;
|
|
501
512
|
/** The host's socket — `ai:plan` events for this person. Optional: the
|
|
502
513
|
* card polls while a plan runs either way. */
|
|
@@ -516,6 +527,8 @@ export declare function AiPlanCard({ plan: initial, subscribe, className, before
|
|
|
516
527
|
quiet?: boolean;
|
|
517
528
|
/** Replaces a step's "field → value" lines (a host that knows the old values). */
|
|
518
529
|
stepChanges?: (step: AiPlanStep) => React_2.ReactNode | undefined;
|
|
530
|
+
/** The host shows its own undo panel (AI plans page). */
|
|
531
|
+
hideUndo?: boolean;
|
|
519
532
|
}): React_2.JSX.Element;
|
|
520
533
|
|
|
521
534
|
declare interface AiPlanImpact {
|
|
@@ -580,6 +593,11 @@ declare interface AiPlanStepState {
|
|
|
580
593
|
reason: string;
|
|
581
594
|
}>;
|
|
582
595
|
attempts: number;
|
|
596
|
+
/** A long step's progress, pushed as it runs. */
|
|
597
|
+
progress?: {
|
|
598
|
+
done: number;
|
|
599
|
+
total: number;
|
|
600
|
+
} | null;
|
|
583
601
|
}
|
|
584
602
|
|
|
585
603
|
export declare type AiPlanSubscribe = (event: 'ai:plan', handler: (payload: Record<string, unknown>) => void) => () => void;
|
|
@@ -603,6 +621,19 @@ export declare function AiReviewCard({ templateId }: {
|
|
|
603
621
|
*/
|
|
604
622
|
declare type AiStreamSubscribe = (event: 'ai:delta' | 'ai:status' | 'ai:done' | 'ai:error', handler: (payload: Record<string, unknown>) => void) => () => void;
|
|
605
623
|
|
|
624
|
+
declare interface AiUndoRun {
|
|
625
|
+
status: 'running' | 'done' | 'failed';
|
|
626
|
+
started_at: string;
|
|
627
|
+
finished_at?: string | null;
|
|
628
|
+
overwrite: boolean;
|
|
629
|
+
total: number;
|
|
630
|
+
done: number;
|
|
631
|
+
undone: number;
|
|
632
|
+
skipped: number;
|
|
633
|
+
failed: number;
|
|
634
|
+
errors: string[];
|
|
635
|
+
}
|
|
636
|
+
|
|
606
637
|
/**
|
|
607
638
|
* Threshold banners (realtime round 9, item 20): "Project US201979 just crossed 90%".
|
|
608
639
|
*
|
|
@@ -1136,6 +1167,8 @@ export declare interface BannerLine {
|
|
|
1136
1167
|
can_resend?: boolean;
|
|
1137
1168
|
/** "Send current data" can rebuild the request from the record as it is now. */
|
|
1138
1169
|
can_send_current?: boolean;
|
|
1170
|
+
/** The partner's own send rule left the record out: nothing is owed (neutral line). */
|
|
1171
|
+
not_needed?: boolean;
|
|
1139
1172
|
}
|
|
1140
1173
|
|
|
1141
1174
|
/** Newest obligation per partner, in the words the record's reader needs:
|
|
@@ -3510,6 +3543,7 @@ export declare function DoNotDisturbRow(): JSX.Element;
|
|
|
3510
3543
|
export declare function dotsForRecord(rows: Array<{
|
|
3511
3544
|
api: string;
|
|
3512
3545
|
outcome: string;
|
|
3546
|
+
not_needed?: boolean;
|
|
3513
3547
|
}>): Array<{
|
|
3514
3548
|
api: string;
|
|
3515
3549
|
tone: 'positive' | 'warning' | 'danger' | 'neutral';
|
|
@@ -6076,6 +6110,7 @@ export declare interface IntegrationDotsProps {
|
|
|
6076
6110
|
rows: Array<{
|
|
6077
6111
|
api: string;
|
|
6078
6112
|
outcome: string;
|
|
6113
|
+
not_needed?: boolean;
|
|
6079
6114
|
}> | undefined;
|
|
6080
6115
|
className?: string;
|
|
6081
6116
|
}
|
|
@@ -7312,6 +7347,14 @@ export declare const LIVE_MODE_LABELS: Record<LiveMode, string>;
|
|
|
7312
7347
|
*/
|
|
7313
7348
|
export declare const LIVE_RECONCILE_HEADS: readonly string[];
|
|
7314
7349
|
|
|
7350
|
+
/**
|
|
7351
|
+
* Query-key heads that follow notices the server never journals (`notification:new`,
|
|
7352
|
+
* `read:changed`, `owners:changed`, `chat:message`, `ops:changed`): after ANY reconnect, or a
|
|
7353
|
+
* wake from sleep, the bridge re-reads the active ones once (lib/reconnect-resync.ts) — even
|
|
7354
|
+
* when the catch-up replayed every collection event. Hosts add their own with `resyncHeads`.
|
|
7355
|
+
*/
|
|
7356
|
+
export declare const LIVE_RESYNC_HEADS: readonly string[];
|
|
7357
|
+
|
|
7315
7358
|
/**
|
|
7316
7359
|
* The one polite live region of an app shell: screen-reader users hear that something on
|
|
7317
7360
|
* the page changed ("2 rows updated", "Status changed"), at most once every ~5 seconds, never
|
|
@@ -7518,6 +7561,10 @@ export declare interface LiveQueryBridge {
|
|
|
7518
7561
|
}
|
|
7519
7562
|
|
|
7520
7563
|
export declare interface LiveQueryBridgeOptions {
|
|
7564
|
+
/** Extra query-key heads to re-read after a reconnect or wake (see LIVE_RESYNC_HEADS). */
|
|
7565
|
+
resyncHeads?: readonly string[];
|
|
7566
|
+
/** Test seam: the resync source (default: the adapter's shared detector). */
|
|
7567
|
+
onResync?: ((cb: (reason: ResyncReason) => void) => () => void) | null;
|
|
7521
7568
|
/** Burst window per collection (default 300 ms). */
|
|
7522
7569
|
windowMs?: number;
|
|
7523
7570
|
/** Default `minGapMs` for `reads` queries (default 10 s). */
|
|
@@ -8637,6 +8684,9 @@ export declare function onIdleChange(fn: (idle: boolean) => void): () => void;
|
|
|
8637
8684
|
/** Called with true when this tab goes away (hidden / idle), false when it is back. */
|
|
8638
8685
|
export declare function onRecordTabAway(fn: (away: boolean) => void): () => void;
|
|
8639
8686
|
|
|
8687
|
+
/** Listen for the adapter's resync bursts. Returns unsubscribe. */
|
|
8688
|
+
export declare function onResync(realtime: RealtimeAdapter, cb: (reason: ResyncReason) => void): () => void;
|
|
8689
|
+
|
|
8640
8690
|
/** Called once each time the tab goes from signed out to signed in. Returns the unsubscribe. */
|
|
8641
8691
|
export declare function onSignedIn(cb: () => void): () => void;
|
|
8642
8692
|
|
|
@@ -10761,15 +10811,21 @@ declare function RecordReadViewBody({ collection, itemId: itemIdProp, layoutData
|
|
|
10761
10811
|
* server baseline to now — a reload inside the session grace stays quiet, and
|
|
10762
10812
|
* only changes made after the dismissal come back as news.
|
|
10763
10813
|
*
|
|
10814
|
+
* The strip's text opens a popover beside it listing each changed field — before → after, who
|
|
10815
|
+
* and when (2026-11-18; it was a hover tooltip naming the fields). "Mark as seen" there is the
|
|
10816
|
+
* same dismiss.
|
|
10817
|
+
*
|
|
10764
10818
|
* Opened from an email (realtime round 3 #2): the link carries the send time
|
|
10765
10819
|
* (`?since=`), and the strip instead says quietly what happened since that
|
|
10766
10820
|
* email — "Since this email: moved to Approved · 2 fields changed" — judged by
|
|
10767
10821
|
* the server as the viewer (only fields they may read). Dismissing it drops
|
|
10768
10822
|
* `since` from the address.
|
|
10769
10823
|
*/
|
|
10770
|
-
export declare function RecordRecapStrip({ collection, itemId }: {
|
|
10824
|
+
export declare function RecordRecapStrip({ collection, itemId, historyAvailable }: {
|
|
10771
10825
|
collection: string;
|
|
10772
10826
|
itemId: string;
|
|
10827
|
+
/** The record page shows its revision history: the popover may open it ("See full history"). */
|
|
10828
|
+
historyAvailable?: boolean;
|
|
10773
10829
|
}): JSX.Element | null;
|
|
10774
10830
|
|
|
10775
10831
|
/**
|
|
@@ -11288,6 +11344,29 @@ export declare function restoreMetadata(qc: MetadataQueryClient, id: MetadataIde
|
|
|
11288
11344
|
*/
|
|
11289
11345
|
export declare function restoreTrailScroll(root: Element, scroll: TrailScroll[], timeoutMs?: number): () => void;
|
|
11290
11346
|
|
|
11347
|
+
/**
|
|
11348
|
+
* Re-read what a reconnect could not replay (realtime fixes 2026-11-19, area B).
|
|
11349
|
+
*
|
|
11350
|
+
* Only `collection:update` (and the related-record announce) is journaled, so only those come
|
|
11351
|
+
* back in a reconnect's catch-up. Person-room notices (`notification:new`, `read:changed`),
|
|
11352
|
+
* ops pokes (`ops:changed` — My Work, Support, Approvals, Tasks, Issues…), `owners:changed`
|
|
11353
|
+
* and `chat:message` are sent once and are gone for a socket that was down. So after EVERY
|
|
11354
|
+
* reconnect — whatever `resumed` says — and after the machine wakes from sleep, each surface
|
|
11355
|
+
* that follows those notices re-reads once through its own route:
|
|
11356
|
+
*
|
|
11357
|
+
* - one burst per adapter: triggers inside the cooldown fold into one;
|
|
11358
|
+
* - a random delay (default up to 4 s) spreads a deploy's thousand reconnects;
|
|
11359
|
+
* - a hidden tab owes the burst and runs it when it is shown again;
|
|
11360
|
+
* - the person's "Live updates: Off" setting skips it (their ↻ is the refresh).
|
|
11361
|
+
*
|
|
11362
|
+
* `useLiveOps` pokes every held topic once, and the live-query bridge re-reads the active
|
|
11363
|
+
* queries named in `LIVE_RESYNC_HEADS` (bell, chat, owners, My Work). A host listens with
|
|
11364
|
+
* `onResync(adapter, cb)` / `useResync(cb)`, or the window event `nvr:resync`.
|
|
11365
|
+
*/
|
|
11366
|
+
export declare const RESYNC_WINDOW_EVENT = "nvr:resync";
|
|
11367
|
+
|
|
11368
|
+
declare type ResyncReason = 'reconnect' | 'wake';
|
|
11369
|
+
|
|
11291
11370
|
/** A request to bring `target` into view; `seq` changes on every request. */
|
|
11292
11371
|
declare interface RevealSignal {
|
|
11293
11372
|
target: DesignTarget;
|
|
@@ -11430,7 +11509,7 @@ declare interface ReviewListWidgetProps {
|
|
|
11430
11509
|
emptyLabel?: string;
|
|
11431
11510
|
}
|
|
11432
11511
|
|
|
11433
|
-
export declare function RevisionsPanel({ collection, item, onRollback, triggerClassName, inlineTableFields, open, onOpenChange, compact }: {
|
|
11512
|
+
export declare function RevisionsPanel({ collection, item, onRollback, triggerClassName, inlineTableFields, open, onOpenChange, compact, since, onCloseAutoFocus }: {
|
|
11434
11513
|
collection: string;
|
|
11435
11514
|
item: string;
|
|
11436
11515
|
onRollback?: () => void;
|
|
@@ -11442,6 +11521,11 @@ export declare function RevisionsPanel({ collection, item, onRollback, triggerCl
|
|
|
11442
11521
|
* e.g. from a row Actions menu. */
|
|
11443
11522
|
open?: boolean;
|
|
11444
11523
|
onOpenChange?: (open: boolean) => void;
|
|
11524
|
+
/** Open on the saves after this moment (the recap strip's "See full history"): the timeline
|
|
11525
|
+
* shows only those, with a "Show all" to lift it. Not a saved choice. */
|
|
11526
|
+
since?: string | null;
|
|
11527
|
+
/** Where focus goes when the sheet closes (a caller whose trigger is gone by then). */
|
|
11528
|
+
onCloseAutoFocus?: (e: Event) => void;
|
|
11445
11529
|
}): JSX.Element;
|
|
11446
11530
|
|
|
11447
11531
|
declare interface RoleMark {
|
|
@@ -11506,6 +11590,8 @@ declare interface Row {
|
|
|
11506
11590
|
transition_label?: string | null;
|
|
11507
11591
|
can_resend?: boolean;
|
|
11508
11592
|
can_send_current?: boolean;
|
|
11593
|
+
/** The server's verdict: the partner's own send rule left this record out, nothing is owed. */
|
|
11594
|
+
not_needed?: boolean;
|
|
11509
11595
|
}
|
|
11510
11596
|
|
|
11511
11597
|
export declare const ROW_HIGHLIGHT_TINTS: Record<string, {
|
|
@@ -14447,6 +14533,11 @@ export declare function useResolvedFindings(opts: ResolvedFindingsOptions): {
|
|
|
14447
14533
|
resolved: ReadonlyMap<string, ResolvedMark>;
|
|
14448
14534
|
};
|
|
14449
14535
|
|
|
14536
|
+
/** React form of `onResync`; `cb` may change between renders. */
|
|
14537
|
+
export declare function useResync(cb: (reason: ResyncReason) => void, opts?: {
|
|
14538
|
+
enabled?: boolean;
|
|
14539
|
+
}): void;
|
|
14540
|
+
|
|
14450
14541
|
export declare function useRoomMembership(): {
|
|
14451
14542
|
join: UseMutationResult<unknown, Error, string, unknown>;
|
|
14452
14543
|
leave: UseMutationResult<unknown, Error, string, unknown>;
|