@file-viewer/renderer-iwork 2.3.1 → 3.0.0

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/dist/parser.js CHANGED
@@ -540,7 +540,10 @@ const isUsefulString = (value) => {
540
540
  return false;
541
541
  if (/^[\d.\-_/]+$/.test(cleaned))
542
542
  return false;
543
- const printable = Array.from(cleaned).filter(character => !/[\u0000-\u001f\u007f]/.test(character)).length;
543
+ const printable = Array.from(cleaned).filter(character => {
544
+ const code = character.charCodeAt(0);
545
+ return code > 0x1f && code !== 0x7f;
546
+ }).length;
544
547
  return printable / cleaned.length > 0.92 && /[\p{L}\p{N}]/u.test(cleaned);
545
548
  };
546
549
  const extractProtobufStrings = (bytes, limits) => {
@@ -927,10 +930,8 @@ const modernCellValue = (bytes, strings) => {
927
930
  }
928
931
  if (fields & 4)
929
932
  offset += 8;
930
- if (fields & 8 && offset + 4 <= bytes.length) {
933
+ if (fields & 8 && offset + 4 <= bytes.length)
931
934
  stringIndex = view.getUint32(offset, true);
932
- offset += 4;
933
- }
934
935
  const type = bytes[1];
935
936
  if (type === 3)
936
937
  return strings.get(stringIndex) || '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@file-viewer/renderer-iwork",
3
- "version": "2.3.1",
3
+ "version": "3.0.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Offline Apple Pages, Numbers and Keynote renderer for modern IWA and iWork '09 containers.",
@@ -62,12 +62,12 @@
62
62
  "THIRD_PARTY_NOTICES.md"
63
63
  ],
64
64
  "dependencies": {
65
- "@file-viewer/core": "2.3.0",
65
+ "@file-viewer/core": "3.0.0",
66
66
  "@xmldom/xmldom": "^0.9.10",
67
67
  "jszip": "^3.10.1",
68
68
  "keynote-archives": "2.0.1",
69
69
  "pako": "^2.1.0",
70
- "styled-exceljs": "0.21.2",
70
+ "styled-exceljs": "0.21.4",
71
71
  "tslib": "^2.8.1"
72
72
  },
73
73
  "devDependencies": {