vim-web 0.3.44-dev.42 → 0.3.44-dev.44

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
@@ -75379,6 +75379,8 @@ function useSectionBox(adapter) {
75379
75379
  const sideOffset = useStateRef("1");
75380
75380
  const bottomOffset = useStateRef("1");
75381
75381
  const boxRef = useRef(adapter.getBox());
75382
+ const getSelectionBox = useAsyncFuncRef(adapter.getSelectionBox);
75383
+ const getSceneBox = useAsyncFuncRef(adapter.getSceneBox);
75382
75384
  useEffect(() => {
75383
75385
  adapter.setVisible(false);
75384
75386
  adapter.setClip(false);
@@ -75393,7 +75395,7 @@ function useSectionBox(adapter) {
75393
75395
  if (v && auto.get()) {
75394
75396
  sectionSelection.call();
75395
75397
  } else {
75396
- sectionReset.call();
75398
+ sectionScene.call();
75397
75399
  }
75398
75400
  });
75399
75401
  visible2.useValidate((v) => enable.get() && v);
@@ -75415,15 +75417,11 @@ function useSectionBox(adapter) {
75415
75417
  adapter.setBox(newBox);
75416
75418
  });
75417
75419
  const sectionSelection = useFuncRef(async () => {
75418
- try {
75419
- const box = await adapter.getSelectionBox() ?? await adapter.getRendererBox();
75420
- sectionBox2.call(box);
75421
- } catch (e) {
75422
- console.error(e);
75423
- }
75420
+ const box = await getSelectionBox.call() ?? await getSceneBox.call();
75421
+ sectionBox2.call(box);
75424
75422
  });
75425
- const sectionReset = useFuncRef(async () => {
75426
- const box = await adapter.getRendererBox();
75423
+ const sectionScene = useFuncRef(async () => {
75424
+ const box = await getSceneBox.call();
75427
75425
  sectionBox2.call(box);
75428
75426
  });
75429
75427
  return {
@@ -75435,9 +75433,11 @@ function useSectionBox(adapter) {
75435
75433
  sideOffset,
75436
75434
  bottomOffset,
75437
75435
  sectionSelection,
75438
- sectionReset,
75436
+ sectionReset: sectionScene,
75439
75437
  sectionBox: sectionBox2,
75440
- getBox: () => adapter.getBox()
75438
+ getBox: () => adapter.getBox(),
75439
+ getSceneBox,
75440
+ getSelectionBox
75441
75441
  };
75442
75442
  }
75443
75443
  const sanitize = (value, strict) => {
@@ -75472,7 +75472,7 @@ function useWebglSectionBox(viewer) {
75472
75472
  getBox: () => viewer.gizmos.sectionBox.getBox(),
75473
75473
  setBox: (box) => viewer.gizmos.sectionBox.setBox(box),
75474
75474
  getSelectionBox: () => Promise.resolve(viewer.selection.getBoundingBox()),
75475
- getRendererBox: () => Promise.resolve(viewer.renderer.getBoundingBox()),
75475
+ getSceneBox: () => Promise.resolve(viewer.renderer.getBoundingBox()),
75476
75476
  onSelectionChanged: viewer.selection.onValueChanged
75477
75477
  };
75478
75478
  return useSectionBox(vimAdapter);
@@ -76026,9 +76026,9 @@ function useUltraSectionBox(viewer) {
76026
76026
  },
76027
76027
  getBox: () => viewer.sectionBox.getBox(),
76028
76028
  setBox: (box) => viewer.sectionBox.fitBox(box),
76029
+ onSelectionChanged: viewer.selection.onValueChanged,
76029
76030
  getSelectionBox: () => viewer.selection.getBoundingBox(),
76030
- getRendererBox: () => viewer.renderer.getBoundingBox(),
76031
- onSelectionChanged: viewer.selection.onValueChanged
76031
+ getSceneBox: () => viewer.renderer.getBoundingBox()
76032
76032
  };
76033
76033
  return useSectionBox(ultraAdapter);
76034
76034
  }