@rspress/core 2.0.0-beta.20 → 2.0.0-beta.21

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/dist/index.d.ts CHANGED
@@ -1,15 +1,32 @@
1
1
  import { AdditionalPage } from '@rspress/shared';
2
2
  import type { Data as Data_2 } from 'unist';
3
3
  import { DefaultThemeConfig } from '@rspress/shared';
4
+ import { getIconUrlPath } from '@rspress/shared/node-utils';
5
+ import { getNodeAttribute } from '@rspress/shared/node-utils';
6
+ import { getSidebarDataGroup } from '@rspress/shared';
7
+ import { logger } from '@rspress/shared/logger';
8
+ import { matchPath } from '@rspress/runtime/server';
4
9
  import { mergeDocConfig } from '@rspress/shared/node-utils';
10
+ import { Nav } from '@rspress/shared';
11
+ import { NavItemWithLink } from '@rspress/shared';
5
12
  import type { Node as Node_3 } from 'unist';
6
- import type { PageIndexInfo } from '@rspress/shared';
13
+ import { normalizeHref } from '@rspress/shared';
14
+ import { normalizePosixPath } from '@rspress/shared';
15
+ import { PageIndexInfo } from '@rspress/shared';
7
16
  import type { Plugin as Plugin_2 } from 'unified';
8
- import type { RouteMeta } from '@rspress/shared';
17
+ import { removeTrailingSlash } from '@rspress/shared';
18
+ import { RouteMeta } from '@rspress/shared';
9
19
  import type { RsbuildConfig } from '@rsbuild/core';
10
20
  import { RsbuildInstance } from '@rsbuild/core';
11
- import type { RspressPlugin } from '@rspress/shared';
12
- import type { UserConfig } from '@rspress/shared';
21
+ import { RSPRESS_TEMP_DIR } from '@rspress/shared';
22
+ import { RspressPlugin } from '@rspress/shared';
23
+ import { Sidebar } from '@rspress/shared';
24
+ import { SidebarDivider } from '@rspress/shared';
25
+ import { SidebarGroup } from '@rspress/shared';
26
+ import { SidebarItem } from '@rspress/shared';
27
+ import { SidebarSectionHeader } from '@rspress/shared';
28
+ import { UserConfig } from '@rspress/shared';
29
+ import { withBase } from '@rspress/shared';
13
30
 
14
31
  export declare function build(options: BuildOptions): Promise<void>;
15
32
 
@@ -49,6 +66,12 @@ declare interface DevOptions {
49
66
  extraBuilderConfig?: RsbuildConfig;
50
67
  }
51
68
 
69
+ export { getIconUrlPath }
70
+
71
+ export { getNodeAttribute }
72
+
73
+ export { getSidebarDataGroup }
74
+
52
75
  declare interface InitOptions {
53
76
  scanDir: string;
54
77
  config: UserConfig;
@@ -56,8 +79,16 @@ declare interface InitOptions {
56
79
  pluginDriver: PluginDriver;
57
80
  }
58
81
 
82
+ export { logger }
83
+
84
+ export { matchPath }
85
+
59
86
  export { mergeDocConfig }
60
87
 
88
+ export { Nav }
89
+
90
+ export { NavItemWithLink }
91
+
61
92
  /**
62
93
  * Abstract mdast node.
63
94
  *
@@ -78,6 +109,12 @@ declare interface Node_2 extends Node_3 {
78
109
  data?: Data | undefined;
79
110
  }
80
111
 
112
+ export { normalizeHref }
113
+
114
+ export { normalizePosixPath }
115
+
116
+ export { PageIndexInfo }
117
+
81
118
  /**
82
119
  * Abstract mdast node that contains other mdast nodes (*children*).
83
120
  *
@@ -121,6 +158,10 @@ declare class PluginDriver {
121
158
  _runSerialAsyncHook<H extends RspressPluginHookKeys>(hookName: H, ...args: Parameters<Required<RspressPlugin>[H]>): RspressPlugin;
122
159
  }
123
160
 
161
+ export declare const remarkFileCodeBlock: Plugin_2<[{
162
+ filepath: string;
163
+ }], Root>;
164
+
124
165
  /**
125
166
  * Remark plugin to normalize a link href
126
167
  */
@@ -133,6 +174,8 @@ export declare const remarkPluginNormalizeLink: Plugin_2<[
133
174
  }
134
175
  ], Root>;
135
176
 
177
+ export { removeTrailingSlash }
178
+
136
179
  /**
137
180
  * Document fragment or a whole document.
138
181
  *
@@ -162,6 +205,8 @@ declare type RootContent = RootContentMap[keyof RootContentMap];
162
205
  */
163
206
  declare interface RootData extends Data {}
164
207
 
208
+ export { RouteMeta }
209
+
165
210
  declare class RoutePage {
166
211
  #private;
167
212
  routeMeta: RouteMeta;
@@ -184,7 +229,7 @@ export declare class RouteService {
184
229
  getRoutePages(): RoutePage[];
185
230
  isExistRoute(routePath: string): boolean;
186
231
  generateRoutesCode(): string;
187
- generateRoutesCodeByRouteMeta(routeMeta: RouteMeta[]): string;
232
+ private generateRoutesCodeByRouteMeta;
188
233
  getRoutePathParts(relativePath: string): readonly [string, string, string];
189
234
  normalizeRoutePath(relativePath: string): {
190
235
  pureRoutePath: string;
@@ -197,6 +242,10 @@ export declare class RouteService {
197
242
  getRoutePageByRoutePath(routePath: string): RoutePage | undefined;
198
243
  }
199
244
 
245
+ export { RSPRESS_TEMP_DIR }
246
+
247
+ export { RspressPlugin }
248
+
200
249
  declare type RspressPluginHookKeys = 'beforeBuild' | 'config' | 'afterBuild' | 'addPages' | 'addRuntimeModules' | 'routeGenerated' | 'routeServiceGenerated' | 'addSSGRoutes' | 'extendPageData' | 'modifySearchIndexData';
201
250
 
202
251
  export declare function serve(options: ServeOptions): Promise<ReturnType<RsbuildInstance['preview']>>;
@@ -212,7 +261,18 @@ declare interface ServerInstance {
212
261
  close: () => Promise<void>;
213
262
  }
214
263
 
264
+ export { Sidebar }
265
+
266
+ export { SidebarDivider }
267
+
268
+ export { SidebarGroup }
269
+
270
+ export { SidebarItem }
271
+
272
+ export { SidebarSectionHeader }
273
+
274
+ export { UserConfig }
215
275
 
216
- export * from "@rspress/shared";
276
+ export { withBase }
217
277
 
218
278
  export { }