@ai-ecoverse/slicc-spectrum 1.88.0 → 1.88.1

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/slicc-ui.js CHANGED
@@ -30272,7 +30272,7 @@ var SliccNetwork = class extends ModelElement {
30272
30272
  return b`<p>Run <code>slicc pair</code> on this computer and paste the link it prints.</p>
30273
30273
  <form class="pair-field" data-form="pair" @submit=${(event2) => this.#submitPair(event2, port)}>
30274
30274
  <sp-field-label for="pair-url" size="m">Pairing link</sp-field-label>
30275
- <sp-textfield id="pair-url" size="m" type="url" autocomplete="off" placeholder="http://127.0.0.1:…" ?invalid=${!!this.pairError} @input=${(event2) => this.#pairInput(event2)} @keydown=${(event2) => this.#enterKey(event2)}>${this.pairError ? b`<sp-help-text slot="negative-help-text" icon data-error="pairing">${this.pairError}</sp-help-text>` : A}</sp-textfield>
30275
+ <sp-textfield id="pair-url" size="m" type="url" autocomplete="off" placeholder=${`${location.origin}/#slicc-pair=\u2026`} ?invalid=${!!this.pairError} @input=${(event2) => this.#pairInput(event2)} @keydown=${(event2) => this.#enterKey(event2)}>${this.pairError ? b`<sp-help-text slot="negative-help-text" icon data-error="pairing">${this.pairError}</sp-help-text>` : A}</sp-textfield>
30276
30276
  <swc-button size="m" variant="accent" data-action="pair" ?pending=${this.pairBusy === "pair"} ?disabled=${!this.pairFilled || !port.pairComputer} @click=${(event2) => this.#sendKey(event2)}>Link</swc-button>
30277
30277
  </form>`;
30278
30278
  }
@@ -47604,8 +47604,8 @@ var Rule = class {
47604
47604
  this._contentNameIsCapturing = RegexSource.hasCaptures(this._contentName);
47605
47605
  }
47606
47606
  get debugName() {
47607
- const location = this.$location ? `${basename2(this.$location.filename)}:${this.$location.line}` : "unknown";
47608
- return `${this.constructor.name}#${this.id} @ ${location}`;
47607
+ const location2 = this.$location ? `${basename2(this.$location.filename)}:${this.$location.line}` : "unknown";
47608
+ return `${this.constructor.name}#${this.id} @ ${location2}`;
47609
47609
  }
47610
47610
  getName(lineText, captureIndices) {
47611
47611
  if (!this._nameIsCapturing || this._name === null || lineText === null || captureIndices === null) {
@@ -71296,22 +71296,22 @@ function getGridLocation(element2) {
71296
71296
  const ancestor = parentElement.parentElement.parentElement.parentElement;
71297
71297
  return [...getGridLocation(ancestor), index];
71298
71298
  }
71299
- function getRelativeLocation(rootOrientation, location, direction) {
71300
- if (getLocationOrientation(rootOrientation, location) === getDirectionOrientation(direction)) {
71301
- const [rest, _index] = tail(location);
71299
+ function getRelativeLocation(rootOrientation, location2, direction) {
71300
+ if (getLocationOrientation(rootOrientation, location2) === getDirectionOrientation(direction)) {
71301
+ const [rest, _index] = tail(location2);
71302
71302
  let index = _index;
71303
71303
  if (direction === "right" || direction === "bottom") index += 1;
71304
71304
  return [...rest, index];
71305
71305
  } else {
71306
71306
  const index = direction === "right" || direction === "bottom" ? 1 : 0;
71307
- return [...location, index];
71307
+ return [...location2, index];
71308
71308
  }
71309
71309
  }
71310
71310
  function getDirectionOrientation(direction) {
71311
71311
  return direction === "top" || direction === "bottom" ? "VERTICAL" : "HORIZONTAL";
71312
71312
  }
71313
- function getLocationOrientation(rootOrientation, location) {
71314
- return location.length % 2 === 0 ? orthogonal(rootOrientation) : rootOrientation;
71313
+ function getLocationOrientation(rootOrientation, location2) {
71314
+ return location2.length % 2 === 0 ? orthogonal(rootOrientation) : rootOrientation;
71315
71315
  }
71316
71316
  var orthogonal = (orientation) => orientation === "HORIZONTAL" ? "VERTICAL" : "HORIZONTAL";
71317
71317
  function isGridBranchNode(node) {
@@ -71406,8 +71406,8 @@ var Gridview = class {
71406
71406
  }
71407
71407
  maximizeView(view) {
71408
71408
  var _this$_maximizedNode2;
71409
- const location = getGridLocation(view.element);
71410
- const [_9, node] = this.getNode(location);
71409
+ const location2 = getGridLocation(view.element);
71410
+ const [_9, node] = this.getNode(location2);
71411
71411
  if (!(node instanceof LeafNode)) return;
71412
71412
  if (((_this$_maximizedNode2 = this._maximizedNode) === null || _this$_maximizedNode2 === void 0 ? void 0 : _this$_maximizedNode2.leaf) === node) return;
71413
71413
  if (this.hasMaximizedView()) this.exitMaximizedView();
@@ -71492,8 +71492,8 @@ var Gridview = class {
71492
71492
  this._deserialize(json.root, orientation, deserializer, height);
71493
71493
  this.layout(json.width, json.height);
71494
71494
  if (json.maximizedNode) {
71495
- const location = json.maximizedNode.location;
71496
- const [_9, node] = this.getNode(location);
71495
+ const location2 = json.maximizedNode.location;
71496
+ const [_9, node] = this.getNode(location2);
71497
71497
  if (!(node instanceof LeafNode)) return;
71498
71498
  this.maximizeView(node.view);
71499
71499
  }
@@ -71584,14 +71584,14 @@ var Gridview = class {
71584
71584
  this._onDidChange.fire(e122);
71585
71585
  });
71586
71586
  }
71587
- next(location) {
71588
- return this.progmaticSelect(location);
71587
+ next(location2) {
71588
+ return this.progmaticSelect(location2);
71589
71589
  }
71590
- previous(location) {
71591
- return this.progmaticSelect(location, true);
71590
+ previous(location2) {
71591
+ return this.progmaticSelect(location2, true);
71592
71592
  }
71593
- getView(location) {
71594
- const node = location ? this.getNode(location)[1] : this.root;
71593
+ getView(location2) {
71594
+ const node = location2 ? this.getNode(location2)[1] : this.root;
71595
71595
  return this._getViews(node, this.orientation);
71596
71596
  }
71597
71597
  _getViews(node, orientation, cachedVisibleSize) {
@@ -71616,12 +71616,12 @@ var Gridview = class {
71616
71616
  cachedVisibleSize
71617
71617
  };
71618
71618
  }
71619
- progmaticSelect(location, reverse = false) {
71620
- const [path, node] = this.getNode(location);
71619
+ progmaticSelect(location2, reverse = false) {
71620
+ const [path, node] = this.getNode(location2);
71621
71621
  if (!(node instanceof LeafNode)) throw new TypeError("invalid location");
71622
71622
  for (let i26 = path.length - 1; i26 > -1; i26--) {
71623
71623
  const n37 = path[i26];
71624
- const l24 = location[i26] || 0;
71624
+ const l24 = location2[i26] || 0;
71625
71625
  if (reverse ? l24 - 1 > -1 : l24 + 1 < n37.children.length) return findLeaf(n37.children[reverse ? l24 - 1 : l24 + 1], reverse);
71626
71626
  }
71627
71627
  return findLeaf(this.root, reverse);
@@ -71650,15 +71650,15 @@ var Gridview = class {
71650
71650
  this._margin = margin !== null && margin !== void 0 ? margin : 0;
71651
71651
  this.root = new BranchNode(orientation, proportionalLayout, styles, 0, 0, this.locked, this.margin);
71652
71652
  }
71653
- isViewVisible(location) {
71654
- const [rest, index] = tail(location);
71653
+ isViewVisible(location2) {
71654
+ const [rest, index] = tail(location2);
71655
71655
  const [, parent] = this.getNode(rest);
71656
71656
  if (!(parent instanceof BranchNode)) throw new TypeError("Invalid from location");
71657
71657
  return parent.isChildVisible(index);
71658
71658
  }
71659
- setViewVisible(location, visible2) {
71659
+ setViewVisible(location2, visible2) {
71660
71660
  if (this.hasMaximizedView()) this.exitMaximizedView();
71661
- const [rest, index] = tail(location);
71661
+ const [rest, index] = tail(location2);
71662
71662
  const [, parent] = this.getNode(rest);
71663
71663
  if (!(parent instanceof BranchNode)) throw new TypeError("Invalid from location");
71664
71664
  this._onDidViewVisibilityChange.fire();
@@ -71670,9 +71670,9 @@ var Gridview = class {
71670
71670
  if (!(parent instanceof BranchNode)) throw new TypeError("Invalid location");
71671
71671
  parent.moveChild(from, to);
71672
71672
  }
71673
- addView(view, size4, location) {
71673
+ addView(view, size4, location2) {
71674
71674
  if (this.hasMaximizedView()) this.exitMaximizedView();
71675
- const [rest, index] = tail(location);
71675
+ const [rest, index] = tail(location2);
71676
71676
  const [pathToParent, parent] = this.getNode(rest);
71677
71677
  if (parent instanceof BranchNode) {
71678
71678
  const node = new LeafNode(view, orthogonal(parent.orientation), parent.orthogonalSize);
@@ -71697,12 +71697,12 @@ var Gridview = class {
71697
71697
  }
71698
71698
  }
71699
71699
  remove(view, sizing) {
71700
- const location = getGridLocation(view.element);
71701
- return this.removeView(location, sizing);
71700
+ const location2 = getGridLocation(view.element);
71701
+ return this.removeView(location2, sizing);
71702
71702
  }
71703
- removeView(location, sizing) {
71703
+ removeView(location2, sizing) {
71704
71704
  if (this.hasMaximizedView()) this.exitMaximizedView();
71705
- const [rest, index] = tail(location);
71705
+ const [rest, index] = tail(location2);
71706
71706
  const [pathToParent, parent] = this.getNode(rest);
71707
71707
  if (!(parent instanceof BranchNode)) throw new TypeError("Invalid location");
71708
71708
  const nodeToRemove = parent.children[index];
@@ -71743,10 +71743,10 @@ var Gridview = class {
71743
71743
  const [size4, orthogonalSize] = this.root.orientation === "HORIZONTAL" ? [height, width] : [width, height];
71744
71744
  this.root.layout(size4, orthogonalSize);
71745
71745
  }
71746
- getNode(location, node = this.root, path = []) {
71747
- if (location.length === 0) return [path, node];
71746
+ getNode(location2, node = this.root, path = []) {
71747
+ if (location2.length === 0) return [path, node];
71748
71748
  if (!(node instanceof BranchNode)) throw new TypeError("Invalid location");
71749
- const [index, ...rest] = location;
71749
+ const [index, ...rest] = location2;
71750
71750
  if (index < 0 || index >= node.children.length) throw new Error("Invalid location");
71751
71751
  const child = node.children[index];
71752
71752
  path.push(node);
@@ -71952,8 +71952,8 @@ var BaseGrid = class extends Resizable {
71952
71952
  hasMaximizedGroup() {
71953
71953
  return this.gridview.hasMaximizedView();
71954
71954
  }
71955
- doAddGroup(group, location = [0], size4, gridview = this.gridview) {
71956
- gridview.addView(group, size4 !== null && size4 !== void 0 ? size4 : Sizing.Distribute, location);
71955
+ doAddGroup(group, location2 = [0], size4, gridview = this.gridview) {
71956
+ gridview.addView(group, size4 !== null && size4 !== void 0 ? size4 : Sizing.Distribute, location2);
71957
71957
  this._onDidAdd.fire(group);
71958
71958
  }
71959
71959
  doRemoveGroup(group, options) {
@@ -71993,8 +71993,8 @@ var BaseGrid = class extends Resizable {
71993
71993
  if (!this.activeGroup) return;
71994
71994
  options.group = this.activeGroup;
71995
71995
  }
71996
- const location = getGridLocation(options.group.element);
71997
- const next = (_this$gridview$next = this.gridview.next(location)) === null || _this$gridview$next === void 0 ? void 0 : _this$gridview$next.view;
71996
+ const location2 = getGridLocation(options.group.element);
71997
+ const next = (_this$gridview$next = this.gridview.next(location2)) === null || _this$gridview$next === void 0 ? void 0 : _this$gridview$next.view;
71998
71998
  this.doSetGroupActive(next);
71999
71999
  }
72000
72000
  activatePrevious(options) {
@@ -72004,8 +72004,8 @@ var BaseGrid = class extends Resizable {
72004
72004
  if (!this.activeGroup) return;
72005
72005
  options.group = this.activeGroup;
72006
72006
  }
72007
- const location = getGridLocation(options.group.element);
72008
- const next = (_this$gridview$previo = this.gridview.previous(location)) === null || _this$gridview$previo === void 0 ? void 0 : _this$gridview$previo.view;
72007
+ const location2 = getGridLocation(options.group.element);
72008
+ const next = (_this$gridview$previo = this.gridview.previous(location2)) === null || _this$gridview$previo === void 0 ? void 0 : _this$gridview$previo.view;
72009
72009
  this.doSetGroupActive(next);
72010
72010
  }
72011
72011
  forceRelayout() {
@@ -81702,10 +81702,10 @@ var AdvancedDnDService = class {
81702
81702
  } : void 0
81703
81703
  };
81704
81704
  }
81705
- resolveOverlayModel(location, group) {
81705
+ resolveOverlayModel(location2, group) {
81706
81706
  var _this$host$options$dr, _this$host$options;
81707
81707
  return (_this$host$options$dr = (_this$host$options = this.host.options).dropOverlayModel) === null || _this$host$options$dr === void 0 ? void 0 : _this$host$options$dr.call(_this$host$options, {
81708
- location,
81708
+ location: location2,
81709
81709
  group
81710
81710
  });
81711
81711
  }
@@ -83598,9 +83598,9 @@ var DockviewComponent = class extends BaseGrid {
83598
83598
  * Resolve the app-supplied drop overlay model (via the AdvancedDnD module)
83599
83599
  * for a group drop target, or `undefined` to keep the target's default.
83600
83600
  */
83601
- resolveDropOverlayModel(location, group) {
83601
+ resolveDropOverlayModel(location2, group) {
83602
83602
  var _this$_advancedDnDSer2;
83603
- return (_this$_advancedDnDSer2 = this._advancedDnDService) === null || _this$_advancedDnDSer2 === void 0 ? void 0 : _this$_advancedDnDSer2.resolveOverlayModel(location, group);
83603
+ return (_this$_advancedDnDSer2 = this._advancedDnDService) === null || _this$_advancedDnDSer2 === void 0 ? void 0 : _this$_advancedDnDSer2.resolveOverlayModel(location2, group);
83604
83604
  }
83605
83605
  /** Outermost element: the shell (incl. edge groups) once built, else the gridview. */
83606
83606
  get rootElement() {
@@ -83631,8 +83631,8 @@ var DockviewComponent = class extends BaseGrid {
83631
83631
  adjacentGroup(group, reverse) {
83632
83632
  var _ref2;
83633
83633
  if (group.api.location.type !== "grid") return;
83634
- const location = getGridLocation(group.element);
83635
- return (_ref2 = reverse ? this.gridview.previous(location) : this.gridview.next(location)) === null || _ref2 === void 0 ? void 0 : _ref2.view;
83634
+ const location2 = getGridLocation(group.element);
83635
+ return (_ref2 = reverse ? this.gridview.previous(location2) : this.gridview.next(location2)) === null || _ref2 === void 0 ? void 0 : _ref2.view;
83636
83636
  }
83637
83637
  /**
83638
83638
  * The nearest grid group in a spatial direction from `group`, by
@@ -84797,8 +84797,8 @@ var DockviewComponent = class extends BaseGrid {
84797
84797
  return;
84798
84798
  }
84799
84799
  }
84800
- const location = getGridLocation(options.group.element);
84801
- const next = (_this$gridview$next = this.gridview.next(location)) === null || _this$gridview$next === void 0 ? void 0 : _this$gridview$next.view;
84800
+ const location2 = getGridLocation(options.group.element);
84801
+ const next = (_this$gridview$next = this.gridview.next(location2)) === null || _this$gridview$next === void 0 ? void 0 : _this$gridview$next.view;
84802
84802
  this.doSetGroupAndPanelActive(next);
84803
84803
  }
84804
84804
  activatePrevious(options = {}) {
@@ -84813,8 +84813,8 @@ var DockviewComponent = class extends BaseGrid {
84813
84813
  return;
84814
84814
  }
84815
84815
  }
84816
- const location = getGridLocation(options.group.element);
84817
- const next = (_this$gridview$previo = this.gridview.previous(location)) === null || _this$gridview$previo === void 0 ? void 0 : _this$gridview$previo.view;
84816
+ const location2 = getGridLocation(options.group.element);
84817
+ const next = (_this$gridview$previo = this.gridview.previous(location2)) === null || _this$gridview$previo === void 0 ? void 0 : _this$gridview$previo.view;
84818
84818
  if (next) this.doSetGroupAndPanelActive(next);
84819
84819
  }
84820
84820
  /**
@@ -85262,8 +85262,8 @@ var DockviewComponent = class extends BaseGrid {
85262
85262
  });
85263
85263
  if (!options.inactive) this.doSetGroupAndPanelActive(referenceGroup);
85264
85264
  } else {
85265
- const location = getGridLocation(referenceGroup.element);
85266
- const relativeLocation = getRelativeLocation(this.gridview.orientation, location, target2);
85265
+ const location2 = getGridLocation(referenceGroup.element);
85266
+ const relativeLocation = getRelativeLocation(this.gridview.orientation, location2, target2);
85267
85267
  const group = this.createGroupAtLocation(relativeLocation, this.orientationAtLocation(relativeLocation) === "VERTICAL" ? initial === null || initial === void 0 ? void 0 : initial.height : initial === null || initial === void 0 ? void 0 : initial.width);
85268
85268
  panel = this.createPanel(options, group);
85269
85269
  group.model.openPanel(panel, {
@@ -85351,8 +85351,8 @@ var DockviewComponent = class extends BaseGrid {
85351
85351
  return group2;
85352
85352
  }
85353
85353
  const target2 = toTarget(options.direction || "within");
85354
- const location = getGridLocation(referenceGroup.element);
85355
- const relativeLocation = getRelativeLocation(this.gridview.orientation, location, target2);
85354
+ const location2 = getGridLocation(referenceGroup.element);
85355
+ const relativeLocation = getRelativeLocation(this.gridview.orientation, location2, target2);
85356
85356
  const group = this.createGroup(options);
85357
85357
  const size4 = this.getLocationOrientation(relativeLocation) === "VERTICAL" ? options.initialHeight : options.initialWidth;
85358
85358
  this.doAddGroup(group, relativeLocation, size4);
@@ -85365,8 +85365,8 @@ var DockviewComponent = class extends BaseGrid {
85365
85365
  return group;
85366
85366
  }
85367
85367
  }
85368
- getLocationOrientation(location) {
85369
- return location.length % 2 == 0 && this.gridview.orientation === "HORIZONTAL" ? "HORIZONTAL" : "VERTICAL";
85368
+ getLocationOrientation(location2) {
85369
+ return location2.length % 2 == 0 && this.gridview.orientation === "HORIZONTAL" ? "HORIZONTAL" : "VERTICAL";
85370
85370
  }
85371
85371
  removeGroup(group, options) {
85372
85372
  this.mutation("remove", () => this.doRemoveGroup(group, options));
@@ -85770,8 +85770,8 @@ var DockviewComponent = class extends BaseGrid {
85770
85770
  skipDispose: true
85771
85771
  }));
85772
85772
  const updatedReferenceLocation = getGridLocation(destinationGroup.element);
85773
- const location = getRelativeLocation(destinationGridview.orientation, updatedReferenceLocation, destinationTarget);
85774
- this.movingLock(() => this.doAddGroup(targetGroup, location, this.dropSizing(updatedReferenceLocation), destinationGridview));
85773
+ const location2 = getRelativeLocation(destinationGridview.orientation, updatedReferenceLocation, destinationTarget);
85774
+ this.movingLock(() => this.doAddGroup(targetGroup, location2, this.dropSizing(updatedReferenceLocation), destinationGridview));
85775
85775
  this.setGroupLocationForRoot(targetGroup, destinationGridview);
85776
85776
  this.doSetGroupAndPanelActive(targetGroup);
85777
85777
  this.fireDidMovePanel(this.getGroupPanel(sourceItemId), sourceGroup);
@@ -86088,9 +86088,9 @@ var DockviewComponent = class extends BaseGrid {
86088
86088
  dropSizing(referenceLocation) {
86089
86089
  return Sizing.Split(referenceLocation.length === 0 ? 0 : referenceLocation[referenceLocation.length - 1]);
86090
86090
  }
86091
- createGroupAtLocation(location, size4, options, gridview = this.gridview) {
86091
+ createGroupAtLocation(location2, size4, options, gridview = this.gridview) {
86092
86092
  const group = this.createGroup(options);
86093
- this.doAddGroup(group, location, size4, gridview);
86093
+ this.doAddGroup(group, location2, size4, gridview);
86094
86094
  this.setGroupLocationForRoot(group, gridview);
86095
86095
  return group;
86096
86096
  }
@@ -86142,9 +86142,9 @@ var DockviewComponent = class extends BaseGrid {
86142
86142
  var _Array$from$find;
86143
86143
  return (_Array$from$find = Array.from(this._groups.values()).find((group) => group.value.model.containsPanel(panel))) === null || _Array$from$find === void 0 ? void 0 : _Array$from$find.value;
86144
86144
  }
86145
- orientationAtLocation(location) {
86145
+ orientationAtLocation(location2) {
86146
86146
  const rootOrientation = this.gridview.orientation;
86147
- return location.length % 2 == 1 ? rootOrientation : orthogonal(rootOrientation);
86147
+ return location2.length % 2 == 1 ? rootOrientation : orthogonal(rootOrientation);
86148
86148
  }
86149
86149
  updateTheme() {
86150
86150
  var _this$_options$theme, _this$_shellThemeClas, _theme$gap, _this$_popoutWindowSe25, _this$_popoutWindowSe26, _this$_shellManager5, _theme$edgeGroupColla, _theme$tabGroupIndica;