@dudko.dev/agent-web-react 0.0.33 → 0.0.35
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/README.md +53 -3
- package/dist/{elicitation-B6h_-yLg.d.cts → elicitation-xMLll5W9.d.cts} +52 -3
- package/dist/{elicitation-B6h_-yLg.d.ts → elicitation-xMLll5W9.d.ts} +52 -3
- package/dist/index.cjs +1566 -610
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +346 -9
- package/dist/index.d.ts +346 -9
- package/dist/index.js +1490 -553
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.cts +2 -2
- package/dist/mcp.d.ts +2 -2
- package/dist/styles.css +423 -0
- package/package.json +3 -3
package/dist/mcp.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { McpSkillConsent, AgentToolSet } from '@dudko.dev/agent-web';
|
|
2
|
-
import {
|
|
2
|
+
import { aY as McpOAuthRegistration, aZ as McpProtocolMode, P as PendingElicitation, f as McpElicitationResult, a_ as McpElicitationOptions, a$ as McpCatalogEntry, b0 as McpServerProtocol, b1 as McpOAuthRegistrationKind, b2 as McpOAuthCallback, b3 as McpServerResult, b4 as McpModule, b5 as ConnectedMcp, b6 as BrowserOAuthProviderOptions, b7 as BrowserOAuthProvider } from './elicitation-xMLll5W9.cjs';
|
|
3
3
|
import { McpAppsConnectionLike } from './index.cjs';
|
|
4
|
-
export {
|
|
4
|
+
export { b8 as ElicitationQueue, b9 as ElicitationQueueOptions, ap as McpElicitationFieldSchema, ba as McpElicitationHandler, aq as McpElicitationRequest, ar as McpElicitationSchema, bb as McpServerInstructions, bc as createElicitationQueue, bd as elicitationConnectOptions, be as elicitationSettings, bf as elicitationTimeoutOf } from './elicitation-xMLll5W9.cjs';
|
|
5
5
|
|
|
6
6
|
type McpStatus = 'idle' | 'connecting' | 'connected' | 'needs-authorization' | 'error';
|
|
7
7
|
/** The OAuth details of one server. Everything is optional. */
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { McpSkillConsent, AgentToolSet } from '@dudko.dev/agent-web';
|
|
2
|
-
import {
|
|
2
|
+
import { aY as McpOAuthRegistration, aZ as McpProtocolMode, P as PendingElicitation, f as McpElicitationResult, a_ as McpElicitationOptions, a$ as McpCatalogEntry, b0 as McpServerProtocol, b1 as McpOAuthRegistrationKind, b2 as McpOAuthCallback, b3 as McpServerResult, b4 as McpModule, b5 as ConnectedMcp, b6 as BrowserOAuthProviderOptions, b7 as BrowserOAuthProvider } from './elicitation-xMLll5W9.js';
|
|
3
3
|
import { McpAppsConnectionLike } from './index.js';
|
|
4
|
-
export {
|
|
4
|
+
export { b8 as ElicitationQueue, b9 as ElicitationQueueOptions, ap as McpElicitationFieldSchema, ba as McpElicitationHandler, aq as McpElicitationRequest, ar as McpElicitationSchema, bb as McpServerInstructions, bc as createElicitationQueue, bd as elicitationConnectOptions, be as elicitationSettings, bf as elicitationTimeoutOf } from './elicitation-xMLll5W9.js';
|
|
5
5
|
|
|
6
6
|
type McpStatus = 'idle' | 'connecting' | 'connected' | 'needs-authorization' | 'error';
|
|
7
7
|
/** The OAuth details of one server. Everything is optional. */
|
package/dist/styles.css
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
--awr-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
26
26
|
--awr-sidebar-width: 240px;
|
|
27
27
|
--awr-files-width: 300px;
|
|
28
|
+
--awr-scrim: rgb(15 17 21 / 0.32);
|
|
28
29
|
color: var(--awr-fg);
|
|
29
30
|
font-family: var(--awr-font);
|
|
30
31
|
}
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
--awr-danger: #f87171;
|
|
42
43
|
--awr-warn: #fbbf24;
|
|
43
44
|
--awr-ok: #4ade80;
|
|
45
|
+
--awr-scrim: rgb(0 0 0 / 0.5);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
48
|
:where(.awr-chat, .awr-theme)[data-awr-theme='dark'] {
|
|
@@ -54,6 +56,7 @@
|
|
|
54
56
|
--awr-danger: #f87171;
|
|
55
57
|
--awr-warn: #fbbf24;
|
|
56
58
|
--awr-ok: #4ade80;
|
|
59
|
+
--awr-scrim: rgb(0 0 0 / 0.5);
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
/* ── Chat panel layout: [history] [main] [files] ──────────────────────────── */
|
|
@@ -112,6 +115,14 @@
|
|
|
112
115
|
width: min(85%, 320px);
|
|
113
116
|
box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
|
|
114
117
|
}
|
|
118
|
+
/* Beside an open side panel: the chat under a shade, and a tap on it closes the panel. */
|
|
119
|
+
.awr-chat__scrim {
|
|
120
|
+
position: absolute;
|
|
121
|
+
inset: 0;
|
|
122
|
+
z-index: 4;
|
|
123
|
+
background: var(--awr-scrim);
|
|
124
|
+
-webkit-tap-highlight-color: transparent;
|
|
125
|
+
}
|
|
115
126
|
.awr-chat--narrow > .awr-chat__sidebar {
|
|
116
127
|
left: 0;
|
|
117
128
|
}
|
|
@@ -129,6 +140,13 @@
|
|
|
129
140
|
.awr-chat--narrow .awr-chat__files .awr-panel__head {
|
|
130
141
|
padding-right: 40px;
|
|
131
142
|
}
|
|
143
|
+
/* The header and the footer keep their height: only the transcript between them gives way.
|
|
144
|
+
(As flex items they would shrink a little with every line the transcript grows - the header
|
|
145
|
+
down to its min-height - and move everything under them.) */
|
|
146
|
+
.awr-chat__header,
|
|
147
|
+
.awr-chat__footer {
|
|
148
|
+
flex: none;
|
|
149
|
+
}
|
|
132
150
|
.awr-chat__header {
|
|
133
151
|
display: flex;
|
|
134
152
|
align-items: center;
|
|
@@ -161,6 +179,9 @@
|
|
|
161
179
|
flex: 1 1 auto;
|
|
162
180
|
min-height: 0;
|
|
163
181
|
overflow-y: auto;
|
|
182
|
+
/* A fling that reaches the end of the transcript stops there: it is not handed on to the
|
|
183
|
+
page, which on a phone would scroll or bounce the whole window. */
|
|
184
|
+
overscroll-behavior: contain;
|
|
164
185
|
padding: 16px;
|
|
165
186
|
display: flex;
|
|
166
187
|
flex-direction: column;
|
|
@@ -269,6 +290,7 @@
|
|
|
269
290
|
gap: 8px;
|
|
270
291
|
}
|
|
271
292
|
.awr-step__marker {
|
|
293
|
+
flex: none;
|
|
272
294
|
display: inline-flex;
|
|
273
295
|
color: var(--awr-muted);
|
|
274
296
|
}
|
|
@@ -279,11 +301,16 @@
|
|
|
279
301
|
color: var(--awr-danger);
|
|
280
302
|
}
|
|
281
303
|
.awr-step__index {
|
|
304
|
+
/* "1/2" is one word: it keeps its width and its line; the description is what wraps. */
|
|
305
|
+
flex: none;
|
|
306
|
+
white-space: nowrap;
|
|
282
307
|
font-variant-numeric: tabular-nums;
|
|
283
308
|
color: var(--awr-muted);
|
|
284
309
|
font-size: 12px;
|
|
285
310
|
}
|
|
286
311
|
.awr-step__desc {
|
|
312
|
+
min-width: 0;
|
|
313
|
+
overflow-wrap: anywhere;
|
|
287
314
|
font-weight: 500;
|
|
288
315
|
}
|
|
289
316
|
.awr-step__text {
|
|
@@ -1355,6 +1382,10 @@
|
|
|
1355
1382
|
display: block;
|
|
1356
1383
|
max-width: 100%;
|
|
1357
1384
|
}
|
|
1385
|
+
/* The preview of a picture opens the image viewer (a button). */
|
|
1386
|
+
.awr-filepreview .awr-imgbtn {
|
|
1387
|
+
display: flex;
|
|
1388
|
+
}
|
|
1358
1389
|
.awr-filepreview pre {
|
|
1359
1390
|
margin: 0;
|
|
1360
1391
|
padding: 8px;
|
|
@@ -2077,6 +2108,270 @@
|
|
|
2077
2108
|
}
|
|
2078
2109
|
}
|
|
2079
2110
|
|
|
2111
|
+
/* ── A question from the agent (ask_user) ─────────────────────────────────── */
|
|
2112
|
+
.awr-questions {
|
|
2113
|
+
display: flex;
|
|
2114
|
+
flex-direction: column;
|
|
2115
|
+
gap: 8px;
|
|
2116
|
+
min-width: 0;
|
|
2117
|
+
}
|
|
2118
|
+
.awr-question {
|
|
2119
|
+
border: 1px solid color-mix(in srgb, var(--awr-accent) 45%, var(--awr-border));
|
|
2120
|
+
background: color-mix(in srgb, var(--awr-accent) 7%, var(--awr-bg));
|
|
2121
|
+
border-radius: 10px;
|
|
2122
|
+
padding: 12px;
|
|
2123
|
+
display: flex;
|
|
2124
|
+
flex-direction: column;
|
|
2125
|
+
gap: 10px;
|
|
2126
|
+
min-width: 0;
|
|
2127
|
+
color: var(--awr-fg);
|
|
2128
|
+
font-family: var(--awr-font);
|
|
2129
|
+
font-size: 13px;
|
|
2130
|
+
}
|
|
2131
|
+
.awr-question--remote {
|
|
2132
|
+
border-style: dashed;
|
|
2133
|
+
background: var(--awr-subtle);
|
|
2134
|
+
}
|
|
2135
|
+
/* The host's own line: who asks. */
|
|
2136
|
+
.awr-question__head {
|
|
2137
|
+
display: flex;
|
|
2138
|
+
align-items: flex-start;
|
|
2139
|
+
gap: 8px;
|
|
2140
|
+
font-weight: 600;
|
|
2141
|
+
line-height: 1.4;
|
|
2142
|
+
}
|
|
2143
|
+
.awr-question__icon {
|
|
2144
|
+
color: var(--awr-accent);
|
|
2145
|
+
flex: none;
|
|
2146
|
+
margin-top: 1px;
|
|
2147
|
+
}
|
|
2148
|
+
.awr-question__lead {
|
|
2149
|
+
flex: 1;
|
|
2150
|
+
min-width: 0;
|
|
2151
|
+
overflow-wrap: anywhere;
|
|
2152
|
+
}
|
|
2153
|
+
.awr-question__count {
|
|
2154
|
+
flex: none;
|
|
2155
|
+
font-weight: 500;
|
|
2156
|
+
font-size: 12px;
|
|
2157
|
+
color: var(--awr-muted);
|
|
2158
|
+
border: 1px solid var(--awr-border);
|
|
2159
|
+
border-radius: 999px;
|
|
2160
|
+
padding: 1px 8px;
|
|
2161
|
+
white-space: nowrap;
|
|
2162
|
+
}
|
|
2163
|
+
/* The model's question: its own words, as text. */
|
|
2164
|
+
.awr-question__text {
|
|
2165
|
+
margin: 0;
|
|
2166
|
+
font-size: 15px;
|
|
2167
|
+
font-weight: 600;
|
|
2168
|
+
line-height: 1.45;
|
|
2169
|
+
white-space: pre-wrap;
|
|
2170
|
+
overflow-wrap: anywhere;
|
|
2171
|
+
}
|
|
2172
|
+
.awr-question__hint,
|
|
2173
|
+
.awr-question__remote {
|
|
2174
|
+
margin: -4px 0 0;
|
|
2175
|
+
font-size: 12px;
|
|
2176
|
+
color: var(--awr-muted);
|
|
2177
|
+
}
|
|
2178
|
+
.awr-question__remote {
|
|
2179
|
+
margin: 0;
|
|
2180
|
+
}
|
|
2181
|
+
/* One option per button: side by side while there is room, one under the other on a phone. */
|
|
2182
|
+
.awr-question__options {
|
|
2183
|
+
display: grid;
|
|
2184
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
|
|
2185
|
+
gap: 8px;
|
|
2186
|
+
min-width: 0;
|
|
2187
|
+
}
|
|
2188
|
+
.awr-question__option {
|
|
2189
|
+
box-sizing: border-box;
|
|
2190
|
+
display: flex;
|
|
2191
|
+
align-items: flex-start;
|
|
2192
|
+
gap: 10px;
|
|
2193
|
+
min-width: 0;
|
|
2194
|
+
min-height: 44px;
|
|
2195
|
+
padding: 10px 12px;
|
|
2196
|
+
border: 1px solid var(--awr-border);
|
|
2197
|
+
border-radius: 8px;
|
|
2198
|
+
background: var(--awr-bg);
|
|
2199
|
+
color: var(--awr-fg);
|
|
2200
|
+
font: inherit;
|
|
2201
|
+
font-size: 14px;
|
|
2202
|
+
text-align: left;
|
|
2203
|
+
cursor: pointer;
|
|
2204
|
+
}
|
|
2205
|
+
/* Only where there is a pointer that hovers: on a touch screen a tap leaves :hover behind. */
|
|
2206
|
+
@media (hover: hover) {
|
|
2207
|
+
.awr-question__option:hover {
|
|
2208
|
+
border-color: var(--awr-accent);
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
.awr-question__option:focus-visible,
|
|
2212
|
+
.awr-question__input:focus-visible {
|
|
2213
|
+
outline: 2px solid var(--awr-accent);
|
|
2214
|
+
outline-offset: 1px;
|
|
2215
|
+
border-color: var(--awr-accent);
|
|
2216
|
+
}
|
|
2217
|
+
.awr-question__option.is-picked {
|
|
2218
|
+
border-color: var(--awr-accent);
|
|
2219
|
+
background: color-mix(in srgb, var(--awr-accent) 14%, var(--awr-bg));
|
|
2220
|
+
}
|
|
2221
|
+
.awr-question__key {
|
|
2222
|
+
flex: none;
|
|
2223
|
+
display: inline-flex;
|
|
2224
|
+
align-items: center;
|
|
2225
|
+
justify-content: center;
|
|
2226
|
+
width: 22px;
|
|
2227
|
+
height: 22px;
|
|
2228
|
+
border-radius: 6px;
|
|
2229
|
+
border: 1px solid var(--awr-border);
|
|
2230
|
+
color: var(--awr-muted);
|
|
2231
|
+
font-family: var(--awr-mono);
|
|
2232
|
+
font-size: 12px;
|
|
2233
|
+
line-height: 1;
|
|
2234
|
+
}
|
|
2235
|
+
.awr-question__body {
|
|
2236
|
+
flex: 1;
|
|
2237
|
+
min-width: 0;
|
|
2238
|
+
display: flex;
|
|
2239
|
+
flex-direction: column;
|
|
2240
|
+
gap: 2px;
|
|
2241
|
+
padding-top: 1px;
|
|
2242
|
+
}
|
|
2243
|
+
.awr-question__label {
|
|
2244
|
+
font-weight: 600;
|
|
2245
|
+
overflow-wrap: anywhere;
|
|
2246
|
+
}
|
|
2247
|
+
.awr-question__desc {
|
|
2248
|
+
font-size: 12px;
|
|
2249
|
+
color: var(--awr-muted);
|
|
2250
|
+
overflow-wrap: anywhere;
|
|
2251
|
+
}
|
|
2252
|
+
.awr-question__mark {
|
|
2253
|
+
flex: none;
|
|
2254
|
+
display: inline-flex;
|
|
2255
|
+
align-items: center;
|
|
2256
|
+
justify-content: center;
|
|
2257
|
+
width: 20px;
|
|
2258
|
+
height: 20px;
|
|
2259
|
+
border-radius: 5px;
|
|
2260
|
+
border: 1px solid var(--awr-border);
|
|
2261
|
+
color: var(--awr-accent-fg);
|
|
2262
|
+
}
|
|
2263
|
+
.awr-question__option.is-picked .awr-question__mark {
|
|
2264
|
+
background: var(--awr-accent);
|
|
2265
|
+
border-color: var(--awr-accent);
|
|
2266
|
+
}
|
|
2267
|
+
/* A question of the other tab: what it asks, without buttons. */
|
|
2268
|
+
.awr-question__list {
|
|
2269
|
+
margin: 0;
|
|
2270
|
+
padding: 0 0 0 18px;
|
|
2271
|
+
display: flex;
|
|
2272
|
+
flex-direction: column;
|
|
2273
|
+
gap: 4px;
|
|
2274
|
+
}
|
|
2275
|
+
.awr-question__list li {
|
|
2276
|
+
display: flex;
|
|
2277
|
+
flex-direction: column;
|
|
2278
|
+
gap: 1px;
|
|
2279
|
+
}
|
|
2280
|
+
.awr-question__other {
|
|
2281
|
+
display: flex;
|
|
2282
|
+
flex-direction: column;
|
|
2283
|
+
gap: 4px;
|
|
2284
|
+
min-width: 0;
|
|
2285
|
+
margin: 0;
|
|
2286
|
+
}
|
|
2287
|
+
.awr-question__otherlabel {
|
|
2288
|
+
font-weight: 600;
|
|
2289
|
+
}
|
|
2290
|
+
.awr-question__otherrow {
|
|
2291
|
+
display: flex;
|
|
2292
|
+
gap: 8px;
|
|
2293
|
+
min-width: 0;
|
|
2294
|
+
}
|
|
2295
|
+
.awr-question__input {
|
|
2296
|
+
box-sizing: border-box;
|
|
2297
|
+
flex: 1;
|
|
2298
|
+
width: 100%;
|
|
2299
|
+
min-width: 0;
|
|
2300
|
+
min-height: 40px;
|
|
2301
|
+
padding: 8px 10px;
|
|
2302
|
+
border: 1px solid var(--awr-border);
|
|
2303
|
+
border-radius: 8px;
|
|
2304
|
+
background: var(--awr-bg);
|
|
2305
|
+
color: var(--awr-fg);
|
|
2306
|
+
font: inherit;
|
|
2307
|
+
font-size: 14px;
|
|
2308
|
+
}
|
|
2309
|
+
.awr-question__actions {
|
|
2310
|
+
display: flex;
|
|
2311
|
+
gap: 8px;
|
|
2312
|
+
flex-wrap: wrap;
|
|
2313
|
+
}
|
|
2314
|
+
.awr-question__actions .awr-btn,
|
|
2315
|
+
.awr-question__otherrow .awr-btn {
|
|
2316
|
+
min-height: 40px;
|
|
2317
|
+
padding-left: 14px;
|
|
2318
|
+
padding-right: 14px;
|
|
2319
|
+
display: inline-flex;
|
|
2320
|
+
align-items: center;
|
|
2321
|
+
justify-content: center;
|
|
2322
|
+
gap: 6px;
|
|
2323
|
+
flex: none;
|
|
2324
|
+
}
|
|
2325
|
+
.awr-question__expiry {
|
|
2326
|
+
margin: -2px 0 0;
|
|
2327
|
+
font-size: 12px;
|
|
2328
|
+
color: var(--awr-muted);
|
|
2329
|
+
font-variant-numeric: tabular-nums;
|
|
2330
|
+
}
|
|
2331
|
+
/* A question the agent went on without. */
|
|
2332
|
+
.awr-question-outcome {
|
|
2333
|
+
display: flex;
|
|
2334
|
+
align-items: flex-start;
|
|
2335
|
+
gap: 8px;
|
|
2336
|
+
padding: 8px 8px 8px 12px;
|
|
2337
|
+
border: 1px solid color-mix(in srgb, var(--awr-warn) 45%, var(--awr-border));
|
|
2338
|
+
background: color-mix(in srgb, var(--awr-warn) 8%, var(--awr-bg));
|
|
2339
|
+
border-radius: 10px;
|
|
2340
|
+
color: var(--awr-fg);
|
|
2341
|
+
font-family: var(--awr-font);
|
|
2342
|
+
font-size: 13px;
|
|
2343
|
+
line-height: 1.45;
|
|
2344
|
+
}
|
|
2345
|
+
.awr-question-outcome__icon {
|
|
2346
|
+
color: var(--awr-warn);
|
|
2347
|
+
flex: none;
|
|
2348
|
+
margin-top: 11px;
|
|
2349
|
+
}
|
|
2350
|
+
.awr-question-outcome__text {
|
|
2351
|
+
flex: 1;
|
|
2352
|
+
min-width: 0;
|
|
2353
|
+
padding: 9px 0;
|
|
2354
|
+
overflow-wrap: anywhere;
|
|
2355
|
+
}
|
|
2356
|
+
.awr-question-outcome__question {
|
|
2357
|
+
color: var(--awr-muted);
|
|
2358
|
+
}
|
|
2359
|
+
.awr-question-outcome__dismiss {
|
|
2360
|
+
flex: none;
|
|
2361
|
+
width: 40px;
|
|
2362
|
+
height: 40px;
|
|
2363
|
+
}
|
|
2364
|
+
@media (pointer: coarse) {
|
|
2365
|
+
/* 16px keeps iOS from zooming into the field on focus. */
|
|
2366
|
+
.awr-question__input {
|
|
2367
|
+
font-size: 16px;
|
|
2368
|
+
}
|
|
2369
|
+
/* No keyboard to press them with: the number badges go. */
|
|
2370
|
+
.awr-question__key {
|
|
2371
|
+
display: none;
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2080
2375
|
/* ── Files an answer wrote: chips, inline previews ────────────────────────── */
|
|
2081
2376
|
.awr-msg__files {
|
|
2082
2377
|
align-self: stretch;
|
|
@@ -2954,3 +3249,131 @@
|
|
|
2954
3249
|
font-family: var(--awr-font);
|
|
2955
3250
|
overflow: hidden;
|
|
2956
3251
|
}
|
|
3252
|
+
|
|
3253
|
+
/* ── Image viewer: a picture over the chat ────────────────────────────────── */
|
|
3254
|
+
/* A thumbnail is a button with nothing of a button's look. */
|
|
3255
|
+
.awr-imgbtn {
|
|
3256
|
+
display: inline-flex;
|
|
3257
|
+
max-width: 100%;
|
|
3258
|
+
min-width: 0;
|
|
3259
|
+
padding: 0;
|
|
3260
|
+
border: 0;
|
|
3261
|
+
border-radius: 8px;
|
|
3262
|
+
background: none;
|
|
3263
|
+
color: inherit;
|
|
3264
|
+
font: inherit;
|
|
3265
|
+
cursor: zoom-in;
|
|
3266
|
+
}
|
|
3267
|
+
.awr-imgbtn:focus-visible {
|
|
3268
|
+
outline: 2px solid var(--awr-accent);
|
|
3269
|
+
outline-offset: 2px;
|
|
3270
|
+
}
|
|
3271
|
+
.awr-viewer {
|
|
3272
|
+
position: fixed;
|
|
3273
|
+
inset: 0;
|
|
3274
|
+
z-index: 60;
|
|
3275
|
+
display: flex;
|
|
3276
|
+
flex-direction: column;
|
|
3277
|
+
background: color-mix(in srgb, var(--awr-bg) 92%, transparent);
|
|
3278
|
+
color: var(--awr-fg);
|
|
3279
|
+
font-family: var(--awr-font);
|
|
3280
|
+
font-size: 14px;
|
|
3281
|
+
animation: awr-viewer-in 0.12s ease-out;
|
|
3282
|
+
}
|
|
3283
|
+
@keyframes awr-viewer-in {
|
|
3284
|
+
from {
|
|
3285
|
+
opacity: 0;
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3289
|
+
.awr-viewer {
|
|
3290
|
+
animation: none;
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
.awr-viewer__bar {
|
|
3294
|
+
flex: none;
|
|
3295
|
+
display: flex;
|
|
3296
|
+
align-items: center;
|
|
3297
|
+
gap: 4px;
|
|
3298
|
+
padding: 8px max(8px, env(safe-area-inset-right, 0px)) 8px
|
|
3299
|
+
max(12px, env(safe-area-inset-left, 0px));
|
|
3300
|
+
padding-top: max(8px, env(safe-area-inset-top, 0px));
|
|
3301
|
+
background: var(--awr-bg);
|
|
3302
|
+
border-bottom: 1px solid var(--awr-border);
|
|
3303
|
+
}
|
|
3304
|
+
.awr-viewer__name {
|
|
3305
|
+
flex: 1 1 auto;
|
|
3306
|
+
min-width: 0;
|
|
3307
|
+
overflow: hidden;
|
|
3308
|
+
text-overflow: ellipsis;
|
|
3309
|
+
white-space: nowrap;
|
|
3310
|
+
font-weight: 600;
|
|
3311
|
+
}
|
|
3312
|
+
.awr-viewer__count {
|
|
3313
|
+
flex: none;
|
|
3314
|
+
padding: 0 6px;
|
|
3315
|
+
color: var(--awr-muted);
|
|
3316
|
+
font-variant-numeric: tabular-nums;
|
|
3317
|
+
}
|
|
3318
|
+
/* Controls a finger can hit. */
|
|
3319
|
+
.awr-viewer .awr-iconbtn {
|
|
3320
|
+
width: 40px;
|
|
3321
|
+
height: 40px;
|
|
3322
|
+
text-decoration: none;
|
|
3323
|
+
}
|
|
3324
|
+
.awr-viewer .awr-iconbtn:focus-visible {
|
|
3325
|
+
outline: 2px solid var(--awr-accent);
|
|
3326
|
+
outline-offset: -2px;
|
|
3327
|
+
}
|
|
3328
|
+
/* The picture fitted to what is left of the window; at full size it is panned by scrolling. */
|
|
3329
|
+
.awr-viewer__stage {
|
|
3330
|
+
flex: 1 1 auto;
|
|
3331
|
+
min-height: 0;
|
|
3332
|
+
display: flex;
|
|
3333
|
+
overflow: auto;
|
|
3334
|
+
padding: 12px;
|
|
3335
|
+
padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
|
|
3336
|
+
overscroll-behavior: contain;
|
|
3337
|
+
/* A sideways swipe is the viewer's (the next picture), not the browser's (back). */
|
|
3338
|
+
touch-action: pan-y pinch-zoom;
|
|
3339
|
+
}
|
|
3340
|
+
.awr-viewer__stage.is-zoomed {
|
|
3341
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
3342
|
+
}
|
|
3343
|
+
.awr-viewer__img {
|
|
3344
|
+
display: block;
|
|
3345
|
+
flex: none;
|
|
3346
|
+
margin: auto;
|
|
3347
|
+
max-width: 100%;
|
|
3348
|
+
max-height: 100%;
|
|
3349
|
+
object-fit: contain;
|
|
3350
|
+
border-radius: 6px;
|
|
3351
|
+
background: var(--awr-subtle);
|
|
3352
|
+
cursor: zoom-in;
|
|
3353
|
+
user-select: none;
|
|
3354
|
+
}
|
|
3355
|
+
.awr-viewer__stage.is-zoomed .awr-viewer__img {
|
|
3356
|
+
max-width: none;
|
|
3357
|
+
max-height: none;
|
|
3358
|
+
height: auto;
|
|
3359
|
+
cursor: zoom-out;
|
|
3360
|
+
}
|
|
3361
|
+
.awr-viewer .awr-viewer__nav {
|
|
3362
|
+
position: absolute;
|
|
3363
|
+
top: 50%;
|
|
3364
|
+
width: 44px;
|
|
3365
|
+
height: 44px;
|
|
3366
|
+
margin-top: -22px;
|
|
3367
|
+
border: 1px solid var(--awr-border);
|
|
3368
|
+
border-radius: 50%;
|
|
3369
|
+
background: var(--awr-bg);
|
|
3370
|
+
color: var(--awr-fg);
|
|
3371
|
+
font-size: 24px;
|
|
3372
|
+
line-height: 1;
|
|
3373
|
+
}
|
|
3374
|
+
.awr-viewer__nav--prev {
|
|
3375
|
+
left: max(8px, env(safe-area-inset-left, 0px));
|
|
3376
|
+
}
|
|
3377
|
+
.awr-viewer__nav--next {
|
|
3378
|
+
right: max(8px, env(safe-area-inset-right, 0px));
|
|
3379
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudko.dev/agent-web-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"description": "React bindings for @dudko.dev/agent-web: a headless useAgent hook, an AgentProvider context, and optional pre-styled components (chat panel, plan/step view, BYOK key form, WebLLM load bar) that connect the in-browser LLM agent to any React site. UI you can drop in — or a headless reducer you can build your own around.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"node": ">=18"
|
|
128
128
|
},
|
|
129
129
|
"peerDependencies": {
|
|
130
|
-
"@dudko.dev/agent-web": ">=0.0.
|
|
130
|
+
"@dudko.dev/agent-web": ">=0.0.46",
|
|
131
131
|
"react": ">=18",
|
|
132
132
|
"react-dom": ">=18"
|
|
133
133
|
},
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"tsup": "^9.0.0",
|
|
146
146
|
"typescript": "^6.0.3",
|
|
147
147
|
"zod": "^4.6.7",
|
|
148
|
-
"@dudko.dev/agent-web": "0.0.
|
|
148
|
+
"@dudko.dev/agent-web": "0.0.47",
|
|
149
149
|
"@dudko.dev/test-servers": "0.0.0"
|
|
150
150
|
},
|
|
151
151
|
"scripts": {
|