@tangle-network/agent-app 0.45.35 → 0.45.37
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/{agent-session-controls-1q1XR3j8.d.ts → agent-session-controls-CCeu5QLS.d.ts} +59 -5
- package/dist/assistant/index.d.ts +2 -1
- package/dist/assistant/index.js +2 -2
- package/dist/chat-react/index.d.ts +1 -1
- package/dist/chat-react/index.js +1 -1
- package/dist/{chunk-MIZMWCKW.js → chunk-3AXSERRK.js} +258 -110
- package/dist/chunk-3AXSERRK.js.map +1 -0
- package/dist/{chunk-AIHKKLKY.js → chunk-TB7T7C3X.js} +64 -84
- package/dist/chunk-TB7T7C3X.js.map +1 -0
- package/dist/theme/tokens.css +17 -0
- package/dist/web-react/index.d.ts +21 -9
- package/dist/web-react/index.js +8 -2
- package/package.json +11 -3
- package/dist/chunk-AIHKKLKY.js.map +0 -1
- package/dist/chunk-MIZMWCKW.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, RefObject } from 'react';
|
|
3
3
|
import { F as FileMention } from './wire-DOZ-O6hD.js';
|
|
4
4
|
import { Harness } from './harness/index.js';
|
|
5
5
|
import { CatalogModel } from './catalog/index.js';
|
|
@@ -104,16 +104,70 @@ declare function useFileMentions(options: UseFileMentionsOptions): UseFileMentio
|
|
|
104
104
|
* trigger so keyboard users aren't dropped at the top of the document. The
|
|
105
105
|
* returned `triggerProps` carry the ARIA contract (`aria-haspopup`/
|
|
106
106
|
* `aria-expanded`); spread them onto the trigger button.
|
|
107
|
+
*
|
|
108
|
+
* `panelRef` belongs to the popover panel and MUST be wired when the panel is
|
|
109
|
+
* rendered through {@link PopoverSurface}: a portaled panel is not inside
|
|
110
|
+
* `containerRef`, so a container-only outside test reads every click on the
|
|
111
|
+
* menu's own rows as an outside click and closes before the row's handler runs.
|
|
107
112
|
*/
|
|
108
113
|
declare function usePopover(open: boolean, setOpen: (open: boolean) => void): {
|
|
109
|
-
containerRef:
|
|
110
|
-
triggerRef:
|
|
114
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
115
|
+
triggerRef: RefObject<HTMLButtonElement | null>;
|
|
116
|
+
panelRef: RefObject<HTMLDivElement | null>;
|
|
111
117
|
triggerProps: {
|
|
112
|
-
ref:
|
|
118
|
+
ref: RefObject<HTMLButtonElement | null>;
|
|
113
119
|
'aria-haspopup': true;
|
|
114
120
|
'aria-expanded': boolean;
|
|
115
121
|
};
|
|
116
122
|
};
|
|
123
|
+
/**
|
|
124
|
+
* Marks the portaled panel in the DOM. Products and audits (see
|
|
125
|
+
* `playground/scripts/popover-hit-test.mjs`) select on this rather than on a
|
|
126
|
+
* Tailwind class, which is presentation and free to change.
|
|
127
|
+
*
|
|
128
|
+
* Its VALUE is the surface's ancestor path (`outer/inner`), which is what
|
|
129
|
+
* restores "is this click inside my popover" after the portal flattens two
|
|
130
|
+
* nested panels into two siblings of `<body>`.
|
|
131
|
+
*/
|
|
132
|
+
declare const POPOVER_SURFACE_ATTR = "data-agent-app-popover";
|
|
133
|
+
interface PopoverSurfaceProps {
|
|
134
|
+
open: boolean;
|
|
135
|
+
/** The trigger the panel anchors to — `usePopover`'s `triggerRef`. */
|
|
136
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
137
|
+
/** `usePopover`'s `panelRef`; also what the outside-click test consults. */
|
|
138
|
+
panelRef: RefObject<HTMLDivElement | null>;
|
|
139
|
+
/** Presentation classes. Placement and elevation are owned here — a caller
|
|
140
|
+
* must not pass `absolute`/`fixed`/`top-*`/`bottom-*`/`z-*`. */
|
|
141
|
+
className?: string;
|
|
142
|
+
role?: string;
|
|
143
|
+
id?: string;
|
|
144
|
+
/** Make the panel at least as wide as its trigger. A portaled panel has no
|
|
145
|
+
* `w-full` to inherit — the trigger is no longer its offset parent — so a
|
|
146
|
+
* menu that used to stretch to a full-width trigger declares it here. */
|
|
147
|
+
matchTriggerWidth?: boolean;
|
|
148
|
+
children: ReactNode;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The floating panel every canonical picker opens.
|
|
152
|
+
*
|
|
153
|
+
* It renders through a PORTAL to `document.body` and anchors itself to the
|
|
154
|
+
* trigger in viewport coordinates, because an in-place `absolute` panel's
|
|
155
|
+
* visibility is decided by markup this package does not own. Measured in
|
|
156
|
+
* production: the shipped chat composer docks these controls inside a
|
|
157
|
+
* horizontally scrolling rail (`overflow-x-auto`), and a scroll container
|
|
158
|
+
* clips every positioned descendant whose containing block sits inside it —
|
|
159
|
+
* so a correct 420x457 menu with correct coordinates painted zero pixels and
|
|
160
|
+
* could not be clicked. An ancestor `transform`/`filter`/`contain` would trap
|
|
161
|
+
* it the same way through the stacking context instead of the clip. Leaving
|
|
162
|
+
* the DOM subtree is the only placement a host cannot re-break.
|
|
163
|
+
*
|
|
164
|
+
* Placement prefers ABOVE the trigger (these controls dock at the bottom of a
|
|
165
|
+
* composer), flips below when there is more room there, clamps horizontally
|
|
166
|
+
* into the viewport, and caps its own height to the space on the chosen side.
|
|
167
|
+
* The panel is `visibility: hidden` for the measure pass so it never paints at
|
|
168
|
+
* the pre-placement origin.
|
|
169
|
+
*/
|
|
170
|
+
declare function PopoverSurface({ open, triggerRef, panelRef, className, role, id, matchTriggerWidth, children, }: PopoverSurfaceProps): react.ReactPortal | null;
|
|
117
171
|
/**
|
|
118
172
|
* The one overlay elevation for floating surfaces — picker menus, popovers,
|
|
119
173
|
* drawers, modals. The theme's `shadow-overlay` utility is landing with the
|
|
@@ -254,4 +308,4 @@ interface AgentSessionControlsProps {
|
|
|
254
308
|
}
|
|
255
309
|
declare function AgentSessionControls(props: AgentSessionControlsProps): react.JSX.Element;
|
|
256
310
|
|
|
257
|
-
export { type AgentSessionControlsProps as A, type ComposerMentionProp as C, DEFAULT_EFFORT_LEVELS as D, EFFORT_METER_SEGMENTS as E, INDEX_REFRESH_AFTER_MS as I, type MentionItem as M, OVERLAY_SHADOW as O, type UseFileMentionsResult as U, AgentSessionControls as a, DEFAULT_MENTION_EMPTY_TEXT as b, DEFAULT_MENTION_LIMIT as c, type EffortLevel as d, EffortMeter as e, EffortPicker as f, type EffortPickerProps as g, ModelPicker as h, type ModelPickerProps as i, type UseFileMentionsOptions as
|
|
311
|
+
export { type AgentSessionControlsProps as A, type ComposerMentionProp as C, DEFAULT_EFFORT_LEVELS as D, EFFORT_METER_SEGMENTS as E, INDEX_REFRESH_AFTER_MS as I, type MentionItem as M, OVERLAY_SHADOW as O, POPOVER_SURFACE_ATTR as P, type UseFileMentionsResult as U, AgentSessionControls as a, DEFAULT_MENTION_EMPTY_TEXT as b, DEFAULT_MENTION_LIMIT as c, type EffortLevel as d, EffortMeter as e, EffortPicker as f, type EffortPickerProps as g, ModelPicker as h, type ModelPickerProps as i, PopoverSurface as j, type PopoverSurfaceProps as k, type UseFileMentionsOptions as l, effortMeterFill as m, usePending as n, usePopover as o, rankFileMentions as r, useFileMentions as u };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { ToolDetailRenderers, ComposerFile, ChatUiMessage } from '../web-react/index.js';
|
|
4
|
+
import '@tangle-network/ui/types';
|
|
4
5
|
import '../contract-OxG_jVMx.js';
|
|
5
6
|
import '@tangle-network/agent-interface';
|
|
6
7
|
import '../plans/index.js';
|
|
7
8
|
import '../parts-BqIHMdyu.js';
|
|
8
9
|
import '../types-CCeYywdS.js';
|
|
9
10
|
import '../wire-DOZ-O6hD.js';
|
|
10
|
-
import '../agent-session-controls-
|
|
11
|
+
import '../agent-session-controls-CCeu5QLS.js';
|
|
11
12
|
import '../harness/index.js';
|
|
12
13
|
import '../catalog/index.js';
|
|
13
14
|
import '../agent-activity-C8ZG0F0M.js';
|
package/dist/assistant/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChatComposer,
|
|
3
3
|
ChatMessages
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-TB7T7C3X.js";
|
|
5
5
|
import "../chunk-FBVLEGEG.js";
|
|
6
6
|
import "../chunk-5MZXWPFN.js";
|
|
7
7
|
import "../chunk-GEYACSFW.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ModelPicker,
|
|
10
10
|
OVERLAY_SHADOW,
|
|
11
11
|
ProviderLogo
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-3AXSERRK.js";
|
|
13
13
|
import "../chunk-BATKJP3P.js";
|
|
14
14
|
import {
|
|
15
15
|
AsyncView
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { AgentComposer } from '@tangle-network/sandbox-ui/chat';
|
|
4
|
-
import { A as AgentSessionControlsProps, U as UseFileMentionsResult } from '../agent-session-controls-
|
|
4
|
+
import { A as AgentSessionControlsProps, U as UseFileMentionsResult } from '../agent-session-controls-CCeu5QLS.js';
|
|
5
5
|
import { b as ChatAttachmentInput, F as FileMention } from '../wire-DOZ-O6hD.js';
|
|
6
6
|
import '../harness/index.js';
|
|
7
7
|
import '@tangle-network/agent-interface';
|