@sheetxl/sdk 0.6.6 → 0.6.8

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.
Files changed (89) hide show
  1. package/browser/cjs/{DiVG2v2ZDzgKwaRx.cjs → BLMXRt9wwJiAFaI7.cjs} +1 -1
  2. package/browser/cjs/BTlFwdrDwZameLdv.cjs +124 -0
  3. package/browser/cjs/{omqRPtZXWxrc3xX8.cjs → BVDYBTtLB8ZsvUP4.cjs} +1 -1
  4. package/browser/cjs/{DsvaCB4HUlLoYqNT.cjs → BdX7STIJEyR-C9db.cjs} +1 -1
  5. package/browser/cjs/{Cdd7AjTjtRRO-TLn.cjs → BrYJpuGpItHXDK3Q.cjs} +1 -1
  6. package/browser/cjs/{DxbHdnrkzuYrOXA2.cjs → C9NesCgv9fmT5YZ4.cjs} +3 -3
  7. package/browser/cjs/{NtON2hc6wNJhpcht.cjs → CI2-oD4G_tFYtFLa.cjs} +1 -1
  8. package/browser/cjs/{DPyEaAuam8YsoSqb.cjs → CNLel5In1H4jwhCc.cjs} +1 -1
  9. package/browser/cjs/{Bs8MO69xr_tUFTWb.cjs → CPrlT8ClOAOEVPLE.cjs} +1 -1
  10. package/browser/cjs/{BhpUbwlRnsoFjUh-.cjs → CQS0UR_lmBqd4JcZ.cjs} +1 -1
  11. package/browser/cjs/{BIE_Zy1l-0G2a1Bd.cjs → CQy7meDzNOoX_X46.cjs} +1 -1
  12. package/browser/cjs/{VuwSI2r6dYoA8eL_.cjs → CeZnW6p71usfXr0J.cjs} +1 -1
  13. package/browser/cjs/ClYuPNQkQpHGHZ_T.cjs +7 -0
  14. package/browser/cjs/{BtIluyJ2B2fjoVxV.cjs → CrH5BaOboclMtZ4d.cjs} +1 -1
  15. package/browser/cjs/{BbNxoKfNh8rtHZ05.cjs → CvxuA4OribKX0xTX.cjs} +1 -1
  16. package/browser/cjs/{DZV__ngw7U-9-YYS.cjs → D-w9RCUQTT6LzhPr.cjs} +1 -1
  17. package/browser/cjs/{DO4t5ZG4ceD0uMnn.cjs → D50AwKqyBLJFX38-.cjs} +1 -1
  18. package/browser/cjs/{DqVdtdMPltxoaSoj.cjs → DJrlrUIL2pZ9GHaE.cjs} +1 -1
  19. package/browser/cjs/{CbZlSSKXhdRftp7-.cjs → DM6oJfKGt7FrjrlU.cjs} +1 -1
  20. package/browser/cjs/{C-OtpB1ONiISz1Pv.cjs → DrbQ1mluJfQa8dTN.cjs} +1 -1
  21. package/browser/cjs/{CBiWbQ6x7YB0i9Pj.cjs → DtCuUh-dGD4DoBwf.cjs} +1 -1
  22. package/browser/cjs/{FpTBNfEo51QkEK-X.cjs → EC2RA6Oa6v29QDW7.cjs} +1 -1
  23. package/browser/cjs/FTRIxvYSSu0U-rq4.cjs +54 -0
  24. package/browser/cjs/index.cjs +2 -2
  25. package/browser/cjs/{BSrCI40wa5Cuf_7j.cjs → tOGoeR9yufCdzeBK.cjs} +1 -1
  26. package/browser/cjs/{BXbJ3tSi9hx1njTO.cjs → u2uBSZfQ54JOv_XF.cjs} +1 -1
  27. package/browser/cjs/{CCnLYfIY5FmqXsft.cjs → vlcPHzK2WPzV2Xgt.cjs} +1 -1
  28. package/browser/cjs/{CKRM9Ol-4U4KS0RL.cjs → y0ZuWWX8utA_EDbJ.cjs} +1 -1
  29. package/{node/esm/Dt_a2ot6PKKgpQ0r.mjs → browser/esm/0S-AytvdRrcMKEfy.mjs} +1 -1
  30. package/browser/esm/{B6VAiNb4zaeT9il5.mjs → B37U-Nmjy_Ic6Bwd.mjs} +1 -1
  31. package/{node/esm/B7BEc4Msi2XlEIER.mjs → browser/esm/BJnrxMZrwq-ELXq2.mjs} +1 -1
  32. package/{node/esm/r6HjIuEn_D7VNa-4.mjs → browser/esm/BLDUG5EtdEhw7UJ2.mjs} +1 -1
  33. package/browser/esm/{B6SR0BPXF3_HR9Gp.mjs → BXeztFPb2KTw_Gwy.mjs} +158 -158
  34. package/browser/esm/{NFVDFXIiRDXJlhKx.mjs → Bb_Ijj8onxi_-JZG.mjs} +1 -1
  35. package/browser/esm/{Dy1MPXX1hnDkr53Q.mjs → BdagunFigip5lLzW.mjs} +1 -1
  36. package/browser/esm/{CNkRKDvy18fA1EDx.mjs → ByqDeR4kFnbAnomd.mjs} +1 -1
  37. package/browser/esm/{BNJ3M4LVn1rfr1_R.mjs → C0SYrcOWbCLV1hdr.mjs} +1 -1
  38. package/{node/esm/BhAg6FTDoDkRcf9D.mjs → browser/esm/C15khDGhbvZW63CB.mjs} +1 -1
  39. package/browser/esm/{DUKsZR10tZVr7WZd.mjs → C4-W_la16cA9EfP9.mjs} +1 -1
  40. package/{node/esm/DmMIV1-nZOvaA844.mjs → browser/esm/CFa1MRnHqQ9liVjH.mjs} +1 -1
  41. package/browser/esm/{D6QeD-EYnM6w98fy.mjs → CXFmdl5K8RuBS3df.mjs} +1 -1
  42. package/{node/esm/DsnUFEhJGCZ5o3I_.mjs → browser/esm/Cc3AJ1qo_oG7_L0E.mjs} +1 -1
  43. package/{node/esm/OjUVs9yHJQbHq8OD.mjs → browser/esm/CchlWF0WIdpJ2ihz.mjs} +1 -1
  44. package/browser/esm/{Bton8MoXcrdh3-iQ.mjs → Cy0d-pe4dHU9heyA.mjs} +1 -1
  45. package/{node/esm/sxtuUs9-MAibjEWc.mjs → browser/esm/DMSbBcnFJScK5nBu.mjs} +1 -1
  46. package/browser/esm/{paGhkNtzUuyqCkUg.mjs → DOBXCzRAmW5W3KmK.mjs} +4 -4
  47. package/browser/esm/{Dd0x4mEePbYX45B3.mjs → DQzF7RVKc8ppyxAD.mjs} +1 -1
  48. package/{node/esm/DjCgtM-GF-W0YS-p.mjs → browser/esm/DR1divTfq_TFCCXR.mjs} +1 -1
  49. package/browser/esm/{CgcyircyUQrbljuy.mjs → DU0ewPZTDuyBByJ3.mjs} +1 -1
  50. package/browser/esm/{CnmS1R-8lJ_sRiZr.mjs → Dexzv9NZGHABnlaC.mjs} +1 -1
  51. package/browser/esm/{BljblkcMNgdoxdQg.mjs → Dt3Cgmgc9CXA0z7y.mjs} +6158 -6105
  52. package/browser/esm/{cN12k06S_qMOUBeq.mjs → ERFk7D1uArSqgAJy.mjs} +1 -1
  53. package/browser/esm/{BRgoMSpXo7fDOSWt.mjs → FwCG0LN3sx8EbAhe.mjs} +1 -1
  54. package/browser/esm/{BDbtwbWXXdqWLyPT.mjs → esqLrTm9jcVUtgzE.mjs} +1 -1
  55. package/browser/esm/index.mjs +2 -2
  56. package/browser/esm/{BuabryqTvHfqYpLE.mjs → qhxUd1U4-_uAr19o.mjs} +612 -569
  57. package/licenses/dependencies.txt +1 -1
  58. package/{browser/esm/Dt_a2ot6PKKgpQ0r.mjs → node/esm/0S-AytvdRrcMKEfy.mjs} +1 -1
  59. package/node/esm/{D4MZjiOfbcSU7TGx.mjs → 7LDUCFFEjGMjdIeB.mjs} +1 -1
  60. package/node/esm/{CRWzbCYpQ48Mc7Oj.mjs → B7P-zw_wk4ERYAwf.mjs} +1 -1
  61. package/{browser/esm/B7BEc4Msi2XlEIER.mjs → node/esm/BJnrxMZrwq-ELXq2.mjs} +1 -1
  62. package/{browser/esm/r6HjIuEn_D7VNa-4.mjs → node/esm/BLDUG5EtdEhw7UJ2.mjs} +1 -1
  63. package/node/esm/{NFVDFXIiRDXJlhKx.mjs → Bb_Ijj8onxi_-JZG.mjs} +1 -1
  64. package/node/esm/{DZXvUlOI18ASk4cY.mjs → BrV22-toqLYb5LkH.mjs} +1 -1
  65. package/node/esm/{BXG28v6SWExbwtYv.mjs → ByYblFpwbl25hU7o.mjs} +1 -1
  66. package/node/esm/{CNkRKDvy18fA1EDx.mjs → ByqDeR4kFnbAnomd.mjs} +1 -1
  67. package/{browser/esm/BhAg6FTDoDkRcf9D.mjs → node/esm/C15khDGhbvZW63CB.mjs} +1 -1
  68. package/node/esm/{C21-iIYh5KUqwGUS.mjs → C6PjmXgRjFnuGT5_.mjs} +15 -15
  69. package/node/esm/{Fi47qQmSSnZbc-_T.mjs → CEAukeJpSqsizA-i.mjs} +1 -1
  70. package/{browser/esm/DmMIV1-nZOvaA844.mjs → node/esm/CFa1MRnHqQ9liVjH.mjs} +1 -1
  71. package/node/esm/{D6QeD-EYnM6w98fy.mjs → CXFmdl5K8RuBS3df.mjs} +1 -1
  72. package/{browser/esm/DsnUFEhJGCZ5o3I_.mjs → node/esm/Cc3AJ1qo_oG7_L0E.mjs} +1 -1
  73. package/{browser/esm/OjUVs9yHJQbHq8OD.mjs → node/esm/CchlWF0WIdpJ2ihz.mjs} +1 -1
  74. package/{browser/esm/sxtuUs9-MAibjEWc.mjs → node/esm/DMSbBcnFJScK5nBu.mjs} +1 -1
  75. package/node/esm/{BJ5Ex-SSSvq3Ufb2.mjs → DN_xpGsi7kf6YOuH.mjs} +15 -15
  76. package/{browser/esm/DjCgtM-GF-W0YS-p.mjs → node/esm/DR1divTfq_TFCCXR.mjs} +1 -1
  77. package/node/esm/{CnmS1R-8lJ_sRiZr.mjs → Dexzv9NZGHABnlaC.mjs} +1 -1
  78. package/node/esm/{cN12k06S_qMOUBeq.mjs → ERFk7D1uArSqgAJy.mjs} +1 -1
  79. package/node/esm/{BRgoMSpXo7fDOSWt.mjs → FwCG0LN3sx8EbAhe.mjs} +1 -1
  80. package/node/esm/{D8LgT--BLc3SOBnq.mjs → KoFoApRQ-x4voQin.mjs} +1 -1
  81. package/node/esm/{BDbtwbWXXdqWLyPT.mjs → esqLrTm9jcVUtgzE.mjs} +1 -1
  82. package/node/esm/index.mjs +3250 -3186
  83. package/node/esm/{Cvy5UTha3amXG2Vm.mjs → lQwFvDr-SsCqhuIe.mjs} +1 -1
  84. package/package.json +4 -4
  85. package/types/index.d.ts +74 -9
  86. package/types/scripting.d.ts +17989 -17899
  87. package/browser/cjs/AEppYLzHcTcmM3v0.cjs +0 -54
  88. package/browser/cjs/C-eF8qM1EIdQznkH.cjs +0 -7
  89. package/browser/cjs/PDVoAoWxxix7hOyp.cjs +0 -124
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.6.6
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.6.8
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/sdk",
3
3
  "description": "SDK - A high-performance, embeddable spreadsheet engine.",
4
- "version": "0.6.6",
4
+ "version": "0.6.8",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -31,9 +31,9 @@
31
31
  "automation"
32
32
  ],
33
33
  "dependencies": {
34
- "@sheetxl/primitives": "^0.6.6",
35
- "@sheetxl/scripting": "^0.6.6",
36
- "@sheetxl/utils": "^0.6.6",
34
+ "@sheetxl/primitives": "^0.6.8",
35
+ "@sheetxl/scripting": "^0.6.8",
36
+ "@sheetxl/utils": "^0.6.8",
37
37
  "bahttext": "^2.3.0",
38
38
  "bessel": "^1.0.2",
39
39
  "chalk": "^5.5.0",
package/types/index.d.ts CHANGED
@@ -615,6 +615,8 @@ export declare class Calculation extends AbstractModel<State_2, ICalculation.JSO
615
615
  stop(): Promise<void>;
616
616
  /** @inheritdoc ICalculation.getStatus */
617
617
  getStatus(): ICalculation.Status;
618
+ /** @inheritdoc ICalculation.waitForFinish */
619
+ waitForFinish(): Promise<void>;
618
620
  /** @inheritdoc ICalculation.getFunctions */
619
621
  getFunctions(): IFunctionCollection;
620
622
  /** @inheritdoc IFormulaContext.getRuntime */
@@ -2825,6 +2827,13 @@ export declare interface ICalculation extends IModel {
2825
2827
  getFunctions(): IFunctionCollection;
2826
2828
  /** @inheritdoc IFormulaContext.getRuntime */
2827
2829
  getRuntime(): IRuntime;
2830
+ /**
2831
+ * Waits for the calculation to finish.
2832
+ *
2833
+ * @remarks
2834
+ * This is useful when needing to ensure that the values in the calculation cycle are up-to-date.
2835
+ */
2836
+ waitForFinish(): Promise<void>;
2828
2837
  /**
2829
2838
  * Add Listeners.
2830
2839
  *
@@ -3720,6 +3729,10 @@ export declare interface ICellContainerOptions {
3720
3729
  * Option to provide a custom calculation.
3721
3730
  */
3722
3731
  calculation?: ICalculation;
3732
+ /**
3733
+ * If the parent has a workbook
3734
+ */
3735
+ workbook?: IWorkbook;
3723
3736
  /**
3724
3737
  * The store for all state changes. This is provided to enable versioning, undo/redo, distributed editing, etc.
3725
3738
  *
@@ -4565,6 +4578,13 @@ export declare interface ICellRange {
4565
4578
  * @param full If `true` then all formulas will be recalculated.
4566
4579
  */
4567
4580
  calculate(full?: boolean): this;
4581
+ /**
4582
+ * Waits for all calculations to finish.
4583
+ *
4584
+ * @remarks
4585
+ * Useful for ensuring that all calculations are complete before proceeding.
4586
+ */
4587
+ waitForCalcs(): Promise<this>;
4568
4588
  /**
4569
4589
  * Fill the range to a destination using an array of {@link IAutoFill.Filler}.
4570
4590
  *
@@ -8568,9 +8588,9 @@ export declare interface IFunctionCollection extends ICollection<IFunction> {
8568
8588
  *
8569
8589
  * If no filter criteria is provided, all items will be returned.
8570
8590
  *
8571
- * @param options {@link IFunctionCollection.GetItemsOptions}
8591
+ * @param options {@link IFunctionCollection.SearchOptions}
8572
8592
  */
8573
- getItems(options?: IFunctionCollection.GetItemsOptions): IFunction[];
8593
+ search(options?: IFunctionCollection.SearchOptions): Promise<IFunction[]>;
8574
8594
  /**
8575
8595
  * Convenience method for filter by name.
8576
8596
  * This is functionally equivalent to getItems({ name });
@@ -8591,7 +8611,7 @@ export declare namespace IFunctionCollection {
8591
8611
  /**
8592
8612
  * Options for searching a function in the collection.
8593
8613
  */
8594
- export interface GetItemsOptions {
8614
+ export interface SearchOptions {
8595
8615
  /**
8596
8616
  * Search with the given name. This is case insensitive.
8597
8617
  */
@@ -9475,6 +9495,10 @@ export declare interface IModule {
9475
9495
  */
9476
9496
  getLanguage(): string;
9477
9497
  getErrors(): any[];
9498
+ /**
9499
+ * The name of the module.
9500
+ */
9501
+ getName(): string;
9478
9502
  /**
9479
9503
  * Remove the module from the collection.
9480
9504
  */
@@ -11353,13 +11377,21 @@ export declare interface IScript {
11353
11377
  /**
11354
11378
  * Returns if the script is readonly.
11355
11379
  */
11380
+ isReadOnly(): boolean;
11356
11381
  /**
11357
11382
  * Convenience method for creating a module from a file.
11358
11383
  *
11359
11384
  * @remarks
11360
11385
  * equivalent to `getModules().search( { type: 'macro', name } )`
11361
11386
  */
11362
- searchFunction(options?: IScript.SearchFunctionsOptions): IFunction[];
11387
+ searchFunctions(options?: IScript.SearchOptions): Promise<IFunction[]>;
11388
+ /**
11389
+ * Add Listeners.
11390
+ *
11391
+ * @see
11392
+ * {@link IListener.ISource.addListeners}
11393
+ */
11394
+ addListeners(listeners: IScript.IListeners, options?: IListener.Options): IListener.Remove;
11363
11395
  /**
11364
11396
  * Returns a JSON representation of the script.
11365
11397
  */
@@ -11374,6 +11406,30 @@ export declare interface IScript {
11374
11406
  * {@link IFunctionCollection}
11375
11407
  */
11376
11408
  export declare namespace IScript {
11409
+ /**
11410
+ * Events for {@link ISheet}.
11411
+ */
11412
+ export interface Events {
11413
+ /**
11414
+ * Called before search.
11415
+ */
11416
+ onBeforeSearch?(source: IScript): Promise<void> | void;
11417
+ /**
11418
+ * Called after load.
11419
+ */
11420
+ onChange?(source: IScript): void;
11421
+ /**
11422
+ * Called before load. If any exception is thrown this
11423
+ * exception will be returned to the client and delete will be aborted.
11424
+ */
11425
+ onBeforeSave?(source: IScript): Promise<void> | void;
11426
+ /**
11427
+ * Called after save.
11428
+ */
11429
+ onSave?(source: IScript): void;
11430
+ }
11431
+ export interface IListeners extends IListener.Callbacks<IScript, IScript.Events> {
11432
+ }
11377
11433
  /**
11378
11434
  * The results from a macro script
11379
11435
  */
@@ -11381,11 +11437,9 @@ export declare namespace IScript {
11381
11437
  params: any[];
11382
11438
  results: any;
11383
11439
  }
11384
- export interface SearchFunctionsOptions {
11385
- name?: string;
11386
- category?: string;
11387
- type?: string;
11440
+ export interface SearchOptions extends IFunctionCollection.SearchOptions {
11388
11441
  moduleName?: string;
11442
+ includeBuiltIn?: boolean;
11389
11443
  }
11390
11444
  }
11391
11445
 
@@ -11696,6 +11750,13 @@ export declare interface ISheet extends ITransaction.ITransactional, IListener.I
11696
11750
  * Returns the {@link ICalculation} for the sheet.
11697
11751
  */
11698
11752
  getCalculation(): ICalculation;
11753
+ /**
11754
+ * Returns the {@link IWorkbook} for the sheet.
11755
+ *
11756
+ * @remarks
11757
+ * This may be null if not created via a workbook
11758
+ */
11759
+ getWorkbook(): IWorkbook | null;
11699
11760
  /**
11700
11761
  * Removes from a container. This is usually the `Workbook`. If this is being
11701
11762
  * used standalone this operation will throw an exception.
@@ -18328,6 +18389,7 @@ export declare class Sheet implements ISheet {
18328
18389
  protected _namesRemoveListener: IListener.Remove;
18329
18390
  protected _calculation: ICalculation;
18330
18391
  protected _ownsCalculation: boolean;
18392
+ protected _workbook: IWorkbook | null;
18331
18393
  protected _tables: ITableCollection;
18332
18394
  protected _conditionals: IConditionalFormatCollection;
18333
18395
  protected _movables: IMovableCollection;
@@ -18435,6 +18497,7 @@ export declare class Sheet implements ISheet {
18435
18497
  /* Excluded from this release type: _updateFormulaSpatial */
18436
18498
  /* Excluded from this release type: _realizeCalcedValues */
18437
18499
  /* Excluded from this release type: _calculate */
18500
+ /* Excluded from this release type: _waitForCalcs */
18438
18501
  /* Excluded from this release type: _calculateFull */
18439
18502
  /* Excluded from this release type: _setComments */
18440
18503
  /* Excluded from this release type: _clear */
@@ -18583,8 +18646,10 @@ export declare class Sheet implements ISheet {
18583
18646
  setPosition(index: number): ISheet;
18584
18647
  /** {@inheritDoc ISheet.getNames} */
18585
18648
  getNames(): INamedCollection;
18586
- /** {@inheritDoc IWorkbook.getCalculation} */
18649
+ /** {@inheritDoc ISheet.getCalculation} */
18587
18650
  getCalculation(): ICalculation;
18651
+ /** {@inheritDoc ISheet.getWorkbook} */
18652
+ getWorkbook(): IWorkbook | null;
18588
18653
  get [Symbol.toStringTag](): string;
18589
18654
  /** {@inheritDoc ICellRange.toString} */
18590
18655
  toString(): string;