@lvce-editor/main-area-worker 9.74.2 → 9.74.4
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/mainAreaWorkerMain.js +13 -0
- package/package.json +1 -1
|
@@ -4010,6 +4010,7 @@ const HandleTabDragOver = 31;
|
|
|
4010
4010
|
const HandleTabsDragOver = 32;
|
|
4011
4011
|
const HandleFocus = 33;
|
|
4012
4012
|
const HandleGroupMouseDown = 34;
|
|
4013
|
+
const HandleCloseButtonMouseDown = 35;
|
|
4013
4014
|
|
|
4014
4015
|
const dragOverlayVirtualDom = {
|
|
4015
4016
|
childCount: 0,
|
|
@@ -4418,6 +4419,7 @@ const renderTabActions = (isDirty, tabIndex, groupIndex) => {
|
|
|
4418
4419
|
'data-groupIndex': groupIndex,
|
|
4419
4420
|
'data-index': tabIndex,
|
|
4420
4421
|
onClick: HandleClickClose,
|
|
4422
|
+
onMouseDown: HandleCloseButtonMouseDown,
|
|
4421
4423
|
type: Button$2
|
|
4422
4424
|
}, dirtyIconNode];
|
|
4423
4425
|
}
|
|
@@ -4428,6 +4430,7 @@ const renderTabActions = (isDirty, tabIndex, groupIndex) => {
|
|
|
4428
4430
|
'data-groupIndex': groupIndex,
|
|
4429
4431
|
'data-index': tabIndex,
|
|
4430
4432
|
onClick: HandleClickClose,
|
|
4433
|
+
onMouseDown: HandleCloseButtonMouseDown,
|
|
4431
4434
|
type: Button$2
|
|
4432
4435
|
}, closeIconNode$1];
|
|
4433
4436
|
};
|
|
@@ -8203,6 +8206,10 @@ const hasDirtyTabs = state => {
|
|
|
8203
8206
|
return getDirtyTabs(state).length > 0;
|
|
8204
8207
|
};
|
|
8205
8208
|
|
|
8209
|
+
const hasOpenTextEditor = state => {
|
|
8210
|
+
return state.layout.groups.some(group => group.tabs.some(tab => !tab.terminal && tab.editorInput?.type === 'editor'));
|
|
8211
|
+
};
|
|
8212
|
+
|
|
8206
8213
|
const initialize$1 = async () => {
|
|
8207
8214
|
// Kept as a compatibility command for existing renderer startup code.
|
|
8208
8215
|
};
|
|
@@ -8945,6 +8952,10 @@ const renderEventListeners = () => {
|
|
|
8945
8952
|
name: HandleClickClose,
|
|
8946
8953
|
params: ['handleClickCloseTab', 'event.currentTarget.dataset.groupIndex', 'event.currentTarget.dataset.index'],
|
|
8947
8954
|
stopPropagation: true
|
|
8955
|
+
}, {
|
|
8956
|
+
name: HandleCloseButtonMouseDown,
|
|
8957
|
+
params: ['handleCloseButtonMouseDown'],
|
|
8958
|
+
stopPropagation: true
|
|
8948
8959
|
}, {
|
|
8949
8960
|
name: HandleClickTab,
|
|
8950
8961
|
params: ['handleClickTab', 'event.currentTarget.dataset.groupIndex', 'event.currentTarget.dataset.index', Button$1]
|
|
@@ -9607,6 +9618,7 @@ const commandMap = {
|
|
|
9607
9618
|
'MainArea.handleClickCloseTab': wrapSerialCommand(handleClickCloseTab),
|
|
9608
9619
|
'MainArea.handleClickTab': wrapSerialCommand(handleClickTab),
|
|
9609
9620
|
'MainArea.handleClickTogglePreview': wrapSerialCommand(handleClickTogglePreview),
|
|
9621
|
+
'MainArea.handleCloseButtonMouseDown': state => state,
|
|
9610
9622
|
'MainArea.handleContextMenu': wrapSerialCommand(handleContextMenu),
|
|
9611
9623
|
'MainArea.handleDoubleClick': wrapSerialCommand(handleDoubleClick),
|
|
9612
9624
|
'MainArea.handleDragEnd': wrapSerialCommand(resetPointerDown),
|
|
@@ -9640,6 +9652,7 @@ const commandMap = {
|
|
|
9640
9652
|
'MainArea.handleWorkspaceRefresh': wrapAsyncCommand(handleWorkspaceRefreshWithContext),
|
|
9641
9653
|
'MainArea.hasActiveTextEditor': wrapGetter(hasActiveTextEditor),
|
|
9642
9654
|
'MainArea.hasDirtyTabs': wrapGetter(hasDirtyTabs),
|
|
9655
|
+
'MainArea.hasOpenTextEditor': wrapGetter(hasOpenTextEditor),
|
|
9643
9656
|
'MainArea.initialize': initialize$1,
|
|
9644
9657
|
'MainArea.loadContent': loadContentTracked,
|
|
9645
9658
|
'MainArea.loadContentLater': wrapAsyncCommand(loadContentLater),
|