@sheetxl/sdk 0.8.0-beta.1 → 0.8.0-beta.3
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 +1 -1
- package/browser/cjs/B0AS8k-hrSCBUlUY.cjs +1 -0
- package/browser/cjs/B308aXzcAYr1GN1c.cjs +1 -0
- package/browser/cjs/B44p8LIyxG3GtaGC.cjs +93 -0
- package/browser/cjs/{a0Z-SXs_N71CtqYb.cjs → D6YaqporVrSewZpm.cjs} +1 -1
- package/browser/cjs/DjWcveVCs0NFiKep.cjs +1 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/-OKDZ9cUBtkgD4Zr.mjs +20 -0
- package/browser/esm/8Nw0lKc4ISs7hEJT.mjs +70223 -0
- package/browser/esm/{DlPMeIyxT9tG_WDk.mjs → BmEEyMxNzlbXG98H.mjs} +2 -2
- package/browser/esm/BtdDRkWn-zCV3oic.mjs +394 -0
- package/browser/esm/DaCTT4vda0m8Fnxo.mjs +8 -0
- package/browser/esm/{B0HS42a7lga1k1U_.mjs → DvFKKE72ZA02l8iF.mjs} +1 -1
- package/browser/esm/{uyWBMSIxMlt8n5Z3.mjs → Z-dzbKvqaxll9l_t.mjs} +2 -2
- package/browser/esm/index.mjs +871 -696
- package/licenses/dependencies.txt +204 -204
- package/node/esm/{Cku7XiUvw1xrRasi.mjs → BpMTlTrJLWh_wJ5H.mjs} +1 -1
- package/node/esm/D5quDVovf1zjYBgJ.mjs +28 -0
- package/node/esm/DP0M3_S_dwLwRMiA.mjs +403 -0
- package/node/esm/DTHN_EkuOscW3f3B.mjs +8 -0
- package/node/esm/index.mjs +54375 -39377
- package/package.json +6 -7
- package/resources/locales/de/model.msg.json +45 -9
- package/resources/locales/en/model.msg.json +42 -9
- package/types/scripting-api.json +7094 -0
- package/types/scripting-enums.json +54 -8
- package/types/scripting.d.ts +6985 -1171
- package/types/src/anchored/AbstractAnchored.d.ts +18 -8
- package/types/src/anchored/AnchoredMap.d.ts +2 -0
- package/types/src/anchored/IAnchoredMap.d.ts +52 -4
- package/types/src/autoFill/AutoFill.d.ts +316 -32
- package/types/src/autoFill/IAutoFill.d.ts +232 -15
- package/types/src/border/{IBorder.d.ts → IBorders.d.ts} +41 -40
- package/types/src/border/index.d.ts +1 -1
- package/types/src/calculation/Calculation.d.ts +740 -35
- package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
- package/types/src/calculation/FormulaText.d.ts +74 -0
- package/types/src/calculation/ICalculation.d.ts +318 -81
- package/types/src/calculation/INamedFormulasCollection.d.ts +5 -8
- package/types/src/calculation/NamedFormulaCollection.d.ts +139 -107
- package/types/src/calculation/NamedLambdaFunction.d.ts +28 -0
- package/types/src/calculation/TokenType.d.ts +9 -0
- package/types/src/calculation/Types.d.ts +83 -2
- package/types/src/calculation/_CloneBoundary.d.ts +80 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +58 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +134 -12
- package/types/src/calculation/compiler/FormulaCompiler.d.ts +29 -4
- package/types/src/calculation/compiler/FormulaParser.d.ts +1 -2
- package/types/src/calculation/compiler/LiteTransform.d.ts +17 -0
- package/types/src/calculation/compiler/ParserUtils.d.ts +26 -1
- package/types/src/calculation/compiler/SRParser.d.ts +2 -1
- package/types/src/calculation/compiler/Types.d.ts +79 -9
- package/types/src/calculation/executor/CalcExecutor.d.ts +312 -33
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +43 -2
- package/types/src/calculation/executor/CircularReference.d.ts +2 -0
- package/types/src/calculation/formula/Formula.d.ts +58 -21
- package/types/src/calculation/formula/FormulaBlock.d.ts +124 -21
- package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +261 -67
- package/types/src/calculation/formula/LambdaValue.d.ts +15 -16
- package/types/src/calculation/formula/LazyValue.d.ts +96 -0
- package/types/src/calculation/formula/TokenUtils.d.ts +25 -1
- package/types/src/calculation/formula/index.d.ts +1 -0
- package/types/src/calculation/functions/FunctionDeclarations.d.ts +31 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +15 -2
- package/types/src/calculation/grid/CalcGrid.d.ts +384 -158
- package/types/src/calculation/grid/CalcGridBackend.d.ts +450 -0
- package/types/src/calculation/grid/CalcGridProxy.d.ts +133 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +62 -12
- package/types/src/calculation/grid/FormulaEntry.d.ts +129 -0
- package/types/src/calculation/grid/FormulaHost.d.ts +236 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +456 -143
- package/types/src/calculation/grid/_CalcRequest.d.ts +272 -0
- package/types/src/calculation/grid/index.d.ts +4 -0
- package/types/src/calculation/index.d.ts +2 -0
- package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +6 -2
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +339 -11
- package/types/src/calculation/spatial/SpillEntry.d.ts +20 -5
- package/types/src/calculation/spatial/TouchedWindows.d.ts +86 -0
- package/types/src/calculation/spatial/index.d.ts +1 -0
- package/types/src/calculation/state/CalcInputs.d.ts +41 -0
- package/types/src/calculation/state/CalcNode.d.ts +141 -30
- package/types/src/calculation/state/CalcScope.d.ts +37 -0
- package/types/src/calculation/state/CalcState.d.ts +22 -1
- package/types/src/calculation/state/CalculationContext.d.ts +36 -2
- package/types/src/calculation/state/IContextContainer.d.ts +129 -27
- package/types/src/calculation/state/_PendingOverlayGrid.d.ts +163 -0
- package/types/src/calculation/state/_ReadObservedGrid.d.ts +74 -8
- package/types/src/calculation/state/index.d.ts +1 -0
- package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +80 -0
- package/types/src/calculation/symbol/ISymbolRegistry.d.ts +23 -0
- package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +16 -2
- package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +63 -3
- package/types/src/calculation/symbol/SymbolRegistry.d.ts +20 -0
- package/types/src/calculation/symbol/index.d.ts +3 -2
- package/types/src/cell/ICell.d.ts +78 -23
- package/types/src/cell/ICellProtection.d.ts +50 -10
- package/types/src/cellRange/ICellRange.d.ts +329 -72
- package/types/src/cellRange/ICellRanges.d.ts +9 -7
- package/types/src/chart/Chart.d.ts +72 -2
- package/types/src/chart/ChartCollection.d.ts +26 -0
- package/types/src/chart/IChart.d.ts +162 -9
- package/types/src/chart/IChartCollection.d.ts +25 -0
- package/types/src/chart/_ChartXml.d.ts +70 -0
- package/types/src/chart/index.d.ts +1 -3
- package/types/src/collections/ArraysGrid.d.ts +1 -1
- package/types/src/collections/IGrid.d.ts +1 -1
- package/types/src/collections/ISparseGrid.d.ts +9 -0
- package/types/src/collections/ISpatialMap.d.ts +59 -21
- package/types/src/collections/ImmutableList.d.ts +28 -0
- package/types/src/collections/MixedTypedArrayList.d.ts +168 -108
- package/types/src/collections/OverlappingRangeIterator.d.ts +13 -17
- package/types/src/collections/RepeatingList.d.ts +7 -0
- package/types/src/collections/ScalarGrid.d.ts +50 -0
- package/types/src/collections/SparseGrid.d.ts +1 -1
- package/types/src/collections/SpatialMap.d.ts +13 -21
- package/types/src/collections/Tuple.d.ts +128 -16
- package/types/src/collections/_GridUtils.d.ts +19 -6
- package/types/src/collections/_RangeSweep.d.ts +97 -0
- package/types/src/collections/_SpatialUtils.d.ts +20 -2
- package/types/src/collections/index.d.ts +1 -0
- package/types/src/comment/Comment.d.ts +159 -0
- package/types/src/comment/CommentCollection.d.ts +40 -0
- package/types/src/comment/IComment.d.ts +319 -48
- package/types/src/comment/ICommentCollection.d.ts +90 -0
- package/types/src/comment/_CommentUtils.d.ts +28 -0
- package/types/src/comment/index.d.ts +1 -0
- package/types/src/condition/AnchoredConditional.d.ts +76 -17
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +8 -7
- package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +2 -1
- package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +3 -6
- package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +1 -1
- package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +7 -0
- package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +9 -0
- package/types/src/condition/Condition.d.ts +16 -0
- package/types/src/condition/ICondition.d.ts +86 -33
- package/types/src/condition/_ConditionFormula.d.ts +152 -0
- package/types/src/condition/_ConditionUtils.d.ts +73 -10
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +21 -10
- package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +5 -3
- package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
- package/types/src/dataValidation/DataValidation.d.ts +50 -3
- package/types/src/dataValidation/DataValidationCollection.d.ts +20 -9
- package/types/src/dataValidation/IDataValidation.d.ts +119 -30
- package/types/src/dataValidation/IDataValidationCollection.d.ts +10 -2
- package/types/src/date/DateUtils.d.ts +20 -0
- package/types/src/date/_DateUtils.d.ts +91 -7
- package/types/src/externalBook/ExternalBookCollection.d.ts +145 -12
- package/types/src/externalBook/ExternalBookName.d.ts +96 -0
- package/types/src/externalBook/IExternalBook.d.ts +170 -18
- package/types/src/externalBook/IExternalBookCollection.d.ts +79 -7
- package/types/src/externalBook/index.d.ts +1 -0
- package/types/src/fill/IStroke.d.ts +1 -1
- package/types/src/filter/IFilter.d.ts +29 -4
- package/types/src/font/IFont.d.ts +17 -0
- package/types/src/history/IHistory.d.ts +3 -2
- package/types/src/i18n/LanguagePack.d.ts +12 -4
- package/types/src/index.d.ts +3 -0
- package/types/src/io/AbstractBackingStore.d.ts +24 -1
- package/types/src/io/ArrayBackingStore.d.ts +1 -1
- package/types/src/io/EmbeddedPart.d.ts +20 -0
- package/types/src/io/IEmbeddedPart.d.ts +63 -0
- package/types/src/io/IWorkbookIO.d.ts +185 -18
- package/types/src/io/WorkbookIO.d.ts +9 -0
- package/types/src/io/WorkbookOrigin.d.ts +20 -11
- package/types/src/io/WorkbookOriginProvider.d.ts +46 -0
- package/types/src/io/_XmlFragment.d.ts +49 -0
- package/types/src/io/index.d.ts +1 -0
- package/types/src/lib/file/file.browser.d.ts +19 -5
- package/types/src/lib/file/file.node.d.ts +5 -0
- package/types/src/lib/utils/_Utils.d.ts +11 -0
- package/types/src/lib/utils/utils.browser.d.ts +9 -3
- package/types/src/license/license-key.d.ts +27 -0
- package/types/src/listener/IListener.d.ts +12 -7
- package/types/src/listener/ListenerEmitter.d.ts +46 -5
- package/types/src/model/AbstractModel.d.ts +14 -5
- package/types/src/movable/Control.d.ts +57 -0
- package/types/src/movable/IControl.d.ts +84 -0
- package/types/src/movable/IMovable.d.ts +23 -1
- package/types/src/movable/IMovableCollection.d.ts +2 -0
- package/types/src/movable/Movable.d.ts +4 -6
- package/types/src/movable/MovableCollection.d.ts +7 -7
- package/types/src/movable/index.d.ts +4 -0
- package/types/src/named/AbstractNamed.d.ts +1 -1
- package/types/src/named/INamed.d.ts +4 -1
- package/types/src/named/INamedCollection.d.ts +26 -0
- package/types/src/named/NamedCollection.d.ts +16 -15
- package/types/src/numFmt/BuiltInFormats.d.ts +15 -7
- package/types/src/numFmt/IFormatEngine.d.ts +2 -0
- package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
- package/types/src/person/IPerson.d.ts +99 -0
- package/types/src/person/IPersonCollection.d.ts +51 -0
- package/types/src/person/Person.d.ts +32 -0
- package/types/src/person/PersonCollection.d.ts +49 -0
- package/types/src/person/index.d.ts +3 -0
- package/types/src/picture/IPicture.d.ts +2 -0
- package/types/src/picture/Picture.d.ts +2 -0
- package/types/src/pivot/IPivotTable.d.ts +107 -0
- package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
- package/types/src/pivot/PivotTable.d.ts +57 -0
- package/types/src/pivot/PivotTableCollection.d.ts +25 -0
- package/types/src/pivot/index.d.ts +6 -0
- package/types/src/primitives/CompositeRangeStats.d.ts +2 -0
- package/types/src/primitives/Criteria.d.ts +1 -1
- package/types/src/primitives/LambdaBrand.d.ts +21 -0
- package/types/src/primitives/PrimitiveUtils.d.ts +56 -19
- package/types/src/primitives/Range.d.ts +102 -24
- package/types/src/primitives/RangeStats.d.ts +24 -1
- package/types/src/primitives/ReferenceRange.d.ts +42 -0
- package/types/src/primitives/Runtime.d.ts +15 -2
- package/types/src/primitives/stats/FrequencyStats.d.ts +9 -0
- package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
- package/types/src/primitives/stats/SortedNumbers.d.ts +2 -0
- package/types/src/primitives/stats/index.d.ts +1 -0
- package/types/src/print/IPrint.d.ts +0 -22
- package/types/src/protectedRange/IProtectedRange.d.ts +4 -0
- package/types/src/protectedRange/IProtectedRangeCollection.d.ts +2 -0
- package/types/src/protectedRange/ProtectedRange.d.ts +1 -4
- package/types/src/protectedRange/ProtectedRangeCollection.d.ts +19 -8
- package/types/src/protection/DefaultProtection.d.ts +12 -1
- package/types/src/protection/IProtection.d.ts +36 -2
- package/types/src/reference/ReferenceUtils.d.ts +80 -0
- package/types/src/reference/index.d.ts +2 -0
- package/types/src/resource/IResource.d.ts +21 -1
- package/types/src/resource/IResourceCollection.d.ts +9 -1
- package/types/src/resource/ResourceCollection.d.ts +6 -6
- package/types/src/scripting/FunctionCollection.d.ts +41 -11
- package/types/src/scripting/IFunctionCollection.d.ts +41 -0
- package/types/src/scripting/IModule.d.ts +25 -0
- package/types/src/scripting/IModuleCollection.d.ts +17 -0
- package/types/src/scripting/IScript.d.ts +18 -0
- package/types/src/scripting/Module.d.ts +34 -6
- package/types/src/scripting/ModuleCollection.d.ts +17 -12
- package/types/src/scripting/Runtime.d.ts +15 -0
- package/types/src/scripting/Scripts.d.ts +2 -0
- package/types/src/scripting/TypedFunction.d.ts +151 -18
- package/types/src/scripting/_FunctionIndex.d.ts +5 -0
- package/types/src/scripting/_ModuleUtils.d.ts +11 -1
- package/types/src/scripting/_ScriptUtils.d.ts +3 -0
- package/types/src/scripting/declarations.browser.d.ts +10 -0
- package/types/src/scripting/declarations.d.ts +49 -0
- package/types/src/scripting/declarations.node.d.ts +9 -0
- package/types/src/scripting/index.d.ts +3 -0
- package/types/src/selection/IRangeSelection.d.ts +9 -4
- package/types/src/selection/RangeSelection.d.ts +2 -0
- package/types/src/shape/IShape.d.ts +41 -3
- package/types/src/shape/Shape.d.ts +10 -0
- package/types/src/shape/_ShapeXml.d.ts +28 -0
- package/types/src/sheet/CellRegion.d.ts +6 -0
- package/types/src/sheet/ICellContainerOptions.d.ts +50 -0
- package/types/src/sheet/ISheet.d.ts +224 -41
- package/types/src/sheet/ISheetCollection.d.ts +2 -5
- package/types/src/sheet/NamedCellRange.d.ts +16 -7
- package/types/src/sheet/Sheet.d.ts +749 -114
- package/types/src/sheet/SheetCell.d.ts +81 -21
- package/types/src/sheet/SheetCollection.d.ts +19 -8
- package/types/src/sheet/SheetRange.d.ts +62 -14
- package/types/src/sheet/SheetRanges.d.ts +4 -6
- package/types/src/sheet/_CellBuffer.d.ts +214 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +5 -5
- package/types/src/sheet/_ListenerAnchor.d.ts +104 -0
- package/types/src/sheet/_RangeStateSweep.d.ts +16 -0
- package/types/src/sheet/_ScalarListFactory.d.ts +61 -0
- package/types/src/sheet/_SheetAutoFillUtils.d.ts +74 -0
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +2 -2
- package/types/src/sheet/_SheetEvents.d.ts +43 -0
- package/types/src/sheet/_SheetFilterUtils.d.ts +32 -1
- package/types/src/sheet/_SheetIntents.d.ts +250 -0
- package/types/src/sheet/_SheetMutations.d.ts +179 -59
- package/types/src/sheet/_SheetStateReader.d.ts +16 -10
- package/types/src/sheet/_SheetStateTypes.d.ts +57 -73
- package/types/src/sheet/_SheetUtils.d.ts +2 -18
- package/types/src/sheet/_WatchAnchor.d.ts +93 -0
- package/types/src/sheet/spatial/HeldFormulaEntry.d.ts +36 -0
- package/types/src/sheet/spatial/index.d.ts +1 -0
- package/types/src/sheet/style/SheetCellStyle.d.ts +91 -64
- package/types/src/sheet/style/SheetDirectStyle.d.ts +16 -5
- package/types/src/sheet/style/_Resolvers.d.ts +5 -3
- package/types/src/sheet/style/_StyleUtils.d.ts +37 -7
- package/types/src/sheetHeader/ISheetHeader.d.ts +2 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +14 -0
- package/types/src/sheetProtection/ISheetProtection.d.ts +41 -7
- package/types/src/sheetProtection/SheetProtection.d.ts +12 -0
- package/types/src/sheetView/ISheetView.d.ts +45 -1
- package/types/src/sheetView/SheetView.d.ts +11 -0
- package/types/src/slicer/ISlicer.d.ts +2 -0
- package/types/src/slicer/Slicer.d.ts +2 -0
- package/types/src/sort/ISort.d.ts +2 -0
- package/types/src/string/IStringCollection.d.ts +5 -0
- package/types/src/string/StringCollection.d.ts +6 -6
- package/types/src/style/INamedStyleCollection.d.ts +72 -0
- package/types/src/style/IStyle.d.ts +30 -10
- package/types/src/style/IStyleCollection.d.ts +63 -42
- package/types/src/style/ITableStyleCollection.d.ts +89 -0
- package/types/src/style/NamedStyleCollection.d.ts +39 -0
- package/types/src/style/StyleCollection.d.ts +41 -5
- package/types/src/style/TableStyleCollection.d.ts +49 -0
- package/types/src/style/_BuiltInStyleDefs.d.ts +3 -3
- package/types/src/style/index.d.ts +4 -0
- package/types/src/table/AnchoredTable.d.ts +644 -68
- package/types/src/table/AutoTable.d.ts +5 -5
- package/types/src/table/ITable.d.ts +228 -30
- package/types/src/table/ITableCollection.d.ts +2 -0
- package/types/src/table/TableCollection.d.ts +19 -8
- package/types/src/table/_FilterField.d.ts +7 -5
- package/types/src/table/_NamedTable.d.ts +17 -1
- package/types/src/table/_NamedTableSource.d.ts +1 -0
- package/types/src/table/_SortField.d.ts +2 -0
- package/types/src/table/_TableColumn.d.ts +13 -2
- package/types/src/table/_TableMessages.d.ts +1 -0
- package/types/src/table/_TableUtils.d.ts +40 -0
- package/types/src/text/Bullet.d.ts +4 -0
- package/types/src/text/ITextFrame.d.ts +25 -1
- package/types/src/text/TextBoxAlignment.d.ts +15 -6
- package/types/src/text/TextFrame.d.ts +4 -0
- package/types/src/text/TextLine.d.ts +4 -0
- package/types/src/text/TextParagraph.d.ts +4 -0
- package/types/src/text/TextRun.d.ts +9 -0
- package/types/src/text/TextStacked.d.ts +83 -0
- package/types/src/text/index.d.ts +1 -0
- package/types/src/theme/ITheme.d.ts +2 -0
- package/types/src/theme/IThemeCollection.d.ts +2 -0
- package/types/src/theme/ThemeCollection.d.ts +8 -7
- package/types/src/transaction/ITransaction.d.ts +238 -36
- package/types/src/transaction/Transaction.d.ts +99 -11
- package/types/src/type/AbstractCollection.d.ts +101 -0
- package/types/src/type/ICollection.d.ts +117 -0
- package/types/src/type/ITypes.d.ts +9 -7
- package/types/src/type/index.d.ts +1 -0
- package/types/src/utils/_CSSUtils.d.ts +3 -3
- package/types/src/workbook/IWorkbook.d.ts +171 -40
- package/types/src/workbook/Workbook.d.ts +103 -7
- package/types/src/workbook/_WorkbookIntents.d.ts +36 -0
- package/types/src/workbookProtection/IWorkbookProtection.d.ts +7 -0
- package/types/src/workbookProtection/WorkbookProtection.d.ts +3 -0
- package/types/src/workbookView/IWorkbookView.d.ts +12 -0
- package/types/src/workbookView/WorkbookView.d.ts +5 -0
- package/browser/cjs/BatsV2UUraVDCRXm.cjs +0 -57
- package/browser/cjs/CUz53T65cRGQRgvv.cjs +0 -33
- package/browser/cjs/DU0kYUtdFa3jK-im.cjs +0 -1
- package/browser/cjs/Dv4yIPLV98M5zLHa.cjs +0 -1
- package/browser/esm/6JKSOvc5czaQB2Bj.mjs +0 -109
- package/browser/esm/BtuJ9AGzeURtAsGo.mjs +0 -51241
- package/browser/esm/DGU6sM25u0EWCKl1.mjs +0 -824
- package/browser/esm/f2G3QRgEbvFJcoa2.mjs +0 -4436
- package/node/esm/-pxdn3M3tc6PLHs7.mjs +0 -114
- package/node/esm/0n5bslM9jhO1JnI2.mjs +0 -843
- package/types/src/cellRange/_GraphNode.d.ts +0 -38
- package/types/src/dataValidation/_Utils.d.ts +0 -10
- package/types/src/sheet/listener/RangesListener.d.ts +0 -32
- package/types/src/sheet/listener/RangesListenerEntry.d.ts +0 -19
- package/types/src/sheet/listener/index.d.ts +0 -3
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { FormulaError, IRange } from '@sheetxl/primitives';
|
|
1
|
+
import { FormulaError, IRange, Scalar } from '@sheetxl/primitives';
|
|
2
2
|
import { ISpatialMap } from '../../collections/ISpatialMap';
|
|
3
|
-
import {
|
|
3
|
+
import { SparseGrid } from '../../collections/SparseGrid';
|
|
4
|
+
import { IFormulaBlock, FormulaRecord } from '../formula';
|
|
4
5
|
import { CalcNode, IContextContainer } from '../state';
|
|
5
|
-
import { ReferenceCoords, SetReferenceOptions } from '../Types';
|
|
6
|
+
import { ReferenceCoords, SetReferenceOptions, PrecedentTemplate } from '../Types';
|
|
6
7
|
import { ICalculation } from '../ICalculation';
|
|
8
|
+
import { TouchedWindows } from './TouchedWindows';
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
10
|
+
* Carries each node's fixed (array-entered) extent from one block's nodes onto another's of the
|
|
11
|
+
* same shape, translated by the given offsets. Used wherever a block's nodes are re-minted fresh
|
|
12
|
+
* rather than cloned - a copy, or a re-image of the same block.
|
|
9
13
|
*/
|
|
14
|
+
export declare function copyFixedRefs(from: FormulaSpatialValue, to: FormulaSpatialValue, deltaCol?: number, deltaRow?: number): void;
|
|
10
15
|
export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.IUpdatableValue<FormulaSpatialValue> {
|
|
11
16
|
protected _container: IContextContainer;
|
|
12
17
|
gridId: string | null;
|
|
@@ -23,7 +28,39 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
23
28
|
*/
|
|
24
29
|
ref: IRange.Coords;
|
|
25
30
|
formula: IFormulaBlock | null;
|
|
26
|
-
|
|
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
|
+
calcs: CalcNode[][] | null;
|
|
47
|
+
/**
|
|
48
|
+
* A gated block's nodes, keyed by cell. **A node exists only where its cell has been touched**
|
|
49
|
+
* by a collection, is the representative, or is the anchor: a whole-column body over a few
|
|
50
|
+
* hundred data cells holds a few hundred nodes, and a whole-sheet one is possible at all. A
|
|
51
|
+
* sparse set of values that is looked up by cell, walked by rectangle, split, merged and
|
|
52
|
+
* shifted is what `SparseGrid` is; column-stored like the values grid, so a formula filled down
|
|
53
|
+
* a data column is one run. `null` until the first touch, as {@link calcs} is.
|
|
54
|
+
*/
|
|
55
|
+
protected _nodes: SparseGrid<CalcNode> | null;
|
|
56
|
+
/** Whether the nodes are held sparsely - a fact of the formula and the block's size, fixed at construction; {@link densify} turns it off. */
|
|
57
|
+
protected _sparse: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* The top-left node once it exists. It outlives a {@link release}: array entry is recorded on
|
|
60
|
+
* its `ext` (`fixedRef`), and a read of it alone ({@link getAnchorNode}) must not mint a dense
|
|
61
|
+
* block's every node. Placed back into whichever store is minted next.
|
|
62
|
+
*/
|
|
63
|
+
protected _anchor: CalcNode | null;
|
|
27
64
|
/**
|
|
28
65
|
* The precedent entries that were actually registered for this block.
|
|
29
66
|
*
|
|
@@ -57,10 +94,255 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
57
94
|
* `setReferenceAt` — which is exactly what a shift performs.
|
|
58
95
|
*/
|
|
59
96
|
readonly unanchored: boolean;
|
|
60
|
-
|
|
97
|
+
/**
|
|
98
|
+
* `true` when every cell of this block is its own 1x1 array-entered formula — the grid's
|
|
99
|
+
* {@link ICalcGrid.isArrayFirstCell}, read once at construction.
|
|
100
|
+
*
|
|
101
|
+
* @remarks
|
|
102
|
+
* Excel's rule for a conditional-format formula (DESIGN-LIFT-AND-DEMAND §2): the whole tree is
|
|
103
|
+
* array mode (`CalculationContext.isImplicitIntersect`), the tree is evaluated under a first-cell
|
|
104
|
+
* demand so a lift builds only `[0,0]` ({@link IFormulaBlock.demandFirstCell}), and the commit
|
|
105
|
+
* keeps `[0,0]` of a result that is still a range. Every cell therefore stores a scalar, which
|
|
106
|
+
* is what lets the blank region share one answer. No extent is recorded per node: the block is
|
|
107
|
+
* a property of the grid, and a sparse block stays sparse.
|
|
108
|
+
*/
|
|
109
|
+
readonly arrayFirstCell: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* How many static precedent edges each of this block's cells has — the same count at every
|
|
112
|
+
* cell, since they all run the one formula. What sizes a node's run of input slots.
|
|
113
|
+
*/
|
|
114
|
+
paramLength: number;
|
|
115
|
+
/**
|
|
116
|
+
* The block's edges in relative form, when they are the same rects at every cell's own offset
|
|
117
|
+
* ({@link IFormulaBlock.getPrecedentTemplate}); `null` when they are not. Under a template the
|
|
118
|
+
* nodes store no edge list at all — {@link getPrecedentsAt} materializes one on demand.
|
|
119
|
+
*/
|
|
120
|
+
protected _template: PrecedentTemplate | null;
|
|
121
|
+
/**
|
|
122
|
+
* {@link getPrecedentsAt}'s buffer, and the cell it currently holds. One per block, mutated in
|
|
123
|
+
* place, exactly like the executor's `_ReuseSearch*` coords and for the same reason: this is
|
|
124
|
+
* asked once per cell in each of the hot phases, and a fresh array there is the allocation the
|
|
125
|
+
* template exists to remove.
|
|
126
|
+
*
|
|
127
|
+
* The contract that makes it safe is the one those share — **the coords are valid until the
|
|
128
|
+
* next ask, so a caller reads them within its own loop and never holds one across a call that
|
|
129
|
+
* could ask again.** Every consumer does: the in-degree walk and `doEvaluate` finish a cell's
|
|
130
|
+
* edges before moving to the next (and `doEvaluate` copies the one it keeps, into
|
|
131
|
+
* `ReferenceRange`), and the lazy reads that run DURING an evaluation ask for the cell being
|
|
132
|
+
* evaluated, which is the cell already in the buffer.
|
|
133
|
+
*/
|
|
134
|
+
protected _scratch: (IRange.Coords | FormulaError.Known)[] | null;
|
|
135
|
+
/**
|
|
136
|
+
* The persistent coords object behind each edge of {@link _scratch}, carrying the `$` marks the
|
|
137
|
+
* template stamps once. Held separately because a slot of `_scratch` can be an ERROR — a range
|
|
138
|
+
* whose endpoints cannot be unioned — and the object has to be there to write into next time.
|
|
139
|
+
*/
|
|
140
|
+
protected _scratchCoords: IRange.FixableCoords[] | null;
|
|
141
|
+
protected _scratchRow: number;
|
|
142
|
+
protected _scratchCol: number;
|
|
143
|
+
/**
|
|
144
|
+
* Blank-aware evaluation (PLAN-WATCHES-BLANK-AWARE §4): the block's touched windows, cached per
|
|
145
|
+
* collection ({@link getTouched}), and what the pass decided about the blank region's
|
|
146
|
+
* representative. Per block INSTANCE — a block is re-minted on every edit, shift and split, so
|
|
147
|
+
* none of this survives a change to the block, and none of it has to.
|
|
148
|
+
*/
|
|
149
|
+
protected _touched: TouchedWindows | null;
|
|
150
|
+
protected _touchedCycleId: number;
|
|
151
|
+
protected _touchedMarkId: number;
|
|
152
|
+
/** The collection {@link forEachTouchedNode} last minted the touched nodes for. */
|
|
153
|
+
protected _touchedMintedCycleId: number;
|
|
154
|
+
protected _touchedMintedMarkId: number;
|
|
155
|
+
/**
|
|
156
|
+
* The node standing for the blank region — its first cell — as of the last {@link getTouched};
|
|
157
|
+
* `null` when the block has no blank cell, or was never asked.
|
|
158
|
+
*/
|
|
159
|
+
representative: CalcNode | null;
|
|
160
|
+
/** The representative's finalized scalar, shared with the blank region as runs; see {@link blankCycleId}. */
|
|
161
|
+
blankValue: Scalar | undefined;
|
|
162
|
+
/** The cycle and plan mark {@link blankValue} was written under; a plan that has not written it yet does. */
|
|
163
|
+
blankCycleId: number;
|
|
164
|
+
blankMarkId: number;
|
|
165
|
+
/**
|
|
166
|
+
* The blank rectangles {@link blankValue} was last written over, in a grid other formulas read;
|
|
167
|
+
* `null` before the first share and after a pass that evaluated the region cell by cell. What a
|
|
168
|
+
* later share is compared against to find the cells whose value it moved; {@link getTouched}
|
|
169
|
+
* takes out the cells that have become touched since, which hold their own values again.
|
|
170
|
+
*/
|
|
171
|
+
blankShared: readonly IRange.Coords[] | null;
|
|
172
|
+
/** The blank partition {@link blankShared} was last brought in line with; set with it. */
|
|
173
|
+
protected _blankSharedAgainst: readonly IRange.Coords[] | null;
|
|
174
|
+
/** Records what a share covered, or `null` when the region goes back to per-cell values. */
|
|
175
|
+
setBlankShared(blank: readonly IRange.Coords[] | null): void;
|
|
176
|
+
/**
|
|
177
|
+
* The pass refused to share the representative's answer for a reason the text hides — a
|
|
178
|
+
* position read, a draw, a computed reference (`CalcScope.perCellRead`). Those are facts of the
|
|
179
|
+
* formula, so the block keeps per-cell evaluation for good rather than paying one wasted
|
|
180
|
+
* representative evaluation and a second plan iteration every pass.
|
|
181
|
+
*/
|
|
182
|
+
blankRefused: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* The cycle whose representative could not stand for the region for a reason that may not
|
|
185
|
+
* recur — a range result, a cycle role, a promise: the block is evaluated per cell for the rest
|
|
186
|
+
* of that pass only.
|
|
187
|
+
*/
|
|
188
|
+
blankFallbackCycleId: number;
|
|
189
|
+
/**
|
|
190
|
+
* Loaded with cells that carried no cached value (`CalcGridBackend._seedNow`'s repair). Such a cell
|
|
191
|
+
* has never been evaluated, and it was not ENTERED either, so Excel gives it no entry
|
|
192
|
+
* evaluation: joining a cycle, it starts the sweeps from `""` (DESIGN-CIRCULAR-CALC §2.4).
|
|
193
|
+
* Read only where the grid holds nothing for the cell — once evaluated, the value is the start.
|
|
194
|
+
* Carried through the rebuilds that keep the nodes (shift, split, merge), not by a copy.
|
|
195
|
+
*/
|
|
196
|
+
uncalculated: boolean;
|
|
197
|
+
constructor(coords: IRange.Coords, gridId: string | null, formula: IFormulaBlock | null, container: IContextContainer, unanchored: boolean, nodes?: FormulaSpatialValue.NodeSource[]);
|
|
198
|
+
/** Every source block's nodes, at this block's cells - see {@link FormulaSpatialValue.NodeSource}. */
|
|
199
|
+
getNodeSource(): FormulaSpatialValue.NodeSource[];
|
|
200
|
+
/** Whether the nodes are held sparsely - see {@link _nodes}. */
|
|
201
|
+
isSparse(): boolean;
|
|
202
|
+
/** The node at the block's top-left, minted alone if the block has none yet. */
|
|
203
|
+
getAnchorNode(): CalcNode;
|
|
204
|
+
/** The node at an absolute cell, or `null` when the cell is outside the block or has no node. */
|
|
205
|
+
nodeAtOrNull(row: number, col: number): CalcNode | null;
|
|
206
|
+
/**
|
|
207
|
+
* The node at an absolute cell inside the block, minted now if the block has none there: a
|
|
208
|
+
* sparse block mints the one cell, a dense block its whole array.
|
|
209
|
+
*
|
|
210
|
+
* @remarks
|
|
211
|
+
* For one cell. A rectangle of cells goes through {@link mintNodesIn}, which writes them in one
|
|
212
|
+
* run rather than one at a time.
|
|
213
|
+
*/
|
|
214
|
+
nodeAt(row: number, col: number): CalcNode;
|
|
215
|
+
/** The sparse store, created now, holding the anchor when one is already minted. */
|
|
216
|
+
protected _newSparseStore(): SparseGrid<CalcNode>;
|
|
217
|
+
/** The dense array, minted now over every cell, keeping the anchor already minted. */
|
|
218
|
+
protected _mintDense(): CalcNode[][];
|
|
219
|
+
/** The static edges a fresh node of this block stores at a cell - what {@link _createCalcs} gives every cell. */
|
|
220
|
+
protected _freshPrecedents(row: number, col: number): CalcNode['precedents'];
|
|
221
|
+
/**
|
|
222
|
+
* Drops the nodes. Called as the block leaves its map, so the maps of earlier commits, which
|
|
223
|
+
* still hold it, do not hold a generation of nodes with it. The anchor stays (see
|
|
224
|
+
* {@link _anchor}); everything else is minted again on the first touch after a restore.
|
|
225
|
+
*/
|
|
226
|
+
release(): void;
|
|
227
|
+
/**
|
|
228
|
+
* Visits the nodes that EXIST inside a rectangle (absolute, clipped to the block). For a dense
|
|
229
|
+
* block that is every cell of it; for a sparse one, the touched cells and the representative.
|
|
230
|
+
*/
|
|
231
|
+
forEachNodeIn(rowFrom: number, rowTo: number, colFrom: number, colTo: number, fn: (node: CalcNode) => void): void;
|
|
232
|
+
/**
|
|
233
|
+
* Visits EVERY cell of a rectangle (absolute, clipped to the block), minting the nodes a sparse
|
|
234
|
+
* block lacks first - in one write per call, column-major, as the store keeps them. This is
|
|
235
|
+
* how a cell comes to have a node: a collection found it touched, or a discovery walk found it
|
|
236
|
+
* reading a formula.
|
|
237
|
+
*/
|
|
238
|
+
mintNodesIn(rowFrom: number, rowTo: number, colFrom: number, colTo: number, fn: (node: CalcNode) => void): void;
|
|
239
|
+
/** Visits every node the block has. */
|
|
240
|
+
forEachNode(fn: (node: CalcNode) => void): void;
|
|
241
|
+
/**
|
|
242
|
+
* The static precedent edges of the cell at (`row`, `col`), absolute — the same answer
|
|
243
|
+
* `resolvedPrecedentsAt` gives, translated from the block's template rather than resolved.
|
|
244
|
+
*
|
|
245
|
+
* @remarks
|
|
246
|
+
* Only meaningful on a block that HAS a template; `nodePrecedents` is what decides. The answer
|
|
247
|
+
* is the block's shared buffer — see {@link _scratch} for how long it stays valid.
|
|
248
|
+
*/
|
|
249
|
+
getPrecedentsAt(row: number, col: number): (IRange.Coords | FormulaError.Known)[];
|
|
250
|
+
/**
|
|
251
|
+
* Whether the pass may evaluate ONE cell of this block's blank region and share its answer with
|
|
252
|
+
* the rest (PLAN-WATCHES-BLANK-AWARE §4) — the block-level gate over the formula's compile-time
|
|
253
|
+
* one ({@link isBlankCacheable}).
|
|
254
|
+
*
|
|
255
|
+
* @remarks
|
|
256
|
+
* A template is the shape the touched predicate needs (one relative edge per reference, the
|
|
257
|
+
* same at every cell); an array-entered block has its own fitted write; a one-cell block has
|
|
258
|
+
* nothing to share. The two pass-side verdicts — {@link blankRefused}, {@link blankFallbackCycleId}
|
|
259
|
+
* — close the gate after the fact.
|
|
260
|
+
*/
|
|
261
|
+
isBlankAware(cycleId: number): boolean;
|
|
262
|
+
/**
|
|
263
|
+
* The block's touched windows for one collection — computed on first ask, from the grids its
|
|
264
|
+
* relative edges land on, and answered from the cache for the rest of the collection. Sets
|
|
265
|
+
* {@link representative} to the first blank cell's node (`null` when there is none).
|
|
266
|
+
*
|
|
267
|
+
* @remarks
|
|
268
|
+
* Keyed by `markId` as well as `cycleId`: a pass re-collects after a spill grows or shrinks, and
|
|
269
|
+
* the content a cell reads may have changed by then — a spill body is content — so the answer
|
|
270
|
+
* is recomputed for each collection, never carried across one.
|
|
271
|
+
*/
|
|
272
|
+
getTouched(cycleId: number, markId: number): TouchedWindows;
|
|
273
|
+
/**
|
|
274
|
+
* Visits the touched cells of one collection, then the representative when the block has a
|
|
275
|
+
* blank region: what an input that is the same for every cell of the block reaches.
|
|
276
|
+
*
|
|
277
|
+
* @remarks
|
|
278
|
+
* The touched nodes are minted on the first ask of a collection. A touched cell need not have a
|
|
279
|
+
* node yet — a block loaded with its values was never collected — and walking only the nodes
|
|
280
|
+
* that exist would leave such a cell stale.
|
|
281
|
+
*/
|
|
282
|
+
forEachTouchedNode(cycleId: number, markId: number, fn: (node: CalcNode) => void): void;
|
|
283
|
+
/** The last {@link getTouched} answer, whatever collection it was for; `null` before the first. */
|
|
284
|
+
getTouchedCached(): TouchedWindows | null;
|
|
285
|
+
/**
|
|
286
|
+
* The answer the block's blank cells share, and where they are. `null` while no representative
|
|
287
|
+
* has been shared, or once the block is evaluated per cell for good.
|
|
288
|
+
*
|
|
289
|
+
* @remarks
|
|
290
|
+
* The rectangles are the LAST collection's, which may be newer than the value: a cell that was
|
|
291
|
+
* blank then and is touched now has been evaluated and written since, and a stored value is read
|
|
292
|
+
* ahead of this — so the region only ever answers for cells nothing was written to.
|
|
293
|
+
*/
|
|
294
|
+
getBlankRegion(): FormulaSpatialValue.BlankRegion | null;
|
|
295
|
+
/**
|
|
296
|
+
* What a cell of `coords` that the grid does not store reads as: the blank region's shared
|
|
297
|
+
* value when a region is shared and `coords` lie inside the block, `null` otherwise.
|
|
298
|
+
*
|
|
299
|
+
* @remarks
|
|
300
|
+
* Inside the block a cell the grid lacks IS a blank-region cell — a touched cell has been evaluated
|
|
301
|
+
* and written (a committed empty as `null`), and the region is what is left — so a body in a
|
|
302
|
+
* grid nobody else reads (a watch's, a one-shot evaluation's) writes nothing for the region and
|
|
303
|
+
* a `Range` over it answers the region as its empty value, by omission rather than by
|
|
304
|
+
* rectangle. Outside the block nothing is shared, and `coords` wider than the block get `null`:
|
|
305
|
+
* a watch reads over its location, which is the block's extent once the two are reconciled.
|
|
306
|
+
*/
|
|
307
|
+
getBlankValueWithin(coords: IRange.Coords): Scalar;
|
|
308
|
+
/**
|
|
309
|
+
* Keeps the nodes densely from now on.
|
|
310
|
+
*
|
|
311
|
+
* @remarks
|
|
312
|
+
* A sparse block holds a node only where a cell is touched, which is the right store while the
|
|
313
|
+
* blank-aware gate is open. Once the gate has closed for good — a per-cell read refused it
|
|
314
|
+
* ({@link blankRefused}), or the anchor took a fixed extent — every collection reaches every
|
|
315
|
+
* cell, and minting those through the store pays its per-node bookkeeping for nothing. Both
|
|
316
|
+
* verdicts are permanent, so this happens at most once per block, and the block is then what a
|
|
317
|
+
* per-cell block always was. The nodes that exist are MOVED, not cloned: the pass that closed
|
|
318
|
+
* the gate may be holding them.
|
|
319
|
+
*/
|
|
320
|
+
densify(): void;
|
|
61
321
|
protected _createCalcs(formula: IFormulaBlock | null, gridId: string | null, coords: IRange.Coords): CalcNode[][];
|
|
62
|
-
|
|
63
|
-
|
|
322
|
+
/** A fresh node for a cell of this block. */
|
|
323
|
+
protected _newNode(cellRow: number, cellCol: number, gridId: string | null, cellPrecedents: CalcNode['precedents']): CalcNode;
|
|
324
|
+
/**
|
|
325
|
+
* The static edges a cloned or minted node of a non-templated block stores; `null` under a
|
|
326
|
+
* template. The top-left's answer doubles as `paramLength`, so it is resolved once per clone.
|
|
327
|
+
*/
|
|
328
|
+
protected _clonePrecedents(cellRow: number, cellCol: number, topLeft: CalcNode['precedents']): CalcNode['precedents'];
|
|
329
|
+
/**
|
|
330
|
+
* `original` re-minted as this block's node for (`cellRow`, `cellCol`): the same value, promise
|
|
331
|
+
* and cycle state, fresh slots and stamps - a new position, so nothing that described the old
|
|
332
|
+
* one is kept.
|
|
333
|
+
*/
|
|
334
|
+
protected _cloneNode(original: CalcNode, cellRow: number, cellCol: number, gridId: string | null | undefined, cellPrecedents: CalcNode['precedents']): CalcNode;
|
|
335
|
+
/** The source node for this block's cell (`i`, `j`), whichever source holds it; `null` for none. */
|
|
336
|
+
protected _sourceNodeAt(sources: FormulaSpatialValue.NodeSource[], i: number, j: number): CalcNode | null;
|
|
337
|
+
/** A dense node array over this block, each cell cloned from its source node or minted fresh. */
|
|
338
|
+
protected _cloneDense(sources: FormulaSpatialValue.NodeSource[], gridId: string | null | undefined): CalcNode[][];
|
|
339
|
+
/** This block's sparse nodes: every source node whose cell lands inside the block, cloned there. */
|
|
340
|
+
protected _cloneSparse(sources: FormulaSpatialValue.NodeSource[], gridId: string | null | undefined): void;
|
|
341
|
+
/**
|
|
342
|
+
* @param coords The extent to serialize as. Defaults to the block's own; a caller that has
|
|
343
|
+
* coalesced adjacent equal blocks passes the merged extent, whose anchor is this block's.
|
|
344
|
+
*/
|
|
345
|
+
toJSON(r1c1?: boolean, coords?: IRange.Coords): [coords: string, text: string];
|
|
64
346
|
getCoords(): IRange.Coords;
|
|
65
347
|
/** {@inheritDoc ISpatialMap.IUpdatableValue.getShifted} */
|
|
66
348
|
getShifted(options: ISpatialMap.ShiftDetails<this>): ISpatialMap.Entry<this> | null;
|
|
@@ -83,29 +365,54 @@ export declare class FormulaSpatialValue implements IFormulaBlock, ISpatialMap.I
|
|
|
83
365
|
/** {@inheritDoc IFormulaBlock.getTokensAt} */
|
|
84
366
|
getTokensAt(row: number, column: number, evalIndex?: number): ICalculation.FormulaToken[];
|
|
85
367
|
/** {@inheritDoc IFormulaBlock.getTextAt} */
|
|
86
|
-
getTextAt(row: number, column: number, r1c1?: boolean,
|
|
368
|
+
getTextAt(row: number, column: number, r1c1?: boolean, evalIndex?: number, target?: ICalculation.FormulaTarget): string;
|
|
369
|
+
/** {@inheritDoc IFormulaBlock.getNode} */
|
|
370
|
+
getNode(): ICalculation.FormulaNode | null;
|
|
87
371
|
/** {@inheritDoc IFormulaBlock.resolvedPrecedentsAt} */
|
|
88
372
|
resolvedPrecedentsAt(row: number, column: number, includeInvalidIntersect?: boolean, verticalAbs?: boolean[], horizontalAbs?: boolean[]): readonly (Readonly<IRange.FixableCoords> | FormulaError.Known)[];
|
|
373
|
+
/** {@inheritDoc IFormulaBlock.getPrecedentTemplate} */
|
|
374
|
+
getPrecedentTemplate(): PrecedentTemplate | null;
|
|
89
375
|
/** {@inheritDoc IFormulaBlock.getReferences} */
|
|
90
376
|
getReferences(row: number, column: number): ReferenceCoords[];
|
|
377
|
+
/** {@inheritDoc IFormulaBlockView.getReferencesAt} */
|
|
378
|
+
getReferencesAt(row: number, column: number): ReferenceCoords[];
|
|
379
|
+
/** {@inheritDoc IFormulaBlock.getFormatReferences} */
|
|
380
|
+
getFormatReferences(): IRange.FixableCoords[];
|
|
91
381
|
/** {@inheritDoc IFormulaBlock.getReferenceAt} */
|
|
92
382
|
getReferenceAt(row: number, column: number, index: number): ReferenceCoords;
|
|
93
383
|
/** {@inheritDoc IFormulaBlock.setReferenceAt} */
|
|
94
384
|
setReferenceAt(index: number, reference: ReferenceCoords, options?: SetReferenceOptions): this;
|
|
385
|
+
/**
|
|
386
|
+
* This block over fresh calc nodes: what {@link setReferenceAt} mints when it rewrites a
|
|
387
|
+
* reference, for a slot whose text does not change.
|
|
388
|
+
*
|
|
389
|
+
* @remarks
|
|
390
|
+
* A structured reference resolves through its table, so a shift that moves the cells it designates
|
|
391
|
+
* leaves its text alone. Its node still has to be re-minted like any other whose precedent moved:
|
|
392
|
+
* a node's input slot holds the reference range it last read, and a stale one would serve the
|
|
393
|
+
* pre-shift cells for as long as nothing writes into the range.
|
|
394
|
+
*/
|
|
395
|
+
remint(): this;
|
|
95
396
|
/** {@inheritDoc IFormulaBlock.reanchorReferences} */
|
|
96
397
|
reanchorReferences(toGridId: string, force?: boolean): this;
|
|
97
|
-
/** {@inheritDoc IFormulaBlock.
|
|
98
|
-
|
|
398
|
+
/** {@inheritDoc IFormulaBlock.replaceScopeIds} */
|
|
399
|
+
replaceScopeIds(fromScopeId: string | null, toScopeId: string | null): this;
|
|
99
400
|
/** {@inheritDoc IFormulaBlock.wrapImplicit} */
|
|
100
401
|
wrapImplicit(rowIndex: number, colIndex: number, setSpillCells: Set<string>): this;
|
|
101
402
|
/** {@inheritDoc IFormulaBlock.getError} */
|
|
102
403
|
getError(): FormulaError.Parse | null;
|
|
404
|
+
/** {@inheritDoc IFormulaBlock.getRecord} */
|
|
405
|
+
getRecord(): FormulaRecord;
|
|
103
406
|
/** {@inheritDoc IFormulaBlock.getNamedIds} */
|
|
104
407
|
getNamedIds(): string[];
|
|
105
408
|
/** {@inheritDoc IFormulaBlock.getReferencedSymbolIds} */
|
|
106
409
|
getReferencedSymbolIds(): string[];
|
|
107
410
|
/** {@inheritDoc IFormulaBlock.hasTotals} */
|
|
108
411
|
hasTotals(): boolean;
|
|
412
|
+
/** {@inheritDoc IFormulaBlock.isBlankCacheable} */
|
|
413
|
+
isBlankCacheable(arrayMode?: boolean): boolean;
|
|
414
|
+
/** {@inheritDoc IFormulaBlock.demandFirstCell} */
|
|
415
|
+
demandFirstCell(): void;
|
|
109
416
|
/** @inheritdoc IFormulaBlock.isReferenceOnly */
|
|
110
417
|
isReferenceOnly(): boolean;
|
|
111
418
|
/** {@inheritDoc IFormulaBlock.isEquals} */
|
|
@@ -117,4 +424,25 @@ export interface FormulaCopyToOptions extends ISpatialMap.CopyOptions {
|
|
|
117
424
|
*/
|
|
118
425
|
cutFrom?: IRange.Coords;
|
|
119
426
|
}
|
|
427
|
+
export declare namespace FormulaSpatialValue {
|
|
428
|
+
/**
|
|
429
|
+
* Where a block being built takes its nodes from: the source block's cell
|
|
430
|
+
* (`originRow + i`, `originCol + j`), in the source's own block coordinates, is the new
|
|
431
|
+
* block's cell (`i`, `j`). A split reads one source at an offset; a merge reads two, the
|
|
432
|
+
* second at a negative origin; a shift, re-image or re-anchor reads the block itself at
|
|
433
|
+
* (0, 0). A cell no source holds gets a fresh node.
|
|
434
|
+
*/
|
|
435
|
+
interface NodeSource {
|
|
436
|
+
readonly block: FormulaSpatialValue;
|
|
437
|
+
readonly originRow: number;
|
|
438
|
+
readonly originCol: number;
|
|
439
|
+
}
|
|
440
|
+
/** See {@link FormulaSpatialValue.getBlankRegion}. */
|
|
441
|
+
interface BlankRegion {
|
|
442
|
+
/** The representative's finalized scalar. */
|
|
443
|
+
readonly value: Scalar | undefined;
|
|
444
|
+
/** The blank rectangles, in the block's own grid coordinates. */
|
|
445
|
+
readonly rects: readonly IRange.Coords[];
|
|
446
|
+
}
|
|
447
|
+
}
|
|
120
448
|
//# sourceMappingURL=FormulaSpatialValue.d.ts.map
|
|
@@ -6,10 +6,10 @@ import { ISpatialMap } from '../../collections';
|
|
|
6
6
|
*
|
|
7
7
|
* There are three {@link ITypes.FormulaArrayKind | kinds}:
|
|
8
8
|
* * `dynamic` - the extent was derived from the result during a calculation cycle.
|
|
9
|
-
* * `
|
|
10
|
-
*
|
|
11
|
-
* * `
|
|
12
|
-
*
|
|
9
|
+
* * `error` - the spill was blocked. This can arise either from a direct input via the api or
|
|
10
|
+
* from a collision detected during a calculation cycle.
|
|
11
|
+
* * `fixed` - an array-entered (Ctrl+Shift+Enter) block, whose extent is authoritative rather than
|
|
12
|
+
* derived. Degenerate 1x1 fixed entries are legal and meaningful.
|
|
13
13
|
*/
|
|
14
14
|
export declare class SpillEntry {
|
|
15
15
|
private _c;
|
|
@@ -21,11 +21,26 @@ export declare class SpillEntry {
|
|
|
21
21
|
getKind(): ITypes.FormulaArrayKind;
|
|
22
22
|
getError(): boolean;
|
|
23
23
|
/**
|
|
24
|
-
* True for
|
|
24
|
+
* True for an array-entered block, whose extent must not be re-derived from the result.
|
|
25
25
|
*/
|
|
26
26
|
isFixed(): boolean;
|
|
27
27
|
getCoords(): IRange.Coords;
|
|
28
28
|
setError(error: boolean, cycleId: number): ISpatialMap.Entry<this>;
|
|
29
|
+
/**
|
|
30
|
+
* Refuses a shift that would change part of a fixed block - Excel's "You can't change part of
|
|
31
|
+
* an array." A block the shift lands entirely before or after translates whole; a delete that
|
|
32
|
+
* swallows the whole block deletes it; anything that would split, trim, or grow it throws.
|
|
33
|
+
*
|
|
34
|
+
* @param intersect The inserted or deleted range, in pre-shift coordinates.
|
|
35
|
+
* @param isColumn `true` for a column shift (left/right), `false` for a row shift (up/down).
|
|
36
|
+
* @param isInsert `true` for an insert, `false` for a delete.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Called from {@link getShifted}, and hoisted ahead of the maps' shift by the callers that lift
|
|
40
|
+
* intersecting spills before shifting (`markFixedSpills`), which would otherwise never hand a
|
|
41
|
+
* partially covered block to this node.
|
|
42
|
+
*/
|
|
43
|
+
checkShift(intersect: IRange.Coords, isColumn: boolean, isInsert: boolean): void;
|
|
29
44
|
/**
|
|
30
45
|
* Translate the coordinates of the spill
|
|
31
46
|
*/
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { IRange, Scalar } from '@sheetxl/primitives';
|
|
2
|
+
import { ISparseGrid } from '../../collections';
|
|
3
|
+
import { PrecedentTemplate } from '../Types';
|
|
4
|
+
/**
|
|
5
|
+
* What the touched-window predicate reads of one grid a block's edges land on.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* A shadow grid (a watch body) hands over the grid it SHADOWS: its own results are not content the
|
|
9
|
+
* body reads, and must not inflate the bounds. Never the sheet's used range — that unions borders,
|
|
10
|
+
* fills, merges and tables, and a shadow grid has no sheet of its own.
|
|
11
|
+
*
|
|
12
|
+
* The `bounds` handed to either query are the predicate's own scratch coords, valid for the call:
|
|
13
|
+
* read them, never keep them.
|
|
14
|
+
*/
|
|
15
|
+
export interface TouchedGrid {
|
|
16
|
+
/**
|
|
17
|
+
* The grid's values — `getCoords()` is the value bounds ("where any constant or result lives"),
|
|
18
|
+
* `getRuns` its content runs.
|
|
19
|
+
*/
|
|
20
|
+
readonly values: ISparseGrid<Scalar>;
|
|
21
|
+
/**
|
|
22
|
+
* The extents of every formula block intersecting `bounds`, in this grid. A formula cell whose
|
|
23
|
+
* current result is empty is still not blank: it can change within the pass.
|
|
24
|
+
*/
|
|
25
|
+
searchFormulas(bounds: IRange.Coords): readonly IRange.Coords[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The cells of a block partitioned by whether any RELATIVE precedent region of theirs holds
|
|
29
|
+
* content. Both lists are disjoint rectangles in the block's own coordinates, sorted row-major,
|
|
30
|
+
* and together they tile the block exactly.
|
|
31
|
+
*/
|
|
32
|
+
export interface TouchedWindows {
|
|
33
|
+
/** The cells whose relative inputs hold content, or land on a formula cell. */
|
|
34
|
+
readonly touched: readonly IRange.Coords[];
|
|
35
|
+
/** The complement within the block: every cell here evaluates to the representative's value. */
|
|
36
|
+
readonly blank: readonly IRange.Coords[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The touched windows of a block — which of its cells have content, or a formula cell, in any
|
|
40
|
+
* relative precedent region of theirs — and, by complement, its blank region. A pure function of
|
|
41
|
+
* the block's precedent template and of the referenced grids' content; it never visits a cell,
|
|
42
|
+
* and allocates nothing but its answer.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* Two cuts per relative edge, in order, both O(things that exist):
|
|
46
|
+
*
|
|
47
|
+
* - **Bounds.** The referenced grid's value bounds (`getCoords()`), mapped back through the edge
|
|
48
|
+
* to the block cells that could read them and clipped to the block. Empty means every cell of
|
|
49
|
+
* the block reads past all content through this edge, and nothing more is asked.
|
|
50
|
+
* - **Content.** The grid's runs over what those cells can read, each mapped back the same way. A
|
|
51
|
+
* run is one rectangle however long, so a dense column costs one rectangle, not a million.
|
|
52
|
+
*
|
|
53
|
+
* Unioned with the extents of the formula blocks the edge can land on, mapped back the same way:
|
|
54
|
+
* a formula cell whose result is empty right now can change within the pass, so a cell reading it
|
|
55
|
+
* is not blank.
|
|
56
|
+
*
|
|
57
|
+
* An absolute edge (`$B$1` — both axes fixed) is the same input for every cell and does not
|
|
58
|
+
* partition; it is skipped. Anchoring is per axis and per endpoint: `$A13` varies by row only, so
|
|
59
|
+
* its content maps to whole rows of the block.
|
|
60
|
+
*
|
|
61
|
+
* The bounds cut counts formula RESULTS as content, and a block's own cells write results — so for
|
|
62
|
+
* `=A1=B1` down column C the bounds say every row is touched, and only the content cut over A and
|
|
63
|
+
* B finds them blank. A watch body is the other way round: its results live in a shadow grid, so
|
|
64
|
+
* the bounds alone shrink a whole-column `$A13` to the sheet's rows. Both cuts are needed.
|
|
65
|
+
*
|
|
66
|
+
* Refused outright (the whole block reported touched): an edge on a grid `resolveGrid` cannot
|
|
67
|
+
* answer, a range edge whose endpoints name different grids, and a mixed-anchored axis that could
|
|
68
|
+
* invert inside the block.
|
|
69
|
+
*
|
|
70
|
+
* @param template The block's precedent template — one relative edge per static reference.
|
|
71
|
+
* @param block The block's extent, in its own grid's coordinates.
|
|
72
|
+
* @param resolveGrid The grid an edge's scope names; `null` for the block's own grid.
|
|
73
|
+
*/
|
|
74
|
+
export declare function computeTouchedWindows(template: PrecedentTemplate, block: IRange.Coords, resolveGrid: (scope: string | null) => TouchedGrid | null): TouchedWindows;
|
|
75
|
+
/** Whether two window lists tile the same cells the same way; both are in the predicate's order. */
|
|
76
|
+
export declare const sameWindows: (a: readonly IRange.Coords[], b: readonly IRange.Coords[]) => boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Appends to `out` the parts of `window` that none of `holes` covers, as disjoint rectangles.
|
|
79
|
+
*
|
|
80
|
+
* @remarks
|
|
81
|
+
* Each hole that meets a piece replaces it with what is left above, below, left and right of the
|
|
82
|
+
* overlap. The pieces a hole leaves cannot meet that hole again, so they are appended behind the
|
|
83
|
+
* walk, which runs backwards over the pieces that were there when the hole was taken up.
|
|
84
|
+
*/
|
|
85
|
+
export declare const subtractWindows: (window: IRange.Coords, holes: readonly IRange.Coords[], out: IRange.Coords[]) => void;
|
|
86
|
+
//# sourceMappingURL=TouchedWindows.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CalcNode } from './CalcNode';
|
|
2
|
+
/**
|
|
3
|
+
* The backing array. Valid until the next {@link reserveInputs} that grows it, so read it once per node
|
|
4
|
+
* rather than holding it across a phase.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getInputValues: () => any[];
|
|
7
|
+
/** Drops every reservation. Called once per mark phase, before any node is given slots. */
|
|
8
|
+
export declare const resetInputs: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Empties the arena — every reservation dropped AND every slot cleared. Called when a pass
|
|
11
|
+
* finishes.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* The clearing is the point, and it is not tidiness. A range-typed slot holds a `ReferenceRange`,
|
|
15
|
+
* which holds the grid it reads; a scalar slot can hold a spilled `IRange`. Left in place those
|
|
16
|
+
* outlive the pass that made them, and the arena is module scope — so the last pass over a
|
|
17
|
+
* workbook would pin that workbook's grids for as long as the process lives, or until some later
|
|
18
|
+
* pass happened to reserve over the same slots. {@link reserveInputs} clears what it hands out,
|
|
19
|
+
* which covers correctness but not this: a pass that plans ten nodes after one that planned a
|
|
20
|
+
* million rewrites ten slots and leaves 999,990 pinned.
|
|
21
|
+
*/
|
|
22
|
+
export declare const releaseInputs: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Gives `node` a run of `length` cleared slots and records the offset on it. `length` is the
|
|
25
|
+
* node's precedent count; a node with none is given `-1`, which every accessor reads as empty.
|
|
26
|
+
*/
|
|
27
|
+
export declare const reserveInputs: (node: CalcNode, length: number) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Slot `index` of `node`, or `undefined` where the node holds no slots — a node with no
|
|
30
|
+
* precedents, and one no mark phase has reached (the temporary formula `Calculation.evaluate`
|
|
31
|
+
* builds), whose reads are meant to fall through to the grid.
|
|
32
|
+
*/
|
|
33
|
+
export declare const getInputAt: (node: CalcNode, index: number) => any;
|
|
34
|
+
/** Writes slot `index` of `node`. A node holding no slots is written nowhere, as it has nothing to read back. */
|
|
35
|
+
export declare const setInputAt: (node: CalcNode, index: number, value: any) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Clears `node`'s slots in place — what a demand evaluation does before reading every precedent
|
|
38
|
+
* lazily, since nothing was pushed to it.
|
|
39
|
+
*/
|
|
40
|
+
export declare const clearInputs: (node: CalcNode, length: number) => void;
|
|
41
|
+
//# sourceMappingURL=CalcInputs.d.ts.map
|