vim-web 0.3.44-dev.36 → 0.3.44-dev.38

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
@@ -59199,7 +59199,12 @@ class RpcSafeClient {
59199
59199
  this.rpc.RPCEnableSectionBox(enable);
59200
59200
  }
59201
59201
  RPCSetSectionBox(state) {
59202
- this.rpc.RPCSetSectionBox(state);
59202
+ this.rpc.RPCSetSectionBox(
59203
+ {
59204
+ ...state,
59205
+ box: state.box ?? new Box3(new Vector3(), new Vector3())
59206
+ }
59207
+ );
59203
59208
  }
59204
59209
  async RPCGetSectionBox() {
59205
59210
  return await this.safeCall(
@@ -61821,7 +61826,7 @@ class SectionBox2 {
61821
61826
  __publicField(this, "_visible", false);
61822
61827
  __publicField(this, "_interactible", false);
61823
61828
  __publicField(this, "_clip", false);
61824
- __publicField(this, "_box", new Box3());
61829
+ __publicField(this, "_box");
61825
61830
  __publicField(this, "_rpc");
61826
61831
  __publicField(this, "_interval");
61827
61832
  __publicField(this, "_animationFrame");
@@ -68058,7 +68063,7 @@ function controlBarActions(camera2, settings2, isolation, measure$1) {
68058
68063
  {
68059
68064
  id: ids.buttonZoomToFit,
68060
68065
  enabled: () => isTrue(settings2.ui.zoomToFit),
68061
- tip: "Zoom to Fit",
68066
+ tip: "Frame Camera",
68062
68067
  action: () => camera2.frameSelection.call(),
68063
68068
  icon: frameSelection,
68064
68069
  isOn: () => false,
@@ -74747,7 +74752,7 @@ function addPerformanceCounter(parent) {
74747
74752
  }
74748
74753
  animate();
74749
74754
  }
74750
- class ComponentInputs {
74755
+ class WebglInputs {
74751
74756
  constructor(viewer, camera2, isolation, sideState) {
74752
74757
  __publicField(this, "_viewer");
74753
74758
  __publicField(this, "_camera");
@@ -76098,7 +76103,7 @@ function VimComponent(props) {
76098
76103
  }
76099
76104
  cursor.register();
76100
76105
  props.viewer.viewport.canvas.tabIndex = 0;
76101
- props.viewer.inputs.scheme = new ComponentInputs(
76106
+ props.viewer.inputs.scheme = new WebglInputs(
76102
76107
  props.viewer,
76103
76108
  camera2,
76104
76109
  isolation,
@@ -76546,10 +76551,29 @@ function useUltraSectionBox(viewer) {
76546
76551
  function useUltraControlBar(viewer, section, camera2, customization) {
76547
76552
  const sectionSectionBox = controlBarSectionBox(section, viewer.selection.count > 0);
76548
76553
  const sectionCamera = controlBarCamera(camera2);
76549
- let bar = [sectionCamera, sectionSectionBox];
76554
+ const frame = frameSection(camera2);
76555
+ let bar = [sectionCamera, frame, sectionSectionBox];
76550
76556
  bar = (customization == null ? void 0 : customization(bar)) ?? bar;
76551
76557
  return bar;
76552
76558
  }
76559
+ function frameSection(camera2) {
76560
+ return {
76561
+ id: ids.sectionActions,
76562
+ enable: () => true,
76563
+ style: sectionDefaultStyle,
76564
+ buttons: [
76565
+ {
76566
+ id: ids.buttonZoomToFit,
76567
+ enabled: () => true,
76568
+ tip: "Frame Camera",
76569
+ action: () => camera2.frameSelection.call(),
76570
+ icon: frameSelection,
76571
+ isOn: () => false,
76572
+ style: buttonDefaultStyle
76573
+ }
76574
+ ]
76575
+ };
76576
+ }
76553
76577
  function useUltraCamera(viewer, section) {
76554
76578
  return useCamera({
76555
76579
  onSelectionChanged: viewer.selection.onValueChanged,