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