@poe-platform/safe-bash 0.1.756 → 0.1.758
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/image-ast/index.browser.js +76 -23
- package/dist/image-ast/index.js +76 -23
- package/dist/pdf-ast/ast.d.ts +3 -0
- package/dist/pdf-ast/index.js +88 -36
- package/dist/safe-bash/chunks/{chunk-LESPJ3OG.js → chunk-WNWIBBJZ.js} +15 -2
- package/dist/safe-bash/command-chunks/{chunk-S4J6MSLY.js → chunk-444OTXM7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-F3J5ZLKF.js → chunk-522TDVLS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VFS2MDAB.js → chunk-6YLD37NH.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-YI3GKJ7Q.js → chunk-766IWMTB.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-6AIOGLZO.js → chunk-CE6Z2ULX.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-KSH2F6RG.js → chunk-CUFCNL6G.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5VSGEE6J.js → chunk-F4IQCXZG.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-F5MORDSU.js → chunk-FDNCPZQS.js} +32 -1
- package/dist/safe-bash/command-chunks/{chunk-SG3ZDZCX.js → chunk-FLMLM7Y4.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-DVZCHNB5.js → chunk-J2NPH7DO.js} +11 -7
- package/dist/safe-bash/command-chunks/{chunk-CT3FB722.js → chunk-J7UMKBRK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QQOAK7JQ.js → chunk-KKJCKPTA.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7KS6PX4U.js → chunk-KSIGF4AG.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-KBBI4CSU.js → chunk-L2C5TIII.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4HQ7WYSI.js → chunk-MED2BOOW.js} +30 -5
- package/dist/safe-bash/command-chunks/{chunk-JRNLDPLI.js → chunk-OZSWW23M.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-DKQ5REXF.js → chunk-QDPRSPHQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WOPU2VWF.js → chunk-RID3B5RE.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-H2FQA4OU.js → chunk-TCAGGM44.js} +72 -19
- package/dist/safe-bash/command-chunks/{chunk-REYTQLLB.js → chunk-TT2DMDBY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-UGX6MXDD.js → chunk-UIIT4ULR.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-A6NFLWZI.js → chunk-WKPOGTZY.js} +22 -6
- package/dist/safe-bash/command-chunks/{chunk-WI35236J.js → chunk-XYCWDGOG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3DOHQQJR.js → chunk-Y64PA6IA.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-4F6PG2OT.js → chunk-YJWWRCIG.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-6Z7OS3TZ.js → chunk-ZP5KDHB4.js} +7 -7
- package/dist/safe-bash/commands/pandoc/index.d.ts +1 -1
- package/dist/safe-bash/commands/pandoc/index.js +5 -3
- package/dist/safe-bash/commands/python/index.browser.js +1 -1
- package/dist/safe-bash/commands/python/index.js +6 -0
- package/dist/safe-bash/commands/python/jspi.js +11 -2
- package/dist/safe-bash/core.browser.js +6 -4
- package/dist/safe-bash-command-column/column.js +3 -3
- package/dist/safe-bash-command-column/index.js +3 -3
- package/dist/safe-bash-command-column/layout.js +2 -2
- package/dist/safe-bash-command-csvkit/index.js +8 -8
- package/dist/safe-bash-command-factor/command.js +2 -2
- package/dist/safe-bash-command-factor/index.js +2 -2
- package/dist/safe-bash-command-ffmpeg/index.js +5923 -5893
- package/dist/safe-bash-command-imagemagick/index.js +2 -2
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/index.js +3 -3
- package/dist/safe-bash-command-pdfimages/index.js +72 -19
- package/dist/safe-bash-command-pdfinfo/index.js +88 -36
- package/dist/safe-bash-command-pdftk/index.js +72 -19
- package/dist/safe-bash-command-pdftoppm/index.js +88 -36
- package/dist/safe-bash-command-pdftotext/index.js +72 -19
- package/dist/safe-bash-command-qpdf/index.js +72 -19
- package/dist/safe-bash-command-sips/index.js +2 -2
- package/dist/safe-bash-command-soffice/index.js +17 -17
- package/dist/safe-bash-command-ssconvert/command-bindings.d.ts +18 -0
- package/dist/safe-bash-command-ssconvert/command.d.ts +5 -14
- package/dist/safe-bash-command-ssconvert/commands.d.ts +6 -0
- package/dist/safe-bash-command-ssconvert/commands.js +871 -0
- package/dist/safe-bash-command-ssconvert/core.js +8 -8
- package/dist/safe-bash-command-ssconvert/formats/csv.js +9 -9
- package/dist/safe-bash-command-ssconvert/formats/ods.js +8 -8
- package/dist/safe-bash-command-ssconvert/formats/spreadsheetml.js +1 -1
- package/dist/safe-bash-command-ssconvert/formats/xls.js +9 -8
- package/dist/safe-bash-command-ssconvert/formats/xlsx.js +8 -8
- package/dist/safe-bash-command-ssconvert/index.js +376 -236
- package/dist/safe-bash-command-wkhtmltopdf/index.js +72 -19
- package/dist/safe-bash-command-yq/index.js +4 -4
- package/dist/safe-bash-compression-engine/files.js +2 -2
- package/dist/safe-bash-compression-engine/operand.js +4 -4
- package/dist/safe-bash-contracts/filesystem-descriptor.js +1 -1
- package/dist/safe-bash-contracts/filesystem-output.js +1 -1
- package/dist/safe-bash-markdown-engine/commonmark-blocks.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-inlines.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-syntax.js +2 -2
- package/dist/safe-bash-markdown-engine/gfm-syntax.js +3 -3
- package/dist/safe-bash-markdown-engine/index.js +7 -7
- package/dist/safe-bash-mcp/index.js +4 -4
- package/dist/safe-bash-query-engine/index.js +5 -5
- package/dist/safe-bash-query-engine/interpreter.js +4 -4
- package/dist/safe-bash-query-engine/query-core.js +5 -5
- package/dist/spreadsheet-engine/formulas/ast.d.ts +13 -0
- package/dist/spreadsheet-engine/formulas/conventions.js +1 -1
- package/dist/spreadsheet-engine/formulas/dependencies.js +2 -2
- package/dist/spreadsheet-engine/formulas/evaluator.js +2 -2
- package/dist/spreadsheet-engine/formulas/named-expressions.d.ts +2 -2
- package/dist/spreadsheet-engine/formulas/named-expressions.js +31 -5
- package/dist/spreadsheet-engine/formulas/parser.js +34 -0
- package/dist/spreadsheet-engine/formulas/rewriting.js +19 -1
- package/dist/spreadsheet-engine/formulas/serialization.js +6 -0
- package/dist/spreadsheet-format-xls/biff-write-formulas.js +2 -0
- package/dist/xlsx-ast/formula-semantics.js +2 -0
- package/package.json +6 -2
- package/third-party/pdf-ast/THIRD_PARTY_NOTICES.md +16 -0
- package/dist/safe-bash/chunks/browser-ECQX6GMK.js +0 -6766
- package/dist/safe-bash/chunks/bz2-4OP3OWW3.js +0 -8
- package/dist/safe-bash/chunks/chunk-22XPAAOI.js +0 -173
- package/dist/safe-bash/chunks/chunk-44WUNUPV.js +0 -649
- package/dist/safe-bash/chunks/chunk-4E3SGG37.js +0 -876
- package/dist/safe-bash/chunks/chunk-4QTSSQKP.js +0 -898
- package/dist/safe-bash/chunks/chunk-5UVGPVXP.js +0 -410
- package/dist/safe-bash/chunks/chunk-64OE6Q6X.js +0 -3487
- package/dist/safe-bash/chunks/chunk-6IIFUPN2.js +0 -1526
- package/dist/safe-bash/chunks/chunk-BENDLTQD.js +0 -7065
- package/dist/safe-bash/chunks/chunk-BMO5LWEX.js +0 -534
- package/dist/safe-bash/chunks/chunk-BPMCPTNP.js +0 -1920
- package/dist/safe-bash/chunks/chunk-BRJTAWP5.js +0 -2955
- package/dist/safe-bash/chunks/chunk-C3GEIN7Q.js +0 -20054
- package/dist/safe-bash/chunks/chunk-CBVANNKK.js +0 -174814
- package/dist/safe-bash/chunks/chunk-CEWCRI6H.js +0 -2813
- package/dist/safe-bash/chunks/chunk-CGL53DQQ.js +0 -37
- package/dist/safe-bash/chunks/chunk-CTYJJD4O.js +0 -869
- package/dist/safe-bash/chunks/chunk-CWSS4MQA.js +0 -7
- package/dist/safe-bash/chunks/chunk-DLIGMTCP.js +0 -3266
- package/dist/safe-bash/chunks/chunk-EMAJ7WUW.js +0 -1031
- package/dist/safe-bash/chunks/chunk-FDKIZ2IJ.js +0 -1950
- package/dist/safe-bash/chunks/chunk-FZWJ2A7V.js +0 -3093
- package/dist/safe-bash/chunks/chunk-G2VCIF2J.js +0 -22
- package/dist/safe-bash/chunks/chunk-GVKBUQDX.js +0 -2649
- package/dist/safe-bash/chunks/chunk-IO2OGW3E.js +0 -28051
- package/dist/safe-bash/chunks/chunk-ISCZG7WA.js +0 -2648
- package/dist/safe-bash/chunks/chunk-JCN3FXLP.js +0 -38983
- package/dist/safe-bash/chunks/chunk-KJHDD4A2.js +0 -759
- package/dist/safe-bash/chunks/chunk-LB6HVRXS.js +0 -857
- package/dist/safe-bash/chunks/chunk-LLWAJOZH.js +0 -15
- package/dist/safe-bash/chunks/chunk-LMUKYZIJ.js +0 -708
- package/dist/safe-bash/chunks/chunk-M5SCNKIK.js +0 -2012
- package/dist/safe-bash/chunks/chunk-MJPFHANT.js +0 -3350
- package/dist/safe-bash/chunks/chunk-MZQW2DOL.js +0 -82
- package/dist/safe-bash/chunks/chunk-NB2V7EOY.js +0 -1348
- package/dist/safe-bash/chunks/chunk-NJVGOIYN.js +0 -17
- package/dist/safe-bash/chunks/chunk-OLNZHDIQ.js +0 -5141
- package/dist/safe-bash/chunks/chunk-OSUXMC43.js +0 -2317
- package/dist/safe-bash/chunks/chunk-OUUVROTM.js +0 -38
- package/dist/safe-bash/chunks/chunk-PA6GYKBQ.js +0 -151
- package/dist/safe-bash/chunks/chunk-PEFHZ226.js +0 -6957
- package/dist/safe-bash/chunks/chunk-QBB5P5KW.js +0 -4839
- package/dist/safe-bash/chunks/chunk-RSAWYAEH.js +0 -973
- package/dist/safe-bash/chunks/chunk-UWLYRWT4.js +0 -739
- package/dist/safe-bash/chunks/chunk-V463NBQH.js +0 -13
- package/dist/safe-bash/chunks/chunk-WPUALYUS.js +0 -843
- package/dist/safe-bash/chunks/chunk-XHKFSRGU.js +0 -5747
- package/dist/safe-bash/chunks/chunk-XHRCLZ3N.js +0 -13391
- package/dist/safe-bash/chunks/chunk-XPF5XHLY.js +0 -15
- package/dist/safe-bash/chunks/chunk-ZBFOWARG.js +0 -305
- package/dist/safe-bash/chunks/chunk-ZG7GWQ5P.js +0 -1859
- package/dist/safe-bash/chunks/model-store-EIY3ZQLZ.js +0 -10
- package/dist/safe-bash/chunks/pdf-renderer-CMF3CSVU.js +0 -22
- package/dist/safe-bash/chunks/pptx-ZL6L7KP2-O425BFIU.js +0 -30658
- package/dist/safe-bash/chunks/src-HHEPGR7U.js +0 -18969
- package/dist/safe-bash/chunks/src-MXIKQCIC.js +0 -187
- package/dist/safe-bash/chunks/usage-6TGVA2OM.js +0 -35
- package/dist/safe-bash/chunks/xz-EGQGQUEI.js +0 -8
- package/dist/safe-bash/chunks/xz-K2E2WLM6.js +0 -9
- package/dist/safe-bash/chunks/zstd-6JBLP5EF.js +0 -8
- package/dist/safe-bash/git_rust-C3QYOAZL.wasm +0 -0
- package/dist/safe-bash/command-chunks/{chunk-OQVIJMBY.js → chunk-7HINP7ZK.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-XAYEDOV5.js → chunk-CG4JSOK2.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-YIK4ZYQ4.js → chunk-DC52GWRK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-TOTZFBDT.js → chunk-TKACIO4X.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-VTWKS4RM.js → chunk-WF2LSKMI.js} +3 -3
|
@@ -4,23 +4,49 @@ import { foldSheetName } from "../../spreadsheet-ast/case-fold.js";
|
|
|
4
4
|
/** Parse relative offsets at the declaration anchor and bind nested names there.
|
|
5
5
|
* References and functions in the resulting expression still use the caller's
|
|
6
6
|
* evaluation position, as in native expr_name_eval. */
|
|
7
|
-
export function parseNamedExpression(name, book, parse, tick, maximumDepth = Infinity) {
|
|
7
|
+
export function parseNamedExpression(name, book, parse, tick, maximumDepth = Infinity, relocation) {
|
|
8
8
|
if (name.expression === "" || name.expression === "=") {
|
|
9
9
|
tick();
|
|
10
10
|
return { kind: "literal", value: { kind: "blank" }, start: 0, end: 0 };
|
|
11
11
|
}
|
|
12
12
|
const position = name.position ?? { sheet: name.sheet ?? book.sheets[0]?.id ?? "", row: 0, column: 0 };
|
|
13
|
+
function displace(ref, fallback) {
|
|
14
|
+
if (!relocation || ref.workbook !== undefined)
|
|
15
|
+
return ref;
|
|
16
|
+
const origin = book.sheets.findIndex(sheet => sheet.id === position.sheet);
|
|
17
|
+
const index = ref.sheetRelative ? origin + (ref.sheetOffset ?? 0) : ref.sheet !== undefined || fallback !== undefined
|
|
18
|
+
? book.sheets.findIndex(sheet => foldSheetName(sheet.name) === foldSheetName(ref.sheet ?? fallback)) : origin;
|
|
19
|
+
const target = index >= 0 ? book.sheets[index + relocation.sheet] : undefined;
|
|
20
|
+
if (!target)
|
|
21
|
+
return undefined;
|
|
22
|
+
const axis = (value, key) => ({ value: value.value + (value.relative ? position[key] : 0) + relocation[key], relative: false });
|
|
23
|
+
return { ...ref, sheet: target.name, sheetRelative: false, ...(ref.row ? { row: axis(ref.row, "row") } : {}), ...(ref.column ? { column: axis(ref.column, "column") } : {}) };
|
|
24
|
+
}
|
|
13
25
|
function bind(node, depth = 0) {
|
|
14
26
|
tick();
|
|
15
27
|
if (depth > maximumDepth)
|
|
16
28
|
throw new SsconvertError("resource-limit", "ssconvert formula dependency depth limit exceeded");
|
|
17
|
-
if (node.kind === "
|
|
29
|
+
if (node.kind === "reference" && relocation) {
|
|
30
|
+
const first = displace(node.first), last = node.last ? displace(node.last, node.first.sheet) : undefined;
|
|
31
|
+
if (!first || node.last && !last)
|
|
32
|
+
return { kind: "literal", value: { kind: "error", value: "#REF!" }, start: node.start, end: node.end };
|
|
33
|
+
return { ...node, first, ...(last ? { last } : {}) };
|
|
34
|
+
}
|
|
35
|
+
if (node.kind === "name" && (node.workbook === undefined || node.workbook === "")) {
|
|
36
|
+
const inherited = relocation ? { ...relocation,
|
|
37
|
+
row: relocation.row + (node.relocation?.row ?? 0), column: relocation.column + (node.relocation?.column ?? 0),
|
|
38
|
+
sheet: relocation.sheet + (node.relocation?.sheet ?? 0) } : node.relocation;
|
|
39
|
+
const bound = inherited ? { ...node, relocation: inherited } : node;
|
|
40
|
+
if (node.workbook === "" && node.sheet === undefined)
|
|
41
|
+
return bound;
|
|
18
42
|
const scope = node.sheet === undefined ? name.sheet : book.sheets.find(sheet => foldSheetName(sheet.name) === foldSheetName(node.sheet))?.id;
|
|
19
43
|
const target = resolveName(book, node.name, scope);
|
|
20
|
-
if (target?.sheet === undefined)
|
|
21
|
-
|
|
44
|
+
if (target?.sheet === undefined) {
|
|
45
|
+
const { sheet: ignoredSheet, ...global } = bound;
|
|
46
|
+
return { ...global, workbook: "" };
|
|
47
|
+
}
|
|
22
48
|
const sheet = book.sheets.find(sheet => sheet.id === target.sheet);
|
|
23
|
-
return sheet ? { ...
|
|
49
|
+
return sheet ? { ...bound, sheet: sheet.name } : bound;
|
|
24
50
|
}
|
|
25
51
|
if (node.kind === "parentheses" || node.kind === "unary")
|
|
26
52
|
return { ...node, child: bind(node.child, depth + 1) };
|
|
@@ -335,6 +335,40 @@ export function parseExpression(source, options) {
|
|
|
335
335
|
throw new SsconvertError("resource-limit", "ssconvert formula node limit exceeded");
|
|
336
336
|
try {
|
|
337
337
|
const c = source[offset];
|
|
338
|
+
if (source.startsWith("@name.", offset)) {
|
|
339
|
+
if (grammar.id !== "gnumeric" && !grammar.internalNames)
|
|
340
|
+
fail("Internal live name in native formula");
|
|
341
|
+
offset += 6;
|
|
342
|
+
const relative = source.startsWith("relative", offset);
|
|
343
|
+
if (!relative && !source.startsWith("absolute", offset))
|
|
344
|
+
fail("Invalid live name mode");
|
|
345
|
+
offset += 8;
|
|
346
|
+
const fixedSheet = source.startsWith(".fixed-sheet", offset);
|
|
347
|
+
if (fixedSheet)
|
|
348
|
+
offset += 12;
|
|
349
|
+
if (source[offset++] !== "[")
|
|
350
|
+
fail("Invalid live name mode");
|
|
351
|
+
const displacement = (separator) => {
|
|
352
|
+
const start = offset;
|
|
353
|
+
if (source[offset] === "-")
|
|
354
|
+
offset++;
|
|
355
|
+
const begin = offset;
|
|
356
|
+
while (digit(source[offset]))
|
|
357
|
+
offset++;
|
|
358
|
+
const value = Number(source.slice(start, offset));
|
|
359
|
+
if (offset === begin || !Number.isSafeInteger(value) || source[offset++] !== separator)
|
|
360
|
+
fail("Invalid live name displacement");
|
|
361
|
+
return value;
|
|
362
|
+
};
|
|
363
|
+
const row = displacement(","), column = displacement(","), sheet = displacement("]");
|
|
364
|
+
if (!relative && (row !== 0 || column !== 0) || source[offset++] !== ":" || source[offset] !== '"')
|
|
365
|
+
fail("Invalid live name");
|
|
366
|
+
const name = quoted('"', grammar.stringEscape);
|
|
367
|
+
if (!name)
|
|
368
|
+
fail("Empty live name");
|
|
369
|
+
options.onName?.(name);
|
|
370
|
+
return node({ kind: "name", name, workbook: "", relocation: { relative, row, column, sheet, ...(fixedSheet ? { sheetRelative: false } : {}) }, start, end: offset });
|
|
371
|
+
}
|
|
338
372
|
if (c === "@" && !internalLabels)
|
|
339
373
|
fail("Internal label reference in native formula");
|
|
340
374
|
if (c === "@" && internalLabels) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SsconvertError } from "../contracts.js";
|
|
2
2
|
import { foldSheetName } from "../../spreadsheet-ast/case-fold.js";
|
|
3
|
-
import { serializeReference, serializeLabelReference, quoteFormulaString } from "./serialization.js";
|
|
3
|
+
import { serializeExpression, serializeReference, serializeLabelReference, quoteFormulaString } from "./serialization.js";
|
|
4
4
|
export function visitFormula(node, visitor) {
|
|
5
5
|
visitor(node);
|
|
6
6
|
if (node.kind === "unary" || node.kind === "parentheses")
|
|
@@ -106,6 +106,24 @@ export function rewriteReferences(document, edit) {
|
|
|
106
106
|
: serializeReference(first, last, document.grammar, position) });
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
else if (node.kind === "name" && node.relocation && edit.translation === "copy") {
|
|
110
|
+
const relocation = { ...node.relocation };
|
|
111
|
+
if (relocation.relative) {
|
|
112
|
+
relocation.row += target.row - document.position.row;
|
|
113
|
+
relocation.column += target.column - document.position.column;
|
|
114
|
+
}
|
|
115
|
+
if (relocation.sheetRelative !== false && target.sheet !== document.position.sheet) {
|
|
116
|
+
const origin = document.sheetOrder?.indexOf(document.position.sheet) ?? -1;
|
|
117
|
+
const destination = document.sheetOrder?.indexOf(target.sheet) ?? -1;
|
|
118
|
+
if (origin < 0 || destination < 0)
|
|
119
|
+
throw new SsconvertError("invalid-request", "Cross-sheet formula copy requires workbook tab order");
|
|
120
|
+
relocation.sheet += destination - origin;
|
|
121
|
+
}
|
|
122
|
+
if (![relocation.row, relocation.column, relocation.sheet].every(Number.isSafeInteger))
|
|
123
|
+
throw new SsconvertError("invalid-request", "Invalid live name displacement");
|
|
124
|
+
const text = serializeExpression({ ...document, root: { ...node, relocation } }, document.grammar, false).slice(document.grammar.prefixes[0]?.length ?? 0);
|
|
125
|
+
changes.push({ start: node.start, end: node.end, text });
|
|
126
|
+
}
|
|
109
127
|
else if (node.kind === "name" && (node.workbook === undefined || node.workbook === "") && node.sheet && renamedSheet(node.sheet) !== undefined) {
|
|
110
128
|
const text = quoteFormulaString(renamedSheet(node.sheet), "'", document.grammar) + document.grammar.sheetSeparator + node.name;
|
|
111
129
|
changes.push({ start: node.start, end: node.end, text: document.grammar.bracketReferences ? "[" + text + "]" : text });
|
|
@@ -161,6 +161,12 @@ export function serializeExpression(document, grammar = document.grammar, preser
|
|
|
161
161
|
case "reference": return value.label ? grammar.quotedLabels === "openformula" && options.quotedLabel
|
|
162
162
|
? quoteFormulaString(options.quotedLabel(value), "'", grammar) : serializeLabelReference(value, grammar, position) : serializeReference(options.relativeSheets === "fixed" ? { ...value.first, sheetRelative: false } : value.first, options.relativeSheets === "fixed" && value.last ? { ...value.last, sheetRelative: false } : value.last, grammar, position);
|
|
163
163
|
case "name": {
|
|
164
|
+
if (value.relocation) {
|
|
165
|
+
if (grammar.id !== "gnumeric" && !grammar.internalNames)
|
|
166
|
+
throw new SsconvertError("unsupported-feature", "Unsupported ssconvert feature: live name relocation in target grammar");
|
|
167
|
+
const { relative, row, column, sheet } = value.relocation;
|
|
168
|
+
return `@name.${relative ? "relative" : "absolute"}${value.relocation.sheetRelative === false ? ".fixed-sheet" : ""}[${row},${column},${sheet}]:` + quoteFormulaString(value.name, '"', grammar);
|
|
169
|
+
}
|
|
164
170
|
if (grammar.qualifiedNames === false && (value.sheet !== undefined || value.workbook !== undefined))
|
|
165
171
|
throw new SsconvertError("unsupported-feature", "Unsupported ssconvert feature: qualified formula name in target grammar");
|
|
166
172
|
if (value.workbook === "" && grammar.bracketReferences && value.sheet === undefined)
|
|
@@ -366,6 +366,8 @@ export class BiffFormulaWriter {
|
|
|
366
366
|
push(first);
|
|
367
367
|
}
|
|
368
368
|
else if (node.kind === "name") {
|
|
369
|
+
if (node.relocation)
|
|
370
|
+
throw new SsconvertError("unsupported-feature", "Unsupported ssconvert feature: live name relocation in BIFF output");
|
|
369
371
|
if (node.workbook) {
|
|
370
372
|
const bookIndex = this.externalBook(node.workbook), book = this.externalBooks[bookIndex];
|
|
371
373
|
const scope = node.sheet === undefined ? undefined : this.externalScope(bookIndex, node.sheet);
|
|
@@ -19,6 +19,8 @@ export function nativeOpenFormula(source, position, context, arrayStringLiterals
|
|
|
19
19
|
throw new SsconvertError("unsupported-feature", "Unsupported ssconvert feature: automatic label intersection in Gnumeric output");
|
|
20
20
|
if (node.kind === "reference" && node.label)
|
|
21
21
|
throw new SsconvertError("unsupported-feature", "Unsupported ssconvert feature: live label reference in Gnumeric output");
|
|
22
|
+
if (node.kind === "name" && node.relocation)
|
|
23
|
+
throw new SsconvertError("unsupported-feature", "Unsupported ssconvert feature: live name relocation in Gnumeric output");
|
|
22
24
|
});
|
|
23
25
|
if (!source.startsWith("of:="))
|
|
24
26
|
return source;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poe-platform/safe-bash",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.758",
|
|
4
4
|
"description": "Extensible virtual shell with pluggable filesystems and streaming commands",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
"types": "./dist/pdf-ast/index.d.ts",
|
|
37
37
|
"import": "./dist/pdf-ast/index.js"
|
|
38
38
|
},
|
|
39
|
+
"./ssconvert/commands": {
|
|
40
|
+
"types": "./dist/safe-bash-command-ssconvert/commands.d.ts",
|
|
41
|
+
"import": "./dist/safe-bash-command-ssconvert/commands.js"
|
|
42
|
+
},
|
|
39
43
|
"./mcp": {
|
|
40
44
|
"types": "./dist/safe-bash-mcp/index.d.ts",
|
|
41
45
|
"import": "./dist/safe-bash-mcp/index.js"
|
|
@@ -837,7 +841,7 @@
|
|
|
837
841
|
"access": "public"
|
|
838
842
|
},
|
|
839
843
|
"dependencies": {
|
|
840
|
-
"@poe-platform/safe-fs": "0.1.
|
|
844
|
+
"@poe-platform/safe-fs": "0.1.758",
|
|
841
845
|
"pdf-lib": "1.17.1",
|
|
842
846
|
"@noble/hashes": "2.4.0",
|
|
843
847
|
"pako": "3.0.1",
|
|
@@ -295,3 +295,19 @@ tables and clear the high byte only for F000–F0FF. The TrueType reader records
|
|
|
295
295
|
the selected cmap's encoding. Tests in `src/fonts/cid-to-gid.test.ts` cover
|
|
296
296
|
raw and prefixed symbol codes plus the original issue2948 fixture at the
|
|
297
297
|
same pinned PDF.js revision documented above.
|
|
298
|
+
|
|
299
|
+
Pattern-painted stencils follow PDF.js `CanvasGraphics._createMaskCanvas`:
|
|
300
|
+
the current pattern is painted in page coordinates through transformed mask
|
|
301
|
+
alpha, rather than coloring the source mask pixels. `stencil-pattern.test.ts`
|
|
302
|
+
ports the original `issue13372` equality fixture and adds memory-only coverage
|
|
303
|
+
for inline masks, rotation, inverted Decode, alpha, one-pixel masks, and tiling.
|
|
304
|
+
The source fixture and hashes are recorded in `src/fixtures/SOURCES.md`.
|
|
305
|
+
The one-pixel gradient expectation is independently verified by Poppler and
|
|
306
|
+
MuPDF; PDF.js's `paintSolidColorImageMask` optimization loses that pattern.
|
|
307
|
+
|
|
308
|
+
Malformed dictionary-key recovery follows PDF.js `Parser.getObj`, skipping
|
|
309
|
+
stray non-Name tokens only in local repair mode. Damaged optional ToUnicode
|
|
310
|
+
streams follow `PartialEvaluator.readToUnicode` error recovery while retaining
|
|
311
|
+
local resource-limit errors. `dictionary-recovery.test.ts` ports the original
|
|
312
|
+
`issue11549` equality fixture and covers ordinary/compressed dictionaries,
|
|
313
|
+
trailer metadata, strict mode, and explicit limits.
|