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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/schemas/slide-schemas.ts","../../src/schemas/element-schemas.ts","../../src/schemas/table-style-schemas.ts","../../src/schemas/theme-schemas.ts","../../src/schemas/chart-schemas.ts","../../src/schemas/smartart-schemas.ts","../../src/schemas/template-schemas.ts","../../src/schemas/metadata-schemas.ts","../../src/schemas/section-schemas.ts","../../src/schemas/export-schemas.ts","../../src/schemas/hyperlink-schemas.ts","../../src/schemas/geometry-schemas.ts","../../src/schemas/lock-schemas.ts","../../src/schemas/validation-schemas.ts","../../src/schemas/presentation-schemas.ts","../../src/schemas/layout-schemas.ts"],"mappings":";;cAEa,gBAAc,EAAA;;;;cAKd,gBAAc,EAAA;;;;;cAMd,oBAAkB,EAAA;;;;cAKlB,qBAAmB,EAAA;;;;cAKnB,sBAAoB,EAAA;;;;;cAMpB,6BAA2B,EAAA;;;;;;;;;cAU3B,0BAAwB,EAAA;;;;;;;;;cAUxB,qBAAmB,EAAA;;;;;cAMnB,yBAAuB,EAAA;;;;;;;;;;;;cAgBvB,0BAAwB,EAAA;;;;;cCrExB,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgChB,qBAAmB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0BnB,sBAAoB,EAAA;;;;;cAMpB,uBAAqB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;cAUrB,oBAAkB,EAAA;;;;;;;;cASlB,2BAAyB,EAAA;;;;;;;;;;cAWzB,qBAAmB,EAAA;;;;;cAMnB,uBAAqB,EAAA;;;;;cAMrB,2BAAyB,EAAA;;;;;;;;;;;;;;cC1GzB,wBAAsB,EAAA;;;;;;;;;;cAgBtB,4BAA0B,EAAA;;;;;;;;;;;;;;cAU1B,0BAAwB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0CxB,gBAAc,EAAA;;;;;;;cAWd,mBAAiB,EAAA;;;;;;;;cASjB,sBAAoB,EAAA;;;;;;;;;;;;;;;;;cCxFpB,oBAAkB,EAAA;;;cAIlB,wBAAsB,EAAA;;;;cAStB,yBAAuB,EAAA;;;;;;;;;;;;;;;cAgBvB,wBAAsB,EAAA;;;;;;;cC7BtB,mBAAiB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgDjB,sBAAoB,EAAA;;;;;;;;cASpB,yBAAuB,EAAA;;;;;;cAOvB,6BAA2B,EAAA;;;;;;;cAQ3B,mBAAiB,EAAA;;;;;;;;;;;;;;;;;;;;;;cCxEjB,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;;;;cCApB,wBAAsB,EAAA;;;cAItB,qBAAmB,EAAA;;;;;;cCJnB,mBAAiB,EAAA;;;cAIjB,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;cCJpB,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;cCApB,mBAAiB,EAAA;;;;;;;cAWjB,sBAAoB,EAAA;;;;;;;;cCXpB,wBAAsB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCAtB,uBAAqB,EAAA;;;;;;;;;;;;cCArB,sBAAoB,EAAA;;;;;;;;;;;;;cCApB,4BAA0B,EAAA;;;cAI1B,0BAAwB,EAAA;;;;;cCJxB,iCAA+B,EAAA;;;cAI/B,oCAAkC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;cCJlC,kBAAgB,EAAA;;;cAIhB,mBAAiB,EAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-viewer-mcp",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "PowerPoint PPTX tools and MCP server: manipulate, convert, and collaborate on .pptx files from AI agents.",
5
5
  "keywords": [
6
6
  "ai",
@@ -61,7 +61,7 @@
61
61
  }
62
62
  },
63
63
  "scripts": {
64
- "build": "tsup",
64
+ "build": "tsup && tsdown && node ../../scripts/merge-declarations.mjs",
65
65
  "dev": "tsup --watch",
66
66
  "typecheck": "tsc --noEmit --pretty",
67
67
  "test": "vitest run",
@@ -70,14 +70,15 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@modelcontextprotocol/sdk": "^1.29.0",
73
- "fast-xml-parser": "^5.9.2",
73
+ "fast-xml-parser": "^5.10.0",
74
74
  "jszip": "^3.10.1",
75
75
  "pptx-viewer-core": "^1.1.0",
76
76
  "zod": "^4.4.3"
77
77
  },
78
78
  "devDependencies": {
79
+ "tsdown": "^0.22.7",
79
80
  "tsup": "^8.5.1",
80
- "typescript": "^6.0.3",
81
+ "typescript": "^7.0.2",
81
82
  "vitest": "^4.1.9",
82
83
  "yjs": "^13.6.31"
83
84
  },
@@ -1,57 +0,0 @@
1
- import { Doc } from 'yjs';
2
-
3
- declare const ORIGIN_FILE_LOAD = "file-load";
4
- /**
5
- * Bidirectional format codec: file bytes <-> Y.Doc shared types.
6
- *
7
- * Y.Doc schema:
8
- * pptx:meta Y.Map - width, height, widthEmu, heightEmu, sourceBytes
9
- * pptx:slides Y.Array<Y.Map> - one map per slide
10
- * Each slide Y.Map: scalar fields + `_`-prefixed JSON blobs + `elements` Y.Array<Y.Map>
11
- * Each element Y.Map: scalar fields + `_`-prefixed JSON blobs + `textBody` Y.Text
12
- * textBody Y.Text: one delta op per TextSegment (see text-body-codec.ts)
13
- *
14
- * NOTE: the viewer bindings' sync schema (pptx-viewer-shared
15
- * collaboration-sync.ts) uses SHORT complex-field key prefixes (`_ts`, `_tr`)
16
- * while this codec uses long ones (`_textStyle`, `_transition`). The two doc
17
- * layouts are similar but NOT interchangeable on the same Y.Doc.
18
- */
19
- interface FormatCodec {
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
- }
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>;
45
- declare class PptxCodec implements FormatCodec {
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;
55
- }
56
-
57
- export { COMPLEX_FIELD_MAP, COMPLEX_SLIDE_FIELD_MAP, type FormatCodec, ORIGIN_FILE_LOAD, PptxCodec, SCALAR_ELEMENT_KEYS, SCALAR_SLIDE_KEYS };