@gmickel/gno 1.30.1 → 1.30.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmickel/gno",
3
- "version": "1.30.1",
3
+ "version": "1.30.4",
4
4
  "description": "Local semantic search for your documents. Index Markdown, PDF, and Office files with hybrid BM25 + vector search.",
5
5
  "keywords": [
6
6
  "embeddings",
@@ -153,78 +153,78 @@
153
153
  "prepack": "bun run package:clipper"
154
154
  },
155
155
  "dependencies": {
156
- "@codemirror/lang-markdown": "6.5.0",
156
+ "@codemirror/lang-markdown": "6.5.1",
157
157
  "@codemirror/theme-one-dark": "6.1.3",
158
- "@modelcontextprotocol/sdk": "1.29.0",
159
- "@radix-ui/react-collapsible": "1.1.12",
160
- "@radix-ui/react-dialog": "1.1.15",
161
- "@radix-ui/react-dropdown-menu": "2.1.16",
162
- "@radix-ui/react-hover-card": "1.1.15",
163
- "@radix-ui/react-progress": "1.1.8",
164
- "@radix-ui/react-scroll-area": "1.2.10",
165
- "@radix-ui/react-select": "2.2.6",
166
- "@radix-ui/react-separator": "1.1.8",
167
- "@radix-ui/react-slot": "1.2.4",
168
- "@radix-ui/react-tooltip": "1.2.8",
158
+ "@modelcontextprotocol/sdk": "1.30.0",
159
+ "@radix-ui/react-collapsible": "1.1.20",
160
+ "@radix-ui/react-dialog": "1.1.23",
161
+ "@radix-ui/react-dropdown-menu": "2.1.24",
162
+ "@radix-ui/react-hover-card": "1.1.23",
163
+ "@radix-ui/react-progress": "1.1.16",
164
+ "@radix-ui/react-scroll-area": "1.2.18",
165
+ "@radix-ui/react-select": "2.3.7",
166
+ "@radix-ui/react-separator": "1.1.15",
167
+ "@radix-ui/react-slot": "1.3.3",
168
+ "@radix-ui/react-tooltip": "1.2.16",
169
169
  "ai": "6.0.68",
170
170
  "bun-plugin-tailwind": "0.1.2",
171
171
  "class-variance-authority": "0.7.1",
172
172
  "clsx": "2.1.1",
173
173
  "cmdk": "1.1.1",
174
174
  "codemirror": "6.0.2",
175
- "commander": "14.0.3",
175
+ "commander": "15.0.0",
176
176
  "embla-carousel-react": "8.6.0",
177
177
  "franc": "6.2.0",
178
178
  "jsonc-parser": "3.3.1",
179
- "lucide-react": "1.8.0",
180
- "markitdown-ts": "0.0.9",
181
- "minimatch": "10.2.3",
182
- "nanoid": "5.1.6",
183
- "node-llama-cpp": "3.18.1",
184
- "officeparser": "6.0.4",
185
- "pdfjs-dist": "5.7.284",
179
+ "lucide-react": "1.28.0",
180
+ "markitdown-ts": "0.0.10",
181
+ "minimatch": "10.2.6",
182
+ "nanoid": "6.0.0",
183
+ "node-llama-cpp": "3.19.1",
184
+ "officeparser": "7.5.0",
185
+ "pdfjs-dist": "6.2.108",
186
186
  "picocolors": "1.1.1",
187
- "react": "19.2.4",
188
- "react-dom": "19.2.4",
189
- "react-force-graph-2d": "1.29.0",
187
+ "react": "19.2.8",
188
+ "react-dom": "19.2.8",
189
+ "react-force-graph-2d": "1.29.1",
190
190
  "react-markdown": "10.1.0",
191
191
  "rehype-sanitize": "6.0.0",
192
192
  "remark-gfm": "4.0.1",
193
- "shiki": "4.0.2",
193
+ "shiki": "4.3.1",
194
194
  "sqlite-vec": "0.1.9",
195
- "streamdown": "2.1.0",
196
- "tailwind-merge": "3.4.0",
197
- "tailwindcss": "4.1.18",
198
- "use-stick-to-bottom": "1.1.2",
199
- "zod": "4.3.6"
195
+ "streamdown": "2.5.0",
196
+ "tailwind-merge": "3.6.0",
197
+ "tailwindcss": "4.3.3",
198
+ "use-stick-to-bottom": "1.1.6",
199
+ "zod": "4.4.3"
200
200
  },
201
201
  "devDependencies": {
202
202
  "@ai-sdk/openai": "3.0.25",
203
- "@biomejs/biome": "2.3.14",
204
- "@tailwindcss/cli": "4.1.18",
203
+ "@biomejs/biome": "2.5.6",
204
+ "@tailwindcss/cli": "4.3.3",
205
205
  "@testing-library/react": "16.3.2",
206
206
  "@testing-library/user-event": "14.6.1",
207
- "@types/bun": "1.3.8",
208
- "@types/react": "19.2.14",
207
+ "@types/bun": "1.3.14",
208
+ "@types/react": "19.2.17",
209
209
  "@types/react-dom": "19.2.3",
210
210
  "@vscode/tree-sitter-wasm": "0.3.1",
211
211
  "ajv": "8.17.1",
212
212
  "ajv-formats": "3.0.1",
213
213
  "bun": "1.3.14",
214
- "docx": "9.5.1",
214
+ "docx": "9.7.1",
215
215
  "evalite": "1.0.0-beta.16",
216
216
  "exceljs": "4.4.0",
217
- "happy-dom": "20.8.9",
218
- "lefthook": "2.1.4",
217
+ "happy-dom": "20.11.1",
218
+ "lefthook": "2.1.10",
219
219
  "oxfmt": "0.28.0",
220
220
  "oxlint": "1.43.0",
221
221
  "oxlint-tsgolint": "0.11.5",
222
222
  "pdf-lib": "1.17.1",
223
- "playwright": "1.58.2",
223
+ "playwright": "1.62.0",
224
224
  "pptxgenjs": "4.0.1",
225
225
  "ultracite": "7.1.5",
226
- "vitest": "4.1.0",
227
- "web-tree-sitter": "0.26.8"
226
+ "vitest": "4.1.10",
227
+ "web-tree-sitter": "0.26.11"
228
228
  },
229
229
  "peerDependencies": {
230
230
  "typescript": "^5"
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * officeparser adapter for PPTX conversion.
3
- * Uses parseOffice() v6 API with Buffer for in-memory extraction.
3
+ * Uses parseOffice() v7 API with Buffer for in-memory extraction.
4
4
  */
5
5
 
6
6
  import { parseOffice } from "officeparser";
@@ -76,12 +76,16 @@ export const officeparserAdapter: Converter = {
76
76
  try {
77
77
  // Zero-copy Buffer view (input.bytes is immutable by contract)
78
78
  const buffer = toBuffer(input.bytes);
79
- // v6 API: parseOffice returns AST, use .toText() for plain text
79
+ // v7's async text renderer preserves notes while keeping the previous
80
+ // plain-text layout and omitting image placeholders.
80
81
  const ast = await parseOffice(buffer, {
81
82
  newlineDelimiter: "\n",
82
83
  ignoreNotes: false, // Include speaker notes
83
84
  });
84
- const text = ast.toText();
85
+ const { value: text } = await ast.to("text", {
86
+ includeImages: false,
87
+ textConfig: { preserveLayout: false, renderNotes: true },
88
+ });
85
89
 
86
90
  if (!text || text.trim().length === 0) {
87
91
  return {
@@ -146,13 +146,13 @@ const resolveContainedPath = async (
146
146
  | {
147
147
  ok: true;
148
148
  absolutePath: string;
149
- metadata: Awaited<ReturnType<typeof stat>>;
149
+ metadata: NonNullable<Awaited<ReturnType<typeof stat>>>;
150
150
  }
151
151
  | { ok: false; diagnostic: ProjectProfileDiagnostic }
152
152
  > => {
153
153
  const candidate = resolve(profileRoot, normalizeLogicalPath(logicalPath));
154
154
  let absolutePath: string;
155
- let metadata: Awaited<ReturnType<typeof stat>>;
155
+ let metadata: NonNullable<Awaited<ReturnType<typeof stat>>>;
156
156
  try {
157
157
  absolutePath = await realpath(candidate);
158
158
  metadata = await stat(absolutePath);
@@ -221,7 +221,7 @@ const deriveKey = async (passphrase: string, salt: Uint8Array) => {
221
221
  {
222
222
  name: "PBKDF2",
223
223
  hash: "SHA-256",
224
- salt,
224
+ salt: Uint8Array.from(salt),
225
225
  iterations: PBKDF2_ITERATIONS,
226
226
  },
227
227
  material,
@@ -1,3 +1,5 @@
1
+ import type { ShikiTransformer } from "shiki/types";
2
+
1
3
  import { CheckIcon, CopyIcon } from "lucide-react";
2
4
  import {
3
5
  type ComponentProps,
@@ -8,7 +10,8 @@ import {
8
10
  useRef,
9
11
  useState,
10
12
  } from "react";
11
- import { codeToHtml, type ShikiTransformer } from "shiki";
13
+ import { type BundledLanguage, createHighlighter } from "shiki";
14
+ import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
12
15
 
13
16
  import { resolveCodeLanguage } from "../../lib/code-language";
14
17
  import { cn } from "../../lib/utils";
@@ -30,6 +33,20 @@ const CodeBlockContext = createContext<CodeBlockContextType>({
30
33
  code: "",
31
34
  });
32
35
 
36
+ const highlighterPromise = createHighlighter({
37
+ engine: createJavaScriptRegexEngine(),
38
+ langs: ["text"],
39
+ themes: ["one-light", "one-dark-pro"],
40
+ });
41
+
42
+ async function getHighlighter(language: BundledLanguage | "text") {
43
+ const highlighter = await highlighterPromise;
44
+ if (!highlighter.getLoadedLanguages().includes(language)) {
45
+ await highlighter.loadLanguage(language);
46
+ }
47
+ return highlighter;
48
+ }
49
+
33
50
  function createLineTransformer(
34
51
  showLineNumbers: boolean,
35
52
  highlightedLines: number[]
@@ -82,39 +99,40 @@ export async function highlightCode(
82
99
  language: string,
83
100
  showLineNumbers = false,
84
101
  highlightedLines: number[] = []
85
- ) {
102
+ ): Promise<[string, string]> {
86
103
  const resolvedLanguage = resolveCodeLanguage(language);
87
104
  const transformers: ShikiTransformer[] =
88
105
  showLineNumbers || highlightedLines.length > 0
89
106
  ? [createLineTransformer(showLineNumbers, highlightedLines)]
90
107
  : [];
108
+ const highlighter = await getHighlighter(resolvedLanguage);
91
109
 
92
110
  try {
93
- return await Promise.all([
94
- codeToHtml(code, {
111
+ return [
112
+ highlighter.codeToHtml(code, {
95
113
  lang: resolvedLanguage,
96
114
  theme: "one-light",
97
115
  transformers,
98
116
  }),
99
- codeToHtml(code, {
117
+ highlighter.codeToHtml(code, {
100
118
  lang: resolvedLanguage,
101
119
  theme: "one-dark-pro",
102
120
  transformers,
103
121
  }),
104
- ]);
122
+ ];
105
123
  } catch {
106
- return await Promise.all([
107
- codeToHtml(code, {
124
+ return [
125
+ highlighter.codeToHtml(code, {
108
126
  lang: "text",
109
127
  theme: "one-light",
110
128
  transformers,
111
129
  }),
112
- codeToHtml(code, {
130
+ highlighter.codeToHtml(code, {
113
131
  lang: "text",
114
132
  theme: "one-dark-pro",
115
133
  transformers,
116
134
  }),
117
- ]);
135
+ ];
118
136
  }
119
137
  }
120
138
 
@@ -304,7 +304,8 @@ export function PdfPageView({
304
304
  if (!rect || rect.length < 4) {
305
305
  continue;
306
306
  }
307
- const [x1, y1, x2, y2] = viewport.convertToViewportRectangle(rect);
307
+ const [x1, y1] = viewport.convertToViewportPoint(rect[0]!, rect[1]!);
308
+ const [x2, y2] = viewport.convertToViewportPoint(rect[2]!, rect[3]!);
308
309
  const left = Math.min(x1, x2);
309
310
  const top = Math.min(y1, y2);
310
311
  const w = Math.abs(x1 - x2);