pptx-react-viewer 1.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/README.md +982 -0
- package/dist/PowerPointViewer-K2URyPlJ.d.mts +522 -0
- package/dist/PowerPointViewer-K2URyPlJ.d.ts +522 -0
- package/dist/index.d.mts +71 -0
- package/dist/index.d.ts +71 -0
- package/dist/index.js +121771 -0
- package/dist/index.mjs +121737 -0
- package/dist/pptx-viewer.css +2 -0
- package/dist/viewer/index.d.mts +267 -0
- package/dist/viewer/index.d.ts +267 -0
- package/dist/viewer/index.js +121947 -0
- package/dist/viewer/index.mjs +121908 -0
- package/node_modules/emf-converter/README.md +629 -0
- package/node_modules/emf-converter/dist/index.d.mts +86 -0
- package/node_modules/emf-converter/dist/index.d.ts +86 -0
- package/node_modules/emf-converter/dist/index.js +4199 -0
- package/node_modules/emf-converter/dist/index.mjs +4195 -0
- package/node_modules/emf-converter/package.json +42 -0
- package/node_modules/mtx-decompressor/README.md +271 -0
- package/node_modules/mtx-decompressor/dist/index.d.mts +83 -0
- package/node_modules/mtx-decompressor/dist/index.d.ts +83 -0
- package/node_modules/mtx-decompressor/dist/index.js +1510 -0
- package/node_modules/mtx-decompressor/dist/index.mjs +1506 -0
- package/node_modules/mtx-decompressor/package.json +37 -0
- package/node_modules/pptx-viewer-core/README.md +1294 -0
- package/node_modules/pptx-viewer-core/dist/SvgExporter-BZJguJbp.d.ts +557 -0
- package/node_modules/pptx-viewer-core/dist/SvgExporter-DqcmwxFu.d.mts +557 -0
- package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +150 -0
- package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +150 -0
- package/node_modules/pptx-viewer-core/dist/cli/index.js +39790 -0
- package/node_modules/pptx-viewer-core/dist/cli/index.mjs +39757 -0
- package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +48 -0
- package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +48 -0
- package/node_modules/pptx-viewer-core/dist/converter/index.js +3676 -0
- package/node_modules/pptx-viewer-core/dist/converter/index.mjs +3664 -0
- package/node_modules/pptx-viewer-core/dist/index.d.mts +10796 -0
- package/node_modules/pptx-viewer-core/dist/index.d.ts +10796 -0
- package/node_modules/pptx-viewer-core/dist/index.js +49658 -0
- package/node_modules/pptx-viewer-core/dist/index.mjs +49270 -0
- package/node_modules/pptx-viewer-core/dist/presentation-Bo7cMMCe.d.mts +4558 -0
- package/node_modules/pptx-viewer-core/dist/presentation-Bo7cMMCe.d.ts +4558 -0
- package/node_modules/pptx-viewer-core/dist/text-operations-Bo-WG-Z8.d.mts +134 -0
- package/node_modules/pptx-viewer-core/dist/text-operations-D0f1jred.d.ts +134 -0
- package/node_modules/pptx-viewer-core/package.json +61 -0
- package/package.json +89 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { F as FindResult, M as MergeOptions } from '../text-operations-Bo-WG-Z8.mjs';
|
|
3
|
+
import '../presentation-Bo7cMMCe.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* CLI command handlers for pptx-cli.
|
|
7
|
+
*
|
|
8
|
+
* Each handler is a standalone async function that accepts parsed
|
|
9
|
+
* arguments and returns a result object. This separation from the
|
|
10
|
+
* CLI entry-point allows programmatic reuse and testability.
|
|
11
|
+
*
|
|
12
|
+
* @module cli/commands
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/** Result from the `info` command. */
|
|
16
|
+
interface InfoResult {
|
|
17
|
+
slideCount: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
widthEmu?: number;
|
|
21
|
+
heightEmu?: number;
|
|
22
|
+
slideSizeType?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
creator?: string;
|
|
25
|
+
subject?: string;
|
|
26
|
+
themeName?: string;
|
|
27
|
+
majorFont?: string;
|
|
28
|
+
minorFont?: string;
|
|
29
|
+
layoutCount: number;
|
|
30
|
+
layouts: string[];
|
|
31
|
+
sectionCount: number;
|
|
32
|
+
sections: string[];
|
|
33
|
+
hasMacros: boolean;
|
|
34
|
+
hasDigitalSignatures: boolean;
|
|
35
|
+
embeddedFontCount: number;
|
|
36
|
+
customShowCount: number;
|
|
37
|
+
totalElements: number;
|
|
38
|
+
hiddenSlideCount: number;
|
|
39
|
+
notesCount: number;
|
|
40
|
+
commentCount: number;
|
|
41
|
+
}
|
|
42
|
+
/** Result from the `export-svg` command. */
|
|
43
|
+
interface ExportSvgResult {
|
|
44
|
+
slideCount: number;
|
|
45
|
+
svgs: string[];
|
|
46
|
+
}
|
|
47
|
+
/** Result from the `export-md` command. */
|
|
48
|
+
interface ExportMdResult {
|
|
49
|
+
markdown: string;
|
|
50
|
+
slideCount: number;
|
|
51
|
+
}
|
|
52
|
+
/** Result from the `merge` command. */
|
|
53
|
+
interface MergeResult {
|
|
54
|
+
mergedSlideCount: number;
|
|
55
|
+
totalSlideCount: number;
|
|
56
|
+
outputBytes: Uint8Array;
|
|
57
|
+
}
|
|
58
|
+
/** Result from the `find` command. */
|
|
59
|
+
interface FindCommandResult {
|
|
60
|
+
matches: FindResult[];
|
|
61
|
+
totalCount: number;
|
|
62
|
+
}
|
|
63
|
+
/** Result from the `replace` command. */
|
|
64
|
+
interface ReplaceResult {
|
|
65
|
+
replacementCount: number;
|
|
66
|
+
outputBytes: Uint8Array;
|
|
67
|
+
}
|
|
68
|
+
/** Result from the `create` command. */
|
|
69
|
+
interface CreateResult {
|
|
70
|
+
outputBytes: Uint8Array;
|
|
71
|
+
slideCount: number;
|
|
72
|
+
}
|
|
73
|
+
/** A single slide's diff entry. */
|
|
74
|
+
interface SlideDiffEntry {
|
|
75
|
+
slideNumber: number;
|
|
76
|
+
status: 'added' | 'removed' | 'modified' | 'unchanged';
|
|
77
|
+
elementCountA?: number;
|
|
78
|
+
elementCountB?: number;
|
|
79
|
+
textDifferences?: string[];
|
|
80
|
+
}
|
|
81
|
+
/** Result from the `diff` command. */
|
|
82
|
+
interface DiffResult {
|
|
83
|
+
slideCountA: number;
|
|
84
|
+
slideCountB: number;
|
|
85
|
+
dimensionsMatch: boolean;
|
|
86
|
+
themeMatch: boolean;
|
|
87
|
+
slideDiffs: SlideDiffEntry[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Show presentation info (slides, dimensions, theme, metadata).
|
|
91
|
+
*/
|
|
92
|
+
declare function handleInfo(bytes: Uint8Array): Promise<InfoResult>;
|
|
93
|
+
/**
|
|
94
|
+
* Export all slides as SVG strings.
|
|
95
|
+
*/
|
|
96
|
+
declare function handleExportSvg(bytes: Uint8Array, options?: {
|
|
97
|
+
slideIndices?: number[];
|
|
98
|
+
includeHidden?: boolean;
|
|
99
|
+
}): Promise<ExportSvgResult>;
|
|
100
|
+
/**
|
|
101
|
+
* Export presentation to Markdown.
|
|
102
|
+
*/
|
|
103
|
+
declare function handleExportMd(bytes: Uint8Array, options?: {
|
|
104
|
+
sourceName?: string;
|
|
105
|
+
includeSpeakerNotes?: boolean;
|
|
106
|
+
semanticMode?: boolean;
|
|
107
|
+
slideRange?: {
|
|
108
|
+
start?: number;
|
|
109
|
+
end?: number;
|
|
110
|
+
};
|
|
111
|
+
}): Promise<ExportMdResult>;
|
|
112
|
+
/**
|
|
113
|
+
* Merge two presentations.
|
|
114
|
+
*/
|
|
115
|
+
declare function handleMerge(targetBytes: Uint8Array, sourceBytes: Uint8Array, options?: MergeOptions): Promise<MergeResult>;
|
|
116
|
+
/**
|
|
117
|
+
* Find text in a presentation.
|
|
118
|
+
*/
|
|
119
|
+
declare function handleFind(bytes: Uint8Array, search: string, options?: {
|
|
120
|
+
caseSensitive?: boolean;
|
|
121
|
+
}): Promise<FindCommandResult>;
|
|
122
|
+
/**
|
|
123
|
+
* Replace text in a presentation and return the modified bytes.
|
|
124
|
+
*/
|
|
125
|
+
declare function handleReplace(bytes: Uint8Array, search: string, replacement: string, options?: {
|
|
126
|
+
caseSensitive?: boolean;
|
|
127
|
+
}): Promise<ReplaceResult>;
|
|
128
|
+
/**
|
|
129
|
+
* Create a new blank presentation.
|
|
130
|
+
*/
|
|
131
|
+
declare function handleCreate(options?: {
|
|
132
|
+
title?: string;
|
|
133
|
+
creator?: string;
|
|
134
|
+
theme?: {
|
|
135
|
+
name?: string;
|
|
136
|
+
colors?: Record<string, string>;
|
|
137
|
+
fonts?: {
|
|
138
|
+
majorFont?: string;
|
|
139
|
+
minorFont?: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
width?: number;
|
|
143
|
+
height?: number;
|
|
144
|
+
}): Promise<CreateResult>;
|
|
145
|
+
/**
|
|
146
|
+
* Compare two presentations and return a diff summary.
|
|
147
|
+
*/
|
|
148
|
+
declare function handleDiff(bytesA: Uint8Array, bytesB: Uint8Array): Promise<DiffResult>;
|
|
149
|
+
|
|
150
|
+
export { type CreateResult, type DiffResult, type ExportMdResult, type ExportSvgResult, type FindCommandResult, type InfoResult, type MergeResult, type ReplaceResult, type SlideDiffEntry, handleCreate, handleDiff, handleExportMd, handleExportSvg, handleFind, handleInfo, handleMerge, handleReplace };
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { F as FindResult, M as MergeOptions } from '../text-operations-D0f1jred.js';
|
|
3
|
+
import '../presentation-Bo7cMMCe.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* CLI command handlers for pptx-cli.
|
|
7
|
+
*
|
|
8
|
+
* Each handler is a standalone async function that accepts parsed
|
|
9
|
+
* arguments and returns a result object. This separation from the
|
|
10
|
+
* CLI entry-point allows programmatic reuse and testability.
|
|
11
|
+
*
|
|
12
|
+
* @module cli/commands
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/** Result from the `info` command. */
|
|
16
|
+
interface InfoResult {
|
|
17
|
+
slideCount: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
widthEmu?: number;
|
|
21
|
+
heightEmu?: number;
|
|
22
|
+
slideSizeType?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
creator?: string;
|
|
25
|
+
subject?: string;
|
|
26
|
+
themeName?: string;
|
|
27
|
+
majorFont?: string;
|
|
28
|
+
minorFont?: string;
|
|
29
|
+
layoutCount: number;
|
|
30
|
+
layouts: string[];
|
|
31
|
+
sectionCount: number;
|
|
32
|
+
sections: string[];
|
|
33
|
+
hasMacros: boolean;
|
|
34
|
+
hasDigitalSignatures: boolean;
|
|
35
|
+
embeddedFontCount: number;
|
|
36
|
+
customShowCount: number;
|
|
37
|
+
totalElements: number;
|
|
38
|
+
hiddenSlideCount: number;
|
|
39
|
+
notesCount: number;
|
|
40
|
+
commentCount: number;
|
|
41
|
+
}
|
|
42
|
+
/** Result from the `export-svg` command. */
|
|
43
|
+
interface ExportSvgResult {
|
|
44
|
+
slideCount: number;
|
|
45
|
+
svgs: string[];
|
|
46
|
+
}
|
|
47
|
+
/** Result from the `export-md` command. */
|
|
48
|
+
interface ExportMdResult {
|
|
49
|
+
markdown: string;
|
|
50
|
+
slideCount: number;
|
|
51
|
+
}
|
|
52
|
+
/** Result from the `merge` command. */
|
|
53
|
+
interface MergeResult {
|
|
54
|
+
mergedSlideCount: number;
|
|
55
|
+
totalSlideCount: number;
|
|
56
|
+
outputBytes: Uint8Array;
|
|
57
|
+
}
|
|
58
|
+
/** Result from the `find` command. */
|
|
59
|
+
interface FindCommandResult {
|
|
60
|
+
matches: FindResult[];
|
|
61
|
+
totalCount: number;
|
|
62
|
+
}
|
|
63
|
+
/** Result from the `replace` command. */
|
|
64
|
+
interface ReplaceResult {
|
|
65
|
+
replacementCount: number;
|
|
66
|
+
outputBytes: Uint8Array;
|
|
67
|
+
}
|
|
68
|
+
/** Result from the `create` command. */
|
|
69
|
+
interface CreateResult {
|
|
70
|
+
outputBytes: Uint8Array;
|
|
71
|
+
slideCount: number;
|
|
72
|
+
}
|
|
73
|
+
/** A single slide's diff entry. */
|
|
74
|
+
interface SlideDiffEntry {
|
|
75
|
+
slideNumber: number;
|
|
76
|
+
status: 'added' | 'removed' | 'modified' | 'unchanged';
|
|
77
|
+
elementCountA?: number;
|
|
78
|
+
elementCountB?: number;
|
|
79
|
+
textDifferences?: string[];
|
|
80
|
+
}
|
|
81
|
+
/** Result from the `diff` command. */
|
|
82
|
+
interface DiffResult {
|
|
83
|
+
slideCountA: number;
|
|
84
|
+
slideCountB: number;
|
|
85
|
+
dimensionsMatch: boolean;
|
|
86
|
+
themeMatch: boolean;
|
|
87
|
+
slideDiffs: SlideDiffEntry[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Show presentation info (slides, dimensions, theme, metadata).
|
|
91
|
+
*/
|
|
92
|
+
declare function handleInfo(bytes: Uint8Array): Promise<InfoResult>;
|
|
93
|
+
/**
|
|
94
|
+
* Export all slides as SVG strings.
|
|
95
|
+
*/
|
|
96
|
+
declare function handleExportSvg(bytes: Uint8Array, options?: {
|
|
97
|
+
slideIndices?: number[];
|
|
98
|
+
includeHidden?: boolean;
|
|
99
|
+
}): Promise<ExportSvgResult>;
|
|
100
|
+
/**
|
|
101
|
+
* Export presentation to Markdown.
|
|
102
|
+
*/
|
|
103
|
+
declare function handleExportMd(bytes: Uint8Array, options?: {
|
|
104
|
+
sourceName?: string;
|
|
105
|
+
includeSpeakerNotes?: boolean;
|
|
106
|
+
semanticMode?: boolean;
|
|
107
|
+
slideRange?: {
|
|
108
|
+
start?: number;
|
|
109
|
+
end?: number;
|
|
110
|
+
};
|
|
111
|
+
}): Promise<ExportMdResult>;
|
|
112
|
+
/**
|
|
113
|
+
* Merge two presentations.
|
|
114
|
+
*/
|
|
115
|
+
declare function handleMerge(targetBytes: Uint8Array, sourceBytes: Uint8Array, options?: MergeOptions): Promise<MergeResult>;
|
|
116
|
+
/**
|
|
117
|
+
* Find text in a presentation.
|
|
118
|
+
*/
|
|
119
|
+
declare function handleFind(bytes: Uint8Array, search: string, options?: {
|
|
120
|
+
caseSensitive?: boolean;
|
|
121
|
+
}): Promise<FindCommandResult>;
|
|
122
|
+
/**
|
|
123
|
+
* Replace text in a presentation and return the modified bytes.
|
|
124
|
+
*/
|
|
125
|
+
declare function handleReplace(bytes: Uint8Array, search: string, replacement: string, options?: {
|
|
126
|
+
caseSensitive?: boolean;
|
|
127
|
+
}): Promise<ReplaceResult>;
|
|
128
|
+
/**
|
|
129
|
+
* Create a new blank presentation.
|
|
130
|
+
*/
|
|
131
|
+
declare function handleCreate(options?: {
|
|
132
|
+
title?: string;
|
|
133
|
+
creator?: string;
|
|
134
|
+
theme?: {
|
|
135
|
+
name?: string;
|
|
136
|
+
colors?: Record<string, string>;
|
|
137
|
+
fonts?: {
|
|
138
|
+
majorFont?: string;
|
|
139
|
+
minorFont?: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
width?: number;
|
|
143
|
+
height?: number;
|
|
144
|
+
}): Promise<CreateResult>;
|
|
145
|
+
/**
|
|
146
|
+
* Compare two presentations and return a diff summary.
|
|
147
|
+
*/
|
|
148
|
+
declare function handleDiff(bytesA: Uint8Array, bytesB: Uint8Array): Promise<DiffResult>;
|
|
149
|
+
|
|
150
|
+
export { type CreateResult, type DiffResult, type ExportMdResult, type ExportSvgResult, type FindCommandResult, type InfoResult, type MergeResult, type ReplaceResult, type SlideDiffEntry, handleCreate, handleDiff, handleExportMd, handleExportSvg, handleFind, handleInfo, handleMerge, handleReplace };
|