@sheetxl/sdk 0.8.0-beta.1 → 0.8.0-beta.11
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 +1 -1
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/browser/esm/B7aUIvgUjncMMD_i.mjs +394 -0
- package/browser/esm/BFagR2JeWs74iAG3.mjs +171 -0
- package/browser/esm/BGOFfpxr2jPIdqmV.mjs +40 -0
- package/browser/esm/BLoUBId2xZpXAK_H.mjs +698 -0
- package/browser/esm/BMyDRQ716j79h_bH.mjs +86 -0
- package/browser/esm/BVDiOXGMc5_FMGfy.mjs +400 -0
- package/browser/esm/BjkCiv5Jz6WYKZeu.mjs +598 -0
- package/browser/esm/BkBhLS0l6z8sxI6D.mjs +441 -0
- package/browser/esm/BnG31I6Oj_HEtSPS.mjs +167 -0
- package/browser/esm/BoV6zPBnfqCBCqZ7.mjs +7729 -0
- package/browser/esm/BpgskG1Er_lGQ_yS.mjs +142 -0
- package/browser/esm/BtvLTTfSBdAKplVG.mjs +466 -0
- package/browser/esm/C16ycKja6zG0crV_.mjs +55580 -0
- package/browser/esm/C2VbEI_XVAoseAwa.mjs +1552 -0
- package/browser/esm/C4MqfLn9Dm-l3OIk.mjs +540 -0
- package/browser/esm/C5E6zSGAALWf61n4.mjs +199 -0
- package/browser/esm/CHU6iu_WGlm7fLET.mjs +1001 -0
- package/browser/esm/CQYjO777cmAznUzK.mjs +527 -0
- package/browser/esm/CU3DmJ-YnVVrC1_k.mjs +1123 -0
- package/browser/esm/CV5EGEjG5_-CPpP0.mjs +8212 -0
- package/browser/esm/{uyWBMSIxMlt8n5Z3.mjs → CaB7J-xgfKO2uAkG.mjs} +2 -2
- package/browser/esm/CkxWugaJFjDGZNZ-.mjs +12 -0
- package/browser/esm/ClPfI4lODvCece29.mjs +632 -0
- package/browser/esm/ClbvFbFzFzXLBKNN.mjs +193 -0
- package/browser/esm/{DlPMeIyxT9tG_WDk.mjs → Ctjb0SsxV4K4MMqG.mjs} +179 -202
- package/browser/esm/D5np__Jb1euAyaLw.mjs +7 -0
- package/browser/esm/DEiPS3Dr-s4fPbVZ.mjs +607 -0
- package/browser/esm/DLLE0FZNsKxbBzRn.mjs +128 -0
- package/browser/esm/DWNzqw7DUKwoxjri.mjs +20 -0
- package/browser/esm/{B0HS42a7lga1k1U_.mjs → Dlmig06rIo7cInRk.mjs} +2 -2
- package/browser/esm/{f2G3QRgEbvFJcoa2.mjs → DvAaxH6z_tGvrRzl.mjs} +1704 -1008
- package/browser/esm/Dyq_ivuHvlXLwPCl.mjs +12831 -0
- package/browser/esm/PcHFjNzQsE54POri.mjs +1141 -0
- package/browser/esm/S2dNNx1a5ydRnARM.mjs +367 -0
- package/browser/esm/f1IoRb7tEb0QmCSt.mjs +110 -0
- package/browser/esm/gssVX_FH1XFN-twD.mjs +210 -0
- package/browser/esm/index.mjs +1759 -1161
- package/browser/esm/nvU0ClAbf0g94YBK.mjs +1695 -0
- package/browser/esm/zlLuW405RSguy4Kn.mjs +357 -0
- package/licenses/dependencies.txt +141 -141
- package/node/esm/2Kihw_-5lVTEnwMa.mjs +1132 -0
- package/node/esm/857CIBgQgGpnqrXk.mjs +199 -0
- package/node/esm/B084DssTcdBheTp_.mjs +7966 -0
- package/node/esm/B21JjOLghRoDOrkx.mjs +134 -0
- package/node/esm/BIRq1kT7lLRzns9t.mjs +610 -0
- package/node/esm/BIwObuhTJYf0jpUa.mjs +451 -0
- package/node/esm/Bbf1Pm9Gk7YpLTvg.mjs +12 -0
- package/node/esm/BqiexuA89caYnAPz.mjs +1135 -0
- package/node/esm/BrCKGFRsX_ezFJ4B.mjs +811 -0
- package/node/esm/CCN5vD410obwdz38.mjs +405 -0
- package/node/esm/{Cku7XiUvw1xrRasi.mjs → CDHdgJXH2vS71WMc.mjs} +1 -1
- package/node/esm/CGp6VZL-gZa9Uezx.mjs +1860 -0
- package/node/esm/CNCNJNg890KdgkWh.mjs +142 -0
- package/node/esm/CZICGK_ss0HoGHCP.mjs +7 -0
- package/node/esm/CZiqiay42tFTrLI4.mjs +171 -0
- package/node/esm/CdJHUJSBRHZoryPe.mjs +360 -0
- package/node/esm/Ct3h15sCus4Tgt6M.mjs +1762 -0
- package/node/esm/CwePQwTILHHjGDkZ.mjs +1033 -0
- package/node/esm/CzXT00vrQa1_gvW9.mjs +28 -0
- package/node/esm/D1TKBVmoKGAXf37B.mjs +402 -0
- package/node/esm/D2KBymQJd1XhpeQD.mjs +540 -0
- package/node/esm/D6e2z7eZpxOJXHc7.mjs +1783 -0
- package/node/esm/D8zEN-6ZdDqDvTxM.mjs +639 -0
- package/node/esm/DNRhGK-8Tr9xcRyc.mjs +8320 -0
- package/node/esm/DOU54VsOjG-m-NyQ.mjs +210 -0
- package/node/esm/DUTskXCXref-IJnI.mjs +133 -0
- package/node/esm/D_t5AUxSm7_icjzq.mjs +638 -0
- package/node/esm/Db0v7zXNnyjBIjjI.mjs +372 -0
- package/node/esm/De2IONBxQhz-Qbyh.mjs +596 -0
- package/node/esm/Df1bL6VFvrqIdSLB.mjs +40 -0
- package/node/esm/DkwIPzKc3UwdUIfM.mjs +86 -0
- package/node/esm/DrTZbfemSLq2mseG.mjs +111 -0
- package/node/esm/OVfaSb506tNSIvbv.mjs +57107 -0
- package/node/esm/cGwrLA1RCE-WhJ7w.mjs +255 -0
- package/node/esm/index.mjs +2873 -53929
- package/node/esm/mFiBSM7XgBHV9AY7.mjs +13010 -0
- package/node/esm/yavzZOiZW_EjG9lE.mjs +15 -0
- package/package.json +15 -17
- package/resources/contents.json +184 -0
- package/resources/fonts/arial-bold-italic.hinted.json +125 -0
- package/resources/fonts/arial-bold-italic.metrics.json +139 -0
- package/resources/fonts/arial-bold-italic.rows.json +9 -0
- package/resources/fonts/arial-bold.hinted.json +125 -0
- package/resources/fonts/arial-bold.metrics.json +139 -0
- package/resources/fonts/arial-bold.rows.json +9 -0
- package/resources/fonts/arial-italic.hinted.json +125 -0
- package/resources/fonts/arial-italic.metrics.json +139 -0
- package/resources/fonts/arial-italic.rows.json +9 -0
- package/resources/fonts/arial-regular.hinted.json +125 -0
- package/resources/fonts/arial-regular.metrics.json +139 -0
- package/resources/fonts/arial-regular.rows.json +9 -0
- package/resources/fonts/calibri-bold-italic.hinted.json +122 -0
- package/resources/fonts/calibri-bold-italic.metrics.json +137 -0
- package/resources/fonts/calibri-bold-italic.rows.json +9 -0
- package/resources/fonts/calibri-bold.hinted.json +122 -0
- package/resources/fonts/calibri-bold.metrics.json +137 -0
- package/resources/fonts/calibri-bold.rows.json +9 -0
- package/resources/fonts/calibri-italic.hinted.json +121 -0
- package/resources/fonts/calibri-italic.metrics.json +137 -0
- package/resources/fonts/calibri-italic.rows.json +9 -0
- package/resources/fonts/calibri-regular.hinted.json +121 -0
- package/resources/fonts/calibri-regular.metrics.json +137 -0
- package/resources/fonts/calibri-regular.rows.json +9 -0
- package/resources/fonts/cambria-bold-italic.hinted.json +105 -0
- package/resources/fonts/cambria-bold-italic.metrics.json +66 -0
- package/resources/fonts/cambria-bold-italic.rows.json +9 -0
- package/resources/fonts/cambria-bold.hinted.json +108 -0
- package/resources/fonts/cambria-bold.metrics.json +66 -0
- package/resources/fonts/cambria-bold.rows.json +9 -0
- package/resources/fonts/cambria-italic.hinted.json +102 -0
- package/resources/fonts/cambria-italic.metrics.json +66 -0
- package/resources/fonts/cambria-italic.rows.json +9 -0
- package/resources/fonts/cambria-regular.hinted.json +110 -0
- package/resources/fonts/cambria-regular.metrics.json +66 -0
- package/resources/fonts/cambria-regular.rows.json +9 -0
- package/resources/fonts/contents.json +406 -0
- package/resources/fonts/courier-new-bold-italic.hinted.json +11 -0
- package/resources/fonts/courier-new-bold-italic.metrics.json +143 -0
- package/resources/fonts/courier-new-bold-italic.rows.json +9 -0
- package/resources/fonts/courier-new-bold.hinted.json +11 -0
- package/resources/fonts/courier-new-bold.metrics.json +143 -0
- package/resources/fonts/courier-new-bold.rows.json +9 -0
- package/resources/fonts/courier-new-italic.hinted.json +11 -0
- package/resources/fonts/courier-new-italic.metrics.json +143 -0
- package/resources/fonts/courier-new-italic.rows.json +9 -0
- package/resources/fonts/courier-new-regular.hinted.json +11 -0
- package/resources/fonts/courier-new-regular.metrics.json +143 -0
- package/resources/fonts/courier-new-regular.rows.json +9 -0
- package/resources/fonts/times-new-roman-bold-italic.hinted.json +125 -0
- package/resources/fonts/times-new-roman-bold-italic.metrics.json +141 -0
- package/resources/fonts/times-new-roman-bold-italic.rows.json +9 -0
- package/resources/fonts/times-new-roman-bold.hinted.json +125 -0
- package/resources/fonts/times-new-roman-bold.metrics.json +141 -0
- package/resources/fonts/times-new-roman-bold.rows.json +9 -0
- package/resources/fonts/times-new-roman-italic.hinted.json +125 -0
- package/resources/fonts/times-new-roman-italic.metrics.json +143 -0
- package/resources/fonts/times-new-roman-italic.rows.json +9 -0
- package/resources/fonts/times-new-roman-regular.hinted.json +125 -0
- package/resources/fonts/times-new-roman-regular.metrics.json +141 -0
- package/resources/fonts/times-new-roman-regular.rows.json +9 -0
- package/resources/locales/de/model.msg.json +199 -21
- package/resources/locales/en/model.msg.json +207 -23
- package/types/scripting-api.json +10663 -0
- package/types/scripting-enums.json +435 -130
- package/types/scripting.d.ts +33010 -15730
- package/types/src/.generated/wasm/fonts.d.ts +161 -0
- package/types/src/.generated/wasm/fonts_bg.inline.d.ts +3 -0
- package/types/src/.generated/wasm/sdk.d.ts +122 -0
- package/types/src/.generated/wasm/sdk_bg.inline.d.ts +3 -0
- package/types/src/address/AddressUtils.d.ts +10 -1
- package/types/src/address/_StructuredAddress.d.ts +58 -0
- 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} +58 -41
- package/types/src/border/index.d.ts +1 -1
- package/types/src/calculation/Calculation.d.ts +584 -149
- package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
- package/types/src/calculation/FormulaLiterals.d.ts +2 -1
- package/types/src/calculation/FormulaText.d.ts +98 -0
- package/types/src/calculation/ICalculation.d.ts +353 -88
- package/types/src/calculation/INamedFormulasCollection.d.ts +9 -8
- package/types/src/calculation/NamedFormulaCollection.d.ts +322 -115
- 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/_FormulaToolkit.d.ts +9 -0
- package/types/src/calculation/_TableExtent.d.ts +60 -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 +152 -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 +42 -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/engine/CalcBackend.d.ts +855 -0
- package/types/src/calculation/engine/index.d.ts +10 -0
- package/types/src/calculation/executor/CalcExecutor.d.ts +331 -33
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +49 -2
- package/types/src/calculation/executor/CircularReference.d.ts +2 -0
- package/types/src/calculation/formula/Formula.d.ts +67 -21
- package/types/src/calculation/formula/FormulaBlock.d.ts +131 -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 +277 -67
- package/types/src/calculation/formula/LambdaValue.d.ts +51 -26
- 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 +35 -0
- package/types/src/calculation/functions/Operators.d.ts +8 -0
- package/types/src/calculation/functions/expandDeclaration.d.ts +15 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +3 -2
- package/types/src/calculation/grid/CalcGrid.d.ts +443 -158
- package/types/src/calculation/grid/CalcGridBackend.d.ts +523 -0
- package/types/src/calculation/grid/CalcGridProxy.d.ts +135 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +69 -12
- package/types/src/calculation/grid/FormulaEntry.d.ts +129 -0
- package/types/src/calculation/grid/FormulaHost.d.ts +284 -0
- package/types/src/calculation/grid/ICalcGrid.d.ts +528 -141
- package/types/src/calculation/grid/_CalcRequest.d.ts +299 -0
- package/types/src/calculation/grid/_CellValueRun.d.ts +21 -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 +364 -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 +46 -0
- package/types/src/calculation/state/CalcState.d.ts +32 -1
- package/types/src/calculation/state/CalculationContext.d.ts +50 -3
- package/types/src/calculation/state/IContextContainer.d.ts +141 -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/calculation/toolkit/FormulaLiteralReader.d.ts +4 -0
- package/types/src/calculation/toolkit/FormulaTextParser.d.ts +10 -0
- package/types/src/calculation/toolkit/FunctionDeclarationTable.d.ts +4 -0
- package/types/src/calculation/toolkit/index.d.ts +12 -0
- package/types/src/cell/ICell.d.ts +357 -33
- package/types/src/cell/ICellHeader.d.ts +31 -8
- package/types/src/cell/ICellProtection.d.ts +50 -10
- package/types/src/cellRange/ICellHeaderRange.d.ts +6 -9
- package/types/src/cellRange/ICellHeaderRanges.d.ts +5 -0
- package/types/src/cellRange/ICellRange.d.ts +737 -130
- package/types/src/cellRange/ICellRanges.d.ts +31 -24
- package/types/src/chart/Chart.d.ts +246 -16
- package/types/src/chart/ChartCollection.d.ts +31 -0
- package/types/src/chart/IChart.d.ts +2058 -18
- package/types/src/chart/IChartCollection.d.ts +50 -0
- package/types/src/chart/_ChartParts.d.ts +1066 -0
- package/types/src/chart/_ChartSource.d.ts +47 -0
- package/types/src/chart/createChart.d.ts +26 -0
- package/types/src/chart/index.d.ts +5 -3
- package/types/src/chart/kinds/ChartKind.d.ts +252 -0
- package/types/src/chart/kinds/_Area.d.ts +3 -0
- package/types/src/chart/kinds/_Bar.d.ts +4 -0
- package/types/src/chart/kinds/_BoxWhisker.d.ts +4 -0
- package/types/src/chart/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/kinds/_Funnel.d.ts +4 -0
- package/types/src/chart/kinds/_Hierarchy.d.ts +31 -0
- package/types/src/chart/kinds/_Histogram.d.ts +4 -0
- package/types/src/chart/kinds/_HitKinds.d.ts +23 -0
- package/types/src/chart/kinds/_Line.d.ts +4 -0
- package/types/src/chart/kinds/_OfPie.d.ts +4 -0
- package/types/src/chart/kinds/_Pie.d.ts +4 -0
- package/types/src/chart/kinds/_Placeholder.d.ts +6 -0
- package/types/src/chart/kinds/_Radar.d.ts +4 -0
- package/types/src/chart/kinds/_Scatter.d.ts +8 -0
- package/types/src/chart/kinds/_Sunburst.d.ts +4 -0
- package/types/src/chart/kinds/_Surface.d.ts +4 -0
- package/types/src/chart/kinds/_Treemap.d.ts +4 -0
- package/types/src/chart/kinds/_Waterfall.d.ts +18 -0
- package/types/src/chart/kinds/_builtIns.d.ts +11 -0
- package/types/src/chart/layout/ChartLayout.d.ts +825 -0
- package/types/src/chart/layout/TextMeasurer.d.ts +38 -0
- package/types/src/chart/layout/_HitGeometry.d.ts +50 -0
- package/types/src/chart/layout/_HitTest.d.ts +36 -0
- package/types/src/chart/layout/_Layout.d.ts +25 -0
- package/types/src/chart/layout/_LayoutUtils.d.ts +97 -0
- package/types/src/chart/math/BoxStats.d.ts +35 -0
- package/types/src/chart/math/DateUnitCalcs.d.ts +80 -0
- package/types/src/chart/math/DisplayUnits.d.ts +53 -0
- package/types/src/chart/math/Histogram.d.ts +48 -0
- package/types/src/chart/math/OrdUnitCalcs.d.ts +166 -0
- package/types/src/chart/math/Treemap.d.ts +28 -0
- package/types/src/chart/math/Trendlines.d.ts +71 -0
- package/types/src/chart/math/UnitCalcs.d.ts +98 -0
- package/types/src/chart/model/ChartModel.d.ts +681 -0
- package/types/src/chart/model/_ChartType.d.ts +14 -0
- package/types/src/chart/model/_Edits.d.ts +489 -0
- package/types/src/chart/model/_Grouping.d.ts +83 -0
- package/types/src/chart/model/_Inference.d.ts +52 -0
- package/types/src/chart/model/_ModelFacts.d.ts +112 -0
- package/types/src/chart/model/_NewChart.d.ts +208 -0
- package/types/src/chart/model/_OfPie.d.ts +18 -0
- package/types/src/chart/resolve/_LegacyStyles.d.ts +48 -0
- package/types/src/chart/resolve/_Resolve.d.ts +51 -0
- package/types/src/chart/resolve/_ResolvedChart.d.ts +444 -0
- 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/RTree.d.ts +116 -36
- 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 +7 -4
- package/types/src/collections/SpatialMap.d.ts +15 -29
- package/types/src/collections/SpatialMap3D.d.ts +2 -0
- package/types/src/collections/Tuple.d.ts +128 -16
- package/types/src/collections/_GridUtils.d.ts +19 -6
- package/types/src/collections/_SpatialUtils.d.ts +20 -2
- package/types/src/collections/index.d.ts +2 -1
- package/types/src/color/_BuiltInIndexDefs.d.ts +6 -0
- package/types/src/comment/Comment.d.ts +246 -0
- package/types/src/comment/CommentCollection.d.ts +40 -0
- package/types/src/comment/IComment.d.ts +377 -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 +67 -0
- package/types/src/comment/index.d.ts +1 -0
- package/types/src/condition/AnchoredConditional.d.ts +110 -19
- 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 +296 -75
- 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 +34 -17
- package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +16 -13
- package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
- package/types/src/dataTable/DataTable.d.ts +67 -0
- package/types/src/dataTable/DataTableCollection.d.ts +19 -0
- package/types/src/dataTable/IDataTable.d.ts +99 -0
- package/types/src/dataTable/IDataTableCollection.d.ts +18 -0
- package/types/src/dataTable/index.d.ts +6 -0
- package/types/src/dataValidation/DataValidation.d.ts +70 -4
- package/types/src/dataValidation/DataValidationCollection.d.ts +23 -9
- package/types/src/dataValidation/IDataValidation.d.ts +150 -31
- package/types/src/dataValidation/IDataValidationCollection.d.ts +34 -2
- package/types/src/date/DateUtils.d.ts +20 -0
- package/types/src/date/_DateUtils.d.ts +91 -7
- package/types/src/documentProperties/DocumentProperties.d.ts +66 -0
- package/types/src/documentProperties/ICustomProperty.d.ts +69 -0
- package/types/src/documentProperties/IDocumentProperties.d.ts +110 -0
- package/types/src/documentProperties/index.d.ts +3 -0
- 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 +171 -19
- 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 +129 -77
- package/types/src/fill/IFillable.d.ts +47 -0
- package/types/src/fill/IStroke.d.ts +204 -64
- package/types/src/fill/PaintUtils.d.ts +22 -0
- 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 +3 -0
- package/types/src/filter/IFilter.d.ts +188 -5
- package/types/src/font/AdvanceBuilder.d.ts +59 -0
- package/types/src/font/AdvanceTable.d.ts +228 -0
- package/types/src/font/CanvasAdvanceBuilder.d.ts +54 -0
- package/types/src/font/FontCapture.d.ts +4 -0
- package/types/src/font/FontCollection.d.ts +108 -0
- package/types/src/font/FontPlatform.d.ts +20 -0
- package/types/src/font/FontUtils.d.ts +5 -0
- package/types/src/font/IFont.d.ts +208 -61
- package/types/src/font/IFontCollection.d.ts +126 -22
- package/types/src/font/IFontStyle.d.ts +207 -0
- package/types/src/font/TableFileAdvanceBuilder.d.ts +36 -0
- package/types/src/font/_BuiltinFontTables.d.ts +10 -0
- package/types/src/font/_FontUtils.d.ts +11 -4
- package/types/src/font/_FontsVersion.d.ts +7 -0
- package/types/src/font/index.d.ts +2 -1
- package/types/src/font/platform.browser.d.ts +15 -0
- package/types/src/font/platform.node.d.ts +5 -0
- package/types/src/group/Group.d.ts +141 -0
- package/types/src/group/GroupMovableCollection.d.ts +41 -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 +21 -3
- package/types/src/hyperlink/IHyperlink.d.ts +20 -1
- package/types/src/hyperlink/_Hyperlink.d.ts +5 -1
- package/types/src/i18n/LanguagePack.d.ts +12 -4
- package/types/src/index.d.ts +8 -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 +25 -1
- package/types/src/license/Types.d.ts +38 -0
- package/types/src/license/_Utils.d.ts +39 -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 +46 -0
- package/types/src/{lib/utils/utils.node.d.ts → license/runtime.node.d.ts} +19 -12
- package/types/src/listener/IListener.d.ts +23 -6
- package/types/src/listener/ListenerEmitter.d.ts +55 -6
- 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 +405 -60
- package/types/src/movable/IMovableCollection.d.ts +64 -4
- package/types/src/movable/Movable.d.ts +161 -50
- package/types/src/movable/MovableCollection.d.ts +21 -10
- 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 +39 -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 +34 -1
- package/types/src/named/INamedCollection.d.ts +28 -2
- package/types/src/named/NamedCollection.d.ts +32 -19
- package/types/src/numFmt/BuiltInFormats.d.ts +20 -7
- package/types/src/numFmt/IFormatEngine.d.ts +2 -0
- package/types/src/numFmt/NumberFormatParser.d.ts +5 -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 +131 -4
- package/types/src/picture/Picture.d.ts +42 -14
- 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/IPageLayout.d.ts +635 -0
- package/types/src/print/PageLayout.d.ts +258 -0
- package/types/src/print/index.d.ts +1 -1
- package/types/src/protectedRange/IProtectedRange.d.ts +6 -2
- 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 +42 -2
- package/types/src/protection/PasswordHasher.d.ts +13 -0
- 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/richData/IRichDataKind.d.ts +22 -0
- package/types/src/richData/RichDataRegistry.d.ts +57 -0
- package/types/src/richData/RichText.d.ts +59 -0
- package/types/src/richData/index.d.ts +3 -0
- 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 +30 -28
- package/types/src/scripting/ITypedFunction.d.ts +1 -1
- 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 +52 -0
- package/types/src/scripting/declarations.node.d.ts +9 -0
- package/types/src/scripting/index.d.ts +3 -0
- package/types/src/selection/ChartElementSelection.d.ts +39 -0
- package/types/src/selection/IChartElementSelection.d.ts +103 -0
- package/types/src/selection/IItemSelection.d.ts +131 -0
- package/types/src/selection/IMovableSelection.d.ts +120 -0
- package/types/src/selection/IRangeSelection.d.ts +13 -8
- package/types/src/selection/ItemSelection.d.ts +49 -0
- package/types/src/selection/MovableSelection.d.ts +29 -0
- package/types/src/selection/RangeSelection.d.ts +19 -4
- package/types/src/selection/index.d.ts +4 -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 +342 -194
- package/types/src/shape/IShapeStyle.d.ts +109 -0
- package/types/src/shape/ITextBoxStyle.d.ts +85 -0
- package/types/src/shape/Shape.d.ts +107 -21
- package/types/src/shape/ShapeStyleUtils.d.ts +66 -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 +79 -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 +4 -0
- package/types/src/sheet/CellRegion.d.ts +43 -3
- package/types/src/sheet/ICellContainerOptions.d.ts +50 -0
- package/types/src/sheet/IOpaqueSheet.d.ts +46 -0
- package/types/src/sheet/ISheet.d.ts +81 -931
- package/types/src/sheet/IWorksheet.d.ts +1514 -0
- package/types/src/sheet/{ISheetCollection.d.ts → IWorksheetCollection.d.ts} +38 -16
- package/types/src/sheet/NamedCellRange.d.ts +17 -8
- package/types/src/sheet/NamedRange.d.ts +10 -2
- package/types/src/sheet/OpaqueSheet.d.ts +114 -0
- package/types/src/sheet/SheetCell.d.ts +96 -39
- package/types/src/sheet/SheetRange.d.ts +130 -27
- package/types/src/sheet/SheetRanges.d.ts +33 -18
- package/types/src/sheet/Worksheet.d.ts +2250 -0
- package/types/src/sheet/WorksheetCollection.d.ts +39 -0
- package/types/src/sheet/_Anomalies.d.ts +109 -0
- package/types/src/sheet/_AnomalyFormulaChecks.d.ts +125 -0
- package/types/src/sheet/_AnomalyLabelChecks.d.ts +21 -0
- package/types/src/sheet/_CellBuffer.d.ts +224 -0
- package/types/src/sheet/_CopyUtils.d.ts +13 -6
- package/types/src/sheet/_HeldFormula.d.ts +69 -0
- package/types/src/sheet/_IgnoredErrors.d.ts +46 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +10 -9
- package/types/src/sheet/_Kinds.d.ts +34 -0
- package/types/src/sheet/_Labels.d.ts +38 -0
- package/types/src/sheet/_ListenerAnchor.d.ts +104 -0
- package/types/src/sheet/_RangeStateSweep.d.ts +15 -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 +5 -5
- package/types/src/sheet/_SheetChangeEvent.d.ts +72 -0
- package/types/src/sheet/_SheetCoords.d.ts +3 -3
- package/types/src/sheet/_SheetEvents.d.ts +43 -0
- package/types/src/sheet/_SheetFilterUtils.d.ts +51 -3
- package/types/src/sheet/_SheetIntents.d.ts +314 -0
- package/types/src/sheet/_SheetMessages.d.ts +1 -1
- package/types/src/sheet/_SheetMutations.d.ts +185 -66
- package/types/src/sheet/_SheetSortUtils.d.ts +2 -2
- package/types/src/sheet/_SheetStateReader.d.ts +35 -11
- package/types/src/sheet/_SheetStateTypes.d.ts +143 -79
- package/types/src/sheet/_SheetUtils.d.ts +59 -41
- package/types/src/sheet/_WatchAnchor.d.ts +106 -0
- package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +4 -4
- package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +3 -3
- package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +3 -3
- package/types/src/sheet/index.d.ts +5 -2
- 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 +223 -337
- package/types/src/sheet/style/SheetDirectStyle.d.ts +31 -20
- package/types/src/sheet/style/SheetNamedStyle.d.ts +19 -17
- package/types/src/sheet/style/SheetTableStyle.d.ts +5 -5
- package/types/src/sheet/style/_DigitWidth.d.ts +7 -0
- package/types/src/sheet/style/_Resolvers.d.ts +17 -10
- package/types/src/sheet/style/_StyleUtils.d.ts +34 -40
- package/types/src/sheetHeader/ISheetHeader.d.ts +96 -55
- package/types/src/sheetHeader/SheetCellHeader.d.ts +6 -0
- package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +2 -0
- package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +2 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +48 -27
- package/types/src/sheetHeader/_HeaderMetrics.d.ts +37 -0
- package/types/src/sheetHeader/_HeaderUtils.d.ts +5 -4
- package/types/src/sheetProtection/{ISheetProtection.d.ts → IWorksheetProtection.d.ts} +64 -30
- package/types/src/sheetProtection/WorksheetProtection.d.ts +51 -0
- package/types/src/sheetProtection/index.d.ts +1 -1
- package/types/src/sheetView/{ISheetView.d.ts → IWorksheetView.d.ts} +230 -69
- package/types/src/sheetView/WorksheetView.d.ts +139 -0
- package/types/src/sheetView/_SheetViewUtils.d.ts +5 -3
- package/types/src/sheetView/index.d.ts +1 -1
- 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 +39 -7
- 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} +117 -85
- 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 +9 -8
- 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 +723 -78
- package/types/src/table/AutoTable.d.ts +8 -6
- package/types/src/table/ITable.d.ts +289 -49
- 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 +20 -4
- package/types/src/table/_NamedTableSource.d.ts +3 -2
- 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 +150 -15
- package/types/src/text/ITextFrame.d.ts +110 -1
- package/types/src/text/TextBoxAlignment.d.ts +25 -16
- package/types/src/text/TextEngine.d.ts +34 -0
- package/types/src/text/TextFrame.d.ts +8 -2
- 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 +12 -2
- package/types/src/text/TextStacked.d.ts +83 -0
- package/types/src/text/TextWrapper.d.ts +32 -26
- package/types/src/text/_TextUtils.d.ts +5 -5
- package/types/src/text/_TextWrapperFallback.d.ts +49 -0
- package/types/src/text/impl/TabStrategy.d.ts +3 -1
- package/types/src/text/index.d.ts +1 -0
- package/types/src/text/richtext/IRichText.d.ts +50 -0
- package/types/src/text/richtext/index.d.ts +1 -1
- package/types/src/theme/ITheme.d.ts +153 -11
- package/types/src/theme/IThemeCollection.d.ts +2 -0
- package/types/src/theme/ThemeCollection.d.ts +16 -7
- package/types/src/theme/_OfficeFontScheme.d.ts +8 -0
- package/types/src/theme/_OfficeFormatScheme.d.ts +3 -0
- package/types/src/transaction/ITransaction.d.ts +277 -45
- package/types/src/transaction/Transaction.d.ts +108 -11
- package/types/src/transaction/TransactionUndoManager.d.ts +4 -1
- package/types/src/transaction/_BatchHandle.d.ts +118 -0
- package/types/src/type/AbstractCollection.d.ts +92 -0
- package/types/src/type/ICollection.d.ts +131 -1
- package/types/src/type/IProperties.d.ts +1 -1
- 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 +4 -4
- package/types/src/wasm/_fontsWasm.d.ts +7 -0
- package/types/src/wasm/_sdkWasm.d.ts +7 -0
- package/types/src/wasm/fontsWasm.d.ts +32 -0
- package/types/src/wasm/index.d.ts +3 -0
- package/types/src/wasm/loader.browser.d.ts +9 -0
- package/types/src/wasm/loader.node.d.ts +9 -0
- package/types/src/wasm/sdkWasm.d.ts +32 -0
- package/types/src/workbook/IWorkbook.d.ts +404 -73
- package/types/src/workbook/Workbook.d.ts +196 -28
- package/types/src/workbook/WorkbookRange.d.ts +2 -2
- package/types/src/workbook/WorkbookRanges.d.ts +2 -2
- package/types/src/workbook/_WorkbookIntents.d.ts +36 -0
- package/types/src/workbook/_WorkbookMessages.d.ts +5 -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 +94 -0
- package/types/src/workbookView/WorkbookView.d.ts +26 -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/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/collections/OverlappingRangeIterator.d.ts +0 -91
- package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +0 -12
- package/types/src/dataValidation/_Utils.d.ts +0 -10
- package/types/src/font/CanvasFontMeasurer.d.ts +0 -25
- package/types/src/font/FontKitFontMeasurer.d.ts +0 -11
- package/types/src/font/SimpleFontMeasurer.d.ts +0 -4
- 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/print/IPrint.d.ts +0 -234
- package/types/src/sheet/Sheet.d.ts +0 -1107
- package/types/src/sheet/SheetCollection.d.ts +0 -18
- 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/sheetProtection/SheetProtection.d.ts +0 -39
- package/types/src/sheetView/SheetView.d.ts +0 -113
- package/types/src/text/richtext/IStyledFont.d.ts +0 -330
- /package/types/src/{lib/utils → license}/banner.d.ts +0 -0
|
@@ -0,0 +1,1123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.11
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { CommonUtils as e, ProtectedError as t, messageKey as n, t as r } from "@sheetxl/utils";
|
|
8
|
+
var i = (e, t) => {
|
|
9
|
+
let n = /* @__PURE__ */ new Map();
|
|
10
|
+
return e.forEach((e, r) => {
|
|
11
|
+
t.get(r) !== e && n.set(r, e);
|
|
12
|
+
}), n;
|
|
13
|
+
}, a = !1, o = 0, s = (e) => {
|
|
14
|
+
if (typeof e != "string") throw Error("A stateId (string) is required. Register with 'ITransaction.IStore.create'.");
|
|
15
|
+
return e;
|
|
16
|
+
}, c = class extends Error {
|
|
17
|
+
constructor(e, t, n) {
|
|
18
|
+
super(e === "open" ? `Transaction conflict: an operation is open on commit '${t}' and this write is not part of it.` : `Transaction conflict: expected commit '${t}' but current is '${n}'.`), this.name = "TransactionConflictError", this.reason = e, this.expectedCommitId = t, this.actualCommitId = n;
|
|
19
|
+
}
|
|
20
|
+
}, l = (e, t, n = 0) => {
|
|
21
|
+
for (let r = n; r < t.length; r++) {
|
|
22
|
+
let [n, i] = t[r];
|
|
23
|
+
e[n] = typeof i == "function" ? i(e[n]) : i;
|
|
24
|
+
}
|
|
25
|
+
}, u = class {
|
|
26
|
+
constructor(e) {
|
|
27
|
+
this._record = e;
|
|
28
|
+
}
|
|
29
|
+
getId() {
|
|
30
|
+
return this._record.id;
|
|
31
|
+
}
|
|
32
|
+
getDescription() {
|
|
33
|
+
return this._record.description;
|
|
34
|
+
}
|
|
35
|
+
getMeta() {
|
|
36
|
+
return Object.freeze(this._record.meta);
|
|
37
|
+
}
|
|
38
|
+
getAuthor() {
|
|
39
|
+
return this._record.author;
|
|
40
|
+
}
|
|
41
|
+
getTimestamp() {
|
|
42
|
+
return this._record.timestamp;
|
|
43
|
+
}
|
|
44
|
+
getOperation() {
|
|
45
|
+
return this._record.operation;
|
|
46
|
+
}
|
|
47
|
+
getIntents() {
|
|
48
|
+
return Object.freeze({ ...this._record.intents });
|
|
49
|
+
}
|
|
50
|
+
}, d = class {
|
|
51
|
+
constructor(e) {
|
|
52
|
+
this._listeners = /* @__PURE__ */ new Set(), this._listenersState = /* @__PURE__ */ new Map(), this._commits = /* @__PURE__ */ new Map(), this._locked = !1, this._pending = null, this._versionCounter = 0, this._flushOnRead = 0, this._isSync = e?.sync ?? a, this._isTransient = e?.transient ?? !1, this._author = e?.author, this._maxCommits = e?.maxCommits ?? 1e3;
|
|
53
|
+
let t = {
|
|
54
|
+
id: "0",
|
|
55
|
+
description: "initial",
|
|
56
|
+
meta: {},
|
|
57
|
+
author: this._author,
|
|
58
|
+
timestamp: Date.now(),
|
|
59
|
+
states: /* @__PURE__ */ new Map(),
|
|
60
|
+
intents: {},
|
|
61
|
+
intentWrites: [],
|
|
62
|
+
version: 0,
|
|
63
|
+
previousId: null
|
|
64
|
+
}, n = {
|
|
65
|
+
record: t,
|
|
66
|
+
commit: new u(t)
|
|
67
|
+
};
|
|
68
|
+
this._current = n, this._cacheId = null, this._cacheState = null, this._states = t.states, this._transactionStack = [], this._restoring = !1;
|
|
69
|
+
let r = /* @__PURE__ */ new Map();
|
|
70
|
+
r.set(t.id, n), this._commits = r, this._tipId = t.id;
|
|
71
|
+
}
|
|
72
|
+
static {
|
|
73
|
+
this.setDefaultSync = (e) => {
|
|
74
|
+
a = e;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
getLog(e, t = 100) {
|
|
78
|
+
let n = [], r = e;
|
|
79
|
+
do {
|
|
80
|
+
let e = this._commits.get(r);
|
|
81
|
+
if (!e) throw Error(`Invalid commit id: '${r}'`);
|
|
82
|
+
if (n.push(e.commit), r = e.record.previousId, !r) return n;
|
|
83
|
+
} while (n.length < t);
|
|
84
|
+
return n;
|
|
85
|
+
}
|
|
86
|
+
getCommitCount() {
|
|
87
|
+
return this._commits.size;
|
|
88
|
+
}
|
|
89
|
+
isOpenTransaction() {
|
|
90
|
+
return this._transactionStack.length > 0;
|
|
91
|
+
}
|
|
92
|
+
isRestoring() {
|
|
93
|
+
return this._restoring;
|
|
94
|
+
}
|
|
95
|
+
isAmendingOtherCommit() {
|
|
96
|
+
let e = this._transactionStack[0];
|
|
97
|
+
return e instanceof p && e._isRetargeted();
|
|
98
|
+
}
|
|
99
|
+
getPendingTransaction() {
|
|
100
|
+
return this._transactionStack[0] ?? null;
|
|
101
|
+
}
|
|
102
|
+
getCurrentTransaction() {
|
|
103
|
+
let e = this._transactionStack;
|
|
104
|
+
return e[e.length - 1] ?? null;
|
|
105
|
+
}
|
|
106
|
+
amend(e, t) {
|
|
107
|
+
let n = this.beginCommit(), r = n.getDepth() === 0 ? this._commits.get(e) : void 0;
|
|
108
|
+
n.getDepth() === 0 && (n._setAmendOf(e), r && r !== this._current && n._retarget(r));
|
|
109
|
+
try {
|
|
110
|
+
let e = t(r ? r.commit : this._current.commit);
|
|
111
|
+
return n.commit(), e;
|
|
112
|
+
} catch (e) {
|
|
113
|
+
throw n.rollback(), e;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
_squashTip(e) {
|
|
117
|
+
if (this._transactionStack.length > 0) return !1;
|
|
118
|
+
let t = this._commits.get(this._tipId), n = t?.record.previousId;
|
|
119
|
+
if (!t || !n) return !1;
|
|
120
|
+
let r = this._commits.get(n);
|
|
121
|
+
return !!r && (r.record.states = t.record.states, r.record.intents = e(r.record.intents, t.record.intents), r.record.timestamp = t.record.timestamp, this._commits.delete(t.record.id), this._tipId = n, this._current === t && (this._current = r, this._states = r.record.states, this._cacheId = null, this._cacheState = null), !0);
|
|
122
|
+
}
|
|
123
|
+
create(t) {
|
|
124
|
+
let n = e.uuidV4();
|
|
125
|
+
if (t !== void 0) {
|
|
126
|
+
let e = this.beginCommit();
|
|
127
|
+
try {
|
|
128
|
+
e.updateState(n, t), e.commit();
|
|
129
|
+
} catch (t) {
|
|
130
|
+
throw e.rollback(), t;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return n;
|
|
134
|
+
}
|
|
135
|
+
getStateAt(e, t) {
|
|
136
|
+
return s(t), this._commits.get(e)?.record.states.get(t);
|
|
137
|
+
}
|
|
138
|
+
getState(e) {
|
|
139
|
+
s(e);
|
|
140
|
+
let t = this._transactionStack;
|
|
141
|
+
if (t.length === 0) {
|
|
142
|
+
if (this._cacheId === e) return this._cacheState;
|
|
143
|
+
let t = this._states.get(e);
|
|
144
|
+
return this._cacheId = e, this._cacheState = t, t;
|
|
145
|
+
}
|
|
146
|
+
if (this._flushOnRead > 0) for (let n = t.length - 1; n >= 0; n--) t[n]._isFlushedBy(e) && t[n]._flush();
|
|
147
|
+
return t[t.length - 1].getState(e);
|
|
148
|
+
}
|
|
149
|
+
getCurrentCommit(e = !0) {
|
|
150
|
+
return (e ? this._pending?.commit : null) ?? this._current.commit;
|
|
151
|
+
}
|
|
152
|
+
getTipCommit() {
|
|
153
|
+
return this._commits.get(this._tipId).commit;
|
|
154
|
+
}
|
|
155
|
+
getVersionId(e) {
|
|
156
|
+
return s(e), this._states.get(e)?.version ?? 0;
|
|
157
|
+
}
|
|
158
|
+
restore(e, t) {
|
|
159
|
+
let n = this._getCommitContainer(e, t);
|
|
160
|
+
if (this._current.commit.getId() === n.commit.getId()) return n.commit;
|
|
161
|
+
let r = i(n.record.states, this._current.record.states);
|
|
162
|
+
this._notifyStates("onBeforeCommitStart", this._current, r, !0, !1, !1, n);
|
|
163
|
+
let a = this._current.commit;
|
|
164
|
+
this._current = n, this._states = this._current.record.states, this._cacheId = null, this._cacheState = null, this._notifyStates("onAfterStateChange", n, r, !1, !0, !0, n, a), this._notify("onCommitChange", n.commit, !0), this._restoring = !0;
|
|
165
|
+
try {
|
|
166
|
+
this._notifyStates("onRestoreOrRevert", n, n.record.states, !1, !0);
|
|
167
|
+
} finally {
|
|
168
|
+
this._restoring = !1;
|
|
169
|
+
}
|
|
170
|
+
return n.commit;
|
|
171
|
+
}
|
|
172
|
+
revert(e, t) {
|
|
173
|
+
let n = this._getCommitContainer(e, t), r = this._commits.get(n.record.previousId);
|
|
174
|
+
if (!r) throw Error(`Invalid commit id: '${n.record.previousId}'`);
|
|
175
|
+
let a = i(r.record.states, this._current.record.states);
|
|
176
|
+
this._notifyStates("onBeforeCommitStart", this._current, a, !0, !1, !1, n);
|
|
177
|
+
let o = this._current.commit;
|
|
178
|
+
this._current = r, this._states = this._current.record.states, this._cacheId = null, this._cacheState = null, this._notifyStates("onAfterStateChange", r, a, !0, !1, !0, n, o), this._notify("onCommitChange", r.commit, !0), this._restoring = !0;
|
|
179
|
+
try {
|
|
180
|
+
this._notifyStates("onRestoreOrRevert", r, r.record.states, !0, !0, !1, n);
|
|
181
|
+
} finally {
|
|
182
|
+
this._restoring = !1;
|
|
183
|
+
}
|
|
184
|
+
return r.commit;
|
|
185
|
+
}
|
|
186
|
+
_getCommitContainer(e, t) {
|
|
187
|
+
let n = this._commits.get(e);
|
|
188
|
+
if (!n) throw Error(`Invalid commit id: '${e}'`);
|
|
189
|
+
if (this._isTransient) throw Error("Cannot revert transient store");
|
|
190
|
+
if (t?.force && this._transactionStack.length > 0 && this._transactionStack[0].rollback(), this._transactionStack.length !== 0) throw Error("Open transactions.");
|
|
191
|
+
return n;
|
|
192
|
+
}
|
|
193
|
+
_pruneForwards(e) {
|
|
194
|
+
let t = this._tipId;
|
|
195
|
+
for (; t && t !== e;) {
|
|
196
|
+
let e = this._commits.get(t);
|
|
197
|
+
if (!e) break;
|
|
198
|
+
this._commits.delete(t), t = e.record.previousId;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
_trimOldest() {
|
|
202
|
+
if (this._commits.size <= this._maxCommits) return;
|
|
203
|
+
let e = this._commits.keys();
|
|
204
|
+
for (; this._commits.size > this._maxCommits;) this._commits.delete(e.next().value);
|
|
205
|
+
let t = this._commits.get(e.next().value);
|
|
206
|
+
t && (t.record.previousId = null);
|
|
207
|
+
}
|
|
208
|
+
beginCommit(t, n) {
|
|
209
|
+
let r = this._transactionStack;
|
|
210
|
+
r.length > 0 && r[r.length - 1]._flush();
|
|
211
|
+
let i = r.length;
|
|
212
|
+
typeof t == "string" && (t = { description: t });
|
|
213
|
+
let a = t?.expectedCommitId;
|
|
214
|
+
if (a !== void 0) {
|
|
215
|
+
let e = this._current.record.id;
|
|
216
|
+
if (i > 0 || this._restoring) throw new c("open", a, e);
|
|
217
|
+
if (e !== a) throw new c("stale", a, e);
|
|
218
|
+
}
|
|
219
|
+
if (this._locked) throw console.warn("TransactionStore locked", r), /* @__PURE__ */ Error(`TransactionStore is locked by '${r[i - 1].getDescription()}`);
|
|
220
|
+
let o = t?.preventFurtherTransactions, s = this, l = (e, t, r) => {
|
|
221
|
+
let a = s._transactionStack;
|
|
222
|
+
i !== a.length - 1 && console.warn("Transaction stack out of sync", i, a.length, a), o && (this._locked = !1), a.pop(), e._isFlushedOnRead() && s._flushOnRead--, n?.(e, t, r), a.length === 0 && (s._pending = null, s._notifyClose(e._getCommit(), t, e._isElided(), e._isAmendClose()));
|
|
223
|
+
}, d;
|
|
224
|
+
if (r.length === 0) {
|
|
225
|
+
let n = this._current.record, r = {
|
|
226
|
+
states: /* @__PURE__ */ new Map(),
|
|
227
|
+
id: e.uuidV4(),
|
|
228
|
+
description: typeof t == "string" ? t : t?.description ?? null,
|
|
229
|
+
meta: {},
|
|
230
|
+
timestamp: Date.now(),
|
|
231
|
+
author: (typeof t == "object" ? t?.author : void 0) ?? this._author ?? null,
|
|
232
|
+
version: n.version + 1,
|
|
233
|
+
previousId: n.id,
|
|
234
|
+
intents: {},
|
|
235
|
+
intentWrites: [],
|
|
236
|
+
operation: t?.operation
|
|
237
|
+
}, i = {
|
|
238
|
+
record: r,
|
|
239
|
+
commit: new u(r)
|
|
240
|
+
};
|
|
241
|
+
this._pending = i, this._notify("onCommitStart", i.commit), d = new p(this, i, n?.states, t, l);
|
|
242
|
+
} else d = r[r.length - 1].beginTransaction(t, l);
|
|
243
|
+
return o && (this._locked = !0), this._transactionStack.push(d), d._isFlushedOnRead() && this._flushOnRead++, d;
|
|
244
|
+
}
|
|
245
|
+
doBatch(e, t, n) {
|
|
246
|
+
let r, i = this.beginCommit(t, n), a = this.getCurrentCommit();
|
|
247
|
+
try {
|
|
248
|
+
r = e?.(a);
|
|
249
|
+
let n = () => {
|
|
250
|
+
i.commit(t);
|
|
251
|
+
};
|
|
252
|
+
if (r && typeof r.then == "function") return new Promise((e, t) => {
|
|
253
|
+
r.then((r) => {
|
|
254
|
+
try {
|
|
255
|
+
n(), e(r);
|
|
256
|
+
} catch (e) {
|
|
257
|
+
t(e);
|
|
258
|
+
}
|
|
259
|
+
}).catch((e) => {
|
|
260
|
+
i.rollback(), t(e);
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
n();
|
|
264
|
+
} catch (e) {
|
|
265
|
+
throw i.rollback(), e;
|
|
266
|
+
}
|
|
267
|
+
return r;
|
|
268
|
+
}
|
|
269
|
+
remove(e) {
|
|
270
|
+
s(e);
|
|
271
|
+
let t = !1, n = this._listenersState.get(e);
|
|
272
|
+
if (n) {
|
|
273
|
+
let r = this.getCurrentCommit();
|
|
274
|
+
n.forEach((e) => {
|
|
275
|
+
e.onClose?.(r);
|
|
276
|
+
}), this._listenersState.delete(e), t = !0;
|
|
277
|
+
}
|
|
278
|
+
this._current.record.states.delete(e) && (t = !0), this._commits.forEach((n) => {
|
|
279
|
+
n.record.states.delete(e) && (t = !0);
|
|
280
|
+
});
|
|
281
|
+
let r = this._transactionStack;
|
|
282
|
+
return r.length > 0 && r[0]._purgeState(e), this._cacheId = null, this._cacheState = null, t;
|
|
283
|
+
}
|
|
284
|
+
addListener(e) {
|
|
285
|
+
let t = this._listeners;
|
|
286
|
+
return t.add(e), () => {
|
|
287
|
+
t.delete(e);
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
addStateListener(e, t) {
|
|
291
|
+
if (s(e), !t) throw Error("Listener is required");
|
|
292
|
+
let n = this._listenersState.get(e);
|
|
293
|
+
return n || (n = /* @__PURE__ */ new Set(), this._listenersState.set(e, n)), n.add(t), () => {
|
|
294
|
+
n.delete(t), n.size === 0 && this._listenersState.delete(e);
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
dispatchEvents(e, t = !1) {
|
|
298
|
+
!t || this._isSync ? e() : setTimeout(e, 0);
|
|
299
|
+
}
|
|
300
|
+
_commitRecord(t, n, r) {
|
|
301
|
+
let i = t.record, a = t.commit, o = t, s = ++this._versionCounter;
|
|
302
|
+
if (n.forEach((e, t) => {
|
|
303
|
+
e != null && ((e, t, n) => {
|
|
304
|
+
Object.defineProperty(e, "id", {
|
|
305
|
+
value: t,
|
|
306
|
+
enumerable: !1,
|
|
307
|
+
configurable: !0,
|
|
308
|
+
writable: !1
|
|
309
|
+
}), Object.defineProperty(e, "version", {
|
|
310
|
+
value: n,
|
|
311
|
+
enumerable: !1,
|
|
312
|
+
configurable: !0,
|
|
313
|
+
writable: !1
|
|
314
|
+
});
|
|
315
|
+
})(e, t, s);
|
|
316
|
+
}), !this._isTransient) {
|
|
317
|
+
let n = !1;
|
|
318
|
+
if (r !== null) {
|
|
319
|
+
let s = this._current, c = this._commits.get(r) ?? s, u = c.record, d = c !== s, f = d ? u.states : s.record.states;
|
|
320
|
+
if (i.states.forEach((e, t) => {
|
|
321
|
+
f.set(t, e);
|
|
322
|
+
}), l(u.intents, i.intentWrites), u.meta = {
|
|
323
|
+
...u.meta,
|
|
324
|
+
...i.meta
|
|
325
|
+
}, u.timestamp = i.timestamp, n = !0, d) return void (o.record.intentWrites = e.EmptyArray);
|
|
326
|
+
i = s.record, a = s.commit, t = s;
|
|
327
|
+
}
|
|
328
|
+
this._commits.set(i.id, t), n || (i.previousId !== this._tipId && this._pruneForwards(i.previousId), this._tipId = i.id, this._trimOldest());
|
|
329
|
+
}
|
|
330
|
+
this._current = t, this._states = this._current.record.states, this._cacheId = null, this._cacheState = null, o.record.intentWrites = e.EmptyArray, r === null && this._notify("onCommitChange", a);
|
|
331
|
+
let c = i.previousId ? this._commits.get(i.previousId)?.commit ?? null : null;
|
|
332
|
+
this._notifyStates("onAfterStateChange", t, n, !1, !1, !0, o, c), this._notify(r === null ? "onCommitEnd" : "onAmendEnd", a, !0);
|
|
333
|
+
}
|
|
334
|
+
_notifyStates(e, t, n, r = !1, i = !1, a = !1, o = t, s = null) {
|
|
335
|
+
let c = t.commit, l = o.record.intents, u = this._listenersState;
|
|
336
|
+
n.forEach((t, n) => {
|
|
337
|
+
let o = u.get(n);
|
|
338
|
+
o && this.dispatchEvents(() => {
|
|
339
|
+
o.forEach((n) => {
|
|
340
|
+
n[e]?.(t, c, r, i, l, s);
|
|
341
|
+
});
|
|
342
|
+
}, a);
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
_notifyClose(e, t, n = !1, r = !1) {
|
|
346
|
+
this._listeners.forEach((i) => {
|
|
347
|
+
i.onCommitClose?.(e, t, n, r);
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
_notify(e, t, n = !1) {
|
|
351
|
+
return this.dispatchEvents(() => {
|
|
352
|
+
this._listeners.forEach((n) => {
|
|
353
|
+
n[e]?.(t);
|
|
354
|
+
});
|
|
355
|
+
}, n);
|
|
356
|
+
}
|
|
357
|
+
}, f = class {
|
|
358
|
+
constructor(e, t, n) {
|
|
359
|
+
if (this._children = /* @__PURE__ */ new Set(), this._depth = 0, this._closed = !1, this._isAmend = !1, this._readOnly = !1, this._hooks = null, this._flushing = !1, this._outcomes = null, this._intentMark = -1, this._store = e, this._container = t, n = typeof n == "string" ? { description: n } : n, this._description = n?.description ?? "", this._operation = n?.operation ?? null, this._readOnly = n?.readOnly ?? !1, n?.flush || n?.onCommit || n?.onRollback || n?.onChildCommit) {
|
|
360
|
+
let e = {
|
|
361
|
+
flush: n.flush,
|
|
362
|
+
writes: n.writes,
|
|
363
|
+
onCommit: n.onCommit,
|
|
364
|
+
onRollback: n.onRollback,
|
|
365
|
+
onChildCommit: n.onChildCommit
|
|
366
|
+
};
|
|
367
|
+
this._hooks = e, (e.onCommit || e.onRollback) && (this._outcomes = [e]);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
_isFlushedOnRead() {
|
|
371
|
+
return !(!this._hooks?.flush || !this._hooks.writes?.length);
|
|
372
|
+
}
|
|
373
|
+
_isFlushedBy(e) {
|
|
374
|
+
let t = this._hooks?.writes;
|
|
375
|
+
return !!t && t.includes(e);
|
|
376
|
+
}
|
|
377
|
+
_flush() {
|
|
378
|
+
let e = this._hooks?.flush;
|
|
379
|
+
if (e && !this._flushing) {
|
|
380
|
+
this._flushing = !0;
|
|
381
|
+
try {
|
|
382
|
+
e();
|
|
383
|
+
} finally {
|
|
384
|
+
this._flushing = !1;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
_settle(e) {
|
|
389
|
+
let t = this._children;
|
|
390
|
+
for (; t.size > 0;) t.values().next().value.commit(e);
|
|
391
|
+
this._flush();
|
|
392
|
+
}
|
|
393
|
+
_adoptOutcomes(e) {
|
|
394
|
+
let t = e._outcomes;
|
|
395
|
+
if (t) {
|
|
396
|
+
if (this._outcomes) for (let e = 0; e < t.length; e++) this._outcomes.push(t[e]);
|
|
397
|
+
else this._outcomes = t;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
_childCommitted(e) {
|
|
401
|
+
let t = this._hooks?.onChildCommit;
|
|
402
|
+
if (!t) return;
|
|
403
|
+
let n = {};
|
|
404
|
+
l(n, this._container.record.intentWrites, e._intentMark), t(e, n);
|
|
405
|
+
}
|
|
406
|
+
_notifyOutcome(e) {
|
|
407
|
+
let t = this._outcomes;
|
|
408
|
+
if (t) {
|
|
409
|
+
this._outcomes = null;
|
|
410
|
+
for (let n = 0; n < t.length; n++) try {
|
|
411
|
+
e ? t[n].onCommit?.(e) : t[n].onRollback?.();
|
|
412
|
+
} catch (e) {
|
|
413
|
+
console.warn(e);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
_getCommit() {
|
|
418
|
+
return this._container.commit;
|
|
419
|
+
}
|
|
420
|
+
_isElided() {
|
|
421
|
+
return !1;
|
|
422
|
+
}
|
|
423
|
+
_setAmendOf(e) {
|
|
424
|
+
this._container.amendOf = e;
|
|
425
|
+
}
|
|
426
|
+
_isAmendClose() {
|
|
427
|
+
return this._isAmend || this._container.amendOf !== void 0;
|
|
428
|
+
}
|
|
429
|
+
getIntent(e) {
|
|
430
|
+
return this._container.record.intents?.[e];
|
|
431
|
+
}
|
|
432
|
+
setIntent(e, t) {
|
|
433
|
+
let n = this._container.record, r = n.intents ??= {};
|
|
434
|
+
r[e] = typeof t == "function" ? t(r[e]) : t, (n.intentWrites ??= []).push([e, t]);
|
|
435
|
+
}
|
|
436
|
+
getDepth() {
|
|
437
|
+
return this._depth;
|
|
438
|
+
}
|
|
439
|
+
getDescription() {
|
|
440
|
+
return this._description;
|
|
441
|
+
}
|
|
442
|
+
getOperation() {
|
|
443
|
+
return this._operation;
|
|
444
|
+
}
|
|
445
|
+
getStates() {
|
|
446
|
+
return this._states;
|
|
447
|
+
}
|
|
448
|
+
beginTransaction(e, t) {
|
|
449
|
+
this._ensureOpen();
|
|
450
|
+
let n = new m(this._store, this, this._container, typeof e == "string" ? { description: e } : e, t);
|
|
451
|
+
return this._hooks?.onChildCommit && (n._intentMark = this._container.record.intentWrites.length), this._children || this._children, this._children.add(n), n;
|
|
452
|
+
}
|
|
453
|
+
isReadOnly() {
|
|
454
|
+
return this._readOnly;
|
|
455
|
+
}
|
|
456
|
+
updateState(e, t) {
|
|
457
|
+
if (this._ensureOpen(), s(e), this._readOnly) throw Error("Transaction is read-only" + (this._description ? `: '${this._description}'` : ""));
|
|
458
|
+
let n = this.getState(e), r;
|
|
459
|
+
if (typeof t == "function") {
|
|
460
|
+
if (r = t(n), r === n) return n;
|
|
461
|
+
r &&= { ...r };
|
|
462
|
+
} else {
|
|
463
|
+
if (t === void 0) return n;
|
|
464
|
+
r = {
|
|
465
|
+
...n,
|
|
466
|
+
...t
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
if (r) {
|
|
470
|
+
let t = this._states;
|
|
471
|
+
t || (t = /* @__PURE__ */ new Map(), this._states = t), t.set(e, r);
|
|
472
|
+
}
|
|
473
|
+
return r;
|
|
474
|
+
}
|
|
475
|
+
amend(e) {
|
|
476
|
+
return this._isAmend = !0, this.commit(e);
|
|
477
|
+
}
|
|
478
|
+
commit(t) {
|
|
479
|
+
return this._ensureOpen(), typeof t == "string" && (t = { description: t }), t && (t.description && (this._description = t.description), t.meta && (this._meta = e.mergeContentful(t.meta, this._meta))), this._children && this._children.forEach((e) => {
|
|
480
|
+
e.commit(t);
|
|
481
|
+
}), this;
|
|
482
|
+
}
|
|
483
|
+
isClose() {
|
|
484
|
+
return this._closed;
|
|
485
|
+
}
|
|
486
|
+
_ensureOpen() {
|
|
487
|
+
if (this._closed) throw this._descriptions ? console.warn(`stack: [${this._descriptions.join(",")}]`) : this._description && console.warn(`description: [${this._description}]`), /* @__PURE__ */ Error("Transaction already closed");
|
|
488
|
+
}
|
|
489
|
+
_removeChild(e, t = !1) {
|
|
490
|
+
this._children.delete(e), t || this._mergeStates(e._states);
|
|
491
|
+
}
|
|
492
|
+
_purgeState(e) {
|
|
493
|
+
this._states?.delete(e), this._children.forEach((t) => {
|
|
494
|
+
t._purgeState(e);
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
_mergeStates(e) {
|
|
498
|
+
if (!e || e.size === 0) return;
|
|
499
|
+
let t = this._states;
|
|
500
|
+
return t ? (e.forEach((e, n) => {
|
|
501
|
+
t.set(n, e);
|
|
502
|
+
}), t) : (this._states = e, e);
|
|
503
|
+
}
|
|
504
|
+
get isITransaction() {
|
|
505
|
+
return !0;
|
|
506
|
+
}
|
|
507
|
+
}, p = class extends f {
|
|
508
|
+
constructor(e, t, n, r, i) {
|
|
509
|
+
super(e, t, r), this._retargeted = !1, this._elided = !1, this._prevStates = n, this._onClose = i, this._states = /* @__PURE__ */ new Map(), this._meta = t.record.meta;
|
|
510
|
+
}
|
|
511
|
+
_isElided() {
|
|
512
|
+
return this._elided;
|
|
513
|
+
}
|
|
514
|
+
_retarget(e) {
|
|
515
|
+
this._prevStates = e.record.states, this._retargeted = !0;
|
|
516
|
+
}
|
|
517
|
+
_isRetargeted() {
|
|
518
|
+
return this._retargeted;
|
|
519
|
+
}
|
|
520
|
+
getId() {
|
|
521
|
+
return this._container.commit.getId();
|
|
522
|
+
}
|
|
523
|
+
getSavepointId() {
|
|
524
|
+
return this.getId();
|
|
525
|
+
}
|
|
526
|
+
getParent() {
|
|
527
|
+
return this;
|
|
528
|
+
}
|
|
529
|
+
commit(e) {
|
|
530
|
+
this._ensureOpen(), this._settle(e);
|
|
531
|
+
let t = this._states, n = this._container;
|
|
532
|
+
if (this._store._notifyStates("onBeforeCommitStart", n, t, !1, !1), super.commit(e), this._states.size === 0) return this._closed = !0, this._elided = !0, this._onClose?.(this, !1, e), this._notifyOutcome(n.commit), this;
|
|
533
|
+
this._store._notifyStates("onBeforeCommitEnd", n, t, !1, !1), this._settle(e);
|
|
534
|
+
let r = new Map(this._prevStates);
|
|
535
|
+
this._states.forEach((e, t) => {
|
|
536
|
+
e === null ? r.delete(t) : r.set(t, e);
|
|
537
|
+
}), this._states = r, this._description && (n.record.description = this._description), this._meta && (n.record.meta = this._meta), n.record.states = r, this._closed = !0, this._onClose?.(this, !1, e);
|
|
538
|
+
let i = n.amendOf ?? (this._isAmend ? n.record.previousId : null);
|
|
539
|
+
return this._store._commitRecord(n, t, i), this._notifyOutcome(n.commit), this;
|
|
540
|
+
}
|
|
541
|
+
rollback() {
|
|
542
|
+
return this._ensureOpen(), this._children && this._children.forEach((e) => {
|
|
543
|
+
e.rollback();
|
|
544
|
+
}), this._notifyOutcome(null), this._closed = !0, this._onClose?.(this, !0, null), this;
|
|
545
|
+
}
|
|
546
|
+
updateState(e, t) {
|
|
547
|
+
let n = this.getState(e), r = super.updateState(e, t);
|
|
548
|
+
return r === n || this._states.set(e, r), r;
|
|
549
|
+
}
|
|
550
|
+
getState(e) {
|
|
551
|
+
s(e);
|
|
552
|
+
let t = this._states.get(e);
|
|
553
|
+
return t ||= this._prevStates.get(e), t;
|
|
554
|
+
}
|
|
555
|
+
}, m = class extends f {
|
|
556
|
+
constructor(e, t, n, r, i) {
|
|
557
|
+
if (super(e, n, r), this._savepointId = null, !t) throw Error("Parent transaction required");
|
|
558
|
+
this._parent = t, this._depth = this._parent.getDepth() + 1, !1 !== (typeof r == "string" ? void 0 : r?.savepoint) && (this._savepointId = `${t.getId()}:${++o}`), t.isReadOnly() && (this._readOnly = !0), this._onClose = i;
|
|
559
|
+
}
|
|
560
|
+
getId() {
|
|
561
|
+
return this._parent.getId();
|
|
562
|
+
}
|
|
563
|
+
getSavepointId() {
|
|
564
|
+
return this._savepointId ?? this._parent.getSavepointId();
|
|
565
|
+
}
|
|
566
|
+
getParent() {
|
|
567
|
+
return this._parent;
|
|
568
|
+
}
|
|
569
|
+
getState(e) {
|
|
570
|
+
if (this._states) {
|
|
571
|
+
let t = this._states.get(e);
|
|
572
|
+
if (t !== void 0) return t;
|
|
573
|
+
}
|
|
574
|
+
return this._parent.getState(e);
|
|
575
|
+
}
|
|
576
|
+
commit(e) {
|
|
577
|
+
return this._ensureOpen(), this._settle(e), super.commit(e), this._parent._removeChild(this), this._parent._adoptOutcomes(this), this._closed = !0, this._onClose?.(this, !1, e), this._intentMark >= 0 && this._parent._childCommitted(this), this._parent ?? this;
|
|
578
|
+
}
|
|
579
|
+
rollback() {
|
|
580
|
+
return this._ensureOpen(), this._children && this._children.forEach((e) => {
|
|
581
|
+
e.rollback();
|
|
582
|
+
}), this._notifyOutcome(null), this._parent._removeChild(this, !0), this._closed = !0, this._onClose?.(this, !0, null), this._parent ?? this;
|
|
583
|
+
}
|
|
584
|
+
}, h = class e {
|
|
585
|
+
constructor(e) {
|
|
586
|
+
this._closed = !1, this._commitId = null, this._stepListeners = null, this._toWrapped = /* @__PURE__ */ new WeakMap(), this._methods = /* @__PURE__ */ new WeakMap(), this._callbacks = /* @__PURE__ */ new WeakMap(), this._outward = /* @__PURE__ */ new WeakMap(), this._inward = /* @__PURE__ */ new WeakMap(), this._store = e;
|
|
587
|
+
}
|
|
588
|
+
getStore() {
|
|
589
|
+
return this._store;
|
|
590
|
+
}
|
|
591
|
+
getCommitId() {
|
|
592
|
+
return this._commitId;
|
|
593
|
+
}
|
|
594
|
+
isClosed() {
|
|
595
|
+
return this._closed;
|
|
596
|
+
}
|
|
597
|
+
close() {
|
|
598
|
+
this._closed || (this._closed = !0, this._stepListeners && b(this._store, -1), this._stepListeners = null);
|
|
599
|
+
}
|
|
600
|
+
addStepListener(e) {
|
|
601
|
+
return this._closed ? M : (this._stepListeners || (this._stepListeners = /* @__PURE__ */ new Set(), b(this._store, 1)), this._stepListeners.add(e), () => {
|
|
602
|
+
this._stepListeners?.delete(e);
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
_onStep(e, t) {
|
|
606
|
+
let n = this._stepListeners;
|
|
607
|
+
if (n && n.size !== 0) for (let r of [...n]) r(e, t);
|
|
608
|
+
}
|
|
609
|
+
wrap(e) {
|
|
610
|
+
if (typeof e == "function") return this._wrapFunction(e, !0);
|
|
611
|
+
if (typeof e != "object" || !e) return e;
|
|
612
|
+
let t = e;
|
|
613
|
+
if (_.has(t)) return e;
|
|
614
|
+
let n = this._toWrapped.get(t);
|
|
615
|
+
return n === void 0 ? t instanceof Promise ? t.then((e) => this.wrap(e)) : Array.isArray(t) ? this._wrapArray(t) : T(t) ? this._wrapModel(t) : O(t) ? this._wrapIterator(t) : e : n;
|
|
616
|
+
}
|
|
617
|
+
unwrap(e) {
|
|
618
|
+
if (typeof e != "object" || !e) return e;
|
|
619
|
+
let t = e, n = g.get(t);
|
|
620
|
+
return n === void 0 ? Array.isArray(t) ? k(t) : Object.getPrototypeOf(t) === Object.prototype ? A(t) : e : n;
|
|
621
|
+
}
|
|
622
|
+
_wrapModel(e) {
|
|
623
|
+
let t = this, n = new Proxy(e, {
|
|
624
|
+
get(e, n) {
|
|
625
|
+
let r = Reflect.get(e, n, e);
|
|
626
|
+
if (r === null || typeof r != "object" && typeof r != "function") return r;
|
|
627
|
+
let i = Object.getOwnPropertyDescriptor(e, n);
|
|
628
|
+
return !i || i.configurable || i.writable ? typeof r == "function" ? t._wrapMethod(e, r) : t.wrap(r) : r;
|
|
629
|
+
},
|
|
630
|
+
set: (e, n, r) => Reflect.set(e, n, t.unwrap(r), e)
|
|
631
|
+
});
|
|
632
|
+
return this._toWrapped.set(e, n), g.set(n, e), _.set(n, this), n;
|
|
633
|
+
}
|
|
634
|
+
_wrapMethod(e, t) {
|
|
635
|
+
let n = this._methods.get(e);
|
|
636
|
+
n || (n = /* @__PURE__ */ new Map(), this._methods.set(e, n));
|
|
637
|
+
let r = n.get(t);
|
|
638
|
+
if (r) return r;
|
|
639
|
+
let i = this;
|
|
640
|
+
return r = function(...n) {
|
|
641
|
+
let r = n.length;
|
|
642
|
+
for (let e = 0; e < r; e++) n[e] = i._unwrapArg(n[e]);
|
|
643
|
+
return i._inScope(() => i.wrap(t.apply(e, n)));
|
|
644
|
+
}, n.set(t, r), r;
|
|
645
|
+
}
|
|
646
|
+
_unwrapArg(e) {
|
|
647
|
+
return typeof e == "function" ? this._wrapFunction(e, !1) : typeof e != "object" || !e || Object.getPrototypeOf(e) !== Object.prototype || g.has(e) ? this.unwrap(e) : this._unwrapCallbacks(e);
|
|
648
|
+
}
|
|
649
|
+
_unwrapCallbacks(e) {
|
|
650
|
+
let t = !1;
|
|
651
|
+
for (let n in e) if (typeof e[n] == "function") {
|
|
652
|
+
t = !0;
|
|
653
|
+
break;
|
|
654
|
+
}
|
|
655
|
+
if (!t) return this.unwrap(e);
|
|
656
|
+
let n = this._callbacks.get(e);
|
|
657
|
+
if (n) return n;
|
|
658
|
+
let r = {};
|
|
659
|
+
for (let t in e) {
|
|
660
|
+
let n = e[t];
|
|
661
|
+
r[t] = typeof n == "function" ? this._wrapFunction(n, !1) : this.unwrap(n);
|
|
662
|
+
}
|
|
663
|
+
return this._callbacks.set(e, r), r;
|
|
664
|
+
}
|
|
665
|
+
_wrapFunction(e, t) {
|
|
666
|
+
let n = t ? this._outward : this._inward, r = n.get(e);
|
|
667
|
+
if (r) return r;
|
|
668
|
+
let i = this;
|
|
669
|
+
return r = t ? function(...t) {
|
|
670
|
+
let n = t.length;
|
|
671
|
+
for (let e = 0; e < n; e++) t[e] = i._unwrapArg(t[e]);
|
|
672
|
+
return i._inScope(() => i.wrap(e.apply(i.unwrap(this), t)));
|
|
673
|
+
} : function(...t) {
|
|
674
|
+
let n = t.length;
|
|
675
|
+
for (let e = 0; e < n; e++) t[e] = i.wrap(t[e]);
|
|
676
|
+
return i.unwrap(e.apply(i.wrap(this), t));
|
|
677
|
+
}, n.set(e, r), r;
|
|
678
|
+
}
|
|
679
|
+
_wrapArray(e) {
|
|
680
|
+
let t = e.length > 0 ? e[0] : void 0;
|
|
681
|
+
return typeof t != "object" || !t || Array.isArray(t) || !T(t) ? e : e.map((e) => this.wrap(e));
|
|
682
|
+
}
|
|
683
|
+
_wrapIterator(e) {
|
|
684
|
+
let t = this, n = {
|
|
685
|
+
next(...n) {
|
|
686
|
+
let r = e.next(...n);
|
|
687
|
+
return r.done ? r : {
|
|
688
|
+
done: !1,
|
|
689
|
+
value: t.wrap(r.value)
|
|
690
|
+
};
|
|
691
|
+
},
|
|
692
|
+
[Symbol.iterator]: () => n
|
|
693
|
+
};
|
|
694
|
+
return e.return && (n.return = (t) => e.return(t)), n;
|
|
695
|
+
}
|
|
696
|
+
_inScope(e) {
|
|
697
|
+
if (this._closed) return e();
|
|
698
|
+
let t = v;
|
|
699
|
+
v = this;
|
|
700
|
+
try {
|
|
701
|
+
return e();
|
|
702
|
+
} finally {
|
|
703
|
+
v = t;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
static bind(t, n, r) {
|
|
707
|
+
let i = new e(t);
|
|
708
|
+
return {
|
|
709
|
+
callback: (e) => {
|
|
710
|
+
i._commitId = e.getId();
|
|
711
|
+
let t = r(e, i.wrap(n));
|
|
712
|
+
return t instanceof Promise ? t.then((e) => i.unwrap(e)) : i.unwrap(t);
|
|
713
|
+
},
|
|
714
|
+
close: () => i.close(),
|
|
715
|
+
onChildCommit: (e, n) => {
|
|
716
|
+
i._onStep(t.getCurrentCommit(), n);
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
static isStepping(e) {
|
|
721
|
+
return (y.get(e) ?? 0) > 0;
|
|
722
|
+
}
|
|
723
|
+
static of(e) {
|
|
724
|
+
return e === null || typeof e != "object" && typeof e != "function" ? null : _.get(e) ?? null;
|
|
725
|
+
}
|
|
726
|
+
}, g = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap(), v = null, y = /* @__PURE__ */ new WeakMap(), b = (e, t) => {
|
|
727
|
+
y.set(e, (y.get(e) ?? 0) + t);
|
|
728
|
+
}, x = () => v, S = (e) => v !== null && v.getStore() === e, C = /* @__PURE__ */ new WeakMap(), w = [
|
|
729
|
+
"addListener",
|
|
730
|
+
"addListeners",
|
|
731
|
+
"doBatch",
|
|
732
|
+
"getWorkbook",
|
|
733
|
+
"getWorksheet",
|
|
734
|
+
"update"
|
|
735
|
+
], T = (e) => {
|
|
736
|
+
let t = Object.getPrototypeOf(e);
|
|
737
|
+
if (t === null || t === Object.prototype || t === Array.prototype) return !1;
|
|
738
|
+
let n = C.get(t);
|
|
739
|
+
return n === void 0 && (n = !E(e) && D(t), C.set(t, n)), n;
|
|
740
|
+
}, E = (e) => e instanceof Date || e instanceof RegExp || e instanceof Map || e instanceof Set || e instanceof WeakMap || e instanceof WeakSet || e instanceof Error || e instanceof ArrayBuffer || ArrayBuffer.isView(e), D = (e) => {
|
|
741
|
+
for (let t = 0; t < w.length; t++) if (typeof e[w[t]] == "function") return !0;
|
|
742
|
+
let t = e;
|
|
743
|
+
for (; t && t !== Object.prototype;) {
|
|
744
|
+
let e = Object.getOwnPropertyNames(t);
|
|
745
|
+
for (let n = 0; n < e.length; n++) {
|
|
746
|
+
let r = e[n];
|
|
747
|
+
if (r.length > 3 && r.startsWith("set") && r.charCodeAt(3) >= 65 && r.charCodeAt(3) <= 90 && typeof Object.getOwnPropertyDescriptor(t, r)?.value == "function") return !0;
|
|
748
|
+
}
|
|
749
|
+
t = Object.getPrototypeOf(t);
|
|
750
|
+
}
|
|
751
|
+
return !1;
|
|
752
|
+
}, O = (e) => typeof e.next == "function" && typeof e[Symbol.iterator] == "function", k = (e) => {
|
|
753
|
+
let t = null, n = e.length;
|
|
754
|
+
for (let r = 0; r < n; r++) {
|
|
755
|
+
let n = e[r];
|
|
756
|
+
if (typeof n != "object" || !n) continue;
|
|
757
|
+
let i = j(n);
|
|
758
|
+
i !== n && (t ??= e.slice(), t[r] = i);
|
|
759
|
+
}
|
|
760
|
+
return t ?? e;
|
|
761
|
+
}, A = (e) => {
|
|
762
|
+
let t = null;
|
|
763
|
+
for (let n in e) {
|
|
764
|
+
let r = e[n];
|
|
765
|
+
if (typeof r != "object" || !r) continue;
|
|
766
|
+
let i = j(r);
|
|
767
|
+
i !== r && (t ??= { ...e }, t[n] = i);
|
|
768
|
+
}
|
|
769
|
+
return t ?? e;
|
|
770
|
+
}, j = (e) => {
|
|
771
|
+
let t = g.get(e);
|
|
772
|
+
return t === void 0 ? Array.isArray(e) ? k(e) : Object.getPrototypeOf(e) === Object.prototype ? A(e) : e : t;
|
|
773
|
+
}, M = () => {}, N = (e, t, ...n) => {
|
|
774
|
+
let r = globalThis.__SXL_LOG_EVENTS;
|
|
775
|
+
r && (typeof r != "string" || e.includes(r)) && console.log(`[sxl:${e}] ${t}`, ...n);
|
|
776
|
+
}, P = class {
|
|
777
|
+
constructor(e, t) {
|
|
778
|
+
this._listeners = /* @__PURE__ */ new Set(), this._pending = null, this._landing = null, this._listeners = /* @__PURE__ */ new Set(), this._transactions = t ?? new d({ transient: !0 }), this._stateId = this._transactions.create(), this._src = e;
|
|
779
|
+
let n = this, r = () => {
|
|
780
|
+
let e = n._landing;
|
|
781
|
+
if (N(n._label(), `drain landing=${e ? e.length : "null"}`), !e) return;
|
|
782
|
+
n._landing = null;
|
|
783
|
+
let t = /* @__PURE__ */ new Set(), r = e.length, i = null;
|
|
784
|
+
for (let t = 0; t < r; t++) {
|
|
785
|
+
let n = e[t].options, r = n?.merge;
|
|
786
|
+
if (!r) continue;
|
|
787
|
+
i ??= /* @__PURE__ */ new Map();
|
|
788
|
+
let a = e[t].listeners;
|
|
789
|
+
for (let e = 0; e < a.length; e++) {
|
|
790
|
+
let t = a[e];
|
|
791
|
+
i.set(t, i.has(t) ? r(i.get(t), n.params) : n.params);
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
for (let a = 0; a < r; a++) {
|
|
795
|
+
let r = e[a];
|
|
796
|
+
n._doNotify(r.listeners, r.removes, r.options, t, i);
|
|
797
|
+
}
|
|
798
|
+
};
|
|
799
|
+
this._transactionsRemoveListener = this._transactions.addListener({
|
|
800
|
+
onCommitClose(e, t, i) {
|
|
801
|
+
let a = n._pending;
|
|
802
|
+
N(n._label(), `commitClose rollback=${t} elided=${i} pending=${a ? a.length : "null"}`), n._pending = null, t || (a && (n._landing ? n._landing.push(...a) : n._landing = a), i && r());
|
|
803
|
+
},
|
|
804
|
+
onCommitEnd: r,
|
|
805
|
+
onAmendEnd: r
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
_label() {
|
|
809
|
+
return this._src?.constructor?.name ?? "unknown";
|
|
810
|
+
}
|
|
811
|
+
_inOperation() {
|
|
812
|
+
return this._transactions.isOpenTransaction() || this._transactions.isRestoring();
|
|
813
|
+
}
|
|
814
|
+
addListeners(e, t) {
|
|
815
|
+
let n = t?.transactional ?? S(this._transactions), r = { listeners: e }, i = this, a = () => {
|
|
816
|
+
n ? i._updateEntries((e) => {
|
|
817
|
+
e.delete(r);
|
|
818
|
+
}) : i._listeners.delete(r);
|
|
819
|
+
};
|
|
820
|
+
return r.remove = t?.once ? a : null, n ? i._updateEntries((e) => {
|
|
821
|
+
e.add(r);
|
|
822
|
+
}) : i._listeners.add(r), a;
|
|
823
|
+
}
|
|
824
|
+
_updateEntries(e) {
|
|
825
|
+
let t = this._transactions, n = t.getState(this._stateId)?.listeners, r = new Set(n);
|
|
826
|
+
e(r);
|
|
827
|
+
let i = t.beginCommit();
|
|
828
|
+
try {
|
|
829
|
+
i.updateState(this._stateId, { listeners: r }), i.amend();
|
|
830
|
+
} catch (e) {
|
|
831
|
+
throw i.rollback(), e;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
async _doNotify(e, t = null, n, r, i) {
|
|
835
|
+
let a = n?.source ?? this._src, o = [], s = n?.params, c = e.length;
|
|
836
|
+
for (let t = 0; t < c; t++) {
|
|
837
|
+
let n = e[t];
|
|
838
|
+
r && r.has(n) || (r?.add(n), o.push(n(a, i?.has(n) ? i.get(n) : s)));
|
|
839
|
+
}
|
|
840
|
+
let l = null;
|
|
841
|
+
if (t && (l = () => {
|
|
842
|
+
let e = t.length;
|
|
843
|
+
for (let n = 0; n < e; n++) t[n]();
|
|
844
|
+
}), n?.async) return new Promise(async (e, t) => {
|
|
845
|
+
try {
|
|
846
|
+
let t = await Promise.all(o);
|
|
847
|
+
l?.(), e(t);
|
|
848
|
+
} catch (e) {
|
|
849
|
+
l?.(), t(e);
|
|
850
|
+
}
|
|
851
|
+
});
|
|
852
|
+
l?.();
|
|
853
|
+
}
|
|
854
|
+
hasTransactional(e) {
|
|
855
|
+
let t = this._transactions.getState(this._stateId)?.listeners;
|
|
856
|
+
if (!t || t.size === 0) return !1;
|
|
857
|
+
for (let n of t) if (n.listeners[e]) return !0;
|
|
858
|
+
return !1;
|
|
859
|
+
}
|
|
860
|
+
_collect(e, t) {
|
|
861
|
+
if (!e) return null;
|
|
862
|
+
let n = null, r = null;
|
|
863
|
+
return e.forEach((e) => {
|
|
864
|
+
let i = e.listeners[t];
|
|
865
|
+
i && ((n ??= []).push(i), e.remove && (r ??= []).push(e.remove));
|
|
866
|
+
}), n ? {
|
|
867
|
+
listeners: n,
|
|
868
|
+
removes: r
|
|
869
|
+
} : null;
|
|
870
|
+
}
|
|
871
|
+
notify(e, t) {
|
|
872
|
+
let n = this._transactions, r = t?.transactional ?? this._inOperation();
|
|
873
|
+
if (r) {
|
|
874
|
+
let r = this._collect(n.getState(this._stateId)?.listeners, e);
|
|
875
|
+
r && this._doNotify(r.listeners, r.removes, t);
|
|
876
|
+
}
|
|
877
|
+
let i = this._collect(this._listeners, e);
|
|
878
|
+
if (i) return !r || n.isRestoring() || t?.async ? (N(this._label(), `notify ${String(e)} delivered to ${i.listeners.length}`), this._doNotify(i.listeners, i.removes, t)) : ((this._pending ??= []).push({
|
|
879
|
+
listeners: i.listeners,
|
|
880
|
+
removes: i.removes,
|
|
881
|
+
options: t
|
|
882
|
+
}), void N(this._label(), `notify ${String(e)} QUEUED (open transaction) pending=${this._pending.length}`));
|
|
883
|
+
N(this._label(), `notify ${String(e)} inOperation=${r} listeners=0`);
|
|
884
|
+
}
|
|
885
|
+
close() {
|
|
886
|
+
this._transactions.remove(this._stateId), this._transactionsRemoveListener(), this._listeners.clear(), this._pending = null, this._landing = null;
|
|
887
|
+
}
|
|
888
|
+
}, F = "Item has been closed. No further operations are allowed.", I = (e = n("op.update")) => r("error.anchor.protected", { description: r(e) }), L = class {
|
|
889
|
+
constructor(e) {
|
|
890
|
+
this._closed = !1, this._options = { ...e };
|
|
891
|
+
let t = this;
|
|
892
|
+
this._transactions = this._options?.transactions ?? new d({ transient: !0 }), this._id = this._transactions.create({ isDeleted: !1 }), this._emitter = new P(this, this._transactions), e?.json && this._fromJSON(e.json), this._options?.setContainerReadOnlyCallback?.(() => {
|
|
893
|
+
t._processOnContainerReadOnly();
|
|
894
|
+
}), this._transactionsRemoveListener = this._transactions.addStateListener(this._id, {
|
|
895
|
+
onAfterStateChange(e, n) {
|
|
896
|
+
t._processAfterStateChange(e, n);
|
|
897
|
+
},
|
|
898
|
+
onRestoreOrRevert(e, n) {
|
|
899
|
+
t._processRestoreOrRevert(e, n);
|
|
900
|
+
}
|
|
901
|
+
}), this._processInit();
|
|
902
|
+
}
|
|
903
|
+
_fromJSON(e) {}
|
|
904
|
+
isReadOnly() {
|
|
905
|
+
return this._options.isReadOnly?.() ?? !1;
|
|
906
|
+
}
|
|
907
|
+
isDeleted() {
|
|
908
|
+
let e = this._getState();
|
|
909
|
+
return e === void 0 || (e.isDeleted ?? !1);
|
|
910
|
+
}
|
|
911
|
+
getType() {
|
|
912
|
+
return this._options.type;
|
|
913
|
+
}
|
|
914
|
+
get isIModel() {
|
|
915
|
+
return !0;
|
|
916
|
+
}
|
|
917
|
+
_processTransactionDone(e) {}
|
|
918
|
+
_getActionDescription(e) {
|
|
919
|
+
return null;
|
|
920
|
+
}
|
|
921
|
+
_getState() {
|
|
922
|
+
if (this._closed) throw Error(r("error.model.modelClosed"));
|
|
923
|
+
return this._transactions.getState(this._id);
|
|
924
|
+
}
|
|
925
|
+
_beginCommit(e) {
|
|
926
|
+
return this._transactions.beginCommit(typeof e == "string" ? { description: e } : e);
|
|
927
|
+
}
|
|
928
|
+
_getTransactions() {
|
|
929
|
+
return this._transactions;
|
|
930
|
+
}
|
|
931
|
+
_updateState(e, t, n) {
|
|
932
|
+
return this._writeState(e, t, n, !1);
|
|
933
|
+
}
|
|
934
|
+
_amendState(e, t, n) {
|
|
935
|
+
return this._writeState(e, t, n, !0);
|
|
936
|
+
}
|
|
937
|
+
_writeState(e, t, n, i = !1) {
|
|
938
|
+
if (this._closed) throw Error(r("error.model.modelClosed"));
|
|
939
|
+
if (!e) return this;
|
|
940
|
+
let a = this._beginCommit(t?.description);
|
|
941
|
+
try {
|
|
942
|
+
a.updateState(this._id, e);
|
|
943
|
+
let r = !1, o = n ? n.length : 0;
|
|
944
|
+
for (let e = 0; e < o; e++) {
|
|
945
|
+
let t = n[e];
|
|
946
|
+
r ||= t === "onAnyChange", this._emitter.notify(t);
|
|
947
|
+
}
|
|
948
|
+
!r && n && o > 0 && this._emitter.notify("onAnyChange"), i ? a.amend(t) : a.commit(t);
|
|
949
|
+
} catch (e) {
|
|
950
|
+
throw a.rollback(), e;
|
|
951
|
+
}
|
|
952
|
+
return this;
|
|
953
|
+
}
|
|
954
|
+
_getEmitter() {
|
|
955
|
+
return this._emitter;
|
|
956
|
+
}
|
|
957
|
+
_processInit() {}
|
|
958
|
+
_processAfterStateChange(e, t) {}
|
|
959
|
+
_processRestoreOrRevert(e, t) {
|
|
960
|
+
this._emitter.notify("onInvalidated");
|
|
961
|
+
}
|
|
962
|
+
delete(e) {
|
|
963
|
+
this._getState().isDeleted || this._delete(e);
|
|
964
|
+
}
|
|
965
|
+
_delete(e) {
|
|
966
|
+
e = {
|
|
967
|
+
description: this._getActionDescription("delete") ?? n("op.delete"),
|
|
968
|
+
...e
|
|
969
|
+
};
|
|
970
|
+
let t = this._beginCommit(e?.description);
|
|
971
|
+
try {
|
|
972
|
+
this._options.deleteFromContainer && this._options.deleteFromContainer?.(e), this._processDelete(), t.commit();
|
|
973
|
+
} catch (e) {
|
|
974
|
+
throw t.rollback(), e;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
_processOnContainerDeleted() {
|
|
978
|
+
this._processDelete();
|
|
979
|
+
}
|
|
980
|
+
_processDelete() {
|
|
981
|
+
this._updateState({ isDeleted: !0 }, void 0, ["onDelete"]);
|
|
982
|
+
}
|
|
983
|
+
_processOnContainerReadOnly() {
|
|
984
|
+
this._emitter.notify("onReadOnlyChange");
|
|
985
|
+
}
|
|
986
|
+
addListeners(e, t) {
|
|
987
|
+
return this._emitter.addListeners(e, t);
|
|
988
|
+
}
|
|
989
|
+
getId() {
|
|
990
|
+
return this._id;
|
|
991
|
+
}
|
|
992
|
+
getVersionId() {
|
|
993
|
+
return this._transactions.getVersionId(this._id);
|
|
994
|
+
}
|
|
995
|
+
beginCommit(e) {
|
|
996
|
+
return this._beginCommit(e);
|
|
997
|
+
}
|
|
998
|
+
doBatch(e, t) {
|
|
999
|
+
let n = this;
|
|
1000
|
+
return this._transactions.doBatch(e, typeof t == "string" ? { description: t } : t, (e) => {
|
|
1001
|
+
n._processTransactionDone(e);
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
isClosed() {
|
|
1005
|
+
return this._closed;
|
|
1006
|
+
}
|
|
1007
|
+
close() {
|
|
1008
|
+
this._closed || (this._emitter.notify("onClose"), this._closed = !0, this._transactionsRemoveListener?.(), this._transactions.remove(this._id));
|
|
1009
|
+
}
|
|
1010
|
+
}, R = class e extends L {
|
|
1011
|
+
static {
|
|
1012
|
+
this.instanceCounter = 0;
|
|
1013
|
+
}
|
|
1014
|
+
constructor(t) {
|
|
1015
|
+
super(t), this._watches = /* @__PURE__ */ new Set(), this._watchesReleased = !1, this._getMovable = t.getMovable ?? null, this._addWatchOption = t.addWatch ?? null, this._getRangeOption = t.getRange ?? null;
|
|
1016
|
+
let n = t.name ?? null;
|
|
1017
|
+
!n && this._getMovable && (n = `${this.getTypeDescription()} ${++e.instanceCounter}`);
|
|
1018
|
+
let r = t.description ?? null;
|
|
1019
|
+
n === null && r === null || this._updateState({
|
|
1020
|
+
name: n,
|
|
1021
|
+
description: r
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
getName() {
|
|
1025
|
+
return this._closed ? null : this._getState()?.name ?? null;
|
|
1026
|
+
}
|
|
1027
|
+
setName(e) {
|
|
1028
|
+
let t = { description: n("op.setMovableName") };
|
|
1029
|
+
return this._protectionCheck(t.description), this._updateState({ name: e }, t, ["onAnyChange"]), this;
|
|
1030
|
+
}
|
|
1031
|
+
getDescription() {
|
|
1032
|
+
return this._closed ? null : this._getState()?.description ?? null;
|
|
1033
|
+
}
|
|
1034
|
+
setDescription(e) {
|
|
1035
|
+
let t = { description: n("op.setMovableDescription") };
|
|
1036
|
+
return this._protectionCheck(t.description), this._updateState({ description: e || null }, t, ["onAnyChange"]), this;
|
|
1037
|
+
}
|
|
1038
|
+
getMovable() {
|
|
1039
|
+
return this._getMovable?.() ?? null;
|
|
1040
|
+
}
|
|
1041
|
+
getReferences() {
|
|
1042
|
+
if (this._closed || this._watchesReleased || this._watches.size === 0) return null;
|
|
1043
|
+
let e = [], t = /* @__PURE__ */ new Set();
|
|
1044
|
+
for (let n of this._watches) {
|
|
1045
|
+
let r = n.formula?.getReferences() ?? this._parseReference(n.expression);
|
|
1046
|
+
if (!r) continue;
|
|
1047
|
+
let i = r.getCount();
|
|
1048
|
+
for (let n = 0; n < i; n++) {
|
|
1049
|
+
let i = r.at(n);
|
|
1050
|
+
if (i.isInvalid()) continue;
|
|
1051
|
+
let a = `${i.getWorksheet().getId()}!${i.getAddress()}`;
|
|
1052
|
+
t.has(a) || (t.add(a), e.push(i));
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
return e.length === 0 ? null : e[0].getWorksheet().getRanges(e);
|
|
1056
|
+
}
|
|
1057
|
+
_addWatch(e, t, n) {
|
|
1058
|
+
let r = typeof e == "string" ? e : e.getExpression(), i = {
|
|
1059
|
+
expression: r.startsWith("=") ? r.substring(1) : r,
|
|
1060
|
+
formula: null,
|
|
1061
|
+
callback: t,
|
|
1062
|
+
options: n,
|
|
1063
|
+
release: null
|
|
1064
|
+
};
|
|
1065
|
+
return this._watches.add(i), this._watchesReleased || this._hold(i, typeof e == "string" ? void 0 : e), () => {
|
|
1066
|
+
this._watches.delete(i) && (i.release?.(), i.release = null, this._notifyReferencesChange());
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
_resolveRange(e) {
|
|
1070
|
+
return this._getRangeOption?.(e) ?? null;
|
|
1071
|
+
}
|
|
1072
|
+
_hold(e, t) {
|
|
1073
|
+
let n = this._addWatchOption;
|
|
1074
|
+
n && (e.release = n(t ?? e.expression, (t) => {
|
|
1075
|
+
e.formula = t.formula, e.expression = t.formula.getExpression(), e.callback?.(t), this._notifyReferencesChange();
|
|
1076
|
+
}, e.options));
|
|
1077
|
+
}
|
|
1078
|
+
_parseReference(e) {
|
|
1079
|
+
if (!e || e.includes("#REF!")) return null;
|
|
1080
|
+
try {
|
|
1081
|
+
let t = e.includes("!") ? null : this.getMovable()?.getRange().getWorksheet(), n = t ? t.getRange(e) : this._resolveRange(e);
|
|
1082
|
+
return n && !n.isInvalid() ? n.getWorksheet().getRanges([n]) : null;
|
|
1083
|
+
} catch {
|
|
1084
|
+
return null;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
_notifyReferencesChange() {
|
|
1088
|
+
this._closed || (this._emitter.notify("onReferencesChange"), this._emitter.notify("onAnyChange"));
|
|
1089
|
+
}
|
|
1090
|
+
_releaseWatches() {
|
|
1091
|
+
this._watchesReleased = !0;
|
|
1092
|
+
for (let e of this._watches) e.release?.(), e.release = null;
|
|
1093
|
+
}
|
|
1094
|
+
_holdWatches() {
|
|
1095
|
+
this._watchesReleased = !1;
|
|
1096
|
+
for (let e of this._watches) this._hold(e, e.formula ?? void 0);
|
|
1097
|
+
}
|
|
1098
|
+
_processDelete() {
|
|
1099
|
+
this._releaseWatches(), super._processDelete();
|
|
1100
|
+
}
|
|
1101
|
+
_processRestoreOrRevert(e, t) {
|
|
1102
|
+
super._processRestoreOrRevert(e, t);
|
|
1103
|
+
let n = e === void 0 || !0 === e.isDeleted;
|
|
1104
|
+
n && !this._watchesReleased ? this._releaseWatches() : !n && this._watchesReleased && this._holdWatches();
|
|
1105
|
+
}
|
|
1106
|
+
_getSourceId() {
|
|
1107
|
+
let e = this._getState()?.data;
|
|
1108
|
+
return typeof e?.sourceId == "number" ? e.sourceId : void 0;
|
|
1109
|
+
}
|
|
1110
|
+
_ensureSourceId(e) {
|
|
1111
|
+
let t = this._getSourceId();
|
|
1112
|
+
if (t !== void 0) return t;
|
|
1113
|
+
let r = e(), i = this._getState()?.data ?? {};
|
|
1114
|
+
return this._updateState({ data: {
|
|
1115
|
+
...i,
|
|
1116
|
+
sourceId: r
|
|
1117
|
+
} }, { description: n("op.connectShape") }), r;
|
|
1118
|
+
}
|
|
1119
|
+
_protectionCheck(e) {
|
|
1120
|
+
if (this.isReadOnly()) throw new t(I(e));
|
|
1121
|
+
}
|
|
1122
|
+
};
|
|
1123
|
+
export { P as a, S as c, F as i, c as l, L as n, h as o, I as r, x as s, R as t, d as u };
|