pptx-viewer-mcp 1.2.1 → 1.2.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.
- package/CHANGELOG.md +2 -0
- package/dist/codec/index.d.ts +18 -17
- package/dist/codec/index.d.ts.map +1 -0
- package/dist/index.d.ts +584 -563
- package/dist/index.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +1 -1
- package/dist/schemas/index.d.ts +499 -483
- package/dist/schemas/index.d.ts.map +1 -0
- package/package.json +5 -4
- package/dist/codec/index.d.mts +0 -57
- package/dist/index.d.mts +0 -862
- package/dist/mcp/index.d.mts +0 -1
- package/dist/schemas/index.d.mts +0 -576
package/dist/index.d.ts
CHANGED
|
@@ -1,48 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Doc } from "yjs";
|
|
2
|
+
import { ChartAxisEdit, PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxData, PptxData as PptxData$1, PptxData as PptxData$2, PptxElement, PptxElement as PptxElement$1, PptxHandler, PptxPresentationProperties, PptxSlide, PptxSlide as PptxSlide$1, PptxThemeColorScheme, PptxThemeFontScheme, PresentationDiff, ShapeStyle } from "pptx-viewer-core";
|
|
3
|
+
//#region src/types.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Platform-agnostic context passed to every tool function.
|
|
7
6
|
* No Electron, no RoomManager, no framework dependencies.
|
|
8
7
|
*/
|
|
9
8
|
interface ToolContext {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
/** Current presentation data (parsed PptxData from pptx-viewer-core). */
|
|
10
|
+
pptxData: PptxData$2;
|
|
11
|
+
/** Optional: resolve external image paths to binary data. */
|
|
12
|
+
resolveImage?: (path: string) => Promise<Uint8Array>;
|
|
13
|
+
/** Optional: resolve external media paths to binary data. */
|
|
14
|
+
resolveMedia?: (path: string) => Promise<Uint8Array>;
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
17
|
* Every tool function returns this.
|
|
19
18
|
* The consumer decides what to do with the mutated pptxData.
|
|
20
19
|
*/
|
|
21
20
|
interface ToolResult<T = unknown> {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
21
|
+
/** The (potentially mutated) presentation data. */
|
|
22
|
+
pptxData: PptxData$2;
|
|
23
|
+
/** Tool-specific return value (e.g., slide info, element ID, search results). */
|
|
24
|
+
result: T;
|
|
25
|
+
/** Whether pptxData was modified (signals need to save). */
|
|
26
|
+
dirty: boolean;
|
|
27
|
+
}
|
|
30
28
|
/**
|
|
31
29
|
* Abstraction for Y.Doc room management.
|
|
32
30
|
* fz-electron implements this with RoomManager.
|
|
33
31
|
*/
|
|
34
32
|
interface CollaborationProvider {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
/** Get an active collaboration room for a file path, or null. */
|
|
34
|
+
getRoom(filePath: string): {
|
|
35
|
+
ydoc: Doc;
|
|
36
|
+
} | null;
|
|
37
|
+
/** Get the format codec for a file path, or null. */
|
|
38
|
+
getCodec(filePath: string): {
|
|
39
|
+
hydrate(ydoc: Doc, bytes: Uint8Array, origin?: string): Promise<void>;
|
|
40
|
+
dehydrate(ydoc: Doc): Promise<Uint8Array>;
|
|
41
|
+
} | null;
|
|
42
|
+
/** Create an agent origin tag for undo isolation. */
|
|
43
|
+
agentOrigin(name: string): string;
|
|
46
44
|
}
|
|
47
45
|
/**
|
|
48
46
|
* Abstraction for file system access.
|
|
@@ -50,757 +48,777 @@ interface CollaborationProvider {
|
|
|
50
48
|
* MCP server implements this with node:fs.
|
|
51
49
|
*/
|
|
52
50
|
interface FileSystemProvider {
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
readFile(path: string): Promise<Uint8Array>;
|
|
52
|
+
writeFile(path: string, data: Uint8Array): Promise<void>;
|
|
55
53
|
}
|
|
56
54
|
/**
|
|
57
55
|
* Abstraction for updating an open file viewer.
|
|
58
56
|
* Only fz-electron implements this.
|
|
59
57
|
*/
|
|
60
58
|
interface ViewerProvider {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
replaceContent(filePath: string, bytes: Uint8Array, options: {
|
|
60
|
+
markDirty: boolean;
|
|
61
|
+
mimeType?: string;
|
|
62
|
+
}): void;
|
|
63
|
+
openFile(filePath: string): Promise<void>;
|
|
66
64
|
}
|
|
67
65
|
/**
|
|
68
66
|
* Full execution context for running tools with collaboration support.
|
|
69
67
|
*/
|
|
70
68
|
interface ExecutionContext {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
69
|
+
/** File system for reading/writing PPTX files. */
|
|
70
|
+
filesystem: FileSystemProvider;
|
|
71
|
+
/** Optional collaboration provider for Y.Doc routing. */
|
|
72
|
+
collaboration?: CollaborationProvider;
|
|
73
|
+
/** Optional viewer integration for live document updates. */
|
|
74
|
+
viewer?: ViewerProvider;
|
|
75
|
+
/** Agent name for collaboration origin tracking. */
|
|
76
|
+
agentName?: string;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/execution.d.ts
|
|
81
80
|
/**
|
|
82
81
|
* Load PptxData from a file, checking collaboration rooms first.
|
|
83
82
|
* If a Y.Doc room is active the current in-memory state is dehydrated
|
|
84
83
|
* so that unsaved edits are included in the tool's view of the document.
|
|
85
84
|
*/
|
|
86
85
|
declare function loadPresentation(filePath: string, execCtx: ExecutionContext): Promise<{
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
pptxData: PptxData$1;
|
|
87
|
+
rawBytes: Uint8Array;
|
|
89
88
|
}>;
|
|
90
89
|
/**
|
|
91
90
|
* Save mutated PptxData back: routes through collaboration Y.Doc or disk.
|
|
92
91
|
*/
|
|
93
|
-
declare function savePresentation(filePath: string, pptxData: PptxData, rawBytes: Uint8Array, execCtx: ExecutionContext): Promise<{
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
declare function savePresentation(filePath: string, pptxData: PptxData$1, rawBytes: Uint8Array, execCtx: ExecutionContext): Promise<{
|
|
93
|
+
savedToDisk: boolean;
|
|
94
|
+
routedThroughCollaboration: boolean;
|
|
96
95
|
}>;
|
|
97
96
|
/**
|
|
98
97
|
* Execute a pure tool function with full collaboration-aware load/save pipeline.
|
|
99
98
|
* Handles dehydrate-from-room → tool → hydrate-back-to-room routing automatically.
|
|
100
99
|
*/
|
|
101
100
|
declare function executeToolWithContext<T>(filePath: string, execCtx: ExecutionContext, toolFn: (ctx: ToolContext) => ToolResult<T> | Promise<ToolResult<T>>): Promise<T & {
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
savedToDisk?: boolean;
|
|
102
|
+
routedThroughCollaboration?: boolean;
|
|
104
103
|
}>;
|
|
105
|
-
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/tools/slide-tools.d.ts
|
|
106
106
|
interface GetSlideResult {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
107
|
+
slideIndex: number;
|
|
108
|
+
slideNumber: number;
|
|
109
|
+
hidden: boolean;
|
|
110
|
+
layoutName?: string;
|
|
111
|
+
backgroundColor?: string;
|
|
112
|
+
notes: string;
|
|
113
|
+
commentCount: number;
|
|
114
|
+
elements: Record<string, unknown>[];
|
|
115
115
|
}
|
|
116
116
|
declare function getSlide(ctx: ToolContext, params: {
|
|
117
|
-
|
|
117
|
+
slideIndex: number;
|
|
118
118
|
}): ToolResult<GetSlideResult>;
|
|
119
119
|
interface AddSlideParams {
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
insertAfterIndex?: number;
|
|
121
|
+
backgroundColor?: string;
|
|
122
122
|
}
|
|
123
123
|
interface AddSlideResult {
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
newSlideIndex: number;
|
|
125
|
+
slideCount: number;
|
|
126
126
|
}
|
|
127
127
|
declare function addSlide(ctx: ToolContext, params: AddSlideParams): ToolResult<AddSlideResult>;
|
|
128
128
|
interface DeleteSlidesParams {
|
|
129
|
-
|
|
129
|
+
slideIndexes: number[];
|
|
130
130
|
}
|
|
131
131
|
interface DeleteSlidesResult {
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
deletedCount: number;
|
|
133
|
+
slideCount: number;
|
|
134
134
|
}
|
|
135
135
|
declare function deleteSlides(ctx: ToolContext, params: DeleteSlidesParams): ToolResult<DeleteSlidesResult>;
|
|
136
136
|
interface ReorderSlidesParams {
|
|
137
|
-
|
|
137
|
+
newOrder: number[];
|
|
138
138
|
}
|
|
139
139
|
declare function reorderSlides(ctx: ToolContext, params: ReorderSlidesParams): ToolResult<{
|
|
140
|
-
|
|
140
|
+
slideCount: number;
|
|
141
141
|
}>;
|
|
142
142
|
interface DuplicateSlideParams {
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
slideIndex: number;
|
|
144
|
+
targetIndex?: number;
|
|
145
145
|
}
|
|
146
146
|
declare function duplicateSlide(ctx: ToolContext, params: DuplicateSlideParams): ToolResult<{
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
newSlideIndex: number;
|
|
148
|
+
slideCount: number;
|
|
149
149
|
}>;
|
|
150
150
|
interface UpdateSlidePropertiesParams {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
151
|
+
slideIndex: number;
|
|
152
|
+
backgroundColor?: string;
|
|
153
|
+
backgroundGradient?: string;
|
|
154
|
+
backgroundImage?: string;
|
|
155
|
+
notes?: string;
|
|
156
|
+
hidden?: boolean;
|
|
157
157
|
}
|
|
158
158
|
declare function updateSlideProperties(ctx: ToolContext, params: UpdateSlidePropertiesParams): ToolResult<{
|
|
159
|
-
|
|
159
|
+
slideIndex: number;
|
|
160
160
|
}>;
|
|
161
161
|
interface SetSlideTransitionParams {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
162
|
+
slideIndex: number;
|
|
163
|
+
type: string;
|
|
164
|
+
durationMs?: number;
|
|
165
|
+
direction?: string;
|
|
166
|
+
advanceOnClick?: boolean;
|
|
167
|
+
advanceAfterMs?: number;
|
|
168
168
|
}
|
|
169
169
|
declare function setSlideTransition(ctx: ToolContext, params: SetSlideTransitionParams): ToolResult<{
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
slideIndex: number;
|
|
171
|
+
transitionType: string;
|
|
172
172
|
}>;
|
|
173
173
|
interface SetCanvasSizeParams {
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
width: number;
|
|
175
|
+
height: number;
|
|
176
176
|
}
|
|
177
177
|
declare function setCanvasSize(ctx: ToolContext, params: SetCanvasSizeParams): ToolResult<{
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
canvasWidth: number;
|
|
179
|
+
canvasHeight: number;
|
|
180
180
|
}>;
|
|
181
|
-
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/tools/helpers.d.ts
|
|
182
183
|
declare function generateElementId(): string;
|
|
183
184
|
declare function generateSlideId(): string;
|
|
184
185
|
/** Build a concise text representation of a slide element for tool output. */
|
|
185
|
-
declare function describeElement(el: PptxElement): Record<string, unknown>;
|
|
186
|
+
declare function describeElement(el: PptxElement$1): Record<string, unknown>;
|
|
186
187
|
/** Extract text from a slide's elements for search purposes. */
|
|
187
|
-
declare function extractSlideText(slide: PptxSlide): string;
|
|
188
|
+
declare function extractSlideText(slide: PptxSlide$1): string;
|
|
188
189
|
/** Validate slideIndex is within range, return error string or null. */
|
|
189
190
|
declare function validateSlideIndex(slideIndex: number, slideCount: number): string | null;
|
|
190
|
-
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/tools/element-tools.d.ts
|
|
191
193
|
interface AddElementParams {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
194
|
+
slideIndex: number;
|
|
195
|
+
type: 'text' | 'shape' | 'image' | 'table' | 'connector';
|
|
196
|
+
x?: number;
|
|
197
|
+
y?: number;
|
|
198
|
+
width?: number;
|
|
199
|
+
height?: number;
|
|
200
|
+
text?: string;
|
|
201
|
+
fontSize?: number;
|
|
202
|
+
fontFamily?: string;
|
|
203
|
+
fontColor?: string;
|
|
204
|
+
bold?: boolean;
|
|
205
|
+
italic?: boolean;
|
|
206
|
+
underline?: boolean;
|
|
207
|
+
alignment?: 'left' | 'center' | 'right' | 'justify';
|
|
208
|
+
shapeType?: string;
|
|
209
|
+
fillColor?: string;
|
|
210
|
+
strokeColor?: string;
|
|
211
|
+
strokeWidth?: number;
|
|
212
|
+
imageData?: string;
|
|
213
|
+
altText?: string;
|
|
214
|
+
rows?: number;
|
|
215
|
+
columns?: number;
|
|
216
|
+
cellData?: string[][];
|
|
217
|
+
headerRow?: boolean;
|
|
218
|
+
startArrow?: string;
|
|
219
|
+
endArrow?: string;
|
|
220
|
+
startShapeId?: string;
|
|
221
|
+
endShapeId?: string;
|
|
220
222
|
}
|
|
221
223
|
interface AddElementResult {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
+
elementId: string;
|
|
225
|
+
slideIndex: number;
|
|
224
226
|
}
|
|
225
227
|
declare function addElement(ctx: ToolContext, params: AddElementParams): ToolResult<AddElementResult>;
|
|
226
228
|
interface UpdateElementParams {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
229
|
+
slideIndex: number;
|
|
230
|
+
elementId: string;
|
|
231
|
+
x?: number;
|
|
232
|
+
y?: number;
|
|
233
|
+
width?: number;
|
|
234
|
+
height?: number;
|
|
235
|
+
rotation?: number;
|
|
236
|
+
text?: string;
|
|
237
|
+
fontSize?: number;
|
|
238
|
+
fontFamily?: string;
|
|
239
|
+
fontColor?: string;
|
|
240
|
+
bold?: boolean;
|
|
241
|
+
italic?: boolean;
|
|
242
|
+
underline?: boolean;
|
|
243
|
+
alignment?: 'left' | 'center' | 'right' | 'justify';
|
|
244
|
+
fillColor?: string;
|
|
245
|
+
strokeColor?: string;
|
|
246
|
+
strokeWidth?: number;
|
|
247
|
+
opacity?: number;
|
|
248
|
+
hidden?: boolean;
|
|
249
|
+
flipH?: boolean;
|
|
250
|
+
flipV?: boolean;
|
|
249
251
|
}
|
|
250
252
|
declare function updateElement(ctx: ToolContext, params: UpdateElementParams): ToolResult<{
|
|
251
|
-
|
|
253
|
+
elementId: string;
|
|
252
254
|
}>;
|
|
253
255
|
interface DeleteElementsParams {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
+
slideIndex: number;
|
|
257
|
+
elementIds: string[];
|
|
256
258
|
}
|
|
257
259
|
declare function deleteElements(ctx: ToolContext, params: DeleteElementsParams): ToolResult<{
|
|
258
|
-
|
|
260
|
+
deletedCount: number;
|
|
259
261
|
}>;
|
|
260
262
|
interface ArrangeElementsParams {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
263
|
+
slideIndex: number;
|
|
264
|
+
action: 'align' | 'reorderLayer';
|
|
265
|
+
elementIds?: string[];
|
|
266
|
+
alignment?: 'left' | 'right' | 'top' | 'bottom' | 'centerH' | 'centerV';
|
|
267
|
+
elementId?: string;
|
|
268
|
+
layerAction?: 'bringToFront' | 'sendToBack' | 'bringForward' | 'sendBackward';
|
|
267
269
|
}
|
|
268
270
|
declare function arrangeElements(ctx: ToolContext, params: ArrangeElementsParams): ToolResult<{
|
|
269
|
-
|
|
271
|
+
slideIndex: number;
|
|
270
272
|
}>;
|
|
271
273
|
interface CloneElementParams {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
slideIndex: number;
|
|
275
|
+
elementId: string;
|
|
276
|
+
targetSlideIndexes?: number[];
|
|
277
|
+
offsetX?: number;
|
|
278
|
+
offsetY?: number;
|
|
277
279
|
}
|
|
278
280
|
interface CloneElementResult {
|
|
279
|
-
|
|
281
|
+
clonedIds: string[];
|
|
280
282
|
}
|
|
281
283
|
declare function cloneElement(ctx: ToolContext, params: CloneElementParams): ToolResult<CloneElementResult>;
|
|
282
284
|
interface SetElementAnimationParams {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
285
|
+
slideIndex: number;
|
|
286
|
+
elementId: string;
|
|
287
|
+
entrance?: string;
|
|
288
|
+
exit?: string;
|
|
289
|
+
durationMs?: number;
|
|
290
|
+
delayMs?: number;
|
|
291
|
+
order?: number;
|
|
290
292
|
}
|
|
291
293
|
declare function setElementAnimation(ctx: ToolContext, params: SetElementAnimationParams): ToolResult<{
|
|
292
|
-
|
|
294
|
+
elementId: string;
|
|
293
295
|
}>;
|
|
294
296
|
interface GroupElementsParams {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
+
slideIndex: number;
|
|
298
|
+
elementIds: string[];
|
|
297
299
|
}
|
|
298
300
|
interface GroupElementsResult {
|
|
299
|
-
|
|
301
|
+
groupId: string;
|
|
300
302
|
}
|
|
301
303
|
declare function groupElements(ctx: ToolContext, params: GroupElementsParams): ToolResult<GroupElementsResult>;
|
|
302
304
|
interface UngroupElementsParams {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
+
slideIndex: number;
|
|
306
|
+
groupElementId: string;
|
|
305
307
|
}
|
|
306
308
|
interface UngroupElementsResult {
|
|
307
|
-
|
|
309
|
+
restoredIds: string[];
|
|
308
310
|
}
|
|
309
311
|
declare function ungroupElements(ctx: ToolContext, params: UngroupElementsParams): ToolResult<UngroupElementsResult>;
|
|
310
312
|
interface BatchUpdateElementsParams {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
313
|
+
slideIndex: number;
|
|
314
|
+
elementIds: string[];
|
|
315
|
+
x?: number;
|
|
316
|
+
y?: number;
|
|
317
|
+
width?: number;
|
|
318
|
+
height?: number;
|
|
319
|
+
rotation?: number;
|
|
320
|
+
opacity?: number;
|
|
321
|
+
hidden?: boolean;
|
|
320
322
|
}
|
|
321
323
|
declare function batchUpdateElements(ctx: ToolContext, params: BatchUpdateElementsParams): ToolResult<{
|
|
322
|
-
|
|
324
|
+
updatedCount: number;
|
|
323
325
|
}>;
|
|
324
|
-
|
|
326
|
+
//#endregion
|
|
327
|
+
//#region src/tools/table-tools.d.ts
|
|
325
328
|
interface UpdateTableCellsParams {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
329
|
+
slideIndex: number;
|
|
330
|
+
elementId: string;
|
|
331
|
+
cells: Array<{
|
|
332
|
+
row: number;
|
|
333
|
+
col: number;
|
|
334
|
+
text: string;
|
|
335
|
+
}>;
|
|
333
336
|
}
|
|
334
337
|
declare function updateTableCells(ctx: ToolContext, params: UpdateTableCellsParams): ToolResult<{
|
|
335
|
-
|
|
338
|
+
updatedCount: number;
|
|
336
339
|
}>;
|
|
337
340
|
interface ManageTableStructureParams {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
slideIndex: number;
|
|
342
|
+
elementId: string;
|
|
343
|
+
action: 'insertRow' | 'deleteRow' | 'insertColumn' | 'deleteColumn';
|
|
344
|
+
position?: number;
|
|
345
|
+
referenceIndex?: number;
|
|
346
|
+
cellTexts?: string[];
|
|
344
347
|
}
|
|
345
348
|
declare function manageTableStructure(ctx: ToolContext, params: ManageTableStructureParams): ToolResult<{
|
|
346
|
-
|
|
347
|
-
|
|
349
|
+
rowCount: number;
|
|
350
|
+
columnCount: number;
|
|
348
351
|
}>;
|
|
349
|
-
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/tools/style-tools.d.ts
|
|
350
354
|
interface UpdateElementStyleParams {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
355
|
+
slideIndex: number;
|
|
356
|
+
elementId: string;
|
|
357
|
+
fillColor?: string;
|
|
358
|
+
fillMode?: ShapeStyle['fillMode'];
|
|
359
|
+
fillGradientStops?: Array<{
|
|
360
|
+
color: string;
|
|
361
|
+
position: number;
|
|
362
|
+
opacity?: number;
|
|
363
|
+
}>;
|
|
364
|
+
fillGradientAngle?: number;
|
|
365
|
+
fillGradientType?: 'linear' | 'radial';
|
|
366
|
+
fillOpacity?: number;
|
|
367
|
+
strokeColor?: string;
|
|
368
|
+
strokeWidth?: number;
|
|
369
|
+
strokeDash?: ShapeStyle['strokeDash'];
|
|
370
|
+
strokeOpacity?: number;
|
|
371
|
+
shadowColor?: string;
|
|
372
|
+
shadowBlur?: number;
|
|
373
|
+
shadowOffsetX?: number;
|
|
374
|
+
shadowOffsetY?: number;
|
|
375
|
+
shadowOpacity?: number;
|
|
376
|
+
glowColor?: string;
|
|
377
|
+
glowRadius?: number;
|
|
378
|
+
glowOpacity?: number;
|
|
379
|
+
softEdgeRadius?: number;
|
|
380
|
+
cropLeft?: number;
|
|
381
|
+
cropTop?: number;
|
|
382
|
+
cropRight?: number;
|
|
383
|
+
cropBottom?: number;
|
|
384
|
+
brightness?: number;
|
|
385
|
+
contrast?: number;
|
|
386
|
+
grayscale?: boolean;
|
|
387
|
+
altText?: string;
|
|
384
388
|
}
|
|
385
389
|
declare function updateElementStyle(ctx: ToolContext, params: UpdateElementStyleParams): ToolResult<{
|
|
386
|
-
|
|
390
|
+
elementId: string;
|
|
387
391
|
}>;
|
|
388
392
|
interface AccessibilityIssue {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
+
slideIndex: number;
|
|
394
|
+
elementId?: string;
|
|
395
|
+
severity: 'error' | 'warning' | 'info';
|
|
396
|
+
message: string;
|
|
393
397
|
}
|
|
394
398
|
interface AccessibilityCheckResult {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
399
|
+
slideCount: number;
|
|
400
|
+
totalIssues: number;
|
|
401
|
+
errorCount: number;
|
|
402
|
+
warningCount: number;
|
|
403
|
+
infoCount: number;
|
|
404
|
+
issues: AccessibilityIssue[];
|
|
401
405
|
}
|
|
402
406
|
declare function runAccessibilityCheck(ctx: ToolContext): ToolResult<AccessibilityCheckResult>;
|
|
403
|
-
|
|
407
|
+
//#endregion
|
|
408
|
+
//#region src/tools/content-tools.d.ts
|
|
404
409
|
interface FindTextParams {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
410
|
+
query: string;
|
|
411
|
+
useRegex?: boolean;
|
|
412
|
+
caseSensitive?: boolean;
|
|
413
|
+
slideIndexes?: number[];
|
|
409
414
|
}
|
|
410
415
|
interface TextMatch {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
+
slideIndex: number;
|
|
417
|
+
elementId: string;
|
|
418
|
+
elementType: string;
|
|
419
|
+
matchedText: string;
|
|
420
|
+
context: string;
|
|
416
421
|
}
|
|
417
422
|
interface FindTextResult {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
423
|
+
query: string;
|
|
424
|
+
matchCount: number;
|
|
425
|
+
matches: TextMatch[];
|
|
421
426
|
}
|
|
422
427
|
declare function findText(ctx: ToolContext, params: FindTextParams): ToolResult<FindTextResult>;
|
|
423
428
|
interface ReplaceTextParams {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
+
query: string;
|
|
430
|
+
replacement: string;
|
|
431
|
+
useRegex?: boolean;
|
|
432
|
+
caseSensitive?: boolean;
|
|
433
|
+
slideIndexes?: number[];
|
|
429
434
|
}
|
|
430
435
|
interface ReplaceTextResult {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
436
|
+
query: string;
|
|
437
|
+
replacement: string;
|
|
438
|
+
replacementCount: number;
|
|
434
439
|
}
|
|
435
440
|
declare function replaceText(ctx: ToolContext, params: ReplaceTextParams): ToolResult<ReplaceTextResult>;
|
|
436
441
|
interface ManageCommentsParams {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
action: 'list' | 'add' | 'delete' | 'resolve';
|
|
443
|
+
slideIndex?: number;
|
|
444
|
+
text?: string;
|
|
445
|
+
author?: string;
|
|
446
|
+
commentId?: string;
|
|
447
|
+
resolved?: boolean;
|
|
448
|
+
includeResolved?: boolean;
|
|
444
449
|
}
|
|
445
450
|
interface CommentInfo {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
451
|
+
id: string;
|
|
452
|
+
slideIndex: number;
|
|
453
|
+
text: string;
|
|
454
|
+
author?: string;
|
|
455
|
+
createdAt?: string;
|
|
456
|
+
resolved?: boolean;
|
|
452
457
|
}
|
|
453
458
|
interface ManageCommentsResult {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
459
|
+
action: string;
|
|
460
|
+
comments?: CommentInfo[];
|
|
461
|
+
commentId?: string;
|
|
462
|
+
count?: number;
|
|
458
463
|
}
|
|
459
464
|
declare function manageComments(ctx: ToolContext, params: ManageCommentsParams): ToolResult<ManageCommentsResult>;
|
|
460
|
-
|
|
465
|
+
//#endregion
|
|
466
|
+
//#region src/tools/conversion-tools.d.ts
|
|
461
467
|
interface ConvertToMarkdownParams {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
468
|
+
outputDir?: string;
|
|
469
|
+
mediaFolderName?: string;
|
|
470
|
+
includeMetadata?: boolean;
|
|
471
|
+
slideRange?: {
|
|
472
|
+
start?: number;
|
|
473
|
+
end?: number;
|
|
474
|
+
};
|
|
475
|
+
includeSpeakerNotes?: boolean;
|
|
476
|
+
semanticMode?: boolean;
|
|
477
|
+
sourceName?: string;
|
|
478
|
+
/**
|
|
479
|
+
* Root directory under which `outputDir` must resolve. Defaults to
|
|
480
|
+
* `process.env.PPTX_TOOLS_ROOT` if set, else `process.cwd()`.
|
|
481
|
+
*/
|
|
482
|
+
rootDir?: string;
|
|
477
483
|
}
|
|
478
484
|
interface ConvertToMarkdownResult {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
485
|
+
markdown: string;
|
|
486
|
+
slidesConverted: number;
|
|
487
|
+
totalSlides: number;
|
|
488
|
+
imagesExtracted: number;
|
|
483
489
|
}
|
|
484
490
|
declare function convertToMarkdown(ctx: ToolContext, params: ConvertToMarkdownParams): Promise<ToolResult<ConvertToMarkdownResult>>;
|
|
485
|
-
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region src/tools/theme-tools.d.ts
|
|
486
493
|
interface ThemeInfo {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
494
|
+
themeName?: string;
|
|
495
|
+
colorScheme?: PptxThemeColorScheme;
|
|
496
|
+
fontScheme?: PptxThemeFontScheme;
|
|
497
|
+
availablePresets: string[];
|
|
491
498
|
}
|
|
492
499
|
declare function getThemeInfo(ctx: ToolContext): ToolResult<ThemeInfo>;
|
|
493
500
|
interface ApplyThemePresetParams {
|
|
494
|
-
|
|
501
|
+
presetName: string;
|
|
495
502
|
}
|
|
496
503
|
interface ApplyThemePresetResult {
|
|
497
|
-
|
|
498
|
-
|
|
504
|
+
appliedPreset: string;
|
|
505
|
+
colorScheme: PptxThemeColorScheme;
|
|
499
506
|
}
|
|
500
507
|
declare function applyThemePreset(ctx: ToolContext, params: ApplyThemePresetParams): ToolResult<ApplyThemePresetResult>;
|
|
501
508
|
interface UpdateThemeColorsParams {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
509
|
+
dk1?: string;
|
|
510
|
+
lt1?: string;
|
|
511
|
+
dk2?: string;
|
|
512
|
+
lt2?: string;
|
|
513
|
+
accent1?: string;
|
|
514
|
+
accent2?: string;
|
|
515
|
+
accent3?: string;
|
|
516
|
+
accent4?: string;
|
|
517
|
+
accent5?: string;
|
|
518
|
+
accent6?: string;
|
|
519
|
+
hlink?: string;
|
|
520
|
+
folHlink?: string;
|
|
514
521
|
}
|
|
515
522
|
declare function updateThemeColors(ctx: ToolContext, params: UpdateThemeColorsParams): ToolResult<{
|
|
516
|
-
|
|
523
|
+
colorScheme: PptxThemeColorScheme;
|
|
517
524
|
}>;
|
|
518
525
|
interface UpdateThemeFontsParams {
|
|
519
|
-
|
|
520
|
-
|
|
526
|
+
majorFont?: string;
|
|
527
|
+
minorFont?: string;
|
|
521
528
|
}
|
|
522
529
|
declare function updateThemeFonts(ctx: ToolContext, params: UpdateThemeFontsParams): ToolResult<{
|
|
523
|
-
|
|
530
|
+
fontScheme: PptxThemeFontScheme;
|
|
524
531
|
}>;
|
|
525
|
-
|
|
532
|
+
//#endregion
|
|
533
|
+
//#region src/tools/chart-tools.d.ts
|
|
526
534
|
interface UpdateChartParams {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
535
|
+
slideIndex: number;
|
|
536
|
+
elementId: string;
|
|
537
|
+
chartType?: string;
|
|
538
|
+
title?: string;
|
|
539
|
+
grouping?: 'clustered' | 'stacked' | 'percentStacked';
|
|
540
|
+
legend?: {
|
|
541
|
+
show?: boolean;
|
|
542
|
+
position?: string;
|
|
543
|
+
};
|
|
544
|
+
dataLabels?: {
|
|
545
|
+
show?: boolean;
|
|
546
|
+
showValue?: boolean;
|
|
547
|
+
showCategory?: boolean;
|
|
548
|
+
showSeriesName?: boolean;
|
|
549
|
+
showPercent?: boolean;
|
|
550
|
+
};
|
|
551
|
+
axis?: {
|
|
552
|
+
type: string;
|
|
553
|
+
edit: ChartAxisEdit;
|
|
554
|
+
};
|
|
555
|
+
categories?: string[];
|
|
548
556
|
}
|
|
549
557
|
declare function updateChart(ctx: ToolContext, params: UpdateChartParams): ToolResult<{
|
|
550
|
-
|
|
558
|
+
elementId: string;
|
|
551
559
|
}>;
|
|
552
560
|
interface AddChartSeriesParams {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
561
|
+
slideIndex: number;
|
|
562
|
+
elementId: string;
|
|
563
|
+
name: string;
|
|
564
|
+
values: number[];
|
|
565
|
+
color?: string;
|
|
558
566
|
}
|
|
559
567
|
declare function addChartSeriesT(ctx: ToolContext, params: AddChartSeriesParams): ToolResult<{
|
|
560
|
-
|
|
561
|
-
|
|
568
|
+
elementId: string;
|
|
569
|
+
seriesCount: number;
|
|
562
570
|
}>;
|
|
563
571
|
interface RemoveChartSeriesParams {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
572
|
+
slideIndex: number;
|
|
573
|
+
elementId: string;
|
|
574
|
+
seriesIndex: number;
|
|
567
575
|
}
|
|
568
576
|
declare function removeChartSeriesT(ctx: ToolContext, params: RemoveChartSeriesParams): ToolResult<{
|
|
569
|
-
|
|
570
|
-
|
|
577
|
+
elementId: string;
|
|
578
|
+
seriesCount: number;
|
|
571
579
|
}>;
|
|
572
580
|
interface UpdateChartSeriesDataParams {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
581
|
+
slideIndex: number;
|
|
582
|
+
elementId: string;
|
|
583
|
+
seriesIndex: number;
|
|
584
|
+
values: number[];
|
|
577
585
|
}
|
|
578
586
|
declare function updateChartSeriesData(ctx: ToolContext, params: UpdateChartSeriesDataParams): ToolResult<{
|
|
579
|
-
|
|
587
|
+
elementId: string;
|
|
580
588
|
}>;
|
|
581
589
|
interface CreateChartParams {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
590
|
+
slideIndex: number;
|
|
591
|
+
chartType: string;
|
|
592
|
+
x?: number;
|
|
593
|
+
y?: number;
|
|
594
|
+
width?: number;
|
|
595
|
+
height?: number;
|
|
596
|
+
title?: string;
|
|
597
|
+
categories?: string[];
|
|
598
|
+
series?: Array<{
|
|
599
|
+
name: string;
|
|
600
|
+
values: number[];
|
|
601
|
+
color?: string;
|
|
602
|
+
}>;
|
|
603
|
+
legend?: {
|
|
604
|
+
show: boolean;
|
|
605
|
+
position?: string;
|
|
606
|
+
};
|
|
599
607
|
}
|
|
600
608
|
interface CreateChartResult {
|
|
601
|
-
|
|
602
|
-
|
|
609
|
+
elementId: string;
|
|
610
|
+
slideIndex: number;
|
|
603
611
|
}
|
|
604
612
|
declare function createChart(ctx: ToolContext, params: CreateChartParams): ToolResult<CreateChartResult>;
|
|
605
|
-
|
|
613
|
+
//#endregion
|
|
614
|
+
//#region src/tools/smartart-tools.d.ts
|
|
606
615
|
interface ManageSmartArtParams {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
616
|
+
slideIndex: number;
|
|
617
|
+
elementId: string;
|
|
618
|
+
action: 'addNode' | 'removeNode' | 'updateNodeText' | 'reorderNode' | 'promoteNode' | 'demoteNode' | 'decompose' | 'getNodes';
|
|
619
|
+
nodeId?: string;
|
|
620
|
+
text?: string;
|
|
621
|
+
afterNodeId?: string;
|
|
622
|
+
direction?: number;
|
|
614
623
|
}
|
|
615
624
|
interface SmartArtNodeInfo {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
625
|
+
id: string;
|
|
626
|
+
text: string;
|
|
627
|
+
children?: SmartArtNodeInfo[];
|
|
619
628
|
}
|
|
620
629
|
interface ManageSmartArtResult {
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
630
|
+
action: string;
|
|
631
|
+
elementId: string;
|
|
632
|
+
nodes?: SmartArtNodeInfo[];
|
|
633
|
+
decomposedCount?: number;
|
|
625
634
|
}
|
|
626
635
|
declare function manageSmartArt(ctx: ToolContext, params: ManageSmartArtParams): ToolResult<ManageSmartArtResult>;
|
|
627
|
-
|
|
636
|
+
//#endregion
|
|
637
|
+
//#region src/tools/merge-tools.d.ts
|
|
628
638
|
interface MergePresentationParams {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
639
|
+
/** The source presentation data to merge FROM. */
|
|
640
|
+
sourceData: PptxData$1;
|
|
641
|
+
/** Specific slide indices from source to merge. If omitted, all slides. */
|
|
642
|
+
slideIndices?: number[];
|
|
643
|
+
/** Where to insert in the target (0-based). Defaults to end. */
|
|
644
|
+
insertAt?: number;
|
|
645
|
+
/** Whether to keep the source theme. */
|
|
646
|
+
keepSourceTheme?: boolean;
|
|
637
647
|
}
|
|
638
648
|
interface MergePresentationResult {
|
|
639
|
-
|
|
640
|
-
|
|
649
|
+
slidesAdded: number;
|
|
650
|
+
totalSlides: number;
|
|
641
651
|
}
|
|
642
652
|
declare function mergePresentationT(ctx: ToolContext, params: MergePresentationParams): ToolResult<MergePresentationResult>;
|
|
643
653
|
interface DiffPresentationsParams {
|
|
644
|
-
|
|
645
|
-
|
|
654
|
+
/** The other presentation data to diff against. */
|
|
655
|
+
otherData: PptxData$1;
|
|
646
656
|
}
|
|
647
657
|
declare function diffPresentationsT(ctx: ToolContext, params: DiffPresentationsParams): ToolResult<PresentationDiff>;
|
|
648
|
-
|
|
658
|
+
//#endregion
|
|
659
|
+
//#region src/tools/template-tools.d.ts
|
|
649
660
|
interface FindPlaceholdersResult {
|
|
650
|
-
|
|
651
|
-
|
|
661
|
+
placeholders: string[];
|
|
662
|
+
count: number;
|
|
652
663
|
}
|
|
653
664
|
declare function findPlaceholdersT(ctx: ToolContext): ToolResult<FindPlaceholdersResult>;
|
|
654
665
|
interface ApplyTemplateParams {
|
|
655
|
-
|
|
666
|
+
data: Record<string, unknown>;
|
|
656
667
|
}
|
|
657
668
|
interface ApplyTemplateResult {
|
|
658
|
-
|
|
659
|
-
|
|
669
|
+
applied: boolean;
|
|
670
|
+
slideCount: number;
|
|
660
671
|
}
|
|
661
672
|
declare function applyTemplateT(ctx: ToolContext, params: ApplyTemplateParams): ToolResult<ApplyTemplateResult>;
|
|
662
|
-
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region src/tools/metadata-tools.d.ts
|
|
663
675
|
interface MetadataResult {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
676
|
+
coreProperties?: PptxCoreProperties;
|
|
677
|
+
appProperties?: PptxAppProperties;
|
|
678
|
+
customProperties?: PptxCustomProperty[];
|
|
679
|
+
slideCount: number;
|
|
668
680
|
}
|
|
669
681
|
declare function getMetadata(ctx: ToolContext): ToolResult<MetadataResult>;
|
|
670
682
|
interface UpdateMetadataParams {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
683
|
+
title?: string;
|
|
684
|
+
subject?: string;
|
|
685
|
+
creator?: string;
|
|
686
|
+
keywords?: string;
|
|
687
|
+
description?: string;
|
|
688
|
+
lastModifiedBy?: string;
|
|
689
|
+
category?: string;
|
|
690
|
+
company?: string;
|
|
691
|
+
manager?: string;
|
|
692
|
+
customProperties?: Array<{
|
|
693
|
+
name: string;
|
|
694
|
+
value: string | number | boolean;
|
|
695
|
+
}>;
|
|
684
696
|
}
|
|
685
697
|
declare function updateMetadata(ctx: ToolContext, params: UpdateMetadataParams): ToolResult<{
|
|
686
|
-
|
|
698
|
+
updated: string[];
|
|
687
699
|
}>;
|
|
688
|
-
|
|
700
|
+
//#endregion
|
|
701
|
+
//#region src/tools/section-tools.d.ts
|
|
689
702
|
interface ManageSectionsParams {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
703
|
+
action: 'list' | 'add' | 'remove' | 'reorder' | 'moveSlides' | 'getForSlide';
|
|
704
|
+
name?: string;
|
|
705
|
+
slideIndices?: number[];
|
|
706
|
+
sectionId?: string;
|
|
707
|
+
sectionIds?: string[];
|
|
708
|
+
slideIndex?: number;
|
|
696
709
|
}
|
|
697
710
|
interface SectionInfo {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
711
|
+
id: string;
|
|
712
|
+
name: string;
|
|
713
|
+
slideIds: string[];
|
|
714
|
+
collapsed?: boolean;
|
|
715
|
+
color?: string;
|
|
703
716
|
}
|
|
704
717
|
interface ManageSectionsResult {
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
718
|
+
action: string;
|
|
719
|
+
sections?: SectionInfo[];
|
|
720
|
+
section?: SectionInfo | null;
|
|
721
|
+
success?: boolean;
|
|
709
722
|
}
|
|
710
723
|
declare function manageSections(ctx: ToolContext, params: ManageSectionsParams): ToolResult<ManageSectionsResult>;
|
|
711
|
-
|
|
724
|
+
//#endregion
|
|
725
|
+
//#region src/tools/export-tools.d.ts
|
|
712
726
|
interface ExportToSvgParams {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
727
|
+
slideIndices?: number[];
|
|
728
|
+
includeHidden?: boolean;
|
|
729
|
+
defaultFontFamily?: string;
|
|
730
|
+
defaultFontSize?: number;
|
|
717
731
|
}
|
|
718
732
|
interface ExportToSvgResult {
|
|
719
|
-
|
|
720
|
-
|
|
733
|
+
svgStrings: string[];
|
|
734
|
+
slideCount: number;
|
|
721
735
|
}
|
|
722
736
|
declare function exportToSvg(ctx: ToolContext, params: ExportToSvgParams): ToolResult<ExportToSvgResult>;
|
|
723
737
|
interface ExportSlideSvgParams {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
738
|
+
slideIndex: number;
|
|
739
|
+
defaultFontFamily?: string;
|
|
740
|
+
defaultFontSize?: number;
|
|
727
741
|
}
|
|
728
742
|
interface ExportSlideSvgResult {
|
|
729
|
-
|
|
730
|
-
|
|
743
|
+
svg: string;
|
|
744
|
+
slideIndex: number;
|
|
731
745
|
}
|
|
732
746
|
declare function exportSlideSvg(ctx: ToolContext, params: ExportSlideSvgParams): ToolResult<ExportSlideSvgResult>;
|
|
733
|
-
|
|
747
|
+
//#endregion
|
|
748
|
+
//#region src/tools/hyperlink-tools.d.ts
|
|
734
749
|
interface ManageHyperlinksParams {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
750
|
+
slideIndex: number;
|
|
751
|
+
action: 'list' | 'set' | 'remove';
|
|
752
|
+
elementId?: string;
|
|
753
|
+
trigger?: 'click' | 'hover';
|
|
754
|
+
url?: string;
|
|
755
|
+
tooltip?: string;
|
|
756
|
+
targetSlideIndex?: number;
|
|
757
|
+
actionType?: 'url' | 'slide' | 'nextSlide' | 'prevSlide' | 'firstSlide' | 'lastSlide' | 'endShow';
|
|
743
758
|
}
|
|
744
759
|
interface HyperlinkInfo {
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
760
|
+
elementId: string;
|
|
761
|
+
trigger: 'click' | 'hover';
|
|
762
|
+
url?: string;
|
|
763
|
+
tooltip?: string;
|
|
764
|
+
targetSlideIndex?: number;
|
|
765
|
+
actionType?: string;
|
|
751
766
|
}
|
|
752
767
|
interface ManageHyperlinksResult {
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
768
|
+
action: string;
|
|
769
|
+
hyperlinks?: HyperlinkInfo[];
|
|
770
|
+
elementId?: string;
|
|
756
771
|
}
|
|
757
772
|
declare function manageHyperlinks(ctx: ToolContext, params: ManageHyperlinksParams): ToolResult<ManageHyperlinksResult>;
|
|
758
|
-
|
|
773
|
+
//#endregion
|
|
774
|
+
//#region src/tools/geometry-tools.d.ts
|
|
759
775
|
interface ReplaceGeometryParams {
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
776
|
+
slideIndex: number;
|
|
777
|
+
elementId: string;
|
|
778
|
+
/** New preset shape type (e.g. "roundRect", "star5", "ellipse"). */
|
|
779
|
+
shapeType?: string;
|
|
780
|
+
/** Custom SVG path data (mutually exclusive with shapeType). */
|
|
781
|
+
svgPath?: string;
|
|
782
|
+
/** Width of the custom path coordinate space. */
|
|
783
|
+
pathWidth?: number;
|
|
784
|
+
/** Height of the custom path coordinate space. */
|
|
785
|
+
pathHeight?: number;
|
|
786
|
+
/** Adjustment values for the new geometry. */
|
|
787
|
+
adjustments?: Record<string, number>;
|
|
772
788
|
}
|
|
773
789
|
declare function replaceGeometry(ctx: ToolContext, params: ReplaceGeometryParams): ToolResult<{
|
|
774
|
-
|
|
775
|
-
|
|
790
|
+
elementId: string;
|
|
791
|
+
geometryType: string;
|
|
776
792
|
}>;
|
|
777
|
-
|
|
793
|
+
//#endregion
|
|
794
|
+
//#region src/tools/lock-tools.d.ts
|
|
778
795
|
interface SetElementLockParams {
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
796
|
+
slideIndex: number;
|
|
797
|
+
elementId: string;
|
|
798
|
+
locked: boolean;
|
|
799
|
+
noMove?: boolean;
|
|
800
|
+
noResize?: boolean;
|
|
801
|
+
noRotation?: boolean;
|
|
802
|
+
noSelect?: boolean;
|
|
803
|
+
noTextEdit?: boolean;
|
|
787
804
|
}
|
|
788
805
|
declare function setElementLockT(ctx: ToolContext, params: SetElementLockParams): ToolResult<{
|
|
789
|
-
|
|
790
|
-
|
|
806
|
+
elementId: string;
|
|
807
|
+
locked: boolean;
|
|
791
808
|
}>;
|
|
792
|
-
|
|
809
|
+
//#endregion
|
|
810
|
+
//#region src/tools/validation-tools.d.ts
|
|
793
811
|
interface ValidatePresentationResult {
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
812
|
+
valid: boolean;
|
|
813
|
+
issueCount: number;
|
|
814
|
+
errors: number;
|
|
815
|
+
warnings: number;
|
|
816
|
+
issues: Array<{
|
|
817
|
+
severity: string;
|
|
818
|
+
code: string;
|
|
819
|
+
message: string;
|
|
820
|
+
path?: string;
|
|
821
|
+
}>;
|
|
804
822
|
}
|
|
805
823
|
/**
|
|
806
824
|
* Validate requires the raw bytes (ArrayBuffer) so this tool needs special
|
|
@@ -809,54 +827,57 @@ interface ValidatePresentationResult {
|
|
|
809
827
|
*/
|
|
810
828
|
declare function validatePresentation(rawBytes: ArrayBuffer): Promise<ValidatePresentationResult>;
|
|
811
829
|
interface RepairPresentationResult {
|
|
812
|
-
|
|
813
|
-
|
|
830
|
+
repairCount: number;
|
|
831
|
+
repairs: string[];
|
|
814
832
|
}
|
|
815
833
|
declare function repairPresentation(rawBytes: ArrayBuffer): Promise<{
|
|
816
|
-
|
|
817
|
-
|
|
834
|
+
result: RepairPresentationResult;
|
|
835
|
+
repairedBytes: ArrayBuffer;
|
|
818
836
|
}>;
|
|
819
|
-
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region src/tools/presentation-tools.d.ts
|
|
820
839
|
declare function getPresentationProperties(ctx: ToolContext): ToolResult<{
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
840
|
+
properties: PptxPresentationProperties | undefined;
|
|
841
|
+
slideCount: number;
|
|
842
|
+
width?: number;
|
|
843
|
+
height?: number;
|
|
825
844
|
}>;
|
|
826
845
|
interface UpdatePresentationPropertiesParams {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
846
|
+
showType?: 'presented' | 'browsed' | 'kiosk';
|
|
847
|
+
loopContinuously?: boolean;
|
|
848
|
+
showWithNarration?: boolean;
|
|
849
|
+
showWithAnimation?: boolean;
|
|
850
|
+
advanceMode?: 'manual' | 'useTimings';
|
|
851
|
+
showSlidesMode?: 'all' | 'customShow' | 'range';
|
|
852
|
+
showSlidesFrom?: number;
|
|
853
|
+
showSlidesTo?: number;
|
|
854
|
+
penColor?: string;
|
|
836
855
|
}
|
|
837
856
|
declare function updatePresentationProperties(ctx: ToolContext, params: UpdatePresentationPropertiesParams): ToolResult<{
|
|
838
|
-
|
|
857
|
+
properties: PptxPresentationProperties;
|
|
839
858
|
}>;
|
|
840
|
-
|
|
859
|
+
//#endregion
|
|
860
|
+
//#region src/tools/layout-tools.d.ts
|
|
841
861
|
interface LayoutInfo {
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
862
|
+
name: string;
|
|
863
|
+
path?: string;
|
|
864
|
+
type?: string;
|
|
845
865
|
}
|
|
846
866
|
interface GetLayoutsResult {
|
|
847
|
-
|
|
848
|
-
|
|
867
|
+
layouts: LayoutInfo[];
|
|
868
|
+
count: number;
|
|
849
869
|
}
|
|
850
870
|
declare function getLayouts(ctx: ToolContext): ToolResult<GetLayoutsResult>;
|
|
851
871
|
interface ApplyLayoutParams {
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
872
|
+
slideIndex: number;
|
|
873
|
+
layoutName?: string;
|
|
874
|
+
layoutType?: string;
|
|
855
875
|
}
|
|
856
876
|
interface ApplyLayoutResult {
|
|
857
|
-
|
|
858
|
-
|
|
877
|
+
slideIndex: number;
|
|
878
|
+
layoutName: string;
|
|
859
879
|
}
|
|
860
880
|
declare function applyLayout(ctx: ToolContext, params: ApplyLayoutParams): ToolResult<ApplyLayoutResult>;
|
|
861
|
-
|
|
862
|
-
export { type AccessibilityCheckResult, type AccessibilityIssue, type AddChartSeriesParams, type AddElementParams, type AddElementResult, type AddSlideParams, type AddSlideResult, type ApplyLayoutParams, type ApplyLayoutResult, type ApplyTemplateParams, type ApplyTemplateResult, type ApplyThemePresetParams, type ApplyThemePresetResult, type ArrangeElementsParams, type BatchUpdateElementsParams, type CloneElementParams, type CloneElementResult, type CollaborationProvider, type CommentInfo, type ConvertToMarkdownParams, type ConvertToMarkdownResult, type CreateChartParams, type CreateChartResult, type DeleteElementsParams, type DeleteSlidesParams, type DeleteSlidesResult, type DiffPresentationsParams, type DuplicateSlideParams, type ExecutionContext, type ExportSlideSvgParams, type ExportSlideSvgResult, type ExportToSvgParams, type ExportToSvgResult, type FileSystemProvider, type FindPlaceholdersResult, type FindTextParams, type FindTextResult, type GetLayoutsResult, type GetSlideResult, type GroupElementsParams, type GroupElementsResult, type HyperlinkInfo, type LayoutInfo, type ManageCommentsParams, type ManageCommentsResult, type ManageHyperlinksParams, type ManageHyperlinksResult, type ManageSectionsParams, type ManageSectionsResult, type ManageSmartArtParams, type ManageSmartArtResult, type ManageTableStructureParams, type MergePresentationParams, type MergePresentationResult, type MetadataResult, type RemoveChartSeriesParams, type ReorderSlidesParams, type RepairPresentationResult, type ReplaceGeometryParams, type ReplaceTextParams, type ReplaceTextResult, type SectionInfo, type SetCanvasSizeParams, type SetElementAnimationParams, type SetElementLockParams, type SetSlideTransitionParams, type SmartArtNodeInfo, type TextMatch, type ThemeInfo, type ToolContext, type ToolResult, type UngroupElementsParams, type UngroupElementsResult, type UpdateChartParams, type UpdateChartSeriesDataParams, type UpdateElementParams, type UpdateElementStyleParams, type UpdateMetadataParams, type UpdatePresentationPropertiesParams, type UpdateSlidePropertiesParams, type UpdateTableCellsParams, type UpdateThemeColorsParams, type UpdateThemeFontsParams, type ValidatePresentationResult, type ViewerProvider, addChartSeriesT, addElement, addSlide, applyLayout, applyTemplateT, applyThemePreset, arrangeElements, batchUpdateElements, cloneElement, convertToMarkdown, createChart, deleteElements, deleteSlides, describeElement, diffPresentationsT, duplicateSlide, executeToolWithContext, exportSlideSvg, exportToSvg, extractSlideText, findPlaceholdersT, findText, generateElementId, generateSlideId, getLayouts, getMetadata, getPresentationProperties, getSlide, getThemeInfo, groupElements, loadPresentation, manageComments, manageHyperlinks, manageSections, manageSmartArt, manageTableStructure, mergePresentationT, removeChartSeriesT, reorderSlides, repairPresentation, replaceGeometry, replaceText, runAccessibilityCheck, savePresentation, setCanvasSize, setElementAnimation, setElementLockT, setSlideTransition, ungroupElements, updateChart, updateChartSeriesData, updateElement, updateElementStyle, updateMetadata, updatePresentationProperties, updateSlideProperties, updateTableCells, updateThemeColors, updateThemeFonts, validatePresentation, validateSlideIndex };
|
|
881
|
+
//#endregion
|
|
882
|
+
export { type AccessibilityCheckResult, type AccessibilityIssue, type AddChartSeriesParams, type AddElementParams, type AddElementResult, type AddSlideParams, type AddSlideResult, type ApplyLayoutParams, type ApplyLayoutResult, type ApplyTemplateParams, type ApplyTemplateResult, type ApplyThemePresetParams, type ApplyThemePresetResult, type ArrangeElementsParams, type BatchUpdateElementsParams, type CloneElementParams, type CloneElementResult, type CollaborationProvider, type CommentInfo, type ConvertToMarkdownParams, type ConvertToMarkdownResult, type CreateChartParams, type CreateChartResult, type DeleteElementsParams, type DeleteSlidesParams, type DeleteSlidesResult, type DiffPresentationsParams, type DuplicateSlideParams, type ExecutionContext, type ExportSlideSvgParams, type ExportSlideSvgResult, type ExportToSvgParams, type ExportToSvgResult, type FileSystemProvider, type FindPlaceholdersResult, type FindTextParams, type FindTextResult, type GetLayoutsResult, type GetSlideResult, type GroupElementsParams, type GroupElementsResult, type HyperlinkInfo, type LayoutInfo, type ManageCommentsParams, type ManageCommentsResult, type ManageHyperlinksParams, type ManageHyperlinksResult, type ManageSectionsParams, type ManageSectionsResult, type ManageSmartArtParams, type ManageSmartArtResult, type ManageTableStructureParams, type MergePresentationParams, type MergePresentationResult, type MetadataResult, type PptxData, type PptxElement, PptxHandler, type PptxSlide, type RemoveChartSeriesParams, type ReorderSlidesParams, type RepairPresentationResult, type ReplaceGeometryParams, type ReplaceTextParams, type ReplaceTextResult, type SectionInfo, type SetCanvasSizeParams, type SetElementAnimationParams, type SetElementLockParams, type SetSlideTransitionParams, type SmartArtNodeInfo, type TextMatch, type ThemeInfo, type ToolContext, type ToolResult, type UngroupElementsParams, type UngroupElementsResult, type UpdateChartParams, type UpdateChartSeriesDataParams, type UpdateElementParams, type UpdateElementStyleParams, type UpdateMetadataParams, type UpdatePresentationPropertiesParams, type UpdateSlidePropertiesParams, type UpdateTableCellsParams, type UpdateThemeColorsParams, type UpdateThemeFontsParams, type ValidatePresentationResult, type ViewerProvider, addChartSeriesT, addElement, addSlide, applyLayout, applyTemplateT, applyThemePreset, arrangeElements, batchUpdateElements, cloneElement, convertToMarkdown, createChart, deleteElements, deleteSlides, describeElement, diffPresentationsT, duplicateSlide, executeToolWithContext, exportSlideSvg, exportToSvg, extractSlideText, findPlaceholdersT, findText, generateElementId, generateSlideId, getLayouts, getMetadata, getPresentationProperties, getSlide, getThemeInfo, groupElements, loadPresentation, manageComments, manageHyperlinks, manageSections, manageSmartArt, manageTableStructure, mergePresentationT, removeChartSeriesT, reorderSlides, repairPresentation, replaceGeometry, replaceText, runAccessibilityCheck, savePresentation, setCanvasSize, setElementAnimation, setElementLockT, setSlideTransition, ungroupElements, updateChart, updateChartSeriesData, updateElement, updateElementStyle, updateMetadata, updatePresentationProperties, updateSlideProperties, updateTableCells, updateThemeColors, updateThemeFonts, validatePresentation, validateSlideIndex };
|
|
883
|
+
//# sourceMappingURL=index.d.ts.map
|