@rkmodules/rules 0.0.87 → 0.0.89

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/dist/index.esm.js CHANGED
@@ -341,7 +341,8 @@ function nAryOnTree(trees, fn, fill) {
341
341
  });
342
342
  var result = fn(items, paths, i);
343
343
  if (result !== DISCARD) {
344
- results = results.concat(result);
344
+ var resultArray = [].concat(result);
345
+ results.push.apply(results, __spreadArray([], __read(resultArray), false));
345
346
  }
346
347
  };
347
348
  for (var i = 0; i < maxLength; i++) {
@@ -5560,7 +5561,15 @@ var useVariable = function (scope, name, initial, persist) {
5560
5561
  var setValue = function (value) { return setVar(scope, name, value, persist); };
5561
5562
  return [value, setValue];
5562
5563
  };
5564
+ var getVariable = function (scope, name, persist) {
5565
+ if (persist === void 0) { persist = true; }
5566
+ var value = variableStore.getState().getVar(scope, name, persist);
5567
+ return value;
5568
+ };
5563
5569
 
5570
+ function getPositions(fn) {
5571
+ return getVariable("rules", "".concat(fn.name, ".positions"), true);
5572
+ }
5564
5573
  function usePositions(fn) {
5565
5574
  return useVariable("rules", "".concat(fn.name, ".positions"), {});
5566
5575
  }
@@ -6953,5 +6962,5 @@ function DDContext(_a) {
6953
6962
  return React.createElement(DndProvider, { backend: HTML5Backend }, children);
6954
6963
  }
6955
6964
 
6956
- export { DDContext, DISCARD, Engine, Flow, Lib, binaryOnTree, binaryOnTreeBranch, broadCast, expandTree, getBranch, getPaths, getReferences, getValue$1 as getValue, graftTree, hasReference, interpolate, isReference, isSingleTon, isTree, mapTree, mapTreeBranch, nAryOnTree, nAryOnTreeBranch, normalizeVarDef, parseReference, primitives, sameShape, simplifyTree$1 as simplifyTree, toArray, topSort, treeSize, trimTree, uid$1 as uid, useDraggableNode, useFlow, useFunction, usePositions, useUpdatePositions, useVariable };
6965
+ export { DDContext, DISCARD, Engine, Flow, Lib, binaryOnTree, binaryOnTreeBranch, broadCast, expandTree, getBranch, getPaths, getPositions, getReferences, getValue$1 as getValue, getVariable, graftTree, hasReference, interpolate, isReference, isSingleTon, isTree, mapTree, mapTreeBranch, nAryOnTree, nAryOnTreeBranch, normalizeVarDef, parseReference, primitives, sameShape, simplifyTree$1 as simplifyTree, toArray, topSort, treeSize, trimTree, uid$1 as uid, useDraggableNode, useFlow, useFunction, usePositions, useUpdatePositions, useVariable, variableStore };
6957
6966
  //# sourceMappingURL=index.esm.js.map