pdf-parser.js 5.3.0 → 5.3.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.
|
@@ -260,7 +260,8 @@ const SYMBOL_GLYPH_NAMES = [
|
|
|
260
260
|
];
|
|
261
261
|
function symbolGlyphName(code) {
|
|
262
262
|
const name = SYMBOL_GLYPH_NAMES[code];
|
|
263
|
-
|
|
263
|
+
if (name === void 0) return;
|
|
264
|
+
return name === "" ? void 0 : name;
|
|
264
265
|
}
|
|
265
266
|
const ZAPFDINGBATS_GLYPH_NAMES = [
|
|
266
267
|
"",
|
|
@@ -522,7 +523,8 @@ const ZAPFDINGBATS_GLYPH_NAMES = [
|
|
|
522
523
|
];
|
|
523
524
|
function zapfDingbatsGlyphName(code) {
|
|
524
525
|
const name = ZAPFDINGBATS_GLYPH_NAMES[code];
|
|
525
|
-
|
|
526
|
+
if (name === void 0) return;
|
|
527
|
+
return name === "" ? void 0 : name;
|
|
526
528
|
}
|
|
527
529
|
//#endregion
|
|
528
530
|
exports.SYMBOL_GLYPH_NAMES = SYMBOL_GLYPH_NAMES;
|
|
@@ -259,7 +259,8 @@ const SYMBOL_GLYPH_NAMES = [
|
|
|
259
259
|
];
|
|
260
260
|
function symbolGlyphName(code) {
|
|
261
261
|
const name = SYMBOL_GLYPH_NAMES[code];
|
|
262
|
-
|
|
262
|
+
if (name === void 0) return;
|
|
263
|
+
return name === "" ? void 0 : name;
|
|
263
264
|
}
|
|
264
265
|
const ZAPFDINGBATS_GLYPH_NAMES = [
|
|
265
266
|
"",
|
|
@@ -521,7 +522,8 @@ const ZAPFDINGBATS_GLYPH_NAMES = [
|
|
|
521
522
|
];
|
|
522
523
|
function zapfDingbatsGlyphName(code) {
|
|
523
524
|
const name = ZAPFDINGBATS_GLYPH_NAMES[code];
|
|
524
|
-
|
|
525
|
+
if (name === void 0) return;
|
|
526
|
+
return name === "" ? void 0 : name;
|
|
525
527
|
}
|
|
526
528
|
//#endregion
|
|
527
529
|
export { SYMBOL_GLYPH_NAMES, ZAPFDINGBATS_GLYPH_NAMES, symbolGlyphName, zapfDingbatsGlyphName };
|
package/dist/image/jpeg2000.cjs
CHANGED
|
@@ -227,8 +227,8 @@ function inverseReversibleComponentTransform(planes) {
|
|
|
227
227
|
const u = planes[1];
|
|
228
228
|
const v = planes[2];
|
|
229
229
|
if (y === void 0 || u === void 0 || v === void 0) return;
|
|
230
|
-
for (
|
|
231
|
-
const green =
|
|
230
|
+
for (const [i, luma] of y.entries()) {
|
|
231
|
+
const green = luma - Math.floor(((u[i] ?? 0) + (v[i] ?? 0)) / RCT_GREEN_RECOVERY_DIVISOR);
|
|
232
232
|
const red = (v[i] ?? 0) + green;
|
|
233
233
|
const blue = (u[i] ?? 0) + green;
|
|
234
234
|
y[i] = red;
|
|
@@ -245,8 +245,7 @@ function inverseIrreversibleComponentTransform(planes) {
|
|
|
245
245
|
const cb = planes[1];
|
|
246
246
|
const cr = planes[2];
|
|
247
247
|
if (y === void 0 || cb === void 0 || cr === void 0) return;
|
|
248
|
-
for (
|
|
249
|
-
const luma = y[i] ?? 0;
|
|
248
|
+
for (const [i, luma] of y.entries()) {
|
|
250
249
|
const blueDiff = cb[i] ?? 0;
|
|
251
250
|
const redDiff = cr[i] ?? 0;
|
|
252
251
|
y[i] = luma + ICT_RED_FROM_CR * redDiff;
|
package/dist/image/jpeg2000.js
CHANGED
|
@@ -226,8 +226,8 @@ function inverseReversibleComponentTransform(planes) {
|
|
|
226
226
|
const u = planes[1];
|
|
227
227
|
const v = planes[2];
|
|
228
228
|
if (y === void 0 || u === void 0 || v === void 0) return;
|
|
229
|
-
for (
|
|
230
|
-
const green =
|
|
229
|
+
for (const [i, luma] of y.entries()) {
|
|
230
|
+
const green = luma - Math.floor(((u[i] ?? 0) + (v[i] ?? 0)) / RCT_GREEN_RECOVERY_DIVISOR);
|
|
231
231
|
const red = (v[i] ?? 0) + green;
|
|
232
232
|
const blue = (u[i] ?? 0) + green;
|
|
233
233
|
y[i] = red;
|
|
@@ -244,8 +244,7 @@ function inverseIrreversibleComponentTransform(planes) {
|
|
|
244
244
|
const cb = planes[1];
|
|
245
245
|
const cr = planes[2];
|
|
246
246
|
if (y === void 0 || cb === void 0 || cr === void 0) return;
|
|
247
|
-
for (
|
|
248
|
-
const luma = y[i] ?? 0;
|
|
247
|
+
for (const [i, luma] of y.entries()) {
|
|
249
248
|
const blueDiff = cb[i] ?? 0;
|
|
250
249
|
const redDiff = cr[i] ?? 0;
|
|
251
250
|
y[i] = luma + ICT_RED_FROM_CR * redDiff;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdf-parser.js",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "Hand-written, dependency-minimal PDF codec: parses arbitrary real-world PDFs and generates new ones, built on its own codec-owned LayoutDocument item model and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|