@ai-matrx/office 0.8.61 → 0.8.63
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 +1 -1
- package/dist/docs-io.cjs +2 -11
- package/dist/docs-io.cjs.map +1 -1
- package/dist/docs-io.js +2 -11
- package/dist/docs-io.js.map +1 -1
- package/dist/pdf.cjs +8 -5
- package/dist/pdf.cjs.map +1 -1
- package/dist/pdf.js +8 -5
- package/dist/pdf.js.map +1 -1
- package/package.json +6 -6
package/dist/pdf.cjs
CHANGED
|
@@ -218,6 +218,8 @@ function LayersList({ host }) {
|
|
|
218
218
|
var import_react2 = require("react");
|
|
219
219
|
var import_controls2 = require("@ai-matrx/design-system/controls");
|
|
220
220
|
var import_controls3 = require("@ai-matrx/design-system/controls");
|
|
221
|
+
var import_clipboard = require("@ai-matrx/kit/clipboard");
|
|
222
|
+
var import_delimited = require("@ai-matrx/kit/delimited");
|
|
221
223
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
222
224
|
function Row({ label, children }) {
|
|
223
225
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -241,13 +243,14 @@ function RunButton({ busy, online, disabled, children, onClick }) {
|
|
|
241
243
|
function Result({ result, host, error }) {
|
|
242
244
|
const [copied, setCopied] = (0, import_react2.useState)(false);
|
|
243
245
|
const csv = (0, import_react2.useMemo)(
|
|
244
|
-
() => result?.kind === "tables" ? result.tables.map((t) => t.rows
|
|
246
|
+
() => result?.kind === "tables" ? result.tables.map((t) => (0, import_delimited.toDelimited)(t.rows, { format: "csv" })).join("\n\n") : "",
|
|
245
247
|
[result]
|
|
246
248
|
);
|
|
247
249
|
const copy = async (text) => {
|
|
248
|
-
await
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
if (await (0, import_clipboard.copyText)(text)) {
|
|
251
|
+
setCopied(true);
|
|
252
|
+
setTimeout(() => setCopied(false), 1500);
|
|
253
|
+
}
|
|
251
254
|
};
|
|
252
255
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex min-h-[3rem] flex-col gap-2", "aria-live": "polite", children: [
|
|
253
256
|
error ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { role: "alert", className: "rounded-md border border-destructive bg-destructive/10 p-2 text-xs text-destructive", children: error }) : null,
|
|
@@ -1621,7 +1624,7 @@ function PdfWorkspace({ host, className }) {
|
|
|
1621
1624
|
] }) : null
|
|
1622
1625
|
] }) : null,
|
|
1623
1626
|
compact && sheet ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
1624
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1627
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", "aria-label": "Close", className: "absolute inset-0 z-30 bg-background/60", onClick: () => setSheet(null) }),
|
|
1625
1628
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "absolute inset-x-0 bottom-0 z-40 flex max-h-[75%] flex-col rounded-t-xl border-t border-border bg-background", role: "dialog", "aria-label": sheet === "pages" ? "Pages" : "Tools", children: sheet === "pages" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "h-[60vh] min-h-0", children: leftPanel }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-h-0 flex-col overflow-y-auto", children: [
|
|
1626
1629
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "p-2", role: "menu", "aria-label": "Tools", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ToolRows, { tool: activeToolKey, hostTools, canMarkup, onPick: chooseTool }) }),
|
|
1627
1630
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "border-t border-border", children: rightPanel })
|