@lvce-editor/main-area-worker 8.19.0 → 8.20.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/mainAreaWorkerMain.js +46 -51
- package/package.json +1 -1
|
@@ -592,7 +592,18 @@ const create$e = rpcId => {
|
|
|
592
592
|
};
|
|
593
593
|
};
|
|
594
594
|
|
|
595
|
-
const
|
|
595
|
+
const None$1 = 'none';
|
|
596
|
+
|
|
597
|
+
const Button$2 = 1;
|
|
598
|
+
const Div = 4;
|
|
599
|
+
const Span = 8;
|
|
600
|
+
const Text = 12;
|
|
601
|
+
const Img = 17;
|
|
602
|
+
const P = 50;
|
|
603
|
+
const Pre = 51;
|
|
604
|
+
const Reference = 100;
|
|
605
|
+
|
|
606
|
+
const Button$1 = 'event.button';
|
|
596
607
|
const ClientX = 'event.clientX';
|
|
597
608
|
const ClientY = 'event.clientY';
|
|
598
609
|
const EventTargetClassName = 'event.target.className';
|
|
@@ -601,7 +612,7 @@ const TargetName = 'event.target.name';
|
|
|
601
612
|
const Tab = 13;
|
|
602
613
|
|
|
603
614
|
const Separator = 1;
|
|
604
|
-
const None
|
|
615
|
+
const None = 0;
|
|
605
616
|
|
|
606
617
|
const ClipBoardWorker = 3400;
|
|
607
618
|
const ExtensionHostWorker = 44;
|
|
@@ -1669,16 +1680,10 @@ const getFileIconsForTabs = async (tabs, fileIconCache) => {
|
|
|
1669
1680
|
};
|
|
1670
1681
|
|
|
1671
1682
|
const getOptionUriOptions = options => {
|
|
1672
|
-
let uri = '';
|
|
1673
1683
|
if (typeof options === 'string') {
|
|
1674
|
-
|
|
1675
|
-
} else {
|
|
1676
|
-
const {
|
|
1677
|
-
uri: optionsUri
|
|
1678
|
-
} = options;
|
|
1679
|
-
uri = optionsUri;
|
|
1684
|
+
return options;
|
|
1680
1685
|
}
|
|
1681
|
-
return uri;
|
|
1686
|
+
return options.uri;
|
|
1682
1687
|
};
|
|
1683
1688
|
|
|
1684
1689
|
const getViewletModuleId = async uri => {
|
|
@@ -2068,7 +2073,7 @@ const Main = 'Main';
|
|
|
2068
2073
|
const EDITOR_GROUPS_CONTAINER = 'editor-groups-container';
|
|
2069
2074
|
const TabIcon = 'TabIcon';
|
|
2070
2075
|
const TabTitle = 'TabTitle';
|
|
2071
|
-
const Button
|
|
2076
|
+
const Button = 'Button';
|
|
2072
2077
|
const ButtonSecondary = 'ButtonSecondary';
|
|
2073
2078
|
const EditorContent = 'EditorContent';
|
|
2074
2079
|
const EditorTabCloseButton = 'EditorTabCloseButton';
|
|
@@ -3948,101 +3953,101 @@ const getMenuEntries$1 = state => {
|
|
|
3948
3953
|
} = tab;
|
|
3949
3954
|
return [{
|
|
3950
3955
|
command: 'Main.closeFocusedTab',
|
|
3951
|
-
flags: None
|
|
3956
|
+
flags: None,
|
|
3952
3957
|
id: 'tabClose',
|
|
3953
3958
|
label: close()
|
|
3954
3959
|
}, {
|
|
3955
3960
|
command: 'Main.closeOthers',
|
|
3956
|
-
flags: None
|
|
3961
|
+
flags: None,
|
|
3957
3962
|
id: 'tabCloseOthers',
|
|
3958
3963
|
label: closeOthers()
|
|
3959
3964
|
}, {
|
|
3960
3965
|
command: 'Main.closeTabsRight',
|
|
3961
|
-
flags: None
|
|
3966
|
+
flags: None,
|
|
3962
3967
|
id: 'tabCloseToTheRight',
|
|
3963
3968
|
label: closeToTheRight()
|
|
3964
3969
|
}, {
|
|
3965
3970
|
command: 'Main.closeSaved',
|
|
3966
|
-
flags: None
|
|
3971
|
+
flags: None,
|
|
3967
3972
|
id: 'tabCloseSaved',
|
|
3968
3973
|
label: closeSaved()
|
|
3969
3974
|
}, {
|
|
3970
3975
|
command: 'Main.closeAll',
|
|
3971
|
-
flags: None
|
|
3976
|
+
flags: None,
|
|
3972
3977
|
id: 'tabCloseAll',
|
|
3973
3978
|
label: closeAll()
|
|
3974
3979
|
}, menuEntrySeparator, {
|
|
3975
3980
|
args: [path],
|
|
3976
3981
|
command: 'Main.copyPath',
|
|
3977
|
-
flags: None
|
|
3982
|
+
flags: None,
|
|
3978
3983
|
id: 'copyPath',
|
|
3979
3984
|
label: copyPath()
|
|
3980
3985
|
}, {
|
|
3981
3986
|
args: [path],
|
|
3982
3987
|
command: 'Main.copyRelativePath',
|
|
3983
|
-
flags: None
|
|
3988
|
+
flags: None,
|
|
3984
3989
|
id: 'copyRelativePath',
|
|
3985
3990
|
label: copyRelativePath()
|
|
3986
3991
|
}, menuEntrySeparator, {
|
|
3987
3992
|
command: '',
|
|
3988
|
-
flags: None
|
|
3993
|
+
flags: None,
|
|
3989
3994
|
id: 'reopenEditorWith',
|
|
3990
3995
|
label: reopenEditorWith()
|
|
3991
3996
|
}, menuEntrySeparator, {
|
|
3992
3997
|
command: '',
|
|
3993
|
-
flags: None
|
|
3998
|
+
flags: None,
|
|
3994
3999
|
id: 'share',
|
|
3995
4000
|
label: share()
|
|
3996
4001
|
}, menuEntrySeparator, {
|
|
3997
4002
|
command: '',
|
|
3998
|
-
flags: None
|
|
4003
|
+
flags: None,
|
|
3999
4004
|
id: 'addFileToChat',
|
|
4000
4005
|
label: addFileToChat()
|
|
4001
4006
|
}, menuEntrySeparator, {
|
|
4002
4007
|
command: '',
|
|
4003
|
-
flags: None
|
|
4008
|
+
flags: None,
|
|
4004
4009
|
id: 'openContainingFolder',
|
|
4005
4010
|
label: openContainingFolder()
|
|
4006
4011
|
}, {
|
|
4007
4012
|
args: [path],
|
|
4008
4013
|
command: 'Explorer.revealItem',
|
|
4009
|
-
flags: None
|
|
4014
|
+
flags: None,
|
|
4010
4015
|
id: 'revealInExplorerView',
|
|
4011
4016
|
label: revealInExplorerView()
|
|
4012
4017
|
}, menuEntrySeparator, {
|
|
4013
4018
|
command: '',
|
|
4014
|
-
flags: None
|
|
4019
|
+
flags: None,
|
|
4015
4020
|
id: 'keepOpen',
|
|
4016
4021
|
label: keepOpen()
|
|
4017
4022
|
}, {
|
|
4018
4023
|
command: '',
|
|
4019
|
-
flags: None
|
|
4024
|
+
flags: None,
|
|
4020
4025
|
id: 'pin',
|
|
4021
4026
|
label: pin()
|
|
4022
4027
|
}, menuEntrySeparator, {
|
|
4023
4028
|
command: 'Main.splitRight',
|
|
4024
|
-
flags: None
|
|
4029
|
+
flags: None,
|
|
4025
4030
|
id: 'splitRight',
|
|
4026
4031
|
label: splitRight$1()
|
|
4027
4032
|
}, {
|
|
4028
4033
|
command: '',
|
|
4029
|
-
flags: None
|
|
4034
|
+
flags: None,
|
|
4030
4035
|
id: 'splitAndMove',
|
|
4031
4036
|
label: splitAndMove()
|
|
4032
4037
|
}, {
|
|
4033
4038
|
command: '',
|
|
4034
|
-
flags: None
|
|
4039
|
+
flags: None,
|
|
4035
4040
|
id: 'moveIntoNewWindow',
|
|
4036
4041
|
label: moveIntoNewWindow()
|
|
4037
4042
|
}, {
|
|
4038
4043
|
command: '',
|
|
4039
|
-
flags: None
|
|
4044
|
+
flags: None,
|
|
4040
4045
|
id: 'copyIntoNewWindow',
|
|
4041
4046
|
label: copyIntoNewWindow()
|
|
4042
4047
|
}, menuEntrySeparator, {
|
|
4043
4048
|
args: [/* id */'References', /* focus */true, path],
|
|
4044
4049
|
command: 'SideBar.show',
|
|
4045
|
-
flags: None
|
|
4050
|
+
flags: None,
|
|
4046
4051
|
id: 'findFileReferences',
|
|
4047
4052
|
label: findFileReferences()
|
|
4048
4053
|
}];
|
|
@@ -4101,17 +4106,6 @@ const renderCss = (oldState, newState) => {
|
|
|
4101
4106
|
return [SetCss, newState.uid, css];
|
|
4102
4107
|
};
|
|
4103
4108
|
|
|
4104
|
-
const None = 'none';
|
|
4105
|
-
|
|
4106
|
-
const Button = 1;
|
|
4107
|
-
const Div = 4;
|
|
4108
|
-
const Span = 8;
|
|
4109
|
-
const Text = 12;
|
|
4110
|
-
const Img = 17;
|
|
4111
|
-
const P = 50;
|
|
4112
|
-
const Pre = 51;
|
|
4113
|
-
const Reference = 100;
|
|
4114
|
-
|
|
4115
4109
|
const mergeClassNames = (...classNames) => {
|
|
4116
4110
|
return classNames.filter(Boolean).join(' ');
|
|
4117
4111
|
};
|
|
@@ -4448,11 +4442,11 @@ const renderError = errorMessage => {
|
|
|
4448
4442
|
type: P
|
|
4449
4443
|
}, text(`Error: ${errorMessage}`), {
|
|
4450
4444
|
childCount: 1,
|
|
4451
|
-
className: mergeClassNames(Button
|
|
4445
|
+
className: mergeClassNames(Button, ButtonSecondary),
|
|
4452
4446
|
'data-action': RetryOpen,
|
|
4453
4447
|
name: RetryOpen,
|
|
4454
4448
|
onClick: HandleClickAction,
|
|
4455
|
-
type: Button
|
|
4449
|
+
type: Button$2
|
|
4456
4450
|
}, text(retry())];
|
|
4457
4451
|
};
|
|
4458
4452
|
|
|
@@ -4525,7 +4519,7 @@ const renderTabActions = (isDirty, tabIndex, groupIndex) => {
|
|
|
4525
4519
|
'data-groupIndex': groupIndex,
|
|
4526
4520
|
'data-index': tabIndex,
|
|
4527
4521
|
onClick: HandleClickClose,
|
|
4528
|
-
type: Button
|
|
4522
|
+
type: Button$2
|
|
4529
4523
|
}, {
|
|
4530
4524
|
childCount: 0,
|
|
4531
4525
|
className: MaskIconClose,
|
|
@@ -4559,7 +4553,7 @@ const renderTab = (tab, isActive, tabIndex, groupIndex) => {
|
|
|
4559
4553
|
}, {
|
|
4560
4554
|
childCount: 0,
|
|
4561
4555
|
className: TabIcon,
|
|
4562
|
-
role: None,
|
|
4556
|
+
role: None$1,
|
|
4563
4557
|
src: tab.icon,
|
|
4564
4558
|
type: Img
|
|
4565
4559
|
}, {
|
|
@@ -4602,7 +4596,7 @@ const renderEditorGroupActions = (group, groupIndex, splitButtonEnabled) => {
|
|
|
4602
4596
|
name: TogglePreview$1,
|
|
4603
4597
|
onClick: HandleClickAction,
|
|
4604
4598
|
title: togglePreview(),
|
|
4605
|
-
type: Button
|
|
4599
|
+
type: Button$2
|
|
4606
4600
|
}, {
|
|
4607
4601
|
childCount: 0,
|
|
4608
4602
|
className: MaskIconPreview,
|
|
@@ -4618,7 +4612,7 @@ const renderEditorGroupActions = (group, groupIndex, splitButtonEnabled) => {
|
|
|
4618
4612
|
name: SplitRight$1,
|
|
4619
4613
|
onClick: HandleClickAction,
|
|
4620
4614
|
title: splitEditorGroup(),
|
|
4621
|
-
type: Button
|
|
4615
|
+
type: Button$2
|
|
4622
4616
|
}, text('split'));
|
|
4623
4617
|
}
|
|
4624
4618
|
return [{
|
|
@@ -4638,7 +4632,7 @@ const renderEditorGroupHeader = (group, groupIndex, splitButtonEnabled) => {
|
|
|
4638
4632
|
childCount: hasActions ? 2 : 1,
|
|
4639
4633
|
className: EditorGroupHeader,
|
|
4640
4634
|
onDblClick: HandleHeaderDoubleClick,
|
|
4641
|
-
role: None,
|
|
4635
|
+
role: None$1,
|
|
4642
4636
|
type: Div
|
|
4643
4637
|
}, ...getTabsVirtualDom(group, groupIndex, tabsChildCount), ...actions];
|
|
4644
4638
|
};
|
|
@@ -4651,7 +4645,7 @@ const renderEmptyGroupCloseButton = (group, groupIndex) => {
|
|
|
4651
4645
|
name: CloseGroup,
|
|
4652
4646
|
onClick: HandleClickAction,
|
|
4653
4647
|
title: closeEditorGroup(),
|
|
4654
|
-
type: Button
|
|
4648
|
+
type: Button$2
|
|
4655
4649
|
}, text('✕')];
|
|
4656
4650
|
};
|
|
4657
4651
|
|
|
@@ -4672,6 +4666,7 @@ const renderEmptyEditorGroup = (group, groupIndex, style) => {
|
|
|
4672
4666
|
childCount: 2,
|
|
4673
4667
|
className: EditorGroup,
|
|
4674
4668
|
style,
|
|
4669
|
+
tabIndex: 0,
|
|
4675
4670
|
type: Div
|
|
4676
4671
|
}, ...renderEmptyGroupCloseButton(group), ...renderWaterMark()];
|
|
4677
4672
|
};
|
|
@@ -4760,7 +4755,7 @@ const getMainAreaVirtualDom = (layout, splitButtonEnabled = false) => {
|
|
|
4760
4755
|
}, {
|
|
4761
4756
|
childCount,
|
|
4762
4757
|
className: editorGroupsContainerClassName,
|
|
4763
|
-
role: None,
|
|
4758
|
+
role: None$1,
|
|
4764
4759
|
type: Div
|
|
4765
4760
|
}, ...children];
|
|
4766
4761
|
};
|
|
@@ -4833,7 +4828,7 @@ const renderEventListeners = () => {
|
|
|
4833
4828
|
params: ['handleClickTab', 'event.target.dataset.groupIndex', 'event.target.dataset.index']
|
|
4834
4829
|
}, {
|
|
4835
4830
|
name: HandleTabContextMenu,
|
|
4836
|
-
params: ['handleTabContextMenu', Button$
|
|
4831
|
+
params: ['handleTabContextMenu', Button$1, ClientX, ClientY],
|
|
4837
4832
|
preventDefault: true
|
|
4838
4833
|
}, {
|
|
4839
4834
|
name: HandleClickAction,
|