@lvce-editor/status-bar-worker 3.31.0 → 3.31.2

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.
@@ -1840,9 +1840,7 @@ const handleClickNotification = async () => {
1840
1840
 
1841
1841
  const handleClickProblems = async () => {
1842
1842
  // @ts-ignore
1843
- await invoke$1('Layout.showPanel');
1844
- // @ts-ignore
1845
- await invoke$1('Panel.toggleView', 'Problems');
1843
+ await invoke$1('Layout.showPanel', 'Problems');
1846
1844
  };
1847
1845
 
1848
1846
  const handleClick = async (state, name) => {
@@ -2382,9 +2380,12 @@ const handleExtensionManagementChange = async () => {
2382
2380
  if (newState === newerState || oldState === newerState) {
2383
2381
  continue;
2384
2382
  }
2385
- set$6(uid, oldState, {
2386
- ...newState,
2387
- ...newerState
2383
+ // Loading and other updates can finish while the provider query is pending.
2384
+ // Only replace the extension items; retain the current lifecycle and render baseline.
2385
+ const current = get$5(uid);
2386
+ set$6(uid, current.oldState, {
2387
+ ...current.newState,
2388
+ statusBarItemsLeft: newerState.statusBarItemsLeft
2388
2389
  });
2389
2390
  await renderOutOfBand(uid);
2390
2391
  }
@@ -2513,9 +2514,11 @@ const getIndex = (items, item) => {
2513
2514
 
2514
2515
  const updateArray = (items, newItem) => {
2515
2516
  const index = getIndex(items, newItem);
2516
- const before = items.slice(0, index);
2517
- const after = items.slice(index + 1);
2518
- return [...before, newItem, ...after];
2517
+ if (index < 0) {
2518
+ return [newItem, ...items];
2519
+ }
2520
+ // eslint-disable-next-line unicorn/no-confusing-array-splice -- Keep updates immutable with toSpliced.
2521
+ return items.toSpliced(index, 1, newItem);
2519
2522
  };
2520
2523
 
2521
2524
  const itemLeftUpdate = (state, newItem) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/status-bar-worker",
3
- "version": "3.31.0",
3
+ "version": "3.31.2",
4
4
  "description": "Status Bar Worker",
5
5
  "repository": {
6
6
  "type": "git",