@dxos/compute 0.8.4-main.c1de068 → 0.8.4-main.fd6878d

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.
@@ -79,6 +79,9 @@ import { Event } from "@dxos/async";
79
79
  import { Resource } from "@dxos/context";
80
80
  import { DetailedCellError as DetailedCellError2 } from "#hyperformula";
81
81
  var ComputeNode = class extends Resource {
82
+ _graph;
83
+ sheetId;
84
+ update;
82
85
  constructor(_graph, sheetId) {
83
86
  super(), this._graph = _graph, this.sheetId = sheetId, this.update = new Event();
84
87
  }
@@ -120,7 +123,7 @@ var ComputeNode = class extends Resource {
120
123
  import defaultsDeep from "lodash.defaultsdeep";
121
124
  import { debounce } from "@dxos/async";
122
125
  import { log } from "@dxos/log";
123
- import { CellError, ErrorType, EmptyValue, FunctionPlugin } from "#hyperformula";
126
+ import { CellError, EmptyValue, ErrorType, FunctionPlugin } from "#hyperformula";
124
127
  var __dxlog_file2 = "/__w/dxos/dxos/packages/core/compute/src/functions/async-function.ts";
125
128
  var defaultFunctionContextOptions = {
126
129
  defaultTtl: 5e3,
@@ -128,6 +131,8 @@ var defaultFunctionContextOptions = {
128
131
  remoteFunctionUrl: "https://edge.dxos.workers.dev/functions"
129
132
  };
130
133
  var FunctionContext = class _FunctionContext {
134
+ _hf;
135
+ _space;
131
136
  // Mangle name with params.
132
137
  static createInvocationKey(name, ...args) {
133
138
  return JSON.stringify({
@@ -135,6 +140,18 @@ var FunctionContext = class _FunctionContext {
135
140
  ...args
136
141
  });
137
142
  }
143
+ // TODO(wittjosiah): Persist cached values.
144
+ // Cached values for cell.
145
+ _cache;
146
+ // Active requests.
147
+ _pending;
148
+ // Query subscriptions.
149
+ _subscriptions;
150
+ // Invocation count.
151
+ _invocations;
152
+ _options;
153
+ // Debounced update handler.
154
+ _onUpdate;
138
155
  constructor(_hf, _space, _options) {
139
156
  this._hf = _hf;
140
157
  this._space = _space;
@@ -2795,6 +2812,17 @@ var parseSheetName = (name) => {
2795
2812
  };
2796
2813
  };
2797
2814
  var ComputeGraph = class extends Resource2 {
2815
+ _hf;
2816
+ _space;
2817
+ _options;
2818
+ id;
2819
+ // Map of nodes indexed by sheet number.
2820
+ _nodes;
2821
+ // Cached function objects.
2822
+ _remoteFunctions;
2823
+ update;
2824
+ // The context is passed to all functions.
2825
+ context;
2798
2826
  constructor(_hf, _space, _options) {
2799
2827
  super(), this._hf = _hf, this._space = _space, this._options = _options, this.id = `graph-${PublicKey.random().truncate()}`, this._nodes = /* @__PURE__ */ new Map(), this._remoteFunctions = [], this.update = new Event2();
2800
2828
  this.context = new FunctionContext(this._hf, this._space, {
@@ -2997,11 +3025,12 @@ var defaultPlugins = [
2997
3025
  }
2998
3026
  ];
2999
3027
  var ComputeGraphRegistry = class extends Resource3 {
3028
+ _graphs = /* @__PURE__ */ new Map();
3029
+ _options;
3000
3030
  constructor(options = {
3001
3031
  plugins: defaultPlugins
3002
3032
  }) {
3003
3033
  super();
3004
- this._graphs = /* @__PURE__ */ new Map();
3005
3034
  this._options = defaultsDeep2({}, options, defaultOptions);
3006
3035
  this._options.plugins?.forEach(({ plugin, translations }) => {
3007
3036
  HyperFormula.registerFunctionPlugin(plugin, translations);
@@ -3075,4 +3104,4 @@ export {
3075
3104
  defaultPlugins,
3076
3105
  ComputeGraphRegistry
3077
3106
  };
3078
- //# sourceMappingURL=chunk-AURNYRCC.mjs.map
3107
+ //# sourceMappingURL=chunk-X2FWMHD4.mjs.map