vim-web 0.3.44-dev.26 → 0.3.44-dev.28

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();
@@ -61012,7 +61010,6 @@ class Viewport2 {
61012
61010
  * Cleans up resources by removing resize observer and clearing timeouts
61013
61011
  */
61014
61012
  dispose() {
61015
- console.log("Disposing Viewport");
61016
61013
  this._clearTimeout();
61017
61014
  this._observer.disconnect();
61018
61015
  }
@@ -61295,7 +61292,6 @@ class Camera3 {
61295
61292
  * @returns Promise that resolves when the framing animation is complete
61296
61293
  */
61297
61294
  async frameAll(blendTime = this._defaultBlendTime) {
61298
- console.log("Camera.frameAll");
61299
61295
  const segment = await this._rpc.RPCFrameAll(blendTime);
61300
61296
  this._savedPosition = this._savedPosition ?? segment;
61301
61297
  return segment;
@@ -61306,7 +61302,6 @@ class Camera3 {
61306
61302
  * @param blendTime - Duration of the camera animation in seconds (defaults to 0.5)
61307
61303
  */
61308
61304
  async frameBox(box, blendTime = this._defaultBlendTime) {
61309
- console.log("Camera.frameAll");
61310
61305
  const segment = await this._rpc.RPCFrameBox(box, blendTime);
61311
61306
  this._savedPosition = this._savedPosition ?? segment;
61312
61307
  return segment;
@@ -61793,9 +61788,9 @@ class Renderer2 {
61793
61788
  }
61794
61789
  class SectionBox2 {
61795
61790
  constructor(rpc) {
61796
- __publicField(this, "_visible", true);
61797
- __publicField(this, "_interactible", true);
61798
- __publicField(this, "_clip", true);
61791
+ __publicField(this, "_visible", false);
61792
+ __publicField(this, "_interactible", false);
61793
+ __publicField(this, "_clip", false);
61799
61794
  __publicField(this, "_box", new Box3());
61800
61795
  __publicField(this, "_rpc");
61801
61796
  __publicField(this, "_interval");
@@ -75861,13 +75856,14 @@ function useSectionBox(adapter) {
75861
75856
  const bottomOffset = useStateRef("1");
75862
75857
  const boxRef = useRef(adapter.getBox());
75863
75858
  useEffect(() => {
75864
- adapter.setClip(true);
75865
75859
  adapter.setVisible(false);
75860
+ adapter.setClip(false);
75866
75861
  return adapter.onSelectionChanged.sub(() => {
75867
75862
  if (auto.get() && enable.get()) sectionSelection.call();
75868
75863
  });
75869
75864
  }, []);
75870
75865
  enable.useOnChange((v) => {
75866
+ adapter.setClip(v);
75871
75867
  visible2.set(v);
75872
75868
  showOffsetPanel.set(false);
75873
75869
  if (v && auto.get()) {
@@ -75971,7 +75967,6 @@ function useCamera(adapter) {
75971
75967
  }, []);
75972
75968
  const reset = useActionRef(() => adapter.resetCamera(1));
75973
75969
  const frameSelection2 = useAsyncFuncRef(async () => {
75974
- console.log("frameSelection");
75975
75970
  if (!adapter.hasSelection()) {
75976
75971
  frameScene.call();
75977
75972
  return;
@@ -76253,11 +76248,13 @@ const errorStyle = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
76253
76248
  vcRoboto
76254
76249
  }, Symbol.toStringTag, { value: "Module" }));
76255
76250
  const support = "https://docs.vimaec.com";
76251
+ const supportUltra = "https://docs.vimaec.com/docs/vim-for-windows/configuring-vim-ultra";
76256
76252
  const supportControls = "https://docs.vimaec.com/docs/vim-cloud/webgl-navigation-and-controls-guide";
76257
76253
  const urls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
76258
76254
  __proto__: null,
76259
76255
  support,
76260
- supportControls
76256
+ supportControls,
76257
+ supportUltra
76261
76258
  }, Symbol.toStringTag, { value: "Module" }));
76262
76259
  function fileOpeningError(url) {
76263
76260
  return {
@@ -76303,12 +76300,12 @@ function serverFileDownloadingError(url, authToken, server) {
76303
76300
  }
76304
76301
  return {
76305
76302
  title: "File Downloading Error",
76306
- body: body$4(server, authToken, server),
76303
+ body: body$4(url, authToken, server),
76307
76304
  footer: footer(support),
76308
76305
  canClose: false
76309
76306
  };
76310
76307
  }
76311
- function body$4(url, server, authToken) {
76308
+ function body$4(url, authToken, server) {
76312
76309
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: vcRoboto, children: [
76313
76310
  mainText(/* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
76314
76311
  "Oops, it appears that there’s an ",
@@ -76373,7 +76370,7 @@ function body$2(url, local) {
76373
76370
  /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
76374
76371
  "Ensure that VIM Ultra",
76375
76372
  " ",
76376
- link(support, "process is running"),
76373
+ link(supportUltra, "process is running"),
76377
76374
  " ",
76378
76375
  "at ",
76379
76376
  detailText(url)
@@ -76455,7 +76452,7 @@ function getErrorMessage(state) {
76455
76452
  return serverStreamError(state.serverUrl);
76456
76453
  }
76457
76454
  }
76458
- function getRequestErrorMessage(source, error) {
76455
+ function getRequestErrorMessage(serverUrl, source, error) {
76459
76456
  console.log(error);
76460
76457
  switch (error) {
76461
76458
  case "loadingError":
@@ -76463,7 +76460,7 @@ function getRequestErrorMessage(source, error) {
76463
76460
  case "downloadingError":
76464
76461
  case "unknown":
76465
76462
  case "cancelled":
76466
- return serverFileDownloadingError(source.url);
76463
+ return serverFileDownloadingError(source.url, source.authToken, serverUrl);
76467
76464
  case "serverDisconnected":
76468
76465
  return serverConnectionError(source.url);
76469
76466
  }
@@ -76609,7 +76606,7 @@ function patchLoad(viewer, modal) {
76609
76606
  void request2.getResult().then(
76610
76607
  (result) => {
76611
76608
  if (result.isError) {
76612
- modal.message(getRequestErrorMessage(source, result.error));
76609
+ modal.message(getRequestErrorMessage(viewer.serverUrl, source, result.error));
76613
76610
  return;
76614
76611
  }
76615
76612
  if (result.isSuccess) {