@papermap/papermap 1.1.0 → 1.1.2
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/index.d.mts +936 -35
- package/dist/index.d.ts +936 -35
- package/dist/index.js +13040 -4956
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12998 -4921
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -1
- package/readme.md +673 -23
- package/styles.css +24 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { CSSProperties, ReactNode, RefObject } from 'react';
|
|
2
4
|
import { Layout } from 'react-grid-layout';
|
|
3
5
|
import { LucideIcon } from 'lucide-react';
|
|
4
|
-
import * as React$1 from 'react';
|
|
5
|
-
import React__default, { RefObject } from 'react';
|
|
6
6
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
7
|
import { VariantProps } from 'class-variance-authority';
|
|
8
8
|
import * as zustand from 'zustand';
|
|
@@ -11,33 +11,400 @@ import * as axios from 'axios';
|
|
|
11
11
|
import { AxiosInstance } from 'axios';
|
|
12
12
|
import { DriveStep } from 'driver.js';
|
|
13
13
|
|
|
14
|
+
/** Matches main-app embedded layout (`EmbeddedLayout` / `?theme=`). */
|
|
15
|
+
type PapermapColorScheme = 'light' | 'dark' | 'system';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Host-supplied avatar nodes for chat message rows.
|
|
19
|
+
*
|
|
20
|
+
* A supplied node is rendered **as-is** inside a 32px-square layout slot — the
|
|
21
|
+
* default circle background, rounding and color are NOT applied to it, so host
|
|
22
|
+
* colors, gradients, images and borders are preserved across light and dark
|
|
23
|
+
* themes. Provide a self-contained node (e.g.
|
|
24
|
+
* `<img className="h-full w-full rounded-full object-cover" />` or a styled
|
|
25
|
+
* element using `h-full w-full`). Any slot left undefined falls back to the
|
|
26
|
+
* built-in icon inside the default circle.
|
|
27
|
+
*/
|
|
28
|
+
interface PaperChatAvatars {
|
|
29
|
+
/** Replaces the built-in `User` avatar on user-role rows. */
|
|
30
|
+
user?: React__default.ReactNode;
|
|
31
|
+
/** Replaces the built-in `LogoStandAlone` avatar on assistant-role rows. */
|
|
32
|
+
assistant?: React__default.ReactNode;
|
|
33
|
+
/** Replaces the built-in `ThinkingLogo` loader shown while the assistant generates. */
|
|
34
|
+
thinking?: React__default.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
declare function ChatAssistant({ hideChartArea, inline: inlineProp, showAvatars: showAvatarsProp, avatars, greetingMessage, }: {
|
|
37
|
+
hideChartArea?: boolean;
|
|
38
|
+
/** Sheet side panel: same as main app `inline={true}`; overrides store `assistantInline` when passed. */
|
|
39
|
+
inline?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Force the user / assistant avatars to render even when `inline` (or the store's
|
|
42
|
+
* `assistantInline`) is true. Without this, inline mode hides avatars for a compact
|
|
43
|
+
* column layout. Side and dialog variants opt in so the brand/identity stays visible
|
|
44
|
+
* in those chrome-rich surfaces.
|
|
45
|
+
*/
|
|
46
|
+
showAvatars?: boolean;
|
|
47
|
+
/** Override the user / assistant / thinking avatar icons. */
|
|
48
|
+
avatars?: PaperChatAvatars;
|
|
49
|
+
/**
|
|
50
|
+
* Optional welcome line rendered as the first assistant bubble before any
|
|
51
|
+
* real messages have been exchanged. Skipped automatically once the user
|
|
52
|
+
* sends a message or a chat is loaded with history.
|
|
53
|
+
*/
|
|
54
|
+
greetingMessage?: string;
|
|
55
|
+
}): react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
57
|
+
type PaperChatDialogLauncherPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
58
|
+
interface PaperChatDialogInnerProps {
|
|
59
|
+
hideChartArea?: boolean;
|
|
60
|
+
/** Primary label in the dialog header (report / slash-command style). */
|
|
61
|
+
dialogTitle?: string;
|
|
62
|
+
/** Secondary line under the title. */
|
|
63
|
+
dialogSubtitle?: string;
|
|
64
|
+
/** Controlled open state. Omit to manage open state internally (floating launcher toggles). */
|
|
65
|
+
dialogOpen?: boolean;
|
|
66
|
+
onDialogOpenChange?: (open: boolean) => void;
|
|
67
|
+
/** When false, hide the floating launcher (e.g. fully controlled from the host). Default true. */
|
|
68
|
+
showDialogLauncher?: boolean;
|
|
69
|
+
/** `aria-label` / `title` on the floating launcher. */
|
|
70
|
+
dialogLauncherAriaLabel?: string;
|
|
71
|
+
/** Viewport corner for the floating launcher (`fixed` inset). Default `bottom-right`. */
|
|
72
|
+
dialogLauncherPosition?: PaperChatDialogLauncherPosition;
|
|
73
|
+
className?: string;
|
|
74
|
+
/** Optional portal target for the sheet chart overlay (same as side panel). */
|
|
75
|
+
chartOverlayPortalRef?: React__default.RefObject<HTMLDivElement | null>;
|
|
76
|
+
onAssistantClose?: () => void;
|
|
77
|
+
/** Render user / assistant avatars inside the embedded chat. Defaults to `true`. */
|
|
78
|
+
showAvatars?: boolean;
|
|
79
|
+
/** Override the user / assistant / thinking avatar icons. */
|
|
80
|
+
avatars?: PaperChatAvatars;
|
|
81
|
+
/**
|
|
82
|
+
* Custom trigger node replacing the default floating launcher button. Wrapped
|
|
83
|
+
* with a `data-paper-dialog-launcher` element that toggles the dialog on click
|
|
84
|
+
* so any node (icon, branded button, etc.) keeps the open/close UX.
|
|
85
|
+
*/
|
|
86
|
+
trigger?: React__default.ReactNode;
|
|
87
|
+
/** Controlled expand/collapse state for the dialog popup. */
|
|
88
|
+
expanded?: boolean;
|
|
89
|
+
/** Uncontrolled initial expanded state. Default `false`. */
|
|
90
|
+
defaultExpanded?: boolean;
|
|
91
|
+
/** Fires when the dialog toggles between default and expanded size. */
|
|
92
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Greeting message rendered as the first assistant bubble before the user
|
|
95
|
+
* sends anything. Plain string for now; mirrors a live-chat widget welcome.
|
|
96
|
+
*/
|
|
97
|
+
greetingMessage?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Report-style chat: floating launcher button + modal shell matching the main app’s
|
|
101
|
+
* in-editor slash chat (header chip, MessageSquare icon, full assistant + composer).
|
|
102
|
+
*/
|
|
103
|
+
declare function PaperChatDialogInner({ hideChartArea, dialogTitle, dialogSubtitle, dialogOpen: dialogOpenProp, onDialogOpenChange, showDialogLauncher, dialogLauncherAriaLabel, dialogLauncherPosition, className, chartOverlayPortalRef, onAssistantClose, showAvatars, avatars, trigger, expanded: expandedProp, defaultExpanded, onExpandedChange, greetingMessage, }: PaperChatDialogInnerProps): react_jsx_runtime.JSX.Element;
|
|
104
|
+
|
|
105
|
+
type PaperChatVariant = 'default' | 'side' | 'floating' | 'dialog';
|
|
106
|
+
/** Docking edge for `variant="side"` (viewport-anchored left/right rail). */
|
|
107
|
+
type PaperChatSidePosition = 'left' | 'right';
|
|
108
|
+
type PaperChatSideContentInsetMode = 'none' | 'auto';
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Controls handed to {@link PaperChatProps.renderSidePanelOpenTrigger}. The
|
|
112
|
+
* host's open state remains the source of truth — `show` and `toggle` simply
|
|
113
|
+
* forward to the `onOpenChange` callback.
|
|
114
|
+
*/
|
|
115
|
+
interface SidePanelTriggerControls {
|
|
116
|
+
open: boolean;
|
|
117
|
+
show: () => void;
|
|
118
|
+
toggle: () => void;
|
|
119
|
+
}
|
|
14
120
|
interface PaperChatProps {
|
|
121
|
+
variant?: PaperChatVariant;
|
|
15
122
|
token?: string;
|
|
16
123
|
workspaceId?: string;
|
|
17
124
|
dashboardId?: string;
|
|
18
125
|
apiUrl?: string;
|
|
19
|
-
|
|
20
|
-
* Called whenever the toolbar height changes (including multiline expansion).
|
|
21
|
-
* Host apps can use this to add bottom padding/margin to their chart area,
|
|
22
|
-
* mirroring how the main app dashboard layout reacts to toolbar height.
|
|
23
|
-
*/
|
|
126
|
+
hideChartArea?: boolean;
|
|
24
127
|
onToolbarHeightChange?: (height: number) => void;
|
|
25
128
|
placeholder?: string;
|
|
26
129
|
shortcutKey?: string;
|
|
27
130
|
autoFade?: boolean;
|
|
28
131
|
fadeDelay?: number;
|
|
29
132
|
className?: string;
|
|
133
|
+
showToolbar?: boolean;
|
|
134
|
+
onAssistantClose?: () => void;
|
|
135
|
+
initialChatScroll?: 'top' | 'bottom';
|
|
136
|
+
isViewer?: boolean;
|
|
137
|
+
assistantInline?: boolean;
|
|
30
138
|
/**
|
|
31
|
-
*
|
|
32
|
-
* Defaults to
|
|
139
|
+
* Whether to render user / assistant avatars (User icon and Papermap logo)
|
|
140
|
+
* in chat message rows. Defaults to visible across every variant; pass
|
|
141
|
+
* `false` to hide them.
|
|
33
142
|
*/
|
|
34
|
-
|
|
143
|
+
showAvatars?: boolean;
|
|
35
144
|
/**
|
|
36
|
-
*
|
|
145
|
+
* Override the user / assistant / thinking avatar icons. Each slot replaces
|
|
146
|
+
* only the icon — the surrounding circle wrapper stays. Useful for
|
|
147
|
+
* white-labeling the chat with the host product's brand.
|
|
37
148
|
*/
|
|
38
|
-
|
|
149
|
+
avatars?: PaperChatAvatars;
|
|
150
|
+
/**
|
|
151
|
+
* Color scheme when this component creates `PapermapProvider` (main-app embedded `?theme=` parity).
|
|
152
|
+
*/
|
|
153
|
+
theme?: PapermapColorScheme;
|
|
154
|
+
/**
|
|
155
|
+
* Which edge the side rail attaches to (border + shadow face the main area).
|
|
156
|
+
* - `"left"` (default): dock to the viewport left edge.
|
|
157
|
+
* - `"right"`: dock to the viewport right edge.
|
|
158
|
+
*/
|
|
159
|
+
sidePosition?: PaperChatSidePosition;
|
|
160
|
+
/**
|
|
161
|
+
* Whether the side rail participates in document flow vs overlaying the page.
|
|
162
|
+
* - `"none"` (default): on `md+` the rail is viewport-fixed and overlays host content.
|
|
163
|
+
* - `"auto"`: on `md+` the rail is **in-flow** — place `PaperChat` as a flex sibling next to your
|
|
164
|
+
* main surface (`flex` row, `min-h-0`, main `flex-1 min-w-0 overflow-auto`) so content resizes
|
|
165
|
+
* with the panel. Below `md`, behavior matches `"none"` (slide-over sheet). Hosts should not rely
|
|
166
|
+
* on `body` padding for insetting; the package no longer sets `--papermap-side-inset-*` for this mode.
|
|
167
|
+
*/
|
|
168
|
+
sideContentInsetMode?: PaperChatSideContentInsetMode;
|
|
169
|
+
/**
|
|
170
|
+
* Whether the chat surface is open — use with **`onOpenChange`** for
|
|
171
|
+
* **`variant="side"`** (rail), **`variant="floating"`** (overlay), and
|
|
172
|
+
* **`variant="dialog"`** (modal). When omitted, each variant falls back to
|
|
173
|
+
* its own defaults (side: closed; floating: use `visible`; dialog:
|
|
174
|
+
* internal state or `dialogOpen`).
|
|
175
|
+
*/
|
|
176
|
+
open?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Fires when the surface opens or closes. Use for **`side`**, **`floating`**,
|
|
179
|
+
* and **`dialog`** instead of legacy `onClose` / `onDialogOpenChange`.
|
|
180
|
+
*/
|
|
181
|
+
onOpenChange?: (open: boolean) => void;
|
|
182
|
+
onChartVisibilityChange?: (visible: boolean) => void;
|
|
183
|
+
/**
|
|
184
|
+
* Mount node for the sheet chart overlay (`createPortal`). Omit to use `document.body` (no host ref).
|
|
185
|
+
*/
|
|
186
|
+
chartOverlayPortalRef?: React__default.RefObject<HTMLDivElement | null>;
|
|
187
|
+
onPendingSheetEditsChange?: (edits: {
|
|
188
|
+
edit_session_id?: string;
|
|
189
|
+
}[]) => void;
|
|
190
|
+
clearPendingSheetEditsRef?: React__default.MutableRefObject<(() => void) | null>;
|
|
191
|
+
/**
|
|
192
|
+
* Render-prop for a custom open trigger shown when `variant === 'side'` and
|
|
193
|
+
* `open === false`. The returned node mounts inside the side wrapper; if you
|
|
194
|
+
* need the trigger to escape the wrapper (e.g. as a floating action button),
|
|
195
|
+
* style it with `fixed` / `absolute` positioning.
|
|
196
|
+
*
|
|
197
|
+
* Omit to render no trigger — keep the existing pattern where the host
|
|
198
|
+
* renders its own open affordance outside `PaperChat`.
|
|
199
|
+
*/
|
|
200
|
+
renderSidePanelOpenTrigger?: (controls: SidePanelTriggerControls) => React__default.ReactNode;
|
|
201
|
+
/**
|
|
202
|
+
* @deprecated Use **`open`** for `variant="floating"`. When both are set,
|
|
203
|
+
* `open` takes precedence.
|
|
204
|
+
*/
|
|
205
|
+
visible?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* @deprecated Use **`onOpenChange(false)`** for `variant="floating"`. Still
|
|
208
|
+
* invoked after `onOpenChange` when the overlay requests close, if provided.
|
|
209
|
+
*/
|
|
210
|
+
onClose?: () => void;
|
|
211
|
+
historyOpen?: boolean;
|
|
212
|
+
onCloseHistory?: () => void;
|
|
213
|
+
/** Header title inside the modal (default: `Chat`). Prefer `title`. */
|
|
214
|
+
title?: string;
|
|
215
|
+
/** @deprecated Use **`title`**. */
|
|
216
|
+
dialogTitle?: string;
|
|
217
|
+
/** Subtitle under the title. Prefer `subtitle`. */
|
|
218
|
+
subtitle?: string;
|
|
219
|
+
/** @deprecated Use **`subtitle`**. */
|
|
220
|
+
dialogSubtitle?: string;
|
|
221
|
+
/**
|
|
222
|
+
* @deprecated Use **`open`** for controlled dialog state. When both are set,
|
|
223
|
+
* `open` takes precedence.
|
|
224
|
+
*/
|
|
225
|
+
dialogOpen?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* @deprecated Use **`onOpenChange`**. When both are set, `onOpenChange` is
|
|
228
|
+
* preferred.
|
|
229
|
+
*/
|
|
230
|
+
onDialogOpenChange?: (open: boolean) => void;
|
|
231
|
+
/** Whether to show the floating launcher. Default `true`. Prefer `showLauncher`. */
|
|
232
|
+
showLauncher?: boolean;
|
|
233
|
+
/** @deprecated Use **`showLauncher`**. */
|
|
234
|
+
showDialogLauncher?: boolean;
|
|
235
|
+
/** Accessible name for the launcher. Prefer `launcherAriaLabel`. */
|
|
236
|
+
launcherAriaLabel?: string;
|
|
237
|
+
/** @deprecated Use **`launcherAriaLabel`**. */
|
|
238
|
+
dialogLauncherAriaLabel?: string;
|
|
239
|
+
/** Viewport corner for the launcher. Prefer `launcherPosition`. */
|
|
240
|
+
launcherPosition?: PaperChatDialogLauncherPosition;
|
|
241
|
+
/** @deprecated Use **`launcherPosition`**. */
|
|
242
|
+
dialogLauncherPosition?: PaperChatDialogLauncherPosition;
|
|
243
|
+
/**
|
|
244
|
+
* Custom trigger node for the `dialog` and `side` variants. The plugin
|
|
245
|
+
* wraps the node with the open/close handler so any element (icon, branded
|
|
246
|
+
* button, link, etc.) keeps the built-in toggle UX and accessibility.
|
|
247
|
+
* Ignored for `default` / `floating` variants.
|
|
248
|
+
*/
|
|
249
|
+
trigger?: React__default.ReactNode;
|
|
250
|
+
/** Custom avatar node for assistant message rows. Equivalent to `avatars.assistant`. */
|
|
251
|
+
assistantAvatar?: React__default.ReactNode;
|
|
252
|
+
/** Custom avatar node for user message rows. Equivalent to `avatars.user`. */
|
|
253
|
+
userAvatar?: React__default.ReactNode;
|
|
254
|
+
/**
|
|
255
|
+
* Greeting/welcome line rendered as the first assistant bubble before any
|
|
256
|
+
* real messages have been exchanged. Applies to `side` and `dialog`
|
|
257
|
+
* variants (where the conversation surface is always mounted).
|
|
258
|
+
*/
|
|
259
|
+
greetingMessage?: string;
|
|
260
|
+
/** Controlled expanded state for `side` and `dialog` variants. */
|
|
261
|
+
expanded?: boolean;
|
|
262
|
+
/** Uncontrolled initial expanded state. Default `false`. */
|
|
263
|
+
defaultExpanded?: boolean;
|
|
264
|
+
/** Fires when the side panel or dialog toggles between default and expanded size. */
|
|
265
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
39
266
|
}
|
|
40
|
-
declare function PaperChat({ token, workspaceId, dashboardId, apiUrl, onToolbarHeightChange, onAssistantClose, showToolbar, ...uiProps }: PaperChatProps): react_jsx_runtime.JSX.Element;
|
|
267
|
+
declare function PaperChat({ variant, token, workspaceId, dashboardId, apiUrl, onToolbarHeightChange, onAssistantClose, initialChatScroll, isViewer, assistantInline, theme, showToolbar, showAvatars, avatars, sidePosition, sideContentInsetMode, open, onOpenChange, onChartVisibilityChange, chartOverlayPortalRef, onPendingSheetEditsChange, clearPendingSheetEditsRef, renderSidePanelOpenTrigger, visible, onClose, historyOpen, onCloseHistory, hideChartArea, title, dialogTitle, subtitle, dialogSubtitle, dialogOpen, onDialogOpenChange, showLauncher, showDialogLauncher, launcherAriaLabel, dialogLauncherAriaLabel, launcherPosition, dialogLauncherPosition, trigger, assistantAvatar, userAvatar, greetingMessage, expanded, defaultExpanded, onExpandedChange, ...uiProps }: PaperChatProps): react_jsx_runtime.JSX.Element;
|
|
268
|
+
|
|
269
|
+
type PendingSheetEditLike = {
|
|
270
|
+
edit_session_id?: string;
|
|
271
|
+
};
|
|
272
|
+
interface PaperChatSidePanelProps {
|
|
273
|
+
token?: string;
|
|
274
|
+
workspaceId?: string;
|
|
275
|
+
dashboardId?: string;
|
|
276
|
+
apiUrl?: string;
|
|
277
|
+
initialChatScroll?: 'top' | 'bottom';
|
|
278
|
+
isViewer?: boolean;
|
|
279
|
+
assistantInline?: boolean;
|
|
280
|
+
/** Color scheme when this component creates `PapermapProvider`. */
|
|
281
|
+
theme?: PapermapColorScheme;
|
|
282
|
+
hideChartArea?: boolean;
|
|
283
|
+
open: boolean;
|
|
284
|
+
onOpenChange: (open: boolean) => void;
|
|
285
|
+
onChartVisibilityChange?: (visible: boolean) => void;
|
|
286
|
+
/**
|
|
287
|
+
* Optional mount node for the sheet chart overlay portal. When omitted, the overlay portals to
|
|
288
|
+
* `document.body` so side-panel + dialog embeds work without a host ref.
|
|
289
|
+
*/
|
|
290
|
+
chartOverlayPortalRef?: React__default.RefObject<HTMLDivElement | null>;
|
|
291
|
+
onPendingSheetEditsChange?: (edits: PendingSheetEditLike[]) => void;
|
|
292
|
+
clearPendingSheetEditsRef?: React__default.MutableRefObject<(() => void) | null>;
|
|
293
|
+
/** When embedded in a modal (e.g. `PaperChat` variant `dialog`), use full width and skip rail animation. */
|
|
294
|
+
embedInDialog?: boolean;
|
|
295
|
+
/** Hide the panel title row when the host supplies chrome (e.g. report-style dialog header). */
|
|
296
|
+
hideHeader?: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Which screen edge the sheet rail attaches to (borders/shadow face the main content).
|
|
299
|
+
* Ignored when `embedInDialog` is true.
|
|
300
|
+
*/
|
|
301
|
+
sidePosition?: 'left' | 'right';
|
|
302
|
+
/**
|
|
303
|
+
* When true (e.g. `PaperChat` `sideContentInsetMode="auto"`), the desktop rail is laid out in-flow
|
|
304
|
+
* inside a flex host; width clamps use the smaller of viewport and the host column width, and the
|
|
305
|
+
* chart overlay reserves the live rail width instead of a fixed constant.
|
|
306
|
+
*/
|
|
307
|
+
layoutFlowRail?: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Dialog embed only: whether chat chrome or the portaled chart overlay stacks above (focus-driven).
|
|
310
|
+
*/
|
|
311
|
+
embedDialogStackLeader?: 'chat' | 'chart';
|
|
312
|
+
/** Ref to the floating chart dock root for embed stacking hit-testing. */
|
|
313
|
+
embedChartDockRef?: React__default.MutableRefObject<HTMLDivElement | null>;
|
|
314
|
+
/** Dialog embed: sync expanded/history fullscreen overlay foreground for Radix stack tiers. */
|
|
315
|
+
onEmbedChartForegroundChange?: (foreground: boolean) => void;
|
|
316
|
+
/**
|
|
317
|
+
* Dialog embed: viewport pixels reserved by the chat dialog along its
|
|
318
|
+
* anchored horizontal edge. Forwarded to {@link FloatingChartOverlay} so the
|
|
319
|
+
* compact chart card opens 16px from the dialog.
|
|
320
|
+
*/
|
|
321
|
+
embedDialogReservedSidePx?: number;
|
|
322
|
+
/** Dialog embed: viewport edge the chat dialog is anchored to vertically. */
|
|
323
|
+
embedDialogVerticalAnchor?: 'top' | 'bottom';
|
|
324
|
+
/** Dialog embed: dialog's vertical anchor inset from the viewport edge in px. */
|
|
325
|
+
embedDialogVerticalInsetPx?: number;
|
|
326
|
+
/**
|
|
327
|
+
* Whether to render user / assistant avatars (User icon and Papermap logo)
|
|
328
|
+
* in message bubbles. Defaults to `true` for this surface — the side rail
|
|
329
|
+
* and dialog modal are chrome-rich and benefit from identity affordances.
|
|
330
|
+
* Set `false` to hide them.
|
|
331
|
+
*/
|
|
332
|
+
showAvatars?: boolean;
|
|
333
|
+
/** Override the user / assistant / thinking avatar icons. */
|
|
334
|
+
avatars?: PaperChatAvatars;
|
|
335
|
+
/**
|
|
336
|
+
* Greeting / welcome message rendered as the first assistant bubble before
|
|
337
|
+
* the user sends anything. Mirrors a live-chat widget welcome line.
|
|
338
|
+
*/
|
|
339
|
+
greetingMessage?: string;
|
|
340
|
+
/** Controlled expanded state — when true, the panel grows beyond default width. */
|
|
341
|
+
expanded?: boolean;
|
|
342
|
+
/** Uncontrolled initial expanded state. Default `false`. */
|
|
343
|
+
defaultExpanded?: boolean;
|
|
344
|
+
/** Fires when the panel toggles between default and expanded width. */
|
|
345
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
346
|
+
/** Hide the built-in expand/collapse toggle in the header. Default `false`. */
|
|
347
|
+
hideExpandToggle?: boolean;
|
|
348
|
+
}
|
|
349
|
+
declare function PaperChatSidePanel({ token, workspaceId, dashboardId, apiUrl, initialChatScroll, isViewer, assistantInline, theme, ...panelProps }: PaperChatSidePanelProps): react_jsx_runtime.JSX.Element;
|
|
350
|
+
/** Backward-compatible alias. Prefer `PaperChatSidePanel`. */
|
|
351
|
+
declare function ChatSidePanel(props: PaperChatSidePanelProps): react_jsx_runtime.JSX.Element;
|
|
352
|
+
|
|
353
|
+
interface PaperChatFloatingChartOverlayProps {
|
|
354
|
+
token?: string;
|
|
355
|
+
workspaceId?: string;
|
|
356
|
+
dashboardId?: string;
|
|
357
|
+
apiUrl?: string;
|
|
358
|
+
initialChatScroll?: 'top' | 'bottom';
|
|
359
|
+
isViewer?: boolean;
|
|
360
|
+
assistantInline?: boolean;
|
|
361
|
+
/** Color scheme when this component creates `PapermapProvider`. */
|
|
362
|
+
theme?: PapermapColorScheme;
|
|
363
|
+
visible: boolean;
|
|
364
|
+
onClose: () => void;
|
|
365
|
+
/** Sheet page: charts history list in this overlay instead of the chat column */
|
|
366
|
+
historyOpen?: boolean;
|
|
367
|
+
onCloseHistory?: () => void;
|
|
368
|
+
/**
|
|
369
|
+
* When true (e.g. `PaperChat` variant `dialog`), use the same z-index layer as {@link ChartDialog}
|
|
370
|
+
* (`PAPERMAP_CHAT_DIALOG_Z`) with `fixed` positioning. Prefer portaling to `document.body` in the host.
|
|
371
|
+
*/
|
|
372
|
+
stackWithChartDialog?: boolean;
|
|
373
|
+
/**
|
|
374
|
+
* When portaling to `document.body` next to {@link ChatSidePanel}, inset the overlay so it only
|
|
375
|
+
* covers the main area — not the chat rail (`CHAT_SIDE_PANEL_WIDTH_PX`).
|
|
376
|
+
*/
|
|
377
|
+
besideRail?: boolean;
|
|
378
|
+
/**
|
|
379
|
+
* When set with `besideRail`, padding matches this width (e.g. in-flow rail after drag/expand)
|
|
380
|
+
* instead of the default `CHAT_SIDE_PANEL_WIDTH_PX`.
|
|
381
|
+
*/
|
|
382
|
+
besideRailReservedWidthPx?: number;
|
|
383
|
+
/** Which edge the side panel is on — must match `ChatSidePanel` `sidePosition`. */
|
|
384
|
+
sidePosition?: 'left' | 'right';
|
|
385
|
+
/** When false and `besideRail`, do not reserve rail width (panel collapsed). */
|
|
386
|
+
sideRailOpen?: boolean;
|
|
387
|
+
/** Merged onto the chart overlay card shell (rounded panel). */
|
|
388
|
+
className?: string;
|
|
389
|
+
/** Dialog embed: z-index tier vs chat (from `PaperChatDialogInner`). */
|
|
390
|
+
embedDialogStackLeader?: 'chat' | 'chart';
|
|
391
|
+
embedChartDockRef?: React__default.MutableRefObject<HTMLDivElement | null>;
|
|
392
|
+
/** Dialog embed: expanded or history fullscreen should stack above chat and lower dialog chrome. */
|
|
393
|
+
onEmbedChartForegroundChange?: (foreground: boolean) => void;
|
|
394
|
+
/**
|
|
395
|
+
* Dialog embed: viewport pixels reserved by the chat dialog along its anchored
|
|
396
|
+
* horizontal edge (corner inset + dialog width). The compact chart card uses
|
|
397
|
+
* this to anchor itself 16px away from the dialog's chat-facing edge.
|
|
398
|
+
*/
|
|
399
|
+
embedDialogReservedSidePx?: number;
|
|
400
|
+
/** Dialog embed: which viewport edge the chat dialog is anchored to vertically. */
|
|
401
|
+
embedDialogVerticalAnchor?: 'top' | 'bottom';
|
|
402
|
+
/** Dialog embed: dialog's vertical anchor inset from the viewport edge in px. */
|
|
403
|
+
embedDialogVerticalInsetPx?: number;
|
|
404
|
+
}
|
|
405
|
+
declare function PaperChatFloatingChartOverlay({ token, workspaceId, dashboardId, apiUrl, initialChatScroll, isViewer, assistantInline, theme, ...overlayProps }: PaperChatFloatingChartOverlayProps): react_jsx_runtime.JSX.Element;
|
|
406
|
+
/** Backward-compatible alias. Prefer `PaperChatFloatingChartOverlay`. */
|
|
407
|
+
declare function FloatingChartOverlay(props: PaperChatFloatingChartOverlayProps): react_jsx_runtime.JSX.Element;
|
|
41
408
|
|
|
42
409
|
/** One row of tabular chart data (column keys depend on the query). */
|
|
43
410
|
type ChartDataRow = Record<string, unknown>;
|
|
@@ -183,8 +550,9 @@ interface PaperCardProps {
|
|
|
183
550
|
/**
|
|
184
551
|
* Visual theme for the chart card. When set, renders in the specified
|
|
185
552
|
* mode independent of the host app. Omit to inherit the host page's theme.
|
|
553
|
+
* When the card creates its own `PapermapProvider`, this also sets the provider color scheme.
|
|
186
554
|
*/
|
|
187
|
-
theme?: 'light' | 'dark';
|
|
555
|
+
theme?: 'light' | 'dark' | 'system';
|
|
188
556
|
/**
|
|
189
557
|
* Called when the user clicks the edit button on the chart card.
|
|
190
558
|
* In streaming variant, if not provided, the built-in StreamingChartDialog opens.
|
|
@@ -210,7 +578,7 @@ interface PaperCardProps {
|
|
|
210
578
|
wide?: boolean;
|
|
211
579
|
/** Hide the chart variation selector. Defaults to true. */
|
|
212
580
|
hideVariants?: boolean;
|
|
213
|
-
/** Show the toolbar
|
|
581
|
+
/** Show the card chrome toolbar (maximize, edit, delete). Main app `ChartCard` uses `showChatToolbar`. Default true. */
|
|
214
582
|
showToolbar?: boolean;
|
|
215
583
|
/** When true, chart toolbar actions are visually disabled during layout editing. */
|
|
216
584
|
isEditMode?: boolean;
|
|
@@ -234,7 +602,153 @@ interface PaperCardProps {
|
|
|
234
602
|
}
|
|
235
603
|
declare function PaperCard({ token: tokenProp, workspaceId: workspaceIdProp, dashboardId: dashboardIdProp, apiUrl: apiUrlProp, id, onSave, onPinnedToDashboard, onAssistantClosed, chartId, chart: chartProp, theme, onEditClick, onDelete, isViewer, wide, hideVariants, showToolbar, isEditMode, className, variant, hideStreamingEmptySubtext, dashboardTheme, }: PaperCardProps): react_jsx_runtime.JSX.Element;
|
|
236
604
|
|
|
237
|
-
|
|
605
|
+
/**
|
|
606
|
+
* Mirrors the main app's `insight` SSE payload — driven by the same
|
|
607
|
+
* `dashboards/:id/insights/stream` endpoint.
|
|
608
|
+
*/
|
|
609
|
+
type DashboardInsightType = 'highlight' | 'trends' | 'recommendation';
|
|
610
|
+
interface DashboardInsight {
|
|
611
|
+
id: string;
|
|
612
|
+
insightType: DashboardInsightType;
|
|
613
|
+
headline: string;
|
|
614
|
+
body: string;
|
|
615
|
+
/** Opaque string. For `trends`, often `"<upside> | <downside>"` (split only on ` | `). */
|
|
616
|
+
metric: string | null;
|
|
617
|
+
/** Linked chat id for "Explore in chat" deep links. Omitted when `error`. */
|
|
618
|
+
chatId?: string;
|
|
619
|
+
error?: boolean;
|
|
620
|
+
}
|
|
621
|
+
interface DashboardInsightsResult {
|
|
622
|
+
insights: DashboardInsight[];
|
|
623
|
+
generationTime?: number;
|
|
624
|
+
}
|
|
625
|
+
interface StreamDashboardInsightsOptions {
|
|
626
|
+
dashboardId: string;
|
|
627
|
+
/** Inclusive start of the period. Accepts a `Date` or `yyyy-MM-dd` string. */
|
|
628
|
+
startDate: Date | string;
|
|
629
|
+
/** Inclusive end of the period. Accepts a `Date` or `yyyy-MM-dd` string. */
|
|
630
|
+
endDate: Date | string;
|
|
631
|
+
authHeaders: Record<string, string>;
|
|
632
|
+
apiUrl?: string;
|
|
633
|
+
/** Extra fields merged into the POST body. */
|
|
634
|
+
extraBody?: Record<string, unknown>;
|
|
635
|
+
/** Fired when the server emits `insights_started` — clear UI state here. */
|
|
636
|
+
onStarted?: () => void;
|
|
637
|
+
/** Fired once per `insight` SSE event with the parsed insight. */
|
|
638
|
+
onInsight?: (insight: DashboardInsight) => void;
|
|
639
|
+
/** Fired when the server emits `insights_complete`. */
|
|
640
|
+
onComplete?: (result: DashboardInsightsResult) => void;
|
|
641
|
+
/** Fired on transport error or an `error` SSE event. */
|
|
642
|
+
onError?: (error: Error) => void;
|
|
643
|
+
signal?: AbortSignal;
|
|
644
|
+
}
|
|
645
|
+
declare function normalizeInsightType(raw: unknown): DashboardInsightType;
|
|
646
|
+
/** Stable display order (recommendation → highlight → trends). Preserves order within each type. */
|
|
647
|
+
declare function orderInsightsForDisplay(insights: DashboardInsight[]): DashboardInsight[];
|
|
648
|
+
/** Format a `Date` (or pass through a string) into `yyyy-MM-dd`. */
|
|
649
|
+
declare function formatInsightDate(value: Date | string): string;
|
|
650
|
+
/**
|
|
651
|
+
* Opens the dashboard insights SSE stream and dispatches the main app's
|
|
652
|
+
* named events (`insights_started`, `insight`, `insights_complete`, `error`)
|
|
653
|
+
* to the supplied callbacks. Returns `{ abort }` for lifecycle control.
|
|
654
|
+
*/
|
|
655
|
+
declare function streamDashboardInsights(options: StreamDashboardInsightsOptions): {
|
|
656
|
+
abort: () => void;
|
|
657
|
+
};
|
|
658
|
+
/** Pull a numeric percentage out of a `metric` string. Returns `null` when nothing parseable. */
|
|
659
|
+
declare function parseInsightMetricToTrend(metric: string | null | undefined): number | null;
|
|
660
|
+
|
|
661
|
+
/** Quick Insights period dropdown + timeline sync (not SSE `insight.type`). Mirrors main app. */
|
|
662
|
+
type InsightsPeriodPreset = 'last_3_months' | 'this_week' | 'this_month' | 'this_year' | 'custom';
|
|
663
|
+
type InsightsPeriodMenuPreset = Exclude<InsightsPeriodPreset, 'custom'>;
|
|
664
|
+
declare const INSIGHTS_PERIOD_LABELS: Record<InsightsPeriodPreset, string>;
|
|
665
|
+
declare const INSIGHTS_PERIOD_SELECT_OPTIONS: InsightsPeriodPreset[];
|
|
666
|
+
/** Preset → [start, end]; end is always "now". */
|
|
667
|
+
declare function computeInsightsPeriodRange(preset: InsightsPeriodMenuPreset, now?: Date): {
|
|
668
|
+
start: Date;
|
|
669
|
+
end: Date;
|
|
670
|
+
};
|
|
671
|
+
/** "Apr 25 – May 25, 2026" — matches main app `format(d, 'MMM d') – format(d, 'MMM d, yyyy')`. */
|
|
672
|
+
declare function formatInsightsDateLabel(start: Date | undefined, end: Date | undefined): string | null;
|
|
673
|
+
|
|
674
|
+
/** Named slots a host can target with `classNames` / `styles`. */
|
|
675
|
+
type PaperInsightSlot = 'root' | 'header' | 'headerInner' | 'titleGroup' | 'icon' | 'title' | 'spinner' | 'loadingText' | 'dateLabel' | 'actions' | 'periodSelect' | 'refreshButton' | 'body' | 'list' | 'row' | 'rowIcon' | 'rowHeadline' | 'rowBody' | 'rowMetric' | 'exploreButton' | 'skeleton' | 'emptyState' | 'footer';
|
|
676
|
+
type PaperInsightClassNames = Partial<Record<PaperInsightSlot, string>>;
|
|
677
|
+
type PaperInsightStyles = Partial<Record<PaperInsightSlot, CSSProperties>>;
|
|
678
|
+
interface PaperInsightProps {
|
|
679
|
+
/** Inclusive start of the period. `Date` or `yyyy-MM-dd` string. */
|
|
680
|
+
startDate?: Date | string;
|
|
681
|
+
/** Inclusive end of the period. `Date` or `yyyy-MM-dd` string. */
|
|
682
|
+
endDate?: Date | string;
|
|
683
|
+
/** Dashboard id. Falls back to the surrounding `PapermapProvider`. */
|
|
684
|
+
dashboardId?: string;
|
|
685
|
+
/** Connection (falls back to surrounding `PapermapProvider`). */
|
|
686
|
+
token?: string;
|
|
687
|
+
workspaceId?: string;
|
|
688
|
+
apiUrl?: string;
|
|
689
|
+
theme?: 'light' | 'dark' | 'system';
|
|
690
|
+
/** Themed dashboard styling (mirrors main app `dashboardTheme` mark color). */
|
|
691
|
+
dashboardTheme?: DashboardTheme | null;
|
|
692
|
+
/** Root element class. Merged after built-in classes. */
|
|
693
|
+
className?: string;
|
|
694
|
+
/** Root element inline style. */
|
|
695
|
+
style?: CSSProperties;
|
|
696
|
+
/** Per-slot class overrides (header, title, refreshButton, row, body, etc.). */
|
|
697
|
+
classNames?: PaperInsightClassNames;
|
|
698
|
+
/** Per-slot inline style overrides. */
|
|
699
|
+
styles?: PaperInsightStyles;
|
|
700
|
+
/** Disables interactions while the host's grid is in layout-edit mode. */
|
|
701
|
+
isEditMode?: boolean;
|
|
702
|
+
/**
|
|
703
|
+
* Period preset. Optional in standalone use — when omitted, the panel manages
|
|
704
|
+
* its own preset (defaults to `'last_3_months'`) and shows the dropdown so the
|
|
705
|
+
* user can switch range. Pass a value to control externally.
|
|
706
|
+
*/
|
|
707
|
+
periodPreset?: InsightsPeriodPreset;
|
|
708
|
+
onPeriodPresetChange?: (preset: InsightsPeriodPreset) => void;
|
|
709
|
+
/** Hide the period dropdown entirely (e.g. host renders its own period picker). */
|
|
710
|
+
hidePeriodSelect?: boolean;
|
|
711
|
+
/**
|
|
712
|
+
* Fired when the user drags the inline custom-range scrubber. Required for the
|
|
713
|
+
* scrubber to function when `periodPreset === 'custom'` — the host owns the
|
|
714
|
+
* `startDate`/`endDate` state.
|
|
715
|
+
*/
|
|
716
|
+
onRangeChange?: (start: Date, end: Date) => void;
|
|
717
|
+
/**
|
|
718
|
+
* Show the inline `TimelineRange` scrubber when `periodPreset === 'custom'`.
|
|
719
|
+
* Defaults to `true` for standalone use. Set `false` when a parent (e.g.
|
|
720
|
+
* `PaperBoard`) renders its own scrubber outside the panel.
|
|
721
|
+
*/
|
|
722
|
+
showCustomRangeScrubber?: boolean;
|
|
723
|
+
/**
|
|
724
|
+
* Enable the "Custom range" option (dropdown entry + scrubber). Defaults to
|
|
725
|
+
* `true` for standalone use. Set `false` to remove the custom-range entry
|
|
726
|
+
* from the period dropdown and hide the scrubber entirely.
|
|
727
|
+
*/
|
|
728
|
+
enableCustomRange?: boolean;
|
|
729
|
+
/** Click handler for the per-row "Explore in Chat" arrow. */
|
|
730
|
+
onExplore?: (chatId: string) => void;
|
|
731
|
+
/**
|
|
732
|
+
* When `true` and no `onExplore` handler is provided, clicking the per-row
|
|
733
|
+
* "Explore in Chat" arrow opens the Papermap chat assistant focused on the
|
|
734
|
+
* insight's linked chat. Requires a surrounding `PapermapProvider`. Defaults
|
|
735
|
+
* to `false`.
|
|
736
|
+
*/
|
|
737
|
+
openChatAssistantOnExplore?: boolean;
|
|
738
|
+
/** Fired on each insight event. */
|
|
739
|
+
onInsight?: (insight: DashboardInsight) => void;
|
|
740
|
+
/** Fired when the stream completes. */
|
|
741
|
+
onComplete?: (result: DashboardInsightsResult) => void;
|
|
742
|
+
/** Fired on a stream error. */
|
|
743
|
+
onError?: (error: Error) => void;
|
|
744
|
+
}
|
|
745
|
+
declare function PaperInsight({ startDate, endDate, dashboardId: dashboardIdProp, token: tokenProp, workspaceId: workspaceIdProp, apiUrl: apiUrlProp, theme, dashboardTheme, className, style, classNames, styles, isEditMode, periodPreset, onPeriodPresetChange, hidePeriodSelect, onRangeChange, showCustomRangeScrubber, enableCustomRange, onExplore, openChatAssistantOnExplore, onInsight, onComplete, onError, }: PaperInsightProps): react_jsx_runtime.JSX.Element;
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Stable grid id for the dashboard insight tile. Mirrors the main app's
|
|
749
|
+
* `TIMELINE_INSIGHTS_GRID_ID`; the prefix avoids colliding with chart chat ids.
|
|
750
|
+
*/
|
|
751
|
+
declare const PAPER_INSIGHT_GRID_ID = "__papermap_insight_panel__";
|
|
238
752
|
|
|
239
753
|
interface AgentThought {
|
|
240
754
|
type: 'agent_thought';
|
|
@@ -243,6 +757,24 @@ interface AgentThought {
|
|
|
243
757
|
iteration: number;
|
|
244
758
|
timestamp: string;
|
|
245
759
|
}
|
|
760
|
+
/** Native model reasoning (OpenAI summaries, Claude extended thinking) */
|
|
761
|
+
interface Reasoning {
|
|
762
|
+
type: 'reasoning';
|
|
763
|
+
content: string;
|
|
764
|
+
is_complete: boolean;
|
|
765
|
+
iteration: number;
|
|
766
|
+
timestamp: string;
|
|
767
|
+
}
|
|
768
|
+
/** SSE payload when the agent requires user confirmation before executing a tool */
|
|
769
|
+
interface ConfirmationRequired {
|
|
770
|
+
type: 'confirmation_required';
|
|
771
|
+
confirmation_id: string;
|
|
772
|
+
tool_display_name: string;
|
|
773
|
+
message: string;
|
|
774
|
+
action_description: string;
|
|
775
|
+
timeout_seconds: number;
|
|
776
|
+
timestamp: string;
|
|
777
|
+
}
|
|
246
778
|
interface FinalResponse {
|
|
247
779
|
type: 'final_response';
|
|
248
780
|
response_data: {
|
|
@@ -268,7 +800,7 @@ interface ToolCall {
|
|
|
268
800
|
tool_name: string;
|
|
269
801
|
tool_display_name: string;
|
|
270
802
|
args_preview: string;
|
|
271
|
-
status: 'announced' | 'streaming' | 'ready' | 'executing' | 'success' | 'error';
|
|
803
|
+
status: 'announced' | 'streaming' | 'ready' | 'confirmation_pending' | 'executing' | 'success' | 'error' | 'denied';
|
|
272
804
|
output?: string;
|
|
273
805
|
code?: string;
|
|
274
806
|
isStreamingArgs?: boolean;
|
|
@@ -277,13 +809,17 @@ interface ToolCall {
|
|
|
277
809
|
duration_ms?: number;
|
|
278
810
|
error_message?: string;
|
|
279
811
|
tool_call_id?: string;
|
|
812
|
+
/** Present while status is `confirmation_pending` */
|
|
813
|
+
confirmationData?: ConfirmationRequired;
|
|
280
814
|
timestamp: string;
|
|
281
815
|
}
|
|
282
816
|
interface TimelineEvent {
|
|
283
|
-
type: 'thought' | 'tool';
|
|
817
|
+
type: 'thought' | 'reasoning' | 'tool';
|
|
284
818
|
timestamp: string;
|
|
285
819
|
iteration?: number;
|
|
286
820
|
thoughtData?: AgentThought;
|
|
821
|
+
/** For native model reasoning */
|
|
822
|
+
reasoningData?: Reasoning;
|
|
287
823
|
toolData?: ToolCall;
|
|
288
824
|
}
|
|
289
825
|
interface StreamState {
|
|
@@ -298,10 +834,11 @@ interface StreamState {
|
|
|
298
834
|
isStreaming: boolean;
|
|
299
835
|
}
|
|
300
836
|
|
|
301
|
-
declare function StreamingTimeline({ timeline, collapseThreshold, recentFullCount, }: {
|
|
837
|
+
declare function StreamingTimeline({ timeline, collapseThreshold, recentFullCount, onConfirmationResponse, }: {
|
|
302
838
|
timeline: TimelineEvent[];
|
|
303
839
|
collapseThreshold?: number;
|
|
304
840
|
recentFullCount?: number;
|
|
841
|
+
onConfirmationResponse?: (confirmationId: string, confirmed: boolean, message?: string) => Promise<void>;
|
|
305
842
|
}): react_jsx_runtime.JSX.Element | null;
|
|
306
843
|
|
|
307
844
|
interface AgentThoughtDisplayProps {
|
|
@@ -317,15 +854,90 @@ interface ToolCallDisplayProps {
|
|
|
317
854
|
className?: string;
|
|
318
855
|
showAll?: boolean;
|
|
319
856
|
isLatest?: boolean;
|
|
857
|
+
onConfirmationResponse?: (confirmationId: string, confirmed: boolean, message?: string) => Promise<void>;
|
|
320
858
|
}
|
|
321
|
-
declare function ToolCallDisplay({ toolCalls, className, showAll, isLatest, }: ToolCallDisplayProps): react_jsx_runtime.JSX.Element | null;
|
|
859
|
+
declare function ToolCallDisplay({ toolCalls, className, showAll, isLatest, onConfirmationResponse, }: ToolCallDisplayProps): react_jsx_runtime.JSX.Element | null;
|
|
322
860
|
|
|
323
|
-
declare function RecentConversations(
|
|
861
|
+
declare function RecentConversations({ embedInPanel }?: {
|
|
862
|
+
embedInPanel?: boolean;
|
|
863
|
+
}): react_jsx_runtime.JSX.Element;
|
|
324
864
|
|
|
325
865
|
declare function ChartHistory(): react_jsx_runtime.JSX.Element;
|
|
326
866
|
|
|
327
867
|
declare function SavedMemory(): react_jsx_runtime.JSX.Element;
|
|
328
868
|
|
|
869
|
+
/**
|
|
870
|
+
* In the main app, workspace/dashboard selection lives in Redux. The plugin
|
|
871
|
+
* provides the same `WorkspaceSelector` API (`dashboardTheme` only) and
|
|
872
|
+
* supplies selection state and callbacks through this context (see PaperBoard).
|
|
873
|
+
*/
|
|
874
|
+
type WorkspaceSelectorControl = {
|
|
875
|
+
workspaceId: string;
|
|
876
|
+
dashboardId: string;
|
|
877
|
+
onSelect: (next: {
|
|
878
|
+
workspaceId: string;
|
|
879
|
+
dashboardId: string;
|
|
880
|
+
}) => void;
|
|
881
|
+
isViewer?: boolean;
|
|
882
|
+
};
|
|
883
|
+
declare function WorkspaceSelectorProvider({ value, children, }: {
|
|
884
|
+
value: WorkspaceSelectorControl;
|
|
885
|
+
children: ReactNode;
|
|
886
|
+
}): react_jsx_runtime.JSX.Element;
|
|
887
|
+
|
|
888
|
+
declare function DashboardAppHeader({ dashboardTheme, showWorkspaceSelector, workspaceSelectorValue, user, onLogout, billingHref, settingsHref, logoutUrl, appHeaderRightSlot, className,
|
|
889
|
+
/**
|
|
890
|
+
* When false, the header does not use `position: sticky` — use with a parent flex column where
|
|
891
|
+
* the scroll region is a sibling below the header (main-app `AuthenticatedLayout` pattern).
|
|
892
|
+
*/
|
|
893
|
+
sticky, }: {
|
|
894
|
+
dashboardTheme?: DashboardTheme | null;
|
|
895
|
+
showWorkspaceSelector: boolean;
|
|
896
|
+
workspaceSelectorValue: WorkspaceSelectorControl;
|
|
897
|
+
user?: {
|
|
898
|
+
name?: string | null;
|
|
899
|
+
email?: string | null;
|
|
900
|
+
} | null;
|
|
901
|
+
onLogout?: () => void;
|
|
902
|
+
billingHref?: string;
|
|
903
|
+
settingsHref?: string;
|
|
904
|
+
logoutUrl?: string;
|
|
905
|
+
appHeaderRightSlot?: ReactNode;
|
|
906
|
+
className?: string;
|
|
907
|
+
sticky?: boolean;
|
|
908
|
+
}): react_jsx_runtime.JSX.Element;
|
|
909
|
+
|
|
910
|
+
declare function UserNav({ dashboardTheme, user: userProp, onLogout, billingHref, settingsHref, logoutUrl, }: {
|
|
911
|
+
dashboardTheme?: DashboardTheme | null;
|
|
912
|
+
user?: {
|
|
913
|
+
name?: string | null;
|
|
914
|
+
email?: string | null;
|
|
915
|
+
} | null;
|
|
916
|
+
/** Called when user picks Log out; if omitted, navigates to `logoutUrl` or Papermap home. */
|
|
917
|
+
onLogout?: () => void;
|
|
918
|
+
/** Defaults: `/billing` and `/settings` on the hosted web app. */
|
|
919
|
+
billingHref?: string;
|
|
920
|
+
settingsHref?: string;
|
|
921
|
+
logoutUrl?: string;
|
|
922
|
+
}): react_jsx_runtime.JSX.Element;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Main app: [IntegrationsBar](papermap/src/components/IntegrationsBar.tsx) — Slack in the package;
|
|
926
|
+
* WhatsApp is main-app-only (omitted to avoid a large second port).
|
|
927
|
+
*/
|
|
928
|
+
declare function IntegrationsBar({ dashboardTheme, }: Readonly<{
|
|
929
|
+
dashboardTheme?: DashboardTheme | null;
|
|
930
|
+
}>): react_jsx_runtime.JSX.Element;
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Same surface API as the main app `src/components/dashboard/workspace-selector.tsx`:
|
|
934
|
+
* `dashboardTheme` for scoped styling. Selection state and `onSelect` are provided by
|
|
935
|
+
* {@link WorkspaceSelectorProvider} (wired from PaperBoard).
|
|
936
|
+
*/
|
|
937
|
+
declare function WorkspaceSelector({ dashboardTheme }: {
|
|
938
|
+
dashboardTheme?: DashboardTheme;
|
|
939
|
+
}): react_jsx_runtime.JSX.Element;
|
|
940
|
+
|
|
329
941
|
interface PaperDashboardSelectProps {
|
|
330
942
|
workspaceId: string;
|
|
331
943
|
dashboardId: string;
|
|
@@ -355,17 +967,52 @@ interface DashboardTabNavigationProps {
|
|
|
355
967
|
className?: string;
|
|
356
968
|
items: DashboardNavbarItem[];
|
|
357
969
|
dashboardTheme?: DashboardTheme;
|
|
358
|
-
/**
|
|
359
|
-
|
|
970
|
+
/** Sticky offset below the app header. Main app uses `top-14` (3.5rem) under a 14 (`h-14`) top bar. */
|
|
971
|
+
stickyTopClassName?: string;
|
|
972
|
+
/** When false, tabs are not `position: sticky` (stack below the header; scroll is a sibling below). */
|
|
973
|
+
sticky?: boolean;
|
|
974
|
+
rightSlot?: ReactNode;
|
|
360
975
|
}
|
|
361
976
|
/**
|
|
362
977
|
* Top tab bar styled like the main app `TabNavigation` (embedded layout navbar), without Next.js `Link`.
|
|
978
|
+
*
|
|
979
|
+
* **Active tab:** each item’s `href` pathname is compared to `window.location.pathname`. In a single-page
|
|
980
|
+
* embed where every tab would share the same path, no tab may appear active unless the host uses distinct
|
|
981
|
+
* paths or supplies custom `items` / a future `activeNavId`-style override.
|
|
363
982
|
*/
|
|
364
|
-
declare function DashboardTabNavigation({ className, items, dashboardTheme,
|
|
983
|
+
declare function DashboardTabNavigation({ className, items, dashboardTheme, stickyTopClassName,
|
|
984
|
+
/** When false, tabs are not `position: sticky` (stack below a fixed top bar; scroll is a sibling below). */
|
|
985
|
+
sticky, rightSlot, }: DashboardTabNavigationProps): react_jsx_runtime.JSX.Element;
|
|
986
|
+
|
|
987
|
+
type CreatedDashboard = {
|
|
988
|
+
dashboard_id: string;
|
|
989
|
+
title: string;
|
|
990
|
+
};
|
|
991
|
+
type CreateDashboardDialogProps = {
|
|
992
|
+
open: boolean;
|
|
993
|
+
onOpenChange: (open: boolean) => void;
|
|
994
|
+
workspaceId: string;
|
|
995
|
+
onSuccess: (dashboard: CreatedDashboard) => void;
|
|
996
|
+
};
|
|
997
|
+
declare function CreateDashboardDialog({ open, onOpenChange, workspaceId, onSuccess, }: CreateDashboardDialogProps): react_jsx_runtime.JSX.Element;
|
|
998
|
+
|
|
999
|
+
type CreatedUnifiedWorkspace = {
|
|
1000
|
+
workspace_id: string;
|
|
1001
|
+
name: string;
|
|
1002
|
+
default_dashboard: string;
|
|
1003
|
+
};
|
|
1004
|
+
type CreateUnifiedWorkspaceDialogProps = {
|
|
1005
|
+
open: boolean;
|
|
1006
|
+
onOpenChange: (open: boolean) => void;
|
|
1007
|
+
/** Called after API success with IDs so the host can navigate / invalidate queries. */
|
|
1008
|
+
onSuccess: (workspace: CreatedUnifiedWorkspace) => void;
|
|
1009
|
+
};
|
|
1010
|
+
declare function CreateUnifiedWorkspaceDialog({ open, onOpenChange, onSuccess, }: CreateUnifiedWorkspaceDialogProps): react_jsx_runtime.JSX.Element;
|
|
365
1011
|
|
|
366
1012
|
interface TChartMeta {
|
|
367
1013
|
title?: string;
|
|
368
1014
|
subtitle?: string;
|
|
1015
|
+
description?: string;
|
|
369
1016
|
footer?: string;
|
|
370
1017
|
variant?: string;
|
|
371
1018
|
showLegend?: boolean;
|
|
@@ -410,6 +1057,9 @@ interface ChartViewProps {
|
|
|
410
1057
|
dashboardTheme?: DashboardTheme;
|
|
411
1058
|
/** When true, ignore `dashboardTheme` (e.g. dialog with `skipDashboardTheme`). */
|
|
412
1059
|
skipDashboardTheme?: boolean;
|
|
1060
|
+
/** When provided, renders a camera/screenshot control next to chart variations (main-app parity). */
|
|
1061
|
+
onScreenshot?: () => void;
|
|
1062
|
+
isScreenshotting?: boolean;
|
|
413
1063
|
}
|
|
414
1064
|
declare function ChartView(props: ChartViewProps): react_jsx_runtime.JSX.Element;
|
|
415
1065
|
|
|
@@ -428,9 +1078,10 @@ interface ChartDialogProps {
|
|
|
428
1078
|
visualizationConfig: Record<string, any>;
|
|
429
1079
|
onMetaChange: (key: 'title' | 'description' | 'footer' | 'subtitle', value: string) => void;
|
|
430
1080
|
variant?: string;
|
|
1081
|
+
hideChartArea?: boolean;
|
|
431
1082
|
/**
|
|
432
|
-
* Optional
|
|
433
|
-
*
|
|
1083
|
+
* Optional callback (main app passes it from chat but does not invoke it from the dialog minimize control).
|
|
1084
|
+
* Minimize calls `onOpenChange(false)` only, matching the main Papermap `ChartDialog`.
|
|
434
1085
|
*/
|
|
435
1086
|
onClose?: () => void;
|
|
436
1087
|
/**
|
|
@@ -447,6 +1098,18 @@ interface ChartDialogProps {
|
|
|
447
1098
|
* When true, do not apply `dashboardTheme` to the dialog shell or inner `ChartView` (e.g. `ChatAssistant`).
|
|
448
1099
|
*/
|
|
449
1100
|
skipDashboardTheme?: boolean;
|
|
1101
|
+
/**
|
|
1102
|
+
* Package-only: near-full viewport sizing for expanded `ChatAssistant` / streaming hosts.
|
|
1103
|
+
* The main app `ChartDialog` has no equivalent prop; default `false` matches main-app layout.
|
|
1104
|
+
*/
|
|
1105
|
+
fullBleed?: boolean;
|
|
1106
|
+
/** Color scheme when this component creates `PapermapProvider`. */
|
|
1107
|
+
theme?: PapermapColorScheme;
|
|
1108
|
+
/**
|
|
1109
|
+
* Hide the floating screenshot control (main app keeps it on maximize dialogs from grid/chat paths).
|
|
1110
|
+
* `FloatingChartOverlay` omits chart screenshots in the embed package.
|
|
1111
|
+
*/
|
|
1112
|
+
hideScreenshotButton?: boolean;
|
|
450
1113
|
}
|
|
451
1114
|
declare function ChartDialog(props: ChartDialogProps): react_jsx_runtime.JSX.Element;
|
|
452
1115
|
|
|
@@ -464,12 +1127,12 @@ declare function StreamingChartDialog({ isOpen, onOpenChange, chartId, onClose,
|
|
|
464
1127
|
|
|
465
1128
|
interface DataTableProps {
|
|
466
1129
|
data: any[];
|
|
467
|
-
dashboardTheme?:
|
|
1130
|
+
dashboardTheme?: DashboardTheme | null;
|
|
468
1131
|
}
|
|
469
1132
|
declare function DataTable({ data, dashboardTheme }: DataTableProps): react_jsx_runtime.JSX.Element;
|
|
470
1133
|
|
|
471
1134
|
declare const buttonVariants: (props?: ({
|
|
472
|
-
variant?: "
|
|
1135
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
473
1136
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
474
1137
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
475
1138
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -508,7 +1171,11 @@ interface FeedbackButtonsProps {
|
|
|
508
1171
|
}
|
|
509
1172
|
declare function FeedbackButtons({ onFeedback, className, isLoading, selectedFeedback, loadingType, }: FeedbackButtonsProps): react_jsx_runtime.JSX.Element;
|
|
510
1173
|
|
|
511
|
-
|
|
1174
|
+
interface ModelSelectorProps {
|
|
1175
|
+
/** `icon` = sparkles only; `compact` = sparkles + current model label (main toolbar when expanded / multiline). */
|
|
1176
|
+
variant?: 'icon' | 'compact';
|
|
1177
|
+
}
|
|
1178
|
+
declare function ModelSelector({ variant }: ModelSelectorProps): react_jsx_runtime.JSX.Element;
|
|
512
1179
|
|
|
513
1180
|
interface StreamingChatPanelProps {
|
|
514
1181
|
className?: string;
|
|
@@ -561,8 +1228,19 @@ declare function createChartService(client: AxiosInstance): {
|
|
|
561
1228
|
getDashboards: (params: {
|
|
562
1229
|
workspace_id: string;
|
|
563
1230
|
}) => Promise<any>;
|
|
1231
|
+
getDashboardsPaginated: (params: {
|
|
1232
|
+
workspace_id: string;
|
|
1233
|
+
page?: number;
|
|
1234
|
+
per_page?: number;
|
|
1235
|
+
search_term?: string;
|
|
1236
|
+
}) => Promise<any>;
|
|
564
1237
|
getDashboardById: (dashboardId: string) => Promise<any>;
|
|
565
1238
|
updateDashboardLayout: (dashboardId: string, layout: TLayout[]) => Promise<any>;
|
|
1239
|
+
createDashboard: (payload: {
|
|
1240
|
+
title: string;
|
|
1241
|
+
description?: string;
|
|
1242
|
+
workspace_id: string;
|
|
1243
|
+
}) => Promise<any>;
|
|
566
1244
|
createChat: (data: {
|
|
567
1245
|
name: string;
|
|
568
1246
|
dashboard_id: string;
|
|
@@ -600,6 +1278,12 @@ declare function createChartService(client: AxiosInstance): {
|
|
|
600
1278
|
removeBookmark: (bookmarkId: string) => Promise<any>;
|
|
601
1279
|
updateResponseLabel: (llm_data_id: string, label: "positive" | "negative") => Promise<any>;
|
|
602
1280
|
branchConversation: (dashboard_id: string, llm_data_id: string) => Promise<any>;
|
|
1281
|
+
submitToolConfirmation: (data: {
|
|
1282
|
+
request_id: string;
|
|
1283
|
+
confirmation_id: string;
|
|
1284
|
+
confirmed: boolean;
|
|
1285
|
+
message?: string;
|
|
1286
|
+
}) => Promise<any>;
|
|
603
1287
|
getModels: () => Promise<any>;
|
|
604
1288
|
generateProactiveDashboard: (payload: {
|
|
605
1289
|
workspace_id: string;
|
|
@@ -608,6 +1292,66 @@ declare function createChartService(client: AxiosInstance): {
|
|
|
608
1292
|
}) => Promise<any>;
|
|
609
1293
|
};
|
|
610
1294
|
|
|
1295
|
+
interface SlackIntegrationStatus {
|
|
1296
|
+
connected: boolean;
|
|
1297
|
+
team_name?: string;
|
|
1298
|
+
team_id?: string;
|
|
1299
|
+
connected_at?: string;
|
|
1300
|
+
scopes?: string[];
|
|
1301
|
+
requires_reauth?: boolean;
|
|
1302
|
+
error_code?: string;
|
|
1303
|
+
error_message?: string;
|
|
1304
|
+
error_timestamp?: string;
|
|
1305
|
+
can_reactivate?: boolean;
|
|
1306
|
+
}
|
|
1307
|
+
interface SlackDisconnectResponse {
|
|
1308
|
+
success: boolean;
|
|
1309
|
+
message: string;
|
|
1310
|
+
count: number;
|
|
1311
|
+
}
|
|
1312
|
+
interface SlackReactivateResponse {
|
|
1313
|
+
success: boolean;
|
|
1314
|
+
message: string;
|
|
1315
|
+
status: {
|
|
1316
|
+
status: string;
|
|
1317
|
+
team_name?: string;
|
|
1318
|
+
team_id?: string;
|
|
1319
|
+
requires_reauth?: boolean;
|
|
1320
|
+
error_code?: string;
|
|
1321
|
+
};
|
|
1322
|
+
}
|
|
1323
|
+
interface WorkspaceAccess {
|
|
1324
|
+
workspace_id: string;
|
|
1325
|
+
name: string;
|
|
1326
|
+
workspace_type: string;
|
|
1327
|
+
allowed: boolean;
|
|
1328
|
+
}
|
|
1329
|
+
interface WorkspaceAccessSettings {
|
|
1330
|
+
team_id: string;
|
|
1331
|
+
team_name: string;
|
|
1332
|
+
total_workspaces: number;
|
|
1333
|
+
allowed_workspaces: number;
|
|
1334
|
+
updated_at: string | null;
|
|
1335
|
+
updated_by_user_id: string | null;
|
|
1336
|
+
}
|
|
1337
|
+
interface WorkspaceAccessResponse {
|
|
1338
|
+
success: boolean;
|
|
1339
|
+
workspaces: WorkspaceAccess[];
|
|
1340
|
+
settings: WorkspaceAccessSettings;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* Slack API (matches [slack.service](papermap/src/services/slack.service.ts)); uses the Papermap API client and embed token.
|
|
1345
|
+
*/
|
|
1346
|
+
declare function createSlackService(client: AxiosInstance, baseUrl: string): {
|
|
1347
|
+
getStatus(): Promise<SlackIntegrationStatus>;
|
|
1348
|
+
initiateOAuth(rawToken: string): Promise<void>;
|
|
1349
|
+
disconnect(): Promise<SlackDisconnectResponse>;
|
|
1350
|
+
reactivate(): Promise<SlackReactivateResponse>;
|
|
1351
|
+
getWorkspaceAccess(teamId: string): Promise<WorkspaceAccessResponse>;
|
|
1352
|
+
updateWorkspaceAccess(teamId: string, allowedWorkspaceIds: string[]): Promise<WorkspaceAccessResponse>;
|
|
1353
|
+
};
|
|
1354
|
+
|
|
611
1355
|
/** Plain JSON object (not array, not null). */
|
|
612
1356
|
type JsonObject = Record<string, unknown>;
|
|
613
1357
|
/** Workspace `meta` fields used for dashboard theming (matches main app). */
|
|
@@ -646,6 +1390,7 @@ declare function createWorkspaceService(client: AxiosInstance): {
|
|
|
646
1390
|
getWorkspace: (workspaceId: string) => Promise<any>;
|
|
647
1391
|
updateWorkspace: (workspaceId: string, workspace: JsonObject) => Promise<any>;
|
|
648
1392
|
verifyDatabaseConnection: (workspaceId: string) => Promise<any>;
|
|
1393
|
+
createUnifiedWorkspace: (name?: string) => Promise<any>;
|
|
649
1394
|
};
|
|
650
1395
|
|
|
651
1396
|
type PapermapHttpServices = {
|
|
@@ -653,6 +1398,9 @@ type PapermapHttpServices = {
|
|
|
653
1398
|
streamingSvc: ReturnType<typeof createStreamingService>;
|
|
654
1399
|
chartSvc: ReturnType<typeof createChartService>;
|
|
655
1400
|
workspaceSvc: ReturnType<typeof createWorkspaceService>;
|
|
1401
|
+
slackSvc: ReturnType<typeof createSlackService>;
|
|
1402
|
+
/** Raw embed token (used for Slack OAuth redirect). */
|
|
1403
|
+
token: string;
|
|
656
1404
|
baseUrl: string;
|
|
657
1405
|
};
|
|
658
1406
|
declare function createPapermapServices(config: {
|
|
@@ -666,6 +1414,7 @@ type MessageProgressEvent = {
|
|
|
666
1414
|
};
|
|
667
1415
|
interface Message {
|
|
668
1416
|
id?: string;
|
|
1417
|
+
/** Preferred id for bookmark / feedback / branch APIs when both are present (matches main app). */
|
|
669
1418
|
llm_data_id?: string;
|
|
670
1419
|
content: string;
|
|
671
1420
|
role: 'user' | 'assistant' | 'error' | 'branch';
|
|
@@ -747,6 +1496,21 @@ interface PapermapStoreConfig {
|
|
|
747
1496
|
* `PapermapProvider` supplies a shared instance when `observability` options are passed.
|
|
748
1497
|
*/
|
|
749
1498
|
observability?: PapermapObservability;
|
|
1499
|
+
/**
|
|
1500
|
+
* ChatAssistant scroll: `top` mimics main-app onboarding (open at top, less aggressive bottom follow).
|
|
1501
|
+
* Omit or `bottom` for default bottom-anchored chat scrolling.
|
|
1502
|
+
*/
|
|
1503
|
+
initialChatScroll?: 'top' | 'bottom';
|
|
1504
|
+
/**
|
|
1505
|
+
* When true, bookmark actions in chat are hidden (mirrors main app viewer role).
|
|
1506
|
+
* `PapermapProvider` / `PaperChat` forward this; hosts using only metadata can pass without an API role fetch.
|
|
1507
|
+
*/
|
|
1508
|
+
isViewer?: boolean;
|
|
1509
|
+
/**
|
|
1510
|
+
* When true, `ChatAssistant` uses column-friendly layout (no floating card chrome). Hosts embed via
|
|
1511
|
+
* `PapermapProvider` + a sized parent, or pass from `PaperChat` when it creates the provider.
|
|
1512
|
+
*/
|
|
1513
|
+
assistantInline?: boolean;
|
|
750
1514
|
}
|
|
751
1515
|
type Services = PapermapHttpServices;
|
|
752
1516
|
interface Refs {
|
|
@@ -802,6 +1566,30 @@ interface PapermapState {
|
|
|
802
1566
|
sseIsStreaming: boolean;
|
|
803
1567
|
sseIsComplete: boolean;
|
|
804
1568
|
sseError: string | null;
|
|
1569
|
+
/**
|
|
1570
|
+
* Bound to `useAnalyticsStream().submitConfirmation` while an SSE request is active.
|
|
1571
|
+
* Used by `StreamingTimeline` / tool confirmation UI.
|
|
1572
|
+
*/
|
|
1573
|
+
sseSubmitConfirmation: ((confirmationId: string, confirmed: boolean, message?: string) => Promise<void>) | null;
|
|
1574
|
+
/** Workspace role: hide bookmark affordances when true. Synced from `PapermapStoreConfig.isViewer`. */
|
|
1575
|
+
isViewer: boolean;
|
|
1576
|
+
/** Column / side-panel layout for `ChatAssistant` (see `PapermapStoreConfig.assistantInline`). */
|
|
1577
|
+
assistantInline: boolean;
|
|
1578
|
+
/**
|
|
1579
|
+
* Bottom toolbar height (PaperChat input strip), measured via ResizeObserver.
|
|
1580
|
+
* Feeds `getAssistantDimensions` expanded height like main app `useChartStore().toolbarHeight`.
|
|
1581
|
+
*/
|
|
1582
|
+
toolbarHeight: number;
|
|
1583
|
+
/**
|
|
1584
|
+
* Sheet / floating chart overlay open — mirrors main `sheetChartUiOpen` on `ChatAssistant`
|
|
1585
|
+
* so the inline “Show Chart” chip hides when the overlay is already up.
|
|
1586
|
+
*/
|
|
1587
|
+
sheetChartUiOpen: boolean;
|
|
1588
|
+
/**
|
|
1589
|
+
* Registered by `ChatSidePanelInner` so inline `ChatAssistant` can open `FloatingChartOverlay`
|
|
1590
|
+
* instead of only toggling the split chart column.
|
|
1591
|
+
*/
|
|
1592
|
+
externalShowChartHandler: ((visible: boolean) => void) | null;
|
|
805
1593
|
}
|
|
806
1594
|
interface PapermapActions {
|
|
807
1595
|
setMessages: (messages: Message[] | ((prev: Message[]) => Message[])) => void;
|
|
@@ -825,10 +1613,21 @@ interface PapermapActions {
|
|
|
825
1613
|
updateChartVisuals: (v: Record<string, unknown>) => void;
|
|
826
1614
|
updateLatestChart: (result: unknown) => void;
|
|
827
1615
|
clearLatestChart: () => void;
|
|
1616
|
+
/**
|
|
1617
|
+
* Merge one chart meta field into `allMeta` (dialog title edits, etc.). Matches main `updateChartMeta` field-wise merge.
|
|
1618
|
+
*/
|
|
1619
|
+
patchChartMeta: (key: 'title' | 'description' | 'footer' | 'subtitle', value: string) => void;
|
|
828
1620
|
setUseSSEStreaming: (v: boolean) => void;
|
|
829
1621
|
setSseRequestId: (v: string | null) => void;
|
|
830
1622
|
setSseChatId: (v: string | null) => void;
|
|
831
1623
|
clearStreamingState: () => void;
|
|
1624
|
+
/** Called from `SSESync` to wire tool Allow/Deny into the analytics stream hook */
|
|
1625
|
+
setSseSubmitConfirmation: (fn: ((confirmationId: string, confirmed: boolean, message?: string) => Promise<void>) | null) => void;
|
|
1626
|
+
setIsViewer: (v: boolean) => void;
|
|
1627
|
+
setAssistantInline: (v: boolean) => void;
|
|
1628
|
+
setToolbarHeight: (v: number) => void;
|
|
1629
|
+
setSheetChartUiOpen: (v: boolean) => void;
|
|
1630
|
+
setExternalShowChartHandler: (fn: ((visible: boolean) => void) | null) => void;
|
|
832
1631
|
syncSseDisplay: (data: {
|
|
833
1632
|
thoughts: AgentThought[];
|
|
834
1633
|
toolCalls: ToolCall[];
|
|
@@ -851,6 +1650,8 @@ interface PapermapActions {
|
|
|
851
1650
|
getConfig: () => PapermapStoreConfig;
|
|
852
1651
|
}
|
|
853
1652
|
type PapermapStore = PapermapState & PapermapActions;
|
|
1653
|
+
/** Default assistant bubble when a thread has no messages yet (API empty or before load). */
|
|
1654
|
+
declare const PAPERMAP_CHAT_GREETING_MESSAGE: Message;
|
|
854
1655
|
declare function createPapermapStore(config: PapermapStoreConfig, injectedServices?: PapermapHttpServices): zustand.StoreApi<PapermapStore>;
|
|
855
1656
|
type PapermapStoreApi = ReturnType<typeof createPapermapStore>;
|
|
856
1657
|
interface OpenPapermapChatAssistantOptions {
|
|
@@ -876,7 +1677,7 @@ interface OpenPapermapChatAssistantOptions {
|
|
|
876
1677
|
* open in edit mode for that chart.
|
|
877
1678
|
*
|
|
878
1679
|
* When chart is provided (e.g. from ChartCard), primes the store like the main
|
|
879
|
-
* app openEditChartModal: setMessages([]), updateAllMeta(chart.meta),
|
|
1680
|
+
* app openEditChartModal: setMessages([greeting]), updateAllMeta(chart.meta),
|
|
880
1681
|
* updateChartData/Type/Visuals(chart.chart_response), then set editChatId and open.
|
|
881
1682
|
* ConversationLoader still runs loadConversations() for messages; variant shows
|
|
882
1683
|
* immediately from chart.meta.
|
|
@@ -884,7 +1685,7 @@ interface OpenPapermapChatAssistantOptions {
|
|
|
884
1685
|
declare function openPapermapChatAssistant(storeApi: PapermapStoreApi, options?: OpenPapermapChatAssistantOptions): void;
|
|
885
1686
|
|
|
886
1687
|
/** Mirrors `package.json` version; run `npm run sync:sdk-version` or `npm run build` to refresh. */
|
|
887
|
-
declare const PAPERMAP_SDK_VERSION: "1.1.
|
|
1688
|
+
declare const PAPERMAP_SDK_VERSION: "1.1.2";
|
|
888
1689
|
/** Contract revision for hosts that gate advanced features; bump only for breaking contract changes. */
|
|
889
1690
|
declare const PAPERMAP_PLUGIN_CONTRACT_VERSION: 1;
|
|
890
1691
|
type PapermapCapability = 'chat' | 'charts' | 'dashboard' | 'streaming' | 'workspace' | (string & {});
|
|
@@ -941,6 +1742,12 @@ type PapermapConnectionValue = {
|
|
|
941
1742
|
};
|
|
942
1743
|
type PapermapProviderProps = Omit<PapermapStoreConfig, 'observability'> & {
|
|
943
1744
|
children: React__default.ReactNode;
|
|
1745
|
+
/**
|
|
1746
|
+
* Color scheme for the plugin UI (`light` / `dark` / `system`), matching main-app embedded
|
|
1747
|
+
* `?theme=` and `EmbeddedThemeProvider` (`next-themes` + `document.documentElement` class sync).
|
|
1748
|
+
* Default `light`.
|
|
1749
|
+
*/
|
|
1750
|
+
theme?: PapermapColorScheme;
|
|
944
1751
|
/** Optional structured telemetry; forwarded to the Zustand store and SSE bridge. */
|
|
945
1752
|
observability?: PapermapObservabilityOptions;
|
|
946
1753
|
/** Optional plugin manifest + lifecycle (v1 contract). Safe to omit for all existing embeds. */
|
|
@@ -953,12 +1760,12 @@ type PapermapProviderProps = Omit<PapermapStoreConfig, 'observability'> & {
|
|
|
953
1760
|
* provider creates a **new** Zustand store and **new** `QueryClient`. Chat UI state and TanStack Query
|
|
954
1761
|
* cache from the previous boundary are not carried over, which avoids stale tenant/workspace data.
|
|
955
1762
|
*
|
|
956
|
-
* **Stable props:** Changing only `initialModel`, `onModelChange`, `observability`, `plugin`, or
|
|
1763
|
+
* **Stable props:** Changing only `initialModel`, `initialChatScroll`, `isViewer`, `assistantInline`, `theme`, `onModelChange`, `observability`, `plugin`, or
|
|
957
1764
|
* `children` does **not** reset the store or query cache (except `observability.mirrorToConsoleInDev`,
|
|
958
1765
|
* which recreates the telemetry facade). `onModelChange` / `onTelemetry` / `onError` may be inline —
|
|
959
1766
|
* the latest callback is always invoked via refs.
|
|
960
1767
|
*/
|
|
961
|
-
declare function PapermapProvider({ children, token, workspaceId, dashboardId, apiUrl, initialModel, onModelChange, observability: observabilityProp, plugin, }: PapermapProviderProps): react_jsx_runtime.JSX.Element;
|
|
1768
|
+
declare function PapermapProvider({ children, token, workspaceId, dashboardId, apiUrl, initialModel, initialChatScroll, isViewer, assistantInline, onModelChange, observability: observabilityProp, plugin, theme, }: PapermapProviderProps): react_jsx_runtime.JSX.Element;
|
|
962
1769
|
declare function usePapermapStore<T>(selector: (state: PapermapStore) => T): T;
|
|
963
1770
|
/**
|
|
964
1771
|
* Access the raw store API (for refs, services, imperative calls).
|
|
@@ -1008,6 +1815,13 @@ interface UseAnalyticsStreamOptions {
|
|
|
1008
1815
|
onError?: (error: string) => void;
|
|
1009
1816
|
onThought?: (thought: AgentThought) => void;
|
|
1010
1817
|
onToolCall?: (toolCall: ToolCall) => void;
|
|
1818
|
+
/** HTTP implementation — typically `chartSvc.submitToolConfirmation` from the store */
|
|
1819
|
+
submitToolConfirmationRequest?: (data: {
|
|
1820
|
+
request_id: string;
|
|
1821
|
+
confirmation_id: string;
|
|
1822
|
+
confirmed: boolean;
|
|
1823
|
+
message?: string;
|
|
1824
|
+
}) => Promise<unknown>;
|
|
1011
1825
|
}
|
|
1012
1826
|
/**
|
|
1013
1827
|
* Adapted from papermap's useAnalyticsStream.
|
|
@@ -1016,6 +1830,7 @@ interface UseAnalyticsStreamOptions {
|
|
|
1016
1830
|
declare function useAnalyticsStream(requestId: string | null, authHeaders: Record<string, string>, apiUrl: string, options?: UseAnalyticsStreamOptions): {
|
|
1017
1831
|
disconnect: () => void;
|
|
1018
1832
|
markRequestAsCompleted: (reqId: string) => void;
|
|
1833
|
+
submitConfirmation: (confirmationId: string, confirmed: boolean, message?: string) => Promise<void>;
|
|
1019
1834
|
thoughts: AgentThought[];
|
|
1020
1835
|
toolCalls: ToolCall[];
|
|
1021
1836
|
timeline: TimelineEvent[];
|
|
@@ -1078,7 +1893,16 @@ declare const papermapQueryKeys: {
|
|
|
1078
1893
|
readonly chartCards: (workspaceId: string, dashboardId: string, apiUrl?: string) => readonly ["papermap", string, "ws", string, "dash", string, "chartCards"];
|
|
1079
1894
|
readonly dashboardsForWorkspace: (workspaceId: string, apiUrl?: string) => readonly ["papermap", string, "ws", string, "dashboards"];
|
|
1080
1895
|
readonly workspacesList: (apiUrl?: string) => readonly ["papermap", string, "workspaces", "list"];
|
|
1896
|
+
/** Infinite workspace list with optional search (matches main app workspace selector). */
|
|
1897
|
+
readonly workspacesInfinite: (apiUrl: string | undefined, searchTerm: string | undefined) => readonly ["papermap", string, "workspaces", "infinite", string];
|
|
1898
|
+
/** Paginated dashboards for a workspace with optional search. */
|
|
1899
|
+
readonly dashboardsPaginated: (workspaceId: string | undefined, apiUrl: string | undefined, page: number, perPage: number, searchTerm: string | undefined) => readonly ["papermap", string, "ws", string, "dashboardsPaginated", number, number, string];
|
|
1081
1900
|
readonly models: (apiUrl: string | undefined, token: string) => readonly ["papermap", string, "models", string];
|
|
1901
|
+
readonly slack: {
|
|
1902
|
+
readonly all: (apiUrl: string | undefined) => readonly ["papermap", string, "slack"];
|
|
1903
|
+
readonly status: (apiUrl: string | undefined) => readonly ["papermap", string, "slack", "status"];
|
|
1904
|
+
readonly workspaceAccess: (apiUrl: string | undefined, teamId: string) => readonly ["papermap", string, "slack", "workspace-access", string];
|
|
1905
|
+
};
|
|
1082
1906
|
};
|
|
1083
1907
|
|
|
1084
1908
|
interface PaperBoardProps {
|
|
@@ -1090,7 +1914,17 @@ interface PaperBoardProps {
|
|
|
1090
1914
|
layouts?: PaperBoardLayouts;
|
|
1091
1915
|
onLayoutsChange?: (layouts: PaperBoardLayouts) => void;
|
|
1092
1916
|
isEditMode?: boolean;
|
|
1917
|
+
/**
|
|
1918
|
+
* Show the **dashboard** toolbar (generate, screenshot, edit layout, theme, etc.) in the page header.
|
|
1919
|
+
* Main app `TGridDashboard.showToolbar`. Default `true`.
|
|
1920
|
+
*/
|
|
1093
1921
|
showToolbar?: boolean;
|
|
1922
|
+
/**
|
|
1923
|
+
* Show **per-chart** controls (maximize, edit, delete) on each `PaperCard`. Independent of `showToolbar`.
|
|
1924
|
+
* Main app `TGridDashboard.showChatToolbar` on `ChartCard`. When omitted, matches `showToolbar` so
|
|
1925
|
+
* `showToolbar={false}` still hides both toolbars.
|
|
1926
|
+
*/
|
|
1927
|
+
showChatToolbar?: boolean;
|
|
1094
1928
|
showScreenshot?: boolean;
|
|
1095
1929
|
showGenerateDashboard?: boolean;
|
|
1096
1930
|
editLayout?: boolean;
|
|
@@ -1149,8 +1983,58 @@ interface PaperBoardProps {
|
|
|
1149
1983
|
workspaceId: string;
|
|
1150
1984
|
dashboardId: string;
|
|
1151
1985
|
}) => void;
|
|
1986
|
+
/** Color scheme when this component creates `PapermapProvider` (embedded `?theme=` parity). */
|
|
1987
|
+
theme?: PapermapColorScheme;
|
|
1988
|
+
/**
|
|
1989
|
+
* When true, render main-app-style top bar (logo, workspace selector, integrations, user)
|
|
1990
|
+
* and tab navigation above the `PageHeader` and grid. Default `false` for embeds; set `true` for full-app chrome.
|
|
1991
|
+
*/
|
|
1992
|
+
showAppChrome?: boolean;
|
|
1993
|
+
/**
|
|
1994
|
+
* Override default tab items (Papermap web app deep links with workspace/dashboard query params).
|
|
1995
|
+
* When omitted, items are built from the workspace API entity (see `buildDashboardNavItems`).
|
|
1996
|
+
*/
|
|
1997
|
+
navItems?: DashboardNavbarItem[];
|
|
1998
|
+
/** Shown in the user menu; optional when using embed tokens without a user profile. */
|
|
1999
|
+
user?: {
|
|
2000
|
+
name?: string | null;
|
|
2001
|
+
email?: string | null;
|
|
2002
|
+
} | null;
|
|
2003
|
+
onLogout?: () => void;
|
|
2004
|
+
billingHref?: string;
|
|
2005
|
+
settingsHref?: string;
|
|
2006
|
+
/** Default: Papermap web app origin. */
|
|
2007
|
+
logoutUrl?: string;
|
|
2008
|
+
appHeaderRightSlot?: ReactNode;
|
|
2009
|
+
/**
|
|
2010
|
+
* Mount the dashboard insight tile (mirrors main app `TimelineInsights`).
|
|
2011
|
+
* The tile is injected at the top of every breakpoint layout via
|
|
2012
|
+
* `ensurePaperInsightLayoutItem`. Default `false`.
|
|
2013
|
+
*/
|
|
2014
|
+
showInsights?: boolean;
|
|
2015
|
+
/**
|
|
2016
|
+
* Initial / controlled period for the insight tile. Defaults to `'last_3_months'`
|
|
2017
|
+
* when uncontrolled. Selecting `'custom'` keeps the host's existing range.
|
|
2018
|
+
*/
|
|
2019
|
+
insightsPeriodPreset?: InsightsPeriodPreset;
|
|
2020
|
+
onInsightsPeriodPresetChange?: (preset: InsightsPeriodPreset) => void;
|
|
2021
|
+
/**
|
|
2022
|
+
* Explicit date range for the insight tile. Overrides the auto-computed range
|
|
2023
|
+
* from the preset (use this together with `'custom'` for timeline-scrubbed ranges).
|
|
2024
|
+
*/
|
|
2025
|
+
insightsStartDate?: Date | string;
|
|
2026
|
+
insightsEndDate?: Date | string;
|
|
2027
|
+
/** Click handler for the per-insight "Explore in Chat" arrow. */
|
|
2028
|
+
onInsightExplore?: (chatId: string) => void;
|
|
1152
2029
|
}
|
|
1153
|
-
declare function PaperBoard({ token, workspaceId, dashboardId, apiUrl, showWorkspaceDashboardSelect, onWorkspaceDashboardChange, ...rest }: PaperBoardProps): react_jsx_runtime.JSX.Element;
|
|
2030
|
+
declare function PaperBoard({ token, workspaceId, dashboardId, apiUrl, theme, showWorkspaceDashboardSelect, onWorkspaceDashboardChange, showAppChrome, navItems: navItemsProp, user: userProp, onLogout, billingHref, settingsHref, logoutUrl, appHeaderRightSlot, ...rest }: PaperBoardProps): react_jsx_runtime.JSX.Element;
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
* Mirrors the main app's `ensureTimelineInsightsLayoutItem`. Injects a layout slot
|
|
2034
|
+
* for the dashboard insight tile across every breakpoint if one isn't already
|
|
2035
|
+
* present. No-op for breakpoints that already include `gridId`.
|
|
2036
|
+
*/
|
|
2037
|
+
declare function ensurePaperInsightLayoutItem(layouts: PaperBoardLayouts, gridId: string, defaults?: Partial<TLayout>): PaperBoardLayouts;
|
|
1154
2038
|
|
|
1155
2039
|
declare function readDashboardTourCompleted(key: string): boolean;
|
|
1156
2040
|
declare function markDashboardTourCompleted(key: string): void;
|
|
@@ -1163,6 +2047,23 @@ type BuildDashboardTourStepsOptions = {
|
|
|
1163
2047
|
*/
|
|
1164
2048
|
declare function buildDashboardTourSteps({ showToolbar, showChatAssistant, }: BuildDashboardTourStepsOptions): TourStep[];
|
|
1165
2049
|
|
|
2050
|
+
type BuildDashboardNavItemsParams = {
|
|
2051
|
+
workspaceId: string;
|
|
2052
|
+
dashboardId: string;
|
|
2053
|
+
/** From workspace entity */
|
|
2054
|
+
workspaceType?: string;
|
|
2055
|
+
/** Present when Google Sheet source exists */
|
|
2056
|
+
sheet?: string;
|
|
2057
|
+
isAdmin?: boolean;
|
|
2058
|
+
/** When true, user is read-only; hides editor-only tabs (matches main app viewer gating). */
|
|
2059
|
+
isViewer: boolean;
|
|
2060
|
+
};
|
|
2061
|
+
/**
|
|
2062
|
+
* Main app: [src/navigation/sidebar/sidebarItems.tsx](papermap/src/navigation/sidebar/sidebarItems.tsx).
|
|
2063
|
+
* Links open the hosted Papermap web app with `workspace_id` / `dashboard_id` query params.
|
|
2064
|
+
*/
|
|
2065
|
+
declare function buildDashboardNavItems(params: BuildDashboardNavItemsParams): DashboardNavbarItem[];
|
|
2066
|
+
|
|
1166
2067
|
type ThemePreset = 'default' | 'lime' | 'blue' | 'green' | 'purple' | 'ocean' | 'sunset' | 'dark' | 'minimal';
|
|
1167
2068
|
|
|
1168
2069
|
type ThemeSaveMeta = {
|
|
@@ -1242,4 +2143,4 @@ declare function resolveChartFetchChatId(params: {
|
|
|
1242
2143
|
dashboardId?: string;
|
|
1243
2144
|
}): string | undefined;
|
|
1244
2145
|
|
|
1245
|
-
export { type AgentThought, AgentThoughtDisplay, BookmarkButton, BranchButton, ButtonWithTooltip, CHART_CARD_CHAT_MAP_KEY, CHAT_MODAL_TAB, type ChartCardIdLink, type ChartCardStorageNamespace, type ChartDataRow, ChartDialog, ChartHistory, type ChartResponse, ChartView, type ChartVisualizationConfig, ChatAssistant, type ChatModalTabType, type ConversationHistory, type DashboardNavbarItem, DashboardTabNavigation, type DashboardTabNavigationProps, type DashboardTheme, DataTable, type DecodedToken, FeedbackButtons, type FinalResponse, type JsonObject, LogoStandAlone, type Message, type MessageProgressEvent, ModelSelector, MorphGradient, type OpenPapermapChatAssistantOptions, PAPERMAP_PLUGIN_CONTRACT_VERSION, PAPERMAP_SDK_VERSION, PaperBoard, type TLayout as PaperBoardLayoutItem, type PaperBoardLayouts, PaperCard, type PaperCardProps, PaperChat, type PaperChatProps, PaperDashboardSelect, type PaperDashboardSelectProps, type PapermapActions, type PapermapCapability, PapermapProvider as PapermapConfigProvider, type PapermapConnectionValue, type PapermapHttpServices, type PapermapObservability, type PapermapObservabilityOptions, type PapermapPluginContext, type PapermapPluginLifecycle, type PapermapPluginManifest, type PapermapPluginRegistration, PapermapProvider, type PapermapState, type PapermapStore, type PapermapStoreApi, type PapermapStoreConfig, type PapermapTelemetryEvent, type PapermapTelemetryLevel, RecentConversations, SavedMemory, type StreamState, StreamingChartDialog, StreamingChatPanel, StreamingTimeline, type TChartMeta$1 as TChartMeta, type TChartResponse, ThemeCustomizationSettings, type ThemeCustomizationSettingsProps, type ThemePreset, type ThemeSaveMeta, type TimelineEvent, type ToolCall, ToolCallDisplay, type TourStep, type UseTourOptions, type WorkspaceEntity, type WorkspaceMeta, buildAuthHeaders, buildDashboardTourSteps, checkPluginPeerCompatibility, createApiClient, createPapermapObservability, createPapermapServices, createPapermapStore, createPluginContext, decodeToken, defaultTheme, getChartCardIdLink, markDashboardTourCompleted, openPapermapChatAssistant, papermapApiBaseSegment, papermapQueryKeys, parseSemverPrefix, presetDisplayNames, readDashboardTourCompleted, removeChartCardIdLink, resolveChartFetchChatId, resolveDashboardThemeFromWorkspace, themePresetList, themePresets, unwrapWorkspacePayload, upsertChartCardIdLink, useAnalyticsStream, useAutoFade, useAutoResize, useKeyboardShortcuts, usePapermapConnection, usePapermapConnectionOptional, usePapermapStore, usePapermapStoreApi, usePapermapStoreApiOptional, useTour };
|
|
2146
|
+
export { type AgentThought, AgentThoughtDisplay, BookmarkButton, BranchButton, type BuildDashboardNavItemsParams, ButtonWithTooltip, CHART_CARD_CHAT_MAP_KEY, CHAT_MODAL_TAB, type ChartCardIdLink, type ChartCardStorageNamespace, type ChartDataRow, ChartDialog, ChartHistory, type ChartResponse, ChartView, type ChartVisualizationConfig, ChatAssistant, type ChatModalTabType, ChatSidePanel, type ConversationHistory, CreateDashboardDialog, type CreateDashboardDialogProps, CreateUnifiedWorkspaceDialog, type CreateUnifiedWorkspaceDialogProps, type CreatedDashboard, type CreatedUnifiedWorkspace, DashboardAppHeader, type DashboardInsight, type DashboardInsightType, type DashboardInsightsResult, type DashboardNavbarItem, DashboardTabNavigation, type DashboardTabNavigationProps, type DashboardTheme, DataTable, type DecodedToken, FeedbackButtons, type FinalResponse, FloatingChartOverlay, INSIGHTS_PERIOD_LABELS, INSIGHTS_PERIOD_SELECT_OPTIONS, type InsightsPeriodMenuPreset, type InsightsPeriodPreset, IntegrationsBar, type JsonObject, LogoStandAlone, type Message, type MessageProgressEvent, ModelSelector, MorphGradient, type OpenPapermapChatAssistantOptions, PAPERMAP_CHAT_GREETING_MESSAGE, PAPERMAP_PLUGIN_CONTRACT_VERSION, PAPERMAP_SDK_VERSION, PAPER_INSIGHT_GRID_ID, PaperBoard, type TLayout as PaperBoardLayoutItem, type PaperBoardLayouts, PaperCard, type PaperCardProps, PaperChat, type PaperChatAvatars, PaperChatDialogInner, type PaperChatDialogInnerProps, type PaperChatDialogLauncherPosition, PaperChatFloatingChartOverlay, type PaperChatFloatingChartOverlayProps, type PaperChatProps, PaperChatSidePanel, type PaperChatSidePanelProps, type PaperChatSidePosition, type PaperChatVariant, PaperDashboardSelect, type PaperDashboardSelectProps, PaperInsight, type PaperInsightClassNames, type PaperInsightProps, type PaperInsightSlot, type PaperInsightStyles, type PapermapActions, type PapermapCapability, type PapermapColorScheme, PapermapProvider as PapermapConfigProvider, type PapermapConnectionValue, type PapermapHttpServices, type PapermapObservability, type PapermapObservabilityOptions, type PapermapPluginContext, type PapermapPluginLifecycle, type PapermapPluginManifest, type PapermapPluginRegistration, PapermapProvider, type PapermapState, type PapermapStore, type PapermapStoreApi, type PapermapStoreConfig, type PapermapTelemetryEvent, type PapermapTelemetryLevel, RecentConversations, SavedMemory, type StreamDashboardInsightsOptions, type StreamState, StreamingChartDialog, StreamingChatPanel, StreamingTimeline, type TChartMeta$1 as TChartMeta, type TChartResponse, ThemeCustomizationSettings, type ThemeCustomizationSettingsProps, type ThemePreset, type ThemeSaveMeta, type TimelineEvent, type ToolCall, ToolCallDisplay, type TourStep, type UseTourOptions, UserNav, type WorkspaceEntity, type WorkspaceMeta, WorkspaceSelector, type WorkspaceSelectorControl, WorkspaceSelectorProvider, buildAuthHeaders, buildDashboardNavItems, buildDashboardTourSteps, checkPluginPeerCompatibility, computeInsightsPeriodRange, createApiClient, createPapermapObservability, createPapermapServices, createPapermapStore, createPluginContext, decodeToken, defaultTheme, ensurePaperInsightLayoutItem, formatInsightDate, formatInsightsDateLabel, getChartCardIdLink, markDashboardTourCompleted, normalizeInsightType, openPapermapChatAssistant, orderInsightsForDisplay, papermapApiBaseSegment, papermapQueryKeys, parseInsightMetricToTrend, parseSemverPrefix, presetDisplayNames, readDashboardTourCompleted, removeChartCardIdLink, resolveChartFetchChatId, resolveDashboardThemeFromWorkspace, streamDashboardInsights, themePresetList, themePresets, unwrapWorkspacePayload, upsertChartCardIdLink, useAnalyticsStream, useAutoFade, useAutoResize, useKeyboardShortcuts, usePapermapConnection, usePapermapConnectionOptional, usePapermapStore, usePapermapStoreApi, usePapermapStoreApiOptional, useTour };
|