pptx-viewer-mcp 1.2.0 → 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 +4 -0
- package/dist/codec/index.d.ts +38 -18
- package/dist/codec/index.d.ts.map +1 -0
- package/dist/codec/index.js +16 -83
- package/dist/codec/index.mjs +14 -85
- 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 -38
- package/dist/index.d.mts +0 -862
- package/dist/mcp/index.d.mts +0 -1
- package/dist/schemas/index.d.mts +0 -576
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to this project are documented here.
|
|
|
4
4
|
This file is generated from [Conventional Commits](https://www.conventionalcommits.org)
|
|
5
5
|
by [git-cliff](https://git-cliff.org); do not edit it by hand.
|
|
6
6
|
|
|
7
|
+
## [1.2.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-mcp@1.2.1) - 2026-07-11
|
|
8
|
+
|
|
9
|
+
## [1.2.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-mcp@1.2.0) - 2026-07-06
|
|
10
|
+
|
|
7
11
|
## [1.1.26](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-mcp@1.1.26) - 2026-06-21
|
|
8
12
|
|
|
9
13
|
### Features
|
package/dist/codec/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Doc } from
|
|
2
|
-
|
|
1
|
+
import { Doc } from "yjs";
|
|
2
|
+
//#region src/codec/pptx-codec.d.ts
|
|
3
3
|
declare const ORIGIN_FILE_LOAD = "file-load";
|
|
4
4
|
/**
|
|
5
5
|
* Bidirectional format codec: file bytes <-> Y.Doc shared types.
|
|
@@ -17,22 +17,42 @@ declare const ORIGIN_FILE_LOAD = "file-load";
|
|
|
17
17
|
* layouts are similar but NOT interchangeable on the same Y.Doc.
|
|
18
18
|
*/
|
|
19
19
|
interface FormatCodec {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
readonly formatId: string;
|
|
21
|
+
readonly extensions: string[];
|
|
22
|
+
hydrate: (ydoc: Doc, bytes: Uint8Array, origin?: string) => Promise<void>;
|
|
23
|
+
dehydrate: (ydoc: Doc, dirtyPaths?: string[]) => Promise<Uint8Array>;
|
|
24
|
+
observe: (ydoc: Doc, onChange: () => void) => () => void;
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Field coverage is derived from `pptx-viewer-core`'s
|
|
28
|
+
* `ELEMENT_FIELD_KIND`/`SLIDE_FIELD_KIND` (the same canonical inventory the
|
|
29
|
+
* viewer's `collaboration-sync.ts` allowlists derive from), so this codec
|
|
30
|
+
* automatically tracks every field `PptxElement`/`PptxSlide` declares
|
|
31
|
+
* instead of drifting out of sync with a hand-maintained list. Wire-format
|
|
32
|
+
* prefixes stay long-form (`_textStyle`) here versus the viewer schema's
|
|
33
|
+
* short-form (`_ts`) - the two Y.Doc layouts are intentionally NOT
|
|
34
|
+
* interchangeable, only the field *coverage* is required to match.
|
|
35
|
+
*
|
|
36
|
+
* `asset`-kind fields (large binary payloads like `mediaData`) are simply
|
|
37
|
+
* embedded as scalars here rather than routed through a separate asset map:
|
|
38
|
+
* this codec does one-shot bidirectional file<->Y.Doc conversion, not a
|
|
39
|
+
* live P2P transport, so there's no repeated-write cost to avoid.
|
|
40
|
+
*/
|
|
41
|
+
declare const SCALAR_ELEMENT_KEYS: Set<string>;
|
|
42
|
+
declare const COMPLEX_FIELD_MAP: Record<string, string>;
|
|
43
|
+
declare const SCALAR_SLIDE_KEYS: Set<string>;
|
|
44
|
+
declare const COMPLEX_SLIDE_FIELD_MAP: Record<string, string>;
|
|
26
45
|
declare class PptxCodec implements FormatCodec {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
readonly formatId = "pptx";
|
|
47
|
+
readonly extensions: string[];
|
|
48
|
+
hydrate(ydoc: Doc, bytes: Uint8Array, origin?: string): Promise<void>;
|
|
49
|
+
dehydrate(ydoc: Doc, _dirtyPaths?: string[]): Promise<Uint8Array>;
|
|
50
|
+
observe(ydoc: Doc, onChange: () => void): () => void;
|
|
51
|
+
private _slideToYMap;
|
|
52
|
+
private _yMapToSlide;
|
|
53
|
+
private _elementToYMap;
|
|
54
|
+
private _yMapToElement;
|
|
36
55
|
}
|
|
37
|
-
|
|
38
|
-
export { type FormatCodec, ORIGIN_FILE_LOAD, PptxCodec };
|
|
56
|
+
//#endregion
|
|
57
|
+
export { COMPLEX_FIELD_MAP, COMPLEX_SLIDE_FIELD_MAP, type FormatCodec, ORIGIN_FILE_LOAD, PptxCodec, SCALAR_ELEMENT_KEYS, SCALAR_SLIDE_KEYS };
|
|
58
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/codec/pptx-codec.ts"],"mappings":";;cAMa;;;;;;;;;;;;;;;;UAiBI;WACP;WACA;EACT,UAAU,MAAM,KAAM,OAAO,YAAY,oBAAoB;EAC7D,YAAY,MAAM,KAAM,0BAA0B,QAAQ;EAC1D,UAAU,MAAM,KAAM;;;;;;;;;;;;;;;;;cAoBV,qBAAmB;cAQnB,mBAAmB;cAWnB,mBAAiB;cAOjB,yBAAyB;cAWzB,qBAAqB;WACxB;WACA;EAEH,QAAQ,MAAM,KAAM,OAAO,YAAY,kBAAkB;EA+BzD,UAAU,MAAM,KAAM,yBAAyB,QAAQ;EA2B7D,QAAQ,MAAM,KAAM;UAWZ;UAqBA;UA6BA;UAsBA"}
|
package/dist/codec/index.js
CHANGED
|
@@ -176,93 +176,22 @@ function decodeTextBodyFromYText(ytext) {
|
|
|
176
176
|
|
|
177
177
|
// src/codec/pptx-codec.ts
|
|
178
178
|
var ORIGIN_FILE_LOAD = "file-load";
|
|
179
|
-
var SCALAR_ELEMENT_KEYS =
|
|
180
|
-
"
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
"
|
|
184
|
-
|
|
185
|
-
"height",
|
|
186
|
-
"rotation",
|
|
187
|
-
"flipHorizontal",
|
|
188
|
-
"flipVertical",
|
|
189
|
-
"hidden",
|
|
190
|
-
"opacity",
|
|
191
|
-
"text",
|
|
192
|
-
"name",
|
|
193
|
-
"altText",
|
|
194
|
-
"shapeType",
|
|
195
|
-
"placeholder",
|
|
196
|
-
"imagePath",
|
|
197
|
-
"imageData",
|
|
198
|
-
"svgContent",
|
|
199
|
-
"inkSvg",
|
|
200
|
-
"sourceSlideId",
|
|
201
|
-
"mediaType",
|
|
202
|
-
"mediaPath",
|
|
203
|
-
"linkedTxbxId",
|
|
204
|
-
"linkedTxbxSeq",
|
|
205
|
-
"promptText"
|
|
206
|
-
]);
|
|
207
|
-
var COMPLEX_FIELD_MAP = {
|
|
208
|
-
textStyle: "_textStyle",
|
|
209
|
-
shapeStyle: "_shapeStyle",
|
|
210
|
-
shapeAdjustments: "_shapeAdjustments",
|
|
211
|
-
adjustmentHandles: "_adjustmentHandles",
|
|
212
|
-
tableData: "_tableData",
|
|
213
|
-
chartData: "_chartData",
|
|
214
|
-
smartArtData: "_smartArtData",
|
|
215
|
-
connectionStart: "_connectionStart",
|
|
216
|
-
connectionEnd: "_connectionEnd",
|
|
217
|
-
animations: "_animations",
|
|
218
|
-
nativeAnimations: "_nativeAnimations",
|
|
219
|
-
children: "_children",
|
|
220
|
-
paragraphIndents: "_paragraphIndents",
|
|
221
|
-
rawXml: "_rawXml",
|
|
222
|
-
actionClick: "_actionClick",
|
|
223
|
-
actionHover: "_actionHover",
|
|
224
|
-
locks: "_locks",
|
|
225
|
-
imageEffects: "_imageEffects",
|
|
226
|
-
cropShape: "_cropShape",
|
|
227
|
-
mediaBookmarks: "_mediaBookmarks",
|
|
228
|
-
captionTracks: "_captionTracks"
|
|
229
|
-
};
|
|
179
|
+
var SCALAR_ELEMENT_KEYS = new Set(
|
|
180
|
+
Object.entries(pptxViewerCore.ELEMENT_FIELD_KIND).filter(([, kind]) => kind === "scalar" || kind === "asset").map(([field]) => field)
|
|
181
|
+
);
|
|
182
|
+
var COMPLEX_FIELD_MAP = Object.fromEntries(
|
|
183
|
+
Object.entries(pptxViewerCore.ELEMENT_FIELD_KIND).filter(([, kind]) => kind === "complex").map(([field]) => [field, `_${field}`])
|
|
184
|
+
);
|
|
230
185
|
var REVERSE_COMPLEX_MAP = {};
|
|
231
186
|
for (const [original, prefixed] of Object.entries(COMPLEX_FIELD_MAP)) {
|
|
232
187
|
REVERSE_COMPLEX_MAP[prefixed] = original;
|
|
233
188
|
}
|
|
234
|
-
var SCALAR_SLIDE_KEYS =
|
|
235
|
-
"
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
"
|
|
239
|
-
|
|
240
|
-
"slideNumber",
|
|
241
|
-
"hidden",
|
|
242
|
-
"sectionName",
|
|
243
|
-
"sectionId",
|
|
244
|
-
"backgroundColor",
|
|
245
|
-
"backgroundImage",
|
|
246
|
-
"backgroundGradient",
|
|
247
|
-
"notes",
|
|
248
|
-
"backgroundShowAnimation",
|
|
249
|
-
"showMasterShapes",
|
|
250
|
-
"isDirty"
|
|
251
|
-
]);
|
|
252
|
-
var COMPLEX_SLIDE_FIELD_MAP = {
|
|
253
|
-
transition: "_transition",
|
|
254
|
-
animations: "_animations",
|
|
255
|
-
nativeAnimations: "_nativeAnimations",
|
|
256
|
-
rawTiming: "_rawTiming",
|
|
257
|
-
notesSegments: "_notesSegments",
|
|
258
|
-
comments: "_comments",
|
|
259
|
-
warnings: "_warnings",
|
|
260
|
-
rawXml: "_rawXml",
|
|
261
|
-
clrMapOverride: "_clrMapOverride",
|
|
262
|
-
guides: "_guides",
|
|
263
|
-
customerData: "_customerData",
|
|
264
|
-
activeXControls: "_activeXControls"
|
|
265
|
-
};
|
|
189
|
+
var SCALAR_SLIDE_KEYS = new Set(
|
|
190
|
+
Object.entries(pptxViewerCore.SLIDE_FIELD_KIND).filter(([, kind]) => kind === "scalar").map(([field]) => field)
|
|
191
|
+
);
|
|
192
|
+
var COMPLEX_SLIDE_FIELD_MAP = Object.fromEntries(
|
|
193
|
+
Object.entries(pptxViewerCore.SLIDE_FIELD_KIND).filter(([, kind]) => kind === "complex").map(([field]) => [field, `_${field}`])
|
|
194
|
+
);
|
|
266
195
|
var REVERSE_COMPLEX_SLIDE_MAP = {};
|
|
267
196
|
for (const [original, prefixed] of Object.entries(COMPLEX_SLIDE_FIELD_MAP)) {
|
|
268
197
|
REVERSE_COMPLEX_SLIDE_MAP[prefixed] = original;
|
|
@@ -415,5 +344,9 @@ var PptxCodec = class {
|
|
|
415
344
|
}
|
|
416
345
|
};
|
|
417
346
|
|
|
347
|
+
exports.COMPLEX_FIELD_MAP = COMPLEX_FIELD_MAP;
|
|
348
|
+
exports.COMPLEX_SLIDE_FIELD_MAP = COMPLEX_SLIDE_FIELD_MAP;
|
|
418
349
|
exports.ORIGIN_FILE_LOAD = ORIGIN_FILE_LOAD;
|
|
419
350
|
exports.PptxCodec = PptxCodec;
|
|
351
|
+
exports.SCALAR_ELEMENT_KEYS = SCALAR_ELEMENT_KEYS;
|
|
352
|
+
exports.SCALAR_SLIDE_KEYS = SCALAR_SLIDE_KEYS;
|
package/dist/codec/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PptxHandler } from 'pptx-viewer-core';
|
|
1
|
+
import { ELEMENT_FIELD_KIND, SLIDE_FIELD_KIND, PptxHandler } from 'pptx-viewer-core';
|
|
2
2
|
import { Array as Array$1, Map, Text } from 'yjs';
|
|
3
3
|
|
|
4
4
|
// src/codec/pptx-codec.ts
|
|
@@ -174,93 +174,22 @@ function decodeTextBodyFromYText(ytext) {
|
|
|
174
174
|
|
|
175
175
|
// src/codec/pptx-codec.ts
|
|
176
176
|
var ORIGIN_FILE_LOAD = "file-load";
|
|
177
|
-
var SCALAR_ELEMENT_KEYS =
|
|
178
|
-
"
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
"
|
|
182
|
-
|
|
183
|
-
"height",
|
|
184
|
-
"rotation",
|
|
185
|
-
"flipHorizontal",
|
|
186
|
-
"flipVertical",
|
|
187
|
-
"hidden",
|
|
188
|
-
"opacity",
|
|
189
|
-
"text",
|
|
190
|
-
"name",
|
|
191
|
-
"altText",
|
|
192
|
-
"shapeType",
|
|
193
|
-
"placeholder",
|
|
194
|
-
"imagePath",
|
|
195
|
-
"imageData",
|
|
196
|
-
"svgContent",
|
|
197
|
-
"inkSvg",
|
|
198
|
-
"sourceSlideId",
|
|
199
|
-
"mediaType",
|
|
200
|
-
"mediaPath",
|
|
201
|
-
"linkedTxbxId",
|
|
202
|
-
"linkedTxbxSeq",
|
|
203
|
-
"promptText"
|
|
204
|
-
]);
|
|
205
|
-
var COMPLEX_FIELD_MAP = {
|
|
206
|
-
textStyle: "_textStyle",
|
|
207
|
-
shapeStyle: "_shapeStyle",
|
|
208
|
-
shapeAdjustments: "_shapeAdjustments",
|
|
209
|
-
adjustmentHandles: "_adjustmentHandles",
|
|
210
|
-
tableData: "_tableData",
|
|
211
|
-
chartData: "_chartData",
|
|
212
|
-
smartArtData: "_smartArtData",
|
|
213
|
-
connectionStart: "_connectionStart",
|
|
214
|
-
connectionEnd: "_connectionEnd",
|
|
215
|
-
animations: "_animations",
|
|
216
|
-
nativeAnimations: "_nativeAnimations",
|
|
217
|
-
children: "_children",
|
|
218
|
-
paragraphIndents: "_paragraphIndents",
|
|
219
|
-
rawXml: "_rawXml",
|
|
220
|
-
actionClick: "_actionClick",
|
|
221
|
-
actionHover: "_actionHover",
|
|
222
|
-
locks: "_locks",
|
|
223
|
-
imageEffects: "_imageEffects",
|
|
224
|
-
cropShape: "_cropShape",
|
|
225
|
-
mediaBookmarks: "_mediaBookmarks",
|
|
226
|
-
captionTracks: "_captionTracks"
|
|
227
|
-
};
|
|
177
|
+
var SCALAR_ELEMENT_KEYS = new Set(
|
|
178
|
+
Object.entries(ELEMENT_FIELD_KIND).filter(([, kind]) => kind === "scalar" || kind === "asset").map(([field]) => field)
|
|
179
|
+
);
|
|
180
|
+
var COMPLEX_FIELD_MAP = Object.fromEntries(
|
|
181
|
+
Object.entries(ELEMENT_FIELD_KIND).filter(([, kind]) => kind === "complex").map(([field]) => [field, `_${field}`])
|
|
182
|
+
);
|
|
228
183
|
var REVERSE_COMPLEX_MAP = {};
|
|
229
184
|
for (const [original, prefixed] of Object.entries(COMPLEX_FIELD_MAP)) {
|
|
230
185
|
REVERSE_COMPLEX_MAP[prefixed] = original;
|
|
231
186
|
}
|
|
232
|
-
var SCALAR_SLIDE_KEYS =
|
|
233
|
-
"
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
"
|
|
237
|
-
|
|
238
|
-
"slideNumber",
|
|
239
|
-
"hidden",
|
|
240
|
-
"sectionName",
|
|
241
|
-
"sectionId",
|
|
242
|
-
"backgroundColor",
|
|
243
|
-
"backgroundImage",
|
|
244
|
-
"backgroundGradient",
|
|
245
|
-
"notes",
|
|
246
|
-
"backgroundShowAnimation",
|
|
247
|
-
"showMasterShapes",
|
|
248
|
-
"isDirty"
|
|
249
|
-
]);
|
|
250
|
-
var COMPLEX_SLIDE_FIELD_MAP = {
|
|
251
|
-
transition: "_transition",
|
|
252
|
-
animations: "_animations",
|
|
253
|
-
nativeAnimations: "_nativeAnimations",
|
|
254
|
-
rawTiming: "_rawTiming",
|
|
255
|
-
notesSegments: "_notesSegments",
|
|
256
|
-
comments: "_comments",
|
|
257
|
-
warnings: "_warnings",
|
|
258
|
-
rawXml: "_rawXml",
|
|
259
|
-
clrMapOverride: "_clrMapOverride",
|
|
260
|
-
guides: "_guides",
|
|
261
|
-
customerData: "_customerData",
|
|
262
|
-
activeXControls: "_activeXControls"
|
|
263
|
-
};
|
|
187
|
+
var SCALAR_SLIDE_KEYS = new Set(
|
|
188
|
+
Object.entries(SLIDE_FIELD_KIND).filter(([, kind]) => kind === "scalar").map(([field]) => field)
|
|
189
|
+
);
|
|
190
|
+
var COMPLEX_SLIDE_FIELD_MAP = Object.fromEntries(
|
|
191
|
+
Object.entries(SLIDE_FIELD_KIND).filter(([, kind]) => kind === "complex").map(([field]) => [field, `_${field}`])
|
|
192
|
+
);
|
|
264
193
|
var REVERSE_COMPLEX_SLIDE_MAP = {};
|
|
265
194
|
for (const [original, prefixed] of Object.entries(COMPLEX_SLIDE_FIELD_MAP)) {
|
|
266
195
|
REVERSE_COMPLEX_SLIDE_MAP[prefixed] = original;
|
|
@@ -413,4 +342,4 @@ var PptxCodec = class {
|
|
|
413
342
|
}
|
|
414
343
|
};
|
|
415
344
|
|
|
416
|
-
export { ORIGIN_FILE_LOAD, PptxCodec };
|
|
345
|
+
export { COMPLEX_FIELD_MAP, COMPLEX_SLIDE_FIELD_MAP, ORIGIN_FILE_LOAD, PptxCodec, SCALAR_ELEMENT_KEYS, SCALAR_SLIDE_KEYS };
|