@xyd-js/plugin-docs 0.1.0-build.164 → 0.1.0-build.166

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": "@xyd-js/plugin-docs",
3
- "version": "0.1.0-build.164",
3
+ "version": "0.1.0-build.166",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,10 +18,10 @@
18
18
  "codehike": "^1.0.3",
19
19
  "@code-hike/lighter": "^1.0.3",
20
20
  "dotenv": "^16.4.7",
21
- "@xyd-js/openapi": "0.1.0-build.172",
22
- "@xyd-js/gql": "0.1.0-build.174",
23
- "@xyd-js/uniform": "0.1.0-build.176",
24
- "@xyd-js/sources": "0.1.1-build.164"
21
+ "@xyd-js/openapi": "0.1.0-build.174",
22
+ "@xyd-js/gql": "0.1.0-build.176",
23
+ "@xyd-js/uniform": "0.1.0-build.178",
24
+ "@xyd-js/sources": "0.1.1-build.166"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@react-router/dev": "^7.7.1",
@@ -31,12 +31,12 @@
31
31
  "react": "^19.1.0",
32
32
  "react-dom": "^19.1.0",
33
33
  "react-router": "^7.7.1",
34
- "@xyd-js/composer": "0.1.0-build.161",
35
- "@xyd-js/components": "0.1.0-build.172",
36
- "@xyd-js/themes": "0.1.1-build.164",
37
- "@xyd-js/framework": "0.1.0-build.193",
38
- "@xyd-js/content": "0.1.0-build.175",
39
- "@xyd-js/core": "0.1.0-build.174"
34
+ "@xyd-js/framework": "0.1.0-build.195",
35
+ "@xyd-js/composer": "0.1.0-build.163",
36
+ "@xyd-js/components": "0.1.0-build.174",
37
+ "@xyd-js/themes": "0.1.1-build.166",
38
+ "@xyd-js/content": "0.1.0-build.177",
39
+ "@xyd-js/core": "0.1.0-build.176"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/react-dom": "^19.1.0",
@@ -536,8 +536,9 @@ function mergeSidebars(sidebars: SidebarRoute[]): SidebarRoute[] {
536
536
  // Helper function to merge sidebars in place, modifying the original array
537
537
  function mergeSidebarsInPlace(sidebars: (SidebarRoute | Sidebar)[]): void {
538
538
  const mergedMap = new Map<string, SidebarRoute>();
539
+ const nonRouteSidebars: Sidebar[] = [];
539
540
 
540
- // First pass: collect all sidebars by route
541
+ // First pass: collect all sidebars by route and separate non-route sidebars
541
542
  for (const sidebar of sidebars) {
542
543
  if ("route" in sidebar) {
543
544
  const existing = mergedMap.get(sidebar.route);
@@ -552,13 +553,16 @@ function mergeSidebarsInPlace(sidebars: (SidebarRoute | Sidebar)[]): void {
552
553
  } else {
553
554
  mergedMap.set(sidebar.route, sidebar);
554
555
  }
556
+ } else {
557
+ // Keep non-route sidebars (those with "group" property)
558
+ nonRouteSidebars.push(sidebar);
555
559
  }
556
560
  }
557
561
 
558
562
  // Second pass: replace the original array with merged results
559
563
  const mergedArray = Array.from(mergedMap.values());
560
564
  sidebars.length = 0; // Clear the original array
561
- sidebars.push(...mergedArray); // Add the merged items
565
+ sidebars.push(...nonRouteSidebars, ...mergedArray); // Add non-route sidebars first, then merged route sidebars
562
566
  }
563
567
 
564
568
  // preinstall adds uniform navigation to settings