@shapesos/clay 0.19.0 → 0.19.1
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/artifacts.cjs +175 -128
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.js +3 -1
- package/dist/blocks.cjs +172 -163
- package/dist/blocks.cjs.map +1 -1
- package/dist/blocks.js +4 -4
- package/dist/chat.cjs +172 -163
- package/dist/chat.cjs.map +1 -1
- package/dist/chat.js +5 -5
- package/dist/{chunk-DC5KYT2G.js → chunk-63AGNGKG.js} +17 -3
- package/dist/chunk-63AGNGKG.js.map +1 -0
- package/dist/{chunk-JMHE3Q5K.js → chunk-PISZYS2H.js} +5 -5
- package/dist/{chunk-FCSYVF4Z.js → chunk-PWSEEUVL.js} +2 -2
- package/dist/index.cjs +172 -163
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -7
- package/package.json +1 -1
- package/dist/chunk-DC5KYT2G.js.map +0 -1
- /package/dist/{chunk-JMHE3Q5K.js.map → chunk-PISZYS2H.js.map} +0 -0
- /package/dist/{chunk-FCSYVF4Z.js.map → chunk-PWSEEUVL.js.map} +0 -0
package/dist/chat.cjs
CHANGED
|
@@ -2066,6 +2066,41 @@ var ChartArtifactService = {
|
|
|
2066
2066
|
// src/components/artifacts/deck-artifact/deck-artifact.tsx
|
|
2067
2067
|
var import_react17 = require("react");
|
|
2068
2068
|
var import_react_dom = require("react-dom");
|
|
2069
|
+
|
|
2070
|
+
// src/components/badge/badge.tsx
|
|
2071
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2072
|
+
var BASE = "inline-flex items-center whitespace-nowrap rounded-full";
|
|
2073
|
+
var SIZES = {
|
|
2074
|
+
// `sm` is a uniform scale-down of `md` (text 10/12 of caption): padding and line-height keep
|
|
2075
|
+
// md's proportions (caption is 12px text on a 16px line = 1.333 ratio) so the pill shape matches.
|
|
2076
|
+
md: "px-2.5 py-0.5 text-geist-label-caption-medium",
|
|
2077
|
+
sm: "px-2 py-0.5 text-[11px]/[1.333] font-medium"
|
|
2078
|
+
};
|
|
2079
|
+
var SUBTLE = {
|
|
2080
|
+
neutral: "bg-brown-20 text-brown-70",
|
|
2081
|
+
warning: "bg-orange-50 text-orange-600",
|
|
2082
|
+
violet: "bg-violet-50 text-violet-600"
|
|
2083
|
+
};
|
|
2084
|
+
var OUTLINE = {
|
|
2085
|
+
neutral: "border border-brown-30 bg-white text-brown-100",
|
|
2086
|
+
warning: "border border-orange-200 bg-white text-orange-600",
|
|
2087
|
+
violet: "border border-violet-400 bg-white text-violet-600"
|
|
2088
|
+
};
|
|
2089
|
+
var VARIANTS = {
|
|
2090
|
+
subtle: SUBTLE,
|
|
2091
|
+
outline: OUTLINE
|
|
2092
|
+
};
|
|
2093
|
+
function Badge({
|
|
2094
|
+
variant = "subtle",
|
|
2095
|
+
tone = "neutral",
|
|
2096
|
+
size = "md",
|
|
2097
|
+
className,
|
|
2098
|
+
children
|
|
2099
|
+
}) {
|
|
2100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: cn(BASE, SIZES[size], VARIANTS[variant][tone], className), children });
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
// src/components/artifacts/deck-artifact/deck-artifact.tsx
|
|
2069
2104
|
init_capture_exclude_attribute();
|
|
2070
2105
|
|
|
2071
2106
|
// src/components/artifacts/deck-artifact/deck-artifact-content.tsx
|
|
@@ -2073,23 +2108,23 @@ var import_react16 = require("react");
|
|
|
2073
2108
|
|
|
2074
2109
|
// src/components/ui/table.tsx
|
|
2075
2110
|
var React3 = __toESM(require("react"), 1);
|
|
2076
|
-
var
|
|
2077
|
-
var Table = React3.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2111
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2112
|
+
var Table = React3.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cn("relative w-full overflow-auto", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) }));
|
|
2078
2113
|
Table.displayName = "Table";
|
|
2079
2114
|
var TableHeader = React3.forwardRef(
|
|
2080
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2115
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
|
|
2081
2116
|
);
|
|
2082
2117
|
TableHeader.displayName = "TableHeader";
|
|
2083
2118
|
var TableBody = React3.forwardRef(
|
|
2084
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2119
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
|
|
2085
2120
|
);
|
|
2086
2121
|
TableBody.displayName = "TableBody";
|
|
2087
2122
|
var TableFooter = React3.forwardRef(
|
|
2088
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2123
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tfoot", { ref, className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props })
|
|
2089
2124
|
);
|
|
2090
2125
|
TableFooter.displayName = "TableFooter";
|
|
2091
2126
|
var TableRow = React3.forwardRef(
|
|
2092
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2127
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2093
2128
|
"tr",
|
|
2094
2129
|
{
|
|
2095
2130
|
ref,
|
|
@@ -2100,7 +2135,7 @@ var TableRow = React3.forwardRef(
|
|
|
2100
2135
|
);
|
|
2101
2136
|
TableRow.displayName = "TableRow";
|
|
2102
2137
|
var TableHead = React3.forwardRef(
|
|
2103
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2138
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2104
2139
|
"th",
|
|
2105
2140
|
{
|
|
2106
2141
|
ref,
|
|
@@ -2114,11 +2149,11 @@ var TableHead = React3.forwardRef(
|
|
|
2114
2149
|
);
|
|
2115
2150
|
TableHead.displayName = "TableHead";
|
|
2116
2151
|
var TableCell = React3.forwardRef(
|
|
2117
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2152
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { ref, className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className), ...props })
|
|
2118
2153
|
);
|
|
2119
2154
|
TableCell.displayName = "TableCell";
|
|
2120
2155
|
var TableCaption = React3.forwardRef(
|
|
2121
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2156
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props })
|
|
2122
2157
|
);
|
|
2123
2158
|
TableCaption.displayName = "TableCaption";
|
|
2124
2159
|
|
|
@@ -2149,21 +2184,21 @@ function useScrollShadow() {
|
|
|
2149
2184
|
}
|
|
2150
2185
|
|
|
2151
2186
|
// src/components/table/data-table.tsx
|
|
2152
|
-
var
|
|
2187
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2153
2188
|
var DATA_TABLE_HEAD_CLASS = "h-auto py-2 px-4 text-xs font-medium text-foreground whitespace-nowrap text-left";
|
|
2154
2189
|
var DATA_TABLE_CELL_CLASS = "p-4 text-sm font-normal text-foreground align-top min-w-[150px] text-left";
|
|
2155
2190
|
var DATA_TABLE_ROW_CLASS = "border-b-brown-30 bg-background/70 hover:bg-secondary";
|
|
2156
2191
|
var DATA_TABLE_SCROLL_SHADOW = "0 1px 2px rgb(0 0 0 / 0.01), 0 6px 12px -2px rgb(0 0 0 / 0.03)";
|
|
2157
2192
|
function DataTable({ header, children, maxBodyHeight, className }) {
|
|
2158
2193
|
const { targetRef, isScrolled } = useScrollShadow();
|
|
2159
|
-
return /* @__PURE__ */ (0,
|
|
2194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2160
2195
|
"div",
|
|
2161
2196
|
{
|
|
2162
2197
|
ref: targetRef,
|
|
2163
2198
|
className: cn("overscroll-none", className),
|
|
2164
2199
|
style: maxBodyHeight !== void 0 ? { maxHeight: maxBodyHeight, overflowY: "auto" } : void 0,
|
|
2165
|
-
children: /* @__PURE__ */ (0,
|
|
2166
|
-
/* @__PURE__ */ (0,
|
|
2200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Table, { containerClassName: "overflow-visible", children: [
|
|
2201
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2167
2202
|
TableHeader,
|
|
2168
2203
|
{
|
|
2169
2204
|
"data-scrolled": isScrolled ? "true" : void 0,
|
|
@@ -2172,7 +2207,7 @@ function DataTable({ header, children, maxBodyHeight, className }) {
|
|
|
2172
2207
|
children: header
|
|
2173
2208
|
}
|
|
2174
2209
|
),
|
|
2175
|
-
/* @__PURE__ */ (0,
|
|
2210
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableBody, { children })
|
|
2176
2211
|
] })
|
|
2177
2212
|
}
|
|
2178
2213
|
);
|
|
@@ -2193,7 +2228,7 @@ function formatCell(row, column) {
|
|
|
2193
2228
|
var DATA_ROW_CLASSES = `${DATA_TABLE_ROW_CLASS} animate-in fade-in duration-300`;
|
|
2194
2229
|
|
|
2195
2230
|
// src/components/artifacts/table-artifact/table-artifact-content.tsx
|
|
2196
|
-
var
|
|
2231
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2197
2232
|
function TableArtifactContent({
|
|
2198
2233
|
columns,
|
|
2199
2234
|
data,
|
|
@@ -2203,45 +2238,45 @@ function TableArtifactContent({
|
|
|
2203
2238
|
labels
|
|
2204
2239
|
}) {
|
|
2205
2240
|
if (data.status === TABLE_STATUS.ERROR) {
|
|
2206
|
-
return /* @__PURE__ */ (0,
|
|
2241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StatusMessage, { $tone: "error", children: labels.loadError });
|
|
2207
2242
|
}
|
|
2208
2243
|
if (data.status === TABLE_STATUS.UNAVAILABLE) {
|
|
2209
|
-
return /* @__PURE__ */ (0,
|
|
2244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StatusMessage, { $tone: "info", children: labels.unavailable });
|
|
2210
2245
|
}
|
|
2211
2246
|
if (data.status === TABLE_STATUS.LOADING) {
|
|
2212
2247
|
if (typeof knownRowCount === "number" && knownRowCount > 0) {
|
|
2213
2248
|
const shimmerCount = Math.min(knownRowCount, maxShimmerRows);
|
|
2214
|
-
return /* @__PURE__ */ (0,
|
|
2249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArtifactTable, { columns, maxBodyHeight, children: renderShimmerRows(columns, shimmerCount) });
|
|
2215
2250
|
}
|
|
2216
|
-
return /* @__PURE__ */ (0,
|
|
2251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StatusMessage, { $tone: "info", children: labels.loading });
|
|
2217
2252
|
}
|
|
2218
|
-
return /* @__PURE__ */ (0,
|
|
2253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArtifactTable, { columns, maxBodyHeight, children: data.rows.length === 0 ? renderEmptyRow(columns.length, labels.empty) : renderDataRows(columns, data.rows) });
|
|
2219
2254
|
}
|
|
2220
2255
|
function ArtifactTable({ columns, maxBodyHeight, children }) {
|
|
2221
|
-
return /* @__PURE__ */ (0,
|
|
2256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2222
2257
|
DataTable,
|
|
2223
2258
|
{
|
|
2224
2259
|
maxBodyHeight,
|
|
2225
|
-
header: /* @__PURE__ */ (0,
|
|
2260
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableRow, { className: "hover:bg-transparent", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableHead, { scope: "col", className: DATA_TABLE_HEAD_CLASS, children: column.label }, column.key)) }),
|
|
2226
2261
|
children
|
|
2227
2262
|
}
|
|
2228
2263
|
);
|
|
2229
2264
|
}
|
|
2230
2265
|
function renderShimmerRows(columns, count) {
|
|
2231
|
-
return Array.from({ length: count }).map((_, index) => /* @__PURE__ */ (0,
|
|
2266
|
+
return Array.from({ length: count }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableRow, { className: DATA_TABLE_ROW_CLASS, "aria-hidden": "true", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "block h-3 w-3/4 animate-pulse rounded bg-muted-foreground/20" }) }, column.key)) }, `shimmer-${index}`));
|
|
2232
2267
|
}
|
|
2233
2268
|
function renderDataRows(columns, rows) {
|
|
2234
|
-
return rows.map((row, index) => /* @__PURE__ */ (0,
|
|
2269
|
+
return rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableRow, { className: DATA_ROW_CLASSES, children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableCell, { className: DATA_TABLE_CELL_CLASS, children: formatCell(row, column) }, column.key)) }, index));
|
|
2235
2270
|
}
|
|
2236
2271
|
function renderEmptyRow(colSpan, emptyMessage) {
|
|
2237
|
-
return /* @__PURE__ */ (0,
|
|
2272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableCell, { colSpan, className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }) });
|
|
2238
2273
|
}
|
|
2239
2274
|
|
|
2240
2275
|
// src/components/artifacts/deck-artifact/deck-markdown.tsx
|
|
2241
2276
|
var import_react_markdown = __toESM(require("react-markdown"), 1);
|
|
2242
2277
|
var import_remark_breaks = __toESM(require("remark-breaks"), 1);
|
|
2243
2278
|
var import_remark_gfm = __toESM(require("remark-gfm"), 1);
|
|
2244
|
-
var
|
|
2279
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2245
2280
|
function sanitize(text) {
|
|
2246
2281
|
return text.split("\n").filter((line) => {
|
|
2247
2282
|
const t = line.trim();
|
|
@@ -2249,45 +2284,45 @@ function sanitize(text) {
|
|
|
2249
2284
|
}).join("\n");
|
|
2250
2285
|
}
|
|
2251
2286
|
var MARKDOWN_COMPONENTS = {
|
|
2252
|
-
h1: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2253
|
-
h2: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2254
|
-
h3: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2255
|
-
h4: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2256
|
-
h5: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2257
|
-
h6: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2258
|
-
p: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2259
|
-
ul: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2260
|
-
ol: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2287
|
+
h1: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h1", { className: "text-[30px] font-semibold leading-tight text-foreground mb-3", ...props }),
|
|
2288
|
+
h2: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "text-[26px] font-semibold leading-tight text-foreground mb-2", ...props }),
|
|
2289
|
+
h3: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
|
|
2290
|
+
h4: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h4", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
|
|
2291
|
+
h5: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h5", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
|
|
2292
|
+
h6: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h6", { className: "text-[24px] font-semibold leading-tight text-foreground mb-2", ...props }),
|
|
2293
|
+
p: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-[22px] leading-relaxed text-foreground my-2", ...props }),
|
|
2294
|
+
ul: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ul", { className: "list-disc pl-7 text-[22px] leading-relaxed text-foreground my-2", ...props }),
|
|
2295
|
+
ol: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ol", { className: "list-decimal pl-7 text-[22px] leading-relaxed text-foreground my-2", ...props }),
|
|
2261
2296
|
// react-markdown injects list metadata (`ordered` / `index` / `checked`) that must not leak to the DOM.
|
|
2262
|
-
li: ({ node: _node, ordered: _ordered, index: _index, checked: _checked, ...props }) => /* @__PURE__ */ (0,
|
|
2263
|
-
strong: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2264
|
-
em: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2297
|
+
li: ({ node: _node, ordered: _ordered, index: _index, checked: _checked, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("li", { className: "my-1", ...props }),
|
|
2298
|
+
strong: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("strong", { className: "font-semibold", ...props }),
|
|
2299
|
+
em: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("em", { className: "italic", ...props }),
|
|
2265
2300
|
// Gate `<img src>` against an http(s) allowlist. react-markdown v8 percent-encodes the URL but
|
|
2266
2301
|
// does NOT protocol-filter image src (unlike link href), so an LLM-authored
|
|
2267
2302
|
// `` / `` or a tracking-pixel `` would otherwise render
|
|
2268
2303
|
// with the raw URL. Unsafe src → render nothing.
|
|
2269
|
-
img: ({ node: _node, src, ...props }) => typeof src === "string" && isSafeDownloadUrl(src) ? /* @__PURE__ */ (0,
|
|
2304
|
+
img: ({ node: _node, src, ...props }) => typeof src === "string" && isSafeDownloadUrl(src) ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("img", { src, className: "max-w-full", ...props }) : null,
|
|
2270
2305
|
a: ({ node: _node, ...props }) => (
|
|
2271
2306
|
// `rel` is forced AFTER `{...props}` so it can't be overridden — if a consumer ever adds
|
|
2272
2307
|
// `linkTarget="_blank"`, LLM-authored links still can't reach `window.opener`.
|
|
2273
|
-
/* @__PURE__ */ (0,
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("a", { className: "underline underline-offset-2", ...props, rel: "noopener noreferrer" })
|
|
2274
2309
|
),
|
|
2275
2310
|
// react-markdown passes `inline` to distinguish inline code from fenced blocks — strip it from the DOM.
|
|
2276
|
-
code: ({ node: _node, inline: _inline, ...props }) => /* @__PURE__ */ (0,
|
|
2277
|
-
blockquote: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2278
|
-
hr: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2279
|
-
table: ({ node: _node, ...props }) => /* @__PURE__ */ (0,
|
|
2311
|
+
code: ({ node: _node, inline: _inline, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("code", { className: "rounded bg-muted px-1.5 py-0.5 font-mono text-[18px]", ...props }),
|
|
2312
|
+
blockquote: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("blockquote", { className: "border-l-2 border-brown-alpha-12 pl-4 text-[22px] text-muted-foreground", ...props }),
|
|
2313
|
+
hr: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("hr", { className: "my-4 border-brown-alpha-12", ...props }),
|
|
2314
|
+
table: ({ node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("table", { className: "w-full border-collapse text-[20px]", ...props }) }),
|
|
2280
2315
|
// react-markdown passes `isHeader` to cell renderers — strip it so it never reaches the DOM.
|
|
2281
|
-
th: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0,
|
|
2282
|
-
td: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0,
|
|
2316
|
+
th: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("th", { className: "border-b border-brown-alpha-12 px-3 py-1.5 text-left font-medium", ...props }),
|
|
2317
|
+
td: ({ node: _node, isHeader: _isHeader, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("td", { className: "border-b border-brown-alpha-12 px-3 py-1.5", ...props })
|
|
2283
2318
|
};
|
|
2284
2319
|
function DeckMarkdown({ markdown }) {
|
|
2285
|
-
return /* @__PURE__ */ (0,
|
|
2320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default, import_remark_breaks.default], components: MARKDOWN_COMPONENTS, children: sanitize(markdown) });
|
|
2286
2321
|
}
|
|
2287
2322
|
|
|
2288
2323
|
// src/components/artifacts/deck-artifact/slide-renderers.tsx
|
|
2289
2324
|
var import_react15 = require("react");
|
|
2290
|
-
var
|
|
2325
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2291
2326
|
function safeLogoUrl(meta) {
|
|
2292
2327
|
return meta?.logoUrl && isSafeDownloadUrl(meta.logoUrl) ? meta.logoUrl : null;
|
|
2293
2328
|
}
|
|
@@ -2314,7 +2349,7 @@ function SlideFrame({ meta, children, accent = false, bare = false }) {
|
|
|
2314
2349
|
const eyebrowColor = accent ? "text-white/70" : "text-brown-60";
|
|
2315
2350
|
const borderColor = accent ? "border-white/20" : "border-brown-alpha-12";
|
|
2316
2351
|
const logoSrc = safeLogoUrl(meta);
|
|
2317
|
-
return /* @__PURE__ */ (0,
|
|
2352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: frameRef, className: `relative aspect-[16/9] w-full overflow-hidden rounded-lg ${bg}`, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2318
2353
|
"div",
|
|
2319
2354
|
{
|
|
2320
2355
|
className: "absolute left-0 top-0 origin-top-left",
|
|
@@ -2325,26 +2360,26 @@ function SlideFrame({ meta, children, accent = false, bare = false }) {
|
|
|
2325
2360
|
visibility: scale === null ? "hidden" : "visible"
|
|
2326
2361
|
},
|
|
2327
2362
|
children: [
|
|
2328
|
-
!bare ? /* @__PURE__ */ (0,
|
|
2363
|
+
!bare ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2329
2364
|
"div",
|
|
2330
2365
|
{
|
|
2331
2366
|
className: `absolute inset-x-0 top-0 flex items-center justify-between border-b px-16 ${borderColor}`,
|
|
2332
2367
|
style: { height: EYEBROW_H },
|
|
2333
2368
|
children: [
|
|
2334
|
-
meta?.eyebrow ? /* @__PURE__ */ (0,
|
|
2335
|
-
logoSrc ? /* @__PURE__ */ (0,
|
|
2369
|
+
meta?.eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: eyebrowColor, style: { ...ACCENT_FONT, fontSize: 22 }, children: meta.eyebrow }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", {}),
|
|
2370
|
+
logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("img", { src: logoSrc, alt: "", className: "object-contain", style: { maxHeight: CANVAS_LOGO_MAX_H } }) : null
|
|
2336
2371
|
]
|
|
2337
2372
|
}
|
|
2338
2373
|
) : null,
|
|
2339
|
-
/* @__PURE__ */ (0,
|
|
2374
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "absolute inset-x-0 bottom-0 overflow-hidden", style: { top: bare ? 0 : EYEBROW_H }, children })
|
|
2340
2375
|
]
|
|
2341
2376
|
}
|
|
2342
2377
|
) });
|
|
2343
2378
|
}
|
|
2344
2379
|
function TitleSlide({ slide, meta }) {
|
|
2345
2380
|
const logoSrc = safeLogoUrl(meta);
|
|
2346
|
-
return /* @__PURE__ */ (0,
|
|
2347
|
-
logoSrc ? /* @__PURE__ */ (0,
|
|
2381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, bare: true, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex h-full flex-col justify-center px-24 py-16", children: [
|
|
2382
|
+
logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2348
2383
|
"img",
|
|
2349
2384
|
{
|
|
2350
2385
|
src: logoSrc,
|
|
@@ -2353,7 +2388,7 @@ function TitleSlide({ slide, meta }) {
|
|
|
2353
2388
|
style: { maxHeight: 56, maxWidth: 380 }
|
|
2354
2389
|
}
|
|
2355
2390
|
) : null,
|
|
2356
|
-
/* @__PURE__ */ (0,
|
|
2391
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2357
2392
|
"h1",
|
|
2358
2393
|
{
|
|
2359
2394
|
className: "font-bold tracking-tight text-brown-100",
|
|
@@ -2361,36 +2396,36 @@ function TitleSlide({ slide, meta }) {
|
|
|
2361
2396
|
children: slide.title
|
|
2362
2397
|
}
|
|
2363
2398
|
),
|
|
2364
|
-
slide.subtitle ? /* @__PURE__ */ (0,
|
|
2365
|
-
slide.description ? /* @__PURE__ */ (0,
|
|
2366
|
-
meta?.date ? /* @__PURE__ */ (0,
|
|
2399
|
+
slide.subtitle ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-7 text-brown-70", style: { ...ACCENT_FONT, fontSize: 34 }, children: slide.subtitle }) : null,
|
|
2400
|
+
slide.description ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-4 leading-relaxed text-brown-70", style: { fontSize: 24, maxWidth: 880 }, children: slide.description }) : null,
|
|
2401
|
+
meta?.date ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-10 text-brown-70", style: { ...ACCENT_FONT, fontSize: 30 }, children: meta.date }) : null
|
|
2367
2402
|
] }) });
|
|
2368
2403
|
}
|
|
2369
2404
|
function AgendaSlide({ slide, meta, labels }) {
|
|
2370
2405
|
const items = slide.items ?? [];
|
|
2371
|
-
return /* @__PURE__ */ (0,
|
|
2372
|
-
/* @__PURE__ */ (0,
|
|
2373
|
-
/* @__PURE__ */ (0,
|
|
2374
|
-
/* @__PURE__ */ (0,
|
|
2375
|
-
/* @__PURE__ */ (0,
|
|
2406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "h-full px-24 py-14", children: [
|
|
2407
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: "mb-10 font-bold text-brown-90", style: { fontSize: 40 }, children: slide.title || labels.agenda }),
|
|
2408
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-col", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-baseline gap-6 border-b border-brown-alpha-12 py-5", children: [
|
|
2409
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "shrink-0 text-indigo-600", style: { ...ACCENT_FONT, fontSize: 28, width: 64 }, children: String(i + 1).padStart(2, "0") }),
|
|
2410
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-brown-90", style: { fontSize: 28 }, children: item })
|
|
2376
2411
|
] }, i)) })
|
|
2377
2412
|
] }) });
|
|
2378
2413
|
}
|
|
2379
2414
|
function SectionSlide({ slide, meta }) {
|
|
2380
|
-
return /* @__PURE__ */ (0,
|
|
2381
|
-
/* @__PURE__ */ (0,
|
|
2382
|
-
/* @__PURE__ */ (0,
|
|
2415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, accent: true, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex h-full flex-col justify-center gap-6 px-24", children: [
|
|
2416
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: "font-bold text-white", style: { fontSize: 72, lineHeight: 1.05, maxWidth: 940 }, children: slide.title }),
|
|
2417
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mt-2 bg-white/50", style: { width: 96, height: 5 } })
|
|
2383
2418
|
] }) });
|
|
2384
2419
|
}
|
|
2385
2420
|
function ClosingSlide({ meta, labels }) {
|
|
2386
|
-
return /* @__PURE__ */ (0,
|
|
2387
|
-
/* @__PURE__ */ (0,
|
|
2388
|
-
/* @__PURE__ */ (0,
|
|
2421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex h-full flex-col items-center justify-center gap-6 px-24 text-center", children: [
|
|
2422
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h1", { className: "font-bold text-brown-100", style: { fontSize: 72 }, children: labels.thankYou }),
|
|
2423
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-indigo-600", style: { ...ACCENT_FONT, fontSize: 36 }, children: labels.questions })
|
|
2389
2424
|
] }) });
|
|
2390
2425
|
}
|
|
2391
2426
|
|
|
2392
2427
|
// src/components/artifacts/deck-artifact/deck-artifact-content.tsx
|
|
2393
|
-
var
|
|
2428
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2394
2429
|
var TABLE_BLOCK_MAX_SHIMMER_ROWS = 10;
|
|
2395
2430
|
var TABLE_CHROME_RESERVE = 56;
|
|
2396
2431
|
var VISUAL_FALLBACK_HEIGHT = 360;
|
|
@@ -2420,14 +2455,14 @@ function DeckArtifactContent({
|
|
|
2420
2455
|
[slides.length, onNavigate, isControlled, onSlideChange]
|
|
2421
2456
|
);
|
|
2422
2457
|
const position = labels.position.replace("{current}", String(current + 1)).replace("{total}", String(slides.length));
|
|
2423
|
-
return /* @__PURE__ */ (0,
|
|
2424
|
-
/* @__PURE__ */ (0,
|
|
2425
|
-
/* @__PURE__ */ (0,
|
|
2458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-3 p-4", children: [
|
|
2459
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SlideDispatch, { slide, labels, meta }),
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2426
2461
|
"div",
|
|
2427
2462
|
{
|
|
2428
2463
|
className: `flex items-center justify-between border-t pt-2 ${onDark ? "border-white/20" : "border-brown-alpha-12"}`,
|
|
2429
2464
|
children: [
|
|
2430
|
-
/* @__PURE__ */ (0,
|
|
2465
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2431
2466
|
IconButton,
|
|
2432
2467
|
{
|
|
2433
2468
|
icon: IconChevronLeft,
|
|
@@ -2438,8 +2473,8 @@ function DeckArtifactContent({
|
|
|
2438
2473
|
onClick: () => goTo(current - 1)
|
|
2439
2474
|
}
|
|
2440
2475
|
),
|
|
2441
|
-
/* @__PURE__ */ (0,
|
|
2442
|
-
/* @__PURE__ */ (0,
|
|
2476
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: `text-xs font-medium ${onDark ? "text-white/70" : "text-brown-70"}`, children: position }),
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2443
2478
|
IconButton,
|
|
2444
2479
|
{
|
|
2445
2480
|
icon: IconChevronRight,
|
|
@@ -2459,16 +2494,16 @@ function SlideDispatch({ slide, labels, meta }) {
|
|
|
2459
2494
|
const kind = slide.kind ?? deckSlideKinds.CONTENT;
|
|
2460
2495
|
switch (kind) {
|
|
2461
2496
|
case deckSlideKinds.TITLE:
|
|
2462
|
-
return /* @__PURE__ */ (0,
|
|
2497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TitleSlide, { slide, meta });
|
|
2463
2498
|
case deckSlideKinds.AGENDA:
|
|
2464
|
-
return /* @__PURE__ */ (0,
|
|
2499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AgendaSlide, { slide, meta, labels });
|
|
2465
2500
|
case deckSlideKinds.SECTION:
|
|
2466
|
-
return /* @__PURE__ */ (0,
|
|
2501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SectionSlide, { slide, meta });
|
|
2467
2502
|
case deckSlideKinds.CLOSING:
|
|
2468
|
-
return /* @__PURE__ */ (0,
|
|
2503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ClosingSlide, { meta, labels });
|
|
2469
2504
|
case deckSlideKinds.CONTENT:
|
|
2470
2505
|
default:
|
|
2471
|
-
return /* @__PURE__ */ (0,
|
|
2506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ContentSlide, { slide, meta, labels });
|
|
2472
2507
|
}
|
|
2473
2508
|
}
|
|
2474
2509
|
function isVisualBlock(block) {
|
|
@@ -2481,25 +2516,25 @@ function ContentSlide({ slide, meta, labels }) {
|
|
|
2481
2516
|
(b) => b.type === deckBlockTypes.TEXT
|
|
2482
2517
|
);
|
|
2483
2518
|
if (visuals.length === 1 && texts.length > 0) {
|
|
2484
|
-
return /* @__PURE__ */ (0,
|
|
2485
|
-
/* @__PURE__ */ (0,
|
|
2486
|
-
/* @__PURE__ */ (0,
|
|
2487
|
-
texts.map((block, i) => /* @__PURE__ */ (0,
|
|
2519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex h-full items-stretch gap-12 px-16 py-12", children: [
|
|
2520
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex w-[42%] shrink-0 flex-col overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(AutoFit, { children: [
|
|
2521
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h3", { className: "mb-5 font-bold leading-tight text-foreground", style: { fontSize: 34 }, children: slide.title }),
|
|
2522
|
+
texts.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DeckMarkdown, { markdown: block.markdown }, i))
|
|
2488
2523
|
] }) }),
|
|
2489
|
-
/* @__PURE__ */ (0,
|
|
2524
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "min-h-0 min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FillVisual, { block: visuals[0], labels }) })
|
|
2490
2525
|
] }) });
|
|
2491
2526
|
}
|
|
2492
2527
|
if (visuals.length > 0) {
|
|
2493
|
-
return /* @__PURE__ */ (0,
|
|
2494
|
-
/* @__PURE__ */ (0,
|
|
2528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex h-full flex-col gap-5 px-16 py-10", children: [
|
|
2529
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h3", { className: "shrink-0 font-bold leading-tight text-foreground", style: { fontSize: 32 }, children: slide.title }),
|
|
2495
2530
|
content.map(
|
|
2496
|
-
(block, i) => isVisualBlock(block) ? /* @__PURE__ */ (0,
|
|
2531
|
+
(block, i) => isVisualBlock(block) ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "min-h-0 min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FillVisual, { block, labels }) }, i) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "shrink-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DeckMarkdown, { markdown: block.markdown }) }, i)
|
|
2497
2532
|
)
|
|
2498
2533
|
] }) });
|
|
2499
2534
|
}
|
|
2500
|
-
return /* @__PURE__ */ (0,
|
|
2501
|
-
/* @__PURE__ */ (0,
|
|
2502
|
-
texts.map((block, i) => /* @__PURE__ */ (0,
|
|
2535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SlideFrame, { meta, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-full px-24 py-12", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(AutoFit, { children: [
|
|
2536
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h3", { className: "mb-6 font-bold leading-tight text-foreground", style: { fontSize: 38 }, children: slide.title }),
|
|
2537
|
+
texts.map((block, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DeckMarkdown, { markdown: block.markdown }, i))
|
|
2503
2538
|
] }) }) });
|
|
2504
2539
|
}
|
|
2505
2540
|
function AutoFit({ children }) {
|
|
@@ -2523,7 +2558,7 @@ function AutoFit({ children }) {
|
|
|
2523
2558
|
return () => ro.disconnect();
|
|
2524
2559
|
}, []);
|
|
2525
2560
|
const scaled = fit.scale < 1;
|
|
2526
|
-
return /* @__PURE__ */ (0,
|
|
2561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref: boxRef, className: "flex h-full min-h-0 w-full flex-col justify-center overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: scaled ? { height: fit.height } : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2527
2562
|
"div",
|
|
2528
2563
|
{
|
|
2529
2564
|
ref: contentRef,
|
|
@@ -2548,12 +2583,12 @@ function FillVisual({ block, labels }) {
|
|
|
2548
2583
|
return () => ro.disconnect();
|
|
2549
2584
|
}, []);
|
|
2550
2585
|
const chartLabels = labels.chart ?? DEFAULT_CHART_ARTIFACT_LABELS;
|
|
2551
|
-
return /* @__PURE__ */ (0,
|
|
2586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref, className: "h-full min-h-0 w-full overflow-hidden", children: block.type === deckBlockTypes.CHART ? (
|
|
2552
2587
|
// ChartArtifactContent assumes a non-empty rowset (the standalone ChartArtifact guards
|
|
2553
2588
|
// `rows.length > 0` upstream); mirror that guard here so an empty inline chart shows the
|
|
2554
2589
|
// localized empty status instead of a blank chart area.
|
|
2555
|
-
block.rows.length === 0 ? /* @__PURE__ */ (0,
|
|
2556
|
-
) : /* @__PURE__ */ (0,
|
|
2590
|
+
block.rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StatusMessage, { $tone: "info", children: chartLabels.empty }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { height }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChartArtifactContent, { config: block.config, rows: block.rows, labels: chartLabels }) })
|
|
2591
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2557
2592
|
TableArtifactContent,
|
|
2558
2593
|
{
|
|
2559
2594
|
columns: block.config.columns,
|
|
@@ -2619,7 +2654,7 @@ function isValidDeckBlock(block) {
|
|
|
2619
2654
|
}
|
|
2620
2655
|
|
|
2621
2656
|
// src/components/artifacts/deck-artifact/deck-artifact.tsx
|
|
2622
|
-
var
|
|
2657
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2623
2658
|
var TITLE_CLASSES2 = "text-sm font-semibold text-foreground";
|
|
2624
2659
|
function DeckArtifact({ artifact, labels, callbacks }) {
|
|
2625
2660
|
const validConfig = isValidDeckConfig(artifact.config);
|
|
@@ -2660,9 +2695,9 @@ function DeckArtifact({ artifact, labels, callbacks }) {
|
|
|
2660
2695
|
const meta = artifact.config?.meta;
|
|
2661
2696
|
const handleOpenFullscreen = () => setIsFullscreen(true);
|
|
2662
2697
|
const handleCloseFullscreen = () => setIsFullscreen(false);
|
|
2663
|
-
const actions = /* @__PURE__ */ (0,
|
|
2664
|
-
showDownload ? /* @__PURE__ */ (0,
|
|
2665
|
-
validConfig ? /* @__PURE__ */ (0,
|
|
2698
|
+
const actions = /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ArtifactActions, { ...{ [CAPTURE_EXCLUDE_ATTRIBUTE]: "" }, children: [
|
|
2699
|
+
showDownload ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactDownloadButton, { href: presignedUrl ?? "", label: resolvedLabels.download, onClick: handleDownload }) : null,
|
|
2700
|
+
validConfig ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2666
2701
|
IconButton,
|
|
2667
2702
|
{
|
|
2668
2703
|
icon: IconArrowsMaximize,
|
|
@@ -2672,22 +2707,29 @@ function DeckArtifact({ artifact, labels, callbacks }) {
|
|
|
2672
2707
|
}
|
|
2673
2708
|
) : null
|
|
2674
2709
|
] });
|
|
2710
|
+
const heading = /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2711
|
+
artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactTitle, { className: TITLE_CLASSES2, children: artifact.title }) : null,
|
|
2712
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Badge, { tone: "violet", variant: "subtle", size: "sm", className: "gap-1 py-1", children: [
|
|
2713
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { icon: IconFlask2Filled, size: 12 }),
|
|
2714
|
+
"Labs"
|
|
2715
|
+
] })
|
|
2716
|
+
] });
|
|
2675
2717
|
if (!validConfig) {
|
|
2676
|
-
return /* @__PURE__ */ (0,
|
|
2677
|
-
/* @__PURE__ */ (0,
|
|
2678
|
-
|
|
2718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
|
|
2719
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
|
|
2720
|
+
heading,
|
|
2679
2721
|
actions
|
|
2680
2722
|
] }),
|
|
2681
|
-
/* @__PURE__ */ (0,
|
|
2723
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StatusMessage, { $tone: "info", children: resolvedLabels.unavailable }) })
|
|
2682
2724
|
] });
|
|
2683
2725
|
}
|
|
2684
|
-
return /* @__PURE__ */ (0,
|
|
2685
|
-
/* @__PURE__ */ (0,
|
|
2686
|
-
/* @__PURE__ */ (0,
|
|
2687
|
-
|
|
2726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
|
|
2729
|
+
heading,
|
|
2688
2730
|
actions
|
|
2689
2731
|
] }),
|
|
2690
|
-
/* @__PURE__ */ (0,
|
|
2732
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArtifactContent, { className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2691
2733
|
DeckArtifactContent,
|
|
2692
2734
|
{
|
|
2693
2735
|
slides: artifact.config.slides,
|
|
@@ -2700,7 +2742,7 @@ function DeckArtifact({ artifact, labels, callbacks }) {
|
|
|
2700
2742
|
) })
|
|
2701
2743
|
] }),
|
|
2702
2744
|
isFullscreen && (0, import_react_dom.createPortal)(
|
|
2703
|
-
/* @__PURE__ */ (0,
|
|
2745
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2704
2746
|
FullscreenOverlay,
|
|
2705
2747
|
{
|
|
2706
2748
|
artifact,
|
|
@@ -2724,15 +2766,15 @@ function FullscreenOverlay({
|
|
|
2724
2766
|
onClose
|
|
2725
2767
|
}) {
|
|
2726
2768
|
const meta = artifact.config?.meta;
|
|
2727
|
-
return /* @__PURE__ */ (0,
|
|
2769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2728
2770
|
"div",
|
|
2729
2771
|
{
|
|
2730
2772
|
className: "fixed inset-0 z-[2147483647] flex items-center justify-center bg-black/80",
|
|
2731
2773
|
role: "dialog",
|
|
2732
2774
|
"aria-modal": "true",
|
|
2733
2775
|
"aria-label": resolvedLabels.exitFullscreen,
|
|
2734
|
-
children: /* @__PURE__ */ (0,
|
|
2735
|
-
/* @__PURE__ */ (0,
|
|
2776
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative", style: { width: "min(94vw, calc(82vh * 16 / 9))" }, children: [
|
|
2777
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2736
2778
|
DeckArtifactContent,
|
|
2737
2779
|
{
|
|
2738
2780
|
slides: artifact.config.slides,
|
|
@@ -2744,15 +2786,15 @@ function FullscreenOverlay({
|
|
|
2744
2786
|
onDark: true
|
|
2745
2787
|
}
|
|
2746
2788
|
),
|
|
2747
|
-
/* @__PURE__ */ (0,
|
|
2789
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2748
2790
|
"button",
|
|
2749
2791
|
{
|
|
2750
2792
|
className: "absolute -top-10 right-6 flex items-center gap-1.5 text-sm text-white/80 hover:text-white",
|
|
2751
2793
|
"aria-label": resolvedLabels.exitFullscreen,
|
|
2752
2794
|
onClick: onClose,
|
|
2753
2795
|
children: [
|
|
2754
|
-
/* @__PURE__ */ (0,
|
|
2755
|
-
/* @__PURE__ */ (0,
|
|
2796
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconArrowsMinimize, { size: 16 }),
|
|
2797
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: resolvedLabels.exitFullscreen })
|
|
2756
2798
|
]
|
|
2757
2799
|
}
|
|
2758
2800
|
)
|
|
@@ -2829,7 +2871,7 @@ function useTableArtifactData(presignedUrl, columns) {
|
|
|
2829
2871
|
}
|
|
2830
2872
|
|
|
2831
2873
|
// src/components/artifacts/table-artifact/table-artifact.tsx
|
|
2832
|
-
var
|
|
2874
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2833
2875
|
var TITLE_CLASSES3 = "text-sm font-semibold text-foreground";
|
|
2834
2876
|
var TABLE_MAX_BODY_HEIGHT = 480;
|
|
2835
2877
|
var MAX_SHIMMER_ROWS = 10;
|
|
@@ -2852,10 +2894,10 @@ function TableArtifact({ artifact, labels, callbacks }) {
|
|
|
2852
2894
|
const onDownload = callbacks?.onDownload;
|
|
2853
2895
|
const handleDownloadClick = onDownload ? () => onDownload(artifact) : void 0;
|
|
2854
2896
|
if (!validConfig || !validColumns) {
|
|
2855
|
-
return /* @__PURE__ */ (0,
|
|
2856
|
-
/* @__PURE__ */ (0,
|
|
2857
|
-
artifact.title ? /* @__PURE__ */ (0,
|
|
2858
|
-
presignedUrl ? /* @__PURE__ */ (0,
|
|
2897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
|
|
2898
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
|
|
2899
|
+
artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactTitle, { className: TITLE_CLASSES3, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {}),
|
|
2900
|
+
presignedUrl ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactActions, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2859
2901
|
ArtifactDownloadButton,
|
|
2860
2902
|
{
|
|
2861
2903
|
href: presignedUrl,
|
|
@@ -2864,17 +2906,17 @@ function TableArtifact({ artifact, labels, callbacks }) {
|
|
|
2864
2906
|
}
|
|
2865
2907
|
) }) : null
|
|
2866
2908
|
] }),
|
|
2867
|
-
/* @__PURE__ */ (0,
|
|
2909
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactContent, { className: "p-0 overflow-auto", style: { maxHeight: TABLE_MAX_BODY_HEIGHT }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StatusMessage, { $tone: "info", children: resolvedLabels.unavailable }) })
|
|
2868
2910
|
] });
|
|
2869
2911
|
}
|
|
2870
2912
|
return (
|
|
2871
2913
|
// The table body owns its own scroll container (`ArtifactTable` inside `TableArtifactContent`).
|
|
2872
2914
|
// Disable the outer overflow container so only one scroll context exists — this prevents
|
|
2873
2915
|
// double-scroll nesting and lets `useScrollShadow` find the correct scroll ancestor.
|
|
2874
|
-
/* @__PURE__ */ (0,
|
|
2875
|
-
/* @__PURE__ */ (0,
|
|
2876
|
-
artifact.title ? /* @__PURE__ */ (0,
|
|
2877
|
-
/* @__PURE__ */ (0,
|
|
2916
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Artifact, { className: "shadow-none w-full rounded-2xl bg-background/70", children: [
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ArtifactHeader, { className: "bg-background/70", children: [
|
|
2918
|
+
artifact.title ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactTitle, { className: TITLE_CLASSES3, children: artifact.title }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {}),
|
|
2919
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactActions, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2878
2920
|
ArtifactDownloadButton,
|
|
2879
2921
|
{
|
|
2880
2922
|
href: presignedUrl ?? "",
|
|
@@ -2883,7 +2925,7 @@ function TableArtifact({ artifact, labels, callbacks }) {
|
|
|
2883
2925
|
}
|
|
2884
2926
|
) })
|
|
2885
2927
|
] }),
|
|
2886
|
-
/* @__PURE__ */ (0,
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ArtifactContent, { className: "p-0 overflow-visible", style: { maxHeight: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2887
2929
|
TableArtifactContent,
|
|
2888
2930
|
{
|
|
2889
2931
|
columns: validColumns,
|
|
@@ -2926,13 +2968,13 @@ function artifactToClipboardText(artifact) {
|
|
|
2926
2968
|
}
|
|
2927
2969
|
|
|
2928
2970
|
// src/components/blocks/artifact-ref-block/artifact-ref-block.tsx
|
|
2929
|
-
var
|
|
2971
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2930
2972
|
function ArtifactRefBlock({ block }) {
|
|
2931
2973
|
const { artifact, labels, callbacks } = block.payload;
|
|
2932
2974
|
const entry = ArtifactServices[artifact.type];
|
|
2933
2975
|
if (!entry) return null;
|
|
2934
2976
|
const Component = entry.Component;
|
|
2935
|
-
return /* @__PURE__ */ (0,
|
|
2977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Component, { artifact, labels, callbacks });
|
|
2936
2978
|
}
|
|
2937
2979
|
|
|
2938
2980
|
// src/components/blocks/block-services/artifact-ref-block-service.ts
|
|
@@ -2950,39 +2992,6 @@ var ArtifactRefBlockService = {
|
|
|
2950
2992
|
// src/components/blocks/notification-draft-block/notification-draft-block.tsx
|
|
2951
2993
|
var import_react20 = require("react");
|
|
2952
2994
|
|
|
2953
|
-
// src/components/badge/badge.tsx
|
|
2954
|
-
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2955
|
-
var BASE = "inline-flex items-center whitespace-nowrap rounded-full";
|
|
2956
|
-
var SIZES = {
|
|
2957
|
-
// `sm` is a uniform scale-down of `md` (text 10/12 of caption): padding and line-height keep
|
|
2958
|
-
// md's proportions (caption is 12px text on a 16px line = 1.333 ratio) so the pill shape matches.
|
|
2959
|
-
md: "px-2.5 py-0.5 text-geist-label-caption-medium",
|
|
2960
|
-
sm: "px-2 py-0.5 text-[11px]/[1.333] font-medium"
|
|
2961
|
-
};
|
|
2962
|
-
var SUBTLE = {
|
|
2963
|
-
neutral: "bg-brown-20 text-brown-70",
|
|
2964
|
-
warning: "bg-orange-50 text-orange-600",
|
|
2965
|
-
violet: "bg-violet-50 text-violet-600"
|
|
2966
|
-
};
|
|
2967
|
-
var OUTLINE = {
|
|
2968
|
-
neutral: "border border-brown-30 bg-white text-brown-100",
|
|
2969
|
-
warning: "border border-orange-200 bg-white text-orange-600",
|
|
2970
|
-
violet: "border border-violet-400 bg-white text-violet-600"
|
|
2971
|
-
};
|
|
2972
|
-
var VARIANTS = {
|
|
2973
|
-
subtle: SUBTLE,
|
|
2974
|
-
outline: OUTLINE
|
|
2975
|
-
};
|
|
2976
|
-
function Badge({
|
|
2977
|
-
variant = "subtle",
|
|
2978
|
-
tone = "neutral",
|
|
2979
|
-
size = "md",
|
|
2980
|
-
className,
|
|
2981
|
-
children
|
|
2982
|
-
}) {
|
|
2983
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: cn(BASE, SIZES[size], VARIANTS[variant][tone], className), children });
|
|
2984
|
-
}
|
|
2985
|
-
|
|
2986
2995
|
// src/components/chat/hooks/use-copy-to-clipboard.ts
|
|
2987
2996
|
var import_react19 = require("react");
|
|
2988
2997
|
|