ooxml-core 1.23.0 → 1.24.0
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/automation/index.cjs +553 -335
- package/dist/automation/index.d.ts +1 -0
- package/dist/automation/index.d.ts.map +1 -1
- package/dist/automation/index.mjs +552 -336
- package/dist/automation/live.d.ts +89 -0
- package/dist/automation/live.d.ts.map +1 -0
- package/dist/docx/ui/customization.d.ts +30 -0
- package/dist/docx/ui/customization.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +51 -0
- package/dist/docx/ui/index.d.ts +1 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +46 -1
- package/dist/embedding/backstage.d.ts +48 -0
- package/dist/embedding/backstage.d.ts.map +1 -0
- package/dist/embedding/capabilities.d.ts +60 -0
- package/dist/embedding/capabilities.d.ts.map +1 -0
- package/dist/embedding/customization.d.ts +32 -0
- package/dist/embedding/customization.d.ts.map +1 -0
- package/dist/embedding/index.cjs +229 -0
- package/dist/embedding/index.d.ts +7 -0
- package/dist/embedding/index.d.ts.map +1 -0
- package/dist/embedding/index.mjs +204 -0
- package/dist/embedding/menu-commands.d.ts +66 -0
- package/dist/embedding/menu-commands.d.ts.map +1 -0
- package/dist/embedding/regions.d.ts +58 -0
- package/dist/embedding/regions.d.ts.map +1 -0
- package/dist/embedding/storage.d.ts +111 -0
- package/dist/embedding/storage.d.ts.map +1 -0
- package/dist/index.cjs +233 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +233 -1
- package/dist/visio/collab/compose.d.ts.map +1 -1
- package/dist/visio/collab/fixups.d.ts.map +1 -1
- package/dist/visio/collab/index.cjs +167 -62
- package/dist/visio/collab/index.mjs +167 -62
- package/dist/visio/collab/keys.d.ts +2 -0
- package/dist/visio/collab/keys.d.ts.map +1 -1
- package/dist/visio/collab/pieces.d.ts +7 -0
- package/dist/visio/collab/pieces.d.ts.map +1 -1
- package/dist/visio/collab/read-ids.d.ts +7 -1
- package/dist/visio/collab/read-ids.d.ts.map +1 -1
- package/dist/visio/collab/read-parts.d.ts.map +1 -1
- package/dist/visio/collab/read-shapes.d.ts +0 -1
- package/dist/visio/collab/read-shapes.d.ts.map +1 -1
- package/dist/visio/collab/read.d.ts.map +1 -1
- package/dist/visio/collab/schema.d.ts +1 -1
- package/dist/visio/collab/schema.d.ts.map +1 -1
- package/dist/visio/collab/snapshot-contents.d.ts.map +1 -1
- package/dist/visio/collab/write-shapes.d.ts.map +1 -1
- package/dist/visio/collab/zip-store.d.ts +4 -0
- package/dist/visio/collab/zip-store.d.ts.map +1 -0
- package/dist/visio/document-level.d.ts +57 -0
- package/dist/visio/document-level.d.ts.map +1 -0
- package/dist/visio/index.cjs +543 -444
- package/dist/visio/index.d.ts +1 -0
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +543 -444
- package/dist/visio/layers.d.ts +3 -0
- package/dist/visio/layers.d.ts.map +1 -1
- package/dist/visio/package.d.ts +9 -0
- package/dist/visio/package.d.ts.map +1 -1
- package/dist/visio/parser.d.ts +7 -0
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/shape-metadata.d.ts +3 -0
- package/dist/visio/shape-metadata.d.ts.map +1 -1
- package/dist/visio/ui/contract.d.ts +27 -2
- package/dist/visio/ui/contract.d.ts.map +1 -1
- package/dist/visio/ui/customization.d.ts +46 -0
- package/dist/visio/ui/customization.d.ts.map +1 -0
- package/dist/visio/ui/index.cjs +454 -316
- package/dist/visio/ui/index.d.ts +1 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +452 -317
- package/dist/xlsx/ui/commands.d.ts +2 -0
- package/dist/xlsx/ui/commands.d.ts.map +1 -1
- package/dist/xlsx/ui/customization.d.ts +49 -0
- package/dist/xlsx/ui/customization.d.ts.map +1 -0
- package/dist/xlsx/ui/index.cjs +39 -1
- package/dist/xlsx/ui/index.d.ts +1 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +37 -2
- package/package.json +6 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Y from 'yjs';
|
|
2
|
-
import JSZip from 'jszip';
|
|
3
2
|
import { XMLSerializer, DOMParser } from '@xmldom/xmldom';
|
|
3
|
+
import JSZip from 'jszip';
|
|
4
4
|
|
|
5
5
|
// visio/collab/bind.ts
|
|
6
6
|
|
|
@@ -594,7 +594,7 @@ var entryContent = (e) => e.xml !== void 0 ? pieceContent("leaf", e.xml) : piece
|
|
|
594
594
|
var masterContent = (e) => JSON.stringify([e.id, canon(e.xml), e.rels ?? null, e.print]);
|
|
595
595
|
|
|
596
596
|
// visio/collab/schema.ts
|
|
597
|
-
var SCHEMA_VERSION =
|
|
597
|
+
var SCHEMA_VERSION = 4;
|
|
598
598
|
var SchemaVersionError = class extends Error {
|
|
599
599
|
constructor(found) {
|
|
600
600
|
super(
|
|
@@ -698,7 +698,13 @@ function cellEntry(value) {
|
|
|
698
698
|
const xml = str(value.xml);
|
|
699
699
|
const open = str(value.open);
|
|
700
700
|
if (pos === void 0 || xml === void 0 && open === void 0) return void 0;
|
|
701
|
-
|
|
701
|
+
const r = Array.isArray(value.r) && value.r.length % 2 === 0 && value.r.every((v) => typeof v === "string") ? value.r : void 0;
|
|
702
|
+
return {
|
|
703
|
+
pos,
|
|
704
|
+
...opt("xml", xml),
|
|
705
|
+
...opt("open", xml === void 0 ? open : void 0),
|
|
706
|
+
...r && r.length ? { r } : {}
|
|
707
|
+
};
|
|
702
708
|
}
|
|
703
709
|
function masterEntry(value) {
|
|
704
710
|
if (!isRecord(value)) return void 0;
|
|
@@ -752,6 +758,20 @@ function splitList(text, name, mark, child) {
|
|
|
752
758
|
}
|
|
753
759
|
return { text: text.slice(0, box.openEnd) + mark + text.slice(box.closeStart), items };
|
|
754
760
|
}
|
|
761
|
+
function formulaRefs(text, owner) {
|
|
762
|
+
const out = [];
|
|
763
|
+
const seen = /* @__PURE__ */ new Set();
|
|
764
|
+
for (const f of text.matchAll(/\sF\s*=\s*("[^"]*"|'[^']*')/g))
|
|
765
|
+
for (const m of f[1].matchAll(/Sheet\.(\d+)(?!\d)/g)) {
|
|
766
|
+
const id = m[1];
|
|
767
|
+
const key = owner.get(id);
|
|
768
|
+
if (key !== void 0 && !seen.has(id)) {
|
|
769
|
+
seen.add(id);
|
|
770
|
+
out.push(id, key);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
return out;
|
|
774
|
+
}
|
|
755
775
|
function flatten(xml, parent, page, keys, out) {
|
|
756
776
|
const split2 = splitShape(xml);
|
|
757
777
|
const id = split2 ? attrOf(split2.open, "ID") : void 0;
|
|
@@ -772,6 +792,12 @@ function splitContents(content, scope, keys) {
|
|
|
772
792
|
const shapes = [];
|
|
773
793
|
for (const text of shapesSplit.items) flatten(text, void 0, scope, keys, shapes);
|
|
774
794
|
const owner = new Map(shapes.map((s) => [s.id, s.key]));
|
|
795
|
+
for (const shape of shapes)
|
|
796
|
+
for (const piece of shape.pieces)
|
|
797
|
+
if (piece.kind === "leaf") {
|
|
798
|
+
const refs = formulaRefs(piece.text, owner);
|
|
799
|
+
if (refs.length) piece.refs = refs;
|
|
800
|
+
}
|
|
775
801
|
const connects = [];
|
|
776
802
|
for (const text of connectsSplit.items) {
|
|
777
803
|
const a = (name) => attrOf(text, name) ?? "";
|
|
@@ -1017,6 +1043,80 @@ async function placeList(options) {
|
|
|
1017
1043
|
);
|
|
1018
1044
|
return paths;
|
|
1019
1045
|
}
|
|
1046
|
+
new TextDecoder("utf-8", { fatal: true });
|
|
1047
|
+
var crcTable = Uint32Array.from({ length: 256 }, (_, value) => {
|
|
1048
|
+
for (let i = 0; i < 8; i++) value = value & 1 ? 3988292384 ^ value >>> 1 : value >>> 1;
|
|
1049
|
+
return value >>> 0;
|
|
1050
|
+
});
|
|
1051
|
+
function crc32(bytes, crc = 4294967295) {
|
|
1052
|
+
for (const byte of bytes) crc = (crcTable[(crc ^ byte) & 255] ?? 0) ^ crc >>> 8;
|
|
1053
|
+
return crc >>> 0;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
// visio/collab/zip-store.ts
|
|
1057
|
+
var encoder2 = new TextEncoder();
|
|
1058
|
+
var DOS_TIME = 0;
|
|
1059
|
+
var DOS_DATE = 33;
|
|
1060
|
+
function writeStoredZip(files, crcs) {
|
|
1061
|
+
const prepared = files.map(([name, data]) => {
|
|
1062
|
+
let crc = crcs.get(data);
|
|
1063
|
+
if (crc === void 0) {
|
|
1064
|
+
crc = (crc32(data) ^ 4294967295) >>> 0;
|
|
1065
|
+
crcs.set(data, crc);
|
|
1066
|
+
}
|
|
1067
|
+
return { name: encoder2.encode(name), data, crc };
|
|
1068
|
+
});
|
|
1069
|
+
let local = 0;
|
|
1070
|
+
let central = 0;
|
|
1071
|
+
for (const f of prepared) {
|
|
1072
|
+
local += 30 + f.name.length + f.data.length;
|
|
1073
|
+
central += 46 + f.name.length;
|
|
1074
|
+
}
|
|
1075
|
+
const out = new Uint8Array(local + central + 22);
|
|
1076
|
+
const view = new DataView(out.buffer);
|
|
1077
|
+
let at = 0;
|
|
1078
|
+
const offsets = [];
|
|
1079
|
+
for (const f of prepared) {
|
|
1080
|
+
offsets.push(at);
|
|
1081
|
+
view.setUint32(at, 67324752, true);
|
|
1082
|
+
view.setUint16(at + 4, 20, true);
|
|
1083
|
+
view.setUint16(at + 6, 2048, true);
|
|
1084
|
+
view.setUint16(at + 8, 0, true);
|
|
1085
|
+
view.setUint16(at + 10, DOS_TIME, true);
|
|
1086
|
+
view.setUint16(at + 12, DOS_DATE, true);
|
|
1087
|
+
view.setUint32(at + 14, f.crc, true);
|
|
1088
|
+
view.setUint32(at + 18, f.data.length, true);
|
|
1089
|
+
view.setUint32(at + 22, f.data.length, true);
|
|
1090
|
+
view.setUint16(at + 26, f.name.length, true);
|
|
1091
|
+
view.setUint16(at + 28, 0, true);
|
|
1092
|
+
out.set(f.name, at + 30);
|
|
1093
|
+
out.set(f.data, at + 30 + f.name.length);
|
|
1094
|
+
at += 30 + f.name.length + f.data.length;
|
|
1095
|
+
}
|
|
1096
|
+
const centralStart = at;
|
|
1097
|
+
prepared.forEach((f, i) => {
|
|
1098
|
+
view.setUint32(at, 33639248, true);
|
|
1099
|
+
view.setUint16(at + 4, 20, true);
|
|
1100
|
+
view.setUint16(at + 6, 20, true);
|
|
1101
|
+
view.setUint16(at + 8, 2048, true);
|
|
1102
|
+
view.setUint16(at + 10, 0, true);
|
|
1103
|
+
view.setUint16(at + 12, DOS_TIME, true);
|
|
1104
|
+
view.setUint16(at + 14, DOS_DATE, true);
|
|
1105
|
+
view.setUint32(at + 16, f.crc, true);
|
|
1106
|
+
view.setUint32(at + 20, f.data.length, true);
|
|
1107
|
+
view.setUint32(at + 24, f.data.length, true);
|
|
1108
|
+
view.setUint16(at + 28, f.name.length, true);
|
|
1109
|
+
view.setUint32(at + 42, offsets[i], true);
|
|
1110
|
+
out.set(f.name, at + 46);
|
|
1111
|
+
at += 46 + f.name.length;
|
|
1112
|
+
});
|
|
1113
|
+
view.setUint32(at, 101010256, true);
|
|
1114
|
+
view.setUint16(at + 8, prepared.length, true);
|
|
1115
|
+
view.setUint16(at + 10, prepared.length, true);
|
|
1116
|
+
view.setUint32(at + 12, at - centralStart, true);
|
|
1117
|
+
view.setUint32(at + 16, centralStart, true);
|
|
1118
|
+
return out;
|
|
1119
|
+
}
|
|
1020
1120
|
|
|
1021
1121
|
// visio/collab/compose.ts
|
|
1022
1122
|
var DEFAULT_CONTENT_TYPES = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"></Types>';
|
|
@@ -1155,12 +1255,16 @@ async function composeDrawing(drawing, local, keys, options = {}) {
|
|
|
1155
1255
|
contentTypes = withOverrides(contentTypes, MASTER_CONTENT_TYPE, [...masterPaths.values()]);
|
|
1156
1256
|
}
|
|
1157
1257
|
files.set(CONTENT_TYPES, encoder.encode(contentTypes));
|
|
1158
|
-
const zip = new JSZip();
|
|
1159
1258
|
const names = [...files.keys()].sort(
|
|
1160
1259
|
(a, b) => a === CONTENT_TYPES ? -1 : b === CONTENT_TYPES ? 1 : 0
|
|
1161
1260
|
);
|
|
1162
|
-
|
|
1163
|
-
|
|
1261
|
+
const bytes = writeStoredZip(
|
|
1262
|
+
names.map((name) => {
|
|
1263
|
+
const data = files.get(name);
|
|
1264
|
+
return [name, typeof data === "string" ? encoder.encode(data) : data];
|
|
1265
|
+
}),
|
|
1266
|
+
keys.cache.crcs
|
|
1267
|
+
);
|
|
1164
1268
|
const commit = () => {
|
|
1165
1269
|
const pageIds = /* @__PURE__ */ new Map();
|
|
1166
1270
|
const shapeIds = /* @__PURE__ */ new Map();
|
|
@@ -1211,8 +1315,7 @@ async function composeDrawing(drawing, local, keys, options = {}) {
|
|
|
1211
1315
|
function applyFixups(shared, fixups) {
|
|
1212
1316
|
let changed = 0;
|
|
1213
1317
|
for (const fixup of fixups) {
|
|
1214
|
-
|
|
1215
|
-
if (setIfChanged(map, fixup.key, fixup.value)) changed++;
|
|
1318
|
+
if (setIfChanged(shared.renum, fixup.key, fixup.value)) changed++;
|
|
1216
1319
|
}
|
|
1217
1320
|
return changed;
|
|
1218
1321
|
}
|
|
@@ -1242,7 +1345,9 @@ var DrawingKeys = class {
|
|
|
1242
1345
|
/** Serialised page parts and decoded shared parts of the last rebuild, to skip unchanged work. */
|
|
1243
1346
|
cache = {
|
|
1244
1347
|
pageParts: /* @__PURE__ */ new Map(),
|
|
1245
|
-
parts: /* @__PURE__ */ new Map()
|
|
1348
|
+
parts: /* @__PURE__ */ new Map(),
|
|
1349
|
+
/** CRC-32 of the bytes of each stored part, by identity (see zip-store.ts). */
|
|
1350
|
+
crcs: /* @__PURE__ */ new WeakMap()
|
|
1246
1351
|
};
|
|
1247
1352
|
/**
|
|
1248
1353
|
* What was last applied to the editor: the drawing signature, the editor version it produced,
|
|
@@ -1361,19 +1466,22 @@ function assignIds(items) {
|
|
|
1361
1466
|
const order = [...items].sort(
|
|
1362
1467
|
(a, b) => Number(b.fixed !== void 0) - Number(a.fixed !== void 0) || compare(a.key, b.key)
|
|
1363
1468
|
);
|
|
1364
|
-
const used = /* @__PURE__ */ new Set();
|
|
1365
1469
|
const ids = /* @__PURE__ */ new Map();
|
|
1366
1470
|
const fresh = /* @__PURE__ */ new Map();
|
|
1471
|
+
const holder = /* @__PURE__ */ new Map();
|
|
1472
|
+
const claims = /* @__PURE__ */ new Set();
|
|
1367
1473
|
for (const item of order) {
|
|
1368
1474
|
let id = effective(item);
|
|
1369
|
-
|
|
1475
|
+
const taken = holder.get(id);
|
|
1476
|
+
if (taken) {
|
|
1477
|
+
if (taken.fixed === void 0) claims.add(taken.key);
|
|
1370
1478
|
id = String(++max);
|
|
1371
1479
|
fresh.set(item.key, { from: item.id, to: id });
|
|
1372
1480
|
}
|
|
1373
|
-
|
|
1481
|
+
holder.set(id, item);
|
|
1374
1482
|
ids.set(item.key, id);
|
|
1375
1483
|
}
|
|
1376
|
-
return { ids, fresh };
|
|
1484
|
+
return { ids, fresh, claims };
|
|
1377
1485
|
}
|
|
1378
1486
|
var fixedId = (renum, key, id) => {
|
|
1379
1487
|
const pair = renum.get(key)?.i;
|
|
@@ -1387,6 +1495,11 @@ function readRenum(shared) {
|
|
|
1387
1495
|
}
|
|
1388
1496
|
return out;
|
|
1389
1497
|
}
|
|
1498
|
+
function renumRecord(renum, recordKey, item, change, claimed) {
|
|
1499
|
+
if (change) return { ...renum.get(recordKey), i: [change.from, change.to] };
|
|
1500
|
+
if (claimed) return { ...renum.get(recordKey), i: [item.id, item.id] };
|
|
1501
|
+
return void 0;
|
|
1502
|
+
}
|
|
1390
1503
|
|
|
1391
1504
|
// visio/collab/read-util.ts
|
|
1392
1505
|
function hashTexts(texts) {
|
|
@@ -1446,6 +1559,14 @@ function renumberFormulas(xml, remap) {
|
|
|
1446
1559
|
return `${head}${value[0]}${body}${value[0]}`;
|
|
1447
1560
|
});
|
|
1448
1561
|
}
|
|
1562
|
+
function referenced(r, finalId) {
|
|
1563
|
+
const out = /* @__PURE__ */ new Map();
|
|
1564
|
+
for (let i = 0; i + 1 < r.length; i += 2) {
|
|
1565
|
+
const next = finalId.get(r[i + 1]);
|
|
1566
|
+
if (next !== void 0) out.set(r[i], next);
|
|
1567
|
+
}
|
|
1568
|
+
return out;
|
|
1569
|
+
}
|
|
1449
1570
|
function resolveShapes(input) {
|
|
1450
1571
|
const raw = /* @__PURE__ */ new Map();
|
|
1451
1572
|
for (const [key, entry] of input.shapes) {
|
|
@@ -1464,31 +1585,16 @@ function resolveShapes(input) {
|
|
|
1464
1585
|
return ok;
|
|
1465
1586
|
};
|
|
1466
1587
|
const live = [...raw.keys()].filter((k) => valid(k)).sort(compare);
|
|
1467
|
-
const {
|
|
1588
|
+
const {
|
|
1589
|
+
ids: finalId,
|
|
1590
|
+
fresh: renumbered,
|
|
1591
|
+
claims
|
|
1592
|
+
} = assignIds(
|
|
1468
1593
|
live.map((key) => {
|
|
1469
1594
|
const { id } = raw.get(key);
|
|
1470
1595
|
return { key, id, fixed: fixedId(input.renum, key, id) };
|
|
1471
1596
|
})
|
|
1472
1597
|
);
|
|
1473
|
-
const batchRemap = /* @__PURE__ */ new Map();
|
|
1474
|
-
for (const [key, change] of renumbered) {
|
|
1475
|
-
const b = raw.get(key).entry.b;
|
|
1476
|
-
if (b === void 0) continue;
|
|
1477
|
-
const map = batchRemap.get(b) ?? /* @__PURE__ */ new Map();
|
|
1478
|
-
map.set(change.from, change.to);
|
|
1479
|
-
batchRemap.set(b, map);
|
|
1480
|
-
}
|
|
1481
|
-
const remapFor = (key) => {
|
|
1482
|
-
const out = new Map(batchRemap.get(raw.get(key).entry.b ?? "") ?? []);
|
|
1483
|
-
const chain = [];
|
|
1484
|
-
for (let k = key; k !== void 0; k = raw.get(k)?.entry.parent)
|
|
1485
|
-
chain.unshift(k);
|
|
1486
|
-
for (const k of chain) {
|
|
1487
|
-
const change = renumbered.get(k);
|
|
1488
|
-
if (change) out.set(change.from, change.to);
|
|
1489
|
-
}
|
|
1490
|
-
return out;
|
|
1491
|
-
};
|
|
1492
1598
|
const children = /* @__PURE__ */ new Map();
|
|
1493
1599
|
for (const key of live) {
|
|
1494
1600
|
const parent = raw.get(key).entry.parent ?? "";
|
|
@@ -1500,15 +1606,16 @@ function resolveShapes(input) {
|
|
|
1500
1606
|
const render = (key) => {
|
|
1501
1607
|
const { entry } = raw.get(key);
|
|
1502
1608
|
const id = finalId.get(key);
|
|
1503
|
-
const remap = remapFor(key);
|
|
1504
1609
|
let open = setAttr(entry.open, "ID", id);
|
|
1505
|
-
const
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1610
|
+
const idRecord = renumRecord(
|
|
1611
|
+
input.renum,
|
|
1612
|
+
`${input.scope}/${key}`,
|
|
1613
|
+
{ id: raw.get(key).id },
|
|
1614
|
+
renumbered.get(key),
|
|
1615
|
+
claims.has(key)
|
|
1616
|
+
);
|
|
1617
|
+
const record = { ...idRecord ?? input.renum.get(key) };
|
|
1618
|
+
let dirty = idRecord !== void 0;
|
|
1512
1619
|
const master = attrOf(open, "Master");
|
|
1513
1620
|
const persisted = record.m && record.m[0] === master ? record.m[1] : void 0;
|
|
1514
1621
|
const batched = master !== void 0 ? input.masterRemap.get(entry.b ?? "")?.get(master) : void 0;
|
|
@@ -1521,13 +1628,9 @@ function resolveShapes(input) {
|
|
|
1521
1628
|
if (dirty) fixups.push({ map: "renum", key: `${input.scope}/${key}`, value: record });
|
|
1522
1629
|
const entries = /* @__PURE__ */ new Map();
|
|
1523
1630
|
for (const [path, piece] of input.cells.get(key) ?? []) {
|
|
1524
|
-
const leaf = piece.xml !== void 0 &&
|
|
1525
|
-
const xml2 = leaf ? renumberFormulas(piece.xml,
|
|
1526
|
-
|
|
1527
|
-
const value = { ...piece, xml: xml2 };
|
|
1528
|
-
entries.set(path, value);
|
|
1529
|
-
fixups.push({ map: "cells", key: `${input.scope}/${key}/${path}`, value });
|
|
1530
|
-
} else entries.set(path, piece);
|
|
1631
|
+
const leaf = piece.xml !== void 0 && piece.r !== void 0;
|
|
1632
|
+
const xml2 = leaf ? renumberFormulas(piece.xml, referenced(piece.r, finalId)) : void 0;
|
|
1633
|
+
entries.set(path, xml2 !== void 0 && xml2 !== piece.xml ? { ...piece, xml: xml2 } : piece);
|
|
1531
1634
|
}
|
|
1532
1635
|
shapes.push({
|
|
1533
1636
|
key,
|
|
@@ -1551,7 +1654,7 @@ function resolveMasters(shared, renum) {
|
|
|
1551
1654
|
const entry = masterEntry(value);
|
|
1552
1655
|
if (entry) alive.push({ key, entry });
|
|
1553
1656
|
}
|
|
1554
|
-
const { ids, fresh } = assignIds(
|
|
1657
|
+
const { ids, fresh, claims } = assignIds(
|
|
1555
1658
|
alive.map(({ key, entry }) => ({
|
|
1556
1659
|
key,
|
|
1557
1660
|
id: entry.id,
|
|
@@ -1567,11 +1670,10 @@ function resolveMasters(shared, renum) {
|
|
|
1567
1670
|
map.set(change.from, change.to);
|
|
1568
1671
|
remap.set(b, map);
|
|
1569
1672
|
}
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
});
|
|
1673
|
+
}
|
|
1674
|
+
for (const { key, entry } of [...alive].sort((a, b) => compare2(a.key, b.key))) {
|
|
1675
|
+
const value = renumRecord(renum, masterScope(key), entry, fresh.get(key), claims.has(key));
|
|
1676
|
+
if (value) fixups.push({ map: "renum", key: masterScope(key), value });
|
|
1575
1677
|
}
|
|
1576
1678
|
alive.sort((a, b) => a.entry.pos - b.entry.pos || compare2(a.key, b.key));
|
|
1577
1679
|
return {
|
|
@@ -1657,19 +1759,21 @@ function readSharedDrawing(shared) {
|
|
|
1657
1759
|
});
|
|
1658
1760
|
const renum = readRenum(shared);
|
|
1659
1761
|
const fixups = [];
|
|
1660
|
-
const {
|
|
1762
|
+
const {
|
|
1763
|
+
ids: pageIds,
|
|
1764
|
+
fresh: freshPages,
|
|
1765
|
+
claims: pageClaims
|
|
1766
|
+
} = assignIds(
|
|
1661
1767
|
alive.map((p) => ({
|
|
1662
1768
|
key: p.key,
|
|
1663
1769
|
id: p.entry.id,
|
|
1664
1770
|
fixed: fixedId(renum, p.key, p.entry.id)
|
|
1665
1771
|
}))
|
|
1666
1772
|
);
|
|
1667
|
-
for (const
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
value: { ...renum.get(key), i: [change.from, change.to] }
|
|
1672
|
-
});
|
|
1773
|
+
for (const p of [...alive].sort((a, b) => compare(a.key, b.key))) {
|
|
1774
|
+
const value = renumRecord(renum, p.key, p.entry, freshPages.get(p.key), pageClaims.has(p.key));
|
|
1775
|
+
if (value) fixups.push({ map: "renum", key: p.key, value });
|
|
1776
|
+
}
|
|
1673
1777
|
const shapesByPage = /* @__PURE__ */ new Map();
|
|
1674
1778
|
for (const [full, value] of shared.shapes) {
|
|
1675
1779
|
const parts2 = split(full, 1);
|
|
@@ -1881,7 +1985,8 @@ function syncShapes(ctx, page) {
|
|
|
1881
1985
|
const roomCell = cellEntry(shared.cells.get(cellKey));
|
|
1882
1986
|
const local = () => ({
|
|
1883
1987
|
pos: piecePos.get(piece.path),
|
|
1884
|
-
...piece.kind === "leaf" ? { xml: piece.text } : { open: piece.text }
|
|
1988
|
+
...piece.kind === "leaf" ? { xml: piece.text } : { open: piece.text },
|
|
1989
|
+
...piece.refs ? { r: piece.refs } : {}
|
|
1885
1990
|
});
|
|
1886
1991
|
syncEntry(
|
|
1887
1992
|
ctx,
|
|
@@ -23,6 +23,8 @@ export declare class DrawingKeys {
|
|
|
23
23
|
b64: string;
|
|
24
24
|
data: Uint8Array;
|
|
25
25
|
}>;
|
|
26
|
+
/** CRC-32 of the bytes of each stored part, by identity (see zip-store.ts). */
|
|
27
|
+
crcs: WeakMap<Uint8Array<ArrayBufferLike>, number>;
|
|
26
28
|
};
|
|
27
29
|
/**
|
|
28
30
|
* What was last applied to the editor: the drawing signature, the editor version it produced,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../visio/collab/keys.ts"],"names":[],"mappings":"AAKA,qBAAa,WAAW;;
|
|
1
|
+
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../visio/collab/keys.ts"],"names":[],"mappings":"AAKA,qBAAa,WAAW;;IAgCX,OAAO,CAAC,QAAQ,CAAC,GAAG;IA9BhC,gEAAgE;IAChE,OAAO,UAAS;IAIhB,oIAAoI;IACpI,KAAK,sBAA6B;IAClC,iEAAiE;IACjE,QAAQ,CAAC,UAAU,sBAA6B;IAChD,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,sBAA6B;IAC/C,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,sBAA6B;IACjD,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,sBAA6B;IAC/C,kGAAkG;IAClG,QAAQ,CAAC,KAAK;QACb,SAAS;iBAAyB,MAAM;mBAAS,UAAU;;QAC3D,KAAK;iBAAyB,MAAM;kBAAQ,UAAU;;QACtD,+EAA+E;QAC/E,IAAI;MACH;IACF;;;OAGG;IACH,OAAO,EACJ;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GACxF,SAAS,CAAC;IAEb,YAA6B,GAAG,EAAE,MAAM,EAAI;IAE5C,IAAI,IAAI,MAAM,CAEb;IACD,yEAAyE;IACzE,KAAK,IAAI,MAAM,CAEd;IACD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAO1B;IACD,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAS5C;IACD,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAO5B;IACD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEvC;IACD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG5B;IACD,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAG9C;IACD,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAI9B;IACD,8EAA8E;IAC9E,KAAK,CACJ,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACxC,OAAO,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAa,GACtC,IAAI,CAON;CACD"}
|
|
@@ -6,6 +6,8 @@ export interface Piece {
|
|
|
6
6
|
/** A container (section, row) keeps its opening tag; a leaf its whole element. */
|
|
7
7
|
kind: 'open' | 'leaf';
|
|
8
8
|
text: string;
|
|
9
|
+
/** See {@link PieceEntry.r}; set by the snapshot, which knows the page's ids and keys. */
|
|
10
|
+
refs?: string[];
|
|
9
11
|
}
|
|
10
12
|
export interface SplitShape {
|
|
11
13
|
/** The opening tag, never self-closing. */
|
|
@@ -25,6 +27,11 @@ export interface PieceEntry {
|
|
|
25
27
|
xml?: string;
|
|
26
28
|
/** Opening tag of a container. */
|
|
27
29
|
open?: string;
|
|
30
|
+
/**
|
|
31
|
+
* For a cell whose formula names shapes (`Sheet.<id>`): pairs of referenced id and the key of the
|
|
32
|
+
* shape that id meant to the author, flattened (`[id, key, id, key]`). Not part of the content.
|
|
33
|
+
*/
|
|
34
|
+
r?: string[];
|
|
28
35
|
}
|
|
29
36
|
/** Builds the element: `open`, the pieces under `parent` in position order, then `tail`. */
|
|
30
37
|
export declare function buildShape(open: string, entries: ReadonlyMap<string, PieceEntry>, tail: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pieces.d.ts","sourceRoot":"","sources":["../../../visio/collab/pieces.ts"],"names":[],"mappings":"AAaA,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEjE,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"pieces.d.ts","sourceRoot":"","sources":["../../../visio/collab/pieces.ts"],"names":[],"mappings":"AAaA,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEjE,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,0FAA0F;IAC1F,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IAC1B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,6CAA6C;IAC7C,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAKD,qDAAqD;AACrD,eAAO,MAAM,SAAS,SAAU,MAAM,QAAQ,WAAW,KAAG,MAG3D,CAAC;AACF,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAA+B,CAAC;AAE1E,2FAA2F;AAC3F,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAqE9D;AAED,MAAM,WAAW,UAAU;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,+BAA+B;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;CACb;AAED,4FAA4F;AAC5F,wBAAgB,UAAU,CACzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,EACxC,IAAI,EAAE,MAAM,GACV,MAAM,CAkBR;AAED,qFAAqF;AACrF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7C;AAMD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAOxE"}
|
|
@@ -15,14 +15,20 @@ export declare const numeric: (id: string) => number;
|
|
|
15
15
|
export declare function assignIds(items: readonly IdItem[]): {
|
|
16
16
|
ids: Map<string, string>;
|
|
17
17
|
fresh: Map<string, Renumbered>;
|
|
18
|
+
/** Items that keep an id another item had to leave and that is not persisted yet. */
|
|
19
|
+
claims: Set<string>;
|
|
18
20
|
};
|
|
19
21
|
/** The persisted renumbering of `key`, when it applies to an item the author numbered `id`. */
|
|
20
22
|
export declare const fixedId: (renum: ReadonlyMap<string, RenumEntry>, key: string, id: string) => string | undefined;
|
|
21
23
|
/** Every renumbering record in the room by key. */
|
|
22
24
|
export declare function readRenum(shared: SharedDrawing): Map<string, RenumEntry>;
|
|
25
|
+
/** The renumbering record of `key` with the change or claim of this read applied. */
|
|
26
|
+
export declare function renumRecord(renum: ReadonlyMap<string, RenumEntry>, recordKey: string, item: {
|
|
27
|
+
id: string;
|
|
28
|
+
}, change: Renumbered | undefined, claimed: boolean): RenumEntry | undefined;
|
|
23
29
|
/** A write a peer that can write makes to persist what every peer computes on read. */
|
|
24
30
|
export interface Fixup {
|
|
25
|
-
map: 'renum'
|
|
31
|
+
map: 'renum';
|
|
26
32
|
key: string;
|
|
27
33
|
value: unknown;
|
|
28
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-ids.d.ts","sourceRoot":"","sources":["../../../visio/collab/read-ids.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-ids.d.ts","sourceRoot":"","sources":["../../../visio/collab/read-ids.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,WAAW,MAAM;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AACD,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACX;AAED,eAAO,MAAM,OAAO,MAAO,MAAM,KAAK,MAAM,KAAG,MAAsC,CAAC;AACtF,eAAO,MAAM,OAAO,OAAQ,MAAM,KAAG,MAA6C,CAAC;AAEnF,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG;IACpD,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC/B,qFAAqF;IACrF,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB,CAuBA;AAED,+FAA+F;AAC/F,eAAO,MAAM,OAAO,UACZ,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,OACjC,MAAM,MACP,MAAM,KACR,MAAM,GAAG,SAGX,CAAC;AAEF,mDAAmD;AACnD,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAOxE;AAED,qFAAqF;AACrF,wBAAgB,WAAW,CAC1B,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,EACtC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EACpB,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,OAAO,EAAE,OAAO,GACd,UAAU,GAAG,SAAS,CAIxB;AAED,uFAAuF;AACvF,MAAM,WAAW,KAAK;IACrB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-parts.d.ts","sourceRoot":"","sources":["../../../visio/collab/read-parts.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,YAAY,EAAiC,MAAM,WAAW,CAAC;AAE7E,OAAO,EAAE,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"read-parts.d.ts","sourceRoot":"","sources":["../../../visio/collab/read-parts.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,YAAY,EAAiC,MAAM,WAAW,CAAC;AAE7E,OAAO,EAAE,KAAK,KAAK,EAAmC,MAAM,YAAY,CAAC;AAGzE,OAAO,EAEN,KAAK,UAAU,EACf,KAAK,aAAa,EAIlB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,UAAU;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,aAAa;IAC7B,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;CACb;AAID,wBAAgB,cAAc,CAC7B,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,GACpC;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAAC,MAAM,EAAE,KAAK,EAAE,CAAA;CAAE,CA2CrF;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG;IACpD,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC1C,CAsCA;AAED,oEAAoE;AACpE,wBAAgB,aAAa,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAClC,MAAM,CAYR"}
|
|
@@ -12,7 +12,6 @@ export interface ResolvedShape {
|
|
|
12
12
|
export declare function setAttr(open: string, name: string, value: string): string;
|
|
13
13
|
/** Rewrites `Sheet.<n>` for the ids in `remap` inside the F attributes of one cell element. */
|
|
14
14
|
export declare function renumberFormulas(xml: string, remap: ReadonlyMap<string, string>): string;
|
|
15
|
-
/** Rewrites the ids in `remap` on `Shape` tags and in `Sheet.<n>` references of one shape. */
|
|
16
15
|
export declare function renumberShape(xml: string, remap: ReadonlyMap<string, string>): string;
|
|
17
16
|
export interface ShapeInput {
|
|
18
17
|
/** The page key, or the master scope, the shapes belong to (the prefix of their room keys). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-shapes.d.ts","sourceRoot":"","sources":["../../../visio/collab/read-shapes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-shapes.d.ts","sourceRoot":"","sources":["../../../visio/collab/read-shapes.ts"],"names":[],"mappings":"AAaA,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AACvD,OA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aAAa,EAAE,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,KAAK,EAAE,CAAC;CAChB,CAqFA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../visio/collab/read.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../visio/collab/read.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,KAAK,EAAuD,MAAM,YAAY,CAAC;AAC7F,OAAO,EACN,KAAK,eAAe,EAKpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,UAAU,EACf,KAAK,aAAa,EAIlB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,aAAa,EAA0B,MAAM,eAAe,CAAC;AAC3E,OAAO,EACN,KAAK,SAAS,EAGd,KAAK,aAAa,EAUlB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC;AAC7C,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;AAEvC,MAAM,WAAW,cAAe,SAAQ,UAAU;IACjD,wFAAwF;IACxF,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC5B;AACD,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;IAChB,yEAAyE;IACzE,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,sGAAsG;IACtG,gBAAgB,EAAE,MAAM,CAAC;CACzB;AACD,MAAM,WAAW,eAAe;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,uCAAuC;IACvC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,4FAA4F;IAC5F,MAAM,EAAE,KAAK,EAAE,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,eAAe,GAAG,SAAS,CA4LpF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Y from 'yjs';
|
|
2
2
|
import type { PieceEntry } from './pieces.js';
|
|
3
|
-
export declare const SCHEMA_VERSION =
|
|
3
|
+
export declare const SCHEMA_VERSION = 4;
|
|
4
4
|
/** The room was written by a peer with another schema version. */
|
|
5
5
|
export declare class SchemaVersionError extends Error {
|
|
6
6
|
readonly found: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../visio/collab/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../visio/collab/schema.ts"],"names":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AgB,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAItF;AAED,eAAO,MAAM,GAAG,UAAW,OAAO,KAAG,MAAM,GAAG,SACA,CAAC;AAC/C,eAAO,MAAM,GAAG,UAAW,OAAO,KAAG,MAAM,GAAG,SAC0B,CAAC;AAIzE,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAO/D;AACD,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAK/D;AACD,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAMjE;AACD,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAkB/D;AACD,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CASnE;AACD,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CAOjE;AACD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CASrE;AACD,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,CASjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot-contents.d.ts","sourceRoot":"","sources":["../../../visio/collab/snapshot-contents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAI1C,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"snapshot-contents.d.ts","sourceRoot":"","sources":["../../../visio/collab/snapshot-contents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA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C,EAAE,MAAM,CAAA;CAAE,EAC/D,GAAG,EAAE,YAAY,EACjB,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EACnB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,CAAC,GAAG,SAAS,EACnB,WAAW,EAAE,MAAM,MAAM,EACzB,KAAK,EAAE,MAAM,CAAC,EACd,KAAK,UAAQ,GACX,IAAI,CAWN;AAeD,kGAAkG;AAClG,wBAAgB,YAAY,CAAC,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,IAAI,CAM1F;AAED,4FAA4F;AAC5F,wBAAgB,UAAU,CACzB,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAA;CAAE,GACrD,IAAI,CAiDN"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type CrcCache = WeakMap<Uint8Array, number>;
|
|
2
|
+
/** A ZIP of `files` in the given order. `crcs` remembers the checksum of each byte array. */
|
|
3
|
+
export declare function writeStoredZip(files: readonly (readonly [string, Uint8Array])[], crcs: CrcCache): Uint8Array;
|
|
4
|
+
//# sourceMappingURL=zip-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip-store.d.ts","sourceRoot":"","sources":["../../../visio/collab/zip-store.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAEnD,6FAA6F;AAC7F,wBAAgB,cAAc,CAC7B,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,EAAE,EACjD,IAAI,EAAE,QAAQ,GACZ,UAAU,CA2DZ"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { VisioMaster } from './model.js';
|
|
2
|
+
import { type MasterRecord } from './master-list.js';
|
|
3
|
+
import { type VisioPackage } from './package.js';
|
|
4
|
+
import { createVisioPrintSettingsReader } from './print-settings.js';
|
|
5
|
+
import { type RawShape, type Report } from './sheet.js';
|
|
6
|
+
import type { Resources } from './style.js';
|
|
7
|
+
import type { StyleRecord } from './style-inheritance.js';
|
|
8
|
+
import type { ParseVsdxOptions } from './parser.js';
|
|
9
|
+
export interface DocumentLevel {
|
|
10
|
+
documentRoot: Element;
|
|
11
|
+
resources: Resources;
|
|
12
|
+
styles: Map<string, StyleRecord>;
|
|
13
|
+
readPrintSettings: ReturnType<typeof createVisioPrintSettingsReader>;
|
|
14
|
+
masters: Map<string, RawShape[]>;
|
|
15
|
+
masterRecords: MasterRecord[];
|
|
16
|
+
/** The diagnostics the read reported, in order, so a reuse reports them again. */
|
|
17
|
+
reports: Parameters<Report>[];
|
|
18
|
+
}
|
|
19
|
+
/** What the read consumed from its limits once the masters were listed. */
|
|
20
|
+
export interface ListedMasters {
|
|
21
|
+
documentMasters: VisioMaster[];
|
|
22
|
+
counters: {
|
|
23
|
+
curveWork: number;
|
|
24
|
+
geometry: number;
|
|
25
|
+
text: number;
|
|
26
|
+
expansion: number;
|
|
27
|
+
textRuns: number;
|
|
28
|
+
paragraphs: number;
|
|
29
|
+
shapes: number;
|
|
30
|
+
metadata: [number, number];
|
|
31
|
+
layers: [number, number];
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
interface CachedLevel {
|
|
35
|
+
/** The options that shaped the read. */
|
|
36
|
+
options: string;
|
|
37
|
+
converter: unknown;
|
|
38
|
+
/** Each part the read looked at with a print of it (declared CRC-32 and size). */
|
|
39
|
+
reads: [string, string][];
|
|
40
|
+
level: DocumentLevel;
|
|
41
|
+
listed: ListedMasters;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Keeps the document-level data of the last read. Hand the same object to every read of one
|
|
45
|
+
* drawing: a read whose package has identical parts where the last one looked (and the same
|
|
46
|
+
* options) reuses the data instead of reading styles, themes and masters again; anything else
|
|
47
|
+
* reads them afresh and replaces the entry. Identity of parts is judged by the CRC-32 and size
|
|
48
|
+
* their ZIP entries declare, which the package validates when a part is inflated.
|
|
49
|
+
*/
|
|
50
|
+
export interface VisioDocumentCache {
|
|
51
|
+
entry?: CachedLevel;
|
|
52
|
+
}
|
|
53
|
+
export declare function optionsKey(options: ParseVsdxOptions): string;
|
|
54
|
+
export declare const cacheMatches: (entry: CachedLevel | undefined, pkg: VisioPackage, options: ParseVsdxOptions) => entry is CachedLevel;
|
|
55
|
+
export type { CachedLevel };
|
|
56
|
+
export declare function readDocumentLevel(pkg: VisioPackage, documentPart: string, options: ParseVsdxOptions, checkTime: () => void, forward: Report): Promise<DocumentLevel>;
|
|
57
|
+
//# sourceMappingURL=document-level.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-level.d.ts","sourceRoot":"","sources":["../../visio/document-level.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAGjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAMN,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC7B,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC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