@sheetxl/sdk 0.8.0-beta.12 → 0.8.0-beta.13
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/THIRD-PARTY-NOTICES.md +172 -0
- package/browser/esm/{DwwR3O2sEZApPSTF.mjs → -GEhXGMfNcWmHPby.mjs} +3 -3
- package/browser/esm/{DPhGQLNGmDZwODwJ.mjs → 9WXf_BTKjW1cQisZ.mjs} +94 -94
- package/browser/esm/{CRkYR-siY2C994KV.mjs → B2SgIPPBX0wjzuq8.mjs} +1 -1
- package/browser/esm/{CBYMTDzMf1Vh7pkw.mjs → BC2RwlNwCdRywkoD.mjs} +1 -1
- package/browser/esm/{-Jx-jNHmtIQQfLvK.mjs → BEqhm9xAUPiHUCFv.mjs} +1 -1
- package/browser/esm/BHgqi7KNrl7Vjr0W.mjs +348 -0
- package/browser/esm/{D64dM68B1pKYFzdP.mjs → BJKH0tDRx2FeSWvt.mjs} +2 -2
- package/browser/esm/{DobHLF6VjHr7Xi40.mjs → BTgWtqdQoh2cB6DL.mjs} +1 -1
- package/browser/esm/{CNdjyofiRu6CYOrr.mjs → BVshV1iY3bcUH9_E.mjs} +50 -48
- package/browser/esm/{qO-ujUrgq6H3TQix.mjs → BYQ63XU7JzB4_itX.mjs} +1 -1
- package/browser/esm/{C9u8FUewte5ugUjH.mjs → Bax5aOzQkbHKXW_X.mjs} +725 -716
- package/browser/esm/{Tah7cnFb_HNZdLtj.mjs → BiDGKhtzV6yIy66o.mjs} +3 -3
- package/browser/esm/BmYrWK5OmHRtgyqM.mjs +367 -0
- package/browser/esm/{DgrAuRD2qr2DvFeJ.mjs → BoAlHgjPQ6mxb_oO.mjs} +44 -44
- package/browser/esm/{CUzYuYTTGsChC_kZ.mjs → C0mjTq8lhrX3HiPa.mjs} +2052 -1583
- package/browser/esm/{w6Jea0TiclPrYZ2M.mjs → C5j0IdwtYkWlOftv.mjs} +509 -509
- package/browser/esm/{hCQJcmIzPDxDEv2q.mjs → CL84-iL2QeKlLzo5.mjs} +2 -2
- package/browser/esm/{2mIwPy2D2JUX-9wx.mjs → CLkBe-6n-pStQhnz.mjs} +2 -2
- package/browser/esm/{DZiivy0NmO1Vnyzk.mjs → CPzfhTPX2Y4dHX2p.mjs} +2 -2
- package/browser/esm/{fXWUMDhZ5yMSO629.mjs → CSJuIjYUOE387FIP.mjs} +1 -1
- package/browser/esm/{BIHrHjRGWVlJglcp.mjs → Cdw0mGuoV3IU2LhR.mjs} +2 -2
- package/browser/esm/{yuhcOYw6SHQ-RCm3.mjs → Ced5uyofOWHuL_Jy.mjs} +30 -30
- package/browser/esm/{B3wf5vZCsWfWsDbj.mjs → Ci_LJ4S_GvYX0STI.mjs} +1 -1
- package/browser/esm/{DK899HhWX1HINMC1.mjs → CwygVKP_RXmne5Ot.mjs} +25 -25
- package/browser/esm/{BdCJNawfifyPupCP.mjs → D-mfK0noQrM2jZLT.mjs} +1 -1
- package/browser/esm/{CwOPLXU3-9ZHGyOT.mjs → D9SH_8v3FYCnxOFK.mjs} +1 -1
- package/browser/esm/{D9xNz46kAfXMZzp4.mjs → DPD8fop6az9HZNiK.mjs} +2 -2
- package/browser/esm/{D2RZh0O9neOsyLAE.mjs → DW-MmlgMH87l-_cw.mjs} +69 -48
- package/browser/esm/{DwZCT7DZiiXoTweg.mjs → DctIlUsO78-OU2ht.mjs} +2 -2
- package/browser/esm/DdcKkVb4jM6Y_epY.mjs +184 -0
- package/browser/esm/{Cxjxk0ncRKx80I-w.mjs → DfKzE0IY0TjaEIxG.mjs} +1 -1
- package/browser/esm/{BnC4-27Igwb8oDf2.mjs → DkloMquaR1pbZCER.mjs} +44 -43
- package/browser/esm/{BudSIfXBAsTxvu-K.mjs → Dz86-De57bv2VYIi.mjs} +10111 -9269
- package/browser/esm/{BTFBedJMRWGvZyCE.mjs → HApSgmV2FXRRwQac.mjs} +1 -1
- package/browser/esm/{Bt8_m94tBdks209L.mjs → IbVAQU4YqtFqLwYk.mjs} +1 -1
- package/browser/esm/index.mjs +482 -440
- package/browser/esm/mHQ95RAfxHzcUN2r.mjs +18 -0
- package/browser/esm/{CdEO8CEee6lEhabA.mjs → pm00uZZu_H3gxHFx.mjs} +2 -2
- package/browser/esm/{Bg5Di9GLNAkbqQ1P.mjs → quEvwgrEuOb0h3q-.mjs} +1926 -1298
- package/browser/esm/{CndRBvVfQUJIYRRj.mjs → zZngLMg6mg6nnNGX.mjs} +50 -50
- package/licenses/dependencies.txt +71 -1
- package/node/esm/{C14-R6tifRh7pc0p.mjs → -K4Cek-bTUItkB_8.mjs} +1 -1
- package/node/esm/{D3ptRKzASqBut1DE.mjs → -b8yNV4v9qiq8EMY.mjs} +2 -2
- package/node/esm/{CBuEu5Jk-LfaDy-H.mjs → 1V-m67YHbxmg3xk2.mjs} +44 -44
- package/node/esm/{DhTya_mhmN53vskv.mjs → 4ROAfJC1mokmqubv.mjs} +1 -1
- package/node/esm/B89et7t3uRmtxk4v.mjs +115 -0
- package/node/esm/BKBkCBNGhMU0nQdY.mjs +372 -0
- package/node/esm/{Vocy-I9dKzZMr0Ct.mjs → BQ2XqExomMceAjfe.mjs} +10977 -10744
- package/node/esm/{Btw4148Ot8ifhNc1.mjs → Bfg7qjCXCwXbzW3K.mjs} +1 -1
- package/node/esm/{BNXLOEddJ6O9gYws.mjs → BtMeAB_dqJnOfzJM.mjs} +2 -2
- package/node/esm/{Q_S1g46ZOTrdhTae.mjs → Byc_bxU_MdjYtt0x.mjs} +1 -1
- package/node/esm/{Ci_zLYmCD7e-C79O.mjs → Bzrl292TNCK3Cpid.mjs} +1 -1
- package/node/esm/{DdoiuKg9BKubtF1V.mjs → C0P9zspoypRAj7yv.mjs} +1 -1
- package/node/esm/{C_aL7CGS1lrNn1Ng.mjs → C9gpMN3galHGZyoK.mjs} +1 -1
- package/node/esm/CKCG2peOkTq0gIIW.mjs +310 -0
- package/node/esm/{C99zzq8DImQXi4BQ.mjs → CWBS90g3Hz-kQDkY.mjs} +10 -10
- package/node/esm/{BskP3b8vUoIOGLY6.mjs → CoGSVnn-hNMtTEus.mjs} +2 -2
- package/node/esm/{DhS6yWjrrSNIJMsn.mjs → CzrLqStvrcPE2-hb.mjs} +234 -225
- package/node/esm/{CRt3vXe6YmXzqk3H.mjs → D16EdlZG1hX5WUUK.mjs} +102 -102
- package/node/esm/{DUTmDHbFbhLDT4F3.mjs → D1mDga2K5sjs8y07.mjs} +1 -1
- package/node/esm/{D4ROK9UwDpS6jO3Z.mjs → D2jtztjE6c23RKvZ.mjs} +1 -1
- package/node/esm/{icn2nX5Z8e_3mNAv.mjs → D9nRcWsYk3M82iD8.mjs} +1 -1
- package/node/esm/{CG-qBU5BAaVz7e-P.mjs → DALYzTxZ9Ur9C69Q.mjs} +1 -1
- package/node/esm/{DrCf6ITcBhVOFpRj.mjs → DF0nL7s01dp7n0Bx.mjs} +7 -7
- package/node/esm/{BL2iiEoqxDEV2Xrg.mjs → DO5ldLqhTvIfPXLW.mjs} +3348 -2610
- package/node/esm/DQz8J8ci7EJdqbuB.mjs +351 -0
- package/node/esm/{CiIymQN6aJCul62g.mjs → DR2OQTKqqyIkZnse.mjs} +9 -9
- package/node/esm/{eimUGjiIP-b8HiM6.mjs → DSTLPBgpsGW6qP9e.mjs} +52 -52
- package/node/esm/{DV5CU37aEbFbWFL0.mjs → DiXp7KSOZUSWXaZ5.mjs} +1 -1
- package/node/esm/{C_xf5Bz30VqiJjXn.mjs → DwvXHsycOQR219c7.mjs} +1 -1
- package/node/esm/{B-HUPAcqvK0eeeCz.mjs → Hc6B04OyVzHx2F5I.mjs} +38 -37
- package/node/esm/{lGJ42sHqg5if2bba.mjs → NkPNHsq2T3DXg76x.mjs} +458 -458
- package/node/esm/{-TA0MneBDKdGhsib.mjs → Nl_IIkO1jbk0s9i-.mjs} +3329 -2852
- package/node/esm/{DxazKtROyaI51dWl.mjs → OQT5lGqq8a4r5xNa.mjs} +1 -1
- package/node/esm/OTaaFGhF-k_iwobp.mjs +18 -0
- package/node/esm/{pYtP7wPyS96NQyXS.mjs → Z1elC_roIu7LhceZ.mjs} +25 -25
- package/node/esm/{CkRYLed8Mmn3giNg.mjs → e3F3OVXCxLJrSukW.mjs} +2 -2
- package/node/esm/index.mjs +584 -540
- package/node/esm/{D8hO07ToAibIuniw.mjs → suOBVUz-pca6ilJH.mjs} +138 -136
- package/package.json +8 -6
- package/resources/contents.json +108 -0
- package/resources/fonts/aptos-bold-italic.hinted.json +125 -0
- package/resources/fonts/aptos-bold-italic.metrics.json +221 -0
- package/resources/fonts/aptos-bold-italic.rows.json +8 -0
- package/resources/fonts/aptos-bold.hinted.json +125 -0
- package/resources/fonts/aptos-bold.metrics.json +221 -0
- package/resources/fonts/aptos-bold.rows.json +8 -0
- package/resources/fonts/aptos-display-bold-italic.hinted.json +125 -0
- package/resources/fonts/aptos-display-bold-italic.metrics.json +221 -0
- package/resources/fonts/aptos-display-bold-italic.rows.json +8 -0
- package/resources/fonts/aptos-display-bold.hinted.json +125 -0
- package/resources/fonts/aptos-display-bold.metrics.json +221 -0
- package/resources/fonts/aptos-display-bold.rows.json +8 -0
- package/resources/fonts/aptos-display-italic.hinted.json +124 -0
- package/resources/fonts/aptos-display-italic.metrics.json +221 -0
- package/resources/fonts/aptos-display-italic.rows.json +8 -0
- package/resources/fonts/aptos-display-regular.hinted.json +125 -0
- package/resources/fonts/aptos-display-regular.metrics.json +221 -0
- package/resources/fonts/aptos-display-regular.rows.json +8 -0
- package/resources/fonts/aptos-italic.hinted.json +125 -0
- package/resources/fonts/aptos-italic.metrics.json +221 -0
- package/resources/fonts/aptos-italic.rows.json +8 -0
- package/resources/fonts/aptos-narrow-bold-italic.hinted.json +125 -0
- package/resources/fonts/aptos-narrow-bold-italic.metrics.json +221 -0
- package/resources/fonts/aptos-narrow-bold-italic.rows.json +8 -0
- package/resources/fonts/aptos-narrow-bold.hinted.json +125 -0
- package/resources/fonts/aptos-narrow-bold.metrics.json +221 -0
- package/resources/fonts/aptos-narrow-bold.rows.json +8 -0
- package/resources/fonts/aptos-narrow-italic.hinted.json +125 -0
- package/resources/fonts/aptos-narrow-italic.metrics.json +221 -0
- package/resources/fonts/aptos-narrow-italic.rows.json +8 -0
- package/resources/fonts/aptos-narrow-regular.hinted.json +125 -0
- package/resources/fonts/aptos-narrow-regular.metrics.json +221 -0
- package/resources/fonts/aptos-narrow-regular.rows.json +8 -0
- package/resources/fonts/aptos-regular.hinted.json +125 -0
- package/resources/fonts/aptos-regular.metrics.json +221 -0
- package/resources/fonts/aptos-regular.rows.json +8 -0
- package/resources/fonts/arial-bold-italic.rows.json +0 -1
- package/resources/fonts/arial-bold.rows.json +0 -1
- package/resources/fonts/arial-italic.rows.json +0 -1
- package/resources/fonts/arial-regular.rows.json +0 -1
- package/resources/fonts/calibri-bold-italic.rows.json +0 -1
- package/resources/fonts/calibri-bold.rows.json +0 -1
- package/resources/fonts/calibri-italic.rows.json +0 -1
- package/resources/fonts/calibri-regular.rows.json +0 -1
- package/resources/fonts/cambria-bold-italic.rows.json +0 -1
- package/resources/fonts/cambria-bold.rows.json +0 -1
- package/resources/fonts/cambria-italic.rows.json +0 -1
- package/resources/fonts/cambria-regular.rows.json +0 -1
- package/resources/fonts/contents.json +240 -0
- package/resources/fonts/courier-new-bold-italic.rows.json +0 -1
- package/resources/fonts/courier-new-bold.rows.json +0 -1
- package/resources/fonts/courier-new-italic.rows.json +0 -1
- package/resources/fonts/courier-new-regular.rows.json +0 -1
- package/resources/fonts/times-new-roman-bold-italic.rows.json +0 -1
- package/resources/fonts/times-new-roman-bold.rows.json +0 -1
- package/resources/fonts/times-new-roman-italic.rows.json +0 -1
- package/resources/fonts/times-new-roman-regular.rows.json +0 -1
- package/resources/locales/de/model.msg.json +4 -0
- package/resources/locales/en/model.msg.json +4 -0
- package/types/scripting-api.json +9339 -9320
- package/types/scripting.d.ts +322 -200
- package/types/src/.generated/wasm/sdk.d.ts +5 -27
- package/types/src/address/AddressUtils.d.ts +8 -0
- package/types/src/address/_SheetNameQuoteChars.d.ts +3 -0
- package/types/src/anomalies/_FocusTable.d.ts +0 -6
- package/types/src/calculation/Calculation.d.ts +20 -95
- package/types/src/calculation/ExternalBookBindings.d.ts +0 -26
- package/types/src/calculation/NamedFormulaCollection.d.ts +6 -2
- package/types/src/calculation/TokenType.d.ts +0 -10
- package/types/src/calculation/_CloneBoundary.d.ts +0 -24
- package/types/src/calculation/_FormulaToolkit.d.ts +0 -5
- package/types/src/calculation/compiler/ASTTypes.d.ts +0 -13
- package/types/src/calculation/compiler/CompilerUtils.d.ts +0 -227
- package/types/src/calculation/compiler/FormulaLexer.d.ts +0 -8
- package/types/src/calculation/compiler/FormulaParser.d.ts +0 -61
- package/types/src/calculation/compiler/ParserUtils.d.ts +0 -24
- package/types/src/calculation/compiler/Types.d.ts +0 -52
- package/types/src/calculation/engine/CalcBackend.d.ts +15 -157
- package/types/src/calculation/engine/index.d.ts +0 -8
- package/types/src/calculation/executor/CalcExecutor.d.ts +13 -130
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +30 -11
- package/types/src/calculation/executor/CircularReference.d.ts +0 -17
- package/types/src/calculation/executor/_BlockOrder.d.ts +29 -0
- package/types/src/calculation/executor/_WhatIf.d.ts +0 -19
- package/types/src/calculation/formula/FormulaBlock.d.ts +0 -28
- package/types/src/calculation/formula/FormulaRecordView.d.ts +0 -15
- package/types/src/calculation/formula/IFormulaBlock.d.ts +0 -12
- package/types/src/calculation/formula/LambdaValue.d.ts +0 -15
- package/types/src/calculation/formula/TokenUtils.d.ts +1 -8
- package/types/src/calculation/grid/CalcGrid.d.ts +5 -59
- package/types/src/calculation/grid/CalcGridBackend.d.ts +8 -9
- package/types/src/calculation/grid/CalcGridProxy.d.ts +0 -13
- package/types/src/calculation/grid/CalcGridUtils.d.ts +18 -22
- package/types/src/calculation/grid/ICalcGrid.d.ts +13 -98
- package/types/src/calculation/grid/_CalcRequest.d.ts +1 -29
- package/types/src/calculation/spatial/CircularEntry.d.ts +0 -10
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +52 -82
- package/types/src/calculation/spatial/SpillEntry.d.ts +10 -7
- package/types/src/calculation/state/CalcScope.d.ts +0 -9
- package/types/src/calculation/state/CalcState.d.ts +0 -12
- package/types/src/calculation/state/CalculationContext.d.ts +4 -37
- package/types/src/calculation/state/DeferredCalls.d.ts +11 -64
- package/types/src/calculation/state/IContextContainer.d.ts +4 -60
- package/types/src/calculation/state/_KeepBlanks.d.ts +5 -0
- package/types/src/calculation/state/_PendingOverlayGrid.d.ts +46 -33
- package/types/src/calculation/state/_WhatIfLayer.d.ts +0 -14
- package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +0 -42
- package/types/src/calculation/symbol/ISymbolRegistry.d.ts +0 -6
- package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +0 -12
- package/types/src/calculation/symbol/SymbolRegistry.d.ts +0 -9
- package/types/src/calculation/toolkit/index.d.ts +0 -8
- package/types/src/cell/ICell.d.ts +14 -28
- package/types/src/cellRange/ICellRange.d.ts +22 -11
- package/types/src/chart/Chart.d.ts +0 -16
- package/types/src/chart/_ChartParts.d.ts +0 -39
- package/types/src/chart/_ChartSource.d.ts +0 -14
- package/types/src/chart/createChart.d.ts +1 -1
- package/types/src/chart/kinds/ChartKind.d.ts +4 -4
- package/types/src/chart/kinds/_Placeholder.d.ts +0 -1
- package/types/src/chart/layout/TextMeasurer.d.ts +0 -20
- package/types/src/chart/layout/_LayoutUtils.d.ts +0 -16
- package/types/src/chart/math/BoxStats.d.ts +0 -8
- package/types/src/chart/math/DateUnitCalcs.d.ts +0 -10
- package/types/src/chart/math/Histogram.d.ts +0 -17
- package/types/src/chart/math/OrdUnitCalcs.d.ts +0 -53
- package/types/src/chart/math/Treemap.d.ts +0 -15
- package/types/src/chart/math/Trendlines.d.ts +0 -8
- package/types/src/chart/math/UnitCalcs.d.ts +0 -22
- package/types/src/chart/model/_Edits.d.ts +0 -33
- package/types/src/chart/model/_Grouping.d.ts +0 -25
- package/types/src/chart/model/_Inference.d.ts +0 -18
- package/types/src/chart/model/_NewChart.d.ts +0 -41
- package/types/src/chart/model/_OfPie.d.ts +0 -7
- package/types/src/chart/resolve/_LegacyStyles.d.ts +0 -20
- package/types/src/chart/resolve/_Resolve.d.ts +0 -19
- package/types/src/chart/resolve/_ResolvedChart.d.ts +0 -6
- package/types/src/collections/_GridUtils.d.ts +0 -10
- package/types/src/comment/_NoteBox.d.ts +0 -15
- package/types/src/condition/AnchoredConditional.d.ts +1 -23
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +0 -49
- package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +0 -10
- package/types/src/condition/ICondition.d.ts +2 -2
- package/types/src/condition/_ConditionUtils.d.ts +0 -38
- package/types/src/externalBook/ExternalBookCollection.d.ts +0 -15
- package/types/src/externalBook/ExternalBookName.d.ts +2 -3
- package/types/src/externalBook/IExternalBook.d.ts +13 -14
- package/types/src/fetch/IFetcher.d.ts +2 -1
- package/types/src/fetch/_WorkbookFetch.d.ts +1 -1
- package/types/src/font/AdvanceTable.d.ts +16 -42
- package/types/src/font/IFont.d.ts +32 -9
- package/types/src/font/TableFileAdvanceBuilder.d.ts +6 -3
- package/types/src/font/_FontUtils.d.ts +0 -8
- package/types/src/font/_StandIns.d.ts +33 -0
- package/types/src/io/IWorkbookIO.d.ts +3 -3
- package/types/src/io/WorkbookOrigin.d.ts +2 -2
- package/types/src/license/LicenseManager.d.ts +2 -1
- package/types/src/license/_Utils.d.ts +4 -3
- package/types/src/license/details.d.ts +3 -1
- package/types/src/license/keys.d.ts +6 -0
- package/types/src/license/license-key.d.ts +15 -33
- package/types/src/license/token.d.ts +55 -0
- package/types/src/picture/IPicture.d.ts +45 -0
- package/types/src/picture/Picture.d.ts +12 -0
- package/types/src/pivot/PivotTable.d.ts +0 -7
- package/types/src/primitives/AsyncValue.d.ts +0 -12
- package/types/src/primitives/PrimitiveUtils.d.ts +1 -110
- package/types/src/primitives/Range.d.ts +0 -60
- package/types/src/primitives/ScalarCollation.d.ts +0 -106
- package/types/src/primitives/stats/AggregateStats.d.ts +0 -19
- package/types/src/print/PageLayout.d.ts +0 -6
- package/types/src/reference/ReferenceUtils.d.ts +4 -2
- package/types/src/richData/RichDataRegistry.d.ts +6 -0
- package/types/src/scripting/TypedFunction.d.ts +0 -109
- package/types/src/sheet/IWorksheet.d.ts +2 -5
- package/types/src/sheet/NamedCellRange.d.ts +0 -21
- package/types/src/sheet/SheetCell.d.ts +8 -2
- package/types/src/sheet/Worksheet.d.ts +7 -48
- package/types/src/sheet/_DelimitedText.d.ts +13 -0
- package/types/src/sheet/_IgnoredErrors.d.ts +0 -12
- package/types/src/sheet/_ScalarListFactory.d.ts +0 -19
- package/types/src/sheet/_SheetCoords.d.ts +0 -7
- package/types/src/sheet/_SheetFilterUtils.d.ts +0 -8
- package/types/src/sheet/_SheetStateReader.d.ts +0 -10
- package/types/src/sheet/_SheetStateTypes.d.ts +0 -3
- package/types/src/sheet/_SheetUtils.d.ts +1 -1
- package/types/src/sheet/style/_RowLine.d.ts +32 -0
- package/types/src/sheet/style/_StyleUtils.d.ts +6 -14
- package/types/src/sheetView/_SheetViewUtils.d.ts +0 -1
- package/types/src/slicer/_BuiltInSlicerStyles.d.ts +0 -5
- package/types/src/style/ICellStyle.d.ts +4 -0
- package/types/src/table/AnchoredTable.d.ts +0 -147
- package/types/src/text/TextFrame.d.ts +4 -1
- package/types/src/text/TextStacked.d.ts +0 -24
- package/types/src/text/TextWrapper.d.ts +3 -5
- package/types/src/text/_LineBox.d.ts +24 -0
- package/types/src/text/_TextUtils.d.ts +5 -2
- package/types/src/text/_TextWrapperFallback.d.ts +2 -1
- package/types/src/wasm/sdkWasm.d.ts +1 -1
- package/types/src/workbook/Workbook.d.ts +0 -10
- package/browser/esm/2WuhYrIpYmOR5H73.mjs +0 -698
- package/browser/esm/CTe2qfmIUEad6FJv.mjs +0 -199
- package/browser/esm/CfRqiPDg6RBTg1EN.mjs +0 -367
- package/browser/esm/DVroRnhi-5IDXNgM.mjs +0 -210
- package/node/esm/BSvOluusoDM4z_dx.mjs +0 -811
- package/node/esm/CPI58duc0j0a-HpJ.mjs +0 -115
- package/node/esm/DggQ23jKMpwhENfa.mjs +0 -372
- package/node/esm/Dn1M7YWi25DeeYUb.mjs +0 -210
- package/node/esm/ZXPFcsT2zrALCZux.mjs +0 -289
|
@@ -105,54 +105,7 @@ export declare function qualifyStructuredRefs(ast: ASTNode): ASTNode;
|
|
|
105
105
|
* @returns A new AST (structurally shared where unchanged).
|
|
106
106
|
*/
|
|
107
107
|
export declare function reorderStructuredRefItems(ast: ASTNode): ASTNode;
|
|
108
|
-
/**
|
|
109
|
-
* Annotates every call node with its implicit-intersection MODE (DESIGN-IMPLICIT-INTERSECTION §2,
|
|
110
|
-
* measured on Excel 16.0 by `probe-ii-propagation{,2,3}.ps1`): `true` is VALUE mode, where a
|
|
111
|
-
* multi-cell reference at a single-value slot intersects with the formula cell; `false` is ARRAY
|
|
112
|
-
* mode, where it reads its first cell. The mode is INHERITED — a call evaluates its arguments in
|
|
113
|
-
* the mode it was given — and set at four places only:
|
|
114
|
-
*
|
|
115
|
-
* - the root: array mode when the root expression is statically array-valued (`=LINEST(..)`,
|
|
116
|
-
* `=TRANSPOSE(..)`, `=A1:A3+0`), value mode when it is scalar (`=SUM(..)`, `=INDEX(..,1,1)`);
|
|
117
|
-
* - an operand of an operator, or the argument at a lifting scalar slot, when that operand is
|
|
118
|
-
* array-valued (the lift needs the whole array);
|
|
119
|
-
* - a `LAMBDA` body, always;
|
|
120
|
-
* - an array-entered block, at evaluation (`CalculationContext.isImplicitIntersect`).
|
|
121
|
-
*
|
|
122
|
-
* A LEGACY (pre-dynamic-array) formula skips all four: its WHOLE tree is value mode, which is the
|
|
123
|
-
* era's own regime (DESIGN-IMPLICIT-INTERSECTION §2, `probe-ii-propagation3.ps1` §I —
|
|
124
|
-
* `=SUM(LINEST(y,x,ref)+0)` intersects in a legacy cell where the operator would otherwise give
|
|
125
|
-
* the call array mode). It changes the answer for the LINEST family's logical slots ALONE: every
|
|
126
|
-
* other legacy site Excel spells with an `@`, which the reader's transform has already inserted,
|
|
127
|
-
* and the two slots that take no `@` either read their first cell in both eras (`N`, `T`) or
|
|
128
|
-
* intersect in both (`AGGREGATE`'s `k`).
|
|
129
|
-
*
|
|
130
|
-
* "Array-valued" is static: a range or array literal, a call whose declared return is an array or
|
|
131
|
-
* a reference, an operator over one, a pass-through (`IF`, `IFERROR`, …) over one, `INDEX` with a
|
|
132
|
-
* zero, empty or array index, a name or a lambda application (unknown, so array — what Excel does
|
|
133
|
-
* at the root). The two runtime refinements Excel makes (`INDEX` on a CELL holding 0, and a
|
|
134
|
-
* defined name taking the mode of its reference site) are not modelled here.
|
|
135
|
-
*/
|
|
136
108
|
export declare function annotateImplicitIntersect(root: ASTNode, getFunction: ((name: string) => IFunction | null) | null | undefined, legacy?: boolean): void;
|
|
137
|
-
/**
|
|
138
|
-
* Annotates the nodes whose result is read only at element `[0,0]` when the formula is evaluated
|
|
139
|
-
* under a first-cell demand (DESIGN-LIFT-AND-DEMAND §2, PLAN-CF-BODY-DEMAND step 3): the body of a
|
|
140
|
-
* block whose every cell is its own 1x1 array-entered extent, which is how Excel evaluates a
|
|
141
|
-
* conditional-format formula.
|
|
142
|
-
*
|
|
143
|
-
* @remarks
|
|
144
|
-
* The demand starts at the root and is INHERITED through elementwise positions only — an operator
|
|
145
|
-
* that is not a reference operator, a one-element paren, a lifting scalar slot, an `any` slot
|
|
146
|
-
* (`IF`/`IFS`/`SWITCH`/`CHOOSE` arms, which size and sample in the lift), a `LET` body. At each of
|
|
147
|
-
* those `[0,0]` of the output depends only on `[0,0]` of each operand, and `(0,0)` is never a pad,
|
|
148
|
-
* so computing one element is computing `[0,0]`. It stops (`false`) at every other position: a
|
|
149
|
-
* range, array, reference-only, lambda or flattened slot takes its argument whole (`SUM` still sees
|
|
150
|
-
* the array), and so do a reference operator, `@`, a name, a lambda body and a `LET` binding (a
|
|
151
|
-
* binding may be read under an aggregate).
|
|
152
|
-
*
|
|
153
|
-
* Idempotent and a property of the tree alone, so a compiled formula shared by several blocks
|
|
154
|
-
* carries it harmlessly: nothing reads it unless the block evaluating the formula demands it.
|
|
155
|
-
*/
|
|
156
109
|
export declare function annotateFirstCell(root: ASTNode, getFunction: ((name: string) => IFunction | null) | null | undefined): void;
|
|
157
110
|
/**
|
|
158
111
|
* The formula with every POSITION TEST replaced by `TRUE` and by `FALSE`, in every combination:
|
|
@@ -192,156 +145,11 @@ export declare const rangesOperators: readonly string[];
|
|
|
192
145
|
* Used to determine is a node is a range node for writing dynamic arrays to Excel
|
|
193
146
|
*/
|
|
194
147
|
export declare const isRangedNode: (node: ASTNode) => boolean;
|
|
195
|
-
/**
|
|
196
|
-
* Finds an implicit-intersection operand that cannot possibly be a reference, or `null` if the
|
|
197
|
-
* formula has none.
|
|
198
|
-
*
|
|
199
|
-
* @param root The root of the formula's AST.
|
|
200
|
-
* @param getFunction Resolves a function's stableId to its declaration, or `null`.
|
|
201
|
-
*
|
|
202
|
-
* @remarks
|
|
203
|
-
* Implicit intersection (the whitespace operator) is defined over LOCATIONS — `A1:A10 B1:B10` is
|
|
204
|
-
* the cells they have in common. Handing it something that computes a value is not a runtime
|
|
205
|
-
* failure, it is a formula that never had a meaning, and Excel refuses the entry outright rather
|
|
206
|
-
* than evaluating it (verified against Excel 16.0 by
|
|
207
|
-
* `spreadsheetbench/formula-tests/probe-space-paren.ps1`, which walks the operand kinds:
|
|
208
|
-
* `INDEX(...)` — reference-returning — is accepted on both sides, `RANDBETWEEN(...)`, `(3)`,
|
|
209
|
-
* `(H1:H5+0)` and `TRUE` are all rejected).
|
|
210
|
-
*
|
|
211
|
-
* This matters most for a formula that LOOKS like a function call: `=SEQUENCE (3)` is not a call at
|
|
212
|
-
* all, because the space keeps the `(` from binding to the name — it is the name `SEQUENCE`
|
|
213
|
-
* intersected with `(3)`. Left to evaluate, the answer depended on what the operands happened to
|
|
214
|
-
* lex as, so one typo produced #NAME?, #REF! or #NULL! for the same mistake.
|
|
215
|
-
*
|
|
216
|
-
* The one place we knowingly diverge from Excel: when the LEFT operand is a built-in function name
|
|
217
|
-
* (`=SUM (H1:H5)`), Excel rejects it because `SUM` is reserved and cannot be a name, while we let it
|
|
218
|
-
* resolve and report #NAME?. Recognizing that case needs a function table at PARSE time, which the
|
|
219
|
-
* parse path has no access to — and "SUM is not a defined name" is an honest answer.
|
|
220
|
-
*/
|
|
221
148
|
export declare const findNonReferenceIntersectionOperand: (root: ASTNode, getFunction: ((name: string) => IFunction | null) | null) => ASTNode | null;
|
|
222
|
-
/**
|
|
223
|
-
* Finds a spill-anchor (`#`) operand that cannot possibly be a reference, or `null` if the formula
|
|
224
|
-
* has none.
|
|
225
|
-
*
|
|
226
|
-
* @param root The root of the formula's AST.
|
|
227
|
-
* @param getFunction Resolves a function's stableId to its declaration, or `null`.
|
|
228
|
-
*
|
|
229
|
-
* @remarks
|
|
230
|
-
* The anchor answers "where did the formula anchored HERE put its result", so its operand is a
|
|
231
|
-
* location, never a value — Excel's own declaration is `ANCHORARRAY(Range) -> Range|Array`. An
|
|
232
|
-
* operand that provably computes a value is refused at ENTRY, the same verdict (and the same
|
|
233
|
-
* predicate — {@link isDefinitelyNotReferenceNode}) as the intersection operand beside it.
|
|
234
|
-
*
|
|
235
|
-
* Measured against Excel 16.0 desktop (`spreadsheetbench/formula-tests/probe-anchor.ps1`): `=5#`,
|
|
236
|
-
* `={1,2}#` and `=SUM(X1:X3)#` cannot be typed at all, while a reference-returning call
|
|
237
|
-
* (`=INDEX(X1:X3,1)#`, `=OFFSET(B3,0,0)#`) is accepted. A NAME is accepted too — what it resolves
|
|
238
|
-
* to is not knowable here — and answers `#VALUE!` when it turns out to hold a constant, which is
|
|
239
|
-
* the runtime half of this same rule.
|
|
240
|
-
*/
|
|
241
149
|
export declare const findNonReferenceAnchorOperand: (root: ASTNode, getFunction: ((name: string) => IFunction | null) | null) => ASTNode | null;
|
|
242
|
-
/**
|
|
243
|
-
* Finds an array constant whose rows are not all the same length — a JAGGED literal such as
|
|
244
|
-
* `{1,2;3}`.
|
|
245
|
-
*
|
|
246
|
-
* @param root The root of the formula's AST.
|
|
247
|
-
* @returns A human-readable description of the first jagged array, or `null`.
|
|
248
|
-
*
|
|
249
|
-
* @remarks
|
|
250
|
-
* **An array constant is rectangular, or it is not a formula.** Excel refuses a jagged one at
|
|
251
|
-
* ENTRY; it does not pad the short row with `#N/A`. The refusal is about SHAPE alone — neither
|
|
252
|
-
* content nor position changes it. Measured against Excel 16.0
|
|
253
|
-
* (`spreadsheetbench/formula-tests/probe-jagged-array.ps1`): `{1,2;3}`, `{1;2,3}`, `{1,2;3;4,5}`,
|
|
254
|
-
* `{1,2;3,4,5}`, `{"a","b";"c"}`, `{TRUE,FALSE;TRUE}`, `{#REF!,1;2}`, `SUM({1,2;3})`,
|
|
255
|
-
* `SUM(1,{1,2;3})`, `{1,2;3}+1` and `INDEX({1,2;3},1,1)` are all refused, while every rectangular
|
|
256
|
-
* control (`{1}`, `{1,2,3}`, `{1;2;3}`, `{1,2;3,4}`, `{1,2;3,4;5,6}`) is accepted and spills to
|
|
257
|
-
* exactly its written shape.
|
|
258
|
-
*
|
|
259
|
-
* Deciding it HERE rather than at evaluation is the same lesson as `findArityViolation`, and for a
|
|
260
|
-
* sharper reason: accepting a jagged literal is not a harmless superset, because the writer emits
|
|
261
|
-
* whatever parsed. A jagged `<f>` ON DISK makes the workbook UNOPENABLE — Excel declines the whole
|
|
262
|
-
* file rather than repairing the one cell (`probe-jagged-array2.ps1` patches `{1,2;3}` into an
|
|
263
|
-
* otherwise healthy saved sheet, after which `Workbooks.Open` fails outright while the unpatched
|
|
264
|
-
* seed opens fine). So this is a roundtrip guard, not merely entry parity.
|
|
265
|
-
*
|
|
266
|
-
* Reported here rather than in `FormulaParser._ruleLiteralArray` because on an Array node
|
|
267
|
-
* `error` already MEANS "the closing brace was never consumed" — `CompilerUtils`' token emitter
|
|
268
|
-
* suppresses the `}` when it is set. Since a parse-errored formula re-images from its tokens,
|
|
269
|
-
* flagging the node would silently rewrite the user's text to `={1,2;3`.
|
|
270
|
-
*/
|
|
271
150
|
export declare const findJaggedArrayLiteral: (root: ASTNode) => string | null;
|
|
272
|
-
/**
|
|
273
|
-
* Finds a call whose ARGUMENT COUNT the declaration cannot accept — too many, or a required
|
|
274
|
-
* parameter with no argument.
|
|
275
|
-
*
|
|
276
|
-
* @param root The root of the formula's AST.
|
|
277
|
-
* @param getFunction Resolves a function name to its declaration; `null` disables the check.
|
|
278
|
-
* @returns A human-readable description of the first violation, or `null`.
|
|
279
|
-
*
|
|
280
|
-
* @remarks
|
|
281
|
-
* Arity is decidable from the AST — argument count from the call, declared arity from the
|
|
282
|
-
* registry — so by the "only the compiler emits `#PARSE!`" rule it belongs here. Excel agrees:
|
|
283
|
-
* `=IMAGE()` with too few arguments cannot be typed in at all.
|
|
284
|
-
*
|
|
285
|
-
* **This is the "when" half of CALC-ISSUES item 29, and it converts a silent failure into a
|
|
286
|
-
* loud one.** Previously arity was checked during EVALUATION (`TypedFunction`'s
|
|
287
|
-
* `RuntimeError.ARGS_TOO_MANY` / `PARAM_MISSING`), which raised `#PARSE!` at calc time —
|
|
288
|
-
* and `#PARSE!` is precisely what `WorksheetEmitter` refuses to write, so the cell was
|
|
289
|
-
* downgraded to a literal string and the formula vanished on save with no warning. Deciding
|
|
290
|
-
* it at compile time surfaces it where the user is typing.
|
|
291
|
-
*
|
|
292
|
-
* It does NOT fix a WRONG declaration: an arity stricter than Excel's still rejects a legal
|
|
293
|
-
* call, just earlier. That is the other half of item 29 and needs the COM sweep. The runtime
|
|
294
|
-
* checks stay as a backstop for paths that never compile (`IFunction.execute`, item 35).
|
|
295
|
-
*/
|
|
296
151
|
export declare const findArityViolation: (root: ASTNode, getFunction: ((name: string) => IFunction | null) | null) => string | null;
|
|
297
|
-
/**
|
|
298
|
-
* Finds an argument that is STATICALLY KNOWN to compute a value sitting in a reference-only
|
|
299
|
-
* (`r:'p'`) parameter — `COLUMN(1)`, `OFFSET(ABS(A1),1,1)`, `SUBTOTAL(9,A1+0)`.
|
|
300
|
-
*
|
|
301
|
-
* @param root The root of the formula's AST.
|
|
302
|
-
* @param getFunction Resolves a function name to its declaration; `null` disables the check.
|
|
303
|
-
* @returns The offending argument node, or `null`.
|
|
304
|
-
*
|
|
305
|
-
* @remarks
|
|
306
|
-
* **Excel decides this at ENTRY, and so must we** (measured over 34 operand kinds x
|
|
307
|
-
* `OFFSET`/`COLUMN`, `spreadsheetbench/formula-tests/probe-ref-slot-entry-boundary.ps1`; both
|
|
308
|
-
* outers agree on every row, so this is the SLOT's rule, not one function's validation). Excel
|
|
309
|
-
* has two channels: what it can PROVE is not a reference is refused outright and the formula
|
|
310
|
-
* cannot exist; what it cannot prove is accepted and fails at evaluation with `#VALUE!`. Excel
|
|
311
|
-
* Online persists a refused formula as a literal STRING — measured in a user-authored
|
|
312
|
-
* `error-offset.xlsx`, where `=OFFSET(ABS(a1),1,1)` came back as `<c t="s">` while
|
|
313
|
-
* `=OFFSET(IF(TRUE,1),1,1)` came back as a real `<f>` with a cached `#VALUE!`.
|
|
314
|
-
*
|
|
315
|
-
* Deciding it HERE is what makes that faithful. Previously the runtime guessed from the value's
|
|
316
|
-
* shape and could not tell `IF(TRUE,1)` from a typed `1` once both were the number 1, so it
|
|
317
|
-
* answered `#PARSE!` for a formula Excel accepts — and `#PARSE!` is exactly what
|
|
318
|
-
* `WorksheetEmitter` refuses to write, so the cell was saved as text and the formula was lost.
|
|
319
|
-
*
|
|
320
|
-
* The provability test is the callee's declared RETURN: a scalar return proves it (`ABS`, `SUM`,
|
|
321
|
-
* `IFERROR`), a ranged return does not (`IF`, `CHOOSE`, `INDEX`). Note a ranged return is
|
|
322
|
-
* currently ambiguous between "array" (`SEQUENCE`, `FILTER` — Excel refuses these) and
|
|
323
|
-
* "may be a reference" (`IF`, `INDEX` — Excel accepts), so we are deliberately PERMISSIVE there:
|
|
324
|
-
* those cases keep today's behavioral and stay reachable only by hand, never from an
|
|
325
|
-
* Excel-authored file. Splitting them needs a distinct `unknown` return type (CALC-ISSUES 39).
|
|
326
|
-
*/
|
|
327
152
|
export declare const findValueInReferenceOnlySlot: (root: ASTNode, getFunction: ((name: string) => IFunction | null) | null) => ASTNode | null;
|
|
328
|
-
/**
|
|
329
|
-
* Finds a `Call` whose callee is STATICALLY KNOWN to produce a value — `=SUM(2)(3)`, `=3(1)`,
|
|
330
|
-
* `="x"(1)`, `={1,2}(1)`, `=(1+1)(3)` — which Excel refuses at ENTRY.
|
|
331
|
-
*
|
|
332
|
-
* @param root The root of the formula's AST.
|
|
333
|
-
* @param getFunction Resolves a function name to its declaration; `null` disables the check.
|
|
334
|
-
* @returns The first violation's message, or `null`.
|
|
335
|
-
*
|
|
336
|
-
* @remarks
|
|
337
|
-
* The application design's one rule (§3.1, measured over 34 operands run through BOTH slots):
|
|
338
|
-
* the callee slot and the intersection slot share a single predicate — the operand's declared
|
|
339
|
-
* return must not be provably a value. So this is {@link isDefinitelyNotReferenceNode} asked at a
|
|
340
|
-
* `Call` node's `inputs[0]`, nothing more: a lambda-returning declaration passes (`getLambda()`),
|
|
341
|
-
* an untyped one passes (`IF(TRUE,1,2)(3)` is accepted and fails at runtime — the decisive probe
|
|
342
|
-
* row: no flow analysis, no constant folding), a reference passes (`=A1(3)` is a runtime `#REF!`),
|
|
343
|
-
* and only a provable value is refused.
|
|
344
|
-
*/
|
|
345
153
|
export declare const findInvalidCallee: (root: ASTNode, getFunction: ((name: string) => IFunction | null) | null) => string | null;
|
|
346
154
|
/**
|
|
347
155
|
* Rewrites every call to an UNKNOWN function into a name application —
|
|
@@ -379,41 +187,6 @@ export declare function appendBound(bound: readonly ICalculation.BoundName[] | u
|
|
|
379
187
|
*/
|
|
380
188
|
export declare function lambdaParamsOf(node: ASTNode | undefined): ICalculation.BoundName['params'];
|
|
381
189
|
export declare function bindScopes(root: ASTNode, getFunction?: ((name: string) => IFunction | null) | null): ASTNode;
|
|
382
|
-
/**
|
|
383
|
-
* Re-reads every REFERENCE token in the formula as a NAME, when any `LET`/`LAMBDA` declaration
|
|
384
|
-
* position is a cell reference.
|
|
385
|
-
*
|
|
386
|
-
* @param root The parsed AST.
|
|
387
|
-
* @param getFunction Resolves a function name to its declaration; see {@link _binderKind}.
|
|
388
|
-
* @returns A new root, the SAME root when no declaration is reference-shaped, or a MESSAGE when
|
|
389
|
-
* the formula has to be refused at entry.
|
|
390
|
-
*
|
|
391
|
-
* @remarks
|
|
392
|
-
* `LET(A1,7,A1)` is 7 in Excel, and the consequence is far wider than the name that caused it:
|
|
393
|
-
* ONE reference-shaped declaration anywhere in a formula stops EVERY A1-style token in that
|
|
394
|
-
* formula from reading as a cell. It is not a scope rule and not a shadow — the switch covers the
|
|
395
|
-
* whole formula text, measured in every direction (probe-let-ref-names.ps1):
|
|
396
|
-
*
|
|
397
|
-
* | formula | Excel |
|
|
398
|
-
* | --- | --- |
|
|
399
|
-
* | `LET(BA1,7,BA1)` | 7 — the declaration resolves |
|
|
400
|
-
* | `LET(BA1,7,BA2)` | `#NAME?` — a token bound nowhere no longer names a cell |
|
|
401
|
-
* | `LET(BA1,BA2,BA1)` | `#NAME?` — the declaration's OWN value expression is included |
|
|
402
|
-
* | `BA2+LET(BA1,7,BA1)` | `#NAME?` — so is text BEFORE the `LET`, outside it |
|
|
403
|
-
* | `LET(BA1,7,BA1)+LET(q,1,q+BA2)` | `#NAME?` — and an unrelated SIBLING scope |
|
|
404
|
-
* | `LET(BA1,7,BA2,9,BA1+BA2)` | 16 — two declarations, both resolving |
|
|
405
|
-
* | `LET(BA1,7,BA2,9,SUM(BA1:BA2))` | `#VALUE!` — `7:9`, the range OPERATOR over two values |
|
|
406
|
-
*
|
|
407
|
-
* Excel refuses to create a defined name that looks like a cell reference, so a re-read token can
|
|
408
|
-
* only resolve to a `LET`/`LAMBDA` declaration; everything else is `#NAME?`, which is what the
|
|
409
|
-
* ordinary resolver answers once the node is a name. That is why this pass has no resolution of
|
|
410
|
-
* its own — it changes what the tokens ARE and lets `bindScopes` and the resolver do the rest.
|
|
411
|
-
*
|
|
412
|
-
* The one entry refusal is `$`: a name cannot contain one, so under the switch any `$` in an
|
|
413
|
-
* A1-style token makes the formula untypeable — in a declaration or in a use, on one axis or both
|
|
414
|
-
* (`LET(BA1,7,BA1+$BA$2)`, `LET(BA1,7,BA1+BA$2)`, `LET($BA$1,7,$BA$1)`;
|
|
415
|
-
* probe-let-ref-names2.ps1 §B).
|
|
416
|
-
*/
|
|
417
190
|
export declare const retypeReferenceBinders: (root: ASTNode, getFunction?: ((name: string) => IFunction | null) | null) => ASTNode | string;
|
|
418
191
|
/**
|
|
419
192
|
* Finds a malformed `LET`/`LAMBDA` scope — a shape Excel refuses at ENTRY.
|
|
@@ -67,14 +67,6 @@ export declare class FormulaLexer {
|
|
|
67
67
|
getLocale(): CompilerLocale;
|
|
68
68
|
/** The last valid column (1-based) — `A1`/`AC` beyond it lex as a name, not a reference. */
|
|
69
69
|
getMaxColumn(): number;
|
|
70
|
-
/**
|
|
71
|
-
* The last valid row (1-based).
|
|
72
|
-
*
|
|
73
|
-
* The cell matcher applies this itself (`A1048577` falls through to a NAME), but a whole-row
|
|
74
|
-
* operand cannot: a bare digit run lexes as a NUMBER, and only the parser knows it sits beside a
|
|
75
|
-
* range operator. The parser reads this to bound that conversion — Excel refuses `1:1048577` and
|
|
76
|
-
* `0:1` outright (`spreadsheetbench/formula-tests/probe-mixed-range-operand4.ps1`).
|
|
77
|
-
*/
|
|
78
70
|
getMaxRow(): number;
|
|
79
71
|
/**
|
|
80
72
|
* The fully-resolved separators this lexer tokenizes with. The parser reads `separatorDecimal`
|
|
@@ -107,68 +107,7 @@ export declare class FormulaParser extends EmbeddedActionsParser {
|
|
|
107
107
|
* highest precedence). Were the operand the leaf, `-` would grab `A1` first and leave a stray `:`.
|
|
108
108
|
*/
|
|
109
109
|
protected _rulePrefixOp: import('chevrotain').ParserMethod<[], ASTNode<TokenType, any>>;
|
|
110
|
-
/**
|
|
111
|
-
* Folds the range operators (`:` range, `.:.` / `.:` / `:.` range-trim) and the spill anchor `#` —
|
|
112
|
-
* Excel's highest-precedence operators, binding tighter than the unary prefixes (`_rulePrefixOp`).
|
|
113
|
-
* Left-associative, single level (`A1:B2:C3` = `(A1:B2):C3`); every operator produces a reference
|
|
114
|
-
* node (`isRange = true`) so the whole span resolves to one reference. This rule sits just above the
|
|
115
|
-
* `_ruleCallOp` leaf.
|
|
116
|
-
*
|
|
117
|
-
* ── Why `#` is folded HERE, with the range operators ─────────────────────────────────────────
|
|
118
|
-
*
|
|
119
|
-
* The anchor is a postfix over the reference accumulated SO FAR, not over the primary in front of
|
|
120
|
-
* it: `A1:B2#` is `(A1:B2)#`, whose operand is a multi-cell reference — `#REF!` in Excel. What a
|
|
121
|
-
* `#` before the operator anchors is only its own operand, because that is all that has
|
|
122
|
-
* accumulated yet — `B3#:B1` is `(B3#):B1`, the rectangle spanning B1 and the whole of B3's spill.
|
|
123
|
-
*
|
|
124
|
-
* Measured against Excel 16.0 desktop (`spreadsheetbench/formula-tests/probe-anchor.ps1`); the
|
|
125
|
-
* xlsx round-trip is the unambiguous witness, since the anchor lowers to an explicit call there:
|
|
126
|
-
*
|
|
127
|
-
* | typed | value | stored |
|
|
128
|
-
* | --- | --- | --- |
|
|
129
|
-
* | `B1:B3#` | `#REF!` | `_xlfn.ANCHORARRAY(B1:B3)` |
|
|
130
|
-
* | `B11:B3#` | `#REF!` | `_xlfn.ANCHORARRAY(B3:B11)` — re-imaged as `=B3:B11#` |
|
|
131
|
-
* | `B3#:B1` | B1:B5 | `_xlfn.ANCHORARRAY(B3):B1` |
|
|
132
|
-
*
|
|
133
|
-
* Excel ONLINE parses the same text differently — its grammar attaches `#` to the PRIMARY
|
|
134
|
-
* (`re = q(primary, any(Pound, StructRef), ...)` in the shipped engine), so it reads `A1:(B2#)`.
|
|
135
|
-
* Desktop wins. (The one desktop form this fold does not reproduce is `B3#:B5#`, which Excel
|
|
136
|
-
* stores as `ANCHORARRAY(B3):ANCHORARRAY(B5)` while we anchor the accumulation. Both are `#REF!`
|
|
137
|
-
* — an anchor over a multi-cell reference either way — so only the re-imaged text differs.)
|
|
138
|
-
*/
|
|
139
110
|
protected _ruleRangeOp: import('chevrotain').ParserMethod<[], ASTNode<TokenType, any>>;
|
|
140
|
-
/**
|
|
141
|
-
* Function application — `LAMBDA(a,b,a+b)(1,2)`, and the general form it is one instance of: any
|
|
142
|
-
* expression followed by an argument list. Zero or more suffixes, so a curried lambda
|
|
143
|
-
* (`LAMBDA(x,LAMBDA(y,x+y))(1)(2)` = `3` in Excel) folds left-associatively.
|
|
144
|
-
*
|
|
145
|
-
* This is the tightest-binding construct in the grammar — tighter than the range operators above
|
|
146
|
-
* it, which is why it sits BELOW `_ruleRangeOp`: `LAMBDA(r,r)(A1:B2):C3` is `(call):C3`. Measured
|
|
147
|
-
* against Excel 16.0 for `-`, `*`, `%`, `#` and `:` alike
|
|
148
|
-
* (`spreadsheetbench/formula-tests/probe-lambda-call.ps1`).
|
|
149
|
-
*
|
|
150
|
-
* ── The GATE is the whole design ────────────────────────────────────────────────────────────
|
|
151
|
-
*
|
|
152
|
-
* The `(` binds as a call ONLY when it touches the callee's last token. Excel refuses
|
|
153
|
-
* `=LAMBDA(x,x+1) (3)` at entry over a single space, and that adjacency is the ONLY thing
|
|
154
|
-
* separating application from implicit intersection:
|
|
155
|
-
*
|
|
156
|
-
* | typed | Excel |
|
|
157
|
-
* | --- | --- |
|
|
158
|
-
* | `A1:B3 (A2:C2)` | `4` — intersection |
|
|
159
|
-
* | `A1:B3(A2:C2)` | `#REF!` — a CALL whose callee is a range |
|
|
160
|
-
*
|
|
161
|
-
* So this gate is the exact complement of `_ruleIntersectOp`'s: that one fires on
|
|
162
|
-
* `startOffset > endOffset + 1`, this one on `startOffset === endOffset + 1`. No input satisfies
|
|
163
|
-
* both, and none falls between them. Without it, a greedy call suffix would swallow the second
|
|
164
|
-
* operand of every parenthesized intersection before `_ruleIntersectOp` ever saw it.
|
|
165
|
-
*
|
|
166
|
-
* The callee is deliberately unrestricted. Excel's own restriction is not syntactic — it is a
|
|
167
|
-
* shallow check on the callee's DECLARED return type, which is why `=IF(TRUE,1,2)(3)` is accepted
|
|
168
|
-
* (and answers `#VALUE!`) while `=SUM(2)(3)` is refused. That belongs with the sibling check for
|
|
169
|
-
* intersection operands (`CompilerUtils.findNonReferenceIntersectionOperand`), not here.
|
|
170
|
-
* See DESIGN-FORMULA-APPLICATION.md.
|
|
171
|
-
*/
|
|
172
111
|
protected _ruleCallOp: import('chevrotain').ParserMethod<[], ASTNode<TokenType, any>>;
|
|
173
112
|
/**
|
|
174
113
|
* Implements the implicit intersection operator: two adjacent reference expressions
|
|
@@ -14,30 +14,6 @@ export declare function createCell(coords: IRange.FixableCellCoords): CellNode;
|
|
|
14
14
|
export declare function createCol(address: string, column: number): CellNode;
|
|
15
15
|
export declare function createRow(address: string, row: number): CellNode;
|
|
16
16
|
export declare function createFunction(value: string, inputs: any[] | null | undefined): FunctionNode;
|
|
17
|
-
/**
|
|
18
|
-
* Application of an expression `callee` to `args` — `LAMBDA(a,b,a+b)(1,2)`.
|
|
19
|
-
*
|
|
20
|
-
* The callee goes in `inputs[0]` rather than `value` because **`visitAST` descends `inputs` and
|
|
21
|
-
* never `value`** (see its `walk`). A callee parked in `value` is invisible to every pass built on
|
|
22
|
-
* it, and each of those is a silent wrong answer rather than a crash:
|
|
23
|
-
*
|
|
24
|
-
* - the post-parse visit in `FormulaParser.parse` — `_xlfn.LAMBDA(…)(1,2)` read back from disk
|
|
25
|
-
* would keep its prefix, because the strip never reaches the callee;
|
|
26
|
-
* - `bindSymbols` — the callee's function name never binds to a stableId;
|
|
27
|
-
* - `translateCellNodes` — a cell inside the callee does not shift on copy/paste or row insert;
|
|
28
|
-
* - precedent collection — `=IF(A1,LAMBDA(x,x),LAMBDA(x,x+1))(2)` never registers `A1` as a
|
|
29
|
-
* precedent, so editing `A1` leaves a stale value. That one is the decisive case.
|
|
30
|
-
*
|
|
31
|
-
* `value` is also uniformly the node's *scalar* identity everywhere else (a name, an operator, a
|
|
32
|
-
* number, a coords object); a node there breaks that for anything comparing or serializing it.
|
|
33
|
-
*
|
|
34
|
-
* The cost is that argument `i` is `inputs[i + 1]`, unlike {@link createFunction} — use
|
|
35
|
-
* {@link calleeOf} / {@link argsOf} rather than open-coding the offset.
|
|
36
|
-
*
|
|
37
|
-
* Excel models this the same way: its AST has a single `App { head, args }` node and its engine
|
|
38
|
-
* implements immediate invocation as an internal `APPLY` function taking the callee as argument 0
|
|
39
|
-
* (DESIGN-FORMULA-APPLICATION.md §8.1).
|
|
40
|
-
*/
|
|
41
17
|
export declare function createCall(callee: ASTNode, args: ASTNode[] | null | undefined): ASTNode;
|
|
42
18
|
/** The callee of a {@link createCall} node. */
|
|
43
19
|
export declare function calleeOf(node: ASTNode): ASTNode | undefined;
|
|
@@ -246,61 +246,9 @@ export interface CompiledFormula {
|
|
|
246
246
|
* (add/heal/delete/rename), matched against `IndirectSymbolProvider.reconcile()`.
|
|
247
247
|
*/
|
|
248
248
|
symbolIds: string[];
|
|
249
|
-
/**
|
|
250
|
-
* Whether the formula calls `SUBTOTAL` or `AGGREGATE` anywhere in its tree.
|
|
251
|
-
*
|
|
252
|
-
* @remarks
|
|
253
|
-
* A cache, computed once at compile time from {@link ast}. What `IFormulaContext.filterTotals`
|
|
254
|
-
* needs to answer per CELL, and computing it here is what keeps that answer free: the alternative
|
|
255
|
-
* is re-inspecting a neighbor's formula on every recalculation of every enclosing total.
|
|
256
|
-
*
|
|
257
|
-
* "Anywhere in its tree", not "is the outermost call" — measured, `=SUM(SUBTOTAL(9,A1:A3))` is
|
|
258
|
-
* excluded from an enclosing SUBTOTAL exactly as a bare `=SUBTOTAL(9,A1:A3)` is. Resolved through
|
|
259
|
-
* `getFunction` rather than matched on the typed name, so a localized spelling and an
|
|
260
|
-
* `_xlfn.`-prefixed one both answer correctly.
|
|
261
|
-
*/
|
|
262
249
|
hasTotals: boolean;
|
|
263
|
-
/**
|
|
264
|
-
* Whether the formula calls `TABLE`, the what-if data table, anywhere in its tree.
|
|
265
|
-
*
|
|
266
|
-
* @remarks
|
|
267
|
-
* What a reactive pass under `AutomaticExceptTables` skips (DESIGN-DATA-TABLES §4.4). Resolved
|
|
268
|
-
* through `getFunction`, like {@link hasTotals}.
|
|
269
|
-
*/
|
|
270
250
|
hasDataTable: boolean;
|
|
271
|
-
/**
|
|
272
|
-
* Whether the formula names a VOLATILE function anywhere in its tree — the cell recalculates on
|
|
273
|
-
* every pass, whether or not that call is ever reached.
|
|
274
|
-
*
|
|
275
|
-
* @remarks
|
|
276
|
-
* Volatility is otherwise marked at RUNTIME, by the body (`IFormulaContext.markVolatile`), which
|
|
277
|
-
* was equivalent while every argument was evaluated. It stopped being equivalent with lazy
|
|
278
|
-
* arguments: `=IF(TRUE,1,RAND())` never runs `RAND` and would silently stop recalculating.
|
|
279
|
-
* Excel keeps it volatile — measured 2026-09-07, `probe-lazy-args.ps1` P1: the cell costs a full
|
|
280
|
-
* recalculation on every idle F9, for `RAND`, `NOW` and `OFFSET` alike, in an arm no branch
|
|
281
|
-
* selects. So the mark is a property of the formula TEXT and is collected here.
|
|
282
|
-
*
|
|
283
|
-
* The declaration answers it (`Volatile<T>` on the return), so a UDF counts exactly as a
|
|
284
|
-
* built-in does and no list of names lives in the engine. `IFormulaContext.markVolatile()`
|
|
285
|
-
* remains on the context for a function that cannot declare — it is not how a built-in says it.
|
|
286
|
-
*/
|
|
287
251
|
hasVolatile: boolean;
|
|
288
|
-
/**
|
|
289
|
-
* Whether every cell of a block running this formula whose RELATIVE inputs are all blank must
|
|
290
|
-
* evaluate to the same value within one pass — so the engine may evaluate one of them and share
|
|
291
|
-
* the answer (PLAN-WATCHES-BLANK-AWARE §4).
|
|
292
|
-
*
|
|
293
|
-
* @remarks
|
|
294
|
-
* A property of the formula TEXT, like {@link hasVolatile}, and `false` whenever the text shows
|
|
295
|
-
* the answer could depend on which cell is asking: an implicit intersection, a name, an
|
|
296
|
-
* expression callee, or a function the registry does not know. `TODAY()` and `NOW()` are
|
|
297
|
-
* accepted: volatile, but one value per pass. So are `RAND()` and every function taking a
|
|
298
|
-
* reference (`ROW()`, `OFFSET`, `FORMULATEXT`, the `SUMIF` family): whether the body reads a
|
|
299
|
-
* position (or draws) is a per-cell READ (`CalcScope.perCellRead`, `positionRead`) that the pass sees when it
|
|
300
|
-
* evaluates the representative, not a property of the text. The block adds its own gates (a
|
|
301
|
-
* precedent template, not array-entered) and the pass its run-time ones (no dynamic read, no
|
|
302
|
-
* per-cell read, a scalar result); this is only the half that can be known from the text.
|
|
303
|
-
*/
|
|
304
252
|
isBlankCacheable: boolean;
|
|
305
253
|
/**
|
|
306
254
|
* {@link isBlankCacheable} for a block evaluated in ARRAY mode throughout — every cell its own
|