@lvce-editor/explorer-view 6.15.0 → 6.16.0
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/explorerViewWorkerMain.js +29 -23
- package/package.json +1 -1
|
@@ -13,13 +13,13 @@ const create$a = () => {
|
|
|
13
13
|
},
|
|
14
14
|
diff(uid, modules, numbers) {
|
|
15
15
|
const {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
oldState,
|
|
17
|
+
scheduledState
|
|
18
18
|
} = states[uid];
|
|
19
19
|
const diffResult = [];
|
|
20
20
|
for (let i = 0; i < modules.length; i++) {
|
|
21
21
|
const fn = modules[i];
|
|
22
|
-
if (!fn(oldState,
|
|
22
|
+
if (!fn(oldState, scheduledState)) {
|
|
23
23
|
diffResult.push(numbers[i]);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -37,17 +37,16 @@ const create$a = () => {
|
|
|
37
37
|
return ids;
|
|
38
38
|
},
|
|
39
39
|
getKeys() {
|
|
40
|
-
return Object.keys(states).map(
|
|
41
|
-
return Number.parseFloat(key);
|
|
42
|
-
});
|
|
40
|
+
return Object.keys(states).map(Number);
|
|
43
41
|
},
|
|
44
42
|
registerCommands(commandMap) {
|
|
45
43
|
Object.assign(commandMapRef, commandMap);
|
|
46
44
|
},
|
|
47
|
-
set(uid, oldState, newState) {
|
|
45
|
+
set(uid, oldState, newState, scheduledState) {
|
|
48
46
|
states[uid] = {
|
|
49
47
|
newState,
|
|
50
|
-
oldState
|
|
48
|
+
oldState,
|
|
49
|
+
scheduledState: scheduledState ?? newState
|
|
51
50
|
};
|
|
52
51
|
},
|
|
53
52
|
wrapCommand(fn) {
|
|
@@ -67,7 +66,8 @@ const create$a = () => {
|
|
|
67
66
|
};
|
|
68
67
|
states[uid] = {
|
|
69
68
|
newState: latestNew,
|
|
70
|
-
oldState: latestOld.oldState
|
|
69
|
+
oldState: latestOld.oldState,
|
|
70
|
+
scheduledState: latestNew
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
73
|
return wrapped;
|
|
@@ -104,7 +104,8 @@ const create$a = () => {
|
|
|
104
104
|
};
|
|
105
105
|
states[uid] = {
|
|
106
106
|
newState: latestNew,
|
|
107
|
-
oldState: latestOld.oldState
|
|
107
|
+
oldState: latestOld.oldState,
|
|
108
|
+
scheduledState: latestNew
|
|
108
109
|
};
|
|
109
110
|
return {
|
|
110
111
|
error
|
|
@@ -2971,7 +2972,7 @@ const wrapListItemCommand = fn => {
|
|
|
2971
2972
|
useChevrons
|
|
2972
2973
|
} = updatedState;
|
|
2973
2974
|
const intermediate = get(id);
|
|
2974
|
-
set(id, intermediate.oldState, updatedState);
|
|
2975
|
+
set(id, intermediate.oldState, updatedState, intermediate.scheduledState);
|
|
2975
2976
|
if (hasSameVisibleExplorerItemInputs(intermediate.newState, updatedState)) {
|
|
2976
2977
|
return;
|
|
2977
2978
|
}
|
|
@@ -3003,11 +3004,13 @@ const Slash = '/';
|
|
|
3003
3004
|
const create = (id, uri, x, y, width, height, args, parentUid, platform = 0, assetDir = '') => {
|
|
3004
3005
|
const state = {
|
|
3005
3006
|
assetDir,
|
|
3007
|
+
chevronSpace: 22,
|
|
3006
3008
|
compareSourceUri: '',
|
|
3007
3009
|
confirmDelete: false,
|
|
3008
3010
|
confirmPaste: false,
|
|
3009
3011
|
cutItems: [],
|
|
3010
3012
|
decorations: [],
|
|
3013
|
+
defaultPaddingLeft: 0,
|
|
3011
3014
|
deltaY: 0,
|
|
3012
3015
|
dropTargets: [],
|
|
3013
3016
|
editingErrorMessage: '',
|
|
@@ -3024,6 +3027,7 @@ const create = (id, uri, x, y, width, height, args, parentUid, platform = 0, ass
|
|
|
3024
3027
|
errorMessageWidth: 0,
|
|
3025
3028
|
excluded: [],
|
|
3026
3029
|
fileIconCache: Object.create(null),
|
|
3030
|
+
fileIconWidth: 16,
|
|
3027
3031
|
finalDeltaY: 0,
|
|
3028
3032
|
focus: 0,
|
|
3029
3033
|
focused: false,
|
|
@@ -3035,6 +3039,7 @@ const create = (id, uri, x, y, width, height, args, parentUid, platform = 0, ass
|
|
|
3035
3039
|
height,
|
|
3036
3040
|
hoverIndex: -1,
|
|
3037
3041
|
icons: [],
|
|
3042
|
+
indent: 8,
|
|
3038
3043
|
initial: true,
|
|
3039
3044
|
inputSource: 0,
|
|
3040
3045
|
isPointerDown: false,
|
|
@@ -3043,6 +3048,7 @@ const create = (id, uri, x, y, width, height, args, parentUid, platform = 0, ass
|
|
|
3043
3048
|
maxIndent: 0,
|
|
3044
3049
|
maxLineY: 0,
|
|
3045
3050
|
minLineY: 0,
|
|
3051
|
+
padding: 10,
|
|
3046
3052
|
parentUid,
|
|
3047
3053
|
pasteShouldMove: false,
|
|
3048
3054
|
pathSeparator: Slash,
|
|
@@ -3125,10 +3131,10 @@ const diff = (oldState, newState) => {
|
|
|
3125
3131
|
|
|
3126
3132
|
const diff2 = uid => {
|
|
3127
3133
|
const {
|
|
3128
|
-
|
|
3129
|
-
|
|
3134
|
+
oldState,
|
|
3135
|
+
scheduledState
|
|
3130
3136
|
} = get(uid);
|
|
3131
|
-
const result = diff(oldState,
|
|
3137
|
+
const result = diff(oldState, scheduledState);
|
|
3132
3138
|
return result;
|
|
3133
3139
|
};
|
|
3134
3140
|
|
|
@@ -5870,12 +5876,17 @@ const getUniqueIndents = items => {
|
|
|
5870
5876
|
|
|
5871
5877
|
const renderCss = (oldState, newState) => {
|
|
5872
5878
|
const {
|
|
5879
|
+
chevronSpace,
|
|
5880
|
+
defaultPaddingLeft,
|
|
5873
5881
|
deltaY,
|
|
5882
|
+
fileIconWidth,
|
|
5874
5883
|
focusedIndex,
|
|
5875
5884
|
height,
|
|
5885
|
+
indent,
|
|
5876
5886
|
itemHeight,
|
|
5877
5887
|
items,
|
|
5878
5888
|
minLineY,
|
|
5889
|
+
padding,
|
|
5879
5890
|
uid,
|
|
5880
5891
|
visibleExplorerItems,
|
|
5881
5892
|
width
|
|
@@ -5884,11 +5895,6 @@ const renderCss = (oldState, newState) => {
|
|
|
5884
5895
|
const contentHeight = items.length * itemHeight;
|
|
5885
5896
|
const scrollBarTop = getScrollBarTop(height, contentHeight, deltaY);
|
|
5886
5897
|
const scrollBarHeight = getScrollBarSize(height, contentHeight, 20);
|
|
5887
|
-
const indent = 8;
|
|
5888
|
-
const padding = 10;
|
|
5889
|
-
const fileIconWidth = 16;
|
|
5890
|
-
const defaultPaddingLeft = 0;
|
|
5891
|
-
const chevronSpace = 22;
|
|
5892
5898
|
const depth = items[focusedIndex]?.depth || 0;
|
|
5893
5899
|
const {
|
|
5894
5900
|
errorMessageWidth,
|
|
@@ -6385,11 +6391,11 @@ const applyRender = (oldState, newState, diffResult) => {
|
|
|
6385
6391
|
|
|
6386
6392
|
const render2 = (uid, diffResult) => {
|
|
6387
6393
|
const {
|
|
6388
|
-
|
|
6389
|
-
|
|
6394
|
+
oldState,
|
|
6395
|
+
scheduledState
|
|
6390
6396
|
} = get(uid);
|
|
6391
|
-
set(uid,
|
|
6392
|
-
const commands = applyRender(oldState,
|
|
6397
|
+
set(uid, scheduledState, scheduledState);
|
|
6398
|
+
const commands = applyRender(oldState, scheduledState, diffResult);
|
|
6393
6399
|
return commands;
|
|
6394
6400
|
};
|
|
6395
6401
|
|