pptx-viewer-mcp 2.4.1 → 2.5.1
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 +19 -0
- package/dist/codec/index.d.ts +7 -7
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/index.d.ts +174 -79
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +139 -2
- package/dist/index.mjs +135 -4
- package/dist/mcp/index.js +260 -2
- package/dist/mcp/index.mjs +261 -3
- package/dist/schemas/index.d.ts +115 -73
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +49 -0
- package/dist/schemas/index.mjs +44 -1
- package/package.json +8 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Doc } from "yjs";
|
|
2
|
-
import { ChartAxisEdit, ParsedTableStyleBorders, ParsedTableStyleFill, ParsedTableStyleText, PptxAppProperties, PptxChartErrBars, PptxChartMarkerSymbol, PptxChartUserShape, PptxCoreProperties, PptxCustomProperty, PptxData, PptxData as PptxData$1, PptxData as PptxData$2, PptxElement, PptxElement as PptxElement$1, PptxHandler, PptxJsonAssetStats, PptxPresentationProperties, PptxSlide, PptxSlide as PptxSlide$1, PptxTableCell3D, PptxThemeColorRef, PptxThemeColorScheme, PptxThemeFontScheme, PresentationDiff, ShapeStyle, TableStylePartName } from "pptx-viewer-core";
|
|
2
|
+
import { ChartAxisEdit, OleNestedDeckSlideDetail, OlePayloadEditorKind, OleSheetGrid, ParsedTableStyleBorders, ParsedTableStyleFill, ParsedTableStyleText, PptxAppProperties, PptxChartErrBars, PptxChartMarkerSymbol, PptxChartUserShape, PptxCoreProperties, PptxCustomProperty, PptxData, PptxData as PptxData$1, PptxData as PptxData$2, PptxElement, PptxElement as PptxElement$1, PptxHandler, PptxJsonAssetStats, PptxPresentationProperties, PptxSlide, PptxSlide as PptxSlide$1, PptxTableCell3D, PptxThemeColorRef, PptxThemeColorScheme, PptxThemeFontScheme, PresentationDiff, ShapeStyle, TableStylePartName } from "pptx-viewer-core";
|
|
3
3
|
//#region src/types.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Platform-agnostic context passed to every tool function.
|
|
@@ -103,14 +103,14 @@ interface ExecutionContext {
|
|
|
103
103
|
* If a Y.Doc room is active the current in-memory state is dehydrated
|
|
104
104
|
* so that unsaved edits are included in the tool's view of the document.
|
|
105
105
|
*/
|
|
106
|
-
declare function loadPresentation(filePath: string, execCtx: ExecutionContext): Promise<{
|
|
106
|
+
export declare function loadPresentation(filePath: string, execCtx: ExecutionContext): Promise<{
|
|
107
107
|
pptxData: PptxData$1;
|
|
108
108
|
rawBytes: Uint8Array;
|
|
109
109
|
}>;
|
|
110
110
|
/**
|
|
111
111
|
* Save mutated PptxData back: routes through collaboration Y.Doc or disk.
|
|
112
112
|
*/
|
|
113
|
-
declare function savePresentation(filePath: string, pptxData: PptxData$1, rawBytes: Uint8Array, execCtx: ExecutionContext, tableStyleSaveOptions?: TableStyleSaveOptions): Promise<{
|
|
113
|
+
export declare function savePresentation(filePath: string, pptxData: PptxData$1, rawBytes: Uint8Array, execCtx: ExecutionContext, tableStyleSaveOptions?: TableStyleSaveOptions): Promise<{
|
|
114
114
|
savedToDisk: boolean;
|
|
115
115
|
routedThroughCollaboration: boolean;
|
|
116
116
|
}>;
|
|
@@ -118,7 +118,7 @@ declare function savePresentation(filePath: string, pptxData: PptxData$1, rawByt
|
|
|
118
118
|
* Execute a pure tool function with full collaboration-aware load/save pipeline.
|
|
119
119
|
* Handles dehydrate-from-room → tool → hydrate-back-to-room routing automatically.
|
|
120
120
|
*/
|
|
121
|
-
declare function executeToolWithContext<T>(filePath: string, execCtx: ExecutionContext, toolFn: (ctx: ToolContext) => ToolResult<T> | Promise<ToolResult<T>>): Promise<T & {
|
|
121
|
+
export declare function executeToolWithContext<T>(filePath: string, execCtx: ExecutionContext, toolFn: (ctx: ToolContext) => ToolResult<T> | Promise<ToolResult<T>>): Promise<T & {
|
|
122
122
|
savedToDisk?: boolean;
|
|
123
123
|
routedThroughCollaboration?: boolean;
|
|
124
124
|
}>;
|
|
@@ -134,7 +134,7 @@ interface GetSlideResult {
|
|
|
134
134
|
commentCount: number;
|
|
135
135
|
elements: Record<string, unknown>[];
|
|
136
136
|
}
|
|
137
|
-
declare function getSlide(ctx: ToolContext, params: {
|
|
137
|
+
export declare function getSlide(ctx: ToolContext, params: {
|
|
138
138
|
slideIndex: number;
|
|
139
139
|
}): ToolResult<GetSlideResult>;
|
|
140
140
|
interface AddSlideParams {
|
|
@@ -145,7 +145,7 @@ interface AddSlideResult {
|
|
|
145
145
|
newSlideIndex: number;
|
|
146
146
|
slideCount: number;
|
|
147
147
|
}
|
|
148
|
-
declare function addSlide(ctx: ToolContext, params: AddSlideParams): ToolResult<AddSlideResult>;
|
|
148
|
+
export declare function addSlide(ctx: ToolContext, params: AddSlideParams): ToolResult<AddSlideResult>;
|
|
149
149
|
interface DeleteSlidesParams {
|
|
150
150
|
slideIndexes: number[];
|
|
151
151
|
}
|
|
@@ -153,18 +153,18 @@ interface DeleteSlidesResult {
|
|
|
153
153
|
deletedCount: number;
|
|
154
154
|
slideCount: number;
|
|
155
155
|
}
|
|
156
|
-
declare function deleteSlides(ctx: ToolContext, params: DeleteSlidesParams): ToolResult<DeleteSlidesResult>;
|
|
156
|
+
export declare function deleteSlides(ctx: ToolContext, params: DeleteSlidesParams): ToolResult<DeleteSlidesResult>;
|
|
157
157
|
interface ReorderSlidesParams {
|
|
158
158
|
newOrder: number[];
|
|
159
159
|
}
|
|
160
|
-
declare function reorderSlides(ctx: ToolContext, params: ReorderSlidesParams): ToolResult<{
|
|
160
|
+
export declare function reorderSlides(ctx: ToolContext, params: ReorderSlidesParams): ToolResult<{
|
|
161
161
|
slideCount: number;
|
|
162
162
|
}>;
|
|
163
163
|
interface DuplicateSlideParams {
|
|
164
164
|
slideIndex: number;
|
|
165
165
|
targetIndex?: number;
|
|
166
166
|
}
|
|
167
|
-
declare function duplicateSlide(ctx: ToolContext, params: DuplicateSlideParams): ToolResult<{
|
|
167
|
+
export declare function duplicateSlide(ctx: ToolContext, params: DuplicateSlideParams): ToolResult<{
|
|
168
168
|
newSlideIndex: number;
|
|
169
169
|
slideCount: number;
|
|
170
170
|
}>;
|
|
@@ -176,7 +176,7 @@ interface UpdateSlidePropertiesParams {
|
|
|
176
176
|
notes?: string;
|
|
177
177
|
hidden?: boolean;
|
|
178
178
|
}
|
|
179
|
-
declare function updateSlideProperties(ctx: ToolContext, params: UpdateSlidePropertiesParams): ToolResult<{
|
|
179
|
+
export declare function updateSlideProperties(ctx: ToolContext, params: UpdateSlidePropertiesParams): ToolResult<{
|
|
180
180
|
slideIndex: number;
|
|
181
181
|
}>;
|
|
182
182
|
interface SetSlideTransitionParams {
|
|
@@ -187,7 +187,7 @@ interface SetSlideTransitionParams {
|
|
|
187
187
|
advanceOnClick?: boolean;
|
|
188
188
|
advanceAfterMs?: number;
|
|
189
189
|
}
|
|
190
|
-
declare function setSlideTransition(ctx: ToolContext, params: SetSlideTransitionParams): ToolResult<{
|
|
190
|
+
export declare function setSlideTransition(ctx: ToolContext, params: SetSlideTransitionParams): ToolResult<{
|
|
191
191
|
slideIndex: number;
|
|
192
192
|
transitionType: string;
|
|
193
193
|
}>;
|
|
@@ -195,20 +195,20 @@ interface SetCanvasSizeParams {
|
|
|
195
195
|
width: number;
|
|
196
196
|
height: number;
|
|
197
197
|
}
|
|
198
|
-
declare function setCanvasSize(ctx: ToolContext, params: SetCanvasSizeParams): ToolResult<{
|
|
198
|
+
export declare function setCanvasSize(ctx: ToolContext, params: SetCanvasSizeParams): ToolResult<{
|
|
199
199
|
canvasWidth: number;
|
|
200
200
|
canvasHeight: number;
|
|
201
201
|
}>;
|
|
202
202
|
//#endregion
|
|
203
203
|
//#region src/tools/helpers.d.ts
|
|
204
|
-
declare function generateElementId(): string;
|
|
205
|
-
declare function generateSlideId(): string;
|
|
204
|
+
export declare function generateElementId(): string;
|
|
205
|
+
export declare function generateSlideId(): string;
|
|
206
206
|
/** Build a concise text representation of a slide element for tool output. */
|
|
207
|
-
declare function describeElement(el: PptxElement$1): Record<string, unknown>;
|
|
207
|
+
export declare function describeElement(el: PptxElement$1): Record<string, unknown>;
|
|
208
208
|
/** Extract text from a slide's elements for search purposes. */
|
|
209
|
-
declare function extractSlideText(slide: PptxSlide$1): string;
|
|
209
|
+
export declare function extractSlideText(slide: PptxSlide$1): string;
|
|
210
210
|
/** Validate slideIndex is within range, return error string or null. */
|
|
211
|
-
declare function validateSlideIndex(slideIndex: number, slideCount: number): string | null;
|
|
211
|
+
export declare function validateSlideIndex(slideIndex: number, slideCount: number): string | null;
|
|
212
212
|
//#endregion
|
|
213
213
|
//#region src/tools/element-tools.d.ts
|
|
214
214
|
interface AddElementParams {
|
|
@@ -245,7 +245,7 @@ interface AddElementResult {
|
|
|
245
245
|
elementId: string;
|
|
246
246
|
slideIndex: number;
|
|
247
247
|
}
|
|
248
|
-
declare function addElement(ctx: ToolContext, params: AddElementParams): ToolResult<AddElementResult>;
|
|
248
|
+
export declare function addElement(ctx: ToolContext, params: AddElementParams): ToolResult<AddElementResult>;
|
|
249
249
|
interface UpdateElementParams {
|
|
250
250
|
slideIndex: number;
|
|
251
251
|
elementId: string;
|
|
@@ -281,7 +281,7 @@ interface UpdateElementParams {
|
|
|
281
281
|
/** Accessibility title; see {@link applyElementTitle} for the accepted kinds. */
|
|
282
282
|
title?: string;
|
|
283
283
|
}
|
|
284
|
-
declare function updateElement(ctx: ToolContext, params: UpdateElementParams): ToolResult<{
|
|
284
|
+
export declare function updateElement(ctx: ToolContext, params: UpdateElementParams): ToolResult<{
|
|
285
285
|
elementId: string;
|
|
286
286
|
}>;
|
|
287
287
|
interface RenameElementParams {
|
|
@@ -290,7 +290,7 @@ interface RenameElementParams {
|
|
|
290
290
|
/** New element name (`cNvPr/@name`); an empty string clears the name. */
|
|
291
291
|
name: string;
|
|
292
292
|
}
|
|
293
|
-
declare function renameElement(ctx: ToolContext, params: RenameElementParams): ToolResult<{
|
|
293
|
+
export declare function renameElement(ctx: ToolContext, params: RenameElementParams): ToolResult<{
|
|
294
294
|
elementId: string;
|
|
295
295
|
name: string;
|
|
296
296
|
}>;
|
|
@@ -298,7 +298,7 @@ interface DeleteElementsParams {
|
|
|
298
298
|
slideIndex: number;
|
|
299
299
|
elementIds: string[];
|
|
300
300
|
}
|
|
301
|
-
declare function deleteElements(ctx: ToolContext, params: DeleteElementsParams): ToolResult<{
|
|
301
|
+
export declare function deleteElements(ctx: ToolContext, params: DeleteElementsParams): ToolResult<{
|
|
302
302
|
deletedCount: number;
|
|
303
303
|
}>;
|
|
304
304
|
interface ArrangeElementsParams {
|
|
@@ -309,7 +309,7 @@ interface ArrangeElementsParams {
|
|
|
309
309
|
elementId?: string;
|
|
310
310
|
layerAction?: 'bringToFront' | 'sendToBack' | 'bringForward' | 'sendBackward';
|
|
311
311
|
}
|
|
312
|
-
declare function arrangeElements(ctx: ToolContext, params: ArrangeElementsParams): ToolResult<{
|
|
312
|
+
export declare function arrangeElements(ctx: ToolContext, params: ArrangeElementsParams): ToolResult<{
|
|
313
313
|
slideIndex: number;
|
|
314
314
|
}>;
|
|
315
315
|
interface CloneElementParams {
|
|
@@ -322,7 +322,7 @@ interface CloneElementParams {
|
|
|
322
322
|
interface CloneElementResult {
|
|
323
323
|
clonedIds: string[];
|
|
324
324
|
}
|
|
325
|
-
declare function cloneElement(ctx: ToolContext, params: CloneElementParams): ToolResult<CloneElementResult>;
|
|
325
|
+
export declare function cloneElement(ctx: ToolContext, params: CloneElementParams): ToolResult<CloneElementResult>;
|
|
326
326
|
interface SetElementAnimationParams {
|
|
327
327
|
slideIndex: number;
|
|
328
328
|
elementId: string;
|
|
@@ -332,7 +332,7 @@ interface SetElementAnimationParams {
|
|
|
332
332
|
delayMs?: number;
|
|
333
333
|
order?: number;
|
|
334
334
|
}
|
|
335
|
-
declare function setElementAnimation(ctx: ToolContext, params: SetElementAnimationParams): ToolResult<{
|
|
335
|
+
export declare function setElementAnimation(ctx: ToolContext, params: SetElementAnimationParams): ToolResult<{
|
|
336
336
|
elementId: string;
|
|
337
337
|
}>;
|
|
338
338
|
interface GroupElementsParams {
|
|
@@ -342,7 +342,7 @@ interface GroupElementsParams {
|
|
|
342
342
|
interface GroupElementsResult {
|
|
343
343
|
groupId: string;
|
|
344
344
|
}
|
|
345
|
-
declare function groupElements(ctx: ToolContext, params: GroupElementsParams): ToolResult<GroupElementsResult>;
|
|
345
|
+
export declare function groupElements(ctx: ToolContext, params: GroupElementsParams): ToolResult<GroupElementsResult>;
|
|
346
346
|
interface UngroupElementsParams {
|
|
347
347
|
slideIndex: number;
|
|
348
348
|
groupElementId: string;
|
|
@@ -350,7 +350,7 @@ interface UngroupElementsParams {
|
|
|
350
350
|
interface UngroupElementsResult {
|
|
351
351
|
restoredIds: string[];
|
|
352
352
|
}
|
|
353
|
-
declare function ungroupElements(ctx: ToolContext, params: UngroupElementsParams): ToolResult<UngroupElementsResult>;
|
|
353
|
+
export declare function ungroupElements(ctx: ToolContext, params: UngroupElementsParams): ToolResult<UngroupElementsResult>;
|
|
354
354
|
interface BatchUpdateElementsParams {
|
|
355
355
|
slideIndex: number;
|
|
356
356
|
elementIds: string[];
|
|
@@ -362,7 +362,7 @@ interface BatchUpdateElementsParams {
|
|
|
362
362
|
opacity?: number;
|
|
363
363
|
hidden?: boolean;
|
|
364
364
|
}
|
|
365
|
-
declare function batchUpdateElements(ctx: ToolContext, params: BatchUpdateElementsParams): ToolResult<{
|
|
365
|
+
export declare function batchUpdateElements(ctx: ToolContext, params: BatchUpdateElementsParams): ToolResult<{
|
|
366
366
|
updatedCount: number;
|
|
367
367
|
}>;
|
|
368
368
|
//#endregion
|
|
@@ -376,7 +376,7 @@ interface UpdateTableCellsParams {
|
|
|
376
376
|
text: string;
|
|
377
377
|
}>;
|
|
378
378
|
}
|
|
379
|
-
declare function updateTableCells(ctx: ToolContext, params: UpdateTableCellsParams): ToolResult<{
|
|
379
|
+
export declare function updateTableCells(ctx: ToolContext, params: UpdateTableCellsParams): ToolResult<{
|
|
380
380
|
updatedCount: number;
|
|
381
381
|
}>;
|
|
382
382
|
interface ManageTableStructureParams {
|
|
@@ -387,7 +387,7 @@ interface ManageTableStructureParams {
|
|
|
387
387
|
referenceIndex?: number;
|
|
388
388
|
cellTexts?: string[];
|
|
389
389
|
}
|
|
390
|
-
declare function manageTableStructure(ctx: ToolContext, params: ManageTableStructureParams): ToolResult<{
|
|
390
|
+
export declare function manageTableStructure(ctx: ToolContext, params: ManageTableStructureParams): ToolResult<{
|
|
391
391
|
rowCount: number;
|
|
392
392
|
columnCount: number;
|
|
393
393
|
}>;
|
|
@@ -408,7 +408,7 @@ interface SetTableStyleSectionParams {
|
|
|
408
408
|
* left untouched (matches `applyTableStyleEntryToNode`'s merge semantics).
|
|
409
409
|
* Throws if `styleId` names no loaded style: use `create_table_style` first.
|
|
410
410
|
*/
|
|
411
|
-
declare function setTableStyleSection(ctx: ToolContext, params: SetTableStyleSectionParams): ToolResult<{
|
|
411
|
+
export declare function setTableStyleSection(ctx: ToolContext, params: SetTableStyleSectionParams): ToolResult<{
|
|
412
412
|
styleId: string;
|
|
413
413
|
section: TableStylePartName;
|
|
414
414
|
}>;
|
|
@@ -419,7 +419,7 @@ interface CreateTableStyleParams {
|
|
|
419
419
|
/** Repoint `ppt/tableStyles.xml`'s `@def` at the new style on save. */
|
|
420
420
|
setAsDefault?: boolean;
|
|
421
421
|
}
|
|
422
|
-
declare function createTableStyle(ctx: ToolContext, params: CreateTableStyleParams): ToolResult<{
|
|
422
|
+
export declare function createTableStyle(ctx: ToolContext, params: CreateTableStyleParams): ToolResult<{
|
|
423
423
|
styleId: string;
|
|
424
424
|
}>;
|
|
425
425
|
interface DeleteTableStyleParams {
|
|
@@ -427,7 +427,7 @@ interface DeleteTableStyleParams {
|
|
|
427
427
|
/** Delete even though a table on some slide still references this style. */
|
|
428
428
|
force?: boolean;
|
|
429
429
|
}
|
|
430
|
-
declare function deleteTableStyle(ctx: ToolContext, params: DeleteTableStyleParams): ToolResult<{
|
|
430
|
+
export declare function deleteTableStyle(ctx: ToolContext, params: DeleteTableStyleParams): ToolResult<{
|
|
431
431
|
deleted: boolean;
|
|
432
432
|
}>;
|
|
433
433
|
interface AssignTableStyleParams {
|
|
@@ -453,7 +453,7 @@ interface AssignTableStyleParams {
|
|
|
453
453
|
* both new and previously-loaded tables (`save-table-merge-helpers.ts`); this
|
|
454
454
|
* tool just exposes that assignment over MCP.
|
|
455
455
|
*/
|
|
456
|
-
declare function assignTableStyle(ctx: ToolContext, params: AssignTableStyleParams): ToolResult<{
|
|
456
|
+
export declare function assignTableStyle(ctx: ToolContext, params: AssignTableStyleParams): ToolResult<{
|
|
457
457
|
elementId: string;
|
|
458
458
|
styleId: string;
|
|
459
459
|
}>;
|
|
@@ -518,7 +518,7 @@ interface UpdateElementStyleParams {
|
|
|
518
518
|
*/
|
|
519
519
|
title?: string;
|
|
520
520
|
}
|
|
521
|
-
declare function updateElementStyle(ctx: ToolContext, params: UpdateElementStyleParams): ToolResult<{
|
|
521
|
+
export declare function updateElementStyle(ctx: ToolContext, params: UpdateElementStyleParams): ToolResult<{
|
|
522
522
|
elementId: string;
|
|
523
523
|
}>;
|
|
524
524
|
interface AccessibilityIssue {
|
|
@@ -535,7 +535,7 @@ interface AccessibilityCheckResult {
|
|
|
535
535
|
infoCount: number;
|
|
536
536
|
issues: AccessibilityIssue[];
|
|
537
537
|
}
|
|
538
|
-
declare function runAccessibilityCheck(ctx: ToolContext): ToolResult<AccessibilityCheckResult>;
|
|
538
|
+
export declare function runAccessibilityCheck(ctx: ToolContext): ToolResult<AccessibilityCheckResult>;
|
|
539
539
|
//#endregion
|
|
540
540
|
//#region src/tools/content-tools.d.ts
|
|
541
541
|
interface FindTextParams {
|
|
@@ -556,7 +556,7 @@ interface FindTextResult {
|
|
|
556
556
|
matchCount: number;
|
|
557
557
|
matches: TextMatch[];
|
|
558
558
|
}
|
|
559
|
-
declare function findText(ctx: ToolContext, params: FindTextParams): ToolResult<FindTextResult>;
|
|
559
|
+
export declare function findText(ctx: ToolContext, params: FindTextParams): ToolResult<FindTextResult>;
|
|
560
560
|
interface ReplaceTextParams {
|
|
561
561
|
query: string;
|
|
562
562
|
replacement: string;
|
|
@@ -569,7 +569,7 @@ interface ReplaceTextResult {
|
|
|
569
569
|
replacement: string;
|
|
570
570
|
replacementCount: number;
|
|
571
571
|
}
|
|
572
|
-
declare function replaceText(ctx: ToolContext, params: ReplaceTextParams): ToolResult<ReplaceTextResult>;
|
|
572
|
+
export declare function replaceText(ctx: ToolContext, params: ReplaceTextParams): ToolResult<ReplaceTextResult>;
|
|
573
573
|
interface ManageCommentsParams {
|
|
574
574
|
action: 'list' | 'add' | 'delete' | 'resolve';
|
|
575
575
|
slideIndex?: number;
|
|
@@ -593,7 +593,7 @@ interface ManageCommentsResult {
|
|
|
593
593
|
commentId?: string;
|
|
594
594
|
count?: number;
|
|
595
595
|
}
|
|
596
|
-
declare function manageComments(ctx: ToolContext, params: ManageCommentsParams): ToolResult<ManageCommentsResult>;
|
|
596
|
+
export declare function manageComments(ctx: ToolContext, params: ManageCommentsParams): ToolResult<ManageCommentsResult>;
|
|
597
597
|
//#endregion
|
|
598
598
|
//#region src/tools/conversion-tools.d.ts
|
|
599
599
|
interface ConvertToMarkdownParams {
|
|
@@ -634,7 +634,7 @@ interface ConvertToMarkdownResult {
|
|
|
634
634
|
totalSlides: number;
|
|
635
635
|
imagesExtracted: number;
|
|
636
636
|
}
|
|
637
|
-
declare function convertToMarkdown(ctx: ToolContext, params: ConvertToMarkdownParams): Promise<ToolResult<ConvertToMarkdownResult>>;
|
|
637
|
+
export declare function convertToMarkdown(ctx: ToolContext, params: ConvertToMarkdownParams): Promise<ToolResult<ConvertToMarkdownResult>>;
|
|
638
638
|
//#endregion
|
|
639
639
|
//#region src/tools/theme-tools.d.ts
|
|
640
640
|
interface ThemeInfo {
|
|
@@ -643,7 +643,7 @@ interface ThemeInfo {
|
|
|
643
643
|
fontScheme?: PptxThemeFontScheme;
|
|
644
644
|
availablePresets: string[];
|
|
645
645
|
}
|
|
646
|
-
declare function getThemeInfo(ctx: ToolContext): ToolResult<ThemeInfo>;
|
|
646
|
+
export declare function getThemeInfo(ctx: ToolContext): ToolResult<ThemeInfo>;
|
|
647
647
|
interface ApplyThemePresetParams {
|
|
648
648
|
presetName: string;
|
|
649
649
|
}
|
|
@@ -651,7 +651,7 @@ interface ApplyThemePresetResult {
|
|
|
651
651
|
appliedPreset: string;
|
|
652
652
|
colorScheme: PptxThemeColorScheme;
|
|
653
653
|
}
|
|
654
|
-
declare function applyThemePreset(ctx: ToolContext, params: ApplyThemePresetParams): ToolResult<ApplyThemePresetResult>;
|
|
654
|
+
export declare function applyThemePreset(ctx: ToolContext, params: ApplyThemePresetParams): ToolResult<ApplyThemePresetResult>;
|
|
655
655
|
interface UpdateThemeColorsParams {
|
|
656
656
|
dk1?: string;
|
|
657
657
|
lt1?: string;
|
|
@@ -666,14 +666,14 @@ interface UpdateThemeColorsParams {
|
|
|
666
666
|
hlink?: string;
|
|
667
667
|
folHlink?: string;
|
|
668
668
|
}
|
|
669
|
-
declare function updateThemeColors(ctx: ToolContext, params: UpdateThemeColorsParams): ToolResult<{
|
|
669
|
+
export declare function updateThemeColors(ctx: ToolContext, params: UpdateThemeColorsParams): ToolResult<{
|
|
670
670
|
colorScheme: PptxThemeColorScheme;
|
|
671
671
|
}>;
|
|
672
672
|
interface UpdateThemeFontsParams {
|
|
673
673
|
majorFont?: string;
|
|
674
674
|
minorFont?: string;
|
|
675
675
|
}
|
|
676
|
-
declare function updateThemeFonts(ctx: ToolContext, params: UpdateThemeFontsParams): ToolResult<{
|
|
676
|
+
export declare function updateThemeFonts(ctx: ToolContext, params: UpdateThemeFontsParams): ToolResult<{
|
|
677
677
|
fontScheme: PptxThemeFontScheme;
|
|
678
678
|
}>;
|
|
679
679
|
//#endregion
|
|
@@ -701,7 +701,7 @@ interface UpdateChartParams {
|
|
|
701
701
|
};
|
|
702
702
|
categories?: string[];
|
|
703
703
|
}
|
|
704
|
-
declare function updateChart(ctx: ToolContext, params: UpdateChartParams): ToolResult<{
|
|
704
|
+
export declare function updateChart(ctx: ToolContext, params: UpdateChartParams): ToolResult<{
|
|
705
705
|
elementId: string;
|
|
706
706
|
}>;
|
|
707
707
|
interface AddChartSeriesParams {
|
|
@@ -711,7 +711,7 @@ interface AddChartSeriesParams {
|
|
|
711
711
|
values: number[];
|
|
712
712
|
color?: string;
|
|
713
713
|
}
|
|
714
|
-
declare function addChartSeriesT(ctx: ToolContext, params: AddChartSeriesParams): ToolResult<{
|
|
714
|
+
export declare function addChartSeriesT(ctx: ToolContext, params: AddChartSeriesParams): ToolResult<{
|
|
715
715
|
elementId: string;
|
|
716
716
|
seriesCount: number;
|
|
717
717
|
}>;
|
|
@@ -720,7 +720,7 @@ interface RemoveChartSeriesParams {
|
|
|
720
720
|
elementId: string;
|
|
721
721
|
seriesIndex: number;
|
|
722
722
|
}
|
|
723
|
-
declare function removeChartSeriesT(ctx: ToolContext, params: RemoveChartSeriesParams): ToolResult<{
|
|
723
|
+
export declare function removeChartSeriesT(ctx: ToolContext, params: RemoveChartSeriesParams): ToolResult<{
|
|
724
724
|
elementId: string;
|
|
725
725
|
seriesCount: number;
|
|
726
726
|
}>;
|
|
@@ -730,7 +730,7 @@ interface UpdateChartSeriesDataParams {
|
|
|
730
730
|
seriesIndex: number;
|
|
731
731
|
values: number[];
|
|
732
732
|
}
|
|
733
|
-
declare function updateChartSeriesData(ctx: ToolContext, params: UpdateChartSeriesDataParams): ToolResult<{
|
|
733
|
+
export declare function updateChartSeriesData(ctx: ToolContext, params: UpdateChartSeriesDataParams): ToolResult<{
|
|
734
734
|
elementId: string;
|
|
735
735
|
}>;
|
|
736
736
|
interface CreateChartParams {
|
|
@@ -756,7 +756,7 @@ interface CreateChartResult {
|
|
|
756
756
|
elementId: string;
|
|
757
757
|
slideIndex: number;
|
|
758
758
|
}
|
|
759
|
-
declare function createChart(ctx: ToolContext, params: CreateChartParams): ToolResult<CreateChartResult>;
|
|
759
|
+
export declare function createChart(ctx: ToolContext, params: CreateChartParams): ToolResult<CreateChartResult>;
|
|
760
760
|
//#endregion
|
|
761
761
|
//#region src/tools/chart-formatting-tools.d.ts
|
|
762
762
|
interface FormatChartDataPointParams {
|
|
@@ -779,7 +779,7 @@ interface FormatChartDataPointParams {
|
|
|
779
779
|
fillColor?: string;
|
|
780
780
|
} | null;
|
|
781
781
|
}
|
|
782
|
-
declare function formatChartDataPoint(ctx: ToolContext, params: FormatChartDataPointParams): ToolResult<{
|
|
782
|
+
export declare function formatChartDataPoint(ctx: ToolContext, params: FormatChartDataPointParams): ToolResult<{
|
|
783
783
|
elementId: string;
|
|
784
784
|
}>;
|
|
785
785
|
interface FormatChartDataLabelParams {
|
|
@@ -813,7 +813,7 @@ interface FormatChartDataLabelParams {
|
|
|
813
813
|
color?: string;
|
|
814
814
|
} | null;
|
|
815
815
|
}
|
|
816
|
-
declare function formatChartDataLabel(ctx: ToolContext, params: FormatChartDataLabelParams): ToolResult<{
|
|
816
|
+
export declare function formatChartDataLabel(ctx: ToolContext, params: FormatChartDataLabelParams): ToolResult<{
|
|
817
817
|
elementId: string;
|
|
818
818
|
}>;
|
|
819
819
|
interface FormatChartSeriesParams {
|
|
@@ -843,7 +843,7 @@ interface FormatChartSeriesParams {
|
|
|
843
843
|
dashStyle?: string;
|
|
844
844
|
}) | null;
|
|
845
845
|
}
|
|
846
|
-
declare function formatChartSeries(ctx: ToolContext, params: FormatChartSeriesParams): ToolResult<{
|
|
846
|
+
export declare function formatChartSeries(ctx: ToolContext, params: FormatChartSeriesParams): ToolResult<{
|
|
847
847
|
elementId: string;
|
|
848
848
|
}>;
|
|
849
849
|
interface SetChartHelperLineParams {
|
|
@@ -857,7 +857,7 @@ interface SetChartHelperLineParams {
|
|
|
857
857
|
dashStyle?: string;
|
|
858
858
|
} | null;
|
|
859
859
|
}
|
|
860
|
-
declare function setChartHelperLineT(ctx: ToolContext, params: SetChartHelperLineParams): ToolResult<{
|
|
860
|
+
export declare function setChartHelperLineT(ctx: ToolContext, params: SetChartHelperLineParams): ToolResult<{
|
|
861
861
|
elementId: string;
|
|
862
862
|
}>;
|
|
863
863
|
interface SetChartColorMapOverrideParams {
|
|
@@ -866,7 +866,7 @@ interface SetChartColorMapOverrideParams {
|
|
|
866
866
|
/** `null` removes the override entirely. */
|
|
867
867
|
overrides: Record<string, string> | null;
|
|
868
868
|
}
|
|
869
|
-
declare function setChartColorMapOverrideT(ctx: ToolContext, params: SetChartColorMapOverrideParams): ToolResult<{
|
|
869
|
+
export declare function setChartColorMapOverrideT(ctx: ToolContext, params: SetChartColorMapOverrideParams): ToolResult<{
|
|
870
870
|
elementId: string;
|
|
871
871
|
}>;
|
|
872
872
|
//#endregion
|
|
@@ -898,7 +898,7 @@ interface ListChartUserShapesParams {
|
|
|
898
898
|
slideIndex: number;
|
|
899
899
|
elementId: string;
|
|
900
900
|
}
|
|
901
|
-
declare function listChartUserShapesT(ctx: ToolContext, params: ListChartUserShapesParams): ToolResult<{
|
|
901
|
+
export declare function listChartUserShapesT(ctx: ToolContext, params: ListChartUserShapesParams): ToolResult<{
|
|
902
902
|
shapes: PptxChartUserShape[];
|
|
903
903
|
}>;
|
|
904
904
|
interface AddChartUserShapeParams {
|
|
@@ -906,7 +906,7 @@ interface AddChartUserShapeParams {
|
|
|
906
906
|
elementId: string;
|
|
907
907
|
shape: ChartUserShapeInput;
|
|
908
908
|
}
|
|
909
|
-
declare function addChartUserShapeT(ctx: ToolContext, params: AddChartUserShapeParams): ToolResult<{
|
|
909
|
+
export declare function addChartUserShapeT(ctx: ToolContext, params: AddChartUserShapeParams): ToolResult<{
|
|
910
910
|
elementId: string;
|
|
911
911
|
index: number;
|
|
912
912
|
}>;
|
|
@@ -916,7 +916,7 @@ interface UpdateChartUserShapeParams {
|
|
|
916
916
|
index: number;
|
|
917
917
|
patch: Partial<ChartUserShapeInput>;
|
|
918
918
|
}
|
|
919
|
-
declare function updateChartUserShapeT(ctx: ToolContext, params: UpdateChartUserShapeParams): ToolResult<{
|
|
919
|
+
export declare function updateChartUserShapeT(ctx: ToolContext, params: UpdateChartUserShapeParams): ToolResult<{
|
|
920
920
|
elementId: string;
|
|
921
921
|
}>;
|
|
922
922
|
interface RemoveChartUserShapeParams {
|
|
@@ -924,7 +924,7 @@ interface RemoveChartUserShapeParams {
|
|
|
924
924
|
elementId: string;
|
|
925
925
|
index: number;
|
|
926
926
|
}
|
|
927
|
-
declare function removeChartUserShapeT(ctx: ToolContext, params: RemoveChartUserShapeParams): ToolResult<{
|
|
927
|
+
export declare function removeChartUserShapeT(ctx: ToolContext, params: RemoveChartUserShapeParams): ToolResult<{
|
|
928
928
|
elementId: string;
|
|
929
929
|
}>;
|
|
930
930
|
//#endregion
|
|
@@ -949,7 +949,7 @@ interface ManageSmartArtResult {
|
|
|
949
949
|
nodes?: SmartArtNodeInfo[];
|
|
950
950
|
decomposedCount?: number;
|
|
951
951
|
}
|
|
952
|
-
declare function manageSmartArt(ctx: ToolContext, params: ManageSmartArtParams): ToolResult<ManageSmartArtResult>;
|
|
952
|
+
export declare function manageSmartArt(ctx: ToolContext, params: ManageSmartArtParams): ToolResult<ManageSmartArtResult>;
|
|
953
953
|
//#endregion
|
|
954
954
|
//#region src/tools/merge-tools.d.ts
|
|
955
955
|
interface MergePresentationParams {
|
|
@@ -966,19 +966,19 @@ interface MergePresentationResult {
|
|
|
966
966
|
slidesAdded: number;
|
|
967
967
|
totalSlides: number;
|
|
968
968
|
}
|
|
969
|
-
declare function mergePresentationT(ctx: ToolContext, params: MergePresentationParams): ToolResult<MergePresentationResult>;
|
|
969
|
+
export declare function mergePresentationT(ctx: ToolContext, params: MergePresentationParams): ToolResult<MergePresentationResult>;
|
|
970
970
|
interface DiffPresentationsParams {
|
|
971
971
|
/** The other presentation data to diff against. */
|
|
972
972
|
otherData: PptxData$1;
|
|
973
973
|
}
|
|
974
|
-
declare function diffPresentationsT(ctx: ToolContext, params: DiffPresentationsParams): ToolResult<PresentationDiff>;
|
|
974
|
+
export declare function diffPresentationsT(ctx: ToolContext, params: DiffPresentationsParams): ToolResult<PresentationDiff>;
|
|
975
975
|
//#endregion
|
|
976
976
|
//#region src/tools/template-tools.d.ts
|
|
977
977
|
interface FindPlaceholdersResult {
|
|
978
978
|
placeholders: string[];
|
|
979
979
|
count: number;
|
|
980
980
|
}
|
|
981
|
-
declare function findPlaceholdersT(ctx: ToolContext): ToolResult<FindPlaceholdersResult>;
|
|
981
|
+
export declare function findPlaceholdersT(ctx: ToolContext): ToolResult<FindPlaceholdersResult>;
|
|
982
982
|
interface ApplyTemplateParams {
|
|
983
983
|
data: Record<string, unknown>;
|
|
984
984
|
}
|
|
@@ -986,7 +986,7 @@ interface ApplyTemplateResult {
|
|
|
986
986
|
applied: boolean;
|
|
987
987
|
slideCount: number;
|
|
988
988
|
}
|
|
989
|
-
declare function applyTemplateT(ctx: ToolContext, params: ApplyTemplateParams): ToolResult<ApplyTemplateResult>;
|
|
989
|
+
export declare function applyTemplateT(ctx: ToolContext, params: ApplyTemplateParams): ToolResult<ApplyTemplateResult>;
|
|
990
990
|
//#endregion
|
|
991
991
|
//#region src/tools/metadata-tools.d.ts
|
|
992
992
|
interface MetadataResult {
|
|
@@ -995,7 +995,7 @@ interface MetadataResult {
|
|
|
995
995
|
customProperties?: PptxCustomProperty[];
|
|
996
996
|
slideCount: number;
|
|
997
997
|
}
|
|
998
|
-
declare function getMetadata(ctx: ToolContext): ToolResult<MetadataResult>;
|
|
998
|
+
export declare function getMetadata(ctx: ToolContext): ToolResult<MetadataResult>;
|
|
999
999
|
interface UpdateMetadataParams {
|
|
1000
1000
|
title?: string;
|
|
1001
1001
|
subject?: string;
|
|
@@ -1011,7 +1011,7 @@ interface UpdateMetadataParams {
|
|
|
1011
1011
|
value: string | number | boolean;
|
|
1012
1012
|
}>;
|
|
1013
1013
|
}
|
|
1014
|
-
declare function updateMetadata(ctx: ToolContext, params: UpdateMetadataParams): ToolResult<{
|
|
1014
|
+
export declare function updateMetadata(ctx: ToolContext, params: UpdateMetadataParams): ToolResult<{
|
|
1015
1015
|
updated: string[];
|
|
1016
1016
|
}>;
|
|
1017
1017
|
//#endregion
|
|
@@ -1037,7 +1037,7 @@ interface ManageSectionsResult {
|
|
|
1037
1037
|
section?: SectionInfo | null;
|
|
1038
1038
|
success?: boolean;
|
|
1039
1039
|
}
|
|
1040
|
-
declare function manageSections(ctx: ToolContext, params: ManageSectionsParams): ToolResult<ManageSectionsResult>;
|
|
1040
|
+
export declare function manageSections(ctx: ToolContext, params: ManageSectionsParams): ToolResult<ManageSectionsResult>;
|
|
1041
1041
|
//#endregion
|
|
1042
1042
|
//#region src/tools/export-tools.d.ts
|
|
1043
1043
|
interface ExportToSvgParams {
|
|
@@ -1050,7 +1050,7 @@ interface ExportToSvgResult {
|
|
|
1050
1050
|
svgStrings: string[];
|
|
1051
1051
|
slideCount: number;
|
|
1052
1052
|
}
|
|
1053
|
-
declare function exportToSvg(ctx: ToolContext, params: ExportToSvgParams): ToolResult<ExportToSvgResult>;
|
|
1053
|
+
export declare function exportToSvg(ctx: ToolContext, params: ExportToSvgParams): ToolResult<ExportToSvgResult>;
|
|
1054
1054
|
interface ExportSlideSvgParams {
|
|
1055
1055
|
slideIndex: number;
|
|
1056
1056
|
defaultFontFamily?: string;
|
|
@@ -1060,7 +1060,7 @@ interface ExportSlideSvgResult {
|
|
|
1060
1060
|
svg: string;
|
|
1061
1061
|
slideIndex: number;
|
|
1062
1062
|
}
|
|
1063
|
-
declare function exportSlideSvg(ctx: ToolContext, params: ExportSlideSvgParams): ToolResult<ExportSlideSvgResult>;
|
|
1063
|
+
export declare function exportSlideSvg(ctx: ToolContext, params: ExportSlideSvgParams): ToolResult<ExportSlideSvgResult>;
|
|
1064
1064
|
//#endregion
|
|
1065
1065
|
//#region src/tools/json-tools.d.ts
|
|
1066
1066
|
interface ExportToJsonParams {
|
|
@@ -1080,7 +1080,7 @@ interface ExportToJsonResult {
|
|
|
1080
1080
|
* Serialize the presentation to the portable, self-contained
|
|
1081
1081
|
* `pptx-viewer-json` document format (binary assets embedded as base64).
|
|
1082
1082
|
*/
|
|
1083
|
-
declare function exportToJson(ctx: ToolContext, params: ExportToJsonParams): ToolResult<ExportToJsonResult>;
|
|
1083
|
+
export declare function exportToJson(ctx: ToolContext, params: ExportToJsonParams): ToolResult<ExportToJsonResult>;
|
|
1084
1084
|
interface ImportFromJsonParams {
|
|
1085
1085
|
/** The `pptx-viewer-json` document text to import. */
|
|
1086
1086
|
json: string;
|
|
@@ -1097,7 +1097,7 @@ interface ImportFromJsonResult {
|
|
|
1097
1097
|
* `pptxData` object is mutated in place so hosts holding a reference (viewer
|
|
1098
1098
|
* bridges, the save pipeline) observe the imported deck.
|
|
1099
1099
|
*/
|
|
1100
|
-
declare function importFromJson(ctx: ToolContext, params: ImportFromJsonParams): ToolResult<ImportFromJsonResult>;
|
|
1100
|
+
export declare function importFromJson(ctx: ToolContext, params: ImportFromJsonParams): ToolResult<ImportFromJsonResult>;
|
|
1101
1101
|
//#endregion
|
|
1102
1102
|
//#region src/tools/hyperlink-tools.d.ts
|
|
1103
1103
|
interface ManageHyperlinksParams {
|
|
@@ -1123,7 +1123,7 @@ interface ManageHyperlinksResult {
|
|
|
1123
1123
|
hyperlinks?: HyperlinkInfo[];
|
|
1124
1124
|
elementId?: string;
|
|
1125
1125
|
}
|
|
1126
|
-
declare function manageHyperlinks(ctx: ToolContext, params: ManageHyperlinksParams): ToolResult<ManageHyperlinksResult>;
|
|
1126
|
+
export declare function manageHyperlinks(ctx: ToolContext, params: ManageHyperlinksParams): ToolResult<ManageHyperlinksResult>;
|
|
1127
1127
|
//#endregion
|
|
1128
1128
|
//#region src/tools/geometry-tools.d.ts
|
|
1129
1129
|
interface ReplaceGeometryParams {
|
|
@@ -1140,7 +1140,7 @@ interface ReplaceGeometryParams {
|
|
|
1140
1140
|
/** Adjustment values for the new geometry. */
|
|
1141
1141
|
adjustments?: Record<string, number>;
|
|
1142
1142
|
}
|
|
1143
|
-
declare function replaceGeometry(ctx: ToolContext, params: ReplaceGeometryParams): ToolResult<{
|
|
1143
|
+
export declare function replaceGeometry(ctx: ToolContext, params: ReplaceGeometryParams): ToolResult<{
|
|
1144
1144
|
elementId: string;
|
|
1145
1145
|
geometryType: string;
|
|
1146
1146
|
}>;
|
|
@@ -1156,7 +1156,7 @@ interface SetElementLockParams {
|
|
|
1156
1156
|
noSelect?: boolean;
|
|
1157
1157
|
noTextEdit?: boolean;
|
|
1158
1158
|
}
|
|
1159
|
-
declare function setElementLockT(ctx: ToolContext, params: SetElementLockParams): ToolResult<{
|
|
1159
|
+
export declare function setElementLockT(ctx: ToolContext, params: SetElementLockParams): ToolResult<{
|
|
1160
1160
|
elementId: string;
|
|
1161
1161
|
locked: boolean;
|
|
1162
1162
|
}>;
|
|
@@ -1179,18 +1179,18 @@ interface ValidatePresentationResult {
|
|
|
1179
1179
|
* handling: the MCP server must pass rawBytes alongside the context.
|
|
1180
1180
|
* We store a reference in ToolContext via resolveMedia or pass it directly.
|
|
1181
1181
|
*/
|
|
1182
|
-
declare function validatePresentation(rawBytes: ArrayBuffer): Promise<ValidatePresentationResult>;
|
|
1182
|
+
export declare function validatePresentation(rawBytes: ArrayBuffer): Promise<ValidatePresentationResult>;
|
|
1183
1183
|
interface RepairPresentationResult {
|
|
1184
1184
|
repairCount: number;
|
|
1185
1185
|
repairs: string[];
|
|
1186
1186
|
}
|
|
1187
|
-
declare function repairPresentation(rawBytes: ArrayBuffer): Promise<{
|
|
1187
|
+
export declare function repairPresentation(rawBytes: ArrayBuffer): Promise<{
|
|
1188
1188
|
result: RepairPresentationResult;
|
|
1189
1189
|
repairedBytes: ArrayBuffer;
|
|
1190
1190
|
}>;
|
|
1191
1191
|
//#endregion
|
|
1192
1192
|
//#region src/tools/presentation-tools.d.ts
|
|
1193
|
-
declare function getPresentationProperties(ctx: ToolContext): ToolResult<{
|
|
1193
|
+
export declare function getPresentationProperties(ctx: ToolContext): ToolResult<{
|
|
1194
1194
|
properties: PptxPresentationProperties | undefined;
|
|
1195
1195
|
slideCount: number;
|
|
1196
1196
|
width?: number;
|
|
@@ -1207,7 +1207,7 @@ interface UpdatePresentationPropertiesParams {
|
|
|
1207
1207
|
showSlidesTo?: number;
|
|
1208
1208
|
penColor?: string;
|
|
1209
1209
|
}
|
|
1210
|
-
declare function updatePresentationProperties(ctx: ToolContext, params: UpdatePresentationPropertiesParams): ToolResult<{
|
|
1210
|
+
export declare function updatePresentationProperties(ctx: ToolContext, params: UpdatePresentationPropertiesParams): ToolResult<{
|
|
1211
1211
|
properties: PptxPresentationProperties;
|
|
1212
1212
|
}>;
|
|
1213
1213
|
//#endregion
|
|
@@ -1221,7 +1221,7 @@ interface GetLayoutsResult {
|
|
|
1221
1221
|
layouts: LayoutInfo[];
|
|
1222
1222
|
count: number;
|
|
1223
1223
|
}
|
|
1224
|
-
declare function getLayouts(ctx: ToolContext): ToolResult<GetLayoutsResult>;
|
|
1224
|
+
export declare function getLayouts(ctx: ToolContext): ToolResult<GetLayoutsResult>;
|
|
1225
1225
|
interface ApplyLayoutParams {
|
|
1226
1226
|
slideIndex: number;
|
|
1227
1227
|
layoutName?: string;
|
|
@@ -1231,7 +1231,102 @@ interface ApplyLayoutResult {
|
|
|
1231
1231
|
slideIndex: number;
|
|
1232
1232
|
layoutName: string;
|
|
1233
1233
|
}
|
|
1234
|
-
declare function applyLayout(ctx: ToolContext, params: ApplyLayoutParams): ToolResult<ApplyLayoutResult>;
|
|
1234
|
+
export declare function applyLayout(ctx: ToolContext, params: ApplyLayoutParams): ToolResult<ApplyLayoutResult>;
|
|
1235
1235
|
//#endregion
|
|
1236
|
-
|
|
1236
|
+
//#region src/tools/ole-tools.d.ts
|
|
1237
|
+
interface GetOleContentParams {
|
|
1238
|
+
slideIndex: number;
|
|
1239
|
+
elementId: string;
|
|
1240
|
+
}
|
|
1241
|
+
interface GetOleContentResult {
|
|
1242
|
+
elementId: string;
|
|
1243
|
+
/** Which in-place editor applies to the object's current payload. */
|
|
1244
|
+
kind: OlePayloadEditorKind;
|
|
1245
|
+
/** Whether `ole_set_*` can act on this object; `false` steers to `ole_replace_file`. */
|
|
1246
|
+
editable: boolean;
|
|
1247
|
+
/** Human-readable note, set when `editable` is `false`. */
|
|
1248
|
+
message?: string;
|
|
1249
|
+
/** Present when `kind` is `sheet-xlsx` or `sheet-xls`. */
|
|
1250
|
+
sheet?: OleSheetGrid;
|
|
1251
|
+
/** Present when `kind` is `document-docx` or `document-doc`. */
|
|
1252
|
+
paragraphs?: string[];
|
|
1253
|
+
/** Present when `kind` is `deck-pptx`: every slide's text-element inventory. */
|
|
1254
|
+
deckSlides?: OleNestedDeckSlideDetail[];
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Describe an OLE object's editable content: the resolved payload kind, plus
|
|
1258
|
+
* whichever of the sheet grid / paragraph list / nested-deck slide summaries
|
|
1259
|
+
* applies. `file` (anything unsupported, or a missing/unreadable payload, or
|
|
1260
|
+
* a `document-doc` this editor declined to touch, see `getOleDocumentParagraphs`
|
|
1261
|
+
* in `pptx-viewer-core`) comes back as not editable in place; the caller
|
|
1262
|
+
* should use {@link replaceOleFileT} instead.
|
|
1263
|
+
*/
|
|
1264
|
+
export declare function getOleContent(ctx: ToolContext, params: GetOleContentParams): Promise<ToolResult<GetOleContentResult>>;
|
|
1265
|
+
interface SetOleContentResult {
|
|
1266
|
+
elementId: string;
|
|
1267
|
+
/** `false` when the edit was a no-op (e.g. value unchanged, or wrong payload kind). */
|
|
1268
|
+
changed: boolean;
|
|
1269
|
+
}
|
|
1270
|
+
interface SetOleSheetCellParams {
|
|
1271
|
+
slideIndex: number;
|
|
1272
|
+
elementId: string;
|
|
1273
|
+
row: number;
|
|
1274
|
+
col: number;
|
|
1275
|
+
value: string;
|
|
1276
|
+
}
|
|
1277
|
+
/** Edit one cell of an Excel-payload (`.xlsx`/`.xls`) OLE object's first worksheet. */
|
|
1278
|
+
export declare function setOleSheetCell(ctx: ToolContext, params: SetOleSheetCellParams): Promise<ToolResult<SetOleContentResult>>;
|
|
1279
|
+
interface SetOleDocumentParagraphParams {
|
|
1280
|
+
slideIndex: number;
|
|
1281
|
+
elementId: string;
|
|
1282
|
+
paragraphIndex: number;
|
|
1283
|
+
text: string;
|
|
1284
|
+
}
|
|
1285
|
+
/** Replace one paragraph's text in a Word-payload (`.docx` or legacy binary `.doc`) OLE object. */
|
|
1286
|
+
export declare function setOleDocumentParagraph(ctx: ToolContext, params: SetOleDocumentParagraphParams): Promise<ToolResult<SetOleContentResult>>;
|
|
1287
|
+
interface SetOleDeckSlideTitleParams {
|
|
1288
|
+
slideIndex: number;
|
|
1289
|
+
elementId: string;
|
|
1290
|
+
deckSlideIndex: number;
|
|
1291
|
+
/** The id of the text-bearing shape to edit, from `ole_get_content`'s `deckSlides[n].elements[i].elementId`. */
|
|
1292
|
+
deckElementId: string;
|
|
1293
|
+
title: string;
|
|
1294
|
+
}
|
|
1295
|
+
/**
|
|
1296
|
+
* Replace one specific text-bearing shape's text on one slide of a
|
|
1297
|
+
* nested-deck (embedded PowerPoint) OLE object: a full round-trip through
|
|
1298
|
+
* the nested deck's own `PptxHandler` load/save, so any text-bearing shape
|
|
1299
|
+
* on any slide is a real edit target, not only a fixed "title" slot. Call
|
|
1300
|
+
* `ole_get_content` first to discover each slide's `elementId`s.
|
|
1301
|
+
*/
|
|
1302
|
+
export declare function setOleDeckSlideTitle(ctx: ToolContext, params: SetOleDeckSlideTitleParams): Promise<ToolResult<SetOleContentResult>>;
|
|
1303
|
+
interface SetOleObjectNameParams {
|
|
1304
|
+
slideIndex: number;
|
|
1305
|
+
elementId: string;
|
|
1306
|
+
/** New Object Name (`p:oleObj/@name`); blank/whitespace clears it. */
|
|
1307
|
+
name: string;
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* Rename an OLE object's Object Name (`p:oleObj/@name`). When the object is
|
|
1311
|
+
* displayed `showAsIcon`, this also regenerates the baked-in icon caption
|
|
1312
|
+
* (see `setOleObjectName` in `pptx-viewer-core`) so the new name is visible
|
|
1313
|
+
* once the deck is reopened in real PowerPoint.
|
|
1314
|
+
*/
|
|
1315
|
+
export declare function setOleObjectNameT(ctx: ToolContext, params: SetOleObjectNameParams): Promise<ToolResult<SetOleContentResult>>;
|
|
1316
|
+
interface ReplaceOleFileParams {
|
|
1317
|
+
slideIndex: number;
|
|
1318
|
+
elementId: string;
|
|
1319
|
+
/** New payload as a base64 data URL, e.g. `data:application/pdf;base64,...`. */
|
|
1320
|
+
fileData: string;
|
|
1321
|
+
/** Optional new file name; also updates the resolved MIME type. */
|
|
1322
|
+
fileName?: string;
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* Replace an OLE object's payload wholesale with an arbitrary file. Always
|
|
1326
|
+
* available regardless of the object's current kind, and the only edit
|
|
1327
|
+
* available for a generic "Package" object or an unsupported format.
|
|
1328
|
+
*/
|
|
1329
|
+
export declare function replaceOleFileT(ctx: ToolContext, params: ReplaceOleFileParams): Promise<ToolResult<SetOleContentResult>>;
|
|
1330
|
+
//#endregion
|
|
1331
|
+
export { type AccessibilityCheckResult, type AccessibilityIssue, type AddChartSeriesParams, type AddChartUserShapeParams, type AddElementParams, type AddElementResult, type AddSlideParams, type AddSlideResult, type ApplyLayoutParams, type ApplyLayoutResult, type ApplyTemplateParams, type ApplyTemplateResult, type ApplyThemePresetParams, type ApplyThemePresetResult, type ArrangeElementsParams, type AssignTableStyleParams, type BatchUpdateElementsParams, type ChartUserShapeInput, type CloneElementParams, type CloneElementResult, type CollaborationProvider, type CommentInfo, type ConvertToMarkdownParams, type ConvertToMarkdownResult, type CreateChartParams, type CreateChartResult, type CreateTableStyleParams, type DeleteElementsParams, type DeleteSlidesParams, type DeleteSlidesResult, type DeleteTableStyleParams, type DiffPresentationsParams, type DuplicateSlideParams, type ExecutionContext, type ExportSlideSvgParams, type ExportSlideSvgResult, type ExportToJsonParams, type ExportToJsonResult, type ExportToSvgParams, type ExportToSvgResult, type FileSystemProvider, type FindPlaceholdersResult, type FindTextParams, type FindTextResult, type FormatChartDataLabelParams, type FormatChartDataPointParams, type FormatChartSeriesParams, type GetLayoutsResult, type GetOleContentParams, type GetOleContentResult, type GetSlideResult, type GroupElementsParams, type GroupElementsResult, type HyperlinkInfo, type ImportFromJsonParams, type ImportFromJsonResult, type LayoutInfo, type ListChartUserShapesParams, 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 RemoveChartUserShapeParams, type RenameElementParams, type ReorderSlidesParams, type RepairPresentationResult, type ReplaceGeometryParams, type ReplaceOleFileParams, type ReplaceTextParams, type ReplaceTextResult, type SectionInfo, type SetCanvasSizeParams, type SetChartColorMapOverrideParams, type SetChartHelperLineParams, type SetElementAnimationParams, type SetElementLockParams, type SetOleContentResult, type SetOleDeckSlideTitleParams, type SetOleDocumentParagraphParams, type SetOleObjectNameParams, type SetOleSheetCellParams, type SetSlideTransitionParams, type SetTableStyleSectionParams, type SmartArtNodeInfo, type TextMatch, type ThemeInfo, type ToolContext, type ToolResult, type UngroupElementsParams, type UngroupElementsResult, type UpdateChartParams, type UpdateChartSeriesDataParams, type UpdateChartUserShapeParams, type UpdateElementParams, type UpdateElementStyleParams, type UpdateMetadataParams, type UpdatePresentationPropertiesParams, type UpdateSlidePropertiesParams, type UpdateTableCellsParams, type UpdateThemeColorsParams, type UpdateThemeFontsParams, type ValidatePresentationResult, type ViewerProvider };
|
|
1237
1332
|
//# sourceMappingURL=index.d.ts.map
|