@pixerate/editor 0.25.0 → 0.26.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/README.md +30 -0
- package/THIRD_PARTY_NOTICES.md +11 -0
- package/dist/agent/index.cjs +174 -11
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +18 -4
- package/dist/agent/index.d.ts +18 -4
- package/dist/agent/index.js +167 -4
- package/dist/agent/index.js.map +1 -1
- package/dist/{arrangeShortcuts-B8O3f8-P.d.cts → arrange-BICutYPk.d.cts} +243 -29
- package/dist/{arrangeShortcuts-sLlD2rSX.d.ts → arrange-BICutYPk.d.ts} +243 -29
- package/dist/builtins-CdPcLwwF.d.cts +176 -0
- package/dist/builtins-Chj6zv_O.d.ts +176 -0
- package/dist/canvas/index.cjs +3917 -19
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +1232 -7
- package/dist/canvas/index.d.ts +1232 -7
- package/dist/canvas/index.js +3916 -18
- package/dist/canvas/index.js.map +1 -1
- package/dist/chunk-3CC7OPUQ.cjs +831 -0
- package/dist/chunk-3CC7OPUQ.cjs.map +1 -0
- package/dist/{chunk-AL6JMGWW.cjs → chunk-CS6NZWWA.cjs} +24 -24
- package/dist/{chunk-AL6JMGWW.cjs.map → chunk-CS6NZWWA.cjs.map} +1 -1
- package/dist/{chunk-C7P22VIP.cjs → chunk-EWCOFSCQ.cjs} +17 -6
- package/dist/chunk-EWCOFSCQ.cjs.map +1 -0
- package/dist/chunk-HDYMLS3X.cjs +409 -0
- package/dist/chunk-HDYMLS3X.cjs.map +1 -0
- package/dist/{chunk-X4N4WUKB.cjs → chunk-IFHKKVXH.cjs} +150 -38
- package/dist/chunk-IFHKKVXH.cjs.map +1 -0
- package/dist/{chunk-ECCCYKGL.js → chunk-JOIREKL7.js} +63 -39
- package/dist/chunk-JOIREKL7.js.map +1 -0
- package/dist/chunk-KRGXUQ2Y.js +1696 -0
- package/dist/chunk-KRGXUQ2Y.js.map +1 -0
- package/dist/{chunk-QGYDWPRM.js → chunk-MHEPLBFB.js} +2 -2
- package/dist/chunk-MR2764X2.js +831 -0
- package/dist/chunk-MR2764X2.js.map +1 -0
- package/dist/{chunk-7WISYZFO.cjs → chunk-NFVBT3UZ.cjs} +67 -43
- package/dist/chunk-NFVBT3UZ.cjs.map +1 -0
- package/dist/{chunk-WSQKHXW7.cjs → chunk-NQF32I6Z.cjs} +1209 -457
- package/dist/chunk-NQF32I6Z.cjs.map +1 -0
- package/dist/{chunk-IXHSYOVY.js → chunk-Q2OHWD2A.js} +638 -866
- package/dist/chunk-Q2OHWD2A.js.map +1 -0
- package/dist/{chunk-NAXVVS5I.js → chunk-QJSOZFCZ.js} +2 -2
- package/dist/{chunk-V3CHHWOE.cjs → chunk-RRREAOVM.cjs} +4 -4
- package/dist/{chunk-V3CHHWOE.cjs.map → chunk-RRREAOVM.cjs.map} +1 -1
- package/dist/{chunk-UAKDG62Z.js → chunk-SWE3NPOU.js} +116 -4
- package/dist/chunk-SWE3NPOU.js.map +1 -0
- package/dist/chunk-TXXNBDQX.cjs +1696 -0
- package/dist/chunk-TXXNBDQX.cjs.map +1 -0
- package/dist/chunk-UBCFIABU.js +409 -0
- package/dist/chunk-UBCFIABU.js.map +1 -0
- package/dist/{chunk-RR7F5GUM.js → chunk-X7HXL2SB.js} +941 -189
- package/dist/chunk-X7HXL2SB.js.map +1 -0
- package/dist/{chunk-PO6A6QQH.cjs → chunk-YOMYSFJU.cjs} +742 -970
- package/dist/chunk-YOMYSFJU.cjs.map +1 -0
- package/dist/{chunk-FH6F67DN.js → chunk-ZRNHGAQT.js} +17 -6
- package/dist/{chunk-FH6F67DN.js.map → chunk-ZRNHGAQT.js.map} +1 -1
- package/dist/commands/index.cjs +352 -4
- package/dist/commands/index.cjs.map +1 -1
- package/dist/commands/index.d.cts +37 -108
- package/dist/commands/index.d.ts +37 -108
- package/dist/commands/index.js +351 -3
- package/dist/commands/index.js.map +1 -1
- package/dist/compare/index.cjs +3 -3
- package/dist/compare/index.js +2 -2
- package/dist/{controller-BIJiNoVs.d.cts → controller-CxXGOEmy.d.cts} +209 -13
- package/dist/{controller-BIJiNoVs.d.ts → controller-CxXGOEmy.d.ts} +209 -13
- package/dist/export/index.cjs +36 -0
- package/dist/export/index.cjs.map +1 -0
- package/dist/export/index.d.cts +243 -0
- package/dist/export/index.d.ts +243 -0
- package/dist/export/index.js +36 -0
- package/dist/export/index.js.map +1 -0
- package/dist/extensions/index.cjs +54 -6
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +7 -2
- package/dist/extensions/index.d.ts +7 -2
- package/dist/extensions/index.js +59 -11
- package/dist/{index-7a6bHTLy.d.ts → index-B273Zllk.d.ts} +211 -207
- package/dist/{index-Csd5qI8u.d.cts → index-jcJwmBYt.d.cts} +211 -207
- package/dist/index.cjs +144 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -13
- package/dist/index.d.ts +49 -13
- package/dist/index.js +136 -24
- package/dist/index.js.map +1 -1
- package/dist/registry-CED5C0lA.d.cts +204 -0
- package/dist/registry-CED5C0lA.d.ts +204 -0
- package/dist/{registry-D32LpIc4.d.cts → registry-D0GADKc7.d.cts} +1 -1
- package/dist/{registry-evKTP4ls.d.ts → registry-DhVUZioj.d.ts} +1 -1
- package/dist/serializers/index.cjs +4 -4
- package/dist/serializers/index.d.cts +2 -1
- package/dist/serializers/index.d.ts +2 -1
- package/dist/serializers/index.js +3 -3
- package/dist/spreadsheet/index.cjs +33 -3
- package/dist/spreadsheet/index.cjs.map +1 -1
- package/dist/spreadsheet/index.d.cts +106 -3
- package/dist/spreadsheet/index.d.ts +106 -3
- package/dist/spreadsheet/index.js +32 -2
- package/package.json +10 -1
- package/dist/chunk-7WISYZFO.cjs.map +0 -1
- package/dist/chunk-C7P22VIP.cjs.map +0 -1
- package/dist/chunk-ECCCYKGL.js.map +0 -1
- package/dist/chunk-IXHSYOVY.js.map +0 -1
- package/dist/chunk-PO6A6QQH.cjs.map +0 -1
- package/dist/chunk-RR7F5GUM.js.map +0 -1
- package/dist/chunk-UAKDG62Z.js.map +0 -1
- package/dist/chunk-WSQKHXW7.cjs.map +0 -1
- package/dist/chunk-X4N4WUKB.cjs.map +0 -1
- package/dist/types-DX4Mh4SL.d.cts +0 -217
- package/dist/types-DX4Mh4SL.d.ts +0 -217
- /package/dist/{chunk-QGYDWPRM.js.map → chunk-MHEPLBFB.js.map} +0 -0
- /package/dist/{chunk-NAXVVS5I.js.map → chunk-QJSOZFCZ.js.map} +0 -0
|
@@ -4448,6 +4448,7 @@ function getFormulaSignature(nameOrDef) {
|
|
|
4448
4448
|
}
|
|
4449
4449
|
|
|
4450
4450
|
// src/spreadsheet/formula/evaluator.ts
|
|
4451
|
+
var BLANK_IGNORING_FUNCTIONS = /* @__PURE__ */ new Set(["SUM", "PRODUCT", "AVERAGE", "COUNT", "COUNTA", "MIN", "MAX"]);
|
|
4451
4452
|
var DEFAULT_MESSAGES = {
|
|
4452
4453
|
"#DIV/0!": "The formula divides by zero.",
|
|
4453
4454
|
"#VALUE!": "A value in the formula has the wrong type.",
|
|
@@ -4802,12 +4803,13 @@ var FormulaEvaluator = class {
|
|
|
4802
4803
|
if (error) this.fail(error, `The spill range ${node.ref}# contains an error (${error}).`);
|
|
4803
4804
|
return values;
|
|
4804
4805
|
}
|
|
4805
|
-
evaluateRange(node) {
|
|
4806
|
+
evaluateRange(node, options) {
|
|
4806
4807
|
if (!this.context.resolveRange) {
|
|
4807
4808
|
throw new Error(`Cannot resolve range ${node.raw}: no range resolver provided`);
|
|
4808
4809
|
}
|
|
4809
4810
|
if (node.sheetEnd !== void 0) return this.evaluate3d(node);
|
|
4810
|
-
const
|
|
4811
|
+
const sheet = node.sheet ?? this.defaultSheet;
|
|
4812
|
+
const values = options ? this.context.resolveRange(node.startCol, node.startRow, node.endCol, node.endRow, sheet, options) : this.context.resolveRange(node.startCol, node.startRow, node.endCol, node.endRow, sheet);
|
|
4811
4813
|
if (!Array.isArray(values)) {
|
|
4812
4814
|
if (values === "#REF!" && node.sheet !== void 0) {
|
|
4813
4815
|
return this.fail("#REF!", `${sheetLabel(node)}${node.raw} refers to a sheet that doesn't exist.`);
|
|
@@ -4843,7 +4845,7 @@ var FormulaEvaluator = class {
|
|
|
4843
4845
|
const countError = checkFormulaArgumentCount(def, node.args.length);
|
|
4844
4846
|
if (countError) return this.fail("#ERROR!", countError);
|
|
4845
4847
|
if (SPECIAL_FORMS.has(def.name)) return this.evaluateSpecialForm(def.name, node);
|
|
4846
|
-
const args = this.lazyArguments(node.args);
|
|
4848
|
+
const args = this.lazyArguments(node.args, BLANK_IGNORING_FUNCTIONS.has(def.name));
|
|
4847
4849
|
if (def.elementwise) {
|
|
4848
4850
|
const lifted = this.liftOverArrays(def, args);
|
|
4849
4851
|
if (lifted !== void 0) return lifted;
|
|
@@ -4856,13 +4858,22 @@ var FormulaEvaluator = class {
|
|
|
4856
4858
|
}
|
|
4857
4859
|
return result === void 0 || result === null ? "" : result;
|
|
4858
4860
|
}
|
|
4859
|
-
|
|
4861
|
+
/**
|
|
4862
|
+
* Arguments evaluated on first use. With `skipBlanks` (the function ignores
|
|
4863
|
+
* blank cells), range arguments may come back without their blanks.
|
|
4864
|
+
*/
|
|
4865
|
+
lazyArguments(nodes, skipBlanks = false) {
|
|
4860
4866
|
const cache = /* @__PURE__ */ new Map();
|
|
4861
4867
|
return nodes.map((node, index) => ({
|
|
4862
4868
|
index,
|
|
4863
4869
|
node,
|
|
4864
4870
|
value: () => {
|
|
4865
|
-
if (!cache.has(index))
|
|
4871
|
+
if (!cache.has(index)) {
|
|
4872
|
+
cache.set(
|
|
4873
|
+
index,
|
|
4874
|
+
skipBlanks && node.type === "Range" && node.sheetEnd === void 0 ? this.evaluateRange(node, { skipBlanks: true }) : this.evaluateNode(node)
|
|
4875
|
+
);
|
|
4876
|
+
}
|
|
4866
4877
|
return cache.get(index);
|
|
4867
4878
|
}
|
|
4868
4879
|
}));
|
|
@@ -5342,4 +5353,4 @@ export {
|
|
|
5342
5353
|
MAX_FORMULA_ARRAY_SIZE,
|
|
5343
5354
|
FormulaEvaluator
|
|
5344
5355
|
};
|
|
5345
|
-
//# sourceMappingURL=chunk-
|
|
5356
|
+
//# sourceMappingURL=chunk-ZRNHGAQT.js.map
|