vim-web 0.3.44-dev.25 → 0.3.44-dev.27

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/vim-web.js CHANGED
@@ -51282,7 +51282,7 @@ const KEYS = {
51282
51282
  KEY_Z: 90
51283
51283
  };
51284
51284
  const KeySet = new Set(Object.values(KEYS));
51285
- class KeyboardHandler extends InputHandler$1 {
51285
+ let KeyboardHandler$1 = class KeyboardHandler extends InputHandler$1 {
51286
51286
  constructor() {
51287
51287
  super(...arguments);
51288
51288
  // Settings
@@ -51388,7 +51388,7 @@ class KeyboardHandler extends InputHandler$1 {
51388
51388
  this.camera.localVelocity = move;
51389
51389
  }
51390
51390
  }
51391
- }
51391
+ };
51392
51392
  class SimpleInstanceSubmesh {
51393
51393
  constructor(mesh, index2) {
51394
51394
  __publicField(this, "mesh");
@@ -51637,7 +51637,7 @@ class InputAction {
51637
51637
  return this.raycast.object;
51638
51638
  }
51639
51639
  }
51640
- class TouchHandler extends InputHandler$1 {
51640
+ let TouchHandler$1 = class TouchHandler extends InputHandler$1 {
51641
51641
  constructor(viewer) {
51642
51642
  super(viewer);
51643
51643
  __publicField(this, "TAP_DURATION_MS", 500);
@@ -51790,8 +51790,8 @@ class TouchHandler extends InputHandler$1 {
51790
51790
  average(p1, p2) {
51791
51791
  return p1.clone().lerp(p2, 0.5);
51792
51792
  }
51793
- }
51794
- class MouseHandler extends InputHandler$1 {
51793
+ };
51794
+ let MouseHandler$1 = class MouseHandler extends InputHandler$1 {
51795
51795
  constructor(viewer) {
51796
51796
  super(viewer);
51797
51797
  __publicField(this, "_idleDelayMs", 150);
@@ -51891,7 +51891,6 @@ class MouseHandler extends InputHandler$1 {
51891
51891
  this.inputs.pointerOverride = void 0;
51892
51892
  });
51893
51893
  __publicField(this, "onDoubleClick", (event) => {
51894
- console.log("Double click");
51895
51894
  event.stopImmediatePropagation();
51896
51895
  this.onMouseClick(
51897
51896
  new Vector2(event.offsetX, event.offsetY),
@@ -52044,7 +52043,7 @@ class MouseHandler extends InputHandler$1 {
52044
52043
  this.gizmoRect.setCorners(this._downPosition, this._lastPosition);
52045
52044
  }
52046
52045
  }
52047
- }
52046
+ };
52048
52047
  var dist = {};
52049
52048
  var SimpleEventDispatcher = {};
52050
52049
  var hasRequiredSimpleEventDispatcher;
@@ -52314,9 +52313,9 @@ class Input {
52314
52313
  this.touch.unregister();
52315
52314
  });
52316
52315
  this._viewer = viewer;
52317
- this.keyboard = new KeyboardHandler(viewer);
52318
- this.mouse = new MouseHandler(viewer);
52319
- this.touch = new TouchHandler(viewer);
52316
+ this.keyboard = new KeyboardHandler$1(viewer);
52317
+ this.mouse = new MouseHandler$1(viewer);
52318
+ this.touch = new TouchHandler$1(viewer);
52320
52319
  this._scheme = new DefaultInputScheme(viewer);
52321
52320
  this.pointerActive = viewer.settings.camera.controls.orbit ? "orbit" : "look";
52322
52321
  this._pointerFallback = viewer.settings.camera.controls.orbit ? "look" : "orbit";
@@ -54882,7 +54881,6 @@ class MeasureGizmo {
54882
54881
  * Disposes all resources.
54883
54882
  */
54884
54883
  dispose() {
54885
- console.log("dispose");
54886
54884
  if (this._animId !== void 0) cancelAnimationFrame(this._animId);
54887
54885
  this._html.div.remove();
54888
54886
  this._viewer.renderer.remove(this._group);
@@ -57647,7 +57645,7 @@ class CaptureStateMachine {
57647
57645
  }
57648
57646
  }
57649
57647
  }
57650
- class InputMouse extends InputHandler2 {
57648
+ class MouseHandler2 extends InputHandler2 {
57651
57649
  constructor(canvas, rpc, selection, camera2) {
57652
57650
  super();
57653
57651
  __publicField(this, "_rpc");
@@ -57744,7 +57742,7 @@ class InputMouse extends InputHandler2 {
57744
57742
  );
57745
57743
  }
57746
57744
  }
57747
- class InputTouch extends InputHandler2 {
57745
+ class TouchHandler2 extends InputHandler2 {
57748
57746
  constructor(canvas, rpc) {
57749
57747
  super();
57750
57748
  __publicField(this, "_rpc");
@@ -59673,7 +59671,7 @@ const serverKeys = /* @__PURE__ */ new Set([
59673
59671
  "Control",
59674
59672
  "Shift"
59675
59673
  ]);
59676
- class InputKeyboard extends InputHandler2 {
59674
+ class KeyboardHandler2 extends InputHandler2 {
59677
59675
  constructor(rpc, selection, camera2, inputs) {
59678
59676
  super();
59679
59677
  __publicField(this, "_rpc");
@@ -59755,9 +59753,9 @@ class Inputs extends InputHandler2 {
59755
59753
  this._canvas = canvas;
59756
59754
  this._rpc = rpc;
59757
59755
  this._renderer = renderer;
59758
- this._inputsMouse = new InputMouse(this._canvas, this._rpc, selection, camera2);
59759
- this._inputsTouch = new InputTouch(this._canvas, this._rpc);
59760
- this._keyboard = new InputKeyboard(this._rpc, selection, camera2, this);
59756
+ this._inputsMouse = new MouseHandler2(this._canvas, this._rpc, selection, camera2);
59757
+ this._inputsTouch = new TouchHandler2(this._canvas, this._rpc);
59758
+ this._keyboard = new KeyboardHandler2(this._rpc, selection, camera2, this);
59761
59759
  }
59762
59760
  onConnect() {
59763
59761
  this.register();
@@ -60766,11 +60764,20 @@ class Vim2 {
60766
60764
  */
60767
60765
  removeHighlight(nodes, fallback) {
60768
60766
  const toUpdate = [];
60769
- for (const node of nodes) {
60770
- const state = this._nodeStates.get(node);
60771
- if (state === "highlighted") {
60772
- this._nodeStates.set(node, fallback);
60773
- toUpdate.push(node);
60767
+ if (nodes === "all") {
60768
+ for (const [node, state] of this._nodeStates.entries()) {
60769
+ if (state === "highlighted") {
60770
+ this._nodeStates.set(node, fallback);
60771
+ toUpdate.push(node);
60772
+ }
60773
+ }
60774
+ } else {
60775
+ for (const node of nodes) {
60776
+ const state = this._nodeStates.get(node);
60777
+ if (state === "highlighted") {
60778
+ this._nodeStates.set(node, fallback);
60779
+ toUpdate.push(node);
60780
+ }
60774
60781
  }
60775
60782
  }
60776
60783
  if (toUpdate.length > 0) {
@@ -61003,7 +61010,6 @@ class Viewport2 {
61003
61010
  * Cleans up resources by removing resize observer and clearing timeouts
61004
61011
  */
61005
61012
  dispose() {
61006
- console.log("Disposing Viewport");
61007
61013
  this._clearTimeout();
61008
61014
  this._observer.disconnect();
61009
61015
  }
@@ -61286,7 +61292,6 @@ class Camera3 {
61286
61292
  * @returns Promise that resolves when the framing animation is complete
61287
61293
  */
61288
61294
  async frameAll(blendTime = this._defaultBlendTime) {
61289
- console.log("Camera.frameAll");
61290
61295
  const segment = await this._rpc.RPCFrameAll(blendTime);
61291
61296
  this._savedPosition = this._savedPosition ?? segment;
61292
61297
  return segment;
@@ -61297,7 +61302,6 @@ class Camera3 {
61297
61302
  * @param blendTime - Duration of the camera animation in seconds (defaults to 0.5)
61298
61303
  */
61299
61304
  async frameBox(box, blendTime = this._defaultBlendTime) {
61300
- console.log("Camera.frameAll");
61301
61305
  const segment = await this._rpc.RPCFrameBox(box, blendTime);
61302
61306
  this._savedPosition = this._savedPosition ?? segment;
61303
61307
  return segment;
@@ -75962,7 +75966,6 @@ function useCamera(adapter) {
75962
75966
  }, []);
75963
75967
  const reset = useActionRef(() => adapter.resetCamera(1));
75964
75968
  const frameSelection2 = useAsyncFuncRef(async () => {
75965
- console.log("frameSelection");
75966
75969
  if (!adapter.hasSelection()) {
75967
75970
  frameScene.call();
75968
75971
  return;