@mkabatek/pptx-viewer 1.5.4 → 1.5.11

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 (47) hide show
  1. package/dist/index.js +3 -1
  2. package/dist/index.mjs +3 -1
  3. package/dist/viewer/index.js +3 -1
  4. package/dist/viewer/index.mjs +3 -1
  5. package/package.json +2 -9
  6. package/node_modules/emf-converter/LICENSE +0 -21
  7. package/node_modules/emf-converter/README.md +0 -629
  8. package/node_modules/emf-converter/dist/index.d.mts +0 -86
  9. package/node_modules/emf-converter/dist/index.d.ts +0 -86
  10. package/node_modules/emf-converter/dist/index.js +0 -4257
  11. package/node_modules/emf-converter/dist/index.mjs +0 -4253
  12. package/node_modules/emf-converter/package.json +0 -53
  13. package/node_modules/mtx-decompressor/LICENSE +0 -373
  14. package/node_modules/mtx-decompressor/README.md +0 -271
  15. package/node_modules/mtx-decompressor/dist/index.d.mts +0 -84
  16. package/node_modules/mtx-decompressor/dist/index.d.ts +0 -84
  17. package/node_modules/mtx-decompressor/dist/index.js +0 -1532
  18. package/node_modules/mtx-decompressor/dist/index.mjs +0 -1528
  19. package/node_modules/mtx-decompressor/package.json +0 -44
  20. package/node_modules/pptx-viewer-core/LICENSE +0 -21
  21. package/node_modules/pptx-viewer-core/NOTICE +0 -16
  22. package/node_modules/pptx-viewer-core/README.md +0 -1294
  23. package/node_modules/pptx-viewer-core/dist/SvgExporter-BtZczTlB.d.ts +0 -557
  24. package/node_modules/pptx-viewer-core/dist/SvgExporter-D4mBWJHE.d.mts +0 -557
  25. package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +0 -150
  26. package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +0 -150
  27. package/node_modules/pptx-viewer-core/dist/cli/index.js +0 -0
  28. package/node_modules/pptx-viewer-core/dist/cli/index.mjs +0 -0
  29. package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +0 -48
  30. package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +0 -48
  31. package/node_modules/pptx-viewer-core/dist/converter/index.js +0 -0
  32. package/node_modules/pptx-viewer-core/dist/converter/index.mjs +0 -0
  33. package/node_modules/pptx-viewer-core/dist/index.d.mts +0 -12744
  34. package/node_modules/pptx-viewer-core/dist/index.d.ts +0 -12744
  35. package/node_modules/pptx-viewer-core/dist/index.js +0 -66894
  36. package/node_modules/pptx-viewer-core/dist/index.mjs +0 -66420
  37. package/node_modules/pptx-viewer-core/dist/presentation-nZxgWvXq.d.mts +0 -5645
  38. package/node_modules/pptx-viewer-core/dist/presentation-nZxgWvXq.d.ts +0 -5645
  39. package/node_modules/pptx-viewer-core/dist/signature-inspection-status-BCUpfCQh.d.mts +0 -220
  40. package/node_modules/pptx-viewer-core/dist/signature-inspection-status-BCUpfCQh.d.ts +0 -220
  41. package/node_modules/pptx-viewer-core/dist/signature-node/index.d.mts +0 -177
  42. package/node_modules/pptx-viewer-core/dist/signature-node/index.d.ts +0 -177
  43. package/node_modules/pptx-viewer-core/dist/signature-node/index.js +0 -1206
  44. package/node_modules/pptx-viewer-core/dist/signature-node/index.mjs +0 -1143
  45. package/node_modules/pptx-viewer-core/dist/text-operations-DCTGMltY.d.mts +0 -134
  46. package/node_modules/pptx-viewer-core/dist/text-operations-DYmhoi7U.d.ts +0 -134
  47. package/node_modules/pptx-viewer-core/package.json +0 -96
@@ -1,86 +0,0 @@
1
- /**
2
- * Public API — the two entry points consumed by the rest of the application.
3
- *
4
- * The conversion pipeline for both formats follows the same high-level steps:
5
- * 1. Parse the file header to determine logical bounds and canvas dimensions.
6
- * 2. Create an in-memory canvas (OffscreenCanvas preferred, HTMLCanvasElement fallback).
7
- * 3. Replay every metafile record onto the canvas context in order.
8
- * 4. Resolve "deferred images" — bitmap / embedded-metafile draws that require
9
- * async image decoding (via {@link createImageBitmap}).
10
- * 5. Export the canvas contents as a `data:image/png;base64,…` URL.
11
- *
12
- * @module emf-converter
13
- */
14
- /**
15
- * Configuration options for EMF/WMF conversion.
16
- */
17
- interface EmfConvertOptions {
18
- /** Maximum output width in pixels. */
19
- maxWidth?: number;
20
- /** Maximum output height in pixels. */
21
- maxHeight?: number;
22
- /**
23
- * DPI scale factor for higher-resolution output.
24
- * Default is 2 (HiDPI). Set to 1 for 1:1 pixel mapping.
25
- * Values above 4 are clamped to 4 to prevent excessive memory usage.
26
- */
27
- dpiScale?: number;
28
- }
29
- /**
30
- * Converts an EMF (Enhanced Metafile) binary buffer to a PNG data-URL string
31
- * by parsing the EMF header, iterating over all EMR records, and replaying
32
- * them onto an in-memory canvas. Embedded EMF+ (GDI+) records found inside
33
- * EMR_COMMENT payloads are handled transparently.
34
- *
35
- * The canvas is rendered at a configurable DPI scale (default 2x) to produce
36
- * sharper output when displayed at CSS logical-pixel sizes. This is important
37
- * for presentations viewed on HiDPI/Retina displays.
38
- *
39
- * Returns `null` when:
40
- * - The buffer does not begin with a valid EMR_HEADER record.
41
- * - The logical bounds are zero-sized or negative.
42
- * - No canvas API is available (e.g. headless test environment).
43
- *
44
- * @param buffer - The raw EMF file bytes.
45
- * @param maxWidth - Optional cap on the output canvas width (pixels).
46
- * @param maxHeight - Optional cap on the output canvas height (pixels).
47
- * @param optionsOrDpiScale - Either an {@link EmfConvertOptions} object, or
48
- * a numeric DPI scale (for backward compatibility). Default DPI scale is 2.
49
- * @returns A `data:image/png;base64,…` string, or `null` on failure.
50
- */
51
- declare function convertEmfToDataUrl(buffer: ArrayBuffer, maxWidth?: number, maxHeight?: number, optionsOrDpiScale?: EmfConvertOptions | number, recursionDepth?: number): Promise<string | null>;
52
- /**
53
- * Converts a WMF (Windows Metafile) binary buffer to a PNG data-URL string.
54
- *
55
- * WMF is the older 16-bit metafile format with simpler record types than EMF.
56
- * This function parses the optional Aldus placeable header, the WMF header,
57
- * and then replays all META_* records onto a canvas.
58
- *
59
- * The canvas is rendered at a configurable DPI scale (default 2x) for
60
- * sharper output on HiDPI displays.
61
- *
62
- * Returns `null` when:
63
- * - The header cannot be parsed or reports invalid dimensions.
64
- * - No canvas API is available.
65
- *
66
- * @param buffer - The raw WMF file bytes.
67
- * @param maxWidth - Optional cap on the output canvas width (pixels).
68
- * @param maxHeight - Optional cap on the output canvas height (pixels).
69
- * @param optionsOrDpiScale - Either an {@link EmfConvertOptions} object, or
70
- * a numeric DPI scale. Default DPI scale is 2.
71
- * @returns A `data:image/png;base64,…` string, or `null` on failure.
72
- */
73
- declare function convertWmfToDataUrl(buffer: ArrayBuffer, maxWidth?: number, maxHeight?: number, optionsOrDpiScale?: EmfConvertOptions | number, recursionDepth?: number): Promise<string | null>;
74
-
75
- /**
76
- * Canvas creation, styling, string reading, stock objects, and export helpers.
77
- */
78
-
79
- /**
80
- * The default DPI scale factor used for EMF/WMF rendering.
81
- * Set to 1 for 1:1 pixel mapping (default).
82
- * Set to 2 for HiDPI output (2x resolution).
83
- */
84
- declare const DEFAULT_DPI_SCALE = 1;
85
-
86
- export { DEFAULT_DPI_SCALE, type EmfConvertOptions, convertEmfToDataUrl, convertWmfToDataUrl };
@@ -1,86 +0,0 @@
1
- /**
2
- * Public API — the two entry points consumed by the rest of the application.
3
- *
4
- * The conversion pipeline for both formats follows the same high-level steps:
5
- * 1. Parse the file header to determine logical bounds and canvas dimensions.
6
- * 2. Create an in-memory canvas (OffscreenCanvas preferred, HTMLCanvasElement fallback).
7
- * 3. Replay every metafile record onto the canvas context in order.
8
- * 4. Resolve "deferred images" — bitmap / embedded-metafile draws that require
9
- * async image decoding (via {@link createImageBitmap}).
10
- * 5. Export the canvas contents as a `data:image/png;base64,…` URL.
11
- *
12
- * @module emf-converter
13
- */
14
- /**
15
- * Configuration options for EMF/WMF conversion.
16
- */
17
- interface EmfConvertOptions {
18
- /** Maximum output width in pixels. */
19
- maxWidth?: number;
20
- /** Maximum output height in pixels. */
21
- maxHeight?: number;
22
- /**
23
- * DPI scale factor for higher-resolution output.
24
- * Default is 2 (HiDPI). Set to 1 for 1:1 pixel mapping.
25
- * Values above 4 are clamped to 4 to prevent excessive memory usage.
26
- */
27
- dpiScale?: number;
28
- }
29
- /**
30
- * Converts an EMF (Enhanced Metafile) binary buffer to a PNG data-URL string
31
- * by parsing the EMF header, iterating over all EMR records, and replaying
32
- * them onto an in-memory canvas. Embedded EMF+ (GDI+) records found inside
33
- * EMR_COMMENT payloads are handled transparently.
34
- *
35
- * The canvas is rendered at a configurable DPI scale (default 2x) to produce
36
- * sharper output when displayed at CSS logical-pixel sizes. This is important
37
- * for presentations viewed on HiDPI/Retina displays.
38
- *
39
- * Returns `null` when:
40
- * - The buffer does not begin with a valid EMR_HEADER record.
41
- * - The logical bounds are zero-sized or negative.
42
- * - No canvas API is available (e.g. headless test environment).
43
- *
44
- * @param buffer - The raw EMF file bytes.
45
- * @param maxWidth - Optional cap on the output canvas width (pixels).
46
- * @param maxHeight - Optional cap on the output canvas height (pixels).
47
- * @param optionsOrDpiScale - Either an {@link EmfConvertOptions} object, or
48
- * a numeric DPI scale (for backward compatibility). Default DPI scale is 2.
49
- * @returns A `data:image/png;base64,…` string, or `null` on failure.
50
- */
51
- declare function convertEmfToDataUrl(buffer: ArrayBuffer, maxWidth?: number, maxHeight?: number, optionsOrDpiScale?: EmfConvertOptions | number, recursionDepth?: number): Promise<string | null>;
52
- /**
53
- * Converts a WMF (Windows Metafile) binary buffer to a PNG data-URL string.
54
- *
55
- * WMF is the older 16-bit metafile format with simpler record types than EMF.
56
- * This function parses the optional Aldus placeable header, the WMF header,
57
- * and then replays all META_* records onto a canvas.
58
- *
59
- * The canvas is rendered at a configurable DPI scale (default 2x) for
60
- * sharper output on HiDPI displays.
61
- *
62
- * Returns `null` when:
63
- * - The header cannot be parsed or reports invalid dimensions.
64
- * - No canvas API is available.
65
- *
66
- * @param buffer - The raw WMF file bytes.
67
- * @param maxWidth - Optional cap on the output canvas width (pixels).
68
- * @param maxHeight - Optional cap on the output canvas height (pixels).
69
- * @param optionsOrDpiScale - Either an {@link EmfConvertOptions} object, or
70
- * a numeric DPI scale. Default DPI scale is 2.
71
- * @returns A `data:image/png;base64,…` string, or `null` on failure.
72
- */
73
- declare function convertWmfToDataUrl(buffer: ArrayBuffer, maxWidth?: number, maxHeight?: number, optionsOrDpiScale?: EmfConvertOptions | number, recursionDepth?: number): Promise<string | null>;
74
-
75
- /**
76
- * Canvas creation, styling, string reading, stock objects, and export helpers.
77
- */
78
-
79
- /**
80
- * The default DPI scale factor used for EMF/WMF rendering.
81
- * Set to 1 for 1:1 pixel mapping (default).
82
- * Set to 2 for HiDPI output (2x resolution).
83
- */
84
- declare const DEFAULT_DPI_SCALE = 1;
85
-
86
- export { DEFAULT_DPI_SCALE, type EmfConvertOptions, convertEmfToDataUrl, convertWmfToDataUrl };