@workbench-kit/react 0.0.2-prototype.0.2.23 → 0.0.2-prototype.0.2.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workbench-kit/react",
3
- "version": "0.0.2-prototype.0.2.23",
3
+ "version": "0.0.2-prototype.0.2.24",
4
4
  "private": false,
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -63,15 +63,15 @@
63
63
  "@vscode/codicons": "^0.0.45",
64
64
  "remark-gfm": "^4.0.1",
65
65
  "rehype-sanitize": "^6.0.0",
66
- "@workbench-kit/adapters": "0.0.2-prototype.0.2.23",
67
- "@workbench-kit/contracts": "0.0.2-prototype.0.2.23",
68
- "@workbench-kit/jdw": "0.0.2-prototype.0.2.23",
69
- "@workbench-kit/monaco": "0.0.2-prototype.0.2.23",
70
- "@workbench-kit/platform": "0.0.2-prototype.0.2.23",
71
- "@workbench-kit/runtime": "0.0.2-prototype.0.2.23",
72
- "@workbench-kit/workspace": "0.0.2-prototype.0.2.23",
73
- "@workbench-kit/services": "0.0.2-prototype.0.2.23",
74
- "@workbench-kit/tokens": "0.0.2-prototype.0.2.23"
66
+ "@workbench-kit/jdw": "0.0.2-prototype.0.2.24",
67
+ "@workbench-kit/adapters": "0.0.2-prototype.0.2.24",
68
+ "@workbench-kit/monaco": "0.0.2-prototype.0.2.24",
69
+ "@workbench-kit/contracts": "0.0.2-prototype.0.2.24",
70
+ "@workbench-kit/runtime": "0.0.2-prototype.0.2.24",
71
+ "@workbench-kit/services": "0.0.2-prototype.0.2.24",
72
+ "@workbench-kit/workspace": "0.0.2-prototype.0.2.24",
73
+ "@workbench-kit/tokens": "0.0.2-prototype.0.2.24",
74
+ "@workbench-kit/platform": "0.0.2-prototype.0.2.24"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "react": "^19.0.0",
@@ -70,13 +70,14 @@ export function sortActivityBarItems<T extends { id: string }>(
70
70
  ): T[] {
71
71
  const order = itemOrder?.length ? itemOrder : fallbackOrder;
72
72
  const orderIndex = new Map(order.map((id, index) => [id, index]));
73
+ const contributionIndex = new Map(items.map((item, index) => [item.id, index]));
73
74
 
74
75
  return [...items].sort((left, right) => {
75
76
  const leftIndex = orderIndex.get(left.id);
76
77
  const rightIndex = orderIndex.get(right.id);
77
78
 
78
79
  if (leftIndex === undefined && rightIndex === undefined) {
79
- return left.id.localeCompare(right.id);
80
+ return (contributionIndex.get(left.id) ?? 0) - (contributionIndex.get(right.id) ?? 0);
80
81
  }
81
82
 
82
83
  if (leftIndex === undefined) return 1;