@lvce-editor/panel-worker 2.3.1 → 2.4.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.
@@ -1550,11 +1550,12 @@ const handleFilterInput = async (state, value) => {
1550
1550
 
1551
1551
  const DebugConsole = 'Debug Console';
1552
1552
  const Output = 'Output';
1553
+ const Ports = 'Ports';
1553
1554
  const Problems = 'Problems';
1554
1555
  const Terminals = 'Terminals';
1555
1556
 
1556
1557
  const getPanelViews = () => {
1557
- const views = [Problems, Output, DebugConsole, Terminals];
1558
+ const views = [Problems, Output, DebugConsole, Terminals, Ports];
1558
1559
  return views;
1559
1560
  };
1560
1561
 
@@ -1582,7 +1583,7 @@ const getUid = () => {
1582
1583
  return Math.random();
1583
1584
  };
1584
1585
 
1585
- const openViewlet = async (state, id, focus = false) => {
1586
+ const openViewlet = async (state, id, focus = false, uri = '') => {
1586
1587
  const {
1587
1588
  views
1588
1589
  } = state;
@@ -1591,7 +1592,7 @@ const openViewlet = async (state, id, focus = false) => {
1591
1592
  const tabId = getUid();
1592
1593
  const actionsUid = getUid();
1593
1594
  const index = views.indexOf(id);
1594
- await createViewlet(id, childUid, tabId, actionsUid, childDimensions, '', focus);
1595
+ await createViewlet(id, childUid, tabId, actionsUid, childDimensions, uri, focus);
1595
1596
  return {
1596
1597
  ...state,
1597
1598
  actionsUid,
@@ -1613,11 +1614,11 @@ const loadContent = (state, savedState) => {
1613
1614
  return openViewlet(loaded, savedViewletId);
1614
1615
  };
1615
1616
 
1616
- const selectIndex = async (state, index) => {
1617
+ const selectIndex = async (state, index, uri = '') => {
1617
1618
  const {
1618
1619
  views
1619
1620
  } = state;
1620
- return openViewlet(state, views[index], true);
1621
+ return openViewlet(state, views[index], true, uri);
1621
1622
  };
1622
1623
 
1623
1624
  const selectRaw = async (state, rawIndex) => {
@@ -1637,7 +1638,7 @@ const setBadgeCount = (state, id, count) => {
1637
1638
  };
1638
1639
  };
1639
1640
 
1640
- const toggleView = async (state, name) => {
1641
+ const toggleView = async (state, name, uri = '') => {
1641
1642
  const {
1642
1643
  currentViewletId,
1643
1644
  views
@@ -1649,7 +1650,7 @@ const toggleView = async (state, name) => {
1649
1650
  if (name === currentViewletId) {
1650
1651
  return state;
1651
1652
  }
1652
- return selectIndex(state, index);
1653
+ return selectIndex(state, index, uri);
1653
1654
  };
1654
1655
 
1655
1656
  const renderActionsUid = (oldState, newState) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/panel-worker",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Panel Worker",
5
5
  "repository": {
6
6
  "type": "git",