@bendyline/squisq-formats 2.5.1 → 2.6.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 (41) hide show
  1. package/NOTICE.md +10 -9
  2. package/dist/{chunk-TVUX3RUC.js → chunk-2OCP46K5.js} +10 -3
  3. package/dist/{chunk-2LT3JL7U.js → chunk-3ITGQRL5.js} +8 -8
  4. package/dist/{chunk-FMQWNPCV.js → chunk-AGGNLRHV.js} +6 -6
  5. package/dist/{chunk-AONELFLA.js → chunk-B7GEAZBI.js} +6 -1
  6. package/dist/chunk-CKSTGNVZ.js +724 -0
  7. package/dist/chunk-DXYWKZ52.js +57 -0
  8. package/dist/chunk-FLR2ARKC.js +240 -0
  9. package/dist/{chunk-5JQ5NDRC.js → chunk-JPU5GPGG.js} +64 -12
  10. package/dist/{chunk-RX55T5HO.js → chunk-OBADJV7C.js} +136 -415
  11. package/dist/{chunk-T4PX33AG.js → chunk-POO3PJFH.js} +23 -3
  12. package/dist/{chunk-AD2WT564.js → chunk-Q77KNJIN.js} +45 -0
  13. package/dist/{chunk-6RQOV3B3.js → chunk-VPWPEMZJ.js} +1 -1
  14. package/dist/{chunk-FIOSE4BO.js → chunk-XJNOZTAY.js} +6 -6
  15. package/dist/csv/index.d.ts +67 -1
  16. package/dist/csv/index.js +10 -3
  17. package/dist/data/index.d.ts +78 -0
  18. package/dist/data/index.js +30 -0
  19. package/dist/docx/index.js +3 -3
  20. package/dist/epub/index.js +4 -4
  21. package/dist/{export-Boq78GMq.d.ts → export-6iQXd-lQ.d.ts} +98 -2
  22. package/dist/html/index.d.ts +2 -8
  23. package/dist/html/index.js +3 -3
  24. package/dist/{images-ESPQKVTW.js → images-JLBFCDD4.js} +1 -1
  25. package/dist/{import-B0gBYUmd.d.ts → import-D59rxNTj.d.ts} +11 -3
  26. package/dist/index.d.ts +3 -3
  27. package/dist/index.js +29 -26
  28. package/dist/infer/index.js +6 -6
  29. package/dist/materialize-A34OZGEU.js +11 -0
  30. package/dist/outside-in/index.d.ts +4 -4
  31. package/dist/outside-in/index.js +2 -2
  32. package/dist/pdf/index.js +2 -2
  33. package/dist/pptx/index.js +3 -3
  34. package/dist/registry/index.d.ts +4 -4
  35. package/dist/registry/index.js +1 -1
  36. package/dist/{types-bwP9PBSk.d.ts → types-BD23kHNG.d.ts} +5 -5
  37. package/dist/xlsx/index.d.ts +85 -4
  38. package/dist/xlsx/index.js +21 -4
  39. package/package.json +17 -2
  40. package/dist/{chunk-KMBBO5H7.js → chunk-7DQP2I57.js} +4 -4
  41. package/dist/{chunk-M7XPXGXW.js → chunk-ROF7SSQP.js} +3 -3
package/NOTICE.md CHANGED
@@ -4,16 +4,17 @@ This notice applies to the `@bendyline/squisq-formats` npm package.
4
4
  Squisq-authored code is licensed under the MIT license in `LICENSE`.
5
5
  Third-party components remain under their respective license terms.
6
6
 
7
- ## Runtime dependencies
7
+ ## Runtime and peer dependencies
8
8
 
9
- | Package | Version | License | Repository |
10
- | ---------------- | ------- | ----------------------- | ---------------------------------- |
11
- | @pdf-lib/fontkit | 1.1.1 | MIT | https://github.com/Hopding/fontkit |
12
- | @pdf-lib/upng | 1.0.1 | MIT | https://github.com/Hopding/upng |
13
- | @xmldom/xmldom | 0.9.12 | MIT | https://github.com/xmldom/xmldom |
14
- | jszip | 3.10.1 | MIT OR GPL-3.0-or-later | https://github.com/Stuk/jszip |
15
- | pdf-lib | 1.17.1 | MIT | https://pdf-lib.js.org |
16
- | pdfjs-dist | 4.10.38 | Apache-2.0 | https://mozilla.github.io/pdf.js |
9
+ | Package | Version | License | Repository |
10
+ | ------------------ | ------- | ----------------------- | ------------------------------------ |
11
+ | @pdf-lib/fontkit | 1.1.1 | MIT | https://github.com/Hopding/fontkit |
12
+ | @pdf-lib/upng | 1.0.1 | MIT | https://github.com/Hopding/upng |
13
+ | @xmldom/xmldom | 0.9.12 | MIT | https://github.com/xmldom/xmldom |
14
+ | jszip | 3.10.1 | MIT OR GPL-3.0-or-later | https://github.com/Stuk/jszip |
15
+ | pdf-lib | 1.17.1 | MIT | https://pdf-lib.js.org |
16
+ | pdfjs-dist | 4.10.38 | Apache-2.0 | https://mozilla.github.io/pdf.js |
17
+ | hyparquet _(peer)_ | ^1.29.1 | MIT | https://github.com/hyparam/hyparquet |
17
18
 
18
19
  Squisq uses jszip under its MIT license option. Copyright and complete license
19
20
  texts for these dependencies are included in their respective npm
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  convert,
3
3
  defaultRegistry
4
- } from "./chunk-5JQ5NDRC.js";
4
+ } from "./chunk-JPU5GPGG.js";
5
5
  import {
6
6
  ConversionError
7
7
  } from "./chunk-KXOZMWBS.js";
@@ -14,7 +14,7 @@ import {
14
14
  stringifyMarkdown
15
15
  } from "@bendyline/squisq/markdown";
16
16
  import { MemoryContentContainer } from "@bendyline/squisq/storage";
17
- var OUTSIDE_IN_FORMAT_IDS = ["html", "docx", "pdf", "pptx", "xlsx"];
17
+ var OUTSIDE_IN_FORMAT_IDS = ["html", "docx", "pdf", "pptx", "xlsx", "csv"];
18
18
  var OUTSIDE_IN_FORMAT_SET = new Set(OUTSIDE_IN_FORMAT_IDS);
19
19
  var OUTSIDE_IN_VERSION_KEY = "squisq-outside-in";
20
20
  var OUTSIDE_IN_OUTPUT_KEY = "squisq-output";
@@ -215,8 +215,15 @@ async function importOutsideInDocument(source, options = {}) {
215
215
  const layout = requireLayout(source.targetPath);
216
216
  const data = arrayBufferOf(source.data);
217
217
  const registry = options.registry ?? defaultRegistry();
218
- const imported = await importMarkdownDocument(data, layout, registry, {
218
+ const importOptions = layout.format === "csv" ? {
219
219
  ...options,
220
+ formatOptions: {
221
+ ...options.formatOptions,
222
+ csv: { ...options.formatOptions?.csv, sidecar: "never" }
223
+ }
224
+ } : options;
225
+ const imported = await importMarkdownDocument(data, layout, registry, {
226
+ ...importOptions,
220
227
  registry,
221
228
  from: layout.format
222
229
  });
@@ -1,22 +1,22 @@
1
+ import {
2
+ extractFilename,
3
+ inferMimeType
4
+ } from "./chunk-VPWPEMZJ.js";
1
5
  import {
2
6
  extractPlainText
3
7
  } from "./chunk-AVOZAKGP.js";
4
8
  import {
5
9
  escapeXml
6
10
  } from "./chunk-JU2RHXUB.js";
11
+ import {
12
+ FootnoteIndex,
13
+ footnoteIds
14
+ } from "./chunk-BXWNU4T5.js";
7
15
  import {
8
16
  collectInlineIconFamilies,
9
17
  fontAwesomeFaces,
10
18
  fontAwesomeGlyph
11
19
  } from "./chunk-USU6HTKB.js";
12
- import {
13
- extractFilename,
14
- inferMimeType
15
- } from "./chunk-6RQOV3B3.js";
16
- import {
17
- FootnoteIndex,
18
- footnoteIds
19
- } from "./chunk-BXWNU4T5.js";
20
20
 
21
21
  // src/epub/export.ts
22
22
  import JSZip from "jszip";
@@ -1,3 +1,6 @@
1
+ import {
2
+ inferMimeType
3
+ } from "./chunk-VPWPEMZJ.js";
1
4
  import {
2
5
  RelIdAllocator,
3
6
  inlineNodeToRuns,
@@ -5,6 +8,9 @@ import {
5
8
  sanitizeOfficeHyperlink,
6
9
  toOoxmlHex
7
10
  } from "./chunk-A6N6IN3I.js";
11
+ import {
12
+ extToMime
13
+ } from "./chunk-B7GEAZBI.js";
8
14
  import {
9
15
  extractPlainText,
10
16
  stripHtmlTags
@@ -53,12 +59,6 @@ import {
53
59
  fontAwesomeFaces,
54
60
  fontAwesomeGlyph
55
61
  } from "./chunk-USU6HTKB.js";
56
- import {
57
- inferMimeType
58
- } from "./chunk-6RQOV3B3.js";
59
- import {
60
- extToMime
61
- } from "./chunk-AONELFLA.js";
62
62
 
63
63
  // src/pptx/export.ts
64
64
  import { resolveFontFamily, VIEWPORT_PRESETS } from "@bendyline/squisq/schemas";
@@ -20,7 +20,12 @@ var EXT_TO_MIME = {
20
20
  wav: "audio/wav",
21
21
  ogg: "audio/ogg",
22
22
  mp4: "video/mp4",
23
- webm: "video/webm"
23
+ webm: "video/webm",
24
+ // Sidecar data files (`{[dataTable src=…]}` references)
25
+ csv: "text/csv",
26
+ tsv: "text/tab-separated-values",
27
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
28
+ parquet: "application/vnd.apache.parquet"
24
29
  };
25
30
  function extToMime(ext) {
26
31
  const key = ext.replace(/^\./, "").toLowerCase();