fumadocs-core 14.5.4 → 14.5.6

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.
@@ -51,7 +51,7 @@ async function searchAdvanced(db, query, tag, extraParams = {}) {
51
51
  const list = [];
52
52
  for (const item of result.groups ?? []) {
53
53
  const pageId = item.values[0];
54
- const page = getByID(db, pageId);
54
+ const page = await getByID(db, pageId);
55
55
  if (!page) continue;
56
56
  list.push({
57
57
  id: pageId,
@@ -1,11 +1,11 @@
1
- import {
2
- resolvePath,
3
- slash
4
- } from "../chunk-SHGL6VBO.js";
5
1
  import {
6
2
  flattenNode,
7
3
  remarkHeading
8
4
  } from "../chunk-4MNUWZIW.js";
5
+ import {
6
+ resolvePath,
7
+ slash
8
+ } from "../chunk-SHGL6VBO.js";
9
9
  import {
10
10
  createStyleTransformer,
11
11
  defaultThemes
@@ -20,7 +20,7 @@ import {
20
20
  // src/mdx-plugins/rehype-code.ts
21
21
  import rehypeShikiFromHighlighter from "@shikijs/rehype/core";
22
22
 
23
- // ../../node_modules/.pnpm/shiki-transformers@1.0.1_shiki@1.23.1/node_modules/shiki-transformers/dist/index.js
23
+ // ../../node_modules/.pnpm/shiki-transformers@1.0.1_shiki@1.24.0/node_modules/shiki-transformers/dist/index.js
24
24
  var matchers = [
25
25
  [/^(<!--)(.+)(-->)$/, false],
26
26
  [/^(\/\*)(.+)(\*\/)$/, false],
@@ -67,7 +67,7 @@ function useDocsSearch(client, locale, tag, delayMs = 100, allowEmpty = false, k
67
67
  const { searchDocs } = await import("../orama-cloud-QNHGN6SO.js");
68
68
  return searchDocs(debouncedValue, tag, client);
69
69
  }
70
- const { createStaticClient } = await import("../static-5GPJ7RUY.js");
70
+ const { createStaticClient } = await import("../static-FSUPSGDU.js");
71
71
  if (!staticClient) staticClient = createStaticClient(client);
72
72
  return staticClient.search(debouncedValue, locale, tag);
73
73
  }
@@ -1,4 +1,4 @@
1
- import { TypedDocument, Orama, Language, SorterConfig, Tokenizer, DefaultTokenizerConfig, OramaPlugin, SearchParams } from '@orama/orama';
1
+ import { TypedDocument, Orama, Language, SearchParams, SorterConfig, Tokenizer, DefaultTokenizerConfig, OramaPlugin } from '@orama/orama';
2
2
  import { NextRequest } from 'next/server';
3
3
  import { S as StructuredData } from '../remark-structure-mP51W1AN.js';
4
4
  import { S as SortedResult } from '../types-Ch8gnVgO.js';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  searchAdvanced,
3
3
  searchSimple
4
- } from "../chunk-2ZSMGYVH.js";
4
+ } from "../chunk-SNREABER.js";
5
5
  import "../chunk-2V6SCS43.js";
6
6
  import "../chunk-MLKGABMK.js";
7
7
 
@@ -51,7 +51,7 @@ async function createDB({
51
51
  ...rest
52
52
  }) {
53
53
  const items = typeof indexes === "function" ? await indexes() : indexes;
54
- const db = create({
54
+ const db = await create({
55
55
  ...rest,
56
56
  schema: advancedSchema,
57
57
  components: {
@@ -116,7 +116,7 @@ async function createDBSimple({
116
116
  language
117
117
  }) {
118
118
  const items = typeof indexes === "function" ? await indexes() : indexes;
119
- const db = create2({
119
+ const db = await create2({
120
120
  language,
121
121
  schema: {
122
122
  url: "string",
package/dist/sidebar.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReactNode, ElementType, ComponentPropsWithoutRef, ReactElement } from 'react';
1
+ import { ReactNode, ElementType, ReactElement, ComponentPropsWithoutRef } from 'react';
2
2
 
3
3
  interface SidebarProviderProps {
4
4
  open?: boolean;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  searchAdvanced,
3
3
  searchSimple
4
- } from "./chunk-2ZSMGYVH.js";
4
+ } from "./chunk-SNREABER.js";
5
5
  import "./chunk-2V6SCS43.js";
6
6
  import "./chunk-MLKGABMK.js";
7
7
 
@@ -22,17 +22,17 @@ function createStaticClient({
22
22
  );
23
23
  const data = await res.json();
24
24
  if (data.type === "i18n") {
25
- Object.entries(data.data).forEach(([k, v]) => {
26
- const db = create({ schema: { _: "string" } });
27
- load(db, v);
25
+ for (const [k, v] of Object.entries(data.data)) {
26
+ const db = await create({ schema: { _: "string" } });
27
+ await load(db, v);
28
28
  dbs.set(k, {
29
29
  type: v.type,
30
30
  db
31
31
  });
32
- });
32
+ }
33
33
  } else {
34
- const db = create({ schema: { _: "string" } });
35
- load(db, data);
34
+ const db = await create({ schema: { _: "string" } });
35
+ await load(db, data);
36
36
  dbs.set("", {
37
37
  type: data.type,
38
38
  db
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-core",
3
- "version": "14.5.4",
3
+ "version": "14.5.6",
4
4
  "description": "The library for building a documentation website in Next.js",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -74,8 +74,8 @@
74
74
  ],
75
75
  "dependencies": {
76
76
  "@formatjs/intl-localematcher": "^0.5.8",
77
- "@orama/orama": "^3.0.2",
78
- "@shikijs/rehype": "^1.23.1",
77
+ "@orama/orama": "^2.1.1",
78
+ "@shikijs/rehype": "^1.24.0",
79
79
  "github-slugger": "^2.0.0",
80
80
  "hast-util-to-estree": "^3.1.0",
81
81
  "hast-util-to-jsx-runtime": "^2.3.2",
@@ -85,10 +85,11 @@
85
85
  "remark": "^15.0.0",
86
86
  "remark-gfm": "^4.0.0",
87
87
  "scroll-into-view-if-needed": "^3.1.0",
88
- "shiki": "^1.23.1",
88
+ "shiki": "^1.24.0",
89
89
  "unist-util-visit": "^5.0.0"
90
90
  },
91
91
  "devDependencies": {
92
+ "typescript": "^5.7.2",
92
93
  "@algolia/client-search": "4.24.0",
93
94
  "@mdx-js/mdx": "^3.1.0",
94
95
  "@oramacloud/client": "^2.1.4",
@@ -96,7 +97,7 @@
96
97
  "@types/hast": "^3.0.4",
97
98
  "@types/mdast": "^4.0.3",
98
99
  "@types/negotiator": "^0.6.3",
99
- "@types/node": "22.9.3",
100
+ "@types/node": "22.10.1",
100
101
  "@types/react": "^18.3.12",
101
102
  "@types/react-dom": "^18.3.1",
102
103
  "algoliasearch": "4.24.0",
@@ -111,7 +112,7 @@
111
112
  "tsconfig": "0.0.0"
112
113
  },
113
114
  "peerDependencies": {
114
- "@oramacloud/client": "1.x.x",
115
+ "@oramacloud/client": "1.x.x || 2.x.x",
115
116
  "algoliasearch": "4.24.0",
116
117
  "next": "14.x.x || 15.x.x",
117
118
  "react": ">= 18",