@marketrix.ai/widget 4.0.113 → 4.0.114

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.
@@ -20,7 +20,9 @@
20
20
  *
21
21
  * `useScreenShare` (this file's only other consumer) owns the screen-share lifecycle: the in-transcript
22
22
  * permission card, the browser picker, the live share message, and ending a share. `useLatest` keeps a
23
- * value readable from a callback that must not be re-created (the polling interval below, mounted once).
23
+ * value readable from a callback that must not be re-created (the polling interval below, mounted once);
24
+ its refs are listed in that effect's deps for the linter, but since `useRef` identity never changes,
25
+ listing them cannot re-arm the interval.
24
26
  * The hook returns `requestScreenAccess` — posting a request card carrying the queued turn, no-oping if
25
27
  * one is already open — plus that card's Allow/Deny handlers, the toolbar dialog's Allow/Dismiss
26
28
  * handlers, and `toggleScreenShareRef`, a toggle stopping a live share or opening that dialog.
@@ -13,10 +13,14 @@
13
13
  * mounted before the read, its first effect would overwrite the stored transcript on every remount.
14
14
  * `previewMode` skips init entirely: no chat session is minted, no stream opened, nothing persisted.
15
15
  *
16
- * The init effect's deps are empty on purpose — once per mount — and `cancelled` drops the connect when
17
- * a StrictMode double-invoke or an unmount cleans up before the chat_id resolves. A failed connect is
18
- * logged only, since `StreamClient` owns the backoff reconnect; a failed init is logged AND surfaced
19
- * through `uiActions.setError`.
16
+ * The init effect lists `previewMode`, `uiActions` and `chatActions` for the linter, but runs once per
17
+ * mount in practice `uiActions` is a `useMemo([])` and `chatActions` bottoms out in `commit`
18
+ * (`useCallback([])`), both stable for the component's lifetime, and `previewMode` is fixed by the
19
+ * caller. `cancelled` drops the connect when a StrictMode double-invoke or an unmount cleans up before
20
+ * the chat_id resolves. `streamClient.connect` never rejects — it catches internally and owns its own
21
+ * backoff reconnect and warn-level log — so the call here is fire-and-forget; a failed INIT (the
22
+ * snapshot restore or `getOrCreateChatId`) is the one thing this bridge logs and surfaces through
23
+ * `uiActions.setError`.
20
24
  */
21
25
  import React from 'react';
22
26
  export declare const PortalContainerContext: React.Context<HTMLElement | null>;
@@ -0,0 +1,2 @@
1
+ export declare function logWarn(message: string, cause?: unknown): void;
2
+ export declare function logError(message: string, cause?: unknown): void;