@rspress/shared 1.33.0 → 1.33.1

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 (2) hide show
  1. package/dist/index.d.ts +10 -2
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -545,7 +545,10 @@ interface UserConfig<ThemeConfig = Config$1> {
545
545
  versions: string[];
546
546
  };
547
547
  }
548
- type BaseRuntimePageInfo = Omit<PageIndexInfo, 'id' | 'content' | 'domain'>;
548
+ type RemoveUnderscoreProps<T> = {
549
+ [K in keyof T as K extends `_${string}` ? never : K]: T[K];
550
+ };
551
+ type BaseRuntimePageInfo = Omit<RemoveUnderscoreProps<PageIndexInfo>, 'id' | 'content' | 'domain'>;
549
552
  interface SiteData<ThemeConfig = NormalizedConfig> {
550
553
  root: string;
551
554
  base: string;
@@ -577,12 +580,18 @@ interface SiteData<ThemeConfig = NormalizedConfig> {
577
580
  versions: string[];
578
581
  };
579
582
  }
583
+ /**
584
+ * @description search-index.json file
585
+ * "_foo" is the private field that won't be written to search-index.json file
586
+ * and should not be used in the runtime (usePageData).
587
+ */
580
588
  type PageIndexInfo = {
581
589
  id: number;
582
590
  title: string;
583
591
  routePath: string;
584
592
  toc: Header[];
585
593
  content: string;
594
+ _html: string;
586
595
  frontmatter: Record<string, unknown>;
587
596
  lang: string;
588
597
  version: string;
@@ -658,7 +667,6 @@ interface PageData {
658
667
  lastUpdatedTime?: string;
659
668
  description?: string;
660
669
  pageType: PageType;
661
- _relativePath: string;
662
670
  [key: string]: unknown;
663
671
  };
664
672
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "1.33.0",
3
+ "version": "1.33.1",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -42,7 +42,7 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@rsbuild/core": "1.0.12",
45
+ "@rsbuild/core": "1.0.13",
46
46
  "chalk": "5.3.0",
47
47
  "execa": "5.1.1",
48
48
  "fs-extra": "11.2.0",