@sheetxl/sdk 0.8.0-beta.1 → 0.8.0-beta.10
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/esm/{B0HS42a7lga1k1U_.mjs → BEAY9XgKNx-bakXW.mjs} +2 -2
- package/browser/esm/BbSmt62FpFIpoVzu.mjs +392 -0
- package/browser/esm/BcHmrKHwMMOlzc9_.mjs +357 -0
- package/browser/esm/BgcZ-CoTbMfmyDJL.mjs +412 -0
- package/browser/esm/Bk7xxbdDpa7-sIwd.mjs +7 -0
- package/browser/esm/BqskM7wA8oPfFQue.mjs +20 -0
- package/browser/esm/Btg43M1Bf-ENDreu.mjs +540 -0
- package/browser/esm/BzLfNyc6OOShIErH.mjs +598 -0
- package/browser/esm/C9B0djuUarfNdoj0.mjs +466 -0
- package/browser/esm/{uyWBMSIxMlt8n5Z3.mjs → CSx9ed1JOs7K5BXO.mjs} +2 -2
- package/browser/esm/CYyv6uGjo10ig5FP.mjs +142 -0
- package/browser/esm/CZ5oa92wZEAXebgk.mjs +622 -0
- package/browser/esm/CdLZWVcH8cncBUPJ.mjs +849 -0
- package/browser/esm/Cgd5BnM3hg9RyUel.mjs +171 -0
- package/browser/esm/CjsUGJEQSbGjnH6R.mjs +1001 -0
- package/browser/esm/ClB5ix51roQOpZEr.mjs +7402 -0
- package/browser/esm/{DlPMeIyxT9tG_WDk.mjs → Cqr3knDsBvoVZ6MN.mjs} +179 -202
- package/browser/esm/D4uVlrG0xEFctsSM.mjs +905 -0
- package/browser/esm/DOMHmhYzPcLVcpAW.mjs +7 -0
- package/browser/esm/DUvUK61b2_4pf4tG.mjs +484 -0
- package/browser/esm/De175LygU7ot4nQm.mjs +441 -0
- package/browser/esm/DhKkrCVASZ6Isvz6.mjs +527 -0
- package/browser/esm/Di58Ji1n--3Mgc_2.mjs +607 -0
- package/browser/esm/Dtoyt8q5RyGAlxCp.mjs +1141 -0
- package/browser/esm/Y79I7Sm8kjaYexhf.mjs +167 -0
- package/browser/esm/index.mjs +1472 -1023
- package/browser/esm/o8MFgcVXns987D6_.mjs +400 -0
- package/browser/esm/zqJOaweiXE9D8RY1.mjs +66681 -0
- package/licenses/dependencies.txt +209 -209
- package/node/esm/B6D7sSetrcOWLsKj.mjs +1135 -0
- package/node/esm/B9ljpEIZg6wOTzRE.mjs +142 -0
- package/node/esm/BH1v-E4Ro3bR7Znw.mjs +962 -0
- package/node/esm/BN9j8V9gCExMjVtJ.mjs +540 -0
- package/node/esm/{Cku7XiUvw1xrRasi.mjs → Bh4dv6tMjXX3X4nI.mjs} +1 -1
- package/node/esm/Bqd62L8KFgdS0Vou.mjs +7 -0
- package/node/esm/Bsx9uijd4X_SKV3L.mjs +360 -0
- package/node/esm/BtuY37FumvLE7EBo.mjs +629 -0
- package/node/esm/C6ZXsNyLXI6zA63X.mjs +402 -0
- package/node/esm/CCouEwT37f08qO3V.mjs +7 -0
- package/node/esm/CD9wbvufChVYYkrI.mjs +451 -0
- package/node/esm/CImNvdz1iP-lUlro.mjs +610 -0
- package/node/esm/CT0CN82y0_Qgoryk.mjs +7568 -0
- package/node/esm/CUQi5ZtMO02nhG0W.mjs +596 -0
- package/node/esm/CUUoseJmFsCf82bb.mjs +28 -0
- package/node/esm/CnSQ7MTXAUAyBOoS.mjs +911 -0
- package/node/esm/D7MfcID2Wf6l6VpC.mjs +171 -0
- package/node/esm/DCplLG93GfTs1vNw.mjs +1860 -0
- package/node/esm/DHUADiCmxNQS1ARz.mjs +417 -0
- package/node/esm/DMD12JUh7HJw2-jl.mjs +638 -0
- package/node/esm/DdFgXl-Ux2cMBTs_.mjs +15 -0
- package/node/esm/DefYISWfdZJFx57m.mjs +255 -0
- package/node/esm/Ds0d8zXzmgOu3MGx.mjs +403 -0
- package/node/esm/MiU4rDOiocmJ-9Ry.mjs +1783 -0
- package/node/esm/index.mjs +51616 -39665
- package/package.json +15 -16
- package/resources/contents.json +64 -0
- package/resources/fonts/arial-bold-italic.metrics.json +139 -0
- package/resources/fonts/arial-bold.metrics.json +139 -0
- package/resources/fonts/arial-italic.metrics.json +139 -0
- package/resources/fonts/arial-regular.metrics.json +139 -0
- package/resources/fonts/calibri-bold-italic.metrics.json +137 -0
- package/resources/fonts/calibri-bold.metrics.json +137 -0
- package/resources/fonts/calibri-italic.metrics.json +137 -0
- package/resources/fonts/calibri-regular.metrics.json +137 -0
- package/resources/fonts/cambria-bold-italic.metrics.json +66 -0
- package/resources/fonts/cambria-bold.metrics.json +66 -0
- package/resources/fonts/cambria-italic.metrics.json +66 -0
- package/resources/fonts/cambria-regular.metrics.json +66 -0
- package/resources/fonts/contents.json +126 -0
- package/resources/fonts/courier-new-bold-italic.metrics.json +143 -0
- package/resources/fonts/courier-new-bold.metrics.json +143 -0
- package/resources/fonts/courier-new-italic.metrics.json +143 -0
- package/resources/fonts/courier-new-regular.metrics.json +143 -0
- package/resources/fonts/times-new-roman-bold-italic.metrics.json +141 -0
- package/resources/fonts/times-new-roman-bold.metrics.json +141 -0
- package/resources/fonts/times-new-roman-italic.metrics.json +143 -0
- package/resources/fonts/times-new-roman-regular.metrics.json +141 -0
- package/resources/locales/de/model.msg.json +112 -12
- package/resources/locales/en/model.msg.json +119 -13
- package/types/scripting-api.json +8048 -0
- package/types/scripting-enums.json +277 -110
- package/types/scripting.d.ts +13077 -3224
- 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} +42 -41
- package/types/src/border/index.d.ts +1 -1
- package/types/src/calculation/Calculation.d.ts +754 -49
- package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
- package/types/src/calculation/FormulaText.d.ts +82 -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/_TableRename.d.ts +13 -0
- package/types/src/calculation/compiler/ASTTypes.d.ts +71 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +135 -44
- 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 +125 -23
- package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
- package/types/src/calculation/formula/FunctionValues.d.ts +10 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +261 -67
- package/types/src/calculation/formula/LambdaValue.d.ts +46 -23
- 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/Operators.d.ts +8 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +15 -2
- package/types/src/calculation/grid/CalcGrid.d.ts +407 -158
- package/types/src/calculation/grid/CalcGridBackend.d.ts +493 -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 +239 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +499 -141
- package/types/src/calculation/grid/_CalcRequest.d.ts +289 -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 +50 -3
- 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 +104 -29
- package/types/src/cell/ICellHeader.d.ts +24 -2
- package/types/src/cell/ICellProtection.d.ts +50 -10
- package/types/src/cellRange/ICellRange.d.ts +419 -79
- package/types/src/cellRange/ICellRanges.d.ts +23 -21
- package/types/src/chart/Chart.d.ts +41 -13
- package/types/src/chart/ChartCollection.d.ts +26 -0
- package/types/src/chart/IChart.d.ts +166 -12
- 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/color/_BuiltInIndexDefs.d.ts +6 -0
- package/types/src/comment/Comment.d.ts +223 -0
- package/types/src/comment/CommentCollection.d.ts +40 -0
- package/types/src/comment/IComment.d.ts +340 -50
- package/types/src/comment/ICommentCollection.d.ts +90 -0
- package/types/src/comment/NoteMovable.d.ts +26 -0
- package/types/src/comment/_CommentUtils.d.ts +50 -0
- package/types/src/comment/_NoteBox.d.ts +50 -0
- package/types/src/comment/index.d.ts +1 -0
- package/types/src/condition/AnchoredConditional.d.ts +82 -17
- package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +42 -12
- package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/AndOperator.d.ts +3 -1
- package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +4 -0
- package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +4 -1
- package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +5 -6
- package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/IconOperator.d.ts +4 -0
- package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +22 -5
- package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/NotOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/OrOperator.d.ts +3 -1
- package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
- package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +6 -0
- package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +21 -6
- package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +4 -5
- package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +20 -0
- package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +7 -5
- package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +3 -5
- package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +3 -5
- package/types/src/condition/BuiltinSelectors/index.d.ts +12 -6
- package/types/src/condition/Condition.d.ts +19 -1
- package/types/src/condition/ICondition.d.ts +293 -73
- package/types/src/condition/_ConditionFormula.d.ts +152 -0
- package/types/src/condition/_ConditionUtils.d.ts +167 -13
- package/types/src/conditionalFormat/ConditionalEntry.d.ts +3 -3
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +25 -14
- package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +12 -10
- package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
- package/types/src/dataValidation/DataValidation.d.ts +69 -3
- package/types/src/dataValidation/DataValidationCollection.d.ts +20 -9
- package/types/src/dataValidation/IDataValidation.d.ts +149 -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/{lib/file → file}/file.browser.d.ts +22 -8
- package/types/src/{lib/file → file}/file.node.d.ts +7 -2
- package/types/src/fill/IEffect.d.ts +5 -5
- package/types/src/fill/IFill.d.ts +123 -78
- package/types/src/fill/IStroke.d.ts +190 -64
- package/types/src/fill/RectAlignment.d.ts +20 -0
- package/types/src/fill/_Fills.d.ts +187 -0
- package/types/src/fill/_Stroke.d.ts +89 -0
- package/types/src/fill/index.d.ts +1 -0
- package/types/src/filter/IFilter.d.ts +188 -5
- package/types/src/font/AdvanceBuilder.d.ts +25 -0
- package/types/src/font/AdvanceTable.d.ts +114 -0
- package/types/src/font/FontCollection.d.ts +57 -0
- package/types/src/font/IFont.d.ts +17 -0
- package/types/src/font/IFontCollection.d.ts +120 -22
- package/types/src/font/TableFileAdvanceBuilder.d.ts +27 -0
- package/types/src/font/_BuiltinFontTables.d.ts +10 -0
- package/types/src/font/index.d.ts +4 -1
- package/types/src/group/Group.d.ts +136 -0
- package/types/src/group/GroupMovableCollection.d.ts +37 -0
- package/types/src/group/IGroup.d.ts +129 -0
- package/types/src/group/index.d.ts +2 -0
- package/types/src/history/IHistory.d.ts +3 -2
- package/types/src/hyperlink/IHyperlink.d.ts +13 -0
- package/types/src/hyperlink/_Hyperlink.d.ts +5 -1
- package/types/src/i18n/LanguagePack.d.ts +12 -4
- package/types/src/index.d.ts +5 -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/license/LicenseDetails.d.ts +1 -0
- package/types/src/license/LicenseManager.d.ts +4 -1
- package/types/src/license/Types.d.ts +38 -0
- package/types/src/license/_Utils.d.ts +22 -0
- package/types/src/license/details.d.ts +24 -0
- package/types/src/license/license-key.d.ts +49 -2
- package/types/src/license/runtime.browser.d.ts +41 -0
- package/types/src/{lib/utils/utils.node.d.ts → license/runtime.node.d.ts} +9 -12
- 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/AbstractMovableContent.d.ts +182 -0
- package/types/src/movable/CustomElement.d.ts +4 -5
- package/types/src/movable/ErrorContent.d.ts +49 -0
- package/types/src/movable/FormControl.d.ts +285 -0
- package/types/src/movable/GroupMember.d.ts +87 -0
- package/types/src/movable/ICustomElement.d.ts +7 -2
- package/types/src/movable/IErrorContent.d.ts +23 -0
- package/types/src/movable/IFormControl.d.ts +455 -0
- package/types/src/movable/IMovable.d.ts +378 -46
- package/types/src/movable/IMovableCollection.d.ts +63 -3
- package/types/src/movable/Movable.d.ts +149 -49
- package/types/src/movable/MovableCollection.d.ts +15 -8
- package/types/src/movable/MovableContentRegistry.d.ts +113 -0
- package/types/src/movable/_BuiltInContents.d.ts +14 -0
- package/types/src/movable/_ContentFactory.d.ts +35 -0
- package/types/src/movable/_DrawnBounds.d.ts +37 -0
- package/types/src/movable/_InsertableCollection.d.ts +28 -0
- package/types/src/movable/_MovableUtils.d.ts +5 -0
- package/types/src/movable/_PendingContent.d.ts +25 -0
- package/types/src/movable/_PlacementUtils.d.ts +55 -0
- package/types/src/movable/_RotatedFrame.d.ts +20 -0
- package/types/src/movable/index.d.ts +7 -1
- 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 +20 -7
- package/types/src/numFmt/IFormatEngine.d.ts +2 -0
- package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
- package/types/src/numFmt/_FormatCell.d.ts +11 -2
- package/types/src/numFmt/_NumFmtUtils.d.ts +0 -1
- package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +6 -0
- package/types/src/outline/IOutline.d.ts +186 -0
- package/types/src/outline/Outline.d.ts +157 -0
- package/types/src/outline/index.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 +4 -0
- package/types/src/picture/IPicture.d.ts +33 -3
- package/types/src/picture/Picture.d.ts +33 -13
- package/types/src/pivot/IPivotTable.d.ts +72 -0
- package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
- package/types/src/pivot/PivotCache.d.ts +34 -0
- package/types/src/pivot/PivotTable.d.ts +61 -0
- package/types/src/pivot/PivotTableCollection.d.ts +25 -0
- package/types/src/pivot/_PivotXml.d.ts +24 -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/Grouping.d.ts +65 -0
- package/types/src/primitives/LambdaBrand.d.ts +26 -0
- package/types/src/primitives/PrimitiveUtils.d.ts +56 -19
- package/types/src/primitives/Range.d.ts +133 -25
- package/types/src/primitives/RangeStats.d.ts +30 -2
- package/types/src/primitives/ReferenceRange.d.ts +44 -0
- package/types/src/primitives/Runtime.d.ts +15 -2
- package/types/src/primitives/environment.browser.d.ts +9 -0
- package/types/src/primitives/environment.node.d.ts +10 -0
- package/types/src/primitives/stats/AggregateStats.d.ts +49 -15
- package/types/src/primitives/stats/Cancellation.d.ts +13 -0
- package/types/src/primitives/stats/FrequencyStats.d.ts +10 -1
- package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
- package/types/src/primitives/stats/Ranked.d.ts +1 -1
- package/types/src/primitives/stats/SortedNumbers.d.ts +4 -2
- 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 +49 -15
- package/types/src/scripting/IFunctionCollection.d.ts +62 -32
- 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 +28 -26
- 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 +3 -7
- package/types/src/scripting/TypedFunction.d.ts +154 -18
- package/types/src/scripting/_FunctionIndex.d.ts +8 -3
- 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/IMovableSelection.d.ts +148 -0
- package/types/src/selection/IRangeSelection.d.ts +9 -4
- package/types/src/selection/MovableSelection.d.ts +48 -0
- package/types/src/selection/RangeSelection.d.ts +15 -0
- package/types/src/selection/index.d.ts +1 -0
- package/types/src/shape/GeometryPreset.d.ts +197 -0
- package/types/src/shape/IGeometry.d.ts +380 -0
- package/types/src/shape/IShape.d.ts +341 -194
- package/types/src/shape/IShapeStyle.d.ts +135 -0
- package/types/src/shape/Shape.d.ts +107 -21
- package/types/src/shape/ShapeStyleUtils.d.ts +54 -0
- package/types/src/shape/_ConnectorFrame.d.ts +32 -0
- package/types/src/shape/_ConnectorRoute.d.ts +33 -0
- package/types/src/shape/_Connectors.d.ts +108 -0
- package/types/src/shape/_Geometry.d.ts +14 -0
- package/types/src/shape/_GeometryLoader.d.ts +21 -0
- package/types/src/shape/_ShapeStyle.d.ts +70 -0
- package/types/src/shape/_builtIn/_BuiltInChunks.d.ts +10 -0
- package/types/src/shape/_builtIn/_BuiltInDef.d.ts +9 -0
- package/types/src/shape/_builtIn/arrows.d.ts +6 -0
- package/types/src/shape/_builtIn/basic.d.ts +6 -0
- package/types/src/shape/_builtIn/callouts.d.ts +6 -0
- package/types/src/shape/_builtIn/flowchart.d.ts +6 -0
- package/types/src/shape/_builtIn/lines.d.ts +6 -0
- package/types/src/shape/_builtIn/math.d.ts +6 -0
- package/types/src/shape/_builtIn/other.d.ts +6 -0
- package/types/src/shape/_builtIn/rectangles.d.ts +6 -0
- package/types/src/shape/_builtIn/starsBanners.d.ts +6 -0
- package/types/src/shape/geometry/_strokeEnds.d.ts +7 -0
- package/types/src/shape/geometry/format.d.ts +3 -0
- package/types/src/shape/geometry/geometry.d.ts +85 -0
- package/types/src/shape/geometry/guides.d.ts +54 -0
- package/types/src/shape/geometry/handles.d.ts +14 -0
- package/types/src/shape/geometry/index.d.ts +7 -0
- package/types/src/shape/geometry/lineEnds.d.ts +54 -0
- package/types/src/shape/geometry/paths.d.ts +35 -0
- package/types/src/shape/geometry/segments.d.ts +114 -0
- package/types/src/shape/index.d.ts +3 -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 +197 -50
- package/types/src/sheet/ISheetCollection.d.ts +2 -5
- package/types/src/sheet/NamedCellRange.d.ts +16 -7
- package/types/src/sheet/NamedRange.d.ts +8 -0
- package/types/src/sheet/Sheet.d.ts +915 -138
- package/types/src/sheet/SheetCell.d.ts +92 -32
- package/types/src/sheet/SheetCollection.d.ts +19 -8
- package/types/src/sheet/SheetRange.d.ts +90 -18
- package/types/src/sheet/SheetRanges.d.ts +22 -9
- package/types/src/sheet/_CellBuffer.d.ts +214 -0
- package/types/src/sheet/_HeldFormula.d.ts +69 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +7 -7
- 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 +49 -1
- package/types/src/sheet/_SheetIntents.d.ts +296 -0
- package/types/src/sheet/_SheetMutations.d.ts +182 -62
- package/types/src/sheet/_SheetStateReader.d.ts +19 -13
- package/types/src/sheet/_SheetStateTypes.d.ts +83 -78
- package/types/src/sheet/_SheetUtils.d.ts +39 -22
- 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 +209 -304
- package/types/src/sheet/style/SheetDirectStyle.d.ts +30 -19
- package/types/src/sheet/style/SheetNamedStyle.d.ts +17 -17
- package/types/src/sheet/style/SheetTableStyle.d.ts +5 -5
- package/types/src/sheet/style/_Resolvers.d.ts +14 -8
- package/types/src/sheet/style/_StyleUtils.d.ts +38 -8
- package/types/src/sheetHeader/ISheetHeader.d.ts +94 -53
- package/types/src/sheetHeader/SheetCellHeader.d.ts +4 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +42 -22
- package/types/src/sheetHeader/_HeaderMetrics.d.ts +37 -0
- package/types/src/sheetHeader/_HeaderUtils.d.ts +5 -3
- 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 +69 -15
- package/types/src/sheetView/SheetView.d.ts +20 -11
- package/types/src/slicer/ISlicer.d.ts +304 -17
- package/types/src/slicer/ISlicerStyle.d.ts +109 -0
- package/types/src/slicer/Slicer.d.ts +128 -13
- package/types/src/slicer/SlicerStyle.d.ts +25 -0
- package/types/src/slicer/_BuiltInSlicerStyles.d.ts +13 -0
- package/types/src/slicer/_SlicerUtils.d.ts +30 -0
- package/types/src/slicer/index.d.ts +1 -0
- package/types/src/sort/ISort.d.ts +4 -2
- package/types/src/string/IStringCollection.d.ts +5 -0
- package/types/src/string/StringCollection.d.ts +6 -6
- package/types/src/style/{IStyle.d.ts → ICellStyle.d.ts} +72 -52
- package/types/src/style/INamedStyleCollection.d.ts +72 -0
- package/types/src/style/ISlicerStyleCollection.d.ts +77 -0
- package/types/src/style/IStyleCollection.d.ts +91 -60
- package/types/src/style/ITableStyleCollection.d.ts +89 -0
- package/types/src/style/NamedStyleCollection.d.ts +39 -0
- package/types/src/style/SlicerStyleCollection.d.ts +46 -0
- package/types/src/style/StyleCollection.d.ts +81 -26
- package/types/src/style/TableStyleCollection.d.ts +49 -0
- package/types/src/style/_BuiltInStyleDefs.d.ts +6 -6
- package/types/src/style/_BuiltInStyleNames.d.ts +2 -2
- package/types/src/style/index.d.ts +7 -1
- package/types/src/table/AnchoredTable.d.ts +701 -72
- package/types/src/table/AutoTable.d.ts +7 -5
- package/types/src/table/ITable.d.ts +261 -34
- package/types/src/table/ITableCollection.d.ts +12 -0
- package/types/src/table/ITableStyle.d.ts +37 -37
- package/types/src/table/TableCollection.d.ts +19 -8
- package/types/src/table/_FilterField.d.ts +19 -6
- 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/IText.d.ts +182 -0
- package/types/src/text/ITextFrame.d.ts +110 -1
- package/types/src/text/TextBoxAlignment.d.ts +25 -16
- 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/TextRotation.d.ts +3 -3
- 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/text/richtext/IRichText.d.ts +36 -0
- package/types/src/text/richtext/IStyledFont.d.ts +18 -18
- package/types/src/text/richtext/index.d.ts +1 -0
- package/types/src/theme/ITheme.d.ts +45 -4
- package/types/src/theme/IThemeCollection.d.ts +2 -0
- package/types/src/theme/ThemeCollection.d.ts +11 -7
- package/types/src/theme/_OfficeFormatScheme.d.ts +3 -0
- package/types/src/transaction/ITransaction.d.ts +258 -45
- package/types/src/transaction/Transaction.d.ts +101 -11
- package/types/src/transaction/TransactionUndoManager.d.ts +4 -1
- 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/wasm/_sdkWasm.d.ts +7 -0
- package/types/src/wasm/index.d.ts +2 -0
- package/types/src/wasm/sdkWasm.d.ts +29 -0
- package/types/src/workbook/IWorkbook.d.ts +180 -40
- package/types/src/workbook/Workbook.d.ts +123 -10
- 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/B7_pDFYCVzt-3hUs.cjs +0 -1
- 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/Dv3x6zut1ZRUt3IF.cjs +0 -10
- package/browser/cjs/Dv4yIPLV98M5zLHa.cjs +0 -1
- package/browser/cjs/a0Z-SXs_N71CtqYb.cjs +0 -1
- package/browser/cjs/index.cjs +0 -3
- 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/condition/BuiltinSelectors/ListSelector.d.ts +0 -12
- package/types/src/dataValidation/_Utils.d.ts +0 -10
- package/types/src/lib/utils/_Utils.d.ts +0 -27
- package/types/src/lib/utils/utils.browser.d.ts +0 -33
- package/types/src/movable/IGroup.d.ts +0 -30
- package/types/src/movable/IMovableSelection.d.ts +0 -49
- 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
- /package/types/src/{lib/utils → license}/banner.d.ts +0 -0
|
@@ -2,6 +2,7 @@ import { FetchArgs, Base64Args, ITaskProgress, MaybePromise } from '@sheetxl/uti
|
|
|
2
2
|
import { IListener } from '../listener';
|
|
3
3
|
import { ITransaction } from '../transaction';
|
|
4
4
|
import { IWorkbook } from '../workbook';
|
|
5
|
+
import { ICellContainerOptions } from '../sheet';
|
|
5
6
|
/**
|
|
6
7
|
* Interface for workbook input/output operations across multiple source types and formats.
|
|
7
8
|
*
|
|
@@ -387,6 +388,8 @@ export interface IWorkbookIO extends IListener.ISource<IWorkbookIO, IWorkbookIO.
|
|
|
387
388
|
* {@link TransactionSaveStateManager} to track a workbook's dirty state with no extra wiring.
|
|
388
389
|
*/
|
|
389
390
|
addCommitListener(listener: ITransaction.ICommitSource.IListeners): IListener.Remove;
|
|
391
|
+
/** For runtime type checking. */
|
|
392
|
+
readonly isIWorkbookIO: true;
|
|
390
393
|
}
|
|
391
394
|
export declare namespace IWorkbookIO {
|
|
392
395
|
/**
|
|
@@ -394,11 +397,13 @@ export declare namespace IWorkbookIO {
|
|
|
394
397
|
* whether it can be written back to. The IO analog of a `Uri` / `FileSystemFileHandle`.
|
|
395
398
|
*
|
|
396
399
|
* @remarks
|
|
397
|
-
* Minted and owned by the IO/store layer, never by the workbook model
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
*
|
|
401
|
-
*
|
|
400
|
+
* Minted and owned by the IO/store layer, never by the workbook model. An origin names **one**
|
|
401
|
+
* file for its whole life: its path and format never change. What can change in place is what is
|
|
402
|
+
* known about that file (its size, whether it is encrypted, its display label), firing `onChange`.
|
|
403
|
+
*
|
|
404
|
+
* *Which* origin a workbook lives in can change: a save that resolves a new destination (a first
|
|
405
|
+
* save, a Save As) moves the workbook to a new origin, and the one it left keeps naming its own
|
|
406
|
+
* file — see {@link IWorkbook.getOrigin}. An origin backs one open workbook at a time.
|
|
402
407
|
*
|
|
403
408
|
* An **unbound** origin (`getPath()` returns `null`) belongs to an in-memory workbook with no
|
|
404
409
|
* destination yet. A **read-only** origin (`canWrite()` is `false`) is real provenance that cannot
|
|
@@ -493,6 +498,16 @@ export declare namespace IWorkbookIO {
|
|
|
493
498
|
* each read/write of this handle.
|
|
494
499
|
*/
|
|
495
500
|
getSize(): number | null;
|
|
501
|
+
/**
|
|
502
|
+
* When the file was last modified, in milliseconds since the epoch, or `null` if unknown — a
|
|
503
|
+
* stat-style property like {@link getSize} (the analog of `File.lastModified`), recorded when
|
|
504
|
+
* the file is read and updated when it is written.
|
|
505
|
+
*
|
|
506
|
+
* @remarks
|
|
507
|
+
* What the store last saw, not a live check: comparing it with the file's current time is how a
|
|
508
|
+
* host notices the file changed on disk since it was opened.
|
|
509
|
+
*/
|
|
510
|
+
getLastModified(): number | null;
|
|
496
511
|
/**
|
|
497
512
|
* Whether this source can be written back to (a silent re-save). A read-only source (e.g. a
|
|
498
513
|
* fetched URL) returns `false`, signalling callers to prompt for a destination ("Save As").
|
|
@@ -522,6 +537,39 @@ export declare namespace IWorkbookIO {
|
|
|
522
537
|
interface IListeners extends IListener.Callbacks<Origin, Origin.Events> {
|
|
523
538
|
}
|
|
524
539
|
}
|
|
540
|
+
/**
|
|
541
|
+
* Supplies a workbook's current {@link IWorkbookIO.Origin} — the file it lives in now.
|
|
542
|
+
*
|
|
543
|
+
* @remarks
|
|
544
|
+
* An origin names one file for its whole life; which file a *workbook* lives in changes when a
|
|
545
|
+
* save resolves a new destination (a first save, a Save As). The workbook reads its origin
|
|
546
|
+
* through this and follows `onOriginChange`, so the same workbook moves to the new file while
|
|
547
|
+
* the origin it held keeps naming the old one.
|
|
548
|
+
*
|
|
549
|
+
* Read-only by design: the workbook consumes it and never sets it. Whoever implements it decides
|
|
550
|
+
* when it moves. The default implementation (`WorkbookOriginProvider`) is moved by the IO layer
|
|
551
|
+
* after a successful save; a host with its own save flow can pass its own implementation through
|
|
552
|
+
* `IWorkbook.ConstructorOptions.origin` and move it on {@link IWorkbookIO.Events.onWrite}.
|
|
553
|
+
*/
|
|
554
|
+
interface OriginProvider extends IListener.ISource<OriginProvider, OriginProvider.IListeners> {
|
|
555
|
+
/**
|
|
556
|
+
* The origin the workbook lives in now. Always present; unbound for a never-saved workbook.
|
|
557
|
+
*/
|
|
558
|
+
getOrigin(): Origin;
|
|
559
|
+
}
|
|
560
|
+
namespace OriginProvider {
|
|
561
|
+
/**
|
|
562
|
+
* IListener interface for {@link IWorkbookIO.OriginProvider} events.
|
|
563
|
+
*/
|
|
564
|
+
interface Events {
|
|
565
|
+
/**
|
|
566
|
+
* Called when the provider supplies a different origin.
|
|
567
|
+
*/
|
|
568
|
+
onOriginChange?(source: OriginProvider): void;
|
|
569
|
+
}
|
|
570
|
+
interface IListeners extends IListener.Callbacks<OriginProvider, OriginProvider.Events> {
|
|
571
|
+
}
|
|
572
|
+
}
|
|
525
573
|
/**
|
|
526
574
|
* Common fields shared by all ambient I/O events.
|
|
527
575
|
*/
|
|
@@ -532,8 +580,10 @@ export declare namespace IWorkbookIO {
|
|
|
532
580
|
*/
|
|
533
581
|
workbook: IWorkbook;
|
|
534
582
|
/**
|
|
535
|
-
* The {@link IWorkbookIO.Origin} handle the operation actually used — the
|
|
536
|
-
* origin for a
|
|
583
|
+
* The {@link IWorkbookIO.Origin} handle the operation actually used — the file read, or the file
|
|
584
|
+
* written: the workbook's own origin for a plain save, a new one for a save that resolved a
|
|
585
|
+
* destination (a first save, a Save As), the target for an export. Its format is the one read or
|
|
586
|
+
* written.
|
|
537
587
|
*
|
|
538
588
|
* @remarks
|
|
539
589
|
* Uniform across read and write, so an ambient listener (e.g. recent-files) can track "the
|
|
@@ -776,6 +826,18 @@ export declare namespace IWorkbookIO {
|
|
|
776
826
|
* If it is set in the createWorkbookOptions it will override this value.
|
|
777
827
|
*/
|
|
778
828
|
readonly?: boolean;
|
|
829
|
+
/**
|
|
830
|
+
* Open the source as a copy: the workbook gets its own read-only origin for the same path, so it
|
|
831
|
+
* never saves back over the original — its first save asks where.
|
|
832
|
+
*
|
|
833
|
+
* @defaultValue false
|
|
834
|
+
*
|
|
835
|
+
* @remarks
|
|
836
|
+
* A file is saved back by one open workbook at a time, so opening a file that is already open
|
|
837
|
+
* gives a copy without asking. Set this to get one regardless. Writing over a file another open
|
|
838
|
+
* workbook saves back to is refused.
|
|
839
|
+
*/
|
|
840
|
+
asCopy?: boolean;
|
|
779
841
|
/**
|
|
780
842
|
* Read the workbook for calculation only, trading visual formatting for a faster, lighter read.
|
|
781
843
|
*
|
|
@@ -788,6 +850,29 @@ export declare namespace IWorkbookIO {
|
|
|
788
850
|
* save time and memory.
|
|
789
851
|
*/
|
|
790
852
|
calcOnly?: boolean;
|
|
853
|
+
/**
|
|
854
|
+
* What loading is allowed to calculate — {@link ICellContainerOptions.calcOnLoad},
|
|
855
|
+
* with the format handler translating what the FILE says into it.
|
|
856
|
+
*
|
|
857
|
+
* @defaultValue `'auto'`
|
|
858
|
+
*
|
|
859
|
+
* @remarks
|
|
860
|
+
* - `'auto'` — cached values are trusted; the load pass evaluates a formula cell with no
|
|
861
|
+
* cached value (a repair — Excel always stores one) and refreshes volatiles. Everything is
|
|
862
|
+
* recalculated only when Excel would recalculate on open: the file sets `fullCalcOnLoad`,
|
|
863
|
+
* or for xlsx its `calcId` is missing or older than the Excel build this library is
|
|
864
|
+
* verified against. (What this library writes carries one: the source file's, else that
|
|
865
|
+
* build's.) To take the file's values as they are whatever it says — as openpyxl does —
|
|
866
|
+
* pass `'none'`; to always recalculate, `'full'`.
|
|
867
|
+
* - `'full'` — everything is recalculated, whatever the file says.
|
|
868
|
+
* - `'none'` — the calculation engine is not started. Nothing is compiled or calculated, and
|
|
869
|
+
* a save writes values and formulas exactly as they were read — the pure IO pass. The
|
|
870
|
+
* first mutation, or an explicit {@link ICalculation.calculate} /
|
|
871
|
+
* {@link IWorkbook.whenCalculationReady}, starts the engine.
|
|
872
|
+
*
|
|
873
|
+
* An explicit `createWorkbookOptions.calcOnLoad` wins over the translation.
|
|
874
|
+
*/
|
|
875
|
+
calcOnLoad?: ICellContainerOptions.CalcOnLoad;
|
|
791
876
|
/**
|
|
792
877
|
* Provide options to the workbook constructor.
|
|
793
878
|
*/
|
|
@@ -857,6 +942,10 @@ export declare namespace IWorkbookIO {
|
|
|
857
942
|
*
|
|
858
943
|
* Used for type detection when it cannot be inferred from the destination.
|
|
859
944
|
* Examples: 'xlsx', 'csv', 'application/json', 'Excel'
|
|
945
|
+
*
|
|
946
|
+
* @remarks
|
|
947
|
+
* A destination whose extension already names a different format is an error, not an
|
|
948
|
+
* override: changing a file's type means writing to a new name (see {@link IWorkbookIO.writeAs}).
|
|
860
949
|
*/
|
|
861
950
|
format?: string;
|
|
862
951
|
/**
|
|
@@ -880,8 +969,72 @@ export declare namespace IWorkbookIO {
|
|
|
880
969
|
password?: string | null;
|
|
881
970
|
/**
|
|
882
971
|
* Optional progress callback for long running writes.
|
|
972
|
+
*
|
|
973
|
+
* @remarks
|
|
974
|
+
* Its `onWarning` receives each write warning (a feature the format cannot hold) once the format
|
|
975
|
+
* handler has finished, already deduplicated. It is a log channel; the decision to proceed is
|
|
976
|
+
* {@link onWarnings}.
|
|
883
977
|
*/
|
|
884
978
|
progress?: ITaskProgress<IWorkbookIO.Origin>;
|
|
979
|
+
/**
|
|
980
|
+
* Decides whether a write that would lose something goes ahead.
|
|
981
|
+
*
|
|
982
|
+
* @remarks
|
|
983
|
+
* Called at most **once** per write, after the format handler has produced the bytes and before
|
|
984
|
+
* the store persists them, and only when the handler raised a warning that an earlier write to
|
|
985
|
+
* the same file did not already let through this session — a repeat save of the same lossy
|
|
986
|
+
* workbook does not ask again. The event carries every warning, deduplicated, so a host shows
|
|
987
|
+
* one dialog listing them rather than one per finding.
|
|
988
|
+
*
|
|
989
|
+
* Returning `false` cancels the write — {@link IWorkbookIO.write} then resolves to `null`, like
|
|
990
|
+
* a dismissed save dialog — but only when {@link WriteWarningsEvent.canCancel} is `true`. A
|
|
991
|
+
* prompted write (a Save As, a first save, a download) always proceeds, because the destination
|
|
992
|
+
* the user just chose has nothing in it to protect and a browser save picker has already created
|
|
993
|
+
* the file: an empty file there is worse than a lossy one. The workbook still holds everything
|
|
994
|
+
* that was not written, so the recovery is to save a copy in a format that can hold it.
|
|
995
|
+
*
|
|
996
|
+
* Omitted, every write proceeds and the warnings are reported through `progress.onWarning` only.
|
|
997
|
+
*/
|
|
998
|
+
onWarnings?: (event: IWorkbookIO.WriteWarningsEvent) => boolean | void | Promise<boolean | void>;
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* One thing a format handler could not write faithfully.
|
|
1002
|
+
*/
|
|
1003
|
+
interface WriteWarning {
|
|
1004
|
+
/**
|
|
1005
|
+
* What was not written, or was written degraded.
|
|
1006
|
+
*/
|
|
1007
|
+
message: string;
|
|
1008
|
+
/**
|
|
1009
|
+
* Locates the finding — for xlsx, the path of the package part (`/xl/worksheets/sheet2.xml`).
|
|
1010
|
+
*/
|
|
1011
|
+
context?: any;
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* What {@link WriteOptions.onWarnings} is asked to decide on.
|
|
1015
|
+
*/
|
|
1016
|
+
interface WriteWarningsEvent extends IOEvent {
|
|
1017
|
+
/**
|
|
1018
|
+
* Every warning the write raised, deduplicated, in the order they were first raised.
|
|
1019
|
+
*/
|
|
1020
|
+
warnings: WriteWarning[];
|
|
1021
|
+
/**
|
|
1022
|
+
* `true` for a save (the workbook will be marked clean), `false` for an export copy.
|
|
1023
|
+
*
|
|
1024
|
+
* @remarks
|
|
1025
|
+
* Not the same as `origin === workbook.getOrigin()`: a save that resolved a new destination (a
|
|
1026
|
+
* first save, a Save As) moves the workbook to `origin` only once the write succeeds.
|
|
1027
|
+
*/
|
|
1028
|
+
save: boolean;
|
|
1029
|
+
/**
|
|
1030
|
+
* Whether returning `false` will cancel the write.
|
|
1031
|
+
*
|
|
1032
|
+
* @remarks
|
|
1033
|
+
* `true` only for a silent re-save to a bound, writable destination — the one case where the
|
|
1034
|
+
* bytes would replace a file that may hold what is about to be lost. See
|
|
1035
|
+
* {@link WriteOptions.onWarnings} for why a prompted write cannot be cancelled.
|
|
1036
|
+
*/
|
|
1037
|
+
canCancel: boolean;
|
|
885
1038
|
}
|
|
886
1039
|
/**
|
|
887
1040
|
* Options for {@link IWorkbookIO.writeAs} — everything a write takes, plus the one thing only a
|
|
@@ -925,8 +1078,8 @@ export declare namespace IWorkbookIO {
|
|
|
925
1078
|
/**
|
|
926
1079
|
* Persists the workbook described by the request.
|
|
927
1080
|
*
|
|
928
|
-
* @returns The
|
|
929
|
-
*
|
|
1081
|
+
* @returns The {@link IWorkbookIO.Origin} actually written — `request.origin` when the store
|
|
1082
|
+
* persisted to it, a new origin when it resolved a destination — or `null` if cancelled.
|
|
930
1083
|
*
|
|
931
1084
|
* @remarks
|
|
932
1085
|
* Optional. A read-only store omits it; {@link IWorkbookIO.canWrite} then reports `false` and
|
|
@@ -953,13 +1106,14 @@ export declare namespace IWorkbookIO {
|
|
|
953
1106
|
* The store receives the destination as an {@link IWorkbookIO.Origin} handle — never a
|
|
954
1107
|
* fileName-vs-provenance ambiguity. Its contract:
|
|
955
1108
|
* - **bound + writable** origin → persist to it silently (no dialog), *unless* {@link prompt}.
|
|
1109
|
+
* Update its stat state (the written `size`) and return it.
|
|
956
1110
|
* - **unbound or read-only** origin, or {@link prompt} → resolve a destination itself (a save
|
|
957
|
-
* picker in the browser;
|
|
958
|
-
* prompt/default, and **
|
|
959
|
-
*
|
|
960
|
-
*
|
|
961
|
-
*
|
|
962
|
-
*
|
|
1111
|
+
* picker in the browser; a suggested name in Node), using {@link suggestedName} for any
|
|
1112
|
+
* prompt/default, and **mint a new origin** for it — passing that origin to {@link encode} —
|
|
1113
|
+
* then return the new origin. The request's origin is never changed: it keeps naming its own
|
|
1114
|
+
* file. For a save, the IO layer then moves the workbook to the origin returned.
|
|
1115
|
+
* - Refuse (throw) a destination another open workbook saves back to — other than this
|
|
1116
|
+
* workbook's own.
|
|
963
1117
|
*/
|
|
964
1118
|
interface WriteRequest {
|
|
965
1119
|
/**
|
|
@@ -971,8 +1125,8 @@ export declare namespace IWorkbookIO {
|
|
|
971
1125
|
*/
|
|
972
1126
|
format: FormatType;
|
|
973
1127
|
/**
|
|
974
|
-
* The destination handle: the workbook's own origin for a save,
|
|
975
|
-
*
|
|
1128
|
+
* The destination handle: the workbook's own origin for a save, the target for a Save As or an
|
|
1129
|
+
* export. May be unbound (`getPath()` `null`) — see the store contract above.
|
|
976
1130
|
*/
|
|
977
1131
|
origin: IWorkbookIO.Origin;
|
|
978
1132
|
/**
|
|
@@ -987,13 +1141,22 @@ export declare namespace IWorkbookIO {
|
|
|
987
1141
|
/**
|
|
988
1142
|
* Encodes the workbook to bytes using the resolved format, or an alternate format key.
|
|
989
1143
|
*
|
|
1144
|
+
* @param format An alternate format key — the one the user picked, for a resolved destination.
|
|
1145
|
+
* @param origin The origin being written, when the store minted one for a destination it
|
|
1146
|
+
* resolved. Omitted, it is {@link origin}. The caller's
|
|
1147
|
+
* {@link WriteOptions.onWarnings | onWarnings} sees this as the destination.
|
|
1148
|
+
*
|
|
990
1149
|
* @remarks
|
|
991
1150
|
* Call this **after** resolving the destination (e.g. once a Save picker / permission prompt has
|
|
992
1151
|
* returned). The first invocation also fires the caller's {@link ITaskProgress.onStart}, so
|
|
993
1152
|
* encoding before the prompt resolves would show progress UI on top of the dialog. A store that
|
|
994
1153
|
* is cancelled should return without calling `encode`, so `onStart` never fires for it.
|
|
1154
|
+
*
|
|
1155
|
+
* @returns The bytes to persist, or `null` when the caller declined the write through
|
|
1156
|
+
* {@link WriteOptions.onWarnings}. A store that receives `null` persists nothing and returns
|
|
1157
|
+
* `null` — the same outcome as a dismissed save dialog.
|
|
995
1158
|
*/
|
|
996
|
-
encode: (format?: string) => Promise<ArrayBufferLike>;
|
|
1159
|
+
encode: (format?: string, origin?: IWorkbookIO.Origin) => Promise<ArrayBufferLike | null>;
|
|
997
1160
|
}
|
|
998
1161
|
/**
|
|
999
1162
|
* The request passed to {@link IWorkbookIO.IBackingStore.read}.
|
|
@@ -1049,6 +1212,10 @@ export declare namespace IWorkbookIO {
|
|
|
1049
1212
|
* The source size in bytes, if known.
|
|
1050
1213
|
*/
|
|
1051
1214
|
size?: number;
|
|
1215
|
+
/**
|
|
1216
|
+
* When the source was last modified, in milliseconds since the epoch, if known.
|
|
1217
|
+
*/
|
|
1218
|
+
lastModified?: number;
|
|
1052
1219
|
/**
|
|
1053
1220
|
* The detected source type (e.g. `'file'`, `'fetch'`), used for a fallback display name.
|
|
1054
1221
|
*/
|
|
@@ -68,6 +68,13 @@ export declare class DefaultWorkbookIO implements IWorkbookIO {
|
|
|
68
68
|
write<T extends IWorkbookIO.WriteOptions = IWorkbookIO.WriteOptions>(workbook: IWorkbook, target?: string | IWorkbookIO.Origin | T, optionsArg?: T): Promise<IWorkbookIO.Origin | null>;
|
|
69
69
|
/** @inheritdoc IWorkbookIO.writeAs */
|
|
70
70
|
writeAs<T extends IWorkbookIO.WriteAsOptions = IWorkbookIO.WriteAsOptions>(workbook: IWorkbook, target: string | IWorkbookIO.Origin, options?: T): Promise<IWorkbookIO.Origin | null>;
|
|
71
|
+
/**
|
|
72
|
+
* The one write path. `save` is whether the workbook moves to what is written and is marked
|
|
73
|
+
* clean (a save, a Save As), or stays where it is (an export).
|
|
74
|
+
*
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
protected _write<T extends IWorkbookIO.WriteOptions = IWorkbookIO.WriteOptions>(workbook: IWorkbook, target: string | IWorkbookIO.Origin, save: boolean, options?: T): Promise<IWorkbookIO.Origin | null>;
|
|
71
78
|
/**
|
|
72
79
|
* Strips a known file extension from a file name, returning the base name.
|
|
73
80
|
*
|
|
@@ -83,6 +90,8 @@ export declare class DefaultWorkbookIO implements IWorkbookIO {
|
|
|
83
90
|
protected _baseName(pathOrUrl: string | null | undefined): string | null;
|
|
84
91
|
protected _writeArrayBuffer<T extends IWorkbookIO.WriteOptions = IWorkbookIO.WriteOptions>(workbook: IWorkbook, writeType: IWorkbookIO.WriteFormatType, options?: T): Promise<ArrayBufferLike>;
|
|
85
92
|
protected _readArrayBuffer<T extends IWorkbookIO.ReadOptions = IWorkbookIO.ReadOptions>(arrayBuffer: ArrayBufferLike, format: IWorkbookIO.ReadFormatType, options?: T): Promise<IWorkbook>;
|
|
93
|
+
/** {@inheritDoc IWorkbookIO.isIWorkbookIO} */
|
|
94
|
+
get isIWorkbookIO(): true;
|
|
86
95
|
}
|
|
87
96
|
/**
|
|
88
97
|
* A singleton instance of the default {@link IWorkbookIO} implementation.
|
|
@@ -17,6 +17,10 @@ export interface WorkbookOriginOptions {
|
|
|
17
17
|
* The last-known size of the source in bytes (stat-style), if known.
|
|
18
18
|
*/
|
|
19
19
|
size?: number | null;
|
|
20
|
+
/**
|
|
21
|
+
* When the source was last modified, in milliseconds since the epoch (stat-style), if known.
|
|
22
|
+
*/
|
|
23
|
+
lastModified?: number | null;
|
|
20
24
|
/**
|
|
21
25
|
* Whether the source can be written back to (a silent re-save).
|
|
22
26
|
*
|
|
@@ -34,19 +38,20 @@ export interface WorkbookOriginOptions {
|
|
|
34
38
|
* concrete "light virtual file handle" (see `IO-DESIGN.md`).
|
|
35
39
|
*
|
|
36
40
|
* @remarks
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* including the workbook
|
|
41
|
+
* Names one file for its whole life. What is known about that file — its size, its encryption, its
|
|
42
|
+
* display label — can change in place ({@link update}, {@link setName}), firing `onChange` so
|
|
43
|
+
* holders — including the workbook, whose `getName()`/`onNameChange` derive from this — follow.
|
|
40
44
|
* Source logic (paths, URLs, formats) lives here, in the IO layer, not in the workbook model.
|
|
41
45
|
*
|
|
42
46
|
* An **unbound** origin (`path: null`) belongs to an in-memory workbook with no destination yet; a
|
|
43
|
-
*
|
|
47
|
+
* save that resolves one moves the workbook to a new origin, leaving this one as it was.
|
|
44
48
|
*/
|
|
45
49
|
export declare class WorkbookOrigin implements IWorkbookIO.Origin {
|
|
46
|
-
private _path;
|
|
50
|
+
private readonly _path;
|
|
47
51
|
private _name;
|
|
48
52
|
private _format;
|
|
49
53
|
private _size;
|
|
54
|
+
private _lastModified;
|
|
50
55
|
private _canWrite;
|
|
51
56
|
private _encryption;
|
|
52
57
|
/**
|
|
@@ -85,24 +90,28 @@ export declare class WorkbookOrigin implements IWorkbookIO.Origin {
|
|
|
85
90
|
getPassword(): string | null;
|
|
86
91
|
/** {@inheritDoc IWorkbookIO.Origin.getSize} */
|
|
87
92
|
getSize(): number | null;
|
|
93
|
+
/** {@inheritDoc IWorkbookIO.Origin.getLastModified} */
|
|
94
|
+
getLastModified(): number | null;
|
|
88
95
|
/** {@inheritDoc IWorkbookIO.Origin.canWrite} */
|
|
89
96
|
canWrite(): boolean;
|
|
90
97
|
/** {@inheritDoc IWorkbookIO.Origin.setName} */
|
|
91
98
|
setName(name: string | null): void;
|
|
92
99
|
/**
|
|
93
|
-
* Update
|
|
100
|
+
* Update what is known about the file in place. Fires `onChange` if anything actually changed.
|
|
94
101
|
*
|
|
95
102
|
* @remarks
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
103
|
+
* The **privileged mutation channel** (see `DESIGN-IO.md`) for the backing store and the IO layer:
|
|
104
|
+
* the written size, the encryption on disk, the format key a read resolved. Never format handlers,
|
|
105
|
+
* never the model, never chrome.
|
|
106
|
+
*
|
|
107
|
+
* There is no `path`: an origin names one file for its whole life. A save that resolves another
|
|
108
|
+
* destination mints a new origin for it (see `DESIGN-IO.md` §11).
|
|
100
109
|
*/
|
|
101
110
|
update(next: {
|
|
102
|
-
path?: string | null;
|
|
103
111
|
name?: string | null;
|
|
104
112
|
format?: string | null;
|
|
105
113
|
size?: number | null;
|
|
114
|
+
lastModified?: number | null;
|
|
106
115
|
canWrite?: boolean;
|
|
107
116
|
encryption?: string | null;
|
|
108
117
|
}): this;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IListener } from '../listener';
|
|
2
|
+
import { IWorkbookIO } from './IWorkbookIO';
|
|
3
|
+
/**
|
|
4
|
+
* The provider currently supplying `origin`, or `null` when no open workbook lives in it.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* How the IO layer finds the workbook a save was for: it holds the origin it wrote from.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getOriginProvider: (origin: IWorkbookIO.Origin) => WorkbookOriginProvider | null;
|
|
10
|
+
/** The origins of every open workbook. */
|
|
11
|
+
export declare const getOpenOrigins: () => IWorkbookIO.Origin[];
|
|
12
|
+
/**
|
|
13
|
+
* Default {@link IWorkbookIO.OriginProvider}: holds the workbook's current origin and moves when
|
|
14
|
+
* told to.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* {@link setOrigin} is on this class, not the interface — the workbook only reads its origin. The
|
|
18
|
+
* IO layer moves it after a save that resolved a new destination.
|
|
19
|
+
*
|
|
20
|
+
* An origin is supplied by one provider at a time, so the origin a save wrote from identifies
|
|
21
|
+
* exactly one workbook. Supplying an origin another open provider already supplies throws.
|
|
22
|
+
*/
|
|
23
|
+
export declare class WorkbookOriginProvider implements IWorkbookIO.OriginProvider {
|
|
24
|
+
private _origin;
|
|
25
|
+
private _released;
|
|
26
|
+
private readonly _emitter;
|
|
27
|
+
constructor(origin: IWorkbookIO.Origin);
|
|
28
|
+
/** {@inheritDoc IWorkbookIO.OriginProvider.getOrigin} */
|
|
29
|
+
getOrigin(): IWorkbookIO.Origin;
|
|
30
|
+
/**
|
|
31
|
+
* Supplies `origin` from now on. Fires `onOriginChange` unless it is already the current one.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Moves the workbook to another file; it writes nothing. The origin it replaces is left as it was
|
|
35
|
+
* — it still names its own file, and is free for another workbook.
|
|
36
|
+
*/
|
|
37
|
+
setOrigin(origin: IWorkbookIO.Origin): void;
|
|
38
|
+
/**
|
|
39
|
+
* Stops supplying: the origin is free for another workbook. Called when the workbook closes.
|
|
40
|
+
*/
|
|
41
|
+
release(): void;
|
|
42
|
+
/** {@inheritDoc IListener.ISource.addListeners} */
|
|
43
|
+
addListeners(listeners: IWorkbookIO.OriginProvider.IListeners, options?: IListener.Options): IListener.Remove;
|
|
44
|
+
private static _assertFree;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=WorkbookOriginProvider.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A reader over a captured markup fragment.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Content the model does not hold structurally is kept as the source's markup and replayed on save
|
|
6
|
+
* (a shape, a chart part). This reads the few facts such markup can answer without a model behind
|
|
7
|
+
* it. It is a reader over a fragment, not an XML library: elements, attributes and character data,
|
|
8
|
+
* matched by LOCAL name — prefixes are the producer's choice (`xdr:sp`, `a:t` and `c:ser` are only
|
|
9
|
+
* Excel's). The markup was already parsed once, as part of a whole document, by the reader that
|
|
10
|
+
* captured it.
|
|
11
|
+
*/
|
|
12
|
+
/** One element of a parsed fragment. `name` is the local name. */
|
|
13
|
+
export interface XmlElement {
|
|
14
|
+
name: string;
|
|
15
|
+
attrs: string;
|
|
16
|
+
children: (XmlElement | string)[];
|
|
17
|
+
/** Where the element's content starts in the source: just past its open tag. */
|
|
18
|
+
contentStart: number;
|
|
19
|
+
/** Where the element's content ends in the source: at its close tag. Equal to `contentStart` for an empty element. */
|
|
20
|
+
contentEnd: number;
|
|
21
|
+
}
|
|
22
|
+
export declare const decodeEntities: (text: string) => string;
|
|
23
|
+
/** Character data as it has to be spelled inside an element. */
|
|
24
|
+
export declare const encodeText: (text: string) => string;
|
|
25
|
+
/** The fragment's root element, or `null` when there is none to read. */
|
|
26
|
+
export declare const parseFragment: (xml: string) => XmlElement | null;
|
|
27
|
+
export declare const getAttribute: (element: XmlElement, name: string) => string | null;
|
|
28
|
+
export declare const childElements: (element: XmlElement) => XmlElement[];
|
|
29
|
+
export declare const findChild: (element: XmlElement, name: string) => XmlElement | null;
|
|
30
|
+
/** The element at the end of a path of local names, or `null` where the path breaks. */
|
|
31
|
+
export declare const findPath: (element: XmlElement, ...names: string[]) => XmlElement | null;
|
|
32
|
+
/** The element's own character data; what its child elements hold is not read. */
|
|
33
|
+
export declare const readCharacters: (element: XmlElement) => string;
|
|
34
|
+
/**
|
|
35
|
+
* The children to read in place of an `mc:AlternateContent`: ONE branch, never both.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* A producer states the same content once per consumer version, so a sweep over both branches
|
|
39
|
+
* reads every word twice. The fallback is the rendition for a reader that does not understand the
|
|
40
|
+
* choice's markup — which, for the markup that gets wrapped this way (an OMML equation), is this
|
|
41
|
+
* reader: the fallback carries the equation in its linear text form.
|
|
42
|
+
*/
|
|
43
|
+
export declare const alternateBranch: (element: XmlElement) => XmlElement[];
|
|
44
|
+
/**
|
|
45
|
+
* The plain text of a DrawingML text body (`txBody`, `c:rich`): its paragraphs joined by a newline,
|
|
46
|
+
* blank ones trimmed from the ends.
|
|
47
|
+
*/
|
|
48
|
+
export declare const readTextBody: (body: XmlElement) => string;
|
|
49
|
+
//# sourceMappingURL=_XmlFragment.d.ts.map
|
package/types/src/io/index.d.ts
CHANGED
|
@@ -4,7 +4,10 @@ declare class LM {
|
|
|
4
4
|
/**
|
|
5
5
|
* Set the license key provided by SheetXL.
|
|
6
6
|
* @remarks
|
|
7
|
-
*
|
|
7
|
+
* Without a call to this, the key is looked for where it runs:
|
|
8
|
+
* - In a browser, a file named `sheetxl.lic` served beside the page.
|
|
9
|
+
* - Outside a browser (Node, Bun, Deno, CI), the `SHEETXL_LICENSE_KEY` environment variable, then
|
|
10
|
+
* the key saved by `sheetxl license activate`.
|
|
8
11
|
*
|
|
9
12
|
* @param licenseKey The license key as a string.
|
|
10
13
|
* @param force If set to `true` will replace an existing key.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Two-tier node fingerprint.
|
|
3
|
+
* - `stable`: hash of fields unlikely to change (arch, osType, platform, memoryGB).
|
|
4
|
+
* Used for hard enforcement.
|
|
5
|
+
* - `full`: hash that also includes hostname.
|
|
6
|
+
* Passes silently if stable matches but full diverges (hostname rename, container re-creation).
|
|
7
|
+
*/
|
|
8
|
+
export interface NodeFingerprint {
|
|
9
|
+
stable: string;
|
|
10
|
+
full: string;
|
|
11
|
+
}
|
|
12
|
+
export interface HostDetails {
|
|
13
|
+
cpus?: number;
|
|
14
|
+
memoryGB?: number;
|
|
15
|
+
protocol?: string | null;
|
|
16
|
+
domain?: string | null;
|
|
17
|
+
fingerprint?: NodeFingerprint;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* What looking for a license key found, read where the runtime keeps it.
|
|
21
|
+
* - `found`: a key, and where it came from.
|
|
22
|
+
* - `absent`: the lookup completed and there is no key (`from` names where it looked).
|
|
23
|
+
* - `unreachable`: the lookup could not complete (offline, a server error); whether a key exists is
|
|
24
|
+
* unknown, so this is never treated as an evaluation.
|
|
25
|
+
*/
|
|
26
|
+
export type LicenseKeySource = {
|
|
27
|
+
status: 'found';
|
|
28
|
+
key: string;
|
|
29
|
+
from: string;
|
|
30
|
+
} | {
|
|
31
|
+
status: 'absent';
|
|
32
|
+
from: string;
|
|
33
|
+
} | {
|
|
34
|
+
status: 'unreachable';
|
|
35
|
+
from: string;
|
|
36
|
+
reason: string;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=Types.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A placeholder license key: the "evaluation" spellings a caller may pass to
|
|
3
|
+
* `LicenseManager.setLicenseKey` to run unlicensed on purpose (`eval`, `trial`, or the
|
|
4
|
+
* `visit …`/`email …` pointer text a starter template ships with). These select an evaluation
|
|
5
|
+
* license; they are never keys, so the persistent key store ignores them.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isPlaceholderLicenseKey(key: string | null | undefined): boolean;
|
|
8
|
+
export declare function getBuildVersion(): string;
|
|
9
|
+
/** When this build was made, as an ISO 8601 instant, or `''` when unstamped. */
|
|
10
|
+
export declare function getBuildDate(): string;
|
|
11
|
+
/** An evaluation build runs for 120 days from its build date. */
|
|
12
|
+
export declare function isEvalPeriodExpired(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The build as a person reads it: the stamped version, or `local` plus the local build time.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* A stamped version already names its commit, so the time adds nothing to it. A workspace build
|
|
18
|
+
* has no identity except when it was built, and to the minute, because several rebuilds a day
|
|
19
|
+
* all look alike at date resolution.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getBuildLabel(): string;
|
|
22
|
+
//# sourceMappingURL=_Utils.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LicenseDetails } from './LicenseDetails';
|
|
2
|
+
import { HostDetails } from './Types';
|
|
3
|
+
export interface UnlicensedOptions {
|
|
4
|
+
/** The license type: `eval`, `invalid`, `unavailable`. */
|
|
5
|
+
type: string;
|
|
6
|
+
/** Where the (missing or unusable) key was looked for. */
|
|
7
|
+
keyFrom: string;
|
|
8
|
+
exceptions: readonly string[];
|
|
9
|
+
/** Whether the product runs without the watermark anyway (an evaluation on localhost). */
|
|
10
|
+
validFor: boolean;
|
|
11
|
+
isEval?: boolean;
|
|
12
|
+
licensee?: string | null;
|
|
13
|
+
developerCount?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A license that is not a valid key: an evaluation, a key that is not a key, a key that could not
|
|
17
|
+
* be loaded. Each runtime decides which one it is running and on what terms.
|
|
18
|
+
*/
|
|
19
|
+
export declare const genUnlicensedDetails: (options: UnlicensedOptions) => LicenseDetails;
|
|
20
|
+
/**
|
|
21
|
+
* The license a key grants on `host`. A key that does not decode is an `invalid` license.
|
|
22
|
+
*/
|
|
23
|
+
export declare const detailsForKey: (from: string, key: string, host: HostDetails, isDevEnv: boolean) => LicenseDetails;
|
|
24
|
+
//# sourceMappingURL=details.d.ts.map
|