ooxml-core 1.2.0 → 1.3.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/{PptxHandler-SJTINPU4.mjs → PptxHandler-ZPJNHEZZ.mjs} +2 -2
- package/dist/automation/index.cjs +3294 -661
- package/dist/automation/index.mjs +3294 -661
- package/dist/chart/bar-cluster-geometry.d.ts +6 -0
- package/dist/chart/bar-cluster-geometry.d.ts.map +1 -1
- package/dist/chart/index.cjs +5 -2
- package/dist/chart/index.mjs +5 -3
- package/dist/chart/render/chart-spacing.d.ts.map +1 -1
- package/dist/{chunk-TEOAOAIF.mjs → chunk-BB55ASTX.mjs} +3 -3
- package/dist/{chunk-CQQAPUAG.mjs → chunk-H4TPDZV4.mjs} +11 -9
- package/dist/{chunk-VYTA2OUN.mjs → chunk-IVDC75E5.mjs} +1 -1
- package/dist/{chunk-FI4RSJ24.mjs → chunk-QPQDLSJQ.mjs} +1 -1
- package/dist/{chunk-XCZ7U3GZ.mjs → chunk-XGLKW3JJ.mjs} +13 -9
- package/dist/docx/index.cjs +4 -2
- package/dist/docx/index.mjs +4 -2
- package/dist/docx/layout/index.cjs +4 -2
- package/dist/docx/layout/index.mjs +4 -2
- package/dist/docx/ui/index.cjs +4 -2
- package/dist/docx/ui/index.mjs +4 -2
- package/dist/index.cjs +5 -2
- package/dist/index.mjs +5 -2
- package/dist/pptx/automation/index.cjs +29 -17
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/index-EZJZ7USt.d.ts.map +1 -1
- package/dist/pptx/cli/index.cjs +29 -17
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/index.cjs +29 -17
- package/dist/pptx/index.mjs +5 -5
- package/dist/teams/index.cjs +176 -92
- package/dist/teams/index.mjs +176 -92
- package/dist/visio/clipboard-resources.d.ts +11 -0
- package/dist/visio/clipboard-resources.d.ts.map +1 -0
- package/dist/visio/clipboard-types.d.ts +26 -0
- package/dist/visio/clipboard-types.d.ts.map +1 -0
- package/dist/visio/clipboard-xml.d.ts +8 -0
- package/dist/visio/clipboard-xml.d.ts.map +1 -0
- package/dist/visio/clipboard.d.ts +7 -0
- package/dist/visio/clipboard.d.ts.map +1 -0
- package/dist/visio/create-document.d.ts +8 -0
- package/dist/visio/create-document.d.ts.map +1 -0
- package/dist/visio/edit-commands.d.ts +19 -2
- package/dist/visio/edit-commands.d.ts.map +1 -1
- package/dist/visio/edit-delete.d.ts +9 -0
- package/dist/visio/edit-delete.d.ts.map +1 -0
- package/dist/visio/edit-duplicate-commands.d.ts +14 -0
- package/dist/visio/edit-duplicate-commands.d.ts.map +1 -0
- package/dist/visio/edit-duplicate-scope.d.ts +4 -0
- package/dist/visio/edit-duplicate-scope.d.ts.map +1 -0
- package/dist/visio/edit-duplicate.d.ts +10 -0
- package/dist/visio/edit-duplicate.d.ts.map +1 -0
- package/dist/visio/edit-formatting-cell-admission.d.ts +3 -0
- package/dist/visio/edit-formatting-cell-admission.d.ts.map +1 -0
- package/dist/visio/edit-formatting-commands.d.ts +46 -0
- package/dist/visio/edit-formatting-commands.d.ts.map +1 -0
- package/dist/visio/edit-formatting-font.d.ts +6 -0
- package/dist/visio/edit-formatting-font.d.ts.map +1 -0
- package/dist/visio/edit-formatting-paint-scope.d.ts +6 -0
- package/dist/visio/edit-formatting-paint-scope.d.ts.map +1 -0
- package/dist/visio/edit-formatting-paint.d.ts +6 -0
- package/dist/visio/edit-formatting-paint.d.ts.map +1 -0
- package/dist/visio/edit-formatting-rows.d.ts +14 -0
- package/dist/visio/edit-formatting-rows.d.ts.map +1 -0
- package/dist/visio/edit-formatting-scope.d.ts +6 -0
- package/dist/visio/edit-formatting-scope.d.ts.map +1 -0
- package/dist/visio/edit-formatting-text.d.ts +8 -0
- package/dist/visio/edit-formatting-text.d.ts.map +1 -0
- package/dist/visio/edit-formatting.d.ts +12 -0
- package/dist/visio/edit-formatting.d.ts.map +1 -0
- package/dist/visio/edit-geometry.d.ts.map +1 -1
- package/dist/visio/edit-paste-commands.d.ts +15 -0
- package/dist/visio/edit-paste-commands.d.ts.map +1 -0
- package/dist/visio/edit-paste.d.ts +5 -0
- package/dist/visio/edit-paste.d.ts.map +1 -0
- package/dist/visio/edit-recalculate.d.ts +3 -1
- package/dist/visio/edit-recalculate.d.ts.map +1 -1
- package/dist/visio/edit-resize-anchor.d.ts +8 -0
- package/dist/visio/edit-resize-anchor.d.ts.map +1 -0
- package/dist/visio/edit-scope.d.ts.map +1 -1
- package/dist/visio/edit-shape-create.d.ts +1 -1
- package/dist/visio/edit-shape-create.d.ts.map +1 -1
- package/dist/visio/edit-shape-order.d.ts +7 -0
- package/dist/visio/edit-shape-order.d.ts.map +1 -0
- package/dist/visio/edit-style-admission.d.ts +17 -0
- package/dist/visio/edit-style-admission.d.ts.map +1 -0
- package/dist/visio/edit-text-scope.d.ts +7 -0
- package/dist/visio/edit-text-scope.d.ts.map +1 -0
- package/dist/visio/edit-text.d.ts +1 -1
- package/dist/visio/edit-text.d.ts.map +1 -1
- package/dist/visio/edit.d.ts +1 -1
- package/dist/visio/edit.d.ts.map +1 -1
- package/dist/visio/index.cjs +3245 -1077
- package/dist/visio/index.d.ts +3 -1
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +3241 -1079
- package/dist/visio/line-pattern.d.ts +1 -1
- package/dist/visio/line-pattern.d.ts.map +1 -1
- package/dist/visio/line-style.d.ts.map +1 -1
- package/dist/visio/model.d.ts +23 -3
- package/dist/visio/model.d.ts.map +1 -1
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/plain-text.d.ts +5 -0
- package/dist/visio/plain-text.d.ts.map +1 -0
- package/dist/visio/resize-anchor.d.ts +27 -0
- package/dist/visio/resize-anchor.d.ts.map +1 -0
- package/dist/visio/source-paint.d.ts +5 -0
- package/dist/visio/source-paint.d.ts.map +1 -0
- package/dist/visio/style.d.ts.map +1 -1
- package/dist/visio/theme-root.d.ts.map +1 -1
- package/dist/visio/ui/contract.d.ts +10 -6
- package/dist/visio/ui/contract.d.ts.map +1 -1
- package/dist/visio/ui/draw-plan.d.ts +32 -0
- package/dist/visio/ui/draw-plan.d.ts.map +1 -0
- package/dist/visio/ui/edit-commands.d.ts.map +1 -1
- package/dist/visio/ui/formatting.d.ts +28 -0
- package/dist/visio/ui/formatting.d.ts.map +1 -0
- package/dist/visio/ui/index.cjs +1305 -15
- package/dist/visio/ui/index.d.ts +15 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +1261 -16
- package/dist/visio/ui/line-dash.d.ts +4 -0
- package/dist/visio/ui/line-dash.d.ts.map +1 -0
- package/dist/visio/ui/marquee.d.ts +15 -0
- package/dist/visio/ui/marquee.d.ts.map +1 -0
- package/dist/visio/ui/page-edit.d.ts.map +1 -1
- package/dist/visio/ui/scene-validation.d.ts.map +1 -1
- package/dist/visio/ui/selection.d.ts +12 -0
- package/dist/visio/ui/selection.d.ts.map +1 -0
- package/dist/visio/ui/shape-arrange.d.ts +17 -0
- package/dist/visio/ui/shape-arrange.d.ts.map +1 -0
- package/dist/visio/ui/shape-clipboard.d.ts +10 -0
- package/dist/visio/ui/shape-clipboard.d.ts.map +1 -0
- package/dist/visio/ui/shape-duplicate.d.ts +5 -0
- package/dist/visio/ui/shape-duplicate.d.ts.map +1 -0
- package/dist/visio/ui/shape-formatting.d.ts +14 -0
- package/dist/visio/ui/shape-formatting.d.ts.map +1 -0
- package/dist/visio/ui/shape-move.d.ts +14 -0
- package/dist/visio/ui/shape-move.d.ts.map +1 -0
- package/dist/visio/ui/shape-order.d.ts +4 -0
- package/dist/visio/ui/shape-order.d.ts.map +1 -0
- package/dist/visio/ui/shape-resize.d.ts +61 -0
- package/dist/visio/ui/shape-resize.d.ts.map +1 -0
- package/dist/visio/ui/size-position.d.ts +19 -0
- package/dist/visio/ui/size-position.d.ts.map +1 -0
- package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
- package/dist/visio/ui/svg-stroke.d.ts +8 -0
- package/dist/visio/ui/svg-stroke.d.ts.map +1 -0
- package/dist/visio/ui/text-replace-selection.d.ts +9 -0
- package/dist/visio/ui/text-replace-selection.d.ts.map +1 -0
- package/dist/visio/ui/text-replace-snapshot.d.ts +14 -0
- package/dist/visio/ui/text-replace-snapshot.d.ts.map +1 -0
- package/dist/visio/ui/text-replace-types.d.ts +48 -0
- package/dist/visio/ui/text-replace-types.d.ts.map +1 -0
- package/dist/visio/ui/text-replace.d.ts +18 -0
- package/dist/visio/ui/text-replace.d.ts.map +1 -0
- package/dist/xlsx/edit/context.d.ts +3 -1
- package/dist/xlsx/edit/context.d.ts.map +1 -1
- package/dist/xlsx/edit/history.d.ts +18 -0
- package/dist/xlsx/edit/history.d.ts.map +1 -1
- package/dist/xlsx/edit/session-calc.d.ts +30 -8
- package/dist/xlsx/edit/session-calc.d.ts.map +1 -1
- package/dist/xlsx/edit/session.d.ts.map +1 -1
- package/dist/xlsx/edit/sheets.d.ts.map +1 -1
- package/dist/xlsx/edit/types.d.ts +23 -3
- package/dist/xlsx/edit/types.d.ts.map +1 -1
- package/dist/xlsx/formula/engine-core.d.ts.map +1 -1
- package/dist/xlsx/formula/engine-host.d.ts +6 -2
- package/dist/xlsx/formula/engine-host.d.ts.map +1 -1
- package/dist/xlsx/formula/engine-prepare.d.ts +33 -0
- package/dist/xlsx/formula/engine-prepare.d.ts.map +1 -0
- package/dist/xlsx/formula/engine-structure.d.ts +40 -0
- package/dist/xlsx/formula/engine-structure.d.ts.map +1 -0
- package/dist/xlsx/formula/engine-types.d.ts +26 -0
- package/dist/xlsx/formula/engine-types.d.ts.map +1 -1
- package/dist/xlsx/formula/engine.d.ts.map +1 -1
- package/dist/xlsx/formula/formula-shape.d.ts +28 -0
- package/dist/xlsx/formula/formula-shape.d.ts.map +1 -0
- package/dist/xlsx/formula/graph-index.d.ts +3 -1
- package/dist/xlsx/formula/graph-index.d.ts.map +1 -1
- package/dist/xlsx/formula/graph.d.ts +5 -0
- package/dist/xlsx/formula/graph.d.ts.map +1 -1
- package/dist/xlsx/formula/lexemes.d.ts.map +1 -1
- package/dist/xlsx/formula/parse-cache.d.ts +9 -0
- package/dist/xlsx/formula/parse-cache.d.ts.map +1 -0
- package/dist/xlsx/formula/parser.d.ts +3 -0
- package/dist/xlsx/formula/parser.d.ts.map +1 -1
- package/dist/xlsx/formula/ref-text.d.ts +14 -0
- package/dist/xlsx/formula/ref-text.d.ts.map +1 -0
- package/dist/xlsx/formula/references.d.ts.map +1 -1
- package/dist/xlsx/formula/shift-formula.d.ts +19 -0
- package/dist/xlsx/formula/shift-formula.d.ts.map +1 -0
- package/dist/xlsx/formula/shift-graph.d.ts +42 -0
- package/dist/xlsx/formula/shift-graph.d.ts.map +1 -0
- package/dist/xlsx/formula/transform.d.ts +2 -23
- package/dist/xlsx/formula/transform.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +1087 -338
- package/dist/xlsx/index.mjs +1087 -339
- package/dist/xlsx/layout/index.d.ts +1 -1
- package/dist/xlsx/layout/index.d.ts.map +1 -1
- package/dist/xlsx/layout/sheet-queries.d.ts +7 -0
- package/dist/xlsx/layout/sheet-queries.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +170 -99
- package/dist/xlsx/load/index.mjs +170 -99
- package/dist/xlsx/ui/index.cjs +1072 -332
- package/dist/xlsx/ui/index.mjs +1072 -332
- package/package.json +1 -1
package/dist/teams/index.mjs
CHANGED
|
@@ -5098,8 +5098,8 @@ function readPrefix(source2, at) {
|
|
|
5098
5098
|
if (ch === "'") {
|
|
5099
5099
|
const quoted = readQuoted(source2, at);
|
|
5100
5100
|
if (source2[at + quoted.length] !== "!") return void 0;
|
|
5101
|
-
const
|
|
5102
|
-
return { prefix: { text: source2.slice(at, at +
|
|
5101
|
+
const length2 = quoted.length + 1;
|
|
5102
|
+
return { prefix: { text: source2.slice(at, at + length2), ...splitSheets(quoted.name) }, length: length2 };
|
|
5103
5103
|
}
|
|
5104
5104
|
let i = at;
|
|
5105
5105
|
if (ch === "[") {
|
|
@@ -5108,13 +5108,23 @@ function readPrefix(source2, at) {
|
|
|
5108
5108
|
if (i === at + 1 || source2[i] !== "]") return void 0;
|
|
5109
5109
|
i++;
|
|
5110
5110
|
}
|
|
5111
|
+
const sheetFrom = i;
|
|
5111
5112
|
while (i < source2.length && isSheetCharCode(source2.charCodeAt(i))) i++;
|
|
5112
|
-
if (
|
|
5113
|
-
|
|
5114
|
-
if (
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5113
|
+
if (i === sheetFrom) return void 0;
|
|
5114
|
+
let lastFrom = -1;
|
|
5115
|
+
if (source2[i] === ":") {
|
|
5116
|
+
lastFrom = i + 1;
|
|
5117
|
+
i = lastFrom;
|
|
5118
|
+
while (i < source2.length && isSheetCharCode(source2.charCodeAt(i))) i++;
|
|
5119
|
+
if (i === lastFrom) return void 0;
|
|
5120
|
+
}
|
|
5121
|
+
if (source2[i] !== "!") return void 0;
|
|
5122
|
+
if (ch !== "[" && lastFrom < 0 && isDigitCode(source2.charCodeAt(sheetFrom))) return void 0;
|
|
5123
|
+
const length = i + 1 - at;
|
|
5124
|
+
return {
|
|
5125
|
+
prefix: { text: source2.slice(at, at + length), ...splitSheets(source2.slice(at, i)) },
|
|
5126
|
+
length
|
|
5127
|
+
};
|
|
5118
5128
|
}
|
|
5119
5129
|
function numberLiteral(text) {
|
|
5120
5130
|
if (text.length <= 15) return Number(text);
|
|
@@ -5127,7 +5137,7 @@ function numberLiteral(text) {
|
|
|
5127
5137
|
const truncated = kept.length >= point ? `${kept.slice(0, point)}.${kept.slice(point)}` : kept + "0".repeat(point - kept.length);
|
|
5128
5138
|
return Number(`${truncated}${exponent !== void 0 ? `e${exponent}` : ""}`);
|
|
5129
5139
|
}
|
|
5130
|
-
var ERRORS_BY_LENGTH, NAME_RE, CELL_RE, COLS_RE, ROWS_RE, NUMBER_RE, sticky, CELL_AT, COLS_AT, ROWS_AT, NAME_AT, NUMBER_AT, isDigitAt, OPERATORS, isLetterCode, isDigitCode, isNameStartCode, isNameCharCode, isSheetCharCode, isNameChar, boundary
|
|
5140
|
+
var ERRORS_BY_LENGTH, NAME_RE, CELL_RE, COLS_RE, ROWS_RE, NUMBER_RE, sticky, CELL_AT, COLS_AT, ROWS_AT, NAME_AT, NUMBER_AT, isDigitAt, OPERATORS, isLetterCode, isDigitCode, isNameStartCode, isNameCharCode, isSheetCharCode, isNameChar, boundary;
|
|
5131
5141
|
var init_lexemes = __esm({
|
|
5132
5142
|
"xlsx/formula/lexemes.ts"() {
|
|
5133
5143
|
init_address();
|
|
@@ -5138,7 +5148,7 @@ var init_lexemes = __esm({
|
|
|
5138
5148
|
CELL_RE = /^(\$?)([A-Za-z]{1,3})(\$?)(\d{1,7})/;
|
|
5139
5149
|
COLS_RE = /^(\$?)([A-Za-z]{1,3}):(\$?)([A-Za-z]{1,3})/;
|
|
5140
5150
|
ROWS_RE = /^(\$?)(\d{1,7}):(\$?)(\d{1,7})/;
|
|
5141
|
-
NUMBER_RE = /^(?:\d
|
|
5151
|
+
NUMBER_RE = /^(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/;
|
|
5142
5152
|
sticky = (re) => new RegExp(re.source.replace(/^\^/, ""), "y");
|
|
5143
5153
|
CELL_AT = sticky(CELL_RE);
|
|
5144
5154
|
COLS_AT = sticky(COLS_RE);
|
|
@@ -5173,7 +5183,6 @@ var init_lexemes = __esm({
|
|
|
5173
5183
|
const next = source2[end];
|
|
5174
5184
|
return !isNameChar(next) && next !== "(" && next !== "!" && next !== "[";
|
|
5175
5185
|
};
|
|
5176
|
-
PREFIX_AT = /(\[\d+\])?([A-Za-z0-9_.\u00A1-\uFFFF]+)(?::([A-Za-z0-9_.\u00A1-\uFFFF]+))?!/y;
|
|
5177
5186
|
}
|
|
5178
5187
|
});
|
|
5179
5188
|
|
|
@@ -5335,7 +5344,7 @@ var init_tokenizer = __esm({
|
|
|
5335
5344
|
}
|
|
5336
5345
|
});
|
|
5337
5346
|
|
|
5338
|
-
// xlsx/formula/
|
|
5347
|
+
// xlsx/formula/ref-text.ts
|
|
5339
5348
|
function safeTokens(formula) {
|
|
5340
5349
|
try {
|
|
5341
5350
|
return tokenize(formula);
|
|
@@ -5349,24 +5358,37 @@ function formatRefSpec(spec2) {
|
|
|
5349
5358
|
if (spec2.kind === "cell") return a2;
|
|
5350
5359
|
return `${a2}:${cornerText(spec2.end, spec2.kind)}`;
|
|
5351
5360
|
}
|
|
5352
|
-
function
|
|
5361
|
+
function rewriteRef(token, ref) {
|
|
5353
5362
|
const prefix = token.prefix?.text ?? "";
|
|
5354
5363
|
if (!ref) return `${prefix}#REF!`;
|
|
5355
5364
|
return `${prefix}${formatRefSpec(ref)}${token.spill ? "#" : ""}`;
|
|
5356
5365
|
}
|
|
5357
|
-
function
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5366
|
+
function prefixText(prefix) {
|
|
5367
|
+
const sheets = prefix.sheet2 !== void 0 ? `${prefix.sheet}:${prefix.sheet2}` : prefix.sheet;
|
|
5368
|
+
const book = prefix.book !== void 0 ? `[${prefix.book}]` : "";
|
|
5369
|
+
const quote2 = needsQuote(prefix.sheet) || prefix.sheet2 !== void 0 && needsQuote(prefix.sheet2);
|
|
5370
|
+
return quote2 ? `'${(book + sheets).replace(/'/g, "''")}'!` : `${book}${sheets}!`;
|
|
5371
|
+
}
|
|
5372
|
+
var cornerText, sameSpec, needsQuote;
|
|
5373
|
+
var init_ref_text = __esm({
|
|
5374
|
+
"xlsx/formula/ref-text.ts"() {
|
|
5375
|
+
init_address();
|
|
5376
|
+
init_ast();
|
|
5377
|
+
init_tokenizer();
|
|
5378
|
+
cornerText = (c2, kind) => {
|
|
5379
|
+
if (kind === "cols") return `${c2.colAbs ? "$" : ""}${columnLabel(c2.col)}`;
|
|
5380
|
+
if (kind === "rows") return `${c2.rowAbs ? "$" : ""}${c2.row + 1}`;
|
|
5381
|
+
return `${c2.colAbs ? "$" : ""}${columnLabel(c2.col)}${c2.rowAbs ? "$" : ""}${c2.row + 1}`;
|
|
5382
|
+
};
|
|
5383
|
+
sameSpec = (a2, b) => a2.kind === b.kind && a2.start.row === b.start.row && a2.start.col === b.start.col && a2.end.row === b.end.row && a2.end.col === b.end.col;
|
|
5384
|
+
needsQuote = (name) => !/^[A-Za-z_¡-][A-Za-z0-9_.¡-]*$/.test(name) || /^[A-Za-z]{1,3}\d+$/.test(name) || /^(?:R\d*C?\d*|C\d*)$/i.test(name) || /^(?:TRUE|FALSE)$/i.test(name);
|
|
5363
5385
|
}
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5386
|
+
});
|
|
5387
|
+
|
|
5388
|
+
// xlsx/formula/shift-formula.ts
|
|
5389
|
+
function remember(text, template) {
|
|
5390
|
+
if (templates.size >= MAX_TEMPLATES) templates.clear();
|
|
5391
|
+
templates.set(text, template);
|
|
5370
5392
|
}
|
|
5371
5393
|
function mergeSpacedAreas(tokens2) {
|
|
5372
5394
|
const out = [];
|
|
@@ -5393,83 +5415,141 @@ function mergeSpacedAreas(tokens2) {
|
|
|
5393
5415
|
}
|
|
5394
5416
|
return out;
|
|
5395
5417
|
}
|
|
5396
|
-
function
|
|
5397
|
-
|
|
5418
|
+
function templateOf(formula) {
|
|
5419
|
+
const cached = templates.get(formula);
|
|
5420
|
+
if (cached !== void 0) return cached;
|
|
5398
5421
|
const raw2 = safeTokens(formula);
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
if (shifted) {
|
|
5419
|
-
const [a2, b] = shifted;
|
|
5420
|
-
const nlo = isRow ? { ...lo, row: a2 } : { ...lo, col: a2 };
|
|
5421
|
-
const nhi = isRow ? { ...hi, row: b } : { ...hi, col: b };
|
|
5422
|
-
next = { kind: ref.kind, start: startFirst ? nlo : nhi, end: startFirst ? nhi : nlo };
|
|
5423
|
-
if (ref.kind === "cell") next.end = next.start;
|
|
5422
|
+
let template = null;
|
|
5423
|
+
if (raw2) {
|
|
5424
|
+
template = [];
|
|
5425
|
+
let literal = "";
|
|
5426
|
+
for (const token of mergeSpacedAreas(raw2)) {
|
|
5427
|
+
if (token.kind !== "ref" && !(token.kind === "name" && token.prefix)) {
|
|
5428
|
+
literal += token.text;
|
|
5429
|
+
continue;
|
|
5430
|
+
}
|
|
5431
|
+
if (literal) template.push(literal);
|
|
5432
|
+
literal = "";
|
|
5433
|
+
const part = { kind: token.kind, text: token.text };
|
|
5434
|
+
if (token.prefix) {
|
|
5435
|
+
part.prefix = token.prefix;
|
|
5436
|
+
if (token.prefix.book === void 0) part.sheet = token.prefix.sheet.toLowerCase();
|
|
5437
|
+
}
|
|
5438
|
+
if (token.ref) part.ref = token.ref;
|
|
5439
|
+
if (token.spill) part.spill = true;
|
|
5440
|
+
template.push(part);
|
|
5424
5441
|
}
|
|
5425
|
-
if (
|
|
5426
|
-
token.text = rewrite(token, next);
|
|
5442
|
+
if (literal) template.push(literal);
|
|
5427
5443
|
}
|
|
5428
|
-
|
|
5444
|
+
remember(formula, template);
|
|
5445
|
+
return template;
|
|
5429
5446
|
}
|
|
5430
|
-
function
|
|
5431
|
-
const
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5447
|
+
function rewriteTemplate(formula, rewrite2) {
|
|
5448
|
+
const template = templateOf(formula);
|
|
5449
|
+
if (!template) return formula;
|
|
5450
|
+
let next;
|
|
5451
|
+
for (let i = 0; i < template.length; i++) {
|
|
5452
|
+
const part = template[i];
|
|
5453
|
+
if (typeof part === "string") continue;
|
|
5454
|
+
const changed = rewrite2(part);
|
|
5455
|
+
if (!changed) continue;
|
|
5456
|
+
next ??= template.slice();
|
|
5457
|
+
next[i] = changed;
|
|
5458
|
+
}
|
|
5459
|
+
if (!next) return formula;
|
|
5460
|
+
const text = next.map((part) => typeof part === "string" ? part : part.text).join("");
|
|
5461
|
+
remember(text, next);
|
|
5462
|
+
return text;
|
|
5463
|
+
}
|
|
5464
|
+
function shiftInterval(a2, b, at, count2, max) {
|
|
5465
|
+
if (count2 > 0) {
|
|
5466
|
+
const na2 = a2 >= at ? a2 + count2 : a2;
|
|
5467
|
+
const nb2 = b >= at ? b + count2 : b;
|
|
5468
|
+
if (nb2 > max) return na2 > max ? void 0 : [na2, max];
|
|
5469
|
+
return [na2, nb2];
|
|
5470
|
+
}
|
|
5471
|
+
const n = -count2;
|
|
5472
|
+
const last = at + n - 1;
|
|
5473
|
+
if (a2 >= at && b <= last) return void 0;
|
|
5474
|
+
const na = a2 < at ? a2 : a2 <= last ? at : a2 - n;
|
|
5475
|
+
const nb = b < at ? b : b <= last ? at - 1 : b - n;
|
|
5476
|
+
return [na, nb];
|
|
5477
|
+
}
|
|
5478
|
+
function shiftRef(ref, spec2) {
|
|
5479
|
+
const isRow = spec2.axis === "row";
|
|
5480
|
+
if (isRow && ref.kind === "cols" || !isRow && ref.kind === "rows") return ref;
|
|
5481
|
+
const startFirst = isRow ? ref.start.row <= ref.end.row : ref.start.col <= ref.end.col;
|
|
5482
|
+
const lo = startFirst ? ref.start : ref.end;
|
|
5483
|
+
const hi = startFirst ? ref.end : ref.start;
|
|
5484
|
+
const shifted = shiftInterval(
|
|
5485
|
+
isRow ? lo.row : lo.col,
|
|
5486
|
+
isRow ? hi.row : hi.col,
|
|
5487
|
+
spec2.at,
|
|
5488
|
+
spec2.count,
|
|
5489
|
+
isRow ? MAX_ROW : MAX_COL
|
|
5490
|
+
);
|
|
5491
|
+
if (!shifted) return void 0;
|
|
5492
|
+
const [a2, b] = shifted;
|
|
5493
|
+
const nlo = isRow ? { ...lo, row: a2 } : { ...lo, col: a2 };
|
|
5494
|
+
const nhi = isRow ? { ...hi, row: b } : { ...hi, col: b };
|
|
5495
|
+
const next = {
|
|
5496
|
+
kind: ref.kind,
|
|
5497
|
+
start: startFirst ? nlo : nhi,
|
|
5498
|
+
end: startFirst ? nhi : nlo
|
|
5499
|
+
};
|
|
5500
|
+
if (ref.kind === "cell") next.end = next.start;
|
|
5501
|
+
return sameSpec(next, ref) ? ref : next;
|
|
5502
|
+
}
|
|
5503
|
+
function shiftFormula(formula, formulaSheet, spec2) {
|
|
5504
|
+
if (spec2.count === 0) return formula;
|
|
5505
|
+
const sheet = spec2.sheet.toLowerCase();
|
|
5506
|
+
const own = formulaSheet.toLowerCase() === sheet;
|
|
5507
|
+
return rewriteTemplate(formula, (part) => {
|
|
5508
|
+
if (part.kind !== "ref" || !part.ref || (part.prefix ? part.sheet !== sheet : !own))
|
|
5509
|
+
return void 0;
|
|
5510
|
+
const next = shiftRef(part.ref, spec2);
|
|
5511
|
+
if (next === part.ref) return void 0;
|
|
5512
|
+
const out = { kind: "ref", text: rewriteRef(part, next) };
|
|
5513
|
+
if (part.prefix) out.prefix = part.prefix;
|
|
5514
|
+
if (part.sheet !== void 0) out.sheet = part.sheet;
|
|
5515
|
+
if (next) out.ref = next;
|
|
5516
|
+
if (part.spill) out.spill = true;
|
|
5517
|
+
return out;
|
|
5518
|
+
});
|
|
5435
5519
|
}
|
|
5436
5520
|
function renameSheetInFormula(formula, oldName, newName) {
|
|
5437
|
-
const tokens2 = safeTokens(formula);
|
|
5438
|
-
if (!tokens2) return formula;
|
|
5439
5521
|
const lower2 = oldName.toLowerCase();
|
|
5440
|
-
|
|
5441
|
-
const prefix =
|
|
5442
|
-
if (!prefix ||
|
|
5443
|
-
const first2 =
|
|
5522
|
+
return rewriteTemplate(formula, (part) => {
|
|
5523
|
+
const prefix = part.prefix;
|
|
5524
|
+
if (!prefix || part.sheet === void 0) return void 0;
|
|
5525
|
+
const first2 = part.sheet === lower2;
|
|
5444
5526
|
const second = prefix.sheet2?.toLowerCase() === lower2;
|
|
5445
|
-
if (!first2 && !second)
|
|
5527
|
+
if (!first2 && !second) return void 0;
|
|
5446
5528
|
const renamed = { ...prefix, sheet: first2 ? newName : prefix.sheet };
|
|
5447
5529
|
if (prefix.sheet2 !== void 0) renamed.sheet2 = second ? newName : prefix.sheet2;
|
|
5448
5530
|
const text = prefixText(renamed);
|
|
5449
|
-
token.text = text + token.text.slice(prefix.text.length);
|
|
5450
5531
|
renamed.text = text;
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5532
|
+
const out = { ...part, text: text + part.text.slice(prefix.text.length) };
|
|
5533
|
+
out.prefix = renamed;
|
|
5534
|
+
out.sheet = renamed.sheet.toLowerCase();
|
|
5535
|
+
return out;
|
|
5536
|
+
});
|
|
5454
5537
|
}
|
|
5455
|
-
var
|
|
5538
|
+
var templates, MAX_TEMPLATES;
|
|
5539
|
+
var init_shift_formula = __esm({
|
|
5540
|
+
"xlsx/formula/shift-formula.ts"() {
|
|
5541
|
+
init_address();
|
|
5542
|
+
init_ref_text();
|
|
5543
|
+
templates = /* @__PURE__ */ new Map();
|
|
5544
|
+
MAX_TEMPLATES = 2e5;
|
|
5545
|
+
}
|
|
5546
|
+
});
|
|
5547
|
+
|
|
5548
|
+
// xlsx/formula/transform.ts
|
|
5456
5549
|
var init_transform = __esm({
|
|
5457
5550
|
"xlsx/formula/transform.ts"() {
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
init_tokenizer();
|
|
5461
|
-
cornerText = (c2, kind) => {
|
|
5462
|
-
if (kind === "cols") return `${c2.colAbs ? "$" : ""}${columnLabel(c2.col)}`;
|
|
5463
|
-
if (kind === "rows") return `${c2.rowAbs ? "$" : ""}${c2.row + 1}`;
|
|
5464
|
-
return `${c2.colAbs ? "$" : ""}${columnLabel(c2.col)}${c2.rowAbs ? "$" : ""}${c2.row + 1}`;
|
|
5465
|
-
};
|
|
5466
|
-
sameSpec = (a2, b) => a2.kind === b.kind && a2.start.row === b.start.row && a2.start.col === b.start.col && a2.end.row === b.end.row && a2.end.col === b.end.col;
|
|
5467
|
-
sheetMatches = (prefix, formulaSheet, sheet) => {
|
|
5468
|
-
if (prefix?.book !== void 0) return false;
|
|
5469
|
-
const name = prefix ? prefix.sheet : formulaSheet;
|
|
5470
|
-
return name.toLowerCase() === sheet.toLowerCase();
|
|
5471
|
-
};
|
|
5472
|
-
needsQuote = (name) => !/^[A-Za-z_\u00A1-\uFFFF][A-Za-z0-9_.\u00A1-\uFFFF]*$/.test(name) || /^[A-Za-z]{1,3}\d+$/.test(name) || /^(?:R\d*C?\d*|C\d*)$/i.test(name) || /^(?:TRUE|FALSE)$/i.test(name);
|
|
5551
|
+
init_ref_text();
|
|
5552
|
+
init_shift_formula();
|
|
5473
5553
|
}
|
|
5474
5554
|
});
|
|
5475
5555
|
|
|
@@ -5560,7 +5640,7 @@ var init_formula_storage = __esm({
|
|
|
5560
5640
|
});
|
|
5561
5641
|
|
|
5562
5642
|
// xlsx/read/formula-text.ts
|
|
5563
|
-
function
|
|
5643
|
+
function rewrite(formula, visit) {
|
|
5564
5644
|
const out = [];
|
|
5565
5645
|
let i = 0;
|
|
5566
5646
|
while (i < formula.length) {
|
|
@@ -5603,7 +5683,7 @@ function rewrite2(formula, visit) {
|
|
|
5603
5683
|
}
|
|
5604
5684
|
function stripFuturePrefixes(formula) {
|
|
5605
5685
|
if (!formula.includes("_xl")) return formula;
|
|
5606
|
-
const plain2 =
|
|
5686
|
+
const plain2 = rewrite(formula, (token, next, out) => {
|
|
5607
5687
|
if (!next.startsWith("(")) return false;
|
|
5608
5688
|
const stripped = token.replace(/^(_xlfn\.)?(_xlws\.)?/i, "");
|
|
5609
5689
|
if (stripped === token) return false;
|
|
@@ -5613,7 +5693,7 @@ function stripFuturePrefixes(formula) {
|
|
|
5613
5693
|
return fromStoredSyntax(plain2);
|
|
5614
5694
|
}
|
|
5615
5695
|
function addFuturePrefixes(formula) {
|
|
5616
|
-
return
|
|
5696
|
+
return rewrite(toStoredSyntax(formula), (token, next, out) => {
|
|
5617
5697
|
if (!next.startsWith("(")) return false;
|
|
5618
5698
|
const upper2 = token.toUpperCase();
|
|
5619
5699
|
if (!FUTURE_FUNCTIONS.has(upper2)) return false;
|
|
@@ -6916,7 +6996,9 @@ var init_structured = __esm({
|
|
|
6916
6996
|
|
|
6917
6997
|
// xlsx/formula/parser.ts
|
|
6918
6998
|
function parseFormula(formula) {
|
|
6919
|
-
|
|
6999
|
+
return parseTokens(tokenize(formula));
|
|
7000
|
+
}
|
|
7001
|
+
function parseTokens(all2) {
|
|
6920
7002
|
const tokens2 = [];
|
|
6921
7003
|
const wsBefore = [];
|
|
6922
7004
|
let sawWs = false;
|
|
@@ -10557,8 +10639,10 @@ var init_financial = __esm({
|
|
|
10557
10639
|
|
|
10558
10640
|
// xlsx/formula/references.ts
|
|
10559
10641
|
function sheetIndex(host, name) {
|
|
10642
|
+
const sheets = host.workbook.sheets;
|
|
10643
|
+
for (let i = 0; i < sheets.length; i++) if (sheets[i]?.name === name) return i;
|
|
10560
10644
|
const lower2 = name.toLowerCase();
|
|
10561
|
-
return
|
|
10645
|
+
return sheets.findIndex((sheet) => sheet.name.toLowerCase() === lower2);
|
|
10562
10646
|
}
|
|
10563
10647
|
var init_references = __esm({
|
|
10564
10648
|
"xlsx/formula/references.ts"() {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { VisioPackage } from './package.js';
|
|
2
|
+
import type { VisioClipboardSnapshot } from './clipboard-types.js';
|
|
3
|
+
/** Include resource definitions rather than trusting a host-provided fingerprint. */
|
|
4
|
+
export declare function clipboardResources(pkg: VisioPackage): Promise<VisioClipboardSnapshot['resources']>;
|
|
5
|
+
export declare function clipboardPageContext(pkg: VisioPackage, pageId: string): Promise<{
|
|
6
|
+
xml: string;
|
|
7
|
+
scale: number;
|
|
8
|
+
}>;
|
|
9
|
+
/** Every explicit font/style reference must resolve in actual target definitions. */
|
|
10
|
+
export declare function assertClipboardResourceReferences(root: Element, document: Element): void;
|
|
11
|
+
//# sourceMappingURL=clipboard-resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard-resources.d.ts","sourceRoot":"","sources":["../../visio/clipboard-resources.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAIhE,qFAAqF;AACrF,wBAAsB,kBAAkB,CACvC,GAAG,EAAE,YAAY,GACf,OAAO,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC,CAuB9C;AACD,wBAAsB,oBAAoB,CACzC,GAAG,EAAE,YAAY,EACjB,MAAM,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAqBzC;AACD,qFAAqF;AACrF,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CA6ExF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Source fragments only. No ZIP, package images, or unrelated page content is included. */
|
|
2
|
+
export interface VisioClipboardSnapshot {
|
|
3
|
+
format: 'ooxml.visio-shapes';
|
|
4
|
+
version: 1;
|
|
5
|
+
sourcePageId: string;
|
|
6
|
+
/** Drawing-to-page ratio, matching VisioPage.drawingToPageScale. */
|
|
7
|
+
sourceDrawingScale: number;
|
|
8
|
+
selectionIds: readonly string[];
|
|
9
|
+
shapes: readonly {
|
|
10
|
+
shapeId: string;
|
|
11
|
+
xml: string;
|
|
12
|
+
}[];
|
|
13
|
+
resources: readonly {
|
|
14
|
+
path: string;
|
|
15
|
+
xml: string;
|
|
16
|
+
}[];
|
|
17
|
+
pageContext: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const VISIO_CLIPBOARD_MAGIC = "OOXML-VISIO-SHAPES/1\n";
|
|
20
|
+
export declare const VISIO_CLIPBOARD_MAX_CHARS: number;
|
|
21
|
+
export declare function clipboardId(value: unknown): string;
|
|
22
|
+
/** Own each field before asynchronous work and strip arbitrary host properties. */
|
|
23
|
+
export declare function snapshotVisioClipboard(value: VisioClipboardSnapshot): VisioClipboardSnapshot;
|
|
24
|
+
export declare function serializeVisioClipboard(value: VisioClipboardSnapshot): string;
|
|
25
|
+
export declare function deserializeVisioClipboard(text: string): VisioClipboardSnapshot;
|
|
26
|
+
//# sourceMappingURL=clipboard-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard-types.d.ts","sourceRoot":"","sources":["../../visio/clipboard-types.ts"],"names":[],"mappings":"AAEA,4FAA4F;AAC5F,MAAM,WAAW,sBAAsB;IACtC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,OAAO,EAAE,CAAC,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,MAAM,EAAE,SAAS;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACpD,SAAS,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACpD,WAAW,EAAE,MAAM,CAAC;CACpB;AACD,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAC9D,eAAO,MAAM,yBAAyB,QAAkB,CAAC;AACzD,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIlD;AACD,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,sBAAsB,GAAG,sBAAsB,CA8D5F;AACD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,sBAAsB,GAAG,MAAM,CAK7E;AACD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAe9E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VisioClipboardSnapshot } from './clipboard-types.js';
|
|
2
|
+
/** Count the entire payload before constructing any DOMs, including resources and context. */
|
|
3
|
+
export declare function assertClipboardXmlLimits(snapshot: VisioClipboardSnapshot, check: () => void): void;
|
|
4
|
+
export declare function clipboardXml(xml: string, check: () => void): Element;
|
|
5
|
+
/** Prove captured formulas independent of uncaptured shape sheets and dynamic lookup. */
|
|
6
|
+
export declare function assertClipboardFormulaScope(root: Element, ids: ReadonlySet<string>, check: () => void): void;
|
|
7
|
+
export declare function clipboardShapeRoot(snapshot: VisioClipboardSnapshot, check: () => void): Element;
|
|
8
|
+
//# sourceMappingURL=clipboard-xml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard-xml.d.ts","sourceRoot":"","sources":["../../visio/clipboard-xml.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,8FAA8F;AAC9F,wBAAgB,wBAAwB,CACvC,QAAQ,EAAE,sBAAsB,EAChC,KAAK,EAAE,MAAM,IAAI,GACf,IAAI,CAcN;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,OAAO,CAKpE;AACD,yFAAyF;AACzF,wBAAgB,2BAA2B,CAC1C,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,EACxB,KAAK,EAAE,MAAM,IAAI,GACf,IAAI,CAyBN;AACD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,sBAAsB,EAAE,KAAK,EAAE,MAAM,IAAI,GAAG,OAAO,CA6B/F"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditVsdxOptions } from './edit.js';
|
|
2
|
+
import { type VisioClipboardSnapshot } from './clipboard-types.js';
|
|
3
|
+
export { serializeVisioClipboard, deserializeVisioClipboard, VISIO_CLIPBOARD_MAGIC, VISIO_CLIPBOARD_MAX_CHARS, } from './clipboard-types.js';
|
|
4
|
+
export type { VisioClipboardSnapshot } from './clipboard-types.js';
|
|
5
|
+
/** Capture bounded source XML, never a rendering approximation or an entire package. */
|
|
6
|
+
export declare function captureVisioClipboard(input: Uint8Array | ArrayBuffer, pageId: string, shapeIds: readonly string[], options?: EditVsdxOptions): Promise<VisioClipboardSnapshot>;
|
|
7
|
+
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../visio/clipboard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAiB9C,OAAO,EAIN,KAAK,sBAAsB,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,wFAAwF;AACxF,wBAAsB,qBAAqB,CAC1C,KAAK,EAAE,UAAU,GAAG,WAAW,EAC/B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,GAAE,eAAoB,GAC3B,OAAO,CAAC,sBAAsB,CAAC,CAgEjC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CreateVsdxOptions {
|
|
2
|
+
/** Physical page inches. The initial drawing scale is 1:1. */
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
}
|
|
6
|
+
/** Create an editable single-page VSDX using shared XML/OPC writers and bounded ZIP output. */
|
|
7
|
+
export declare function createVsdx(options?: CreateVsdxOptions): Promise<Uint8Array>;
|
|
8
|
+
//# sourceMappingURL=create-document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-document.d.ts","sourceRoot":"","sources":["../../visio/create-document.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,iBAAiB;IACjC,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAuFD,+FAA+F;AAC/F,wBAAsB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,CAiFrF"}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import { type VisioResizeAnchor } from './resize-anchor.js';
|
|
2
|
+
export type { VisioResizeAnchor } from './resize-anchor.js';
|
|
3
|
+
import { type VisioDuplicateShapesEdit } from './edit-duplicate-commands.js';
|
|
4
|
+
export type { VisioDuplicateShapesEdit } from './edit-duplicate-commands.js';
|
|
5
|
+
import { type VisioPasteShapesEdit } from './edit-paste-commands.js';
|
|
6
|
+
export type { VisioPasteShapesEdit } from './edit-paste-commands.js';
|
|
7
|
+
import { type VisioFormatEdit } from './edit-formatting-commands.js';
|
|
8
|
+
export type { VisioFormatEdit, VisioTextFormatEdit, VisioShapeFormatEdit, } from './edit-formatting-commands.js';
|
|
9
|
+
export interface VisioShapeOrderEdit {
|
|
10
|
+
type: 'reorder-shape';
|
|
11
|
+
pageId: string;
|
|
12
|
+
shapeId: string;
|
|
13
|
+
order: 'front' | 'back' | 'forward' | 'backward';
|
|
14
|
+
}
|
|
1
15
|
export interface VisioTextEdit {
|
|
2
16
|
type: 'replace-plain-text';
|
|
3
17
|
pageId: string;
|
|
@@ -26,6 +40,9 @@ export type VisioGeometryEdit = (Target & {
|
|
|
26
40
|
type: 'create-rectangle';
|
|
27
41
|
}) | (BoxCreation & {
|
|
28
42
|
type: 'create-ellipse';
|
|
43
|
+
}) | (BoxCreation & {
|
|
44
|
+
type: 'create-text-box';
|
|
45
|
+
text: string;
|
|
29
46
|
}) | (Target & {
|
|
30
47
|
type: 'move-shape';
|
|
31
48
|
x: number;
|
|
@@ -34,6 +51,7 @@ export type VisioGeometryEdit = (Target & {
|
|
|
34
51
|
type: 'resize-shape';
|
|
35
52
|
width: number;
|
|
36
53
|
height: number;
|
|
54
|
+
anchor?: VisioResizeAnchor;
|
|
37
55
|
}) | (Target & {
|
|
38
56
|
type: 'rotate-shape';
|
|
39
57
|
angle: number;
|
|
@@ -73,10 +91,9 @@ export interface VisioPageDelete {
|
|
|
73
91
|
pageId: string;
|
|
74
92
|
}
|
|
75
93
|
export type VisioPageEdit = VisioPageInsert | VisioPageReorder | VisioPageRename | VisioPageDelete;
|
|
76
|
-
export type VisioEdit = VisioTextEdit | VisioGeometryEdit | VisioPageEdit;
|
|
94
|
+
export type VisioEdit = VisioTextEdit | VisioGeometryEdit | VisioPageEdit | VisioFormatEdit | VisioDuplicateShapesEdit | VisioPasteShapesEdit | VisioShapeOrderEdit;
|
|
77
95
|
export declare const isVisioPageEdit: (edit: VisioEdit) => edit is VisioPageEdit;
|
|
78
96
|
/** Potential direct changes used by both package and master dependency admission. */
|
|
79
97
|
export declare function geometryChangedCells(edit: VisioGeometryEdit): string[];
|
|
80
98
|
export declare function snapshotVisioEdits(edits: readonly VisioEdit[], maxEdits: number, maxText: number): VisioEdit[];
|
|
81
|
-
export {};
|
|
82
99
|
//# sourceMappingURL=edit-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-commands.d.ts","sourceRoot":"","sources":["../../visio/edit-commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"edit-commands.d.ts","sourceRoot":"","sources":["../../visio/edit-commands.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VisioGeometryEdit } from './edit-commands.js';
|
|
2
|
+
export type VisioShapeDelete = Extract<VisioGeometryEdit, {
|
|
3
|
+
type: 'delete-shape';
|
|
4
|
+
}>;
|
|
5
|
+
/** Pure deletion transactions remove reference-closed local leaves after complete admission.
|
|
6
|
+
* Retained formulas and caches are unchanged. Glue healing and inherited shapes remain unsupported.
|
|
7
|
+
*/
|
|
8
|
+
export declare function deleteVisioShapes(roots: ReadonlyMap<string, Element>, document: Element, edits: readonly VisioShapeDelete[], check: () => void): readonly string[];
|
|
9
|
+
//# sourceMappingURL=edit-delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-delete.d.ts","sourceRoot":"","sources":["../../visio/edit-delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAMzD,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,EAAE;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC,CAAC;AAEpF;;GAEG;AACH,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,SAAS,gBAAgB,EAAE,EAClC,KAAK,EAAE,MAAM,IAAI,GACf,SAAS,MAAM,EAAE,CAiCnB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Append source-preserving local copies. Offsets use drawing inches, bottom-left origin. */
|
|
2
|
+
export interface VisioDuplicateShapesEdit {
|
|
3
|
+
type: 'duplicate-shapes';
|
|
4
|
+
pageId: string;
|
|
5
|
+
/** Preserve selection order here; insertion follows original sibling stacking order. */
|
|
6
|
+
copies: readonly {
|
|
7
|
+
shapeId: string;
|
|
8
|
+
newShapeId: string;
|
|
9
|
+
}[];
|
|
10
|
+
offsetX: number;
|
|
11
|
+
offsetY: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function snapshotDuplicateShapes(edit: VisioDuplicateShapesEdit): VisioDuplicateShapesEdit;
|
|
14
|
+
//# sourceMappingURL=edit-duplicate-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-duplicate-commands.d.ts","sourceRoot":"","sources":["../../visio/edit-duplicate-commands.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,MAAM,WAAW,wBAAwB;IACxC,IAAI,EAAE,kBAAkB,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,MAAM,EAAE,SAAS;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CAChB;AACD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,wBAAwB,GAAG,wBAAwB,CAqChG"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { VisioPackage } from './package.js';
|
|
2
|
+
/** Adding shapes can affect container lookups and resolve formerly missing references. */
|
|
3
|
+
export declare function assertDuplicateScope(pkg: VisioPackage, pagePaths: ReadonlySet<string>, targetPage: Element, newIds: ReadonlySet<string>, check: () => void): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=edit-duplicate-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-duplicate-scope.d.ts","sourceRoot":"","sources":["../../visio/edit-duplicate-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAO9C,0FAA0F;AAC1F,wBAAsB,oBAAoB,CACzC,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,EAC9B,UAAU,EAAE,OAAO,EACnB,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,EAC3B,KAAK,EAAE,MAAM,IAAI,GACf,OAAO,CAAC,IAAI,CAAC,CA4Bf"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VisioPackage } from './package.js';
|
|
2
|
+
import type { VisioDuplicateShapesEdit } from './edit-duplicate-commands.js';
|
|
3
|
+
/** Clone the source XML after every target, identity and affected-cache proof succeeds. */
|
|
4
|
+
export declare function duplicateVisioShapes(pkg: VisioPackage, pagePaths: ReadonlySet<string>, roots: ReadonlyMap<string, Element>, document: Element, edit: VisioDuplicateShapesEdit, check: () => void, detached?: {
|
|
5
|
+
root: Element;
|
|
6
|
+
pageId: string;
|
|
7
|
+
}): Promise<readonly string[]>;
|
|
8
|
+
/** Unknown wrappers must not conceal additional sheet identities in a purported leaf copy. */
|
|
9
|
+
export declare function assertCloneLeaf(source: Element): void;
|
|
10
|
+
//# sourceMappingURL=edit-duplicate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-duplicate.d.ts","sourceRoot":"","sources":["../../visio/edit-duplicate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAuC1E,2FAA2F;AAC3F,wBAAsB,oBAAoB,CACzC,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,EAC9B,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,QAAQ,EAAE,OAAO,EACjB,IAAI,EAAE,wBAAwB,EAC9B,KAAK,EAAE,MAAM,IAAI,EACjB,QAAQ,CAAC,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC1C,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAiI5B;AAED,8FAA8F;AAC9F,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CASrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-formatting-cell-admission.d.ts","sourceRoot":"","sources":["../../visio/edit-formatting-cell-admission.ts"],"names":[],"mappings":"AAWA,gGAAgG;AAChG,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAwD5E"}
|