@lvce-editor/renderer-process 30.57.0 → 30.57.1
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/rendererProcessMain.js +236 -119
- package/package.json +1 -1
|
@@ -5053,6 +5053,7 @@ const setHeight = ($Element, height) => {
|
|
|
5053
5053
|
|
|
5054
5054
|
const FocusLocationList = 17;
|
|
5055
5055
|
const FocusMenu = 18;
|
|
5056
|
+
const FocusSimpleBrowserInput = 23;
|
|
5056
5057
|
const FocusOutput = 28;
|
|
5057
5058
|
|
|
5058
5059
|
// TODO when pressing tab -> focus next element in tab order and close menu
|
|
@@ -6430,10 +6431,10 @@ const handleMouseDown$3 = event => {
|
|
|
6430
6431
|
const index = getNodeIndex($Item);
|
|
6431
6432
|
return ['handleClickIndex', button, index, clientX, clientY];
|
|
6432
6433
|
};
|
|
6433
|
-
const handleBlur$
|
|
6434
|
+
const handleBlur$7 = () => {
|
|
6434
6435
|
return ['handleBlur'];
|
|
6435
6436
|
};
|
|
6436
|
-
const handleFocus$
|
|
6437
|
+
const handleFocus$9 = () => {
|
|
6437
6438
|
return ['handleFocus'];
|
|
6438
6439
|
};
|
|
6439
6440
|
|
|
@@ -6452,9 +6453,9 @@ const returnValue$8 = true;
|
|
|
6452
6453
|
|
|
6453
6454
|
const ViewletActivityBarEvents = {
|
|
6454
6455
|
__proto__: null,
|
|
6455
|
-
handleBlur: handleBlur$
|
|
6456
|
+
handleBlur: handleBlur$7,
|
|
6456
6457
|
handleContextMenu: handleContextMenu$6,
|
|
6457
|
-
handleFocus: handleFocus$
|
|
6458
|
+
handleFocus: handleFocus$9,
|
|
6458
6459
|
handleMouseDown: handleMouseDown$3,
|
|
6459
6460
|
returnValue: returnValue$8
|
|
6460
6461
|
};
|
|
@@ -6517,7 +6518,7 @@ forwardViewletCommand('focusPrevious');
|
|
|
6517
6518
|
const handleAudioError$1 = forwardViewletCommand('handleAudioError');
|
|
6518
6519
|
forwardViewletCommand('handleBeforeInput');
|
|
6519
6520
|
forwardViewletCommand('handleBeforeInputFromContentEditable');
|
|
6520
|
-
const handleBlur$
|
|
6521
|
+
const handleBlur$6 = forwardViewletCommand('handleBlur');
|
|
6521
6522
|
const handleButtonClick = forwardViewletCommand('handleButtonClick');
|
|
6522
6523
|
const handleClick$6 = forwardViewletCommand('handleClick');
|
|
6523
6524
|
const handleClickAction$2 = forwardViewletCommand('handleClickAction');
|
|
@@ -6545,11 +6546,11 @@ forwardViewletCommand('handleClickSize');
|
|
|
6545
6546
|
forwardViewletCommand('handleClickDisable');
|
|
6546
6547
|
forwardViewletCommand('handleClickUninstall');
|
|
6547
6548
|
forwardViewletCommand('handleFilterInput');
|
|
6548
|
-
const handleFocus$
|
|
6549
|
+
const handleFocus$8 = forwardViewletCommand('handleFocus');
|
|
6549
6550
|
const handleFocusIn$4 = forwardViewletCommand('handleFocusIn');
|
|
6550
6551
|
forwardViewletCommand('handleIconError');
|
|
6551
6552
|
const handleImageError = forwardViewletCommand('handleImageError');
|
|
6552
|
-
const handleInput$
|
|
6553
|
+
const handleInput$6 = forwardViewletCommand('handleInput');
|
|
6553
6554
|
const handleKeyDown$3 = forwardViewletCommand('handleKeyDown');
|
|
6554
6555
|
const handleLink = forwardViewletCommand('handleLink');
|
|
6555
6556
|
forwardViewletCommand('handleListBlur');
|
|
@@ -6775,7 +6776,7 @@ const ViewletColorPicker = {
|
|
|
6775
6776
|
setOffsetX
|
|
6776
6777
|
};
|
|
6777
6778
|
|
|
6778
|
-
const handleInput$
|
|
6779
|
+
const handleInput$5 = event => {
|
|
6779
6780
|
const uid = fromEvent(event);
|
|
6780
6781
|
const {
|
|
6781
6782
|
target
|
|
@@ -6783,17 +6784,17 @@ const handleInput$3 = event => {
|
|
|
6783
6784
|
const {
|
|
6784
6785
|
value
|
|
6785
6786
|
} = target;
|
|
6786
|
-
handleInput$
|
|
6787
|
+
handleInput$6(uid, value);
|
|
6787
6788
|
};
|
|
6788
|
-
const handleFocus$
|
|
6789
|
+
const handleFocus$7 = event => {
|
|
6789
6790
|
const uid = fromEvent(event);
|
|
6790
|
-
handleFocus$
|
|
6791
|
+
handleFocus$8(uid);
|
|
6791
6792
|
};
|
|
6792
6793
|
|
|
6793
6794
|
const ViewletDebugConsoleEvents = {
|
|
6794
6795
|
__proto__: null,
|
|
6795
|
-
handleFocus: handleFocus$
|
|
6796
|
-
handleInput: handleInput$
|
|
6796
|
+
handleFocus: handleFocus$7,
|
|
6797
|
+
handleInput: handleInput$5
|
|
6797
6798
|
};
|
|
6798
6799
|
|
|
6799
6800
|
const create$n = () => {
|
|
@@ -6829,14 +6830,14 @@ const handleKeyDown$2 = event => {
|
|
|
6829
6830
|
} = event;
|
|
6830
6831
|
handleKeyDown$3(uid, key, altKey, ctrlKey, shiftKey, metaKey);
|
|
6831
6832
|
};
|
|
6832
|
-
const handleBlur$
|
|
6833
|
+
const handleBlur$5 = event => {
|
|
6833
6834
|
const uid = fromEvent(event);
|
|
6834
|
-
handleBlur$
|
|
6835
|
+
handleBlur$6(uid);
|
|
6835
6836
|
};
|
|
6836
6837
|
|
|
6837
6838
|
const ViewletDefineKeyBindingEvents = {
|
|
6838
6839
|
__proto__: null,
|
|
6839
|
-
handleBlur: handleBlur$
|
|
6840
|
+
handleBlur: handleBlur$5,
|
|
6840
6841
|
handleKeyDown: handleKeyDown$2
|
|
6841
6842
|
};
|
|
6842
6843
|
|
|
@@ -7194,15 +7195,15 @@ const handleFocusIn$3 = event => {
|
|
|
7194
7195
|
const uid = fromEvent(event);
|
|
7195
7196
|
handleFocusIn$4(uid);
|
|
7196
7197
|
};
|
|
7197
|
-
const handleBlur$
|
|
7198
|
+
const handleBlur$4 = event => {
|
|
7198
7199
|
preventDefault(event);
|
|
7199
7200
|
const uid = fromEvent(event);
|
|
7200
|
-
handleBlur$
|
|
7201
|
+
handleBlur$6(uid);
|
|
7201
7202
|
};
|
|
7202
7203
|
|
|
7203
7204
|
const ViewletEditorCodeGeneratorEvents = {
|
|
7204
7205
|
__proto__: null,
|
|
7205
|
-
handleBlur: handleBlur$
|
|
7206
|
+
handleBlur: handleBlur$4,
|
|
7206
7207
|
handleFocusIn: handleFocusIn$3
|
|
7207
7208
|
};
|
|
7208
7209
|
|
|
@@ -7705,9 +7706,9 @@ const handleError$4 = event => {
|
|
|
7705
7706
|
const uid = fromEvent(event);
|
|
7706
7707
|
handleImageError(uid);
|
|
7707
7708
|
};
|
|
7708
|
-
const handleFocus$
|
|
7709
|
+
const handleFocus$6 = event => {
|
|
7709
7710
|
const uid = fromEvent(event);
|
|
7710
|
-
handleFocus$
|
|
7711
|
+
handleFocus$8(uid);
|
|
7711
7712
|
};
|
|
7712
7713
|
|
|
7713
7714
|
const create$i = () => {
|
|
@@ -7723,7 +7724,7 @@ const attachEvents$4 = state => {
|
|
|
7723
7724
|
} = state;
|
|
7724
7725
|
attachEvents$7($Viewlet, {
|
|
7725
7726
|
[ContextMenu]: handleContextMenu$2,
|
|
7726
|
-
[FocusIn]: handleFocus$
|
|
7727
|
+
[FocusIn]: handleFocus$6,
|
|
7727
7728
|
[PointerDown]: handlePointerDown$1,
|
|
7728
7729
|
[PointerUp]: handlePointerUp
|
|
7729
7730
|
});
|
|
@@ -7982,7 +7983,7 @@ const ViewletExtensionView = {
|
|
|
7982
7983
|
setIframe: setIframe$1
|
|
7983
7984
|
};
|
|
7984
7985
|
|
|
7985
|
-
const handleInput$
|
|
7986
|
+
const handleInput$4 = event => {
|
|
7986
7987
|
const {
|
|
7987
7988
|
target
|
|
7988
7989
|
} = event;
|
|
@@ -8030,7 +8031,7 @@ const handleReplaceInput = event => {
|
|
|
8030
8031
|
const handleReplaceFocus = event => {
|
|
8031
8032
|
return ['FindWidget.handleReplaceFocus'];
|
|
8032
8033
|
};
|
|
8033
|
-
const handleFocus$
|
|
8034
|
+
const handleFocus$5 = event => {
|
|
8034
8035
|
return ['FindWidget.handleFocus'];
|
|
8035
8036
|
};
|
|
8036
8037
|
const handleToggleReplaceFocus = event => {
|
|
@@ -8058,12 +8059,12 @@ const ViewletFindWidgetEvents = {
|
|
|
8058
8059
|
handleClickReplace,
|
|
8059
8060
|
handleClickReplaceAll,
|
|
8060
8061
|
handleClickToggleReplace,
|
|
8061
|
-
handleFocus: handleFocus$
|
|
8062
|
+
handleFocus: handleFocus$5,
|
|
8062
8063
|
handleFocusClose,
|
|
8063
8064
|
handleFocusNext,
|
|
8064
8065
|
handleFocusPrevious,
|
|
8065
8066
|
handleFocusReplaceAll,
|
|
8066
|
-
handleInput: handleInput$
|
|
8067
|
+
handleInput: handleInput$4,
|
|
8067
8068
|
handleInputBlur,
|
|
8068
8069
|
handleReplaceFocus,
|
|
8069
8070
|
handleReplaceInput,
|
|
@@ -8403,10 +8404,10 @@ const handleSashDoubleClick$1 = id => {
|
|
|
8403
8404
|
const handleResize$1 = (width, height) => {
|
|
8404
8405
|
send$1('Layout.handleResize', width, height);
|
|
8405
8406
|
};
|
|
8406
|
-
const handleFocus$
|
|
8407
|
+
const handleFocus$4 = () => {
|
|
8407
8408
|
send$1('Layout.handleFocus');
|
|
8408
8409
|
};
|
|
8409
|
-
const handleBlur$
|
|
8410
|
+
const handleBlur$3 = () => {
|
|
8410
8411
|
send$1('Layout.handleBlur');
|
|
8411
8412
|
};
|
|
8412
8413
|
|
|
@@ -8452,11 +8453,11 @@ const handleResize = () => {
|
|
|
8452
8453
|
} = window;
|
|
8453
8454
|
handleResize$1(innerWidth, innerHeight);
|
|
8454
8455
|
};
|
|
8455
|
-
const handleFocus$
|
|
8456
|
-
handleFocus$
|
|
8456
|
+
const handleFocus$3 = () => {
|
|
8457
|
+
handleFocus$4();
|
|
8457
8458
|
};
|
|
8458
|
-
const handleBlur$
|
|
8459
|
-
handleBlur$
|
|
8459
|
+
const handleBlur$2 = () => {
|
|
8460
|
+
handleBlur$3();
|
|
8460
8461
|
};
|
|
8461
8462
|
const handleKeyDown = handleKeyDown$1;
|
|
8462
8463
|
const handleKeyUp = handleKeyUp$1;
|
|
@@ -8496,8 +8497,8 @@ const attachEvents$3 = state => {
|
|
|
8496
8497
|
[PointerDown]: handleSashPointerDown
|
|
8497
8498
|
});
|
|
8498
8499
|
attachEvents$7(window, {
|
|
8499
|
-
[Blur]: handleBlur$
|
|
8500
|
-
[Focus]: handleFocus$
|
|
8500
|
+
[Blur]: handleBlur$2,
|
|
8501
|
+
[Focus]: handleFocus$3,
|
|
8501
8502
|
[KeyDown]: handleKeyDown,
|
|
8502
8503
|
[KeyUp]: handleKeyUp,
|
|
8503
8504
|
[Resize]: handleResize
|
|
@@ -8938,8 +8939,186 @@ const ViewletSidebar = {
|
|
|
8938
8939
|
setTitle
|
|
8939
8940
|
};
|
|
8940
8941
|
|
|
8942
|
+
const pendingSelections = new WeakMap();
|
|
8943
|
+
const state$2 = {};
|
|
8944
|
+
const handleFocus$2 = event => {
|
|
8945
|
+
const target = event.target;
|
|
8946
|
+
if (target instanceof HTMLElement && !target.closest('.SimpleBrowser') && target.closest('.Main, .Panel, .Editor, .Terminal')) {
|
|
8947
|
+
state$2.codingFocus = new WeakRef(target);
|
|
8948
|
+
}
|
|
8949
|
+
};
|
|
8950
|
+
const listen = () => {
|
|
8951
|
+
document.addEventListener('focusin', handleFocus$2);
|
|
8952
|
+
};
|
|
8953
|
+
const restoreCodingFocus$1 = () => {
|
|
8954
|
+
const target = state$2.codingFocus?.deref();
|
|
8955
|
+
if (!target?.isConnected) {
|
|
8956
|
+
return false;
|
|
8957
|
+
}
|
|
8958
|
+
target.focus({
|
|
8959
|
+
preventScroll: true
|
|
8960
|
+
});
|
|
8961
|
+
return document.activeElement === target;
|
|
8962
|
+
};
|
|
8963
|
+
const getAddress = uid => {
|
|
8964
|
+
return get$a(uid)?.state.$Viewlet.querySelector('[name="simple-browser-address"]');
|
|
8965
|
+
};
|
|
8966
|
+
const captureBrowserAddress$1 = uid => {
|
|
8967
|
+
const address = getAddress(uid);
|
|
8968
|
+
return address && document.activeElement === address ? {
|
|
8969
|
+
end: address.selectionEnd,
|
|
8970
|
+
start: address.selectionStart
|
|
8971
|
+
} : undefined;
|
|
8972
|
+
};
|
|
8973
|
+
const queueBrowserAddressSelection = address => {
|
|
8974
|
+
clearTimeout(pendingSelections.get(address));
|
|
8975
|
+
const timer = setTimeout(() => {
|
|
8976
|
+
pendingSelections.delete(address);
|
|
8977
|
+
if (!address.isConnected) return;
|
|
8978
|
+
const suggestions = address.closest('.SimpleBrowser')?.querySelector('.SimpleBrowserSuggestions');
|
|
8979
|
+
if (suggestions) address.setSelectionRange(address.value.length, address.value.length);else address.select();
|
|
8980
|
+
});
|
|
8981
|
+
pendingSelections.set(address, timer);
|
|
8982
|
+
};
|
|
8983
|
+
const focusBrowserAddress$1 = (uid, selection) => {
|
|
8984
|
+
const address = getAddress(uid);
|
|
8985
|
+
if (!address) return;
|
|
8986
|
+
address.focus({
|
|
8987
|
+
preventScroll: true
|
|
8988
|
+
});
|
|
8989
|
+
clearTimeout(pendingSelections.get(address));
|
|
8990
|
+
pendingSelections.delete(address);
|
|
8991
|
+
if (selection) address.setSelectionRange(selection.start, selection.end);else address.select();
|
|
8992
|
+
};
|
|
8993
|
+
const revealBrowserTab$1 = uid => {
|
|
8994
|
+
const root = get$a(uid)?.state.$Viewlet;
|
|
8995
|
+
root?.querySelector('.SimpleBrowserTabSelected')?.scrollIntoView({
|
|
8996
|
+
block: 'nearest',
|
|
8997
|
+
inline: 'nearest'
|
|
8998
|
+
});
|
|
8999
|
+
};
|
|
9000
|
+
const browserParents = new Map();
|
|
9001
|
+
const rememberBrowserParent$1 = uid => {
|
|
9002
|
+
if (browserParents.has(uid)) return;
|
|
9003
|
+
const browser = get$a(uid)?.state.$Viewlet;
|
|
9004
|
+
if (!browser?.parentNode) return;
|
|
9005
|
+
const marker = document.createComment('browser workspace position');
|
|
9006
|
+
browser.before(marker);
|
|
9007
|
+
browserParents.set(uid, marker);
|
|
9008
|
+
};
|
|
9009
|
+
const restoreBrowserParent$1 = uid => {
|
|
9010
|
+
const marker = browserParents.get(uid);
|
|
9011
|
+
browserParents.delete(uid);
|
|
9012
|
+
if (!marker) return;
|
|
9013
|
+
const browser = get$a(uid)?.state.$Viewlet;
|
|
9014
|
+
if (browser && marker.isConnected) marker.replaceWith(browser);else marker.remove();
|
|
9015
|
+
};
|
|
9016
|
+
|
|
9017
|
+
const handleInput$3 = value => {
|
|
9018
|
+
send$1('SimpleBrowser.handleInput', value);
|
|
9019
|
+
};
|
|
9020
|
+
const acceptSuggestion = value => {
|
|
9021
|
+
send$1('SimpleBrowser.acceptSuggestion', value);
|
|
9022
|
+
};
|
|
9023
|
+
const closeSuggestions = () => {
|
|
9024
|
+
send$1('SimpleBrowser.closeSuggestions');
|
|
9025
|
+
};
|
|
9026
|
+
const forward = () => {
|
|
9027
|
+
send$1('SimpleBrowser.forward');
|
|
9028
|
+
};
|
|
9029
|
+
const backward = () => {
|
|
9030
|
+
send$1('SimpleBrowser.backward');
|
|
9031
|
+
};
|
|
9032
|
+
const reload$1 = () => {
|
|
9033
|
+
send$1('SimpleBrowser.reload');
|
|
9034
|
+
};
|
|
9035
|
+
const cancelNavigation = () => {
|
|
9036
|
+
send$1('SimpleBrowser.cancelNavigation');
|
|
9037
|
+
};
|
|
9038
|
+
const openExternal = () => {
|
|
9039
|
+
send$1('SimpleBrowser.openExternal');
|
|
9040
|
+
};
|
|
9041
|
+
|
|
9042
|
+
const simpleBrowserAddressName = 'simple-browser-address';
|
|
9043
|
+
const handleInput$2 = event => {
|
|
9044
|
+
const {
|
|
9045
|
+
target
|
|
9046
|
+
} = event;
|
|
9047
|
+
const {
|
|
9048
|
+
value
|
|
9049
|
+
} = target;
|
|
9050
|
+
handleInput$3(value);
|
|
9051
|
+
};
|
|
9052
|
+
const handleClickSuggestion = event => {
|
|
9053
|
+
const suggestion = event.target.closest?.('.SimpleBrowserSuggestion');
|
|
9054
|
+
const value = suggestion?.dataset.value;
|
|
9055
|
+
if (typeof value !== 'string') {
|
|
9056
|
+
return;
|
|
9057
|
+
}
|
|
9058
|
+
acceptSuggestion(value);
|
|
9059
|
+
};
|
|
9060
|
+
const handleFocus$1 = event => {
|
|
9061
|
+
const {
|
|
9062
|
+
target
|
|
9063
|
+
} = event;
|
|
9064
|
+
send$1('Focus.setFocus', FocusSimpleBrowserInput);
|
|
9065
|
+
queueBrowserAddressSelection(target);
|
|
9066
|
+
};
|
|
9067
|
+
const handleBlur$1 = event => {
|
|
9068
|
+
const {
|
|
9069
|
+
relatedTarget,
|
|
9070
|
+
target
|
|
9071
|
+
} = event;
|
|
9072
|
+
setTimeout(() => {
|
|
9073
|
+
if (!target.isConnected) {
|
|
9074
|
+
return;
|
|
9075
|
+
}
|
|
9076
|
+
if (target.ownerDocument.hasFocus() && target.ownerDocument.activeElement?.getAttribute('name') === simpleBrowserAddressName) {
|
|
9077
|
+
return;
|
|
9078
|
+
}
|
|
9079
|
+
target.setSelectionRange(0, 0);
|
|
9080
|
+
if (!relatedTarget?.closest?.('.SimpleBrowserSuggestions')) {
|
|
9081
|
+
closeSuggestions();
|
|
9082
|
+
}
|
|
9083
|
+
});
|
|
9084
|
+
};
|
|
9085
|
+
const handleClickForward = () => {
|
|
9086
|
+
forward();
|
|
9087
|
+
};
|
|
9088
|
+
const handleClickBackward = () => {
|
|
9089
|
+
backward();
|
|
9090
|
+
};
|
|
9091
|
+
const handleClickReload = event => {
|
|
9092
|
+
const {
|
|
9093
|
+
target
|
|
9094
|
+
} = event;
|
|
9095
|
+
// TODO maybe set data attribute to check if it is a cancel button
|
|
9096
|
+
// TODO do checks in renderer worker
|
|
9097
|
+
if (target.title === 'Cancel') {
|
|
9098
|
+
cancelNavigation();
|
|
9099
|
+
} else {
|
|
9100
|
+
reload$1();
|
|
9101
|
+
}
|
|
9102
|
+
};
|
|
9103
|
+
const handleClickOpenExternal = () => {
|
|
9104
|
+
openExternal();
|
|
9105
|
+
};
|
|
9106
|
+
|
|
9107
|
+
const ViewletSimpleBrowserEvents = {
|
|
9108
|
+
__proto__: null,
|
|
9109
|
+
handleBlur: handleBlur$1,
|
|
9110
|
+
handleClickBackward,
|
|
9111
|
+
handleClickForward,
|
|
9112
|
+
handleClickOpenExternal,
|
|
9113
|
+
handleClickReload,
|
|
9114
|
+
handleClickSuggestion,
|
|
9115
|
+
handleFocus: handleFocus$1,
|
|
9116
|
+
handleInput: handleInput$2
|
|
9117
|
+
};
|
|
9118
|
+
|
|
8941
9119
|
const ViewletSimpleBrowser = {
|
|
8942
|
-
__proto__: null
|
|
9120
|
+
__proto__: null,
|
|
9121
|
+
Events: ViewletSimpleBrowserEvents
|
|
8943
9122
|
};
|
|
8944
9123
|
|
|
8945
9124
|
const ViewletSimpleBrowserHistory = {
|
|
@@ -8957,9 +9136,9 @@ const handleContextMenu$1 = event => {
|
|
|
8957
9136
|
handleContextMenu$5(uid, button, clientX, clientY);
|
|
8958
9137
|
};
|
|
8959
9138
|
|
|
8960
|
-
const handleFocus
|
|
9139
|
+
const handleFocus = event => {
|
|
8961
9140
|
const uid = fromEvent(event);
|
|
8962
|
-
handleFocus$
|
|
9141
|
+
handleFocus$8(uid);
|
|
8963
9142
|
};
|
|
8964
9143
|
const getButtonIndex = $Node => {
|
|
8965
9144
|
let index = -1;
|
|
@@ -9027,14 +9206,14 @@ const handleInput$1 = event => {
|
|
|
9027
9206
|
value
|
|
9028
9207
|
} = target;
|
|
9029
9208
|
const uid = fromEvent(event);
|
|
9030
|
-
handleInput$
|
|
9209
|
+
handleInput$6(uid, value);
|
|
9031
9210
|
};
|
|
9032
9211
|
|
|
9033
9212
|
const ViewletSourceControlEvents = {
|
|
9034
9213
|
__proto__: null,
|
|
9035
9214
|
handleClick: handleClick$3,
|
|
9036
9215
|
handleContextMenu: handleContextMenu$1,
|
|
9037
|
-
handleFocus
|
|
9216
|
+
handleFocus,
|
|
9038
9217
|
handleInput: handleInput$1,
|
|
9039
9218
|
handleMouseOut,
|
|
9040
9219
|
handleMouseOver,
|
|
@@ -9277,7 +9456,7 @@ const handleMenuClick = event => {
|
|
|
9277
9456
|
};
|
|
9278
9457
|
const handleFocusIn$1 = event => {
|
|
9279
9458
|
const uid = fromEvent(event);
|
|
9280
|
-
handleFocus$
|
|
9459
|
+
handleFocus$8(uid);
|
|
9281
9460
|
};
|
|
9282
9461
|
|
|
9283
9462
|
const ViewletTitleBarMenuBarEvents = {
|
|
@@ -9822,14 +10001,14 @@ const load$1 = moduleId => {
|
|
|
9822
10001
|
return loadModule();
|
|
9823
10002
|
};
|
|
9824
10003
|
|
|
9825
|
-
const state$
|
|
10004
|
+
const state$1 = {
|
|
9826
10005
|
currentPanelView: undefined,
|
|
9827
10006
|
currentSidebarView: undefined,
|
|
9828
10007
|
modules: Object.create(null)
|
|
9829
10008
|
};
|
|
9830
10009
|
|
|
9831
10010
|
const create$2 = (id, uid = id) => {
|
|
9832
|
-
const module = state$
|
|
10011
|
+
const module = state$1.modules[id];
|
|
9833
10012
|
if (!module) {
|
|
9834
10013
|
throw new Error(`module not found: ${id}`);
|
|
9835
10014
|
}
|
|
@@ -9848,7 +10027,7 @@ const create$2 = (id, uid = id) => {
|
|
|
9848
10027
|
});
|
|
9849
10028
|
};
|
|
9850
10029
|
const createFunctionalRoot = (id, uid = id, hasFunctionalEvents, directEventRpcId) => {
|
|
9851
|
-
let module = state$
|
|
10030
|
+
let module = state$1.modules[id];
|
|
9852
10031
|
if (hasFunctionalEvents) {
|
|
9853
10032
|
module ||= {};
|
|
9854
10033
|
}
|
|
@@ -9880,7 +10059,7 @@ const removeKeyBindings = id => {
|
|
|
9880
10059
|
const loadModule = async id => {
|
|
9881
10060
|
try {
|
|
9882
10061
|
const module = await load$1(id);
|
|
9883
|
-
state$
|
|
10062
|
+
state$1.modules[id] = module;
|
|
9884
10063
|
} catch (error) {
|
|
9885
10064
|
throw new VError(error, `Failed to load ${id}`);
|
|
9886
10065
|
}
|
|
@@ -10035,7 +10214,7 @@ const refresh = (viewletId, viewletContext) => {
|
|
|
10035
10214
|
instance.factory.refresh(instance.state, viewletContext);
|
|
10036
10215
|
} else {
|
|
10037
10216
|
// @ts-expect-error
|
|
10038
|
-
state$
|
|
10217
|
+
state$1.refreshContext[viewletId] = viewletContext;
|
|
10039
10218
|
}
|
|
10040
10219
|
};
|
|
10041
10220
|
const specialIds = new Set(['TitleBar', 'SideBar', 'Main', 'ActivityBar', 'StatusBar', 'Panel']);
|
|
@@ -10291,8 +10470,8 @@ const move = async (uid, selector, target) => {
|
|
|
10291
10470
|
};
|
|
10292
10471
|
const attachWindowEvents = () => {
|
|
10293
10472
|
attachEvents$7(window, {
|
|
10294
|
-
[Blur]: handleBlur$
|
|
10295
|
-
[Focus]: handleFocus$
|
|
10473
|
+
[Blur]: handleBlur$2,
|
|
10474
|
+
[Focus]: handleFocus$3,
|
|
10296
10475
|
[KeyDown]: handleKeyDown,
|
|
10297
10476
|
[KeyUp]: handleKeyUp,
|
|
10298
10477
|
[Resize]: handleResize
|
|
@@ -10664,68 +10843,6 @@ const clear = storageType => {
|
|
|
10664
10843
|
storage.clear();
|
|
10665
10844
|
};
|
|
10666
10845
|
|
|
10667
|
-
const state$1 = {};
|
|
10668
|
-
const handleFocus = event => {
|
|
10669
|
-
const target = event.target;
|
|
10670
|
-
if (target instanceof HTMLElement && !target.closest('.SimpleBrowser') && target.closest('.Main, .Panel, .Editor, .Terminal')) {
|
|
10671
|
-
state$1.codingFocus = new WeakRef(target);
|
|
10672
|
-
}
|
|
10673
|
-
};
|
|
10674
|
-
const listen = () => {
|
|
10675
|
-
document.addEventListener('focusin', handleFocus);
|
|
10676
|
-
};
|
|
10677
|
-
const restoreCodingFocus$1 = () => {
|
|
10678
|
-
const target = state$1.codingFocus?.deref();
|
|
10679
|
-
if (!target?.isConnected) {
|
|
10680
|
-
return false;
|
|
10681
|
-
}
|
|
10682
|
-
target.focus({
|
|
10683
|
-
preventScroll: true
|
|
10684
|
-
});
|
|
10685
|
-
return document.activeElement === target;
|
|
10686
|
-
};
|
|
10687
|
-
const getAddress = uid => {
|
|
10688
|
-
return get$a(uid)?.state.$Viewlet.querySelector('[name="simple-browser-address"]');
|
|
10689
|
-
};
|
|
10690
|
-
const captureBrowserAddress$1 = uid => {
|
|
10691
|
-
const address = getAddress(uid);
|
|
10692
|
-
return address && document.activeElement === address ? {
|
|
10693
|
-
end: address.selectionEnd,
|
|
10694
|
-
start: address.selectionStart
|
|
10695
|
-
} : undefined;
|
|
10696
|
-
};
|
|
10697
|
-
const focusBrowserAddress$1 = (uid, selection) => {
|
|
10698
|
-
const address = getAddress(uid);
|
|
10699
|
-
if (!address) return;
|
|
10700
|
-
address.focus({
|
|
10701
|
-
preventScroll: true
|
|
10702
|
-
});
|
|
10703
|
-
if (selection) address.setSelectionRange(selection.start, selection.end);else address.select();
|
|
10704
|
-
};
|
|
10705
|
-
const revealBrowserTab$1 = uid => {
|
|
10706
|
-
const root = get$a(uid)?.state.$Viewlet;
|
|
10707
|
-
root?.querySelector('.SimpleBrowserTabSelected')?.scrollIntoView({
|
|
10708
|
-
block: 'nearest',
|
|
10709
|
-
inline: 'nearest'
|
|
10710
|
-
});
|
|
10711
|
-
};
|
|
10712
|
-
const browserParents = new Map();
|
|
10713
|
-
const rememberBrowserParent$1 = uid => {
|
|
10714
|
-
if (browserParents.has(uid)) return;
|
|
10715
|
-
const browser = get$a(uid)?.state.$Viewlet;
|
|
10716
|
-
if (!browser?.parentNode) return;
|
|
10717
|
-
const marker = document.createComment('browser workspace position');
|
|
10718
|
-
browser.before(marker);
|
|
10719
|
-
browserParents.set(uid, marker);
|
|
10720
|
-
};
|
|
10721
|
-
const restoreBrowserParent$1 = uid => {
|
|
10722
|
-
const marker = browserParents.get(uid);
|
|
10723
|
-
browserParents.delete(uid);
|
|
10724
|
-
if (!marker) return;
|
|
10725
|
-
const browser = get$a(uid)?.state.$Viewlet;
|
|
10726
|
-
if (browser && marker.isConnected) marker.replaceWith(browser);else marker.remove();
|
|
10727
|
-
};
|
|
10728
|
-
|
|
10729
10846
|
const reload = () => {
|
|
10730
10847
|
location.reload();
|
|
10731
10848
|
};
|
|
@@ -11717,15 +11834,15 @@ const main = async () => {
|
|
|
11717
11834
|
initialize(location.search);
|
|
11718
11835
|
Object.assign(commandMapRef, commandMap);
|
|
11719
11836
|
enable(window);
|
|
11720
|
-
state$
|
|
11721
|
-
state$
|
|
11722
|
-
state$
|
|
11723
|
-
state$
|
|
11724
|
-
state$
|
|
11725
|
-
state$
|
|
11726
|
-
state$
|
|
11727
|
-
state$
|
|
11728
|
-
state$
|
|
11837
|
+
state$1.modules[ColorPicker] = ViewletColorPicker;
|
|
11838
|
+
state$1.modules[EditorCodeGenerator] = ViewletEditorCodeGenerator;
|
|
11839
|
+
state$1.modules[EditorCompletion] = ViewletEditorCompletion;
|
|
11840
|
+
state$1.modules[EditorCompletionDetails] = ViewletEditorCompletionDetails;
|
|
11841
|
+
state$1.modules[EditorHover] = ViewletEditorHover;
|
|
11842
|
+
state$1.modules[EditorRename] = ViewletEditorRename;
|
|
11843
|
+
state$1.modules[EditorSourceActions] = ViewletEditorSourceActions;
|
|
11844
|
+
state$1.modules[FindWidget] = ViewletFindWidget;
|
|
11845
|
+
state$1.modules[TitleBar] = ViewletTitleBar;
|
|
11729
11846
|
// TODO this is discovered very late
|
|
11730
11847
|
const launchWorkersResult = await launchWorkers();
|
|
11731
11848
|
if (isError(launchWorkersResult)) {
|
|
@@ -11800,7 +11917,7 @@ const mountTerminal = async (state, uid) => {
|
|
|
11800
11917
|
return;
|
|
11801
11918
|
}
|
|
11802
11919
|
const inputDisposable = terminal.onData(data => {
|
|
11803
|
-
handleInput$
|
|
11920
|
+
handleInput$6(uid, data);
|
|
11804
11921
|
});
|
|
11805
11922
|
const resizeDisposable = terminal.onResize(({
|
|
11806
11923
|
cols,
|