@mkabatek/pptx-viewer 1.5.3 → 1.5.5

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 (44) hide show
  1. package/README.md +13 -9
  2. package/package.json +2 -9
  3. package/node_modules/emf-converter/LICENSE +0 -21
  4. package/node_modules/emf-converter/README.md +0 -629
  5. package/node_modules/emf-converter/dist/index.d.mts +0 -86
  6. package/node_modules/emf-converter/dist/index.d.ts +0 -86
  7. package/node_modules/emf-converter/dist/index.js +0 -4257
  8. package/node_modules/emf-converter/dist/index.mjs +0 -4253
  9. package/node_modules/emf-converter/package.json +0 -53
  10. package/node_modules/mtx-decompressor/LICENSE +0 -373
  11. package/node_modules/mtx-decompressor/README.md +0 -271
  12. package/node_modules/mtx-decompressor/dist/index.d.mts +0 -84
  13. package/node_modules/mtx-decompressor/dist/index.d.ts +0 -84
  14. package/node_modules/mtx-decompressor/dist/index.js +0 -1532
  15. package/node_modules/mtx-decompressor/dist/index.mjs +0 -1528
  16. package/node_modules/mtx-decompressor/package.json +0 -44
  17. package/node_modules/pptx-viewer-core/LICENSE +0 -21
  18. package/node_modules/pptx-viewer-core/NOTICE +0 -16
  19. package/node_modules/pptx-viewer-core/README.md +0 -1294
  20. package/node_modules/pptx-viewer-core/dist/SvgExporter-BtZczTlB.d.ts +0 -557
  21. package/node_modules/pptx-viewer-core/dist/SvgExporter-D4mBWJHE.d.mts +0 -557
  22. package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +0 -150
  23. package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +0 -150
  24. package/node_modules/pptx-viewer-core/dist/cli/index.js +0 -0
  25. package/node_modules/pptx-viewer-core/dist/cli/index.mjs +0 -0
  26. package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +0 -48
  27. package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +0 -48
  28. package/node_modules/pptx-viewer-core/dist/converter/index.js +0 -0
  29. package/node_modules/pptx-viewer-core/dist/converter/index.mjs +0 -0
  30. package/node_modules/pptx-viewer-core/dist/index.d.mts +0 -12744
  31. package/node_modules/pptx-viewer-core/dist/index.d.ts +0 -12744
  32. package/node_modules/pptx-viewer-core/dist/index.js +0 -66894
  33. package/node_modules/pptx-viewer-core/dist/index.mjs +0 -66420
  34. package/node_modules/pptx-viewer-core/dist/presentation-nZxgWvXq.d.mts +0 -5645
  35. package/node_modules/pptx-viewer-core/dist/presentation-nZxgWvXq.d.ts +0 -5645
  36. package/node_modules/pptx-viewer-core/dist/signature-inspection-status-BCUpfCQh.d.mts +0 -220
  37. package/node_modules/pptx-viewer-core/dist/signature-inspection-status-BCUpfCQh.d.ts +0 -220
  38. package/node_modules/pptx-viewer-core/dist/signature-node/index.d.mts +0 -177
  39. package/node_modules/pptx-viewer-core/dist/signature-node/index.d.ts +0 -177
  40. package/node_modules/pptx-viewer-core/dist/signature-node/index.js +0 -1206
  41. package/node_modules/pptx-viewer-core/dist/signature-node/index.mjs +0 -1143
  42. package/node_modules/pptx-viewer-core/dist/text-operations-DCTGMltY.d.mts +0 -134
  43. package/node_modules/pptx-viewer-core/dist/text-operations-DYmhoi7U.d.ts +0 -134
  44. package/node_modules/pptx-viewer-core/package.json +0 -96
@@ -1,134 +0,0 @@
1
- import { m as PptxData, l as PptxSlide } from './presentation-nZxgWvXq.mjs';
2
-
3
- /**
4
- * Presentation merge operations for the headless PPTX SDK.
5
- *
6
- * Merges slides from a source presentation into a target at the
7
- * {@link PptxData} level. Media embedded as data URLs (imageData,
8
- * mediaData, backgroundImage, posterFrameData) travel with elements
9
- * automatically — no ZIP-level copying is needed.
10
- *
11
- * @module sdk/merge-operations
12
- */
13
-
14
- /**
15
- * Options controlling how slides are merged from source into target.
16
- */
17
- interface MergeOptions {
18
- /** Which slides to take from source (0-based indices). Default: all */
19
- slideIndices?: number[];
20
- /** Where to insert in target (0-based). Default: end */
21
- insertAt?: number;
22
- /** Whether to keep source theme (false = use target theme). Default: false */
23
- keepSourceTheme?: boolean;
24
- }
25
- /**
26
- * Merge slides from a source presentation into a target.
27
- *
28
- * This is a data-level merge that operates on {@link PptxData} objects.
29
- * Slides are deep-cloned from the source, re-numbered to avoid ID
30
- * conflicts, and inserted into the target's slides array.
31
- *
32
- * Media embedded as data URLs (imageData, mediaData, backgroundImage,
33
- * posterFrameData) travel with the cloned elements automatically.
34
- *
35
- * @param targetData - The target presentation data (will be modified in place).
36
- * @param sourceData - The source presentation data (read-only — slides are cloned).
37
- * @param options - Merge configuration.
38
- * @returns Number of slides merged.
39
- *
40
- * @example
41
- * ```ts
42
- * const target = await handler.load(targetBuffer);
43
- * const source = await handler.load(sourceBuffer);
44
- *
45
- * const count = mergePresentation(target, source, {
46
- * slideIndices: [0, 2],
47
- * insertAt: 1,
48
- * });
49
- * console.log(`Merged ${count} slides`);
50
- * ```
51
- */
52
- declare function mergePresentation(targetData: PptxData, sourceData: PptxData, options?: MergeOptions): number;
53
-
54
- /**
55
- * Batch text find and replace operations for the headless PPTX SDK.
56
- *
57
- * Provides framework-agnostic pure functions for searching and
58
- * replacing text across all slides in a presentation, including
59
- * text in group children (recursively).
60
- *
61
- * @module sdk/text-operations
62
- */
63
-
64
- /**
65
- * A single text match result returned by {@link findText}.
66
- */
67
- interface FindResult {
68
- /** 0-based slide index. */
69
- slideIndex: number;
70
- /** ID of the element containing the match. */
71
- elementId: string;
72
- /** Index of the text segment within the element. */
73
- segmentIndex: number;
74
- /** The matched text. */
75
- text: string;
76
- /** Character offset within the segment where the match starts. */
77
- matchIndex: number;
78
- }
79
- /**
80
- * Search for text across all slides in the presentation.
81
- *
82
- * Searches through all text segments in all elements (including
83
- * group children recursively). Supports both plain string and
84
- * RegExp patterns.
85
- *
86
- * @param slides - Array of slides to search.
87
- * @param search - Plain string or RegExp to search for.
88
- * @returns Array of match results with location information.
89
- *
90
- * @example
91
- * ```ts
92
- * const results = findText(data.slides, /Q[1-4] \d{4}/);
93
- * console.log(`Found ${results.length} date references`);
94
- * ```
95
- */
96
- declare function findText(slides: PptxSlide[], search: string | RegExp): FindResult[];
97
- /**
98
- * Replace all occurrences of a search pattern in a single slide's elements.
99
- *
100
- * Mutates the slide's elements in place. Searches through all
101
- * text segments including group children recursively.
102
- *
103
- * @param slide - The slide to perform replacements on.
104
- * @param search - Plain string or RegExp to search for.
105
- * @param replacement - The replacement string (supports `$1`, `$&` etc. for RegExp).
106
- * @returns The number of replacements made.
107
- *
108
- * @example
109
- * ```ts
110
- * const count = replaceTextInSlide(data.slides[0], "2025", "2026");
111
- * console.log(`Updated ${count} occurrences on slide 1`);
112
- * ```
113
- */
114
- declare function replaceTextInSlide(slide: PptxSlide, search: string | RegExp, replacement: string): number;
115
- /**
116
- * Replace all occurrences of a search pattern across all slides.
117
- *
118
- * Mutates slides' elements in place. Searches through all text
119
- * segments including group children recursively.
120
- *
121
- * @param slides - Array of slides to perform replacements on.
122
- * @param search - Plain string or RegExp to search for.
123
- * @param replacement - The replacement string.
124
- * @returns The total number of replacements made across all slides.
125
- *
126
- * @example
127
- * ```ts
128
- * const count = replaceText(data.slides, "Acme Corp", "NewCo Inc");
129
- * console.log(`Rebranded ${count} occurrences`);
130
- * ```
131
- */
132
- declare function replaceText(slides: PptxSlide[], search: string | RegExp, replacement: string): number;
133
-
134
- export { type FindResult as F, type MergeOptions as M, replaceTextInSlide as a, findText as f, mergePresentation as m, replaceText as r };
@@ -1,134 +0,0 @@
1
- import { m as PptxData, l as PptxSlide } from './presentation-nZxgWvXq.js';
2
-
3
- /**
4
- * Presentation merge operations for the headless PPTX SDK.
5
- *
6
- * Merges slides from a source presentation into a target at the
7
- * {@link PptxData} level. Media embedded as data URLs (imageData,
8
- * mediaData, backgroundImage, posterFrameData) travel with elements
9
- * automatically — no ZIP-level copying is needed.
10
- *
11
- * @module sdk/merge-operations
12
- */
13
-
14
- /**
15
- * Options controlling how slides are merged from source into target.
16
- */
17
- interface MergeOptions {
18
- /** Which slides to take from source (0-based indices). Default: all */
19
- slideIndices?: number[];
20
- /** Where to insert in target (0-based). Default: end */
21
- insertAt?: number;
22
- /** Whether to keep source theme (false = use target theme). Default: false */
23
- keepSourceTheme?: boolean;
24
- }
25
- /**
26
- * Merge slides from a source presentation into a target.
27
- *
28
- * This is a data-level merge that operates on {@link PptxData} objects.
29
- * Slides are deep-cloned from the source, re-numbered to avoid ID
30
- * conflicts, and inserted into the target's slides array.
31
- *
32
- * Media embedded as data URLs (imageData, mediaData, backgroundImage,
33
- * posterFrameData) travel with the cloned elements automatically.
34
- *
35
- * @param targetData - The target presentation data (will be modified in place).
36
- * @param sourceData - The source presentation data (read-only — slides are cloned).
37
- * @param options - Merge configuration.
38
- * @returns Number of slides merged.
39
- *
40
- * @example
41
- * ```ts
42
- * const target = await handler.load(targetBuffer);
43
- * const source = await handler.load(sourceBuffer);
44
- *
45
- * const count = mergePresentation(target, source, {
46
- * slideIndices: [0, 2],
47
- * insertAt: 1,
48
- * });
49
- * console.log(`Merged ${count} slides`);
50
- * ```
51
- */
52
- declare function mergePresentation(targetData: PptxData, sourceData: PptxData, options?: MergeOptions): number;
53
-
54
- /**
55
- * Batch text find and replace operations for the headless PPTX SDK.
56
- *
57
- * Provides framework-agnostic pure functions for searching and
58
- * replacing text across all slides in a presentation, including
59
- * text in group children (recursively).
60
- *
61
- * @module sdk/text-operations
62
- */
63
-
64
- /**
65
- * A single text match result returned by {@link findText}.
66
- */
67
- interface FindResult {
68
- /** 0-based slide index. */
69
- slideIndex: number;
70
- /** ID of the element containing the match. */
71
- elementId: string;
72
- /** Index of the text segment within the element. */
73
- segmentIndex: number;
74
- /** The matched text. */
75
- text: string;
76
- /** Character offset within the segment where the match starts. */
77
- matchIndex: number;
78
- }
79
- /**
80
- * Search for text across all slides in the presentation.
81
- *
82
- * Searches through all text segments in all elements (including
83
- * group children recursively). Supports both plain string and
84
- * RegExp patterns.
85
- *
86
- * @param slides - Array of slides to search.
87
- * @param search - Plain string or RegExp to search for.
88
- * @returns Array of match results with location information.
89
- *
90
- * @example
91
- * ```ts
92
- * const results = findText(data.slides, /Q[1-4] \d{4}/);
93
- * console.log(`Found ${results.length} date references`);
94
- * ```
95
- */
96
- declare function findText(slides: PptxSlide[], search: string | RegExp): FindResult[];
97
- /**
98
- * Replace all occurrences of a search pattern in a single slide's elements.
99
- *
100
- * Mutates the slide's elements in place. Searches through all
101
- * text segments including group children recursively.
102
- *
103
- * @param slide - The slide to perform replacements on.
104
- * @param search - Plain string or RegExp to search for.
105
- * @param replacement - The replacement string (supports `$1`, `$&` etc. for RegExp).
106
- * @returns The number of replacements made.
107
- *
108
- * @example
109
- * ```ts
110
- * const count = replaceTextInSlide(data.slides[0], "2025", "2026");
111
- * console.log(`Updated ${count} occurrences on slide 1`);
112
- * ```
113
- */
114
- declare function replaceTextInSlide(slide: PptxSlide, search: string | RegExp, replacement: string): number;
115
- /**
116
- * Replace all occurrences of a search pattern across all slides.
117
- *
118
- * Mutates slides' elements in place. Searches through all text
119
- * segments including group children recursively.
120
- *
121
- * @param slides - Array of slides to perform replacements on.
122
- * @param search - Plain string or RegExp to search for.
123
- * @param replacement - The replacement string.
124
- * @returns The total number of replacements made across all slides.
125
- *
126
- * @example
127
- * ```ts
128
- * const count = replaceText(data.slides, "Acme Corp", "NewCo Inc");
129
- * console.log(`Rebranded ${count} occurrences`);
130
- * ```
131
- */
132
- declare function replaceText(slides: PptxSlide[], search: string | RegExp, replacement: string): number;
133
-
134
- export { type FindResult as F, type MergeOptions as M, replaceTextInSlide as a, findText as f, mergePresentation as m, replaceText as r };
@@ -1,96 +0,0 @@
1
- {
2
- "name": "pptx-viewer-core",
3
- "version": "1.4.0",
4
- "description": "Core PPTX engine — parse, edit, serialize, and convert PowerPoint files.",
5
- "keywords": [
6
- "converter",
7
- "markdown",
8
- "openxml",
9
- "parser",
10
- "powerpoint",
11
- "pptx",
12
- "sdk"
13
- ],
14
- "homepage": "https://github.com/ChristopherVR/pptx-viewer",
15
- "bugs": {
16
- "url": "https://github.com/ChristopherVR/pptx-viewer/issues"
17
- },
18
- "license": "MIT",
19
- "author": "ChristopherVR",
20
- "repository": {
21
- "type": "git",
22
- "url": "https://github.com/ChristopherVR/pptx-viewer.git",
23
- "directory": "packages/core"
24
- },
25
- "bin": {
26
- "pptx": "./dist/cli/index.mjs"
27
- },
28
- "files": [
29
- "dist/",
30
- "LICENSE",
31
- "NOTICE",
32
- "README.md"
33
- ],
34
- "main": "dist/index.mjs",
35
- "module": "dist/index.mjs",
36
- "types": "dist/index.d.ts",
37
- "exports": {
38
- ".": {
39
- "types": "./dist/index.d.ts",
40
- "import": "./dist/index.mjs",
41
- "require": "./dist/index.js"
42
- },
43
- "./converter": {
44
- "types": "./dist/converter/index.d.ts",
45
- "import": "./dist/converter/index.mjs",
46
- "require": "./dist/converter/index.js"
47
- },
48
- "./cli": {
49
- "types": "./dist/cli/index.d.ts",
50
- "import": "./dist/cli/index.mjs",
51
- "require": "./dist/cli/index.js"
52
- },
53
- "./signature-node": {
54
- "types": "./dist/signature-node/index.d.ts",
55
- "import": "./dist/signature-node/index.mjs",
56
- "require": "./dist/signature-node/index.js"
57
- }
58
- },
59
- "scripts": {
60
- "build": "tsup",
61
- "dev": "tsup --watch",
62
- "typecheck": "tsc --noEmit --pretty",
63
- "test": "vitest run",
64
- "test:watch": "vitest",
65
- "pack": "bun run build && bun pm pack"
66
- },
67
- "devDependencies": {
68
- "@types/node-forge": "^1.3.14",
69
- "@xmldom/xmldom": "^0.8.11",
70
- "emf-converter": "workspace:*",
71
- "mtx-decompressor": "workspace:*",
72
- "node-forge": "^1.4.0",
73
- "tsup": "^8.5.1",
74
- "typescript": "^5.9.3",
75
- "vitest": "^4.1.5",
76
- "xml-crypto": "^6.1.2"
77
- },
78
- "peerDependencies": {
79
- "@xmldom/xmldom": "^0.8.0",
80
- "fast-xml-parser": "^5.7.3",
81
- "jszip": "^3.10.1",
82
- "node-forge": "^1.3.0",
83
- "xml-crypto": "^6.0.0"
84
- },
85
- "peerDependenciesMeta": {
86
- "node-forge": {
87
- "optional": true
88
- },
89
- "xml-crypto": {
90
- "optional": true
91
- },
92
- "@xmldom/xmldom": {
93
- "optional": true
94
- }
95
- }
96
- }