@tangle-network/agent-app 0.52.18 → 0.53.1
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/assistant/AssistantDock.d.ts +34 -28
- package/dist/assistant/AssistantPanel.d.ts +27 -28
- package/dist/assistant/ResizeHandle.d.ts +3 -3
- package/dist/assistant/index.d.ts +8 -5
- package/dist/assistant/index.js +851 -708
- package/dist/assistant/index.js.map +1 -1
- package/dist/assistant/launcher.d.ts +31 -8
- package/dist/assistant/page-context.d.ts +23 -0
- package/dist/assistant/panel-toggle.d.ts +23 -0
- package/dist/assistant/transcript.d.ts +24 -81
- package/dist/assistant/types.d.ts +19 -7
- package/dist/assistant/useAssistantChat.d.ts +6 -1
- package/dist/assistant/usePanelPrefs.d.ts +34 -42
- package/package.json +1 -1
|
@@ -1,23 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* Shared panel state for the assistant. The dock is mounted once in the app
|
|
3
|
+
* shell, but other surfaces need to open it (a page's "Create with assistant"
|
|
4
|
+
* button seeds the composer), and the shell's page column needs to know how
|
|
5
|
+
* much room the docked panel takes so the panel never covers page content.
|
|
6
|
+
* This context owns the open state, the one-shot composer seed, the panel's
|
|
7
|
+
* per-user width and open preference, and the docked-or-sheet layout.
|
|
7
8
|
*/
|
|
8
9
|
import { type ReactNode } from "react";
|
|
10
|
+
import { type PanelPrefs } from "./usePanelPrefs";
|
|
11
|
+
/** `docked`: a column beside the page (wide viewports). `sheet`: a modal
|
|
12
|
+
* overlay, full screen on phones. */
|
|
13
|
+
export type AssistantPanelLayout = "docked" | "sheet";
|
|
9
14
|
export interface AssistantLauncher {
|
|
10
|
-
/** Whether the assistant
|
|
15
|
+
/** Whether the assistant panel is open. */
|
|
11
16
|
open: boolean;
|
|
12
17
|
/** A one-shot starter prompt to prefill the composer with, or null. */
|
|
13
18
|
seed: string | null;
|
|
14
|
-
/** Open the
|
|
19
|
+
/** Open the panel; optionally prefill the composer with `seed`. */
|
|
15
20
|
openAssistant: (seed?: string) => void;
|
|
16
21
|
closeAssistant: () => void;
|
|
22
|
+
toggleAssistant: () => void;
|
|
17
23
|
/** Clear the pending seed once the composer has applied it (consume-once). */
|
|
18
24
|
clearSeed: () => void;
|
|
25
|
+
layout: AssistantPanelLayout;
|
|
26
|
+
/** True when the panel is open because the user left it open last visit,
|
|
27
|
+
* not because they just opened it. The dock leaves focus on the page then. */
|
|
28
|
+
openedOnLoad: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Pixels the open docked panel covers at the viewport's right edge; 0 when
|
|
31
|
+
* the panel is closed or opens as a sheet. Pad the page column's right side
|
|
32
|
+
* by this so the panel sits beside the page instead of over it.
|
|
33
|
+
*/
|
|
34
|
+
inset: number;
|
|
35
|
+
/** The panel's per-user width controls (used by the dock). */
|
|
36
|
+
panel: Pick<PanelPrefs, "width" | "maxWidth" | "setWidth" | "previewWidth" | "nudgeWidth">;
|
|
19
37
|
}
|
|
20
|
-
export declare function AssistantLauncherProvider({ children, }: {
|
|
38
|
+
export declare function AssistantLauncherProvider({ userId, children, }: {
|
|
39
|
+
/** The signed-in user. Open state and width persist per user; null keeps
|
|
40
|
+
* them in memory only. */
|
|
41
|
+
userId?: string | null;
|
|
21
42
|
children: ReactNode;
|
|
22
43
|
}): import("react").JSX.Element;
|
|
44
|
+
/** The launcher, or null outside an `AssistantLauncherProvider`. */
|
|
45
|
+
export declare function useOptionalAssistantLauncher(): AssistantLauncher | null;
|
|
23
46
|
export declare function useAssistantLauncher(): AssistantLauncher;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The page the assistant is looking at, read from the document title. Product
|
|
3
|
+
* pages already name themselves in `<title>` for tabs and history, so the
|
|
4
|
+
* title is the label; watching it keeps hosts free of per-page wiring and
|
|
5
|
+
* follows titles that settle late (a run page names its workflow once the
|
|
6
|
+
* workflow loads).
|
|
7
|
+
*/
|
|
8
|
+
import type { AssistantPageContext } from "./types";
|
|
9
|
+
/** Pass module-level `titleSuffix`, `ignoreTitles` and `ids` so the context
|
|
10
|
+
* keeps its identity between renders. */
|
|
11
|
+
export interface DocumentPageContextOptions {
|
|
12
|
+
/** The current in-app path, from the host router. */
|
|
13
|
+
path: string;
|
|
14
|
+
/** The product suffix to drop from titles, e.g. / — Tangle Platform$/. */
|
|
15
|
+
titleSuffix?: RegExp;
|
|
16
|
+
/** Titles that name no particular page (the bare product name). */
|
|
17
|
+
ignoreTitles?: readonly string[];
|
|
18
|
+
/** Tool-facing ids for the path, e.g. `{ workflowId, runId }`. */
|
|
19
|
+
ids?: (path: string) => Record<string, string> | undefined;
|
|
20
|
+
}
|
|
21
|
+
/** `title` minus the product suffix, or null when nothing page-specific is left. */
|
|
22
|
+
export declare function pageLabelFromTitle(title: string, titleSuffix?: RegExp, ignoreTitles?: readonly string[]): string | null;
|
|
23
|
+
export declare function useDocumentPageContext({ path, titleSuffix, ignoreTitles, ids, }: DocumentPageContextOptions): AssistantPageContext | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The assistant panel's open/close control. It mirrors the left sidebar's
|
|
3
|
+
* collapse control in the shared dashboard shell: the same panel glyph (here
|
|
4
|
+
* the right-hand one), the same 32px target and 18px glyph, quiet until hover.
|
|
5
|
+
* The dock renders it floating at the top right while the panel is closed and
|
|
6
|
+
* in the panel header's inner edge while it is open; a host with its own top
|
|
7
|
+
* bar (a phone header) renders it there instead.
|
|
8
|
+
*/
|
|
9
|
+
import type { CSSProperties, Ref } from "react";
|
|
10
|
+
/** DOM id of the open panel, for the toggle's `aria-controls`. */
|
|
11
|
+
export declare const ASSISTANT_PANEL_ID = "assistant-panel";
|
|
12
|
+
/** The shortcut as the user's keyboard labels it. */
|
|
13
|
+
export declare function assistantShortcutLabel(): string;
|
|
14
|
+
export interface AssistantPanelToggleProps {
|
|
15
|
+
/** Override the launcher's open state (the panel header passes `true`). */
|
|
16
|
+
open?: boolean;
|
|
17
|
+
/** Override the launcher's toggle (the panel header passes its `onClose`). */
|
|
18
|
+
onToggle?: () => void;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
buttonRef?: Ref<HTMLButtonElement>;
|
|
22
|
+
}
|
|
23
|
+
export declare function AssistantPanelToggle({ open: openOverride, onToggle, className, style, buttonRef, }: AssistantPanelToggleProps): import("react").JSX.Element;
|
|
@@ -1,97 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The assistant
|
|
3
|
-
* `
|
|
4
|
-
* assistant
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* text) rather than as one text blob followed by a tool group. `status`
|
|
9
|
-
* messages are NOT folded into a turn: each becomes a quiet centered status
|
|
10
|
-
* line rendered by this component between `ChatMessages` runs — a settled
|
|
11
|
-
* action's note ("Created workflow …"), not an assistant-labeled turn.
|
|
2
|
+
* The assistant transcript, rendered with the main chat's primitives: the
|
|
3
|
+
* shared `AgentTimeline` column from `@tangle-network/ui/chat` (user bubble,
|
|
4
|
+
* 15px assistant prose with code blocks, thinking row, status cards) and its
|
|
5
|
+
* `InlineToolItem` tool rows. Sandbox sessions and workflow run pages render
|
|
6
|
+
* through the same components, so the assistant inherits their type scale,
|
|
7
|
+
* spacing and states instead of keeping a second chat style.
|
|
12
8
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
9
|
+
* The reducer streams a flat, per-segment transcript (user / assistant text /
|
|
10
|
+
* `tool` / `status` messages, plus turn-level reasoning and pending
|
|
11
|
+
* proposals). {@link buildAssistantTimeline} maps it onto timeline items in
|
|
12
|
+
* emission order, so text and tool rows interleave as they happened.
|
|
16
13
|
*/
|
|
14
|
+
import { type AgentTimelineItem } from "@tangle-network/ui/chat";
|
|
17
15
|
import { type ReactNode } from "react";
|
|
18
|
-
import { type
|
|
16
|
+
import { type ToolDetailRenderers } from "../web-react";
|
|
19
17
|
import type { AssistantState } from "./reducer";
|
|
20
18
|
import type { AssistantTranscriptView, ConfirmedResult } from "./types";
|
|
21
19
|
/**
|
|
22
20
|
* True while a turn is streaming but the model hasn't emitted its first answer
|
|
23
|
-
* token yet
|
|
24
|
-
*
|
|
21
|
+
* token yet. Drives the timeline's thinking row, so a reasoning gap reads as
|
|
22
|
+
* work in progress rather than a frozen panel.
|
|
25
23
|
*/
|
|
26
24
|
export declare function assistantIsThinking(state: AssistantState): boolean;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
kind: "run";
|
|
31
|
-
messages: ChatUiMessage[];
|
|
32
|
-
}
|
|
33
|
-
/** A settled action's one-line note ("Created workflow …", "Action cancelled."),
|
|
34
|
-
* rendered as a quiet centered line — not routed into `ChatMessages`, where a
|
|
35
|
-
* `system` row would paint as a full assistant-labeled turn. */
|
|
36
|
-
interface StatusLine {
|
|
37
|
-
kind: "status";
|
|
38
|
-
/** The status message's own id — keys the row and any confirmed result. */
|
|
39
|
-
id: string;
|
|
40
|
-
text: string;
|
|
41
|
-
}
|
|
42
|
-
type TranscriptBlock = MessageRun | StatusLine;
|
|
43
|
-
interface AdaptedTranscript {
|
|
44
|
-
/** Transcript-order blocks: message runs broken by status lines. */
|
|
45
|
-
blocks: TranscriptBlock[];
|
|
46
|
-
/** Every adapted chat message across all runs, flattened (status rows
|
|
47
|
-
* excluded — they are the blocks' status lines). */
|
|
48
|
-
messages: ChatUiMessage[];
|
|
49
|
-
/** The assistant message under which pending proposals should render, or null
|
|
50
|
-
* when there are none. */
|
|
51
|
-
proposalHostId: string | null;
|
|
52
|
-
/** The current/most-recent turn's assistant message — where the turn cost line
|
|
53
|
-
* renders (it carries the turn's metrics), or null when there is none. */
|
|
54
|
-
metricsHostId: string | null;
|
|
55
|
-
/** Confirmed-tool results to render under their status line, keyed by that
|
|
56
|
-
* line's id — carried from a `status` message's retained `result` so a host
|
|
57
|
-
* card (e.g. a one-time API-key reveal) renders inline right after the action. */
|
|
58
|
-
confirmedResults: Map<string, ConfirmedResult>;
|
|
25
|
+
export interface AssistantTimelineOptions {
|
|
26
|
+
toolRenderers?: ToolDetailRenderers;
|
|
27
|
+
renderConfirmedResult?: (result: ConfirmedResult) => ReactNode;
|
|
59
28
|
}
|
|
60
29
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* into one assistant message whose ordered `segments` carry the turn's text runs
|
|
65
|
-
* and tool chips IN EMISSION ORDER (with each finished tool's outcome as the chip
|
|
66
|
-
* `result`). The joined text is also kept on `content` — web-react reads it as the
|
|
67
|
-
* "answer has started" signal that gates the reasoning box. The live turn's
|
|
68
|
-
* reasoning preview and model label hang on the last assistant message, and
|
|
69
|
-
* `proposalHostId` names the message the pending proposals render under. A
|
|
70
|
-
* `status` message ends the current run and becomes a {@link StatusLine} block.
|
|
30
|
+
* Map the transcript view onto `AgentTimeline` items. Within the live turn
|
|
31
|
+
* (everything after the latest user message) the reasoning row leads, pending
|
|
32
|
+
* proposals follow the turn's last row, and the settled turn's cost closes it.
|
|
71
33
|
*/
|
|
72
|
-
export declare function
|
|
73
|
-
export interface AssistantTranscriptProps {
|
|
34
|
+
export declare function buildAssistantTimeline(view: AssistantTranscriptView, options?: AssistantTimelineOptions): AgentTimelineItem[];
|
|
35
|
+
export interface AssistantTranscriptProps extends AssistantTimelineOptions {
|
|
74
36
|
view: AssistantTranscriptView;
|
|
75
|
-
/**
|
|
76
|
-
renderMarkdown?: (content: string) => ReactNode;
|
|
77
|
-
/** Per-tool custom detail renderers for expanded tool cards. */
|
|
78
|
-
toolRenderers?: ToolDetailRenderers;
|
|
79
|
-
/** Render a prominent card for a CONFIRMED tool's result, inline after its
|
|
80
|
-
* status line (e.g. a one-time API-key reveal for `create_api_key`). Return
|
|
81
|
-
* null to fall back to just the status line. Unlike `toolRenderers` (collapsed
|
|
82
|
-
* detail for a read-only tool chip), this is shown expanded, so a one-time
|
|
83
|
-
* secret is visible without a click. See {@link ConfirmedResult}. */
|
|
84
|
-
renderConfirmedResult?: (result: ConfirmedResult) => ReactNode;
|
|
85
|
-
/** Zero-state shown for a fresh, non-streaming thread. */
|
|
37
|
+
/** Zero state for a fresh, idle thread. */
|
|
86
38
|
emptyState?: ReactNode;
|
|
87
39
|
}
|
|
88
|
-
|
|
89
|
-
* Render the assistant conversation: message runs through web-react's
|
|
90
|
-
* `ChatMessages` (quiet chrome — the label/meta row becomes a hover-revealed
|
|
91
|
-
* lane, which keeps the narrow dock panel uncluttered), status lines through
|
|
92
|
-
* {@link StatusRow}. Pending proposals render via the panel's bound
|
|
93
|
-
* `view.renderProposal`, placed inline after the proposing turn through
|
|
94
|
-
* `renderExtras`; the settled turn cost renders once under its assistant bubble.
|
|
95
|
-
*/
|
|
96
|
-
export declare function AssistantTranscript({ view, renderMarkdown, toolRenderers, renderConfirmedResult, emptyState, }: AssistantTranscriptProps): import("react").JSX.Element;
|
|
97
|
-
export {};
|
|
40
|
+
export declare function AssistantTranscript({ view, toolRenderers, renderConfirmedResult, emptyState, }: AssistantTranscriptProps): import("react").JSX.Element;
|
|
@@ -7,6 +7,20 @@
|
|
|
7
7
|
import type { ReactNode } from "react";
|
|
8
8
|
/** Define delivery modes for assistant interaction as either steering or queue */
|
|
9
9
|
export type AssistantDeliveryMode = "steering" | "queue";
|
|
10
|
+
/**
|
|
11
|
+
* The page the user has open while talking to the assistant. The panel header
|
|
12
|
+
* shows `label`, and every turn sends the whole object so the model answers
|
|
13
|
+
* about the same page the header names. Ids are the ones the assistant's tools
|
|
14
|
+
* accept (e.g. `{ workflowId, runId }`), so "this run" resolves without asking.
|
|
15
|
+
*/
|
|
16
|
+
export interface AssistantPageContext {
|
|
17
|
+
/** Short name of what is open, e.g. "nightly-ping · run 3f2a1c". */
|
|
18
|
+
label: string;
|
|
19
|
+
/** In-app path of the page, e.g. "/app/workflows/wf_1/runs/wfrun_2". */
|
|
20
|
+
path: string;
|
|
21
|
+
/** Tool-facing ids of the objects on the page. */
|
|
22
|
+
ids?: Record<string, string>;
|
|
23
|
+
}
|
|
10
24
|
/** Request body for `POST /api/v1/assistant/chat`. */
|
|
11
25
|
export interface ChatRequest {
|
|
12
26
|
message: string;
|
|
@@ -18,6 +32,8 @@ export interface ChatRequest {
|
|
|
18
32
|
threadId?: string;
|
|
19
33
|
/** Per-turn idempotency key — guards against double-charge on retry. */
|
|
20
34
|
turnKey?: string;
|
|
35
|
+
/** The page the user has open; omitted when the host names none. */
|
|
36
|
+
context?: AssistantPageContext;
|
|
21
37
|
}
|
|
22
38
|
/** Describe the structure of data representing a thread event with optional model information */
|
|
23
39
|
export interface ThreadEventData {
|
|
@@ -258,13 +274,9 @@ export interface UsageInfo {
|
|
|
258
274
|
replayed: boolean;
|
|
259
275
|
}
|
|
260
276
|
/**
|
|
261
|
-
* The transcript slice
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
* dock chrome, composer, model picker, history, transport, and proposal
|
|
265
|
-
* orchestration. The bound `renderProposal` returns the panel's own proposal
|
|
266
|
-
* card so the host can place it (e.g. inline after the proposing turn) without
|
|
267
|
-
* re-implementing the confirm/cancel flow.
|
|
277
|
+
* The transcript slice the panel hands `AssistantTranscript`: the reducer's
|
|
278
|
+
* messages plus turn-level state, and the panel's bound `renderProposal`, which
|
|
279
|
+
* returns the proposal card wired to the panel's confirm/cancel flow.
|
|
268
280
|
*/
|
|
269
281
|
export interface AssistantTranscriptView {
|
|
270
282
|
messages: ChatMessage[];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* helpers; this hook is the glue between them and the network.
|
|
6
6
|
*/
|
|
7
7
|
import { type AssistantState } from "./reducer";
|
|
8
|
-
import type { AssistantDeliveryMode, ConnectionRequirement, ConnectRequirementResult, PendingProposal } from "./types";
|
|
8
|
+
import type { AssistantDeliveryMode, AssistantPageContext, ConnectionRequirement, ConnectRequirementResult, PendingProposal } from "./types";
|
|
9
9
|
/** Define options for configuring how the assistant sends messages */
|
|
10
10
|
export interface AssistantSendOptions {
|
|
11
11
|
deliveryMode?: AssistantDeliveryMode;
|
|
@@ -30,6 +30,11 @@ export interface UseAssistantChatOptions {
|
|
|
30
30
|
* {@link ProposalCardProps.navigate}).
|
|
31
31
|
*/
|
|
32
32
|
onConnectRequirement?: (requirement: ConnectionRequirement) => Promise<ConnectRequirementResult>;
|
|
33
|
+
/**
|
|
34
|
+
* The page the user has open. Read when a turn starts, so the model sees the
|
|
35
|
+
* page the panel header names at the moment of sending.
|
|
36
|
+
*/
|
|
37
|
+
context?: AssistantPageContext | null;
|
|
33
38
|
}
|
|
34
39
|
/** Define the structure and behavior of an assistant chat session with state, model selection, and message handling */
|
|
35
40
|
export interface AssistantChat {
|
|
@@ -1,55 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Persisted
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Persisted presentation preferences for the assistant panel: whether it is
|
|
3
|
+
* open and how wide it is, per signed-in user, plus the viewport query that
|
|
4
|
+
* decides whether the panel docks beside the page or opens as a sheet over it.
|
|
5
|
+
* Kept out of the components so the storage, clamping, and SSR guards live in
|
|
6
|
+
* one place.
|
|
6
7
|
*/
|
|
7
|
-
/** Narrowest the
|
|
8
|
+
/** Narrowest the panel may be dragged; below this the chat is unusable. */
|
|
8
9
|
export declare const MIN_PANEL_WIDTH = 360;
|
|
9
|
-
/** Default
|
|
10
|
-
export declare const DEFAULT_PANEL_WIDTH =
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare const
|
|
17
|
-
interface
|
|
18
|
-
/**
|
|
10
|
+
/** Default panel width: the main chat's reading measure at the 15px body size. */
|
|
11
|
+
export declare const DEFAULT_PANEL_WIDTH = 480;
|
|
12
|
+
/**
|
|
13
|
+
* Viewports at least this wide dock the panel beside the page; narrower ones
|
|
14
|
+
* open it as a sheet over the page. 80rem leaves a host with a 16rem sidebar a
|
|
15
|
+
* page column of at least 33rem beside the default panel width.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DOCKED_MEDIA_QUERY = "(min-width: 80rem)";
|
|
18
|
+
export interface PanelPrefs {
|
|
19
|
+
/** Last open state the user chose, or null when they never chose one. */
|
|
20
|
+
storedOpen: boolean | null;
|
|
21
|
+
/** Record the user's open/closed choice. */
|
|
22
|
+
persistOpen: (open: boolean) => void;
|
|
23
|
+
/** Current width in px, clamped to the viewport. */
|
|
19
24
|
width: number;
|
|
20
|
-
/** Current max
|
|
21
|
-
* Exposed for an accurate `aria-valuemax` on the resize control. */
|
|
25
|
+
/** Current max width in px, for the resize control's `aria-valuemax`. */
|
|
22
26
|
maxWidth: number;
|
|
23
|
-
/** Set
|
|
24
|
-
* changes — NOT on every drag tick. */
|
|
27
|
+
/** Set and persist a width. Use on drag end and discrete changes. */
|
|
25
28
|
setWidth: (next: number) => void;
|
|
26
|
-
/** Set
|
|
27
|
-
* the panel tracks the pointer without thrashing localStorage every tick. */
|
|
29
|
+
/** Set a width without persisting, for live drag ticks. */
|
|
28
30
|
previewWidth: (next: number) => void;
|
|
29
|
-
/** Nudge by a delta (keyboard resize)
|
|
31
|
+
/** Nudge by a delta (keyboard resize) and persist. */
|
|
30
32
|
nudgeWidth: (deltaPx: number) => void;
|
|
31
33
|
}
|
|
32
34
|
/**
|
|
33
|
-
* The
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* window
|
|
35
|
+
* The panel's per-user open state and width. Both reload when the user
|
|
36
|
+
* changes, so two accounts on one browser keep their own layout. The width is
|
|
37
|
+
* re-clamped on viewport resize from the user's chosen value, so a narrow
|
|
38
|
+
* window never overwrites the choice.
|
|
37
39
|
*/
|
|
38
|
-
export declare function
|
|
39
|
-
interface FontScale {
|
|
40
|
-
scale: number;
|
|
41
|
-
increase: () => void;
|
|
42
|
-
decrease: () => void;
|
|
43
|
-
canIncrease: boolean;
|
|
44
|
-
canDecrease: boolean;
|
|
45
|
-
}
|
|
46
|
-
/** The panel's persisted font-size scale, with bounded A−/A+ controls. */
|
|
47
|
-
export declare function useFontScale(): FontScale;
|
|
40
|
+
export declare function usePanelPrefs(userId: string | null): PanelPrefs;
|
|
48
41
|
/**
|
|
49
|
-
* Whether
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
42
|
+
* Whether a media query matches, read synchronously on first render so the
|
|
43
|
+
* panel never first-paints in the wrong layout. A runtime without matchMedia
|
|
44
|
+
* (jsdom, some webviews) keeps `fallback` instead of throwing; the panel lives
|
|
45
|
+
* in the always-mounted shell.
|
|
53
46
|
*/
|
|
54
|
-
export declare function
|
|
55
|
-
export {};
|
|
47
|
+
export declare function useMediaQuery(query: string, fallback?: boolean): boolean;
|
package/package.json
CHANGED