fumadocs-core 13.1.0 → 13.2.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.
@@ -352,11 +352,13 @@ function createGetUrl(baseUrl) {
352
352
  };
353
353
  }
354
354
  function getSlugs(info) {
355
- const result = [...info.dirname.split("/"), info.name].filter(
355
+ return [...info.dirname.split("/"), info.name].filter(
356
356
  // filter empty folder names and file groups like (group_name)
357
- (v) => v.length > 0 && !/^\(.+\)$/.test(v)
357
+ (v, i, arr) => {
358
+ if (v.length === 0) return false;
359
+ return i === arr.length - 1 ? v !== "index" : !/^\(.+\)$/.test(v);
360
+ }
358
361
  );
359
- return result[result.length - 1] === "index" ? result.slice(0, -1) : result;
360
362
  }
361
363
  function loader(options) {
362
364
  return createOutput(options);
package/dist/toc.js CHANGED
@@ -36,7 +36,7 @@ function useAnchorObserver(watch) {
36
36
  return f ?? watch[0];
37
37
  });
38
38
  },
39
- { rootMargin: `-60px 0% -75% 0%`, threshold: 1 }
39
+ { rootMargin: `-100px 0% -75% 0%`, threshold: 1 }
40
40
  );
41
41
  const scroll = () => {
42
42
  const element = document.scrollingElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-core",
3
- "version": "13.1.0",
3
+ "version": "13.2.0",
4
4
  "description": "The library for building a documentation website in Next.js",
5
5
  "keywords": [
6
6
  "NextJs",