@dxos/compute 0.8.4-main.f9ba587 → 0.8.4-main.fcc0d83b33

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 (81) hide show
  1. package/README.md +36 -1
  2. package/dist/lib/neutral/index.mjs +5 -0
  3. package/dist/lib/neutral/index.mjs.map +7 -0
  4. package/dist/lib/neutral/meta.json +1 -0
  5. package/dist/types/src/index.d.ts +3 -5
  6. package/dist/types/src/index.d.ts.map +1 -1
  7. package/dist/types/src/umbrella.test.d.ts +2 -0
  8. package/dist/types/src/umbrella.test.d.ts.map +1 -0
  9. package/dist/types/tsconfig.tsbuildinfo +1 -1
  10. package/package.json +14 -48
  11. package/src/index.ts +8 -33
  12. package/src/umbrella.test.ts +47 -0
  13. package/dist/lib/browser/chunk-2PBHA7EI.mjs +0 -3078
  14. package/dist/lib/browser/chunk-2PBHA7EI.mjs.map +0 -7
  15. package/dist/lib/browser/index.mjs +0 -55
  16. package/dist/lib/browser/index.mjs.map +0 -7
  17. package/dist/lib/browser/meta.json +0 -1
  18. package/dist/lib/browser/testing/index.mjs +0 -173
  19. package/dist/lib/browser/testing/index.mjs.map +0 -7
  20. package/dist/lib/node-esm/chunk-GTPQNWA3.mjs +0 -3080
  21. package/dist/lib/node-esm/chunk-GTPQNWA3.mjs.map +0 -7
  22. package/dist/lib/node-esm/index.mjs +0 -56
  23. package/dist/lib/node-esm/index.mjs.map +0 -7
  24. package/dist/lib/node-esm/meta.json +0 -1
  25. package/dist/lib/node-esm/testing/index.mjs +0 -174
  26. package/dist/lib/node-esm/testing/index.mjs.map +0 -7
  27. package/dist/types/src/compute-graph-registry.d.ts +0 -34
  28. package/dist/types/src/compute-graph-registry.d.ts.map +0 -1
  29. package/dist/types/src/compute-graph.d.ts +0 -64
  30. package/dist/types/src/compute-graph.d.ts.map +0 -1
  31. package/dist/types/src/compute-graph.test.d.ts +0 -2
  32. package/dist/types/src/compute-graph.test.d.ts.map +0 -1
  33. package/dist/types/src/compute-node.d.ts +0 -25
  34. package/dist/types/src/compute-node.d.ts.map +0 -1
  35. package/dist/types/src/functions/async-function.d.ts +0 -66
  36. package/dist/types/src/functions/async-function.d.ts.map +0 -1
  37. package/dist/types/src/functions/edge-function.d.ts +0 -20
  38. package/dist/types/src/functions/edge-function.d.ts.map +0 -1
  39. package/dist/types/src/functions/function-defs.d.ts +0 -11
  40. package/dist/types/src/functions/function-defs.d.ts.map +0 -1
  41. package/dist/types/src/functions/index.d.ts +0 -4
  42. package/dist/types/src/functions/index.d.ts.map +0 -1
  43. package/dist/types/src/hyperformula.test.d.ts +0 -2
  44. package/dist/types/src/hyperformula.test.d.ts.map +0 -1
  45. package/dist/types/src/testing/index.d.ts +0 -4
  46. package/dist/types/src/testing/index.d.ts.map +0 -1
  47. package/dist/types/src/testing/test-builder.d.ts +0 -15
  48. package/dist/types/src/testing/test-builder.d.ts.map +0 -1
  49. package/dist/types/src/testing/test-plugin.d.ts +0 -36
  50. package/dist/types/src/testing/test-plugin.d.ts.map +0 -1
  51. package/dist/types/src/testing/util.d.ts +0 -2
  52. package/dist/types/src/testing/util.d.ts.map +0 -1
  53. package/dist/types/src/types/hyperformula.d.ts +0 -11
  54. package/dist/types/src/types/hyperformula.d.ts.map +0 -1
  55. package/dist/types/src/types/index.d.ts +0 -3
  56. package/dist/types/src/types/index.d.ts.map +0 -1
  57. package/dist/types/src/types/types.d.ts +0 -20
  58. package/dist/types/src/types/types.d.ts.map +0 -1
  59. package/dist/types/src/types/types.test.d.ts +0 -2
  60. package/dist/types/src/types/types.test.d.ts.map +0 -1
  61. package/dist/types/src/util.d.ts +0 -2
  62. package/dist/types/src/util.d.ts.map +0 -1
  63. package/dist/vendor/hyperformula.mjs +0 -36400
  64. package/src/compute-graph-registry.ts +0 -90
  65. package/src/compute-graph.test.ts +0 -88
  66. package/src/compute-graph.ts +0 -259
  67. package/src/compute-node.ts +0 -61
  68. package/src/functions/async-function.ts +0 -179
  69. package/src/functions/edge-function.ts +0 -111
  70. package/src/functions/function-defs.ts +0 -2427
  71. package/src/functions/index.ts +0 -7
  72. package/src/hyperformula.test.ts +0 -14
  73. package/src/testing/index.ts +0 -7
  74. package/src/testing/test-builder.ts +0 -54
  75. package/src/testing/test-plugin.ts +0 -100
  76. package/src/testing/util.ts +0 -9
  77. package/src/types/hyperformula.ts +0 -19
  78. package/src/types/index.ts +0 -6
  79. package/src/types/types.test.ts +0 -91
  80. package/src/types/types.ts +0 -80
  81. package/src/util.ts +0 -8
@@ -1,174 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- AsyncFunctionPlugin,
4
- ComputeGraphRegistry
5
- } from "../chunk-GTPQNWA3.mjs";
6
-
7
- // src/testing/test-builder.ts
8
- import { Client } from "@dxos/client";
9
- import { Resource } from "@dxos/context";
10
- import { invariant } from "@dxos/invariant";
11
- var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/src/testing/test-builder.ts";
12
- var TestBuilder = class extends Resource {
13
- constructor(_options = {}) {
14
- super(), this._options = _options;
15
- }
16
- get ctx() {
17
- return this._ctx;
18
- }
19
- get client() {
20
- invariant(this._client, void 0, {
21
- F: __dxlog_file,
22
- L: 27,
23
- S: this,
24
- A: [
25
- "this._client",
26
- ""
27
- ]
28
- });
29
- return this._client;
30
- }
31
- get registry() {
32
- invariant(this._registry, void 0, {
33
- F: __dxlog_file,
34
- L: 32,
35
- S: this,
36
- A: [
37
- "this._registry",
38
- ""
39
- ]
40
- });
41
- return this._registry;
42
- }
43
- async _open() {
44
- const client = new Client(this._options);
45
- await client.initialize();
46
- await client.halo.createIdentity();
47
- this._client = client;
48
- this._ctx.onDispose(async () => {
49
- await client.destroy();
50
- this._client = void 0;
51
- });
52
- const registry = new ComputeGraphRegistry(this._options);
53
- await registry.open();
54
- this._registry = registry;
55
- this._ctx.onDispose(async () => {
56
- await registry.close();
57
- this._registry = void 0;
58
- });
59
- }
60
- };
61
-
62
- // src/testing/test-plugin.ts
63
- import { getDeep } from "@dxos/util";
64
- import { FunctionArgumentType } from "#hyperformula";
65
-
66
- // src/util.ts
67
- var parseNumberString = (str) => {
68
- return parseFloat(str.replace(/[^\d.]/g, ""));
69
- };
70
-
71
- // src/testing/test-plugin.ts
72
- var TestPlugin = class extends AsyncFunctionPlugin {
73
- /**
74
- * Simple local function returns input value.
75
- */
76
- test(ast, state) {
77
- const handler = async (_value) => {
78
- return _value;
79
- };
80
- return this.runAsyncFunction(ast, state, handler);
81
- }
82
- /**
83
- * Simple local function returns random number.
84
- */
85
- random(ast, state) {
86
- const handler = async () => {
87
- return Math.random();
88
- };
89
- return this.runAsyncFunction(ast, state, handler);
90
- }
91
- /**
92
- * Async HTTP function.
93
- */
94
- crypto(ast, state) {
95
- const handler = async (_currency) => {
96
- const currency = (_currency || "USD").toUpperCase();
97
- const result = await fetch(`https://api.coindesk.com/v1/bpi/currentprice/${currency}.json`);
98
- const data = await result.json();
99
- const rate = getDeep(data, [
100
- "bpi",
101
- currency,
102
- "rate"
103
- ]);
104
- if (!rate) {
105
- return NaN;
106
- }
107
- return parseNumberString(rate);
108
- };
109
- return this.runAsyncFunction(ast, state, handler, {
110
- ttl: 1e4
111
- });
112
- }
113
- };
114
- TestPlugin.implementedFunctions = {
115
- TEST: {
116
- method: "test",
117
- parameters: [
118
- {
119
- argumentType: FunctionArgumentType.NUMBER,
120
- optionalArg: false
121
- }
122
- ],
123
- isVolatile: true
124
- },
125
- RANDOM: {
126
- method: "random",
127
- parameters: [],
128
- isVolatile: true
129
- },
130
- CRYPTO: {
131
- method: "crypto",
132
- parameters: [
133
- {
134
- argumentType: FunctionArgumentType.STRING,
135
- optionalArg: true
136
- }
137
- ],
138
- isVolatile: true
139
- }
140
- };
141
- var TestPluginTranslations = {
142
- enGB: {
143
- TEST: "Returns input value",
144
- RANDOM: "Random number",
145
- CRYPTO: "Crypto token value"
146
- },
147
- enUS: {
148
- TEST: "Returns input value",
149
- RANDOM: "Random number",
150
- CRYPTO: "Crypto token value"
151
- }
152
- };
153
- var testFunctionPlugins = [
154
- {
155
- plugin: TestPlugin,
156
- translations: TestPluginTranslations
157
- }
158
- ];
159
-
160
- // src/testing/util.ts
161
- import { HyperFormula } from "hyperformula";
162
- var getRegisteredFunctionNames = () => {
163
- return HyperFormula.buildEmpty({
164
- licenseKey: "gpl-v3"
165
- }).getRegisteredFunctionNames();
166
- };
167
- export {
168
- TestBuilder,
169
- TestPlugin,
170
- TestPluginTranslations,
171
- getRegisteredFunctionNames,
172
- testFunctionPlugins
173
- };
174
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/testing/test-builder.ts", "../../../../src/testing/test-plugin.ts", "../../../../src/util.ts", "../../../../src/testing/util.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Client, type ClientOptions } from '@dxos/client';\nimport { type Context, Resource } from '@dxos/context';\nimport { invariant } from '@dxos/invariant';\n\nimport { type ComputeGraphOptions, ComputeGraphRegistry } from '../compute-graph-registry';\n\nexport type TestBuilderOptions = ClientOptions & ComputeGraphOptions;\n\n// TODO(burdon): Reconcile with @dxos/client/testing.\nexport class TestBuilder extends Resource {\n private _client?: Client;\n private _registry?: ComputeGraphRegistry;\n\n constructor(private readonly _options: TestBuilderOptions = {}) {\n super();\n }\n\n get ctx(): Context {\n return this._ctx;\n }\n\n get client(): Client {\n invariant(this._client);\n return this._client;\n }\n\n get registry(): ComputeGraphRegistry {\n invariant(this._registry);\n return this._registry;\n }\n\n override async _open(): Promise<void> {\n const client = new Client(this._options);\n await client.initialize();\n await client.halo.createIdentity();\n this._client = client;\n this._ctx.onDispose(async () => {\n await client.destroy();\n this._client = undefined;\n });\n\n const registry = new ComputeGraphRegistry(this._options);\n await registry.open();\n this._registry = registry;\n this._ctx.onDispose(async () => {\n await registry.close();\n this._registry = undefined;\n });\n }\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type InterpreterState } from 'hyperformula/typings/interpreter/InterpreterState';\nimport { type ProcedureAst } from 'hyperformula/typings/parser';\n\nimport { getDeep } from '@dxos/util';\n\nimport { FunctionArgumentType } from '#hyperformula';\nimport { type ComputeGraphPlugin } from '../compute-graph-registry';\nimport { type AsyncFunction, AsyncFunctionPlugin } from '../functions';\nimport { parseNumberString } from '../util';\n\n/**\n * Testing functions run locally (not run via EDGE).\n * https://hyperformula.handsontable.com/guide/custom-functions.html#add-a-simple-custom-function\n */\nexport class TestPlugin extends AsyncFunctionPlugin {\n /**\n * Simple local function returns input value.\n */\n test(ast: ProcedureAst, state: InterpreterState) {\n const handler: AsyncFunction = async (_value) => {\n return _value;\n };\n\n return this.runAsyncFunction(ast, state, handler);\n }\n\n /**\n * Simple local function returns random number.\n */\n random(ast: ProcedureAst, state: InterpreterState) {\n const handler: AsyncFunction = async () => {\n return Math.random();\n };\n\n return this.runAsyncFunction(ast, state, handler);\n }\n\n /**\n * Async HTTP function.\n */\n crypto(ast: ProcedureAst, state: InterpreterState) {\n const handler: AsyncFunction = async (_currency) => {\n const currency = (_currency || 'USD').toUpperCase();\n const result = await fetch(`https://api.coindesk.com/v1/bpi/currentprice/${currency}.json`);\n const data = await result.json();\n const rate = getDeep<string>(data, ['bpi', currency, 'rate']);\n if (!rate) {\n return NaN;\n }\n\n return parseNumberString(rate);\n };\n\n return this.runAsyncFunction(ast, state, handler, { ttl: 10_000 });\n }\n}\n\nTestPlugin.implementedFunctions = {\n TEST: {\n method: 'test',\n parameters: [{ argumentType: FunctionArgumentType.NUMBER, optionalArg: false }],\n isVolatile: true,\n },\n\n RANDOM: {\n method: 'random',\n parameters: [],\n isVolatile: true,\n },\n\n CRYPTO: {\n method: 'crypto',\n parameters: [{ argumentType: FunctionArgumentType.STRING, optionalArg: true }],\n isVolatile: true,\n },\n};\n\nexport const TestPluginTranslations = {\n enGB: {\n TEST: 'Returns input value',\n RANDOM: 'Random number',\n CRYPTO: 'Crypto token value',\n },\n enUS: {\n TEST: 'Returns input value',\n RANDOM: 'Random number',\n CRYPTO: 'Crypto token value',\n },\n};\n\nexport const testFunctionPlugins: ComputeGraphPlugin[] = [\n {\n plugin: TestPlugin,\n translations: TestPluginTranslations,\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\n// TODO(burdon): Factor out.\nexport const parseNumberString = (str: string): number => {\n return parseFloat(str.replace(/[^\\d.]/g, ''));\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { HyperFormula } from 'hyperformula';\n\nexport const getRegisteredFunctionNames = () => {\n return HyperFormula.buildEmpty({ licenseKey: 'gpl-v3' }).getRegisteredFunctionNames();\n};\n"],
5
- "mappings": ";;;;;;;AAIA,SAASA,cAAkC;AAC3C,SAAuBC,gBAAgB;AACvC,SAASC,iBAAiB;;AAOnB,IAAMC,cAAN,cAA0BC,SAAAA;EAI/B,YAA6BC,WAA+B,CAAC,GAAG;AAC9D,UAAK,GAAA,KADsBA,WAAAA;EAE7B;EAEA,IAAIC,MAAe;AACjB,WAAO,KAAKC;EACd;EAEA,IAAIC,SAAiB;AACnBC,cAAU,KAAKC,SAAO,QAAA;;;;;;;;;AACtB,WAAO,KAAKA;EACd;EAEA,IAAIC,WAAiC;AACnCF,cAAU,KAAKG,WAAS,QAAA;;;;;;;;;AACxB,WAAO,KAAKA;EACd;EAEA,MAAeC,QAAuB;AACpC,UAAML,SAAS,IAAIM,OAAO,KAAKT,QAAQ;AACvC,UAAMG,OAAOO,WAAU;AACvB,UAAMP,OAAOQ,KAAKC,eAAc;AAChC,SAAKP,UAAUF;AACf,SAAKD,KAAKW,UAAU,YAAA;AAClB,YAAMV,OAAOW,QAAO;AACpB,WAAKT,UAAUU;IACjB,CAAA;AAEA,UAAMT,WAAW,IAAIU,qBAAqB,KAAKhB,QAAQ;AACvD,UAAMM,SAASW,KAAI;AACnB,SAAKV,YAAYD;AACjB,SAAKJ,KAAKW,UAAU,YAAA;AAClB,YAAMP,SAASY,MAAK;AACpB,WAAKX,YAAYQ;IACn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AY;EACd;AACF;AAEO,IAAMI,yBAAyB;EACpCC,MAAM;IACJZ,MAAM;IACNQ,QAAQ;IACRC,QAAQ;EACV;EACAI,MAAM;IACJb,MAAM;IACNQ,QAAQ;IACRC,QAAQ;EACV;AACF;AAEO,IAAMK,sBAA4C;EACvD;IACEC,QAAQvC;IACRwC,cAAcL;EAChB;;;;AE9FF,SAASM,oBAAoB;AAEtB,IAAMC,6BAA6B,MAAA;AACxC,SAAOC,aAAaC,WAAW;IAAEC,YAAY;EAAS,CAAA,EAAGH,2BAA0B;AACrF;",
6
- "names": ["Client", "Resource", "invariant", "TestBuilder", "Resource", "_options", "ctx", "_ctx", "client", "invariant", "_client", "registry", "_registry", "_open", "Client", "initialize", "halo", "createIdentity", "onDispose", "destroy", "undefined", "ComputeGraphRegistry", "open", "close", "getDeep", "FunctionArgumentType", "parseNumberString", "str", "parseFloat", "replace", "TestPlugin", "AsyncFunctionPlugin", "test", "ast", "state", "handler", "_value", "runAsyncFunction", "random", "Math", "crypto", "_currency", "currency", "toUpperCase", "result", "fetch", "data", "json", "rate", "getDeep", "NaN", "parseNumberString", "ttl", "implementedFunctions", "TEST", "method", "parameters", "argumentType", "FunctionArgumentType", "NUMBER", "optionalArg", "isVolatile", "RANDOM", "CRYPTO", "STRING", "TestPluginTranslations", "enGB", "enUS", "testFunctionPlugins", "plugin", "translations", "HyperFormula", "getRegisteredFunctionNames", "HyperFormula", "buildEmpty", "licenseKey"]
7
- }
@@ -1,34 +0,0 @@
1
- import type { FunctionPluginDefinition } from 'hyperformula';
2
- import type { ConfigParams } from 'hyperformula/typings/ConfigParams';
3
- import type { FunctionTranslationsPackage } from 'hyperformula/typings/interpreter';
4
- import { type SpaceId, type Space } from '@dxos/client/echo';
5
- import { Resource } from '@dxos/context';
6
- import { ComputeGraph } from './compute-graph';
7
- import { type FunctionContextOptions } from './functions';
8
- export type ComputeGraphPlugin = {
9
- plugin: FunctionPluginDefinition;
10
- translations: FunctionTranslationsPackage;
11
- };
12
- export type ComputeGraphOptions = {
13
- plugins?: ComputeGraphPlugin[];
14
- } & Partial<FunctionContextOptions> & Partial<ConfigParams>;
15
- export declare const defaultOptions: ComputeGraphOptions;
16
- export declare const defaultPlugins: ComputeGraphPlugin[];
17
- /**
18
- * Manages a collection of ComputeGraph instances for each space.
19
- *
20
- * [ComputePlugin] => [ComputeGraphRegistry] => [ComputeGraph(Space)] => [ComputeNode(Object)]
21
- *
22
- * NOTE: The ComputeGraphRegistry manages the hierarchy of resources via its root Context.
23
- * NOTE: The package.json file defines the packaged #hyperformula module.
24
- */
25
- export declare class ComputeGraphRegistry extends Resource {
26
- private readonly _graphs;
27
- private readonly _options;
28
- constructor(options?: ComputeGraphOptions);
29
- getGraph(spaceId: SpaceId): ComputeGraph | undefined;
30
- getOrCreateGraph(space: Space): ComputeGraph;
31
- createGraph(space: Space): ComputeGraph;
32
- protected _close(): Promise<void>;
33
- }
34
- //# sourceMappingURL=compute-graph-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compute-graph-registry.d.ts","sourceRoot":"","sources":["../../../src/compute-graph-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAGpF,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAsD,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE9G,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,wBAAwB,CAAC;IACjC,YAAY,EAAE,2BAA2B,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAChC,GAAG,OAAO,CAAC,sBAAsB,CAAC,GACjC,OAAO,CAAC,YAAY,CAAC,CAAC;AAExB,eAAO,MAAM,cAAc,EAAE,mBAE5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAAkB,EAK9C,CAAC;AAEF;;;;;;;GAOG;AAEH,qBAAa,oBAAqB,SAAQ,QAAQ;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAE5D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsB;gBAEnC,OAAO,GAAE,mBAAiD;IAQtE,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS;IAIpD,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY;IAU5C,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY;cAQd,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAMjD"}
@@ -1,64 +0,0 @@
1
- import { Event } from '@dxos/async';
2
- import { type Space } from '@dxos/client/echo';
3
- import { Resource } from '@dxos/context';
4
- import { type HyperFormula } from '#hyperformula';
5
- import { ComputeNode } from './compute-node';
6
- import { FunctionContext, type FunctionContextOptions, type FunctionDefinition } from './functions';
7
- type ObjectRef = {
8
- type: string;
9
- id: string;
10
- };
11
- /**
12
- * Marker for sheets that are managed by an ECHO object.
13
- * Sheet ID: `dxos.org/type/SheetType@1234`
14
- */
15
- export declare const createSheetName: ({ type, id }: ObjectRef) => string;
16
- export declare const parseSheetName: (name: string) => Partial<ObjectRef>;
17
- export type ComputeGraphEvent = 'functionsUpdated' | 'valuesUpdated';
18
- /**
19
- * Per-space compute and dependency graph.
20
- * Consists of multiple ComputeNode (corresponding to a HyperFormula sheet).
21
- * Manages the set of custom functions.
22
- * HyperFormula manages the dependency graph.
23
- */
24
- export declare class ComputeGraph extends Resource {
25
- private readonly _hf;
26
- private readonly _space?;
27
- private readonly _options?;
28
- readonly id: string;
29
- private readonly _nodes;
30
- private _remoteFunctions;
31
- readonly update: Event<{
32
- type: ComputeGraphEvent;
33
- }>;
34
- readonly context: FunctionContext;
35
- constructor(_hf: HyperFormula, _space?: Space | undefined, _options?: Partial<FunctionContextOptions> | undefined);
36
- get hf(): HyperFormula;
37
- getFunctions({ standard, echo }?: {
38
- standard?: boolean;
39
- echo?: boolean;
40
- }): FunctionDefinition[];
41
- /**
42
- * Get or create cell representing a sheet.
43
- */
44
- getOrCreateNode(name: string): ComputeNode;
45
- /**
46
- * Map bound value to custom function invocation.
47
- * E.g., "HELLO(...args)" => "DX("HELLO", ...args)".
48
- */
49
- mapFormulaToNative(formula: string): string;
50
- /**
51
- * Map from binding to fully qualified ECHO ID (to store).
52
- * E.g., HELLO() => spaceId:objectId()
53
- */
54
- mapFunctionBindingToId(formula: string): string;
55
- /**
56
- * Map from fully qualified ECHO ID to binding (from store).
57
- * E.g., spaceId:objectId() => HELLO()
58
- */
59
- mapFunctionBindingFromId(formula: string): string | undefined;
60
- protected _open(): Promise<void>;
61
- protected _close(): Promise<void>;
62
- }
63
- export {};
64
- //# sourceMappingURL=compute-graph.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compute-graph.d.ts","sourceRoot":"","sources":["../../../src/compute-graph.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,KAAK,EAA4B,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQzC,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAEL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EAExB,MAAM,aAAa,CAAC;AASrB,KAAK,SAAS,GAAG;IAAE,IAAI,EAAE,M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,IAAI,CAAC;cAatB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAKjD"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=compute-graph.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compute-graph.test.d.ts","sourceRoot":"","sources":["../../../src/compute-graph.test.ts"],"names":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- import { type Listeners } from 'hyperformula/typings/Emitter';
2
- import { type ExportedCellChange } from 'hyperformula/typings/Exporter';
3
- import { Event } from '@dxos/async';
4
- import { Resource } from '@dxos/context';
5
- import { type ComputeGraph } from './compute-graph';
6
- import { type CellAddress, type CellScalarValue } from './types';
7
- export type ComputeNodeEvent = {
8
- type: keyof Listeners;
9
- change?: ExportedCellChange;
10
- };
11
- /**
12
- * Individual "sheet" (typically corresponds to an ECHO object).
13
- */
14
- export declare class ComputeNode extends Resource {
15
- private readonly _graph;
16
- readonly sheetId: number;
17
- readonly update: Event<ComputeNodeEvent>;
18
- constructor(_graph: ComputeGraph, sheetId: number);
19
- get graph(): ComputeGraph;
20
- clear(): void;
21
- getValue(cell: CellAddress): CellScalarValue;
22
- setValue(cell: CellAddress, value: CellScalarValue): void;
23
- protected _open(): Promise<void>;
24
- }
25
- //# sourceMappingURL=compute-node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compute-node.d.ts","sourceRoot":"","sources":["../../../src/compute-node.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAa,MAAM,SAAS,CAAC;AAE5E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,CAAC;AAEF;;GAEG;AAEH,qBAAa,WAAY,SAAQ,QAAQ;IAIrC,OAAO,CAAC,QAAQ,CAAC,MAAM;aACP,OAAO,EAAE,MAAM;IAJjC,SAAgB,MAAM,0BAAiC;gBAGpC,MAAM,EAAE,YAAY,EACrB,OAAO,EAAE,MAAM;IAKjC,IAAI,KAAK,iBAER;IAED,KAAK,IAAI,IAAI;IAIb,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe;IAS5C,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI;cAMhC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAIhD"}
@@ -1,66 +0,0 @@
1
- import { type SimpleCellAddress } from 'hyperformula/typings/Cell';
2
- import { type InterpreterState } from 'hyperformula/typings/interpreter/InterpreterState';
3
- import { type InterpreterValue } from 'hyperformula/typings/interpreter/InterpreterValue';
4
- import { type ProcedureAst } from 'hyperformula/typings/parser';
5
- import { type CleanupFn } from '@dxos/async';
6
- import { type Space } from '@dxos/client/echo';
7
- import { FunctionPlugin, type HyperFormula } from '#hyperformula';
8
- export type AsyncFunction = (...args: any) => Promise<InterpreterValue>;
9
- export type FunctionUpdateEvent = {
10
- name: string;
11
- cell: SimpleCellAddress;
12
- };
13
- export type FunctionOptions = {
14
- ttl?: number;
15
- };
16
- export type FunctionContextOptions = {
17
- defaultTtl: number;
18
- debounceDelay: number;
19
- remoteFunctionUrl: string;
20
- onUpdate?: (update: FunctionUpdateEvent) => void;
21
- };
22
- export declare const defaultFunctionContextOptions: FunctionContextOptions;
23
- /**
24
- * The context singleton for the model is passed into custom functions.
25
- *
26
- * HyperFormula does not support async functions.
27
- * - https://hyperformula.handsontable.com/guide/custom-functions.html
28
- * - https://hyperformula.handsontable.com/guide/known-limitations.html#known-limitations
29
- * - https://github.com/handsontable/hyperformula/issues/892
30
- */
31
- export declare class FunctionContext {
32
- private readonly _hf;
33
- private readonly _space;
34
- static createInvocationKey(name: string, ...args: any): string;
35
- private readonly _cache;
36
- private readonly _pending;
37
- private readonly _subscriptions;
38
- private _invocations;
39
- private readonly _options;
40
- private readonly _onUpdate;
41
- constructor(_hf: HyperFormula, _space: Space | undefined, _options?: Partial<FunctionContextOptions>);
42
- get space(): Space | undefined;
43
- get remoteFunctionUrl(): string;
44
- get info(): {
45
- cache: number;
46
- invocations: Record<string, number>;
47
- };
48
- flush(): void;
49
- createSubscription(name: string, unsubscribe: CleanupFn): void;
50
- /**
51
- * Exec the function if TTL has expired.
52
- * Return the cached value.
53
- */
54
- invokeFunction(name: string, state: InterpreterState, args: any[], cb: AsyncFunction, options?: FunctionOptions): InterpreterValue | undefined;
55
- }
56
- /**
57
- * Base class for async functions.
58
- */
59
- export declare class AsyncFunctionPlugin extends FunctionPlugin {
60
- get context(): FunctionContext;
61
- /**
62
- * Immediately returns cached value then runs the async function.
63
- */
64
- protected runAsyncFunction(ast: ProcedureAst, state: InterpreterState, cb: AsyncFunction, options?: FunctionOptions): import("hyperformula/typings/interpreter/InterpreterValue").RawInterpreterValue;
65
- }
66
- //# sourceMappingURL=async-function.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"async-function.d.ts","sourceRoot":"","sources":["../../../../src/functions/async-function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,KAAK,K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,IAAI,KAAK,sBAER;IAED,IAAI,iBAAiB,WAEpB;IAED,IAAI,IAAI;;;MAEP;IAED,KAAK,IAAI,IAAI;IAOb,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,GAAG,IAAI;IAK9D;;;OAGG;IACH,cAAc,CACZ,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,gBAAgB,EACvB,IAAI,EAAE,GAAG,EAAE,EACX,EAAE,EAAE,aAAa,EACjB,OAAO,CAAC,EAAE,eAAe,GACxB,gBAAgB,GAAG,SAAS;CAgChC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,IAAI,OAAO,IACqB,eAAe,CAC9C;IAED;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,eAAe;CAOpH"}
@@ -1,20 +0,0 @@
1
- import { type InterpreterState } from 'hyperformula/typings/interpreter/InterpreterState';
2
- import { type ProcedureAst } from 'hyperformula/typings/parser';
3
- import { AsyncFunctionPlugin } from './async-function';
4
- export declare const EDGE_FUNCTION_NAME = "DX";
5
- /**
6
- * A hyperformula function plugin for calling remote (EDGE) functions.
7
- * https://hyperformula.handsontable.com/guide/custom-functions.html#add-a-simple-custom-function
8
- */
9
- export declare class EdgeFunctionPlugin extends AsyncFunctionPlugin {
10
- dx(ast: ProcedureAst, state: InterpreterState): import("hyperformula/typings/interpreter/InterpreterValue").RawInterpreterValue;
11
- }
12
- export declare const EdgeFunctionPluginTranslations: {
13
- enGB: {
14
- DX: string;
15
- };
16
- enUS: {
17
- DX: string;
18
- };
19
- };
20
- //# sourceMappingURL=edge-function.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"edge-function.d.ts","sourceRoot":"","sources":["../../../../src/functions/edge-function.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAShE,OAAO,EAAsB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE3E,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAIvC;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,mBAAmB;IACzD,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;CAqD9C;AAuBD,eAAO,MAAM,8BAA8B;;;;;;;CAO1C,CAAC"}
@@ -1,11 +0,0 @@
1
- export type FunctionDefinition = {
2
- name: string;
3
- description?: string;
4
- syntax?: string;
5
- section?: string;
6
- };
7
- /**
8
- * nullDate {year: 1899, month: 12, day: 30}
9
- */
10
- export declare const defaultFunctions: FunctionDefinition[];
11
- //# sourceMappingURL=function-defs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"function-defs.d.ts","sourceRoot":"","sources":["../../../../src/functions/function-defs.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,kBAAkB,EA42EhD,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from './async-function';
2
- export * from './edge-function';
3
- export * from './function-defs';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/index.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=hyperformula.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hyperformula.test.d.ts","sourceRoot":"","sources":["../../../src/hyperformula.test.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export * from './test-builder';
2
- export * from './test-plugin';
3
- export * from './util';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
@@ -1,15 +0,0 @@
1
- import { Client, type ClientOptions } from '@dxos/client';
2
- import { type Context, Resource } from '@dxos/context';
3
- import { type ComputeGraphOptions, ComputeGraphRegistry } from '../compute-graph-registry';
4
- export type TestBuilderOptions = ClientOptions & ComputeGraphOptions;
5
- export declare class TestBuilder extends Resource {
6
- private readonly _options;
7
- private _client?;
8
- private _registry?;
9
- constructor(_options?: TestBuilderOptions);
10
- get ctx(): Context;
11
- get client(): Client;
12
- get registry(): ComputeGraphRegistry;
13
- _open(): Promise<void>;
14
- }
15
- //# sourceMappingURL=test-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-builder.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,KAAK,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,KAAK,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,mBAAmB,CAAC;AAGrE,qBAAa,WAAY,SAAQ,QAAQ;IAI3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAHrC,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,SAAS,CAAC,CAAuB;gBAEZ,QAAQ,GAAE,kBAAuB;IAI9D,IAAI,GAAG,IAAI,OAAO,CAEjB;IAED,IAAI,MAAM,IAAI,MAAM,CAGnB;IAED,IAAI,QAAQ,IAAI,oBAAoB,CAGnC;IAEc,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAkBtC"}
@@ -1,36 +0,0 @@
1
- import { type InterpreterState } from 'hyperformula/typings/interpreter/InterpreterState';
2
- import { type ProcedureAst } from 'hyperformula/typings/parser';
3
- import { type ComputeGraphPlugin } from '../compute-graph-registry';
4
- import { AsyncFunctionPlugin } from '../functions';
5
- /**
6
- * Testing functions run locally (not run via EDGE).
7
- * https://hyperformula.handsontable.com/guide/custom-functions.html#add-a-simple-custom-function
8
- */
9
- export declare class TestPlugin extends AsyncFunctionPlugin {
10
- /**
11
- * Simple local function returns input value.
12
- */
13
- test(ast: ProcedureAst, state: InterpreterState): import("hyperformula/typings/interpreter/InterpreterValue").RawInterpreterValue;
14
- /**
15
- * Simple local function returns random number.
16
- */
17
- random(ast: ProcedureAst, state: InterpreterState): import("hyperformula/typings/interpreter/InterpreterValue").RawInterpreterValue;
18
- /**
19
- * Async HTTP function.
20
- */
21
- crypto(ast: ProcedureAst, state: InterpreterState): import("hyperformula/typings/interpreter/InterpreterValue").RawInterpreterValue;
22
- }
23
- export declare const TestPluginTranslations: {
24
- enGB: {
25
- TEST: string;
26
- RANDOM: string;
27
- CRYPTO: string;
28
- };
29
- enUS: {
30
- TEST: string;
31
- RANDOM: string;
32
- CRYPTO: string;
33
- };
34
- };
35
- export declare const testFunctionPlugins: ComputeGraphPlugin[];
36
- //# sourceMappingURL=test-plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-plugin.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAKhE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAsB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGvE;;;GAGG;AACH,qBAAa,UAAW,SAAQ,mBAAmB;IACjD;;OAEG;IACH,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;IAQ/C;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;IAQjD;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB;CAelD;AAsBD,eAAO,MAAM,sBAAsB;;;;;;;;;;;CAWlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,kBAAkB,EAKnD,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const getRegisteredFunctionNames: () => string[];
2
- //# sourceMappingURL=util.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../src/testing/util.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,0BAA0B,gBAEtC,CAAC"}
@@ -1,11 +0,0 @@
1
- import { type SimpleCellRange } from 'hyperformula/typings/AbsoluteCellRange';
2
- import { type SimpleCellAddress } from 'hyperformula/typings/Cell';
3
- import { type SimpleDate, type SimpleDateTime } from 'hyperformula/typings/DateTimeHelper';
4
- import { DetailedCellError, ExportedCellChange } from '#hyperformula';
5
- /**
6
- * Hyperformula had issues during bundling with vite,
7
- * so we pre-bundle hyperformula and place it in the vendor directory of this package.
8
- */
9
- export { DetailedCellError, ExportedCellChange };
10
- export type { SimpleCellRange, SimpleCellAddress, SimpleDate, SimpleDateTime };
11
- //# sourceMappingURL=hyperformula.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hyperformula.d.ts","sourceRoot":"","sources":["../../../../src/types/hyperformula.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAG3F,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEtE;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC;AAEjD,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './hyperformula';
2
- export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
@@ -1,20 +0,0 @@
1
- export type CellAddress = Record<'row' | 'col', number>;
2
- export type CellRange = {
3
- from: CellAddress;
4
- to?: CellAddress;
5
- };
6
- export type CompleteCellRange = {
7
- from: CellAddress;
8
- to: CellAddress;
9
- };
10
- export type CellScalarValue = number | string | boolean | null;
11
- export declare const RANGE_NOTATION: RegExp;
12
- export declare const isFormula: (value: any) => value is string;
13
- export declare const cellEquals: (a: CellAddress | undefined, b: CellAddress | undefined) => boolean;
14
- export declare const columnLetter: (col: number) => string;
15
- export declare const addressToA1Notation: ({ col, row }: CellAddress) => string;
16
- export declare const addressFromA1Notation: (ref: string) => CellAddress;
17
- export declare const rangeToA1Notation: (range: CellRange) => string;
18
- export declare const rangeFromA1Notation: (ref: string) => CellRange;
19
- export declare const inRange: (range: CellRange | undefined, cell: CellAddress) => boolean;
20
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,GAAG,KAAK,EAAE,MAAM,CAAC,CAAC;AAExD,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,EAAE,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,EAAE,EAAE,WAAW,CAAA;CAAE,CAAC;AAEvE,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAE/D,eAAO,MAAM,cAAc,QAAmC,CAAC;AAE/D,eAAO,MAAM,SAAS,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,MAA8D,CAAC;AAE/G,eAAO,MAAM,UAAU,GAAI,GAAG,WAAW,GAAG,SAAS,EAAE,GAAG,WAAW,GAAG,SAAS,YAEhF,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MAM1C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,cAAc,WAAW,KAAG,MAE/D,CAAC;AAGF,eAAO,MAAM,qBAAqB,GAAI,KAAK,MAAM,KAAG,WAOnD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,SAAS,WAIjD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,KAAG,SAGjD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,SAAS,GAAG,SAAS,EAAE,MAAM,WAAW,KAAG,OAwBzE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.test.d.ts","sourceRoot":"","sources":["../../../../src/types/types.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export declare const parseNumberString: (str: string) => number;
2
- //# sourceMappingURL=util.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,KAAG,MAE/C,CAAC"}