vigor-moon 1.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 (101) hide show
  1. package/README.md +9 -0
  2. package/bin/vigor.js +2 -0
  3. package/dist/chunk-2M2XJKGT.js +607 -0
  4. package/dist/chunk-3EAR5BNQ.js +610 -0
  5. package/dist/chunk-3ZCIQMBL.js +608 -0
  6. package/dist/chunk-6SPQ2G5U.js +611 -0
  7. package/dist/chunk-7V4TYSIZ.mjs +619 -0
  8. package/dist/chunk-AT54N5D7.js +611 -0
  9. package/dist/chunk-BBRRUMIN.js +616 -0
  10. package/dist/chunk-BE2AQAQS.mjs +608 -0
  11. package/dist/chunk-BS6X4ZCI.js +608 -0
  12. package/dist/chunk-CG4W75R5.mjs +622 -0
  13. package/dist/chunk-D2WJMNSR.js +618 -0
  14. package/dist/chunk-DTA4ZJEQ.mjs +606 -0
  15. package/dist/chunk-ECPJL6H6.js +618 -0
  16. package/dist/chunk-EU5K7BUZ.mjs +612 -0
  17. package/dist/chunk-FAELXJ3Z.mjs +605 -0
  18. package/dist/chunk-GBGTGHKN.js +621 -0
  19. package/dist/chunk-HW7CAZGA.js +611 -0
  20. package/dist/chunk-IDQ7PFDG.mjs +619 -0
  21. package/dist/chunk-IPVDS3I7.mjs +609 -0
  22. package/dist/chunk-JHZIOXVJ.js +605 -0
  23. package/dist/chunk-KRBN43PO.js +606 -0
  24. package/dist/chunk-KTIICQHT.mjs +622 -0
  25. package/dist/chunk-KZQIA6WA.js +604 -0
  26. package/dist/chunk-L4MZ52TR.mjs +609 -0
  27. package/dist/chunk-LEOZIK2T.mjs +607 -0
  28. package/dist/chunk-LS3TOABU.js +61 -0
  29. package/dist/chunk-MHZT64KI.mjs +605 -0
  30. package/dist/chunk-NTJI6VKJ.mjs +619 -0
  31. package/dist/chunk-NWZZITYZ.mjs +606 -0
  32. package/dist/chunk-OS3F7QDD.js +606 -0
  33. package/dist/chunk-PJPXX4UA.mjs +605 -0
  34. package/dist/chunk-PW73M55D.mjs +611 -0
  35. package/dist/chunk-R6L6GYA4.mjs +607 -0
  36. package/dist/chunk-RNUPZ4CR.mjs +612 -0
  37. package/dist/chunk-SEIXDGYJ.mjs +615 -0
  38. package/dist/chunk-SO47EKIV.mjs +69 -0
  39. package/dist/chunk-SYCZ35ZW.js +604 -0
  40. package/dist/chunk-THZGRR4I.js +611 -0
  41. package/dist/chunk-TJ5NMLCW.js +614 -0
  42. package/dist/chunk-TYBNSCBA.mjs +611 -0
  43. package/dist/chunk-UGBCHWPA.js +621 -0
  44. package/dist/chunk-VD42YO6T.mjs +622 -0
  45. package/dist/chunk-VMNTKZYD.js +604 -0
  46. package/dist/chunk-W6MHPTGR.js +605 -0
  47. package/dist/chunk-WBSL45KV.mjs +617 -0
  48. package/dist/chunk-X5IY67V6.js +621 -0
  49. package/dist/chunk-XFGBQ3QD.mjs +612 -0
  50. package/dist/chunk-ZBAZASII.js +618 -0
  51. package/dist/chunk-ZGLENLKC.js +610 -0
  52. package/dist/chunk-ZN4CSBNG.mjs +612 -0
  53. package/dist/cli.d.ts +2 -0
  54. package/dist/cli.js +296 -0
  55. package/dist/cli.mjs +296 -0
  56. package/dist/dev.d.ts +5 -0
  57. package/dist/dev.js +7 -0
  58. package/dist/dev.mjs +7 -0
  59. package/dist/index.d.ts +40 -0
  60. package/dist/index.js +6 -0
  61. package/dist/index.mjs +6 -0
  62. package/package.json +97 -0
  63. package/src/core/cli.ts +0 -0
  64. package/src/runtime/App.tsx +38 -0
  65. package/src/runtime/Content.tsx +27 -0
  66. package/src/runtime/client-entry.tsx +30 -0
  67. package/src/runtime/hooks.ts +8 -0
  68. package/src/runtime/index.ts +2 -0
  69. package/src/runtime/ssr-entry.tsx +24 -0
  70. package/src/theme-default/Layout/doc/doc.tsx +46 -0
  71. package/src/theme-default/Layout/doc/index.module.scss +154 -0
  72. package/src/theme-default/Layout/home/home.tsx +16 -0
  73. package/src/theme-default/Layout/index.tsx +38 -0
  74. package/src/theme-default/Layout/notFound/index.module.scss +7 -0
  75. package/src/theme-default/Layout/notFound/index.tsx +30 -0
  76. package/src/theme-default/component/Button/index.module.scss +36 -0
  77. package/src/theme-default/component/Button/index.tsx +42 -0
  78. package/src/theme-default/component/Link/index.module.scss +10 -0
  79. package/src/theme-default/component/Link/index.tsx +28 -0
  80. package/src/theme-default/component/feature/index.module.scss +10 -0
  81. package/src/theme-default/component/feature/index.tsx +28 -0
  82. package/src/theme-default/component/footer/index.module.scss +4 -0
  83. package/src/theme-default/component/footer/index.tsx +13 -0
  84. package/src/theme-default/component/hero/index.module.scss +5 -0
  85. package/src/theme-default/component/hero/index.tsx +48 -0
  86. package/src/theme-default/component/nav/index.module.scss +24 -0
  87. package/src/theme-default/component/nav/index.tsx +43 -0
  88. package/src/theme-default/component/nextPage/index.module.scss +43 -0
  89. package/src/theme-default/component/nextPage/index.tsx +64 -0
  90. package/src/theme-default/component/sidebar/index.module.scss +22 -0
  91. package/src/theme-default/component/sidebar/index.tsx +52 -0
  92. package/src/theme-default/component/switchTheme/index.module.scss +0 -0
  93. package/src/theme-default/component/switchTheme/index.tsx +9 -0
  94. package/src/theme-default/component/toc/activeScroll.ts +37 -0
  95. package/src/theme-default/component/toc/index.module.scss +7 -0
  96. package/src/theme-default/component/toc/index.tsx +60 -0
  97. package/src/theme-default/styles/base.css +92 -0
  98. package/src/theme-default/styles/vars.css +111 -0
  99. package/src/types/attributify-shims.d.ts +5 -0
  100. package/src/types/index.ts +129 -0
  101. package/src/types/types.d.ts +16 -0
@@ -0,0 +1,129 @@
1
+ import { UserConfig as ViteUserConfig } from "vitest/config";
2
+ import { ComponentType } from "react";
3
+
4
+ // 导航栏 -> 包括文本和链接
5
+ export interface NavItemsConfig {
6
+ text: string;
7
+ link: string;
8
+ }
9
+
10
+ // 侧边栏每个子栏
11
+ export type SidebarItem =
12
+ | { text: string; link: string }
13
+ | { text: string; link?: string; items: SidebarItem[] };
14
+
15
+ // 侧边栏组
16
+ export interface SidebarGroup {
17
+ text?: string;
18
+ items: SidebarItem[];
19
+ }
20
+
21
+ // 侧边栏
22
+ export interface SidebarConfig {
23
+ [path: string]: SidebarGroup[];
24
+ }
25
+
26
+ // 页脚的配置
27
+ export interface FooterConfig {
28
+ message?: string;
29
+ copyright?: string;
30
+ }
31
+
32
+ // 主题配置
33
+ export interface ThemeConfig {
34
+ nav?: NavItemsConfig[];
35
+ sidebar?: SidebarConfig;
36
+ footer?: FooterConfig;
37
+ }
38
+
39
+ // 用户配置
40
+ export interface UserConfig {
41
+ title?: string;
42
+ description?: string;
43
+ themeConfig?: ThemeConfig;
44
+ vite?: ViteUserConfig;
45
+ }
46
+
47
+ // 网站配置
48
+ export interface SiteConfig {
49
+ root: string;
50
+ configPath: string;
51
+ siteData: UserConfig;
52
+ }
53
+
54
+ export type PageType = "home" | "doc" | "custom" | "404";
55
+
56
+ export interface Frontmatter {
57
+ title?: string;
58
+ description?: string;
59
+ // 页面类型
60
+ pageType?: PageType;
61
+ // 侧边栏
62
+ sidebar?: boolean;
63
+ // 大纲栏
64
+ outline?: boolean;
65
+ }
66
+
67
+ export interface TocTree {
68
+ id: string;
69
+ text: string;
70
+ depth: number;
71
+ }
72
+
73
+ // 传递给前端的信息
74
+ export interface PageData {
75
+ title: string;
76
+ // 网站的配置信息
77
+ siteData: UserConfig;
78
+ // 当前页面的路由
79
+ pagePath: string;
80
+ // 当前页面的元数据
81
+ frontmatter: Frontmatter;
82
+ pageType: PageType;
83
+ toc?: TocTree[];
84
+ }
85
+
86
+ // export interface PageModule {
87
+ // default: ComponentType;
88
+ // frontmatter?: Frontmatter;
89
+ // toc?: TocTree[];
90
+ // [key: string]: unknown;
91
+ // }
92
+
93
+ export interface Image {
94
+ src: string;
95
+ alt?: string;
96
+ }
97
+
98
+ export interface Action {
99
+ theme: "brand" | "alt";
100
+ text?: string;
101
+ link?: string;
102
+ }
103
+
104
+ // 主页Hero组件
105
+ export interface Hero {
106
+ name?: string;
107
+ text?: string;
108
+ tagline?: string;
109
+ image?: Image;
110
+ actions?: Action[];
111
+ }
112
+
113
+ // 主页Feature组件
114
+ export interface Feature {
115
+ title: string;
116
+ details: string;
117
+ icon?: string;
118
+ }
119
+ // 关于主页中的frontmatter类型,下面涉及到的部分类型都在上面进行注明
120
+ export interface Frontmatter {
121
+ title?: string;
122
+ description?: string;
123
+ pageType?: PageType;
124
+ sidebar?: boolean;
125
+ outLine?: boolean;
126
+ hero?: Hero;
127
+ features?: Feature[];
128
+ footer?: FooterConfig;
129
+ }
@@ -0,0 +1,16 @@
1
+ declare module "vigor:site-data" {
2
+ import type { UserConfig } from "types";
3
+ const siteData: UserConfig;
4
+ export default siteData;
5
+ }
6
+
7
+ declare module "vigor:routes" {
8
+ import { RouteObject } from "react-router-dom";
9
+ const routes: RouteObject[];
10
+ export { routes };
11
+ }
12
+
13
+ declare module "*.module.scss" {
14
+ const classes: { [key: string]: string };
15
+ export default classes;
16
+ }