@westonkd/sprint 0.4.0 → 0.5.0
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/agent-manifest.json +108 -1
- package/dist/index.cjs +67 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +123 -0
- package/dist/index.js +1540 -1210
- package/dist/index.js.map +1 -1
- package/dist/sprint.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { flushSync as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as s, jsxs as C, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as le, createContext as We, Fragment as Ee, isValidElement as Qt, useRef as b, useEffect as H, useState as Y, useCallback as F, useLayoutEffect as Zt, useId as pe, useMemo as re, Children as dt } from "react";
|
|
3
|
+
import { flushSync as en } from "react-dom";
|
|
4
|
+
const ae = "data-sprint", ce = "data-sprint-part", ye = "data-sprint-", ge = "data-sprint-tool", ht = "data-sprint-owner", ut = "data-sprint-agent", tn = "data-sprint-view", nn = "data-sprint-view-copy", an = "data-sprint-theme", Be = "data-sprint-region", on = [
|
|
5
5
|
"part",
|
|
6
6
|
"tool",
|
|
7
7
|
"owner",
|
|
@@ -12,29 +12,29 @@ const Q = "data-sprint", ae = "data-sprint-part", pe = "data-sprint-", ce = "dat
|
|
|
12
12
|
"region",
|
|
13
13
|
"ornament"
|
|
14
14
|
];
|
|
15
|
-
function
|
|
15
|
+
function pt(e, t = {}) {
|
|
16
16
|
const n = {
|
|
17
|
-
[
|
|
17
|
+
[ae]: e
|
|
18
18
|
};
|
|
19
|
-
t.part && (n[
|
|
19
|
+
t.part && (n[ce] = t.part);
|
|
20
20
|
for (const [a, o] of Object.entries(t.state ?? {}))
|
|
21
|
-
o == null || o === !1 || (n[`${
|
|
21
|
+
o == null || o === !1 || (n[`${ye}${a}`] = o === !0 ? "" : String(o));
|
|
22
22
|
return n;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const n = `[${
|
|
26
|
-
return t ? `${n} [${
|
|
24
|
+
function _a(e, t) {
|
|
25
|
+
const n = `[${ae}="${e}"]`;
|
|
26
|
+
return t ? `${n} [${ce}="${t}"]` : n;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const $e = `
|
|
29
29
|
… truncated`;
|
|
30
|
-
function
|
|
30
|
+
function Me(e, t) {
|
|
31
31
|
if (e.length <= t) return e;
|
|
32
|
-
if (t <=
|
|
33
|
-
const n = t -
|
|
32
|
+
if (t <= $e.length) return e.slice(0, t);
|
|
33
|
+
const n = t - $e.length, a = e.slice(0, n), o = a.lastIndexOf(`
|
|
34
34
|
`);
|
|
35
|
-
return `${o > n / 2 ? a.slice(0, o) : a.trimEnd()}${
|
|
35
|
+
return `${o > n / 2 ? a.slice(0, o) : a.trimEnd()}${$e}`;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function gt(e, t) {
|
|
38
38
|
if (t <= 0) return [e];
|
|
39
39
|
const n = e.split(`
|
|
40
40
|
`), a = [];
|
|
@@ -52,27 +52,27 @@ ${i}`;
|
|
|
52
52
|
}
|
|
53
53
|
return o !== "" && a.push(o), a.length === 0 ? [""] : a;
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
function
|
|
55
|
+
const se = 1500, ze = 500, Xe = 150;
|
|
56
|
+
function mt() {
|
|
57
57
|
return typeof document > "u" ? null : document.modelContext ?? null;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
59
|
+
function ja() {
|
|
60
|
+
return mt() !== null;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
if (e.description.length >
|
|
62
|
+
function rn(e) {
|
|
63
|
+
if (e.description.length > ze)
|
|
64
64
|
throw new Error(
|
|
65
|
-
`Tool "${e.name}" description is ${e.description.length} characters; the platform limit is ${
|
|
65
|
+
`Tool "${e.name}" description is ${e.description.length} characters; the platform limit is ${ze}.`
|
|
66
66
|
);
|
|
67
67
|
for (const [t, n] of Object.entries(e.inputSchema.properties)) {
|
|
68
68
|
const a = n.description ?? "";
|
|
69
|
-
if (a.length >
|
|
69
|
+
if (a.length > Xe)
|
|
70
70
|
throw new Error(
|
|
71
|
-
`Tool "${e.name}" parameter "${t}" description is ${a.length} characters; the platform limit is ${
|
|
71
|
+
`Tool "${e.name}" parameter "${t}" description is ${a.length} characters; the platform limit is ${Xe}.`
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function sn(e, t) {
|
|
76
76
|
for (const n of e.required ?? [])
|
|
77
77
|
if (t[n] === void 0) {
|
|
78
78
|
const a = Object.keys(e.properties).join(", ");
|
|
@@ -82,8 +82,8 @@ function jt(e, t) {
|
|
|
82
82
|
if (a === void 0) continue;
|
|
83
83
|
const o = e.properties[n];
|
|
84
84
|
if (o === void 0) {
|
|
85
|
-
const
|
|
86
|
-
return `Unknown parameter "${n}". Expected parameters: ${
|
|
85
|
+
const h = Object.keys(e.properties).join(", ");
|
|
86
|
+
return `Unknown parameter "${n}". Expected parameters: ${h || "none"}.`;
|
|
87
87
|
}
|
|
88
88
|
const i = typeof a, l = o.type === "number" || o.type === "integer";
|
|
89
89
|
if (!(o.type === "string" && i === "string" || l && i === "number" || o.type === "boolean" && i === "boolean"))
|
|
@@ -93,136 +93,136 @@ function jt(e, t) {
|
|
|
93
93
|
}
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function ln(e) {
|
|
97
97
|
return { ...e, execute: async (n, a) => {
|
|
98
|
-
const o =
|
|
98
|
+
const o = sn(e.inputSchema, n ?? {});
|
|
99
99
|
if (o !== null) return o;
|
|
100
100
|
try {
|
|
101
101
|
const i = await e.execute(n ?? {}, a);
|
|
102
|
-
return i === null ? null :
|
|
102
|
+
return i === null ? null : Me(i, se);
|
|
103
103
|
} catch (i) {
|
|
104
104
|
const l = i instanceof Error ? i.message : String(i);
|
|
105
|
-
return
|
|
105
|
+
return Me(`Tool "${e.name}" failed: ${l}`, se);
|
|
106
106
|
}
|
|
107
107
|
} };
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
|
|
111
|
-
const n =
|
|
109
|
+
function cn(e, t) {
|
|
110
|
+
rn(e);
|
|
111
|
+
const n = mt();
|
|
112
112
|
if (n === null || t.aborted) return !1;
|
|
113
|
-
const a = n.registerTool(
|
|
113
|
+
const a = n.registerTool(ln(e), { signal: t });
|
|
114
114
|
return a instanceof Promise && a.catch((o) => {
|
|
115
115
|
console.warn(`Sprint could not register tool "${e.name}"`, o);
|
|
116
116
|
}), !0;
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const dn = "<scope>-<verb>-<label-slug>", ke = /* @__PURE__ */ new Map();
|
|
119
119
|
function I(e) {
|
|
120
|
-
const t =
|
|
120
|
+
const t = ke.get(e.name);
|
|
121
121
|
return t !== void 0 && t !== e && console.warn(
|
|
122
122
|
`Agent metadata for "${e.name}" was replaced. Two components sharing a name will collapse into one manifest entry.`
|
|
123
|
-
),
|
|
123
|
+
), ke.set(e.name, e), e;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
return
|
|
125
|
+
function hn(e) {
|
|
126
|
+
return ke.get(e);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
return [...
|
|
128
|
+
function un() {
|
|
129
|
+
return [...ke.values()].sort((e, t) => e.name.localeCompare(t.name));
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function Va(e) {
|
|
132
132
|
return {
|
|
133
133
|
library: "sprint",
|
|
134
134
|
version: e,
|
|
135
135
|
conventions: {
|
|
136
|
-
componentAttribute:
|
|
137
|
-
partAttribute:
|
|
138
|
-
stateAttributePrefix:
|
|
139
|
-
toolAttribute:
|
|
140
|
-
ownerAttribute:
|
|
141
|
-
regionAttribute:
|
|
136
|
+
componentAttribute: ae,
|
|
137
|
+
partAttribute: ce,
|
|
138
|
+
stateAttributePrefix: ye,
|
|
139
|
+
toolAttribute: ge,
|
|
140
|
+
ownerAttribute: ht,
|
|
141
|
+
regionAttribute: Be,
|
|
142
142
|
agentViewFormat: "markdown",
|
|
143
|
-
toolNaming:
|
|
144
|
-
toolOutputLimit:
|
|
143
|
+
toolNaming: dn,
|
|
144
|
+
toolOutputLimit: se
|
|
145
145
|
},
|
|
146
|
-
components:
|
|
146
|
+
components: un()
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function pn(e) {
|
|
150
150
|
return e.label === void 0 && e.parts.length === 0 && e.children.length === 0;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function ft(e) {
|
|
153
153
|
let t = 0;
|
|
154
154
|
for (const n of e)
|
|
155
|
-
t += 1 +
|
|
155
|
+
t += 1 + ft(n.children);
|
|
156
156
|
return t;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function bt(e) {
|
|
159
159
|
const t = Object.keys(e).sort();
|
|
160
160
|
return t.length === 0 ? "" : ` [${t.map((a) => {
|
|
161
161
|
const o = e[a];
|
|
162
162
|
return o === !0 ? a : `${a}=${o}`;
|
|
163
163
|
}).join(", ")}]`;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function vt(e) {
|
|
166
166
|
return e === void 0 ? "" : ` "${e}"`;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function wt(e) {
|
|
169
169
|
return e === void 0 ? "" : ` → tool \`${e}\``;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return `${t}- part \`${e.part}\`${
|
|
171
|
+
function gn(e, t) {
|
|
172
|
+
return `${t}- part \`${e.part}\`${vt(e.label)}${bt(
|
|
173
173
|
e.state
|
|
174
|
-
)}${
|
|
174
|
+
)}${wt(e.tool)}`;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
const t =
|
|
178
|
-
return `- **${e.component}**${
|
|
176
|
+
function mn(e) {
|
|
177
|
+
const t = pn(e) ? " (empty)" : "", n = e.owner === void 0 ? "" : ` (owned by \`${e.owner}\`)`;
|
|
178
|
+
return `- **${e.component}**${vt(e.label)}${bt(
|
|
179
179
|
e.state
|
|
180
|
-
)}${
|
|
180
|
+
)}${wt(e.tool)}${n}${t}`;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
const a = [`${t}${
|
|
182
|
+
function yt(e, t, n) {
|
|
183
|
+
const a = [`${t}${mn(e)}`], o = `${t} `;
|
|
184
184
|
if (n.includeSummary && e.summary !== void 0)
|
|
185
185
|
for (const i of e.summary.split(`
|
|
186
186
|
`))
|
|
187
187
|
a.push(`${o}${i}`);
|
|
188
188
|
for (const i of e.parts)
|
|
189
|
-
a.push(
|
|
189
|
+
a.push(gn(i, o));
|
|
190
190
|
for (const i of e.children)
|
|
191
|
-
a.push(...
|
|
191
|
+
a.push(...yt(i, o, n));
|
|
192
192
|
return e.truncated && a.push(`${o}- … nested components omitted, depth limit reached`), a;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function fn(e, t = {}) {
|
|
195
195
|
const n = Array.isArray(e) ? e : [e], a = {
|
|
196
196
|
includeSummary: t.includeSummary ?? !0
|
|
197
197
|
};
|
|
198
|
-
return n.length === 0 ? "No Sprint components found." : n.flatMap((o) =>
|
|
198
|
+
return n.length === 0 ? "No Sprint components found." : n.flatMap((o) => yt(o, "", a)).join(`
|
|
199
199
|
`);
|
|
200
200
|
}
|
|
201
|
-
const
|
|
201
|
+
const kt = (e) => fn(e), me = We({
|
|
202
202
|
view: "human",
|
|
203
203
|
setView: () => {
|
|
204
204
|
},
|
|
205
205
|
controls: "always",
|
|
206
|
-
format:
|
|
206
|
+
format: kt,
|
|
207
207
|
owned: !1
|
|
208
|
-
}),
|
|
209
|
-
function
|
|
210
|
-
return
|
|
208
|
+
}), bn = me.Provider;
|
|
209
|
+
function W() {
|
|
210
|
+
return le(me).view;
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
return
|
|
212
|
+
function vn() {
|
|
213
|
+
return le(me);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
return
|
|
215
|
+
function Z() {
|
|
216
|
+
return le(me).controls;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
return
|
|
218
|
+
function Q() {
|
|
219
|
+
return le(me).format;
|
|
220
220
|
}
|
|
221
|
-
const
|
|
222
|
-
function
|
|
223
|
-
return
|
|
221
|
+
const Tt = We(0), xe = Tt.Provider;
|
|
222
|
+
function Ae() {
|
|
223
|
+
return le(Tt);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function E(e) {
|
|
226
226
|
const t = {};
|
|
227
227
|
for (const [n, a] of Object.entries(e.state ?? {}))
|
|
228
228
|
a === !1 || a === null || a === void 0 || (t[n] = a);
|
|
@@ -238,8 +238,8 @@ function R(e) {
|
|
|
238
238
|
...e.region === !0 ? { region: !0 } : {}
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
return
|
|
241
|
+
function q(e) {
|
|
242
|
+
return pt(e.component, {
|
|
243
243
|
state: {
|
|
244
244
|
...e.state,
|
|
245
245
|
tool: e.tool,
|
|
@@ -248,221 +248,221 @@ function M(e) {
|
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
const t = { [
|
|
253
|
-
return e.tool !== void 0 && (t[
|
|
251
|
+
function xt(e) {
|
|
252
|
+
const t = { [ut]: e.component };
|
|
253
|
+
return e.tool !== void 0 && (t[ge] = e.tool), t;
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function wn(e, t) {
|
|
256
256
|
const n = {
|
|
257
|
-
[
|
|
258
|
-
[
|
|
257
|
+
[ut]: e,
|
|
258
|
+
[ce]: t.part
|
|
259
259
|
};
|
|
260
|
-
return t.tool !== void 0 && (n[
|
|
260
|
+
return t.tool !== void 0 && (n[ge] = t.tool), n;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
263
|
-
const { [
|
|
262
|
+
function D(e) {
|
|
263
|
+
const { [ae]: t, ...n } = pt("", {
|
|
264
264
|
part: e.part,
|
|
265
265
|
state: { ...e.state, tool: e.tool }
|
|
266
266
|
});
|
|
267
267
|
return n;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Ce(e, t) {
|
|
270
270
|
return t([e]).split(`
|
|
271
271
|
`);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
const { node: t, children: n } = e, a =
|
|
275
|
-
return /* @__PURE__ */
|
|
273
|
+
function _(e) {
|
|
274
|
+
const { node: t, children: n } = e, a = Ae(), o = Q(), i = " ".repeat(a), l = Ce(t, o).map((r) => `${i}${r}`);
|
|
275
|
+
return /* @__PURE__ */ C(xe, { value: a + 1, children: [
|
|
276
276
|
`${l.join(`
|
|
277
277
|
`)}
|
|
278
278
|
`,
|
|
279
279
|
n
|
|
280
280
|
] });
|
|
281
281
|
}
|
|
282
|
-
function
|
|
283
|
-
const { node: t, onActivate: n, isActionable: a, children: o } = e, i =
|
|
284
|
-
return /* @__PURE__ */
|
|
285
|
-
`${
|
|
282
|
+
function fe(e) {
|
|
283
|
+
const { node: t, onActivate: n, isActionable: a, children: o } = e, i = Ae(), l = Q(), r = " ".repeat(i), h = Ce(t, l), c = h.length - t.parts.length, g = h.slice(0, c).map((p) => `${r}${p}`);
|
|
284
|
+
return /* @__PURE__ */ C(xe, { value: i + 1, children: [
|
|
285
|
+
`${g.join(`
|
|
286
286
|
`)}
|
|
287
287
|
`,
|
|
288
|
-
t.parts.map((
|
|
289
|
-
const
|
|
290
|
-
return a !== void 0 && !a(
|
|
291
|
-
` },
|
|
288
|
+
t.parts.map((p, m) => {
|
|
289
|
+
const d = h[c + m] ?? "", A = d.trimStart(), f = `${r}${d.slice(0, d.length - A.length)}`, v = `${p.part}-${p.label ?? m}`;
|
|
290
|
+
return a !== void 0 && !a(p, m) ? /* @__PURE__ */ s(Ee, { children: `${f}${A}
|
|
291
|
+
` }, v) : /* @__PURE__ */ C(Ee, { children: [
|
|
292
292
|
f,
|
|
293
293
|
/* @__PURE__ */ s(
|
|
294
294
|
"button",
|
|
295
295
|
{
|
|
296
296
|
type: "button",
|
|
297
|
-
...
|
|
298
|
-
onClick: () => n(
|
|
299
|
-
children:
|
|
297
|
+
...wn(t.component, p),
|
|
298
|
+
onClick: () => n(p, m),
|
|
299
|
+
children: A
|
|
300
300
|
}
|
|
301
301
|
),
|
|
302
302
|
`
|
|
303
303
|
`
|
|
304
|
-
] },
|
|
304
|
+
] }, v);
|
|
305
305
|
}),
|
|
306
306
|
o
|
|
307
307
|
] });
|
|
308
308
|
}
|
|
309
|
-
function
|
|
310
|
-
const { node: t, value: n, onValueChange: a, multiline: o = !1, masked: i = !1, ref: l } = e, r =
|
|
309
|
+
function At(e) {
|
|
310
|
+
const { node: t, value: n, onValueChange: a, multiline: o = !1, masked: i = !1, ref: l } = e, r = Ae(), h = Q(), c = " ".repeat(r), g = Ce(t, h).map((d) => `${c}${d}`), p = xt(t), m = o ? /* @__PURE__ */ s(
|
|
311
311
|
"textarea",
|
|
312
312
|
{
|
|
313
|
-
...
|
|
313
|
+
...p,
|
|
314
314
|
"aria-label": t.label,
|
|
315
315
|
value: n,
|
|
316
|
-
onChange: (
|
|
316
|
+
onChange: (d) => a(d.currentTarget.value),
|
|
317
317
|
ref: l
|
|
318
318
|
}
|
|
319
319
|
) : /* @__PURE__ */ s(
|
|
320
320
|
"input",
|
|
321
321
|
{
|
|
322
|
-
...
|
|
322
|
+
...p,
|
|
323
323
|
"aria-label": t.label,
|
|
324
324
|
type: i ? "password" : "text",
|
|
325
325
|
value: n,
|
|
326
|
-
onChange: (
|
|
326
|
+
onChange: (d) => a(d.currentTarget.value),
|
|
327
327
|
ref: l
|
|
328
328
|
}
|
|
329
329
|
);
|
|
330
|
-
return /* @__PURE__ */
|
|
331
|
-
`${
|
|
330
|
+
return /* @__PURE__ */ C(xe, { value: r + 1, children: [
|
|
331
|
+
`${g.join(`
|
|
332
332
|
`)}
|
|
333
333
|
`,
|
|
334
334
|
c,
|
|
335
|
-
|
|
335
|
+
m,
|
|
336
336
|
`
|
|
337
337
|
`
|
|
338
338
|
] });
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
const { node: t, as: n = "button", href: a, children: o, ref: i, ...l } = e, r =
|
|
340
|
+
function be(e) {
|
|
341
|
+
const { node: t, as: n = "button", href: a, children: o, ref: i, ...l } = e, r = Ae(), h = Q(), c = " ".repeat(r), [g = "", ...p] = Ce(t, h), m = p.map((f) => `${c}${f}`), d = xt(t), A = n === "a" ? /* @__PURE__ */ s(
|
|
342
342
|
"a",
|
|
343
343
|
{
|
|
344
344
|
...l,
|
|
345
|
-
...
|
|
345
|
+
...d,
|
|
346
346
|
href: a ?? "#",
|
|
347
347
|
ref: i,
|
|
348
|
-
children:
|
|
348
|
+
children: g
|
|
349
349
|
}
|
|
350
350
|
) : /* @__PURE__ */ s(
|
|
351
351
|
"button",
|
|
352
352
|
{
|
|
353
353
|
...l,
|
|
354
|
-
...
|
|
354
|
+
...d,
|
|
355
355
|
ref: i,
|
|
356
|
-
children:
|
|
356
|
+
children: g
|
|
357
357
|
}
|
|
358
358
|
);
|
|
359
|
-
return /* @__PURE__ */
|
|
359
|
+
return /* @__PURE__ */ C(xe, { value: r + 1, children: [
|
|
360
360
|
c,
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
A,
|
|
362
|
+
m.length === 0 ? `
|
|
363
363
|
` : `
|
|
364
|
-
${
|
|
364
|
+
${m.join(`
|
|
365
365
|
`)}
|
|
366
366
|
`,
|
|
367
367
|
o
|
|
368
368
|
] });
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function yn(e) {
|
|
371
371
|
return e.part === "cell" && typeof e.state.column == "string" && typeof e.state.row == "string";
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Oe(e) {
|
|
374
374
|
return e.replace(/\|/g, "\\|").replace(/\s*\n\s*/g, " ");
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function Ye(e, t) {
|
|
377
377
|
return JSON.stringify([e, t]);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
if (e.parts.length === 0 || !e.parts.every(
|
|
379
|
+
function Ct(e) {
|
|
380
|
+
if (e.parts.length === 0 || !e.parts.every(yn)) return e;
|
|
381
381
|
const t = [], n = [], a = /* @__PURE__ */ new Map();
|
|
382
382
|
for (const i of e.parts) {
|
|
383
383
|
const l = String(i.state.column), r = String(i.state.row);
|
|
384
|
-
t.includes(l) || t.push(l), n.includes(r) || n.push(r), a.set(
|
|
384
|
+
t.includes(l) || t.push(l), n.includes(r) || n.push(r), a.set(Ye(r, l), i.label ?? "");
|
|
385
385
|
}
|
|
386
386
|
const o = [
|
|
387
|
-
`| row | ${t.map(
|
|
387
|
+
`| row | ${t.map(Oe).join(" | ")} |`,
|
|
388
388
|
`| --- | ${t.map(() => "---").join(" | ")} |`,
|
|
389
389
|
...n.map(
|
|
390
|
-
(i) => `| ${
|
|
390
|
+
(i) => `| ${Oe(i)} | ${t.map((l) => Oe(a.get(Ye(i, l)) ?? "")).join(" | ")} |`
|
|
391
391
|
)
|
|
392
392
|
].join(`
|
|
393
393
|
`);
|
|
394
394
|
return { ...e, parts: [], summary: o };
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function we(e) {
|
|
397
397
|
return e.replace(/\s+/g, " ").trim();
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function qe(e, t) {
|
|
400
400
|
if (e == null || typeof e == "boolean") return;
|
|
401
401
|
if (typeof e == "string" || typeof e == "number") {
|
|
402
402
|
t.push(String(e));
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
405
|
if (Array.isArray(e)) {
|
|
406
|
-
for (const a of e)
|
|
406
|
+
for (const a of e) qe(a, t);
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
409
|
-
if (!
|
|
409
|
+
if (!Qt(e)) return;
|
|
410
410
|
const n = e.props;
|
|
411
411
|
if (!(n["aria-hidden"] === !0 || n["aria-hidden"] === "true")) {
|
|
412
412
|
if (typeof n["aria-label"] == "string") {
|
|
413
413
|
t.push(n["aria-label"]);
|
|
414
414
|
return;
|
|
415
415
|
}
|
|
416
|
-
|
|
416
|
+
qe(n.children, t);
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function J(e) {
|
|
420
420
|
const t = [];
|
|
421
|
-
|
|
422
|
-
const n =
|
|
421
|
+
qe(e, t);
|
|
422
|
+
const n = we(t.join(""));
|
|
423
423
|
return n === "" ? void 0 : n;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function kn(e) {
|
|
426
426
|
return e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden");
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function St(e, t, n) {
|
|
429
429
|
if (e.nodeType === Node.TEXT_NODE) {
|
|
430
430
|
t.push(e.nodeValue ?? "");
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
433
|
if (e.nodeType !== Node.ELEMENT_NODE) return;
|
|
434
434
|
const a = e;
|
|
435
|
-
if (
|
|
435
|
+
if (kn(a) || n > 0 && a.hasAttribute(ae)) return;
|
|
436
436
|
const o = a.getAttribute("aria-label");
|
|
437
437
|
if (n > 0 && o !== null) {
|
|
438
438
|
t.push(o);
|
|
439
439
|
return;
|
|
440
440
|
}
|
|
441
441
|
for (const i of Array.from(a.childNodes))
|
|
442
|
-
|
|
442
|
+
St(i, t, n + 1);
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Se(e) {
|
|
445
445
|
const t = e.getAttribute("aria-label");
|
|
446
446
|
if (t !== null) {
|
|
447
|
-
const i =
|
|
447
|
+
const i = we(t);
|
|
448
448
|
return i === "" ? void 0 : i;
|
|
449
449
|
}
|
|
450
450
|
const n = e.getAttribute("aria-labelledby");
|
|
451
451
|
if (n !== null) {
|
|
452
|
-
const i = e.ownerDocument, l = n.split(/\s+/).filter((r) => r !== "").map((r) => i.getElementById(r)).filter((r) => r !== null).map((r) =>
|
|
453
|
-
if (l.length > 0) return
|
|
452
|
+
const i = e.ownerDocument, l = n.split(/\s+/).filter((r) => r !== "").map((r) => i.getElementById(r)).filter((r) => r !== null).map((r) => Se(r) ?? "").filter((r) => r !== "");
|
|
453
|
+
if (l.length > 0) return we(l.join(" "));
|
|
454
454
|
}
|
|
455
455
|
const a = [];
|
|
456
|
-
|
|
457
|
-
const o =
|
|
456
|
+
St(e, a, 0);
|
|
457
|
+
const o = we(a.join(""));
|
|
458
458
|
return o === "" ? void 0 : o;
|
|
459
459
|
}
|
|
460
|
-
const
|
|
460
|
+
const Tn = new Set(on), xn = /* @__PURE__ */ new Map([
|
|
461
461
|
["disabled", "disabled"],
|
|
462
462
|
["open", "open"],
|
|
463
463
|
["readonly", "readonly"],
|
|
464
464
|
["required", "required"]
|
|
465
|
-
]),
|
|
465
|
+
]), An = /* @__PURE__ */ new Map([
|
|
466
466
|
["aria-disabled", "disabled"],
|
|
467
467
|
["aria-busy", "loading"],
|
|
468
468
|
["aria-expanded", "expanded"],
|
|
@@ -471,65 +471,65 @@ const an = new Set(Bt), on = /* @__PURE__ */ new Map([
|
|
|
471
471
|
["aria-pressed", "pressed"],
|
|
472
472
|
["aria-invalid", "invalid"]
|
|
473
473
|
]);
|
|
474
|
-
function
|
|
474
|
+
function Nt(e) {
|
|
475
475
|
const t = {};
|
|
476
|
-
for (const [n, a] of
|
|
476
|
+
for (const [n, a] of An) {
|
|
477
477
|
const o = e.getAttribute(n);
|
|
478
478
|
o === null || o === "false" || (t[a] = o === "true" || o === "" ? !0 : o);
|
|
479
479
|
}
|
|
480
|
-
for (const [n, a] of
|
|
480
|
+
for (const [n, a] of xn)
|
|
481
481
|
e.hasAttribute(n) && (t[a] = !0);
|
|
482
482
|
for (const n of Array.from(e.attributes)) {
|
|
483
|
-
if (!n.name.startsWith(
|
|
484
|
-
const a = n.name.slice(
|
|
485
|
-
a === "" ||
|
|
483
|
+
if (!n.name.startsWith(ye)) continue;
|
|
484
|
+
const a = n.name.slice(ye.length);
|
|
485
|
+
a === "" || Tn.has(a) || (t[a] = n.value === "" ? !0 : n.value);
|
|
486
486
|
}
|
|
487
487
|
return t;
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function Cn(e) {
|
|
490
490
|
const t = [], n = [], a = (o) => {
|
|
491
491
|
for (const i of Array.from(o.children)) {
|
|
492
|
-
if (i.hasAttribute(
|
|
492
|
+
if (i.hasAttribute(ae)) {
|
|
493
493
|
n.push(i);
|
|
494
494
|
continue;
|
|
495
495
|
}
|
|
496
|
-
i.hasAttribute(
|
|
496
|
+
i.hasAttribute(ce) && t.push(i), a(i);
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
return a(e), { parts: t, children: n };
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
const t = e.getAttribute(
|
|
501
|
+
function Sn(e) {
|
|
502
|
+
const t = e.getAttribute(ce) ?? "", n = Se(e), a = e.getAttribute(ge);
|
|
503
503
|
return {
|
|
504
504
|
part: t,
|
|
505
|
-
state:
|
|
505
|
+
state: Nt(e),
|
|
506
506
|
...n === void 0 ? {} : { label: n },
|
|
507
507
|
...a === null || a === "" ? {} : { tool: a }
|
|
508
508
|
};
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
const n = e.getAttribute(
|
|
510
|
+
function _e(e, t = {}) {
|
|
511
|
+
const n = e.getAttribute(ae);
|
|
512
512
|
if (n === null) return null;
|
|
513
|
-
const a = t.maxDepth ?? 8, o = t.lookupMeta ??
|
|
514
|
-
return
|
|
513
|
+
const a = t.maxDepth ?? 8, o = t.lookupMeta ?? hn, { parts: i, children: l } = Cn(e), r = Se(e), h = o(n)?.summary, c = e.getAttribute(ge), g = e.getAttribute(ht), p = a <= 0 && l.length > 0;
|
|
514
|
+
return Ct({
|
|
515
515
|
component: n,
|
|
516
|
-
state:
|
|
517
|
-
parts: i.map(
|
|
518
|
-
children:
|
|
519
|
-
(
|
|
520
|
-
).filter((
|
|
521
|
-
...
|
|
516
|
+
state: Nt(e),
|
|
517
|
+
parts: i.map(Sn),
|
|
518
|
+
children: p ? [] : l.map(
|
|
519
|
+
(m) => _e(m, { ...t, maxDepth: a - 1 })
|
|
520
|
+
).filter((m) => m !== null),
|
|
521
|
+
...h === void 0 ? {} : { summary: h },
|
|
522
522
|
...r === void 0 ? {} : { label: r },
|
|
523
523
|
...c === null || c === "" ? {} : { tool: c },
|
|
524
|
-
...
|
|
525
|
-
...e.hasAttribute(
|
|
526
|
-
...
|
|
524
|
+
...g === null || g === "" ? {} : { owner: g },
|
|
525
|
+
...e.hasAttribute(Be) ? { region: !0 } : {},
|
|
526
|
+
...p ? { truncated: !0 } : {}
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function Pt(e) {
|
|
530
530
|
const t = [], n = (a) => {
|
|
531
531
|
for (const o of Array.from(a.children)) {
|
|
532
|
-
if (o.hasAttribute(
|
|
532
|
+
if (o.hasAttribute(ae)) {
|
|
533
533
|
t.push(o);
|
|
534
534
|
continue;
|
|
535
535
|
}
|
|
@@ -538,7 +538,7 @@ function mt(e) {
|
|
|
538
538
|
};
|
|
539
539
|
return n(e), t;
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function Nn(e) {
|
|
542
542
|
const t = e.filter((i) => i.owner !== void 0);
|
|
543
543
|
if (t.length === 0) return e;
|
|
544
544
|
const n = /* @__PURE__ */ new Map(), a = (i) => {
|
|
@@ -555,11 +555,11 @@ function cn(e) {
|
|
|
555
555
|
}
|
|
556
556
|
return e.filter((i) => !o.has(i));
|
|
557
557
|
}
|
|
558
|
-
function
|
|
559
|
-
const n =
|
|
560
|
-
return
|
|
558
|
+
function Pn(e, t = {}) {
|
|
559
|
+
const n = Pt(e).map((a) => _e(a, t)).filter((a) => a !== null);
|
|
560
|
+
return Nn(n);
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function ee() {
|
|
563
563
|
return new Promise((e) => {
|
|
564
564
|
if (typeof requestAnimationFrame != "function") {
|
|
565
565
|
setTimeout(e, 0);
|
|
@@ -570,100 +570,100 @@ function K() {
|
|
|
570
570
|
});
|
|
571
571
|
});
|
|
572
572
|
}
|
|
573
|
-
const
|
|
574
|
-
function
|
|
573
|
+
const De = 48;
|
|
574
|
+
function ie(e) {
|
|
575
575
|
return e.normalize("NFKD").replace(/[̀-ͯ]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
const a =
|
|
577
|
+
function Je(e, t, n) {
|
|
578
|
+
const a = ie(n);
|
|
579
579
|
if (a === "") return null;
|
|
580
|
-
const o = [
|
|
581
|
-
for (; i.length > 0 && [...i, o].join("-").length >
|
|
580
|
+
const o = [ie(t), a].filter((c) => c !== "").join("-"), i = e.map(ie).filter((c) => c !== "");
|
|
581
|
+
for (; i.length > 0 && [...i, o].join("-").length > De; )
|
|
582
582
|
i.shift();
|
|
583
583
|
const l = [...i, o].join("-");
|
|
584
|
-
if (l.length <=
|
|
585
|
-
const r = l.slice(0,
|
|
586
|
-
return
|
|
584
|
+
if (l.length <= De) return l;
|
|
585
|
+
const r = l.slice(0, De), h = r.lastIndexOf("-");
|
|
586
|
+
return h > 0 ? r.slice(0, h) : r;
|
|
587
587
|
}
|
|
588
|
-
const
|
|
589
|
-
function
|
|
590
|
-
const t =
|
|
588
|
+
const ue = /* @__PURE__ */ new Map();
|
|
589
|
+
function Ln(e) {
|
|
590
|
+
const t = ue.get(e);
|
|
591
591
|
if (t !== void 0) return t;
|
|
592
592
|
const n = { holders: /* @__PURE__ */ new Set(), listeners: /* @__PURE__ */ new Map() };
|
|
593
|
-
return
|
|
593
|
+
return ue.set(e, n), n;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
const a =
|
|
595
|
+
function Rn(e, t, n) {
|
|
596
|
+
const a = Ln(e);
|
|
597
597
|
a.holders.add(t), a.listeners.set(t, n);
|
|
598
598
|
for (const [o, i] of a.listeners)
|
|
599
599
|
o !== t && i();
|
|
600
600
|
return () => {
|
|
601
601
|
if (a.holders.delete(t), a.listeners.delete(t), a.holders.size === 0) {
|
|
602
|
-
|
|
602
|
+
ue.delete(e);
|
|
603
603
|
return;
|
|
604
604
|
}
|
|
605
605
|
for (const o of a.listeners.values()) o();
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
const n =
|
|
608
|
+
function Qe(e, t) {
|
|
609
|
+
const n = ue.get(e);
|
|
610
610
|
return n === void 0 ? !1 : n.holders.size === 1 && n.holders.has(t);
|
|
611
611
|
}
|
|
612
|
-
function
|
|
613
|
-
return
|
|
612
|
+
function $n(e) {
|
|
613
|
+
return ue.get(e)?.holders.size ?? 0;
|
|
614
614
|
}
|
|
615
|
-
const
|
|
616
|
-
function
|
|
617
|
-
return
|
|
615
|
+
const Lt = We({ path: [] }), Te = Lt.Provider;
|
|
616
|
+
function Ne() {
|
|
617
|
+
return le(Lt).path;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
620
|
-
const { spec: t, label: n, nameOverride: a, inputSchema: o, enabled: i = !0, execute: l } = e, r =
|
|
621
|
-
c.current.key !==
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
const
|
|
625
|
-
|
|
626
|
-
|
|
619
|
+
function X(e) {
|
|
620
|
+
const { spec: t, label: n, nameOverride: a, inputSchema: o, enabled: i = !0, execute: l } = e, r = Ne(), h = `${t.verb}|${o === void 0 ? "" : JSON.stringify(o)}`, c = b({ key: h, value: o ?? t.inputSchema });
|
|
621
|
+
c.current.key !== h && (c.current = { key: h, value: o ?? t.inputSchema });
|
|
622
|
+
const g = c.current.value, p = b(null);
|
|
623
|
+
p.current === null && (p.current = /* @__PURE__ */ Symbol("sprint-tool"));
|
|
624
|
+
const m = b(l);
|
|
625
|
+
H(() => {
|
|
626
|
+
m.current = l;
|
|
627
627
|
});
|
|
628
|
-
const
|
|
629
|
-
return
|
|
630
|
-
const
|
|
631
|
-
if (
|
|
628
|
+
const d = a === void 0 ? n === void 0 ? null : Je(r, t.verb, n) : Je(r, t.verb, a), [A, f] = Y(!1);
|
|
629
|
+
return H(() => {
|
|
630
|
+
const v = p.current;
|
|
631
|
+
if (d === null || !i || v === null) {
|
|
632
632
|
f(!1);
|
|
633
633
|
return;
|
|
634
634
|
}
|
|
635
|
-
const
|
|
636
|
-
f(
|
|
635
|
+
const k = Rn(d, v, () => {
|
|
636
|
+
f(Qe(d, v));
|
|
637
637
|
});
|
|
638
|
-
return
|
|
639
|
-
`Sprint tool name "${
|
|
640
|
-
), f(
|
|
641
|
-
|
|
638
|
+
return $n(d) > 1 && console.warn(
|
|
639
|
+
`Sprint tool name "${d}" is claimed by more than one component. None of them will register a tool. Set agentName on all but one, or label them distinctly.`
|
|
640
|
+
), f(Qe(d, v)), () => {
|
|
641
|
+
k(), f(!1);
|
|
642
642
|
};
|
|
643
|
-
}, [
|
|
644
|
-
if (!
|
|
645
|
-
const
|
|
646
|
-
return
|
|
643
|
+
}, [d, i]), H(() => {
|
|
644
|
+
if (!A || d === null) return;
|
|
645
|
+
const v = new AbortController();
|
|
646
|
+
return cn(
|
|
647
647
|
{
|
|
648
|
-
name:
|
|
648
|
+
name: d,
|
|
649
649
|
description: t.description,
|
|
650
|
-
inputSchema:
|
|
650
|
+
inputSchema: g,
|
|
651
651
|
annotations: {
|
|
652
652
|
readOnlyHint: t.readOnly,
|
|
653
653
|
untrustedContentHint: t.untrustedContent
|
|
654
654
|
},
|
|
655
|
-
execute: (
|
|
655
|
+
execute: (k, T) => m.current(k, T)
|
|
656
656
|
},
|
|
657
|
-
|
|
657
|
+
v.signal
|
|
658
658
|
), () => {
|
|
659
|
-
|
|
659
|
+
v.abort();
|
|
660
660
|
};
|
|
661
|
-
}, [
|
|
661
|
+
}, [A, d, t, g]), A && d !== null ? d : void 0;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
|
|
663
|
+
function te(e) {
|
|
664
|
+
en(e);
|
|
665
665
|
}
|
|
666
|
-
const
|
|
666
|
+
const Rt = {
|
|
667
667
|
verb: "dismiss",
|
|
668
668
|
description: "Dismiss this alert, exactly as a person clicking its dismiss control would. The page decides what dismissal means, usually removing the message. Returns the alert's state after the dismissal, or says the alert left the page.",
|
|
669
669
|
inputSchema: { type: "object", properties: {} },
|
|
@@ -671,7 +671,7 @@ const bt = {
|
|
|
671
671
|
untrustedContent: !0,
|
|
672
672
|
registeredWhen: "The alert is mounted, has an onDismiss handler, and label or agentName provides a stable name.",
|
|
673
673
|
unregisteredWhen: "The alert unmounts or loses its onDismiss handler."
|
|
674
|
-
},
|
|
674
|
+
}, Ze = I({
|
|
675
675
|
name: "Alert",
|
|
676
676
|
category: "feedback",
|
|
677
677
|
summary: "A status message for the outcome of something that already happened: a notice, a warning, or a failure.",
|
|
@@ -720,7 +720,7 @@ const bt = {
|
|
|
720
720
|
}
|
|
721
721
|
},
|
|
722
722
|
tools: {
|
|
723
|
-
dismiss:
|
|
723
|
+
dismiss: Rt
|
|
724
724
|
},
|
|
725
725
|
agentView: {
|
|
726
726
|
example: '- **Alert** "Check your inbox" [dismissible, tone=info]'
|
|
@@ -747,7 +747,7 @@ const bt = {
|
|
|
747
747
|
notes: "Danger and warning render role=alert and announce assertively; info and neutral render role=status. The dismiss control is a labelled button. Render the alert when the condition occurs rather than toggling its visibility, or the announcement is lost."
|
|
748
748
|
}
|
|
749
749
|
});
|
|
750
|
-
function
|
|
750
|
+
function Fa(e) {
|
|
751
751
|
const {
|
|
752
752
|
tone: t = "info",
|
|
753
753
|
label: n,
|
|
@@ -756,74 +756,74 @@ function xa(e) {
|
|
|
756
756
|
agentTool: i = !0,
|
|
757
757
|
children: l,
|
|
758
758
|
...r
|
|
759
|
-
} = e,
|
|
760
|
-
|
|
761
|
-
const
|
|
762
|
-
|
|
763
|
-
const
|
|
764
|
-
|
|
759
|
+
} = e, h = W(), c = Z(), g = Q(), p = b(null), m = b(a);
|
|
760
|
+
m.current = a;
|
|
761
|
+
const d = b(g);
|
|
762
|
+
d.current = g;
|
|
763
|
+
const A = b(E({ component: Ze.name })), f = b(!0);
|
|
764
|
+
H(() => (f.current = !0, () => {
|
|
765
765
|
f.current = !1;
|
|
766
766
|
}), []);
|
|
767
|
-
const
|
|
768
|
-
const
|
|
769
|
-
if (
|
|
770
|
-
|
|
767
|
+
const v = a !== void 0, k = F(async () => {
|
|
768
|
+
const L = p.current;
|
|
769
|
+
if (L !== null)
|
|
770
|
+
L.click();
|
|
771
771
|
else {
|
|
772
|
-
const
|
|
773
|
-
if (
|
|
774
|
-
|
|
775
|
-
}
|
|
776
|
-
return await
|
|
777
|
-
${
|
|
778
|
-
}, []), T =
|
|
779
|
-
spec:
|
|
772
|
+
const w = m.current;
|
|
773
|
+
if (w === void 0) return "This alert cannot be dismissed.";
|
|
774
|
+
te(() => w());
|
|
775
|
+
}
|
|
776
|
+
return await ee(), f.current ? `Dismissed. The alert is now:
|
|
777
|
+
${d.current([A.current])}` : "Dismissed. The alert is gone from the page.";
|
|
778
|
+
}, []), T = X({
|
|
779
|
+
spec: Rt,
|
|
780
780
|
label: o ?? n,
|
|
781
|
-
enabled: i &&
|
|
782
|
-
execute:
|
|
783
|
-
}),
|
|
784
|
-
|
|
781
|
+
enabled: i && v,
|
|
782
|
+
execute: k
|
|
783
|
+
}), S = J(l), P = [];
|
|
784
|
+
S !== void 0 && P.push({ part: "message", label: S, state: {} }), v && P.push({
|
|
785
785
|
part: "dismiss",
|
|
786
786
|
label: "Dismiss",
|
|
787
787
|
state: {},
|
|
788
788
|
...T === void 0 ? {} : { tool: T }
|
|
789
789
|
});
|
|
790
|
-
const
|
|
791
|
-
component:
|
|
790
|
+
const O = E({
|
|
791
|
+
component: Ze.name,
|
|
792
792
|
label: n,
|
|
793
|
-
state: { tone: t, dismissible:
|
|
794
|
-
parts:
|
|
793
|
+
state: { tone: t, dismissible: v },
|
|
794
|
+
parts: P
|
|
795
795
|
});
|
|
796
|
-
if (
|
|
797
|
-
return !
|
|
798
|
-
|
|
796
|
+
if (A.current = O, h === "agent")
|
|
797
|
+
return !v || c === "never" ? /* @__PURE__ */ s(_, { node: O }) : /* @__PURE__ */ s(
|
|
798
|
+
fe,
|
|
799
799
|
{
|
|
800
|
-
node:
|
|
801
|
-
isActionable: (
|
|
800
|
+
node: O,
|
|
801
|
+
isActionable: (L) => L.part === "dismiss",
|
|
802
802
|
onActivate: () => a?.()
|
|
803
803
|
}
|
|
804
804
|
);
|
|
805
|
-
const
|
|
806
|
-
return /* @__PURE__ */
|
|
805
|
+
const M = t === "danger" || t === "warning" ? "alert" : "status";
|
|
806
|
+
return /* @__PURE__ */ C(
|
|
807
807
|
"div",
|
|
808
808
|
{
|
|
809
809
|
...r,
|
|
810
|
-
...
|
|
811
|
-
role:
|
|
810
|
+
...q(O),
|
|
811
|
+
role: M,
|
|
812
812
|
...n === void 0 ? {} : { "aria-label": n },
|
|
813
813
|
children: [
|
|
814
|
-
n === void 0 ? null : /* @__PURE__ */ s("strong", { ...
|
|
815
|
-
/* @__PURE__ */ s("div", { ...
|
|
816
|
-
|
|
814
|
+
n === void 0 ? null : /* @__PURE__ */ s("strong", { ...D({ part: "title", state: {} }), children: n }),
|
|
815
|
+
/* @__PURE__ */ s("div", { ...D({ part: "message", state: {} }), children: l }),
|
|
816
|
+
v ? /* @__PURE__ */ s(
|
|
817
817
|
"button",
|
|
818
818
|
{
|
|
819
|
-
...
|
|
819
|
+
...D({
|
|
820
820
|
part: "dismiss",
|
|
821
821
|
state: {},
|
|
822
822
|
...T === void 0 ? {} : { tool: T }
|
|
823
823
|
}),
|
|
824
824
|
type: "button",
|
|
825
825
|
"aria-label": "Dismiss",
|
|
826
|
-
ref:
|
|
826
|
+
ref: p,
|
|
827
827
|
onClick: () => a?.(),
|
|
828
828
|
children: "×"
|
|
829
829
|
}
|
|
@@ -832,7 +832,7 @@ ${h.current([y.current])}` : "Dismissed. The alert is gone from the page.";
|
|
|
832
832
|
}
|
|
833
833
|
);
|
|
834
834
|
}
|
|
835
|
-
const
|
|
835
|
+
const $t = {
|
|
836
836
|
verb: "press",
|
|
837
837
|
description: "Press this button, exactly as a person clicking it would. Returns the button's state after the press, so a follow-up read is usually unnecessary. Any work the press starts is not waited for; if the button enters a loading state the result says so.",
|
|
838
838
|
inputSchema: { type: "object", properties: {} },
|
|
@@ -840,7 +840,7 @@ const vt = {
|
|
|
840
840
|
untrustedContent: !0,
|
|
841
841
|
registeredWhen: "The button is mounted, enabled, not loading, has a resolvable label, and no other component claims the same tool name.",
|
|
842
842
|
unregisteredWhen: "The button unmounts, becomes disabled, or starts loading."
|
|
843
|
-
},
|
|
843
|
+
}, et = I({
|
|
844
844
|
name: "Button",
|
|
845
845
|
category: "action",
|
|
846
846
|
summary: "A single action a person or an agent can trigger. Registers one press tool named from its own label.",
|
|
@@ -908,7 +908,7 @@ const vt = {
|
|
|
908
908
|
}
|
|
909
909
|
},
|
|
910
910
|
tools: {
|
|
911
|
-
press:
|
|
911
|
+
press: $t
|
|
912
912
|
},
|
|
913
913
|
agentView: {
|
|
914
914
|
example: '- **Button** "Prepare launch" [tone=action] → tool `press-prepare-launch`'
|
|
@@ -945,10 +945,10 @@ const vt = {
|
|
|
945
945
|
notes: "Loading sets aria-busy and disables the control. Focus is an offset keyline, never a rounded ring."
|
|
946
946
|
}
|
|
947
947
|
});
|
|
948
|
-
function
|
|
948
|
+
function On() {
|
|
949
949
|
return new MouseEvent("click", { bubbles: !0, cancelable: !0 });
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Dn(e) {
|
|
952
952
|
const {
|
|
953
953
|
tone: t = "neutral",
|
|
954
954
|
block: n = !1,
|
|
@@ -957,76 +957,76 @@ function mn(e) {
|
|
|
957
957
|
agentTool: i = !0,
|
|
958
958
|
disabled: l = !1,
|
|
959
959
|
type: r = "button",
|
|
960
|
-
children:
|
|
960
|
+
children: h,
|
|
961
961
|
ref: c,
|
|
962
|
-
onClick:
|
|
963
|
-
...
|
|
964
|
-
} = e,
|
|
965
|
-
(
|
|
966
|
-
f.current =
|
|
962
|
+
onClick: g,
|
|
963
|
+
...p
|
|
964
|
+
} = e, m = W(), d = Z(), A = Q(), f = b(null), v = F(
|
|
965
|
+
(N) => {
|
|
966
|
+
f.current = N, typeof c == "function" ? c(N) : c != null && (c.current = N);
|
|
967
967
|
},
|
|
968
968
|
[c]
|
|
969
|
-
),
|
|
970
|
-
|
|
971
|
-
if (
|
|
972
|
-
const
|
|
973
|
-
|
|
969
|
+
), k = o ?? (typeof h == "string" ? h : void 0), [T, S] = Y(void 0);
|
|
970
|
+
Zt(() => {
|
|
971
|
+
if (k !== void 0) return;
|
|
972
|
+
const N = f.current;
|
|
973
|
+
N !== null && S(Se(N));
|
|
974
974
|
});
|
|
975
|
-
const
|
|
976
|
-
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
const
|
|
980
|
-
|
|
981
|
-
|
|
975
|
+
const P = l || a, O = k ?? T, M = b(g);
|
|
976
|
+
M.current = g;
|
|
977
|
+
const L = b(E({ component: et.name })), w = b(A);
|
|
978
|
+
w.current = A;
|
|
979
|
+
const y = b(!0);
|
|
980
|
+
H(() => (y.current = !0, () => {
|
|
981
|
+
y.current = !1;
|
|
982
982
|
}), []);
|
|
983
|
-
const x =
|
|
984
|
-
const
|
|
985
|
-
if (
|
|
986
|
-
|
|
983
|
+
const x = F(async () => {
|
|
984
|
+
const N = f.current;
|
|
985
|
+
if (N !== null)
|
|
986
|
+
N.click();
|
|
987
987
|
else {
|
|
988
|
-
const
|
|
989
|
-
if (
|
|
988
|
+
const V = M.current;
|
|
989
|
+
if (V === void 0)
|
|
990
990
|
return "This button renders no control in the current view and has no click handler.";
|
|
991
|
-
|
|
992
|
-
}
|
|
993
|
-
return await
|
|
994
|
-
${
|
|
995
|
-
}, []),
|
|
996
|
-
spec:
|
|
997
|
-
label:
|
|
998
|
-
enabled: i && !
|
|
991
|
+
te(() => V(On()));
|
|
992
|
+
}
|
|
993
|
+
return await ee(), y.current ? `Pressed. The button is now:
|
|
994
|
+
${w.current([L.current])}` : "The press removed this button from the page.";
|
|
995
|
+
}, []), R = X({
|
|
996
|
+
spec: $t,
|
|
997
|
+
label: O,
|
|
998
|
+
enabled: i && !P,
|
|
999
999
|
execute: x
|
|
1000
|
-
}),
|
|
1001
|
-
component:
|
|
1002
|
-
label:
|
|
1003
|
-
tool:
|
|
1004
|
-
state: { tone: t, block: n, loading: a, disabled:
|
|
1000
|
+
}), $ = E({
|
|
1001
|
+
component: et.name,
|
|
1002
|
+
label: O,
|
|
1003
|
+
tool: R,
|
|
1004
|
+
state: { tone: t, block: n, loading: a, disabled: P }
|
|
1005
1005
|
});
|
|
1006
|
-
return
|
|
1007
|
-
|
|
1006
|
+
return L.current = $, m === "agent" ? P || d === "never" ? /* @__PURE__ */ s(_, { node: $ }) : /* @__PURE__ */ s(
|
|
1007
|
+
be,
|
|
1008
1008
|
{
|
|
1009
|
-
node:
|
|
1009
|
+
node: $,
|
|
1010
1010
|
type: r,
|
|
1011
|
-
ref:
|
|
1012
|
-
onClick:
|
|
1011
|
+
ref: v,
|
|
1012
|
+
onClick: g,
|
|
1013
1013
|
"aria-busy": a || void 0
|
|
1014
1014
|
}
|
|
1015
1015
|
) : /* @__PURE__ */ s(
|
|
1016
1016
|
"button",
|
|
1017
1017
|
{
|
|
1018
|
-
...
|
|
1019
|
-
...
|
|
1018
|
+
...p,
|
|
1019
|
+
...q($),
|
|
1020
1020
|
type: r,
|
|
1021
|
-
ref:
|
|
1022
|
-
onClick:
|
|
1023
|
-
disabled:
|
|
1021
|
+
ref: v,
|
|
1022
|
+
onClick: g,
|
|
1023
|
+
disabled: P,
|
|
1024
1024
|
"aria-busy": a || void 0,
|
|
1025
|
-
children:
|
|
1025
|
+
children: h
|
|
1026
1026
|
}
|
|
1027
1027
|
);
|
|
1028
1028
|
}
|
|
1029
|
-
const
|
|
1029
|
+
const Ot = {
|
|
1030
1030
|
verb: "open",
|
|
1031
1031
|
description: "Open this card, exactly as a person clicking it would. What opening does is the card's own business: it may reveal detail in place, select this item, or start a flow. Returns the card's state after the click.",
|
|
1032
1032
|
inputSchema: { type: "object", properties: {} },
|
|
@@ -1034,7 +1034,7 @@ const wt = {
|
|
|
1034
1034
|
untrustedContent: !0,
|
|
1035
1035
|
registeredWhen: "The card acts rather than navigates, is mounted, enabled, has a resolvable label, and no other component claims the same tool name.",
|
|
1036
1036
|
unregisteredWhen: "The card unmounts, becomes disabled, or turns into a link by taking an href."
|
|
1037
|
-
},
|
|
1037
|
+
}, tt = I({
|
|
1038
1038
|
name: "Card",
|
|
1039
1039
|
category: "navigation",
|
|
1040
1040
|
summary: "One entry in a catalogue: a title, a line or two of body, and the whole block clickable. Give it an href and it is a link; give it onClick and it is an action that registers an open tool.",
|
|
@@ -1084,7 +1084,7 @@ const wt = {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
},
|
|
1086
1086
|
tools: {
|
|
1087
|
-
open:
|
|
1087
|
+
open: Ot
|
|
1088
1088
|
},
|
|
1089
1089
|
agentView: {
|
|
1090
1090
|
example: '- **Card** "Button" [href=#/Button]\n - part `title` "Button"\n - part `body` "A single action a person or an agent can trigger."'
|
|
@@ -1109,7 +1109,7 @@ const wt = {
|
|
|
1109
1109
|
notes: "The whole block is one control: a link when it has an href, a button when it acts. The title names it, and the body is read as its content rather than as part of the name."
|
|
1110
1110
|
}
|
|
1111
1111
|
});
|
|
1112
|
-
function
|
|
1112
|
+
function Ha(e) {
|
|
1113
1113
|
const {
|
|
1114
1114
|
label: t,
|
|
1115
1115
|
children: n,
|
|
@@ -1118,79 +1118,79 @@ function Aa(e) {
|
|
|
1118
1118
|
disabled: i = !1,
|
|
1119
1119
|
agentTool: l,
|
|
1120
1120
|
agentName: r,
|
|
1121
|
-
ref:
|
|
1121
|
+
ref: h,
|
|
1122
1122
|
...c
|
|
1123
|
-
} = e,
|
|
1123
|
+
} = e, g = W(), p = Z(), m = Q(), d = a !== void 0, A = !d && i, f = b(null), v = F(
|
|
1124
1124
|
(x) => {
|
|
1125
|
-
f.current = x, typeof
|
|
1126
|
-
},
|
|
1127
|
-
[
|
|
1128
|
-
),
|
|
1129
|
-
|
|
1130
|
-
const T =
|
|
1131
|
-
|
|
1132
|
-
|
|
1125
|
+
f.current = x, typeof h == "function" ? h(x) : h != null && (h.current = x);
|
|
1126
|
+
},
|
|
1127
|
+
[h]
|
|
1128
|
+
), k = b(m);
|
|
1129
|
+
k.current = m;
|
|
1130
|
+
const T = b(E({ component: tt.name })), S = b(!0);
|
|
1131
|
+
H(() => (S.current = !0, () => {
|
|
1132
|
+
S.current = !1;
|
|
1133
1133
|
}), []);
|
|
1134
|
-
const
|
|
1134
|
+
const P = F(async () => {
|
|
1135
1135
|
const x = f.current;
|
|
1136
|
-
return x === null ? "This card renders no control in the current view." : (x.click(), await
|
|
1137
|
-
${
|
|
1138
|
-
}, []),
|
|
1139
|
-
spec:
|
|
1136
|
+
return x === null ? "This card renders no control in the current view." : (x.click(), await ee(), S.current ? `Opened. The card is now:
|
|
1137
|
+
${k.current([T.current])}` : "Opening removed this card from the page.");
|
|
1138
|
+
}, []), O = X({
|
|
1139
|
+
spec: Ot,
|
|
1140
1140
|
label: r ?? t,
|
|
1141
|
-
enabled: (l ?? !
|
|
1142
|
-
execute:
|
|
1143
|
-
}),
|
|
1141
|
+
enabled: (l ?? !d) && !A,
|
|
1142
|
+
execute: P
|
|
1143
|
+
}), M = J(n), L = [
|
|
1144
1144
|
{ part: "title", label: t, state: {} },
|
|
1145
|
-
...
|
|
1146
|
-
],
|
|
1147
|
-
component:
|
|
1145
|
+
...M === void 0 ? [] : [{ part: "body", label: M, state: {} }]
|
|
1146
|
+
], w = E({
|
|
1147
|
+
component: tt.name,
|
|
1148
1148
|
label: t,
|
|
1149
|
-
tool:
|
|
1150
|
-
state: { href: a, disabled:
|
|
1151
|
-
parts:
|
|
1149
|
+
tool: O,
|
|
1150
|
+
state: { href: a, disabled: A },
|
|
1151
|
+
parts: L
|
|
1152
1152
|
});
|
|
1153
|
-
if (T.current =
|
|
1154
|
-
return
|
|
1155
|
-
|
|
1153
|
+
if (T.current = w, g === "agent")
|
|
1154
|
+
return A || p === "never" ? /* @__PURE__ */ s(_, { node: w }) : /* @__PURE__ */ s(
|
|
1155
|
+
be,
|
|
1156
1156
|
{
|
|
1157
|
-
node:
|
|
1158
|
-
as:
|
|
1157
|
+
node: w,
|
|
1158
|
+
as: d ? "a" : "button",
|
|
1159
1159
|
href: a,
|
|
1160
|
-
ref:
|
|
1160
|
+
ref: v,
|
|
1161
1161
|
onClick: o
|
|
1162
1162
|
}
|
|
1163
1163
|
);
|
|
1164
|
-
const
|
|
1165
|
-
/* @__PURE__ */ s("span", { ...
|
|
1166
|
-
n === void 0 ? null : /* @__PURE__ */ s("span", { ...
|
|
1164
|
+
const y = /* @__PURE__ */ C(Ie, { children: [
|
|
1165
|
+
/* @__PURE__ */ s("span", { ...D({ part: "title", state: {} }), children: t }),
|
|
1166
|
+
n === void 0 ? null : /* @__PURE__ */ s("span", { ...D({ part: "body", state: {} }), children: n })
|
|
1167
1167
|
] });
|
|
1168
|
-
return
|
|
1168
|
+
return d ? /* @__PURE__ */ s(
|
|
1169
1169
|
"a",
|
|
1170
1170
|
{
|
|
1171
1171
|
...c,
|
|
1172
|
-
...
|
|
1172
|
+
...q(w),
|
|
1173
1173
|
href: a,
|
|
1174
1174
|
"aria-label": t,
|
|
1175
1175
|
onClick: o,
|
|
1176
|
-
ref:
|
|
1177
|
-
children:
|
|
1176
|
+
ref: v,
|
|
1177
|
+
children: y
|
|
1178
1178
|
}
|
|
1179
1179
|
) : /* @__PURE__ */ s(
|
|
1180
1180
|
"button",
|
|
1181
1181
|
{
|
|
1182
1182
|
...c,
|
|
1183
|
-
...
|
|
1183
|
+
...q(w),
|
|
1184
1184
|
type: "button",
|
|
1185
1185
|
"aria-label": t,
|
|
1186
1186
|
disabled: i,
|
|
1187
1187
|
onClick: o,
|
|
1188
|
-
ref:
|
|
1189
|
-
children:
|
|
1188
|
+
ref: v,
|
|
1189
|
+
children: y
|
|
1190
1190
|
}
|
|
1191
1191
|
);
|
|
1192
1192
|
}
|
|
1193
|
-
const
|
|
1193
|
+
const Dt = {
|
|
1194
1194
|
verb: "set",
|
|
1195
1195
|
description: "Check or uncheck this box by stating the end state, exactly as a person clicking it would. Setting the state it already has succeeds and changes nothing, so the call is safe to retry. Returns the box's state after the call, so a follow-up read is unnecessary.",
|
|
1196
1196
|
inputSchema: {
|
|
@@ -1207,7 +1207,7 @@ const yt = {
|
|
|
1207
1207
|
untrustedContent: !0,
|
|
1208
1208
|
registeredWhen: "The box is mounted, enabled, has a resolvable label, and no other component claims the same tool name.",
|
|
1209
1209
|
unregisteredWhen: "The box unmounts or becomes disabled."
|
|
1210
|
-
},
|
|
1210
|
+
}, nt = I({
|
|
1211
1211
|
name: "Checkbox",
|
|
1212
1212
|
category: "input",
|
|
1213
1213
|
summary: "A single on/off choice recorded as form data. It registers one set tool that takes the end state rather than toggling.",
|
|
@@ -1281,7 +1281,7 @@ const yt = {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
},
|
|
1283
1283
|
tools: {
|
|
1284
|
-
set:
|
|
1284
|
+
set: Dt
|
|
1285
1285
|
},
|
|
1286
1286
|
agentView: {
|
|
1287
1287
|
example: '- **Checkbox** "Accept the terms" [required] → tool `set-accept-the-terms`\n - part `error` "Required before launch"'
|
|
@@ -1325,10 +1325,10 @@ const yt = {
|
|
|
1325
1325
|
notes: "A native checkbox input wrapped by its label, visually replaced by a keylined square. Focus draws an offset keyline around the square; errors set aria-invalid and link with aria-describedby."
|
|
1326
1326
|
}
|
|
1327
1327
|
});
|
|
1328
|
-
function
|
|
1328
|
+
function En(e, t) {
|
|
1329
1329
|
return e !== void 0 ? [{ part: "error", label: e, state: {} }] : t !== void 0 ? [{ part: "hint", label: t, state: {} }] : [];
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1331
|
+
function Ga(e) {
|
|
1332
1332
|
const {
|
|
1333
1333
|
label: t,
|
|
1334
1334
|
checked: n,
|
|
@@ -1337,93 +1337,93 @@ function Ca(e) {
|
|
|
1337
1337
|
error: i,
|
|
1338
1338
|
name: l,
|
|
1339
1339
|
disabled: r = !1,
|
|
1340
|
-
required:
|
|
1340
|
+
required: h = !1,
|
|
1341
1341
|
agentName: c,
|
|
1342
|
-
agentTool:
|
|
1343
|
-
...
|
|
1344
|
-
} = e,
|
|
1345
|
-
|
|
1346
|
-
const T =
|
|
1342
|
+
agentTool: g = !0,
|
|
1343
|
+
...p
|
|
1344
|
+
} = e, m = W(), d = Z(), A = Q(), f = pe(), v = b(null), k = b(a);
|
|
1345
|
+
k.current = a;
|
|
1346
|
+
const T = b(n);
|
|
1347
1347
|
T.current = n;
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1350
|
-
const
|
|
1351
|
-
|
|
1352
|
-
|
|
1348
|
+
const S = b(A);
|
|
1349
|
+
S.current = A;
|
|
1350
|
+
const P = b(E({ component: nt.name })), O = b(!0);
|
|
1351
|
+
H(() => (O.current = !0, () => {
|
|
1352
|
+
O.current = !1;
|
|
1353
1353
|
}), []);
|
|
1354
|
-
const
|
|
1355
|
-
const
|
|
1356
|
-
if (typeof
|
|
1354
|
+
const M = F(async (x) => {
|
|
1355
|
+
const R = x.checked;
|
|
1356
|
+
if (typeof R != "boolean")
|
|
1357
1357
|
return 'Pass "checked" as true or false; it states the end state.';
|
|
1358
|
-
const
|
|
1359
|
-
if (
|
|
1360
|
-
const
|
|
1361
|
-
|
|
1362
|
-
}
|
|
1363
|
-
return await
|
|
1364
|
-
${
|
|
1365
|
-
}, []),
|
|
1366
|
-
spec:
|
|
1358
|
+
const $ = R === T.current;
|
|
1359
|
+
if (!$) {
|
|
1360
|
+
const V = v.current;
|
|
1361
|
+
V !== null ? V.click() : te(() => k.current(R));
|
|
1362
|
+
}
|
|
1363
|
+
return await ee(), O.current ? `${$ ? `Already ${R ? "checked" : "unchecked"}` : R ? "Checked" : "Unchecked"}. The checkbox is now:
|
|
1364
|
+
${S.current([P.current])}` : "The change removed this checkbox from the page.";
|
|
1365
|
+
}, []), L = X({
|
|
1366
|
+
spec: Dt,
|
|
1367
1367
|
label: c ?? t,
|
|
1368
|
-
enabled:
|
|
1369
|
-
execute:
|
|
1370
|
-
}),
|
|
1371
|
-
component:
|
|
1368
|
+
enabled: g && !r,
|
|
1369
|
+
execute: M
|
|
1370
|
+
}), w = E({
|
|
1371
|
+
component: nt.name,
|
|
1372
1372
|
label: t,
|
|
1373
|
-
tool:
|
|
1373
|
+
tool: L,
|
|
1374
1374
|
state: {
|
|
1375
1375
|
checked: n,
|
|
1376
1376
|
disabled: r,
|
|
1377
|
-
required:
|
|
1377
|
+
required: h,
|
|
1378
1378
|
invalid: i !== void 0
|
|
1379
1379
|
},
|
|
1380
|
-
parts:
|
|
1380
|
+
parts: En(i, o)
|
|
1381
1381
|
});
|
|
1382
|
-
if (
|
|
1383
|
-
return r ||
|
|
1384
|
-
|
|
1382
|
+
if (P.current = w, m === "agent")
|
|
1383
|
+
return r || d === "never" ? /* @__PURE__ */ s(_, { node: w }) : /* @__PURE__ */ s(
|
|
1384
|
+
be,
|
|
1385
1385
|
{
|
|
1386
|
-
node:
|
|
1386
|
+
node: w,
|
|
1387
1387
|
ref: (x) => {
|
|
1388
|
-
|
|
1388
|
+
v.current = x;
|
|
1389
1389
|
},
|
|
1390
1390
|
onClick: () => a(!n)
|
|
1391
1391
|
}
|
|
1392
1392
|
);
|
|
1393
|
-
const
|
|
1394
|
-
return /* @__PURE__ */
|
|
1395
|
-
/* @__PURE__ */
|
|
1393
|
+
const y = i !== void 0 ? `${f}-error` : o !== void 0 ? `${f}-hint` : void 0;
|
|
1394
|
+
return /* @__PURE__ */ C("div", { ...p, ...q(w), children: [
|
|
1395
|
+
/* @__PURE__ */ C("label", { htmlFor: f, children: [
|
|
1396
1396
|
/* @__PURE__ */ s(
|
|
1397
1397
|
"input",
|
|
1398
1398
|
{
|
|
1399
1399
|
id: f,
|
|
1400
|
-
...
|
|
1400
|
+
...D({ part: "input", state: {} }),
|
|
1401
1401
|
ref: (x) => {
|
|
1402
|
-
|
|
1402
|
+
v.current = x;
|
|
1403
1403
|
},
|
|
1404
1404
|
type: "checkbox",
|
|
1405
1405
|
checked: n,
|
|
1406
1406
|
name: l,
|
|
1407
1407
|
disabled: r,
|
|
1408
|
-
required:
|
|
1408
|
+
required: h,
|
|
1409
1409
|
"aria-invalid": i !== void 0 || void 0,
|
|
1410
|
-
"aria-describedby":
|
|
1410
|
+
"aria-describedby": y,
|
|
1411
1411
|
onChange: (x) => a(x.currentTarget.checked)
|
|
1412
1412
|
}
|
|
1413
1413
|
),
|
|
1414
1414
|
/* @__PURE__ */ s(
|
|
1415
1415
|
"span",
|
|
1416
1416
|
{
|
|
1417
|
-
...
|
|
1417
|
+
...D({ part: "box", state: {} }),
|
|
1418
1418
|
"aria-hidden": "true"
|
|
1419
1419
|
}
|
|
1420
1420
|
),
|
|
1421
1421
|
t
|
|
1422
1422
|
] }),
|
|
1423
|
-
i !== void 0 ? /* @__PURE__ */ s("p", { id:
|
|
1423
|
+
i !== void 0 ? /* @__PURE__ */ s("p", { id: y, ...D({ part: "error", state: {} }), children: i }) : o !== void 0 ? /* @__PURE__ */ s("p", { id: y, ...D({ part: "hint", state: {} }), children: o }) : null
|
|
1424
1424
|
] });
|
|
1425
1425
|
}
|
|
1426
|
-
const
|
|
1426
|
+
const Mn = /(\/\/[^\n]*)|("[^"]*"|'[^']*'|`[^`]*`)|(<\/?[A-Za-z][\w.-]*)|([\w-]+(?==))|(\b(?:const|let|var|function|return|import|export|from|await|async|new|true|false|null|undefined)\b)|(\b\d+(?:\.\d+)?\b)|([<>/{}()[\];=,.]+)/g, qn = [
|
|
1427
1427
|
"comment",
|
|
1428
1428
|
"string",
|
|
1429
1429
|
"tag",
|
|
@@ -1432,19 +1432,19 @@ const bn = /(\/\/[^\n]*)|("[^"]*"|'[^']*'|`[^`]*`)|(<\/?[A-Za-z][\w.-]*)|([\w-]+
|
|
|
1432
1432
|
"number",
|
|
1433
1433
|
"punct"
|
|
1434
1434
|
];
|
|
1435
|
-
function
|
|
1435
|
+
function Un(e) {
|
|
1436
1436
|
const t = [];
|
|
1437
1437
|
let n = 0;
|
|
1438
|
-
for (const a of e.matchAll(
|
|
1438
|
+
for (const a of e.matchAll(Mn)) {
|
|
1439
1439
|
const o = a.index;
|
|
1440
1440
|
if (o === void 0) continue;
|
|
1441
1441
|
o > n && t.push({ kind: "plain", text: e.slice(n, o) });
|
|
1442
|
-
const i =
|
|
1442
|
+
const i = qn.find((l, r) => a[r + 1] !== void 0) ?? "plain";
|
|
1443
1443
|
t.push({ kind: i, text: a[0] }), n = o + a[0].length;
|
|
1444
1444
|
}
|
|
1445
1445
|
return n < e.length && t.push({ kind: "plain", text: e.slice(n) }), t;
|
|
1446
1446
|
}
|
|
1447
|
-
const
|
|
1447
|
+
const In = I({
|
|
1448
1448
|
name: "CodeBlock",
|
|
1449
1449
|
category: "display",
|
|
1450
1450
|
summary: "A snippet of code with a caption band and a copy control. In agent view the snippet is carried verbatim as the code part, so an agent reads the source instead of the highlighting.",
|
|
@@ -1514,16 +1514,16 @@ const yn = I({
|
|
|
1514
1514
|
a11y: {
|
|
1515
1515
|
notes: "The frame is a figure named by its caption. The copy control is a real button and reports back in its own label once the snippet is on the clipboard; the label swap is a polite live region, so a screen reader hears the confirmation too."
|
|
1516
1516
|
}
|
|
1517
|
-
}),
|
|
1518
|
-
function
|
|
1519
|
-
const { code: t, caption: n, language: a = "tsx", copyLabel: o = "Copy", ...i } = e, l =
|
|
1520
|
-
|
|
1517
|
+
}), Wn = 1200;
|
|
1518
|
+
function Ka(e) {
|
|
1519
|
+
const { code: t, caption: n, language: a = "tsx", copyLabel: o = "Copy", ...i } = e, l = W(), [r, h] = Y(!1);
|
|
1520
|
+
H(() => {
|
|
1521
1521
|
if (!r) return;
|
|
1522
|
-
const
|
|
1523
|
-
return () => clearTimeout(
|
|
1522
|
+
const d = setTimeout(() => h(!1), Wn);
|
|
1523
|
+
return () => clearTimeout(d);
|
|
1524
1524
|
}, [r]);
|
|
1525
|
-
const c = n ?? a,
|
|
1526
|
-
component:
|
|
1525
|
+
const c = n ?? a, g = r ? "Copied" : o, p = E({
|
|
1526
|
+
component: In.name,
|
|
1527
1527
|
label: c,
|
|
1528
1528
|
state: {
|
|
1529
1529
|
language: a,
|
|
@@ -1532,43 +1532,43 @@ function Sa(e) {
|
|
|
1532
1532
|
copied: r
|
|
1533
1533
|
},
|
|
1534
1534
|
parts: [
|
|
1535
|
-
{ part: "copy", label:
|
|
1535
|
+
{ part: "copy", label: g, state: {} },
|
|
1536
1536
|
{ part: "code", label: t, state: {} }
|
|
1537
1537
|
]
|
|
1538
1538
|
});
|
|
1539
|
-
if (l === "agent") return /* @__PURE__ */ s(
|
|
1540
|
-
const
|
|
1541
|
-
const
|
|
1542
|
-
|
|
1543
|
-
() =>
|
|
1544
|
-
() =>
|
|
1539
|
+
if (l === "agent") return /* @__PURE__ */ s(_, { node: p });
|
|
1540
|
+
const m = () => {
|
|
1541
|
+
const d = navigator.clipboard;
|
|
1542
|
+
d !== void 0 && d.writeText(t).then(
|
|
1543
|
+
() => h(!0),
|
|
1544
|
+
() => h(!1)
|
|
1545
1545
|
);
|
|
1546
1546
|
};
|
|
1547
|
-
return /* @__PURE__ */
|
|
1548
|
-
/* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ C("figure", { ...i, ...q(p), "aria-label": c, children: [
|
|
1548
|
+
/* @__PURE__ */ C("header", { children: [
|
|
1549
1549
|
/* @__PURE__ */ s("span", { children: c }),
|
|
1550
1550
|
/* @__PURE__ */ s(
|
|
1551
1551
|
"button",
|
|
1552
1552
|
{
|
|
1553
1553
|
type: "button",
|
|
1554
1554
|
"aria-live": "polite",
|
|
1555
|
-
...
|
|
1556
|
-
onClick:
|
|
1557
|
-
children:
|
|
1555
|
+
...D({ part: "copy", state: {} }),
|
|
1556
|
+
onClick: m,
|
|
1557
|
+
children: g
|
|
1558
1558
|
}
|
|
1559
1559
|
)
|
|
1560
1560
|
] }),
|
|
1561
|
-
/* @__PURE__ */ s("pre", { ...
|
|
1561
|
+
/* @__PURE__ */ s("pre", { ...D({ part: "code", state: {} }), children: /* @__PURE__ */ s("code", { children: Un(t).map((d, A) => /* @__PURE__ */ s(
|
|
1562
1562
|
"span",
|
|
1563
1563
|
{
|
|
1564
|
-
"data-sprint-token":
|
|
1565
|
-
children:
|
|
1564
|
+
"data-sprint-token": d.kind === "plain" ? void 0 : d.kind,
|
|
1565
|
+
children: d.text
|
|
1566
1566
|
},
|
|
1567
|
-
`${
|
|
1567
|
+
`${A}-${d.text}`
|
|
1568
1568
|
)) }) })
|
|
1569
1569
|
] });
|
|
1570
1570
|
}
|
|
1571
|
-
const
|
|
1571
|
+
const Bn = I({
|
|
1572
1572
|
name: "DescriptionList",
|
|
1573
1573
|
category: "display",
|
|
1574
1574
|
summary: "Labelled term–description pairs for the details of one thing: metadata, settings, profile fields.",
|
|
@@ -1628,41 +1628,41 @@ const Tn = I({
|
|
|
1628
1628
|
notes: "Renders a native dl with an aria-label. Terms are dt elements and descriptions dd, so structure survives without styling."
|
|
1629
1629
|
}
|
|
1630
1630
|
});
|
|
1631
|
-
function
|
|
1632
|
-
const t =
|
|
1631
|
+
function _n(e) {
|
|
1632
|
+
const t = J(e.term), n = J(e.description);
|
|
1633
1633
|
if (!(t === void 0 && n === void 0))
|
|
1634
1634
|
return `${t ?? ""}: ${n ?? ""}`;
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1637
|
-
const { label: t, items: n, emptyLabel: a = "Empty", ...o } = e, i =
|
|
1638
|
-
const
|
|
1636
|
+
function za(e) {
|
|
1637
|
+
const { label: t, items: n, emptyLabel: a = "Empty", ...o } = e, i = W(), l = n.length === 0, r = n.map((c, g) => {
|
|
1638
|
+
const p = _n(c);
|
|
1639
1639
|
return {
|
|
1640
1640
|
part: "item",
|
|
1641
|
-
state: { index: String(
|
|
1642
|
-
...
|
|
1641
|
+
state: { index: String(g + 1) },
|
|
1642
|
+
...p === void 0 ? {} : { label: p }
|
|
1643
1643
|
};
|
|
1644
|
-
}),
|
|
1645
|
-
component:
|
|
1644
|
+
}), h = E({
|
|
1645
|
+
component: Bn.name,
|
|
1646
1646
|
label: t,
|
|
1647
1647
|
state: { items: String(n.length), empty: l },
|
|
1648
1648
|
parts: r
|
|
1649
1649
|
});
|
|
1650
|
-
return i === "agent" ? /* @__PURE__ */ s(
|
|
1650
|
+
return i === "agent" ? /* @__PURE__ */ s(_, { node: h }) : /* @__PURE__ */ s("dl", { ...o, ...q(h), "aria-label": t, children: l ? /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("span", { children: a }) }) : n.map((c, g) => /* @__PURE__ */ C(
|
|
1651
1651
|
"div",
|
|
1652
1652
|
{
|
|
1653
|
-
...
|
|
1653
|
+
...D({
|
|
1654
1654
|
part: "item",
|
|
1655
|
-
state: { index: String(
|
|
1655
|
+
state: { index: String(g + 1) }
|
|
1656
1656
|
}),
|
|
1657
1657
|
children: [
|
|
1658
1658
|
/* @__PURE__ */ s("dt", { children: c.term }),
|
|
1659
1659
|
/* @__PURE__ */ s("dd", { children: c.description })
|
|
1660
1660
|
]
|
|
1661
1661
|
},
|
|
1662
|
-
`${
|
|
1662
|
+
`${g}-${String(J(c.term))}`
|
|
1663
1663
|
)) });
|
|
1664
1664
|
}
|
|
1665
|
-
const
|
|
1665
|
+
const Et = {
|
|
1666
1666
|
verb: "close",
|
|
1667
1667
|
description: "Close this dialog without taking its action, exactly as pressing its close control or Escape would. Anything entered inside the dialog may be discarded by the page. To take the dialog's action instead, use the tools its contents register while it is open.",
|
|
1668
1668
|
inputSchema: { type: "object", properties: {} },
|
|
@@ -1670,7 +1670,7 @@ const kt = {
|
|
|
1670
1670
|
untrustedContent: !0,
|
|
1671
1671
|
registeredWhen: "The dialog is open. A closed dialog renders nothing and has no tools.",
|
|
1672
1672
|
unregisteredWhen: "The dialog closes or unmounts."
|
|
1673
|
-
},
|
|
1673
|
+
}, jn = I({
|
|
1674
1674
|
name: "Dialog",
|
|
1675
1675
|
category: "overlay",
|
|
1676
1676
|
summary: "A modal that interrupts the page for one decision: confirm a destructive action, complete a short step, acknowledge something before continuing.",
|
|
@@ -1724,7 +1724,7 @@ const kt = {
|
|
|
1724
1724
|
}
|
|
1725
1725
|
},
|
|
1726
1726
|
tools: {
|
|
1727
|
-
close:
|
|
1727
|
+
close: Et
|
|
1728
1728
|
},
|
|
1729
1729
|
agentView: {
|
|
1730
1730
|
example: '- **Dialog** "Revoke key" [open] with part `close` → tool `close-revoke-key`'
|
|
@@ -1759,7 +1759,7 @@ const kt = {
|
|
|
1759
1759
|
notes: "A native dialog element shown with showModal, so focus containment, inerting the page behind, and Escape come from the browser. The title names the dialog via aria-label."
|
|
1760
1760
|
}
|
|
1761
1761
|
});
|
|
1762
|
-
function
|
|
1762
|
+
function Xa(e) {
|
|
1763
1763
|
const {
|
|
1764
1764
|
label: t,
|
|
1765
1765
|
open: n,
|
|
@@ -1768,42 +1768,42 @@ function Na(e) {
|
|
|
1768
1768
|
owner: i,
|
|
1769
1769
|
agentName: l,
|
|
1770
1770
|
agentTool: r = !0,
|
|
1771
|
-
children:
|
|
1771
|
+
children: h,
|
|
1772
1772
|
ref: c,
|
|
1773
|
-
...
|
|
1774
|
-
} = e,
|
|
1775
|
-
|
|
1776
|
-
const
|
|
1777
|
-
|
|
1778
|
-
const T =
|
|
1779
|
-
(
|
|
1780
|
-
|
|
1773
|
+
...g
|
|
1774
|
+
} = e, p = W(), m = Z(), d = Ne(), A = b(null), f = b(null), v = b(a);
|
|
1775
|
+
v.current = a;
|
|
1776
|
+
const k = b(n);
|
|
1777
|
+
k.current = n;
|
|
1778
|
+
const T = F(
|
|
1779
|
+
(w) => {
|
|
1780
|
+
A.current = w, typeof c == "function" ? c(w) : c != null && (c.current = w);
|
|
1781
1781
|
},
|
|
1782
1782
|
[c]
|
|
1783
1783
|
);
|
|
1784
|
-
|
|
1784
|
+
H(() => {
|
|
1785
1785
|
if (!n) return;
|
|
1786
|
-
const
|
|
1787
|
-
if (
|
|
1788
|
-
return
|
|
1789
|
-
|
|
1786
|
+
const w = A.current;
|
|
1787
|
+
if (w !== null)
|
|
1788
|
+
return w.open || (typeof w.showModal == "function" ? w.showModal() : w.open = !0), () => {
|
|
1789
|
+
w.open && (typeof w.close == "function" ? w.close() : w.open = !1);
|
|
1790
1790
|
};
|
|
1791
1791
|
}, [n]);
|
|
1792
|
-
const
|
|
1793
|
-
const
|
|
1794
|
-
return
|
|
1795
|
-
}, []),
|
|
1796
|
-
spec:
|
|
1792
|
+
const S = F(async () => {
|
|
1793
|
+
const w = f.current;
|
|
1794
|
+
return w !== null ? w.click() : te(() => v.current()), await ee(), k.current ? "The page kept the dialog open." : "Closed. The dialog is gone from the page.";
|
|
1795
|
+
}, []), P = X({
|
|
1796
|
+
spec: Et,
|
|
1797
1797
|
label: l ?? t,
|
|
1798
1798
|
enabled: r && n,
|
|
1799
|
-
execute:
|
|
1800
|
-
}),
|
|
1801
|
-
() => ({ path: [...
|
|
1802
|
-
[
|
|
1799
|
+
execute: S
|
|
1800
|
+
}), O = re(
|
|
1801
|
+
() => ({ path: [...d, t] }),
|
|
1802
|
+
[d, t]
|
|
1803
1803
|
);
|
|
1804
1804
|
if (!n) return null;
|
|
1805
|
-
const
|
|
1806
|
-
component:
|
|
1805
|
+
const M = E({
|
|
1806
|
+
component: jn.name,
|
|
1807
1807
|
label: t,
|
|
1808
1808
|
owner: i,
|
|
1809
1809
|
region: !0,
|
|
@@ -1813,41 +1813,41 @@ function Na(e) {
|
|
|
1813
1813
|
part: "close",
|
|
1814
1814
|
label: "Close",
|
|
1815
1815
|
state: {},
|
|
1816
|
-
...
|
|
1816
|
+
...P === void 0 ? {} : { tool: P }
|
|
1817
1817
|
}
|
|
1818
1818
|
]
|
|
1819
1819
|
});
|
|
1820
|
-
if (
|
|
1820
|
+
if (p === "agent")
|
|
1821
1821
|
return /* @__PURE__ */ s(
|
|
1822
|
-
|
|
1822
|
+
fe,
|
|
1823
1823
|
{
|
|
1824
|
-
node:
|
|
1825
|
-
isActionable: () =>
|
|
1824
|
+
node: M,
|
|
1825
|
+
isActionable: () => m !== "never",
|
|
1826
1826
|
onActivate: () => a(),
|
|
1827
|
-
children: /* @__PURE__ */ s(
|
|
1827
|
+
children: /* @__PURE__ */ s(Te, { value: O, children: h })
|
|
1828
1828
|
}
|
|
1829
1829
|
);
|
|
1830
|
-
const
|
|
1831
|
-
return /* @__PURE__ */
|
|
1830
|
+
const L = o === void 0 ? "span" : `h${o}`;
|
|
1831
|
+
return /* @__PURE__ */ C(
|
|
1832
1832
|
"dialog",
|
|
1833
1833
|
{
|
|
1834
|
-
...
|
|
1835
|
-
...M
|
|
1834
|
+
...g,
|
|
1835
|
+
...q(M),
|
|
1836
1836
|
"aria-label": t,
|
|
1837
1837
|
ref: T,
|
|
1838
|
-
onCancel: (
|
|
1839
|
-
|
|
1838
|
+
onCancel: (w) => {
|
|
1839
|
+
w.preventDefault(), a();
|
|
1840
1840
|
},
|
|
1841
1841
|
children: [
|
|
1842
|
-
/* @__PURE__ */
|
|
1843
|
-
/* @__PURE__ */ s(
|
|
1842
|
+
/* @__PURE__ */ C("header", { children: [
|
|
1843
|
+
/* @__PURE__ */ s(L, { children: t }),
|
|
1844
1844
|
/* @__PURE__ */ s(
|
|
1845
1845
|
"button",
|
|
1846
1846
|
{
|
|
1847
|
-
...
|
|
1847
|
+
...D({
|
|
1848
1848
|
part: "close",
|
|
1849
1849
|
state: {},
|
|
1850
|
-
...
|
|
1850
|
+
...P === void 0 ? {} : { tool: P }
|
|
1851
1851
|
}),
|
|
1852
1852
|
type: "button",
|
|
1853
1853
|
"aria-label": "Close",
|
|
@@ -1857,12 +1857,12 @@ function Na(e) {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
)
|
|
1859
1859
|
] }),
|
|
1860
|
-
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
1860
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(Te, { value: O, children: h }) })
|
|
1861
1861
|
]
|
|
1862
1862
|
}
|
|
1863
1863
|
);
|
|
1864
1864
|
}
|
|
1865
|
-
const
|
|
1865
|
+
const Vn = I({
|
|
1866
1866
|
name: "Heading",
|
|
1867
1867
|
category: "typography",
|
|
1868
1868
|
summary: "A section title, rendered as a real h element at the level you pick so it joins the document outline.",
|
|
@@ -1904,17 +1904,17 @@ const Cn = I({
|
|
|
1904
1904
|
}
|
|
1905
1905
|
]
|
|
1906
1906
|
});
|
|
1907
|
-
function
|
|
1908
|
-
const { level: t = 2, children: n, ...a } = e, o =
|
|
1909
|
-
component:
|
|
1910
|
-
label:
|
|
1907
|
+
function Ya(e) {
|
|
1908
|
+
const { level: t = 2, children: n, ...a } = e, o = W(), i = E({
|
|
1909
|
+
component: Vn.name,
|
|
1910
|
+
label: J(n),
|
|
1911
1911
|
state: { level: String(t) }
|
|
1912
1912
|
});
|
|
1913
|
-
if (o === "agent") return /* @__PURE__ */ s(
|
|
1913
|
+
if (o === "agent") return /* @__PURE__ */ s(_, { node: i });
|
|
1914
1914
|
const l = `h${t}`;
|
|
1915
|
-
return /* @__PURE__ */ s(l, { ...a, ...
|
|
1915
|
+
return /* @__PURE__ */ s(l, { ...a, ...q(i), children: n });
|
|
1916
1916
|
}
|
|
1917
|
-
const
|
|
1917
|
+
const Fn = I({
|
|
1918
1918
|
name: "Image",
|
|
1919
1919
|
category: "display",
|
|
1920
1920
|
summary: "A framed picture in a slot that holds its shape. It is the one component whose content an agent cannot read, so alt is not decoration: it is the whole of what the agent gets, and the source URL is published beside it for an agent that can fetch pixels of its own.",
|
|
@@ -2009,29 +2009,29 @@ const Sn = I({
|
|
|
2009
2009
|
},
|
|
2010
2010
|
relatedComponents: ["Card", "Panel"]
|
|
2011
2011
|
});
|
|
2012
|
-
function
|
|
2013
|
-
const { src: t, alt: n, caption: a, ratio: o = "auto", fit: i = "cover", ...l } = e, r =
|
|
2014
|
-
component:
|
|
2012
|
+
function Ja(e) {
|
|
2013
|
+
const { src: t, alt: n, caption: a, ratio: o = "auto", fit: i = "cover", ...l } = e, r = W(), [h, c] = Y("loading"), g = n === "" && a === void 0, p = a === void 0 ? [] : [{ part: "caption", label: a, state: {} }], m = E({
|
|
2014
|
+
component: Fn.name,
|
|
2015
2015
|
label: n === "" ? void 0 : n,
|
|
2016
2016
|
state: {
|
|
2017
2017
|
src: t,
|
|
2018
2018
|
ratio: o,
|
|
2019
2019
|
fit: i,
|
|
2020
|
-
decorative:
|
|
2021
|
-
status: r === "agent" ? void 0 :
|
|
2020
|
+
decorative: g,
|
|
2021
|
+
status: r === "agent" ? void 0 : h
|
|
2022
2022
|
},
|
|
2023
|
-
parts:
|
|
2023
|
+
parts: p
|
|
2024
2024
|
});
|
|
2025
|
-
if (r === "agent") return
|
|
2026
|
-
const
|
|
2027
|
-
return /* @__PURE__ */
|
|
2025
|
+
if (r === "agent") return g ? null : /* @__PURE__ */ s(_, { node: m });
|
|
2026
|
+
const d = h === "error" ? n === "" ? "Image unavailable" : n : "Loading";
|
|
2027
|
+
return /* @__PURE__ */ C(
|
|
2028
2028
|
"figure",
|
|
2029
2029
|
{
|
|
2030
2030
|
...l,
|
|
2031
|
-
...
|
|
2031
|
+
...q(m),
|
|
2032
2032
|
"aria-label": n === "" ? void 0 : n,
|
|
2033
2033
|
children: [
|
|
2034
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ C("div", { children: [
|
|
2035
2035
|
/* @__PURE__ */ s(
|
|
2036
2036
|
"img",
|
|
2037
2037
|
{
|
|
@@ -2041,14 +2041,14 @@ function Ra(e) {
|
|
|
2041
2041
|
onError: () => c("error")
|
|
2042
2042
|
}
|
|
2043
2043
|
),
|
|
2044
|
-
|
|
2044
|
+
h === "ready" ? null : /* @__PURE__ */ s("span", { "aria-hidden": "true", children: /* @__PURE__ */ s("span", { children: d }) })
|
|
2045
2045
|
] }),
|
|
2046
|
-
a === void 0 ? null : /* @__PURE__ */ s("figcaption", { ...
|
|
2046
|
+
a === void 0 ? null : /* @__PURE__ */ s("figcaption", { ...D({ part: "caption", state: {} }), children: a })
|
|
2047
2047
|
]
|
|
2048
2048
|
}
|
|
2049
2049
|
);
|
|
2050
2050
|
}
|
|
2051
|
-
const
|
|
2051
|
+
const Mt = {
|
|
2052
2052
|
verb: "open",
|
|
2053
2053
|
description: "Follow this link and load its destination, exactly as a person clicking it would. The current page is replaced, so anything unsaved on it is lost and any tool registered by this page stops existing.",
|
|
2054
2054
|
inputSchema: { type: "object", properties: {} },
|
|
@@ -2056,7 +2056,7 @@ const Tt = {
|
|
|
2056
2056
|
untrustedContent: !0,
|
|
2057
2057
|
registeredWhen: "The link opts in with agentTool, is mounted, has a resolvable label, and no other component claims the same tool name. Links register nothing by default.",
|
|
2058
2058
|
unregisteredWhen: "The link unmounts or opts back out."
|
|
2059
|
-
},
|
|
2059
|
+
}, Hn = I({
|
|
2060
2060
|
name: "Link",
|
|
2061
2061
|
category: "navigation",
|
|
2062
2062
|
summary: "A navigation link. It publishes its destination as state, so an agent reading the page in text learns the URL rather than having to click to find out, and it renders a real anchor in both views.",
|
|
@@ -2109,7 +2109,7 @@ const Tt = {
|
|
|
2109
2109
|
}
|
|
2110
2110
|
},
|
|
2111
2111
|
tools: {
|
|
2112
|
-
open:
|
|
2112
|
+
open: Mt
|
|
2113
2113
|
},
|
|
2114
2114
|
agentView: {
|
|
2115
2115
|
example: '- **Link** "Button" [active, href=#/Button]'
|
|
@@ -2137,7 +2137,7 @@ const Tt = {
|
|
|
2137
2137
|
notes: "active sets aria-current=page. External links open in a new context with rel=noreferrer noopener, and carry their outward mark as a pseudo-element with empty alternative text so it never reaches the accessible name or the tool name. Inside Text a link is underlined all the time, so colour is never the only thing distinguishing it from the prose around it."
|
|
2138
2138
|
}
|
|
2139
2139
|
});
|
|
2140
|
-
function
|
|
2140
|
+
function Qa(e) {
|
|
2141
2141
|
const {
|
|
2142
2142
|
href: t,
|
|
2143
2143
|
active: n = !1,
|
|
@@ -2146,35 +2146,35 @@ function Oa(e) {
|
|
|
2146
2146
|
agentName: i,
|
|
2147
2147
|
children: l,
|
|
2148
2148
|
ref: r,
|
|
2149
|
-
onClick:
|
|
2149
|
+
onClick: h,
|
|
2150
2150
|
...c
|
|
2151
|
-
} = e,
|
|
2152
|
-
(
|
|
2153
|
-
|
|
2151
|
+
} = e, g = W(), p = Z(), m = b(null), d = F(
|
|
2152
|
+
(S) => {
|
|
2153
|
+
m.current = S, typeof r == "function" ? r(S) : r != null && (r.current = S);
|
|
2154
2154
|
},
|
|
2155
2155
|
[r]
|
|
2156
|
-
),
|
|
2157
|
-
const
|
|
2158
|
-
return
|
|
2159
|
-
}, [t]),
|
|
2160
|
-
spec:
|
|
2161
|
-
label:
|
|
2156
|
+
), A = i ?? J(l), f = F(() => {
|
|
2157
|
+
const S = m.current;
|
|
2158
|
+
return S === null ? "This link renders no element in the current view. Navigate to its href instead." : (S.click(), `Following ${S.getAttribute("href") ?? t}.`);
|
|
2159
|
+
}, [t]), v = X({
|
|
2160
|
+
spec: Mt,
|
|
2161
|
+
label: A,
|
|
2162
2162
|
enabled: o,
|
|
2163
2163
|
execute: f
|
|
2164
|
-
}),
|
|
2165
|
-
component:
|
|
2166
|
-
label:
|
|
2167
|
-
tool:
|
|
2164
|
+
}), k = E({
|
|
2165
|
+
component: Hn.name,
|
|
2166
|
+
label: J(l),
|
|
2167
|
+
tool: v,
|
|
2168
2168
|
state: { href: t, active: n, external: a }
|
|
2169
2169
|
}), T = a ? { target: "_blank", rel: "noreferrer noopener" } : { target: void 0, rel: void 0 };
|
|
2170
|
-
return
|
|
2171
|
-
|
|
2170
|
+
return g === "agent" ? p === "never" ? /* @__PURE__ */ s(_, { node: k }) : /* @__PURE__ */ s(
|
|
2171
|
+
be,
|
|
2172
2172
|
{
|
|
2173
|
-
node:
|
|
2173
|
+
node: k,
|
|
2174
2174
|
as: "a",
|
|
2175
2175
|
href: t,
|
|
2176
|
-
ref:
|
|
2177
|
-
onClick:
|
|
2176
|
+
ref: d,
|
|
2177
|
+
onClick: h,
|
|
2178
2178
|
target: T.target,
|
|
2179
2179
|
rel: T.rel
|
|
2180
2180
|
}
|
|
@@ -2182,10 +2182,10 @@ function Oa(e) {
|
|
|
2182
2182
|
"a",
|
|
2183
2183
|
{
|
|
2184
2184
|
...c,
|
|
2185
|
-
...
|
|
2185
|
+
...q(k),
|
|
2186
2186
|
href: t,
|
|
2187
|
-
ref:
|
|
2188
|
-
onClick:
|
|
2187
|
+
ref: d,
|
|
2188
|
+
onClick: h,
|
|
2189
2189
|
"aria-current": n ? "page" : void 0,
|
|
2190
2190
|
target: T.target,
|
|
2191
2191
|
rel: T.rel,
|
|
@@ -2193,7 +2193,7 @@ function Oa(e) {
|
|
|
2193
2193
|
}
|
|
2194
2194
|
);
|
|
2195
2195
|
}
|
|
2196
|
-
const
|
|
2196
|
+
const Gn = I({
|
|
2197
2197
|
name: "List",
|
|
2198
2198
|
category: "display",
|
|
2199
2199
|
summary: "A bulleted or numbered list built from an array of items. Each item is an addressable part carrying its position, so an agent can cite item three without counting lines.",
|
|
@@ -2270,42 +2270,42 @@ const Nn = I({
|
|
|
2270
2270
|
notes: "A real ul or ol named by its label, with an explicit list role because the custom markers require list-style none and Safari would otherwise drop the list semantics. The item count is announced, and the markers are drawn as pseudo-elements."
|
|
2271
2271
|
}
|
|
2272
2272
|
});
|
|
2273
|
-
function
|
|
2274
|
-
const { label: t, items: n, ordered: a = !1, emptyLabel: o = "Empty", ...i } = e, l =
|
|
2275
|
-
const
|
|
2273
|
+
function Za(e) {
|
|
2274
|
+
const { label: t, items: n, ordered: a = !1, emptyLabel: o = "Empty", ...i } = e, l = W(), r = n.length === 0, h = n.map((p, m) => {
|
|
2275
|
+
const d = J(p);
|
|
2276
2276
|
return {
|
|
2277
2277
|
part: "item",
|
|
2278
|
-
state: { index: String(
|
|
2279
|
-
...
|
|
2278
|
+
state: { index: String(m + 1) },
|
|
2279
|
+
...d === void 0 ? {} : { label: d }
|
|
2280
2280
|
};
|
|
2281
|
-
}), c =
|
|
2282
|
-
component:
|
|
2281
|
+
}), c = E({
|
|
2282
|
+
component: Gn.name,
|
|
2283
2283
|
label: t,
|
|
2284
2284
|
state: { items: String(n.length), ordered: a, empty: r },
|
|
2285
|
-
parts:
|
|
2285
|
+
parts: h
|
|
2286
2286
|
});
|
|
2287
|
-
return l === "agent" ? /* @__PURE__ */ s(
|
|
2287
|
+
return l === "agent" ? /* @__PURE__ */ s(_, { node: c }) : /* @__PURE__ */ s(
|
|
2288
2288
|
a ? "ol" : "ul",
|
|
2289
2289
|
{
|
|
2290
2290
|
...i,
|
|
2291
|
-
...
|
|
2291
|
+
...q(c),
|
|
2292
2292
|
role: "list",
|
|
2293
2293
|
"aria-label": t,
|
|
2294
|
-
children: r ? /* @__PURE__ */ s("li", { children: o }) : n.map((
|
|
2294
|
+
children: r ? /* @__PURE__ */ s("li", { children: o }) : n.map((p, m) => /* @__PURE__ */ s(
|
|
2295
2295
|
"li",
|
|
2296
2296
|
{
|
|
2297
|
-
...
|
|
2297
|
+
...D({
|
|
2298
2298
|
part: "item",
|
|
2299
|
-
state: { index: String(
|
|
2299
|
+
state: { index: String(m + 1) }
|
|
2300
2300
|
}),
|
|
2301
|
-
children: /* @__PURE__ */ s("span", { children:
|
|
2301
|
+
children: /* @__PURE__ */ s("span", { children: p })
|
|
2302
2302
|
},
|
|
2303
|
-
`${
|
|
2303
|
+
`${m}-${String(J(p))}`
|
|
2304
2304
|
))
|
|
2305
2305
|
}
|
|
2306
2306
|
);
|
|
2307
2307
|
}
|
|
2308
|
-
const
|
|
2308
|
+
const Kn = I({
|
|
2309
2309
|
name: "MetaLine",
|
|
2310
2310
|
category: "display",
|
|
2311
2311
|
summary: "A slash-separated manifest line of term–detail pairs: serials, build strings, issue dates. It is chrome, not content, and in the agent view it reads as the same single line of text a person sees.",
|
|
@@ -2356,18 +2356,18 @@ const Ln = I({
|
|
|
2356
2356
|
notes: "The separators are real text, so the accessible name is the same line the agent view carries. Nothing in the line is interactive."
|
|
2357
2357
|
}
|
|
2358
2358
|
});
|
|
2359
|
-
function
|
|
2360
|
-
const { entries: t, ...n } = e, a =
|
|
2359
|
+
function eo(e) {
|
|
2360
|
+
const { entries: t, ...n } = e, a = W();
|
|
2361
2361
|
if (t.length === 0) return null;
|
|
2362
|
-
const o = t.map((l) => `${l.term}: ${l.detail}`).join(" / "), i =
|
|
2363
|
-
component:
|
|
2362
|
+
const o = t.map((l) => `${l.term}: ${l.detail}`).join(" / "), i = E({
|
|
2363
|
+
component: Kn.name,
|
|
2364
2364
|
label: o,
|
|
2365
2365
|
state: { entries: String(t.length) }
|
|
2366
2366
|
});
|
|
2367
|
-
return a === "agent" ? /* @__PURE__ */ s(
|
|
2367
|
+
return a === "agent" ? /* @__PURE__ */ s(_, { node: i }) : /* @__PURE__ */ s("p", { ...n, ...q(i), children: t.map((l, r) => /* @__PURE__ */ C(Ee, { children: [
|
|
2368
2368
|
r > 0 ? " / " : null,
|
|
2369
|
-
/* @__PURE__ */
|
|
2370
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ C("span", { children: [
|
|
2370
|
+
/* @__PURE__ */ C("span", { children: [
|
|
2371
2371
|
l.term,
|
|
2372
2372
|
": "
|
|
2373
2373
|
] }),
|
|
@@ -2375,7 +2375,7 @@ function Da(e) {
|
|
|
2375
2375
|
] })
|
|
2376
2376
|
] }, `${l.term}-${r}`)) });
|
|
2377
2377
|
}
|
|
2378
|
-
const
|
|
2378
|
+
const zn = I({
|
|
2379
2379
|
name: "Nav",
|
|
2380
2380
|
category: "navigation",
|
|
2381
2381
|
summary: "A labelled navigation landmark: the region that holds a page's links to elsewhere.",
|
|
@@ -2426,11 +2426,339 @@ const Rn = I({
|
|
|
2426
2426
|
}
|
|
2427
2427
|
]
|
|
2428
2428
|
});
|
|
2429
|
-
function
|
|
2430
|
-
const { label: t, children: n, ...a } = e, o =
|
|
2431
|
-
return o === "agent" ? /* @__PURE__ */ s(
|
|
2429
|
+
function to(e) {
|
|
2430
|
+
const { label: t, children: n, ...a } = e, o = W(), i = E({ component: zn.name, label: t, region: !0 });
|
|
2431
|
+
return o === "agent" ? /* @__PURE__ */ s(_, { node: i, children: n }) : /* @__PURE__ */ s("nav", { ...a, ...q(i), "aria-label": t, children: n });
|
|
2432
|
+
}
|
|
2433
|
+
const Xn = I({
|
|
2434
|
+
name: "NavBar",
|
|
2435
|
+
category: "navigation",
|
|
2436
|
+
summary: "A navigation landmark that renders as one line: where you are, written as a coordinate you can edit. Every destination stays in the page as an addressable part; the coordinate decides which of them a person is shown.",
|
|
2437
|
+
whenToUse: "Use it as an application's primary navigation when the catalogue is larger than a rail can hold, or when the layout needs its full width. Each segment of the coordinate opens its own level and filters as you type, so what a person chooses from is one level rather than the whole set. It takes destinations as data because it counts, filters and orders them.",
|
|
2438
|
+
whenNotToUse: "Do not use it for a handful of links that fit in a sidebar; that is Nav with NavGroup, which keeps every destination visible at once. Do not use it for links inside prose, and do not pass components in groups: each destination is a label and an href, not a node.",
|
|
2439
|
+
status: "experimental",
|
|
2440
|
+
props: {
|
|
2441
|
+
label: {
|
|
2442
|
+
kind: "string",
|
|
2443
|
+
description: "What this navigation is for. Rendered as the landmark's accessible name and as the root of the coordinate.",
|
|
2444
|
+
required: !0
|
|
2445
|
+
},
|
|
2446
|
+
groups: {
|
|
2447
|
+
kind: "array",
|
|
2448
|
+
description: "The destinations, as groups of { label, items }, each item { href, label, active?, external? }. Order is the order a person travels them.",
|
|
2449
|
+
required: !0
|
|
2450
|
+
},
|
|
2451
|
+
emptyLabel: {
|
|
2452
|
+
kind: "string",
|
|
2453
|
+
description: "What the bar says when a filter matches no destination.",
|
|
2454
|
+
default: "No match"
|
|
2455
|
+
},
|
|
2456
|
+
trailEmptyLabel: {
|
|
2457
|
+
kind: "string",
|
|
2458
|
+
description: "What the bar says when nothing has been visited through it yet.",
|
|
2459
|
+
default: "Nothing visited yet"
|
|
2460
|
+
},
|
|
2461
|
+
open: {
|
|
2462
|
+
kind: "enum",
|
|
2463
|
+
description: "Which segment is open, or 'closed'. Pass it to drive the bar from outside, such as from an application-level shortcut; leave it off and the bar keeps its own state.",
|
|
2464
|
+
values: ["trail", "group", "leaf", "closed"]
|
|
2465
|
+
},
|
|
2466
|
+
onOpenChange: {
|
|
2467
|
+
kind: "handler",
|
|
2468
|
+
description: "Called with the segment the bar wants open, or 'closed'. Required when open is controlled, so the bar can still close itself."
|
|
2469
|
+
},
|
|
2470
|
+
onNavigate: {
|
|
2471
|
+
kind: "handler",
|
|
2472
|
+
description: "Called with the destination when one is chosen, before the browser follows the href. Use it to record the visit somewhere that outlives this component."
|
|
2473
|
+
}
|
|
2474
|
+
},
|
|
2475
|
+
state: {
|
|
2476
|
+
destinations: {
|
|
2477
|
+
description: "How many destinations the bar holds.",
|
|
2478
|
+
attribute: "data-sprint-destinations"
|
|
2479
|
+
},
|
|
2480
|
+
open: {
|
|
2481
|
+
description: "Which segment of the coordinate is open: trail, group, or leaf. Absent when the bar is closed to its one line.",
|
|
2482
|
+
attribute: "data-sprint-open"
|
|
2483
|
+
},
|
|
2484
|
+
depth: {
|
|
2485
|
+
description: "How many destinations have been visited through this bar.",
|
|
2486
|
+
attribute: "data-sprint-depth"
|
|
2487
|
+
},
|
|
2488
|
+
matches: {
|
|
2489
|
+
description: "How many destinations the open segment is showing.",
|
|
2490
|
+
attribute: "data-sprint-matches"
|
|
2491
|
+
},
|
|
2492
|
+
shown: {
|
|
2493
|
+
description: "On a destination: present when the open segment is currently showing it to a person. Every destination stays in the page either way.",
|
|
2494
|
+
attribute: "data-sprint-shown"
|
|
2495
|
+
},
|
|
2496
|
+
group: {
|
|
2497
|
+
description: "On a destination: the group it belongs to.",
|
|
2498
|
+
attribute: "data-sprint-group"
|
|
2499
|
+
},
|
|
2500
|
+
href: {
|
|
2501
|
+
description: "On a destination: where it goes.",
|
|
2502
|
+
attribute: "data-sprint-href"
|
|
2503
|
+
},
|
|
2504
|
+
active: {
|
|
2505
|
+
description: "On a destination: present when it is the current page.",
|
|
2506
|
+
attribute: "data-sprint-active"
|
|
2507
|
+
}
|
|
2508
|
+
},
|
|
2509
|
+
agentView: {
|
|
2510
|
+
example: '- **NavBar** "Workbench" [destinations=2, depth=0]\n - part `destination` "Button" [group=action, href=#/Button]\n - part `destination` "Table" [group=display, href=#/Table, active, shown]'
|
|
2511
|
+
},
|
|
2512
|
+
a11y: {
|
|
2513
|
+
role: "navigation",
|
|
2514
|
+
notes: "The label is the landmark's accessible name. The current destination carries aria-current=page. Destinations the coordinate is not showing are hidden from the accessibility tree by CSS, so a screen reader travels one level at a time exactly as a sighted reader does, while the page itself keeps all of them. From the field, ArrowDown enters the results and ArrowUp at the top returns to it; typing anywhere in the results goes back to the field and keeps the character. Escape closes the bar, as does a press outside it, and the match count is a polite live region. ArrowUp in an empty field recalls the trail, the way a console recalls history."
|
|
2515
|
+
},
|
|
2516
|
+
relatedComponents: ["Nav", "NavGroup", "Link", "Shell"],
|
|
2517
|
+
examples: [
|
|
2518
|
+
{
|
|
2519
|
+
title: "A coordinate bar",
|
|
2520
|
+
description: "One line of chrome over a grouped catalogue. Clicking a segment opens that level and filters it as you type.",
|
|
2521
|
+
code: `<NavBar
|
|
2522
|
+
label="Workbench"
|
|
2523
|
+
groups={[
|
|
2524
|
+
{ label: "action", items: [{ href: "#/Button", label: "Button" }] },
|
|
2525
|
+
{ label: "display", items: [{ href: "#/Table", label: "Table", active: true }] },
|
|
2526
|
+
]}
|
|
2527
|
+
/>`
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
title: "Recording where a person has been",
|
|
2531
|
+
description: "The bar keeps a trail of the destinations chosen through it, reachable from the depth count at its head. onNavigate is how that outlives the component.",
|
|
2532
|
+
code: `<NavBar
|
|
2533
|
+
label="Docs"
|
|
2534
|
+
groups={[{ label: "guides", items: [{ href: "#/guide/webmcp", label: "WebMCP" }] }]}
|
|
2535
|
+
onNavigate={(destination) => console.log(destination.href)}
|
|
2536
|
+
/>`
|
|
2537
|
+
}
|
|
2538
|
+
]
|
|
2539
|
+
}), Yn = "[data-sprint-shown], button";
|
|
2540
|
+
function Jn(e) {
|
|
2541
|
+
return e === "closed" ? void 0 : e;
|
|
2542
|
+
}
|
|
2543
|
+
function at(e, t) {
|
|
2544
|
+
return e.toLowerCase().includes(t);
|
|
2432
2545
|
}
|
|
2433
|
-
|
|
2546
|
+
function no(e) {
|
|
2547
|
+
const {
|
|
2548
|
+
label: t,
|
|
2549
|
+
groups: n,
|
|
2550
|
+
emptyLabel: a = "No match",
|
|
2551
|
+
trailEmptyLabel: o = "Nothing visited yet",
|
|
2552
|
+
open: i,
|
|
2553
|
+
onOpenChange: l,
|
|
2554
|
+
onNavigate: r,
|
|
2555
|
+
ref: h,
|
|
2556
|
+
...c
|
|
2557
|
+
} = e, g = W(), [p, m] = Y(void 0), d = i === void 0 ? p : Jn(i), [A, f] = Y(""), [v, k] = Y(void 0), [T, S] = Y([]), P = b(null), O = b(null), M = b(null), L = F(
|
|
2558
|
+
(u) => {
|
|
2559
|
+
M.current = u, typeof h == "function" ? h(u) : h != null && (h.current = u);
|
|
2560
|
+
},
|
|
2561
|
+
[h]
|
|
2562
|
+
), w = b(l);
|
|
2563
|
+
w.current = l;
|
|
2564
|
+
const y = F((u) => {
|
|
2565
|
+
m(u), w.current?.(u ?? "closed");
|
|
2566
|
+
}, []);
|
|
2567
|
+
H(() => {
|
|
2568
|
+
d !== void 0 && P.current?.focus();
|
|
2569
|
+
}, [d]), H(() => {
|
|
2570
|
+
if (d === void 0) return;
|
|
2571
|
+
const u = (B) => {
|
|
2572
|
+
const j = B.target;
|
|
2573
|
+
j instanceof Node && M.current?.contains(j) === !0 || (y(void 0), f(""));
|
|
2574
|
+
};
|
|
2575
|
+
return document.addEventListener("pointerdown", u), () => document.removeEventListener("pointerdown", u);
|
|
2576
|
+
}, [d, y]);
|
|
2577
|
+
const x = n.flatMap(
|
|
2578
|
+
(u) => u.items.map((B) => ({ item: B, group: u.label }))
|
|
2579
|
+
), R = x.find((u) => u.item.active === !0), $ = R === void 0 ? n[0]?.label ?? "" : R.group, N = v ?? $, V = A.trim().toLowerCase(), K = V !== "", U = [];
|
|
2580
|
+
if (d === "trail")
|
|
2581
|
+
for (const u of x)
|
|
2582
|
+
T.includes(u.item.href) && (K && !at(`${u.group} ${u.item.label}`, V) || U.push(u.item));
|
|
2583
|
+
else if (d === "leaf" || d === "group" && K)
|
|
2584
|
+
for (const u of x)
|
|
2585
|
+
(K ? at(`${u.group} ${u.item.label}`, V) : u.group === N) && U.push(u.item);
|
|
2586
|
+
const z = d === "group" && !K ? n : [], oe = x.filter((u) => u.group === N).length, ve = K ? x.length : d === "trail" ? T.length : d === "group" ? n.length : oe, ne = z.length > 0 ? z.length : U.length, Ve = x.map((u) => {
|
|
2587
|
+
const B = {
|
|
2588
|
+
part: "destination",
|
|
2589
|
+
label: u.item.label,
|
|
2590
|
+
state: {
|
|
2591
|
+
group: u.group,
|
|
2592
|
+
href: u.item.href,
|
|
2593
|
+
...u.item.active === !0 ? { active: !0 } : {},
|
|
2594
|
+
...u.item.external === !0 ? { external: !0 } : {},
|
|
2595
|
+
...U.includes(u.item) ? { shown: !0 } : {}
|
|
2596
|
+
}
|
|
2597
|
+
};
|
|
2598
|
+
return { ...u, part: B };
|
|
2599
|
+
}), Fe = E({
|
|
2600
|
+
component: Xn.name,
|
|
2601
|
+
label: t,
|
|
2602
|
+
region: !0,
|
|
2603
|
+
state: {
|
|
2604
|
+
destinations: String(x.length),
|
|
2605
|
+
depth: String(T.length),
|
|
2606
|
+
...d === void 0 ? {} : { open: d, matches: String(ne) }
|
|
2607
|
+
},
|
|
2608
|
+
parts: Ve.map((u) => u.part)
|
|
2609
|
+
}), Pe = (u) => {
|
|
2610
|
+
S((B) => [
|
|
2611
|
+
...B.filter((j) => j !== u.href),
|
|
2612
|
+
u.href
|
|
2613
|
+
]), y(void 0), f(""), r?.(u);
|
|
2614
|
+
};
|
|
2615
|
+
if (g === "agent")
|
|
2616
|
+
return /* @__PURE__ */ s(
|
|
2617
|
+
fe,
|
|
2618
|
+
{
|
|
2619
|
+
node: Fe,
|
|
2620
|
+
onActivate: (u, B) => {
|
|
2621
|
+
const j = x[B];
|
|
2622
|
+
j !== void 0 && (Pe(j.item), window.location.assign(j.item.href));
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
);
|
|
2626
|
+
const He = () => {
|
|
2627
|
+
y(void 0), f("");
|
|
2628
|
+
}, Le = (u) => {
|
|
2629
|
+
y(d === u ? void 0 : u), f("");
|
|
2630
|
+
}, Kt = (u) => d !== "trail" ? 0 : -u.reduce(
|
|
2631
|
+
(j, G) => Math.max(j, T.indexOf(G.item.href)),
|
|
2632
|
+
-1
|
|
2633
|
+
), Ge = () => {
|
|
2634
|
+
const u = O.current;
|
|
2635
|
+
return u === null ? [] : Array.from(u.querySelectorAll(Yn)).filter(
|
|
2636
|
+
(B) => B.closest("[hidden]") === null
|
|
2637
|
+
);
|
|
2638
|
+
}, Re = (u) => {
|
|
2639
|
+
const B = Ge();
|
|
2640
|
+
B[u < 0 ? B.length - 1 : u % B.length]?.focus();
|
|
2641
|
+
}, zt = (u) => {
|
|
2642
|
+
if (u.key === "Escape") {
|
|
2643
|
+
He();
|
|
2644
|
+
return;
|
|
2645
|
+
}
|
|
2646
|
+
if (u.key === "ArrowDown") {
|
|
2647
|
+
u.preventDefault(), Re(0);
|
|
2648
|
+
return;
|
|
2649
|
+
}
|
|
2650
|
+
if (u.key === "ArrowUp" && d !== "trail") {
|
|
2651
|
+
u.preventDefault(), Le("trail");
|
|
2652
|
+
return;
|
|
2653
|
+
}
|
|
2654
|
+
if (u.key !== "Enter") return;
|
|
2655
|
+
u.preventDefault();
|
|
2656
|
+
const B = z[0];
|
|
2657
|
+
if (B !== void 0) {
|
|
2658
|
+
k(B.label), f(""), y("leaf");
|
|
2659
|
+
return;
|
|
2660
|
+
}
|
|
2661
|
+
const j = U[0];
|
|
2662
|
+
j !== void 0 && (Pe(j), window.location.assign(j.href));
|
|
2663
|
+
}, Xt = (u) => {
|
|
2664
|
+
if (u.key === "Escape") {
|
|
2665
|
+
He();
|
|
2666
|
+
return;
|
|
2667
|
+
}
|
|
2668
|
+
const j = Ge().indexOf(u.target);
|
|
2669
|
+
if (u.key === "ArrowDown") {
|
|
2670
|
+
u.preventDefault(), Re(j + 1);
|
|
2671
|
+
return;
|
|
2672
|
+
}
|
|
2673
|
+
if (u.key === "ArrowUp") {
|
|
2674
|
+
u.preventDefault(), j <= 0 ? P.current?.focus() : Re(j - 1);
|
|
2675
|
+
return;
|
|
2676
|
+
}
|
|
2677
|
+
u.key.length !== 1 || u.metaKey || u.ctrlKey || u.altKey || (u.preventDefault(), f((G) => `${G}${u.key}`), P.current?.focus());
|
|
2678
|
+
}, Ke = (u, B) => d === u || u === "leaf" && d === "trail" ? /* @__PURE__ */ s(
|
|
2679
|
+
"input",
|
|
2680
|
+
{
|
|
2681
|
+
ref: P,
|
|
2682
|
+
type: "text",
|
|
2683
|
+
"aria-label": `Search ${t}`,
|
|
2684
|
+
value: A,
|
|
2685
|
+
placeholder: d === "trail" ? `Search ${T.length} visited` : `Search ${x.length} destinations`,
|
|
2686
|
+
onChange: (j) => f(j.target.value),
|
|
2687
|
+
onKeyDown: zt
|
|
2688
|
+
}
|
|
2689
|
+
) : /* @__PURE__ */ s("button", { type: "button", "aria-expanded": !1, onClick: () => Le(u), children: B }), Yt = d === "trail" && T.length === 0 ? o : a, Jt = d === void 0 ? `${x.length} destinations` : K ? `${ne} of ${x.length} match` : `${ne} of ${ve}`;
|
|
2690
|
+
return /* @__PURE__ */ C("nav", { ...c, ...q(Fe), "aria-label": t, ref: L, children: [
|
|
2691
|
+
/* @__PURE__ */ C("p", { children: [
|
|
2692
|
+
/* @__PURE__ */ s(
|
|
2693
|
+
"button",
|
|
2694
|
+
{
|
|
2695
|
+
type: "button",
|
|
2696
|
+
"aria-label": `Visited, ${T.length}`,
|
|
2697
|
+
"aria-expanded": d === "trail",
|
|
2698
|
+
onClick: () => Le("trail"),
|
|
2699
|
+
children: String(T.length).padStart(2, "0")
|
|
2700
|
+
}
|
|
2701
|
+
),
|
|
2702
|
+
/* @__PURE__ */ s("span", { children: t }),
|
|
2703
|
+
Ke("group", N),
|
|
2704
|
+
Ke("leaf", R?.item.label ?? "—"),
|
|
2705
|
+
/* @__PURE__ */ s("span", { "aria-live": "polite", children: Jt })
|
|
2706
|
+
] }),
|
|
2707
|
+
/* @__PURE__ */ C(
|
|
2708
|
+
"div",
|
|
2709
|
+
{
|
|
2710
|
+
ref: O,
|
|
2711
|
+
onKeyDown: Xt,
|
|
2712
|
+
...d === void 0 ? { hidden: !0 } : {},
|
|
2713
|
+
children: [
|
|
2714
|
+
/* @__PURE__ */ C("div", { ...z.length === 0 ? { hidden: !0 } : {}, children: [
|
|
2715
|
+
/* @__PURE__ */ s("span", { children: t }),
|
|
2716
|
+
z.map((u) => /* @__PURE__ */ s(
|
|
2717
|
+
"button",
|
|
2718
|
+
{
|
|
2719
|
+
type: "button",
|
|
2720
|
+
onClick: () => {
|
|
2721
|
+
k(u.label), f(""), y("leaf");
|
|
2722
|
+
},
|
|
2723
|
+
children: u.label
|
|
2724
|
+
},
|
|
2725
|
+
u.label
|
|
2726
|
+
))
|
|
2727
|
+
] }),
|
|
2728
|
+
n.map((u) => {
|
|
2729
|
+
const B = Ve.filter((G) => G.group === u.label), j = B.some((G) => U.includes(G.item));
|
|
2730
|
+
return /* @__PURE__ */ C(
|
|
2731
|
+
"div",
|
|
2732
|
+
{
|
|
2733
|
+
style: { "--sprint-navbar-order": Kt(B) },
|
|
2734
|
+
...j ? {} : { hidden: !0 },
|
|
2735
|
+
children: [
|
|
2736
|
+
/* @__PURE__ */ s("span", { children: `${t} / ${u.label}` }),
|
|
2737
|
+
B.map((G) => /* @__PURE__ */ s(
|
|
2738
|
+
"a",
|
|
2739
|
+
{
|
|
2740
|
+
...D(G.part),
|
|
2741
|
+
href: G.item.href,
|
|
2742
|
+
"aria-current": G.item.active === !0 ? "page" : void 0,
|
|
2743
|
+
target: G.item.external === !0 ? "_blank" : void 0,
|
|
2744
|
+
rel: G.item.external === !0 ? "noreferrer noopener" : void 0,
|
|
2745
|
+
onClick: () => Pe(G.item),
|
|
2746
|
+
children: G.item.label
|
|
2747
|
+
},
|
|
2748
|
+
G.item.href
|
|
2749
|
+
))
|
|
2750
|
+
]
|
|
2751
|
+
},
|
|
2752
|
+
u.label
|
|
2753
|
+
);
|
|
2754
|
+
}),
|
|
2755
|
+
ne === 0 ? /* @__PURE__ */ s("p", { children: Yt }) : null
|
|
2756
|
+
]
|
|
2757
|
+
}
|
|
2758
|
+
)
|
|
2759
|
+
] });
|
|
2760
|
+
}
|
|
2761
|
+
const Qn = I({
|
|
2434
2762
|
name: "NavGroup",
|
|
2435
2763
|
category: "navigation",
|
|
2436
2764
|
summary: "A labelled cluster of links inside a Nav. The label names the group for screen readers and agents alike.",
|
|
@@ -2471,17 +2799,17 @@ const On = I({
|
|
|
2471
2799
|
}
|
|
2472
2800
|
]
|
|
2473
2801
|
});
|
|
2474
|
-
function
|
|
2475
|
-
const { label: t, children: n, ...a } = e, o =
|
|
2476
|
-
return o === "agent" ? /* @__PURE__ */ s(
|
|
2802
|
+
function ao(e) {
|
|
2803
|
+
const { label: t, children: n, ...a } = e, o = W(), i = E({ component: Qn.name, label: t });
|
|
2804
|
+
return o === "agent" ? /* @__PURE__ */ s(_, { node: i, children: n }) : (
|
|
2477
2805
|
// biome-ignore lint/a11y/useSemanticElements: the suggested fieldset groups form controls; this groups links, and group is the ARIA role for exactly that
|
|
2478
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ C("div", { ...a, ...q(i), role: "group", "aria-label": t, children: [
|
|
2479
2807
|
/* @__PURE__ */ s("span", { children: t }),
|
|
2480
2808
|
n
|
|
2481
2809
|
] })
|
|
2482
2810
|
);
|
|
2483
2811
|
}
|
|
2484
|
-
const
|
|
2812
|
+
const Zn = I({
|
|
2485
2813
|
name: "PageHeader",
|
|
2486
2814
|
category: "layout",
|
|
2487
2815
|
summary: "The top of a page: its h1 title, the Tag chips that classify it, an optional page-level control, and a lede underneath.",
|
|
@@ -2534,31 +2862,31 @@ const $n = I({
|
|
|
2534
2862
|
}
|
|
2535
2863
|
]
|
|
2536
2864
|
});
|
|
2537
|
-
function
|
|
2538
|
-
const { label: t, tags: n, actions: a, children: o, ...i } = e, l =
|
|
2539
|
-
component:
|
|
2865
|
+
function oo(e) {
|
|
2866
|
+
const { label: t, tags: n, actions: a, children: o, ...i } = e, l = W(), r = E({
|
|
2867
|
+
component: Zn.name,
|
|
2540
2868
|
label: t,
|
|
2541
2869
|
region: !0
|
|
2542
2870
|
});
|
|
2543
2871
|
if (l === "agent")
|
|
2544
|
-
return /* @__PURE__ */
|
|
2872
|
+
return /* @__PURE__ */ C(_, { node: r, children: [
|
|
2545
2873
|
n,
|
|
2546
2874
|
a,
|
|
2547
2875
|
o
|
|
2548
2876
|
] });
|
|
2549
|
-
const
|
|
2550
|
-
return /* @__PURE__ */
|
|
2551
|
-
/* @__PURE__ */
|
|
2552
|
-
/* @__PURE__ */
|
|
2877
|
+
const h = dt.toArray(o).length > 0;
|
|
2878
|
+
return /* @__PURE__ */ C("header", { ...i, ...q(r), children: [
|
|
2879
|
+
/* @__PURE__ */ C("div", { children: [
|
|
2880
|
+
/* @__PURE__ */ C("div", { children: [
|
|
2553
2881
|
/* @__PURE__ */ s("h1", { children: t }),
|
|
2554
2882
|
n === void 0 ? null : /* @__PURE__ */ s("span", { children: n })
|
|
2555
2883
|
] }),
|
|
2556
2884
|
a === void 0 ? null : /* @__PURE__ */ s("span", { children: a })
|
|
2557
2885
|
] }),
|
|
2558
|
-
|
|
2886
|
+
h ? /* @__PURE__ */ s("div", { children: o }) : null
|
|
2559
2887
|
] });
|
|
2560
2888
|
}
|
|
2561
|
-
const
|
|
2889
|
+
const ea = I({
|
|
2562
2890
|
name: "Panel",
|
|
2563
2891
|
category: "layout",
|
|
2564
2892
|
summary: "A labelled region with a header band and an optional slot for the controls that act on it. Everything on a Sprint page lives inside one.",
|
|
@@ -2655,7 +2983,7 @@ const Dn = I({
|
|
|
2655
2983
|
}
|
|
2656
2984
|
]
|
|
2657
2985
|
});
|
|
2658
|
-
function
|
|
2986
|
+
function io(e) {
|
|
2659
2987
|
const {
|
|
2660
2988
|
label: t,
|
|
2661
2989
|
headingLevel: n,
|
|
@@ -2664,27 +2992,27 @@ function qa(e) {
|
|
|
2664
2992
|
emptyLabel: i = "Empty",
|
|
2665
2993
|
children: l,
|
|
2666
2994
|
...r
|
|
2667
|
-
} = e,
|
|
2668
|
-
component:
|
|
2995
|
+
} = e, h = W(), c = dt.toArray(l).length === 0, g = E({
|
|
2996
|
+
component: ea.name,
|
|
2669
2997
|
label: t,
|
|
2670
2998
|
region: !0,
|
|
2671
2999
|
state: { flush: o, empty: c }
|
|
2672
3000
|
});
|
|
2673
|
-
if (
|
|
2674
|
-
return /* @__PURE__ */
|
|
3001
|
+
if (h === "agent")
|
|
3002
|
+
return /* @__PURE__ */ C(_, { node: g, children: [
|
|
2675
3003
|
a,
|
|
2676
3004
|
l
|
|
2677
3005
|
] });
|
|
2678
|
-
const
|
|
2679
|
-
return /* @__PURE__ */
|
|
2680
|
-
/* @__PURE__ */
|
|
2681
|
-
/* @__PURE__ */ s(
|
|
3006
|
+
const p = n === void 0 ? "span" : `h${n}`;
|
|
3007
|
+
return /* @__PURE__ */ C("section", { ...r, ...q(g), "aria-label": t, children: [
|
|
3008
|
+
/* @__PURE__ */ C("header", { children: [
|
|
3009
|
+
/* @__PURE__ */ s(p, { children: t }),
|
|
2682
3010
|
a === void 0 ? null : /* @__PURE__ */ s("span", { children: a })
|
|
2683
3011
|
] }),
|
|
2684
3012
|
/* @__PURE__ */ s("div", { children: c ? /* @__PURE__ */ s("span", { children: i }) : l })
|
|
2685
3013
|
] });
|
|
2686
3014
|
}
|
|
2687
|
-
const
|
|
3015
|
+
const ta = I({
|
|
2688
3016
|
name: "SecretField",
|
|
2689
3017
|
category: "display",
|
|
2690
3018
|
summary: "A sensitive value shown once or on demand: an API key, a recovery code, a signing secret. Masked by default with reveal and copy controls, and the value never reaches any agent surface.",
|
|
@@ -2743,64 +3071,64 @@ const En = I({
|
|
|
2743
3071
|
a11y: {
|
|
2744
3072
|
notes: "The reveal control is a toggle button with aria-pressed; the masked value is announced as a hidden secret rather than as bullet characters. Copy announces its success by swapping its label to Copied."
|
|
2745
3073
|
}
|
|
2746
|
-
}),
|
|
2747
|
-
function
|
|
2748
|
-
const { label: t, value: n, hint: a, defaultRevealed: o = !1, ...i } = e, l =
|
|
2749
|
-
|
|
3074
|
+
}), na = "••••••••••••", aa = 1200;
|
|
3075
|
+
function ro(e) {
|
|
3076
|
+
const { label: t, value: n, hint: a, defaultRevealed: o = !1, ...i } = e, l = W(), [r, h] = Y(o), [c, g] = Y(!1);
|
|
3077
|
+
H(() => {
|
|
2750
3078
|
if (!c) return;
|
|
2751
|
-
const f = setTimeout(() =>
|
|
3079
|
+
const f = setTimeout(() => g(!1), aa);
|
|
2752
3080
|
return () => clearTimeout(f);
|
|
2753
3081
|
}, [c]);
|
|
2754
|
-
const
|
|
3082
|
+
const p = () => {
|
|
2755
3083
|
const f = navigator.clipboard;
|
|
2756
3084
|
f !== void 0 && f.writeText(n).then(
|
|
2757
|
-
() =>
|
|
2758
|
-
() =>
|
|
3085
|
+
() => g(!0),
|
|
3086
|
+
() => g(!1)
|
|
2759
3087
|
);
|
|
2760
|
-
},
|
|
2761
|
-
component:
|
|
3088
|
+
}, m = n !== "", d = a === void 0 ? [] : [{ part: "hint", label: a, state: {} }], A = E({
|
|
3089
|
+
component: ta.name,
|
|
2762
3090
|
label: t,
|
|
2763
|
-
state: { filled:
|
|
2764
|
-
parts:
|
|
3091
|
+
state: { filled: m, revealed: r },
|
|
3092
|
+
parts: d
|
|
2765
3093
|
});
|
|
2766
|
-
return l === "agent" ? /* @__PURE__ */ s(
|
|
2767
|
-
/* @__PURE__ */ s("span", { ...
|
|
2768
|
-
/* @__PURE__ */
|
|
3094
|
+
return l === "agent" ? /* @__PURE__ */ s(_, { node: A }) : /* @__PURE__ */ C("div", { ...i, ...q(A), children: [
|
|
3095
|
+
/* @__PURE__ */ s("span", { ...D({ part: "label", state: {} }), children: t }),
|
|
3096
|
+
/* @__PURE__ */ C("div", { ...D({ part: "control", state: {} }), children: [
|
|
2769
3097
|
/* @__PURE__ */ s(
|
|
2770
3098
|
"output",
|
|
2771
3099
|
{
|
|
2772
|
-
...
|
|
3100
|
+
...D({ part: "value", state: {} }),
|
|
2773
3101
|
"aria-label": r ? void 0 : "Hidden secret",
|
|
2774
|
-
children: r ? n :
|
|
3102
|
+
children: r ? n : na
|
|
2775
3103
|
}
|
|
2776
3104
|
),
|
|
2777
3105
|
/* @__PURE__ */ s(
|
|
2778
3106
|
"button",
|
|
2779
3107
|
{
|
|
2780
|
-
...
|
|
3108
|
+
...D({ part: "reveal", state: {} }),
|
|
2781
3109
|
type: "button",
|
|
2782
3110
|
"aria-pressed": r,
|
|
2783
|
-
onClick: () =>
|
|
3111
|
+
onClick: () => h((f) => !f),
|
|
2784
3112
|
children: r ? "Hide" : "Reveal"
|
|
2785
3113
|
}
|
|
2786
3114
|
),
|
|
2787
3115
|
/* @__PURE__ */ s(
|
|
2788
3116
|
"button",
|
|
2789
3117
|
{
|
|
2790
|
-
...
|
|
3118
|
+
...D({
|
|
2791
3119
|
part: "copy",
|
|
2792
3120
|
state: c ? { copied: !0 } : {}
|
|
2793
3121
|
}),
|
|
2794
3122
|
type: "button",
|
|
2795
|
-
onClick:
|
|
3123
|
+
onClick: p,
|
|
2796
3124
|
children: c ? "Copied" : "Copy"
|
|
2797
3125
|
}
|
|
2798
3126
|
)
|
|
2799
3127
|
] }),
|
|
2800
|
-
a === void 0 ? null : /* @__PURE__ */ s("p", { ...
|
|
3128
|
+
a === void 0 ? null : /* @__PURE__ */ s("p", { ...D({ part: "hint", state: {} }), children: a })
|
|
2801
3129
|
] });
|
|
2802
3130
|
}
|
|
2803
|
-
const
|
|
3131
|
+
const de = {
|
|
2804
3132
|
verb: "select",
|
|
2805
3133
|
description: "Select one of this control's options by its visible label, exactly as a person clicking it would. Only one option is selected at a time, so this replaces the current one. Returns the control's state after the change, so a follow-up read is unnecessary.",
|
|
2806
3134
|
inputSchema: {
|
|
@@ -2817,7 +3145,7 @@ const ie = {
|
|
|
2817
3145
|
untrustedContent: !0,
|
|
2818
3146
|
registeredWhen: "The control is mounted, enabled, has a resolvable label, and no other component claims the same tool name. The registered schema enumerates the current option labels.",
|
|
2819
3147
|
unregisteredWhen: "The control unmounts or becomes disabled."
|
|
2820
|
-
},
|
|
3148
|
+
}, ot = I({
|
|
2821
3149
|
name: "SegmentedControl",
|
|
2822
3150
|
category: "input",
|
|
2823
3151
|
summary: "A short row of mutually exclusive options, all visible at once: a radio group that registers a single select tool whose schema enumerates the options currently on screen.",
|
|
@@ -2871,7 +3199,7 @@ const ie = {
|
|
|
2871
3199
|
}
|
|
2872
3200
|
},
|
|
2873
3201
|
tools: {
|
|
2874
|
-
select:
|
|
3202
|
+
select: de
|
|
2875
3203
|
},
|
|
2876
3204
|
agentView: {
|
|
2877
3205
|
example: '- **SegmentedControl** "Page view" [value=human] → tool `select-page-view`\n - part `option` "human" [checked]\n - part `option` "agent"'
|
|
@@ -2916,17 +3244,17 @@ const ie = {
|
|
|
2916
3244
|
notes: "Roving tabindex: only the selected option is in the tab order. Selection follows focus, which is the expected behaviour for a radio group."
|
|
2917
3245
|
}
|
|
2918
3246
|
});
|
|
2919
|
-
function
|
|
2920
|
-
const t =
|
|
3247
|
+
function oa(e) {
|
|
3248
|
+
const t = de.inputSchema.properties.option;
|
|
2921
3249
|
return {
|
|
2922
|
-
...
|
|
3250
|
+
...de.inputSchema,
|
|
2923
3251
|
properties: {
|
|
2924
|
-
...
|
|
3252
|
+
...de.inputSchema.properties,
|
|
2925
3253
|
...t === void 0 ? {} : { option: { ...t, enum: e.map((n) => n.label) } }
|
|
2926
3254
|
}
|
|
2927
3255
|
};
|
|
2928
3256
|
}
|
|
2929
|
-
function
|
|
3257
|
+
function so(e) {
|
|
2930
3258
|
const {
|
|
2931
3259
|
label: t,
|
|
2932
3260
|
options: n,
|
|
@@ -2935,98 +3263,98 @@ function Wa(e) {
|
|
|
2935
3263
|
disabled: i = !1,
|
|
2936
3264
|
agentName: l,
|
|
2937
3265
|
agentTool: r = !0,
|
|
2938
|
-
...
|
|
2939
|
-
} = e, c =
|
|
2940
|
-
|
|
2941
|
-
const
|
|
2942
|
-
|
|
2943
|
-
const f =
|
|
2944
|
-
f.current =
|
|
2945
|
-
const
|
|
2946
|
-
|
|
2947
|
-
|
|
3266
|
+
...h
|
|
3267
|
+
} = e, c = W(), g = Z(), p = Q(), m = b(/* @__PURE__ */ new Map()), d = b(o);
|
|
3268
|
+
d.current = o;
|
|
3269
|
+
const A = b(n);
|
|
3270
|
+
A.current = n;
|
|
3271
|
+
const f = b(p);
|
|
3272
|
+
f.current = p;
|
|
3273
|
+
const v = b(E({ component: ot.name })), k = b(!0);
|
|
3274
|
+
H(() => (k.current = !0, () => {
|
|
3275
|
+
k.current = !1;
|
|
2948
3276
|
}), []);
|
|
2949
|
-
const T =
|
|
2950
|
-
const x =
|
|
3277
|
+
const T = F((y) => {
|
|
3278
|
+
const x = m.current.get(y);
|
|
2951
3279
|
if (x !== void 0) {
|
|
2952
3280
|
x.click();
|
|
2953
3281
|
return;
|
|
2954
3282
|
}
|
|
2955
|
-
|
|
2956
|
-
}, []),
|
|
2957
|
-
async (
|
|
2958
|
-
const x = typeof
|
|
2959
|
-
return
|
|
2960
|
-
${f.current([
|
|
3283
|
+
te(() => d.current(y));
|
|
3284
|
+
}, []), S = F(
|
|
3285
|
+
async (y) => {
|
|
3286
|
+
const x = typeof y.option == "string" ? y.option : "", R = A.current, $ = R.find((N) => N.label === x);
|
|
3287
|
+
return $ === void 0 ? `No option named "${x}". This control offers: ${R.map((N) => `"${N.label}"`).join(", ")}.` : (T($.value), await ee(), k.current ? `Selected. The control is now:
|
|
3288
|
+
${f.current([v.current])}` : "The selection removed this control from the page.");
|
|
2961
3289
|
},
|
|
2962
3290
|
[T]
|
|
2963
|
-
),
|
|
2964
|
-
spec:
|
|
3291
|
+
), P = re(() => oa(n), [n]), O = X({
|
|
3292
|
+
spec: de,
|
|
2965
3293
|
label: l ?? t,
|
|
2966
|
-
inputSchema:
|
|
3294
|
+
inputSchema: P,
|
|
2967
3295
|
enabled: r && !i,
|
|
2968
|
-
execute:
|
|
2969
|
-
}),
|
|
3296
|
+
execute: S
|
|
3297
|
+
}), M = n.map((y) => ({
|
|
2970
3298
|
part: "option",
|
|
2971
|
-
label:
|
|
3299
|
+
label: y.label,
|
|
2972
3300
|
state: {
|
|
2973
|
-
...
|
|
3301
|
+
...y.value === a ? { checked: !0 } : {},
|
|
2974
3302
|
...i ? { disabled: !0 } : {}
|
|
2975
3303
|
}
|
|
2976
|
-
})),
|
|
2977
|
-
component:
|
|
3304
|
+
})), L = E({
|
|
3305
|
+
component: ot.name,
|
|
2978
3306
|
label: t,
|
|
2979
|
-
tool:
|
|
3307
|
+
tool: O,
|
|
2980
3308
|
state: { value: a, disabled: i },
|
|
2981
|
-
parts:
|
|
3309
|
+
parts: M
|
|
2982
3310
|
});
|
|
2983
|
-
|
|
2984
|
-
const
|
|
2985
|
-
if (!["ArrowRight", "ArrowDown", "ArrowLeft", "ArrowUp", "Home", "End"].includes(
|
|
2986
|
-
const
|
|
2987
|
-
|
|
3311
|
+
v.current = L;
|
|
3312
|
+
const w = (y) => {
|
|
3313
|
+
if (!["ArrowRight", "ArrowDown", "ArrowLeft", "ArrowUp", "Home", "End"].includes(y.key) || i) return;
|
|
3314
|
+
const R = n.findIndex((K) => K.value === a), $ = y.key === "ArrowRight" || y.key === "ArrowDown" ? 1 : -1, N = y.key === "Home" ? 0 : y.key === "End" ? n.length - 1 : (R + $ + n.length) % n.length, V = n[N];
|
|
3315
|
+
V !== void 0 && (y.preventDefault(), m.current.get(V.value)?.focus(), T(V.value));
|
|
2988
3316
|
};
|
|
2989
|
-
return c === "agent" ? i ||
|
|
2990
|
-
|
|
3317
|
+
return c === "agent" ? i || g === "never" ? /* @__PURE__ */ s(_, { node: L }) : /* @__PURE__ */ s(
|
|
3318
|
+
fe,
|
|
2991
3319
|
{
|
|
2992
|
-
node:
|
|
2993
|
-
onActivate: (
|
|
2994
|
-
const
|
|
2995
|
-
|
|
3320
|
+
node: L,
|
|
3321
|
+
onActivate: (y, x) => {
|
|
3322
|
+
const R = n[x];
|
|
3323
|
+
R !== void 0 && T(R.value);
|
|
2996
3324
|
}
|
|
2997
3325
|
}
|
|
2998
3326
|
) : /* @__PURE__ */ s(
|
|
2999
3327
|
"div",
|
|
3000
3328
|
{
|
|
3001
|
-
...
|
|
3002
|
-
...
|
|
3329
|
+
...h,
|
|
3330
|
+
...q(L),
|
|
3003
3331
|
role: "radiogroup",
|
|
3004
3332
|
"aria-label": t,
|
|
3005
|
-
onKeyDown:
|
|
3006
|
-
children: n.map((
|
|
3007
|
-
const
|
|
3333
|
+
onKeyDown: w,
|
|
3334
|
+
children: n.map((y, x) => {
|
|
3335
|
+
const R = y.value === a, $ = n.some((N) => N.value === a) ? R : x === 0;
|
|
3008
3336
|
return /* @__PURE__ */ s(
|
|
3009
3337
|
"button",
|
|
3010
3338
|
{
|
|
3011
3339
|
type: "button",
|
|
3012
3340
|
role: "radio",
|
|
3013
|
-
"aria-checked":
|
|
3014
|
-
tabIndex:
|
|
3341
|
+
"aria-checked": R,
|
|
3342
|
+
tabIndex: $ ? 0 : -1,
|
|
3015
3343
|
disabled: i,
|
|
3016
|
-
ref: (
|
|
3017
|
-
|
|
3344
|
+
ref: (N) => {
|
|
3345
|
+
N === null ? m.current.delete(y.value) : m.current.set(y.value, N);
|
|
3018
3346
|
},
|
|
3019
|
-
...
|
|
3020
|
-
onClick: () => o(
|
|
3021
|
-
children:
|
|
3347
|
+
...D(M[x] ?? { part: "option", state: {} }),
|
|
3348
|
+
onClick: () => o(y.value),
|
|
3349
|
+
children: y.label
|
|
3022
3350
|
},
|
|
3023
|
-
|
|
3351
|
+
y.value
|
|
3024
3352
|
);
|
|
3025
3353
|
})
|
|
3026
3354
|
}
|
|
3027
3355
|
);
|
|
3028
3356
|
}
|
|
3029
|
-
const
|
|
3357
|
+
const he = {
|
|
3030
3358
|
verb: "select",
|
|
3031
3359
|
description: "Choose one of this dropdown's options by its visible label, exactly as a person opening it and clicking one would. Only one option is chosen at a time, so this replaces the current choice. Returns the dropdown's state after the change, so a follow-up read is unnecessary.",
|
|
3032
3360
|
inputSchema: {
|
|
@@ -3043,7 +3371,7 @@ const re = {
|
|
|
3043
3371
|
untrustedContent: !0,
|
|
3044
3372
|
registeredWhen: "The dropdown is mounted, enabled, has a resolvable label, and no other component claims the same tool name. The registered schema enumerates the current option labels.",
|
|
3045
3373
|
unregisteredWhen: "The dropdown unmounts or becomes disabled."
|
|
3046
|
-
},
|
|
3374
|
+
}, it = I({
|
|
3047
3375
|
name: "Select",
|
|
3048
3376
|
category: "input",
|
|
3049
3377
|
summary: "A dropdown of mutually exclusive options behind a native select, carrying its own label, hint, and error. It registers a single select tool whose schema enumerates the option labels currently on offer.",
|
|
@@ -3130,7 +3458,7 @@ const re = {
|
|
|
3130
3458
|
}
|
|
3131
3459
|
},
|
|
3132
3460
|
tools: {
|
|
3133
|
-
select:
|
|
3461
|
+
select: he
|
|
3134
3462
|
},
|
|
3135
3463
|
agentView: {
|
|
3136
3464
|
example: '- **Select** "Region" [value=eu-1] → tool `select-region`\n - part `option` "North Atlantic"\n - part `option` "Northern Europe" [checked]\n - part `option` "East Asia"'
|
|
@@ -3191,31 +3519,31 @@ const re = {
|
|
|
3191
3519
|
notes: "A native select element, so the platform owns the listbox interaction. The label is associated via htmlFor; errors set aria-invalid and link with aria-describedby."
|
|
3192
3520
|
}
|
|
3193
3521
|
});
|
|
3194
|
-
function
|
|
3522
|
+
function qt(e, t) {
|
|
3195
3523
|
const n = e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype, a = Object.getOwnPropertyDescriptor(n, "value")?.set;
|
|
3196
3524
|
a !== void 0 && (a.call(e, t), e.dispatchEvent(new Event("input", { bubbles: !0 })));
|
|
3197
3525
|
}
|
|
3198
|
-
function
|
|
3526
|
+
function ia(e, t) {
|
|
3199
3527
|
const n = Object.getOwnPropertyDescriptor(
|
|
3200
3528
|
HTMLSelectElement.prototype,
|
|
3201
3529
|
"value"
|
|
3202
3530
|
)?.set;
|
|
3203
3531
|
n !== void 0 && (n.call(e, t), e.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
3204
3532
|
}
|
|
3205
|
-
function
|
|
3206
|
-
const t =
|
|
3533
|
+
function ra(e) {
|
|
3534
|
+
const t = he.inputSchema.properties.option;
|
|
3207
3535
|
return {
|
|
3208
|
-
...
|
|
3536
|
+
...he.inputSchema,
|
|
3209
3537
|
properties: {
|
|
3210
|
-
...
|
|
3538
|
+
...he.inputSchema.properties,
|
|
3211
3539
|
...t === void 0 ? {} : { option: { ...t, enum: e.map((n) => n.label) } }
|
|
3212
3540
|
}
|
|
3213
3541
|
};
|
|
3214
3542
|
}
|
|
3215
|
-
function
|
|
3543
|
+
function sa(e, t) {
|
|
3216
3544
|
return e !== void 0 ? [{ part: "error", label: e, state: {} }] : t !== void 0 ? [{ part: "hint", label: t, state: {} }] : [];
|
|
3217
3545
|
}
|
|
3218
|
-
function
|
|
3546
|
+
function lo(e) {
|
|
3219
3547
|
const {
|
|
3220
3548
|
label: t,
|
|
3221
3549
|
options: n,
|
|
@@ -3224,112 +3552,112 @@ function Ba(e) {
|
|
|
3224
3552
|
placeholder: i,
|
|
3225
3553
|
hint: l,
|
|
3226
3554
|
error: r,
|
|
3227
|
-
name:
|
|
3555
|
+
name: h,
|
|
3228
3556
|
disabled: c = !1,
|
|
3229
|
-
required:
|
|
3230
|
-
agentName:
|
|
3231
|
-
agentTool:
|
|
3232
|
-
...
|
|
3233
|
-
} = e,
|
|
3234
|
-
|
|
3235
|
-
const
|
|
3236
|
-
|
|
3237
|
-
const
|
|
3238
|
-
|
|
3239
|
-
const
|
|
3240
|
-
|
|
3241
|
-
|
|
3557
|
+
required: g = !1,
|
|
3558
|
+
agentName: p,
|
|
3559
|
+
agentTool: m = !0,
|
|
3560
|
+
...d
|
|
3561
|
+
} = e, A = W(), f = Z(), v = Q(), k = pe(), T = b(null), S = b(o);
|
|
3562
|
+
S.current = o;
|
|
3563
|
+
const P = b(n);
|
|
3564
|
+
P.current = n;
|
|
3565
|
+
const O = b(v);
|
|
3566
|
+
O.current = v;
|
|
3567
|
+
const M = b(E({ component: it.name })), L = b(!0);
|
|
3568
|
+
H(() => (L.current = !0, () => {
|
|
3569
|
+
L.current = !1;
|
|
3242
3570
|
}), []);
|
|
3243
|
-
const
|
|
3244
|
-
const
|
|
3245
|
-
if (
|
|
3246
|
-
|
|
3571
|
+
const w = F((U) => {
|
|
3572
|
+
const z = T.current;
|
|
3573
|
+
if (z !== null) {
|
|
3574
|
+
ia(z, U);
|
|
3247
3575
|
return;
|
|
3248
3576
|
}
|
|
3249
|
-
|
|
3250
|
-
}, []),
|
|
3251
|
-
async (
|
|
3252
|
-
const
|
|
3253
|
-
return
|
|
3254
|
-
${
|
|
3255
|
-
},
|
|
3256
|
-
[
|
|
3257
|
-
), x =
|
|
3258
|
-
spec:
|
|
3259
|
-
label:
|
|
3577
|
+
te(() => S.current(U));
|
|
3578
|
+
}, []), y = F(
|
|
3579
|
+
async (U) => {
|
|
3580
|
+
const z = typeof U.option == "string" ? U.option : "", oe = P.current, ve = oe.find((ne) => ne.label === z);
|
|
3581
|
+
return ve === void 0 ? `No option named "${z}". This dropdown offers: ${oe.map((ne) => `"${ne.label}"`).join(", ")}.` : (w(ve.value), await ee(), L.current ? `Selected. The dropdown is now:
|
|
3582
|
+
${O.current([M.current])}` : "The selection removed this dropdown from the page.");
|
|
3583
|
+
},
|
|
3584
|
+
[w]
|
|
3585
|
+
), x = re(() => ra(n), [n]), R = X({
|
|
3586
|
+
spec: he,
|
|
3587
|
+
label: p ?? t,
|
|
3260
3588
|
inputSchema: x,
|
|
3261
|
-
enabled:
|
|
3262
|
-
execute:
|
|
3263
|
-
}),
|
|
3589
|
+
enabled: m && !c,
|
|
3590
|
+
execute: y
|
|
3591
|
+
}), $ = n.find((U) => U.value === a), N = n.map((U) => ({
|
|
3264
3592
|
part: "option",
|
|
3265
|
-
label:
|
|
3593
|
+
label: U.label,
|
|
3266
3594
|
state: {
|
|
3267
|
-
...
|
|
3595
|
+
...U.value === a ? { checked: !0 } : {},
|
|
3268
3596
|
...c ? { disabled: !0 } : {}
|
|
3269
3597
|
}
|
|
3270
|
-
})),
|
|
3271
|
-
component:
|
|
3598
|
+
})), V = E({
|
|
3599
|
+
component: it.name,
|
|
3272
3600
|
label: t,
|
|
3273
|
-
tool:
|
|
3601
|
+
tool: R,
|
|
3274
3602
|
state: {
|
|
3275
|
-
|
|
3276
|
-
empty:
|
|
3603
|
+
...$ === void 0 ? {} : { value: a },
|
|
3604
|
+
empty: $ === void 0,
|
|
3277
3605
|
disabled: c,
|
|
3278
|
-
required:
|
|
3606
|
+
required: g,
|
|
3279
3607
|
invalid: r !== void 0
|
|
3280
3608
|
},
|
|
3281
|
-
parts: [...
|
|
3609
|
+
parts: [...N, ...sa(r, l)]
|
|
3282
3610
|
});
|
|
3283
|
-
if (
|
|
3284
|
-
return c || f === "never" ? /* @__PURE__ */ s(
|
|
3285
|
-
|
|
3611
|
+
if (M.current = V, A === "agent")
|
|
3612
|
+
return c || f === "never" ? /* @__PURE__ */ s(_, { node: V }) : /* @__PURE__ */ s(
|
|
3613
|
+
fe,
|
|
3286
3614
|
{
|
|
3287
|
-
node:
|
|
3288
|
-
isActionable: (
|
|
3289
|
-
onActivate: (
|
|
3290
|
-
const oe = n[
|
|
3291
|
-
oe !== void 0 &&
|
|
3615
|
+
node: V,
|
|
3616
|
+
isActionable: (U) => U.part === "option",
|
|
3617
|
+
onActivate: (U, z) => {
|
|
3618
|
+
const oe = n[z];
|
|
3619
|
+
oe !== void 0 && w(oe.value);
|
|
3292
3620
|
}
|
|
3293
3621
|
}
|
|
3294
3622
|
);
|
|
3295
|
-
const
|
|
3296
|
-
return /* @__PURE__ */
|
|
3297
|
-
/* @__PURE__ */ s("label", { htmlFor:
|
|
3298
|
-
/* @__PURE__ */ s("span", { ...
|
|
3623
|
+
const K = r !== void 0 ? `${k}-error` : l !== void 0 ? `${k}-hint` : void 0;
|
|
3624
|
+
return /* @__PURE__ */ C("div", { ...d, ...q(V), children: [
|
|
3625
|
+
/* @__PURE__ */ s("label", { htmlFor: k, children: t }),
|
|
3626
|
+
/* @__PURE__ */ s("span", { ...D({ part: "control", state: {} }), children: /* @__PURE__ */ C(
|
|
3299
3627
|
"select",
|
|
3300
3628
|
{
|
|
3301
|
-
id:
|
|
3302
|
-
...
|
|
3303
|
-
ref: (
|
|
3304
|
-
T.current =
|
|
3629
|
+
id: k,
|
|
3630
|
+
...D({ part: "input", state: {} }),
|
|
3631
|
+
ref: (U) => {
|
|
3632
|
+
T.current = U;
|
|
3305
3633
|
},
|
|
3306
|
-
value:
|
|
3307
|
-
name:
|
|
3634
|
+
value: $ === void 0 ? "" : a,
|
|
3635
|
+
name: h,
|
|
3308
3636
|
disabled: c,
|
|
3309
|
-
required:
|
|
3637
|
+
required: g,
|
|
3310
3638
|
"aria-invalid": r !== void 0 || void 0,
|
|
3311
|
-
"aria-describedby":
|
|
3312
|
-
onChange: (
|
|
3639
|
+
"aria-describedby": K,
|
|
3640
|
+
onChange: (U) => o(U.currentTarget.value),
|
|
3313
3641
|
children: [
|
|
3314
|
-
|
|
3315
|
-
n.map((
|
|
3642
|
+
$ === void 0 ? /* @__PURE__ */ s("option", { value: "", disabled: !0, children: i ?? "Choose" }) : null,
|
|
3643
|
+
n.map((U, z) => /* @__PURE__ */ s(
|
|
3316
3644
|
"option",
|
|
3317
3645
|
{
|
|
3318
|
-
value:
|
|
3319
|
-
...
|
|
3320
|
-
|
|
3646
|
+
value: U.value,
|
|
3647
|
+
...D(
|
|
3648
|
+
N[z] ?? { part: "option", state: {} }
|
|
3321
3649
|
),
|
|
3322
|
-
children:
|
|
3650
|
+
children: U.label
|
|
3323
3651
|
},
|
|
3324
|
-
|
|
3652
|
+
U.value
|
|
3325
3653
|
))
|
|
3326
3654
|
]
|
|
3327
3655
|
}
|
|
3328
3656
|
) }),
|
|
3329
|
-
r !== void 0 ? /* @__PURE__ */ s("p", { id:
|
|
3657
|
+
r !== void 0 ? /* @__PURE__ */ s("p", { id: K, ...D({ part: "error", state: {} }), children: r }) : l !== void 0 ? /* @__PURE__ */ s("p", { id: K, ...D({ part: "hint", state: {} }), children: l }) : null
|
|
3330
3658
|
] });
|
|
3331
3659
|
}
|
|
3332
|
-
const
|
|
3660
|
+
const la = I({
|
|
3333
3661
|
name: "Shell",
|
|
3334
3662
|
category: "layout",
|
|
3335
3663
|
summary: "The page-level frame: a sidebar and a main content region, with the landmark wiring done once. On a phone the sidebar becomes a drawer behind a menu button.",
|
|
@@ -3401,7 +3729,7 @@ const _n = I({
|
|
|
3401
3729
|
}
|
|
3402
3730
|
]
|
|
3403
3731
|
});
|
|
3404
|
-
function
|
|
3732
|
+
function co(e) {
|
|
3405
3733
|
const {
|
|
3406
3734
|
side: t,
|
|
3407
3735
|
bar: n,
|
|
@@ -3410,41 +3738,41 @@ function _a(e) {
|
|
|
3410
3738
|
menuLabel: i = "Menu",
|
|
3411
3739
|
closeLabel: l = "Close",
|
|
3412
3740
|
children: r,
|
|
3413
|
-
...
|
|
3414
|
-
} = e, c =
|
|
3415
|
-
const
|
|
3416
|
-
|
|
3417
|
-
}, []), f =
|
|
3418
|
-
component:
|
|
3741
|
+
...h
|
|
3742
|
+
} = e, c = W(), [g, p] = Y(!1), m = pe(), d = b(null), A = F((v) => {
|
|
3743
|
+
const k = v.target;
|
|
3744
|
+
k instanceof Element && k.closest("a") !== null && p(!1);
|
|
3745
|
+
}, []), f = E({
|
|
3746
|
+
component: la.name,
|
|
3419
3747
|
region: !0,
|
|
3420
|
-
state: { open:
|
|
3748
|
+
state: { open: g }
|
|
3421
3749
|
});
|
|
3422
|
-
return c === "agent" ? /* @__PURE__ */
|
|
3750
|
+
return c === "agent" ? /* @__PURE__ */ C(Ie, { children: [
|
|
3423
3751
|
n,
|
|
3424
3752
|
t,
|
|
3425
3753
|
r
|
|
3426
|
-
] }) : /* @__PURE__ */
|
|
3427
|
-
/* @__PURE__ */ s("button", { type: "button", onClick: () =>
|
|
3428
|
-
/* @__PURE__ */
|
|
3429
|
-
/* @__PURE__ */
|
|
3754
|
+
] }) : /* @__PURE__ */ C("div", { ...h, ...q(f), children: [
|
|
3755
|
+
/* @__PURE__ */ s("button", { type: "button", onClick: () => d.current?.focus(), children: o }),
|
|
3756
|
+
/* @__PURE__ */ C("aside", { "aria-label": a, children: [
|
|
3757
|
+
/* @__PURE__ */ C("div", { children: [
|
|
3430
3758
|
n,
|
|
3431
3759
|
/* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(
|
|
3432
|
-
|
|
3760
|
+
Dn,
|
|
3433
3761
|
{
|
|
3434
3762
|
agentTool: !1,
|
|
3435
|
-
"aria-expanded":
|
|
3436
|
-
"aria-controls":
|
|
3437
|
-
onClick: () =>
|
|
3438
|
-
children:
|
|
3763
|
+
"aria-expanded": g,
|
|
3764
|
+
"aria-controls": m,
|
|
3765
|
+
onClick: () => p(!g),
|
|
3766
|
+
children: g ? l : i
|
|
3439
3767
|
}
|
|
3440
3768
|
) })
|
|
3441
3769
|
] }),
|
|
3442
|
-
/* @__PURE__ */ s("div", { id:
|
|
3770
|
+
/* @__PURE__ */ s("div", { id: m, onClick: A, children: t })
|
|
3443
3771
|
] }),
|
|
3444
|
-
/* @__PURE__ */ s("main", { ref:
|
|
3772
|
+
/* @__PURE__ */ s("main", { ref: d, tabIndex: -1, children: r })
|
|
3445
3773
|
] });
|
|
3446
3774
|
}
|
|
3447
|
-
const
|
|
3775
|
+
const ca = I({
|
|
3448
3776
|
name: "Stack",
|
|
3449
3777
|
category: "layout",
|
|
3450
3778
|
summary: "The one-dimensional layout primitive: a row, a column, or an auto-filling grid, with spacing drawn from the space scale. It renders a plain box and nothing else.",
|
|
@@ -3551,7 +3879,7 @@ const jn = I({
|
|
|
3551
3879
|
}
|
|
3552
3880
|
]
|
|
3553
3881
|
});
|
|
3554
|
-
function
|
|
3882
|
+
function ho(e) {
|
|
3555
3883
|
const {
|
|
3556
3884
|
direction: t = "column",
|
|
3557
3885
|
gap: n = "normal",
|
|
@@ -3560,18 +3888,18 @@ function ja(e) {
|
|
|
3560
3888
|
wrap: i = !1,
|
|
3561
3889
|
collapse: l = !1,
|
|
3562
3890
|
min: r,
|
|
3563
|
-
children:
|
|
3891
|
+
children: h,
|
|
3564
3892
|
style: c,
|
|
3565
|
-
...
|
|
3566
|
-
} = e,
|
|
3567
|
-
component:
|
|
3893
|
+
...g
|
|
3894
|
+
} = e, p = W(), m = E({
|
|
3895
|
+
component: ca.name,
|
|
3568
3896
|
state: { direction: t, gap: n, align: a, justify: o, wrap: i, collapse: l }
|
|
3569
3897
|
});
|
|
3570
|
-
if (
|
|
3571
|
-
const
|
|
3572
|
-
return /* @__PURE__ */ s("div", { ...
|
|
3898
|
+
if (p === "agent") return /* @__PURE__ */ s(Ie, { children: h });
|
|
3899
|
+
const d = r === void 0 ? c : { ...c, "--sprint-stack-min": r };
|
|
3900
|
+
return /* @__PURE__ */ s("div", { ...g, ...q(m), style: d, children: h });
|
|
3573
3901
|
}
|
|
3574
|
-
const
|
|
3902
|
+
const Ut = {
|
|
3575
3903
|
verb: "set",
|
|
3576
3904
|
description: "Switch this setting on or off by stating the end state, exactly as a person clicking it would. The change takes effect immediately. Setting the state it already has succeeds and changes nothing, so the call is safe to retry. Returns the switch's state after the call.",
|
|
3577
3905
|
inputSchema: {
|
|
@@ -3588,7 +3916,7 @@ const At = {
|
|
|
3588
3916
|
untrustedContent: !0,
|
|
3589
3917
|
registeredWhen: "The switch is mounted, enabled, has a resolvable label, and no other component claims the same tool name.",
|
|
3590
3918
|
unregisteredWhen: "The switch unmounts or becomes disabled."
|
|
3591
|
-
},
|
|
3919
|
+
}, rt = I({
|
|
3592
3920
|
name: "Switch",
|
|
3593
3921
|
category: "input",
|
|
3594
3922
|
summary: "An on/off setting that takes effect the moment it changes. It registers one set tool that takes the end state rather than toggling.",
|
|
@@ -3637,7 +3965,7 @@ const At = {
|
|
|
3637
3965
|
}
|
|
3638
3966
|
},
|
|
3639
3967
|
tools: {
|
|
3640
|
-
set:
|
|
3968
|
+
set: Ut
|
|
3641
3969
|
},
|
|
3642
3970
|
agentView: {
|
|
3643
3971
|
example: '- **Switch** "Live telemetry" [on] → tool `set-live-telemetry`'
|
|
@@ -3660,7 +3988,7 @@ const At = {
|
|
|
3660
3988
|
notes: "A button with role switch and aria-checked, so the label and state read together. The thumb moves by a single-axis stepped translation and respects prefers-reduced-motion."
|
|
3661
3989
|
}
|
|
3662
3990
|
});
|
|
3663
|
-
function
|
|
3991
|
+
function uo(e) {
|
|
3664
3992
|
const {
|
|
3665
3993
|
label: t,
|
|
3666
3994
|
on: n,
|
|
@@ -3669,62 +3997,62 @@ function Va(e) {
|
|
|
3669
3997
|
agentName: i,
|
|
3670
3998
|
agentTool: l = !0,
|
|
3671
3999
|
ref: r,
|
|
3672
|
-
...
|
|
3673
|
-
} = e, c =
|
|
3674
|
-
(
|
|
3675
|
-
|
|
4000
|
+
...h
|
|
4001
|
+
} = e, c = W(), g = Z(), p = Q(), m = b(null), d = F(
|
|
4002
|
+
(M) => {
|
|
4003
|
+
m.current = M, typeof r == "function" ? r(M) : r != null && (r.current = M);
|
|
3676
4004
|
},
|
|
3677
4005
|
[r]
|
|
3678
|
-
),
|
|
3679
|
-
|
|
3680
|
-
const f =
|
|
4006
|
+
), A = b(a);
|
|
4007
|
+
A.current = a;
|
|
4008
|
+
const f = b(n);
|
|
3681
4009
|
f.current = n;
|
|
3682
|
-
const
|
|
3683
|
-
|
|
3684
|
-
const
|
|
3685
|
-
|
|
4010
|
+
const v = b(p);
|
|
4011
|
+
v.current = p;
|
|
4012
|
+
const k = b(E({ component: rt.name })), T = b(!0);
|
|
4013
|
+
H(() => (T.current = !0, () => {
|
|
3686
4014
|
T.current = !1;
|
|
3687
4015
|
}), []);
|
|
3688
|
-
const
|
|
3689
|
-
const
|
|
3690
|
-
if (typeof
|
|
4016
|
+
const S = F(async (M) => {
|
|
4017
|
+
const L = M.on;
|
|
4018
|
+
if (typeof L != "boolean")
|
|
3691
4019
|
return 'Pass "on" as true or false; it states the end state.';
|
|
3692
|
-
const
|
|
3693
|
-
if (!
|
|
3694
|
-
const x =
|
|
3695
|
-
x !== null ? x.click() :
|
|
3696
|
-
}
|
|
3697
|
-
return await
|
|
3698
|
-
${
|
|
3699
|
-
}, []),
|
|
3700
|
-
spec:
|
|
4020
|
+
const w = L === f.current;
|
|
4021
|
+
if (!w) {
|
|
4022
|
+
const x = m.current;
|
|
4023
|
+
x !== null ? x.click() : te(() => A.current(L));
|
|
4024
|
+
}
|
|
4025
|
+
return await ee(), T.current ? `${w ? `Already ${L ? "on" : "off"}` : `Switched ${L ? "on" : "off"}`}. The switch is now:
|
|
4026
|
+
${v.current([k.current])}` : "The change removed this switch from the page.";
|
|
4027
|
+
}, []), P = X({
|
|
4028
|
+
spec: Ut,
|
|
3701
4029
|
label: i ?? t,
|
|
3702
4030
|
enabled: l && !o,
|
|
3703
|
-
execute:
|
|
3704
|
-
}),
|
|
3705
|
-
component:
|
|
4031
|
+
execute: S
|
|
4032
|
+
}), O = E({
|
|
4033
|
+
component: rt.name,
|
|
3706
4034
|
label: t,
|
|
3707
|
-
tool:
|
|
4035
|
+
tool: P,
|
|
3708
4036
|
state: { on: n, disabled: o }
|
|
3709
4037
|
});
|
|
3710
|
-
return
|
|
4038
|
+
return k.current = O, c === "agent" ? o || g === "never" ? /* @__PURE__ */ s(_, { node: O }) : /* @__PURE__ */ s(be, { node: O, ref: d, onClick: () => a(!n) }) : /* @__PURE__ */ C(
|
|
3711
4039
|
"button",
|
|
3712
4040
|
{
|
|
3713
|
-
...
|
|
3714
|
-
...
|
|
4041
|
+
...h,
|
|
4042
|
+
...q(O),
|
|
3715
4043
|
type: "button",
|
|
3716
4044
|
role: "switch",
|
|
3717
4045
|
"aria-checked": n,
|
|
3718
4046
|
disabled: o,
|
|
3719
|
-
ref:
|
|
4047
|
+
ref: d,
|
|
3720
4048
|
onClick: () => a(!n),
|
|
3721
4049
|
children: [
|
|
3722
4050
|
/* @__PURE__ */ s(
|
|
3723
4051
|
"span",
|
|
3724
4052
|
{
|
|
3725
|
-
...
|
|
4053
|
+
...D({ part: "track", state: {} }),
|
|
3726
4054
|
"aria-hidden": "true",
|
|
3727
|
-
children: /* @__PURE__ */ s("span", { ...
|
|
4055
|
+
children: /* @__PURE__ */ s("span", { ...D({ part: "thumb", state: {} }) })
|
|
3728
4056
|
}
|
|
3729
4057
|
),
|
|
3730
4058
|
t
|
|
@@ -3732,7 +4060,7 @@ ${b.current([w.current])}` : "The change removed this switch from the page.";
|
|
|
3732
4060
|
}
|
|
3733
4061
|
);
|
|
3734
4062
|
}
|
|
3735
|
-
const
|
|
4063
|
+
const da = I({
|
|
3736
4064
|
name: "Table",
|
|
3737
4065
|
category: "display",
|
|
3738
4066
|
summary: "A data grid built from columns and rows rather than from markup. In the agent stream it reads as a compact Markdown table; in the DOM each cell is addressable as a part carrying its column and row. On a narrow screen every row restacks into a labelled block instead of scrolling sideways.",
|
|
@@ -3823,40 +4151,40 @@ const Vn = I({
|
|
|
3823
4151
|
notes: "Column headers keep scope=col in every layout. On narrow screens each cell repeats its column header visually, marked aria-hidden so the real header association is not announced twice."
|
|
3824
4152
|
}
|
|
3825
4153
|
});
|
|
3826
|
-
function
|
|
4154
|
+
function Ue(e, t) {
|
|
3827
4155
|
return e.id ?? String(t + 1);
|
|
3828
4156
|
}
|
|
3829
|
-
function
|
|
4157
|
+
function It(e, t) {
|
|
3830
4158
|
return {
|
|
3831
4159
|
column: e.key,
|
|
3832
4160
|
row: t,
|
|
3833
4161
|
...e.align === void 0 ? {} : { align: e.align }
|
|
3834
4162
|
};
|
|
3835
4163
|
}
|
|
3836
|
-
function
|
|
4164
|
+
function ha(e, t) {
|
|
3837
4165
|
return t.flatMap(
|
|
3838
4166
|
(n, a) => e.map((o) => {
|
|
3839
|
-
const i =
|
|
4167
|
+
const i = J(n.cells[o.key]);
|
|
3840
4168
|
return {
|
|
3841
4169
|
part: "cell",
|
|
3842
|
-
state:
|
|
4170
|
+
state: It(o, Ue(n, a)),
|
|
3843
4171
|
...i === void 0 ? {} : { label: i }
|
|
3844
4172
|
};
|
|
3845
4173
|
})
|
|
3846
4174
|
);
|
|
3847
4175
|
}
|
|
3848
|
-
function
|
|
3849
|
-
const { label: t, columns: n, rows: a, emptyLabel: o = "No rows", ...i } = e, l =
|
|
3850
|
-
component:
|
|
4176
|
+
function po(e) {
|
|
4177
|
+
const { label: t, columns: n, rows: a, emptyLabel: o = "No rows", ...i } = e, l = W(), r = a.length === 0, h = E({
|
|
4178
|
+
component: da.name,
|
|
3851
4179
|
label: t,
|
|
3852
4180
|
state: {
|
|
3853
4181
|
columns: String(n.length),
|
|
3854
4182
|
rows: String(a.length),
|
|
3855
4183
|
empty: r
|
|
3856
4184
|
},
|
|
3857
|
-
parts:
|
|
4185
|
+
parts: ha(n, a)
|
|
3858
4186
|
});
|
|
3859
|
-
return l === "agent" ? /* @__PURE__ */ s(
|
|
4187
|
+
return l === "agent" ? /* @__PURE__ */ s(_, { node: Ct(h) }) : /* @__PURE__ */ C("table", { ...i, ...q(h), role: "table", "aria-label": t, children: [
|
|
3860
4188
|
/* @__PURE__ */ s("thead", { role: "rowgroup", children: /* @__PURE__ */ s("tr", { role: "row", children: n.map((c) => /* @__PURE__ */ s(
|
|
3861
4189
|
"th",
|
|
3862
4190
|
{
|
|
@@ -3868,24 +4196,24 @@ function Fa(e) {
|
|
|
3868
4196
|
},
|
|
3869
4197
|
c.key
|
|
3870
4198
|
)) }) }),
|
|
3871
|
-
/* @__PURE__ */ s("tbody", { role: "rowgroup", children: r ? /* @__PURE__ */ s("tr", { role: "row", children: /* @__PURE__ */ s("td", { role: "cell", colSpan: n.length, children: /* @__PURE__ */ s("span", { children: o }) }) }) : a.map((c,
|
|
4199
|
+
/* @__PURE__ */ s("tbody", { role: "rowgroup", children: r ? /* @__PURE__ */ s("tr", { role: "row", children: /* @__PURE__ */ s("td", { role: "cell", colSpan: n.length, children: /* @__PURE__ */ s("span", { children: o }) }) }) : a.map((c, g) => /* @__PURE__ */ s("tr", { role: "row", children: n.map((p) => /* @__PURE__ */ C(
|
|
3872
4200
|
"td",
|
|
3873
4201
|
{
|
|
3874
4202
|
role: "cell",
|
|
3875
|
-
...
|
|
4203
|
+
...D({
|
|
3876
4204
|
part: "cell",
|
|
3877
|
-
state:
|
|
4205
|
+
state: It(p, Ue(c, g))
|
|
3878
4206
|
}),
|
|
3879
4207
|
children: [
|
|
3880
|
-
/* @__PURE__ */ s("span", { "aria-hidden": "true", children:
|
|
3881
|
-
/* @__PURE__ */ s("div", { children: c.cells[
|
|
4208
|
+
/* @__PURE__ */ s("span", { "aria-hidden": "true", children: p.header }),
|
|
4209
|
+
/* @__PURE__ */ s("div", { children: c.cells[p.key] })
|
|
3882
4210
|
]
|
|
3883
4211
|
},
|
|
3884
|
-
|
|
3885
|
-
)) },
|
|
4212
|
+
p.key
|
|
4213
|
+
)) }, Ue(c, g))) })
|
|
3886
4214
|
] });
|
|
3887
4215
|
}
|
|
3888
|
-
const
|
|
4216
|
+
const ua = I({
|
|
3889
4217
|
name: "Tag",
|
|
3890
4218
|
category: "display",
|
|
3891
4219
|
summary: "A small chip that classifies the thing next to it: a status, a category, a count, a build string.",
|
|
@@ -3942,15 +4270,15 @@ const Hn = I({
|
|
|
3942
4270
|
}
|
|
3943
4271
|
]
|
|
3944
4272
|
});
|
|
3945
|
-
function
|
|
3946
|
-
const { tone: t = "neutral", filled: n = !1, children: a, ...o } = e, i =
|
|
3947
|
-
component:
|
|
3948
|
-
label:
|
|
4273
|
+
function go(e) {
|
|
4274
|
+
const { tone: t = "neutral", filled: n = !1, children: a, ...o } = e, i = W(), l = E({
|
|
4275
|
+
component: ua.name,
|
|
4276
|
+
label: J(a),
|
|
3949
4277
|
state: { tone: t, filled: n }
|
|
3950
4278
|
});
|
|
3951
|
-
return i === "agent" ? /* @__PURE__ */ s(
|
|
4279
|
+
return i === "agent" ? /* @__PURE__ */ s(_, { node: l }) : /* @__PURE__ */ s("span", { ...o, ...q(l), children: a });
|
|
3952
4280
|
}
|
|
3953
|
-
const
|
|
4281
|
+
const pa = I({
|
|
3954
4282
|
name: "Text",
|
|
3955
4283
|
category: "typography",
|
|
3956
4284
|
summary: "A run of prose, sized and toned from the semantic scale. In agent view it renders as its own text content, so an agent reads the words rather than inferring them from styling.",
|
|
@@ -4016,15 +4344,15 @@ const Gn = I({
|
|
|
4016
4344
|
}
|
|
4017
4345
|
]
|
|
4018
4346
|
});
|
|
4019
|
-
function
|
|
4020
|
-
const { tone: t = "default", size: n = "normal", as: a = "p", children: o, ...i } = e, l =
|
|
4021
|
-
component:
|
|
4022
|
-
label:
|
|
4347
|
+
function mo(e) {
|
|
4348
|
+
const { tone: t = "default", size: n = "normal", as: a = "p", children: o, ...i } = e, l = W(), r = E({
|
|
4349
|
+
component: pa.name,
|
|
4350
|
+
label: J(o),
|
|
4023
4351
|
state: { tone: t, size: n }
|
|
4024
4352
|
});
|
|
4025
|
-
return l === "agent" ? /* @__PURE__ */ s(
|
|
4353
|
+
return l === "agent" ? /* @__PURE__ */ s(_, { node: r }) : /* @__PURE__ */ s(a, { ...i, ...q(r), children: o });
|
|
4026
4354
|
}
|
|
4027
|
-
const
|
|
4355
|
+
const Wt = {
|
|
4028
4356
|
verb: "fill",
|
|
4029
4357
|
description: "Replace this text area's content with the value provided, exactly as a person typing it would. The value is the full text it ends up containing, line breaks included; pass an empty string to clear it. Returns the area's state after the change, so a follow-up read is unnecessary.",
|
|
4030
4358
|
inputSchema: {
|
|
@@ -4041,7 +4369,7 @@ const St = {
|
|
|
4041
4369
|
untrustedContent: !0,
|
|
4042
4370
|
registeredWhen: "The area is mounted, enabled, has a resolvable label, and no other component claims the same tool name.",
|
|
4043
4371
|
unregisteredWhen: "The area unmounts or becomes disabled."
|
|
4044
|
-
},
|
|
4372
|
+
}, st = I({
|
|
4045
4373
|
name: "Textarea",
|
|
4046
4374
|
category: "input",
|
|
4047
4375
|
summary: "A multi-line text area carrying its own label, hint, and error. Fully controlled, and it registers one fill tool that replaces the whole content with an explicit value, line breaks included.",
|
|
@@ -4128,7 +4456,7 @@ const St = {
|
|
|
4128
4456
|
}
|
|
4129
4457
|
},
|
|
4130
4458
|
tools: {
|
|
4131
|
-
fill:
|
|
4459
|
+
fill: Wt
|
|
4132
4460
|
},
|
|
4133
4461
|
agentView: {
|
|
4134
4462
|
example: '- **Textarea** "Mission notes" [empty] → tool `fill-mission-notes`\n - part `hint` "What the relief crew needs to know"'
|
|
@@ -4163,10 +4491,10 @@ const St = {
|
|
|
4163
4491
|
notes: "The label element is associated via htmlFor. An error sets aria-invalid and is linked with aria-describedby, as is the hint."
|
|
4164
4492
|
}
|
|
4165
4493
|
});
|
|
4166
|
-
function
|
|
4494
|
+
function ga(e, t) {
|
|
4167
4495
|
return e !== void 0 ? [{ part: "error", label: e, state: {} }] : t !== void 0 ? [{ part: "hint", label: t, state: {} }] : [];
|
|
4168
4496
|
}
|
|
4169
|
-
function
|
|
4497
|
+
function fo(e) {
|
|
4170
4498
|
const {
|
|
4171
4499
|
label: t,
|
|
4172
4500
|
value: n,
|
|
@@ -4175,84 +4503,84 @@ function Ka(e) {
|
|
|
4175
4503
|
placeholder: i,
|
|
4176
4504
|
hint: l,
|
|
4177
4505
|
error: r,
|
|
4178
|
-
name:
|
|
4506
|
+
name: h,
|
|
4179
4507
|
disabled: c = !1,
|
|
4180
|
-
required:
|
|
4181
|
-
agentName:
|
|
4182
|
-
agentTool:
|
|
4183
|
-
...
|
|
4184
|
-
} = e,
|
|
4185
|
-
|
|
4186
|
-
const
|
|
4187
|
-
|
|
4188
|
-
const
|
|
4189
|
-
|
|
4190
|
-
|
|
4508
|
+
required: g = !1,
|
|
4509
|
+
agentName: p,
|
|
4510
|
+
agentTool: m = !0,
|
|
4511
|
+
...d
|
|
4512
|
+
} = e, A = W(), f = Z(), v = Q(), k = pe(), T = b(null), S = b(a);
|
|
4513
|
+
S.current = a;
|
|
4514
|
+
const P = b(v);
|
|
4515
|
+
P.current = v;
|
|
4516
|
+
const O = b(E({ component: st.name })), M = b(!0);
|
|
4517
|
+
H(() => (M.current = !0, () => {
|
|
4518
|
+
M.current = !1;
|
|
4191
4519
|
}), []);
|
|
4192
|
-
const
|
|
4193
|
-
const
|
|
4194
|
-
if (typeof
|
|
4520
|
+
const L = F(async (R) => {
|
|
4521
|
+
const $ = R.value;
|
|
4522
|
+
if (typeof $ != "string")
|
|
4195
4523
|
return 'Pass "value" as a string holding the full text the area should contain.';
|
|
4196
|
-
const
|
|
4197
|
-
return
|
|
4198
|
-
${
|
|
4199
|
-
}, []),
|
|
4200
|
-
spec:
|
|
4201
|
-
label:
|
|
4202
|
-
enabled:
|
|
4203
|
-
execute:
|
|
4204
|
-
}),
|
|
4205
|
-
component:
|
|
4524
|
+
const N = T.current;
|
|
4525
|
+
return N !== null ? qt(N, $) : te(() => S.current($)), await ee(), M.current ? `Filled. The area is now:
|
|
4526
|
+
${P.current([O.current])}` : "The change removed this area from the page.";
|
|
4527
|
+
}, []), w = X({
|
|
4528
|
+
spec: Wt,
|
|
4529
|
+
label: p ?? t,
|
|
4530
|
+
enabled: m && !c,
|
|
4531
|
+
execute: L
|
|
4532
|
+
}), y = E({
|
|
4533
|
+
component: st.name,
|
|
4206
4534
|
label: t,
|
|
4207
|
-
tool:
|
|
4535
|
+
tool: w,
|
|
4208
4536
|
state: {
|
|
4209
4537
|
...n === "" ? {} : { value: n },
|
|
4210
4538
|
empty: n === "",
|
|
4211
4539
|
disabled: c,
|
|
4212
|
-
required:
|
|
4540
|
+
required: g,
|
|
4213
4541
|
invalid: r !== void 0
|
|
4214
4542
|
},
|
|
4215
|
-
parts:
|
|
4543
|
+
parts: ga(r, l)
|
|
4216
4544
|
});
|
|
4217
|
-
if (
|
|
4218
|
-
return c || f === "never" ? /* @__PURE__ */ s(
|
|
4219
|
-
|
|
4545
|
+
if (O.current = y, A === "agent")
|
|
4546
|
+
return c || f === "never" ? /* @__PURE__ */ s(_, { node: y }) : /* @__PURE__ */ s(
|
|
4547
|
+
At,
|
|
4220
4548
|
{
|
|
4221
|
-
node:
|
|
4549
|
+
node: y,
|
|
4222
4550
|
value: n,
|
|
4223
4551
|
multiline: !0,
|
|
4224
4552
|
onValueChange: a,
|
|
4225
|
-
ref: (
|
|
4226
|
-
T.current =
|
|
4553
|
+
ref: (R) => {
|
|
4554
|
+
T.current = R;
|
|
4227
4555
|
}
|
|
4228
4556
|
}
|
|
4229
4557
|
);
|
|
4230
|
-
const x = r !== void 0 ? `${
|
|
4231
|
-
return /* @__PURE__ */
|
|
4232
|
-
/* @__PURE__ */ s("label", { htmlFor:
|
|
4558
|
+
const x = r !== void 0 ? `${k}-error` : l !== void 0 ? `${k}-hint` : void 0;
|
|
4559
|
+
return /* @__PURE__ */ C("div", { ...d, ...q(y), children: [
|
|
4560
|
+
/* @__PURE__ */ s("label", { htmlFor: k, children: t }),
|
|
4233
4561
|
/* @__PURE__ */ s(
|
|
4234
4562
|
"textarea",
|
|
4235
4563
|
{
|
|
4236
|
-
id:
|
|
4237
|
-
...
|
|
4238
|
-
ref: (
|
|
4239
|
-
T.current =
|
|
4564
|
+
id: k,
|
|
4565
|
+
...D({ part: "input", state: {} }),
|
|
4566
|
+
ref: (R) => {
|
|
4567
|
+
T.current = R;
|
|
4240
4568
|
},
|
|
4241
4569
|
rows: o,
|
|
4242
4570
|
value: n,
|
|
4243
4571
|
placeholder: i,
|
|
4244
|
-
name:
|
|
4572
|
+
name: h,
|
|
4245
4573
|
disabled: c,
|
|
4246
|
-
required:
|
|
4574
|
+
required: g,
|
|
4247
4575
|
"aria-invalid": r !== void 0 || void 0,
|
|
4248
4576
|
"aria-describedby": x,
|
|
4249
|
-
onChange: (
|
|
4577
|
+
onChange: (R) => a(R.currentTarget.value)
|
|
4250
4578
|
}
|
|
4251
4579
|
),
|
|
4252
|
-
r !== void 0 ? /* @__PURE__ */ s("p", { id: x, ...
|
|
4580
|
+
r !== void 0 ? /* @__PURE__ */ s("p", { id: x, ...D({ part: "error", state: {} }), children: r }) : l !== void 0 ? /* @__PURE__ */ s("p", { id: x, ...D({ part: "hint", state: {} }), children: l }) : null
|
|
4253
4581
|
] });
|
|
4254
4582
|
}
|
|
4255
|
-
const
|
|
4583
|
+
const Bt = {
|
|
4256
4584
|
verb: "fill",
|
|
4257
4585
|
description: "Replace this field's text with the value provided, exactly as a person typing it would. The value is the full text the field ends up containing; pass an empty string to clear it. Returns the field's state after the change, so a follow-up read is unnecessary.",
|
|
4258
4586
|
inputSchema: {
|
|
@@ -4269,7 +4597,7 @@ const Pt = {
|
|
|
4269
4597
|
untrustedContent: !0,
|
|
4270
4598
|
registeredWhen: "The field is mounted, enabled, has a resolvable label, and no other component claims the same tool name.",
|
|
4271
4599
|
unregisteredWhen: "The field unmounts or becomes disabled."
|
|
4272
|
-
},
|
|
4600
|
+
}, lt = I({
|
|
4273
4601
|
name: "TextInput",
|
|
4274
4602
|
category: "input",
|
|
4275
4603
|
summary: "A single-line text field carrying its own label, hint, and error. Fully controlled, and it registers one fill tool that replaces the field's text with an explicit value.",
|
|
@@ -4365,7 +4693,7 @@ const Pt = {
|
|
|
4365
4693
|
}
|
|
4366
4694
|
},
|
|
4367
4695
|
tools: {
|
|
4368
|
-
fill:
|
|
4696
|
+
fill: Bt
|
|
4369
4697
|
},
|
|
4370
4698
|
agentView: {
|
|
4371
4699
|
example: '- **TextInput** "Callsign" [empty, required] → tool `fill-callsign`\n - part `hint` "Uppercase, three to eight letters"'
|
|
@@ -4411,10 +4739,10 @@ const Pt = {
|
|
|
4411
4739
|
notes: "The label element is associated via htmlFor. An error sets aria-invalid and is linked with aria-describedby, as is the hint. Focus is an offset keyline, never a rounded ring."
|
|
4412
4740
|
}
|
|
4413
4741
|
});
|
|
4414
|
-
function
|
|
4742
|
+
function ma(e, t) {
|
|
4415
4743
|
return e !== void 0 ? [{ part: "error", label: e, state: {} }] : t !== void 0 ? [{ part: "hint", label: t, state: {} }] : [];
|
|
4416
4744
|
}
|
|
4417
|
-
function
|
|
4745
|
+
function bo(e) {
|
|
4418
4746
|
const {
|
|
4419
4747
|
label: t,
|
|
4420
4748
|
value: n,
|
|
@@ -4423,115 +4751,115 @@ function za(e) {
|
|
|
4423
4751
|
placeholder: i,
|
|
4424
4752
|
hint: l,
|
|
4425
4753
|
error: r,
|
|
4426
|
-
name:
|
|
4754
|
+
name: h,
|
|
4427
4755
|
autoComplete: c,
|
|
4428
|
-
disabled:
|
|
4429
|
-
required:
|
|
4430
|
-
agentName:
|
|
4431
|
-
agentTool:
|
|
4432
|
-
...
|
|
4433
|
-
} = e, f =
|
|
4434
|
-
|
|
4435
|
-
const
|
|
4436
|
-
|
|
4437
|
-
const
|
|
4438
|
-
|
|
4439
|
-
|
|
4756
|
+
disabled: g = !1,
|
|
4757
|
+
required: p = !1,
|
|
4758
|
+
agentName: m,
|
|
4759
|
+
agentTool: d = !0,
|
|
4760
|
+
...A
|
|
4761
|
+
} = e, f = W(), v = Z(), k = Q(), T = pe(), S = b(null), P = b(a);
|
|
4762
|
+
P.current = a;
|
|
4763
|
+
const O = b(k);
|
|
4764
|
+
O.current = k;
|
|
4765
|
+
const M = b(E({ component: lt.name })), L = b(!0);
|
|
4766
|
+
H(() => (L.current = !0, () => {
|
|
4767
|
+
L.current = !1;
|
|
4440
4768
|
}), []);
|
|
4441
|
-
const
|
|
4442
|
-
const
|
|
4443
|
-
if (typeof
|
|
4769
|
+
const w = o === "password", y = F(async (N) => {
|
|
4770
|
+
const V = N.value;
|
|
4771
|
+
if (typeof V != "string")
|
|
4444
4772
|
return 'Pass "value" as a string holding the full text the field should contain.';
|
|
4445
|
-
const
|
|
4446
|
-
return
|
|
4447
|
-
${
|
|
4448
|
-
}, []), x =
|
|
4449
|
-
spec:
|
|
4450
|
-
label:
|
|
4451
|
-
enabled:
|
|
4452
|
-
execute:
|
|
4453
|
-
}),
|
|
4454
|
-
component:
|
|
4773
|
+
const K = S.current;
|
|
4774
|
+
return K !== null ? qt(K, V) : te(() => P.current(V)), await ee(), L.current ? `Filled. The field is now:
|
|
4775
|
+
${O.current([M.current])}` : "The change removed this field from the page.";
|
|
4776
|
+
}, []), x = X({
|
|
4777
|
+
spec: Bt,
|
|
4778
|
+
label: m ?? t,
|
|
4779
|
+
enabled: d && !g,
|
|
4780
|
+
execute: y
|
|
4781
|
+
}), R = E({
|
|
4782
|
+
component: lt.name,
|
|
4455
4783
|
label: t,
|
|
4456
4784
|
tool: x,
|
|
4457
4785
|
state: {
|
|
4458
|
-
...
|
|
4786
|
+
...w ? { filled: n !== "" } : n === "" ? {} : { value: n },
|
|
4459
4787
|
empty: n === "",
|
|
4460
|
-
disabled:
|
|
4461
|
-
required:
|
|
4788
|
+
disabled: g,
|
|
4789
|
+
required: p,
|
|
4462
4790
|
invalid: r !== void 0
|
|
4463
4791
|
},
|
|
4464
|
-
parts:
|
|
4792
|
+
parts: ma(r, l)
|
|
4465
4793
|
});
|
|
4466
|
-
if (
|
|
4467
|
-
return
|
|
4468
|
-
|
|
4794
|
+
if (M.current = R, f === "agent")
|
|
4795
|
+
return g || v === "never" ? /* @__PURE__ */ s(_, { node: R }) : /* @__PURE__ */ s(
|
|
4796
|
+
At,
|
|
4469
4797
|
{
|
|
4470
|
-
node:
|
|
4798
|
+
node: R,
|
|
4471
4799
|
value: n,
|
|
4472
|
-
masked:
|
|
4800
|
+
masked: w,
|
|
4473
4801
|
onValueChange: a,
|
|
4474
|
-
ref: (
|
|
4475
|
-
|
|
4802
|
+
ref: (N) => {
|
|
4803
|
+
S.current = N;
|
|
4476
4804
|
}
|
|
4477
4805
|
}
|
|
4478
4806
|
);
|
|
4479
|
-
const
|
|
4480
|
-
return /* @__PURE__ */
|
|
4807
|
+
const $ = r !== void 0 ? `${T}-error` : l !== void 0 ? `${T}-hint` : void 0;
|
|
4808
|
+
return /* @__PURE__ */ C("div", { ...A, ...q(R), children: [
|
|
4481
4809
|
/* @__PURE__ */ s("label", { htmlFor: T, children: t }),
|
|
4482
4810
|
/* @__PURE__ */ s(
|
|
4483
4811
|
"input",
|
|
4484
4812
|
{
|
|
4485
4813
|
id: T,
|
|
4486
|
-
...
|
|
4487
|
-
ref: (
|
|
4488
|
-
|
|
4814
|
+
...D({ part: "input", state: {} }),
|
|
4815
|
+
ref: (N) => {
|
|
4816
|
+
S.current = N;
|
|
4489
4817
|
},
|
|
4490
4818
|
type: o,
|
|
4491
4819
|
value: n,
|
|
4492
4820
|
placeholder: i,
|
|
4493
|
-
name:
|
|
4821
|
+
name: h,
|
|
4494
4822
|
autoComplete: c,
|
|
4495
|
-
disabled:
|
|
4496
|
-
required:
|
|
4823
|
+
disabled: g,
|
|
4824
|
+
required: p,
|
|
4497
4825
|
"aria-invalid": r !== void 0 || void 0,
|
|
4498
|
-
"aria-describedby":
|
|
4499
|
-
onChange: (
|
|
4826
|
+
"aria-describedby": $,
|
|
4827
|
+
onChange: (N) => a(N.currentTarget.value)
|
|
4500
4828
|
}
|
|
4501
4829
|
),
|
|
4502
|
-
r !== void 0 ? /* @__PURE__ */ s("p", { id:
|
|
4830
|
+
r !== void 0 ? /* @__PURE__ */ s("p", { id: $, ...D({ part: "error", state: {} }), children: r }) : l !== void 0 ? /* @__PURE__ */ s("p", { id: $, ...D({ part: "hint", state: {} }), children: l }) : null
|
|
4503
4831
|
] });
|
|
4504
4832
|
}
|
|
4505
|
-
const
|
|
4506
|
-
function
|
|
4507
|
-
const t = e.label === void 0 ? "" :
|
|
4833
|
+
const je = 40;
|
|
4834
|
+
function fa(e) {
|
|
4835
|
+
const t = e.label === void 0 ? "" : ie(e.label), n = t === "" ? ie(e.component) : `${ie(e.component)}-${t}`;
|
|
4508
4836
|
return n === "" ? "region" : n;
|
|
4509
4837
|
}
|
|
4510
|
-
function
|
|
4838
|
+
function ba(e) {
|
|
4511
4839
|
const t = /* @__PURE__ */ new Map();
|
|
4512
4840
|
return e.map((n) => {
|
|
4513
|
-
const a =
|
|
4841
|
+
const a = fa(n), o = t.get(a) ?? 0;
|
|
4514
4842
|
return t.set(a, o + 1), { key: o === 0 ? a : `${a}-${o + 1}`, node: n };
|
|
4515
4843
|
});
|
|
4516
4844
|
}
|
|
4517
|
-
function
|
|
4845
|
+
function _t() {
|
|
4518
4846
|
if (typeof document > "u") return [];
|
|
4519
|
-
const e = document.body, t = new Set(
|
|
4847
|
+
const e = document.body, t = new Set(Pt(e)), n = Array.from(e.querySelectorAll(`[${Be}]`)).filter(
|
|
4520
4848
|
(a) => !t.has(a)
|
|
4521
4849
|
);
|
|
4522
|
-
return
|
|
4523
|
-
...
|
|
4524
|
-
...n.map((a) =>
|
|
4850
|
+
return ba([
|
|
4851
|
+
...Pn(e),
|
|
4852
|
+
...n.map((a) => _e(a)).filter((a) => a !== null)
|
|
4525
4853
|
]);
|
|
4526
4854
|
}
|
|
4527
|
-
const
|
|
4855
|
+
const va = {
|
|
4528
4856
|
verb: "list",
|
|
4529
4857
|
description: "List the Sprint component regions on this page, with a one-line state summary for each. Call this first to discover region keys, then call read-region to read one in full. Regions nest: a page-level region contains the labelled panels listed after it, so read the smallest region that covers what you need.",
|
|
4530
4858
|
inputSchema: { type: "object", properties: {} },
|
|
4531
4859
|
readOnly: !0,
|
|
4532
4860
|
untrustedContent: !0,
|
|
4533
4861
|
registeredWhen: "A root SprintProvider is mounted and WebMCP is available."
|
|
4534
|
-
},
|
|
4862
|
+
}, wa = {
|
|
4535
4863
|
verb: "read",
|
|
4536
4864
|
description: "Read one region of the page as Markdown, including every component in it, its current state, and the tools that drive it. Long regions are paginated; the response ends with the page number and total.",
|
|
4537
4865
|
inputSchema: {
|
|
@@ -4553,27 +4881,27 @@ const Jn = {
|
|
|
4553
4881
|
untrustedContent: !0,
|
|
4554
4882
|
registeredWhen: "A root SprintProvider is mounted and WebMCP is available."
|
|
4555
4883
|
};
|
|
4556
|
-
function
|
|
4557
|
-
const t =
|
|
4884
|
+
function ya(e) {
|
|
4885
|
+
const t = _t();
|
|
4558
4886
|
if (t.length === 0) return "This page has no Sprint components.";
|
|
4559
4887
|
const n = t.map(({ key: a, node: o }) => {
|
|
4560
|
-
const i =
|
|
4888
|
+
const i = ft(o.children), l = e([{ ...o, children: [], parts: [] }]).split(`
|
|
4561
4889
|
`)[0]?.replace(/^-\s*/, ""), r = i === 0 ? "" : ` (${i} nested)`;
|
|
4562
4890
|
return `- \`${a}\` — ${l ?? o.component}${r}`;
|
|
4563
4891
|
});
|
|
4564
4892
|
return [`${t.length} region(s):`, ...n].join(`
|
|
4565
4893
|
`);
|
|
4566
4894
|
}
|
|
4567
|
-
function
|
|
4568
|
-
const a =
|
|
4895
|
+
function ka(e, t, n) {
|
|
4896
|
+
const a = _t(), o = a.map((h) => h.key), i = a.find((h) => h.key === t);
|
|
4569
4897
|
if (i === void 0)
|
|
4570
4898
|
return `No region named "${String(t)}". Available regions: ${o.join(", ") || "none"}.`;
|
|
4571
|
-
const l =
|
|
4899
|
+
const l = gt(e([i.node]), se - je), r = typeof n == "number" ? n : 1;
|
|
4572
4900
|
return r < 1 || r > l.length ? `Region "${i.key}" has ${l.length} page(s); page ${r} does not exist.` : `${l[r - 1] ?? ""}
|
|
4573
4901
|
|
|
4574
4902
|
(page ${r} of ${l.length})`;
|
|
4575
4903
|
}
|
|
4576
|
-
const
|
|
4904
|
+
const Ta = {
|
|
4577
4905
|
verb: "set",
|
|
4578
4906
|
description: 'Switch how this page renders. In "agent" view every Sprint component renders as plain Markdown text with no HTML elements, so the page can be read directly. In "human" view it renders normally. Tools keep working in both.',
|
|
4579
4907
|
inputSchema: {
|
|
@@ -4591,86 +4919,86 @@ const ta = {
|
|
|
4591
4919
|
untrustedContent: !0,
|
|
4592
4920
|
registeredWhen: "A root SprintProvider is mounted and WebMCP is available."
|
|
4593
4921
|
};
|
|
4594
|
-
function
|
|
4922
|
+
function jt() {
|
|
4595
4923
|
return typeof document > "u" ? "" : (document.body.textContent ?? "").replace(/\n{3,}/g, `
|
|
4596
4924
|
|
|
4597
4925
|
`).trim();
|
|
4598
4926
|
}
|
|
4599
|
-
function
|
|
4927
|
+
function xa(e) {
|
|
4600
4928
|
const { enabled: t, format: n, view: a, setView: o } = e;
|
|
4601
|
-
|
|
4602
|
-
spec:
|
|
4929
|
+
X({
|
|
4930
|
+
spec: va,
|
|
4603
4931
|
label: "page regions",
|
|
4604
4932
|
enabled: t,
|
|
4605
|
-
execute: () => a === "agent" ? 'This page is in agent view and renders as one text document. Call read-region with region "page", or read the page text directly.' :
|
|
4606
|
-
}),
|
|
4607
|
-
spec:
|
|
4933
|
+
execute: () => a === "agent" ? 'This page is in agent view and renders as one text document. Call read-region with region "page", or read the page text directly.' : ya(n)
|
|
4934
|
+
}), X({
|
|
4935
|
+
spec: wa,
|
|
4608
4936
|
label: "region",
|
|
4609
4937
|
enabled: t,
|
|
4610
|
-
execute: (i) => a === "agent" ?
|
|
4611
|
-
}),
|
|
4612
|
-
spec:
|
|
4938
|
+
execute: (i) => a === "agent" ? Aa(i.region, i.page) : ka(n, i.region, i.page)
|
|
4939
|
+
}), X({
|
|
4940
|
+
spec: Ta,
|
|
4613
4941
|
label: "page view",
|
|
4614
4942
|
enabled: t,
|
|
4615
4943
|
execute: async (i) => {
|
|
4616
4944
|
const l = i.view === "agent" ? "agent" : "human";
|
|
4617
|
-
return
|
|
4945
|
+
return te(() => o(l)), await ee(), l === "agent" ? `Page is now in agent view:
|
|
4618
4946
|
|
|
4619
|
-
${
|
|
4947
|
+
${Me(jt(), se - je)}` : "Page is now in human view.";
|
|
4620
4948
|
}
|
|
4621
4949
|
});
|
|
4622
4950
|
}
|
|
4623
|
-
function
|
|
4951
|
+
function Aa(e, t) {
|
|
4624
4952
|
if (e !== "page")
|
|
4625
4953
|
return `No region named "${String(e)}". In agent view the whole page is one region, named "page".`;
|
|
4626
|
-
const n =
|
|
4954
|
+
const n = gt(jt(), se - je), a = typeof t == "number" ? t : 1;
|
|
4627
4955
|
return a < 1 || a > n.length ? `Region "page" has ${n.length} page(s); page ${a} does not exist.` : `${n[a - 1] ?? ""}
|
|
4628
4956
|
|
|
4629
4957
|
(page ${a} of ${n.length})`;
|
|
4630
4958
|
}
|
|
4631
|
-
const
|
|
4632
|
-
function
|
|
4959
|
+
const Vt = "--sprint-gloss-x", Ft = "--sprint-gloss-fade", Ht = "--sprint-cast-shift", Ca = 22, Sa = 78, Na = 28, Pa = 0.25, ct = (e, t, n) => Math.min(n, Math.max(t, e));
|
|
4960
|
+
function La() {
|
|
4633
4961
|
return typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
4634
4962
|
}
|
|
4635
|
-
const
|
|
4963
|
+
const Ra = /* @__PURE__ */ new Set([
|
|
4636
4964
|
"Button",
|
|
4637
4965
|
"Card",
|
|
4638
4966
|
"Tag",
|
|
4639
4967
|
"SegmentedControl",
|
|
4640
4968
|
"Switch",
|
|
4641
4969
|
"Shell"
|
|
4642
|
-
]),
|
|
4643
|
-
function
|
|
4970
|
+
]), $a = /* @__PURE__ */ new Set(["option", "thumb"]);
|
|
4971
|
+
function Oa(e, t) {
|
|
4644
4972
|
const n = e.closest("[data-sprint-part]");
|
|
4645
4973
|
if (n === null || !t.contains(n)) return null;
|
|
4646
4974
|
const a = n.dataset.sprintPart;
|
|
4647
|
-
return a !== void 0 &&
|
|
4975
|
+
return a !== void 0 && $a.has(a) ? n : null;
|
|
4648
4976
|
}
|
|
4649
|
-
function
|
|
4977
|
+
function Gt(e) {
|
|
4650
4978
|
if (!(e instanceof Element)) return null;
|
|
4651
4979
|
const t = e.closest("[data-sprint]");
|
|
4652
4980
|
if (t === null) return null;
|
|
4653
4981
|
const n = t.dataset.sprint;
|
|
4654
|
-
return n === void 0 || !
|
|
4982
|
+
return n === void 0 || !Ra.has(n) ? null : Oa(e, t) ?? t;
|
|
4655
4983
|
}
|
|
4656
|
-
function
|
|
4657
|
-
if (e.pointerType === "touch" ||
|
|
4658
|
-
const t =
|
|
4984
|
+
function Da(e) {
|
|
4985
|
+
if (e.pointerType === "touch" || La()) return;
|
|
4986
|
+
const t = Gt(e.target);
|
|
4659
4987
|
if (t === null) return;
|
|
4660
4988
|
const n = t.getBoundingClientRect();
|
|
4661
4989
|
if (n.width === 0 || n.height === 0) return;
|
|
4662
|
-
const a =
|
|
4663
|
-
t.style.setProperty(
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
), t.style.setProperty(
|
|
4990
|
+
const a = ct((e.clientX - n.left) / n.width * 100, Ca, Sa), o = (a - 50) / Na;
|
|
4991
|
+
t.style.setProperty(Vt, `${a.toFixed(1)}%`), t.style.setProperty(
|
|
4992
|
+
Ft,
|
|
4993
|
+
ct(1 - Math.abs(o), Pa, 1).toFixed(3)
|
|
4994
|
+
), t.style.setProperty(Ht, `${(o * -10).toFixed(1)}px`);
|
|
4667
4995
|
}
|
|
4668
|
-
function
|
|
4669
|
-
const t =
|
|
4670
|
-
t !== null && (t.style.removeProperty(
|
|
4996
|
+
function Ea(e) {
|
|
4997
|
+
const t = Gt(e.target);
|
|
4998
|
+
t !== null && (t.style.removeProperty(Vt), t.style.removeProperty(Ft), t.style.removeProperty(Ht), t.style.length === 0 && t.removeAttribute("style"));
|
|
4671
4999
|
}
|
|
4672
|
-
const
|
|
4673
|
-
function
|
|
5000
|
+
const Ma = 1200;
|
|
5001
|
+
function vo(e) {
|
|
4674
5002
|
const {
|
|
4675
5003
|
children: t,
|
|
4676
5004
|
label: n,
|
|
@@ -4679,198 +5007,200 @@ function Xa(e) {
|
|
|
4679
5007
|
view: i,
|
|
4680
5008
|
defaultView: l,
|
|
4681
5009
|
onViewChange: r,
|
|
4682
|
-
agentControls:
|
|
5010
|
+
agentControls: h,
|
|
4683
5011
|
theme: c
|
|
4684
|
-
} = e,
|
|
4685
|
-
(
|
|
4686
|
-
if (!
|
|
4687
|
-
|
|
5012
|
+
} = e, g = Ne(), p = vn(), m = !p.owned, [d, A] = Y(l ?? "human"), f = i !== void 0, v = f || m || l !== void 0, k = f ? i : v ? d : p.view, T = F(
|
|
5013
|
+
($) => {
|
|
5014
|
+
if (!v) {
|
|
5015
|
+
p.setView($);
|
|
4688
5016
|
return;
|
|
4689
5017
|
}
|
|
4690
|
-
f ||
|
|
4691
|
-
},
|
|
4692
|
-
[
|
|
4693
|
-
),
|
|
4694
|
-
() => ({ view:
|
|
4695
|
-
[
|
|
4696
|
-
),
|
|
4697
|
-
() => ({ path: n === void 0 ?
|
|
4698
|
-
[
|
|
5018
|
+
f || A($), r?.($);
|
|
5019
|
+
},
|
|
5020
|
+
[v, f, p, r]
|
|
5021
|
+
), S = h ?? p.controls, P = a ?? p.format ?? kt, O = re(
|
|
5022
|
+
() => ({ view: k, setView: T, controls: S, format: P, owned: v }),
|
|
5023
|
+
[k, T, S, P, v]
|
|
5024
|
+
), M = re(
|
|
5025
|
+
() => ({ path: n === void 0 ? g : [...g, n] }),
|
|
5026
|
+
[g, n]
|
|
4699
5027
|
);
|
|
4700
|
-
|
|
4701
|
-
enabled:
|
|
4702
|
-
format:
|
|
4703
|
-
view:
|
|
5028
|
+
xa({
|
|
5029
|
+
enabled: m && o,
|
|
5030
|
+
format: P,
|
|
5031
|
+
view: k,
|
|
4704
5032
|
setView: T
|
|
4705
5033
|
});
|
|
4706
|
-
const
|
|
4707
|
-
|
|
4708
|
-
if (!
|
|
4709
|
-
const
|
|
4710
|
-
return () => clearTimeout(
|
|
4711
|
-
}, [
|
|
5034
|
+
const L = b(null), [w, y] = Y(!1);
|
|
5035
|
+
H(() => {
|
|
5036
|
+
if (!w) return;
|
|
5037
|
+
const $ = setTimeout(() => y(!1), Ma);
|
|
5038
|
+
return () => clearTimeout($);
|
|
5039
|
+
}, [w]);
|
|
4712
5040
|
const x = () => {
|
|
4713
|
-
const
|
|
4714
|
-
if (
|
|
4715
|
-
const
|
|
5041
|
+
const $ = navigator.clipboard;
|
|
5042
|
+
if ($ === void 0) return;
|
|
5043
|
+
const N = (L.current?.textContent ?? "").replace(/\n{3,}/g, `
|
|
4716
5044
|
|
|
4717
5045
|
`).trim();
|
|
4718
|
-
|
|
4719
|
-
() =>
|
|
4720
|
-
() =>
|
|
5046
|
+
$.writeText(N).then(
|
|
5047
|
+
() => y(!0),
|
|
5048
|
+
() => y(!1)
|
|
4721
5049
|
);
|
|
4722
5050
|
};
|
|
4723
|
-
return /* @__PURE__ */ s(
|
|
4724
|
-
|
|
5051
|
+
return /* @__PURE__ */ s(bn, { value: O, children: /* @__PURE__ */ C(Te, { value: M, children: [
|
|
5052
|
+
v && k === "agent" && S !== "never" ? /* @__PURE__ */ s(
|
|
4725
5053
|
"button",
|
|
4726
5054
|
{
|
|
4727
5055
|
type: "button",
|
|
4728
|
-
"aria-label":
|
|
4729
|
-
[
|
|
4730
|
-
...
|
|
5056
|
+
"aria-label": w ? "Copied" : "Copy agent view",
|
|
5057
|
+
[nn]: "",
|
|
5058
|
+
...w ? { "data-sprint-copied": "" } : {},
|
|
4731
5059
|
onClick: x
|
|
4732
5060
|
}
|
|
4733
5061
|
) : null,
|
|
4734
5062
|
/* @__PURE__ */ s(
|
|
4735
5063
|
"div",
|
|
4736
5064
|
{
|
|
4737
|
-
ref:
|
|
4738
|
-
onPointerMove:
|
|
4739
|
-
onPointerOut:
|
|
4740
|
-
[
|
|
4741
|
-
...c === void 0 ? {} : { [
|
|
5065
|
+
ref: L,
|
|
5066
|
+
onPointerMove: k === "agent" ? void 0 : Da,
|
|
5067
|
+
onPointerOut: k === "agent" ? void 0 : Ea,
|
|
5068
|
+
[tn]: k,
|
|
5069
|
+
...c === void 0 ? {} : { [an]: c },
|
|
4742
5070
|
children: t
|
|
4743
5071
|
}
|
|
4744
5072
|
)
|
|
4745
5073
|
] }) });
|
|
4746
5074
|
}
|
|
4747
|
-
function
|
|
4748
|
-
const { children: t, label: n } = e, a =
|
|
4749
|
-
return /* @__PURE__ */ s(
|
|
5075
|
+
function wo(e) {
|
|
5076
|
+
const { children: t, label: n } = e, a = Ne(), o = re(() => ({ path: [...a, n] }), [a, n]);
|
|
5077
|
+
return /* @__PURE__ */ s(Te, { value: o, children: t });
|
|
4750
5078
|
}
|
|
4751
|
-
const
|
|
4752
|
-
version:
|
|
4753
|
-
},
|
|
5079
|
+
const qa = "0.5.0", Ua = {
|
|
5080
|
+
version: qa
|
|
5081
|
+
}, yo = Ua.version;
|
|
4754
5082
|
export {
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
5083
|
+
ut as AGENT_ATTRIBUTE,
|
|
5084
|
+
be as AgentControl,
|
|
5085
|
+
fe as AgentControlGroup,
|
|
5086
|
+
_ as AgentLine,
|
|
5087
|
+
wo as AgentRegion,
|
|
5088
|
+
Te as AgentScopeProvider,
|
|
5089
|
+
Fa as Alert,
|
|
5090
|
+
Dn as Button,
|
|
5091
|
+
Et as CLOSE_DIALOG_TOOL,
|
|
5092
|
+
ae as COMPONENT_ATTRIBUTE,
|
|
5093
|
+
Ha as Card,
|
|
5094
|
+
Ga as Checkbox,
|
|
5095
|
+
Ka as CodeBlock,
|
|
5096
|
+
Rt as DISMISS_ALERT_TOOL,
|
|
5097
|
+
za as DescriptionList,
|
|
5098
|
+
Xa as Dialog,
|
|
5099
|
+
Wt as FILL_TEXTAREA_TOOL,
|
|
5100
|
+
Bt as FILL_TOOL,
|
|
5101
|
+
Ya as Heading,
|
|
5102
|
+
Ja as Image,
|
|
5103
|
+
Qa as Link,
|
|
5104
|
+
Za as List,
|
|
5105
|
+
eo as MetaLine,
|
|
5106
|
+
to as Nav,
|
|
5107
|
+
no as NavBar,
|
|
5108
|
+
ao as NavGroup,
|
|
5109
|
+
Ot as OPEN_CARD_TOOL,
|
|
5110
|
+
Mt as OPEN_LINK_TOOL,
|
|
5111
|
+
ht as OWNER_ATTRIBUTE,
|
|
5112
|
+
Xe as PARAM_DESCRIPTION_LIMIT,
|
|
5113
|
+
ce as PART_ATTRIBUTE,
|
|
5114
|
+
$t as PRESS_TOOL,
|
|
5115
|
+
oo as PageHeader,
|
|
5116
|
+
io as Panel,
|
|
5117
|
+
Be as REGION_ATTRIBUTE,
|
|
5118
|
+
on as RESERVED_STATE_KEYS,
|
|
5119
|
+
he as SELECT_OPTION_TOOL,
|
|
5120
|
+
de as SELECT_TOOL,
|
|
5121
|
+
Dt as SET_CHECKBOX_TOOL,
|
|
5122
|
+
Ut as SET_SWITCH_TOOL,
|
|
5123
|
+
ye as STATE_ATTRIBUTE_PREFIX,
|
|
5124
|
+
ro as SecretField,
|
|
5125
|
+
so as SegmentedControl,
|
|
5126
|
+
lo as Select,
|
|
5127
|
+
co as Shell,
|
|
5128
|
+
vo as SprintProvider,
|
|
5129
|
+
ho as Stack,
|
|
5130
|
+
uo as Switch,
|
|
5131
|
+
an as THEME_ATTRIBUTE,
|
|
5132
|
+
ge as TOOL_ATTRIBUTE,
|
|
5133
|
+
ze as TOOL_DESCRIPTION_LIMIT,
|
|
5134
|
+
dn as TOOL_NAMING_CONVENTION,
|
|
5135
|
+
se as TOOL_OUTPUT_LIMIT,
|
|
5136
|
+
po as Table,
|
|
5137
|
+
go as Tag,
|
|
5138
|
+
mo as Text,
|
|
5139
|
+
bo as TextInput,
|
|
5140
|
+
fo as Textarea,
|
|
5141
|
+
tn as VIEW_ATTRIBUTE,
|
|
5142
|
+
nn as VIEW_COPY_ATTRIBUTE,
|
|
5143
|
+
Se as accessibleText,
|
|
5144
|
+
ee as afterCommit,
|
|
5145
|
+
pt as agentAttributes,
|
|
5146
|
+
q as agentAttributesFor,
|
|
5147
|
+
D as agentPartAttributesFor,
|
|
5148
|
+
wn as agentPartControlAttributes,
|
|
5149
|
+
_a as agentSelector,
|
|
5150
|
+
Ze as alertMeta,
|
|
5151
|
+
Va as buildAgentManifest,
|
|
5152
|
+
E as buildAgentNode,
|
|
5153
|
+
et as buttonMeta,
|
|
5154
|
+
tt as cardMeta,
|
|
5155
|
+
nt as checkboxMeta,
|
|
5156
|
+
Me as clamp,
|
|
5157
|
+
In as codeBlockMeta,
|
|
5158
|
+
kt as defaultAgentFormat,
|
|
4830
5159
|
I as defineAgentMeta,
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
5160
|
+
Bn as descriptionListMeta,
|
|
5161
|
+
jn as dialogMeta,
|
|
5162
|
+
hn as getAgentMeta,
|
|
5163
|
+
mt as getModelContext,
|
|
5164
|
+
Vn as headingMeta,
|
|
5165
|
+
Fn as imageMeta,
|
|
5166
|
+
ja as isModelContextAvailable,
|
|
5167
|
+
Hn as linkMeta,
|
|
5168
|
+
un as listAgentMeta,
|
|
5169
|
+
Gn as listMeta,
|
|
5170
|
+
Kn as metaLineMeta,
|
|
5171
|
+
Xn as navBarMeta,
|
|
5172
|
+
Qn as navGroupMeta,
|
|
5173
|
+
zn as navMeta,
|
|
5174
|
+
mn as nodeLine,
|
|
5175
|
+
Zn as pageHeaderMeta,
|
|
5176
|
+
gt as paginate,
|
|
5177
|
+
ea as panelMeta,
|
|
5178
|
+
J as reactText,
|
|
5179
|
+
cn as registerTool,
|
|
5180
|
+
ta as secretFieldMeta,
|
|
5181
|
+
ot as segmentedControlMeta,
|
|
5182
|
+
it as selectMeta,
|
|
5183
|
+
_e as serializeElement,
|
|
5184
|
+
Pn as serializeWithin,
|
|
5185
|
+
la as shellMeta,
|
|
5186
|
+
ie as slug,
|
|
5187
|
+
ca as stackMeta,
|
|
5188
|
+
rt as switchMeta,
|
|
5189
|
+
da as tableMeta,
|
|
5190
|
+
ua as tagMeta,
|
|
5191
|
+
lt as textInputMeta,
|
|
5192
|
+
pa as textMeta,
|
|
5193
|
+
st as textareaMeta,
|
|
5194
|
+
fn as toMarkdown,
|
|
5195
|
+
Un as tokenize,
|
|
5196
|
+
Je as toolName,
|
|
5197
|
+
Z as useAgentControls,
|
|
5198
|
+
Q as useAgentFormat,
|
|
5199
|
+
Ne as useAgentScope,
|
|
5200
|
+
X as useAgentTool,
|
|
5201
|
+
W as useSprintView,
|
|
5202
|
+
vn as useSprintViewControl,
|
|
5203
|
+
sn as validateInputs,
|
|
5204
|
+
yo as version
|
|
4875
5205
|
};
|
|
4876
5206
|
//# sourceMappingURL=index.js.map
|