@sheetxl/sdk 0.8.0-beta.14 → 0.8.0-beta.16

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 (195) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/4MbBwfmW2hDXk9_w.mjs +165 -0
  3. package/browser/esm/{ChYgQL-8qIDFmX31.mjs → 9YWdxmSjzLN4j_ts.mjs} +22 -22
  4. package/browser/esm/B6BdiHigbUdbZp3J.mjs +686 -0
  5. package/browser/esm/{CImFKFaYToUH-bSE.mjs → BF_QwkZ_hs2rFoTT.mjs} +3 -3
  6. package/browser/esm/{DBvu0tdSf-5vol4e.mjs → BMo2_9Ul36IwRm3S.mjs} +3 -3
  7. package/browser/esm/{B1aH_qa-czVyEVHd.mjs → BWY1qiidTUBVPJoD.mjs} +506 -502
  8. package/browser/esm/{BSXQAXwZdJKYTO4P.mjs → Bf80epSsm_RyAOb9.mjs} +29 -29
  9. package/browser/esm/{D_XMi4_5iO2rkET5.mjs → BfoE6Dn_GQCIkQD3.mjs} +2 -2
  10. package/browser/esm/{Dhw5XEJYFrkYjdU2.mjs → BlMYYQZP-QM-iBHz.mjs} +23 -22
  11. package/browser/esm/{MuNBN02MyZ558c_K.mjs → BqT-ASHP0NVSUUnY.mjs} +1528 -1433
  12. package/browser/esm/{DnR0xY7_iE3TmMcg.mjs → BtNuoQIrrHw_jnbJ.mjs} +4 -4
  13. package/browser/esm/BxFzcCYhvo9NXFjC.mjs +527 -0
  14. package/browser/esm/{DonQz2Tc3k9lNT8E.mjs → BxYuRTSF9ykc-Tpz.mjs} +3 -3
  15. package/browser/esm/{aRXqxIzjuSLwawMh.mjs → C2PvZwqK-uvsugVS.mjs} +2 -2
  16. package/browser/esm/C3JOjQwdG9kAig7i.mjs +2017 -0
  17. package/browser/esm/{SwLp-iElwDjfcJtv.mjs → C5x0EzqElYGTiTQc.mjs} +2 -2
  18. package/browser/esm/{AXlD9K1gCwPU4gCO.mjs → CMChv-fCFh68VQQt.mjs} +588 -587
  19. package/browser/esm/{BpwULQPKbb4R9Jew.mjs → CRbQATfI0yZxe1kX.mjs} +3 -3
  20. package/browser/esm/{CM_X1zZYzEUPaNJL.mjs → CUu3zeHqcwMRYiov.mjs} +2 -2
  21. package/{node/esm/b3XnssSr9lmvAC2N.mjs → browser/esm/C_jLGkFemj55_BP3.mjs} +3 -3
  22. package/browser/esm/{CtC__ALh4I8PKIln.mjs → CkZoDPUCK5jMUaeJ.mjs} +26955 -22064
  23. package/browser/esm/{DvvqmUQ9Z0NFm1-4.mjs → D-iHJ3q4nwOLcn1D.mjs} +2 -2
  24. package/browser/esm/{qCqzZW74-fhaIG2V.mjs → D807piM0VSokWz-L.mjs} +2 -2
  25. package/browser/esm/{BLYl-afJe_3std8i.mjs → DW3oQ39IF0bsc_lm.mjs} +2 -2
  26. package/browser/esm/{Ln4gsmhqH1LyoANj.mjs → DcB52JPBPmkc3l1m.mjs} +4 -4
  27. package/browser/esm/{DIfAk63CvaOZ3QKi.mjs → DlVnybrgwZWxWN3_.mjs} +10 -10
  28. package/browser/esm/{Dh84MDs-OhdCPCIg.mjs → DvVhatd0J1ch3OCO.mjs} +22 -22
  29. package/browser/esm/{BWoz4kQdA5KKJfl6.mjs → Dx9Fya60meMpuHqm.mjs} +2 -2
  30. package/browser/esm/{r_EZapMBdyS4gUd-.mjs → HV0FkJ6k3Ils318J.mjs} +78 -78
  31. package/browser/esm/{C7hpfT-sX2lyLS-D.mjs → JV9Szh5qTssjxJoE.mjs} +2 -2
  32. package/browser/esm/{CPIWV3Enlh_BF2TY.mjs → KpuD1kEcWB7cT0VM.mjs} +3 -3
  33. package/browser/esm/{3t4S9eda2I6jFad0.mjs → U4FL-QeC0bRUhTEo.mjs} +2 -2
  34. package/browser/esm/{D39XcmtPXVtMN4yF.mjs → WLlpmgLN5OVLoLrC.mjs} +3 -3
  35. package/browser/esm/{Cy8uYCggktF83278.mjs → WR146UAqrsUsL39e.mjs} +2 -2
  36. package/browser/esm/{BPPMKyMn65i1a1mE.mjs → WcHfawW2lkTHtWUd.mjs} +51 -49
  37. package/browser/esm/{Bdcd3QOzsc0aVMjN.mjs → Zp5-cTJ0Llb6EfGi.mjs} +4 -4
  38. package/browser/esm/{oSCy1X5CJ1iYtGDp.mjs → ad9PX897hYE4Srkc.mjs} +3 -3
  39. package/browser/esm/{UMQTbO0zNmBpzW1V.mjs → d_t-7d5BD1AdHg3u.mjs} +404 -404
  40. package/browser/esm/{BVqIknGhQCLUB_7Q.mjs → dwGdnbV-CykjNrlm.mjs} +2 -2
  41. package/browser/esm/{DiXeQjc0WJGLSVEo.mjs → e69NcYnKMLnAmqyA.mjs} +2 -2
  42. package/browser/esm/index.mjs +886 -578
  43. package/browser/esm/{yuF8SbWfjBfrxcq5.mjs → r-o0UCm7KtluNmyK.mjs} +3 -3
  44. package/licenses/dependencies.txt +69 -69
  45. package/node/esm/{BEBt5fo__rvT2q_u.mjs → 446KYBjJQa8g-8Gg.mjs} +52 -50
  46. package/node/esm/{BELc5aQ_pFPgbiso.mjs → 5OfKfTRX2_y2NwpU.mjs} +2 -2
  47. package/node/esm/{C-5JLSNof0FhkuFd.mjs → A3PEHO1HJvkHfb5n.mjs} +2 -2
  48. package/node/esm/{YpOpRyciqQLIY1-G.mjs → B4WUGzJBkQu7BXRm.mjs} +2 -2
  49. package/node/esm/{I-FZojIFWluC6X-j.mjs → BH8J6vKSO5zI_TWo.mjs} +2 -2
  50. package/node/esm/BLmdKnkLwkb3wWe6.mjs +2040 -0
  51. package/node/esm/{BuyAYLI4s33-vmgG.mjs → BZSxu_ZqX8-Uczzn.mjs} +2 -2
  52. package/node/esm/{DiCMnYA2bttmrX3q.mjs → BfPBiAgVmWhuFgFP.mjs} +3 -3
  53. package/node/esm/{BSVttk12GXNfKZ9k.mjs → Bknw7zWZhl2-w1pi.mjs} +3 -3
  54. package/node/esm/{uLrulyR7IXq0SF4j.mjs → BvIPsPiHhMclZ1kH.mjs} +22 -22
  55. package/node/esm/{clgEkmEwfB28nkz2.mjs → By2TFKOjA1HekZap.mjs} +4 -4
  56. package/node/esm/{BXg-D8Rc_iyB8p7X.mjs → BywIhvYkWk2o7MSW.mjs} +2 -2
  57. package/node/esm/{pF2vCOTmrxPAB41Q.mjs → C3zyhnMwQ2hRQBz7.mjs} +31 -30
  58. package/node/esm/{BCjHRVU8tC5lYypg.mjs → C884edhUf9yMqpPp.mjs} +2 -2
  59. package/node/esm/{B6jhx5pHPs2W5GE7.mjs → CDHY-0OyQ9348Brb.mjs} +189 -189
  60. package/node/esm/{xRGObcoaGDnAZFnj.mjs → CERNLhFrAwtu_p-q.mjs} +2 -2
  61. package/node/esm/{DbPUG2DcQ3T_QhcJ.mjs → CFkX_Cn6avQqQiVC.mjs} +78 -78
  62. package/node/esm/CJDV8P3hI8lu--3Z.mjs +530 -0
  63. package/node/esm/{Cyeq1rDslIqF1LKz.mjs → CKwiipdPJGzAiPjg.mjs} +2 -2
  64. package/node/esm/{BLPrFp_jKGYgWPX1.mjs → CLtUMJfKsy4SevWE.mjs} +3 -3
  65. package/node/esm/{DLdXl0O0TXuyqLU4.mjs → CVPieTgKCwkL21nD.mjs} +28573 -23108
  66. package/node/esm/{Dlk2ZYExFgQ0xE2H.mjs → C_fYuynP2a_70WdL.mjs} +2 -2
  67. package/{browser/esm/BEDfJP2tcuRy2Y2E.mjs → node/esm/CgdNA3B_GFG_yJiN.mjs} +3 -3
  68. package/node/esm/Cs3ibv6YHCDwLRlk.mjs +115 -0
  69. package/node/esm/{DeFE8QfuCeGw-mvd.mjs → Cxak8i2NidZ4Uv6v.mjs} +487 -483
  70. package/node/esm/{NA-8urR7T1NCwrgD.mjs → D88A3UpCyGRjcX3U.mjs} +3 -3
  71. package/node/esm/{99miMotf3dOuG5Jk.mjs → DBIUe2BC9xU7qMHR.mjs} +3 -3
  72. package/node/esm/{BEdxa3I4VOiCsvy7.mjs → DELfV5HQZo1mInBd.mjs} +4 -4
  73. package/node/esm/{BfEdeOg4iYXaYTlh.mjs → DOt3t-13tsnM7Fj6.mjs} +2 -2
  74. package/node/esm/{B3hBxzqJ2_hUylNr.mjs → DfWc3nW_Z_qqc_Wf.mjs} +1762 -1674
  75. package/node/esm/DgnwKbUEyQN5_gWT.mjs +169 -0
  76. package/node/esm/{Ccocd9DTvOnlOE9D.mjs → Dhv9JymnXqcF54oo.mjs} +2 -2
  77. package/node/esm/{Lj98EH6coGdKUzuS.mjs → DvtyKKzOnoOM80NB.mjs} +22 -22
  78. package/node/esm/{Crn6dnSQQRCQAnQ-.mjs → KDGrIa9R5XzWfjM2.mjs} +2 -2
  79. package/node/esm/{D30rC6AWaGGf3CaC.mjs → RTwm9ge1KoPdlBNt.mjs} +2 -2
  80. package/node/esm/{CdSTmD2ZvG9NesNR.mjs → _RIAmJI98l6bIFfZ.mjs} +2 -2
  81. package/node/esm/{CI8UIWR01z9QDlzH.mjs → bIGdvfpnijWeCac6.mjs} +1005 -1004
  82. package/node/esm/index.mjs +913 -598
  83. package/node/esm/kaiXmn0AA5WDsLPo.mjs +199 -0
  84. package/node/esm/{B5VmOC0jO9Zbh9Mq.mjs → mTIhoz1gEcaEm7s1.mjs} +3 -3
  85. package/package.json +7 -7
  86. package/resources/locales/de/model.msg.json +82 -1
  87. package/resources/locales/en/model.msg.json +80 -1
  88. package/types/scripting-api.json +9967 -9497
  89. package/types/scripting-enums.json +27 -0
  90. package/types/scripting.d.ts +2282 -166
  91. package/types/src/.generated/wasm/sdk.d.ts +332 -0
  92. package/types/src/calculation/Calculation.d.ts +8 -0
  93. package/types/src/calculation/ICalculation.d.ts +51 -0
  94. package/types/src/calculation/compiler/Types.d.ts +5 -0
  95. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +1 -1
  96. package/types/src/calculation/formula/FormulaBlock.d.ts +2 -0
  97. package/types/src/calculation/formula/IFormulaBlock.d.ts +18 -0
  98. package/types/src/calculation/grid/CalcGrid.d.ts +5 -1
  99. package/types/src/calculation/grid/CalcGridBackend.d.ts +36 -1
  100. package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -0
  101. package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
  102. package/types/src/calculation/grid/FormulaHost.d.ts +3 -1
  103. package/types/src/calculation/grid/ICalcGrid.d.ts +88 -0
  104. package/types/src/calculation/grid/_CalcRequest.d.ts +9 -0
  105. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
  106. package/types/src/calculation/spatial/SpillEntry.d.ts +55 -4
  107. package/types/src/calculation/state/CalcNode.d.ts +6 -3
  108. package/types/src/calculation/state/CalculationContext.d.ts +4 -2
  109. package/types/src/calculation/state/_PivotView.d.ts +22 -0
  110. package/types/src/cell/ICell.d.ts +1 -21
  111. package/types/src/cellRange/ICellRange.d.ts +18 -2
  112. package/types/src/collections/MixedTypedArrayList.d.ts +16 -2
  113. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +10 -0
  114. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +3 -0
  115. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +3 -0
  116. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +3 -0
  117. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +3 -0
  118. package/types/src/condition/BuiltInOperators/MatchesOperator.d.ts +10 -0
  119. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
  120. package/types/src/condition/BuiltInOperators/index.d.ts +2 -0
  121. package/types/src/condition/Condition.d.ts +1 -0
  122. package/types/src/condition/ICondition.d.ts +15 -0
  123. package/types/src/condition/_ConditionUtils.d.ts +14 -0
  124. package/types/src/conditionalFormat/ConditionalFormat.d.ts +2 -1
  125. package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
  126. package/types/src/license/LicenseDetails.d.ts +27 -0
  127. package/types/src/license/LicenseManager.d.ts +24 -7
  128. package/types/src/license/_Utils.d.ts +34 -3
  129. package/types/src/license/index.d.ts +1 -0
  130. package/types/src/license/runtime.browser.d.ts +32 -4
  131. package/types/src/license/runtime.node.d.ts +8 -5
  132. package/types/src/license/summary.d.ts +18 -0
  133. package/types/src/pivot/IPivotTable.d.ts +1549 -13
  134. package/types/src/pivot/IPivotTableCollection.d.ts +70 -4
  135. package/types/src/pivot/PivotCache.d.ts +95 -11
  136. package/types/src/pivot/PivotDataField.d.ts +73 -0
  137. package/types/src/pivot/PivotField.d.ts +142 -0
  138. package/types/src/pivot/PivotTable.d.ts +548 -14
  139. package/types/src/pivot/PivotTableCollection.d.ts +18 -3
  140. package/types/src/pivot/_PivotAreas.d.ts +48 -0
  141. package/types/src/pivot/_PivotControls.d.ts +140 -0
  142. package/types/src/pivot/_PivotEngine.d.ts +9 -0
  143. package/types/src/pivot/_PivotGroups.d.ts +25 -0
  144. package/types/src/pivot/_PivotItems.d.ts +167 -0
  145. package/types/src/pivot/_PivotStructure.d.ts +237 -0
  146. package/types/src/pivot/_PivotStylePreview.d.ts +21 -0
  147. package/types/src/pivot/_PivotUtils.d.ts +37 -0
  148. package/types/src/pivot/engine/PivotAdd.d.ts +37 -0
  149. package/types/src/pivot/engine/PivotData.d.ts +65 -0
  150. package/types/src/pivot/engine/PivotEdit.d.ts +45 -0
  151. package/types/src/pivot/engine/PivotFilters.d.ts +50 -0
  152. package/types/src/pivot/engine/PivotFormulas.d.ts +72 -0
  153. package/types/src/pivot/engine/PivotLayout.d.ts +133 -0
  154. package/types/src/pivot/engine/PivotMove.d.ts +24 -0
  155. package/types/src/pivot/engine/PivotRefresh.d.ts +87 -0
  156. package/types/src/pivot/engine/PivotSort.d.ts +26 -0
  157. package/types/src/pivot/engine/PivotViewBuilder.d.ts +22 -0
  158. package/types/src/pivot/engine/index.d.ts +15 -0
  159. package/types/src/pivot/index.d.ts +4 -0
  160. package/types/src/pivot/kernel/KernelPivot.d.ts +63 -0
  161. package/types/src/pivot/kernel/_KernelLeaves.d.ts +100 -0
  162. package/types/src/pivot/kernel/_PivotAxisTree.d.ts +71 -0
  163. package/types/src/primitives/Range.d.ts +12 -1
  164. package/types/src/sheet/IWorksheet.d.ts +35 -0
  165. package/types/src/sheet/SheetCell.d.ts +21 -14
  166. package/types/src/sheet/SheetRange.d.ts +3 -0
  167. package/types/src/sheet/Worksheet.d.ts +175 -7
  168. package/types/src/sheet/_PivotFootprint.d.ts +42 -0
  169. package/types/src/sheet/_SheetAutoFitUtils.d.ts +12 -1
  170. package/types/src/sheet/_SheetMutations.d.ts +47 -0
  171. package/types/src/sheet/_SheetStateTypes.d.ts +11 -0
  172. package/types/src/sheet/style/SheetCellStyle.d.ts +6 -0
  173. package/types/src/sheet/style/SheetPivotStyle.d.ts +83 -0
  174. package/types/src/sheet/style/_IndentUnit.d.ts +14 -0
  175. package/types/src/sheetHeader/SheetCellHeader.d.ts +1 -1
  176. package/types/src/slicer/ISlicer.d.ts +114 -34
  177. package/types/src/slicer/ITimeline.d.ts +61 -0
  178. package/types/src/slicer/Slicer.d.ts +76 -3
  179. package/types/src/slicer/_PivotSlicer.d.ts +51 -0
  180. package/types/src/slicer/index.d.ts +1 -0
  181. package/types/src/table/AnchoredTable.d.ts +11 -1
  182. package/types/src/table/ITable.d.ts +5 -6
  183. package/types/src/table/ITableStyle.d.ts +50 -34
  184. package/types/src/table/_BuiltInPivotStyles.d.ts +8 -0
  185. package/types/src/table/_BuiltInTableStyles.d.ts +0 -1
  186. package/types/src/type/ITypes.d.ts +5 -1
  187. package/types/src/workbook/IWorkbook.d.ts +8 -2
  188. package/types/src/workbook/Workbook.d.ts +72 -6
  189. package/browser/esm/D2NFcBM4xsv0JJ1q.mjs +0 -184
  190. package/browser/esm/DnqwX3-2NfGBaXXl.mjs +0 -357
  191. package/node/esm/C3S4hF1vn0NyJPPd.mjs +0 -199
  192. package/node/esm/CPsGyt3vnOdLTShj.mjs +0 -360
  193. package/node/esm/D4Y1WJgjiFEgbWrW.mjs +0 -115
  194. package/types/src/pivot/_PivotXml.d.ts +0 -24
  195. package/types/src/primitives/Grouping.d.ts +0 -65
@@ -24,5 +24,32 @@ export interface LicenseDetails {
24
24
  getKeyFrom(): string;
25
25
  getBuildVersion(): string;
26
26
  getBuildDate(): string;
27
+ /**
28
+ * When this build's evaluation period ends — from then on, unlicensed, it refuses exports — or
29
+ * `null` for an unstamped build.
30
+ */
31
+ getEvalPeriodEnd(): Date | null;
32
+ /**
33
+ * When this build's grace ends — from then on, unlicensed, it stops calculating and running
34
+ * scripts — or `null` for an unstamped build.
35
+ */
36
+ getEvalStopDate(): Date | null;
37
+ /**
38
+ * The license as one report row — what `info` and `sheetxl info` print. `includeHost` adds where
39
+ * the key came from and its capacity, for a human diagnosing a machine.
40
+ */
41
+ getSummary(includeHost?: boolean): LicenseSummary;
42
+ }
43
+ /**
44
+ * @hidden
45
+ *
46
+ * A license as one report row: how it stands, the edition, what qualifies it, and the exact command
47
+ * that resolves a `warn`.
48
+ */
49
+ export interface LicenseSummary {
50
+ level: 'ok' | 'warn';
51
+ value: string;
52
+ detail?: string;
53
+ fix?: string;
27
54
  }
28
55
  //# sourceMappingURL=LicenseDetails.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { EvalState } from './_Utils';
1
2
  import { LicenseDetails } from './LicenseDetails';
2
3
  declare class LM {
3
4
  constructor();
@@ -26,16 +27,32 @@ declare class LM {
26
27
  */
27
28
  getDetails(): Promise<LicenseDetails>;
28
29
  /**
29
- * Return the current license details, after confirming this runtime may run under them.
30
+ * Return the current license details, after confirming this runtime may use `meter` under them.
31
+ *
32
+ * @param meter What is about to be used: `'calcs'`, `'exports'` (a write in any format but
33
+ * `.sxl`) or `'scripts'`. Omitted, it asks whether this runtime may run at all.
34
+ * @param count How much of it — what a metered license will count against its limit.
30
35
  *
31
36
  * @remarks
32
- * {@link getDetails} only reports. This also enforces: in a browser it always resolves, because
33
- * an unlicensed page runs with the evaluation watermark. Outside a browser an evaluation runs
34
- * for a limited period from the build's date; past it a valid license key is required, and this
35
- * rejects with the reason and what to do. The engine calls it when it starts, so a host that
36
- * wants to fail at startup instead of at the first workbook calls it itself.
37
+ * {@link getDetails} only reports. This also enforces: on a web page it always resolves, because
38
+ * an unlicensed page runs with the evaluation watermark. Anywhere else an unlicensed build runs
39
+ * for an evaluation period from its build date; after it `'exports'` are refused, and after its
40
+ * grace everything metered is. The rejection carries the reason and what to do. Opening a
41
+ * workbook and saving it as `.sxl` are never refused. The engine calls this when it starts, so a
42
+ * host that wants to fail at startup instead of at the first workbook calls it itself.
43
+ */
44
+ assertUsable(meter?: string, count?: number): Promise<LicenseDetails>;
45
+ /**
46
+ * Where this runtime stands under its license: `licensed`, in its `evaluation`, in the `grace`
47
+ * that refuses exports, or `stopped` (no calculation, scripts or exports).
48
+ */
49
+ getEvalState(): Promise<EvalState>;
50
+ /**
51
+ * Whether this runtime runs under the evaluation watermark: an unlicensed web page off localhost.
52
+ * An xlsx exported from it carries the watermark as a sheet added before the workbook's own.
37
53
  */
38
- assertUsable(): Promise<LicenseDetails>;
54
+ isWatermarked(): Promise<boolean>;
55
+ private _enforce;
39
56
  /**
40
57
  * Return the license key in use, or `null` for an evaluation.
41
58
  *
@@ -18,14 +18,45 @@ export declare function getBuildDate(): string;
18
18
  * unlicensed.
19
19
  */
20
20
  export declare const EVAL_PERIOD_DAYS = 70;
21
+ /**
22
+ * How long an unlicensed build keeps running after its evaluation period, in days.
23
+ *
24
+ * @remarks
25
+ * The grace is the second step, not a second period: the build still loads and calculates, but
26
+ * refuses every export (any format but `.sxl`), so the pressure lands on the deliverable without
27
+ * ever altering a user's file. Once it is over, calculation and scripts stop too. Opening and
28
+ * saving `.sxl` is never refused.
29
+ */
30
+ export declare const EVAL_GRACE_DAYS = 30;
21
31
  /** When this build's evaluation period ends, or `null` for an unstamped (workspace, test) build. */
22
32
  export declare function getEvalPeriodEnd(): Date | null;
33
+ /** When this build stops running unlicensed — the end of its grace — or `null` when unstamped. */
34
+ export declare function getEvalStopDate(): Date | null;
23
35
  /** Whether this build's evaluation period is over. An unstamped build never expires. */
24
36
  export declare function isEvalPeriodExpired(): boolean;
37
+ /** Whether this build's grace is over too. An unstamped build never stops. */
38
+ export declare function isEvalStopped(): boolean;
39
+ /**
40
+ * Where a process stands under its license, as enforcement sees it.
41
+ *
42
+ * - `licensed` — a key covers it; nothing below applies.
43
+ * - `evaluation` — unlicensed, inside the evaluation period: runs in full. A page served over
44
+ * http(s) stays here for good — the watermark is its enforcement.
45
+ * - `grace` — past the period: exports (every format but `.sxl`) are refused.
46
+ * - `stopped` — past the grace too: calculation and scripts stop as well. A workbook still opens
47
+ * and still saves as `.sxl`, so no one is locked out of their own work.
48
+ */
49
+ export type EvalState = 'licensed' | 'evaluation' | 'grace' | 'stopped';
50
+ /** The unlicensed state this build is in by its date alone. */
51
+ export declare function getEvalPeriodState(): Exclude<EvalState, 'licensed'>;
52
+ /** The formats that are never refused or metered: SheetXL's own (`.sxl`, and its plain JSON form). */
53
+ export declare function isFreeFormat(formatKey: string): boolean;
54
+ /** What a refusal says: the key's own problems, then the period, then where to go. */
55
+ export declare function evalRefusalMessage(exceptions: readonly string[]): string;
25
56
  /**
26
- * The exception an expired evaluation carries. It names the date and the two ways out, because
27
- * every surface that lists exceptions (the banner, `sheetxl info`, the MCP handshake) shows it
28
- * verbatim and none of them knows more than the text.
57
+ * The exception an expired evaluation carries — in its grace, or stopped. It names the dates and
58
+ * the two ways out, because every surface that lists exceptions (the banner, `sheetxl info`, the
59
+ * MCP handshake) shows it verbatim and none of them knows more than the text.
29
60
  */
30
61
  export declare function evalPeriodExpiredMessage(): string;
31
62
  /**
@@ -1,3 +1,4 @@
1
1
  export * from './LicenseManager';
2
2
  export * from './LicenseDetails';
3
+ export type { EvalState } from './_Utils';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { EvalState } from './_Utils';
1
2
  import { HostDetails, LicenseKeySource } from './Types';
2
3
  import { LicenseDetails } from './LicenseDetails';
3
4
  /**
@@ -7,6 +8,19 @@ import { LicenseDetails } from './LicenseDetails';
7
8
  * host, and are checked like production. Outside a window (a worker, node under test) both are `null`.
8
9
  */
9
10
  export declare function getHostDetails(): Promise<HostDetails>;
11
+ /**
12
+ * Whether this page is on the web — served over http(s) — and so takes the `browser` license:
13
+ * origin-checked keys, and the evaluation watermark as its enforcement.
14
+ *
15
+ * @remarks
16
+ * Any other scheme is a page inside an application rather than a site: the VS Code webview
17
+ * (`vscode-webview:`), Electron (`app:`, `file:`), Tauri. Those take the terms a Node process
18
+ * does — no watermark, the evaluation period, then its grace — so the line is the host, not the
19
+ * product, and nothing has to declare it. Plain `http:` is web too: an intranet site is still a
20
+ * site, and the cheapest bypass there could be is "serve it over http". Outside a window (a worker
21
+ * without a location, node under test) there is no page to classify, and it stays web.
22
+ */
23
+ export declare function isWebPage(): Promise<boolean>;
10
24
  /**
11
25
  * Only the loopback host over http(s) is a dev environment. A dev *build* served on any other host
12
26
  * (a LAN IP, a tunnel) — or under any other scheme — is checked exactly like production: license
@@ -19,17 +33,31 @@ export declare function isDevEnv(): Promise<boolean>;
19
33
  */
20
34
  export declare function readLicenseKey(): Promise<LicenseKeySource>;
21
35
  /**
22
- * A page always runs: an unlicensed one runs with the evaluation watermark, which is the browser's
23
- * enforcement. Never throws.
36
+ * Where this page stands under `details` (see {@link EvalState}).
37
+ *
38
+ * @remarks
39
+ * A web page is never past its evaluation: an unlicensed one runs with the watermark, which is the
40
+ * browser's enforcement. An application page ({@link isWebPage}) is enforced as Node is, with a
41
+ * key that covers it — valid, with nothing it fails — as its license.
42
+ */
43
+ export declare function getEvalState(details: LicenseDetails): Promise<EvalState>;
44
+ /**
45
+ * Whether this page runs under the evaluation watermark — an unlicensed web page off localhost. An
46
+ * export from it carries the watermark too, as a sheet of its own.
24
47
  */
25
- export declare function assertUsable(_details: LicenseDetails): void;
48
+ export declare function isWatermarked(details: LicenseDetails): Promise<boolean>;
26
49
  /**
27
- * An evaluation: unrestricted on localhost, and with the evaluation watermark anywhere else.
50
+ * An evaluation: unrestricted on localhost, and with the evaluation watermark anywhere else on the
51
+ * web.
28
52
  */
29
53
  export declare function getEvalLicense(keyFrom: string): Promise<LicenseDetails>;
30
54
  /**
31
55
  * The license for this page when the host set no key: the key file's, an evaluation when there is
32
56
  * none, or `unavailable` when it could not be loaded.
57
+ *
58
+ * @remarks
59
+ * The key file is a web deployment's convention. An application page that has none, or cannot
60
+ * reach one, is a plain evaluation — its host passes a key to `setLicenseKey` when it has one.
33
61
  */
34
62
  export declare function getLicense(): Promise<LicenseDetails>;
35
63
  export declare function setKey(key: string, force?: boolean): Promise<void>;
@@ -1,3 +1,4 @@
1
+ import { EvalState } from './_Utils';
1
2
  import { HostDetails, LicenseKeySource } from './Types';
2
3
  import { LicenseDetails } from './LicenseDetails';
3
4
  export declare function getHostDetails(): Promise<HostDetails>;
@@ -12,16 +13,18 @@ export declare function getEvalLicense(keyFrom: string): Promise<LicenseDetails>
12
13
  * or an evaluation.
13
14
  */
14
15
  export declare function getLicense(): Promise<LicenseDetails>;
16
+ /** Outside a browser nothing is watermarked: the evaluation period is the enforcement. */
17
+ export declare function isWatermarked(_details: LicenseDetails): Promise<boolean>;
15
18
  /**
16
- * Whether this process may run under `details`; throws with the reason when it may not.
19
+ * Where this process stands under `details` (see {@link EvalState}).
17
20
  *
18
21
  * @remarks
19
22
  * Outside a browser there is no watermark to fall back on, so the evaluation period is the
20
- * enforcement: once it is over, only a current license key that covers a server runs. A key's
21
- * capacity exceptions (an oversize host) are still reported rather than enforced, exactly as before
22
- * the period ended. An unstamped build has no period and always runs.
23
+ * enforcement: once it is over, only a current license key that covers a server is `licensed`. A
24
+ * key's capacity exceptions (an oversize host) are reported rather than enforced. An unstamped
25
+ * build has no period and is never past it.
23
26
  */
24
- export declare function assertUsable(details: LicenseDetails): void;
27
+ export declare function getEvalState(details: LicenseDetails): Promise<EvalState>;
25
28
  export declare function setKey(key: string, force?: boolean): Promise<void>;
26
29
  export declare function getKey(): Promise<string | undefined>;
27
30
  export declare function printBanner(isUser: boolean): Promise<void>;
@@ -0,0 +1,18 @@
1
+ import { LicenseDetails, LicenseSummary } from './LicenseDetails';
2
+ /**
3
+ * The license as one report row, agent-first: the edition, plus anything ACTIONABLE — an
4
+ * exception, an expiry inside 30 days, or an evaluation's dates. Entitlement capacity (cores/GB)
5
+ * and where the key came from are host diagnostics, not operational facts, so they ride only under
6
+ * `includeHost` — an agent cannot act on `32 cores`, but a human debugging "why is this machine
7
+ * licensed differently" can act on `envVar` vs `configStore`.
8
+ *
9
+ * @remarks
10
+ * Here rather than in the report that prints it (`info`, `sheetxl info`): what a license means is
11
+ * the license's business, and the report only lays the row out.
12
+ *
13
+ * Exceptions surface as a warning rather than an error — an evaluation or unlicensed engine still
14
+ * opens and saves, and failing a handshake over it would strand an agent that could have done the
15
+ * work.
16
+ */
17
+ export declare function summarizeLicense(details: LicenseDetails, includeHost?: boolean): LicenseSummary;
18
+ //# sourceMappingURL=summary.d.ts.map