vim-web 0.3.44-dev.14 → 0.3.44-dev.16

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
@@ -75872,16 +75872,15 @@ function useSectionBox(adapter) {
75872
75872
  const boxRef = useRef(adapter.getBox());
75873
75873
  enable.useOnChange((v) => {
75874
75874
  visible2.set(v);
75875
- auto.set(false);
75876
75875
  showOffsetPanel.set(false);
75877
- topOffset.set("1");
75878
- sideOffset.set("1");
75879
- bottomOffset.set("1");
75880
- void sectionReset.call();
75876
+ if (v && auto.get()) {
75877
+ sectionSelection.call();
75878
+ } else {
75879
+ sectionReset.call();
75880
+ }
75881
75881
  });
75882
- topOffset.useValidate((v) => sanitize(v, false));
75883
- sideOffset.useValidate((v) => sanitize(v, false));
75884
- bottomOffset.useValidate((v) => sanitize(v, false));
75882
+ visible2.useValidate((v) => enable.get() && v);
75883
+ showOffsetPanel.useValidate((v) => enable.get() && v);
75885
75884
  topOffset.useConfirm((v) => sanitize(v, true));
75886
75885
  sideOffset.useConfirm((v) => sanitize(v, true));
75887
75886
  bottomOffset.useConfirm((v) => sanitize(v, true));
@@ -75891,12 +75890,12 @@ function useSectionBox(adapter) {
75891
75890
  auto.useOnChange((v) => {
75892
75891
  if (v) sectionSelection.call();
75893
75892
  });
75893
+ visible2.useOnChange((v) => adapter.setVisible(v));
75894
75894
  useEffect(() => {
75895
75895
  return adapter.onSelectionChanged.sub(() => {
75896
- if (auto.get()) sectionSelection.call();
75896
+ if (auto.get() && enable.get()) sectionSelection.call();
75897
75897
  });
75898
75898
  }, []);
75899
- visible2.useOnChange((v) => adapter.setVisible(v));
75900
75899
  const section = useArgActionRef((baseBox) => {
75901
75900
  boxRef.current = baseBox;
75902
75901
  const newBox = addBox(baseBox, offsetsToBox3(topOffset.get(), sideOffset.get(), bottomOffset.get()));