@sheetxl/sdk 0.8.0-beta.12 → 0.8.0-beta.14
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/{CBYMTDzMf1Vh7pkw.mjs → 3t4S9eda2I6jFad0.mjs} +1 -1
- package/browser/esm/{Bg5Di9GLNAkbqQ1P.mjs → AXlD9K1gCwPU4gCO.mjs} +1926 -1298
- package/browser/esm/{w6Jea0TiclPrYZ2M.mjs → B1aH_qa-czVyEVHd.mjs} +509 -509
- package/browser/esm/{DZiivy0NmO1Vnyzk.mjs → BEDfJP2tcuRy2Y2E.mjs} +2 -2
- package/browser/esm/{BdCJNawfifyPupCP.mjs → BLYl-afJe_3std8i.mjs} +1 -1
- package/browser/esm/{D2RZh0O9neOsyLAE.mjs → BPPMKyMn65i1a1mE.mjs} +69 -48
- package/browser/esm/{yuhcOYw6SHQ-RCm3.mjs → BSXQAXwZdJKYTO4P.mjs} +30 -30
- package/browser/esm/{-Jx-jNHmtIQQfLvK.mjs → BVqIknGhQCLUB_7Q.mjs} +1 -1
- package/browser/esm/{fXWUMDhZ5yMSO629.mjs → BWoz4kQdA5KKJfl6.mjs} +1 -1
- package/browser/esm/{DwwR3O2sEZApPSTF.mjs → Bdcd3QOzsc0aVMjN.mjs} +3 -3
- package/browser/esm/{2mIwPy2D2JUX-9wx.mjs → BpwULQPKbb4R9Jew.mjs} +2 -2
- package/browser/esm/{CwOPLXU3-9ZHGyOT.mjs → C7hpfT-sX2lyLS-D.mjs} +1 -1
- package/browser/esm/{BIHrHjRGWVlJglcp.mjs → CImFKFaYToUH-bSE.mjs} +2 -2
- package/browser/esm/{BTFBedJMRWGvZyCE.mjs → CM_X1zZYzEUPaNJL.mjs} +1 -1
- package/browser/esm/CPIWV3Enlh_BF2TY.mjs +19 -0
- package/browser/esm/{CndRBvVfQUJIYRRj.mjs → ChYgQL-8qIDFmX31.mjs} +50 -50
- package/browser/esm/{BudSIfXBAsTxvu-K.mjs → CtC__ALh4I8PKIln.mjs} +10071 -9246
- package/browser/esm/{qO-ujUrgq6H3TQix.mjs → Cy8uYCggktF83278.mjs} +1 -1
- package/browser/esm/D2NFcBM4xsv0JJ1q.mjs +184 -0
- package/browser/esm/{D9xNz46kAfXMZzp4.mjs → D39XcmtPXVtMN4yF.mjs} +2 -2
- package/browser/esm/{CdEO8CEee6lEhabA.mjs → DBvu0tdSf-5vol4e.mjs} +2 -2
- package/browser/esm/{Tah7cnFb_HNZdLtj.mjs → DIfAk63CvaOZ3QKi.mjs} +3 -3
- package/browser/esm/{B3wf5vZCsWfWsDbj.mjs → D_XMi4_5iO2rkET5.mjs} +1 -1
- package/browser/esm/{DgrAuRD2qr2DvFeJ.mjs → Dh84MDs-OhdCPCIg.mjs} +44 -44
- package/browser/esm/{DPhGQLNGmDZwODwJ.mjs → Dhw5XEJYFrkYjdU2.mjs} +94 -94
- package/browser/esm/{Cxjxk0ncRKx80I-w.mjs → DiXeQjc0WJGLSVEo.mjs} +1 -1
- package/browser/esm/DnR0xY7_iE3TmMcg.mjs +348 -0
- package/browser/esm/{DK899HhWX1HINMC1.mjs → DnqwX3-2NfGBaXXl.mjs} +25 -25
- package/browser/esm/{D64dM68B1pKYFzdP.mjs → DonQz2Tc3k9lNT8E.mjs} +2 -2
- package/browser/esm/{Bt8_m94tBdks209L.mjs → DvvqmUQ9Z0NFm1-4.mjs} +1 -1
- package/browser/esm/{BnC4-27Igwb8oDf2.mjs → Ln4gsmhqH1LyoANj.mjs} +44 -43
- package/browser/esm/{CUzYuYTTGsChC_kZ.mjs → MuNBN02MyZ558c_K.mjs} +2052 -1583
- package/browser/esm/{CRkYR-siY2C994KV.mjs → SwLp-iElwDjfcJtv.mjs} +1 -1
- package/browser/esm/{C9u8FUewte5ugUjH.mjs → UMQTbO0zNmBpzW1V.mjs} +725 -716
- package/browser/esm/aRXqxIzjuSLwawMh.mjs +18 -0
- package/browser/esm/index.mjs +482 -440
- package/browser/esm/{hCQJcmIzPDxDEv2q.mjs → oSCy1X5CJ1iYtGDp.mjs} +2 -2
- package/browser/esm/{DobHLF6VjHr7Xi40.mjs → qCqzZW74-fhaIG2V.mjs} +1 -1
- package/browser/esm/{CNdjyofiRu6CYOrr.mjs → r_EZapMBdyS4gUd-.mjs} +50 -48
- package/browser/esm/yuF8SbWfjBfrxcq5.mjs +367 -0
- package/licenses/dependencies.txt +71 -1
- package/node/esm/99miMotf3dOuG5Jk.mjs +372 -0
- package/node/esm/{-TA0MneBDKdGhsib.mjs → B3hBxzqJ2_hUylNr.mjs} +3329 -2852
- package/node/esm/{BNXLOEddJ6O9gYws.mjs → B5VmOC0jO9Zbh9Mq.mjs} +2 -2
- package/node/esm/{DhS6yWjrrSNIJMsn.mjs → B6jhx5pHPs2W5GE7.mjs} +234 -225
- package/node/esm/{DUTmDHbFbhLDT4F3.mjs → BCjHRVU8tC5lYypg.mjs} +1 -1
- package/node/esm/BEBt5fo__rvT2q_u.mjs +310 -0
- package/node/esm/{icn2nX5Z8e_3mNAv.mjs → BELc5aQ_pFPgbiso.mjs} +1 -1
- package/node/esm/{DrCf6ITcBhVOFpRj.mjs → BEdxa3I4VOiCsvy7.mjs} +7 -7
- package/node/esm/{D3ptRKzASqBut1DE.mjs → BLPrFp_jKGYgWPX1.mjs} +2 -2
- package/node/esm/{BskP3b8vUoIOGLY6.mjs → BSVttk12GXNfKZ9k.mjs} +2 -2
- package/node/esm/{D4ROK9UwDpS6jO3Z.mjs → BXg-D8Rc_iyB8p7X.mjs} +1 -1
- package/node/esm/{DV5CU37aEbFbWFL0.mjs → BfEdeOg4iYXaYTlh.mjs} +1 -1
- package/node/esm/BuyAYLI4s33-vmgG.mjs +18 -0
- package/node/esm/{C_xf5Bz30VqiJjXn.mjs → C-5JLSNof0FhkuFd.mjs} +1 -1
- package/node/esm/{eimUGjiIP-b8HiM6.mjs → C3S4hF1vn0NyJPPd.mjs} +52 -52
- package/node/esm/{BL2iiEoqxDEV2Xrg.mjs → CI8UIWR01z9QDlzH.mjs} +3348 -2610
- package/node/esm/{pYtP7wPyS96NQyXS.mjs → CPsGyt3vnOdLTShj.mjs} +25 -25
- package/node/esm/{CG-qBU5BAaVz7e-P.mjs → Ccocd9DTvOnlOE9D.mjs} +1 -1
- package/node/esm/{C14-R6tifRh7pc0p.mjs → CdSTmD2ZvG9NesNR.mjs} +1 -1
- package/node/esm/{Q_S1g46ZOTrdhTae.mjs → Crn6dnSQQRCQAnQ-.mjs} +1 -1
- package/node/esm/{DdoiuKg9BKubtF1V.mjs → Cyeq1rDslIqF1LKz.mjs} +1 -1
- package/node/esm/{Ci_zLYmCD7e-C79O.mjs → D30rC6AWaGGf3CaC.mjs} +1 -1
- package/node/esm/D4Y1WJgjiFEgbWrW.mjs +115 -0
- package/node/esm/{Vocy-I9dKzZMr0Ct.mjs → DLdXl0O0TXuyqLU4.mjs} +10898 -10685
- package/node/esm/{D8hO07ToAibIuniw.mjs → DbPUG2DcQ3T_QhcJ.mjs} +138 -136
- package/node/esm/{lGJ42sHqg5if2bba.mjs → DeFE8QfuCeGw-mvd.mjs} +458 -458
- package/node/esm/{CiIymQN6aJCul62g.mjs → DiCMnYA2bttmrX3q.mjs} +9 -9
- package/node/esm/{DhTya_mhmN53vskv.mjs → Dlk2ZYExFgQ0xE2H.mjs} +1 -1
- package/node/esm/{Btw4148Ot8ifhNc1.mjs → I-FZojIFWluC6X-j.mjs} +1 -1
- package/node/esm/{C99zzq8DImQXi4BQ.mjs → Lj98EH6coGdKUzuS.mjs} +10 -10
- package/node/esm/{B-HUPAcqvK0eeeCz.mjs → NA-8urR7T1NCwrgD.mjs} +38 -37
- package/node/esm/{DxazKtROyaI51dWl.mjs → YpOpRyciqQLIY1-G.mjs} +1 -1
- package/node/esm/{CkRYLed8Mmn3giNg.mjs → b3XnssSr9lmvAC2N.mjs} +2 -2
- package/node/esm/clgEkmEwfB28nkz2.mjs +351 -0
- package/node/esm/index.mjs +584 -540
- package/node/esm/{CRt3vXe6YmXzqk3H.mjs → pF2vCOTmrxPAB41Q.mjs} +102 -102
- package/node/esm/{CBuEu5Jk-LfaDy-H.mjs → uLrulyR7IXq0SF4j.mjs} +44 -44
- package/node/esm/{C_aL7CGS1lrNn1Ng.mjs → xRGObcoaGDnAZFnj.mjs} +1 -1
- package/package.json +10 -7
- 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/scripting/enumManifest.browser.d.ts +7 -2
- 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/browser/esm/DwZCT7DZiiXoTweg.mjs +0 -14
- 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
|
@@ -5,19 +5,6 @@ import { FormulaRecord, FormulaImager } from '../formula';
|
|
|
5
5
|
import { ICalculation } from '../ICalculation';
|
|
6
6
|
import { NamedReference } from '../Types';
|
|
7
7
|
import { ICalcGrid } from './ICalcGrid';
|
|
8
|
-
/**
|
|
9
|
-
* A call on a grid, as the service's channel holds it while the engine is `Starting`
|
|
10
|
-
* (DESIGN-CALC-SERVICE §4, §7.2): the verb and its arguments, applied in send order once the
|
|
11
|
-
* engine is up. The snapshot it was made at rides in its options (`commitId`, `cloneKey`).
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* Not part of {@link ICalcGrid}: a caller sees the verbs and their promises. This is what the
|
|
15
|
-
* in-process channel holds in place of a worker port's queue, and what the clone boundary audits
|
|
16
|
-
* (DESIGN-CALC-SERVICE §11): a held call carries what the verb's arguments carry, which is what a proxy
|
|
17
|
-
* would post.
|
|
18
|
-
*
|
|
19
|
-
* @internal Deliberately not exported from the barrel.
|
|
20
|
-
*/
|
|
21
8
|
export type CalcRequest =
|
|
22
9
|
/**
|
|
23
10
|
* Make the engine's grid for a model grid, from what the model says it is. The grid's first
|
|
@@ -184,15 +171,7 @@ export type CalcRequest =
|
|
|
184
171
|
| {
|
|
185
172
|
type: 'setBody';
|
|
186
173
|
body: ICalcGrid.BodyOptions;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* The sheet list as its owner holds it when the message is sent - every sheet's grid id and
|
|
190
|
-
* name, in tab order - for the engine's replica (DESIGN-CALC-SERVICE §8). A message of the
|
|
191
|
-
* service, not of a grid: the channel holds it in order with the grids' requests, which is what
|
|
192
|
-
* lets a seed sent before a rename compile against the names it was sent under. The owner tells
|
|
193
|
-
* a sheet before any grid that names it seeds (`Calculation._setSheets`).
|
|
194
|
-
*/
|
|
195
|
-
| {
|
|
174
|
+
} | {
|
|
196
175
|
type: 'sheets';
|
|
197
176
|
sheets: readonly (readonly [id: string, name: string | null, gridless?: boolean])[];
|
|
198
177
|
options?: ICalcGrid.RequestOptions;
|
|
@@ -265,13 +244,6 @@ export interface CalcGridSpec {
|
|
|
265
244
|
export type TableSymbols = readonly [name: string, columns: readonly (readonly [id: string, name: string])[]];
|
|
266
245
|
/** A defined name as the engine's replica holds it: its name, and the id of the sheet it is scoped to. */
|
|
267
246
|
export type NameSymbols = readonly [name: string, scopeId: string | null];
|
|
268
|
-
/**
|
|
269
|
-
* What crosses back (DESIGN-CALC-SERVICE §8): {@link ICalcGrid.Results} with the formula half as
|
|
270
|
-
* records - data, since only data crosses. The facade images each record into the
|
|
271
|
-
* {@link IFormulaBlockView} the model reads ({@link imageResponse}) before the results reach it.
|
|
272
|
-
*
|
|
273
|
-
* @internal Deliberately not exported from the barrel.
|
|
274
|
-
*/
|
|
275
247
|
export type CalcResponse = Omit<ICalcGrid.Results, 'formulaInserts'> & {
|
|
276
248
|
formulaInserts?: ISpatialMap.Entry<FormulaRecord>[];
|
|
277
249
|
/**
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { ICalculation } from '../ICalculation';
|
|
2
|
-
/**
|
|
3
|
-
* What a sheet's circular index says about a cell (DESIGN-CIRCULAR-CALC.md §7.2): which
|
|
4
|
-
* reference cycle it belongs to, and whether it is in the cycle or merely downstream of it.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* The value stays what it is (`0`, Excel's answer with iterative calculation off); this is
|
|
8
|
-
* metadata beside it, the way `SpillEntry` marks a spill zone. Entries are interned per
|
|
9
|
-
* `(cycle, kind)` by the executor, so equal payloads are the same object and adjacent cells of
|
|
10
|
-
* one cycle coalesce into one region — and a region's payload IS the cycle, no id to look up.
|
|
11
|
-
*/
|
|
12
2
|
export interface CircularEntry {
|
|
13
3
|
/** The cycle; one live object per cycle, shared by every cell in it or downstream of it. */
|
|
14
4
|
readonly cycle: ICalculation.ICircularReference;
|
|
@@ -28,21 +28,6 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
28
28
|
*/
|
|
29
29
|
ref: IRange.Coords;
|
|
30
30
|
formula: IFormulaBlock | null;
|
|
31
|
-
/**
|
|
32
|
-
* The block's nodes, DENSE - one per cell - for a block the pass evaluates cell by cell; `null`
|
|
33
|
-
* for a block that shares one answer over its blank region (PLAN-WATCHES-BLANK-AWARE §4c), which
|
|
34
|
-
* keeps its nodes in {@link _nodes} instead, and `null` while nothing has touched the block.
|
|
35
|
-
* Never indexed from outside: {@link nodeAt}, {@link nodeAtOrNull}, {@link forEachNodeIn},
|
|
36
|
-
* {@link mintNodesIn} and {@link forEachNode} are the reads, and they are the same calls for
|
|
37
|
-
* either shape.
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* Nodes are runtime state, not the formula: they exist from the first touch ({@link nodeAt},
|
|
41
|
-
* {@link mintNodesIn}) and are dropped when the block leaves its map ({@link release}). A block
|
|
42
|
-
* that nothing has touched, or that was released, holds no node for any cell, which the executor
|
|
43
|
-
* reads as "never collected: a value". A superseded block is still held by every earlier
|
|
44
|
-
* commit's map, so what it keeps is what the history keeps; a restore mints again on demand.
|
|
45
|
-
*/
|
|
46
31
|
calcs: CalcNode[][] | null;
|
|
47
32
|
/**
|
|
48
33
|
* A gated block's nodes, keyed by cell. **A node exists only where its cell has been touched**
|
|
@@ -75,42 +60,16 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
75
60
|
*/
|
|
76
61
|
registeredPrecedents: ISpatialMap.Entry<any>[] | null;
|
|
77
62
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* @remarks
|
|
82
|
-
* A **relative** reference is stored as an offset from `ref`, so on these blocks its absolute
|
|
83
|
-
* position (`ref + offset`) is fiction: there is no cell it names, and nothing to compare against
|
|
84
|
-
* a shift boundary. Structural change must therefore leave relative endpoints alone — the offset
|
|
85
|
-
* IS the definition. Measured against Excel: a relative name's `RefersTo` never changes under
|
|
86
|
-
* insert/delete/move, while an absolute one always does (`$`-fixed endpoints carry a real
|
|
87
|
-
* coordinate that owes nothing to the anchor, so they shift normally on these blocks too).
|
|
88
|
-
*
|
|
89
|
-
* Deliberately NOT "is a named body". Anything holding a formula at a synthetic anchor wants the
|
|
90
|
-
* same treatment, and the shift code should not have to know what a name is.
|
|
91
|
-
*
|
|
92
|
-
* A calculation pass never evaluates such a block: its anchor is no cell, so there is nothing
|
|
93
|
-
* to write an answer to, and whatever reads the body runs it inline at its own position. It is
|
|
94
|
-
* evaluated on demand only (`ICalcGrid.evaluateAt`), and `isVolatileAt` answers for it from the
|
|
95
|
-
* formula text alone, there being nothing a pass registered (`CalcGridBackend._isVolatileNow`).
|
|
96
|
-
*
|
|
97
|
-
* Required at construction rather than defaulted: the block is immutable and re-minted on every
|
|
98
|
-
* reference rewrite, so an unthreaded copy would silently revert to `false` on the first
|
|
99
|
-
* `setReferenceAt` — which is exactly what a shift performs.
|
|
63
|
+
* This block is the one a seed loaded, and what its cells show came with it. A write replaces
|
|
64
|
+
* the block, so a block that is `true` has not been edited since.
|
|
100
65
|
*/
|
|
101
|
-
|
|
66
|
+
fromLoad: boolean;
|
|
102
67
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* @remarks
|
|
107
|
-
* Excel's rule for a conditional-format formula (DESIGN-LIFT-AND-DEMAND §2): the whole tree is
|
|
108
|
-
* array mode (`CalculationContext.isImplicitIntersect`), the tree is evaluated under a first-cell
|
|
109
|
-
* demand so a lift builds only `[0,0]` ({@link IFormulaBlock.demandFirstCell}), and the commit
|
|
110
|
-
* keeps `[0,0]` of a result that is still a range. Every cell therefore stores a scalar, which
|
|
111
|
-
* is what lets the blank region share one answer. No extent is recorded per node: the block is
|
|
112
|
-
* a property of the grid, and a sparse block stays sparse.
|
|
68
|
+
* A cell of this block was loaded marked to calculate on load (`JSON.volatile`, xlsx `ca`), which
|
|
69
|
+
* for a call is asking its source: how a call still working at save picks up where it left off.
|
|
113
70
|
*/
|
|
71
|
+
calcOnLoad: boolean;
|
|
72
|
+
readonly unanchored: boolean;
|
|
114
73
|
readonly arrayFirstCell: boolean;
|
|
115
74
|
/**
|
|
116
75
|
* How many static precedent edges each of this block's cells has — the same count at every
|
|
@@ -145,12 +104,6 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
145
104
|
protected _scratchCoords: IRange.FixableCoords[] | null;
|
|
146
105
|
protected _scratchRow: number;
|
|
147
106
|
protected _scratchCol: number;
|
|
148
|
-
/**
|
|
149
|
-
* Blank-aware evaluation (PLAN-WATCHES-BLANK-AWARE §4): the block's touched windows, cached per
|
|
150
|
-
* collection ({@link getTouched}), and what the pass decided about the blank region's
|
|
151
|
-
* representative. Per block INSTANCE — a block is re-minted on every edit, shift and split, so
|
|
152
|
-
* none of this survives a change to the block, and none of it has to.
|
|
153
|
-
*/
|
|
154
107
|
protected _touched: TouchedWindows | null;
|
|
155
108
|
protected _touchedCycleId: number;
|
|
156
109
|
protected _touchedMarkId: number;
|
|
@@ -200,14 +153,17 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
200
153
|
* of that pass only.
|
|
201
154
|
*/
|
|
202
155
|
blankFallbackCycleId: number;
|
|
156
|
+
uncalculated: boolean;
|
|
203
157
|
/**
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
158
|
+
* An evaluation of some cell of this block read its position, or something else of the cell's
|
|
159
|
+
* own - `ROW()`, `ROW(A5)`, `CELL("address", A5)`, `FORMULATEXT(A5)` (`CalcScope.positionRead`,
|
|
160
|
+
* `CalcScope.perCellRead`). The text cannot tell (`collectBlankCacheable` in the compiler says
|
|
161
|
+
* why), so it is learned as the block runs and kept: a block that moves with such a read answers
|
|
162
|
+
* differently at its new cells, where one without answers there as it did
|
|
163
|
+
* (`CalcGridBackend._shiftNow`). Carried through the rebuilds that keep the nodes, like
|
|
164
|
+
* {@link uncalculated}.
|
|
209
165
|
*/
|
|
210
|
-
|
|
166
|
+
positionRead: boolean;
|
|
211
167
|
constructor(coords: IRange.Coords, gridId: string | null, formula: IFormulaBlock | null, container: IContextContainer, unanchored: boolean, nodes?: FormulaSpatialValue.NodeSource[]);
|
|
212
168
|
/** Every source block's nodes, at this block's cells - see {@link FormulaSpatialValue.NodeSource}. */
|
|
213
169
|
getNodeSource(): FormulaSpatialValue.NodeSource[];
|
|
@@ -232,6 +188,11 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
232
188
|
protected _mintDense(): CalcNode[][];
|
|
233
189
|
/** The static edges a fresh node of this block stores at a cell - what {@link _createCalcs} gives every cell. */
|
|
234
190
|
protected _freshPrecedents(row: number, col: number): CalcNode['precedents'];
|
|
191
|
+
/**
|
|
192
|
+
* Reads the static edges again, for when a name the formula mentions has gained a body: a name
|
|
193
|
+
* contributes its body's cells. The nodes keep everything else they hold.
|
|
194
|
+
*/
|
|
195
|
+
refreshPrecedents(): void;
|
|
235
196
|
/**
|
|
236
197
|
* Drops the nodes. Called as the block leaves its map, so the maps of earlier commits, which
|
|
237
198
|
* still hold it, do not hold a generation of nodes with it. The anchor stays (see
|
|
@@ -261,17 +222,6 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
261
222
|
* is the block's shared buffer — see {@link _scratch} for how long it stays valid.
|
|
262
223
|
*/
|
|
263
224
|
getPrecedentsAt(row: number, col: number): (IRange.Coords | FormulaError.Known)[];
|
|
264
|
-
/**
|
|
265
|
-
* Whether the pass may evaluate ONE cell of this block's blank region and share its answer with
|
|
266
|
-
* the rest (PLAN-WATCHES-BLANK-AWARE §4) — the block-level gate over the formula's compile-time
|
|
267
|
-
* one ({@link isBlankCacheable}).
|
|
268
|
-
*
|
|
269
|
-
* @remarks
|
|
270
|
-
* A template is the shape the touched predicate needs (one relative edge per reference, the
|
|
271
|
-
* same at every cell); an array-entered block has its own fitted write; a one-cell block has
|
|
272
|
-
* nothing to share. The two pass-side verdicts — {@link blankRefused}, {@link blankFallbackCycleId}
|
|
273
|
-
* — close the gate after the fact.
|
|
274
|
-
*/
|
|
275
225
|
isBlankAware(cycleId: number): boolean;
|
|
276
226
|
/**
|
|
277
227
|
* The block's touched windows for one collection — computed on first ask, from the grids its
|
|
@@ -341,22 +291,39 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
341
291
|
/** A fresh node for a cell of this block. */
|
|
342
292
|
protected _newNode(cellRow: number, cellCol: number, gridId: string | null, cellPrecedents: CalcNode['precedents']): CalcNode;
|
|
343
293
|
/**
|
|
344
|
-
* The static edges a
|
|
345
|
-
* template. The top-left's answer doubles as `paramLength`, so it is resolved once per
|
|
294
|
+
* The static edges a taken or minted node of a non-templated block stores; `null` under a
|
|
295
|
+
* template. The top-left's answer doubles as `paramLength`, so it is resolved once per take.
|
|
346
296
|
*/
|
|
347
|
-
protected
|
|
297
|
+
protected _takePrecedents(cellRow: number, cellCol: number, topLeft: CalcNode['precedents']): CalcNode['precedents'];
|
|
348
298
|
/**
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
299
|
+
* Takes the sources' nodes as this block's - see {@link FormulaSpatialValue.NodeSource}.
|
|
300
|
+
*
|
|
301
|
+
* @remarks
|
|
302
|
+
* The nodes are MOVED, not copied. A node is reachable by identity from outside its block - a
|
|
303
|
+
* deferred call's owner, a cycle member's `cycleNext`, the volatile roster - and the moved node
|
|
304
|
+
* is the live one, so those stay right with no fix-up. Each source is then released: a block
|
|
305
|
+
* whose nodes left it must not answer for them to a restore. A caller with another block still
|
|
306
|
+
* to take from the same source passes `releaseSources` false and releases it itself
|
|
307
|
+
* ({@link getSplit}).
|
|
308
|
+
*/
|
|
309
|
+
protected _adopt(sources: FormulaSpatialValue.NodeSource[], releaseSources: boolean): void;
|
|
310
|
+
/**
|
|
311
|
+
* `node` re-seated as this block's node for (`cellRow`, `cellCol`): the same object, with fresh
|
|
312
|
+
* slots and stamps - a new position, so nothing that described the old one is kept.
|
|
352
313
|
*/
|
|
353
|
-
protected
|
|
314
|
+
protected _adoptNode(node: CalcNode, cellRow: number, cellCol: number, cellPrecedents: CalcNode['precedents']): CalcNode;
|
|
315
|
+
/**
|
|
316
|
+
* A copy of `node` as this block's node for (`cellRow`, `cellCol`): the same value and cycle
|
|
317
|
+
* state, fresh slots and stamps. For the anchor a {@link release} keeps once the node itself has
|
|
318
|
+
* moved to another block; a live node is never copied, it is adopted.
|
|
319
|
+
*/
|
|
320
|
+
protected _copyNode(node: CalcNode, cellRow: number, cellCol: number): CalcNode;
|
|
354
321
|
/** The source node for this block's cell (`i`, `j`), whichever source holds it; `null` for none. */
|
|
355
322
|
protected _sourceNodeAt(sources: FormulaSpatialValue.NodeSource[], i: number, j: number): CalcNode | null;
|
|
356
|
-
/** A dense node array over this block
|
|
357
|
-
protected
|
|
358
|
-
/** This block's sparse nodes: every source node whose cell lands inside the block,
|
|
359
|
-
protected
|
|
323
|
+
/** A dense node array over this block: each source node taken, and a fresh node where no source has one. */
|
|
324
|
+
protected _takeDense(sources: FormulaSpatialValue.NodeSource[]): CalcNode[][];
|
|
325
|
+
/** This block's sparse nodes: every source node whose cell lands inside the block, taken. */
|
|
326
|
+
protected _takeSparse(sources: FormulaSpatialValue.NodeSource[]): void;
|
|
360
327
|
/**
|
|
361
328
|
* @param coords The extent to serialize as. Defaults to the block's own; a caller that has
|
|
362
329
|
* coalesced adjacent equal blocks passes the merged extent, whose anchor is this block's.
|
|
@@ -456,6 +423,9 @@ export declare namespace FormulaSpatialValue {
|
|
|
456
423
|
* block's cell (`i`, `j`). A split reads one source at an offset; a merge reads two, the
|
|
457
424
|
* second at a negative origin; a shift, re-image or re-anchor reads the block itself at
|
|
458
425
|
* (0, 0). A cell no source holds gets a fresh node.
|
|
426
|
+
*
|
|
427
|
+
* The nodes MOVE: the source is left released. Build from a block's nodes only for the block
|
|
428
|
+
* that replaces it in its map; a block that stays in a map is read through its formula instead.
|
|
459
429
|
*/
|
|
460
430
|
interface NodeSource {
|
|
461
431
|
readonly block: FormulaSpatialValue;
|
|
@@ -17,12 +17,8 @@ export declare class SpillEntry {
|
|
|
17
17
|
private _k;
|
|
18
18
|
private _cycleId;
|
|
19
19
|
private _h;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* (DESIGN-ASYNC §4.4): the anchor cell holds the first element, so the entry carries what a
|
|
23
|
-
* scalar cell holds in its value, and moves and versions with the spill the same way.
|
|
24
|
-
*/
|
|
25
|
-
constructor(coords: IRange.Coords, cycleId: number, kind?: ITypes.FormulaArrayKind, holder?: AsyncValue | null);
|
|
20
|
+
private _b;
|
|
21
|
+
constructor(coords: IRange.Coords, cycleId: number, kind?: ITypes.FormulaArrayKind, holder?: AsyncValue | null, blocked?: IRange.Coords | null);
|
|
26
22
|
/** The anchor's holder, for a spill laid out by an evaluation that deferred; `null` otherwise. */
|
|
27
23
|
getHolder(): AsyncValue | null;
|
|
28
24
|
getCycleId(): number;
|
|
@@ -34,7 +30,14 @@ export declare class SpillEntry {
|
|
|
34
30
|
*/
|
|
35
31
|
isFixed(): boolean;
|
|
36
32
|
getCoords(): IRange.Coords;
|
|
37
|
-
|
|
33
|
+
/** The extent a blocked spill would take; `null` for any other. */
|
|
34
|
+
getBlockedCoords(): IRange.Coords | null;
|
|
35
|
+
/** {@link getBlockedCoords} moved by what moved the anchor to `to`. */
|
|
36
|
+
protected _blockedAt(to: IRange.Coords): IRange.Coords | null;
|
|
37
|
+
/**
|
|
38
|
+
* @param keepExtent For the sheet's map of blocked spills, whose entries are at the extent they would take.
|
|
39
|
+
*/
|
|
40
|
+
setError(error: boolean, cycleId: number, keepExtent?: boolean): ISpatialMap.Entry<this>;
|
|
38
41
|
/**
|
|
39
42
|
* Refuses a shift that would change part of a fixed block - Excel's "You can't change part of
|
|
40
43
|
* an array." A block the shift lands entirely before or after translates whole; a delete that
|
|
@@ -42,15 +42,6 @@ export interface CalcScope {
|
|
|
42
42
|
* inherits it.
|
|
43
43
|
*/
|
|
44
44
|
firstCell: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Set when the evaluation read something that is PER CELL rather than a property of its inputs
|
|
47
|
-
* — a random draw (`IFormulaContext.getRandom`), another cell's formula or sheet
|
|
48
|
-
* (`getFormulaAt`, `getSheetIndex`), or a reference it computed (a dynamic precedent) — so its
|
|
49
|
-
* answer cannot stand in for another cell's even when the two cells' inputs are identical.
|
|
50
|
-
* Cleared by whoever evaluates a cell as the representative of a block's blank region and read
|
|
51
|
-
* at its finalize (PLAN-WATCHES-BLANK-AWARE §4); a cell evaluated on its own behalf never
|
|
52
|
-
* reads it.
|
|
53
|
-
*/
|
|
54
45
|
perCellRead: boolean;
|
|
55
46
|
/**
|
|
56
47
|
* Set when the evaluation read its own POSITION — `getRow`, `getColumn`, its own address, a
|
|
@@ -89,13 +89,6 @@ export declare const CalcState: {
|
|
|
89
89
|
* each evaluation, so outside {@link PassMask}.
|
|
90
90
|
*/
|
|
91
91
|
readonly PendingValue: number;
|
|
92
|
-
/**
|
|
93
|
-
* The node's one call answered with a shape its cell cannot take without the layout machinery
|
|
94
|
-
* — a range, or the cell is a spill anchor — and a settle seeded it (DESIGN-ASYNC §4.5): the
|
|
95
|
-
* settle pass takes the holder's latest in place of running the body and lays it out as any
|
|
96
|
-
* range result. Any other pass clears it and evaluates, since the node may be dirty for its own
|
|
97
|
-
* reasons. Outside {@link PassMask}: set between passes.
|
|
98
|
-
*/
|
|
99
92
|
readonly ServeLatest: number;
|
|
100
93
|
/**
|
|
101
94
|
* The evaluation recorded a call of the cell's own that has not answered: the cell is working,
|
|
@@ -107,11 +100,6 @@ export declare const CalcState: {
|
|
|
107
100
|
/** What the mark phase resets: everything a single pass decides. `Skip` and the shown role survive. */
|
|
108
101
|
readonly PassMask: number;
|
|
109
102
|
};
|
|
110
|
-
/**
|
|
111
|
-
* Where a node the topological sort could not order stands in the demand evaluation
|
|
112
|
-
* (DESIGN-CIRCULAR-CALC.md §4.3). Meaningful only while `CalcState.Circular` is set for the
|
|
113
|
-
* current pass. Values sit in the `CalcState.DemandMask` field.
|
|
114
|
-
*/
|
|
115
103
|
export declare const DemandState: {
|
|
116
104
|
/** Not yet evaluated; a read of it suspends the reader so it can go first. */
|
|
117
105
|
readonly Unevaluated: 0;
|
|
@@ -30,12 +30,6 @@ export declare class CalculationContext implements IFormulaContext {
|
|
|
30
30
|
* single-cell read {@link getValueAt} falls back to. Constructing a reference is not a read.
|
|
31
31
|
*/
|
|
32
32
|
protected _onRead: ReadHook | null;
|
|
33
|
-
/**
|
|
34
|
-
* Receives the reads of references built on the DYNAMIC branch of {@link getReference} — the
|
|
35
|
-
* result of `OFFSET`/`INDIRECT`/`INDEX` — when {@link _onRead} is not armed. The executor arms
|
|
36
|
-
* it for the length of an ordinary pass so that a dynamic read landing on the evaluating cell
|
|
37
|
-
* is seen (DESIGN-CIRCULAR-CALC.md §5); `null` outside a pass.
|
|
38
|
-
*/
|
|
39
33
|
protected _dynamicRead: ReadHook | null;
|
|
40
34
|
/**
|
|
41
35
|
* Marks the evaluation in progress as having read its position, so its answer stands in for
|
|
@@ -85,17 +79,13 @@ export declare class CalculationContext implements IFormulaContext {
|
|
|
85
79
|
_initialize(transactions?: ITransaction.IStore): Promise<{
|
|
86
80
|
functions: IFunctionCollection;
|
|
87
81
|
}>;
|
|
82
|
+
_createScoped(sheet: string): CalculationContext | null;
|
|
88
83
|
/**
|
|
89
84
|
* @hidden
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* shared context resolves references through the mutable `CalcScope` the container owns, which
|
|
93
|
-
* only carries a grid while a formula is evaluating; a vended function called outside the
|
|
94
|
-
* graph needs a grid of its own. Shares every initialized part (runtime, functions, coercer) —
|
|
95
|
-
* only the scope object is new — and is NEVER used on the engine's evaluation path, which
|
|
96
|
-
* stays allocation-free on the shared instance.
|
|
85
|
+
* The workbook's context with no cell, for `IDeferContext.getFormulaContext`: shares every
|
|
86
|
+
* initialized part, as {@link _createScoped} does, and refuses what needs a cell.
|
|
97
87
|
*/
|
|
98
|
-
|
|
88
|
+
_createCellFree(): CalculationContext;
|
|
99
89
|
/** @inheritdoc IFormulaContext.getFunction */
|
|
100
90
|
getFunction(name: string): IFunction | null;
|
|
101
91
|
/**
|
|
@@ -182,29 +172,6 @@ export declare class CalculationContext implements IFormulaContext {
|
|
|
182
172
|
_expandSheetSpan(value: any): IRange.Coords[] | null;
|
|
183
173
|
/** @inheritdoc IFormulaContext.getResizedReference */
|
|
184
174
|
getResizedReference(anchor: Readonly<IRange.Coords>, rowCount: number, colCount: number): IReferenceRange;
|
|
185
|
-
/**
|
|
186
|
-
* Builds the {@link ReferenceRange} every {@link getReference} path returns.
|
|
187
|
-
*
|
|
188
|
-
* @remarks
|
|
189
|
-
* Coords that land off the grid cannot be formed into a reference at all, and `ReferenceRange`
|
|
190
|
-
* says so with an internal `OutOfBoundsError`. Left alone that escapes the calculation as a
|
|
191
|
-
* `#VALUE!` carrying the text "Out of bounds"; the formula-visible answer is `#REF!`, which is
|
|
192
|
-
* what {@link IFormulaContext.getReference} documents and what Excel answers for every consumer
|
|
193
|
-
* whose reference IS the result (`OFFSET` in all four directions, `INDIRECT` past the last
|
|
194
|
-
* row/column - probe-oob-getreference.ps1).
|
|
195
|
-
*
|
|
196
|
-
* A caller that reads a WINDOW rather than returning a reference - `SUMIF`'s `sum_range`,
|
|
197
|
-
* `LOOKUP`'s `result_vector`, both anchor-plus-length - goes through
|
|
198
|
-
* {@link getResizedReference} instead: Excel reads the part that fits rather than failing.
|
|
199
|
-
*
|
|
200
|
-
* This is the one place a reference is built on a formula's behalf, so it is where the read
|
|
201
|
-
* hook attaches: while {@link _onRead} is armed the reference is built over a
|
|
202
|
-
* {@link ReadObservedGrid} and every value it (or a view derived from it) opens is reported.
|
|
203
|
-
* Unarmed, a static reference's grid is used as is — the ordinary path pays nothing, not even a
|
|
204
|
-
* branch per read — while a `dynamic` one (the result of `OFFSET`/`INDIRECT`/`INDEX`, the rare
|
|
205
|
-
* path) reports to {@link _dynamicRead} when that is armed: a dynamic read that lands on the
|
|
206
|
-
* evaluating cell is a cycle on any path (design §5).
|
|
207
|
-
*/
|
|
208
175
|
private _toReference;
|
|
209
176
|
/** @inheritdoc IFormulaContext.getAddress */
|
|
210
177
|
getAddress(coords?: Readonly<IRange.FixableCoords | IRange.FixableCellCoords>, r1c1?: boolean): string;
|
|
@@ -13,26 +13,17 @@ export declare const CallState: {
|
|
|
13
13
|
readonly Closed: 3;
|
|
14
14
|
};
|
|
15
15
|
export type CallState = typeof CallState[keyof typeof CallState];
|
|
16
|
-
/**
|
|
17
|
-
* One `IFormulaContext.defer` at one site of one cell's formula (DESIGN-ASYNC §4.4): what the
|
|
18
|
-
* executor is handed, and what a later evaluation of the cell finds again by its ordinal.
|
|
19
|
-
*/
|
|
20
16
|
export declare class DeferredCall implements IFormulaContext.DeferredCall {
|
|
21
17
|
readonly id: number;
|
|
22
18
|
readonly executor: IFormulaContext.DeferExecutor;
|
|
23
19
|
readonly payload: unknown;
|
|
24
20
|
/** Which function made the call (its declaration), or `null` for one with none. */
|
|
25
21
|
readonly site: object | null;
|
|
26
|
-
/**
|
|
27
|
-
* The node whose evaluation made, last served, or now holds the call (DESIGN-ASYNC §4.5 settle
|
|
28
|
-
* step 1); `null` for an evaluation with no cell. A re-mint of the cell's node takes it over.
|
|
29
|
-
*/
|
|
30
22
|
owner: CalcNode | null;
|
|
31
23
|
state: CallState;
|
|
32
24
|
/** The most recent result; `undefined` until one arrives. */
|
|
33
25
|
latest: unknown;
|
|
34
26
|
protected _onCancel: (() => void)[] | null;
|
|
35
|
-
/** The port (DESIGN-ASYNC §4.9): told each time the latest moves. */
|
|
36
27
|
protected _onMoved: ((call: DeferredCall) => void) | null;
|
|
37
28
|
/** Told of the call's final answer: the manager, which holds the call only until then. */
|
|
38
29
|
protected _onFinal: ((call: DeferredCall) => void) | null;
|
|
@@ -40,7 +31,7 @@ export declare class DeferredCall implements IFormulaContext.DeferredCall {
|
|
|
40
31
|
protected _normalize: DeferredCalls.Normalize;
|
|
41
32
|
constructor(id: number, executor: IFormulaContext.DeferExecutor, payload: unknown, site: object | null, owner: CalcNode | null, onMoved?: ((call: DeferredCall) => void) | null, onFinal?: ((call: DeferredCall) => void) | null, normalize?: DeferredCalls.Normalize);
|
|
42
33
|
/** @inheritdoc IFormulaContext.DeferredCall.resolve */
|
|
43
|
-
resolve(value: unknown): void;
|
|
34
|
+
resolve(value: unknown, options?: IFormulaContext.DeferredCall.ResolveOptions): void;
|
|
44
35
|
/** @inheritdoc IFormulaContext.DeferredCall.reject */
|
|
45
36
|
reject(error: unknown): void;
|
|
46
37
|
/** @inheritdoc IFormulaContext.DeferredCall.onCancel */
|
|
@@ -54,7 +45,6 @@ export declare class DeferredCall implements IFormulaContext.DeferredCall {
|
|
|
54
45
|
protected _moved(): void;
|
|
55
46
|
protected _final(): void;
|
|
56
47
|
}
|
|
57
|
-
/** The default settle window (DESIGN-ASYNC §4.8): at most one settle pass per window. */
|
|
58
48
|
export declare const DefaultSettleWindow = 100;
|
|
59
49
|
/** What an evaluation that deferred leaves for the cell: its calls, and whether the root is the only one. */
|
|
60
50
|
export interface DeferredEvaluation {
|
|
@@ -67,14 +57,6 @@ export interface DeferredEvaluation {
|
|
|
67
57
|
* there when the cell is an anchor (the anchor cell itself holds the first element).
|
|
68
58
|
*/
|
|
69
59
|
export type HeldAt = (gridId: string, row: number, column: number) => AsyncValue<DeferredCall> | null;
|
|
70
|
-
/**
|
|
71
|
-
* The calls a calculation backend has made, the batch the evaluation in progress is collecting,
|
|
72
|
-
* and the state each executor keeps (DESIGN-ASYNC §4.3, §4.4).
|
|
73
|
-
*
|
|
74
|
-
* @remarks
|
|
75
|
-
* One per backend. Nothing here is touched by an evaluation that does not defer: the dispatch
|
|
76
|
-
* notices a deferral through {@link CalcScope.deferCount}, and only then asks this.
|
|
77
|
-
*/
|
|
78
60
|
export declare class DeferredCalls {
|
|
79
61
|
protected _scope: CalcScope;
|
|
80
62
|
protected _heldAt: HeldAt;
|
|
@@ -90,17 +72,12 @@ export declare class DeferredCalls {
|
|
|
90
72
|
protected _made: DeferredCall[];
|
|
91
73
|
/** The calls made since the last {@link flush}, by executor: each executor's batch. */
|
|
92
74
|
protected _batch: Map<IFormulaContext.DeferExecutor, DeferredCall[]>;
|
|
93
|
-
/** What each executor keeps between batches (`
|
|
75
|
+
/** What each executor keeps between batches (`IDeferContext.getState`). */
|
|
94
76
|
protected _states: Map<IFormulaContext.DeferExecutor, unknown>;
|
|
95
|
-
protected
|
|
77
|
+
protected _deferContext: IFormulaContext.IDeferContext;
|
|
96
78
|
protected _setCurrent: (executor: IFormulaContext.DeferExecutor | null) => void;
|
|
97
|
-
/**
|
|
98
|
-
* The port (DESIGN-ASYNC §4.9): the calls whose latest moved since the last settle pass took
|
|
99
|
-
* them. A set, so a bursting feed is one entry however often it posts: the latest is on the call.
|
|
100
|
-
*/
|
|
101
79
|
protected _moved: Set<DeferredCall>;
|
|
102
80
|
protected _onMoved: (call: DeferredCall) => void;
|
|
103
|
-
/** The settle pass, run on its own task at most once per window (DESIGN-ASYNC §4.8). */
|
|
104
81
|
protected _onSettle: (() => void) | null;
|
|
105
82
|
protected _settleWindow: number;
|
|
106
83
|
protected _settleTimer: ReturnType<typeof setTimeout> | null;
|
|
@@ -110,15 +87,11 @@ export declare class DeferredCalls {
|
|
|
110
87
|
/** The cells a settle marked for re-evaluation, scoped: the next pass's seeds, beside its own. */
|
|
111
88
|
protected _settleDirty: ISpatialMap.Entry[];
|
|
112
89
|
protected _normalize: DeferredCalls.Normalize;
|
|
113
|
-
/**
|
|
114
|
-
* Every site is served its call (a settle pass, or an evaluation waiting on its answers);
|
|
115
|
-
* otherwise only a running call is, and a stopped one is called again (DESIGN-ASYNC §4.5).
|
|
116
|
-
*/
|
|
117
90
|
protected _serving: boolean;
|
|
118
91
|
/** The batch the next {@link flush} hands out fetches past the workbook's cache (`CalculateOptions.external`). */
|
|
119
92
|
protected _external: boolean;
|
|
120
|
-
/** {@link
|
|
121
|
-
protected _reloadContext: IFormulaContext.
|
|
93
|
+
/** {@link _deferContext}, with a `fetch` that goes to the source. */
|
|
94
|
+
protected _reloadContext: IFormulaContext.IDeferContext;
|
|
122
95
|
/**
|
|
123
96
|
* The last answer the site's call gave for the same question, read by `IFormulaContext.defer`
|
|
124
97
|
* right after {@link defer}: `undefined` when there was none.
|
|
@@ -180,22 +153,6 @@ export declare class DeferredCalls {
|
|
|
180
153
|
* carries. From here on reads must look for holders.
|
|
181
154
|
*/
|
|
182
155
|
newHolder(value: Scalar | IRange, evaluation: DeferredEvaluation): AsyncValue<DeferredCall>;
|
|
183
|
-
/**
|
|
184
|
-
* Takes one `defer` from the evaluation in progress: the call this site made last time when the
|
|
185
|
-
* same function made it with an equal payload and it still stands, or a new one for the batch.
|
|
186
|
-
* It stands while it runs: a recalculation leaves it be. Once it has
|
|
187
|
-
* stopped, a recalculation calls the function again; only an answer landing ({@link setServing})
|
|
188
|
-
* serves a stopped call. Same function, not same executor: an inline executor is a new closure
|
|
189
|
-
* every evaluation, and is still served.
|
|
190
|
-
*
|
|
191
|
-
* @param site Which function is deferring (its declaration); `null` compares executors instead. The site's last call is the one the
|
|
192
|
-
* holder in its cell names at this ordinal, so a version of the grid brought back by an undo,
|
|
193
|
-
* or a cell moved by a shift, is answered by the call it was given.
|
|
194
|
-
* @param volatile The function declares itself volatile: it asks again on every evaluation,
|
|
195
|
-
* payload equal or not, as `RAND()` re-rolls (DESIGN-ASYNC §4.7).
|
|
196
|
-
* @returns The call the site was served, for the dispatch around the body to answer its latest
|
|
197
|
-
* in place of the body's return; `null` for a new call.
|
|
198
|
-
*/
|
|
199
156
|
defer(executor: IFormulaContext.DeferExecutor, payload: unknown, site?: object | null, volatile?: boolean): DeferredCall | null;
|
|
200
157
|
/**
|
|
201
158
|
* Ends the deferring evaluation in progress: its calls, by ordinal. Resets the scope's
|
|
@@ -207,11 +164,6 @@ export declare class DeferredCalls {
|
|
|
207
164
|
* keeping its calls: what it made never reaches an executor.
|
|
208
165
|
*/
|
|
209
166
|
abandonEvaluation(): void;
|
|
210
|
-
/**
|
|
211
|
-
* Runs every executor once with the calls the batch collected for it (DESIGN-ASYNC §4.3). Each
|
|
212
|
-
* in its own try: a throw, or a promise that rejects, fails the calls it has not settled and no
|
|
213
|
-
* other executor's.
|
|
214
|
-
*/
|
|
215
167
|
flush(): void;
|
|
216
168
|
/** Closes every open call and drops every batch and state: the backend is going away. */
|
|
217
169
|
close(): void;
|
|
@@ -234,13 +186,8 @@ export declare class DeferredCalls {
|
|
|
234
186
|
protected _siteCall(ordinal: number): DeferredCall | undefined;
|
|
235
187
|
}
|
|
236
188
|
export declare namespace DeferredCalls {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
* hold: an author's array (`[[1],[2]]`, DESIGN-ASYNC §7.3) becomes a range, and a one-cell
|
|
240
|
-
* range its scalar. The backend supplies it; a scalar or a multi-cell range passes as is.
|
|
241
|
-
*/
|
|
242
|
-
type Normalize = (value: unknown) => unknown;
|
|
243
|
-
/** What the backend lends an executor through its batch context; each omitted, a default. */
|
|
189
|
+
type Normalize = (value: unknown, options?: IFormulaContext.DeferredCall.ResolveOptions) => unknown;
|
|
190
|
+
/** What the backend lends an executor through its defer context; each omitted, a default. */
|
|
244
191
|
interface Services {
|
|
245
192
|
/** Makes rich values for the backend's workbook. Omitted, made outside any workbook. */
|
|
246
193
|
createRichData?: (type: string, data?: any) => IRichData;
|
|
@@ -250,11 +197,11 @@ export declare namespace DeferredCalls {
|
|
|
250
197
|
}) => object;
|
|
251
198
|
/** The workbook's fetch. Omitted, the global `fetch`. */
|
|
252
199
|
fetch?: (input: string, init?: RequestInit) => Promise<Response>;
|
|
200
|
+
/** The workbook's context with no cell. Omitted, asking for it throws. */
|
|
201
|
+
getFormulaContext?: () => IFormulaContext;
|
|
202
|
+
/** Reads delimited text as the workbook reads typed entry. Omitted, it rejects. */
|
|
203
|
+
parseText?: (text: string, options?: IFormulaContext.IDeferContext.ParseTextOptions) => Promise<Scalar[][]>;
|
|
253
204
|
}
|
|
254
205
|
}
|
|
255
|
-
/**
|
|
256
|
-
* Whether two payloads are the same question (DESIGN-ASYNC §4.3): `Object.is`, or for two plain
|
|
257
|
-
* objects or arrays, `Object.is` over their own enumerable values one level deep.
|
|
258
|
-
*/
|
|
259
206
|
export declare const samePayload: (a: unknown, b: unknown) => boolean;
|
|
260
207
|
//# sourceMappingURL=DeferredCalls.d.ts.map
|