@arbidocs/blocks 0.4.119 → 0.4.121
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/agents/index.cjs +286 -286
- package/dist/agents/index.js +10 -10
- package/dist/calls/index.cjs +1 -1
- package/dist/calls/index.js +1 -1
- package/dist/{chunk-XFZ7HNPG.js → chunk-4MRQKBD2.js} +3 -3
- package/dist/{chunk-XFZ7HNPG.js.map → chunk-4MRQKBD2.js.map} +1 -1
- package/dist/{chunk-XSUOEJB3.cjs → chunk-5JVPLVDT.cjs} +3 -3
- package/dist/{chunk-XSUOEJB3.cjs.map → chunk-5JVPLVDT.cjs.map} +1 -1
- package/dist/{chunk-P5ST47VY.js → chunk-5Y7JRY7Y.js} +3 -3
- package/dist/{chunk-P5ST47VY.js.map → chunk-5Y7JRY7Y.js.map} +1 -1
- package/dist/chunk-A7NCSZAP.cjs +207 -0
- package/dist/chunk-A7NCSZAP.cjs.map +1 -0
- package/dist/{chunk-AY32GGKU.js → chunk-DFHDWO6U.js} +3 -3
- package/dist/{chunk-AY32GGKU.js.map → chunk-DFHDWO6U.js.map} +1 -1
- package/dist/{chunk-US5ASM4G.cjs → chunk-GIEHWHVO.cjs} +5 -5
- package/dist/{chunk-US5ASM4G.cjs.map → chunk-GIEHWHVO.cjs.map} +1 -1
- package/dist/chunk-IBZJYCYM.js +204 -0
- package/dist/chunk-IBZJYCYM.js.map +1 -0
- package/dist/{chunk-6Z7DLJU2.js → chunk-N5S6JG7S.js} +11 -11
- package/dist/{chunk-6Z7DLJU2.js.map → chunk-N5S6JG7S.js.map} +1 -1
- package/dist/{chunk-ZV3BKLFY.cjs → chunk-NYHGG2IA.cjs} +3 -3
- package/dist/{chunk-ZV3BKLFY.cjs.map → chunk-NYHGG2IA.cjs.map} +1 -1
- package/dist/{chunk-FXUQZFAN.cjs → chunk-SCLMCCMU.cjs} +55 -55
- package/dist/{chunk-FXUQZFAN.cjs.map → chunk-SCLMCCMU.cjs.map} +1 -1
- package/dist/collaboration/index.cjs +10 -10
- package/dist/collaboration/index.js +2 -2
- package/dist/components/UsageMeter.d.ts +45 -8
- package/dist/connect/index.cjs +39 -29
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +20 -10
- package/dist/connect/index.js.map +1 -1
- package/dist/document-tools/index.cjs +1 -1
- package/dist/document-tools/index.js +1 -1
- package/dist/facts/index.cjs +3 -3
- package/dist/facts/index.js +3 -3
- package/dist/files/index.cjs +3 -3
- package/dist/files/index.js +3 -3
- package/dist/home/index.cjs +18 -18
- package/dist/home/index.js +4 -4
- package/dist/index.cjs +415 -411
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -17
- package/dist/retrieval/index.cjs +1 -1
- package/dist/retrieval/index.js +1 -1
- package/dist/settings/FirmPool.d.ts +28 -2
- package/dist/settings/index.cjs +78 -27
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.js +66 -15
- package/dist/settings/index.js.map +1 -1
- package/dist/shell/index.cjs +11 -11
- package/dist/shell/index.js +3 -3
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +2 -2
- package/dist/studio/index.js +2 -2
- package/dist/workflow-canvas/index.cjs +53 -53
- package/dist/workflow-canvas/index.js +10 -10
- package/dist/workspaces/index.cjs +1 -1
- package/dist/workspaces/index.js +1 -1
- package/node_modules/@arbidocs/coedit/dist/commands.cjs +222 -12
- package/node_modules/@arbidocs/coedit/dist/commands.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/commands.d.cts +82 -5
- package/node_modules/@arbidocs/coedit/dist/commands.d.ts +82 -5
- package/node_modules/@arbidocs/coedit/dist/commands.js +217 -13
- package/node_modules/@arbidocs/coedit/dist/commands.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/encoding.d.cts +2 -0
- package/node_modules/@arbidocs/coedit/dist/encoding.d.ts +2 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs +27 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.js +27 -0
- package/node_modules/@arbidocs/coedit/dist/hocuspocus.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/index.cjs +27 -0
- package/node_modules/@arbidocs/coedit/dist/index.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/index.js +27 -0
- package/node_modules/@arbidocs/coedit/dist/index.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/{port-ip7WByvH.d.cts → port-BbN5OZHx.d.cts} +24 -1
- package/node_modules/@arbidocs/coedit/dist/{port-ip7WByvH.d.ts → port-BbN5OZHx.d.ts} +24 -1
- package/node_modules/@arbidocs/coedit/dist/server.cjs +65 -2
- package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.cts +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.d.ts +1 -1
- package/node_modules/@arbidocs/coedit/dist/server.js +65 -2
- package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-46IU3UPF.cjs +0 -47
- package/dist/chunk-46IU3UPF.cjs.map +0 -1
- package/dist/chunk-D5T53XCL.js +0 -45
- package/dist/chunk-D5T53XCL.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { createServerAutomationHost, ServerAutomationHostOptions } from '@docx-e
|
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
import { CollaborationIdentity } from '@docx-editor.dev/core/collaboration';
|
|
5
5
|
import { TreePackageStore, PackageTransactResult, HeadlessDocumentView, ImageDecodePort } from '@docx-editor.dev/core/store';
|
|
6
|
-
import { R as ReferencesPort } from './port-
|
|
6
|
+
import { R as ReferencesPort } from './port-BbN5OZHx.cjs';
|
|
7
7
|
import { R as Revision } from './track-eYC94jTp.cjs';
|
|
8
8
|
import { D as DocxCollaborationSession } from './session-Cf9iu1Vt.cjs';
|
|
9
9
|
export { C as COLLAB_PROTOCOL, D as DOCUMENT_COLLABORATION_VERSIONS } from './versions-DXiFQMA6.cjs';
|
|
@@ -3,7 +3,7 @@ import { createServerAutomationHost, ServerAutomationHostOptions } from '@docx-e
|
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
import { CollaborationIdentity } from '@docx-editor.dev/core/collaboration';
|
|
5
5
|
import { TreePackageStore, PackageTransactResult, HeadlessDocumentView, ImageDecodePort } from '@docx-editor.dev/core/store';
|
|
6
|
-
import { R as ReferencesPort } from './port-
|
|
6
|
+
import { R as ReferencesPort } from './port-BbN5OZHx.js';
|
|
7
7
|
import { R as Revision } from './track-eYC94jTp.js';
|
|
8
8
|
import { D as DocxCollaborationSession } from './session-Cf9iu1Vt.js';
|
|
9
9
|
export { C as COLLAB_PROTOCOL, D as DOCUMENT_COLLABORATION_VERSIONS } from './versions-DXiFQMA6.js';
|
|
@@ -47,6 +47,7 @@ function readParagraph(node, topLevel, bookmarks) {
|
|
|
47
47
|
let runStyle;
|
|
48
48
|
const fields = [];
|
|
49
49
|
const notes = [];
|
|
50
|
+
const revisions = [];
|
|
50
51
|
let current = null;
|
|
51
52
|
const field = (c) => {
|
|
52
53
|
const type = attr(c, "fldCharType");
|
|
@@ -88,7 +89,31 @@ function readParagraph(node, topLevel, bookmarks) {
|
|
|
88
89
|
}
|
|
89
90
|
continue;
|
|
90
91
|
}
|
|
91
|
-
if (c.localName === "
|
|
92
|
+
if (c.localName === "del") {
|
|
93
|
+
const deleted = deletedText(c);
|
|
94
|
+
if (deleted && fieldDepth === 0)
|
|
95
|
+
revisions.push({
|
|
96
|
+
kind: "delete",
|
|
97
|
+
offset: text.length,
|
|
98
|
+
length: deleted.length,
|
|
99
|
+
author: attr(c, "author"),
|
|
100
|
+
text: deleted
|
|
101
|
+
});
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if (c.localName === "ins") {
|
|
105
|
+
const start = text.length;
|
|
106
|
+
walk(c, link);
|
|
107
|
+
if (text.length > start && fieldDepth === 0)
|
|
108
|
+
revisions.push({
|
|
109
|
+
kind: "insert",
|
|
110
|
+
offset: start,
|
|
111
|
+
length: text.length - start,
|
|
112
|
+
author: attr(c, "author")
|
|
113
|
+
});
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (c.localName === "delText" || c.localName === "rPr") continue;
|
|
92
117
|
if (c.localName === "r") {
|
|
93
118
|
const rStyle = c.children?.find((x) => x.localName === "rPr")?.children?.find((x) => x.localName === "rStyle");
|
|
94
119
|
const watched = rStyle && attr(rStyle, "val");
|
|
@@ -151,9 +176,20 @@ function readParagraph(node, topLevel, bookmarks) {
|
|
|
151
176
|
links,
|
|
152
177
|
...fields.length ? { fields } : {},
|
|
153
178
|
...marks.length ? { marks } : {},
|
|
154
|
-
...notes.length ? { notes } : {}
|
|
179
|
+
...notes.length ? { notes } : {},
|
|
180
|
+
...revisions.length ? { revisions } : {}
|
|
155
181
|
};
|
|
156
182
|
}
|
|
183
|
+
function deletedText(node) {
|
|
184
|
+
let out = "";
|
|
185
|
+
for (const c of node.children ?? []) {
|
|
186
|
+
if (c.localName === "instrText") continue;
|
|
187
|
+
if (c.localName === "delText") out += (c.children ?? []).map((t) => t.value ?? "").join("");
|
|
188
|
+
else if (c.localName === "tab") out += " ";
|
|
189
|
+
else if (c.localName !== "rPr") out += deletedText(c);
|
|
190
|
+
}
|
|
191
|
+
return out;
|
|
192
|
+
}
|
|
157
193
|
function documentNumbering(source) {
|
|
158
194
|
let numbering;
|
|
159
195
|
let cascade;
|
|
@@ -1328,6 +1364,10 @@ var NodeRegistry = class {
|
|
|
1328
1364
|
get(id) {
|
|
1329
1365
|
return this.entries.get(id);
|
|
1330
1366
|
}
|
|
1367
|
+
/** Whether the id names a node, one inside a paragraph that is not open yet included. */
|
|
1368
|
+
has(id) {
|
|
1369
|
+
return (this.entries.get(id) ?? this.resolveInsideParagraph(id)) !== void 0;
|
|
1370
|
+
}
|
|
1331
1371
|
require(id) {
|
|
1332
1372
|
let entry = this.entries.get(id) ?? this.resolveInsideParagraph(id);
|
|
1333
1373
|
if (!entry) throw new RegistryError(`journal names unknown node ${id}`);
|
|
@@ -1728,8 +1768,31 @@ function moveNode(registry, id, destinationId, destinationIndex) {
|
|
|
1728
1768
|
const destination = childrenOf(asLiveElement(destinationEntry.live, destinationId));
|
|
1729
1769
|
destination.insert(destinationIndex, [registry.toLive(copy)]);
|
|
1730
1770
|
}
|
|
1771
|
+
function renameNode(registry, id, qname) {
|
|
1772
|
+
const entry = registry.require(id);
|
|
1773
|
+
if ("plain" in entry) {
|
|
1774
|
+
const el2 = entry.plain;
|
|
1775
|
+
if (el2.type !== "element") return false;
|
|
1776
|
+
el2.ns = qname.namespaceUri;
|
|
1777
|
+
el2.local = qname.localName;
|
|
1778
|
+
if (qname.prefix === void 0) delete el2.prefix;
|
|
1779
|
+
else el2.prefix = qname.prefix;
|
|
1780
|
+
registry.touch(el2);
|
|
1781
|
+
return true;
|
|
1782
|
+
}
|
|
1783
|
+
const live = entry.live;
|
|
1784
|
+
if (live instanceof Y3.Text || isRichParagraph(live)) return false;
|
|
1785
|
+
if (live.get("ns") !== qname.namespaceUri) live.set("ns", qname.namespaceUri);
|
|
1786
|
+
if (live.get("local") !== qname.localName) live.set("local", qname.localName);
|
|
1787
|
+
if (qname.prefix === void 0) {
|
|
1788
|
+
if (live.has("prefix")) live.delete("prefix");
|
|
1789
|
+
} else if (live.get("prefix") !== qname.prefix) live.set("prefix", qname.prefix);
|
|
1790
|
+
return true;
|
|
1791
|
+
}
|
|
1731
1792
|
function putNode(registry, effect) {
|
|
1732
1793
|
const d = effect.descriptor;
|
|
1794
|
+
if (d.kind !== "textValue" && registry.has(d.logicalId) && renameNode(registry, d.logicalId, d.qname))
|
|
1795
|
+
return;
|
|
1733
1796
|
if (d.kind === "textValue") {
|
|
1734
1797
|
registry.registerPlain({ type: "text", id: d.logicalId, value: "" });
|
|
1735
1798
|
return;
|