officeparser 7.5.1 → 7.6.2
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 +19 -6
- package/dist/OfficeConverter.d.ts +2 -2
- package/dist/OfficeParser.d.ts +2 -2
- package/dist/OfficeParser.js +10 -0
- package/dist/cli.js +3 -0
- package/dist/defaults.js +3 -1
- package/dist/generators/ChunkingGenerator.d.ts +2 -1
- package/dist/generators/ChunkingGenerator.js +73 -6
- package/dist/generators/EpubGenerator.js +4 -1
- package/dist/generators/HtmlGenerator.js +117 -29
- package/dist/generators/MarkdownGenerator.js +120 -29
- package/dist/generators/PdfGenerator.js +4 -1
- package/dist/index.d.ts +2 -2
- package/dist/officeparser.browser.d.ts +70 -12
- package/dist/officeparser.browser.iife.js +211 -202
- package/dist/officeparser.browser.mjs +211 -202
- package/dist/officeparser.browser.slim.d.ts +70 -12
- package/dist/officeparser.browser.slim.iife.js +213 -204
- package/dist/officeparser.browser.slim.mjs +213 -204
- package/dist/parsers/HtmlParser.js +206 -38
- package/dist/parsers/MarkdownParser.js +135 -18
- package/dist/parsers/WordParser.js +7 -17
- package/dist/sbom.cdx.json +95 -95
- package/dist/types.d.ts +68 -10
- package/dist/utils/configUtils.js +3 -1
- package/dist/utils/sanitize.d.ts +9 -0
- package/dist/utils/sanitize.js +26 -0
- package/package.json +5 -5
package/dist/sbom.cdx.json
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.6",
|
|
5
5
|
"version": 1,
|
|
6
|
-
"serialNumber": "urn:uuid:
|
|
6
|
+
"serialNumber": "urn:uuid:a62832bf-64dc-4267-ae37-c4ec9958e934",
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-
|
|
8
|
+
"timestamp": "2026-08-15T20:48:28.765Z",
|
|
9
9
|
"tools": {
|
|
10
10
|
"components": [
|
|
11
11
|
{
|
|
12
12
|
"type": "application",
|
|
13
13
|
"name": "npm",
|
|
14
|
-
"version": "11.
|
|
14
|
+
"version": "11.17.0"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"type": "application",
|
|
18
18
|
"name": "cyclonedx-npm",
|
|
19
19
|
"group": "@cyclonedx",
|
|
20
|
-
"version": "6.0.
|
|
20
|
+
"version": "6.0.1",
|
|
21
21
|
"author": "Jan Kowalleck",
|
|
22
22
|
"description": "Create CycloneDX Software Bill of Materials (SBOM) from NPM projects.",
|
|
23
23
|
"licenses": [
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"type": "library",
|
|
50
50
|
"name": "cyclonedx-library",
|
|
51
51
|
"group": "@cyclonedx",
|
|
52
|
-
"version": "10.1.
|
|
52
|
+
"version": "10.1.1",
|
|
53
53
|
"author": "Jan Kowalleck",
|
|
54
54
|
"description": "Core functionality of CycloneDX for JavaScript (Node.js or WebBrowser).",
|
|
55
55
|
"licenses": [
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"component": {
|
|
83
83
|
"type": "application",
|
|
84
84
|
"name": "officeparser",
|
|
85
|
-
"version": "7.
|
|
86
|
-
"bom-ref": "officeparser@7.
|
|
85
|
+
"version": "7.6.2",
|
|
86
|
+
"bom-ref": "officeparser@7.6.2",
|
|
87
87
|
"author": "Harsh Ankur",
|
|
88
88
|
"description": "A robust, strictly-typed Node.js and Browser library for parsing office files (.docx, .pptx, .xlsx, .odt, .odp, .ods, .pdf, .rtf, .csv, .md, .html, .epub) and generating high-fidelity outputs in Markdown, HTML, CSV, RTF, PDF, EPUB, and RAG-focused chunks.",
|
|
89
89
|
"licenses": [
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
],
|
|
97
|
-
"purl": "pkg:npm/officeparser@7.
|
|
97
|
+
"purl": "pkg:npm/officeparser@7.6.2?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2Fharshankur%2FofficeParser.git",
|
|
98
98
|
"externalReferences": [
|
|
99
99
|
{
|
|
100
100
|
"url": "git+https://github.com/harshankur/officeParser.git",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"name": "xmldom",
|
|
127
127
|
"group": "@xmldom",
|
|
128
128
|
"version": "0.9.10",
|
|
129
|
-
"bom-ref": "officeparser@7.
|
|
129
|
+
"bom-ref": "officeparser@7.6.2|@xmldom/xmldom@0.9.10",
|
|
130
130
|
"description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.",
|
|
131
131
|
"licenses": [
|
|
132
132
|
{
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"type": "library",
|
|
177
177
|
"name": "fflate",
|
|
178
178
|
"version": "0.8.3",
|
|
179
|
-
"bom-ref": "officeparser@7.
|
|
179
|
+
"bom-ref": "officeparser@7.6.2|fflate@0.8.3",
|
|
180
180
|
"author": "Arjun Barrett",
|
|
181
181
|
"description": "High performance (de)compression in an 8kB package",
|
|
182
182
|
"licenses": [
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"type": "library",
|
|
228
228
|
"name": "file-type",
|
|
229
229
|
"version": "22.0.1",
|
|
230
|
-
"bom-ref": "officeparser@7.
|
|
230
|
+
"bom-ref": "officeparser@7.6.2|file-type@22.0.1",
|
|
231
231
|
"author": "Sindre Sorhus",
|
|
232
232
|
"description": "Detect the file type of a file, stream, or data",
|
|
233
233
|
"licenses": [
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
"type": "library",
|
|
279
279
|
"name": "pdfjs-dist",
|
|
280
280
|
"version": "6.1.200",
|
|
281
|
-
"bom-ref": "officeparser@7.
|
|
281
|
+
"bom-ref": "officeparser@7.6.2|pdfjs-dist@6.1.200",
|
|
282
282
|
"description": "Generic build of Mozilla's PDF.js library.",
|
|
283
283
|
"licenses": [
|
|
284
284
|
{
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
"type": "library",
|
|
329
329
|
"name": "tesseract.js",
|
|
330
330
|
"version": "7.0.0",
|
|
331
|
-
"bom-ref": "officeparser@7.
|
|
331
|
+
"bom-ref": "officeparser@7.6.2|tesseract.js@7.0.0",
|
|
332
332
|
"description": "Pure Javascript Multilingual OCR",
|
|
333
333
|
"licenses": [
|
|
334
334
|
{
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
"name": "inflate",
|
|
380
380
|
"group": "@tokenizer",
|
|
381
381
|
"version": "0.4.1",
|
|
382
|
-
"bom-ref": "officeparser@7.
|
|
382
|
+
"bom-ref": "officeparser@7.6.2|@tokenizer/inflate@0.4.1",
|
|
383
383
|
"author": "Borewit",
|
|
384
384
|
"description": "Tokenized zip support",
|
|
385
385
|
"licenses": [
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
"type": "library",
|
|
431
431
|
"name": "strtok3",
|
|
432
432
|
"version": "10.3.5",
|
|
433
|
-
"bom-ref": "officeparser@7.
|
|
433
|
+
"bom-ref": "officeparser@7.6.2|strtok3@10.3.5",
|
|
434
434
|
"author": "Borewit",
|
|
435
435
|
"description": "A promise based streaming tokenizer",
|
|
436
436
|
"licenses": [
|
|
@@ -481,7 +481,7 @@
|
|
|
481
481
|
"type": "library",
|
|
482
482
|
"name": "token-types",
|
|
483
483
|
"version": "6.1.2",
|
|
484
|
-
"bom-ref": "officeparser@7.
|
|
484
|
+
"bom-ref": "officeparser@7.6.2|token-types@6.1.2",
|
|
485
485
|
"author": "Borewit",
|
|
486
486
|
"description": "Common token types for decoding and encoding numeric and string values",
|
|
487
487
|
"licenses": [
|
|
@@ -532,7 +532,7 @@
|
|
|
532
532
|
"type": "library",
|
|
533
533
|
"name": "uint8array-extras",
|
|
534
534
|
"version": "1.5.0",
|
|
535
|
-
"bom-ref": "officeparser@7.
|
|
535
|
+
"bom-ref": "officeparser@7.6.2|uint8array-extras@1.5.0",
|
|
536
536
|
"author": "Sindre Sorhus",
|
|
537
537
|
"description": "Useful utilities for working with Uint8Array (and Buffer)",
|
|
538
538
|
"licenses": [
|
|
@@ -584,7 +584,7 @@
|
|
|
584
584
|
"name": "canvas",
|
|
585
585
|
"group": "@napi-rs",
|
|
586
586
|
"version": "1.0.1",
|
|
587
|
-
"bom-ref": "officeparser@7.
|
|
587
|
+
"bom-ref": "officeparser@7.6.2|@napi-rs/canvas@1.0.1",
|
|
588
588
|
"description": "Canvas for Node.js with skia backend",
|
|
589
589
|
"scope": "optional",
|
|
590
590
|
"licenses": [
|
|
@@ -635,7 +635,7 @@
|
|
|
635
635
|
"type": "library",
|
|
636
636
|
"name": "bmp-js",
|
|
637
637
|
"version": "0.1.0",
|
|
638
|
-
"bom-ref": "officeparser@7.
|
|
638
|
+
"bom-ref": "officeparser@7.6.2|bmp-js@0.1.0",
|
|
639
639
|
"author": "shaozilee",
|
|
640
640
|
"description": "A pure javascript BMP encoder and decoder",
|
|
641
641
|
"licenses": [
|
|
@@ -686,7 +686,7 @@
|
|
|
686
686
|
"type": "library",
|
|
687
687
|
"name": "idb-keyval",
|
|
688
688
|
"version": "6.2.2",
|
|
689
|
-
"bom-ref": "officeparser@7.
|
|
689
|
+
"bom-ref": "officeparser@7.6.2|idb-keyval@6.2.2",
|
|
690
690
|
"author": "Jake Archibald",
|
|
691
691
|
"description": "A super-simple-small keyval store built on top of IndexedDB",
|
|
692
692
|
"licenses": [
|
|
@@ -737,7 +737,7 @@
|
|
|
737
737
|
"type": "library",
|
|
738
738
|
"name": "is-url",
|
|
739
739
|
"version": "1.2.4",
|
|
740
|
-
"bom-ref": "officeparser@7.
|
|
740
|
+
"bom-ref": "officeparser@7.6.2|is-url@1.2.4",
|
|
741
741
|
"description": "Check whether a string is a URL.",
|
|
742
742
|
"licenses": [
|
|
743
743
|
{
|
|
@@ -787,7 +787,7 @@
|
|
|
787
787
|
"type": "library",
|
|
788
788
|
"name": "node-fetch",
|
|
789
789
|
"version": "2.7.0",
|
|
790
|
-
"bom-ref": "officeparser@7.
|
|
790
|
+
"bom-ref": "officeparser@7.6.2|node-fetch@2.7.0",
|
|
791
791
|
"author": "David Frank",
|
|
792
792
|
"description": "A light-weight module that brings window.fetch to node.js",
|
|
793
793
|
"licenses": [
|
|
@@ -838,7 +838,7 @@
|
|
|
838
838
|
"type": "library",
|
|
839
839
|
"name": "opencollective-postinstall",
|
|
840
840
|
"version": "2.0.3",
|
|
841
|
-
"bom-ref": "officeparser@7.
|
|
841
|
+
"bom-ref": "officeparser@7.6.2|opencollective-postinstall@2.0.3",
|
|
842
842
|
"author": "Xavier Damman",
|
|
843
843
|
"description": "Lightweight npm postinstall message to invite people to donate to your collective",
|
|
844
844
|
"licenses": [
|
|
@@ -889,7 +889,7 @@
|
|
|
889
889
|
"type": "library",
|
|
890
890
|
"name": "regenerator-runtime",
|
|
891
891
|
"version": "0.13.11",
|
|
892
|
-
"bom-ref": "officeparser@7.
|
|
892
|
+
"bom-ref": "officeparser@7.6.2|regenerator-runtime@0.13.11",
|
|
893
893
|
"author": "Ben Newman",
|
|
894
894
|
"description": "Runtime for Regenerator-compiled generator and async functions.",
|
|
895
895
|
"licenses": [
|
|
@@ -940,7 +940,7 @@
|
|
|
940
940
|
"type": "library",
|
|
941
941
|
"name": "tesseract.js-core",
|
|
942
942
|
"version": "7.0.0",
|
|
943
|
-
"bom-ref": "officeparser@7.
|
|
943
|
+
"bom-ref": "officeparser@7.6.2|tesseract.js-core@7.0.0",
|
|
944
944
|
"author": "antimatter15",
|
|
945
945
|
"description": "Tesseract C++ API in Pure Javascript",
|
|
946
946
|
"licenses": [
|
|
@@ -991,7 +991,7 @@
|
|
|
991
991
|
"type": "library",
|
|
992
992
|
"name": "wasm-feature-detect",
|
|
993
993
|
"version": "1.8.0",
|
|
994
|
-
"bom-ref": "officeparser@7.
|
|
994
|
+
"bom-ref": "officeparser@7.6.2|wasm-feature-detect@1.8.0",
|
|
995
995
|
"author": "Surma",
|
|
996
996
|
"description": "A small library to detect which features of WebAssembly are supported in your current browser.",
|
|
997
997
|
"licenses": [
|
|
@@ -1042,7 +1042,7 @@
|
|
|
1042
1042
|
"type": "library",
|
|
1043
1043
|
"name": "zlibjs",
|
|
1044
1044
|
"version": "0.3.1",
|
|
1045
|
-
"bom-ref": "officeparser@7.
|
|
1045
|
+
"bom-ref": "officeparser@7.6.2|zlibjs@0.3.1",
|
|
1046
1046
|
"author": "Yuta Imaya",
|
|
1047
1047
|
"description": "zlib, gzip and zip implementation in JavaScript",
|
|
1048
1048
|
"licenses": [
|
|
@@ -1093,7 +1093,7 @@
|
|
|
1093
1093
|
"type": "library",
|
|
1094
1094
|
"name": "debug",
|
|
1095
1095
|
"version": "4.4.3",
|
|
1096
|
-
"bom-ref": "officeparser@7.
|
|
1096
|
+
"bom-ref": "officeparser@7.6.2|debug@4.4.3",
|
|
1097
1097
|
"author": "Josh Junon",
|
|
1098
1098
|
"description": "Lightweight debugging utility for Node.js and the browser",
|
|
1099
1099
|
"licenses": [
|
|
@@ -1145,7 +1145,7 @@
|
|
|
1145
1145
|
"name": "token",
|
|
1146
1146
|
"group": "@tokenizer",
|
|
1147
1147
|
"version": "0.3.0",
|
|
1148
|
-
"bom-ref": "officeparser@7.
|
|
1148
|
+
"bom-ref": "officeparser@7.6.2|@tokenizer/token@0.3.0",
|
|
1149
1149
|
"author": "Borewit",
|
|
1150
1150
|
"description": "TypeScript definition for strtok3 token",
|
|
1151
1151
|
"licenses": [
|
|
@@ -1197,7 +1197,7 @@
|
|
|
1197
1197
|
"name": "text-codec",
|
|
1198
1198
|
"group": "@borewit",
|
|
1199
1199
|
"version": "0.2.2",
|
|
1200
|
-
"bom-ref": "officeparser@7.
|
|
1200
|
+
"bom-ref": "officeparser@7.6.2|@borewit/text-codec@0.2.2",
|
|
1201
1201
|
"author": "Borewit",
|
|
1202
1202
|
"description": "Text Decoder",
|
|
1203
1203
|
"licenses": [
|
|
@@ -1248,7 +1248,7 @@
|
|
|
1248
1248
|
"type": "library",
|
|
1249
1249
|
"name": "ieee754",
|
|
1250
1250
|
"version": "1.2.1",
|
|
1251
|
-
"bom-ref": "officeparser@7.
|
|
1251
|
+
"bom-ref": "officeparser@7.6.2|ieee754@1.2.1",
|
|
1252
1252
|
"author": "Feross Aboukhadijeh",
|
|
1253
1253
|
"description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object",
|
|
1254
1254
|
"licenses": [
|
|
@@ -1300,7 +1300,7 @@
|
|
|
1300
1300
|
"name": "canvas-linux-x64-gnu",
|
|
1301
1301
|
"group": "@napi-rs",
|
|
1302
1302
|
"version": "1.0.1",
|
|
1303
|
-
"bom-ref": "officeparser@7.
|
|
1303
|
+
"bom-ref": "officeparser@7.6.2|@napi-rs/canvas-linux-x64-gnu@1.0.1",
|
|
1304
1304
|
"description": "Canvas for Node.js with skia backend",
|
|
1305
1305
|
"scope": "optional",
|
|
1306
1306
|
"licenses": [
|
|
@@ -1351,7 +1351,7 @@
|
|
|
1351
1351
|
"type": "library",
|
|
1352
1352
|
"name": "whatwg-url",
|
|
1353
1353
|
"version": "5.0.0",
|
|
1354
|
-
"bom-ref": "officeparser@7.
|
|
1354
|
+
"bom-ref": "officeparser@7.6.2|whatwg-url@5.0.0",
|
|
1355
1355
|
"author": "Sebastian Mayr",
|
|
1356
1356
|
"description": "An implementation of the WHATWG URL Standard's URL API and parsing machinery",
|
|
1357
1357
|
"licenses": [
|
|
@@ -1402,7 +1402,7 @@
|
|
|
1402
1402
|
"type": "library",
|
|
1403
1403
|
"name": "ms",
|
|
1404
1404
|
"version": "2.1.3",
|
|
1405
|
-
"bom-ref": "officeparser@7.
|
|
1405
|
+
"bom-ref": "officeparser@7.6.2|ms@2.1.3",
|
|
1406
1406
|
"description": "Tiny millisecond conversion utility",
|
|
1407
1407
|
"licenses": [
|
|
1408
1408
|
{
|
|
@@ -1452,7 +1452,7 @@
|
|
|
1452
1452
|
"type": "library",
|
|
1453
1453
|
"name": "tr46",
|
|
1454
1454
|
"version": "0.0.3",
|
|
1455
|
-
"bom-ref": "officeparser@7.
|
|
1455
|
+
"bom-ref": "officeparser@7.6.2|tr46@0.0.3",
|
|
1456
1456
|
"author": "Sebastian Mayr",
|
|
1457
1457
|
"description": "An implementation of the Unicode TR46 spec",
|
|
1458
1458
|
"licenses": [
|
|
@@ -1503,7 +1503,7 @@
|
|
|
1503
1503
|
"type": "library",
|
|
1504
1504
|
"name": "webidl-conversions",
|
|
1505
1505
|
"version": "3.0.1",
|
|
1506
|
-
"bom-ref": "officeparser@7.
|
|
1506
|
+
"bom-ref": "officeparser@7.6.2|webidl-conversions@3.0.1",
|
|
1507
1507
|
"author": "Domenic Denicola",
|
|
1508
1508
|
"description": "Implements the WebIDL algorithms for converting to and from JavaScript values",
|
|
1509
1509
|
"licenses": [
|
|
@@ -1553,143 +1553,143 @@
|
|
|
1553
1553
|
],
|
|
1554
1554
|
"dependencies": [
|
|
1555
1555
|
{
|
|
1556
|
-
"ref": "officeparser@7.
|
|
1556
|
+
"ref": "officeparser@7.6.2",
|
|
1557
1557
|
"dependsOn": [
|
|
1558
|
-
"officeparser@7.
|
|
1559
|
-
"officeparser@7.
|
|
1560
|
-
"officeparser@7.
|
|
1561
|
-
"officeparser@7.
|
|
1562
|
-
"officeparser@7.
|
|
1558
|
+
"officeparser@7.6.2|@xmldom/xmldom@0.9.10",
|
|
1559
|
+
"officeparser@7.6.2|fflate@0.8.3",
|
|
1560
|
+
"officeparser@7.6.2|file-type@22.0.1",
|
|
1561
|
+
"officeparser@7.6.2|pdfjs-dist@6.1.200",
|
|
1562
|
+
"officeparser@7.6.2|tesseract.js@7.0.0"
|
|
1563
1563
|
]
|
|
1564
1564
|
},
|
|
1565
1565
|
{
|
|
1566
|
-
"ref": "officeparser@7.
|
|
1566
|
+
"ref": "officeparser@7.6.2|@xmldom/xmldom@0.9.10"
|
|
1567
1567
|
},
|
|
1568
1568
|
{
|
|
1569
|
-
"ref": "officeparser@7.
|
|
1569
|
+
"ref": "officeparser@7.6.2|fflate@0.8.3"
|
|
1570
1570
|
},
|
|
1571
1571
|
{
|
|
1572
|
-
"ref": "officeparser@7.
|
|
1572
|
+
"ref": "officeparser@7.6.2|file-type@22.0.1",
|
|
1573
1573
|
"dependsOn": [
|
|
1574
|
-
"officeparser@7.
|
|
1575
|
-
"officeparser@7.
|
|
1576
|
-
"officeparser@7.
|
|
1577
|
-
"officeparser@7.
|
|
1574
|
+
"officeparser@7.6.2|@tokenizer/inflate@0.4.1",
|
|
1575
|
+
"officeparser@7.6.2|strtok3@10.3.5",
|
|
1576
|
+
"officeparser@7.6.2|token-types@6.1.2",
|
|
1577
|
+
"officeparser@7.6.2|uint8array-extras@1.5.0"
|
|
1578
1578
|
]
|
|
1579
1579
|
},
|
|
1580
1580
|
{
|
|
1581
|
-
"ref": "officeparser@7.
|
|
1581
|
+
"ref": "officeparser@7.6.2|pdfjs-dist@6.1.200",
|
|
1582
1582
|
"dependsOn": [
|
|
1583
|
-
"officeparser@7.
|
|
1583
|
+
"officeparser@7.6.2|@napi-rs/canvas@1.0.1"
|
|
1584
1584
|
]
|
|
1585
1585
|
},
|
|
1586
1586
|
{
|
|
1587
|
-
"ref": "officeparser@7.
|
|
1587
|
+
"ref": "officeparser@7.6.2|tesseract.js@7.0.0",
|
|
1588
1588
|
"dependsOn": [
|
|
1589
|
-
"officeparser@7.
|
|
1590
|
-
"officeparser@7.
|
|
1591
|
-
"officeparser@7.
|
|
1592
|
-
"officeparser@7.
|
|
1593
|
-
"officeparser@7.
|
|
1594
|
-
"officeparser@7.
|
|
1595
|
-
"officeparser@7.
|
|
1596
|
-
"officeparser@7.
|
|
1597
|
-
"officeparser@7.
|
|
1589
|
+
"officeparser@7.6.2|bmp-js@0.1.0",
|
|
1590
|
+
"officeparser@7.6.2|idb-keyval@6.2.2",
|
|
1591
|
+
"officeparser@7.6.2|is-url@1.2.4",
|
|
1592
|
+
"officeparser@7.6.2|node-fetch@2.7.0",
|
|
1593
|
+
"officeparser@7.6.2|opencollective-postinstall@2.0.3",
|
|
1594
|
+
"officeparser@7.6.2|regenerator-runtime@0.13.11",
|
|
1595
|
+
"officeparser@7.6.2|tesseract.js-core@7.0.0",
|
|
1596
|
+
"officeparser@7.6.2|wasm-feature-detect@1.8.0",
|
|
1597
|
+
"officeparser@7.6.2|zlibjs@0.3.1"
|
|
1598
1598
|
]
|
|
1599
1599
|
},
|
|
1600
1600
|
{
|
|
1601
|
-
"ref": "officeparser@7.
|
|
1601
|
+
"ref": "officeparser@7.6.2|@tokenizer/inflate@0.4.1",
|
|
1602
1602
|
"dependsOn": [
|
|
1603
|
-
"officeparser@7.
|
|
1604
|
-
"officeparser@7.
|
|
1603
|
+
"officeparser@7.6.2|debug@4.4.3",
|
|
1604
|
+
"officeparser@7.6.2|token-types@6.1.2"
|
|
1605
1605
|
]
|
|
1606
1606
|
},
|
|
1607
1607
|
{
|
|
1608
|
-
"ref": "officeparser@7.
|
|
1608
|
+
"ref": "officeparser@7.6.2|strtok3@10.3.5",
|
|
1609
1609
|
"dependsOn": [
|
|
1610
|
-
"officeparser@7.
|
|
1610
|
+
"officeparser@7.6.2|@tokenizer/token@0.3.0"
|
|
1611
1611
|
]
|
|
1612
1612
|
},
|
|
1613
1613
|
{
|
|
1614
|
-
"ref": "officeparser@7.
|
|
1614
|
+
"ref": "officeparser@7.6.2|token-types@6.1.2",
|
|
1615
1615
|
"dependsOn": [
|
|
1616
|
-
"officeparser@7.
|
|
1617
|
-
"officeparser@7.
|
|
1618
|
-
"officeparser@7.
|
|
1616
|
+
"officeparser@7.6.2|@borewit/text-codec@0.2.2",
|
|
1617
|
+
"officeparser@7.6.2|@tokenizer/token@0.3.0",
|
|
1618
|
+
"officeparser@7.6.2|ieee754@1.2.1"
|
|
1619
1619
|
]
|
|
1620
1620
|
},
|
|
1621
1621
|
{
|
|
1622
|
-
"ref": "officeparser@7.
|
|
1622
|
+
"ref": "officeparser@7.6.2|uint8array-extras@1.5.0"
|
|
1623
1623
|
},
|
|
1624
1624
|
{
|
|
1625
|
-
"ref": "officeparser@7.
|
|
1625
|
+
"ref": "officeparser@7.6.2|@napi-rs/canvas@1.0.1",
|
|
1626
1626
|
"dependsOn": [
|
|
1627
|
-
"officeparser@7.
|
|
1627
|
+
"officeparser@7.6.2|@napi-rs/canvas-linux-x64-gnu@1.0.1"
|
|
1628
1628
|
]
|
|
1629
1629
|
},
|
|
1630
1630
|
{
|
|
1631
|
-
"ref": "officeparser@7.
|
|
1631
|
+
"ref": "officeparser@7.6.2|bmp-js@0.1.0"
|
|
1632
1632
|
},
|
|
1633
1633
|
{
|
|
1634
|
-
"ref": "officeparser@7.
|
|
1634
|
+
"ref": "officeparser@7.6.2|idb-keyval@6.2.2"
|
|
1635
1635
|
},
|
|
1636
1636
|
{
|
|
1637
|
-
"ref": "officeparser@7.
|
|
1637
|
+
"ref": "officeparser@7.6.2|is-url@1.2.4"
|
|
1638
1638
|
},
|
|
1639
1639
|
{
|
|
1640
|
-
"ref": "officeparser@7.
|
|
1640
|
+
"ref": "officeparser@7.6.2|node-fetch@2.7.0",
|
|
1641
1641
|
"dependsOn": [
|
|
1642
|
-
"officeparser@7.
|
|
1642
|
+
"officeparser@7.6.2|whatwg-url@5.0.0"
|
|
1643
1643
|
]
|
|
1644
1644
|
},
|
|
1645
1645
|
{
|
|
1646
|
-
"ref": "officeparser@7.
|
|
1646
|
+
"ref": "officeparser@7.6.2|opencollective-postinstall@2.0.3"
|
|
1647
1647
|
},
|
|
1648
1648
|
{
|
|
1649
|
-
"ref": "officeparser@7.
|
|
1649
|
+
"ref": "officeparser@7.6.2|regenerator-runtime@0.13.11"
|
|
1650
1650
|
},
|
|
1651
1651
|
{
|
|
1652
|
-
"ref": "officeparser@7.
|
|
1652
|
+
"ref": "officeparser@7.6.2|tesseract.js-core@7.0.0"
|
|
1653
1653
|
},
|
|
1654
1654
|
{
|
|
1655
|
-
"ref": "officeparser@7.
|
|
1655
|
+
"ref": "officeparser@7.6.2|wasm-feature-detect@1.8.0"
|
|
1656
1656
|
},
|
|
1657
1657
|
{
|
|
1658
|
-
"ref": "officeparser@7.
|
|
1658
|
+
"ref": "officeparser@7.6.2|zlibjs@0.3.1"
|
|
1659
1659
|
},
|
|
1660
1660
|
{
|
|
1661
|
-
"ref": "officeparser@7.
|
|
1661
|
+
"ref": "officeparser@7.6.2|debug@4.4.3",
|
|
1662
1662
|
"dependsOn": [
|
|
1663
|
-
"officeparser@7.
|
|
1663
|
+
"officeparser@7.6.2|ms@2.1.3"
|
|
1664
1664
|
]
|
|
1665
1665
|
},
|
|
1666
1666
|
{
|
|
1667
|
-
"ref": "officeparser@7.
|
|
1667
|
+
"ref": "officeparser@7.6.2|@tokenizer/token@0.3.0"
|
|
1668
1668
|
},
|
|
1669
1669
|
{
|
|
1670
|
-
"ref": "officeparser@7.
|
|
1670
|
+
"ref": "officeparser@7.6.2|@borewit/text-codec@0.2.2"
|
|
1671
1671
|
},
|
|
1672
1672
|
{
|
|
1673
|
-
"ref": "officeparser@7.
|
|
1673
|
+
"ref": "officeparser@7.6.2|ieee754@1.2.1"
|
|
1674
1674
|
},
|
|
1675
1675
|
{
|
|
1676
|
-
"ref": "officeparser@7.
|
|
1676
|
+
"ref": "officeparser@7.6.2|@napi-rs/canvas-linux-x64-gnu@1.0.1"
|
|
1677
1677
|
},
|
|
1678
1678
|
{
|
|
1679
|
-
"ref": "officeparser@7.
|
|
1679
|
+
"ref": "officeparser@7.6.2|whatwg-url@5.0.0",
|
|
1680
1680
|
"dependsOn": [
|
|
1681
|
-
"officeparser@7.
|
|
1682
|
-
"officeparser@7.
|
|
1681
|
+
"officeparser@7.6.2|tr46@0.0.3",
|
|
1682
|
+
"officeparser@7.6.2|webidl-conversions@3.0.1"
|
|
1683
1683
|
]
|
|
1684
1684
|
},
|
|
1685
1685
|
{
|
|
1686
|
-
"ref": "officeparser@7.
|
|
1686
|
+
"ref": "officeparser@7.6.2|ms@2.1.3"
|
|
1687
1687
|
},
|
|
1688
1688
|
{
|
|
1689
|
-
"ref": "officeparser@7.
|
|
1689
|
+
"ref": "officeparser@7.6.2|tr46@0.0.3"
|
|
1690
1690
|
},
|
|
1691
1691
|
{
|
|
1692
|
-
"ref": "officeparser@7.
|
|
1692
|
+
"ref": "officeparser@7.6.2|webidl-conversions@3.0.1"
|
|
1693
1693
|
}
|
|
1694
1694
|
]
|
|
1695
1695
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -401,6 +401,18 @@ export interface HtmlParserConfig {
|
|
|
401
401
|
* Defaults to false.
|
|
402
402
|
*/
|
|
403
403
|
preserveAttributes?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* Preserve `<iframe>` embeds that aren't recognized as a known provider (YouTube is always
|
|
406
|
+
* recognized). By default every non-YouTube iframe is dropped, which is a deliberate security
|
|
407
|
+
* posture other consumers rely on; set this to opt back in. `true` preserves any iframe; an
|
|
408
|
+
* array is a hostname allowlist (an entry matches the src's host exactly or as a `.`-suffix,
|
|
409
|
+
* so `"vimeo.com"` also matches `player.vimeo.com`). Preserved iframes become `embed` nodes
|
|
410
|
+
* with `embedType: 'iframe'`; on generation the `src` is still scheme-checked (only http/https
|
|
411
|
+
* survive). This also governs a raw `<iframe>` block encountered in Markdown input.
|
|
412
|
+
*
|
|
413
|
+
* Defaults to false.
|
|
414
|
+
*/
|
|
415
|
+
preserveIframes?: boolean | string[];
|
|
404
416
|
}
|
|
405
417
|
/**
|
|
406
418
|
* Maps an input format string to its corresponding format-specific parser configuration, mirroring
|
|
@@ -885,6 +897,18 @@ export interface HtmlGeneratorConfig {
|
|
|
885
897
|
* Granular injection points for custom HTML, scripts, and styles.
|
|
886
898
|
*/
|
|
887
899
|
injections?: HtmlInjectionConfig;
|
|
900
|
+
/**
|
|
901
|
+
* Carry each rich node's raw source in a `data-*` attribute, with undelimited text content,
|
|
902
|
+
* so attribute-driven structured consumers (rich-text editors, custom viewers) can rehydrate
|
|
903
|
+
* the node from the markup rather than re-parsing the display text. Affects wikilinks
|
|
904
|
+
* (adds `data-wikilink`/`data-target`/`data-alias`), citations (a `<span class="citation">`
|
|
905
|
+
* carrying `data-key` instead of `<cite>`), math (the LaTeX in `data-math`, undelimited) and
|
|
906
|
+
* mermaid (a `<div class="mermaid" data-mermaid>` instead of `<pre><code>`).
|
|
907
|
+
*
|
|
908
|
+
* Off by default; the default output is byte-identical to previous releases. The widened
|
|
909
|
+
* `HtmlParser` reads every shape this emits, so output stays self-round-trippable.
|
|
910
|
+
*/
|
|
911
|
+
sourceAttributes?: boolean;
|
|
888
912
|
}
|
|
889
913
|
/**
|
|
890
914
|
* Configuration options for PDF generation.
|
|
@@ -1100,6 +1124,14 @@ export interface FallbackToHtmlConfig {
|
|
|
1100
1124
|
embeds?: boolean;
|
|
1101
1125
|
/** Multi-line table cell content joined with `<br>` instead of a space. */
|
|
1102
1126
|
cellLineBreaks?: boolean;
|
|
1127
|
+
/**
|
|
1128
|
+
* Inline text color, highlight, and font size via a `<span style="color:...;background-color:...;
|
|
1129
|
+
* font-size:...">` run, which the Markdown parser reads back. These have no Markdown syntax and
|
|
1130
|
+
* are silently lost otherwise. Unlike the other fields this is **off by default even when
|
|
1131
|
+
* `fallbackToHtml` is `true`**, because it changes default output; enable it explicitly with
|
|
1132
|
+
* `fallbackToHtml: { inlineFormatting: true }`.
|
|
1133
|
+
*/
|
|
1134
|
+
inlineFormatting?: boolean;
|
|
1103
1135
|
}
|
|
1104
1136
|
/**
|
|
1105
1137
|
* Configuration options for Markdown generation.
|
|
@@ -1371,6 +1403,16 @@ export interface OfficeChunk {
|
|
|
1371
1403
|
* Supported file types for parsing.
|
|
1372
1404
|
*/
|
|
1373
1405
|
export type SupportedFileType = 'docx' | 'pptx' | 'xlsx' | 'odt' | 'odp' | 'ods' | 'pdf' | 'rtf' | 'md' | 'html' | 'csv' | 'epub';
|
|
1406
|
+
/**
|
|
1407
|
+
* A structural stand-in for the web `Blob`/`File` so `parseOffice`/`convert` accept them in the
|
|
1408
|
+
* browser without pulling the DOM lib into this package's types. Any object with an
|
|
1409
|
+
* `arrayBuffer()` method qualifies. When `name` is present (as on a `File`) it is used only for
|
|
1410
|
+
* extension-based type detection, never as a filesystem path.
|
|
1411
|
+
*/
|
|
1412
|
+
export interface BlobLike {
|
|
1413
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1414
|
+
name?: string;
|
|
1415
|
+
}
|
|
1374
1416
|
/**
|
|
1375
1417
|
* Types of content nodes in the AST.
|
|
1376
1418
|
*/
|
|
@@ -1612,7 +1654,7 @@ export interface TableMetadata {
|
|
|
1612
1654
|
/** Unique anchor IDs for internal linking. */
|
|
1613
1655
|
anchorIds?: string[];
|
|
1614
1656
|
/**
|
|
1615
|
-
* Layout alignment of the table on the page (e.g.
|
|
1657
|
+
* Layout alignment of the table on the page (e.g. an editor's custom table node).
|
|
1616
1658
|
* @example 'center'
|
|
1617
1659
|
*/
|
|
1618
1660
|
align?: 'left' | 'center' | 'right';
|
|
@@ -1657,12 +1699,12 @@ export interface ImageMetadata {
|
|
|
1657
1699
|
/** Unique anchor IDs for internal linking. */
|
|
1658
1700
|
anchorIds?: string[];
|
|
1659
1701
|
/**
|
|
1660
|
-
* Display width of the image (e.g.
|
|
1702
|
+
* Display width of the image (e.g. an editor's custom image node), as a CSS length or percentage.
|
|
1661
1703
|
* @example "50%"
|
|
1662
1704
|
*/
|
|
1663
1705
|
width?: string;
|
|
1664
1706
|
/**
|
|
1665
|
-
* Layout alignment of the image (e.g.
|
|
1707
|
+
* Layout alignment of the image (e.g. an editor's custom image node).
|
|
1666
1708
|
* @example 'center'
|
|
1667
1709
|
*/
|
|
1668
1710
|
align?: 'left' | 'center' | 'right';
|
|
@@ -1672,14 +1714,19 @@ export interface ImageMetadata {
|
|
|
1672
1714
|
* Markdown has no native syntax for this - see `MarkdownGenerator`'s `embed` case.
|
|
1673
1715
|
*/
|
|
1674
1716
|
export interface EmbedMetadata {
|
|
1675
|
-
/**
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1717
|
+
/**
|
|
1718
|
+
* The kind of embed. 'youtube' is recognized from a `data-youtube-video` wrapper or a YouTube
|
|
1719
|
+
* iframe; 'iframe' is a generic preserved iframe (opt-in via `HtmlParserConfig.preserveIframes`).
|
|
1720
|
+
*/
|
|
1721
|
+
embedType: 'youtube' | 'iframe';
|
|
1722
|
+
/** The provider-specific video ID (e.g. the 11-character YouTube video ID). Absent for generic iframes. */
|
|
1723
|
+
videoId?: string;
|
|
1724
|
+
/** The original/canonical URL of the embedded media, if known. For a generic iframe, its `src`. */
|
|
1680
1725
|
url?: string;
|
|
1681
1726
|
/** Display width, as a CSS length or percentage. */
|
|
1682
1727
|
width?: string;
|
|
1728
|
+
/** Display height, as a CSS length or percentage (generic iframes). */
|
|
1729
|
+
height?: string;
|
|
1683
1730
|
/** Layout alignment of the embed. */
|
|
1684
1731
|
align?: 'left' | 'center' | 'right';
|
|
1685
1732
|
}
|
|
@@ -1763,6 +1810,14 @@ export interface NoteMetadata {
|
|
|
1763
1810
|
anchorIds?: string[];
|
|
1764
1811
|
/** The slide number this note is associated with (used in PowerPoint). */
|
|
1765
1812
|
slideNumber?: number;
|
|
1813
|
+
/**
|
|
1814
|
+
* True for a footnote/endnote definition that no reference points at (an "orphan").
|
|
1815
|
+
* The Markdown parser sets this when it recovers a `[^id]: ...` definition with no matching
|
|
1816
|
+
* `[^id]` reference so the definition is preserved rather than dropped. Generators route such
|
|
1817
|
+
* notes into their footnotes section without a citation marker, and the HTML generator omits
|
|
1818
|
+
* the (otherwise dangling) back-link.
|
|
1819
|
+
*/
|
|
1820
|
+
unreferenced?: boolean;
|
|
1766
1821
|
}
|
|
1767
1822
|
/**
|
|
1768
1823
|
* Metadata for break nodes.
|
|
@@ -1777,8 +1832,11 @@ export interface BreakMetadata {
|
|
|
1777
1832
|
* - 'lastRenderedPage': The editing application has inserted a soft break on the last save.
|
|
1778
1833
|
* - 'textWrapping' (default, assumed when not specified): The next text will be placed on the next line.
|
|
1779
1834
|
* - 'carriageReturn': An explicit carriage return (w:cr) equivalent to a hard line break.
|
|
1835
|
+
* - 'thematic': A thematic break (Markdown `---`/`***`/`___`, HTML `<hr>`) - a horizontal
|
|
1836
|
+
* rule separating sections, distinct from a page break. Emitted as `---` in Markdown and
|
|
1837
|
+
* `<hr>` in HTML.
|
|
1780
1838
|
*/
|
|
1781
|
-
breakType: 'column' | 'page' | 'lastRenderedPage' | 'textWrapping' | 'carriageReturn';
|
|
1839
|
+
breakType: 'column' | 'page' | 'lastRenderedPage' | 'textWrapping' | 'carriageReturn' | 'thematic';
|
|
1782
1840
|
/**
|
|
1783
1841
|
* Specifies the location which shall be used as the next available line when breakType
|
|
1784
1842
|
* has a value of 'textWrapping'. Should be ignored for other break types.
|
|
@@ -1800,7 +1858,7 @@ export interface CodeMetadata {
|
|
|
1800
1858
|
/**
|
|
1801
1859
|
* When set, this node is a LaTeX math expression rather than a code block. `node.text`
|
|
1802
1860
|
* holds the bare LaTeX (delimiters excluded); 'inline' round-trips as `$...$`,
|
|
1803
|
-
* 'block' as `$$...$$`. Matches
|
|
1861
|
+
* 'block' as `$$...$$`. Matches attribute-driven editors' math nodes.
|
|
1804
1862
|
*/
|
|
1805
1863
|
math?: 'inline' | 'block';
|
|
1806
1864
|
}
|