scream-code 0.18.7 → 0.18.9
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/README.md +6 -3
- package/dist/{app-IU7G9gs0.mjs → app-D3QT1bx1.mjs} +502 -211
- package/dist/{dispatch-7Mas_Tvb.mjs → dispatch-BcRHd4ya.mjs} +477 -56
- package/dist/{dispatch-BqBnrIMj.mjs → dispatch-JYsyD0aN.mjs} +1 -1
- package/dist/main.mjs +1 -1
- package/dist/{markit-CVQeFGFG.mjs → markit-CV3BXOV_.mjs} +20 -13
- package/dist/{src-ChTWl9Cn.mjs → src-B1S88rK6.mjs} +1 -1
- package/dist/{src-CQwXASmd.mjs → src-DIVvoAYO.mjs} +522 -134
- package/dist/{text-input-dialog-D7dm6kak.mjs → text-input-dialog-CgAOMXv1.mjs} +1 -1
- package/dist/{text-input-dialog-gDr3i7xz.mjs → text-input-dialog-CqagQQtW.mjs} +96 -14
- package/package.json +3 -4
|
@@ -3,5 +3,5 @@ import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';
|
|
|
3
3
|
import { dirname as __cjsShimDirname } from 'node:path';
|
|
4
4
|
const __filename = __cjsShimFileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = __cjsShimDirname(__filename);
|
|
6
|
-
import {
|
|
6
|
+
import { on as handleConnectCommand } from "./dispatch-BcRHd4ya.mjs";
|
|
7
7
|
export { handleConnectCommand };
|
package/dist/main.mjs
CHANGED
|
@@ -6,7 +6,7 @@ const __dirname = __cjsShimDirname(__filename);
|
|
|
6
6
|
import "./suppress-sqlite-warning-C2VB0doZ.mjs";
|
|
7
7
|
//#region src/main.ts
|
|
8
8
|
try {
|
|
9
|
-
(await import("./app-
|
|
9
|
+
(await import("./app-D3QT1bx1.mjs")).main();
|
|
10
10
|
} catch (error) {
|
|
11
11
|
process.stderr.write(`${error instanceof Error ? error.stack ?? error.message : String(error)}\n`);
|
|
12
12
|
process.exit(1);
|
|
@@ -8,6 +8,13 @@ import { n as require_base64_js, t as XMLParser } from "./XMLParser-DFAnGqkc.mjs
|
|
|
8
8
|
import * as fs$1 from "node:fs/promises";
|
|
9
9
|
import * as path$1 from "node:path";
|
|
10
10
|
import { createRequire } from "module";
|
|
11
|
+
//#region ../../packages/knowledge/src/markit/mupdf-quiet.ts
|
|
12
|
+
const globalScope = globalThis;
|
|
13
|
+
const moduleConfig = globalScope.$libmupdf_wasm_Module ?? {};
|
|
14
|
+
moduleConfig.print ??= () => {};
|
|
15
|
+
moduleConfig.printErr ??= () => {};
|
|
16
|
+
globalScope.$libmupdf_wasm_Module = moduleConfig;
|
|
17
|
+
//#endregion
|
|
11
18
|
//#region ../../node_modules/.pnpm/underscore@1.13.8/node_modules/underscore/modules/_setup.js
|
|
12
19
|
var VERSION, root, ArrayProto, ObjProto, SymbolProto, push, slice, toString, hasOwnProperty, supportsArrayBuffer, supportsDataView, nativeIsArray, nativeKeys, nativeCreate, nativeIsView, _isNaN, _isFinite, hasEnumBug, nonEnumerableProps, MAX_ARRAY_INDEX;
|
|
13
20
|
var init__setup = __esmMin((() => {
|
|
@@ -49718,7 +49725,7 @@ var require_turndown_plugin_gfm_cjs = /* @__PURE__ */ __commonJSMin(((exports) =
|
|
|
49718
49725
|
exports.gfm = gfm;
|
|
49719
49726
|
}));
|
|
49720
49727
|
//#endregion
|
|
49721
|
-
//#region ../../packages/
|
|
49728
|
+
//#region ../../packages/knowledge/src/markit/utils/turndown.ts
|
|
49722
49729
|
var import_lib = /* @__PURE__ */ __toESM(require_lib$1(), 1);
|
|
49723
49730
|
var import_turndown_cjs = /* @__PURE__ */ __toESM(require_turndown_cjs(), 1);
|
|
49724
49731
|
var import_turndown_plugin_gfm_cjs = require_turndown_plugin_gfm_cjs();
|
|
@@ -49792,7 +49799,7 @@ function normalizeTablesHtml(html) {
|
|
|
49792
49799
|
return result;
|
|
49793
49800
|
}
|
|
49794
49801
|
//#endregion
|
|
49795
|
-
//#region ../../packages/
|
|
49802
|
+
//#region ../../packages/knowledge/src/markit/converters/docx.ts
|
|
49796
49803
|
const EXTENSIONS$4 = [".docx"];
|
|
49797
49804
|
const MIMETYPES$4 = ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"];
|
|
49798
49805
|
var DocxConverter = class {
|
|
@@ -50265,7 +50272,7 @@ function unzipSync(data, opts) {
|
|
|
50265
50272
|
return files;
|
|
50266
50273
|
}
|
|
50267
50274
|
//#endregion
|
|
50268
|
-
//#region ../../packages/
|
|
50275
|
+
//#region ../../packages/knowledge/src/markit/utils/zip.ts
|
|
50269
50276
|
/**
|
|
50270
50277
|
* Minimal ZIP reading for the markit document converters (docx/pptx/xlsx/
|
|
50271
50278
|
* epub are all ZIP containers). Read-only: stored + deflate entries via
|
|
@@ -50285,7 +50292,7 @@ function unzip(bytes) {
|
|
|
50285
50292
|
return unzipSync(bytes);
|
|
50286
50293
|
}
|
|
50287
50294
|
//#endregion
|
|
50288
|
-
//#region ../../packages/
|
|
50295
|
+
//#region ../../packages/knowledge/src/markit/converters/epub.ts
|
|
50289
50296
|
const EXTENSIONS$3 = [".epub"];
|
|
50290
50297
|
const MIMETYPES$3 = [
|
|
50291
50298
|
"application/epub",
|
|
@@ -50365,7 +50372,7 @@ var EpubConverter = class {
|
|
|
50365
50372
|
}
|
|
50366
50373
|
};
|
|
50367
50374
|
//#endregion
|
|
50368
|
-
//#region ../../packages/
|
|
50375
|
+
//#region ../../packages/knowledge/src/markit/converters/pdf/columns.ts
|
|
50369
50376
|
/**
|
|
50370
50377
|
* Minimum gap as a fraction of the total text width to consider a column
|
|
50371
50378
|
* boundary. A two-column layout typically has ~50% gap; we use a lower
|
|
@@ -50434,7 +50441,7 @@ function detectColumns(textBoxes) {
|
|
|
50434
50441
|
};
|
|
50435
50442
|
}
|
|
50436
50443
|
//#endregion
|
|
50437
|
-
//#region ../../packages/
|
|
50444
|
+
//#region ../../packages/knowledge/src/markit/converters/pdf/extract.ts
|
|
50438
50445
|
let mupdfModule;
|
|
50439
50446
|
async function loadMupdf() {
|
|
50440
50447
|
if (!mupdfModule) mupdfModule = await import("mupdf");
|
|
@@ -50936,7 +50943,7 @@ async function extractPages(input) {
|
|
|
50936
50943
|
return pages;
|
|
50937
50944
|
}
|
|
50938
50945
|
//#endregion
|
|
50939
|
-
//#region ../../packages/
|
|
50946
|
+
//#region ../../packages/knowledge/src/markit/converters/pdf/grid.ts
|
|
50940
50947
|
function castRaysForTextBox(textBox, segments) {
|
|
50941
50948
|
const cx = (textBox.bounds.left + textBox.bounds.right) / 2;
|
|
50942
50949
|
const cy = (textBox.bounds.top + textBox.bounds.bottom) / 2;
|
|
@@ -51584,7 +51591,7 @@ function resolveTableGrids(pageNumber, textBoxes, segments) {
|
|
|
51584
51591
|
};
|
|
51585
51592
|
}
|
|
51586
51593
|
//#endregion
|
|
51587
|
-
//#region ../../packages/
|
|
51594
|
+
//#region ../../packages/knowledge/src/markit/converters/pdf/headers.ts
|
|
51588
51595
|
/** Minimum number of pages to enable header/footer detection. */
|
|
51589
51596
|
const MIN_PAGES = 5;
|
|
51590
51597
|
/** Minimum Y position for top zone (from bottom of page in PDF coords). */
|
|
@@ -51656,7 +51663,7 @@ function stripHeadersFooters(pages) {
|
|
|
51656
51663
|
});
|
|
51657
51664
|
}
|
|
51658
51665
|
//#endregion
|
|
51659
|
-
//#region ../../packages/
|
|
51666
|
+
//#region ../../packages/knowledge/src/markit/converters/pdf/render.ts
|
|
51660
51667
|
/** Convert full-width ASCII characters (A→A, !→! etc.) to normal ASCII. */
|
|
51661
51668
|
function normalizeFullWidthAscii(text) {
|
|
51662
51669
|
return text.replace(/[!-~]/g, (ch) => String.fromCharCode(ch.charCodeAt(0) - 65248));
|
|
@@ -52051,7 +52058,7 @@ function renderPageContent(freeTextBoxes, tables, imageBlocks = [], allTextBoxes
|
|
|
52051
52058
|
return normalizeDetachedFirstColumnTables(mergeParagraphWraps(mergeConsecutiveHeadings(removePageNumbers(blocks), bodyFS), bodyFS)).map((b) => b.content).join("\n\n").trim();
|
|
52052
52059
|
}
|
|
52053
52060
|
//#endregion
|
|
52054
|
-
//#region ../../packages/
|
|
52061
|
+
//#region ../../packages/knowledge/src/markit/converters/pdf/index.ts
|
|
52055
52062
|
/**
|
|
52056
52063
|
* PDF to Markdown converter.
|
|
52057
52064
|
*
|
|
@@ -52145,7 +52152,7 @@ var PdfConverter = class {
|
|
|
52145
52152
|
}
|
|
52146
52153
|
};
|
|
52147
52154
|
//#endregion
|
|
52148
|
-
//#region ../../packages/
|
|
52155
|
+
//#region ../../packages/knowledge/src/markit/converters/pptx.ts
|
|
52149
52156
|
const EXTENSIONS$1 = [".pptx"];
|
|
52150
52157
|
const MIMETYPES$1 = ["application/vnd.openxmlformats-officedocument.presentationml.presentation"];
|
|
52151
52158
|
var PptxConverter = class {
|
|
@@ -52331,7 +52338,7 @@ function toList(val) {
|
|
|
52331
52338
|
return Array.isArray(val) ? val : [val];
|
|
52332
52339
|
}
|
|
52333
52340
|
//#endregion
|
|
52334
|
-
//#region ../../packages/
|
|
52341
|
+
//#region ../../packages/knowledge/src/markit/converters/xlsx.ts
|
|
52335
52342
|
const EXTENSIONS = [".xlsx"];
|
|
52336
52343
|
const MIMETYPES = ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"];
|
|
52337
52344
|
var XlsxConverter = class {
|
|
@@ -52420,7 +52427,7 @@ function toArray(val) {
|
|
|
52420
52427
|
return Array.isArray(val) ? val : [val];
|
|
52421
52428
|
}
|
|
52422
52429
|
//#endregion
|
|
52423
|
-
//#region ../../packages/
|
|
52430
|
+
//#region ../../packages/knowledge/src/markit/registry.ts
|
|
52424
52431
|
/**
|
|
52425
52432
|
* In-house document → markdown engine.
|
|
52426
52433
|
*
|
|
@@ -3,5 +3,5 @@ import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';
|
|
|
3
3
|
import { dirname as __cjsShimDirname } from 'node:path';
|
|
4
4
|
const __filename = __cjsShimFileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = __cjsShimDirname(__filename);
|
|
6
|
-
import { n as multiSearchWithTrace } from "./src-
|
|
6
|
+
import { n as multiSearchWithTrace } from "./src-DIVvoAYO.mjs";
|
|
7
7
|
export { multiSearchWithTrace };
|