@ai-matrx/office 0.8.62 → 0.8.64
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 +38 -0
- 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 +7 -4
- package/dist/pdf.cjs.map +1 -1
- package/dist/pdf.js +7 -4
- package/dist/pdf.js.map +1 -1
- package/package.json +6 -7
package/dist/pdf.js
CHANGED
|
@@ -159,6 +159,8 @@ function LayersList({ host }) {
|
|
|
159
159
|
import { useEffect as useEffect2, useMemo, useRef, useState as useState2 } from "react";
|
|
160
160
|
import { Button, Field, SegmentedControl as SegmentedControl2, Select, Textarea } from "@ai-matrx/design-system/controls";
|
|
161
161
|
import { PageRangeInput, formatPageRanges, parsePageRanges } from "@ai-matrx/design-system/controls";
|
|
162
|
+
import { copyText } from "@ai-matrx/kit/clipboard";
|
|
163
|
+
import { toDelimited } from "@ai-matrx/kit/delimited";
|
|
162
164
|
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
163
165
|
function Row({ label, children }) {
|
|
164
166
|
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-1", children: [
|
|
@@ -182,13 +184,14 @@ function RunButton({ busy, online, disabled, children, onClick }) {
|
|
|
182
184
|
function Result({ result, host, error }) {
|
|
183
185
|
const [copied, setCopied] = useState2(false);
|
|
184
186
|
const csv = useMemo(
|
|
185
|
-
() => result?.kind === "tables" ? result.tables.map((t) => t.rows
|
|
187
|
+
() => result?.kind === "tables" ? result.tables.map((t) => toDelimited(t.rows, { format: "csv" })).join("\n\n") : "",
|
|
186
188
|
[result]
|
|
187
189
|
);
|
|
188
190
|
const copy = async (text) => {
|
|
189
|
-
await
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
if (await copyText(text)) {
|
|
192
|
+
setCopied(true);
|
|
193
|
+
setTimeout(() => setCopied(false), 1500);
|
|
194
|
+
}
|
|
192
195
|
};
|
|
193
196
|
return /* @__PURE__ */ jsxs2("div", { className: "flex min-h-[3rem] flex-col gap-2", "aria-live": "polite", children: [
|
|
194
197
|
error ? /* @__PURE__ */ jsx2("p", { role: "alert", className: "rounded-md border border-destructive bg-destructive/10 p-2 text-xs text-destructive", children: error }) : null,
|