@sheetxl/scripting 0.7.22 → 0.7.23-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +208 -229
  2. package/browser/cjs/1_xhnTjP6m5oj6za.cjs +21 -0
  3. package/browser/cjs/BsZkw6_kfPB5b80k.cjs +1 -0
  4. package/browser/cjs/Bu4cZ8iSZ3rij-oV.cjs +1 -0
  5. package/browser/cjs/BvG8N7G_8CXIAlT-.cjs +1 -0
  6. package/browser/cjs/C_7w8EJZpHw8ueuq.cjs +1 -0
  7. package/browser/cjs/C_IEgjM-hSJCv6Gm.cjs +1 -0
  8. package/browser/cjs/CctaCN_w3o34V9AR.cjs +1 -0
  9. package/browser/cjs/D9Oz5YU4OTd5nNFg.cjs +1 -0
  10. package/browser/cjs/DSEShe7kGtxvljOr.cjs +1 -0
  11. package/browser/cjs/index.cjs +1 -6
  12. package/browser/cjs/qWYyYsBboXc9p0Lw.cjs +7 -0
  13. package/browser/esm/B609eaWQPO1XuznE.mjs +421 -0
  14. package/browser/esm/BbWhc8uJ8fNhVS5l.mjs +105 -0
  15. package/browser/esm/BvBLYHivUCrzyetH.mjs +87 -0
  16. package/browser/esm/CB6ULc6IX1XDHZi_.mjs +152 -0
  17. package/browser/esm/C_dDiKP0qhT8BhBm.mjs +27 -0
  18. package/browser/esm/CibjE6zDpZbn9Tch.mjs +12 -0
  19. package/browser/esm/DRa-YITYJZzB6CN0.mjs +8 -0
  20. package/browser/esm/DYVVBj4MfOVWrWWg.mjs +25 -0
  21. package/browser/esm/ESZQAKxwcZjX497y.mjs +15 -0
  22. package/browser/esm/UxKnYr9eSfIMndHc.mjs +23 -0
  23. package/browser/esm/index.mjs +40 -20
  24. package/node/esm/07eMkALj6l3ic2-e.mjs +23 -0
  25. package/node/esm/BpJRg8aS8svFd1fz.mjs +14 -0
  26. package/node/esm/DRa-YITYJZzB6CN0.mjs +8 -0
  27. package/node/esm/DX7jQUpPgudcUIMl.mjs +17 -0
  28. package/node/esm/H2OlmRdD_MaeXWfw.mjs +152 -0
  29. package/node/esm/LMRQvZ1FTfeeBOAm.mjs +27 -0
  30. package/node/esm/MHtkzgv6-lmftCf4.mjs +12 -0
  31. package/node/esm/index.mjs +144 -20
  32. package/node/esm/t_oN97enVU1dxwlA.mjs +421 -0
  33. package/package.json +11 -8
  34. package/types/index.d.ts +2 -165
  35. package/types/src/ScriptCompiler.d.ts +40 -0
  36. package/types/src/ScriptCompiler.d.ts.map +1 -0
  37. package/types/src/compiler/Bundler.d.ts +7 -0
  38. package/types/src/compiler/Bundler.d.ts.map +1 -0
  39. package/types/src/compiler/TypescriptCompiler.d.ts +27 -0
  40. package/types/src/compiler/TypescriptCompiler.d.ts.map +1 -0
  41. package/types/src/compiler/TypescriptCompiler.impl.d.ts +17 -0
  42. package/types/src/compiler/TypescriptCompiler.impl.d.ts.map +1 -0
  43. package/types/src/compiler/TypescriptCompiler.worker.d.ts +2 -0
  44. package/types/src/compiler/TypescriptCompiler.worker.d.ts.map +1 -0
  45. package/types/src/compiler/compiler.browser.d.ts +8 -0
  46. package/types/src/compiler/compiler.browser.d.ts.map +1 -0
  47. package/types/src/compiler/compiler.node.d.ts +14 -0
  48. package/types/src/compiler/compiler.node.d.ts.map +1 -0
  49. package/types/src/compiler/constants.d.ts +10 -0
  50. package/types/src/compiler/constants.d.ts.map +1 -0
  51. package/types/src/compiler/insertYieldBetweenStatements.d.ts +5 -0
  52. package/types/src/compiler/insertYieldBetweenStatements.d.ts.map +1 -0
  53. package/types/src/compiler/transformAwaitToYield.d.ts +6 -0
  54. package/types/src/compiler/transformAwaitToYield.d.ts.map +1 -0
  55. package/types/src/index.d.ts +7 -0
  56. package/types/src/index.d.ts.map +1 -0
  57. package/types/src/lib/esbuild/esbuild.browser.d.ts +4 -0
  58. package/types/src/lib/esbuild/esbuild.browser.d.ts.map +1 -0
  59. package/types/src/lib/esbuild/esbuild.node.d.ts +11 -0
  60. package/types/src/lib/esbuild/esbuild.node.d.ts.map +1 -0
  61. package/types/src/lib/typescript/typescript.browser.d.ts +4 -0
  62. package/types/src/lib/typescript/typescript.browser.d.ts.map +1 -0
  63. package/types/src/lib/typescript/typescript.node.d.ts +4 -0
  64. package/types/src/lib/typescript/typescript.node.d.ts.map +1 -0
  65. package/types/src/linter/Linter.d.ts +63 -0
  66. package/types/src/linter/Linter.d.ts.map +1 -0
  67. package/types/src/linter/index.d.ts +2 -0
  68. package/types/src/linter/index.d.ts.map +1 -0
  69. package/types/src/loader/index.d.ts +2 -0
  70. package/types/src/loader/index.d.ts.map +1 -0
  71. package/types/src/loader/loadCompiledModule.d.ts +19 -0
  72. package/types/src/loader/loadCompiledModule.d.ts.map +1 -0
  73. package/types/src/loader/moduleLoader.browser.d.ts +11 -0
  74. package/types/src/loader/moduleLoader.browser.d.ts.map +1 -0
  75. package/types/src/loader/moduleLoader.node.d.ts +15 -0
  76. package/types/src/loader/moduleLoader.node.d.ts.map +1 -0
  77. package/types/src/plugin/generate.d.ts +17 -0
  78. package/types/src/plugin/generate.d.ts.map +1 -0
  79. package/types/src/plugin/vite.d.ts +24 -0
  80. package/types/src/plugin/vite.d.ts.map +1 -0
  81. package/types/src/runtime/Constants.d.ts +9 -0
  82. package/types/src/runtime/Constants.d.ts.map +1 -0
  83. package/types/src/runtime/index.d.ts +2 -0
  84. package/types/src/runtime/index.d.ts.map +1 -0
  85. package/types/src/tags/DocTags.d.ts +46 -0
  86. package/types/src/tags/DocTags.d.ts.map +1 -0
  87. package/types/src/tags/index.d.ts +2 -0
  88. package/types/src/tags/index.d.ts.map +1 -0
  89. package/types/src/type/CompileOptions.d.ts +58 -0
  90. package/types/src/type/CompileOptions.d.ts.map +1 -0
  91. package/types/src/type/CompiledModule.d.ts +70 -0
  92. package/types/src/type/CompiledModule.d.ts.map +1 -0
  93. package/types/src/type/Diagnostic.d.ts +120 -0
  94. package/types/src/type/Diagnostic.d.ts.map +1 -0
  95. package/types/src/type/Types.d.ts +72 -0
  96. package/types/src/type/Types.d.ts.map +1 -0
  97. package/types/src/type/index.d.ts +6 -0
  98. package/types/src/type/index.d.ts.map +1 -0
  99. package/types/src/worker/WorkerWrapper.d.ts +44 -0
  100. package/types/src/worker/WorkerWrapper.d.ts.map +1 -0
  101. package/types/src/worker/index.d.ts +2 -0
  102. package/types/src/worker/index.d.ts.map +1 -0
  103. package/browser/cjs/BSbIAsHhYU7A5end.cjs +0 -6
  104. package/browser/cjs/CBX--k0ZF7N3ca9G.cjs +0 -6
  105. package/browser/cjs/CK5E20Dn71XrTL6f.cjs +0 -1513
  106. package/browser/cjs/CqvlpYJcTXwLSCeF.cjs +0 -6
  107. package/browser/cjs/X_4PpRMAyEugNQVF.cjs +0 -32
  108. package/browser/esm/BLVMvYOWPFJLAiVU.mjs +0 -1588
  109. package/browser/esm/BrgkkarCKAJwXqVq.mjs +0 -24
  110. package/browser/esm/CESLtyXDfsydQVVg.mjs +0 -29
  111. package/browser/esm/D3or5W11kF3AtQDv.mjs +0 -266
  112. package/browser/esm/abRLINET0a_kxRah.mjs +0 -21
  113. package/node/esm/-NP1i_GBpal8QBm3.mjs +0 -1588
  114. package/node/esm/CkU2dBuZtTuNqHcn.mjs +0 -266
  115. package/node/esm/D3lnhtV6t_HipNni.mjs +0 -16
  116. package/node/esm/DI8Xz2qZF4qNjBVV.mjs +0 -29
  117. package/node/esm/DlKzpSFnzfag8ZYJ.mjs +0 -14
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Severity of a {@link Diagnostic}.
3
+ *
4
+ * - `error` blocks compilation (the script will not run).
5
+ * - `warning` allows compilation but nudges authoring quality (missing docs, etc.).
6
+ */
7
+ export type DiagnosticSeverity = 'error' | 'warning';
8
+ /**
9
+ * A positioned diagnostic produced by the SheetXL script linter.
10
+ *
11
+ * @remarks
12
+ * These are environment-agnostic (TypeScript compiler API only) so the same shape can be adapted to
13
+ * Monaco markers, a CLI reporter, or a VSCode language-service plugin. Positions are character
14
+ * offsets into the original source so adapters can map them to the surface they care about.
15
+ */
16
+ export interface Diagnostic {
17
+ /**
18
+ * Zero-based character offset of the start of the offending node (`node.getStart()`).
19
+ */
20
+ start: number;
21
+ /**
22
+ * Width of the offending node in characters (`node.getWidth()`).
23
+ */
24
+ length: number;
25
+ /**
26
+ * Severity of the diagnostic.
27
+ */
28
+ severity: DiagnosticSeverity;
29
+ /**
30
+ * A stable diagnostic code, e.g. `'SXL2001'`.
31
+ *
32
+ * @remarks
33
+ * Codes are stable across releases so adapters, docs, and agents can key off them. The leading
34
+ * `SXL` distinguishes our semantic rules from TypeScript's own `TS####` diagnostics. See
35
+ * {@link DiagnosticCode}.
36
+ */
37
+ code: string;
38
+ /**
39
+ * A human-readable, didactic message.
40
+ *
41
+ * @remarks
42
+ * Messages are written to be machine-friendly: for type errors they spell out the *allowed set*.
43
+ * Agents iterate against this text, so message quality directly reduces iteration count.
44
+ */
45
+ message: string;
46
+ }
47
+ /**
48
+ * The catalog of stable diagnostic codes emitted by the linter.
49
+ *
50
+ * @remarks
51
+ * `SXL1###` structural, `SXL2###` type rules, `SXL3###` module rules, `SXL9###` quality warnings.
52
+ * Codes are append-only — never reuse a retired number.
53
+ */
54
+ export declare const DiagnosticCode: Readonly<{
55
+ /** Exported function has no body. */
56
+ readonly NoBody: "SXL1001";
57
+ /** Anonymous exported function is not allowed. */
58
+ readonly Anonymous: "SXL1002";
59
+ /** Internal parse failure while analyzing the module. */
60
+ readonly ParseError: "SXL1003";
61
+ /** Invalid parameter type. */
62
+ readonly InvalidParamType: "SXL2001";
63
+ /** Invalid return type. */
64
+ readonly InvalidReturnType: "SXL2002";
65
+ /** `undefined` / `null` / `void` is not valid as an input type. */
66
+ readonly UndefinedInput: "SXL2003";
67
+ /** A type annotation is required but missing. */
68
+ readonly MissingType: "SXL2004";
69
+ /** An `Array` must be typed (e.g. `number[]`, not bare `[]`). */
70
+ readonly UntypedArray: "SXL2005";
71
+ /** A generic type must be supplied exactly one type argument. */
72
+ readonly GenericArity: "SXL2006";
73
+ /** A return type cannot combine multiple modifiers (e.g. async + stream). */
74
+ readonly MultipleModifiers: "SXL2007";
75
+ /** A context parameter must be the first parameter. */
76
+ readonly ContextNotFirst: "SXL2010";
77
+ /** More than one `Lambda` parameter. */
78
+ readonly MultipleLambda: "SXL2020";
79
+ /** A `Lambda` parameter must be the last parameter. */
80
+ readonly LambdaNotLast: "SXL2021";
81
+ /** A `Lambda` parameter/return scalar type mismatch. */
82
+ readonly LambdaScalarMismatch: "SXL2022";
83
+ /** `Lambda` is not valid as a return type. */
84
+ readonly LambdaReturn: "SXL2023";
85
+ /** A bare function type is not valid as a return type. */
86
+ readonly FunctionReturn: "SXL2024";
87
+ /** A `Lambda` function type has the wrong number of parameters. */
88
+ readonly LambdaArity: "SXL2025";
89
+ /** Arrays of more than 2 dimensions are not supported. */
90
+ readonly ArrayDepth: "SXL2030";
91
+ /** `Repeating<T>` used somewhere it cannot be (a return type, a rest parameter, nested in an array). */
92
+ readonly RepeatingPosition: "SXL2040";
93
+ /** More than one `Repeating<T>` parameter. */
94
+ readonly MultipleRepeating: "SXL2041";
95
+ /** A `Repeating<T>` group's slots are malformed (unlabelled tuple member, or a 1-element tuple). */
96
+ readonly RepeatingSlots: "SXL2042";
97
+ /** An optional parameter/slot where a repeating group does not allow one. */
98
+ readonly RepeatingOptional: "SXL2043";
99
+ /** No exported functions found in the module. */
100
+ readonly NoExports: "SXL3001";
101
+ /** A `@param` tag references a parameter that does not exist. */
102
+ readonly UnknownParam: "SXL3002";
103
+ /** A calculation function takes a built-in function's name. */
104
+ readonly BuiltInName: "SXL3003";
105
+ /** Missing `@summary` / function description. */
106
+ readonly MissingSummary: "SXL9001";
107
+ /** A `@param` is missing a description. */
108
+ readonly MissingParamDescription: "SXL9002";
109
+ /**
110
+ * Missing `@returns` on a non-void function.
111
+ * @deprecated Retained for code stability but no longer emitted - Excel-style tooltips describe
112
+ * behavior via the summary, so a standalone `@returns` warning is noise.
113
+ */
114
+ readonly MissingReturns: "SXL9003";
115
+ }>;
116
+ /**
117
+ * Union of the stable diagnostic code string values.
118
+ */
119
+ export type DiagnosticCode = (typeof DiagnosticCode)[keyof typeof DiagnosticCode];
120
+ //# sourceMappingURL=Diagnostic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Diagnostic.d.ts","sourceRoot":"","sources":["../../../../src/type/Diagnostic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,kBAAkB,CAAC;IAC7B;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;IAEzB,qCAAqC;;IAErC,kDAAkD;;IAElD,yDAAyD;;IAIzD,8BAA8B;;IAE9B,2BAA2B;;IAE3B,mEAAmE;;IAEnE,iDAAiD;;IAEjD,iEAAiE;;IAEjE,iEAAiE;;IAEjE,6EAA6E;;IAE7E,uDAAuD;;IAEvD,wCAAwC;;IAExC,uDAAuD;;IAEvD,wDAAwD;;IAExD,8CAA8C;;IAE9C,0DAA0D;;IAE1D,mEAAmE;;IAEnE,0DAA0D;;IAE1D,wGAAwG;;IAExG,8CAA8C;;IAE9C,oGAAoG;;IAEpG,6EAA6E;;IAI7E,iDAAiD;;IAEjD,iEAAiE;;IAEjE,+DAA+D;;IAI/D,iDAAiD;;IAEjD,2CAA2C;;IAE3C;;;;OAIG;;EAEM,CAAC;AAEZ;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { IFunction, ScalarType, Scalar, IFormulaContext } from '@sheetxl/primitives';
2
+ /**
3
+ * Type for bind signature for typed functions.
4
+ */
5
+ export interface FunctionBinder {
6
+ (mapBind: Map<string, IFunction>, getContext: () => IFormulaContext, implementations: Implementations, declarations: MinifiedDeclarations, getDynamicDescriptors?: DynamicDescriptors, defaultCategory?: string): void;
7
+ }
8
+ /**
9
+ * The default export of a compiled formula module (produced by the FormulaCompiler): given the
10
+ * runtime `getContext` and a {@link FunctionBinder}, it binds its functions into `mapBind` (creating
11
+ * one if omitted) and returns it. This is the unit of formula registration - a consumer passes their
12
+ * compiled module's default export to register custom functions.
13
+ */
14
+ export interface FunctionProvider {
15
+ (getContext: () => IFormulaContext, bindFn: FunctionBinder, mapBind?: Map<string, IFunction>): Map<string, IFunction>;
16
+ }
17
+ /**
18
+ * Minified value.
19
+ */
20
+ export interface MinifiedValue {
21
+ s?: string;
22
+ r?: 'p' | 'r' | 'm' | '*';
23
+ l?: ScalarType | '*' | 'raw';
24
+ a?: number;
25
+ d?: number;
26
+ }
27
+ /**
28
+ * Minified params.
29
+ */
30
+ export interface MinifiedParameter extends MinifiedValue {
31
+ n: string;
32
+ m?: '?' | '...';
33
+ e?: string[];
34
+ o?: 'accept' | 'accept-ref';
35
+ g?: MinifiedParameter[];
36
+ v?: Scalar;
37
+ u?: 1;
38
+ w?: Scalar;
39
+ }
40
+ /**
41
+ * The function declaration needed to autoMarshall and execute.
42
+ */
43
+ export interface MinifiedDeclaration {
44
+ fn?: string;
45
+ c?: boolean;
46
+ p?: MinifiedParameter[];
47
+ r?: MinifiedValue;
48
+ }
49
+ /**
50
+ * The descriptor used for a function
51
+ */
52
+ export interface MinifiedDescriptor {
53
+ s?: string;
54
+ c?: string;
55
+ p?: Record<string, any>;
56
+ h?: string | boolean;
57
+ l?: [url: string, text?: string][];
58
+ }
59
+ export type MinifiedDeclarations = {
60
+ [name: string]: MinifiedDeclaration;
61
+ };
62
+ export interface Implementations {
63
+ [functionName: string]: (...args: any) => any;
64
+ }
65
+ export interface MinifiedDescriptors {
66
+ [name: string]: MinifiedDescriptor;
67
+ }
68
+ export interface DescriptorModule {
69
+ default: MinifiedDescriptors;
70
+ }
71
+ export type DynamicDescriptors = () => Promise<DescriptorModule>;
72
+ //# sourceMappingURL=Types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../../../src/type/Types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEzG;;GAEG;AACH,MAAM,WAAW,cAAc;IAC5B,CACC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAC/B,UAAU,EAAE,MAAM,eAAe,EACjC,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,oBAAoB,EAClC,qBAAqB,CAAC,EAAE,kBAAkB,EAC1C,eAAe,CAAC,EAAE,MAAM,GACvB,IAAI,CAAC;CACT;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,CACE,UAAU,EAAE,MAAM,eAAe,EACjC,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GAC/B,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,CAAC,CAAC,EAAE,MAAM,CAAC;IAKX,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAI1B,CAAC,CAAC,EAAE,UAAU,GAAG,GAAG,GAAG,KAAK,CAAC;IAK7B,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,GAAG,GAAG,KAAK,CAAA;IACf,CAAC,CAAC,EAAE,MAAM,EAAE,CAAA;IAGZ,CAAC,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAC;IAG5B,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAKxB,CAAC,CAAC,EAAE,MAAM,CAAC;IAIX,CAAC,CAAC,EAAE,CAAC,CAAC;IAGN,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACxB,CAAC,CAAC,EAAE,aAAa,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAExB,CAAC,CAAC,EAAE,MAAM,GAAC,OAAO,CAAC;IACnB,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC;CACpC;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAAC;CACrC,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,YAAY,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;CAC/C;AAED,MAAM,WAAW,mBAAmB;IAClC,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAAC;CACpC;AAGD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAGD,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export type * from './Types';
2
+ export type * from './CompileOptions';
3
+ export type * from './CompiledModule';
4
+ export type { Diagnostic, DiagnosticSeverity } from './Diagnostic';
5
+ export { DiagnosticCode } from './Diagnostic';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/type/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAE7B,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,kBAAkB,CAAC;AACtC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,44 @@
1
+ export interface IWorkerWrapper<TResult = any, TParams = any> {
2
+ start(): Promise<void>;
3
+ execute(params: TParams): Promise<TResult>;
4
+ terminate(): void;
5
+ }
6
+ /**
7
+ * Generic worker wrapper for use in libraries
8
+ * Takes a worker factory function to create the worker instance.
9
+ */
10
+ export declare class WorkerWrapper<TResult = any, TParams = any> implements IWorkerWrapper<TResult, TParams> {
11
+ private _worker;
12
+ private _workerFactory;
13
+ private _nextId;
14
+ private _pendingRequests;
15
+ /**
16
+ * Creates a new worker
17
+ *
18
+ * @param workerFactory - Factory function to create the worker instance.
19
+ */
20
+ constructor(workerFactory: () => Worker);
21
+ /**
22
+ * Initializes the worker if it hasn't been created yet
23
+ * Will throw an error if the environment does not support Web Workers.
24
+ */
25
+ start(): Promise<void>;
26
+ /**
27
+ * Executes a task in the worker
28
+ * @param params - Parameters to pass to the worker
29
+ * @returns Promise that resolves with the worker result
30
+ */
31
+ execute(params: TParams): Promise<TResult>;
32
+ /**
33
+ * Terminates the worker
34
+ */
35
+ terminate(): void;
36
+ }
37
+ export declare class SyncWrapper<TResult = any, TParams = any> implements IWorkerWrapper<TResult, TParams> {
38
+ private _onExecute;
39
+ constructor(onExecute: (params: TParams) => Promise<TResult>);
40
+ execute(params: TParams): Promise<TResult>;
41
+ start(): Promise<void>;
42
+ terminate(): void;
43
+ }
44
+ //# sourceMappingURL=WorkerWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkerWrapper.d.ts","sourceRoot":"","sources":["../../../../src/worker/WorkerWrapper.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,cAAc,CAAC,OAAO,GAAC,GAAG,EAAE,OAAO,GAAG,GAAG;IACxD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,SAAS,IAAI,IAAI,CAAC;CACnB;AAED;;;GAGG;AACH,qBAAa,aAAa,CAAC,OAAO,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,CAAE,YAAW,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC;IAClG,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,cAAc,CAAe;IAErC,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,gBAAgB,CAA6C;IAErE;;;;OAIG;gBACS,aAAa,EAAE,MAAM,MAAM;IAIvC;;;OAGG;IACI,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAuC7B;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAiB1C;;OAEG;IACH,SAAS,IAAI,IAAI;CAMlB;AAQD,qBAAa,WAAW,CAAC,OAAO,GAAC,GAAG,EAAE,OAAO,GAAG,GAAG,CAAE,YAAW,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC;IAC9F,OAAO,CAAC,UAAU,CAAwC;gBAExD,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC;IAKlD,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAInC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,SAAS,IAAI,IAAI;CAGlB"}
@@ -0,0 +1,2 @@
1
+ export * from './WorkerWrapper';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/worker/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.7.22
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=null;exports.initialize=async function(){return e||(e=new Promise(async(i,l)=>{let t=null;try{t=await import("https://esm.sh/typescript@5.7.2")}catch(r){console.error("Error initializing Browser TypeScript module:",r)}t||console.log("use script fallback"),i(t)}),e)};
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/scripting - Scripting - Scripting engine for Macros and formulas; includes TypeScript and EsBuild. - v0.7.22
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=null;exports.initialize=async function(){return e||(e=new Promise(async(s,r)=>{try{const i="0.20.2",a=`https://esm.sh/esbuild-wasm@${i}`,l=`https://esm.sh/esbuild-wasm@${i}/esbuild.wasm`,t=(await import(a)).default;await t.initialize({wasmURL:l,worker:!1}),s(t)}catch(i){console.error("Error initializing esbuild:",i),r(i)}}),e)};