@sheetxl/sdk 0.7.27 → 0.7.28-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/THIRD-PARTY-NOTICES.md +34 -0
- package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +1 -0
- package/browser/cjs/BG7YDVxiC4ErxvF1.cjs +1 -0
- package/browser/cjs/BREMLtxkQhtNSVra.cjs +1 -0
- package/browser/cjs/CQf4zxkBmheTVbjX.cjs +57 -0
- package/browser/cjs/DoemwsUQoGCk0vBK.cjs +33 -0
- package/browser/cjs/Dv3x6zut1ZRUt3IF.cjs +10 -0
- package/browser/cjs/_c2uwwpr03Y7lzIj.cjs +1 -0
- package/browser/cjs/index.cjs +3 -6
- package/browser/esm/BxIOX1TojvA-1ZZP.mjs +14 -0
- package/browser/esm/CB_4gdPPPruwremH.mjs +49989 -0
- package/browser/esm/CZO1RubmqnJV96rq.mjs +503 -0
- package/browser/esm/DN4d5bDBkti28wuc.mjs +818 -0
- package/browser/esm/DPOelA1J3WHbMXyh.mjs +109 -0
- package/browser/esm/DRWu3TmcE9JFf78V.mjs +4436 -0
- package/browser/esm/index.mjs +3225 -62
- package/browser/esm/vHWuKF-ftK7LM1uw.mjs +24 -0
- package/licenses/dependencies.txt +74 -193
- package/node/esm/B-tgcZihStNV9CbZ.mjs +22 -0
- package/node/esm/C8tfYGL3wHy9IDDc.mjs +114 -0
- package/node/esm/XQhP3dYwF_tEuswB.mjs +837 -0
- package/node/esm/index.mjs +53604 -23262
- package/package.json +19 -14
- package/resources/contents.json +21 -0
- package/resources/locales/contents.json +19 -0
- package/resources/locales/de/grammar.json +16 -0
- package/resources/locales/de/model.msg.json +510 -0
- package/resources/locales/en/model.msg.json +525 -0
- package/types/index.d.ts +2 -21294
- package/types/scripting-enums.json +1009 -0
- package/types/scripting.d.ts +26540 -31455
- package/types/src/address/AddressUtils.d.ts +252 -0
- package/types/src/address/_AddressMessages.d.ts +7 -0
- package/types/src/address/index.d.ts +35 -0
- package/types/src/anchored/AbstractAnchored.d.ts +200 -0
- package/types/src/anchored/Anchored.d.ts +154 -0
- package/types/src/anchored/AnchoredMap.d.ts +178 -0
- package/types/src/anchored/IAnchored.d.ts +118 -0
- package/types/src/anchored/IAnchoredMap.d.ts +207 -0
- package/types/src/anchored/_AnchorMessages.d.ts +3 -0
- package/types/src/anchored/index.d.ts +2 -0
- package/types/src/autoFill/AutoFill.d.ts +161 -0
- package/types/src/autoFill/IAutoFill.d.ts +117 -0
- package/types/src/autoFill/index.d.ts +3 -0
- package/types/src/border/IBorder.d.ts +284 -0
- package/types/src/border/index.d.ts +2 -0
- package/types/src/calculation/Calculation.d.ts +440 -0
- package/types/src/calculation/FormulaLiterals.d.ts +18 -0
- package/types/src/calculation/ICalculation.d.ts +1016 -0
- package/types/src/calculation/INamedFormulasCollection.d.ts +141 -0
- package/types/src/calculation/NamedFormulaCollection.d.ts +671 -0
- package/types/src/calculation/TokenType.d.ts +117 -0
- package/types/src/calculation/Types.d.ts +110 -0
- package/types/src/calculation/_CalculationMessages.d.ts +3 -0
- package/types/src/calculation/builtInNames.d.ts +2 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +180 -0
- package/types/src/calculation/compiler/CompilerLocale.d.ts +69 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +331 -0
- package/types/src/calculation/compiler/FormulaCompiler.d.ts +69 -0
- package/types/src/calculation/compiler/FormulaLexer.d.ts +85 -0
- package/types/src/calculation/compiler/FormulaParser.d.ts +270 -0
- package/types/src/calculation/compiler/FormulaSeparators.d.ts +35 -0
- package/types/src/calculation/compiler/LiteTransform.d.ts +15 -0
- package/types/src/calculation/compiler/ParserUtils.d.ts +167 -0
- package/types/src/calculation/compiler/SRLexer.d.ts +19 -0
- package/types/src/calculation/compiler/SRParser.d.ts +38 -0
- package/types/src/calculation/compiler/Types.d.ts +274 -0
- package/types/src/calculation/compiler/index.d.ts +3 -0
- package/types/src/calculation/executor/CalcExecutor.d.ts +115 -0
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +11 -0
- package/types/src/calculation/executor/index.d.ts +3 -0
- package/types/src/calculation/formula/Formula.d.ts +168 -0
- package/types/src/calculation/formula/FormulaBlock.d.ts +207 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +181 -0
- package/types/src/calculation/formula/LambdaValue.d.ts +166 -0
- package/types/src/calculation/formula/TokenUtils.d.ts +26 -0
- package/types/src/calculation/formula/index.d.ts +4 -0
- package/types/src/calculation/functions/Operators.d.ts +30 -0
- package/types/src/calculation/functions/index.d.ts +2 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +22 -0
- package/types/src/calculation/grid/CalcGrid.d.ts +205 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +172 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +500 -0
- package/types/src/calculation/grid/index.d.ts +3 -0
- package/types/src/calculation/index.d.ts +5 -0
- package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +25 -0
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +120 -0
- package/types/src/calculation/spatial/PrecedentSpatialValue.d.ts +115 -0
- package/types/src/calculation/spatial/SpillEntry.d.ts +40 -0
- package/types/src/calculation/spatial/index.d.ts +5 -0
- package/types/src/calculation/state/CalcNode.d.ts +71 -0
- package/types/src/calculation/state/CalcScope.d.ts +35 -0
- package/types/src/calculation/state/CalcState.d.ts +28 -0
- package/types/src/calculation/state/CalculationContext.d.ts +125 -0
- package/types/src/calculation/state/IContextContainer.d.ts +320 -0
- package/types/src/calculation/state/index.d.ts +6 -0
- package/types/src/calculation/symbol/FunctionSymbolProvider.d.ts +44 -0
- package/types/src/calculation/symbol/ISymbolRegistry.d.ts +93 -0
- package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +144 -0
- package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +18 -0
- package/types/src/calculation/symbol/SymbolRegistry.d.ts +19 -0
- package/types/src/calculation/symbol/TableColumnSymbolProvider.d.ts +21 -0
- package/types/src/calculation/symbol/TableSymbolProvider.d.ts +19 -0
- package/types/src/calculation/symbol/index.d.ts +9 -0
- package/types/src/cell/ICell.d.ts +672 -0
- package/types/src/cell/ICellHeader.d.ts +142 -0
- package/types/src/cell/ICellProtection.d.ts +41 -0
- package/types/src/cell/index.d.ts +4 -0
- package/types/src/cellRange/ICellHeaderRange.d.ts +306 -0
- package/types/src/cellRange/ICellHeaderRanges.d.ts +107 -0
- package/types/src/cellRange/ICellRange.d.ts +2509 -0
- package/types/src/cellRange/ICellRanges.d.ts +407 -0
- package/types/src/cellRange/ICellRegion.d.ts +133 -0
- package/types/src/cellRange/_GraphNode.d.ts +38 -0
- package/types/src/cellRange/index.d.ts +6 -0
- package/types/src/chart/Chart.d.ts +53 -0
- package/types/src/chart/IChart.d.ts +42 -0
- package/types/src/chart/index.d.ts +5 -0
- package/types/src/collections/ArraysGrid.d.ts +72 -0
- package/types/src/collections/BooleanList.d.ts +67 -0
- package/types/src/collections/GridMap.d.ts +47 -0
- package/types/src/collections/HashMap.d.ts +15 -0
- package/types/src/collections/IGrid.d.ts +278 -0
- package/types/src/collections/IList.d.ts +89 -0
- package/types/src/collections/IMap.d.ts +45 -0
- package/types/src/collections/IReadableList.d.ts +120 -0
- package/types/src/collections/ISortedMap.d.ts +171 -0
- package/types/src/collections/ISparseGrid.d.ts +61 -0
- package/types/src/collections/ISparseList.d.ts +103 -0
- package/types/src/collections/ISpatialMap.d.ts +515 -0
- package/types/src/collections/ISpatialMap3D.d.ts +116 -0
- package/types/src/collections/IWritableList.d.ts +41 -0
- package/types/src/collections/ImmutableList.d.ts +52 -0
- package/types/src/collections/IteratorUtils.d.ts +91 -0
- package/types/src/collections/MixedTypedArrayList.d.ts +140 -0
- package/types/src/collections/OverlappingRangeIterator.d.ts +91 -0
- package/types/src/collections/RTree.d.ts +111 -0
- package/types/src/collections/RepeatingList.d.ts +20 -0
- package/types/src/collections/SortedMap.d.ts +396 -0
- package/types/src/collections/SparseGrid.d.ts +99 -0
- package/types/src/collections/SparseList.d.ts +90 -0
- package/types/src/collections/SpatialMap.d.ts +102 -0
- package/types/src/collections/SpatialMap3D.d.ts +64 -0
- package/types/src/collections/Tuple.d.ts +160 -0
- package/types/src/collections/_CollectionUtils.d.ts +25 -0
- package/types/src/collections/_GridUtils.d.ts +268 -0
- package/types/src/collections/_RunUtils.d.ts +170 -0
- package/types/src/collections/_SpatialUtils.d.ts +115 -0
- package/types/src/collections/index.d.ts +21 -0
- package/types/src/color/Color.d.ts +120 -0
- package/types/src/color/ColorSpace.d.ts +45 -0
- package/types/src/color/IColor.d.ts +1110 -0
- package/types/src/color/_BuiltInIndexDefs.d.ts +4 -0
- package/types/src/color/_BuiltInNamedDefs.d.ts +29 -0
- package/types/src/color/_BuiltInSchemeDefs.d.ts +7 -0
- package/types/src/color/_ColorUtils.d.ts +93 -0
- package/types/src/color/index.d.ts +3 -0
- package/types/src/comment/IComment.d.ts +108 -0
- package/types/src/comment/index.d.ts +2 -0
- package/types/src/condition/AnchoredConditional.d.ts +263 -0
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +83 -0
- package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/AndOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/BlankOperator.d.ts +9 -0
- package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +11 -0
- package/types/src/condition/BuiltInOperators/ErrorOperator.d.ts +9 -0
- package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +17 -0
- package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/IconOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +14 -0
- package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/NotOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/OrOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +13 -0
- package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +12 -0
- package/types/src/condition/BuiltInOperators/UniqueOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/ValidEmailOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/ValidUrlOperator.d.ts +8 -0
- package/types/src/condition/BuiltInOperators/index.d.ts +59 -0
- package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +43 -0
- package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +14 -0
- package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +12 -0
- package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +16 -0
- package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +14 -0
- package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +14 -0
- package/types/src/condition/BuiltinSelectors/index.d.ts +18 -0
- package/types/src/condition/Condition.d.ts +123 -0
- package/types/src/condition/ICondition.d.ts +915 -0
- package/types/src/condition/_ConditionUtils.d.ts +190 -0
- package/types/src/condition/index.d.ts +3 -0
- package/types/src/conditionalFormat/ConditionalEntry.d.ts +20 -0
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +190 -0
- package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +20 -0
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +518 -0
- package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +70 -0
- package/types/src/conditionalFormat/_ConditionalMessages.d.ts +2 -0
- package/types/src/conditionalFormat/index.d.ts +3 -0
- package/types/src/dataValidation/DataValidation.d.ts +121 -0
- package/types/src/dataValidation/DataValidationCollection.d.ts +20 -0
- package/types/src/dataValidation/IDataValidation.d.ts +327 -0
- package/types/src/dataValidation/IDataValidationCollection.d.ts +63 -0
- package/types/src/dataValidation/_DataValidationMessages.d.ts +2 -0
- package/types/src/dataValidation/_Utils.d.ts +10 -0
- package/types/src/dataValidation/index.d.ts +3 -0
- package/types/src/date/DateUtils.d.ts +8 -0
- package/types/src/date/_DateUtils.d.ts +122 -0
- package/types/src/date/index.d.ts +2 -0
- package/types/src/externalBook/ExternalBookCollection.d.ts +36 -0
- package/types/src/externalBook/IExternalBook.d.ts +97 -0
- package/types/src/externalBook/IExternalBookCollection.d.ts +29 -0
- package/types/src/externalBook/index.d.ts +3 -0
- package/types/src/fill/IEffect.d.ts +389 -0
- package/types/src/fill/IFill.d.ts +597 -0
- package/types/src/fill/IStroke.d.ts +265 -0
- package/types/src/fill/_BuiltInPatterns.d.ts +27 -0
- package/types/src/fill/index.d.ts +4 -0
- package/types/src/filter/IFilter.d.ts +83 -0
- package/types/src/filter/index.d.ts +2 -0
- package/types/src/font/CanvasFontMeasurer.d.ts +25 -0
- package/types/src/font/ExtendedTextMetrics.d.ts +1 -0
- package/types/src/font/Font.d.ts +19 -0
- package/types/src/font/FontKitFontMeasurer.d.ts +11 -0
- package/types/src/font/FontUtils.d.ts +9 -0
- package/types/src/font/IFont.d.ts +261 -0
- package/types/src/font/IFontCollection.d.ts +31 -0
- package/types/src/font/SimpleFontMeasurer.d.ts +4 -0
- package/types/src/font/_FontUtils.d.ts +22 -0
- package/types/src/font/index.d.ts +5 -0
- package/types/src/history/IHistory.d.ts +110 -0
- package/types/src/history/index.d.ts +2 -0
- package/types/src/hyperlink/IHyperlink.d.ts +96 -0
- package/types/src/hyperlink/_Hyperlink.d.ts +21 -0
- package/types/src/hyperlink/index.d.ts +2 -0
- package/types/src/i18n/LanguagePack.d.ts +97 -0
- package/types/src/i18n/LocaleProfile.d.ts +15 -0
- package/types/src/i18n/_CurrencyData.d.ts +20 -0
- package/types/src/i18n/functionLocales.d.ts +6 -0
- package/types/src/i18n/index.d.ts +4 -0
- package/types/src/i18n/locales.d.ts +3 -0
- package/types/src/index.d.ts +71 -0
- package/types/src/io/AbstractBackingStore.d.ts +53 -0
- package/types/src/io/ArrayBackingStore.d.ts +34 -0
- package/types/src/io/IWorkbookIO.d.ts +1322 -0
- package/types/src/io/WorkbookIO.d.ts +91 -0
- package/types/src/io/WorkbookOrigin.d.ts +114 -0
- package/types/src/io/WorkbookRegistry.d.ts +49 -0
- package/types/src/io/index.d.ts +5 -0
- package/types/src/lib/file/file.browser.d.ts +41 -0
- package/types/src/lib/file/file.node.d.ts +25 -0
- package/types/src/lib/utils/_Utils.d.ts +20 -0
- package/types/src/lib/utils/banner.d.ts +6 -0
- package/types/src/lib/utils/utils.browser.d.ts +28 -0
- package/types/src/lib/utils/utils.node.d.ts +42 -0
- package/types/src/license/LicenseDetails.d.ts +22 -0
- package/types/src/license/LicenseManager.d.ts +63 -0
- package/types/src/license/index.d.ts +3 -0
- package/types/src/license/license-key.d.ts +33 -0
- package/types/src/listener/IListener.d.ts +62 -0
- package/types/src/listener/ListenerEmitter.d.ts +47 -0
- package/types/src/listener/index.d.ts +2 -0
- package/types/src/model/AbstractModel.d.ts +90 -0
- package/types/src/model/IModel.d.ts +108 -0
- package/types/src/model/_ModelMessages.d.ts +2 -0
- package/types/src/model/index.d.ts +3 -0
- package/types/src/movable/CustomElement.d.ts +42 -0
- package/types/src/movable/ICustomElement.d.ts +29 -0
- package/types/src/movable/IGroup.d.ts +30 -0
- package/types/src/movable/IMovable.d.ts +327 -0
- package/types/src/movable/IMovableCollection.d.ts +129 -0
- package/types/src/movable/IMovableSelection.d.ts +49 -0
- package/types/src/movable/Movable.d.ts +221 -0
- package/types/src/movable/MovableCollection.d.ts +29 -0
- package/types/src/movable/_MovableUtils.d.ts +4 -0
- package/types/src/movable/index.d.ts +4 -0
- package/types/src/named/AbstractNamed.d.ts +41 -0
- package/types/src/named/INamed.d.ts +225 -0
- package/types/src/named/INamedCollection.d.ts +230 -0
- package/types/src/named/NamedCollection.d.ts +302 -0
- package/types/src/named/_BuiltInNamed.d.ts +6 -0
- package/types/src/named/index.d.ts +3 -0
- package/types/src/numFmt/BuiltInFormats.d.ts +49 -0
- package/types/src/numFmt/IFormatEngine.d.ts +149 -0
- package/types/src/numFmt/NumberFormatBuilder.d.ts +46 -0
- package/types/src/numFmt/NumberFormatParser.d.ts +168 -0
- package/types/src/numFmt/NumberFormatStyles.d.ts +43 -0
- package/types/src/numFmt/NumberFormatType.d.ts +79 -0
- package/types/src/numFmt/NumfmtFormatEngine.d.ts +33 -0
- package/types/src/numFmt/_BuiltInNumberFormats.d.ts +12 -0
- package/types/src/numFmt/_FormatCell.d.ts +52 -0
- package/types/src/numFmt/_NumFmtUtils.d.ts +102 -0
- package/types/src/numFmt/index.d.ts +105 -0
- package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +15 -0
- package/types/src/numFmt/vendor/numfmt/index.d.ts +721 -0
- package/types/src/picture/IPicture.d.ts +69 -0
- package/types/src/picture/Picture.d.ts +67 -0
- package/types/src/picture/index.d.ts +2 -0
- package/types/src/primitives/CompositeRangeStats.d.ts +63 -0
- package/types/src/primitives/Criteria.d.ts +35 -0
- package/types/src/primitives/FormulaContext.d.ts +2 -0
- package/types/src/primitives/PrimitiveUtils.d.ts +255 -0
- package/types/src/primitives/Range.d.ts +221 -0
- package/types/src/primitives/RangeStats.d.ts +48 -0
- package/types/src/primitives/ReferenceRange.d.ts +19 -0
- package/types/src/primitives/Runtime.d.ts +55 -0
- package/types/src/primitives/ScalarCollation.d.ts +174 -0
- package/types/src/primitives/TextFold.d.ts +62 -0
- package/types/src/primitives/_PrimitiveMessages.d.ts +3 -0
- package/types/src/primitives/index.d.ts +7 -0
- package/types/src/primitives/stats/AggregateStats.d.ts +119 -0
- package/types/src/primitives/stats/Cancellation.d.ts +43 -0
- package/types/src/primitives/stats/FrequencyStats.d.ts +94 -0
- package/types/src/primitives/stats/Ranked.d.ts +26 -0
- package/types/src/primitives/stats/ScalarOrder.d.ts +18 -0
- package/types/src/primitives/stats/SortedNumbers.d.ts +48 -0
- package/types/src/primitives/stats/index.d.ts +7 -0
- package/types/src/print/IPrint.d.ts +234 -0
- package/types/src/print/index.d.ts +2 -0
- package/types/src/protectedRange/IProtectedRange.d.ts +239 -0
- package/types/src/protectedRange/IProtectedRangeCollection.d.ts +73 -0
- package/types/src/protectedRange/ProtectedRange.d.ts +101 -0
- package/types/src/protectedRange/ProtectedRangeCollection.d.ts +21 -0
- package/types/src/protectedRange/index.d.ts +3 -0
- package/types/src/protection/DefaultProtection.d.ts +43 -0
- package/types/src/protection/IProtection.d.ts +170 -0
- package/types/src/protection/PasswordHasher.d.ts +35 -0
- package/types/src/protection/index.d.ts +6 -0
- package/types/src/resource/IResource.d.ts +98 -0
- package/types/src/resource/IResourceCollection.d.ts +96 -0
- package/types/src/resource/Resource.d.ts +39 -0
- package/types/src/resource/ResourceCollection.d.ts +19 -0
- package/types/src/resource/_ResourceMessages.d.ts +4 -0
- package/types/src/resource/index.d.ts +5 -0
- package/types/src/resource/resourceKinds.d.ts +23 -0
- package/types/src/richData/index.d.ts +1 -0
- package/types/src/scripting/FunctionCollection.d.ts +88 -0
- package/types/src/scripting/IFunctionCollection.d.ts +208 -0
- package/types/src/scripting/IModule.d.ts +82 -0
- package/types/src/scripting/IModuleCollection.d.ts +79 -0
- package/types/src/scripting/IScript.d.ts +289 -0
- package/types/src/scripting/ITypedFunction.d.ts +61 -0
- package/types/src/scripting/MacroFunction.d.ts +15 -0
- package/types/src/scripting/Module.d.ts +39 -0
- package/types/src/scripting/ModuleCollection.d.ts +56 -0
- package/types/src/scripting/Runtime.d.ts +16 -0
- package/types/src/scripting/Scripts.d.ts +79 -0
- package/types/src/scripting/TypedFunction.d.ts +161 -0
- package/types/src/scripting/_FunctionIndex.d.ts +111 -0
- package/types/src/scripting/_FunctionMessages.d.ts +6 -0
- package/types/src/scripting/_ModuleUtils.d.ts +5 -0
- package/types/src/scripting/_ScriptUtils.d.ts +18 -0
- package/types/src/scripting/enumManifest.browser.d.ts +9 -0
- package/types/src/scripting/enumManifest.node.d.ts +13 -0
- package/types/src/scripting/index.d.ts +4 -0
- package/types/src/selection/IRangeSelection.d.ts +307 -0
- package/types/src/selection/RangeSelection.d.ts +144 -0
- package/types/src/selection/_RangeSelectionUtils.d.ts +32 -0
- package/types/src/selection/index.d.ts +2 -0
- package/types/src/shape/IShape.d.ts +279 -0
- package/types/src/shape/Shape.d.ts +54 -0
- package/types/src/shape/index.d.ts +2 -0
- package/types/src/sheet/CellRegion.d.ts +106 -0
- package/types/src/sheet/ICellContainerOptions.d.ts +97 -0
- package/types/src/sheet/ISheet.d.ts +1074 -0
- package/types/src/sheet/ISheetCollection.d.ts +70 -0
- package/types/src/sheet/NamedCellRange.d.ts +45 -0
- package/types/src/sheet/NamedRange.d.ts +30 -0
- package/types/src/sheet/Sheet.d.ts +1068 -0
- package/types/src/sheet/SheetCell.d.ts +335 -0
- package/types/src/sheet/SheetCollection.d.ts +18 -0
- package/types/src/sheet/SheetRange.d.ts +362 -0
- package/types/src/sheet/SheetRanges.d.ts +225 -0
- package/types/src/sheet/_CopyUtils.d.ts +33 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +70 -0
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +18 -0
- package/types/src/sheet/_SheetCoords.d.ts +54 -0
- package/types/src/sheet/_SheetFilterUtils.d.ts +9 -0
- package/types/src/sheet/_SheetMessages.d.ts +11 -0
- package/types/src/sheet/_SheetMutations.d.ts +137 -0
- package/types/src/sheet/_SheetSortUtils.d.ts +9 -0
- package/types/src/sheet/_SheetStateReader.d.ts +161 -0
- package/types/src/sheet/_SheetStateTypes.d.ts +446 -0
- package/types/src/sheet/_SheetUtils.d.ts +265 -0
- package/types/src/sheet/clipboard/IHTMLParser.d.ts +92 -0
- package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +55 -0
- package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +29 -0
- package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +46 -0
- package/types/src/sheet/clipboard/_ClipboardUtils.d.ts +10 -0
- package/types/src/sheet/clipboard/index.d.ts +2 -0
- package/types/src/sheet/index.d.ts +6 -0
- package/types/src/sheet/listener/RangesListener.d.ts +32 -0
- package/types/src/sheet/listener/RangesListenerEntry.d.ts +19 -0
- package/types/src/sheet/listener/index.d.ts +3 -0
- package/types/src/sheet/spatial/MergeEntry.d.ts +17 -0
- package/types/src/sheet/spatial/index.d.ts +2 -0
- package/types/src/sheet/style/SheetCellStyle.d.ts +540 -0
- package/types/src/sheet/style/SheetDirectStyle.d.ts +130 -0
- package/types/src/sheet/style/SheetNamedStyle.d.ts +47 -0
- package/types/src/sheet/style/SheetTableStyle.d.ts +47 -0
- package/types/src/sheet/style/UsedRangeSpatialMap.d.ts +80 -0
- package/types/src/sheet/style/_Resolvers.d.ts +41 -0
- package/types/src/sheet/style/_StyleUtils.d.ts +69 -0
- package/types/src/sheet/style/index.d.ts +1 -0
- package/types/src/sheetHeader/ISheetHeader.d.ts +217 -0
- package/types/src/sheetHeader/SheetCellHeader.d.ts +61 -0
- package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +54 -0
- package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +46 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +257 -0
- package/types/src/sheetHeader/_HeaderUtils.d.ts +94 -0
- package/types/src/sheetHeader/_InvalidSheetHeaderRange.d.ts +7 -0
- package/types/src/sheetHeader/index.d.ts +2 -0
- package/types/src/sheetProtection/ISheetProtection.d.ts +150 -0
- package/types/src/sheetProtection/SheetProtection.d.ts +39 -0
- package/types/src/sheetProtection/index.d.ts +2 -0
- package/types/src/sheetView/ISheetView.d.ts +439 -0
- package/types/src/sheetView/SheetView.d.ts +113 -0
- package/types/src/sheetView/_SheetViewUtils.d.ts +19 -0
- package/types/src/sheetView/index.d.ts +2 -0
- package/types/src/slicer/ISlicer.d.ts +38 -0
- package/types/src/slicer/Slicer.d.ts +41 -0
- package/types/src/slicer/index.d.ts +2 -0
- package/types/src/sort/ISort.d.ts +318 -0
- package/types/src/sort/Sort.d.ts +48 -0
- package/types/src/sort/_SortUtils.d.ts +12 -0
- package/types/src/sort/index.d.ts +3 -0
- package/types/src/string/IStringCollection.d.ts +50 -0
- package/types/src/string/StringCollection.d.ts +26 -0
- package/types/src/string/index.d.ts +3 -0
- package/types/src/style/IStyle.d.ts +485 -0
- package/types/src/style/IStyleCollection.d.ts +292 -0
- package/types/src/style/StyleCollection.d.ts +125 -0
- package/types/src/style/_BuiltInStyleDefs.d.ts +18 -0
- package/types/src/style/_BuiltInStyleNames.d.ts +20 -0
- package/types/src/style/index.d.ts +5 -0
- package/types/src/table/AnchoredTable.d.ts +349 -0
- package/types/src/table/AutoTable.d.ts +64 -0
- package/types/src/table/ITable.d.ts +714 -0
- package/types/src/table/ITableCollection.d.ts +88 -0
- package/types/src/table/ITableStyle.d.ts +318 -0
- package/types/src/table/Table.d.ts +8 -0
- package/types/src/table/TableCollection.d.ts +20 -0
- package/types/src/table/_AutoTableColumn.d.ts +27 -0
- package/types/src/table/_BuiltInTableStyles.d.ts +9 -0
- package/types/src/table/_FilterField.d.ts +30 -0
- package/types/src/table/_NamedTable.d.ts +84 -0
- package/types/src/table/_NamedTableSource.d.ts +57 -0
- package/types/src/table/_SortField.d.ts +29 -0
- package/types/src/table/_TableColumn.d.ts +51 -0
- package/types/src/table/_TableMessages.d.ts +5 -0
- package/types/src/table/_TableUtils.d.ts +94 -0
- package/types/src/table/index.d.ts +5 -0
- package/types/src/text/AutoNumberingScheme.d.ts +175 -0
- package/types/src/text/Bullet.d.ts +34 -0
- package/types/src/text/IText.d.ts +53 -0
- package/types/src/text/ITextFrame.d.ts +313 -0
- package/types/src/text/TextBoxAlignment.d.ts +141 -0
- package/types/src/text/TextFrame.d.ts +43 -0
- package/types/src/text/TextLine.d.ts +24 -0
- package/types/src/text/TextParagraph.d.ts +61 -0
- package/types/src/text/TextRotation.d.ts +106 -0
- package/types/src/text/TextRun.d.ts +85 -0
- package/types/src/text/TextUtils.d.ts +165 -0
- package/types/src/text/TextVisitor.d.ts +11 -0
- package/types/src/text/TextWrapper.d.ts +78 -0
- package/types/src/text/_TextUtils.d.ts +90 -0
- package/types/src/text/impl/Phrase.d.ts +3 -0
- package/types/src/text/impl/TabStrategy.d.ts +9 -0
- package/types/src/text/impl/WordWrapUtils.d.ts +6 -0
- package/types/src/text/index.d.ts +7 -0
- package/types/src/text/richtext/IStyledFont.d.ts +330 -0
- package/types/src/text/richtext/index.d.ts +2 -0
- package/types/src/theme/ITheme.d.ts +252 -0
- package/types/src/theme/IThemeCollection.d.ts +84 -0
- package/types/src/theme/ThemeCollection.d.ts +62 -0
- package/types/src/theme/_BuiltInColorSchemes.d.ts +3 -0
- package/types/src/theme/_BuiltInFontSchemes.d.ts +3 -0
- package/types/src/theme/_BuiltInThemeDefs.d.ts +3 -0
- package/types/src/theme/_ThemeMessages.d.ts +3 -0
- package/types/src/theme/_ThemeUtils.d.ts +3 -0
- package/types/src/theme/index.d.ts +4 -0
- package/types/src/transaction/ITransaction.d.ts +594 -0
- package/types/src/transaction/Transaction.d.ts +184 -0
- package/types/src/transaction/TransactionSaveStateManager.d.ts +85 -0
- package/types/src/transaction/TransactionUndoManager.d.ts +60 -0
- package/types/src/transaction/index.d.ts +5 -0
- package/types/src/type/ICollection.d.ts +110 -0
- package/types/src/type/IProperties.d.ts +51 -0
- package/types/src/type/ITypes.d.ts +69 -0
- package/types/src/type/Registry.d.ts +66 -0
- package/types/src/type/index.d.ts +5 -0
- package/types/src/utils/GeomUtils.d.ts +61 -0
- package/types/src/utils/ObjectPath.d.ts +9 -0
- package/types/src/utils/Profiler.d.ts +38 -0
- package/types/src/utils/_CSSUtils.d.ts +156 -0
- package/types/src/utils/_GeomUtils.d.ts +14 -0
- package/types/src/utils/_RangeCoordUtils.d.ts +84 -0
- package/types/src/utils/_RangeSetUtils.d.ts +55 -0
- package/types/src/utils/index.d.ts +2 -0
- package/types/src/workbook/IWorkbook.d.ts +711 -0
- package/types/src/workbook/Workbook.d.ts +342 -0
- package/types/src/workbook/WorkbookRange.d.ts +25 -0
- package/types/src/workbook/WorkbookRanges.d.ts +39 -0
- package/types/src/workbook/_WorkbookMessages.d.ts +8 -0
- package/types/src/workbook/_WorkbookUtils.d.ts +35 -0
- package/types/src/workbook/index.d.ts +3 -0
- package/types/src/workbookProtection/IWorkbookProtection.d.ts +57 -0
- package/types/src/workbookProtection/WorkbookProtection.d.ts +14 -0
- package/types/src/workbookProtection/index.d.ts +2 -0
- package/types/src/workbookView/IWorkbookView.d.ts +134 -0
- package/types/src/workbookView/WorkbookView.d.ts +49 -0
- package/types/src/workbookView/index.d.ts +3 -0
- package/browser/cjs/-P9BHlnCf8OF6D_m.cjs +0 -6
- package/browser/cjs/4kU87sIrnTEoJHwl.cjs +0 -6
- package/browser/cjs/B8mBx-uU2X9Qvdnr.cjs +0 -6
- package/browser/cjs/BD9lJn7w8OVsIwgC.cjs +0 -6
- package/browser/cjs/BI57E6P5MbZI3G2Z.cjs +0 -6
- package/browser/cjs/BRgYzaAY9tLpJe7C.cjs +0 -6
- package/browser/cjs/BdoGTvcTjso5IcRq.cjs +0 -15
- package/browser/cjs/C3ScwpfBnQ8JeHF-.cjs +0 -6
- package/browser/cjs/CI8H5FLYtzy-Y2TO.cjs +0 -55
- package/browser/cjs/ClUc2Qdf-BFmgsJR.cjs +0 -6
- package/browser/cjs/CsEmF6ZwF-2A9AvC.cjs +0 -6
- package/browser/cjs/D6eH4loatnriRosn.cjs +0 -124
- package/browser/cjs/DJTioC8laMAxiW-z.cjs +0 -6
- package/browser/cjs/DN6U4mb4Jt2b37q-.cjs +0 -7
- package/browser/cjs/DfNwTsshId9JPwTK.cjs +0 -6
- package/browser/cjs/DnQwOaG_1n5GvCnM.cjs +0 -6
- package/browser/cjs/DtOYNHcDq5p3S21C.cjs +0 -6
- package/browser/cjs/Dy2xo5nrA4OFe7w4.cjs +0 -6
- package/browser/cjs/EzhtX7d4GOngN0Se.cjs +0 -6
- package/browser/cjs/FBky5iT5me5H1I0-.cjs +0 -6
- package/browser/cjs/JcziJrpVHeAEo8Iv.cjs +0 -6
- package/browser/cjs/LABm2VcP5Duieabc.cjs +0 -6
- package/browser/cjs/OZxxkm3CI5jiE3O-.cjs +0 -6
- package/browser/cjs/W8_0e_fQB-spiB55.cjs +0 -6
- package/browser/cjs/nS_oDgpzBeOV487v.cjs +0 -6
- package/browser/cjs/srhqHYaGNtcM9evy.cjs +0 -6
- package/browser/cjs/v2J4J4s0rRAvsx4v.cjs +0 -6
- package/browser/esm/8Cdp6eg5fQM4U0CD.mjs +0 -10
- package/browser/esm/BvtSjnucMGltTjeM.mjs +0 -426
- package/browser/esm/Bzw2Xms8ZtifZcAF.mjs +0 -10
- package/browser/esm/C9ojFSLlGrdG3EDE.mjs +0 -10
- package/browser/esm/CPxdCZqGhuQENst8.mjs +0 -10
- package/browser/esm/CQXqHgLFDd57bQSy.mjs +0 -10
- package/browser/esm/CRlsrdZLcL-QKyo2.mjs +0 -12
- package/browser/esm/CUqge0vhYI_M8Hpg.mjs +0 -10
- package/browser/esm/C__wCYJcwKkBqp8t.mjs +0 -10
- package/browser/esm/Cou0jxSdkKrqQBPA.mjs +0 -10
- package/browser/esm/CtGy0C3HHvNhQ3j5.mjs +0 -10
- package/browser/esm/Ctol2MswJyCxIJcQ.mjs +0 -10
- package/browser/esm/D7tUJDQqPM4e3FEC.mjs +0 -10
- package/browser/esm/DB5Wpq1m-bJ7gpBF.mjs +0 -10
- package/browser/esm/DLXAhFMo3NyECo8b.mjs +0 -23842
- package/browser/esm/DTlPJulnTLqG3WSw.mjs +0 -10
- package/browser/esm/DwfM2tfEPAzMl86c.mjs +0 -10
- package/browser/esm/Dx0TIy0V5EVTNOEZ.mjs +0 -10
- package/browser/esm/Dxfd2MfY8kHHUtnu.mjs +0 -4022
- package/browser/esm/E0SwR3N6qggAhdBh.mjs +0 -10
- package/browser/esm/JGdZf2WBzvkRao7-.mjs +0 -10
- package/browser/esm/NAcqiYlYK4mm9q_F.mjs +0 -10
- package/browser/esm/NGg21AIVBhRCHoOh.mjs +0 -10
- package/browser/esm/PjtmxdNFMVskYmPB.mjs +0 -10
- package/browser/esm/a_LQ18tLbXq3N9hu.mjs +0 -10
- package/browser/esm/hXx5ZKLpc4RvmCjH.mjs +0 -10
- package/browser/esm/zoqPtKWJmGQs1ZUb.mjs +0 -5653
- package/node/esm/7QlvuodPxz-B25P9.mjs +0 -10
- package/node/esm/8Cdp6eg5fQM4U0CD.mjs +0 -10
- package/node/esm/B94PecmbGgqY0k9O.mjs +0 -13
- package/node/esm/BpvIVwL4NNRKuaD7.mjs +0 -10
- package/node/esm/Bzw2Xms8ZtifZcAF.mjs +0 -10
- package/node/esm/C9ojFSLlGrdG3EDE.mjs +0 -10
- package/node/esm/CQXqHgLFDd57bQSy.mjs +0 -10
- package/node/esm/CSg2ysafDv5h1zz2.mjs +0 -2458
- package/node/esm/CUqge0vhYI_M8Hpg.mjs +0 -10
- package/node/esm/C__wCYJcwKkBqp8t.mjs +0 -10
- package/node/esm/Cou0jxSdkKrqQBPA.mjs +0 -10
- package/node/esm/CtlHMovXY4x1NgI6.mjs +0 -10
- package/node/esm/Ctol2MswJyCxIJcQ.mjs +0 -10
- package/node/esm/Cv3hTIkdeILrJGYc.mjs +0 -10
- package/node/esm/D7tUJDQqPM4e3FEC.mjs +0 -10
- package/node/esm/DTlPJulnTLqG3WSw.mjs +0 -10
- package/node/esm/Dvg1Ay14DLNhMgmD.mjs +0 -10
- package/node/esm/DwfM2tfEPAzMl86c.mjs +0 -10
- package/node/esm/Dx0TIy0V5EVTNOEZ.mjs +0 -10
- package/node/esm/F5A4vdvxqRt8hFAs.mjs +0 -10
- package/node/esm/NGg21AIVBhRCHoOh.mjs +0 -10
- package/node/esm/PjtmxdNFMVskYmPB.mjs +0 -10
- package/node/esm/a_LQ18tLbXq3N9hu.mjs +0 -10
- package/node/esm/hXx5ZKLpc4RvmCjH.mjs +0 -10
- package/node/esm/lUsLEOryW9viP9g7.mjs +0 -1072
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { ISortedMap } from './ISortedMap';
|
|
2
|
+
/**
|
|
3
|
+
* {@inheritDoc ISortedMap}
|
|
4
|
+
*
|
|
5
|
+
* B+ tree implementation. Nodes split at `maxNodeSize` (default 32). Cloning is O(1)
|
|
6
|
+
* via copy-on-write structural sharing — only the path to a mutated node is copied.
|
|
7
|
+
* Supports `freeze()` to make the map immutable at runtime.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* - TODO: Test performance of preallocating values array at max size
|
|
11
|
+
* - TODO: Add fast initialization when a sorted array is provided to constructor
|
|
12
|
+
*
|
|
13
|
+
* Adapted from {@link https://github.com/qwertie/btree-typescript | btree-typescript} (MIT).
|
|
14
|
+
*/
|
|
15
|
+
export declare class SortedMap<K = any, V = any> implements ISortedMap<K, V> {
|
|
16
|
+
protected _root: BNode<K, V>;
|
|
17
|
+
_size: number;
|
|
18
|
+
_maxNodeSize: number;
|
|
19
|
+
/**
|
|
20
|
+
* Provides a total order over keys (and a strict partial order over the type K)
|
|
21
|
+
* @returns A negative value if a < b, 0 if a === b and a positive value if a > b
|
|
22
|
+
*/
|
|
23
|
+
_compare: (a: K, b: K) => number;
|
|
24
|
+
/**
|
|
25
|
+
* Initializes an SortedMap.
|
|
26
|
+
*
|
|
27
|
+
* @param compare Custom function to compare pairs of elements in the map.
|
|
28
|
+
* If not specified, defaultComparator will be used which is valid as long as K extends DefaultComparable.
|
|
29
|
+
* @param entries A set of key-value pairs to initialize the map
|
|
30
|
+
* @param maxNodeSize Branching factor (maximum items or children per node)
|
|
31
|
+
* Must be in range 4..256. If undefined or <4 then 32 is used; if >256 then 256.
|
|
32
|
+
*/
|
|
33
|
+
constructor(entries?: [K, V][], compare?: (a: K, b: K) => number, maxNodeSize?: number);
|
|
34
|
+
/** {@inheritDoc ISortedMap.size} */
|
|
35
|
+
get size(): number;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the number of key-value pairs in the map.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* This is the same as size.
|
|
41
|
+
*/
|
|
42
|
+
get length(): number;
|
|
43
|
+
/**
|
|
44
|
+
* Returns true iff the map contains no key-value pairs.
|
|
45
|
+
*/
|
|
46
|
+
isEmpty(): boolean;
|
|
47
|
+
/** {@inheritDoc ISortedMap.clear} */
|
|
48
|
+
clear(): void;
|
|
49
|
+
/**
|
|
50
|
+
* {@inheritDoc ISortedMap.forEach}
|
|
51
|
+
* @remarks
|
|
52
|
+
* For ES6 Map compatibility, argument order to the callback is `(value, key)` — the
|
|
53
|
+
* reverse of `forEachPair`. Use `forEachPair` if you want key first.
|
|
54
|
+
*/
|
|
55
|
+
forEach<R = number>(callback: (v: V, k: K, map: ISortedMap<K, V>) => {
|
|
56
|
+
break?: R;
|
|
57
|
+
} | void, thisArg?: any): R | number;
|
|
58
|
+
/**
|
|
59
|
+
* Runs a function for each key-value pair, in order from smallest to
|
|
60
|
+
* largest key. The callback can return {break: R} (where R is any value
|
|
61
|
+
* except undefined) to stop immediately and return R from forEachPair.
|
|
62
|
+
*
|
|
63
|
+
* @param onFound A function that is called for each key-value pair. This
|
|
64
|
+
* function can return {break: R} to stop early with result R.
|
|
65
|
+
* The reason that you must return {break: R} instead of simply R
|
|
66
|
+
* itself is for consistency with editRange(), which allows
|
|
67
|
+
* multiple actions, not just breaking.
|
|
68
|
+
* @param initialCounter This is the value of the third argument of
|
|
69
|
+
* `onFound` the first time it is called. The counter increases
|
|
70
|
+
* by one each time `onFound` is called. Default value: 0
|
|
71
|
+
* @returns The number of pairs sent to the callback (plus initialCounter,
|
|
72
|
+
* if you provided one). If the callback returned {break: R} then
|
|
73
|
+
* the R value is returned instead.
|
|
74
|
+
*/
|
|
75
|
+
forEachPair<R = number>(callback: (k: K, v: V, counter: number) => {
|
|
76
|
+
break?: R;
|
|
77
|
+
} | void, initialCounter?: number): R | number;
|
|
78
|
+
/**
|
|
79
|
+
* {@inheritDoc ISortedMap.get}
|
|
80
|
+
* @remarks
|
|
81
|
+
* Also accepts an optional `defaultValue` returned when the key is not found.
|
|
82
|
+
* Complexity: O(log size).
|
|
83
|
+
*/
|
|
84
|
+
get(key: K, defaultValue?: V): V | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* {@inheritDoc ISortedMap.set}
|
|
87
|
+
* @remarks
|
|
88
|
+
* When overwriting an existing key, the key itself is also updated — no visible
|
|
89
|
+
* effect unless the new key has data that does not affect sort order.
|
|
90
|
+
* Complexity: O(log size).
|
|
91
|
+
*/
|
|
92
|
+
set(key: K, value: V, overwrite?: boolean | ISortedMap.SetPairCallback<K, V>): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* {@inheritDoc ISortedMap.has}
|
|
95
|
+
* @remarks
|
|
96
|
+
* Use `get()` when you also need the value — it is faster. Use `has()` only when you
|
|
97
|
+
* need to distinguish "undefined value" from "key not present".
|
|
98
|
+
* Complexity: O(log size).
|
|
99
|
+
*/
|
|
100
|
+
has(key: K): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* {@inheritDoc ISortedMap.delete}
|
|
103
|
+
* @remarks
|
|
104
|
+
* Complexity: O(log size).
|
|
105
|
+
*/
|
|
106
|
+
delete(key: K): boolean;
|
|
107
|
+
/** {@inheritDoc ISortedMap.filter} */
|
|
108
|
+
filter(callback: (k: K, v: V, counter: number) => boolean, returnThisIfUnchanged?: boolean): ISortedMap<K, V>;
|
|
109
|
+
/** {@inheritDoc ISortedMap.mapValues} */
|
|
110
|
+
mapValues<R>(callback: (v: V, k: K, counter: number) => R): ISortedMap<K, R>;
|
|
111
|
+
/**
|
|
112
|
+
* {@inheritDoc ISortedMap.reduce}
|
|
113
|
+
* @remarks
|
|
114
|
+
* The same `currentPair` array is reused on every callback invocation — do not
|
|
115
|
+
* hold a reference to it between iterations.
|
|
116
|
+
*/
|
|
117
|
+
reduce<R>(callback: (previous: R, currentPair: [K, V], counter: number) => R, initialValue: R): R;
|
|
118
|
+
reduce<R>(callback: (previous: R | undefined, currentPair: [K, V], counter: number) => R): R | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* {@inheritDoc ISortedMap.entries}
|
|
121
|
+
* @remarks
|
|
122
|
+
* If `firstKey` does not exist, iteration starts at the next higher key.
|
|
123
|
+
* Pass `reusedResults` to reuse the iterator result object on each step and avoid
|
|
124
|
+
* per-iteration allocations — do not hold a reference to the result between calls.
|
|
125
|
+
*/
|
|
126
|
+
entries(lowestKey?: K, reusedResults?: IteratorResult<[K, V], any>): IterableIterator<[K, V]>;
|
|
127
|
+
/** {@inheritDoc ISortedMap.entriesReversed} */
|
|
128
|
+
entriesReversed(highestKey?: K, reusedResults?: IteratorResult<[K, V], any>, skipHighest?: boolean): IterableIterator<[K, V]>;
|
|
129
|
+
private findPath;
|
|
130
|
+
/**
|
|
131
|
+
* Computes the differences between `this` and `other`.
|
|
132
|
+
* For efficiency, the diff is returned via invocations of supplied handlers.
|
|
133
|
+
* The computation is optimized for the case in which the two trees have large amounts
|
|
134
|
+
* of shared data (obtained by calling the `clone` or `with` APIs) and will avoid
|
|
135
|
+
* any iteration of shared state.
|
|
136
|
+
* The handlers can cause computation to early exit by returning {break: R}.
|
|
137
|
+
* Neither of the collections should be changed during the comparison process (in your callbacks), as this method assumes they will not be mutated.
|
|
138
|
+
*
|
|
139
|
+
* @param other The map to compute a diff against.
|
|
140
|
+
* @param onlyThis Callback invoked for all keys only present in `this`.
|
|
141
|
+
* @param onlyOther Callback invoked for all keys only present in `other`.
|
|
142
|
+
* @param different Callback invoked for all keys with differing values.
|
|
143
|
+
*/
|
|
144
|
+
diffAgainst<R>(other: SortedMap<K, V>, onlyThis?: (k: K, v: V) => {
|
|
145
|
+
break?: R;
|
|
146
|
+
} | void, onlyOther?: (k: K, v: V) => {
|
|
147
|
+
break?: R;
|
|
148
|
+
} | void, different?: (k: K, vThis: V, vOther: V) => {
|
|
149
|
+
break?: R;
|
|
150
|
+
} | void): R | undefined;
|
|
151
|
+
private static finishCursorWalk;
|
|
152
|
+
private static stepToEnd;
|
|
153
|
+
private static makeDiffCursor;
|
|
154
|
+
/**
|
|
155
|
+
* Advances the cursor to the next step in the walk of its map.
|
|
156
|
+
* Cursors are walked backwards in sort order, as this allows them to leverage maxKey() in order to be compared in O(1).
|
|
157
|
+
*
|
|
158
|
+
* @param cursor The cursor to step
|
|
159
|
+
* @param stepToNode If true, the cursor will be advanced to the next node (skipping values)
|
|
160
|
+
* @returns `true` if the step was completed and false if the step would have caused the cursor to move beyond the end of the map.
|
|
161
|
+
*/
|
|
162
|
+
private static step;
|
|
163
|
+
/**
|
|
164
|
+
* Compares the two cursors. Returns a value indicating which cursor is ahead in a walk.
|
|
165
|
+
* Note that cursors are advanced in reverse sorting order.
|
|
166
|
+
*/
|
|
167
|
+
private static compare;
|
|
168
|
+
/** {@inheritDoc ISortedMap.keys} */
|
|
169
|
+
keys(firstKey?: K, reusedResults?: IteratorResult<[K, V], any>): IterableIterator<K>;
|
|
170
|
+
/** {@inheritDoc ISortedMap.values} */
|
|
171
|
+
values(firstKey?: K, reusedResults?: IteratorResult<[K, V], any>): IterableIterator<V>;
|
|
172
|
+
/** Returns the maximum number of children/values before nodes will split. */
|
|
173
|
+
getMaxNodeSize(): number;
|
|
174
|
+
/** {@inheritDoc ISortedMap.minKey} */
|
|
175
|
+
minKey(): K | undefined;
|
|
176
|
+
/** {@inheritDoc ISortedMap.maxKey} */
|
|
177
|
+
maxKey(): K | undefined;
|
|
178
|
+
/**
|
|
179
|
+
* {@inheritDoc ISortedMap.clone}
|
|
180
|
+
* @remarks
|
|
181
|
+
* Marks the root node as shared (copy-on-write). Both copies remain editable;
|
|
182
|
+
* only the path to a mutated node is cloned when a write occurs.
|
|
183
|
+
*/
|
|
184
|
+
clone(): SortedMap<K, V>;
|
|
185
|
+
/**
|
|
186
|
+
* Performs a greedy clone, immediately duplicating any nodes that are
|
|
187
|
+
* not currently marked as shared, in order to avoid marking any
|
|
188
|
+
* additional nodes as shared.
|
|
189
|
+
*
|
|
190
|
+
* @param force Clone all nodes, even shared ones.
|
|
191
|
+
*/
|
|
192
|
+
greedyClone(force?: boolean): SortedMap<K, V>;
|
|
193
|
+
/**
|
|
194
|
+
* Gets an array filled with the contents of the map, sorted by key.
|
|
195
|
+
*/
|
|
196
|
+
toArray(maxLength?: number): [K, V][];
|
|
197
|
+
/**
|
|
198
|
+
* Gets an array of all keys, sorted.
|
|
199
|
+
*/
|
|
200
|
+
keysArray(): K[];
|
|
201
|
+
/**
|
|
202
|
+
* Gets an array of all values, sorted by key.
|
|
203
|
+
*/
|
|
204
|
+
valuesArray(): V[];
|
|
205
|
+
/**
|
|
206
|
+
* Gets a string representing the map's data based on toArray().
|
|
207
|
+
*/
|
|
208
|
+
toString(): string;
|
|
209
|
+
/**
|
|
210
|
+
* Stores a key-value pair only if the key doesn't already exist in the map.
|
|
211
|
+
*
|
|
212
|
+
* @returns `true` if a new key was added
|
|
213
|
+
*/
|
|
214
|
+
setIfNotPresent(key: K, value: V): boolean;
|
|
215
|
+
/**
|
|
216
|
+
* {@inheritDoc ISortedMap.nextHigherPair}
|
|
217
|
+
* @remarks
|
|
218
|
+
* Pass `reusedPair` to reuse the result array across calls and avoid per-call allocations.
|
|
219
|
+
*/
|
|
220
|
+
nextHigherPair(key: K | undefined, reusedPair?: [K, V]): [K, V] | undefined;
|
|
221
|
+
/** {@inheritDoc ISortedMap.nextHigherKey} */
|
|
222
|
+
nextHigherKey(key: K | undefined, reusedPair?: [K, V]): K | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* {@inheritDoc ISortedMap.nextLowerPair}
|
|
225
|
+
* @remarks
|
|
226
|
+
* Pass `reusedPair` to reuse the result array across calls and avoid per-call allocations.
|
|
227
|
+
*/
|
|
228
|
+
nextLowerPair(key: K | undefined, reusedPair?: [K, V]): [K, V] | undefined;
|
|
229
|
+
/** {@inheritDoc ISortedMap.nextLowerKey} */
|
|
230
|
+
nextLowerKey(key: K | undefined, reusedPair?: [K, V]): K | undefined;
|
|
231
|
+
/** {@inheritDoc ISortedMap.getPairOrNextLower} */
|
|
232
|
+
getPairOrNextLower(key: K, reusedPair?: [K, V]): [K, V] | undefined;
|
|
233
|
+
/** {@inheritDoc ISortedMap.getPairOrNextHigher} */
|
|
234
|
+
getPairOrNextHigher(key: K, reusedPair?: [K, V]): [K, V] | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* Edits the value associated with a key in the map, if it already exists.
|
|
237
|
+
*
|
|
238
|
+
* @returns `true` if the key existed, false if not.
|
|
239
|
+
*/
|
|
240
|
+
changeIfPresent(key: K, value: V): boolean;
|
|
241
|
+
/**
|
|
242
|
+
* {@inheritDoc ISortedMap.getRange}
|
|
243
|
+
* @remarks
|
|
244
|
+
* Complexity: O(result.length + log size).
|
|
245
|
+
*/
|
|
246
|
+
getRange(low: K, high: K, includeHigh?: boolean, maxLength?: number): [K, V][];
|
|
247
|
+
/**
|
|
248
|
+
* {@inheritDoc ISortedMap.setPairs}
|
|
249
|
+
* @remarks
|
|
250
|
+
* Duplicate keys in `pairs`: later entries overwrite earlier ones.
|
|
251
|
+
* If `overwrite` is a `SetPairCallback`, it is called on both inserts and updates.
|
|
252
|
+
* Complexity: O(pairs.length × log(size + pairs.length)).
|
|
253
|
+
*/
|
|
254
|
+
setPairs(pairs: [K, V][], overwrite?: boolean | ISortedMap.SetPairCallback<K, V>): number;
|
|
255
|
+
/**
|
|
256
|
+
* {@inheritDoc ISortedMap.forRange}
|
|
257
|
+
* @remarks
|
|
258
|
+
* The callback must not insert or remove items — doing so may cause incorrect results.
|
|
259
|
+
* Returns `R` if the callback returned `{break: R}` to stop early.
|
|
260
|
+
* Complexity: O(items scanned + log size).
|
|
261
|
+
*/
|
|
262
|
+
forRange<R = number>(low: K, high: K, includeHigh: boolean, onFound?: ISortedMap.EditRangeCallback<K, V, R>, initialCounter?: number): R | number;
|
|
263
|
+
/**
|
|
264
|
+
* {@inheritDoc ISortedMap.editRange}
|
|
265
|
+
* @remarks
|
|
266
|
+
* Any shared nodes (from a prior `clone()`) are copied before the callback is called —
|
|
267
|
+
* O(n) extra work proportional to the shared data scanned.
|
|
268
|
+
*/
|
|
269
|
+
editRange<R = V>(low: K, high: K, includeHigh: boolean, onFound: ISortedMap.EditRangeCallback<K, V, R>, initialCounter?: number): R | number;
|
|
270
|
+
/**
|
|
271
|
+
* Same as `editRange` except that the callback is called for all pairs.
|
|
272
|
+
*/
|
|
273
|
+
editAll<R = V>(onFound: ISortedMap.EditRangeCallback<K, V, R>, initialCounter?: number): R | number;
|
|
274
|
+
/**
|
|
275
|
+
* {@inheritDoc ISortedMap.deleteRange}
|
|
276
|
+
* @remarks
|
|
277
|
+
* Complexity: O(log size + items deleted).
|
|
278
|
+
*/
|
|
279
|
+
deleteRange(low: K, high: K, includeHigh: boolean): number;
|
|
280
|
+
/** {@inheritDoc ISortedMap.deleteKeys} */
|
|
281
|
+
deleteKeys(keys: K[]): number;
|
|
282
|
+
/**
|
|
283
|
+
* Gets the height of the tree: the number of internal nodes between the
|
|
284
|
+
* SortedMap object and its leaf nodes (zero if there are no internal nodes).
|
|
285
|
+
*/
|
|
286
|
+
getHeight(): number;
|
|
287
|
+
/**
|
|
288
|
+
* Makes the object read-only to ensure it is not accidentally modified.
|
|
289
|
+
* Freezing does not have to be permanent; unfreeze() reverses the effect.
|
|
290
|
+
* This is accomplished by replacing mutator functions with a function
|
|
291
|
+
* that throws an Error. Compared to using a property (e.g. this.isFrozen)
|
|
292
|
+
* this implementation gives better performance in non-frozen SortedMaps.
|
|
293
|
+
*/
|
|
294
|
+
freeze(): void;
|
|
295
|
+
/** Ensures mutations are allowed, reversing the effect of freeze(). */
|
|
296
|
+
unfreeze(): void;
|
|
297
|
+
/**
|
|
298
|
+
* Returns true if the map appears to be frozen.
|
|
299
|
+
*/
|
|
300
|
+
isFrozen(): boolean;
|
|
301
|
+
/**
|
|
302
|
+
* Scans the tree for signs of serious bugs (e.g. this.size doesn't match
|
|
303
|
+
* number of elements, internal nodes not caching max element properly...)
|
|
304
|
+
* Computational complexity: O(number of nodes), i.e. O(size). This method
|
|
305
|
+
* skips the most expensive test - whether all keys are sorted - but it
|
|
306
|
+
* does check that maxKey() of the children of internal nodes are sorted.
|
|
307
|
+
*/
|
|
308
|
+
checkValid(): void;
|
|
309
|
+
}
|
|
310
|
+
/** Leaf node / base class. **************************************************/
|
|
311
|
+
declare class BNode<K, V> {
|
|
312
|
+
keys: K[];
|
|
313
|
+
values: V[];
|
|
314
|
+
isShared: true | undefined;
|
|
315
|
+
readonly isLeaf: boolean;
|
|
316
|
+
constructor(isLeaf: boolean, keys?: K[], values?: V[]);
|
|
317
|
+
maxKey(): K;
|
|
318
|
+
indexOf(key: K, failXor: number, cmp: (a: K, b: K) => number): index;
|
|
319
|
+
minKey(): K | undefined;
|
|
320
|
+
minPair(reusedPair?: [K, V]): [K, V] | undefined;
|
|
321
|
+
maxPair(reusedPair?: [K, V]): [K, V] | undefined;
|
|
322
|
+
clone(): BNode<K, V>;
|
|
323
|
+
greedyClone(force?: boolean): BNode<K, V>;
|
|
324
|
+
get(key: K, defaultValue: V | undefined, map: SortedMap<K, V>): V | undefined;
|
|
325
|
+
getPairOrNextLower(key: K, compare: (a: K, b: K) => number, inclusive: boolean, reusedPair?: [K, V]): [K, V] | undefined;
|
|
326
|
+
getPairOrNextHigher(key: K, compare: (a: K, b: K) => number, inclusive: boolean, reusedPair?: [K, V]): [K, V] | undefined;
|
|
327
|
+
checkValid(depth: number, map: SortedMap<K, V>, baseIndex: number): number;
|
|
328
|
+
set(key: K, value: V, overwrite: boolean | ISortedMap.SetPairCallback<K, V> | undefined, map: SortedMap<K, V>): boolean | BNode<K, V>;
|
|
329
|
+
reifyValues(): V[];
|
|
330
|
+
insertInLeaf(i: index, key: K, value: V, overwrite: boolean | ISortedMap.SetPairCallback<K, V> | undefined, map: SortedMap<K, V>): boolean;
|
|
331
|
+
takeFromRight(rhs: BNode<K, V>): void;
|
|
332
|
+
takeFromLeft(lhs: BNode<K, V>): void;
|
|
333
|
+
splitOffRightSide(): BNode<K, V>;
|
|
334
|
+
forRange<R>(low: K, high: K, includeHigh: boolean | undefined, editMode: boolean, map: SortedMap<K, V>, count: number, onFound?: ISortedMap.EditRangeCallback<K, V, R>): ISortedMap.EditRangeResult<V, R> | number;
|
|
335
|
+
/**
|
|
336
|
+
* Adds entire contents of right-hand sibling (rhs is left unchanged)
|
|
337
|
+
*/
|
|
338
|
+
mergeSibling(rhs: BNode<K, V>, _: number): void;
|
|
339
|
+
}
|
|
340
|
+
type index = number;
|
|
341
|
+
/**
|
|
342
|
+
* {@inheritDoc SortedMap}
|
|
343
|
+
* @see
|
|
344
|
+
* ### **Interface**
|
|
345
|
+
*
|
|
346
|
+
* {@link SortedMap}
|
|
347
|
+
*/
|
|
348
|
+
export declare namespace SortedMap {
|
|
349
|
+
const DeleteValue: Readonly<{
|
|
350
|
+
delete: true;
|
|
351
|
+
}>;
|
|
352
|
+
const Break: Readonly<{
|
|
353
|
+
break: true;
|
|
354
|
+
}>;
|
|
355
|
+
const DeleteRange: () => Readonly<{
|
|
356
|
+
delete: true;
|
|
357
|
+
}>;
|
|
358
|
+
/**
|
|
359
|
+
* Types that SortedMap supports by default
|
|
360
|
+
*/
|
|
361
|
+
type DefaultComparable = number | string | Date | boolean | null | undefined | (number | string)[] | {
|
|
362
|
+
valueOf: () => number | string | Date | boolean | null | undefined | (number | string)[];
|
|
363
|
+
};
|
|
364
|
+
/** A SortedMap frozen in the empty state. */
|
|
365
|
+
const EmptySortedMap: SortedMap<any, any>;
|
|
366
|
+
/**
|
|
367
|
+
* Compares DefaultComparables to form a strict partial ordering.
|
|
368
|
+
*
|
|
369
|
+
* Handles +/-0 and NaN like Map: NaN is equal to NaN, and -0 is equal to +0.
|
|
370
|
+
*
|
|
371
|
+
* Arrays are compared using '<' and '>', which may cause unexpected equality:
|
|
372
|
+
* for example [1] will be considered equal to ['1'].
|
|
373
|
+
*
|
|
374
|
+
* Two objects with equal valueOf compare the same, but compare unequal to
|
|
375
|
+
* primitives that have the same value.
|
|
376
|
+
*/
|
|
377
|
+
function defaultComparator(a: DefaultComparable, b: DefaultComparable): number;
|
|
378
|
+
/**
|
|
379
|
+
* Compares items using the < and > operators. This function is probably slightly
|
|
380
|
+
* faster than the defaultComparator for Dates and strings, but has not been benchmarked.
|
|
381
|
+
* Unlike defaultComparator, this comparator doesn't support mixed types correctly,
|
|
382
|
+
* i.e. use it with `SortedMap<string>` or `SortedMap<number>` but not `SortedMap<string|number>`.
|
|
383
|
+
*
|
|
384
|
+
* NaN is not supported.
|
|
385
|
+
*
|
|
386
|
+
* Note: null is treated like 0 when compared with numbers or Date, but in general
|
|
387
|
+
* null is not ordered with respect to strings (neither greater nor less), and
|
|
388
|
+
* undefined is not ordered with other types.
|
|
389
|
+
*/
|
|
390
|
+
function simpleComparator(a: string, b: string): number;
|
|
391
|
+
function simpleComparator(a: number | null, b: number | null): number;
|
|
392
|
+
function simpleComparator(a: Date | null, b: Date | null): number;
|
|
393
|
+
function simpleComparator(a: (number | string)[], b: (number | string)[]): number;
|
|
394
|
+
}
|
|
395
|
+
export {};
|
|
396
|
+
//# sourceMappingURL=SortedMap.d.ts.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { CellCoords, Direction, RangeAxis, RangeCoords } from '@sheetxl/utils';
|
|
2
|
+
import { Tuple } from './Tuple';
|
|
3
|
+
import { IReadableList } from './IReadableList';
|
|
4
|
+
import { IGrid } from './IGrid';
|
|
5
|
+
import { ISparseGrid } from './ISparseGrid';
|
|
6
|
+
/**
|
|
7
|
+
* Implementation of {@link IGrid} that uses a ISparseList of ISparseList.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SparseGrid<T = any> implements ISparseGrid<T> {
|
|
10
|
+
private _major;
|
|
11
|
+
private _dataCoords;
|
|
12
|
+
private _count;
|
|
13
|
+
private _isColumn;
|
|
14
|
+
private _lastMajor;
|
|
15
|
+
private _lastMinorSpan;
|
|
16
|
+
private _maxCoords;
|
|
17
|
+
private _options;
|
|
18
|
+
private _optionsMinor;
|
|
19
|
+
private _isShared;
|
|
20
|
+
private _createRun;
|
|
21
|
+
constructor(options?: SparseGrid.ConstructorOptions);
|
|
22
|
+
/**
|
|
23
|
+
* Returns an IterableIterator over all the runs in the sparse grid.
|
|
24
|
+
* Each run is a contiguous list of values in the grid.
|
|
25
|
+
*
|
|
26
|
+
* @returns An iterator that yields [majorIndex, minorIndex, IReadableList] entries
|
|
27
|
+
*/
|
|
28
|
+
/** {@inheritDoc ISparseGrid.getMaxCoords} */
|
|
29
|
+
getRuns(options?: ISparseGrid.RunIteratorOptions): ISparseGrid.RunIterableIterator<T>;
|
|
30
|
+
/** {@inheritDoc IGrid.getAxis} */
|
|
31
|
+
getAxis(): RangeAxis;
|
|
32
|
+
/** {@inheritDoc IGrid.entries} */
|
|
33
|
+
entries(options?: IGrid.IteratorOptions): IGrid.EntryIterator<T>;
|
|
34
|
+
/** {@inheritDoc IGrid.values} */
|
|
35
|
+
values(options?: IGrid.IteratorOptions): IGrid.ValueIterator;
|
|
36
|
+
/** {@inheritDoc IGrid.keys} */
|
|
37
|
+
keys(options?: IGrid.IteratorOptions): IGrid.KeyIterator;
|
|
38
|
+
private _updateMajorSpan;
|
|
39
|
+
/** {@inheritDoc IGrid.setValues} */
|
|
40
|
+
setValues(values: Tuple.GridTuple<T>): this;
|
|
41
|
+
/** {@inheritDoc IGrid.getValues} */
|
|
42
|
+
getValues(coords?: RangeCoords): Tuple.BoundedTuples<T> | null;
|
|
43
|
+
private _updateCountAndCoords;
|
|
44
|
+
/** {@inheritDoc IGrid.clear} */
|
|
45
|
+
clear(): void;
|
|
46
|
+
/** {@inheritDoc IGrid.delete} */
|
|
47
|
+
delete(range: RangeCoords | null): boolean;
|
|
48
|
+
/** {@inheritDoc IGrid.shift} */
|
|
49
|
+
shift(range: RangeCoords, direction: Direction): boolean;
|
|
50
|
+
/** {@inheritDoc IGrid.getCount} */
|
|
51
|
+
getCount(): number;
|
|
52
|
+
/** {@inheritDoc IGrid.getValueAt} */
|
|
53
|
+
getValueAt(row: number, column: number): T;
|
|
54
|
+
/** {@inheritDoc IGrid.setValueAt} */
|
|
55
|
+
setValueAt(row: number, column: number, value: T): void;
|
|
56
|
+
/** {@inheritDoc IGrid.copyTo} */
|
|
57
|
+
copyTo(destination: IGrid, topLeft: CellCoords, from: RangeCoords): void;
|
|
58
|
+
/** {@inheritDoc IGrid.getCoords} */
|
|
59
|
+
getCoords(): RangeCoords | null;
|
|
60
|
+
/** {@inheritDoc IGrid.clone} */
|
|
61
|
+
clone(cloneKey?: string): this;
|
|
62
|
+
/** {@inheritDoc IGrid.cloneEmpty} */
|
|
63
|
+
cloneEmpty(cloneKey?: string): this;
|
|
64
|
+
/** {@inheritDoc IGrid.getMaxCoords} */
|
|
65
|
+
getMaxCoords(): RangeCoords | null;
|
|
66
|
+
get [Symbol.toStringTag](): string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* {@inheritDoc SparseGrid}
|
|
70
|
+
* @see
|
|
71
|
+
* ### **Interface**
|
|
72
|
+
*
|
|
73
|
+
* {@link SparseGrid}
|
|
74
|
+
*/
|
|
75
|
+
export declare namespace SparseGrid {
|
|
76
|
+
/**
|
|
77
|
+
* For constructing a SparseGrid.
|
|
78
|
+
*/
|
|
79
|
+
interface ConstructorOptions<T = any> {
|
|
80
|
+
/**
|
|
81
|
+
* If not specified then unlimited bounds.
|
|
82
|
+
* @defaultValue undefined
|
|
83
|
+
*/
|
|
84
|
+
maxCoords?: Partial<RangeCoords>;
|
|
85
|
+
/**
|
|
86
|
+
* Determines the axis that cells are visited.
|
|
87
|
+
*
|
|
88
|
+
* @defaultValue RangeAxis.Column
|
|
89
|
+
*/
|
|
90
|
+
axis?: RangeAxis;
|
|
91
|
+
/**
|
|
92
|
+
* Hook to allow for custom storing of contiguous values.
|
|
93
|
+
*
|
|
94
|
+
* @param values The values to wrap in a List.
|
|
95
|
+
*/
|
|
96
|
+
createRun?: (values: T[]) => IReadableList<T>;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=SparseGrid.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { RunCoords } from '@sheetxl/utils';
|
|
2
|
+
import { IListLike } from './IList';
|
|
3
|
+
import { IReadableList } from './IReadableList';
|
|
4
|
+
import { ISparseList } from './ISparseList';
|
|
5
|
+
/**
|
|
6
|
+
* A SparseList implemented using a SortedMap of contiguous ReadableLists/WritableLists.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SparseList<T = any> implements ISparseList<T> {
|
|
9
|
+
private _options;
|
|
10
|
+
private _runs;
|
|
11
|
+
private _dataCoords;
|
|
12
|
+
private _count;
|
|
13
|
+
private _length;
|
|
14
|
+
private _maxCoords;
|
|
15
|
+
private _reuseRunsIterator;
|
|
16
|
+
private _reuseRunsEntry;
|
|
17
|
+
private _lastRunsRead;
|
|
18
|
+
private _lastListRead;
|
|
19
|
+
constructor(options?: SparseList.ConstructorOptions);
|
|
20
|
+
private _validateBounds;
|
|
21
|
+
/** {@inheritDoc IReadableList.entries} */
|
|
22
|
+
entries(options?: IReadableList.IteratorOptions): IReadableList.EntryIterator<T>;
|
|
23
|
+
/** {@inheritDoc ISparseList.runs} */
|
|
24
|
+
runs(options?: ISparseList.RunIteratorOptions): ISparseList.RunIterator<T>;
|
|
25
|
+
/** {@inheritDoc IReadableList.slice} */
|
|
26
|
+
slice(start: number, end?: number): ISparseList<T>;
|
|
27
|
+
/** {@inheritDoc IReadableList.concat} */
|
|
28
|
+
concat(list: IListLike<T>): ISparseList<T>;
|
|
29
|
+
/** {@inheritDoc IReadableList.toArray} */
|
|
30
|
+
toArray(maxLength?: number, includeEmpty?: boolean): T[];
|
|
31
|
+
/** {@inheritDoc IReadableList.isIReadableList} */
|
|
32
|
+
get isIReadableList(): true;
|
|
33
|
+
/** {@inheritDoc IListLike.length} */
|
|
34
|
+
get length(): number;
|
|
35
|
+
/** {@inheritDoc ISparseList.clear} */
|
|
36
|
+
getCoords(): RunCoords | null;
|
|
37
|
+
/** {@inheritDoc ISparseList.clear} */
|
|
38
|
+
clear(): void;
|
|
39
|
+
/** {@inheritDoc ISparseList.isISparseList} */
|
|
40
|
+
get isISparseList(): true;
|
|
41
|
+
/** {@inheritDoc IList.isIList} */
|
|
42
|
+
get isIList(): true;
|
|
43
|
+
private _updateCount;
|
|
44
|
+
private _update;
|
|
45
|
+
/** {@inheritDoc IWritableList.setAt} */
|
|
46
|
+
setAt(index: number, value: T): boolean;
|
|
47
|
+
/** {@inheritDoc ISparseList.setRunAt} */
|
|
48
|
+
setRunAt(index: number, list: IReadableList<T>): boolean;
|
|
49
|
+
/** {@inheritDoc IWritableList.delete} */
|
|
50
|
+
delete(start: number, amount?: number): boolean;
|
|
51
|
+
/** {@inheritDoc IWritableList.shift} */
|
|
52
|
+
shift(index: number, amount: number): boolean;
|
|
53
|
+
/** {@inheritDoc IListLike.at} */
|
|
54
|
+
at(index: number): T | undefined;
|
|
55
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
56
|
+
/** {@inheritDoc IWritableList.clone} */
|
|
57
|
+
clone(): this;
|
|
58
|
+
/** {@inheritDoc ISparseList.getMaxCoords} */
|
|
59
|
+
getMaxCoords(): RunCoords | null;
|
|
60
|
+
/** {@inheritDoc ISparseList.getCount} */
|
|
61
|
+
getCount(): number;
|
|
62
|
+
/** {@inheritDoc ISparseList.getRunsCount} */
|
|
63
|
+
getRunsCount(): number;
|
|
64
|
+
get [Symbol.toStringTag](): string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* {@inheritDoc SparseList}
|
|
68
|
+
* @see
|
|
69
|
+
* ### **Interface**
|
|
70
|
+
*
|
|
71
|
+
* {@link SparseList}
|
|
72
|
+
*/
|
|
73
|
+
export declare namespace SparseList {
|
|
74
|
+
/**
|
|
75
|
+
* For constructing a SparseList.
|
|
76
|
+
*/
|
|
77
|
+
interface ConstructorOptions {
|
|
78
|
+
/**
|
|
79
|
+
* If not specified then unlimited bounds.
|
|
80
|
+
*
|
|
81
|
+
* @defaultValue undefined
|
|
82
|
+
*/
|
|
83
|
+
maxCoords?: RunCoords;
|
|
84
|
+
/**
|
|
85
|
+
* @defaultValue 4
|
|
86
|
+
*/
|
|
87
|
+
nodeSize?: number;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=SparseList.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Direction, RangeCoords } from '@sheetxl/utils';
|
|
2
|
+
import { RTree } from './RTree';
|
|
3
|
+
import { ISpatialMap } from './ISpatialMap';
|
|
4
|
+
/**
|
|
5
|
+
* The default implementation for {@link ISpatialMap}
|
|
6
|
+
*/
|
|
7
|
+
export declare class SpatialMap<T = any> implements ISpatialMap<T> {
|
|
8
|
+
protected _shared: SharedRecord<T> | null;
|
|
9
|
+
protected _rTree: FilterRTree<T>;
|
|
10
|
+
protected _cloneKey: any;
|
|
11
|
+
protected _options: ISpatialMap.ConstructorOptions<T> | undefined;
|
|
12
|
+
protected _lastMiss: RangeCoords;
|
|
13
|
+
protected _lastSingle: RangeCoords;
|
|
14
|
+
protected _lastSingleResult: ISpatialMap.Entry<T>[] | null;
|
|
15
|
+
constructor(options?: ISpatialMap.ConstructorOptions<T>);
|
|
16
|
+
/** {@inheritDoc ISpatialMap.visitRanges} */
|
|
17
|
+
visitRanges(range: RangeCoords, visitor: ISpatialMap.Visitor<T>, sort?: Direction | null): void;
|
|
18
|
+
/** {@inheritDoc ISpatialMap.getBoundingRange} */
|
|
19
|
+
getBoundingRange(): RangeCoords;
|
|
20
|
+
/** {@inheritDoc ISpatialMap.size} */
|
|
21
|
+
size(): number;
|
|
22
|
+
/** {@inheritDoc ISpatialMap.isEmpty} */
|
|
23
|
+
isEmpty(): boolean;
|
|
24
|
+
/** {@inheritDoc ISpatialMap.search} */
|
|
25
|
+
search(range: RangeCoords, fullyContained?: boolean, sort?: boolean, results?: ISpatialMap.Entry<T>[]): ISpatialMap.Entry<T>[];
|
|
26
|
+
/** {@inheritDoc ISpatialMap.has} */
|
|
27
|
+
has(range: RangeCoords): boolean;
|
|
28
|
+
/** {@inheritDoc ISpatialMap.all} */
|
|
29
|
+
all(results?: ISpatialMap.Entry<T>[]): ISpatialMap.Entry<T>[];
|
|
30
|
+
/** {@inheritDoc ISpatialMap.shift} */
|
|
31
|
+
shift(options: ISpatialMap.ShiftOptions<T>): this;
|
|
32
|
+
/** {@inheritDoc ISpatialMap.insertNonOverlapping} */
|
|
33
|
+
insertNonOverlapping(range: ISpatialMap.Entry<T>, options?: ISpatialMap.InsertNonOverlappingOptions<T>): this;
|
|
34
|
+
/** {@inheritDoc ISpatialMap.insertGroup} */
|
|
35
|
+
insertGroup(entries: ISpatialMap.Entry<T>[], groupId?: string): this;
|
|
36
|
+
/** {@inheritDoc ISpatialMap.createCopiedEntries} */
|
|
37
|
+
createCopiedEntries(from: RangeCoords, to: RangeCoords, options?: ISpatialMap.CopyOptions, reuseInserts?: ISpatialMap.Entry<T>[], reuseRemoves?: ISpatialMap.Entry<T>[]): ISpatialMap.Updates;
|
|
38
|
+
/** {@inheritDoc ISpatialMap.remove} */
|
|
39
|
+
remove(entry: ISpatialMap.Entry<T>, equals?: (a: ISpatialMap.Entry<T>, b: ISpatialMap.Entry<T>) => boolean): this;
|
|
40
|
+
/** {@inheritDoc ISpatialMap.removeAll} */
|
|
41
|
+
removeAll(entries: ISpatialMap.Entry<T>[], equals?: (a: ISpatialMap.Entry<T>, b: ISpatialMap.Entry<T>) => boolean): this;
|
|
42
|
+
/** {@inheritDoc ISpatialMap.insert} */
|
|
43
|
+
insert(entry: ISpatialMap.Entry<T>): this;
|
|
44
|
+
/** {@inheritDoc ISpatialMap.load} */
|
|
45
|
+
load(entries: ReadonlyArray<ISpatialMap.Entry<T>>): this;
|
|
46
|
+
/** {@inheritDoc ISpatialMap.clear} */
|
|
47
|
+
clear(): this;
|
|
48
|
+
/** {@inheritDoc ISpatialMap.delete} */
|
|
49
|
+
delete(coords: RangeCoords | null): this;
|
|
50
|
+
/** {@inheritDoc ISpatialMap.clone} */
|
|
51
|
+
clone(cloneKey?: any): this;
|
|
52
|
+
/**
|
|
53
|
+
* Insert and removes nodes that contained with a group.
|
|
54
|
+
*
|
|
55
|
+
* @param groupsByGroupId Groups by the id of the group
|
|
56
|
+
* @param entriesByEntryId Amendments by the original id
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* * This logic visits all group entries and ensures all entries are update and removed so that all group entries entries are the same instance.
|
|
60
|
+
*/
|
|
61
|
+
protected _updateGroupedEntries(groupsByGroupId: Map<string, Group>, entriesByEntryId: Map<string, (ISpatialMap.Entry<T> | null)[]>): void;
|
|
62
|
+
protected _copy(source: SharedRecord<T>, entries?: ReadonlyArray<ISpatialMap.Entry<T>>): SharedRecord<T>;
|
|
63
|
+
protected _updateNodes(nodesInsert: ISpatialMap.Entry<T>[], nodesRemove?: ISpatialMap.Entry<T>[], onUpdates?: (nodesInsert: ISpatialMap.Entry<T>[], nodesRemove: ISpatialMap.Entry<T>[], map: ISpatialMap<T>) => void): void;
|
|
64
|
+
protected _mergeNodes(range: RangeCoords, fullyContained?: boolean): ISpatialMap.Entry<T>[];
|
|
65
|
+
protected _getReadTree(): FilterRTree<T>;
|
|
66
|
+
protected _ensureWritable(entries?: ReadonlyArray<ISpatialMap.Entry<T>>): void;
|
|
67
|
+
/**
|
|
68
|
+
* entries is a special performance optimization to allow a single bulk load.
|
|
69
|
+
*/
|
|
70
|
+
protected _getWritableTree(entries?: ReadonlyArray<ISpatialMap.Entry<T>>): FilterRTree<T>;
|
|
71
|
+
/**
|
|
72
|
+
* Callback for any modification
|
|
73
|
+
*/
|
|
74
|
+
protected _onModified(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Create the clone
|
|
77
|
+
*/
|
|
78
|
+
protected _createClone(options: ISpatialMap.ConstructorOptions<T> | undefined): this;
|
|
79
|
+
}
|
|
80
|
+
interface SharedRecord<T> {
|
|
81
|
+
refCount: number;
|
|
82
|
+
rTree: FilterRTree<T>;
|
|
83
|
+
}
|
|
84
|
+
interface Group<T = any> {
|
|
85
|
+
entries: InternalEntry<T>[];
|
|
86
|
+
uuid: string;
|
|
87
|
+
offset: number;
|
|
88
|
+
}
|
|
89
|
+
interface InternalEntry<T = any> extends ISpatialMap.Entry<T> {
|
|
90
|
+
group?: Group<T>;
|
|
91
|
+
timeStamp?: number;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Internal class that extends RTree to support Filters.
|
|
95
|
+
* is needed — the default passthrough in RTree works directly.
|
|
96
|
+
*/
|
|
97
|
+
declare class FilterRTree<T = any> extends RTree<ISpatialMap.Entry<T>> {
|
|
98
|
+
isEmpty(): boolean;
|
|
99
|
+
searchRange(range: RangeCoords, fullyContained?: boolean, results?: ISpatialMap.Entry<T>[]): ISpatialMap.Entry<T>[];
|
|
100
|
+
}
|
|
101
|
+
export {};
|
|
102
|
+
//# sourceMappingURL=SpatialMap.d.ts.map
|