vim-web 0.3.44-dev.24 → 0.3.44-dev.26
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.
|
@@ -76,7 +76,7 @@ export declare class Vim {
|
|
|
76
76
|
* @param nodes - The nodes to remove the highlight from.
|
|
77
77
|
* @param fallback - The state to revert the nodes to.
|
|
78
78
|
*/
|
|
79
|
-
removeHighlight(nodes: number[], fallback: NodeState): void;
|
|
79
|
+
removeHighlight(nodes: number[] | 'all', fallback: NodeState): void;
|
|
80
80
|
/**
|
|
81
81
|
* Retrieves the bounding box of the given nodes.
|
|
82
82
|
* @param nodes - The nodes to get the bounding box for.
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -60782,11 +60782,20 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
60782
60782
|
*/
|
|
60783
60783
|
removeHighlight(nodes, fallback) {
|
|
60784
60784
|
const toUpdate = [];
|
|
60785
|
-
|
|
60786
|
-
const state
|
|
60787
|
-
|
|
60788
|
-
|
|
60789
|
-
|
|
60785
|
+
if (nodes === "all") {
|
|
60786
|
+
for (const [node, state] of this._nodeStates.entries()) {
|
|
60787
|
+
if (state === "highlighted") {
|
|
60788
|
+
this._nodeStates.set(node, fallback);
|
|
60789
|
+
toUpdate.push(node);
|
|
60790
|
+
}
|
|
60791
|
+
}
|
|
60792
|
+
} else {
|
|
60793
|
+
for (const node of nodes) {
|
|
60794
|
+
const state = this._nodeStates.get(node);
|
|
60795
|
+
if (state === "highlighted") {
|
|
60796
|
+
this._nodeStates.set(node, fallback);
|
|
60797
|
+
toUpdate.push(node);
|
|
60798
|
+
}
|
|
60790
60799
|
}
|
|
60791
60800
|
}
|
|
60792
60801
|
if (toUpdate.length > 0) {
|
|
@@ -75867,6 +75876,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75867
75876
|
const sideOffset = useStateRef("1");
|
|
75868
75877
|
const bottomOffset = useStateRef("1");
|
|
75869
75878
|
const boxRef = React2.useRef(adapter.getBox());
|
|
75879
|
+
React2.useEffect(() => {
|
|
75880
|
+
adapter.setClip(true);
|
|
75881
|
+
adapter.setVisible(false);
|
|
75882
|
+
return adapter.onSelectionChanged.sub(() => {
|
|
75883
|
+
if (auto.get() && enable.get()) sectionSelection.call();
|
|
75884
|
+
});
|
|
75885
|
+
}, []);
|
|
75870
75886
|
enable.useOnChange((v) => {
|
|
75871
75887
|
visible2.set(v);
|
|
75872
75888
|
showOffsetPanel.set(false);
|
|
@@ -75888,12 +75904,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75888
75904
|
if (v) sectionSelection.call();
|
|
75889
75905
|
});
|
|
75890
75906
|
visible2.useOnChange((v) => adapter.setVisible(v));
|
|
75891
|
-
React2.useEffect(() => {
|
|
75892
|
-
adapter.setVisible(false);
|
|
75893
|
-
return adapter.onSelectionChanged.sub(() => {
|
|
75894
|
-
if (auto.get() && enable.get()) sectionSelection.call();
|
|
75895
|
-
});
|
|
75896
|
-
}, []);
|
|
75897
75907
|
const section = useArgActionRef((baseBox) => {
|
|
75898
75908
|
boxRef.current = baseBox;
|
|
75899
75909
|
const newBox = addBox(baseBox, offsetsToBox3(topOffset.get(), sideOffset.get(), bottomOffset.get()));
|
|
@@ -75946,10 +75956,12 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75946
75956
|
}
|
|
75947
75957
|
function useWebglSectionBox(viewer) {
|
|
75948
75958
|
const vimAdapter = {
|
|
75959
|
+
setClip: (b) => {
|
|
75960
|
+
viewer.gizmos.sectionBox.clip = b;
|
|
75961
|
+
},
|
|
75949
75962
|
setVisible: (b) => {
|
|
75950
75963
|
viewer.gizmos.sectionBox.visible = b;
|
|
75951
75964
|
viewer.gizmos.sectionBox.interactive = b;
|
|
75952
|
-
viewer.gizmos.sectionBox.clip = b;
|
|
75953
75965
|
},
|
|
75954
75966
|
getBox: () => viewer.gizmos.sectionBox.box.clone(),
|
|
75955
75967
|
fitBox: (box) => viewer.gizmos.sectionBox.fitBox(box),
|
|
@@ -76495,11 +76507,12 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76495
76507
|
}
|
|
76496
76508
|
function useUltraSectionBox(viewer) {
|
|
76497
76509
|
const ultraAdapter = {
|
|
76510
|
+
setClip: (b) => {
|
|
76511
|
+
viewer.sectionBox.clip = b;
|
|
76512
|
+
},
|
|
76498
76513
|
setVisible: (b) => {
|
|
76499
|
-
console.log("SetVisible!", b);
|
|
76500
76514
|
viewer.sectionBox.visible = b;
|
|
76501
76515
|
viewer.sectionBox.interactive = b;
|
|
76502
|
-
viewer.sectionBox.clip = b;
|
|
76503
76516
|
},
|
|
76504
76517
|
getBox: () => viewer.sectionBox.getBox().clone(),
|
|
76505
76518
|
fitBox: (box) => viewer.sectionBox.fitBox(box),
|