@cellarnode/ui 0.201.1 → 0.203.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/composer.d.ts +6 -1
- package/dist/agent/composer.d.ts.map +1 -1
- package/dist/agent/composer.js +43 -9
- package/dist/agent/composer.js.map +1 -1
- package/dist/agent/conversation.d.ts +20 -2
- package/dist/agent/conversation.d.ts.map +1 -1
- package/dist/agent/conversation.js +39 -5
- package/dist/agent/conversation.js.map +1 -1
- package/dist/agent/copy.d.ts +7 -0
- package/dist/agent/copy.d.ts.map +1 -1
- package/dist/agent/copy.js +9 -0
- package/dist/agent/copy.js.map +1 -1
- package/dist/agent/fixtures.d.ts +34 -0
- package/dist/agent/fixtures.d.ts.map +1 -1
- package/dist/agent/fixtures.js +83 -0
- package/dist/agent/fixtures.js.map +1 -1
- package/dist/agent/index.d.ts +18 -1
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +18 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/markdown.d.ts +64 -0
- package/dist/agent/markdown.d.ts.map +1 -0
- package/dist/agent/markdown.js +338 -0
- package/dist/agent/markdown.js.map +1 -0
- package/dist/agent/masked-value.d.ts +1 -0
- package/dist/agent/masked-value.d.ts.map +1 -1
- package/dist/agent/masked-value.js +4 -1
- package/dist/agent/masked-value.js.map +1 -1
- package/dist/agent/message.d.ts +26 -6
- package/dist/agent/message.d.ts.map +1 -1
- package/dist/agent/message.js +47 -11
- package/dist/agent/message.js.map +1 -1
- package/dist/agent/panel-frame.js +1 -1
- package/dist/agent/panel-frame.js.map +1 -1
- package/dist/agent/role-cards/card-kit.d.ts +111 -0
- package/dist/agent/role-cards/card-kit.d.ts.map +1 -0
- package/dist/agent/role-cards/card-kit.js +68 -0
- package/dist/agent/role-cards/card-kit.js.map +1 -0
- package/dist/agent/role-cards/data-table-card.d.ts +80 -0
- package/dist/agent/role-cards/data-table-card.d.ts.map +1 -0
- package/dist/agent/role-cards/data-table-card.js +214 -0
- package/dist/agent/role-cards/data-table-card.js.map +1 -0
- package/dist/agent/role-cards/fixtures.d.ts +124 -0
- package/dist/agent/role-cards/fixtures.d.ts.map +1 -0
- package/dist/agent/role-cards/fixtures.js +401 -0
- package/dist/agent/role-cards/fixtures.js.map +1 -0
- package/dist/agent/role-cards/host-contract.d.ts +214 -0
- package/dist/agent/role-cards/host-contract.d.ts.map +1 -0
- package/dist/agent/role-cards/host-contract.js +348 -0
- package/dist/agent/role-cards/host-contract.js.map +1 -0
- package/dist/agent/role-cards/inspector-drawer.d.ts +42 -0
- package/dist/agent/role-cards/inspector-drawer.d.ts.map +1 -0
- package/dist/agent/role-cards/inspector-drawer.js +68 -0
- package/dist/agent/role-cards/inspector-drawer.js.map +1 -0
- package/dist/agent/role-cards/inspector-fixtures.d.ts +84 -0
- package/dist/agent/role-cards/inspector-fixtures.d.ts.map +1 -0
- package/dist/agent/role-cards/inspector-fixtures.js +162 -0
- package/dist/agent/role-cards/inspector-fixtures.js.map +1 -0
- package/dist/agent/role-cards/inspector-record.d.ts +109 -0
- package/dist/agent/role-cards/inspector-record.d.ts.map +1 -0
- package/dist/agent/role-cards/inspector-record.js +346 -0
- package/dist/agent/role-cards/inspector-record.js.map +1 -0
- package/dist/agent/role-cards/inspector-view.d.ts +137 -0
- package/dist/agent/role-cards/inspector-view.d.ts.map +1 -0
- package/dist/agent/role-cards/inspector-view.js +261 -0
- package/dist/agent/role-cards/inspector-view.js.map +1 -0
- package/dist/agent/role-cards/match-card.d.ts +21 -0
- package/dist/agent/role-cards/match-card.d.ts.map +1 -0
- package/dist/agent/role-cards/match-card.js +30 -0
- package/dist/agent/role-cards/match-card.js.map +1 -0
- package/dist/agent/role-cards/offer-card.d.ts +27 -0
- package/dist/agent/role-cards/offer-card.d.ts.map +1 -0
- package/dist/agent/role-cards/offer-card.js +68 -0
- package/dist/agent/role-cards/offer-card.js.map +1 -0
- package/dist/agent/role-cards/opportunity-card.d.ts +26 -0
- package/dist/agent/role-cards/opportunity-card.d.ts.map +1 -0
- package/dist/agent/role-cards/opportunity-card.js +50 -0
- package/dist/agent/role-cards/opportunity-card.js.map +1 -0
- package/dist/agent/role-cards/product-card.d.ts +32 -0
- package/dist/agent/role-cards/product-card.d.ts.map +1 -0
- package/dist/agent/role-cards/product-card.js +50 -0
- package/dist/agent/role-cards/product-card.js.map +1 -0
- package/dist/agent/role-cards/proposal-diff.d.ts +38 -0
- package/dist/agent/role-cards/proposal-diff.d.ts.map +1 -0
- package/dist/agent/role-cards/proposal-diff.js +74 -0
- package/dist/agent/role-cards/proposal-diff.js.map +1 -0
- package/dist/agent/role-cards/registry.d.ts +43 -0
- package/dist/agent/role-cards/registry.d.ts.map +1 -0
- package/dist/agent/role-cards/registry.js +46 -0
- package/dist/agent/role-cards/registry.js.map +1 -0
- package/dist/agent/role-cards/score-meter.d.ts +12 -0
- package/dist/agent/role-cards/score-meter.d.ts.map +1 -0
- package/dist/agent/role-cards/score-meter.js +17 -0
- package/dist/agent/role-cards/score-meter.js.map +1 -0
- package/dist/agent/role-cards/surface-links.d.ts +54 -0
- package/dist/agent/role-cards/surface-links.d.ts.map +1 -0
- package/dist/agent/role-cards/surface-links.js +149 -0
- package/dist/agent/role-cards/surface-links.js.map +1 -0
- package/dist/agent/role-cards/text-safety.d.ts +27 -0
- package/dist/agent/role-cards/text-safety.d.ts.map +1 -0
- package/dist/agent/role-cards/text-safety.js +77 -0
- package/dist/agent/role-cards/text-safety.js.map +1 -0
- package/dist/agent/schema.d.ts +10 -0
- package/dist/agent/schema.d.ts.map +1 -1
- package/dist/agent/schema.js +31 -3
- package/dist/agent/schema.js.map +1 -1
- package/dist/agent/states.d.ts +1 -0
- package/dist/agent/states.d.ts.map +1 -1
- package/dist/agent/states.js +1 -1
- package/dist/agent/states.js.map +1 -1
- package/dist/agent/thinking.d.ts +13 -4
- package/dist/agent/thinking.d.ts.map +1 -1
- package/dist/agent/thinking.js +15 -6
- package/dist/agent/thinking.js.map +1 -1
- package/dist/agent/thread-list.d.ts +45 -2
- package/dist/agent/thread-list.d.ts.map +1 -1
- package/dist/agent/thread-list.js +175 -8
- package/dist/agent/thread-list.js.map +1 -1
- package/dist/agent/thread-title.d.ts +46 -0
- package/dist/agent/thread-title.d.ts.map +1 -0
- package/dist/agent/thread-title.js +99 -0
- package/dist/agent/thread-title.js.map +1 -0
- package/dist/agent/tool-activity-model.d.ts +136 -0
- package/dist/agent/tool-activity-model.d.ts.map +1 -0
- package/dist/agent/tool-activity-model.js +288 -0
- package/dist/agent/tool-activity-model.js.map +1 -0
- package/dist/agent/tool-activity.d.ts +61 -0
- package/dist/agent/tool-activity.d.ts.map +1 -0
- package/dist/agent/tool-activity.js +199 -0
- package/dist/agent/tool-activity.js.map +1 -0
- package/dist/agent/tool-call-card.d.ts +11 -1
- package/dist/agent/tool-call-card.d.ts.map +1 -1
- package/dist/agent/tool-call-card.js +19 -4
- package/dist/agent/tool-call-card.js.map +1 -1
- package/dist/agent/ui.js +1 -1
- package/dist/agent/ui.js.map +1 -1
- package/dist/agent/use-motion.d.ts +15 -0
- package/dist/agent/use-motion.d.ts.map +1 -0
- package/dist/agent/use-motion.js +52 -0
- package/dist/agent/use-motion.js.map +1 -0
- package/dist/chat/use-stick-to-bottom.d.ts +5 -0
- package/dist/chat/use-stick-to-bottom.d.ts.map +1 -1
- package/dist/chat/use-stick-to-bottom.js +11 -1
- package/dist/chat/use-stick-to-bottom.js.map +1 -1
- package/dist/components/sheet.d.ts +3 -1
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +2 -2
- package/dist/components/sheet.js.map +1 -1
- package/dist/portfolio-import/import-job-panels.d.ts +6 -0
- package/dist/portfolio-import/import-job-panels.d.ts.map +1 -1
- package/dist/portfolio-import/import-job-panels.js +11 -4
- package/dist/portfolio-import/import-job-panels.js.map +1 -1
- package/dist/portfolio-import/job-error-copy.d.ts +62 -0
- package/dist/portfolio-import/job-error-copy.d.ts.map +1 -0
- package/dist/portfolio-import/job-error-copy.js +78 -0
- package/dist/portfolio-import/job-error-copy.js.map +1 -0
- package/dist/realtime/organisation-events/schemas.d.ts +2 -2
- package/package.json +4 -1
- package/src/theme/tokens.css +66 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useLayoutEffect, useRef, useState } from "react";
|
|
3
|
+
import { ArrowUpRight } from "lucide-react";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { DEFAULT_QUOTE, fmt, quoteText, useCopy } from "../copy.js";
|
|
6
|
+
import { MaskedValue } from "../masked-value.js";
|
|
7
|
+
import { isMasked } from "../schema.js";
|
|
8
|
+
import { focusRing } from "../ui.js";
|
|
9
|
+
import { AgentCardExtras, AgentCardFrame, AgentCardLink, } from "./card-kit.js";
|
|
10
|
+
import { agentLinkKind } from "./surface-links.js";
|
|
11
|
+
import { cleanInline } from "./text-safety.js";
|
|
12
|
+
const DEFAULT_COPY = {
|
|
13
|
+
title: "Results",
|
|
14
|
+
caption: "Results table",
|
|
15
|
+
empty: "Nothing to show",
|
|
16
|
+
emptyCell: "-",
|
|
17
|
+
capped: "Showing the first {shown} of {total} rows",
|
|
18
|
+
column: "Column {n}",
|
|
19
|
+
yes: "Yes",
|
|
20
|
+
no: "No",
|
|
21
|
+
hidden: "Hidden",
|
|
22
|
+
quote: DEFAULT_QUOTE,
|
|
23
|
+
openOffer: "Open offer",
|
|
24
|
+
openProducer: "Open producer page",
|
|
25
|
+
openOrganisation: "Open organisation profile",
|
|
26
|
+
openPortfolio: "Open portfolio",
|
|
27
|
+
openProduct: "Open product",
|
|
28
|
+
openProductGallery: "Open product gallery",
|
|
29
|
+
openLabels: "Open labels",
|
|
30
|
+
openImports: "Open imports",
|
|
31
|
+
openElabelHome: "Open e-label home",
|
|
32
|
+
openElabel: "Open in e-label",
|
|
33
|
+
openOther: "Open in the dashboard",
|
|
34
|
+
};
|
|
35
|
+
const LINK_COPY = {
|
|
36
|
+
offer: "openOffer",
|
|
37
|
+
producer: "openProducer",
|
|
38
|
+
organisation: "openOrganisation",
|
|
39
|
+
portfolio: "openPortfolio",
|
|
40
|
+
product: "openProduct",
|
|
41
|
+
productGallery: "openProductGallery",
|
|
42
|
+
labels: "openLabels",
|
|
43
|
+
imports: "openImports",
|
|
44
|
+
elabelHome: "openElabelHome",
|
|
45
|
+
elabel: "openElabel",
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Columns whose text is obviously someone else's, quoted without the host having to say so: a buyer, a counterparty, the
|
|
49
|
+
* opportunity an offer answers, and the columns the cellarnode-mcp agents key by author (`counterpartyFile`: the other side's offer
|
|
50
|
+
* file; `producerFile` and `producerBeverage`: a producer's public documents and beverages as an importer sees them; `file` is the
|
|
51
|
+
* caller's own and is not here). `thirdPartyColumns` EXTENDS these (`surfaceThirdPartyColumns` is the per-surface list). A
|
|
52
|
+
* `DataTable` has no flag that marks a column untrusted, so the column's key is what says whose words it carries.
|
|
53
|
+
*/
|
|
54
|
+
export const DEFAULT_THIRD_PARTY_COLUMNS = [
|
|
55
|
+
"buyer",
|
|
56
|
+
"counterparty",
|
|
57
|
+
"opportunity",
|
|
58
|
+
"market",
|
|
59
|
+
"counterpartyFile",
|
|
60
|
+
"producerFile",
|
|
61
|
+
"producerBeverage",
|
|
62
|
+
];
|
|
63
|
+
/** Rows drawn. The schema allows 500, the agents emit at most 51 (50 and a marker row), a chat card is not a data grid. */
|
|
64
|
+
export const MAX_AGENT_TABLE_ROWS = 100;
|
|
65
|
+
/** Code points of one cell's text; longer text ends in an ellipsis. */
|
|
66
|
+
const MAX_CELL = 300;
|
|
67
|
+
/** Code points of a column label and of a mask's display text. */
|
|
68
|
+
const MAX_LABEL = 80;
|
|
69
|
+
/** A cell's value, or `undefined` when the row has no such key. Own keys only: `constructor` and `__proto__` are not data. */
|
|
70
|
+
const cellOf = (row, key) => Object.hasOwn(row, key) ? row[key] : undefined;
|
|
71
|
+
/** One formatter per locale tag for the life of the page (building an `Intl.NumberFormat` is not cheap); a bad tag is remembered too. */
|
|
72
|
+
const NUMBER_FORMATTERS = new Map();
|
|
73
|
+
/** How a number reads: as JavaScript spells it, or in the host's locale (never grouped, so a year or an id stays as it is). */
|
|
74
|
+
function numberFormatter(locale) {
|
|
75
|
+
if (locale === undefined)
|
|
76
|
+
return String;
|
|
77
|
+
const known = NUMBER_FORMATTERS.get(locale);
|
|
78
|
+
if (known)
|
|
79
|
+
return known;
|
|
80
|
+
let made;
|
|
81
|
+
try {
|
|
82
|
+
const format = new Intl.NumberFormat(locale, { useGrouping: false, maximumFractionDigits: 20 });
|
|
83
|
+
made = (n) => format.format(n);
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
made = String; // an unknown locale tag is the host's bug, not a reason to lose the table
|
|
87
|
+
}
|
|
88
|
+
NUMBER_FORMATTERS.set(locale, made);
|
|
89
|
+
return made;
|
|
90
|
+
}
|
|
91
|
+
/** The host's text for a plain cell, cleaned; `undefined` when the host has none, said nothing readable or threw. */
|
|
92
|
+
function hostText(formatCell, key, value) {
|
|
93
|
+
if (!formatCell)
|
|
94
|
+
return undefined;
|
|
95
|
+
try {
|
|
96
|
+
return cleanInline(formatCell(key, value), MAX_CELL, true);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return undefined; // host code: fall back to the default text
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* One cell, as inert text. Nothing a cell holds becomes markup, a link or an instruction: a string is cleaned (unsafe characters out,
|
|
104
|
+
* whitespace collapsed, clipped), a number or a boolean is spelled out, a mask stays a mask, and an empty value is a dash.
|
|
105
|
+
*/
|
|
106
|
+
function TableCell({ columnKey, value, maskedColumn, quoted, copy, maskedCopy, formatNumber, formatCell, }) {
|
|
107
|
+
const dash = _jsx(MaskedValue, { value: null, empty: copy.emptyCell, copy: maskedCopy });
|
|
108
|
+
if (value === undefined || value === null || value === "")
|
|
109
|
+
return dash;
|
|
110
|
+
if (isMasked(value)) {
|
|
111
|
+
const display = cleanInline(value.display, MAX_LABEL, true) ?? copy.hidden;
|
|
112
|
+
return _jsx(MaskedValue, { value: { masked: true, display }, copy: maskedCopy });
|
|
113
|
+
}
|
|
114
|
+
// The server said this column is masked and sent a plain value: fail closed, never show it.
|
|
115
|
+
if (maskedColumn)
|
|
116
|
+
return _jsx(MaskedValue, { value: { masked: true, display: copy.hidden }, copy: maskedCopy });
|
|
117
|
+
const custom = hostText(formatCell, columnKey, value);
|
|
118
|
+
const text = custom ??
|
|
119
|
+
(typeof value === "boolean"
|
|
120
|
+
? value
|
|
121
|
+
? copy.yes
|
|
122
|
+
: copy.no
|
|
123
|
+
: typeof value === "number"
|
|
124
|
+
? formatNumber(value)
|
|
125
|
+
: cleanInline(value, MAX_CELL, true));
|
|
126
|
+
if (text === undefined)
|
|
127
|
+
return dash;
|
|
128
|
+
return quoted && typeof value === "string" ? quoteText(text, copy.quote) : text;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Is the scrolling area wider than the card? Measured before paint and again whenever the area or the table changes size, so the
|
|
132
|
+
* area is a keyboard stop exactly when there is something to scroll to (`scrollable-region-focusable`), and not a dead tab stop
|
|
133
|
+
* otherwise. When it loses its overflow while it has focus, focus moves to the card.
|
|
134
|
+
*/
|
|
135
|
+
function useOverflowing(active) {
|
|
136
|
+
const ref = useRef(null);
|
|
137
|
+
const [overflowing, setOverflowing] = useState(false);
|
|
138
|
+
useLayoutEffect(() => {
|
|
139
|
+
const el = ref.current;
|
|
140
|
+
if (!active || !el)
|
|
141
|
+
return;
|
|
142
|
+
const measure = () => {
|
|
143
|
+
const wide = el.scrollWidth > el.clientWidth;
|
|
144
|
+
// The area stops being a tab stop when it stops overflowing. If it has focus, hand focus to the card first, or it would
|
|
145
|
+
// fall back to the page.
|
|
146
|
+
if (!wide && el.ownerDocument.activeElement === el) {
|
|
147
|
+
const card = el.closest("section");
|
|
148
|
+
if (card) {
|
|
149
|
+
if (!card.hasAttribute("tabindex"))
|
|
150
|
+
card.setAttribute("tabindex", "-1");
|
|
151
|
+
card.focus({ preventScroll: true });
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// A DOM measurement can only be read after layout. Taken before paint it never shows a frame with the wrong tab stop.
|
|
155
|
+
// eslint-disable-next-line @eslint-react/set-state-in-effect -- the setter is the measurement's result, not derived state
|
|
156
|
+
setOverflowing(wide);
|
|
157
|
+
};
|
|
158
|
+
measure();
|
|
159
|
+
if (typeof ResizeObserver === "undefined")
|
|
160
|
+
return;
|
|
161
|
+
const observer = new ResizeObserver(measure);
|
|
162
|
+
observer.observe(el);
|
|
163
|
+
if (el.firstElementChild)
|
|
164
|
+
observer.observe(el.firstElementChild);
|
|
165
|
+
return () => observer.disconnect();
|
|
166
|
+
}, [active]);
|
|
167
|
+
return { ref, overflowing: active && overflowing };
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* @internal Read card for a table the agent shows (CEL-2488): the file link tools, a producer's documents and showcase. Pure props in,
|
|
171
|
+
* events out, drawn on the card kit like every role card.
|
|
172
|
+
*
|
|
173
|
+
* - Cells are inert text, never markup or links. A mask stays a mask; a plain value in a column marked `masked` is replaced by a mask
|
|
174
|
+
* (the server is the one that masks, so a plain value there is a contract break, and it is not shown). Text someone else wrote
|
|
175
|
+
* renders quoted when its column is in `DEFAULT_THIRD_PARTY_COLUMNS` or the host's `thirdPartyColumns`.
|
|
176
|
+
* - The table's `link` is a visible link under the table, named for the page it opens ("Open offer", from `copy`), and it is drawn
|
|
177
|
+
* only when the host's `allowLink` accepts the path: a refused link draws nothing. Rows carry no link of their own (the schema has
|
|
178
|
+
* none).
|
|
179
|
+
* - Read-only: a `detail` pointer and a `proposal` are not drawn, because a table is a list, not one record (`readRoleCard` drops
|
|
180
|
+
* them). `actions` go through the same catalog and `allowLink` rules as every card.
|
|
181
|
+
* - Rows past `MAX_AGENT_TABLE_ROWS` are left out and the card says so.
|
|
182
|
+
*/
|
|
183
|
+
export function AgentDataTableCard({ data, copy, thirdPartyColumns, columnLabels, formatCell, locale, ...host }) {
|
|
184
|
+
const { allowLink, renderLink, maskedCopy } = host;
|
|
185
|
+
const c = useCopy(DEFAULT_COPY, copy);
|
|
186
|
+
const captionId = useId();
|
|
187
|
+
// Rows and columns have no id of their own (two columns may share a key), so each gets its position as one.
|
|
188
|
+
const rows = data.rows.slice(0, MAX_AGENT_TABLE_ROWS).map((cells, r) => ({ id: `r${r}`, cells }));
|
|
189
|
+
const columns = data.columns.map((col, i) => ({
|
|
190
|
+
id: `c${i}`,
|
|
191
|
+
key: col.key,
|
|
192
|
+
label: (columnLabels && Object.hasOwn(columnLabels, col.key)
|
|
193
|
+
? cleanInline(columnLabels[col.key], MAX_LABEL, true)
|
|
194
|
+
: undefined) ??
|
|
195
|
+
cleanInline(col.label, MAX_LABEL, true) ??
|
|
196
|
+
fmt(c.column, { n: i + 1 }),
|
|
197
|
+
masked: col.masked === true,
|
|
198
|
+
quoted: DEFAULT_THIRD_PARTY_COLUMNS.includes(col.key) || !!thirdPartyColumns?.includes(col.key),
|
|
199
|
+
}));
|
|
200
|
+
const formatNumber = numberFormatter(locale);
|
|
201
|
+
const { ref, overflowing } = useOverflowing(rows.length > 0);
|
|
202
|
+
const link = data.link !== undefined && allowLink?.(data.link) === true ? data.link : undefined;
|
|
203
|
+
const kind = link === undefined ? undefined : agentLinkKind(link);
|
|
204
|
+
return (_jsxs(AgentCardFrame, { title: c.title, children: [rows.length === 0 ? (_jsx("p", { className: "text-sm/5 text-muted-foreground", children: c.empty })) : (
|
|
205
|
+
// A wide table scrolls inside the card. Only then is the scrolling area a keyboard stop, and it is a named group (not a
|
|
206
|
+
// second landmark: the card is already the region).
|
|
207
|
+
_jsx("div", { ref: ref, ...(overflowing ? { role: "group", tabIndex: 0, "aria-labelledby": captionId } : {}), className: cn("overflow-x-auto rounded-xl ring-1 ring-border/60", focusRing), children: _jsxs("table", { className: "w-full text-start text-xs/5", children: [_jsx("caption", { id: captionId, className: "sr-only", children: c.caption }), _jsx("thead", { children: _jsx("tr", { className: "border-b border-border bg-muted/40 text-muted-foreground", children: columns.map((col) => (_jsx("th", { scope: "col",
|
|
208
|
+
// `text-start` on the cell itself: a `th` that only inherits `start` is centred by the user agent.
|
|
209
|
+
className: "px-3 py-2 text-start align-top font-medium", children: col.label }, col.id))) }) }), _jsx("tbody", { children: rows.map((row) => (_jsx("tr", { className: "border-b border-border/60 last:border-b-0", children: columns.map((col) => {
|
|
210
|
+
const value = cellOf(row.cells, col.key);
|
|
211
|
+
return (_jsx("td", { className: "px-3 py-2 align-top", children: _jsx("div", { className: cn("max-w-64 min-w-24 wrap-anywhere", typeof value === "number" && "tabular-nums"), children: _jsx(TableCell, { columnKey: col.key, value: value, maskedColumn: col.masked, quoted: col.quoted, copy: c, maskedCopy: maskedCopy, formatNumber: formatNumber, formatCell: formatCell }) }) }, col.id));
|
|
212
|
+
}) }, row.id))) })] }) })), data.rows.length > MAX_AGENT_TABLE_ROWS && (_jsx("p", { className: "text-xs/4 text-muted-foreground", children: fmt(c.capped, { shown: MAX_AGENT_TABLE_ROWS, total: data.rows.length }) })), link !== undefined && (_jsxs(AgentCardLink, { path: link, allowLink: allowLink, renderLink: renderLink, className: "inline-flex items-center gap-1 self-start text-sm/5 font-medium text-primary underline hover:decoration-2", children: [c[kind ? LINK_COPY[kind] : "openOther"], _jsx(ArrowUpRight, { "aria-hidden": true, className: "size-3.5 shrink-0 rtl:-scale-x-100" })] })), _jsx(AgentCardExtras, { data: { actions: data.actions }, subject: undefined, host: host })] }));
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=data-table-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table-card.js","sourceRoot":"","sources":["../../../src/agent/role-cards/data-table-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAkB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,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,GAAI,IACrE,CAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { DataTableData, MatchCardData, OfferCardData, OpportunityCardData, ProductCardData } from "@cellarnode/agent-cards/zod4";
|
|
3
|
+
export declare const offerFull: OfferCardData;
|
|
4
|
+
export declare const offerMinimal: OfferCardData;
|
|
5
|
+
export declare const offerMasked: OfferCardData;
|
|
6
|
+
export declare const offerAccepted: OfferCardData;
|
|
7
|
+
export declare const offerRejected: OfferCardData;
|
|
8
|
+
export declare const offerLongText: OfferCardData;
|
|
9
|
+
export declare const offerProposal: OfferCardData;
|
|
10
|
+
export declare const productFull: ProductCardData;
|
|
11
|
+
export declare const productReady: ProductCardData;
|
|
12
|
+
export declare const productMinimal: ProductCardData;
|
|
13
|
+
export declare const productProposal: ProductCardData;
|
|
14
|
+
export declare const opportunityOpen: OpportunityCardData;
|
|
15
|
+
export declare const opportunityExpired: OpportunityCardData;
|
|
16
|
+
export declare const opportunityMinimal: OpportunityCardData;
|
|
17
|
+
export declare const matchStrong: MatchCardData;
|
|
18
|
+
export declare const matchWeak: MatchCardData;
|
|
19
|
+
export declare const matchMid: MatchCardData;
|
|
20
|
+
export declare const matchDeclined: MatchCardData;
|
|
21
|
+
export declare const matchMasked: MatchCardData;
|
|
22
|
+
export declare const matchMinimal: MatchCardData;
|
|
23
|
+
/** `get_offer_file_link`: the offer page, where the file opens. The file came from the other side of the offer. */
|
|
24
|
+
export declare const tableOfferFile: DataTableData;
|
|
25
|
+
/** `get_org_document_link`, as the producer's agent draws it. The caller's own document. */
|
|
26
|
+
export declare const tableOrgDocument: DataTableData;
|
|
27
|
+
/** `get_org_document_link`, as the importer's agent draws it: the importer has the same organisation profile page. */
|
|
28
|
+
export declare const tableImporterOrgDocument: DataTableData;
|
|
29
|
+
/** `get_attachment_link`, as the producer's agent draws it: where the file is shown (a product gallery). */
|
|
30
|
+
export declare const tableAttachment: DataTableData;
|
|
31
|
+
/** `list_producer_documents`, as the importer's agent draws it: three columns and the row that says the list was cut short. */
|
|
32
|
+
export declare const tableProducerDocuments: DataTableData;
|
|
33
|
+
/** `get_producer_showcase`, as the importer's agent draws it: a version count at the tool's cap on a cut list reads "20+". */
|
|
34
|
+
export declare const tableProducerShowcase: DataTableData;
|
|
35
|
+
/** An e-label producer's attachment: the e-label app keeps its producer area under `/app`. */
|
|
36
|
+
export declare const tableElabelAttachment: DataTableData;
|
|
37
|
+
export declare const tableEmpty: DataTableData;
|
|
38
|
+
/** A file name that fills the card: it wraps inside its cell, and a table wider than the card scrolls inside the card. */
|
|
39
|
+
export declare const tableLongText: DataTableData;
|
|
40
|
+
/** A masked column, a masked cell in an open column, and a plain value the server forgot to mask. */
|
|
41
|
+
export declare const tableMasked: DataTableData;
|
|
42
|
+
/** Paths the story and test hosts accept. */
|
|
43
|
+
export declare const allowFixtureLink: (path: string) => boolean;
|
|
44
|
+
/** A host tool catalog for stories and tests. Tiers, titles and target kinds live HERE, never on a card. */
|
|
45
|
+
export declare const fixtureCatalog: {
|
|
46
|
+
readonly counter_received_offer: {
|
|
47
|
+
readonly name: "counter_received_offer";
|
|
48
|
+
readonly title: "Counter the received offer";
|
|
49
|
+
readonly tier: "reversible";
|
|
50
|
+
readonly inputSchema: z.ZodObject<{
|
|
51
|
+
offerId: z.ZodString;
|
|
52
|
+
price: z.ZodOptional<z.ZodString>;
|
|
53
|
+
paymentTerms: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
readonly targetArg: "offerId";
|
|
56
|
+
readonly targetKind: "offer";
|
|
57
|
+
readonly argsFromChanges: (changes: {
|
|
58
|
+
path: string;
|
|
59
|
+
after: unknown;
|
|
60
|
+
}[], id: string) => {
|
|
61
|
+
[x: string]: unknown;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly update_variant: {
|
|
65
|
+
readonly name: "update_variant";
|
|
66
|
+
readonly title: "Update product version";
|
|
67
|
+
readonly tier: "reversible";
|
|
68
|
+
readonly inputSchema: z.ZodObject<{
|
|
69
|
+
variantId: z.ZodString;
|
|
70
|
+
abv: z.ZodOptional<z.ZodString>;
|
|
71
|
+
productionVolume: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
readonly targetArg: "variantId";
|
|
74
|
+
readonly targetKind: "variant";
|
|
75
|
+
readonly argsFromChanges: (changes: {
|
|
76
|
+
path: string;
|
|
77
|
+
after: unknown;
|
|
78
|
+
}[], id: string) => {
|
|
79
|
+
[x: string]: unknown;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
readonly mark_match_interested: {
|
|
83
|
+
readonly name: "mark_match_interested";
|
|
84
|
+
readonly title: "Mark the match as interested";
|
|
85
|
+
readonly tier: "reversible";
|
|
86
|
+
readonly inputSchema: z.ZodObject<{
|
|
87
|
+
matchId: z.ZodString;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
readonly targetArg: "matchId";
|
|
90
|
+
readonly targetKind: "match";
|
|
91
|
+
};
|
|
92
|
+
readonly discard_offer: {
|
|
93
|
+
readonly name: "discard_offer";
|
|
94
|
+
readonly title: "Discard the offer";
|
|
95
|
+
readonly tier: "destructive";
|
|
96
|
+
readonly inputSchema: z.ZodObject<{
|
|
97
|
+
offerId: z.ZodString;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
readonly targetArg: "offerId";
|
|
100
|
+
readonly targetKind: "offer";
|
|
101
|
+
};
|
|
102
|
+
readonly delete_product: {
|
|
103
|
+
readonly name: "delete_product";
|
|
104
|
+
readonly title: "Delete the product";
|
|
105
|
+
readonly tier: "destructive";
|
|
106
|
+
readonly inputSchema: z.ZodObject<{
|
|
107
|
+
productId: z.ZodString;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
readonly targetArg: "productId";
|
|
110
|
+
readonly targetKind: "product";
|
|
111
|
+
};
|
|
112
|
+
readonly get_offer: {
|
|
113
|
+
readonly name: "get_offer";
|
|
114
|
+
readonly title: "Read an offer";
|
|
115
|
+
readonly tier: "read";
|
|
116
|
+
readonly inputSchema: z.ZodObject<{
|
|
117
|
+
offerId: z.ZodString;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
/** The records a story host would fetch for a proposal's Apply, keyed `kind:id`. */
|
|
122
|
+
export declare const fixtureRecords: Record<string, unknown>;
|
|
123
|
+
export declare const fixtureFetchRecord: (kind: string, id: string) => Promise<unknown>;
|
|
124
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/agent/role-cards/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,eAAe,EAChB,MAAM,8BAA8B,CAAC;AAKtC,eAAO,MAAM,SAAS,EAAE,aAqCvB,CAAC;AACF,eAAO,MAAM,YAAY,EAAE,aAAmD,CAAC;AAC/E,eAAO,MAAM,WAAW,EAAE,aAMzB,CAAC;AACF,eAAO,MAAM,aAAa,EAAE,aAK3B,CAAC;AACF,eAAO,MAAM,aAAa,EAAE,aAK3B,CAAC;AACF,eAAO,MAAM,aAAa,EAAE,aAM3B,CAAC;AACF,eAAO,MAAM,aAAa,EAAE,aAa3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAgCzB,CAAC;AACF,eAAO,MAAM,YAAY,EAAE,eAK1B,CAAC;AACF,eAAO,MAAM,cAAc,EAAE,eAAmC,CAAC;AACjE,eAAO,MAAM,eAAe,EAAE,eAa7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,mBAuB7B,CAAC;AACF,eAAO,MAAM,kBAAkB,EAAE,mBAMhC,CAAC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