@rspress/shared 1.40.2 → 1.41.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.
@@ -742,6 +742,11 @@ type LocalSearchOptions = SearchHooks & {
742
742
  * Whether to generate separate search index for each version
743
743
  */
744
744
  versioned?: boolean;
745
+ /**
746
+ * If enabled, the search index will include code block content, which allows users to search code blocks.
747
+ * @default false
748
+ */
749
+ codeBlocks?: boolean;
745
750
  };
746
751
  type RemoteSearchIndexInfo = string | {
747
752
  value: string;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AdditionalPage, B as BaseRuntimePageInfo, r as Config, C as DefaultThemeConfig, O as DocFooter, K as EditLink, F as Feature, t as FilterConfig, V as Footer, i as FrontMatterMeta, H as Header, f as Hero, I as Image, m as LocalSearchOptions, L as Locale, s as LocaleConfig, X as LocaleLink, W as LocaleLinks, q as MarkdownOptions, M as MdxRsOptions, u as Nav, v as NavItem, x as NavItemWithChildren, w as NavItemWithLink, y as NavItemWithLinkAndChildren, N as NormalizedConfig, N as NormalizedDefaultThemeConfig, _ as NormalizedLocales, Z as NormalizedSidebar, Y as NormalizedSidebarGroup, j as PageData, P as PageIndexInfo, g as PageModule, h as PageType, R as Plugin, e as RemotePageInfo, n as RemoteSearchIndexInfo, o as RemoteSearchOptions, c as ReplaceRule, a as Route, b as RouteMeta, k as RouteOptions, R as RspressPlugin, S as SSGConfig, l as SearchHooks, p as SearchOptions, z as Sidebar, G as SidebarDivider, D as SidebarGroup, E as SidebarItem, J as SidebarSectionHeader, d as SiteData, Q as SocialLink, T as SocialLinkIcon, U as UserConfig } from './index-f2a475dd.js';
1
+ export { A as AdditionalPage, B as BaseRuntimePageInfo, r as Config, C as DefaultThemeConfig, O as DocFooter, K as EditLink, F as Feature, t as FilterConfig, V as Footer, i as FrontMatterMeta, H as Header, f as Hero, I as Image, m as LocalSearchOptions, L as Locale, s as LocaleConfig, X as LocaleLink, W as LocaleLinks, q as MarkdownOptions, M as MdxRsOptions, u as Nav, v as NavItem, x as NavItemWithChildren, w as NavItemWithLink, y as NavItemWithLinkAndChildren, N as NormalizedConfig, N as NormalizedDefaultThemeConfig, _ as NormalizedLocales, Z as NormalizedSidebar, Y as NormalizedSidebarGroup, j as PageData, P as PageIndexInfo, g as PageModule, h as PageType, R as Plugin, e as RemotePageInfo, n as RemoteSearchIndexInfo, o as RemoteSearchOptions, c as ReplaceRule, a as Route, b as RouteMeta, k as RouteOptions, R as RspressPlugin, S as SSGConfig, l as SearchHooks, p as SearchOptions, z as Sidebar, G as SidebarDivider, D as SidebarGroup, E as SidebarItem, J as SidebarSectionHeader, d as SiteData, Q as SocialLink, T as SocialLinkIcon, U as UserConfig } from './index-ba0faa42.js';
2
2
  import '@rsbuild/core';
3
3
  import 'unified';
4
4
 
package/dist/logger.d.ts CHANGED
@@ -1,4 +1,2 @@
1
1
  export { logger } from '@rsbuild/core';
2
- import 'fs-extra';
3
2
  import 'chalk';
4
- import 'execa';
@@ -1,4 +1,4 @@
1
- import { U as UserConfig } from './index-f2a475dd.js';
1
+ import { U as UserConfig } from './index-ba0faa42.js';
2
2
  import '@rsbuild/core';
3
3
  import 'unified';
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "1.40.2",
3
+ "version": "1.41.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rspress",
@@ -13,21 +13,11 @@
13
13
  "import": "./dist/index.mjs",
14
14
  "require": "./dist/index.js"
15
15
  },
16
- "./execa": {
17
- "types": "./dist/execa.d.ts",
18
- "import": "./dist/execa.mjs",
19
- "require": "./dist/execa.js"
20
- },
21
16
  "./chalk": {
22
17
  "types": "./dist/chalk.d.ts",
23
18
  "import": "./dist/chalk.mjs",
24
19
  "require": "./dist/chalk.js"
25
20
  },
26
- "./fs-extra": {
27
- "types": "./dist/fs-extra.d.ts",
28
- "import": "./dist/fs-extra.mjs",
29
- "require": "./dist/fs-extra.js"
30
- },
31
21
  "./logger": {
32
22
  "types": "./dist/logger.d.ts",
33
23
  "import": "./dist/logger.mjs",
@@ -46,16 +36,13 @@
46
36
  "dist"
47
37
  ],
48
38
  "dependencies": {
49
- "@rsbuild/core": "1.2.0",
39
+ "@rsbuild/core": "1.2.3",
50
40
  "chalk": "5.4.1",
51
- "execa": "5.1.1",
52
- "fs-extra": "11.2.0",
53
41
  "gray-matter": "4.0.3",
54
42
  "lodash-es": "^4.17.21",
55
43
  "unified": "^10.1.2"
56
44
  },
57
45
  "devDependencies": {
58
- "@types/fs-extra": "11.0.4",
59
46
  "@types/jest": "~29.5.14",
60
47
  "@types/lodash-es": "^4.17.12",
61
48
  "@types/node": "^18.11.17",
package/dist/execa.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from 'execa';
2
- export { default } from 'execa';
package/dist/execa.js DELETED
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // src/execa.ts
32
- var execa_exports = {};
33
- __export(execa_exports, {
34
- default: () => import_execa.default
35
- });
36
- module.exports = __toCommonJS(execa_exports);
37
- __reExport(execa_exports, require("execa"), module.exports);
38
- var import_execa = __toESM(require("execa"));
39
- // Annotate the CommonJS export names for ESM import in node:
40
- 0 && (module.exports = {
41
- ...require("execa")
42
- });
package/dist/execa.mjs DELETED
@@ -1,6 +0,0 @@
1
- // src/execa.ts
2
- export * from "execa";
3
- import { default as default2 } from "execa";
4
- export {
5
- default2 as default
6
- };
@@ -1,2 +0,0 @@
1
- export * from 'fs-extra';
2
- export { default } from 'fs-extra';
package/dist/fs-extra.js DELETED
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // src/fs-extra.ts
32
- var fs_extra_exports = {};
33
- __export(fs_extra_exports, {
34
- default: () => import_fs_extra.default
35
- });
36
- module.exports = __toCommonJS(fs_extra_exports);
37
- __reExport(fs_extra_exports, require("fs-extra"), module.exports);
38
- var import_fs_extra = __toESM(require("fs-extra"));
39
- // Annotate the CommonJS export names for ESM import in node:
40
- 0 && (module.exports = {
41
- ...require("fs-extra")
42
- });
package/dist/fs-extra.mjs DELETED
@@ -1,6 +0,0 @@
1
- // src/fs-extra.ts
2
- export * from "fs-extra";
3
- import { default as default2 } from "fs-extra";
4
- export {
5
- default2 as default
6
- };