@dpuse/dpuse-tool-file-previewer 1.0.114 → 1.0.116
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.
|
|
68
|
+
| [@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared) | 1.0.132 | MIT | [LICENSE](licenses/downloads/@dpuse/dpuse-shared@1.0.132-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.
|
|
83
|
+
- **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.132 — this month: 2026-10-23
|
|
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,23 +105,23 @@ _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** | 1238.
|
|
108
|
+
| **dist/dpuse-tool-file-previewer.es.js** | 1238.3 kB · gzip 717.9 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 |
|
|
112
|
-
| @dpuse/dpuse-shared → dist/dpuse-shared.es.js | `░░░░░░░░░░░░░░░░░░░░` 1.
|
|
112
|
+
| @dpuse/dpuse-shared → dist/dpuse-shared.es.js | `░░░░░░░░░░░░░░░░░░░░` 1.2% · 15.3 kB |
|
|
113
113
|
| strtok3 → lib/AbstractTokenizer.js + 12 more | `░░░░░░░░░░░░░░░░░░░░` 0.8% · 9.4 kB |
|
|
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.5% · 6.
|
|
117
|
+
| src → index.ts | `░░░░░░░░░░░░░░░░░░░░` 0.5% · 6.3 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.
|
|
124
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.5% · 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
|
|
|
@@ -8928,87 +8928,6 @@ function kc(e) {
|
|
|
8928
8928
|
function Ac(e) {
|
|
8929
8929
|
return kc(e) ? Oc[e].decoderId ?? e : e;
|
|
8930
8930
|
}
|
|
8931
|
-
new Set(Object.values({
|
|
8932
|
-
archives: [
|
|
8933
|
-
"7z",
|
|
8934
|
-
"bz2",
|
|
8935
|
-
"gz",
|
|
8936
|
-
"rar",
|
|
8937
|
-
"tar",
|
|
8938
|
-
"tgz",
|
|
8939
|
-
"xz",
|
|
8940
|
-
"zip"
|
|
8941
|
-
],
|
|
8942
|
-
audio: [
|
|
8943
|
-
"aac",
|
|
8944
|
-
"flac",
|
|
8945
|
-
"m4a",
|
|
8946
|
-
"mp3",
|
|
8947
|
-
"ogg",
|
|
8948
|
-
"wav"
|
|
8949
|
-
],
|
|
8950
|
-
documents: [
|
|
8951
|
-
"doc",
|
|
8952
|
-
"docx",
|
|
8953
|
-
"key",
|
|
8954
|
-
"numbers",
|
|
8955
|
-
"odp",
|
|
8956
|
-
"odt",
|
|
8957
|
-
"pages",
|
|
8958
|
-
"pdf",
|
|
8959
|
-
"ppt",
|
|
8960
|
-
"pptx",
|
|
8961
|
-
"rtf"
|
|
8962
|
-
],
|
|
8963
|
-
images: [
|
|
8964
|
-
"bmp",
|
|
8965
|
-
"gif",
|
|
8966
|
-
"heic",
|
|
8967
|
-
"ico",
|
|
8968
|
-
"jpeg",
|
|
8969
|
-
"jpg",
|
|
8970
|
-
"png",
|
|
8971
|
-
"psd",
|
|
8972
|
-
"svg",
|
|
8973
|
-
"tif",
|
|
8974
|
-
"tiff",
|
|
8975
|
-
"webp"
|
|
8976
|
-
],
|
|
8977
|
-
programs: [
|
|
8978
|
-
"app",
|
|
8979
|
-
"bin",
|
|
8980
|
-
"dll",
|
|
8981
|
-
"dmg",
|
|
8982
|
-
"exe",
|
|
8983
|
-
"iso",
|
|
8984
|
-
"msi",
|
|
8985
|
-
"so"
|
|
8986
|
-
],
|
|
8987
|
-
unreadDataFormats: [
|
|
8988
|
-
"arrow",
|
|
8989
|
-
"avro",
|
|
8990
|
-
"db",
|
|
8991
|
-
"ods",
|
|
8992
|
-
"parquet",
|
|
8993
|
-
"por",
|
|
8994
|
-
"sav",
|
|
8995
|
-
"sqlite",
|
|
8996
|
-
"xls",
|
|
8997
|
-
"xlsm",
|
|
8998
|
-
"xlsx",
|
|
8999
|
-
"xltm",
|
|
9000
|
-
"xltx"
|
|
9001
|
-
],
|
|
9002
|
-
video: [
|
|
9003
|
-
"avi",
|
|
9004
|
-
"m4v",
|
|
9005
|
-
"mkv",
|
|
9006
|
-
"mov",
|
|
9007
|
-
"mp4",
|
|
9008
|
-
"webm",
|
|
9009
|
-
"wmv"
|
|
9010
|
-
]
|
|
9011
|
-
}).flat());
|
|
9012
8931
|
function jc(e) {
|
|
9013
8932
|
if (!e) return;
|
|
9014
8933
|
let t = Mc(e);
|
|
@@ -9112,10 +9031,10 @@ async function Uc(e, t, n) {
|
|
|
9112
9031
|
};
|
|
9113
9032
|
let r = await Qs(e);
|
|
9114
9033
|
if (r != null) return Wc(e, r);
|
|
9115
|
-
let i =
|
|
9034
|
+
let i = Kc(e, n), a = Yc(e, i[0] ?? Fc);
|
|
9116
9035
|
return {
|
|
9117
9036
|
bytes: e,
|
|
9118
|
-
dataFormatId:
|
|
9037
|
+
dataFormatId: Xc(a.text, t),
|
|
9119
9038
|
encodingId: a.encoding.id,
|
|
9120
9039
|
encodingConfidenceLevel: a.encoding.confidenceLevel,
|
|
9121
9040
|
encodingCandidates: i,
|
|
@@ -9126,8 +9045,8 @@ async function Uc(e, t, n) {
|
|
|
9126
9045
|
function Wc(e, t) {
|
|
9127
9046
|
let n = Vc[t.ext]?.isSupported === !0 ? t.ext : void 0;
|
|
9128
9047
|
if (t.ext === "xml") {
|
|
9129
|
-
let r =
|
|
9130
|
-
id:
|
|
9048
|
+
let r = Yc(e, {
|
|
9049
|
+
id: Jc(e),
|
|
9131
9050
|
confidenceLevel: 1
|
|
9132
9051
|
});
|
|
9133
9052
|
return {
|
|
@@ -9147,11 +9066,17 @@ function Wc(e, t) {
|
|
|
9147
9066
|
encodingConfidenceLevel: void 0,
|
|
9148
9067
|
encodingCandidates: void 0,
|
|
9149
9068
|
fileTypeConfig: t,
|
|
9150
|
-
text:
|
|
9069
|
+
text: Gc(e)
|
|
9151
9070
|
};
|
|
9152
9071
|
}
|
|
9153
|
-
function Gc(e
|
|
9154
|
-
|
|
9072
|
+
function Gc(e) {
|
|
9073
|
+
return Array.from(new TextDecoder("windows-1252").decode(e), (e) => {
|
|
9074
|
+
let t = e.codePointAt(0) ?? 0;
|
|
9075
|
+
return t < 32 && e !== " " && e !== "\n" && e !== "\r" || t >= 127 && t <= 159 ? "·" : e;
|
|
9076
|
+
}).join("");
|
|
9077
|
+
}
|
|
9078
|
+
function Kc(e, t) {
|
|
9079
|
+
let n = qc(e);
|
|
9155
9080
|
if (n != null) return [n];
|
|
9156
9081
|
let r = Oa(e, { minimumThreshold: 0 }), i = [];
|
|
9157
9082
|
for (let { confidence: e, encoding: t } of r) t != null && kc(t) && i.push({
|
|
@@ -9160,7 +9085,7 @@ function Gc(e, t) {
|
|
|
9160
9085
|
});
|
|
9161
9086
|
return i.filter(({ confidenceLevel: e = 0 }, n) => n === 0 || e >= t);
|
|
9162
9087
|
}
|
|
9163
|
-
function
|
|
9088
|
+
function qc(e) {
|
|
9164
9089
|
return e[0] === 239 && e[1] === 187 && e[2] === 191 ? {
|
|
9165
9090
|
confidenceLevel: 1,
|
|
9166
9091
|
id: "UTF-8-SIG"
|
|
@@ -9172,41 +9097,41 @@ function Kc(e) {
|
|
|
9172
9097
|
id: "utf-16-le"
|
|
9173
9098
|
} : void 0;
|
|
9174
9099
|
}
|
|
9175
|
-
function
|
|
9100
|
+
function Jc(e) {
|
|
9176
9101
|
let t = new TextDecoder("ascii").decode(e.subarray(0, Ic));
|
|
9177
|
-
return
|
|
9102
|
+
return qc(e)?.id ?? Lc.exec(t)?.[2] ?? "utf-8";
|
|
9178
9103
|
}
|
|
9179
|
-
function
|
|
9104
|
+
function Yc(e, t) {
|
|
9180
9105
|
try {
|
|
9181
9106
|
return {
|
|
9182
9107
|
encoding: t,
|
|
9183
|
-
text: new TextDecoder(Ac(t.id)).decode(
|
|
9108
|
+
text: new TextDecoder(Ac(t.id)).decode(cl(e))
|
|
9184
9109
|
};
|
|
9185
9110
|
} catch {
|
|
9186
9111
|
return {
|
|
9187
9112
|
encoding: Fc,
|
|
9188
|
-
text: new TextDecoder(Fc.id, { fatal: !1 }).decode(
|
|
9113
|
+
text: new TextDecoder(Fc.id, { fatal: !1 }).decode(cl(e))
|
|
9189
9114
|
};
|
|
9190
9115
|
}
|
|
9191
9116
|
}
|
|
9192
|
-
function
|
|
9193
|
-
return
|
|
9117
|
+
function Xc(e, t) {
|
|
9118
|
+
return Zc(e) ? "json" : Qc(e) ? "jsonl" : (t == null ? void 0 : Bc[t]) ?? "dtv";
|
|
9194
9119
|
}
|
|
9195
|
-
function
|
|
9120
|
+
function Zc(e) {
|
|
9196
9121
|
let t = [], n = e.search(/\S/);
|
|
9197
9122
|
if (e[n] !== "{" && e[n] !== "[") return !1;
|
|
9198
9123
|
let r = {
|
|
9199
9124
|
expectation: "value",
|
|
9200
9125
|
index: n
|
|
9201
9126
|
};
|
|
9202
|
-
for (; r != null && r.index < e.length;) r =
|
|
9127
|
+
for (; r != null && r.index < e.length;) r = el(e, r, t);
|
|
9203
9128
|
return r != null;
|
|
9204
9129
|
}
|
|
9205
|
-
function
|
|
9130
|
+
function Qc(e) {
|
|
9206
9131
|
let t = e.split(/\r\n|\n|\r/).filter((e) => e.trim() !== "");
|
|
9207
|
-
return t.length > 1 && t.every((e) =>
|
|
9132
|
+
return t.length > 1 && t.every((e) => $c(e));
|
|
9208
9133
|
}
|
|
9209
|
-
function
|
|
9134
|
+
function $c(e) {
|
|
9210
9135
|
try {
|
|
9211
9136
|
let t = JSON.parse(e);
|
|
9212
9137
|
return typeof t == "object" && !!t;
|
|
@@ -9214,15 +9139,15 @@ function Qc(e) {
|
|
|
9214
9139
|
return !1;
|
|
9215
9140
|
}
|
|
9216
9141
|
}
|
|
9217
|
-
function
|
|
9142
|
+
function el(e, { expectation: t, index: n }, r) {
|
|
9218
9143
|
let i = e.charAt(n);
|
|
9219
9144
|
if (zc.has(i)) return {
|
|
9220
9145
|
expectation: t,
|
|
9221
9146
|
index: n + 1
|
|
9222
9147
|
};
|
|
9223
9148
|
switch (t) {
|
|
9224
|
-
case "closeOrKey": return i === "}" ?
|
|
9225
|
-
case "closeOrValue": return i === "]" ?
|
|
9149
|
+
case "closeOrKey": return i === "}" ? tl(i, n, r) : nl(e, n);
|
|
9150
|
+
case "closeOrValue": return i === "]" ? tl(i, n, r) : rl(e, n, r);
|
|
9226
9151
|
case "colon": return i === ":" ? {
|
|
9227
9152
|
expectation: "value",
|
|
9228
9153
|
index: n + 1
|
|
@@ -9230,69 +9155,69 @@ function $c(e, { expectation: t, index: n }, r) {
|
|
|
9230
9155
|
case "commaOrClose": return i === "," ? {
|
|
9231
9156
|
expectation: r.at(-1) === "{" ? "key" : "value",
|
|
9232
9157
|
index: n + 1
|
|
9233
|
-
} :
|
|
9158
|
+
} : tl(i, n, r);
|
|
9234
9159
|
case "end": return;
|
|
9235
|
-
case "key": return
|
|
9236
|
-
case "value": return
|
|
9160
|
+
case "key": return nl(e, n);
|
|
9161
|
+
case "value": return rl(e, n, r);
|
|
9237
9162
|
}
|
|
9238
9163
|
}
|
|
9239
|
-
function
|
|
9164
|
+
function tl(e, t, n) {
|
|
9240
9165
|
if (e === (n.at(-1) === "{" ? "}" : "]")) return n.pop(), {
|
|
9241
9166
|
expectation: n.length === 0 ? "end" : "commaOrClose",
|
|
9242
9167
|
index: t + 1
|
|
9243
9168
|
};
|
|
9244
9169
|
}
|
|
9245
|
-
function
|
|
9246
|
-
let n = e.charAt(t) === "\"" ?
|
|
9170
|
+
function nl(e, t) {
|
|
9171
|
+
let n = e.charAt(t) === "\"" ? il(e, t) : void 0;
|
|
9247
9172
|
return n == null ? void 0 : {
|
|
9248
9173
|
expectation: "colon",
|
|
9249
9174
|
index: n
|
|
9250
9175
|
};
|
|
9251
9176
|
}
|
|
9252
|
-
function
|
|
9177
|
+
function rl(e, t, n) {
|
|
9253
9178
|
let r = e.charAt(t);
|
|
9254
9179
|
if (r === "{" || r === "[") return n.push(r), {
|
|
9255
9180
|
expectation: r === "{" ? "closeOrKey" : "closeOrValue",
|
|
9256
9181
|
index: t + 1
|
|
9257
9182
|
};
|
|
9258
|
-
let i = r === "\"" ?
|
|
9183
|
+
let i = r === "\"" ? il(e, t) : ol(e, t);
|
|
9259
9184
|
return i == null ? void 0 : {
|
|
9260
9185
|
expectation: "commaOrClose",
|
|
9261
9186
|
index: i
|
|
9262
9187
|
};
|
|
9263
9188
|
}
|
|
9264
|
-
function
|
|
9189
|
+
function il(e, t) {
|
|
9265
9190
|
let n = t + 1;
|
|
9266
9191
|
for (; n < e.length;) {
|
|
9267
9192
|
let t = e.charAt(n);
|
|
9268
9193
|
if (t === "\"") return n + 1;
|
|
9269
9194
|
if (t < " ") return;
|
|
9270
9195
|
if (t === "\\") {
|
|
9271
|
-
let t =
|
|
9196
|
+
let t = al(e, n);
|
|
9272
9197
|
if (t == null) return;
|
|
9273
9198
|
n = t;
|
|
9274
9199
|
} else n++;
|
|
9275
9200
|
}
|
|
9276
9201
|
return e.length;
|
|
9277
9202
|
}
|
|
9278
|
-
function
|
|
9203
|
+
function al(e, t) {
|
|
9279
9204
|
let n = e.charAt(t + 1);
|
|
9280
9205
|
return n === "u" ? /^[\da-f]*$/i.test(e.slice(t + 2, t + 6)) ? t + 6 : void 0 : n === "" || String.raw`"\/bfnrt`.includes(n) ? t + 2 : void 0;
|
|
9281
9206
|
}
|
|
9282
|
-
function
|
|
9207
|
+
function ol(e, t) {
|
|
9283
9208
|
let n = /^[\w.+-]+/.exec(e.slice(t))?.[0];
|
|
9284
9209
|
if (n == null) return;
|
|
9285
9210
|
let r = t + n.length;
|
|
9286
|
-
return r === e.length ? Rc.some((e) => e.startsWith(n)) || /^[\d.e+-]*$/i.test(n) ? r : void 0 : Rc.includes(n) ||
|
|
9211
|
+
return r === e.length ? Rc.some((e) => e.startsWith(n)) || /^[\d.e+-]*$/i.test(n) ? r : void 0 : Rc.includes(n) || sl(n) ? r : void 0;
|
|
9287
9212
|
}
|
|
9288
|
-
function
|
|
9213
|
+
function sl(e) {
|
|
9289
9214
|
try {
|
|
9290
9215
|
return typeof JSON.parse(e) == "number";
|
|
9291
9216
|
} catch {
|
|
9292
9217
|
return !1;
|
|
9293
9218
|
}
|
|
9294
9219
|
}
|
|
9295
|
-
function
|
|
9220
|
+
function cl(e) {
|
|
9296
9221
|
let t = e, n = t.length;
|
|
9297
9222
|
for (let e = n - 1; e >= 0; e--) {
|
|
9298
9223
|
let n = t[e];
|