fumadocs-mdx 11.6.8 → 11.6.9

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": "fumadocs-mdx",
3
- "version": "11.6.8",
3
+ "version": "11.6.9",
4
4
  "description": "The built-in source for Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -23,6 +23,11 @@
23
23
  "types": "./dist/next/index.d.ts",
24
24
  "require": "./dist/next/index.cjs"
25
25
  },
26
+ "./vite": {
27
+ "import": "./dist/vite/index.js",
28
+ "types": "./dist/vite/index.d.ts",
29
+ "require": "./dist/vite/index.cjs"
30
+ },
26
31
  "./runtime/async": {
27
32
  "import": "./dist/runtime/async.js",
28
33
  "types": "./dist/runtime/async.d.ts"
@@ -64,18 +69,26 @@
64
69
  "next": "^15.3.3",
65
70
  "unified": "^11.0.5",
66
71
  "vfile": "^6.0.3",
72
+ "vite": "^6.3.5",
67
73
  "webpack": "^5.99.9",
68
74
  "@fumadocs/mdx-remote": "1.3.3",
69
75
  "eslint-config-custom": "0.0.0",
70
- "fumadocs-core": "15.5.2",
76
+ "fumadocs-core": "15.5.3",
71
77
  "tsconfig": "0.0.0"
72
78
  },
73
79
  "peerDependencies": {
74
80
  "@fumadocs/mdx-remote": "^1.2.0",
75
81
  "fumadocs-core": "^14.0.0 || ^15.0.0",
76
- "next": "^15.3.0"
82
+ "next": "^15.3.0",
83
+ "vite": "6.x.x"
77
84
  },
78
85
  "peerDependenciesMeta": {
86
+ "next": {
87
+ "optional": true
88
+ },
89
+ "vite": {
90
+ "optional": true
91
+ },
79
92
  "@fumadocs/mdx-remote": {
80
93
  "optional": true
81
94
  }
@@ -1,40 +0,0 @@
1
- // src/utils/fuma-matter.ts
2
- import { LRUCache } from "lru-cache";
3
- import { load } from "js-yaml";
4
- var cache = new LRUCache({
5
- max: 200
6
- });
7
- function fumaMatter(input) {
8
- if (input === "") {
9
- return { data: {}, content: input, matter: "" };
10
- }
11
- const cached = cache.get(input);
12
- if (cached) return cached;
13
- const result = parseMatter(input);
14
- cache.set(input, result);
15
- return structuredClone(result);
16
- }
17
- var delimiter = "---";
18
- function parseMatter(str) {
19
- const output = { matter: "", data: {}, content: str };
20
- const open = delimiter + "\n";
21
- const close = "\n" + delimiter;
22
- if (!str.startsWith(open)) {
23
- return output;
24
- }
25
- str = str.slice(open.length);
26
- const len = str.length;
27
- let closeIdx = str.indexOf(close);
28
- if (closeIdx === -1) {
29
- closeIdx = len;
30
- }
31
- output.matter = str.slice(0, closeIdx);
32
- output.content = str.slice(closeIdx + close.length);
33
- const loaded = load(output.matter);
34
- output.data = loaded ?? {};
35
- return output;
36
- }
37
-
38
- export {
39
- fumaMatter
40
- };
@@ -1,6 +0,0 @@
1
- import {
2
- getDefaultMDXOptions
3
- } from "./chunk-VC3Y6FLZ.js";
4
- export {
5
- getDefaultMDXOptions
6
- };