@mark1russell7/coeval 0.6.1 → 0.6.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.
package/build/index.js CHANGED
@@ -1088,7 +1088,7 @@ function ask(world, doc, verb, options = {}) {
1088
1088
  * The brand of a host thing: an object of the host that answers the steps of a path itself. The brand is a
1089
1089
  * global symbol, thus two copies of the kernel in one program know the things of each other.
1090
1090
  */
1091
- const THING = Symbol.for("coeval.thing");
1091
+ const THING = /* @__PURE__ */ Symbol.for("coeval.thing");
1092
1092
  /**
1093
1093
  * This function tells if a thing is a host thing.
1094
1094
  *
@@ -1226,7 +1226,7 @@ function context(parts = {}) {
1226
1226
  };
1227
1227
  }
1228
1228
  const MAX_COLLAPSE = 64;
1229
- const NO_HOPS = Object.freeze([]);
1229
+ const NO_HOPS = /* @__PURE__ */ Object.freeze([]);
1230
1230
  /** A value that can be a reference document: a record with the type `ref`. The full check comes after. */
1231
1231
  function mayBeRef(thing) {
1232
1232
  return typeof thing === "object" && thing !== null && thing.type === "ref";
@@ -1492,7 +1492,7 @@ function setOwn$1(target, key, value) {
1492
1492
  });
1493
1493
  else target[key] = value;
1494
1494
  }
1495
- const NO_SLOTS = Object.freeze([]);
1495
+ const NO_SLOTS = /* @__PURE__ */ Object.freeze([]);
1496
1496
  function hasSlots(template) {
1497
1497
  return template.t !== "data";
1498
1498
  }
@@ -1798,9 +1798,9 @@ function narrow(parent, next) {
1798
1798
  };
1799
1799
  }
1800
1800
  /** No capabilities. One list serves each masked part. */
1801
- const NO_CAPS = Object.freeze([]);
1801
+ const NO_CAPS = /* @__PURE__ */ Object.freeze([]);
1802
1802
  /** No capability rules. One list serves each part that no rule narrows. */
1803
- const NO_RULES = Object.freeze([]);
1803
+ const NO_RULES = /* @__PURE__ */ Object.freeze([]);
1804
1804
  /**
1805
1805
  * This function gives the capabilities that two lists both permit. An effect is permitted by the result when each
1806
1806
  * list permits it. When the list `b` permits each capability of `a`, the result is the list `a` itself.
@@ -1858,8 +1858,8 @@ const NO_ANSWER = {
1858
1858
  steps: []
1859
1859
  };
1860
1860
  /** The options of a resolution without a record of hops, and with one. One object of each serves each call. */
1861
- const WITHOUT_HOPS = Object.freeze({ hops: false });
1862
- const WITH_HOPS = Object.freeze({ hops: true });
1861
+ const WITHOUT_HOPS = /* @__PURE__ */ Object.freeze({ hops: false });
1862
+ const WITH_HOPS = /* @__PURE__ */ Object.freeze({ hops: true });
1863
1863
  /** This class holds the state of one evaluation or run: the machine, the effects, the clock and the trace. */
1864
1864
  var Session = class {
1865
1865
  machine;
@@ -2066,7 +2066,7 @@ function drive$1(steps) {
2066
2066
  steps.return(fail("#CALC!", "A part waited, and its parent cannot wait."));
2067
2067
  return fail("#CALC!", "A part waited, and its parent cannot wait.");
2068
2068
  }
2069
- const ABORTED = Symbol("aborted");
2069
+ const ABORTED = /* @__PURE__ */ Symbol("aborted");
2070
2070
  /** This function drives steps that can wait. The steps before the first wait happen at once, in the call. */
2071
2071
  async function driveWaiting(steps, signal) {
2072
2072
  const abort = () => {
@@ -2183,7 +2183,7 @@ function evaluatorOf(world, envelope, kind) {
2183
2183
  };
2184
2184
  }
2185
2185
  /** The meta of a node of a compilation without a trace. Only a trace reads the meta of a node. */
2186
- const NO_META = Object.freeze({
2186
+ const NO_META = /* @__PURE__ */ Object.freeze({
2187
2187
  path: [],
2188
2188
  doc: {
2189
2189
  type: "?",
@@ -2803,9 +2803,9 @@ function dataOf(type) {
2803
2803
  }
2804
2804
  /** The code of the evaluators of the standard world, by name. */
2805
2805
  const STD_EVALUATORS = {
2806
- "data.number": dataOf("number"),
2807
- "data.text": dataOf("string"),
2808
- "data.bool": dataOf("boolean"),
2806
+ "data.number": /* @__PURE__ */ dataOf("number"),
2807
+ "data.text": /* @__PURE__ */ dataOf("string"),
2808
+ "data.bool": /* @__PURE__ */ dataOf("boolean"),
2809
2809
  "math.add": ({ parts }) => {
2810
2810
  const all = allValues(parts.map((part) => part.evaluate()));
2811
2811
  if ("error" in all) return all.error;
@@ -2835,8 +2835,8 @@ const STD_EVALUATORS = {
2835
2835
  "tree.node": (input) => treeNode(input)
2836
2836
  };
2837
2837
  /** The brand of a node of the decorated tree. Its value is the state that the kit reads. */
2838
- const TREE_NODE = Symbol.for("coeval.tree.node");
2839
- const BUSY = Object.freeze({ busy: true });
2838
+ const TREE_NODE = /* @__PURE__ */ Symbol.for("coeval.tree.node");
2839
+ const BUSY = /* @__PURE__ */ Object.freeze({ busy: true });
2840
2840
  /** The attributes in evaluation, in the order of their demands. An evaluation does not wait, thus one list serves. */
2841
2841
  const demands = [];
2842
2842
  function attributeText(key, type, place) {
@@ -3031,7 +3031,7 @@ function nearestWalker(options = {}) {
3031
3031
  };
3032
3032
  }
3033
3033
  /** The walkers of the standard world, by name. */
3034
- const STD_WALKERS = { "walk.nearest": nearestWalker() };
3034
+ const STD_WALKERS = { "walk.nearest": /* @__PURE__ */ nearestWalker() };
3035
3035
  /** This function evaluates parts one after the other, and stops at the first error. */
3036
3036
  function* inOrder(parts) {
3037
3037
  const values = [];
@@ -3935,7 +3935,7 @@ function check(machine, doc, options = {}) {
3935
3935
  //#endregion
3936
3936
  //#region src/formula.ts
3937
3937
  /** The mark of a field that the profile leaves out of a record. */
3938
- const SKIPPED = Symbol("skipped");
3938
+ const SKIPPED = /* @__PURE__ */ Symbol("skipped");
3939
3939
  /** The value of a name whose binding failed. A reference to the name gives the error. */
3940
3940
  var Held = class {
3941
3941
  error;
@@ -3943,7 +3943,7 @@ var Held = class {
3943
3943
  this.error = error;
3944
3944
  }
3945
3945
  };
3946
- const CLOSURE$2 = Symbol.for("coeval.closure");
3946
+ const CLOSURE$2 = /* @__PURE__ */ Symbol.for("coeval.closure");
3947
3947
  /**
3948
3948
  * This function tells if a value is a function that the construct `fn` made.
3949
3949
  *
@@ -4887,7 +4887,7 @@ const treeDefinition = ({ parts, context, kind, place }) => {
4887
4887
  * reference uses them for the standard evaluators, also without the option `definitions`. It holds `tree.node`.
4888
4888
  */
4889
4889
  const STD_DEFINITIONS = { evaluators: { "tree.node": treeDefinition } };
4890
- const CLOSURE$1 = Symbol.for("coeval.closure");
4890
+ const CLOSURE$1 = /* @__PURE__ */ Symbol.for("coeval.closure");
4891
4891
  /** This function sets an own field, also the field `__proto__` (SHAPE.PROTO). */
4892
4892
  function setField(target, key, value) {
4893
4893
  Object.defineProperty(target, key, {
@@ -5092,7 +5092,7 @@ function formulaDefinitions(profile = {}) {
5092
5092
  } };
5093
5093
  }
5094
5094
  /** The mark of a field that the profile leaves out of a record (FORMULA.RECORD). */
5095
- const SKIP = Symbol("skip");
5095
+ const SKIP = /* @__PURE__ */ Symbol("skip");
5096
5096
  /** The values of parts in order. The first error stops them, also with `combine` (FORMULA.STEPS, FORMULA.FN). */
5097
5097
  function valuesOfStrict(parts) {
5098
5098
  const values = [];
@@ -5164,7 +5164,7 @@ function sameValue(a, b, equal) {
5164
5164
  }
5165
5165
  return true;
5166
5166
  }
5167
- const CLOSURE = Symbol.for("coeval.closure");
5167
+ const CLOSURE = /* @__PURE__ */ Symbol.for("coeval.closure");
5168
5168
  function closureParams(fn) {
5169
5169
  return fn[CLOSURE]?.params;
5170
5170
  }