@heroui/agent 0.2.0-beta.1 → 0.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/chart-content-USUK4ZM5.js +2696 -0
- package/dist/chunk-AEUPMIPT.js +577 -0
- package/dist/{chunk-RQCTC4JB.js → chunk-EXFDD3K3.js} +1 -1
- package/dist/{chunk-GDDNN2XY.js → chunk-Y6Y6ILXP.js} +2 -2
- package/dist/{component-renderer-IBJDNXSO.js → component-renderer-EOOT6ONY.js} +739 -414
- package/dist/contracts.d.ts +67 -8
- package/dist/contracts.js +224 -4
- package/dist/css/index.css +1 -1
- package/dist/{embed-runtime-XOPQY7Z5.js → embed-runtime-QOATFAS7.js} +170 -95
- package/dist/{identity-NYCXY1mT.d.ts → identity-hIGFpObN.d.ts} +3 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/next.js +2 -2
- package/dist/server.d.ts +1 -1
- package/dist/server.js +6 -1
- package/package.json +25 -26
- package/dist/chart-content-VZ66GD22.js +0 -1391
- package/dist/chunk-DW4AQRM5.js +0 -297
|
@@ -2,11 +2,13 @@ import {
|
|
|
2
2
|
CHART_COLOR_TOKENS,
|
|
3
3
|
ComponentExportActions,
|
|
4
4
|
TrendChange,
|
|
5
|
+
chartToDataTable,
|
|
5
6
|
componentActionFromSpec,
|
|
6
7
|
createComponentSelection,
|
|
7
8
|
formatCell,
|
|
8
|
-
formatNumber
|
|
9
|
-
|
|
9
|
+
formatNumber,
|
|
10
|
+
resolveGaugeBounds
|
|
11
|
+
} from "./chunk-AEUPMIPT.js";
|
|
10
12
|
import {
|
|
11
13
|
createMapLayout,
|
|
12
14
|
getInitialMapLocationId
|
|
@@ -170,6 +172,179 @@ var heatmap = base.extend({
|
|
|
170
172
|
xKey: key,
|
|
171
173
|
yKey: key
|
|
172
174
|
});
|
|
175
|
+
var line = cartesian.extend({
|
|
176
|
+
baseline: z.number().finite().optional(),
|
|
177
|
+
kind: z.literal("line-chart"),
|
|
178
|
+
mode: z.enum(["live", "profit-loss", "standard"]).optional(),
|
|
179
|
+
negativeColor: chartColorSchema.optional(),
|
|
180
|
+
positiveColor: chartColorSchema.optional(),
|
|
181
|
+
windowSize: z.number().int().min(2).max(200).optional()
|
|
182
|
+
}).superRefine((component, ctx) => {
|
|
183
|
+
if ((component.mode === "live" || component.mode === "profit-loss") && component.series.length !== 1) {
|
|
184
|
+
ctx.addIssue({
|
|
185
|
+
code: "custom",
|
|
186
|
+
message: `${component.mode} line charts require exactly one series`,
|
|
187
|
+
path: ["series"]
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
var candlestick = base.extend({
|
|
192
|
+
closeKey: key,
|
|
193
|
+
data: z.array(datum).min(1).max(200),
|
|
194
|
+
downColor: chartColorSchema.optional(),
|
|
195
|
+
format: numberFormatSchema.optional(),
|
|
196
|
+
highKey: key,
|
|
197
|
+
kind: z.literal("candlestick-chart"),
|
|
198
|
+
lowKey: key,
|
|
199
|
+
openKey: key,
|
|
200
|
+
upColor: chartColorSchema.optional(),
|
|
201
|
+
xKey: key
|
|
202
|
+
}).superRefine((component, ctx) => {
|
|
203
|
+
for (const [index, row] of component.data.entries()) {
|
|
204
|
+
const open = row[component.openKey];
|
|
205
|
+
const high = row[component.highKey];
|
|
206
|
+
const low = row[component.lowKey];
|
|
207
|
+
const close = row[component.closeKey];
|
|
208
|
+
const values = [open, high, low, close];
|
|
209
|
+
if (values.some((value) => typeof value !== "number" || !Number.isFinite(value))) {
|
|
210
|
+
ctx.addIssue({
|
|
211
|
+
code: "custom",
|
|
212
|
+
message: "Every candlestick row needs finite open, high, low, and close values",
|
|
213
|
+
path: ["data", index]
|
|
214
|
+
});
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
const numericOpen = open;
|
|
218
|
+
const numericHigh = high;
|
|
219
|
+
const numericLow = low;
|
|
220
|
+
const numericClose = close;
|
|
221
|
+
if (numericLow > Math.min(numericOpen, numericClose) || numericHigh < Math.max(numericOpen, numericClose) || numericLow > numericHigh) {
|
|
222
|
+
ctx.addIssue({
|
|
223
|
+
code: "custom",
|
|
224
|
+
message: "Candlestick low/high values must contain the open and close values",
|
|
225
|
+
path: ["data", index]
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
var funnel = proportional.extend({
|
|
231
|
+
data: z.array(datum).min(2).max(20),
|
|
232
|
+
kind: z.literal("funnel-chart"),
|
|
233
|
+
orientation: z.enum(["horizontal", "vertical"]).optional(),
|
|
234
|
+
showPercentages: z.boolean().optional()
|
|
235
|
+
}).superRefine((component, ctx) => {
|
|
236
|
+
const values = component.data.map((row, index) => {
|
|
237
|
+
const value = row[component.valueKey];
|
|
238
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
239
|
+
ctx.addIssue({
|
|
240
|
+
code: "custom",
|
|
241
|
+
message: "Every funnel stage needs a finite, non-negative value",
|
|
242
|
+
path: ["data", index, component.valueKey]
|
|
243
|
+
});
|
|
244
|
+
return 0;
|
|
245
|
+
}
|
|
246
|
+
return value;
|
|
247
|
+
});
|
|
248
|
+
if (!values.some((value) => value > 0)) {
|
|
249
|
+
ctx.addIssue({
|
|
250
|
+
code: "custom",
|
|
251
|
+
message: "A funnel needs at least one stage above zero",
|
|
252
|
+
path: ["data"]
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
if ((values[0] ?? 0) <= 0) {
|
|
256
|
+
ctx.addIssue({
|
|
257
|
+
code: "custom",
|
|
258
|
+
message: "A funnel's first stage must be above zero",
|
|
259
|
+
path: ["data", 0, component.valueKey]
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
for (let index = 1; index < values.length; index += 1) {
|
|
263
|
+
if ((values[index] ?? 0) > (values[index - 1] ?? 0)) {
|
|
264
|
+
ctx.addIssue({
|
|
265
|
+
code: "custom",
|
|
266
|
+
message: "Funnel stages must not increase",
|
|
267
|
+
path: ["data", index, component.valueKey]
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
var gauge = base.extend({
|
|
273
|
+
color: chartColorSchema.optional(),
|
|
274
|
+
format: numberFormatSchema.optional(),
|
|
275
|
+
kind: z.literal("gauge-chart"),
|
|
276
|
+
label: shortText,
|
|
277
|
+
max: z.number().finite().optional(),
|
|
278
|
+
min: z.number().finite().optional(),
|
|
279
|
+
notches: z.number().int().min(6).max(60).optional(),
|
|
280
|
+
orientation: z.enum(["arc", "linear"]).optional(),
|
|
281
|
+
value: z.number().finite()
|
|
282
|
+
}).superRefine((component, ctx) => {
|
|
283
|
+
const { maximum, minimum } = resolveGaugeBounds(component);
|
|
284
|
+
if (maximum <= minimum) {
|
|
285
|
+
ctx.addIssue({ code: "custom", message: "Gauge max must be greater than min", path: ["max"] });
|
|
286
|
+
} else if (component.value < minimum || component.value > maximum) {
|
|
287
|
+
ctx.addIssue({
|
|
288
|
+
code: "custom",
|
|
289
|
+
message: "Gauge value must be within its min/max range",
|
|
290
|
+
path: ["value"]
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
var sunburstNode = z.lazy(
|
|
295
|
+
() => z.object({
|
|
296
|
+
children: z.array(sunburstNode).min(1).max(12).optional(),
|
|
297
|
+
color: chartColorSchema.optional(),
|
|
298
|
+
id,
|
|
299
|
+
label: shortText,
|
|
300
|
+
value: z.number().finite().positive().optional()
|
|
301
|
+
}).superRefine((node, ctx) => {
|
|
302
|
+
if (node.children?.length && node.value !== void 0) {
|
|
303
|
+
ctx.addIssue({
|
|
304
|
+
code: "custom",
|
|
305
|
+
message: "Sunburst branch values are derived from their children",
|
|
306
|
+
path: ["value"]
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
if (!node.children?.length && node.value === void 0) {
|
|
310
|
+
ctx.addIssue({
|
|
311
|
+
code: "custom",
|
|
312
|
+
message: "Every sunburst leaf needs a positive value",
|
|
313
|
+
path: ["value"]
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
})
|
|
317
|
+
);
|
|
318
|
+
var sunburst = base.extend({
|
|
319
|
+
data: sunburstNode,
|
|
320
|
+
format: numberFormatSchema.optional(),
|
|
321
|
+
kind: z.literal("sunburst-chart")
|
|
322
|
+
}).superRefine((component, ctx) => {
|
|
323
|
+
const ids = /* @__PURE__ */ new Set();
|
|
324
|
+
let count = 0;
|
|
325
|
+
let deepest = 0;
|
|
326
|
+
const visit = (node, depth) => {
|
|
327
|
+
count += 1;
|
|
328
|
+
deepest = Math.max(deepest, depth);
|
|
329
|
+
if (ids.has(node.id)) {
|
|
330
|
+
ctx.addIssue({ code: "custom", message: `Duplicate sunburst node id "${node.id}"` });
|
|
331
|
+
}
|
|
332
|
+
ids.add(node.id);
|
|
333
|
+
node.children?.forEach((child) => visit(child, depth + 1));
|
|
334
|
+
};
|
|
335
|
+
if (!component.data.children?.length) {
|
|
336
|
+
ctx.addIssue({
|
|
337
|
+
code: "custom",
|
|
338
|
+
message: "A sunburst root needs at least one child",
|
|
339
|
+
path: ["data", "children"]
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
visit(component.data, 0);
|
|
343
|
+
if (count > 60)
|
|
344
|
+
ctx.addIssue({ code: "custom", message: "Sunburst charts allow at most 60 nodes" });
|
|
345
|
+
if (deepest > 4)
|
|
346
|
+
ctx.addIssue({ code: "custom", message: "Sunburst charts allow at most four nested levels" });
|
|
347
|
+
});
|
|
173
348
|
var option = z.object({ label: shortText, value: key });
|
|
174
349
|
var formDateRange = z.object({ end: date, start: date }).refine((range) => range.start <= range.end, "The start date must not be after the end date");
|
|
175
350
|
var fieldBase = {
|
|
@@ -450,6 +625,7 @@ var validators = {
|
|
|
450
625
|
kind: z.literal("callout"),
|
|
451
626
|
tone: z.enum(["accent", "danger", "neutral", "success", "warning"]).optional()
|
|
452
627
|
}),
|
|
628
|
+
candlestick,
|
|
453
629
|
channelMessage: base.extend({
|
|
454
630
|
attachments: z.array(z.object({ id, image: agentUIImage.optional(), name: shortText })).max(8).optional(),
|
|
455
631
|
author: z.object({ image: agentUIImage.optional(), name: shortText }),
|
|
@@ -542,6 +718,8 @@ var validators = {
|
|
|
542
718
|
fields: z.array(formField).min(1).max(20),
|
|
543
719
|
kind: z.literal("form")
|
|
544
720
|
}),
|
|
721
|
+
funnel,
|
|
722
|
+
gauge,
|
|
545
723
|
heatmap,
|
|
546
724
|
image: base.extend({
|
|
547
725
|
images: z.array(
|
|
@@ -571,7 +749,7 @@ var validators = {
|
|
|
571
749
|
})
|
|
572
750
|
).min(1).max(4)
|
|
573
751
|
}),
|
|
574
|
-
line
|
|
752
|
+
line,
|
|
575
753
|
list: base.extend({
|
|
576
754
|
items: z.array(
|
|
577
755
|
z.object({
|
|
@@ -822,6 +1000,7 @@ var validators = {
|
|
|
822
1000
|
).min(1).max(12),
|
|
823
1001
|
variant: z.enum(["steps", "timeline"]).optional()
|
|
824
1002
|
}),
|
|
1003
|
+
sunburst,
|
|
825
1004
|
switches: base.extend({
|
|
826
1005
|
items: z.array(
|
|
827
1006
|
z.object({
|
|
@@ -916,6 +1095,10 @@ var radialChartComponentSchema = validators.radial;
|
|
|
916
1095
|
var sankeyChartComponentSchema = validators.sankey;
|
|
917
1096
|
var scatterChartComponentSchema = validators.scatter;
|
|
918
1097
|
var heatmapComponentSchema = validators.heatmap;
|
|
1098
|
+
var candlestickChartComponentSchema = validators.candlestick;
|
|
1099
|
+
var funnelChartComponentSchema = validators.funnel;
|
|
1100
|
+
var gaugeChartComponentSchema = validators.gauge;
|
|
1101
|
+
var sunburstChartComponentSchema = validators.sunburst;
|
|
919
1102
|
var dataTableComponentSchema = validators.table;
|
|
920
1103
|
var comparisonListComponentSchema = validators.comparison;
|
|
921
1104
|
var meterListComponentSchema = validators.meterList;
|
|
@@ -965,6 +1148,10 @@ var analyticalLeafComponentSchema = z.discriminatedUnion("kind", [
|
|
|
965
1148
|
validators.sankey,
|
|
966
1149
|
validators.scatter,
|
|
967
1150
|
validators.heatmap,
|
|
1151
|
+
validators.candlestick,
|
|
1152
|
+
validators.funnel,
|
|
1153
|
+
validators.gauge,
|
|
1154
|
+
validators.sunburst,
|
|
968
1155
|
validators.table,
|
|
969
1156
|
validators.comparison,
|
|
970
1157
|
validators.meterList
|
|
@@ -1008,6 +1195,10 @@ var standardAgentUILeafComponentSchema = z.discriminatedUnion("kind", [
|
|
|
1008
1195
|
validators.sankey,
|
|
1009
1196
|
validators.scatter,
|
|
1010
1197
|
validators.heatmap,
|
|
1198
|
+
validators.candlestick,
|
|
1199
|
+
validators.funnel,
|
|
1200
|
+
validators.gauge,
|
|
1201
|
+
validators.sunburst,
|
|
1011
1202
|
validators.table,
|
|
1012
1203
|
validators.comparison,
|
|
1013
1204
|
validators.meterList,
|
|
@@ -1380,6 +1571,7 @@ var AGENT_UI_KIND_SCHEMAS = {
|
|
|
1380
1571
|
"bar-chart": barChartComponentSchema,
|
|
1381
1572
|
button: buttonComponentSchema,
|
|
1382
1573
|
callout: calloutComponentSchema,
|
|
1574
|
+
"candlestick-chart": candlestickChartComponentSchema,
|
|
1383
1575
|
card: cardShape.extend({ children: opaqueChildren(COMPOSED_UI_MAX_NODES) }),
|
|
1384
1576
|
"channel-message": channelMessageComponentSchema,
|
|
1385
1577
|
"code-block": codeBlockComponentSchema,
|
|
@@ -1397,6 +1589,8 @@ var AGENT_UI_KIND_SCHEMAS = {
|
|
|
1397
1589
|
"flight-tracker": flightTrackerComponentSchema,
|
|
1398
1590
|
followup: followupComponentSchema,
|
|
1399
1591
|
form: formComponentSchema,
|
|
1592
|
+
"funnel-chart": funnelChartComponentSchema,
|
|
1593
|
+
"gauge-chart": gaugeChartComponentSchema,
|
|
1400
1594
|
grid: gridShape.extend({ children: opaqueChildren(COMPOSED_UI_MAX_NODES) }),
|
|
1401
1595
|
heading: headingComponentSchema,
|
|
1402
1596
|
heatmap: heatmapComponentSchema,
|
|
@@ -1445,6 +1639,7 @@ var AGENT_UI_KIND_SCHEMAS = {
|
|
|
1445
1639
|
"scatter-chart": scatterChartComponentSchema,
|
|
1446
1640
|
spacer: spacerComponentSchema,
|
|
1447
1641
|
steps: stepsComponentSchema,
|
|
1642
|
+
"sunburst-chart": sunburstChartComponentSchema,
|
|
1448
1643
|
"switch-group": switchGroupComponentSchema,
|
|
1449
1644
|
tabs: base.extend({
|
|
1450
1645
|
defaultValue: id.optional(),
|
|
@@ -1531,165 +1726,27 @@ function FollowupView({ className, component, onAction, onSelect }) {
|
|
|
1531
1726
|
}
|
|
1532
1727
|
|
|
1533
1728
|
// ../agent-ui/src/components/data-visualization/charts/chart-views.tsx
|
|
1534
|
-
import { Suspense, lazy } from "react";
|
|
1535
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1536
|
-
var LazyLineChart = lazy(
|
|
1537
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.LineChartComponentContent }))
|
|
1538
|
-
);
|
|
1539
|
-
var LazyBarChart = lazy(
|
|
1540
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.BarChartComponentContent }))
|
|
1541
|
-
);
|
|
1542
|
-
var LazyAreaChart = lazy(
|
|
1543
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.AreaChartComponentContent }))
|
|
1544
|
-
);
|
|
1545
|
-
var LazyComposedChart = lazy(
|
|
1546
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.ComposedChartComponentContent }))
|
|
1547
|
-
);
|
|
1548
|
-
var LazyPieChart = lazy(
|
|
1549
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.PieChartComponentContent }))
|
|
1550
|
-
);
|
|
1551
|
-
var LazyDonutChart = lazy(
|
|
1552
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.DonutChartComponentContent }))
|
|
1553
|
-
);
|
|
1554
|
-
var LazyRadarChart = lazy(
|
|
1555
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.RadarChartComponentContent }))
|
|
1556
|
-
);
|
|
1557
|
-
var LazyRadialChart = lazy(
|
|
1558
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.RadialChartComponentContent }))
|
|
1559
|
-
);
|
|
1560
|
-
var LazySankeyChart = lazy(
|
|
1561
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.SankeyChartComponentContent }))
|
|
1562
|
-
);
|
|
1563
|
-
var LazyScatterChart = lazy(
|
|
1564
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.ScatterChartComponentContent }))
|
|
1565
|
-
);
|
|
1566
|
-
var LazyHeatmap = lazy(
|
|
1567
|
-
() => import("./chart-content-VZ66GD22.js").then((module) => ({ default: module.HeatmapComponentContent }))
|
|
1568
|
-
);
|
|
1569
|
-
function LineChartView(props) {
|
|
1570
|
-
return /* @__PURE__ */ jsx2(
|
|
1571
|
-
Suspense,
|
|
1572
|
-
{
|
|
1573
|
-
fallback: /* @__PURE__ */ jsx2(
|
|
1574
|
-
ComponentSkeleton,
|
|
1575
|
-
{
|
|
1576
|
-
className: props.className,
|
|
1577
|
-
kind: props.component.kind,
|
|
1578
|
-
title: props.component.title
|
|
1579
|
-
}
|
|
1580
|
-
),
|
|
1581
|
-
children: /* @__PURE__ */ jsx2(LazyLineChart, { ...props })
|
|
1582
|
-
}
|
|
1583
|
-
);
|
|
1584
|
-
}
|
|
1585
|
-
function BarChartView(props) {
|
|
1586
|
-
return /* @__PURE__ */ jsx2(
|
|
1587
|
-
Suspense,
|
|
1588
|
-
{
|
|
1589
|
-
fallback: /* @__PURE__ */ jsx2(
|
|
1590
|
-
ComponentSkeleton,
|
|
1591
|
-
{
|
|
1592
|
-
className: props.className,
|
|
1593
|
-
kind: props.component.kind,
|
|
1594
|
-
title: props.component.title
|
|
1595
|
-
}
|
|
1596
|
-
),
|
|
1597
|
-
children: /* @__PURE__ */ jsx2(LazyBarChart, { ...props })
|
|
1598
|
-
}
|
|
1599
|
-
);
|
|
1600
|
-
}
|
|
1601
|
-
function AreaChartView(props) {
|
|
1602
|
-
return /* @__PURE__ */ jsx2(ChartSuspense, { className: props.className, component: props.component, children: /* @__PURE__ */ jsx2(LazyAreaChart, { ...props }) });
|
|
1603
|
-
}
|
|
1604
|
-
function ComposedChartView(props) {
|
|
1605
|
-
return /* @__PURE__ */ jsx2(ChartSuspense, { className: props.className, component: props.component, children: /* @__PURE__ */ jsx2(LazyComposedChart, { ...props }) });
|
|
1606
|
-
}
|
|
1607
|
-
function PieChartView(props) {
|
|
1608
|
-
return /* @__PURE__ */ jsx2(ChartSuspense, { className: props.className, component: props.component, children: /* @__PURE__ */ jsx2(LazyPieChart, { ...props }) });
|
|
1609
|
-
}
|
|
1610
|
-
function DonutChartView(props) {
|
|
1611
|
-
return /* @__PURE__ */ jsx2(
|
|
1612
|
-
Suspense,
|
|
1613
|
-
{
|
|
1614
|
-
fallback: /* @__PURE__ */ jsx2(
|
|
1615
|
-
ComponentSkeleton,
|
|
1616
|
-
{
|
|
1617
|
-
className: props.className,
|
|
1618
|
-
kind: props.component.kind,
|
|
1619
|
-
title: props.component.title
|
|
1620
|
-
}
|
|
1621
|
-
),
|
|
1622
|
-
children: /* @__PURE__ */ jsx2(LazyDonutChart, { ...props })
|
|
1623
|
-
}
|
|
1624
|
-
);
|
|
1625
|
-
}
|
|
1626
|
-
function RadarChartView(props) {
|
|
1627
|
-
return /* @__PURE__ */ jsx2(ChartSuspense, { className: props.className, component: props.component, children: /* @__PURE__ */ jsx2(LazyRadarChart, { ...props }) });
|
|
1628
|
-
}
|
|
1629
|
-
function RadialChartView(props) {
|
|
1630
|
-
return /* @__PURE__ */ jsx2(ChartSuspense, { className: props.className, component: props.component, children: /* @__PURE__ */ jsx2(LazyRadialChart, { ...props }) });
|
|
1631
|
-
}
|
|
1632
|
-
function SankeyChartView(props) {
|
|
1633
|
-
return /* @__PURE__ */ jsx2(ChartSuspense, { className: props.className, component: props.component, children: /* @__PURE__ */ jsx2(LazySankeyChart, { ...props }) });
|
|
1634
|
-
}
|
|
1635
|
-
function ScatterChartView(props) {
|
|
1636
|
-
return /* @__PURE__ */ jsx2(ChartSuspense, { className: props.className, component: props.component, children: /* @__PURE__ */ jsx2(LazyScatterChart, { ...props }) });
|
|
1637
|
-
}
|
|
1638
|
-
function HeatmapView(props) {
|
|
1639
|
-
return /* @__PURE__ */ jsx2(ChartSuspense, { className: props.className, component: props.component, children: /* @__PURE__ */ jsx2(LazyHeatmap, { ...props }) });
|
|
1640
|
-
}
|
|
1641
|
-
function ChartSuspense({
|
|
1642
|
-
children,
|
|
1643
|
-
className,
|
|
1644
|
-
component
|
|
1645
|
-
}) {
|
|
1646
|
-
return /* @__PURE__ */ jsx2(
|
|
1647
|
-
Suspense,
|
|
1648
|
-
{
|
|
1649
|
-
fallback: /* @__PURE__ */ jsx2(ComponentSkeleton, { className, kind: component.kind, title: component.title }),
|
|
1650
|
-
children
|
|
1651
|
-
}
|
|
1652
|
-
);
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
// ../agent-ui/src/components/data-visualization/comparison-list/comparison-list.tsx
|
|
1656
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1657
|
-
function ComparisonListView({ className, component, onSelect }) {
|
|
1658
|
-
return /* @__PURE__ */ jsx3(CardVariantProvider, { variant: "plain", children: /* @__PURE__ */ jsx3(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsx3("div", { className: "aui-comparison", "data-slot": "agent-ui-comparison-list", children: component.items.map((item) => /* @__PURE__ */ jsxs2(
|
|
1659
|
-
"button",
|
|
1660
|
-
{
|
|
1661
|
-
className: "aui-comparison__item",
|
|
1662
|
-
"data-slot": "agent-ui-comparison-item",
|
|
1663
|
-
type: "button",
|
|
1664
|
-
onClick: () => onSelect?.(createComponentSelection(component, item)),
|
|
1665
|
-
children: [
|
|
1666
|
-
/* @__PURE__ */ jsx3("span", { className: "aui-comparison__label", "data-slot": "agent-ui-comparison-label", children: item.label }),
|
|
1667
|
-
/* @__PURE__ */ jsx3("span", { className: "aui-comparison__value", "data-slot": "agent-ui-comparison-value", children: formatNumber(item.value, item.format) }),
|
|
1668
|
-
item.note ? /* @__PURE__ */ jsx3("span", { className: "aui-comparison__note", "data-slot": "agent-ui-comparison-note", children: item.note }) : /* @__PURE__ */ jsx3("span", {}),
|
|
1669
|
-
item.change !== void 0 ? /* @__PURE__ */ jsx3(TrendChange, { slot: "agent-ui-comparison-change", value: item.change }) : null
|
|
1670
|
-
]
|
|
1671
|
-
},
|
|
1672
|
-
item.label
|
|
1673
|
-
)) }) }) });
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
// ../agent-ui/src/components/data-visualization/dashboard/dashboard.tsx
|
|
1677
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1678
|
-
function DashboardView({ children, className, component }) {
|
|
1679
|
-
return /* @__PURE__ */ jsx4(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsx4("div", { className: "aui-dashboard", "data-layout": component.layout, "data-slot": "agent-ui-dashboard", children }) });
|
|
1680
|
-
}
|
|
1729
|
+
import { Suspense, lazy, useState as useState2 } from "react";
|
|
1681
1730
|
|
|
1682
1731
|
// ../agent-ui/src/components/data-visualization/data-table/data-table.tsx
|
|
1683
1732
|
import { ChevronUp } from "@gravity-ui/icons";
|
|
1684
1733
|
import { SearchField } from "@heroui/react";
|
|
1685
1734
|
import { useMemo, useState } from "react";
|
|
1686
|
-
import { jsx as
|
|
1735
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1736
|
+
function DataTableCardVariantProvider({
|
|
1737
|
+
children,
|
|
1738
|
+
inherit
|
|
1739
|
+
}) {
|
|
1740
|
+
return inherit ? children : /* @__PURE__ */ jsx2(CardVariantProvider, { variant: "plain", children });
|
|
1741
|
+
}
|
|
1687
1742
|
function DataTableView({
|
|
1688
1743
|
className,
|
|
1689
1744
|
component,
|
|
1690
1745
|
exportFormats,
|
|
1746
|
+
inheritCardVariant,
|
|
1691
1747
|
onAction,
|
|
1692
|
-
onSelect
|
|
1748
|
+
onSelect,
|
|
1749
|
+
viewAction
|
|
1693
1750
|
}) {
|
|
1694
1751
|
const [filter, setFilter] = useState("");
|
|
1695
1752
|
const [sort, setSort] = useState(null);
|
|
@@ -1725,15 +1782,24 @@ function DataTableView({
|
|
|
1725
1782
|
});
|
|
1726
1783
|
}, [activeSort, component.filterable, filter, keyedRows]);
|
|
1727
1784
|
const select = (row) => onSelect?.(createComponentSelection(component, row));
|
|
1728
|
-
|
|
1785
|
+
const tableExportFormats = exportFormats?.filter((format) => format === "csv") ?? [];
|
|
1786
|
+
return /* @__PURE__ */ jsx2(DataTableCardVariantProvider, { inherit: inheritCardVariant, children: /* @__PURE__ */ jsxs2(
|
|
1729
1787
|
Card,
|
|
1730
1788
|
{
|
|
1731
1789
|
className,
|
|
1732
1790
|
description: component.description,
|
|
1733
1791
|
title: component.title,
|
|
1734
|
-
actions:
|
|
1792
|
+
actions: tableExportFormats.length > 0 || viewAction ? /* @__PURE__ */ jsx2(
|
|
1793
|
+
ComponentExportActions,
|
|
1794
|
+
{
|
|
1795
|
+
component,
|
|
1796
|
+
formats: tableExportFormats,
|
|
1797
|
+
viewAction,
|
|
1798
|
+
onAction
|
|
1799
|
+
}
|
|
1800
|
+
) : null,
|
|
1735
1801
|
children: [
|
|
1736
|
-
component.filterable ? /* @__PURE__ */
|
|
1802
|
+
component.filterable ? /* @__PURE__ */ jsx2("div", { className: "aui-table__tools", "data-slot": "agent-ui-table-tools", children: /* @__PURE__ */ jsx2(
|
|
1737
1803
|
SearchField,
|
|
1738
1804
|
{
|
|
1739
1805
|
fullWidth: true,
|
|
@@ -1742,26 +1808,26 @@ function DataTableView({
|
|
|
1742
1808
|
value: filter,
|
|
1743
1809
|
variant: "secondary",
|
|
1744
1810
|
onChange: setFilter,
|
|
1745
|
-
children: /* @__PURE__ */
|
|
1746
|
-
/* @__PURE__ */
|
|
1747
|
-
/* @__PURE__ */
|
|
1748
|
-
/* @__PURE__ */
|
|
1811
|
+
children: /* @__PURE__ */ jsxs2(SearchField.Group, { children: [
|
|
1812
|
+
/* @__PURE__ */ jsx2(SearchField.SearchIcon, {}),
|
|
1813
|
+
/* @__PURE__ */ jsx2(SearchField.Input, { "data-slot": "agent-ui-table-filter", placeholder: "Filter rows\u2026" }),
|
|
1814
|
+
/* @__PURE__ */ jsx2(SearchField.ClearButton, {})
|
|
1749
1815
|
] })
|
|
1750
1816
|
}
|
|
1751
1817
|
) }) : null,
|
|
1752
|
-
/* @__PURE__ */
|
|
1818
|
+
/* @__PURE__ */ jsx2(
|
|
1753
1819
|
"div",
|
|
1754
1820
|
{
|
|
1755
1821
|
className: "aui-table__scroll",
|
|
1756
1822
|
"data-slot": "agent-ui-table-scroll",
|
|
1757
1823
|
"data-variant": component.variant ?? "primary",
|
|
1758
|
-
children: /* @__PURE__ */
|
|
1759
|
-
/* @__PURE__ */
|
|
1824
|
+
children: /* @__PURE__ */ jsxs2("table", { className: "aui-table", "data-slot": "agent-ui-data-table", children: [
|
|
1825
|
+
/* @__PURE__ */ jsx2("thead", { "data-slot": "agent-ui-table-head", children: /* @__PURE__ */ jsx2("tr", { children: component.columns.map((column) => /* @__PURE__ */ jsx2(
|
|
1760
1826
|
"th",
|
|
1761
1827
|
{
|
|
1762
1828
|
scope: "col",
|
|
1763
1829
|
"aria-sort": activeSort?.key === column.key ? activeSort.direction === "asc" ? "ascending" : "descending" : "none",
|
|
1764
|
-
children: /* @__PURE__ */
|
|
1830
|
+
children: /* @__PURE__ */ jsxs2(
|
|
1765
1831
|
"button",
|
|
1766
1832
|
{
|
|
1767
1833
|
className: "aui-table__sort",
|
|
@@ -1773,7 +1839,7 @@ function DataTableView({
|
|
|
1773
1839
|
})),
|
|
1774
1840
|
children: [
|
|
1775
1841
|
column.label,
|
|
1776
|
-
activeSort?.key === column.key ? /* @__PURE__ */
|
|
1842
|
+
activeSort?.key === column.key ? /* @__PURE__ */ jsx2(
|
|
1777
1843
|
ChevronUp,
|
|
1778
1844
|
{
|
|
1779
1845
|
"aria-hidden": "true",
|
|
@@ -1788,7 +1854,7 @@ function DataTableView({
|
|
|
1788
1854
|
},
|
|
1789
1855
|
column.key
|
|
1790
1856
|
)) }) }),
|
|
1791
|
-
/* @__PURE__ */
|
|
1857
|
+
/* @__PURE__ */ jsx2("tbody", { "data-slot": "agent-ui-table-body", children: rows.length > 0 ? rows.map(({ key: key2, row }) => /* @__PURE__ */ jsx2(
|
|
1792
1858
|
"tr",
|
|
1793
1859
|
{
|
|
1794
1860
|
className: "aui-table__row",
|
|
@@ -1803,10 +1869,10 @@ function DataTableView({
|
|
|
1803
1869
|
select(row);
|
|
1804
1870
|
}
|
|
1805
1871
|
},
|
|
1806
|
-
children: component.columns.map((column) => /* @__PURE__ */
|
|
1872
|
+
children: component.columns.map((column) => /* @__PURE__ */ jsx2("td", { "data-slot": "agent-ui-table-cell", children: formatCell(row[column.key], column.format) }, column.key))
|
|
1807
1873
|
},
|
|
1808
1874
|
key2
|
|
1809
|
-
)) : /* @__PURE__ */
|
|
1875
|
+
)) : /* @__PURE__ */ jsx2("tr", { children: /* @__PURE__ */ jsx2(
|
|
1810
1876
|
"td",
|
|
1811
1877
|
{
|
|
1812
1878
|
className: "aui-table__empty",
|
|
@@ -1823,6 +1889,261 @@ function DataTableView({
|
|
|
1823
1889
|
) });
|
|
1824
1890
|
}
|
|
1825
1891
|
|
|
1892
|
+
// ../agent-ui/src/components/data-visualization/charts/chart-views.tsx
|
|
1893
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1894
|
+
var LazyLineChart = lazy(
|
|
1895
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.LineChartComponentContent }))
|
|
1896
|
+
);
|
|
1897
|
+
var LazyBarChart = lazy(
|
|
1898
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.BarChartComponentContent }))
|
|
1899
|
+
);
|
|
1900
|
+
var LazyAreaChart = lazy(
|
|
1901
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.AreaChartComponentContent }))
|
|
1902
|
+
);
|
|
1903
|
+
var LazyComposedChart = lazy(
|
|
1904
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.ComposedChartComponentContent }))
|
|
1905
|
+
);
|
|
1906
|
+
var LazyPieChart = lazy(
|
|
1907
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.PieChartComponentContent }))
|
|
1908
|
+
);
|
|
1909
|
+
var LazyDonutChart = lazy(
|
|
1910
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.DonutChartComponentContent }))
|
|
1911
|
+
);
|
|
1912
|
+
var LazyRadarChart = lazy(
|
|
1913
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.RadarChartComponentContent }))
|
|
1914
|
+
);
|
|
1915
|
+
var LazyRadialChart = lazy(
|
|
1916
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.RadialChartComponentContent }))
|
|
1917
|
+
);
|
|
1918
|
+
var LazySankeyChart = lazy(
|
|
1919
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.SankeyChartComponentContent }))
|
|
1920
|
+
);
|
|
1921
|
+
var LazyScatterChart = lazy(
|
|
1922
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.ScatterChartComponentContent }))
|
|
1923
|
+
);
|
|
1924
|
+
var LazyHeatmap = lazy(
|
|
1925
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.HeatmapComponentContent }))
|
|
1926
|
+
);
|
|
1927
|
+
var LazyCandlestickChart = lazy(
|
|
1928
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({
|
|
1929
|
+
default: module.CandlestickChartComponentContent
|
|
1930
|
+
}))
|
|
1931
|
+
);
|
|
1932
|
+
var LazyFunnelChart = lazy(
|
|
1933
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.FunnelChartComponentContent }))
|
|
1934
|
+
);
|
|
1935
|
+
var LazyGaugeChart = lazy(
|
|
1936
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.GaugeChartComponentContent }))
|
|
1937
|
+
);
|
|
1938
|
+
var LazySunburstChart = lazy(
|
|
1939
|
+
() => import("./chart-content-USUK4ZM5.js").then((module) => ({ default: module.SunburstChartComponentContent }))
|
|
1940
|
+
);
|
|
1941
|
+
function LineChartView(props) {
|
|
1942
|
+
return /* @__PURE__ */ jsx3(
|
|
1943
|
+
ConvertibleChartView,
|
|
1944
|
+
{
|
|
1945
|
+
props,
|
|
1946
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyLineChart, { ...viewProps })
|
|
1947
|
+
}
|
|
1948
|
+
);
|
|
1949
|
+
}
|
|
1950
|
+
function BarChartView(props) {
|
|
1951
|
+
return /* @__PURE__ */ jsx3(
|
|
1952
|
+
ConvertibleChartView,
|
|
1953
|
+
{
|
|
1954
|
+
props,
|
|
1955
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyBarChart, { ...viewProps })
|
|
1956
|
+
}
|
|
1957
|
+
);
|
|
1958
|
+
}
|
|
1959
|
+
function AreaChartView(props) {
|
|
1960
|
+
return /* @__PURE__ */ jsx3(
|
|
1961
|
+
ConvertibleChartView,
|
|
1962
|
+
{
|
|
1963
|
+
props,
|
|
1964
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyAreaChart, { ...viewProps })
|
|
1965
|
+
}
|
|
1966
|
+
);
|
|
1967
|
+
}
|
|
1968
|
+
function ComposedChartView(props) {
|
|
1969
|
+
return /* @__PURE__ */ jsx3(
|
|
1970
|
+
ConvertibleChartView,
|
|
1971
|
+
{
|
|
1972
|
+
props,
|
|
1973
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyComposedChart, { ...viewProps })
|
|
1974
|
+
}
|
|
1975
|
+
);
|
|
1976
|
+
}
|
|
1977
|
+
function PieChartView(props) {
|
|
1978
|
+
return /* @__PURE__ */ jsx3(
|
|
1979
|
+
ConvertibleChartView,
|
|
1980
|
+
{
|
|
1981
|
+
props,
|
|
1982
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyPieChart, { ...viewProps })
|
|
1983
|
+
}
|
|
1984
|
+
);
|
|
1985
|
+
}
|
|
1986
|
+
function DonutChartView(props) {
|
|
1987
|
+
return /* @__PURE__ */ jsx3(
|
|
1988
|
+
ConvertibleChartView,
|
|
1989
|
+
{
|
|
1990
|
+
props,
|
|
1991
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyDonutChart, { ...viewProps })
|
|
1992
|
+
}
|
|
1993
|
+
);
|
|
1994
|
+
}
|
|
1995
|
+
function RadarChartView(props) {
|
|
1996
|
+
return /* @__PURE__ */ jsx3(
|
|
1997
|
+
ConvertibleChartView,
|
|
1998
|
+
{
|
|
1999
|
+
props,
|
|
2000
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyRadarChart, { ...viewProps })
|
|
2001
|
+
}
|
|
2002
|
+
);
|
|
2003
|
+
}
|
|
2004
|
+
function RadialChartView(props) {
|
|
2005
|
+
return /* @__PURE__ */ jsx3(
|
|
2006
|
+
ConvertibleChartView,
|
|
2007
|
+
{
|
|
2008
|
+
props,
|
|
2009
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyRadialChart, { ...viewProps })
|
|
2010
|
+
}
|
|
2011
|
+
);
|
|
2012
|
+
}
|
|
2013
|
+
function SankeyChartView(props) {
|
|
2014
|
+
return /* @__PURE__ */ jsx3(
|
|
2015
|
+
ConvertibleChartView,
|
|
2016
|
+
{
|
|
2017
|
+
props,
|
|
2018
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazySankeyChart, { ...viewProps })
|
|
2019
|
+
}
|
|
2020
|
+
);
|
|
2021
|
+
}
|
|
2022
|
+
function ScatterChartView(props) {
|
|
2023
|
+
return /* @__PURE__ */ jsx3(
|
|
2024
|
+
ConvertibleChartView,
|
|
2025
|
+
{
|
|
2026
|
+
props,
|
|
2027
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyScatterChart, { ...viewProps })
|
|
2028
|
+
}
|
|
2029
|
+
);
|
|
2030
|
+
}
|
|
2031
|
+
function HeatmapView(props) {
|
|
2032
|
+
return /* @__PURE__ */ jsx3(
|
|
2033
|
+
ConvertibleChartView,
|
|
2034
|
+
{
|
|
2035
|
+
props,
|
|
2036
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyHeatmap, { ...viewProps })
|
|
2037
|
+
}
|
|
2038
|
+
);
|
|
2039
|
+
}
|
|
2040
|
+
function CandlestickChartView(props) {
|
|
2041
|
+
return /* @__PURE__ */ jsx3(
|
|
2042
|
+
ConvertibleChartView,
|
|
2043
|
+
{
|
|
2044
|
+
props,
|
|
2045
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyCandlestickChart, { ...viewProps })
|
|
2046
|
+
}
|
|
2047
|
+
);
|
|
2048
|
+
}
|
|
2049
|
+
function FunnelChartView(props) {
|
|
2050
|
+
return /* @__PURE__ */ jsx3(
|
|
2051
|
+
ConvertibleChartView,
|
|
2052
|
+
{
|
|
2053
|
+
props,
|
|
2054
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyFunnelChart, { ...viewProps })
|
|
2055
|
+
}
|
|
2056
|
+
);
|
|
2057
|
+
}
|
|
2058
|
+
function GaugeChartView(props) {
|
|
2059
|
+
return /* @__PURE__ */ jsx3(
|
|
2060
|
+
ConvertibleChartView,
|
|
2061
|
+
{
|
|
2062
|
+
props,
|
|
2063
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazyGaugeChart, { ...viewProps })
|
|
2064
|
+
}
|
|
2065
|
+
);
|
|
2066
|
+
}
|
|
2067
|
+
function SunburstChartView(props) {
|
|
2068
|
+
return /* @__PURE__ */ jsx3(
|
|
2069
|
+
ConvertibleChartView,
|
|
2070
|
+
{
|
|
2071
|
+
props,
|
|
2072
|
+
renderChart: (viewProps) => /* @__PURE__ */ jsx3(LazySunburstChart, { ...viewProps })
|
|
2073
|
+
}
|
|
2074
|
+
);
|
|
2075
|
+
}
|
|
2076
|
+
function ConvertibleChartView({
|
|
2077
|
+
props,
|
|
2078
|
+
renderChart
|
|
2079
|
+
}) {
|
|
2080
|
+
const [view, setView] = useState2("chart");
|
|
2081
|
+
const viewAction = {
|
|
2082
|
+
label: view === "chart" ? "View as table" : "View as chart",
|
|
2083
|
+
onAction: () => setView((current) => current === "chart" ? "table" : "chart"),
|
|
2084
|
+
target: view === "chart" ? "table" : "chart"
|
|
2085
|
+
};
|
|
2086
|
+
const content2 = view === "table" ? /* @__PURE__ */ jsx3(
|
|
2087
|
+
DataTableView,
|
|
2088
|
+
{
|
|
2089
|
+
...props,
|
|
2090
|
+
inheritCardVariant: true,
|
|
2091
|
+
component: chartToDataTable(props.component),
|
|
2092
|
+
exportFormats: props.exportFormats?.filter((format) => format === "csv"),
|
|
2093
|
+
viewAction
|
|
2094
|
+
}
|
|
2095
|
+
) : /* @__PURE__ */ jsx3(
|
|
2096
|
+
Suspense,
|
|
2097
|
+
{
|
|
2098
|
+
fallback: /* @__PURE__ */ jsx3(
|
|
2099
|
+
ComponentSkeleton,
|
|
2100
|
+
{
|
|
2101
|
+
className: props.className,
|
|
2102
|
+
kind: props.component.kind,
|
|
2103
|
+
title: props.component.title
|
|
2104
|
+
}
|
|
2105
|
+
),
|
|
2106
|
+
children: renderChart({ ...props, viewAction })
|
|
2107
|
+
}
|
|
2108
|
+
);
|
|
2109
|
+
return /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
2110
|
+
content2,
|
|
2111
|
+
/* @__PURE__ */ jsxs3("span", { "aria-live": "polite", className: "aui-sr-only", children: [
|
|
2112
|
+
"Showing ",
|
|
2113
|
+
props.component.title,
|
|
2114
|
+
" as ",
|
|
2115
|
+
view
|
|
2116
|
+
] })
|
|
2117
|
+
] });
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
// ../agent-ui/src/components/data-visualization/comparison-list/comparison-list.tsx
|
|
2121
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2122
|
+
function ComparisonListView({ className, component, onSelect }) {
|
|
2123
|
+
return /* @__PURE__ */ jsx4(CardVariantProvider, { variant: "plain", children: /* @__PURE__ */ jsx4(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsx4("div", { className: "aui-comparison", "data-slot": "agent-ui-comparison-list", children: component.items.map((item) => /* @__PURE__ */ jsxs4(
|
|
2124
|
+
"button",
|
|
2125
|
+
{
|
|
2126
|
+
className: "aui-comparison__item",
|
|
2127
|
+
"data-slot": "agent-ui-comparison-item",
|
|
2128
|
+
type: "button",
|
|
2129
|
+
onClick: () => onSelect?.(createComponentSelection(component, item)),
|
|
2130
|
+
children: [
|
|
2131
|
+
/* @__PURE__ */ jsx4("span", { className: "aui-comparison__label", "data-slot": "agent-ui-comparison-label", children: item.label }),
|
|
2132
|
+
/* @__PURE__ */ jsx4("span", { className: "aui-comparison__value", "data-slot": "agent-ui-comparison-value", children: formatNumber(item.value, item.format) }),
|
|
2133
|
+
item.note ? /* @__PURE__ */ jsx4("span", { className: "aui-comparison__note", "data-slot": "agent-ui-comparison-note", children: item.note }) : /* @__PURE__ */ jsx4("span", {}),
|
|
2134
|
+
item.change !== void 0 ? /* @__PURE__ */ jsx4(TrendChange, { slot: "agent-ui-comparison-change", value: item.change }) : null
|
|
2135
|
+
]
|
|
2136
|
+
},
|
|
2137
|
+
item.label
|
|
2138
|
+
)) }) }) });
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
// ../agent-ui/src/components/data-visualization/dashboard/dashboard.tsx
|
|
2142
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
2143
|
+
function DashboardView({ children, className, component }) {
|
|
2144
|
+
return /* @__PURE__ */ jsx5(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsx5("div", { className: "aui-dashboard", "data-layout": component.layout, "data-slot": "agent-ui-dashboard", children }) });
|
|
2145
|
+
}
|
|
2146
|
+
|
|
1826
2147
|
// ../agent-ui/src/components/agent-icon/agent-icon.tsx
|
|
1827
2148
|
import {
|
|
1828
2149
|
Briefcase,
|
|
@@ -1961,20 +2282,20 @@ function sparklineGeometry(values) {
|
|
|
1961
2282
|
`C ${round(x(index) + controlOffset)} ${round(scaled[index] + tangents[index] * controlOffset)} ${round(x(index + 1) - controlOffset)} ${round(scaled[index + 1] - tangents[index + 1] * controlOffset)} ${round(x(index + 1))} ${round(scaled[index + 1])}`
|
|
1962
2283
|
);
|
|
1963
2284
|
}
|
|
1964
|
-
const
|
|
1965
|
-
return { area: `${
|
|
2285
|
+
const line2 = segments.join(" ");
|
|
2286
|
+
return { area: `${line2} V ${height} H 0 Z`, line: line2 };
|
|
1966
2287
|
}
|
|
1967
2288
|
function round(value) {
|
|
1968
2289
|
return Math.round(value * 100) / 100;
|
|
1969
2290
|
}
|
|
1970
2291
|
|
|
1971
2292
|
// ../agent-ui/src/components/data-visualization/kpi-grid/sparkline.tsx
|
|
1972
|
-
import { jsx as jsx7, jsxs as
|
|
2293
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1973
2294
|
function Sparkline({ color, values }) {
|
|
1974
2295
|
const gradientId = useId();
|
|
1975
2296
|
const geometry = sparklineGeometry(values);
|
|
1976
2297
|
if (!geometry) return null;
|
|
1977
|
-
return /* @__PURE__ */
|
|
2298
|
+
return /* @__PURE__ */ jsxs5(
|
|
1978
2299
|
"svg",
|
|
1979
2300
|
{
|
|
1980
2301
|
"aria-hidden": "true",
|
|
@@ -1983,7 +2304,7 @@ function Sparkline({ color, values }) {
|
|
|
1983
2304
|
preserveAspectRatio: "none",
|
|
1984
2305
|
viewBox: `0 0 ${SPARKLINE_VIEWBOX.width} ${SPARKLINE_VIEWBOX.height}`,
|
|
1985
2306
|
children: [
|
|
1986
|
-
/* @__PURE__ */ jsx7("defs", { children: /* @__PURE__ */
|
|
2307
|
+
/* @__PURE__ */ jsx7("defs", { children: /* @__PURE__ */ jsxs5("linearGradient", { id: gradientId, x1: "0", x2: "0", y1: "0", y2: "1", children: [
|
|
1987
2308
|
/* @__PURE__ */ jsx7("stop", { offset: "0%", stopColor: color, stopOpacity: 0.22 }),
|
|
1988
2309
|
/* @__PURE__ */ jsx7("stop", { offset: "100%", stopColor: color, stopOpacity: 0.02 })
|
|
1989
2310
|
] }) }),
|
|
@@ -2006,7 +2327,7 @@ function Sparkline({ color, values }) {
|
|
|
2006
2327
|
}
|
|
2007
2328
|
|
|
2008
2329
|
// ../agent-ui/src/components/data-visualization/kpi-grid/kpi-grid.tsx
|
|
2009
|
-
import { jsx as jsx8, jsxs as
|
|
2330
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2010
2331
|
function KpiGridView({ className, component }) {
|
|
2011
2332
|
return /* @__PURE__ */ jsx8(
|
|
2012
2333
|
Card,
|
|
@@ -2015,13 +2336,13 @@ function KpiGridView({ className, component }) {
|
|
|
2015
2336
|
description: component.description,
|
|
2016
2337
|
title: component.title,
|
|
2017
2338
|
variant: "outline",
|
|
2018
|
-
children: /* @__PURE__ */ jsx8("div", { className: "aui-kpi-grid", "data-slot": "agent-ui-kpi-grid", children: component.metrics.map((metric) => /* @__PURE__ */
|
|
2019
|
-
/* @__PURE__ */
|
|
2339
|
+
children: /* @__PURE__ */ jsx8("div", { className: "aui-kpi-grid", "data-slot": "agent-ui-kpi-grid", children: component.metrics.map((metric) => /* @__PURE__ */ jsxs6("article", { className: "aui-kpi aui-kpi--chart", "data-slot": "agent-ui-kpi", children: [
|
|
2340
|
+
/* @__PURE__ */ jsxs6("header", { className: "aui-kpi__header", "data-slot": "agent-ui-kpi-header", children: [
|
|
2020
2341
|
/* @__PURE__ */ jsx8("span", { className: "aui-kpi__title", "data-slot": "agent-ui-kpi-title", children: metric.label }),
|
|
2021
2342
|
metric.icon ? /* @__PURE__ */ jsx8("span", { className: "aui-kpi__icon", "data-slot": "agent-ui-kpi-icon", children: /* @__PURE__ */ jsx8(AgentIcon, { name: metric.icon }) }) : null
|
|
2022
2343
|
] }),
|
|
2023
|
-
/* @__PURE__ */
|
|
2024
|
-
/* @__PURE__ */
|
|
2344
|
+
/* @__PURE__ */ jsxs6("div", { className: "aui-kpi__body", "data-slot": "agent-ui-kpi-body", children: [
|
|
2345
|
+
/* @__PURE__ */ jsxs6("div", { className: "aui-kpi__metric", "data-slot": "agent-ui-kpi-metric", children: [
|
|
2025
2346
|
/* @__PURE__ */ jsx8("p", { className: "aui-kpi__value", "data-slot": "agent-ui-kpi-value", children: formatNumber(metric.value, metric.format) }),
|
|
2026
2347
|
metric.change !== void 0 ? /* @__PURE__ */ jsx8(TrendChange, { slot: "agent-ui-kpi-change", value: metric.change }) : null
|
|
2027
2348
|
] }),
|
|
@@ -2040,7 +2361,7 @@ function KpiGridView({ className, component }) {
|
|
|
2040
2361
|
|
|
2041
2362
|
// ../agent-ui/src/components/data-visualization/meter-list/meter-list.tsx
|
|
2042
2363
|
import { Description, Label, Meter } from "@heroui/react";
|
|
2043
|
-
import { jsx as jsx9, jsxs as
|
|
2364
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2044
2365
|
function MeterListView({ className, component }) {
|
|
2045
2366
|
return /* @__PURE__ */ jsx9(
|
|
2046
2367
|
Card,
|
|
@@ -2052,7 +2373,7 @@ function MeterListView({ className, component }) {
|
|
|
2052
2373
|
children: /* @__PURE__ */ jsx9("div", { className: "aui-meter-list", "data-slot": "agent-ui-meter-list", children: component.items.map((item) => {
|
|
2053
2374
|
const min = item.min ?? 0;
|
|
2054
2375
|
const max = item.max ?? (item.format?.style === "percent" ? 1 : 100);
|
|
2055
|
-
return /* @__PURE__ */
|
|
2376
|
+
return /* @__PURE__ */ jsxs7(
|
|
2056
2377
|
Meter,
|
|
2057
2378
|
{
|
|
2058
2379
|
"aria-label": item.label,
|
|
@@ -2079,7 +2400,7 @@ function MeterListView({ className, component }) {
|
|
|
2079
2400
|
}
|
|
2080
2401
|
|
|
2081
2402
|
// ../agent-ui/src/components/data-visualization/metric-grid/metric-grid.tsx
|
|
2082
|
-
import { jsx as jsx10, jsxs as
|
|
2403
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2083
2404
|
function MetricGridView({ className, component }) {
|
|
2084
2405
|
return /* @__PURE__ */ jsx10(
|
|
2085
2406
|
Card,
|
|
@@ -2088,12 +2409,12 @@ function MetricGridView({ className, component }) {
|
|
|
2088
2409
|
description: component.description,
|
|
2089
2410
|
title: component.title,
|
|
2090
2411
|
variant: "outline",
|
|
2091
|
-
children: /* @__PURE__ */ jsx10("div", { className: "aui-metric-grid", "data-slot": "agent-ui-metric-grid", children: component.metrics.map((metric) => /* @__PURE__ */
|
|
2092
|
-
/* @__PURE__ */
|
|
2412
|
+
children: /* @__PURE__ */ jsx10("div", { className: "aui-metric-grid", "data-slot": "agent-ui-metric-grid", children: component.metrics.map((metric) => /* @__PURE__ */ jsxs8("article", { className: "aui-kpi", "data-slot": "agent-ui-kpi", children: [
|
|
2413
|
+
/* @__PURE__ */ jsxs8("header", { className: "aui-kpi__header", "data-slot": "agent-ui-kpi-header", children: [
|
|
2093
2414
|
/* @__PURE__ */ jsx10("span", { className: "aui-kpi__title", "data-slot": "agent-ui-kpi-title", children: metric.label }),
|
|
2094
2415
|
metric.icon ? /* @__PURE__ */ jsx10("span", { className: "aui-kpi__icon", "data-slot": "agent-ui-kpi-icon", children: /* @__PURE__ */ jsx10(AgentIcon, { name: metric.icon }) }) : null
|
|
2095
2416
|
] }),
|
|
2096
|
-
/* @__PURE__ */
|
|
2417
|
+
/* @__PURE__ */ jsxs8("div", { className: "aui-kpi__content", "data-slot": "agent-ui-kpi-content", children: [
|
|
2097
2418
|
/* @__PURE__ */ jsx10("p", { className: "aui-kpi__value", "data-slot": "agent-ui-kpi-value", children: formatNumber(metric.value, metric.format) }),
|
|
2098
2419
|
metric.change !== void 0 ? /* @__PURE__ */ jsx10(TrendChange, { slot: "agent-ui-kpi-change", value: metric.change }) : null
|
|
2099
2420
|
] })
|
|
@@ -2114,12 +2435,12 @@ import {
|
|
|
2114
2435
|
Tag as Tag2,
|
|
2115
2436
|
TagGroup
|
|
2116
2437
|
} from "@heroui/react";
|
|
2117
|
-
import { useCallback as useCallback2, useMemo as useMemo2, useState as
|
|
2438
|
+
import { useCallback as useCallback2, useMemo as useMemo2, useState as useState5 } from "react";
|
|
2118
2439
|
|
|
2119
2440
|
// ../agent-ui/src/components/display-information/diagram.tsx
|
|
2120
2441
|
import { ArrowRotateLeft, Minus, Plus } from "@gravity-ui/icons";
|
|
2121
2442
|
import { Button, Modal, Separator, Tooltip } from "@heroui/react";
|
|
2122
|
-
import { useCallback, useEffect, useId as useId2, useRef, useState as
|
|
2443
|
+
import { useCallback, useEffect, useId as useId2, useRef, useState as useState3 } from "react";
|
|
2123
2444
|
|
|
2124
2445
|
// ../agent-ui/src/components/display-information/diagram-loader.ts
|
|
2125
2446
|
var FALLBACK_FONT = "Inter, ui-sans-serif, system-ui, sans-serif";
|
|
@@ -2162,7 +2483,7 @@ async function mermaidForElement(element) {
|
|
|
2162
2483
|
}
|
|
2163
2484
|
|
|
2164
2485
|
// ../agent-ui/src/components/display-information/diagram.tsx
|
|
2165
|
-
import { jsx as jsx11, jsxs as
|
|
2486
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2166
2487
|
var MIN_SCALE = 0.5;
|
|
2167
2488
|
var MAX_SCALE = 4;
|
|
2168
2489
|
var SCALE_STEP = 0.25;
|
|
@@ -2179,8 +2500,8 @@ function ExpandGlyph() {
|
|
|
2179
2500
|
) });
|
|
2180
2501
|
}
|
|
2181
2502
|
function useMermaidSvg(chart, renderId, enabled, fontSource) {
|
|
2182
|
-
const [svg, setSvg] =
|
|
2183
|
-
const [failed, setFailed] =
|
|
2503
|
+
const [svg, setSvg] = useState3(null);
|
|
2504
|
+
const [failed, setFailed] = useState3(false);
|
|
2184
2505
|
const container = useRef(null);
|
|
2185
2506
|
useEffect(() => {
|
|
2186
2507
|
if (!enabled) return;
|
|
@@ -2227,19 +2548,19 @@ function Diagram({ chart, title: title2 }) {
|
|
|
2227
2548
|
const baseId = useId2().replace(/[^a-zA-Z0-9]/g, "");
|
|
2228
2549
|
const frame = useRef(null);
|
|
2229
2550
|
const inline = useMermaidSvg(chart, `aui-diagram-${baseId}`, true, frame);
|
|
2230
|
-
const [isExpanded, setIsExpanded] =
|
|
2551
|
+
const [isExpanded, setIsExpanded] = useState3(false);
|
|
2231
2552
|
const expanded = useMermaidSvg(chart, `aui-diagram-modal-${baseId}`, isExpanded, frame);
|
|
2232
|
-
const [scale, setScale] =
|
|
2233
|
-
const [portalContainer, setPortalContainer] =
|
|
2553
|
+
const [scale, setScale] = useState3(1);
|
|
2554
|
+
const [portalContainer, setPortalContainer] = useState3();
|
|
2234
2555
|
const frameRef = useCallback((node) => {
|
|
2235
2556
|
frame.current = node;
|
|
2236
2557
|
setPortalContainer(resolveOverlayPortalContainer(node));
|
|
2237
2558
|
}, []);
|
|
2238
2559
|
const zoom = (delta) => setScale((current) => Math.min(MAX_SCALE, Math.max(MIN_SCALE, current + delta)));
|
|
2239
2560
|
if (inline.failed) return /* @__PURE__ */ jsx11(CodeBlock, { code: chart, language: "mermaid" });
|
|
2240
|
-
return /* @__PURE__ */
|
|
2561
|
+
return /* @__PURE__ */ jsxs9("div", { ref: frameRef, className: "aui-diagram", "data-slot": "agent-ui-diagram", children: [
|
|
2241
2562
|
/* @__PURE__ */ jsx11(DiagramSurface, { markup: inline.markup, pendingRef: inline.container }),
|
|
2242
|
-
inline.markup ? /* @__PURE__ */
|
|
2563
|
+
inline.markup ? /* @__PURE__ */ jsxs9(
|
|
2243
2564
|
Modal,
|
|
2244
2565
|
{
|
|
2245
2566
|
isOpen: isExpanded,
|
|
@@ -2267,21 +2588,21 @@ function Diagram({ chart, title: title2 }) {
|
|
|
2267
2588
|
className: "aui-diagram-modal__backdrop",
|
|
2268
2589
|
UNSTABLE_portalContainer: portalContainer,
|
|
2269
2590
|
variant: "blur",
|
|
2270
|
-
children: /* @__PURE__ */ jsx11(Modal.Container, { className: "aui-diagram-modal__container", placement: "center", children: /* @__PURE__ */
|
|
2591
|
+
children: /* @__PURE__ */ jsx11(Modal.Container, { className: "aui-diagram-modal__container", placement: "center", children: /* @__PURE__ */ jsxs9(
|
|
2271
2592
|
Modal.Dialog,
|
|
2272
2593
|
{
|
|
2273
2594
|
"aria-label": title2 ? `${title2} diagram` : "Diagram",
|
|
2274
2595
|
className: "aui-diagram-modal__dialog",
|
|
2275
2596
|
"data-slot": "agent-ui-diagram-modal",
|
|
2276
2597
|
children: [
|
|
2277
|
-
/* @__PURE__ */ jsx11("div", { className: "aui-diagram-modal__controls", children: /* @__PURE__ */
|
|
2598
|
+
/* @__PURE__ */ jsx11("div", { className: "aui-diagram-modal__controls", children: /* @__PURE__ */ jsxs9(
|
|
2278
2599
|
"div",
|
|
2279
2600
|
{
|
|
2280
2601
|
"aria-label": "Diagram zoom controls",
|
|
2281
2602
|
className: "aui-diagram-modal__control-group",
|
|
2282
2603
|
role: "toolbar",
|
|
2283
2604
|
children: [
|
|
2284
|
-
/* @__PURE__ */
|
|
2605
|
+
/* @__PURE__ */ jsxs9(Tooltip, { delay: 0, children: [
|
|
2285
2606
|
/* @__PURE__ */ jsx11(
|
|
2286
2607
|
Button,
|
|
2287
2608
|
{
|
|
@@ -2296,7 +2617,7 @@ function Diagram({ chart, title: title2 }) {
|
|
|
2296
2617
|
),
|
|
2297
2618
|
/* @__PURE__ */ jsx11(Tooltip.Content, { placement: "top", children: "Zoom out" })
|
|
2298
2619
|
] }),
|
|
2299
|
-
/* @__PURE__ */
|
|
2620
|
+
/* @__PURE__ */ jsxs9(Tooltip, { delay: 0, children: [
|
|
2300
2621
|
/* @__PURE__ */ jsx11(
|
|
2301
2622
|
Button,
|
|
2302
2623
|
{
|
|
@@ -2311,7 +2632,7 @@ function Diagram({ chart, title: title2 }) {
|
|
|
2311
2632
|
),
|
|
2312
2633
|
/* @__PURE__ */ jsx11(Tooltip.Content, { placement: "top", children: "Zoom in" })
|
|
2313
2634
|
] }),
|
|
2314
|
-
/* @__PURE__ */
|
|
2635
|
+
/* @__PURE__ */ jsxs9(
|
|
2315
2636
|
"output",
|
|
2316
2637
|
{
|
|
2317
2638
|
"aria-label": `Zoom level: ${Math.round(scale * 100)}%`,
|
|
@@ -2323,7 +2644,7 @@ function Diagram({ chart, title: title2 }) {
|
|
|
2323
2644
|
}
|
|
2324
2645
|
),
|
|
2325
2646
|
/* @__PURE__ */ jsx11(Separator, { className: "aui-diagram-modal__separator", orientation: "vertical" }),
|
|
2326
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ jsxs9(Tooltip, { delay: 0, children: [
|
|
2327
2648
|
/* @__PURE__ */ jsx11(
|
|
2328
2649
|
Button,
|
|
2329
2650
|
{
|
|
@@ -2339,7 +2660,7 @@ function Diagram({ chart, title: title2 }) {
|
|
|
2339
2660
|
/* @__PURE__ */ jsx11(Tooltip.Content, { placement: "top", children: "Reset zoom" })
|
|
2340
2661
|
] }),
|
|
2341
2662
|
/* @__PURE__ */ jsx11(Separator, { className: "aui-diagram-modal__separator", orientation: "vertical" }),
|
|
2342
|
-
/* @__PURE__ */
|
|
2663
|
+
/* @__PURE__ */ jsxs9(Tooltip, { delay: 0, children: [
|
|
2343
2664
|
/* @__PURE__ */ jsx11(Modal.CloseTrigger, { className: "aui-diagram-modal__close" }),
|
|
2344
2665
|
/* @__PURE__ */ jsx11(Tooltip.Content, { placement: "top", children: "Close" })
|
|
2345
2666
|
] })
|
|
@@ -2367,7 +2688,7 @@ function Diagram({ chart, title: title2 }) {
|
|
|
2367
2688
|
|
|
2368
2689
|
// ../agent-ui/src/components/display-information/fallback-image.tsx
|
|
2369
2690
|
import { Picture } from "@gravity-ui/icons";
|
|
2370
|
-
import { useState as
|
|
2691
|
+
import { useState as useState4 } from "react";
|
|
2371
2692
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
2372
2693
|
function FallbackImage({
|
|
2373
2694
|
alt = "",
|
|
@@ -2382,7 +2703,7 @@ function FallbackImage({
|
|
|
2382
2703
|
srcSet,
|
|
2383
2704
|
...props
|
|
2384
2705
|
}) {
|
|
2385
|
-
const [failedSrc, setFailedSrc] =
|
|
2706
|
+
const [failedSrc, setFailedSrc] = useState4();
|
|
2386
2707
|
if (!src || failedSrc === src) {
|
|
2387
2708
|
return /* @__PURE__ */ jsx12(
|
|
2388
2709
|
"span",
|
|
@@ -2419,7 +2740,7 @@ function FallbackImage({
|
|
|
2419
2740
|
}
|
|
2420
2741
|
|
|
2421
2742
|
// ../agent-ui/src/components/display-information/display-views.tsx
|
|
2422
|
-
import { Fragment, jsx as jsx13, jsxs as
|
|
2743
|
+
import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2423
2744
|
function TextView({ className, component }) {
|
|
2424
2745
|
if (component.variant === "clear") {
|
|
2425
2746
|
return /* @__PURE__ */ jsx13(
|
|
@@ -2436,7 +2757,7 @@ function TextView({ className, component }) {
|
|
|
2436
2757
|
return /* @__PURE__ */ jsx13(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsx13("div", { className: "aui-prose", "data-slot": "agent-ui-text", "data-variant": "card", children: renderInlineMarkdown(component.content) }) });
|
|
2437
2758
|
}
|
|
2438
2759
|
function CalloutView({ className, component }) {
|
|
2439
|
-
return /* @__PURE__ */ jsx13(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */
|
|
2760
|
+
return /* @__PURE__ */ jsx13(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsxs10(
|
|
2440
2761
|
"div",
|
|
2441
2762
|
{
|
|
2442
2763
|
className: "aui-callout",
|
|
@@ -2466,8 +2787,8 @@ function CalloutView({ className, component }) {
|
|
|
2466
2787
|
}
|
|
2467
2788
|
function ImageView({ className, component, onSelect }) {
|
|
2468
2789
|
const layout = component.variant ?? "grid";
|
|
2469
|
-
const [portalContainer, setPortalContainer] =
|
|
2470
|
-
const [failedSources, setFailedSources] =
|
|
2790
|
+
const [portalContainer, setPortalContainer] = useState5();
|
|
2791
|
+
const [failedSources, setFailedSources] = useState5(() => /* @__PURE__ */ new Set());
|
|
2471
2792
|
const imagesRef = useCallback2((node) => {
|
|
2472
2793
|
setPortalContainer(resolveOverlayPortalContainer(node));
|
|
2473
2794
|
}, []);
|
|
@@ -2481,7 +2802,7 @@ function ImageView({ className, component, onSelect }) {
|
|
|
2481
2802
|
}, []);
|
|
2482
2803
|
const galleryItems = component.images.map((item) => {
|
|
2483
2804
|
const failed = failedSources.has(item.src);
|
|
2484
|
-
const tile = /* @__PURE__ */
|
|
2805
|
+
const tile = /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
2485
2806
|
/* @__PURE__ */ jsx13("span", { className: "aui-image__frame", "data-slot": "agent-ui-image-frame", children: /* @__PURE__ */ jsx13(
|
|
2486
2807
|
FallbackImage,
|
|
2487
2808
|
{
|
|
@@ -2507,7 +2828,7 @@ function ImageView({ className, component, onSelect }) {
|
|
|
2507
2828
|
item.src
|
|
2508
2829
|
);
|
|
2509
2830
|
}
|
|
2510
|
-
return /* @__PURE__ */
|
|
2831
|
+
return /* @__PURE__ */ jsxs10(Modal2, { children: [
|
|
2511
2832
|
/* @__PURE__ */ jsx13(
|
|
2512
2833
|
Modal2.Trigger,
|
|
2513
2834
|
{
|
|
@@ -2524,7 +2845,7 @@ function ImageView({ className, component, onSelect }) {
|
|
|
2524
2845
|
className: "aui-image-modal__backdrop",
|
|
2525
2846
|
UNSTABLE_portalContainer: portalContainer,
|
|
2526
2847
|
variant: "blur",
|
|
2527
|
-
children: /* @__PURE__ */ jsx13(Modal2.Container, { className: "aui-image-modal__container", placement: "center", children: /* @__PURE__ */
|
|
2848
|
+
children: /* @__PURE__ */ jsx13(Modal2.Container, { className: "aui-image-modal__container", placement: "center", children: /* @__PURE__ */ jsxs10(
|
|
2528
2849
|
Modal2.Dialog,
|
|
2529
2850
|
{
|
|
2530
2851
|
"aria-label": item.alt,
|
|
@@ -2589,7 +2910,7 @@ function ListView({ className, component }) {
|
|
|
2589
2910
|
className: "aui-list",
|
|
2590
2911
|
"data-slot": "agent-ui-list",
|
|
2591
2912
|
"data-style": style,
|
|
2592
|
-
children: component.items.map((item, index) => /* @__PURE__ */
|
|
2913
|
+
children: component.items.map((item, index) => /* @__PURE__ */ jsxs10("li", { className: "aui-list__item", "data-slot": "agent-ui-list-item", children: [
|
|
2593
2914
|
style === "checklist" ? /* @__PURE__ */ jsx13(
|
|
2594
2915
|
Checkbox,
|
|
2595
2916
|
{
|
|
@@ -2610,7 +2931,7 @@ function ListView({ className, component }) {
|
|
|
2610
2931
|
children: style === "numbered" ? `${index + 1}.` : "\u2022"
|
|
2611
2932
|
}
|
|
2612
2933
|
),
|
|
2613
|
-
/* @__PURE__ */
|
|
2934
|
+
/* @__PURE__ */ jsxs10("span", { className: "aui-list__body", "data-slot": "agent-ui-list-content", children: [
|
|
2614
2935
|
/* @__PURE__ */ jsx13(Label2, { "data-slot": "agent-ui-list-label", children: item.text }),
|
|
2615
2936
|
item.children?.length ? /* @__PURE__ */ jsx13("span", { className: "aui-list__children", "data-slot": "agent-ui-list-children", children: item.children.map((child) => /* @__PURE__ */ jsx13(Description2, { "data-slot": "agent-ui-list-child", children: child }, child)) }) : null
|
|
2616
2937
|
] })
|
|
@@ -2631,7 +2952,7 @@ function ListBlockView({ className, component }) {
|
|
|
2631
2952
|
description: component.description,
|
|
2632
2953
|
title: component.title,
|
|
2633
2954
|
variant: "outline",
|
|
2634
|
-
children: /* @__PURE__ */ jsx13("ul", { "aria-label": component.title, className: "aui-list-block", "data-slot": "agent-ui-list-block", children: component.items.map((item) => /* @__PURE__ */
|
|
2955
|
+
children: /* @__PURE__ */ jsx13("ul", { "aria-label": component.title, className: "aui-list-block", "data-slot": "agent-ui-list-block", children: component.items.map((item) => /* @__PURE__ */ jsxs10("li", { className: "aui-list-block__item", "data-slot": "agent-ui-list-block-item", children: [
|
|
2635
2956
|
item.imageUrl ? /* @__PURE__ */ jsx13(
|
|
2636
2957
|
FallbackImage,
|
|
2637
2958
|
{
|
|
@@ -2650,7 +2971,7 @@ function ListBlockView({ className, component }) {
|
|
|
2650
2971
|
children: item.icon ? /* @__PURE__ */ jsx13(AgentIcon, { "data-slot": "agent-ui-list-block-icon", name: item.icon }) : item.title.trim().charAt(0).toUpperCase()
|
|
2651
2972
|
}
|
|
2652
2973
|
),
|
|
2653
|
-
/* @__PURE__ */
|
|
2974
|
+
/* @__PURE__ */ jsxs10("span", { className: "aui-list-block__body", "data-slot": "agent-ui-list-block-content", children: [
|
|
2654
2975
|
/* @__PURE__ */ jsx13(Label2, { className: "aui-list-block__title", "data-slot": "agent-ui-list-block-title", children: item.title }),
|
|
2655
2976
|
item.description ? /* @__PURE__ */ jsx13(
|
|
2656
2977
|
Description2,
|
|
@@ -2661,7 +2982,7 @@ function ListBlockView({ className, component }) {
|
|
|
2661
2982
|
}
|
|
2662
2983
|
) : null
|
|
2663
2984
|
] }),
|
|
2664
|
-
item.meta || item.rating !== void 0 ? /* @__PURE__ */
|
|
2985
|
+
item.meta || item.rating !== void 0 ? /* @__PURE__ */ jsxs10("span", { className: "aui-list-block__footer", "data-slot": "agent-ui-list-block-footer", children: [
|
|
2665
2986
|
item.meta ? /* @__PURE__ */ jsx13(
|
|
2666
2987
|
"span",
|
|
2667
2988
|
{
|
|
@@ -2672,14 +2993,14 @@ function ListBlockView({ className, component }) {
|
|
|
2672
2993
|
}
|
|
2673
2994
|
) : null,
|
|
2674
2995
|
item.meta && item.rating !== void 0 ? /* @__PURE__ */ jsx13("span", { "aria-hidden": "true", className: "aui-list-block__meta-separator", children: "\xB7" }) : null,
|
|
2675
|
-
item.rating !== void 0 ? /* @__PURE__ */
|
|
2996
|
+
item.rating !== void 0 ? /* @__PURE__ */ jsxs10(
|
|
2676
2997
|
"span",
|
|
2677
2998
|
{
|
|
2678
2999
|
"aria-label": `${item.rating} out of 5 stars`,
|
|
2679
3000
|
className: "aui-list-block__rating",
|
|
2680
3001
|
"data-slot": "agent-ui-list-block-rating",
|
|
2681
3002
|
children: [
|
|
2682
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ jsxs10("span", { "aria-hidden": "true", children: [
|
|
2683
3004
|
item.rating,
|
|
2684
3005
|
"/5"
|
|
2685
3006
|
] }),
|
|
@@ -2708,8 +3029,8 @@ function AccordionView({ className, component }) {
|
|
|
2708
3029
|
className: "aui-accordion",
|
|
2709
3030
|
"data-slot": "agent-ui-accordion",
|
|
2710
3031
|
defaultExpandedKeys: component.sections.filter((section) => section.defaultOpen).map((section) => section.id),
|
|
2711
|
-
children: component.sections.map((section) => /* @__PURE__ */
|
|
2712
|
-
/* @__PURE__ */ jsx13(Accordion.Heading, { children: /* @__PURE__ */
|
|
3032
|
+
children: component.sections.map((section) => /* @__PURE__ */ jsxs10(Accordion.Item, { "data-slot": "agent-ui-accordion-item", id: section.id, children: [
|
|
3033
|
+
/* @__PURE__ */ jsx13(Accordion.Heading, { children: /* @__PURE__ */ jsxs10(Accordion.Trigger, { "data-slot": "agent-ui-accordion-trigger", children: [
|
|
2713
3034
|
section.title,
|
|
2714
3035
|
/* @__PURE__ */ jsx13(Accordion.Indicator, { "data-slot": "agent-ui-accordion-indicator" })
|
|
2715
3036
|
] }) }),
|
|
@@ -2719,8 +3040,8 @@ function AccordionView({ className, component }) {
|
|
|
2719
3040
|
) });
|
|
2720
3041
|
}
|
|
2721
3042
|
function StepsView({ className, component, onSelect }) {
|
|
2722
|
-
const [portalContainer, setPortalContainer] =
|
|
2723
|
-
const [failedSources, setFailedSources] =
|
|
3043
|
+
const [portalContainer, setPortalContainer] = useState5();
|
|
3044
|
+
const [failedSources, setFailedSources] = useState5(() => /* @__PURE__ */ new Set());
|
|
2724
3045
|
const hasIcons = component.steps.some((step) => step.icon);
|
|
2725
3046
|
const hasImages = component.steps.some((step) => step.image);
|
|
2726
3047
|
const stepsRef = useCallback2((node) => {
|
|
@@ -2766,7 +3087,7 @@ function StepsView({ className, component, onSelect }) {
|
|
|
2766
3087
|
"data-has-image": step.image ? "true" : void 0,
|
|
2767
3088
|
"data-slot": "agent-ui-step",
|
|
2768
3089
|
"data-status": status,
|
|
2769
|
-
children: /* @__PURE__ */
|
|
3090
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "aui-steps__row", children: [
|
|
2770
3091
|
step.image ? imageFailed ? /* @__PURE__ */ jsx13(
|
|
2771
3092
|
"span",
|
|
2772
3093
|
{
|
|
@@ -2782,7 +3103,7 @@ function StepsView({ className, component, onSelect }) {
|
|
|
2782
3103
|
}
|
|
2783
3104
|
)
|
|
2784
3105
|
}
|
|
2785
|
-
) : /* @__PURE__ */
|
|
3106
|
+
) : /* @__PURE__ */ jsxs10(Modal2, { children: [
|
|
2786
3107
|
/* @__PURE__ */ jsx13(
|
|
2787
3108
|
Modal2.Trigger,
|
|
2788
3109
|
{
|
|
@@ -2809,7 +3130,7 @@ function StepsView({ className, component, onSelect }) {
|
|
|
2809
3130
|
className: "aui-image-modal__backdrop",
|
|
2810
3131
|
UNSTABLE_portalContainer: portalContainer,
|
|
2811
3132
|
variant: "blur",
|
|
2812
|
-
children: /* @__PURE__ */ jsx13(Modal2.Container, { className: "aui-image-modal__container", placement: "center", children: /* @__PURE__ */
|
|
3133
|
+
children: /* @__PURE__ */ jsx13(Modal2.Container, { className: "aui-image-modal__container", placement: "center", children: /* @__PURE__ */ jsxs10(
|
|
2813
3134
|
Modal2.Dialog,
|
|
2814
3135
|
{
|
|
2815
3136
|
"aria-label": step.image.alt,
|
|
@@ -2838,11 +3159,11 @@ function StepsView({ className, component, onSelect }) {
|
|
|
2838
3159
|
"data-slot": "agent-ui-step-action",
|
|
2839
3160
|
type: "button",
|
|
2840
3161
|
onClick: () => onSelect?.(createComponentSelection(component, step)),
|
|
2841
|
-
children: /* @__PURE__ */
|
|
3162
|
+
children: /* @__PURE__ */ jsxs10("span", { "data-slot": "agent-ui-step-content", children: [
|
|
2842
3163
|
step.timestamp || step.meta ? /* @__PURE__ */ jsx13("span", { className: "aui-steps__meta", "data-slot": "agent-ui-step-meta", children: [step.timestamp, step.meta].filter(Boolean).join(" \xB7 ") }) : null,
|
|
2843
3164
|
/* @__PURE__ */ jsx13("strong", { "data-slot": "agent-ui-step-title", children: step.title }),
|
|
2844
3165
|
step.content ? /* @__PURE__ */ jsx13("small", { "data-slot": "agent-ui-step-description", children: step.content }) : null,
|
|
2845
|
-
step.progress !== void 0 ? /* @__PURE__ */
|
|
3166
|
+
step.progress !== void 0 ? /* @__PURE__ */ jsxs10(
|
|
2846
3167
|
ProgressBar,
|
|
2847
3168
|
{
|
|
2848
3169
|
"aria-label": `${step.title} progress`,
|
|
@@ -2875,9 +3196,9 @@ function DiagramView({ className, component }) {
|
|
|
2875
3196
|
}
|
|
2876
3197
|
function TabsView({ className, component, onSelect, renderPanel }) {
|
|
2877
3198
|
const tabIds = useMemo2(() => new Set(component.tabs.map((tab) => tab.id)), [component.tabs]);
|
|
2878
|
-
const [selected, setSelected] =
|
|
3199
|
+
const [selected, setSelected] = useState5(component.defaultValue ?? component.tabs[0]?.id ?? "");
|
|
2879
3200
|
const activeId = tabIds.has(selected) ? selected : component.defaultValue ?? component.tabs[0]?.id ?? "";
|
|
2880
|
-
return /* @__PURE__ */ jsx13(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsx13("div", { className: "aui-tabs", "data-slot": "agent-ui-tabs", children: /* @__PURE__ */
|
|
3201
|
+
return /* @__PURE__ */ jsx13(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsx13("div", { className: "aui-tabs", "data-slot": "agent-ui-tabs", children: /* @__PURE__ */ jsxs10(
|
|
2881
3202
|
Tabs,
|
|
2882
3203
|
{
|
|
2883
3204
|
selectedKey: activeId,
|
|
@@ -2889,7 +3210,7 @@ function TabsView({ className, component, onSelect, renderPanel }) {
|
|
|
2889
3210
|
if (nextTab) onSelect?.(createComponentSelection(component, nextTab));
|
|
2890
3211
|
},
|
|
2891
3212
|
children: [
|
|
2892
|
-
/* @__PURE__ */ jsx13(Tabs.ListContainer, { children: /* @__PURE__ */ jsx13(Tabs.List, { "aria-label": component.title, children: component.tabs.map((tab) => /* @__PURE__ */
|
|
3213
|
+
/* @__PURE__ */ jsx13(Tabs.ListContainer, { children: /* @__PURE__ */ jsx13(Tabs.List, { "aria-label": component.title, children: component.tabs.map((tab) => /* @__PURE__ */ jsxs10(Tabs.Tab, { id: tab.id, children: [
|
|
2893
3214
|
tab.label,
|
|
2894
3215
|
/* @__PURE__ */ jsx13(Tabs.Indicator, {})
|
|
2895
3216
|
] }, tab.id)) }) }),
|
|
@@ -6616,13 +6937,13 @@ var ItemCardGroup = Object.assign(ItemCardGroupRoot, {
|
|
|
6616
6937
|
});
|
|
6617
6938
|
|
|
6618
6939
|
// ../agent-ui/src/components/display-information/item-card/item-card.tsx
|
|
6619
|
-
import { Fragment as
|
|
6940
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6620
6941
|
function itemCardContent({
|
|
6621
6942
|
left,
|
|
6622
6943
|
middle,
|
|
6623
6944
|
right
|
|
6624
6945
|
}) {
|
|
6625
|
-
return /* @__PURE__ */
|
|
6946
|
+
return /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
6626
6947
|
left ? /* @__PURE__ */ jsx16(ItemCard.Icon, { children: left }) : null,
|
|
6627
6948
|
/* @__PURE__ */ jsx16(ItemCard.Content, { children: middle }),
|
|
6628
6949
|
right ? /* @__PURE__ */ jsx16(ItemCard.Action, { children: right }) : null
|
|
@@ -6676,7 +6997,7 @@ function ItemCardView({
|
|
|
6676
6997
|
);
|
|
6677
6998
|
}
|
|
6678
6999
|
function ItemCardGroupView({ children, className, component }) {
|
|
6679
|
-
return /* @__PURE__ */
|
|
7000
|
+
return /* @__PURE__ */ jsxs11(
|
|
6680
7001
|
ItemCardGroup,
|
|
6681
7002
|
{
|
|
6682
7003
|
"aria-label": component.title,
|
|
@@ -6686,7 +7007,7 @@ function ItemCardGroupView({ children, className, component }) {
|
|
|
6686
7007
|
layout: component.layout,
|
|
6687
7008
|
variant: component.variant,
|
|
6688
7009
|
children: [
|
|
6689
|
-
component.showHeader ? /* @__PURE__ */
|
|
7010
|
+
component.showHeader ? /* @__PURE__ */ jsxs11(ItemCardGroup.Header, { children: [
|
|
6690
7011
|
/* @__PURE__ */ jsx16(ItemCardGroup.Title, { children: component.title }),
|
|
6691
7012
|
component.description ? /* @__PURE__ */ jsx16(ItemCardGroup.Description, { children: component.description }) : null
|
|
6692
7013
|
] }) : null,
|
|
@@ -6701,7 +7022,7 @@ import { Children } from "react";
|
|
|
6701
7022
|
|
|
6702
7023
|
// ../agent-ui/src/components/display-information/widget/widget.tsx
|
|
6703
7024
|
import { Picture as Picture2 } from "@gravity-ui/icons";
|
|
6704
|
-
import { useState as
|
|
7025
|
+
import { useState as useState6 } from "react";
|
|
6705
7026
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
6706
7027
|
var alignItems = { center: "center", end: "flex-end", start: "flex-start", stretch: "stretch" };
|
|
6707
7028
|
var justifyContent = {
|
|
@@ -6905,7 +7226,7 @@ function WidgetImage({
|
|
|
6905
7226
|
width,
|
|
6906
7227
|
...props
|
|
6907
7228
|
}) {
|
|
6908
|
-
const [failedSrc, setFailedSrc] =
|
|
7229
|
+
const [failedSrc, setFailedSrc] = useState6();
|
|
6909
7230
|
const visualProps = {
|
|
6910
7231
|
"data-flush": flush || void 0,
|
|
6911
7232
|
"data-frame": frame || void 0,
|
|
@@ -7068,7 +7389,7 @@ import {
|
|
|
7068
7389
|
useId as useId3,
|
|
7069
7390
|
useMemo as useMemo5,
|
|
7070
7391
|
useRef as useRef2,
|
|
7071
|
-
useState as
|
|
7392
|
+
useState as useState7
|
|
7072
7393
|
} from "react";
|
|
7073
7394
|
|
|
7074
7395
|
// ../agent-ui/src/components/display-information/map/map-provider-context.ts
|
|
@@ -7079,7 +7400,7 @@ function useAgentMapTileProvider() {
|
|
|
7079
7400
|
}
|
|
7080
7401
|
|
|
7081
7402
|
// ../agent-ui/src/components/display-information/map/map.tsx
|
|
7082
|
-
import { Fragment as
|
|
7403
|
+
import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
7083
7404
|
var ratingFormatter = new Intl.NumberFormat(void 0, {
|
|
7084
7405
|
maximumFractionDigits: 1,
|
|
7085
7406
|
minimumFractionDigits: 1
|
|
@@ -7127,7 +7448,7 @@ function prefersReducedMotion() {
|
|
|
7127
7448
|
}
|
|
7128
7449
|
function MapLocationImage({ className, location }) {
|
|
7129
7450
|
const image = location.images?.[0];
|
|
7130
|
-
const [failedSource, setFailedSource] =
|
|
7451
|
+
const [failedSource, setFailedSource] = useState7();
|
|
7131
7452
|
if (!image || failedSource === image.src) {
|
|
7132
7453
|
return /* @__PURE__ */ jsx19("span", { "aria-hidden": "true", className: mergeClassNames(className, "aui-map__image-fallback"), children: getInitials(location.title) });
|
|
7133
7454
|
}
|
|
@@ -7174,16 +7495,16 @@ function LocationMetadata({
|
|
|
7174
7495
|
showCategory = true
|
|
7175
7496
|
}) {
|
|
7176
7497
|
const ratingLabel = location.rating === void 0 ? void 0 : `${formatRating(location.rating)} out of 5${location.reviewCount === void 0 ? "" : `, ${reviewCountFormatter.format(location.reviewCount)} reviews`}`;
|
|
7177
|
-
return /* @__PURE__ */
|
|
7178
|
-
location.rating !== void 0 ? /* @__PURE__ */
|
|
7498
|
+
return /* @__PURE__ */ jsxs12("span", { className: "aui-map__metadata", "data-slot": "agent-ui-map-location-metadata", children: [
|
|
7499
|
+
location.rating !== void 0 ? /* @__PURE__ */ jsxs12("span", { "aria-label": ratingLabel, className: "aui-map__rating", children: [
|
|
7179
7500
|
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", children: formatRating(location.rating) }),
|
|
7180
7501
|
/* @__PURE__ */ jsx19(StarFill, { "aria-hidden": "true" })
|
|
7181
7502
|
] }) : null,
|
|
7182
|
-
location.reviewCount !== void 0 ? /* @__PURE__ */
|
|
7503
|
+
location.reviewCount !== void 0 ? /* @__PURE__ */ jsxs12("span", { "aria-hidden": "true", children: [
|
|
7183
7504
|
reviewCountFormatter.format(location.reviewCount),
|
|
7184
7505
|
" reviews"
|
|
7185
7506
|
] }) : null,
|
|
7186
|
-
showCategory && location.category ? /* @__PURE__ */
|
|
7507
|
+
showCategory && location.category ? /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
7187
7508
|
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", className: "aui-map__metadata-separator", children: "\xB7" }),
|
|
7188
7509
|
/* @__PURE__ */ jsx19("span", { children: location.category })
|
|
7189
7510
|
] }) : null
|
|
@@ -7196,7 +7517,7 @@ function HostTileMapSurface({ component, onSelect, selectedLocationId }) {
|
|
|
7196
7517
|
() => new Map(component.locations.map((location) => [location.id, location])),
|
|
7197
7518
|
[component.locations]
|
|
7198
7519
|
);
|
|
7199
|
-
return /* @__PURE__ */
|
|
7520
|
+
return /* @__PURE__ */ jsxs12(
|
|
7200
7521
|
"div",
|
|
7201
7522
|
{
|
|
7202
7523
|
"aria-label": `${component.title} map with ${component.locations.length} locations`,
|
|
@@ -7205,7 +7526,7 @@ function HostTileMapSurface({ component, onSelect, selectedLocationId }) {
|
|
|
7205
7526
|
"data-slot": "agent-ui-map-surface",
|
|
7206
7527
|
role: "region",
|
|
7207
7528
|
children: [
|
|
7208
|
-
/* @__PURE__ */
|
|
7529
|
+
/* @__PURE__ */ jsxs12(
|
|
7209
7530
|
"svg",
|
|
7210
7531
|
{
|
|
7211
7532
|
"aria-hidden": "true",
|
|
@@ -7258,7 +7579,7 @@ function HostTileMapSurface({ component, onSelect, selectedLocationId }) {
|
|
|
7258
7579
|
const selected = location.id === selectedLocationId;
|
|
7259
7580
|
const markerLabel = location.rating !== void 0 ? formatRating(location.rating) : location.relevance !== void 0 ? `${Math.round(location.relevance * 100)}%` : String(index + 1);
|
|
7260
7581
|
const accessibleLabel = `Select ${location.title} on map${location.rating === void 0 ? "" : `, rated ${formatRating(location.rating)} out of 5`}`;
|
|
7261
|
-
return /* @__PURE__ */
|
|
7582
|
+
return /* @__PURE__ */ jsxs12(
|
|
7262
7583
|
"button",
|
|
7263
7584
|
{
|
|
7264
7585
|
"aria-label": accessibleLabel,
|
|
@@ -7315,7 +7636,7 @@ function ResultCard({
|
|
|
7315
7636
|
}) {
|
|
7316
7637
|
const area = getLocationArea(location.address);
|
|
7317
7638
|
const subtitle = [location.category, area].filter(Boolean).join(" \xB7 ");
|
|
7318
|
-
return /* @__PURE__ */
|
|
7639
|
+
return /* @__PURE__ */ jsxs12(
|
|
7319
7640
|
"button",
|
|
7320
7641
|
{
|
|
7321
7642
|
ref: setRef,
|
|
@@ -7329,12 +7650,12 @@ function ResultCard({
|
|
|
7329
7650
|
onKeyDown,
|
|
7330
7651
|
children: [
|
|
7331
7652
|
/* @__PURE__ */ jsx19(MapLocationImage, { className: "aui-map__result-image", location }),
|
|
7332
|
-
/* @__PURE__ */
|
|
7653
|
+
/* @__PURE__ */ jsxs12("span", { className: "aui-map__result-content", children: [
|
|
7333
7654
|
/* @__PURE__ */ jsx19("span", { className: "aui-map__result-title", children: location.title }),
|
|
7334
7655
|
subtitle ? /* @__PURE__ */ jsx19("span", { className: "aui-map__result-subtitle", children: subtitle }) : null,
|
|
7335
7656
|
/* @__PURE__ */ jsx19(LocationMetadata, { location, showCategory: false })
|
|
7336
7657
|
] }),
|
|
7337
|
-
location.relevance !== void 0 ? /* @__PURE__ */ jsx19("span", { className: "aui-map__result-aside", children: /* @__PURE__ */
|
|
7658
|
+
location.relevance !== void 0 ? /* @__PURE__ */ jsx19("span", { className: "aui-map__result-aside", children: /* @__PURE__ */ jsxs12("span", { className: "aui-map__relevance", "data-slot": "agent-ui-map-relevance", children: [
|
|
7338
7659
|
Math.round(location.relevance * 100),
|
|
7339
7660
|
"% match"
|
|
7340
7661
|
] }) }) : null
|
|
@@ -7353,12 +7674,12 @@ function MapDetails({
|
|
|
7353
7674
|
const tileProvider = useAgentMapTileProvider();
|
|
7354
7675
|
const shouldReduceMotion = useReducedMotion();
|
|
7355
7676
|
const primaryImage = location.images?.[0];
|
|
7356
|
-
const [failedSource, setFailedSource] =
|
|
7677
|
+
const [failedSource, setFailedSource] = useState7();
|
|
7357
7678
|
const hasImage = primaryImage && primaryImage.src !== failedSource;
|
|
7358
7679
|
const animationDirection = shouldReduceMotion ? 0 : direction;
|
|
7359
7680
|
const transition = shouldReduceMotion ? reducedMotionTransition : detailTransition;
|
|
7360
|
-
return /* @__PURE__ */ jsx19(LazyMotion, { features: domAnimation, children: /* @__PURE__ */
|
|
7361
|
-
/* @__PURE__ */ jsx19("div", { className: "aui-map-detail__hero", "data-has-image": Boolean(hasImage), children: /* @__PURE__ */ jsx19(AnimatePresence, { custom: animationDirection, initial: false, mode: "popLayout", children: /* @__PURE__ */
|
|
7681
|
+
return /* @__PURE__ */ jsx19(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsxs12("div", { className: "aui-map-detail__content", children: [
|
|
7682
|
+
/* @__PURE__ */ jsx19("div", { className: "aui-map-detail__hero", "data-has-image": Boolean(hasImage), children: /* @__PURE__ */ jsx19(AnimatePresence, { custom: animationDirection, initial: false, mode: "popLayout", children: /* @__PURE__ */ jsxs12(
|
|
7362
7683
|
MapDetailPresenceSlide,
|
|
7363
7684
|
{
|
|
7364
7685
|
className: "aui-map-detail__hero-slide",
|
|
@@ -7376,7 +7697,7 @@ function MapDetails({
|
|
|
7376
7697
|
onError: () => setFailedSource(primaryImage.src)
|
|
7377
7698
|
}
|
|
7378
7699
|
) : /* @__PURE__ */ jsx19("span", { "aria-hidden": "true", className: "aui-map-detail__hero-fallback", children: getInitials(location.title) }),
|
|
7379
|
-
location.images && location.images.length > 1 ? /* @__PURE__ */
|
|
7700
|
+
location.images && location.images.length > 1 ? /* @__PURE__ */ jsxs12("span", { className: "aui-map-detail__image-count", children: [
|
|
7380
7701
|
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", children: "\u25A7" }),
|
|
7381
7702
|
" ",
|
|
7382
7703
|
location.images.length
|
|
@@ -7386,7 +7707,7 @@ function MapDetails({
|
|
|
7386
7707
|
location.id
|
|
7387
7708
|
) }) }),
|
|
7388
7709
|
/* @__PURE__ */ jsx19(Modal3.CloseTrigger, { "aria-label": "Close location details", className: "aui-map-detail__close" }),
|
|
7389
|
-
/* @__PURE__ */ jsx19(AnimatePresence, { custom: animationDirection, initial: false, mode: "popLayout", children: /* @__PURE__ */
|
|
7710
|
+
/* @__PURE__ */ jsx19(AnimatePresence, { custom: animationDirection, initial: false, mode: "popLayout", children: /* @__PURE__ */ jsxs12(
|
|
7390
7711
|
MapDetailPresenceSlide,
|
|
7391
7712
|
{
|
|
7392
7713
|
className: "aui-map-detail__body",
|
|
@@ -7394,7 +7715,7 @@ function MapDetails({
|
|
|
7394
7715
|
transition,
|
|
7395
7716
|
variants: detailBodyVariants,
|
|
7396
7717
|
children: [
|
|
7397
|
-
/* @__PURE__ */
|
|
7718
|
+
/* @__PURE__ */ jsxs12("div", { className: "aui-map-detail__heading", children: [
|
|
7398
7719
|
/* @__PURE__ */ jsx19("h2", { id: headingId, children: location.title }),
|
|
7399
7720
|
/* @__PURE__ */ jsx19(LocationMetadata, { location }),
|
|
7400
7721
|
location.address ? /* @__PURE__ */ jsx19("p", { className: "aui-map-detail__address", children: location.address }) : null
|
|
@@ -7416,7 +7737,7 @@ function MapDetails({
|
|
|
7416
7737
|
action2.id
|
|
7417
7738
|
);
|
|
7418
7739
|
}) }) : null,
|
|
7419
|
-
location.notes ? /* @__PURE__ */
|
|
7740
|
+
location.notes ? /* @__PURE__ */ jsxs12("section", { className: "aui-map-detail__notes", "data-slot": "agent-ui-map-detail-notes", children: [
|
|
7420
7741
|
/* @__PURE__ */ jsx19("span", { children: "Notes" }),
|
|
7421
7742
|
/* @__PURE__ */ jsx19("p", { children: renderInlineMarkdown(location.notes) })
|
|
7422
7743
|
] }) : null
|
|
@@ -7424,9 +7745,9 @@ function MapDetails({
|
|
|
7424
7745
|
},
|
|
7425
7746
|
location.id
|
|
7426
7747
|
) }),
|
|
7427
|
-
/* @__PURE__ */
|
|
7748
|
+
/* @__PURE__ */ jsxs12("footer", { className: "aui-map-detail__footer", children: [
|
|
7428
7749
|
/* @__PURE__ */ jsx19("span", { className: "aui-map-detail__provider", children: tileProvider?.attribution ?? "OpenStreetMap \xB7 CARTO" }),
|
|
7429
|
-
/* @__PURE__ */
|
|
7750
|
+
/* @__PURE__ */ jsxs12("div", { className: "aui-map-detail__navigation", children: [
|
|
7430
7751
|
/* @__PURE__ */ jsx19(
|
|
7431
7752
|
"button",
|
|
7432
7753
|
{
|
|
@@ -7437,7 +7758,7 @@ function MapDetails({
|
|
|
7437
7758
|
children: /* @__PURE__ */ jsx19(ChevronLeft, { "aria-hidden": "true" })
|
|
7438
7759
|
}
|
|
7439
7760
|
),
|
|
7440
|
-
/* @__PURE__ */
|
|
7761
|
+
/* @__PURE__ */ jsxs12("span", { "aria-live": "polite", children: [
|
|
7441
7762
|
currentIndex + 1,
|
|
7442
7763
|
" of ",
|
|
7443
7764
|
component.locations.length
|
|
@@ -7457,12 +7778,12 @@ function MapDetails({
|
|
|
7457
7778
|
] }) });
|
|
7458
7779
|
}
|
|
7459
7780
|
function MapView({ className, component, onSelect }) {
|
|
7460
|
-
const [selectedLocationId, setSelectedLocationId] =
|
|
7781
|
+
const [selectedLocationId, setSelectedLocationId] = useState7(
|
|
7461
7782
|
() => getInitialMapLocationId(component)
|
|
7462
7783
|
);
|
|
7463
|
-
const [detailsOpen, setDetailsOpen] =
|
|
7464
|
-
const [detailDirection, setDetailDirection] =
|
|
7465
|
-
const [portalContainer, setPortalContainer] =
|
|
7784
|
+
const [detailsOpen, setDetailsOpen] = useState7(false);
|
|
7785
|
+
const [detailDirection, setDetailDirection] = useState7(1);
|
|
7786
|
+
const [portalContainer, setPortalContainer] = useState7();
|
|
7466
7787
|
const detailHeadingId = useId3();
|
|
7467
7788
|
const resultRefs = useRef2(/* @__PURE__ */ new Map());
|
|
7468
7789
|
const scrollTimerRef = useRef2(void 0);
|
|
@@ -7586,7 +7907,7 @@ function MapView({ className, component, onSelect }) {
|
|
|
7586
7907
|
},
|
|
7587
7908
|
[activeIndex, component.locations, selectLocation]
|
|
7588
7909
|
);
|
|
7589
|
-
const title2 = /* @__PURE__ */
|
|
7910
|
+
const title2 = /* @__PURE__ */ jsxs12("span", { className: "aui-map__card-title", children: [
|
|
7590
7911
|
/* @__PURE__ */ jsx19(MapPin2, { "aria-hidden": "true" }),
|
|
7591
7912
|
/* @__PURE__ */ jsx19("span", { children: component.title })
|
|
7592
7913
|
] });
|
|
@@ -7596,7 +7917,7 @@ function MapView({ className, component, onSelect }) {
|
|
|
7596
7917
|
className: mergeClassNames("aui-map-card", className),
|
|
7597
7918
|
description: component.description,
|
|
7598
7919
|
title: title2,
|
|
7599
|
-
children: /* @__PURE__ */
|
|
7920
|
+
children: /* @__PURE__ */ jsxs12("div", { ref: componentRef, className: "aui-map", "data-slot": "agent-ui-map", children: [
|
|
7600
7921
|
/* @__PURE__ */ jsx19(
|
|
7601
7922
|
MapSurface,
|
|
7602
7923
|
{
|
|
@@ -7618,7 +7939,7 @@ function MapView({ className, component, onSelect }) {
|
|
|
7618
7939
|
onOpen: () => selectLocation(location, { openDetails: true, scroll: false })
|
|
7619
7940
|
}
|
|
7620
7941
|
) }, location.id)) }) }),
|
|
7621
|
-
/* @__PURE__ */
|
|
7942
|
+
/* @__PURE__ */ jsxs12("span", { "aria-live": "polite", className: "aui-map__live-region", children: [
|
|
7622
7943
|
"Result ",
|
|
7623
7944
|
activeIndex + 1,
|
|
7624
7945
|
" of ",
|
|
@@ -7662,11 +7983,11 @@ function MapView({ className, component, onSelect }) {
|
|
|
7662
7983
|
|
|
7663
7984
|
// ../agent-ui/src/components/display-information/product-card/product-card.tsx
|
|
7664
7985
|
import { Modal as Modal4 } from "@heroui/react";
|
|
7665
|
-
import { useCallback as useCallback4, useState as
|
|
7986
|
+
import { useCallback as useCallback4, useState as useState8 } from "react";
|
|
7666
7987
|
|
|
7667
7988
|
// ../agent-ui/src/components/primitives/rating-stars.tsx
|
|
7668
7989
|
import { StarFill as StarFill2 } from "@gravity-ui/icons";
|
|
7669
|
-
import { jsx as jsx20, jsxs as
|
|
7990
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7670
7991
|
var ratingFormatter2 = new Intl.NumberFormat(void 0, {
|
|
7671
7992
|
maximumFractionDigits: 1
|
|
7672
7993
|
});
|
|
@@ -7675,7 +7996,7 @@ function RatingStars({ className, count, value }) {
|
|
|
7675
7996
|
const clamped = Math.min(Math.max(value, 0), 5);
|
|
7676
7997
|
const label = `Rated ${ratingFormatter2.format(clamped)} out of 5${count === void 0 ? "" : `, ${countFormatter.format(count)} reviews`}`;
|
|
7677
7998
|
const stars = Array.from({ length: 5 }, (_, index) => /* @__PURE__ */ jsx20(StarFill2, { "aria-hidden": "true" }, index));
|
|
7678
|
-
return /* @__PURE__ */
|
|
7999
|
+
return /* @__PURE__ */ jsxs13(
|
|
7679
8000
|
"span",
|
|
7680
8001
|
{
|
|
7681
8002
|
"aria-label": label,
|
|
@@ -7683,12 +8004,12 @@ function RatingStars({ className, count, value }) {
|
|
|
7683
8004
|
"data-slot": "agent-ui-rating",
|
|
7684
8005
|
role: "img",
|
|
7685
8006
|
children: [
|
|
7686
|
-
/* @__PURE__ */
|
|
8007
|
+
/* @__PURE__ */ jsxs13("span", { "aria-hidden": "true", className: "aui-rating__stars", children: [
|
|
7687
8008
|
/* @__PURE__ */ jsx20("span", { className: "aui-rating__track", children: stars }),
|
|
7688
8009
|
/* @__PURE__ */ jsx20("span", { className: "aui-rating__fill", style: { width: `${clamped / 5 * 100}%` }, children: /* @__PURE__ */ jsx20("span", { className: "aui-rating__track", children: stars }) })
|
|
7689
8010
|
] }),
|
|
7690
8011
|
/* @__PURE__ */ jsx20("span", { "aria-hidden": "true", className: "aui-rating__value", children: ratingFormatter2.format(clamped) }),
|
|
7691
|
-
count === void 0 ? null : /* @__PURE__ */
|
|
8012
|
+
count === void 0 ? null : /* @__PURE__ */ jsxs13("span", { "aria-hidden": "true", className: "aui-rating__count", children: [
|
|
7692
8013
|
"(",
|
|
7693
8014
|
countFormatter.format(count),
|
|
7694
8015
|
")"
|
|
@@ -7699,7 +8020,7 @@ function RatingStars({ className, count, value }) {
|
|
|
7699
8020
|
}
|
|
7700
8021
|
|
|
7701
8022
|
// ../agent-ui/src/components/display-information/product-card/product-card.tsx
|
|
7702
|
-
import { jsx as jsx21, jsxs as
|
|
8023
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
7703
8024
|
var priceFormatters = /* @__PURE__ */ new Map();
|
|
7704
8025
|
function formatPrice(price) {
|
|
7705
8026
|
const currency2 = price.currency ?? "USD";
|
|
@@ -7740,8 +8061,8 @@ function ProductTile({
|
|
|
7740
8061
|
onSelect,
|
|
7741
8062
|
product
|
|
7742
8063
|
}) {
|
|
7743
|
-
const [portalContainer, setPortalContainer] =
|
|
7744
|
-
const [imageFailed, setImageFailed] =
|
|
8064
|
+
const [portalContainer, setPortalContainer] = useState8();
|
|
8065
|
+
const [imageFailed, setImageFailed] = useState8(false);
|
|
7745
8066
|
const mediaRef = useCallback4((node) => {
|
|
7746
8067
|
setPortalContainer(resolveOverlayPortalContainer(node));
|
|
7747
8068
|
}, []);
|
|
@@ -7754,12 +8075,12 @@ function ProductTile({
|
|
|
7754
8075
|
children: product.badge.label
|
|
7755
8076
|
}
|
|
7756
8077
|
) : null;
|
|
7757
|
-
return /* @__PURE__ */
|
|
7758
|
-
imageFailed ? /* @__PURE__ */
|
|
8078
|
+
return /* @__PURE__ */ jsxs14("article", { className: "aui-product", "data-layout": layout, "data-slot": "agent-ui-product", children: [
|
|
8079
|
+
imageFailed ? /* @__PURE__ */ jsxs14("span", { className: "aui-product__media", "data-slot": "agent-ui-product-media", children: [
|
|
7759
8080
|
/* @__PURE__ */ jsx21(FallbackImage, { alt: product.image.alt, className: "aui-product__image", src: void 0 }),
|
|
7760
8081
|
badge
|
|
7761
|
-
] }) : /* @__PURE__ */
|
|
7762
|
-
/* @__PURE__ */
|
|
8082
|
+
] }) : /* @__PURE__ */ jsxs14(Modal4, { children: [
|
|
8083
|
+
/* @__PURE__ */ jsxs14(
|
|
7763
8084
|
Modal4.Trigger,
|
|
7764
8085
|
{
|
|
7765
8086
|
ref: mediaRef,
|
|
@@ -7787,7 +8108,7 @@ function ProductTile({
|
|
|
7787
8108
|
className: "aui-image-modal__backdrop",
|
|
7788
8109
|
UNSTABLE_portalContainer: portalContainer,
|
|
7789
8110
|
variant: "blur",
|
|
7790
|
-
children: /* @__PURE__ */ jsx21(Modal4.Container, { className: "aui-image-modal__container", placement: "center", children: /* @__PURE__ */
|
|
8111
|
+
children: /* @__PURE__ */ jsx21(Modal4.Container, { className: "aui-image-modal__container", placement: "center", children: /* @__PURE__ */ jsxs14(
|
|
7791
8112
|
Modal4.Dialog,
|
|
7792
8113
|
{
|
|
7793
8114
|
"aria-label": product.image.alt,
|
|
@@ -7809,7 +8130,7 @@ function ProductTile({
|
|
|
7809
8130
|
}
|
|
7810
8131
|
)
|
|
7811
8132
|
] }),
|
|
7812
|
-
/* @__PURE__ */
|
|
8133
|
+
/* @__PURE__ */ jsxs14("span", { className: "aui-product__header", children: [
|
|
7813
8134
|
product.meta ? /* @__PURE__ */ jsx21("span", { className: "aui-product__meta", children: product.meta }) : null,
|
|
7814
8135
|
/* @__PURE__ */ jsx21("span", { className: "aui-product__price", "data-slot": "agent-ui-product-price", children: formatPrice(product.price) })
|
|
7815
8136
|
] }),
|
|
@@ -7879,12 +8200,12 @@ function ProductCardView({ className, component, onAction, onSelect }) {
|
|
|
7879
8200
|
|
|
7880
8201
|
// ../agent-ui/src/components/display-information/record-card/record-card.tsx
|
|
7881
8202
|
import { Modal as Modal5 } from "@heroui/react";
|
|
7882
|
-
import { useCallback as useCallback5, useState as
|
|
7883
|
-
import { Fragment as
|
|
8203
|
+
import { useCallback as useCallback5, useState as useState9 } from "react";
|
|
8204
|
+
import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
7884
8205
|
function RecordCardView({ className, component, onAction, onSelect }) {
|
|
7885
8206
|
const layout = component.layout ?? "details";
|
|
7886
|
-
const [portalContainer, setPortalContainer] =
|
|
7887
|
-
const [mediaFailed, setMediaFailed] =
|
|
8207
|
+
const [portalContainer, setPortalContainer] = useState9();
|
|
8208
|
+
const [mediaFailed, setMediaFailed] = useState9(false);
|
|
7888
8209
|
const mediaRef = useCallback5((node) => {
|
|
7889
8210
|
setPortalContainer(resolveOverlayPortalContainer(node));
|
|
7890
8211
|
}, []);
|
|
@@ -7922,7 +8243,7 @@ function RecordCardView({ className, component, onAction, onSelect }) {
|
|
|
7922
8243
|
footer,
|
|
7923
8244
|
title: component.title,
|
|
7924
8245
|
variant: component.variant,
|
|
7925
|
-
children: /* @__PURE__ */
|
|
8246
|
+
children: /* @__PURE__ */ jsxs15(WidgetCol, { className: "aui-record", gap: layout === "compact" ? 3 : 4, children: [
|
|
7926
8247
|
layout === "media" && component.image && mediaFailed ? /* @__PURE__ */ jsx22(
|
|
7927
8248
|
WidgetImage,
|
|
7928
8249
|
{
|
|
@@ -7933,7 +8254,7 @@ function RecordCardView({ className, component, onAction, onSelect }) {
|
|
|
7933
8254
|
width: "100%"
|
|
7934
8255
|
}
|
|
7935
8256
|
) : null,
|
|
7936
|
-
layout === "media" && component.image && !mediaFailed ? /* @__PURE__ */
|
|
8257
|
+
layout === "media" && component.image && !mediaFailed ? /* @__PURE__ */ jsxs15(Modal5, { children: [
|
|
7937
8258
|
/* @__PURE__ */ jsx22(
|
|
7938
8259
|
Modal5.Trigger,
|
|
7939
8260
|
{
|
|
@@ -7961,7 +8282,7 @@ function RecordCardView({ className, component, onAction, onSelect }) {
|
|
|
7961
8282
|
className: "aui-image-modal__backdrop",
|
|
7962
8283
|
UNSTABLE_portalContainer: portalContainer,
|
|
7963
8284
|
variant: "blur",
|
|
7964
|
-
children: /* @__PURE__ */ jsx22(Modal5.Container, { className: "aui-image-modal__container", placement: "center", children: /* @__PURE__ */
|
|
8285
|
+
children: /* @__PURE__ */ jsx22(Modal5.Container, { className: "aui-image-modal__container", placement: "center", children: /* @__PURE__ */ jsxs15(
|
|
7965
8286
|
Modal5.Dialog,
|
|
7966
8287
|
{
|
|
7967
8288
|
"aria-label": component.image.alt,
|
|
@@ -7983,7 +8304,7 @@ function RecordCardView({ className, component, onAction, onSelect }) {
|
|
|
7983
8304
|
}
|
|
7984
8305
|
)
|
|
7985
8306
|
] }) : null,
|
|
7986
|
-
component.image && layout !== "media" || component.eyebrow || status && layout !== "compact" ? /* @__PURE__ */
|
|
8307
|
+
component.image && layout !== "media" || component.eyebrow || status && layout !== "compact" ? /* @__PURE__ */ jsxs15(WidgetRow, { align: "center", gap: 3, children: [
|
|
7987
8308
|
component.image && layout !== "media" ? /* @__PURE__ */ jsx22(
|
|
7988
8309
|
WidgetImage,
|
|
7989
8310
|
{
|
|
@@ -7995,13 +8316,13 @@ function RecordCardView({ className, component, onAction, onSelect }) {
|
|
|
7995
8316
|
}
|
|
7996
8317
|
) : null,
|
|
7997
8318
|
component.eyebrow ? /* @__PURE__ */ jsx22(WidgetCaption, { className: "aui-record__eyebrow", value: component.eyebrow }) : null,
|
|
7998
|
-
status && layout !== "compact" ? /* @__PURE__ */
|
|
8319
|
+
status && layout !== "compact" ? /* @__PURE__ */ jsxs15(Fragment5, { children: [
|
|
7999
8320
|
/* @__PURE__ */ jsx22(WidgetSpacer, {}),
|
|
8000
8321
|
status
|
|
8001
8322
|
] }) : null
|
|
8002
8323
|
] }) : null,
|
|
8003
|
-
component.fields.length > 0 ? /* @__PURE__ */ jsx22("dl", { className: "aui-record__fields", "data-slot": "agent-ui-record-fields", children: component.fields.map((field) => /* @__PURE__ */
|
|
8004
|
-
/* @__PURE__ */
|
|
8324
|
+
component.fields.length > 0 ? /* @__PURE__ */ jsx22("dl", { className: "aui-record__fields", "data-slot": "agent-ui-record-fields", children: component.fields.map((field) => /* @__PURE__ */ jsxs15("div", { "data-slot": "agent-ui-record-field", children: [
|
|
8325
|
+
/* @__PURE__ */ jsxs15("dt", { children: [
|
|
8005
8326
|
field.icon ? /* @__PURE__ */ jsx22(AgentIcon, { "data-slot": "agent-ui-record-field-icon", name: field.icon }) : null,
|
|
8006
8327
|
field.label
|
|
8007
8328
|
] }),
|
|
@@ -8081,9 +8402,9 @@ function InitialAvatar({ name, src }) {
|
|
|
8081
8402
|
}
|
|
8082
8403
|
|
|
8083
8404
|
// ../agent-ui/src/components/display-information/response-compositions/commerce-views.tsx
|
|
8084
|
-
import { jsx as jsx24, jsxs as
|
|
8405
|
+
import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
8085
8406
|
function SummaryRow({ emphasis, label, value }) {
|
|
8086
|
-
return /* @__PURE__ */
|
|
8407
|
+
return /* @__PURE__ */ jsxs16(Widget.Row, { children: [
|
|
8087
8408
|
/* @__PURE__ */ jsx24(Widget.Text, { value: label, weight: emphasis ? "semibold" : "normal" }),
|
|
8088
8409
|
/* @__PURE__ */ jsx24(Widget.Spacer, {}),
|
|
8089
8410
|
/* @__PURE__ */ jsx24(Widget.Text, { value, weight: emphasis ? "semibold" : "normal" })
|
|
@@ -8095,16 +8416,16 @@ function PurchaseItemsView({
|
|
|
8095
8416
|
onAction,
|
|
8096
8417
|
onSelect
|
|
8097
8418
|
}) {
|
|
8098
|
-
return /* @__PURE__ */
|
|
8419
|
+
return /* @__PURE__ */ jsxs16(
|
|
8099
8420
|
Widget.Card,
|
|
8100
8421
|
{
|
|
8101
8422
|
className: mergeClassNames("aui-composition-card aui-purchase-items", className),
|
|
8102
8423
|
"data-component-kind": component.kind,
|
|
8103
8424
|
size: "sm",
|
|
8104
8425
|
children: [
|
|
8105
|
-
/* @__PURE__ */ jsx24(Widget.Col, { gap: 3, children: component.items.map((item) => /* @__PURE__ */
|
|
8426
|
+
/* @__PURE__ */ jsx24(Widget.Col, { gap: 3, children: component.items.map((item) => /* @__PURE__ */ jsxs16(Widget.Row, { align: "center", gap: 3, children: [
|
|
8106
8427
|
item.image ? /* @__PURE__ */ jsx24(Widget.Image, { alt: item.image.alt, radius: "xl", size: 48, src: item.image.src }) : null,
|
|
8107
|
-
/* @__PURE__ */
|
|
8428
|
+
/* @__PURE__ */ jsxs16(Widget.Col, { flex: 1, gap: 0, children: [
|
|
8108
8429
|
/* @__PURE__ */ jsx24(Widget.Text, { value: item.name, weight: "semibold" }),
|
|
8109
8430
|
item.description ? /* @__PURE__ */ jsx24(Widget.Caption, { value: item.description }) : null
|
|
8110
8431
|
] }),
|
|
@@ -8141,19 +8462,19 @@ function PurchaseCompleteView({
|
|
|
8141
8462
|
onAction,
|
|
8142
8463
|
onSelect
|
|
8143
8464
|
}) {
|
|
8144
|
-
return /* @__PURE__ */
|
|
8465
|
+
return /* @__PURE__ */ jsxs16(
|
|
8145
8466
|
Widget.Card,
|
|
8146
8467
|
{
|
|
8147
8468
|
className: mergeClassNames("aui-composition-card aui-purchase-complete", className),
|
|
8148
8469
|
"data-component-kind": component.kind,
|
|
8149
8470
|
size: "sm",
|
|
8150
8471
|
children: [
|
|
8151
|
-
/* @__PURE__ */
|
|
8472
|
+
/* @__PURE__ */ jsxs16(Widget.Row, { align: "center", gap: 2, children: [
|
|
8152
8473
|
/* @__PURE__ */ jsx24("span", { "aria-hidden": "true", className: "aui-purchase-complete__check", children: "\u2713" }),
|
|
8153
8474
|
/* @__PURE__ */ jsx24(Widget.Text, { color: "success", value: component.title, weight: "medium" })
|
|
8154
8475
|
] }),
|
|
8155
8476
|
/* @__PURE__ */ jsx24(Widget.Divider, { flush: true }),
|
|
8156
|
-
/* @__PURE__ */
|
|
8477
|
+
/* @__PURE__ */ jsxs16(Widget.Row, { gap: 3, children: [
|
|
8157
8478
|
component.product.image ? /* @__PURE__ */ jsx24(
|
|
8158
8479
|
Widget.Image,
|
|
8159
8480
|
{
|
|
@@ -8164,12 +8485,12 @@ function PurchaseCompleteView({
|
|
|
8164
8485
|
src: component.product.image.src
|
|
8165
8486
|
}
|
|
8166
8487
|
) : null,
|
|
8167
|
-
/* @__PURE__ */
|
|
8488
|
+
/* @__PURE__ */ jsxs16(Widget.Col, { gap: 1, children: [
|
|
8168
8489
|
/* @__PURE__ */ jsx24(Widget.Title, { value: component.product.name }),
|
|
8169
8490
|
component.product.description ? /* @__PURE__ */ jsx24(Widget.Caption, { value: component.product.description }) : null
|
|
8170
8491
|
] })
|
|
8171
8492
|
] }),
|
|
8172
|
-
/* @__PURE__ */
|
|
8493
|
+
/* @__PURE__ */ jsxs16(Widget.Col, { gap: 2, children: [
|
|
8173
8494
|
component.details.map((detail) => /* @__PURE__ */ jsx24(SummaryRow, { label: detail.label, value: detail.value }, detail.label)),
|
|
8174
8495
|
component.paid ? /* @__PURE__ */ jsx24(
|
|
8175
8496
|
SummaryRow,
|
|
@@ -8195,26 +8516,26 @@ function PurchaseCompleteView({
|
|
|
8195
8516
|
}
|
|
8196
8517
|
|
|
8197
8518
|
// ../agent-ui/src/components/display-information/response-compositions/event-views.tsx
|
|
8198
|
-
import { jsx as jsx25, jsxs as
|
|
8519
|
+
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
8199
8520
|
function CreateEventView({
|
|
8200
8521
|
className,
|
|
8201
8522
|
component,
|
|
8202
8523
|
onAction,
|
|
8203
8524
|
onSelect
|
|
8204
8525
|
}) {
|
|
8205
|
-
return /* @__PURE__ */
|
|
8526
|
+
return /* @__PURE__ */ jsxs17(
|
|
8206
8527
|
Widget.Card,
|
|
8207
8528
|
{
|
|
8208
8529
|
className: mergeClassNames("aui-composition-card aui-create-event", className),
|
|
8209
8530
|
"data-component-kind": component.kind,
|
|
8210
8531
|
size: "md",
|
|
8211
8532
|
children: [
|
|
8212
|
-
/* @__PURE__ */
|
|
8213
|
-
/* @__PURE__ */
|
|
8533
|
+
/* @__PURE__ */ jsxs17(Widget.Row, { align: "start", gap: 4, children: [
|
|
8534
|
+
/* @__PURE__ */ jsxs17(Widget.Col, { align: "center", gap: 0, width: 64, children: [
|
|
8214
8535
|
/* @__PURE__ */ jsx25(Widget.Caption, { value: component.date.weekday }),
|
|
8215
8536
|
/* @__PURE__ */ jsx25(Widget.Title, { size: "3xl", value: component.date.day, weight: "normal" })
|
|
8216
8537
|
] }),
|
|
8217
|
-
/* @__PURE__ */ jsx25(Widget.Col, { flex: 1, gap: 2, children: component.events.map((event) => /* @__PURE__ */
|
|
8538
|
+
/* @__PURE__ */ jsx25(Widget.Col, { flex: 1, gap: 2, children: component.events.map((event) => /* @__PURE__ */ jsxs17(
|
|
8218
8539
|
Widget.Row,
|
|
8219
8540
|
{
|
|
8220
8541
|
align: "center",
|
|
@@ -8226,7 +8547,7 @@ function CreateEventView({
|
|
|
8226
8547
|
radius: "xl",
|
|
8227
8548
|
children: [
|
|
8228
8549
|
/* @__PURE__ */ jsx25("span", { className: "aui-create-event__marker" }),
|
|
8229
|
-
/* @__PURE__ */
|
|
8550
|
+
/* @__PURE__ */ jsxs17(Widget.Col, { gap: 0, children: [
|
|
8230
8551
|
/* @__PURE__ */ jsx25(Widget.Text, { value: event.title, weight: "semibold" }),
|
|
8231
8552
|
/* @__PURE__ */ jsx25(Widget.Caption, { value: event.time })
|
|
8232
8553
|
] })
|
|
@@ -8256,10 +8577,10 @@ function ViewEventView({ className, component }) {
|
|
|
8256
8577
|
className: mergeClassNames("aui-composition-card aui-view-event", className),
|
|
8257
8578
|
"data-component-kind": component.kind,
|
|
8258
8579
|
size: "sm",
|
|
8259
|
-
children: /* @__PURE__ */
|
|
8580
|
+
children: /* @__PURE__ */ jsxs17(Widget.Row, { align: "stretch", gap: 3, children: [
|
|
8260
8581
|
/* @__PURE__ */ jsx25("span", { className: "aui-view-event__marker", "data-tone": component.tone ?? "accent" }),
|
|
8261
|
-
/* @__PURE__ */
|
|
8262
|
-
/* @__PURE__ */
|
|
8582
|
+
/* @__PURE__ */ jsxs17(Widget.Col, { flex: 1, gap: 1, children: [
|
|
8583
|
+
/* @__PURE__ */ jsxs17(Widget.Row, { children: [
|
|
8263
8584
|
/* @__PURE__ */ jsx25(Widget.Caption, { value: component.date }),
|
|
8264
8585
|
/* @__PURE__ */ jsx25(Widget.Spacer, {}),
|
|
8265
8586
|
/* @__PURE__ */ jsx25(Widget.Text, { color: "accent", size: "sm", value: component.time })
|
|
@@ -8276,22 +8597,22 @@ function EventSessionView({
|
|
|
8276
8597
|
onAction,
|
|
8277
8598
|
onSelect
|
|
8278
8599
|
}) {
|
|
8279
|
-
return /* @__PURE__ */
|
|
8600
|
+
return /* @__PURE__ */ jsxs17(
|
|
8280
8601
|
Widget.Card,
|
|
8281
8602
|
{
|
|
8282
8603
|
className: mergeClassNames("aui-composition-card aui-event-session", className),
|
|
8283
8604
|
"data-component-kind": component.kind,
|
|
8284
8605
|
size: "md",
|
|
8285
8606
|
children: [
|
|
8286
|
-
/* @__PURE__ */
|
|
8607
|
+
/* @__PURE__ */ jsxs17(Widget.Col, { gap: 1, children: [
|
|
8287
8608
|
component.eyebrow ? /* @__PURE__ */ jsx25(Widget.Caption, { color: "warning", value: component.eyebrow }) : null,
|
|
8288
8609
|
/* @__PURE__ */ jsx25(Widget.Title, { value: component.title }),
|
|
8289
8610
|
component.description ? /* @__PURE__ */ jsx25(Widget.Caption, { value: component.description }) : null
|
|
8290
8611
|
] }),
|
|
8291
8612
|
/* @__PURE__ */ jsx25(Widget.Divider, { flush: true }),
|
|
8292
|
-
/* @__PURE__ */
|
|
8613
|
+
/* @__PURE__ */ jsxs17(Widget.Row, { align: "center", gap: 3, children: [
|
|
8293
8614
|
/* @__PURE__ */ jsx25("span", { "aria-hidden": "true", className: "aui-event-session__pin", children: "\u25CF" }),
|
|
8294
|
-
/* @__PURE__ */
|
|
8615
|
+
/* @__PURE__ */ jsxs17(Widget.Col, { gap: 0, children: [
|
|
8295
8616
|
/* @__PURE__ */ jsx25(Widget.Text, { value: component.location, weight: "semibold" }),
|
|
8296
8617
|
/* @__PURE__ */ jsx25(Widget.Caption, { value: component.time })
|
|
8297
8618
|
] }),
|
|
@@ -8306,9 +8627,9 @@ function EventSessionView({
|
|
|
8306
8627
|
}
|
|
8307
8628
|
) : null
|
|
8308
8629
|
] }),
|
|
8309
|
-
component.speakers.map((speaker) => /* @__PURE__ */
|
|
8630
|
+
component.speakers.map((speaker) => /* @__PURE__ */ jsxs17(Widget.Row, { align: "center", gap: 3, children: [
|
|
8310
8631
|
/* @__PURE__ */ jsx25(InitialAvatar, { name: speaker.name, src: speaker.image?.src }),
|
|
8311
|
-
/* @__PURE__ */
|
|
8632
|
+
/* @__PURE__ */ jsxs17(Widget.Col, { gap: 0, children: [
|
|
8312
8633
|
/* @__PURE__ */ jsx25(Widget.Text, { value: speaker.name, weight: "semibold" }),
|
|
8313
8634
|
/* @__PURE__ */ jsx25(Widget.Caption, { value: speaker.role })
|
|
8314
8635
|
] })
|
|
@@ -8319,14 +8640,14 @@ function EventSessionView({
|
|
|
8319
8640
|
}
|
|
8320
8641
|
|
|
8321
8642
|
// ../agent-ui/src/components/display-information/response-compositions/media-views.tsx
|
|
8322
|
-
import { jsx as jsx26, jsxs as
|
|
8643
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
8323
8644
|
function PlaylistView({
|
|
8324
8645
|
className,
|
|
8325
8646
|
component,
|
|
8326
8647
|
onAction,
|
|
8327
8648
|
onSelect
|
|
8328
8649
|
}) {
|
|
8329
|
-
return /* @__PURE__ */
|
|
8650
|
+
return /* @__PURE__ */ jsxs18(
|
|
8330
8651
|
Widget.Card,
|
|
8331
8652
|
{
|
|
8332
8653
|
className: mergeClassNames("aui-composition-card aui-playlist", className),
|
|
@@ -8343,10 +8664,10 @@ function PlaylistView({
|
|
|
8343
8664
|
width: "100%"
|
|
8344
8665
|
}
|
|
8345
8666
|
) : null,
|
|
8346
|
-
/* @__PURE__ */ jsx26(Widget.Col, { gap: 3, children: component.tracks.map((track, index) => /* @__PURE__ */
|
|
8667
|
+
/* @__PURE__ */ jsx26(Widget.Col, { gap: 3, children: component.tracks.map((track, index) => /* @__PURE__ */ jsxs18(Widget.Row, { align: "center", gap: 3, children: [
|
|
8347
8668
|
/* @__PURE__ */ jsx26(Widget.Caption, { value: index + 1 }),
|
|
8348
8669
|
track.image ? /* @__PURE__ */ jsx26(Widget.Image, { alt: track.image.alt, radius: "xl", size: 44, src: track.image.src }) : null,
|
|
8349
|
-
/* @__PURE__ */
|
|
8670
|
+
/* @__PURE__ */ jsxs18(Widget.Col, { flex: 1, gap: 0, children: [
|
|
8350
8671
|
/* @__PURE__ */ jsx26(Widget.Text, { value: track.title, weight: "semibold" }),
|
|
8351
8672
|
/* @__PURE__ */ jsx26(Widget.Caption, { value: track.artist })
|
|
8352
8673
|
] }),
|
|
@@ -8378,22 +8699,22 @@ function ChannelMessageView({
|
|
|
8378
8699
|
className,
|
|
8379
8700
|
component
|
|
8380
8701
|
}) {
|
|
8381
|
-
return /* @__PURE__ */
|
|
8702
|
+
return /* @__PURE__ */ jsxs18(
|
|
8382
8703
|
Widget.Card,
|
|
8383
8704
|
{
|
|
8384
8705
|
className: mergeClassNames("aui-composition-card aui-channel-message", className),
|
|
8385
8706
|
"data-component-kind": component.kind,
|
|
8386
8707
|
size: "md",
|
|
8387
8708
|
children: [
|
|
8388
|
-
/* @__PURE__ */
|
|
8709
|
+
/* @__PURE__ */ jsxs18(Widget.Row, { children: [
|
|
8389
8710
|
/* @__PURE__ */ jsx26(Widget.Text, { value: component.channel, weight: "medium" }),
|
|
8390
8711
|
/* @__PURE__ */ jsx26(Widget.Spacer, {}),
|
|
8391
8712
|
/* @__PURE__ */ jsx26(Widget.Caption, { value: component.timestamp })
|
|
8392
8713
|
] }),
|
|
8393
8714
|
/* @__PURE__ */ jsx26(Widget.Divider, { flush: true }),
|
|
8394
|
-
/* @__PURE__ */
|
|
8715
|
+
/* @__PURE__ */ jsxs18(Widget.Row, { align: "start", gap: 4, children: [
|
|
8395
8716
|
/* @__PURE__ */ jsx26(InitialAvatar, { name: component.author.name, src: component.author.image?.src }),
|
|
8396
|
-
/* @__PURE__ */
|
|
8717
|
+
/* @__PURE__ */ jsxs18(Widget.Col, { flex: 1, gap: 2, children: [
|
|
8397
8718
|
/* @__PURE__ */ jsx26(Widget.Text, { value: component.author.name, weight: "semibold" }),
|
|
8398
8719
|
/* @__PURE__ */ jsx26("p", { className: "aui-channel-message__content", children: component.content }),
|
|
8399
8720
|
component.attachments?.length ? /* @__PURE__ */ jsx26(Widget.Row, { className: "aui-channel-message__attachments", gap: 2, children: component.attachments.map(
|
|
@@ -8426,7 +8747,7 @@ function ChannelMessageView({
|
|
|
8426
8747
|
);
|
|
8427
8748
|
}
|
|
8428
8749
|
function PlayerCardView({ className, component }) {
|
|
8429
|
-
return /* @__PURE__ */
|
|
8750
|
+
return /* @__PURE__ */ jsxs18(
|
|
8430
8751
|
Widget.Card,
|
|
8431
8752
|
{
|
|
8432
8753
|
className: mergeClassNames("aui-composition-card aui-player-card", className),
|
|
@@ -8443,9 +8764,9 @@ function PlayerCardView({ className, component }) {
|
|
|
8443
8764
|
src: component.backgroundImage.src
|
|
8444
8765
|
}
|
|
8445
8766
|
) : null,
|
|
8446
|
-
/* @__PURE__ */
|
|
8767
|
+
/* @__PURE__ */ jsxs18(Widget.Row, { align: "center", className: "aui-player-card__content", children: [
|
|
8447
8768
|
/* @__PURE__ */ jsx26(Widget.Box, { minHeight: 160, width: "40%" }),
|
|
8448
|
-
/* @__PURE__ */
|
|
8769
|
+
/* @__PURE__ */ jsxs18(Widget.Col, { flex: "auto", gap: 3, children: [
|
|
8449
8770
|
/* @__PURE__ */ jsx26(
|
|
8450
8771
|
Widget.Title,
|
|
8451
8772
|
{
|
|
@@ -8455,7 +8776,7 @@ function PlayerCardView({ className, component }) {
|
|
|
8455
8776
|
weight: "normal"
|
|
8456
8777
|
}
|
|
8457
8778
|
),
|
|
8458
|
-
/* @__PURE__ */ jsx26(Widget.Row, { className: "aui-player-card__stats", children: component.stats.map((stat) => /* @__PURE__ */
|
|
8779
|
+
/* @__PURE__ */ jsx26(Widget.Row, { className: "aui-player-card__stats", children: component.stats.map((stat) => /* @__PURE__ */ jsxs18(Widget.Col, { flex: 1, gap: 0, children: [
|
|
8459
8780
|
/* @__PURE__ */ jsx26(Widget.Text, { value: stat.value, weight: "semibold" }),
|
|
8460
8781
|
/* @__PURE__ */ jsx26(Widget.Caption, { color: "white", value: stat.label })
|
|
8461
8782
|
] }, stat.label)) })
|
|
@@ -8467,21 +8788,21 @@ function PlayerCardView({ className, component }) {
|
|
|
8467
8788
|
}
|
|
8468
8789
|
|
|
8469
8790
|
// ../agent-ui/src/components/display-information/response-compositions/notification-view.tsx
|
|
8470
|
-
import { jsx as jsx27, jsxs as
|
|
8791
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
8471
8792
|
function EnableNotificationView({
|
|
8472
8793
|
className,
|
|
8473
8794
|
component,
|
|
8474
8795
|
onAction,
|
|
8475
8796
|
onSelect
|
|
8476
8797
|
}) {
|
|
8477
|
-
return /* @__PURE__ */
|
|
8798
|
+
return /* @__PURE__ */ jsxs19(
|
|
8478
8799
|
Widget.Card,
|
|
8479
8800
|
{
|
|
8480
8801
|
className: mergeClassNames("aui-composition-card aui-enable-notification", className),
|
|
8481
8802
|
"data-component-kind": component.kind,
|
|
8482
8803
|
size: "sm",
|
|
8483
8804
|
children: [
|
|
8484
|
-
/* @__PURE__ */
|
|
8805
|
+
/* @__PURE__ */ jsxs19(Widget.Col, { align: "center", gap: 3, padding: 3, children: [
|
|
8485
8806
|
/* @__PURE__ */ jsx27("span", { "aria-hidden": "true", className: "aui-enable-notification__icon", children: "\u2713" }),
|
|
8486
8807
|
/* @__PURE__ */ jsx27(Widget.Title, { align: "center", value: component.title }),
|
|
8487
8808
|
component.description ? /* @__PURE__ */ jsx27(Widget.Caption, { value: component.description }) : null
|
|
@@ -8503,7 +8824,7 @@ function EnableNotificationView({
|
|
|
8503
8824
|
|
|
8504
8825
|
// ../agent-ui/src/components/display-information/response-compositions/product-signals-view.tsx
|
|
8505
8826
|
import { Tabs as Tabs2 } from "@heroui/react";
|
|
8506
|
-
import { jsx as jsx28, jsxs as
|
|
8827
|
+
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
8507
8828
|
function ProductSignalsView({
|
|
8508
8829
|
className,
|
|
8509
8830
|
component,
|
|
@@ -8516,13 +8837,13 @@ function ProductSignalsView({
|
|
|
8516
8837
|
"data-component-kind": component.kind,
|
|
8517
8838
|
description: component.description,
|
|
8518
8839
|
title: component.title,
|
|
8519
|
-
children: /* @__PURE__ */
|
|
8840
|
+
children: /* @__PURE__ */ jsxs20(
|
|
8520
8841
|
Tabs2,
|
|
8521
8842
|
{
|
|
8522
8843
|
defaultSelectedKey: component.defaultValue ?? component.tabs[0]?.id,
|
|
8523
8844
|
variant: "secondary",
|
|
8524
8845
|
children: [
|
|
8525
|
-
/* @__PURE__ */ jsx28(Tabs2.ListContainer, { children: /* @__PURE__ */ jsx28(Tabs2.List, { "aria-label": `${component.title} views`, children: component.tabs.map((tab) => /* @__PURE__ */
|
|
8846
|
+
/* @__PURE__ */ jsx28(Tabs2.ListContainer, { children: /* @__PURE__ */ jsx28(Tabs2.List, { "aria-label": `${component.title} views`, children: component.tabs.map((tab) => /* @__PURE__ */ jsxs20(Tabs2.Tab, { id: tab.id, children: [
|
|
8526
8847
|
tab.label,
|
|
8527
8848
|
/* @__PURE__ */ jsx28(Tabs2.Indicator, {})
|
|
8528
8849
|
] }, tab.id)) }) }),
|
|
@@ -8535,12 +8856,12 @@ function ProductSignalsView({
|
|
|
8535
8856
|
}
|
|
8536
8857
|
|
|
8537
8858
|
// ../agent-ui/src/components/display-information/response-compositions/transport-views.tsx
|
|
8538
|
-
import { jsx as jsx29, jsxs as
|
|
8859
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
8539
8860
|
function FlightTrackerView({
|
|
8540
8861
|
className,
|
|
8541
8862
|
component
|
|
8542
8863
|
}) {
|
|
8543
|
-
return /* @__PURE__ */
|
|
8864
|
+
return /* @__PURE__ */ jsxs21(
|
|
8544
8865
|
Widget.Card,
|
|
8545
8866
|
{
|
|
8546
8867
|
className: mergeClassNames("aui-composition-card aui-flight-tracker", className),
|
|
@@ -8548,7 +8869,7 @@ function FlightTrackerView({
|
|
|
8548
8869
|
size: "md",
|
|
8549
8870
|
theme: "dark",
|
|
8550
8871
|
children: [
|
|
8551
|
-
/* @__PURE__ */
|
|
8872
|
+
/* @__PURE__ */ jsxs21(Widget.Row, { align: "center", gap: 2, children: [
|
|
8552
8873
|
component.airline.logo ? /* @__PURE__ */ jsx29(
|
|
8553
8874
|
Widget.Box,
|
|
8554
8875
|
{
|
|
@@ -8574,8 +8895,8 @@ function FlightTrackerView({
|
|
|
8574
8895
|
/* @__PURE__ */ jsx29(Widget.Caption, { color: "white", value: component.date })
|
|
8575
8896
|
] }),
|
|
8576
8897
|
/* @__PURE__ */ jsx29(Widget.Divider, { flush: true }),
|
|
8577
|
-
/* @__PURE__ */
|
|
8578
|
-
/* @__PURE__ */
|
|
8898
|
+
/* @__PURE__ */ jsxs21(Widget.Col, { gap: 3, children: [
|
|
8899
|
+
/* @__PURE__ */ jsxs21(Widget.Row, { align: "center", children: [
|
|
8579
8900
|
/* @__PURE__ */ jsx29(Widget.Text, { size: "lg", value: component.origin.label }),
|
|
8580
8901
|
/* @__PURE__ */ jsx29(Widget.Spacer, {}),
|
|
8581
8902
|
/* @__PURE__ */ jsx29(Widget.Text, { size: "lg", value: component.destination.label })
|
|
@@ -8592,13 +8913,13 @@ function FlightTrackerView({
|
|
|
8592
8913
|
children: /* @__PURE__ */ jsx29("span", { style: { width: `${component.progress ?? 0}%` } })
|
|
8593
8914
|
}
|
|
8594
8915
|
),
|
|
8595
|
-
/* @__PURE__ */
|
|
8596
|
-
/* @__PURE__ */
|
|
8916
|
+
/* @__PURE__ */ jsxs21(Widget.Row, { align: "center", children: [
|
|
8917
|
+
/* @__PURE__ */ jsxs21(Widget.Col, { gap: 0, children: [
|
|
8597
8918
|
/* @__PURE__ */ jsx29(Widget.Text, { value: component.origin.time }),
|
|
8598
8919
|
component.origin.status ? /* @__PURE__ */ jsx29(Widget.Caption, { color: "white", value: component.origin.status }) : null
|
|
8599
8920
|
] }),
|
|
8600
8921
|
/* @__PURE__ */ jsx29(Widget.Spacer, {}),
|
|
8601
|
-
/* @__PURE__ */
|
|
8922
|
+
/* @__PURE__ */ jsxs21(Widget.Col, { align: "end", gap: 0, children: [
|
|
8602
8923
|
/* @__PURE__ */ jsx29(Widget.Text, { value: component.destination.time }),
|
|
8603
8924
|
component.destination.status ? /* @__PURE__ */ jsx29(Widget.Caption, { color: "white", value: component.destination.status }) : null
|
|
8604
8925
|
] })
|
|
@@ -8609,7 +8930,7 @@ function FlightTrackerView({
|
|
|
8609
8930
|
);
|
|
8610
8931
|
}
|
|
8611
8932
|
function RideStatusView({ className, component }) {
|
|
8612
|
-
return /* @__PURE__ */
|
|
8933
|
+
return /* @__PURE__ */ jsxs21(
|
|
8613
8934
|
Widget.Card,
|
|
8614
8935
|
{
|
|
8615
8936
|
className: mergeClassNames("aui-composition-card aui-ride-status", className),
|
|
@@ -8617,13 +8938,13 @@ function RideStatusView({ className, component }) {
|
|
|
8617
8938
|
size: "sm",
|
|
8618
8939
|
children: [
|
|
8619
8940
|
/* @__PURE__ */ jsx29(Widget.Title, { size: "xl", value: component.eta }),
|
|
8620
|
-
/* @__PURE__ */
|
|
8621
|
-
/* @__PURE__ */
|
|
8941
|
+
/* @__PURE__ */ jsxs21(Widget.Row, { align: "center", gap: 3, children: [
|
|
8942
|
+
/* @__PURE__ */ jsxs21(Widget.Col, { gap: 0, children: [
|
|
8622
8943
|
/* @__PURE__ */ jsx29(Widget.Caption, { value: "Pick up" }),
|
|
8623
8944
|
/* @__PURE__ */ jsx29(Widget.Text, { truncate: true, value: component.pickup })
|
|
8624
8945
|
] }),
|
|
8625
8946
|
/* @__PURE__ */ jsx29(Widget.Spacer, {}),
|
|
8626
|
-
/* @__PURE__ */
|
|
8947
|
+
/* @__PURE__ */ jsxs21(Widget.Col, { align: "end", gap: 0, children: [
|
|
8627
8948
|
/* @__PURE__ */ jsx29(Widget.Caption, { value: "Driver" }),
|
|
8628
8949
|
/* @__PURE__ */ jsx29(Widget.Text, { value: component.driver.name })
|
|
8629
8950
|
] }),
|
|
@@ -8635,8 +8956,8 @@ function RideStatusView({ className, component }) {
|
|
|
8635
8956
|
}
|
|
8636
8957
|
|
|
8637
8958
|
// ../agent-ui/src/components/display-information/response-compositions/weather-views.tsx
|
|
8638
|
-
import { useState as
|
|
8639
|
-
import { Fragment as
|
|
8959
|
+
import { useState as useState10 } from "react";
|
|
8960
|
+
import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
8640
8961
|
function Cloud() {
|
|
8641
8962
|
return /* @__PURE__ */ jsx30(
|
|
8642
8963
|
"path",
|
|
@@ -8648,7 +8969,7 @@ function Cloud() {
|
|
|
8648
8969
|
);
|
|
8649
8970
|
}
|
|
8650
8971
|
function Sun({ small = false }) {
|
|
8651
|
-
return /* @__PURE__ */
|
|
8972
|
+
return /* @__PURE__ */ jsxs22("g", { transform: small ? "translate(-5 -5) scale(.72)" : void 0, children: [
|
|
8652
8973
|
/* @__PURE__ */ jsx30("circle", { cx: "24", cy: "20", fill: "currentColor", r: "7" }),
|
|
8653
8974
|
/* @__PURE__ */ jsx30(
|
|
8654
8975
|
"path",
|
|
@@ -8665,19 +8986,19 @@ function Sun({ small = false }) {
|
|
|
8665
8986
|
var weatherContent = {
|
|
8666
8987
|
clear: /* @__PURE__ */ jsx30(Sun, {}),
|
|
8667
8988
|
cloudy: /* @__PURE__ */ jsx30(Cloud, {}),
|
|
8668
|
-
drizzle: /* @__PURE__ */
|
|
8989
|
+
drizzle: /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
8669
8990
|
/* @__PURE__ */ jsx30(Cloud, {}),
|
|
8670
8991
|
/* @__PURE__ */ jsx30("path", { d: "m17 30-2 4m9-4-2 4m9-4-2 4", stroke: "currentColor", strokeLinecap: "round" })
|
|
8671
8992
|
] }),
|
|
8672
|
-
fog: /* @__PURE__ */
|
|
8993
|
+
fog: /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
8673
8994
|
/* @__PURE__ */ jsx30(Cloud, {}),
|
|
8674
8995
|
/* @__PURE__ */ jsx30("path", { d: "M10 31h27M13 36h21", stroke: "currentColor", strokeLinecap: "round", strokeWidth: "2" })
|
|
8675
8996
|
] }),
|
|
8676
|
-
"partly-cloudy": /* @__PURE__ */
|
|
8997
|
+
"partly-cloudy": /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
8677
8998
|
/* @__PURE__ */ jsx30(Sun, { small: true }),
|
|
8678
8999
|
/* @__PURE__ */ jsx30(Cloud, {})
|
|
8679
9000
|
] }),
|
|
8680
|
-
rain: /* @__PURE__ */
|
|
9001
|
+
rain: /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
8681
9002
|
/* @__PURE__ */ jsx30(Cloud, {}),
|
|
8682
9003
|
/* @__PURE__ */ jsx30(
|
|
8683
9004
|
"path",
|
|
@@ -8689,7 +9010,7 @@ var weatherContent = {
|
|
|
8689
9010
|
}
|
|
8690
9011
|
)
|
|
8691
9012
|
] }),
|
|
8692
|
-
snow: /* @__PURE__ */
|
|
9013
|
+
snow: /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
8693
9014
|
/* @__PURE__ */ jsx30(Cloud, {}),
|
|
8694
9015
|
/* @__PURE__ */ jsx30(
|
|
8695
9016
|
"path",
|
|
@@ -8701,11 +9022,11 @@ var weatherContent = {
|
|
|
8701
9022
|
}
|
|
8702
9023
|
)
|
|
8703
9024
|
] }),
|
|
8704
|
-
thunderstorm: /* @__PURE__ */
|
|
9025
|
+
thunderstorm: /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
8705
9026
|
/* @__PURE__ */ jsx30(Cloud, {}),
|
|
8706
9027
|
/* @__PURE__ */ jsx30("path", { d: "m25 28-5 8h5l-2 6 8-10h-5l3-4Z", fill: "currentColor" })
|
|
8707
9028
|
] }),
|
|
8708
|
-
unknown: /* @__PURE__ */
|
|
9029
|
+
unknown: /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
8709
9030
|
/* @__PURE__ */ jsx30("circle", { cx: "24", cy: "24", fill: "none", r: "15", stroke: "currentColor", strokeWidth: "2" }),
|
|
8710
9031
|
/* @__PURE__ */ jsx30(
|
|
8711
9032
|
"path",
|
|
@@ -8741,7 +9062,7 @@ var weatherArtwork = {
|
|
|
8741
9062
|
};
|
|
8742
9063
|
function WeatherIcon({ condition, size: size2 = 48 }) {
|
|
8743
9064
|
const source = weatherArtwork[condition];
|
|
8744
|
-
const [failedSource, setFailedSource] =
|
|
9065
|
+
const [failedSource, setFailedSource] = useState10();
|
|
8745
9066
|
const label = condition.replaceAll("-", " ");
|
|
8746
9067
|
if (source && source !== failedSource) {
|
|
8747
9068
|
return /* @__PURE__ */ jsx30(
|
|
@@ -8789,8 +9110,8 @@ function WeatherCurrentView({
|
|
|
8789
9110
|
"aui-composition-card aui-weather-card aui-weather-current",
|
|
8790
9111
|
className
|
|
8791
9112
|
),
|
|
8792
|
-
children: /* @__PURE__ */
|
|
8793
|
-
/* @__PURE__ */
|
|
9113
|
+
children: /* @__PURE__ */ jsxs22(Widget.Col, { align: "center", gap: 4, children: [
|
|
9114
|
+
/* @__PURE__ */ jsxs22(Widget.Row, { align: "center", gap: 3, children: [
|
|
8794
9115
|
/* @__PURE__ */ jsx30(WeatherIcon, { condition: component.condition, size: 58 }),
|
|
8795
9116
|
/* @__PURE__ */ jsx30(
|
|
8796
9117
|
Widget.Title,
|
|
@@ -8804,7 +9125,7 @@ function WeatherCurrentView({
|
|
|
8804
9125
|
] }),
|
|
8805
9126
|
/* @__PURE__ */ jsx30(Widget.Caption, { color: "white", size: "lg", value: component.location }),
|
|
8806
9127
|
component.description ? /* @__PURE__ */ jsx30(Widget.Text, { align: "center", color: "white", value: component.description }) : null,
|
|
8807
|
-
component.details?.length ? /* @__PURE__ */ jsx30(Widget.Row, { className: "aui-weather-current__details", gap: 3, children: component.details.map((detail) => /* @__PURE__ */
|
|
9128
|
+
component.details?.length ? /* @__PURE__ */ jsx30(Widget.Row, { className: "aui-weather-current__details", gap: 3, children: component.details.map((detail) => /* @__PURE__ */ jsxs22(Widget.Col, { align: "center", gap: 0, children: [
|
|
8808
9129
|
/* @__PURE__ */ jsx30(Widget.Caption, { color: "white", value: detail.label }),
|
|
8809
9130
|
/* @__PURE__ */ jsx30(Widget.Text, { color: "white", value: detail.value, weight: "semibold" })
|
|
8810
9131
|
] }, detail.label)) }) : null
|
|
@@ -8827,9 +9148,9 @@ function WeatherForecastView({
|
|
|
8827
9148
|
"aui-composition-card aui-weather-card aui-weather-forecast",
|
|
8828
9149
|
className
|
|
8829
9150
|
),
|
|
8830
|
-
children: /* @__PURE__ */
|
|
9151
|
+
children: /* @__PURE__ */ jsxs22(Widget.Col, { align: "center", gap: 3, children: [
|
|
8831
9152
|
/* @__PURE__ */ jsx30(WeatherIcon, { condition: component.condition, size: 60 }),
|
|
8832
|
-
/* @__PURE__ */
|
|
9153
|
+
/* @__PURE__ */ jsxs22(Widget.Row, { align: "center", gap: 2, children: [
|
|
8833
9154
|
/* @__PURE__ */ jsx30(
|
|
8834
9155
|
Widget.Title,
|
|
8835
9156
|
{
|
|
@@ -8851,7 +9172,7 @@ function WeatherForecastView({
|
|
|
8851
9172
|
] }),
|
|
8852
9173
|
/* @__PURE__ */ jsx30(Widget.Caption, { color: "white", value: component.location }),
|
|
8853
9174
|
component.description ? /* @__PURE__ */ jsx30(Widget.Text, { align: "center", color: "white", value: component.description }) : null,
|
|
8854
|
-
/* @__PURE__ */ jsx30(Widget.Row, { className: "aui-weather-forecast__days", gap: 4, children: component.forecast.map((day) => /* @__PURE__ */
|
|
9175
|
+
/* @__PURE__ */ jsx30(Widget.Row, { className: "aui-weather-forecast__days", gap: 4, children: component.forecast.map((day) => /* @__PURE__ */ jsxs22(Widget.Col, { align: "center", gap: 1, children: [
|
|
8855
9176
|
/* @__PURE__ */ jsx30(
|
|
8856
9177
|
Widget.Caption,
|
|
8857
9178
|
{
|
|
@@ -8899,8 +9220,8 @@ import {
|
|
|
8899
9220
|
TimeField
|
|
8900
9221
|
} from "@heroui/react";
|
|
8901
9222
|
import { parseDate, parseTime } from "@internationalized/date";
|
|
8902
|
-
import { useCallback as useCallback6, useRef as useRef3, useState as
|
|
8903
|
-
import { jsx as jsx31, jsxs as
|
|
9223
|
+
import { useCallback as useCallback6, useRef as useRef3, useState as useState11 } from "react";
|
|
9224
|
+
import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8904
9225
|
function defaultValue(field) {
|
|
8905
9226
|
if (field.kind === "checkbox-group" || field.kind === "combobox") return field.defaultValue ?? [];
|
|
8906
9227
|
if (field.kind === "slider") return field.defaultValue ?? field.min;
|
|
@@ -8946,16 +9267,16 @@ function toNumberFormatOptions(format) {
|
|
|
8946
9267
|
return { notation: format.compact ? "compact" : "standard", style: "decimal" };
|
|
8947
9268
|
}
|
|
8948
9269
|
function DatePickerCalendar() {
|
|
8949
|
-
return /* @__PURE__ */
|
|
8950
|
-
/* @__PURE__ */
|
|
8951
|
-
/* @__PURE__ */
|
|
9270
|
+
return /* @__PURE__ */ jsxs23(Calendar2, { "aria-label": "Choose date", children: [
|
|
9271
|
+
/* @__PURE__ */ jsxs23(Calendar2.Header, { children: [
|
|
9272
|
+
/* @__PURE__ */ jsxs23(Calendar2.YearPickerTrigger, { children: [
|
|
8952
9273
|
/* @__PURE__ */ jsx31(Calendar2.YearPickerTriggerHeading, {}),
|
|
8953
9274
|
/* @__PURE__ */ jsx31(Calendar2.YearPickerTriggerIndicator, {})
|
|
8954
9275
|
] }),
|
|
8955
9276
|
/* @__PURE__ */ jsx31(Calendar2.NavButton, { slot: "previous" }),
|
|
8956
9277
|
/* @__PURE__ */ jsx31(Calendar2.NavButton, { slot: "next" })
|
|
8957
9278
|
] }),
|
|
8958
|
-
/* @__PURE__ */
|
|
9279
|
+
/* @__PURE__ */ jsxs23(Calendar2.Grid, { children: [
|
|
8959
9280
|
/* @__PURE__ */ jsx31(Calendar2.GridHeader, { children: (day) => /* @__PURE__ */ jsx31(Calendar2.HeaderCell, { children: day }) }),
|
|
8960
9281
|
/* @__PURE__ */ jsx31(Calendar2.GridBody, { children: (date2) => /* @__PURE__ */ jsx31(Calendar2.Cell, { date: date2 }) })
|
|
8961
9282
|
] }),
|
|
@@ -8963,16 +9284,16 @@ function DatePickerCalendar() {
|
|
|
8963
9284
|
] });
|
|
8964
9285
|
}
|
|
8965
9286
|
function DateRangePickerCalendar({ label }) {
|
|
8966
|
-
return /* @__PURE__ */
|
|
8967
|
-
/* @__PURE__ */
|
|
8968
|
-
/* @__PURE__ */
|
|
9287
|
+
return /* @__PURE__ */ jsxs23(RangeCalendar, { "aria-label": label, children: [
|
|
9288
|
+
/* @__PURE__ */ jsxs23(RangeCalendar.Header, { children: [
|
|
9289
|
+
/* @__PURE__ */ jsxs23(RangeCalendar.YearPickerTrigger, { children: [
|
|
8969
9290
|
/* @__PURE__ */ jsx31(RangeCalendar.YearPickerTriggerHeading, {}),
|
|
8970
9291
|
/* @__PURE__ */ jsx31(RangeCalendar.YearPickerTriggerIndicator, {})
|
|
8971
9292
|
] }),
|
|
8972
9293
|
/* @__PURE__ */ jsx31(RangeCalendar.NavButton, { slot: "previous" }),
|
|
8973
9294
|
/* @__PURE__ */ jsx31(RangeCalendar.NavButton, { slot: "next" })
|
|
8974
9295
|
] }),
|
|
8975
|
-
/* @__PURE__ */
|
|
9296
|
+
/* @__PURE__ */ jsxs23(RangeCalendar.Grid, { children: [
|
|
8976
9297
|
/* @__PURE__ */ jsx31(RangeCalendar.GridHeader, { children: (day) => /* @__PURE__ */ jsx31(RangeCalendar.HeaderCell, { children: day }) }),
|
|
8977
9298
|
/* @__PURE__ */ jsx31(RangeCalendar.GridBody, { children: (dateValue) => /* @__PURE__ */ jsx31(RangeCalendar.Cell, { date: dateValue }) })
|
|
8978
9299
|
] }),
|
|
@@ -8980,8 +9301,8 @@ function DateRangePickerCalendar({ label }) {
|
|
|
8980
9301
|
] });
|
|
8981
9302
|
}
|
|
8982
9303
|
function FormView({ className, component, onAction, onSelect }) {
|
|
8983
|
-
const [values, setValues] =
|
|
8984
|
-
const [portalContainer, setPortalContainer] =
|
|
9304
|
+
const [values, setValues] = useState11({});
|
|
9305
|
+
const [portalContainer, setPortalContainer] = useState11();
|
|
8985
9306
|
const formRef = useCallback6((node) => {
|
|
8986
9307
|
setPortalContainer(resolveOverlayPortalContainer(node));
|
|
8987
9308
|
}, []);
|
|
@@ -8990,7 +9311,7 @@ function FormView({ className, component, onAction, onSelect }) {
|
|
|
8990
9311
|
setValues((current) => ({ ...current, [field.name]: value }));
|
|
8991
9312
|
};
|
|
8992
9313
|
const effectiveValues = () => Object.fromEntries(component.fields.map((field) => [field.name, valueFor(field)]));
|
|
8993
|
-
return /* @__PURE__ */ jsx31(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */
|
|
9314
|
+
return /* @__PURE__ */ jsx31(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsxs23(
|
|
8994
9315
|
Form,
|
|
8995
9316
|
{
|
|
8996
9317
|
ref: formRef,
|
|
@@ -9065,7 +9386,7 @@ function FormControl({
|
|
|
9065
9386
|
}
|
|
9066
9387
|
);
|
|
9067
9388
|
if (field.kind === "radio-group")
|
|
9068
|
-
return /* @__PURE__ */
|
|
9389
|
+
return /* @__PURE__ */ jsxs23(
|
|
9069
9390
|
RadioGroup,
|
|
9070
9391
|
{
|
|
9071
9392
|
isRequired: field.required,
|
|
@@ -9076,7 +9397,7 @@ function FormControl({
|
|
|
9076
9397
|
children: [
|
|
9077
9398
|
/* @__PURE__ */ jsx31(Label3, { children: field.label }),
|
|
9078
9399
|
/* @__PURE__ */ jsx31(FieldDescription, { children: field.description }),
|
|
9079
|
-
field.options.map((option2) => /* @__PURE__ */ jsx31(Radio, { value: option2.value, children: /* @__PURE__ */
|
|
9400
|
+
field.options.map((option2) => /* @__PURE__ */ jsx31(Radio, { value: option2.value, children: /* @__PURE__ */ jsxs23(Radio.Content, { children: [
|
|
9080
9401
|
/* @__PURE__ */ jsx31(Radio.Control, { children: /* @__PURE__ */ jsx31(Radio.Indicator, {}) }),
|
|
9081
9402
|
option2.label
|
|
9082
9403
|
] }) }, option2.value))
|
|
@@ -9095,7 +9416,7 @@ function FormControl({
|
|
|
9095
9416
|
);
|
|
9096
9417
|
if (field.kind === "checkbox-group") {
|
|
9097
9418
|
const selected = Array.isArray(value) ? value : [];
|
|
9098
|
-
return /* @__PURE__ */
|
|
9419
|
+
return /* @__PURE__ */ jsxs23(
|
|
9099
9420
|
CheckboxGroup,
|
|
9100
9421
|
{
|
|
9101
9422
|
isRequired: field.required,
|
|
@@ -9106,7 +9427,7 @@ function FormControl({
|
|
|
9106
9427
|
children: [
|
|
9107
9428
|
/* @__PURE__ */ jsx31(Label3, { children: field.label }),
|
|
9108
9429
|
/* @__PURE__ */ jsx31(FieldDescription, { children: field.description }),
|
|
9109
|
-
field.options.map((option2) => /* @__PURE__ */ jsx31(Checkbox2, { value: option2.value, children: /* @__PURE__ */
|
|
9430
|
+
field.options.map((option2) => /* @__PURE__ */ jsx31(Checkbox2, { value: option2.value, children: /* @__PURE__ */ jsxs23(Checkbox2.Content, { children: [
|
|
9110
9431
|
/* @__PURE__ */ jsx31(Checkbox2.Control, { children: /* @__PURE__ */ jsx31(Checkbox2.Indicator, {}) }),
|
|
9111
9432
|
option2.label
|
|
9112
9433
|
] }) }, option2.value))
|
|
@@ -9115,7 +9436,7 @@ function FormControl({
|
|
|
9115
9436
|
);
|
|
9116
9437
|
}
|
|
9117
9438
|
if (field.kind === "slider")
|
|
9118
|
-
return /* @__PURE__ */
|
|
9439
|
+
return /* @__PURE__ */ jsxs23(
|
|
9119
9440
|
Slider,
|
|
9120
9441
|
{
|
|
9121
9442
|
maxValue: field.max,
|
|
@@ -9126,7 +9447,7 @@ function FormControl({
|
|
|
9126
9447
|
children: [
|
|
9127
9448
|
/* @__PURE__ */ jsx31(Label3, { children: field.label }),
|
|
9128
9449
|
/* @__PURE__ */ jsx31(Slider.Output, {}),
|
|
9129
|
-
/* @__PURE__ */
|
|
9450
|
+
/* @__PURE__ */ jsxs23(Slider.Track, { children: [
|
|
9130
9451
|
/* @__PURE__ */ jsx31(Slider.Fill, {}),
|
|
9131
9452
|
/* @__PURE__ */ jsx31(Slider.Thumb, {})
|
|
9132
9453
|
] }),
|
|
@@ -9135,7 +9456,7 @@ function FormControl({
|
|
|
9135
9456
|
}
|
|
9136
9457
|
);
|
|
9137
9458
|
if (field.kind === "number")
|
|
9138
|
-
return /* @__PURE__ */
|
|
9459
|
+
return /* @__PURE__ */ jsxs23(
|
|
9139
9460
|
NumberField,
|
|
9140
9461
|
{
|
|
9141
9462
|
fullWidth: true,
|
|
@@ -9150,7 +9471,7 @@ function FormControl({
|
|
|
9150
9471
|
onChange: (nextValue) => onChange(nextValue ?? field.min ?? 0),
|
|
9151
9472
|
children: [
|
|
9152
9473
|
/* @__PURE__ */ jsx31(Label3, { children: field.label }),
|
|
9153
|
-
/* @__PURE__ */
|
|
9474
|
+
/* @__PURE__ */ jsxs23(NumberField.Group, { children: [
|
|
9154
9475
|
/* @__PURE__ */ jsx31(NumberField.DecrementButton, {}),
|
|
9155
9476
|
/* @__PURE__ */ jsx31(NumberField.Input, { placeholder: field.placeholder }),
|
|
9156
9477
|
/* @__PURE__ */ jsx31(NumberField.IncrementButton, {})
|
|
@@ -9160,7 +9481,7 @@ function FormControl({
|
|
|
9160
9481
|
}
|
|
9161
9482
|
);
|
|
9162
9483
|
if (field.kind === "switch")
|
|
9163
|
-
return /* @__PURE__ */
|
|
9484
|
+
return /* @__PURE__ */ jsxs23(
|
|
9164
9485
|
Switch,
|
|
9165
9486
|
{
|
|
9166
9487
|
isRequired: field.required,
|
|
@@ -9168,7 +9489,7 @@ function FormControl({
|
|
|
9168
9489
|
name: field.name,
|
|
9169
9490
|
onChange,
|
|
9170
9491
|
children: [
|
|
9171
|
-
/* @__PURE__ */
|
|
9492
|
+
/* @__PURE__ */ jsxs23(Switch.Content, { children: [
|
|
9172
9493
|
/* @__PURE__ */ jsx31(Switch.Control, { children: /* @__PURE__ */ jsx31(Switch.Thumb, {}) }),
|
|
9173
9494
|
field.label
|
|
9174
9495
|
] }),
|
|
@@ -9197,7 +9518,7 @@ function FormControl({
|
|
|
9197
9518
|
}
|
|
9198
9519
|
);
|
|
9199
9520
|
if (field.kind === "time-field")
|
|
9200
|
-
return /* @__PURE__ */
|
|
9521
|
+
return /* @__PURE__ */ jsxs23(
|
|
9201
9522
|
TimeField,
|
|
9202
9523
|
{
|
|
9203
9524
|
hourCycle: field.hourCycle,
|
|
@@ -9214,7 +9535,7 @@ function FormControl({
|
|
|
9214
9535
|
]
|
|
9215
9536
|
}
|
|
9216
9537
|
);
|
|
9217
|
-
return /* @__PURE__ */
|
|
9538
|
+
return /* @__PURE__ */ jsxs23(
|
|
9218
9539
|
TextField,
|
|
9219
9540
|
{
|
|
9220
9541
|
fullWidth: true,
|
|
@@ -9241,7 +9562,7 @@ function ComboboxFormControl({
|
|
|
9241
9562
|
const isMultiple = (field.selectionMode ?? "single") === "multiple";
|
|
9242
9563
|
const labels = new Map(field.options.map((option2) => [option2.value, option2.label]));
|
|
9243
9564
|
const available = isMultiple ? field.options.filter((option2) => !value.includes(option2.value)) : field.options;
|
|
9244
|
-
const [inputValue, setInputValue] =
|
|
9565
|
+
const [inputValue, setInputValue] = useState11(
|
|
9245
9566
|
isMultiple ? "" : labels.get(value[0] ?? "") ?? ""
|
|
9246
9567
|
);
|
|
9247
9568
|
const select = (key2) => {
|
|
@@ -9257,8 +9578,8 @@ function ComboboxFormControl({
|
|
|
9257
9578
|
setInputValue(labels.get(key2) ?? "");
|
|
9258
9579
|
onChange([key2]);
|
|
9259
9580
|
};
|
|
9260
|
-
return /* @__PURE__ */
|
|
9261
|
-
/* @__PURE__ */
|
|
9581
|
+
return /* @__PURE__ */ jsxs23("div", { className: "aui-combobox", children: [
|
|
9582
|
+
/* @__PURE__ */ jsxs23(
|
|
9262
9583
|
ComboBox,
|
|
9263
9584
|
{
|
|
9264
9585
|
allowsEmptyCollection: true,
|
|
@@ -9271,11 +9592,11 @@ function ComboboxFormControl({
|
|
|
9271
9592
|
onSelectionChange: (key2) => select(key2 === null ? null : String(key2)),
|
|
9272
9593
|
children: [
|
|
9273
9594
|
/* @__PURE__ */ jsx31(Label3, { children: field.label }),
|
|
9274
|
-
/* @__PURE__ */
|
|
9595
|
+
/* @__PURE__ */ jsxs23(ComboBox.InputGroup, { children: [
|
|
9275
9596
|
/* @__PURE__ */ jsx31(Input, { placeholder: field.placeholder ?? "Search options\u2026" }),
|
|
9276
9597
|
/* @__PURE__ */ jsx31(ComboBox.Trigger, {})
|
|
9277
9598
|
] }),
|
|
9278
|
-
/* @__PURE__ */ jsx31(ComboBox.Popover, { UNSTABLE_portalContainer: portalContainer, children: /* @__PURE__ */ jsx31(ListBox, { renderEmptyState: () => /* @__PURE__ */ jsx31("span", { className: "aui-combobox__empty", children: "No matches" }), children: available.map((option2) => /* @__PURE__ */
|
|
9599
|
+
/* @__PURE__ */ jsx31(ComboBox.Popover, { UNSTABLE_portalContainer: portalContainer, children: /* @__PURE__ */ jsx31(ListBox, { renderEmptyState: () => /* @__PURE__ */ jsx31("span", { className: "aui-combobox__empty", children: "No matches" }), children: available.map((option2) => /* @__PURE__ */ jsxs23(ListBox.Item, { id: option2.value, textValue: option2.label, children: [
|
|
9279
9600
|
option2.label,
|
|
9280
9601
|
/* @__PURE__ */ jsx31(ListBox.ItemIndicator, {})
|
|
9281
9602
|
] }, option2.value)) }) }),
|
|
@@ -9289,7 +9610,7 @@ function ComboboxFormControl({
|
|
|
9289
9610
|
"aria-label": `${field.label} selection`,
|
|
9290
9611
|
className: "aui-combobox__selection",
|
|
9291
9612
|
onRemove: (keys) => onChange(value.filter((entry) => !keys.has(entry))),
|
|
9292
|
-
children: /* @__PURE__ */ jsx31(TagGroup2.List, { children: value.map((entry) => /* @__PURE__ */
|
|
9613
|
+
children: /* @__PURE__ */ jsx31(TagGroup2.List, { children: value.map((entry) => /* @__PURE__ */ jsxs23(Tag3, { id: entry, textValue: labels.get(entry) ?? entry, children: [
|
|
9293
9614
|
labels.get(entry) ?? entry,
|
|
9294
9615
|
/* @__PURE__ */ jsx31(Tag3.RemoveButton, {})
|
|
9295
9616
|
] }, entry)) })
|
|
@@ -9304,13 +9625,13 @@ function SelectFormControl({
|
|
|
9304
9625
|
portalContainer,
|
|
9305
9626
|
value
|
|
9306
9627
|
}) {
|
|
9307
|
-
const [isOpen, setIsOpen] =
|
|
9628
|
+
const [isOpen, setIsOpen] = useState11(false);
|
|
9308
9629
|
const pointerOpenAt = useRef3(0);
|
|
9309
9630
|
const handleOpenChange = (nextOpen) => {
|
|
9310
9631
|
if (!nextOpen && Date.now() - pointerOpenAt.current < 350) return;
|
|
9311
9632
|
setIsOpen(nextOpen);
|
|
9312
9633
|
};
|
|
9313
|
-
return /* @__PURE__ */
|
|
9634
|
+
return /* @__PURE__ */ jsxs23(
|
|
9314
9635
|
Select,
|
|
9315
9636
|
{
|
|
9316
9637
|
fullWidth: true,
|
|
@@ -9327,7 +9648,7 @@ function SelectFormControl({
|
|
|
9327
9648
|
},
|
|
9328
9649
|
children: [
|
|
9329
9650
|
/* @__PURE__ */ jsx31(Label3, { children: field.label }),
|
|
9330
|
-
/* @__PURE__ */
|
|
9651
|
+
/* @__PURE__ */ jsxs23(
|
|
9331
9652
|
Select.Trigger,
|
|
9332
9653
|
{
|
|
9333
9654
|
onPointerDown: () => {
|
|
@@ -9339,7 +9660,7 @@ function SelectFormControl({
|
|
|
9339
9660
|
]
|
|
9340
9661
|
}
|
|
9341
9662
|
),
|
|
9342
|
-
/* @__PURE__ */ jsx31(Select.Popover, { UNSTABLE_portalContainer: portalContainer, children: /* @__PURE__ */ jsx31(ListBox, { children: field.options.map((option2) => /* @__PURE__ */
|
|
9663
|
+
/* @__PURE__ */ jsx31(Select.Popover, { UNSTABLE_portalContainer: portalContainer, children: /* @__PURE__ */ jsx31(ListBox, { children: field.options.map((option2) => /* @__PURE__ */ jsxs23(ListBox.Item, { id: option2.value, textValue: option2.label, children: [
|
|
9343
9664
|
option2.label,
|
|
9344
9665
|
/* @__PURE__ */ jsx31(ListBox.ItemIndicator, {})
|
|
9345
9666
|
] }, option2.value)) }) }),
|
|
@@ -9354,13 +9675,13 @@ function DatePickerFormControl({
|
|
|
9354
9675
|
portalContainer,
|
|
9355
9676
|
value
|
|
9356
9677
|
}) {
|
|
9357
|
-
const [isOpen, setIsOpen] =
|
|
9678
|
+
const [isOpen, setIsOpen] = useState11(false);
|
|
9358
9679
|
const pointerOpenAt = useRef3(0);
|
|
9359
9680
|
const handleOpenChange = (nextOpen) => {
|
|
9360
9681
|
if (!nextOpen && Date.now() - pointerOpenAt.current < 350) return;
|
|
9361
9682
|
setIsOpen(nextOpen);
|
|
9362
9683
|
};
|
|
9363
|
-
return /* @__PURE__ */
|
|
9684
|
+
return /* @__PURE__ */ jsxs23(
|
|
9364
9685
|
DatePicker,
|
|
9365
9686
|
{
|
|
9366
9687
|
isOpen,
|
|
@@ -9376,7 +9697,7 @@ function DatePickerFormControl({
|
|
|
9376
9697
|
},
|
|
9377
9698
|
children: [
|
|
9378
9699
|
/* @__PURE__ */ jsx31(Label3, { children: field.label }),
|
|
9379
|
-
/* @__PURE__ */
|
|
9700
|
+
/* @__PURE__ */ jsxs23(DateField.Group, { fullWidth: true, variant: "secondary", children: [
|
|
9380
9701
|
/* @__PURE__ */ jsx31(DateField.Input, { children: (segment) => /* @__PURE__ */ jsx31(DateField.Segment, { segment }) }),
|
|
9381
9702
|
/* @__PURE__ */ jsx31(DateField.Suffix, { children: /* @__PURE__ */ jsx31(
|
|
9382
9703
|
DatePicker.Trigger,
|
|
@@ -9400,13 +9721,13 @@ function DateRangePickerFormControl({
|
|
|
9400
9721
|
portalContainer,
|
|
9401
9722
|
value
|
|
9402
9723
|
}) {
|
|
9403
|
-
const [isOpen, setIsOpen] =
|
|
9724
|
+
const [isOpen, setIsOpen] = useState11(false);
|
|
9404
9725
|
const pointerOpenAt = useRef3(0);
|
|
9405
9726
|
const handleOpenChange = (nextOpen) => {
|
|
9406
9727
|
if (!nextOpen && Date.now() - pointerOpenAt.current < 350) return;
|
|
9407
9728
|
setIsOpen(nextOpen);
|
|
9408
9729
|
};
|
|
9409
|
-
return /* @__PURE__ */
|
|
9730
|
+
return /* @__PURE__ */ jsxs23(
|
|
9410
9731
|
DateRangePicker,
|
|
9411
9732
|
{
|
|
9412
9733
|
endName: `${field.name}.end`,
|
|
@@ -9426,7 +9747,7 @@ function DateRangePickerFormControl({
|
|
|
9426
9747
|
},
|
|
9427
9748
|
children: [
|
|
9428
9749
|
/* @__PURE__ */ jsx31(Label3, { children: field.label }),
|
|
9429
|
-
/* @__PURE__ */
|
|
9750
|
+
/* @__PURE__ */ jsxs23(DateField.Group, { fullWidth: true, variant: "secondary", children: [
|
|
9430
9751
|
/* @__PURE__ */ jsx31(DateField.Input, { slot: "start", children: (segment) => /* @__PURE__ */ jsx31(DateField.Segment, { segment }) }),
|
|
9431
9752
|
/* @__PURE__ */ jsx31(DateRangePicker.RangeSeparator, {}),
|
|
9432
9753
|
/* @__PURE__ */ jsx31(DateField.Input, { slot: "end", children: (segment) => /* @__PURE__ */ jsx31(DateField.Segment, { segment }) }),
|
|
@@ -9448,17 +9769,17 @@ function DateRangePickerFormControl({
|
|
|
9448
9769
|
}
|
|
9449
9770
|
|
|
9450
9771
|
// ../agent-ui/src/components/form-elements/switch-group-view.tsx
|
|
9451
|
-
import { useMemo as useMemo6, useState as
|
|
9452
|
-
import { jsx as jsx32, jsxs as
|
|
9772
|
+
import { useMemo as useMemo6, useState as useState12 } from "react";
|
|
9773
|
+
import { jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
9453
9774
|
function SwitchGroupView({ className, component, onSelect }) {
|
|
9454
9775
|
const defaults = useMemo6(
|
|
9455
9776
|
() => Object.fromEntries(component.items.map((item) => [item.id, item.defaultSelected ?? false])),
|
|
9456
9777
|
[component.items]
|
|
9457
9778
|
);
|
|
9458
|
-
const [values, setValues] =
|
|
9779
|
+
const [values, setValues] = useState12({});
|
|
9459
9780
|
return /* @__PURE__ */ jsx32(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsx32("div", { className: "aui-switch-group", "data-slot": "agent-ui-switch-group", children: component.items.map((item) => {
|
|
9460
9781
|
const selected = values[item.id] ?? defaults[item.id] ?? false;
|
|
9461
|
-
return /* @__PURE__ */
|
|
9782
|
+
return /* @__PURE__ */ jsxs24("label", { "data-slot": "agent-ui-switch-item", children: [
|
|
9462
9783
|
/* @__PURE__ */ jsx32(
|
|
9463
9784
|
"input",
|
|
9464
9785
|
{
|
|
@@ -9473,7 +9794,7 @@ function SwitchGroupView({ className, component, onSelect }) {
|
|
|
9473
9794
|
}
|
|
9474
9795
|
}
|
|
9475
9796
|
),
|
|
9476
|
-
/* @__PURE__ */
|
|
9797
|
+
/* @__PURE__ */ jsxs24("span", { "data-slot": "agent-ui-switch-content", children: [
|
|
9477
9798
|
/* @__PURE__ */ jsx32("strong", { "data-slot": "agent-ui-switch-label", children: item.label }),
|
|
9478
9799
|
item.description ? /* @__PURE__ */ jsx32("small", { "data-slot": "agent-ui-switch-description", children: item.description }) : null
|
|
9479
9800
|
] })
|
|
@@ -9482,14 +9803,14 @@ function SwitchGroupView({ className, component, onSelect }) {
|
|
|
9482
9803
|
}
|
|
9483
9804
|
|
|
9484
9805
|
// ../agent-ui/src/components/form-elements/toggle-group-view.tsx
|
|
9485
|
-
import { useMemo as useMemo7, useState as
|
|
9806
|
+
import { useMemo as useMemo7, useState as useState13 } from "react";
|
|
9486
9807
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
9487
9808
|
function ToggleGroupView({ className, component, onSelect }) {
|
|
9488
9809
|
const validIds = useMemo7(
|
|
9489
9810
|
() => new Set(component.items.map((item) => item.id)),
|
|
9490
9811
|
[component.items]
|
|
9491
9812
|
);
|
|
9492
|
-
const [selected, setSelected] =
|
|
9813
|
+
const [selected, setSelected] = useState13(() => new Set(component.defaultValue ?? []));
|
|
9493
9814
|
const active = new Set([...selected].filter((id2) => validIds.has(id2)));
|
|
9494
9815
|
return /* @__PURE__ */ jsx33(Card, { className, description: component.description, title: component.title, children: /* @__PURE__ */ jsx33("div", { className: "aui-toggle-group", "data-slot": "agent-ui-toggle-group", children: component.items.map((item) => /* @__PURE__ */ jsx33(
|
|
9495
9816
|
"button",
|
|
@@ -9517,7 +9838,7 @@ function ToggleGroupView({ className, component, onSelect }) {
|
|
|
9517
9838
|
|
|
9518
9839
|
// ../agent-ui/src/components/primitives/primitive-views.tsx
|
|
9519
9840
|
import { createElement } from "react";
|
|
9520
|
-
import { jsx as jsx34, jsxs as
|
|
9841
|
+
import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
9521
9842
|
var progressFormatter = new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 });
|
|
9522
9843
|
function HeadingView({ className, component }) {
|
|
9523
9844
|
const level = component.level ?? 2;
|
|
@@ -9541,7 +9862,7 @@ function HeadingView({ className, component }) {
|
|
|
9541
9862
|
);
|
|
9542
9863
|
}
|
|
9543
9864
|
function ButtonView({ className, component, onAction, onSelect }) {
|
|
9544
|
-
return /* @__PURE__ */
|
|
9865
|
+
return /* @__PURE__ */ jsxs25(
|
|
9545
9866
|
ActionButton,
|
|
9546
9867
|
{
|
|
9547
9868
|
className: mergeClassNames("aui-button-primitive", className),
|
|
@@ -9599,7 +9920,7 @@ function RatingView({ className, component }) {
|
|
|
9599
9920
|
}
|
|
9600
9921
|
function ProgressView({ className, component }) {
|
|
9601
9922
|
const value = Math.min(Math.max(component.value, 0), 100);
|
|
9602
|
-
return /* @__PURE__ */
|
|
9923
|
+
return /* @__PURE__ */ jsxs25(
|
|
9603
9924
|
"span",
|
|
9604
9925
|
{
|
|
9605
9926
|
"aria-valuemax": 100,
|
|
@@ -9610,9 +9931,9 @@ function ProgressView({ className, component }) {
|
|
|
9610
9931
|
role: "progressbar",
|
|
9611
9932
|
...component.label ? { "aria-label": component.label } : {},
|
|
9612
9933
|
children: [
|
|
9613
|
-
component.label ? /* @__PURE__ */
|
|
9934
|
+
component.label ? /* @__PURE__ */ jsxs25("span", { className: "aui-progress__header", children: [
|
|
9614
9935
|
/* @__PURE__ */ jsx34("span", { className: "aui-progress__label", children: component.label }),
|
|
9615
|
-
/* @__PURE__ */
|
|
9936
|
+
/* @__PURE__ */ jsxs25("span", { className: "aui-progress__value", children: [
|
|
9616
9937
|
progressFormatter.format(value),
|
|
9617
9938
|
"%"
|
|
9618
9939
|
] })
|
|
@@ -9653,6 +9974,7 @@ var leafViews = {
|
|
|
9653
9974
|
"area-chart": AreaChartView,
|
|
9654
9975
|
"bar-chart": BarChartView,
|
|
9655
9976
|
callout: CalloutView,
|
|
9977
|
+
"candlestick-chart": CandlestickChartView,
|
|
9656
9978
|
"channel-message": ChannelMessageView,
|
|
9657
9979
|
"code-block": CodeBlockView,
|
|
9658
9980
|
"comparison-list": ComparisonListView,
|
|
@@ -9666,6 +9988,8 @@ var leafViews = {
|
|
|
9666
9988
|
"flight-tracker": FlightTrackerView,
|
|
9667
9989
|
followup: FollowupView,
|
|
9668
9990
|
form: FormView,
|
|
9991
|
+
"funnel-chart": FunnelChartView,
|
|
9992
|
+
"gauge-chart": GaugeChartView,
|
|
9669
9993
|
heatmap: HeatmapView,
|
|
9670
9994
|
image: ImageView,
|
|
9671
9995
|
"kpi-grid": KpiGridView,
|
|
@@ -9688,6 +10012,7 @@ var leafViews = {
|
|
|
9688
10012
|
"sankey-chart": SankeyChartView,
|
|
9689
10013
|
"scatter-chart": ScatterChartView,
|
|
9690
10014
|
steps: StepsView,
|
|
10015
|
+
"sunburst-chart": SunburstChartView,
|
|
9691
10016
|
"switch-group": SwitchGroupView,
|
|
9692
10017
|
"tag-list": TagListView,
|
|
9693
10018
|
text: TextView,
|