vim-web 0.3.44-dev.35 → 0.3.44-dev.37

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
@@ -68058,7 +68058,7 @@ function controlBarActions(camera2, settings2, isolation, measure$1) {
68058
68058
  {
68059
68059
  id: ids.buttonZoomToFit,
68060
68060
  enabled: () => isTrue(settings2.ui.zoomToFit),
68061
- tip: "Zoom to Fit",
68061
+ tip: "Frame Camera",
68062
68062
  action: () => camera2.frameSelection.call(),
68063
68063
  icon: frameSelection,
68064
68064
  isOn: () => false,
@@ -74747,7 +74747,7 @@ function addPerformanceCounter(parent) {
74747
74747
  }
74748
74748
  animate();
74749
74749
  }
74750
- class ComponentInputs {
74750
+ class WebglInputs {
74751
74751
  constructor(viewer, camera2, isolation, sideState) {
74752
74752
  __publicField(this, "_viewer");
74753
74753
  __publicField(this, "_camera");
@@ -75906,14 +75906,14 @@ function useSectionBox(adapter) {
75906
75906
  topOffset.useConfirm((v) => sanitize(v, true));
75907
75907
  sideOffset.useConfirm((v) => sanitize(v, true));
75908
75908
  bottomOffset.useConfirm((v) => sanitize(v, true));
75909
- topOffset.useOnChange((v) => section.call(boxRef.current));
75910
- sideOffset.useOnChange((v) => section.call(boxRef.current));
75911
- bottomOffset.useOnChange((v) => section.call(boxRef.current));
75909
+ topOffset.useOnChange((v) => sectionBox2.call(boxRef.current));
75910
+ sideOffset.useOnChange((v) => sectionBox2.call(boxRef.current));
75911
+ bottomOffset.useOnChange((v) => sectionBox2.call(boxRef.current));
75912
75912
  auto.useOnChange((v) => {
75913
75913
  if (v) sectionSelection.call();
75914
75914
  });
75915
75915
  visible2.useOnChange((v) => adapter.setVisible(v));
75916
- const section = useArgActionRef((baseBox) => {
75916
+ const sectionBox2 = useArgActionRef((baseBox) => {
75917
75917
  if (baseBox === void 0) return;
75918
75918
  boxRef.current = baseBox;
75919
75919
  const newBox = addBox(baseBox, offsetsToBox3(topOffset.get(), sideOffset.get(), bottomOffset.get()));
@@ -75922,14 +75922,14 @@ function useSectionBox(adapter) {
75922
75922
  const sectionSelection = useFuncRef(async () => {
75923
75923
  try {
75924
75924
  const box = await adapter.getSelectionBox() ?? await adapter.getRendererBox();
75925
- section.call(box);
75925
+ sectionBox2.call(box);
75926
75926
  } catch (e) {
75927
75927
  console.error(e);
75928
75928
  }
75929
75929
  });
75930
75930
  const sectionReset = useFuncRef(async () => {
75931
75931
  const box = await adapter.getRendererBox();
75932
- section.call(box);
75932
+ sectionBox2.call(box);
75933
75933
  });
75934
75934
  return {
75935
75935
  enable,
@@ -75941,7 +75941,8 @@ function useSectionBox(adapter) {
75941
75941
  bottomOffset,
75942
75942
  sectionSelection,
75943
75943
  sectionReset,
75944
- section
75944
+ sectionBox: sectionBox2,
75945
+ getBox: () => adapter.getBox()
75945
75946
  };
75946
75947
  }
75947
75948
  const sanitize = (value, strict) => {
@@ -76097,7 +76098,7 @@ function VimComponent(props) {
76097
76098
  }
76098
76099
  cursor.register();
76099
76100
  props.viewer.viewport.canvas.tabIndex = 0;
76100
- props.viewer.inputs.scheme = new ComponentInputs(
76101
+ props.viewer.inputs.scheme = new WebglInputs(
76101
76102
  props.viewer,
76102
76103
  camera2,
76103
76104
  isolation,
@@ -76545,10 +76546,29 @@ function useUltraSectionBox(viewer) {
76545
76546
  function useUltraControlBar(viewer, section, camera2, customization) {
76546
76547
  const sectionSectionBox = controlBarSectionBox(section, viewer.selection.count > 0);
76547
76548
  const sectionCamera = controlBarCamera(camera2);
76548
- let bar = [sectionCamera, sectionSectionBox];
76549
+ const frame = frameSection(camera2);
76550
+ let bar = [sectionCamera, frame, sectionSectionBox];
76549
76551
  bar = (customization == null ? void 0 : customization(bar)) ?? bar;
76550
76552
  return bar;
76551
76553
  }
76554
+ function frameSection(camera2) {
76555
+ return {
76556
+ id: ids.sectionActions,
76557
+ enable: () => true,
76558
+ style: sectionDefaultStyle,
76559
+ buttons: [
76560
+ {
76561
+ id: ids.buttonZoomToFit,
76562
+ enabled: () => true,
76563
+ tip: "Frame Camera",
76564
+ action: () => camera2.frameSelection.call(),
76565
+ icon: frameSelection,
76566
+ isOn: () => false,
76567
+ style: buttonDefaultStyle
76568
+ }
76569
+ ]
76570
+ };
76571
+ }
76552
76572
  function useUltraCamera(viewer, section) {
76553
76573
  return useCamera({
76554
76574
  onSelectionChanged: viewer.selection.onValueChanged,