ardo 1.2.2 → 2.0.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.
Files changed (43) hide show
  1. package/README.md +29 -47
  2. package/dist/{CopyButton-BkACwxQM.d.ts → Features-C_06EvGb.d.ts} +212 -10
  3. package/dist/{chunk-SZVJKB3V.js → chunk-G5L4ZUTS.js} +40 -40
  4. package/dist/chunk-G5L4ZUTS.js.map +1 -0
  5. package/dist/{chunk-VMA2OXSY.js → chunk-LUOUBO3L.js} +587 -669
  6. package/dist/chunk-LUOUBO3L.js.map +1 -0
  7. package/dist/{chunk-3U63LMDZ.js → chunk-N5CEHG2F.js} +3 -3
  8. package/dist/{chunk-3U63LMDZ.js.map → chunk-N5CEHG2F.js.map} +1 -1
  9. package/dist/chunk-OTUACKCQ.js +896 -0
  10. package/dist/chunk-OTUACKCQ.js.map +1 -0
  11. package/dist/chunk-UWAVET45.js +311 -0
  12. package/dist/chunk-UWAVET45.js.map +1 -0
  13. package/dist/chunk-ZXPAEM3M.js +854 -0
  14. package/dist/chunk-ZXPAEM3M.js.map +1 -0
  15. package/dist/config/index.d.ts +2 -2
  16. package/dist/config/index.js +1 -1
  17. package/dist/icons/index.d.ts +1 -0
  18. package/dist/icons/index.js +3 -0
  19. package/dist/icons/index.js.map +1 -0
  20. package/dist/index.d.ts +3 -2
  21. package/dist/index.js +34 -26
  22. package/dist/mdx/provider.d.ts +9 -0
  23. package/dist/mdx/provider.js +114 -0
  24. package/dist/mdx/provider.js.map +1 -0
  25. package/dist/runtime/index.d.ts +1 -1
  26. package/dist/typedoc/index.d.ts +25 -0
  27. package/dist/typedoc/index.js +2 -2
  28. package/dist/{types-C22M-Kor.d.ts → types-DchPWkJl.d.ts} +1 -1
  29. package/dist/ui/index.d.ts +116 -0
  30. package/dist/{theme → ui}/index.js +26 -12
  31. package/dist/ui/styles.css +2198 -0
  32. package/dist/vite/index.d.ts +13 -23
  33. package/dist/vite/index.js +5 -5
  34. package/package.json +23 -11
  35. package/dist/chunk-2JBVPO6S.js +0 -1144
  36. package/dist/chunk-2JBVPO6S.js.map +0 -1
  37. package/dist/chunk-SZVJKB3V.js.map +0 -1
  38. package/dist/chunk-VMA2OXSY.js.map +0 -1
  39. package/dist/chunk-YN6PP526.js +0 -441
  40. package/dist/chunk-YN6PP526.js.map +0 -1
  41. package/dist/theme/index.d.ts +0 -70
  42. package/dist/theme/styles.css +0 -1454
  43. /package/dist/{theme → ui}/index.js.map +0 -0
@@ -1,41 +1,31 @@
1
1
  import { Plugin } from 'vite';
2
- import { R as ResolvedConfig, b as PressConfig, P as PageData, a as PageFrontmatter, T as TOCItem, S as SidebarItem, M as MarkdownConfig } from '../types-C22M-Kor.js';
2
+ import { b as PressConfig, P as PageData, R as ResolvedConfig, a as PageFrontmatter, T as TOCItem, S as SidebarItem, M as MarkdownConfig } from '../types-DchPWkJl.js';
3
3
  import { Highlighter } from 'shiki';
4
4
 
5
- interface PressRoutesPluginOptions {
6
- /** Directory where routes should be generated */
5
+ interface ArdoRoutesPluginOptions {
6
+ /** Directory where routes are located (default: "./app/routes") */
7
7
  routesDir?: string;
8
- /** Source directory for content (default: 'content') */
9
- srcDir?: string;
10
- /**
11
- * Layout mode for generated routes.
12
- * - 'docPage': Routes use DocPage which includes Layout (backward compatible)
13
- * - 'layoutRoute': Routes use DocContent without Layout (for use with _layout.tsx)
14
- * Default: 'layoutRoute'
15
- */
16
- layoutMode?: "docPage" | "layoutRoute";
17
8
  }
18
9
  /**
19
- * Vite plugin that generates individual route files for each markdown file
20
- * in the content directory. Routes include SEO head() configuration
21
- * using frontmatter data.
10
+ * Vite plugin that generates routes.ts for React Router Framework Mode.
11
+ * Scans app/routes for .mdx and .tsx files and generates the route configuration.
22
12
  */
23
- declare function pressRoutesPlugin(getConfig: () => ResolvedConfig, options?: PressRoutesPluginOptions): Plugin;
13
+ declare function ardoRoutesPlugin(options?: ArdoRoutesPluginOptions): Plugin;
24
14
 
25
15
  interface ArdoPluginOptions extends Partial<PressConfig> {
26
16
  /** Options for the routes generator plugin */
27
- routes?: PressRoutesPluginOptions | false;
28
- /** Options for TanStack Start prerendering */
29
- prerender?: {
30
- enabled?: boolean;
31
- crawlLinks?: boolean;
32
- };
17
+ routes?: ArdoRoutesPluginOptions | false;
33
18
  /**
34
19
  * Auto-detect GitHub repository and set base path for GitHub Pages.
35
20
  * When true, automatically sets `base: '/repo-name/'` if deploying to GitHub Pages.
36
21
  * @default true
37
22
  */
38
23
  githubPages?: boolean;
24
+ /**
25
+ * Directory where routes are located.
26
+ * @default "./app/routes"
27
+ */
28
+ routesDir?: string;
39
29
  }
40
30
  declare function ardoPlugin(options?: ArdoPluginOptions): Plugin[];
41
31
 
@@ -79,4 +69,4 @@ interface TransformOptions {
79
69
  declare function transformMarkdown(content: string, config: MarkdownConfig, options?: TransformOptions): Promise<TransformResult>;
80
70
  declare function transformMarkdownToReact(content: string, config: MarkdownConfig): Promise<TransformResult>;
81
71
 
82
- export { type ArdoPluginOptions, type LoadDocOptions, type LoadDocResult, type PressRoutesPluginOptions, type ShikiHighlighter, type SidebarGenerationOptions, type TransformResult, ardoPlugin as ardo, ardoPlugin, createShikiHighlighter, ardoPlugin as default, generateSidebar, getPageDataForRoute, getSlugFromPath, loadAllDocs, loadDoc, pressRoutesPlugin, transformMarkdown, transformMarkdownToReact };
72
+ export { type ArdoPluginOptions, type ArdoRoutesPluginOptions, type LoadDocOptions, type LoadDocResult, type ShikiHighlighter, type SidebarGenerationOptions, type TransformResult, ardoPlugin as ardo, ardoPlugin, ardoRoutesPlugin, createShikiHighlighter, ardoPlugin as default, generateSidebar, getPageDataForRoute, getSlugFromPath, loadAllDocs, loadDoc, transformMarkdown, transformMarkdownToReact };
@@ -1,20 +1,21 @@
1
1
  import {
2
2
  ardoPlugin,
3
+ ardoRoutesPlugin,
3
4
  createShikiHighlighter,
4
5
  generateSidebar,
5
6
  getPageDataForRoute,
6
7
  getSlugFromPath,
7
8
  loadAllDocs,
8
9
  loadDoc,
9
- pressRoutesPlugin,
10
10
  transformMarkdown,
11
11
  transformMarkdownToReact
12
- } from "../chunk-VMA2OXSY.js";
13
- import "../chunk-3U63LMDZ.js";
14
- import "../chunk-YN6PP526.js";
12
+ } from "../chunk-LUOUBO3L.js";
13
+ import "../chunk-N5CEHG2F.js";
14
+ import "../chunk-OTUACKCQ.js";
15
15
  export {
16
16
  ardoPlugin as ardo,
17
17
  ardoPlugin,
18
+ ardoRoutesPlugin,
18
19
  createShikiHighlighter,
19
20
  ardoPlugin as default,
20
21
  generateSidebar,
@@ -22,7 +23,6 @@ export {
22
23
  getSlugFromPath,
23
24
  loadAllDocs,
24
25
  loadDoc,
25
- pressRoutesPlugin,
26
26
  transformMarkdown,
27
27
  transformMarkdownToReact
28
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ardo",
3
- "version": "1.2.2",
3
+ "version": "2.0.0",
4
4
  "description": "React-first Static Documentation Framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,43 +23,54 @@
23
23
  "types": "./dist/runtime/index.d.ts",
24
24
  "import": "./dist/runtime/index.js"
25
25
  },
26
- "./theme": {
27
- "import": "./dist/theme/index.js",
28
- "types": "./dist/theme/index.d.ts"
26
+ "./ui": {
27
+ "import": "./dist/ui/index.js",
28
+ "types": "./dist/ui/index.d.ts"
29
+ },
30
+ "./ui/styles.css": "./dist/ui/styles.css",
31
+ "./icons": {
32
+ "import": "./dist/icons/index.js",
33
+ "types": "./dist/icons/index.d.ts"
29
34
  },
30
- "./theme/styles.css": "./dist/theme/styles.css",
31
35
  "./typedoc": {
32
36
  "import": "./dist/typedoc/index.js",
33
37
  "types": "./dist/typedoc/index.d.ts"
34
38
  },
35
- "./press.css": "./dist/theme/styles.css"
39
+ "./mdx-provider": {
40
+ "import": "./dist/mdx/provider.js",
41
+ "types": "./dist/mdx/provider.d.ts"
42
+ },
43
+ "./press.css": "./dist/ui/styles.css"
36
44
  },
37
45
  "files": [
38
46
  "dist"
39
47
  ],
40
48
  "dependencies": {
49
+ "@mdx-js/rollup": "^3.1.0",
50
+ "@react-router/dev": "^7.1.0",
41
51
  "@shikijs/rehype": "^3.21.0",
42
- "@tanstack/react-router": "^1.157.16",
43
- "@tanstack/react-start": "^1.157.16",
44
52
  "@vitejs/plugin-react": "^5.1.2",
45
53
  "gray-matter": "^4.0.3",
46
54
  "hast-util-to-jsx-runtime": "^2.3.6",
55
+ "lucide-react": "^0.563.0",
47
56
  "mdast-util-directive": "^3.1.0",
48
57
  "minisearch": "^7.2.0",
58
+ "react": "^19.2.4",
59
+ "react-dom": "^19.2.4",
60
+ "react-router": "^7.1.0",
49
61
  "rehype-parse": "^9.0.1",
50
62
  "rehype-stringify": "^10.0.1",
51
63
  "remark-directive": "^4.0.0",
52
64
  "remark-frontmatter": "^5.0.0",
53
65
  "remark-gfm": "^4.0.1",
66
+ "remark-mdx-frontmatter": "^4.0.0",
54
67
  "remark-parse": "^11.0.0",
55
68
  "remark-rehype": "^11.1.2",
56
69
  "shiki": "^3.21.0",
57
70
  "tailwindcss": "^4.1.18",
58
71
  "typedoc": "^0.28.16",
59
72
  "unified": "^11.0.5",
60
- "unist-util-visit": "^5.1.0",
61
- "react": "^19.2.4",
62
- "react-dom": "^19.2.4"
73
+ "unist-util-visit": "^5.1.0"
63
74
  },
64
75
  "peerDependencies": {
65
76
  "vite": "^6.0.0 || ^7.0.0 || ^8.0.0-beta.0"
@@ -67,6 +78,7 @@
67
78
  "devDependencies": {
68
79
  "@types/hast": "^3.0.4",
69
80
  "@types/mdast": "^4.0.4",
81
+ "@types/mdx": "^2.0.13",
70
82
  "@types/react": "^19.2.10",
71
83
  "@types/react-dom": "^19.2.3",
72
84
  "tsup": "^8.5.1",