@plurid/plurid-engine 0.0.0-11 → 0.0.0-12

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.
@@ -2110,10 +2110,10 @@ var index$5 = Object.freeze({
2110
2110
  computeZigZagLayout: computeZigZagLayout
2111
2111
  });
2112
2112
 
2113
- const resolveViewItem = (planes, view, configuration) => {
2113
+ const resolveViewItem = (planes, view, configuration, origin = "origin") => {
2114
2114
  const {protocol: protocol, host: host} = configuration.network;
2115
2115
  const viewData = typeof view === "string" ? view : view.plane;
2116
- const viewAddress = computePlaneAddress(viewData);
2116
+ const viewAddress = computePlaneAddress(viewData, undefined, origin);
2117
2117
  const iPlanes = planes.values();
2118
2118
  const pluridPlanes = [];
2119
2119
  for (const iPlane of iPlanes) {
@@ -2189,10 +2189,10 @@ const resolveViewItem = (planes, view, configuration) => {
2189
2189
  return;
2190
2190
  };
2191
2191
 
2192
- const computeSpaceTree = (planes, view, configuration) => {
2192
+ const computeSpaceTree = (planes, view, configuration, origin = "origin") => {
2193
2193
  const treePlanes = [];
2194
2194
  for (const viewItem of view) {
2195
- const treePlane = resolveViewItem(planes, viewItem, configuration);
2195
+ const treePlane = resolveViewItem(planes, viewItem, configuration, origin);
2196
2196
  if (treePlane) {
2197
2197
  treePlanes.push(treePlane);
2198
2198
  }
@@ -2494,12 +2494,13 @@ var logic = Object.freeze({
2494
2494
  });
2495
2495
 
2496
2496
  class Tree {
2497
- constructor(data) {
2497
+ constructor(data, origin = "origin") {
2498
2498
  this.data = data;
2499
+ this.origin = origin;
2499
2500
  }
2500
2501
  compute() {
2501
2502
  const {planes: planes, view: view, configuration: configuration} = this.data;
2502
- return computeSpaceTree(planes, view, configuration);
2503
+ return computeSpaceTree(planes, view, configuration, this.origin);
2503
2504
  }
2504
2505
  }
2505
2506