@dpuse/dpuse-tool-file-previewer 1.0.122 → 1.0.123

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 CHANGED
@@ -65,7 +65,7 @@ License data is updated each time `npm run document` is run, using [license-chec
65
65
  | Dependency | Version | License(s) | Document |
66
66
  | :--------------------------------------------------------------------- | :-----: | :--------- | :-------------------------------------------------------------------- |
67
67
  | [@borewit/text-codec](https://github.com/Borewit/text-codec) | 0.2.2 | MIT | [LICENSE](licenses/downloads/@borewit/text-codec@0.2.2-LICENSE.txt) |
68
- | [@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared) | 1.0.136 | MIT | [LICENSE](licenses/downloads/@dpuse/dpuse-shared@1.0.136-LICENSE.txt) |
68
+ | [@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared) | 1.0.142 | MIT | [LICENSE](licenses/downloads/@dpuse/dpuse-shared@1.0.142-LICENSE.txt) |
69
69
  | [@tokenizer/inflate](https://github.com/Borewit/tokenizer-inflate) | 0.5.1 | MIT | [LICENSE](licenses/downloads/@tokenizer/inflate@0.5.1-LICENSE.txt) |
70
70
  | [debug](https://github.com/debug-js/debug) | 4.4.3 | MIT | [LICENSE](licenses/downloads/debug@4.4.3-LICENSE.txt) |
71
71
  | [file-type](https://github.com/sindresorhus/file-type) | 22.2.0 | MIT | [LICENSE](licenses/downloads/file-type@22.2.0-LICENSE.txt) |
@@ -80,7 +80,7 @@ License data is updated each time `npm run document` is run, using [license-chec
80
80
 
81
81
  The dependency tree below shows how each package in the table above is reached — direct and transitive — along with its installed version, release date, and update status. A package that does not ship itself, such as one whose parts are bundled separately, is left out and what ships beneath it is shown in its place. Packages flagged ❗ have a newer version available; ⚠️ indicates a package that hasn't been updated in the last 6 months or longer. Neither flag necessarily indicates a problem: we let new releases stabilise before upgrading, and some packages are mature and stable (have limited or no dependencies), so they require no active development.
82
82
 
83
- - **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.136 — this month: 2026-10-25
83
+ - **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.142 — this month: 2026-10-25
84
84
  - **[file-type](https://github.com/sindresorhus/file-type)** 22.2.0 — this month: 2026-10-14
85
85
  - **[valibot](https://github.com/open-circle/valibot)** 1.5.0 — 1 mth ago: 2026-09-09
86
86
  - **[file-type](https://github.com/sindresorhus/file-type)** 22.2.0 — this month: 2026-10-14
@@ -105,7 +105,7 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
105
105
 
106
106
  | Chunk/Module/File | Composition |
107
107
  | :---------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------ |
108
- | **dist/dpuse-tool-file-previewer.es.js** | 1239.0 kB · gzip 718.2 kB · 100.0% of the build |
108
+ | **dist/dpuse-tool-file-previewer.es.js** | 1239.3 kB · gzip 718.3 kB · 100.0% of the build |
109
109
  |     jschardet → dist/jschardet.esm.min.js | `██████████████████░░` 90.6% · 1122.3 kB |
110
110
  |     file-type → source/index.js + 7 more | `█░░░░░░░░░░░░░░░░░░░` 3.7% · 45.3 kB |
111
111
  |         ↳ 8 smaller files | `▒░░░░░░░░░░░░░░░░░░░` 3.7% · 45.3 kB |
@@ -114,14 +114,14 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
114
114
  |         ↳ 13 smaller files | `░░░░░░░░░░░░░░░░░░░░` 0.8% · 9.4 kB |
115
115
  |     @tokenizer/inflate → lib/ZipHandler.js + 3 more | `░░░░░░░░░░░░░░░░░░░░` 0.7% · 8.4 kB |
116
116
  |         ↳ 4 smaller files | `░░░░░░░░░░░░░░░░░░░░` 0.7% · 8.4 kB |
117
- |     src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 0.6% · 6.9 kB |
117
+ |     src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 0.6% · 7.1 kB |
118
118
  |     debug → src/browser.js + 1 more | `░░░░░░░░░░░░░░░░░░░░` 0.4% · 5.1 kB |
119
119
  |         ↳ 2 smaller files | `░░░░░░░░░░░░░░░░░░░░` 0.4% · 5.1 kB |
120
120
  |     @borewit/text-codec → lib/index.js | `░░░░░░░░░░░░░░░░░░░░` 0.3% · 3.3 kB |
121
121
  |     ms → index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1.6 kB |
122
122
  |     uint8array-extras → index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1.2 kB |
123
123
  |     token-types → lib/index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1018 B |
124
- |     (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.5% · 19.2 kB |
124
+ |     (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.6% · 19.2 kB |
125
125
 
126
126
  Bars show each row's share of its output file. ↳ rows are part of the row above.
127
127
 
@@ -8399,7 +8399,7 @@ var bc = {
8399
8399
  status: /* @__PURE__ */ Z(vc),
8400
8400
  statusId: /* @__PURE__ */ Z(_c)
8401
8401
  };
8402
- ({ ...bc }), Y({ en: "Apache Arrow" }), Y({ en: "Apache Avro" }), Y({ en: "Data Positioning Events" }), Y({ en: "Delimited Text" }), Y({ en: "JSON" }), Y({ en: "JSON Lines" }), Y({ en: "Markdown" }), Y({ en: "OpenDocument Spreadsheet" }), Y({ en: "Apache Parquet" }), Y({ en: "SPSS" }), Y({ en: "SQLite" }), Y({ en: "Plain Text" }), Y({ en: "XLSM" }), Y({ en: "XLSX" }), Y({ en: "XML" }), Y({ en: "Newline" }), Y({ en: "Carriage Return" }), Y({ en: "Carriage Return/Newline" }), Y({ en: "Colon" }), Y({ en: "Comma" }), Y({ en: "Exclamation Mark" }), Y({ en: "Record Separator" }), Y({ en: "Semicolon" }), Y({ en: "Space" }), Y({ en: "Tab" }), Y({ en: "Underscore" }), Y({ en: "Unit Separator" }), Y({ en: "Vertical Bar" }), $([
8402
+ ({ ...bc }), Y({ en: "Arrow" }), Y({ en: "Avro" }), Y({ en: "Delimited text (CSV, TAB, TSV…)" }), Y({ en: "JSON" }), Y({ en: "JSON Lines (JSONL)" }), Y({ en: "Markdown (MD)" }), Y({ en: "OpenDocument spreadsheet (ODS)" }), Y({ en: "Parquet" }), Y({ en: "SPSS (SAV)" }), Y({ en: "SQLite" }), Y({ en: "Excel (XLSX, XLSM)" }), Y({ en: "XML" }), Y({ en: "Newline" }), Y({ en: "Carriage Return" }), Y({ en: "Carriage Return/Newline" }), Y({ en: "Colon" }), Y({ en: "Comma" }), Y({ en: "Exclamation Mark" }), Y({ en: "Record Separator" }), Y({ en: "Semicolon" }), Y({ en: "Space" }), Y({ en: "Tab" }), Y({ en: "Underscore" }), Y({ en: "Unit Separator" }), Y({ en: "Vertical Bar" }), $([
8403
8403
  "app",
8404
8404
  "engine",
8405
8405
  "connector",
@@ -8952,65 +8952,74 @@ var Nc = .2, Pc = 4096, Fc = 65536, Ic = {
8952
8952
  "\r"
8953
8953
  ]), Vc = /* @__PURE__ */ new Set(["markdown", "md"]), Hc = "text/markdown", Uc = "application/octet-stream", Wc = {
8954
8954
  arrow: {
8955
+ dataFormatId: "arrow",
8955
8956
  label: "Columnar format for tables of data.",
8956
8957
  structure: "table",
8957
8958
  isAutoDetectable: !0
8958
8959
  },
8959
8960
  avro: {
8961
+ dataFormatId: "avro",
8960
8962
  label: "Object container file developed by Apache Avro.",
8961
8963
  structure: "records",
8962
8964
  isAutoDetectable: !0
8963
8965
  },
8964
8966
  ods: {
8967
+ dataFormatId: "ods",
8965
8968
  label: "OpenDocument for spreadsheets.",
8966
8969
  structure: "workbook",
8967
8970
  isAutoDetectable: !0
8968
8971
  },
8969
8972
  parquet: {
8973
+ dataFormatId: "parquet",
8970
8974
  label: "Apache Parquet.",
8971
8975
  structure: "table",
8972
8976
  isAutoDetectable: !0
8973
8977
  },
8974
8978
  sav: {
8979
+ dataFormatId: "sav",
8975
8980
  label: "SPSS statistical data file.",
8976
8981
  structure: "table",
8977
8982
  isAutoDetectable: !0
8978
8983
  },
8979
8984
  sqlite: {
8985
+ dataFormatId: "sqlite",
8980
8986
  label: "SQLite file.",
8981
8987
  structure: "database",
8982
8988
  isAutoDetectable: !0
8983
8989
  },
8984
8990
  xlsx: {
8991
+ dataFormatId: "xlsx",
8985
8992
  label: "Microsoft Excel document.",
8986
8993
  structure: "workbook",
8987
8994
  isAutoDetectable: !0
8988
8995
  },
8989
8996
  xlsm: {
8997
+ dataFormatId: "xlsx",
8990
8998
  label: "Microsoft Excel macro-enabled document.",
8991
8999
  structure: "workbook",
8992
9000
  isAutoDetectable: !0
8993
9001
  },
8994
9002
  xml: {
9003
+ dataFormatId: "xml",
8995
9004
  label: "eXtensible markup language.",
8996
9005
  structure: "tree",
8997
9006
  isAutoDetectable: !0
8998
9007
  }
8999
9008
  }, Gc = class {
9000
9009
  async previewFile(e, t, n, r, i = Nc, a) {
9001
- let o = tl(r, jc(new URL(e).pathname)?.toLowerCase()), s = n ?? (o ? Fc : Pc), c = await fetch(encodeURI(e), {
9002
- headers: { Range: `bytes=0-${String(s - 1)}` },
9010
+ let o = a?.dataFormatId, s = o == null ? tl(r, jc(new URL(e).pathname)?.toLowerCase()) : o === "markdown", c = n ?? (s ? Fc : Pc), l = await fetch(encodeURI(e), {
9011
+ headers: { Range: `bytes=0-${String(c - 1)}` },
9003
9012
  signal: t
9004
9013
  });
9005
- if (c.status === 416) return {
9006
- ...await qc(/* @__PURE__ */ new Uint8Array(), o, i, !0),
9014
+ if (l.status === 416) return {
9015
+ ...await qc(/* @__PURE__ */ new Uint8Array(), s, i, !0),
9007
9016
  isComplete: !0
9008
9017
  };
9009
- if (!c.ok) throw await Tc(c, `Failed to fetch '${e}' file.`, "dpuse-tool-file-previewer.previewRemoteFile");
9010
- let l = new Uint8Array(await c.arrayBuffer()), u = Kc(c, l.length, s);
9018
+ if (!l.ok) throw await Tc(l, `Failed to fetch '${e}' file.`, "dpuse-tool-file-previewer.previewRemoteFile");
9019
+ let u = new Uint8Array(await l.arrayBuffer()), d = Kc(l, u.length, c);
9011
9020
  return {
9012
- ...await qc(l, o, i, u, a),
9013
- isComplete: u
9021
+ ...await qc(u, s, i, d, a),
9022
+ isComplete: d
9014
9023
  };
9015
9024
  }
9016
9025
  };
@@ -9042,7 +9051,7 @@ async function qc(e, t, n, r, i) {
9042
9051
  };
9043
9052
  }
9044
9053
  function Jc(e, t, n, r) {
9045
- let i = Object.hasOwn(Wc, t.ext) ? t.ext : void 0, a = r?.dataFormatId ?? i;
9054
+ let i = Object.hasOwn(Wc, t.ext) ? Wc[t.ext]?.dataFormatId : void 0, a = r?.dataFormatId ?? i;
9046
9055
  if (t.ext === "xml") {
9047
9056
  let i = el(e, $c(r) ?? {
9048
9057
  id: Qc(e),