@chronoter/main 0.1.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.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><g/><clipPath id="09c95d0b9a"><path d="M 80.140625 331.738281 L 370.222656 331.738281 L 370.222656 370.453125 L 80.140625 370.453125 Z M 80.140625 331.738281 " clip-rule="nonzero"/></clipPath><clipPath id="f2d6124cb1"><path d="M 4.179688 331.738281 L 114.371094 331.738281 L 114.371094 370.453125 L 4.179688 370.453125 Z M 4.179688 331.738281 " clip-rule="nonzero"/></clipPath></defs><g fill="#ffffff" fill-opacity="1"><g transform="translate(74.660155, 294.999956)"><g><path d="M 165.859375 -82.25 L 209.65625 -68.359375 C 202.9375 -43.941406 191.769531 -25.804688 176.15625 -13.953125 C 160.539062 -2.109375 140.734375 3.8125 116.734375 3.8125 C 87.023438 3.8125 62.609375 -6.332031 43.484375 -26.625 C 24.359375 -46.914062 14.796875 -74.660156 14.796875 -109.859375 C 14.796875 -147.085938 24.410156 -176.003906 43.640625 -196.609375 C 62.867188 -217.210938 88.144531 -227.515625 119.46875 -227.515625 C 146.832031 -227.515625 169.0625 -219.425781 186.15625 -203.25 C 196.332031 -193.6875 203.960938 -179.953125 209.046875 -162.046875 L 164.34375 -151.375 C 161.695312 -162.96875 156.175781 -172.117188 147.78125 -178.828125 C 139.382812 -185.546875 129.1875 -188.90625 117.1875 -188.90625 C 100.601562 -188.90625 87.148438 -182.953125 76.828125 -171.046875 C 66.503906 -159.148438 61.34375 -139.875 61.34375 -113.21875 C 61.34375 -84.9375 66.425781 -64.796875 76.59375 -52.796875 C 86.769531 -40.796875 99.992188 -34.796875 116.265625 -34.796875 C 128.273438 -34.796875 138.601562 -38.609375 147.25 -46.234375 C 155.894531 -53.859375 162.097656 -65.863281 165.859375 -82.25 Z M 165.859375 -82.25 "/></g></g></g><g clip-path="url(#09c95d0b9a)"><path fill="#a6a6a6" d="M 80.140625 331.738281 L 370.214844 331.738281 L 370.214844 370.453125 L 80.140625 370.453125 Z M 80.140625 331.738281 " fill-opacity="1" fill-rule="nonzero"/></g><g clip-path="url(#f2d6124cb1)"><path fill="#2563eb" d="M 4.179688 331.738281 L 114.433594 331.738281 L 114.433594 370.453125 L 4.179688 370.453125 Z M 4.179688 331.738281 " fill-opacity="1" fill-rule="nonzero"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" zoomAndPan="magnify" viewBox="0 0 375 374.999991" height="500" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><g/><clipPath id="be91258839"><path d="M 80.140625 331.738281 L 370.222656 331.738281 L 370.222656 370.453125 L 80.140625 370.453125 Z M 80.140625 331.738281 " clip-rule="nonzero"/></clipPath><clipPath id="252f21af0c"><path d="M 4.179688 331.738281 L 114.371094 331.738281 L 114.371094 370.453125 L 4.179688 370.453125 Z M 4.179688 331.738281 " clip-rule="nonzero"/></clipPath></defs><g fill="#000000" fill-opacity="1"><g transform="translate(74.64599, 292.968753)"><g><path d="M 165.859375 -82.25 L 209.65625 -68.359375 C 202.9375 -43.941406 191.769531 -25.804688 176.15625 -13.953125 C 160.539062 -2.109375 140.734375 3.8125 116.734375 3.8125 C 87.023438 3.8125 62.609375 -6.332031 43.484375 -26.625 C 24.359375 -46.914062 14.796875 -74.660156 14.796875 -109.859375 C 14.796875 -147.085938 24.410156 -176.003906 43.640625 -196.609375 C 62.867188 -217.210938 88.144531 -227.515625 119.46875 -227.515625 C 146.832031 -227.515625 169.0625 -219.425781 186.15625 -203.25 C 196.332031 -193.6875 203.960938 -179.953125 209.046875 -162.046875 L 164.34375 -151.375 C 161.695312 -162.96875 156.175781 -172.117188 147.78125 -178.828125 C 139.382812 -185.546875 129.1875 -188.90625 117.1875 -188.90625 C 100.601562 -188.90625 87.148438 -182.953125 76.828125 -171.046875 C 66.503906 -159.148438 61.34375 -139.875 61.34375 -113.21875 C 61.34375 -84.9375 66.425781 -64.796875 76.59375 -52.796875 C 86.769531 -40.796875 99.992188 -34.796875 116.265625 -34.796875 C 128.273438 -34.796875 138.601562 -38.609375 147.25 -46.234375 C 155.894531 -53.859375 162.097656 -65.863281 165.859375 -82.25 Z M 165.859375 -82.25 "/></g></g></g><g clip-path="url(#be91258839)"><path fill="#a6a6a6" d="M 80.140625 331.738281 L 370.214844 331.738281 L 370.214844 370.453125 L 80.140625 370.453125 Z M 80.140625 331.738281 " fill-opacity="1" fill-rule="nonzero"/></g><g clip-path="url(#252f21af0c)"><path fill="#2563eb" d="M 4.179688 331.738281 L 114.433594 331.738281 L 114.433594 370.453125 L 4.179688 370.453125 Z M 4.179688 331.738281 " fill-opacity="1" fill-rule="nonzero"/></g></svg>
@@ -0,0 +1,124 @@
1
+ import { UserConfig } from 'vite';
2
+
3
+ /**
4
+ * 開発サーバー起動ロジック
5
+ *
6
+ * Viteベースの開発サーバーを起動し、MDXファイルをホットリロードで提供
7
+ */
8
+ /**
9
+ * 開発サーバーのオプション
10
+ */
11
+ interface DevServerOptions {
12
+ /** サーバーのポート番号 (デフォルト: 3000) */
13
+ port?: number;
14
+ /** サーバーのホスト (デフォルト: localhost) */
15
+ host?: string;
16
+ /** 起動後にブラウザを自動的に開く (デフォルト: true) */
17
+ open?: boolean;
18
+ /** 作業ディレクトリ (デフォルト: process.cwd()) */
19
+ cwd?: string;
20
+ }
21
+ /**
22
+ * 開発サーバーを起動する
23
+ *
24
+ * @param options サーバーオプション
25
+ * @throws {ConfigError} 設定ファイルが見つからない、または無効な場合
26
+ */
27
+ declare const startDevServer: (options?: DevServerOptions) => Promise<void>;
28
+
29
+ /**
30
+ * Chronoter設定ファイルの型定義
31
+ */
32
+ /**
33
+ * サイトの基本情報
34
+ */
35
+ interface SiteConfig {
36
+ /** サイトのタイトル */
37
+ title: string;
38
+ /** サイトの説明(オプション) */
39
+ description?: string;
40
+ /** サイトのベースURL(オプション) */
41
+ baseUrl?: string;
42
+ }
43
+ /**
44
+ * ナビゲーション項目
45
+ */
46
+ interface NavigationItem {
47
+ /** 表示タイトル */
48
+ title: string;
49
+ /** リンク先のパス(オプション) */
50
+ path?: string;
51
+ /** 子項目(ネスト構造をサポート) */
52
+ items?: NavigationItem[];
53
+ }
54
+ /**
55
+ * 利用可能なテーマ名
56
+ */
57
+ type ThemeVariant = "blue" | "slate" | "violet" | "green" | "orange" | "red" | "rose" | "zinc";
58
+ /**
59
+ * テーマ設定
60
+ */
61
+ interface ThemeConfig {
62
+ /** テーマバリアント(オプション、デフォルト: 'blue') */
63
+ variant?: ThemeVariant;
64
+ /** ロゴ画像のパス(オプション) */
65
+ logo?: string;
66
+ }
67
+ /**
68
+ * サイドバーの動作モード
69
+ */
70
+ type SidebarMode = "auto" | "manual";
71
+ /**
72
+ * Chronoter設定ファイル全体の型定義
73
+ */
74
+ interface ChronoterConfig {
75
+ /** サイト基本情報 */
76
+ site: SiteConfig;
77
+ /** ナビゲーション設定(オプション) */
78
+ navigation?: NavigationItem[];
79
+ /** サイドバーの動作モード(オプション、デフォルト: "auto") */
80
+ sidebarMode?: SidebarMode;
81
+ /** MDX/MDファイルが格納されているディレクトリ(オプション、デフォルト: ".") */
82
+ docsDir?: string;
83
+ /** テーマ設定(オプション) */
84
+ theme?: ThemeConfig;
85
+ /** 除外するパターン(オプション、.gitignoreとデフォルト除外リストに追加される) */
86
+ ignore?: string[];
87
+ }
88
+
89
+ /**
90
+ * Vite設定の生成
91
+ *
92
+ * React、TypeScript、MDXプラグインを含むVite設定を生成する
93
+ */
94
+
95
+ /**
96
+ * Vite設定オプション
97
+ */
98
+ interface ViteConfigOptions {
99
+ /** サーバーのポート番号 */
100
+ port?: number;
101
+ /** サーバーのホスト */
102
+ host?: string;
103
+ /** 作業ディレクトリ */
104
+ cwd?: string;
105
+ }
106
+ /**
107
+ * Chronoter用のVite設定を生成する
108
+ *
109
+ * @param config Chronoter設定
110
+ * @param options Vite設定オプション
111
+ * @returns Vite設定オブジェクト
112
+ *
113
+ * @remarks
114
+ * この関数は以下の設定を含むVite設定を生成します:
115
+ * - React Fast Refresh対応のReactプラグイン
116
+ * - TypeScriptサポート(Viteのビルトイン機能)
117
+ * - MDXプラグイン(将来的に追加予定)
118
+ * - エイリアス設定(@/を共通モジュールにマップ)
119
+ * - 開発サーバー設定(ポート、ホスト)
120
+ * - ファイル監視設定(デフォルト除外パターン + カスタム除外パターン)
121
+ */
122
+ declare const createViteConfig: (config: ChronoterConfig, options?: ViteConfigOptions) => UserConfig;
123
+
124
+ export { type DevServerOptions, type ViteConfigOptions, createViteConfig, startDevServer };