@ai-matrx/office 0.8.59 → 0.8.61
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 +6 -2
- package/dist/{chunk-NSU6EVJK.cjs → chunk-6TUFBQLH.cjs} +3 -3
- package/dist/chunk-6TUFBQLH.cjs.map +1 -0
- package/dist/{chunk-DY5TGHBI.js → chunk-JVEJ5XLX.js} +3 -3
- package/dist/chunk-JVEJ5XLX.js.map +1 -0
- package/dist/collab-sheets-transform.cjs +1 -6
- package/dist/collab-sheets-transform.cjs.map +1 -1
- package/dist/collab-sheets-transform.d.cts +1 -1
- package/dist/collab-sheets-transform.d.ts +1 -1
- package/dist/collab-sheets-transform.js +1 -6
- package/dist/collab-sheets-transform.js.map +1 -1
- package/dist/docs-io.cjs +2 -1
- package/dist/docs-io.cjs.map +1 -1
- package/dist/docs-io.js +2 -1
- package/dist/docs-io.js.map +1 -1
- package/dist/docs-tools.cjs +6 -6
- package/dist/docs-tools.js +1 -1
- package/dist/docs.cjs +2 -2
- package/dist/docs.js +1 -1
- package/dist/pdf.cjs +57 -54
- package/dist/pdf.cjs.map +1 -1
- package/dist/pdf.js +60 -57
- package/dist/pdf.js.map +1 -1
- package/dist/univer-collab.cjs +1 -6
- package/dist/univer-collab.cjs.map +1 -1
- package/dist/univer-collab.js +1 -6
- package/dist/univer-collab.js.map +1 -1
- package/package.json +9 -5
- package/dist/chunk-DY5TGHBI.js.map +0 -1
- package/dist/chunk-NSU6EVJK.cjs.map +0 -1
package/dist/docs-tools.js
CHANGED
package/dist/docs.cjs
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
var _chunkXJBJKOUHcjs = require('./chunk-XJBJKOUH.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunk6TUFBQLHcjs = require('./chunk-6TUFBQLH.cjs');
|
|
23
23
|
require('./chunk-XAIKXHHJ.cjs');
|
|
24
24
|
|
|
25
25
|
// src/docs/document-model.ts
|
|
@@ -959,7 +959,7 @@ function planBodyEdit(current, next) {
|
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
961
|
function insertSpan(port, _current, edit) {
|
|
962
|
-
if (port.insertMarkdown &&
|
|
962
|
+
if (port.insertMarkdown && _chunk6TUFBQLHcjs.looksLikeMarkdown.call(void 0, edit.insert)) {
|
|
963
963
|
const stream = port.getDataStream();
|
|
964
964
|
let at = edit.start;
|
|
965
965
|
if (at > 0 && stream[at - 1] !== PARAGRAPH) {
|
package/dist/docs.js
CHANGED
package/dist/pdf.cjs
CHANGED
|
@@ -258,12 +258,14 @@ function Result({ result, host, error }) {
|
|
|
258
258
|
] }) : null,
|
|
259
259
|
result?.kind === "text" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
260
260
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
261
|
-
|
|
261
|
+
import_controls2.Textarea,
|
|
262
262
|
{
|
|
263
263
|
readOnly: true,
|
|
264
264
|
value: result.text,
|
|
265
265
|
"aria-label": "Extracted text",
|
|
266
|
-
|
|
266
|
+
minHeight: 192,
|
|
267
|
+
maxHeight: 192,
|
|
268
|
+
className: "w-full resize-none"
|
|
267
269
|
}
|
|
268
270
|
),
|
|
269
271
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_controls2.Button, { variant: "outline", onClick: () => void copy(result.text), children: copied ? "Copied" : "Copy text" })
|
|
@@ -729,22 +731,19 @@ function MarkupPanel({ host, engine, snapshot, active, onPick, blocked, busy, on
|
|
|
729
731
|
const Icon = MARKUP_ICONS[t.id];
|
|
730
732
|
const on = t.id === active;
|
|
731
733
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { children: [
|
|
732
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
733
|
-
|
|
734
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
735
|
+
import_controls4.Tile,
|
|
734
736
|
{
|
|
735
737
|
type: "button",
|
|
736
|
-
|
|
738
|
+
dense: true,
|
|
739
|
+
variant: "quiet",
|
|
740
|
+
title: t.label,
|
|
741
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, {}),
|
|
742
|
+
end: t.status === "soon" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "shrink-0 whitespace-nowrap text-muted-foreground", children: "Soon" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("kbd", { className: "text-muted-foreground", children: t.key?.toUpperCase() }),
|
|
743
|
+
...t.status === "ready" ? { selected: on } : {},
|
|
737
744
|
disabled: t.status === "ready" && (!engine || Boolean(blocked)),
|
|
738
745
|
onClick: () => t.status === "soon" ? onSoon(markupComingSoonId(t.id)) : onPick(t.id),
|
|
739
|
-
className:
|
|
740
|
-
"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:text-disabled-foreground",
|
|
741
|
-
on && "bg-accent"
|
|
742
|
-
),
|
|
743
|
-
children: [
|
|
744
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { className: "size-4 shrink-0" }),
|
|
745
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "min-w-0 flex-1 truncate", children: t.label }),
|
|
746
|
-
t.status === "soon" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "shrink-0 whitespace-nowrap text-muted-foreground", children: "Soon" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("kbd", { className: "text-muted-foreground", children: t.key?.toUpperCase() })
|
|
747
|
-
]
|
|
746
|
+
className: "w-full"
|
|
748
747
|
}
|
|
749
748
|
),
|
|
750
749
|
t.status === "soon" && t.reason ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pl-8 pr-2 text-xs text-muted-foreground", children: t.reason }) : null
|
|
@@ -782,19 +781,22 @@ function MarkupPanel({ host, engine, snapshot, active, onPick, blocked, busy, on
|
|
|
782
781
|
] })
|
|
783
782
|
] }),
|
|
784
783
|
host.existingAnnotations ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Section, { label: "In this file", children: [
|
|
785
|
-
existing === null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-xs text-muted-foreground", children: "Reading\u2026" }) : existing.filter((a) => a.subtype !== "Link" && a.subtype !== "Widget").length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-xs text-muted-foreground", children: "No comments or markup yet" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "flex flex-col", "aria-label": "Annotations in this file", children: existing.filter((a) => a.subtype !== "Link" && a.subtype !== "Widget").map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime3.
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
784
|
+
existing === null ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-xs text-muted-foreground", children: "Reading\u2026" }) : existing.filter((a) => a.subtype !== "Link" && a.subtype !== "Widget").length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-xs text-muted-foreground", children: "No comments or markup yet" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "flex flex-col", "aria-label": "Annotations in this file", children: existing.filter((a) => a.subtype !== "Link" && a.subtype !== "Widget").map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
785
|
+
import_controls4.Tile,
|
|
786
|
+
{
|
|
787
|
+
type: "button",
|
|
788
|
+
dense: true,
|
|
789
|
+
variant: "quiet",
|
|
790
|
+
title: `${a.subtype}${a.author ? ` \xB7 ${a.author}` : ""}`,
|
|
791
|
+
line: a.contents,
|
|
792
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "w-8 shrink-0 tabular-nums text-muted-foreground", children: [
|
|
793
|
+
"p. ",
|
|
794
|
+
a.page
|
|
794
795
|
] }),
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
796
|
+
className: "w-full",
|
|
797
|
+
onClick: () => goToPage(a.page)
|
|
798
|
+
}
|
|
799
|
+
) }, `${a.page}-${i}`)) }),
|
|
798
800
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-xs text-muted-foreground", children: "Markup already saved shows on the page; changing it in place is coming." })
|
|
799
801
|
] }) : null,
|
|
800
802
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Section, { label: "Coming soon", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "flex flex-col", "aria-label": "Markup coming soon", children: soon.map(row) }) })
|
|
@@ -894,35 +896,35 @@ function useWidth(ref) {
|
|
|
894
896
|
}
|
|
895
897
|
function ToolRows({ tool, hostTools, onPick, canMarkup = false }) {
|
|
896
898
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
897
|
-
hostTools.map((t) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { role: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.
|
|
898
|
-
|
|
899
|
+
hostTools.map((t) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { role: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
900
|
+
import_controls5.Tile,
|
|
899
901
|
{
|
|
900
902
|
type: "button",
|
|
903
|
+
dense: true,
|
|
904
|
+
variant: "quiet",
|
|
901
905
|
role: "menuitem",
|
|
902
906
|
"aria-current": tool === `host:${t.id}` ? "true" : void 0,
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex-1 whitespace-nowrap", children: t.label })
|
|
908
|
-
]
|
|
907
|
+
title: t.label,
|
|
908
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(t.icon, {}),
|
|
909
|
+
className: "w-full",
|
|
910
|
+
onClick: () => onPick(`host:${t.id}`)
|
|
909
911
|
}
|
|
910
912
|
) }, `host:${t.id}`)),
|
|
911
913
|
PDF_TOOLS.filter((t) => t.id !== "browse" && (t.id !== "markup" || canMarkup)).map((t) => {
|
|
912
914
|
const Icon = PDF_TOOL_ICONS[t.id];
|
|
913
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { role: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.
|
|
914
|
-
|
|
915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { role: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
916
|
+
import_controls5.Tile,
|
|
915
917
|
{
|
|
916
918
|
type: "button",
|
|
919
|
+
dense: true,
|
|
920
|
+
variant: "quiet",
|
|
917
921
|
role: "menuitem",
|
|
918
922
|
"aria-current": t.id === tool ? "true" : void 0,
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
children:
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
t.status === "soon" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-muted-foreground", children: "Coming soon" }) : null
|
|
925
|
-
]
|
|
923
|
+
title: t.label,
|
|
924
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, {}),
|
|
925
|
+
end: t.status === "soon" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-muted-foreground", children: "Coming soon" }) : void 0,
|
|
926
|
+
className: "w-full",
|
|
927
|
+
onClick: () => onPick(t.id)
|
|
926
928
|
}
|
|
927
929
|
) }, t.id);
|
|
928
930
|
})
|
|
@@ -1375,10 +1377,11 @@ function PdfWorkspace({ host, className }) {
|
|
|
1375
1377
|
width: "lg"
|
|
1376
1378
|
}
|
|
1377
1379
|
) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1378
|
-
|
|
1380
|
+
import_controls5.Button,
|
|
1379
1381
|
{
|
|
1380
1382
|
type: "button",
|
|
1381
|
-
|
|
1383
|
+
variant: "quiet",
|
|
1384
|
+
className: "min-w-0 max-w-[16rem]",
|
|
1382
1385
|
title: host.rename ? "Rename" : host.file.name,
|
|
1383
1386
|
onClick: () => host.rename && (setNameDraft(host.file.name), setEditingName(true)),
|
|
1384
1387
|
children: host.file.name
|
|
@@ -1499,21 +1502,21 @@ function PdfWorkspace({ host, className }) {
|
|
|
1499
1502
|
}
|
|
1500
1503
|
}
|
|
1501
1504
|
),
|
|
1502
|
-
pop === "tool-search" && toolHits.length ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { role: "listbox", className: "absolute left-0 right-0 top-9 z-30 rounded-lg border border-border bg-popover p-1 shadow-lg", children: toolHits.map((t) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { role: "option", "aria-selected": false, children: /* @__PURE__ */ (0, import_jsx_runtime4.
|
|
1503
|
-
|
|
1505
|
+
pop === "tool-search" && toolHits.length ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { role: "listbox", className: "absolute left-0 right-0 top-9 z-30 rounded-lg border border-border bg-popover p-1 shadow-lg", children: toolHits.map((t) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { role: "option", "aria-selected": false, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1506
|
+
import_controls5.Tile,
|
|
1504
1507
|
{
|
|
1505
1508
|
type: "button",
|
|
1506
|
-
|
|
1509
|
+
dense: true,
|
|
1510
|
+
variant: "quiet",
|
|
1511
|
+
title: t.label,
|
|
1512
|
+
end: t.status === "soon" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-muted-foreground", children: "Coming soon" }) : void 0,
|
|
1513
|
+
className: "w-full",
|
|
1507
1514
|
onMouseDown: (e) => e.preventDefault(),
|
|
1508
1515
|
onClick: () => {
|
|
1509
1516
|
chooseTool(t.id);
|
|
1510
1517
|
setToolQuery("");
|
|
1511
1518
|
setPop(null);
|
|
1512
|
-
}
|
|
1513
|
-
children: [
|
|
1514
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: t.label }),
|
|
1515
|
-
t.status === "soon" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-muted-foreground", children: "Coming soon" }) : null
|
|
1516
|
-
]
|
|
1519
|
+
}
|
|
1517
1520
|
}
|
|
1518
1521
|
) }, t.id)) }) : null
|
|
1519
1522
|
] }) : null,
|
|
@@ -1618,7 +1621,7 @@ function PdfWorkspace({ host, className }) {
|
|
|
1618
1621
|
] }) : null
|
|
1619
1622
|
] }) : null,
|
|
1620
1623
|
compact && sheet ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
1621
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", {
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls5.Tile, { type: "button", layout: "stack", variant: "quiet", title: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "sr-only", children: "Close" }), "aria-label": "Close", className: "absolute inset-0 z-30 h-full w-full bg-background/60", onClick: () => setSheet(null) }),
|
|
1622
1625
|
/* @__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: [
|
|
1623
1626
|
/* @__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 }) }),
|
|
1624
1627
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "border-t border-border", children: rightPanel })
|