@rkmodules/rules 0.0.112 → 0.0.113

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
@@ -234,6 +234,12 @@ function isTree(value) {
234
234
  Object.keys(value).length > 0 &&
235
235
  Object.values(value).every(function (v) { return Array.isArray(v); }));
236
236
  }
237
+ function isEmptyTree(value) {
238
+ return (typeof value === "object" &&
239
+ value !== null &&
240
+ !Array.isArray(value) &&
241
+ Object.keys(value).length === 0);
242
+ }
237
243
  function isSingleTon(value) {
238
244
  return (Object.keys(value).length === 1 && Object.values(value)[0].length === 1);
239
245
  }
@@ -250,6 +256,9 @@ function broadCast(value) {
250
256
  if (isTree(value)) {
251
257
  return value;
252
258
  }
259
+ if (isEmptyTree(value)) {
260
+ return {};
261
+ }
253
262
  return { "0": [value] };
254
263
  }
255
264
  function getBranch(tree, path) {
@@ -7567,5 +7576,5 @@ function DDContext(_a) {
7567
7576
  return React.createElement(DndProvider, { backend: HTML5Backend }, children);
7568
7577
  }
7569
7578
 
7570
- export { DDContext, DISCARD, Engine, Flow, Lib, binaryOnTree, binaryOnTreeBranch, broadCast, expandTree, forEachBranch, forEachItem, getBranch, getBranches, getItem, getPaths, getPositions, getReferences, getValue$1 as getValue, getVariable, graftTree, hasReference, interpolate, isReference, isSingleTon, isTree, mapTree, mapTreeBranch, nAryOnTree, nAryOnTreeBranch, normalizePaths, normalizeVarDef, parseReference, primitives, pushItem, sameShape, simplifyTree$1 as simplifyTree, toArray, topSort, treeSize, treeStats, trimTree, uid$1 as uid, useDraggableNode, useFlow, useFunction, usePositions, useUpdatePositions, useVariable, variableStore };
7579
+ export { DDContext, DISCARD, Engine, Flow, Lib, binaryOnTree, binaryOnTreeBranch, broadCast, expandTree, forEachBranch, forEachItem, getBranch, getBranches, getItem, getPaths, getPositions, getReferences, getValue$1 as getValue, getVariable, graftTree, hasReference, interpolate, isEmptyTree, isReference, isSingleTon, isTree, mapTree, mapTreeBranch, nAryOnTree, nAryOnTreeBranch, normalizePaths, normalizeVarDef, parseReference, primitives, pushItem, sameShape, simplifyTree$1 as simplifyTree, toArray, topSort, treeSize, treeStats, trimTree, uid$1 as uid, useDraggableNode, useFlow, useFunction, usePositions, useUpdatePositions, useVariable, variableStore };
7571
7580
  //# sourceMappingURL=index.esm.js.map