@arbidocs/blocks 0.4.120 → 0.4.122
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 +208 -208
- package/dist/agents/index.js +3 -3
- package/dist/{chunk-FXUQZFAN.cjs → chunk-Z2NSU7D5.cjs} +4 -4
- package/dist/{chunk-FXUQZFAN.cjs.map → chunk-Z2NSU7D5.cjs.map} +1 -1
- package/dist/{chunk-6Z7DLJU2.js → chunk-ZP4IFW2E.js} +4 -4
- package/dist/{chunk-6Z7DLJU2.js.map → chunk-ZP4IFW2E.js.map} +1 -1
- package/dist/collaboration/index.cjs +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/connect/index.cjs +15 -5
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +15 -5
- package/dist/connect/index.js.map +1 -1
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +1 -1
- package/dist/files/index.js +1 -1
- package/dist/index.cjs +217 -217
- package/dist/index.js +3 -3
- package/dist/shell/index.cjs +9 -9
- package/dist/shell/index.js +1 -1
- package/dist/workflow-canvas/index.cjs +10 -10
- package/dist/workflow-canvas/index.js +3 -3
- 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
|
@@ -728,6 +728,10 @@ var NodeRegistry = class {
|
|
|
728
728
|
get(id) {
|
|
729
729
|
return this.entries.get(id);
|
|
730
730
|
}
|
|
731
|
+
/** Whether the id names a node, one inside a paragraph that is not open yet included. */
|
|
732
|
+
has(id) {
|
|
733
|
+
return (this.entries.get(id) ?? this.resolveInsideParagraph(id)) !== void 0;
|
|
734
|
+
}
|
|
731
735
|
require(id) {
|
|
732
736
|
let entry = this.entries.get(id) ?? this.resolveInsideParagraph(id);
|
|
733
737
|
if (!entry) throw new RegistryError(`journal names unknown node ${id}`);
|
|
@@ -1128,8 +1132,31 @@ function moveNode(registry, id, destinationId, destinationIndex) {
|
|
|
1128
1132
|
const destination = childrenOf(asLiveElement(destinationEntry.live, destinationId));
|
|
1129
1133
|
destination.insert(destinationIndex, [registry.toLive(copy)]);
|
|
1130
1134
|
}
|
|
1135
|
+
function renameNode(registry, id, qname) {
|
|
1136
|
+
const entry = registry.require(id);
|
|
1137
|
+
if ("plain" in entry) {
|
|
1138
|
+
const el = entry.plain;
|
|
1139
|
+
if (el.type !== "element") return false;
|
|
1140
|
+
el.ns = qname.namespaceUri;
|
|
1141
|
+
el.local = qname.localName;
|
|
1142
|
+
if (qname.prefix === void 0) delete el.prefix;
|
|
1143
|
+
else el.prefix = qname.prefix;
|
|
1144
|
+
registry.touch(el);
|
|
1145
|
+
return true;
|
|
1146
|
+
}
|
|
1147
|
+
const live = entry.live;
|
|
1148
|
+
if (live instanceof Y3.Text || isRichParagraph(live)) return false;
|
|
1149
|
+
if (live.get("ns") !== qname.namespaceUri) live.set("ns", qname.namespaceUri);
|
|
1150
|
+
if (live.get("local") !== qname.localName) live.set("local", qname.localName);
|
|
1151
|
+
if (qname.prefix === void 0) {
|
|
1152
|
+
if (live.has("prefix")) live.delete("prefix");
|
|
1153
|
+
} else if (live.get("prefix") !== qname.prefix) live.set("prefix", qname.prefix);
|
|
1154
|
+
return true;
|
|
1155
|
+
}
|
|
1131
1156
|
function putNode(registry, effect) {
|
|
1132
1157
|
const d = effect.descriptor;
|
|
1158
|
+
if (d.kind !== "textValue" && registry.has(d.logicalId) && renameNode(registry, d.logicalId, d.qname))
|
|
1159
|
+
return;
|
|
1133
1160
|
if (d.kind === "textValue") {
|
|
1134
1161
|
registry.registerPlain({ type: "text", id: d.logicalId, value: "" });
|
|
1135
1162
|
return;
|