@christophervr/pptx-viewer 1.5.9 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/index.mjs +70 -20
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ 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.5.9](https://github.com/ChristopherVR/pptx-viewer/releases/tag/@christophervr/pptx-viewer@1.5.9) - 2026-07-27
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **ci:** Resolve workspace: ranges in every published manifest (by @ChristopherVR) ([ea35290](https://github.com/ChristopherVR/pptx-viewer/commit/ea35290721ba679571f71708933ed718e65e3942))
|
|
12
|
+
|
|
7
13
|
## [1.5.8](https://github.com/ChristopherVR/pptx-viewer/releases/tag/@christophervr/pptx-viewer@1.5.8) - 2026-07-25
|
|
8
14
|
|
|
9
15
|
### Chores
|
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ npx @christophervr/pptx-viewer --pm pnpm # force a pac
|
|
|
81
81
|
| **Svelte** | [`pptx-svelte-viewer`](https://www.npmjs.com/package/pptx-svelte-viewer) | The Svelte 5 counterpart, built on the same shared engine. |
|
|
82
82
|
| **Vanilla JS** | [`pptx-vanilla-viewer`](https://www.npmjs.com/package/pptx-vanilla-viewer) | The zero-framework binding: plain DOM, one factory function. |
|
|
83
83
|
| **Core only** | [`pptx-viewer-core`](https://www.npmjs.com/package/pptx-viewer-core) | The framework-agnostic parse/edit/save/convert SDK, no UI. |
|
|
84
|
-
| **MCP server** | [`pptx-viewer-mcp`](https://www.npmjs.com/package/pptx-viewer-mcp) |
|
|
84
|
+
| **MCP server** | [`pptx-viewer-mcp`](https://www.npmjs.com/package/pptx-viewer-mcp) | 54 PowerPoint editing tools exposed to AI agents (Claude, Cursor, ...). |
|
|
85
85
|
|
|
86
86
|
## Why this exists
|
|
87
87
|
|
package/dist/index.mjs
CHANGED
|
@@ -414,6 +414,16 @@ import { PptxHandler } from 'pptx-viewer-core';
|
|
|
414
414
|
import type { CollaborationConfig } from 'pptx-angular-viewer';
|
|
415
415
|
import { PowerPointViewerComponent } from 'pptx-angular-viewer';
|
|
416
416
|
|
|
417
|
+
/**
|
|
418
|
+
* The presentation formats this viewer can open: OOXML and the legacy binary
|
|
419
|
+
* PowerPoint format, which pptx-viewer-core converts on load. Kept as an
|
|
420
|
+
* explicit check because a drop event carries no accept filtering.
|
|
421
|
+
*/
|
|
422
|
+
function isPresentation(file: File | undefined): file is File {
|
|
423
|
+
const name = file?.name.toLowerCase() ?? '';
|
|
424
|
+
return name.endsWith('.pptx') || name.endsWith('.ppt');
|
|
425
|
+
}
|
|
426
|
+
|
|
417
427
|
@Component({
|
|
418
428
|
selector: 'app-root',
|
|
419
429
|
standalone: true,
|
|
@@ -454,10 +464,10 @@ import { PowerPointViewerComponent } from 'pptx-angular-viewer';
|
|
|
454
464
|
>
|
|
455
465
|
<div class="dropzone">
|
|
456
466
|
<h1>Open a Presentation</h1>
|
|
457
|
-
<p>Drag & drop a .pptx file here, or</p>
|
|
467
|
+
<p>Drag & drop a .pptx or .ppt file here, or</p>
|
|
458
468
|
<label class="pick-label" (click)="$event.stopPropagation()">
|
|
459
|
-
Choose
|
|
460
|
-
<input #fileInput type="file" accept=".pptx" style="display: none" (change)="onPick($event)" />
|
|
469
|
+
Choose a file
|
|
470
|
+
<input #fileInput type="file" accept=".pptx,.ppt" style="display: none" (change)="onPick($event)" />
|
|
461
471
|
</label>
|
|
462
472
|
<span class="or-sep">or</span>
|
|
463
473
|
<button class="new-btn" (click)="$event.stopPropagation(); newPresentation()">New Presentation</button>
|
|
@@ -475,7 +485,7 @@ export class App {
|
|
|
475
485
|
e.preventDefault();
|
|
476
486
|
this.over.set(false);
|
|
477
487
|
const file = e.dataTransfer?.files?.[0];
|
|
478
|
-
if (file
|
|
488
|
+
if (isPresentation(file)) this.content.set(await file.arrayBuffer());
|
|
479
489
|
}
|
|
480
490
|
|
|
481
491
|
async onPick(e: Event) {
|
|
@@ -531,6 +541,16 @@ import { PowerPointViewer } from 'pptx-react-viewer';
|
|
|
531
541
|
import 'pptx-react-viewer/styles.css';
|
|
532
542
|
import './i18n';
|
|
533
543
|
|
|
544
|
+
/**
|
|
545
|
+
* The presentation formats this viewer can open: OOXML and the legacy binary
|
|
546
|
+
* PowerPoint format, which pptx-viewer-core converts on load. Kept as an
|
|
547
|
+
* explicit check because a drop event carries no accept filtering.
|
|
548
|
+
*/
|
|
549
|
+
function isPresentation(file: File | undefined): file is File {
|
|
550
|
+
const name = file?.name.toLowerCase() ?? '';
|
|
551
|
+
return name.endsWith('.pptx') || name.endsWith('.ppt');
|
|
552
|
+
}
|
|
553
|
+
|
|
534
554
|
export default function App() {
|
|
535
555
|
const [content, setContent] = useState<Uint8Array | null>(null);
|
|
536
556
|
const [over, setOver] = useState(false);
|
|
@@ -572,18 +592,18 @@ export default function App() {
|
|
|
572
592
|
e.preventDefault();
|
|
573
593
|
setOver(false);
|
|
574
594
|
const file = e.dataTransfer.files[0];
|
|
575
|
-
if (file
|
|
595
|
+
if (isPresentation(file)) void loadFile(file);
|
|
576
596
|
}}
|
|
577
597
|
onClick={() => document.getElementById('file-input')?.click()}
|
|
578
598
|
>
|
|
579
599
|
<h1>Open a Presentation</h1>
|
|
580
|
-
<p>Drag & drop a .pptx file here, or</p>
|
|
600
|
+
<p>Drag & drop a .pptx or .ppt file here, or</p>
|
|
581
601
|
<label className="pick-label" onClick={(e) => e.stopPropagation()}>
|
|
582
|
-
Choose
|
|
602
|
+
Choose a file
|
|
583
603
|
<input
|
|
584
604
|
id="file-input"
|
|
585
605
|
type="file"
|
|
586
|
-
accept=".pptx"
|
|
606
|
+
accept=".pptx,.ppt"
|
|
587
607
|
style={{ display: 'none' }}
|
|
588
608
|
onChange={(e) => {
|
|
589
609
|
const file = e.target.files?.[0];
|
|
@@ -759,6 +779,16 @@ var SVELTE_APP_SVELTE = `<script lang="ts">
|
|
|
759
779
|
import type { CollaborationConfig } from 'pptx-svelte-viewer';
|
|
760
780
|
import { PowerPointViewer } from 'pptx-svelte-viewer';
|
|
761
781
|
|
|
782
|
+
/**
|
|
783
|
+
* The presentation formats this viewer can open: OOXML and the legacy binary
|
|
784
|
+
* PowerPoint format, which pptx-viewer-core converts on load. Kept as an
|
|
785
|
+
* explicit check because a drop event carries no accept filtering.
|
|
786
|
+
*/
|
|
787
|
+
function isPresentation(file: File | undefined): file is File {
|
|
788
|
+
const name = file?.name.toLowerCase() ?? '';
|
|
789
|
+
return name.endsWith('.pptx') || name.endsWith('.ppt');
|
|
790
|
+
}
|
|
791
|
+
|
|
762
792
|
let content = $state<Uint8Array | null>(null);
|
|
763
793
|
let over = $state(false);
|
|
764
794
|
let collab = $state<CollaborationConfig | undefined>();
|
|
@@ -770,7 +800,7 @@ var SVELTE_APP_SVELTE = `<script lang="ts">
|
|
|
770
800
|
function onDrop(e: DragEvent) {
|
|
771
801
|
over = false;
|
|
772
802
|
const file = e.dataTransfer?.files?.[0];
|
|
773
|
-
if (file
|
|
803
|
+
if (isPresentation(file)) void loadFile(file);
|
|
774
804
|
}
|
|
775
805
|
|
|
776
806
|
function onPick(e: Event) {
|
|
@@ -809,10 +839,10 @@ var SVELTE_APP_SVELTE = `<script lang="ts">
|
|
|
809
839
|
>
|
|
810
840
|
<div class="dropzone" class:over>
|
|
811
841
|
<h1>Open a Presentation</h1>
|
|
812
|
-
<p>Drag & drop a .pptx file here, or</p>
|
|
842
|
+
<p>Drag & drop a .pptx or .ppt file here, or</p>
|
|
813
843
|
<label class="pick-label" onclick={(e) => e.stopPropagation()}>
|
|
814
|
-
Choose
|
|
815
|
-
<input id="file-input" type="file" accept=".pptx" style="display: none" onchange={onPick} />
|
|
844
|
+
Choose a file
|
|
845
|
+
<input id="file-input" type="file" accept=".pptx,.ppt" style="display: none" onchange={onPick} />
|
|
816
846
|
</label>
|
|
817
847
|
<span class="or-sep">or</span>
|
|
818
848
|
<button class="new-btn" onclick={(e) => { e.stopPropagation(); void newPresentation(); }}>
|
|
@@ -829,6 +859,16 @@ import { PptxHandler } from 'pptx-viewer-core';
|
|
|
829
859
|
|
|
830
860
|
import './style.css';
|
|
831
861
|
|
|
862
|
+
/**
|
|
863
|
+
* The presentation formats this viewer can open: OOXML and the legacy binary
|
|
864
|
+
* PowerPoint format, which pptx-viewer-core converts on load. Kept as an
|
|
865
|
+
* explicit check because a drop event carries no accept filtering.
|
|
866
|
+
*/
|
|
867
|
+
function isPresentation(file: File | undefined): file is File {
|
|
868
|
+
const name = file?.name.toLowerCase() ?? '';
|
|
869
|
+
return name.endsWith('.pptx') || name.endsWith('.ppt');
|
|
870
|
+
}
|
|
871
|
+
|
|
832
872
|
const app = document.querySelector<HTMLDivElement>('#app')!;
|
|
833
873
|
|
|
834
874
|
function show(source: ArrayBuffer | Uint8Array): void {
|
|
@@ -851,15 +891,15 @@ function showLanding(): void {
|
|
|
851
891
|
h1.textContent = 'Open a Presentation';
|
|
852
892
|
|
|
853
893
|
const hint = document.createElement('p');
|
|
854
|
-
hint.textContent = 'Drag & drop a .pptx file here, or';
|
|
894
|
+
hint.textContent = 'Drag & drop a .pptx or .ppt file here, or';
|
|
855
895
|
|
|
856
896
|
const label = document.createElement('label');
|
|
857
897
|
label.className = 'pick-label';
|
|
858
|
-
label.textContent = 'Choose
|
|
898
|
+
label.textContent = 'Choose a file';
|
|
859
899
|
|
|
860
900
|
const input = document.createElement('input');
|
|
861
901
|
input.type = 'file';
|
|
862
|
-
input.accept = '.pptx';
|
|
902
|
+
input.accept = '.pptx,.ppt';
|
|
863
903
|
input.style.display = 'none';
|
|
864
904
|
label.append(input);
|
|
865
905
|
|
|
@@ -884,7 +924,7 @@ function showLanding(): void {
|
|
|
884
924
|
e.preventDefault();
|
|
885
925
|
zone.classList.remove('over');
|
|
886
926
|
const file = e.dataTransfer?.files?.[0];
|
|
887
|
-
if (file
|
|
927
|
+
if (isPresentation(file)) void file.arrayBuffer().then(show);
|
|
888
928
|
});
|
|
889
929
|
|
|
890
930
|
// Click the zone to open the file picker (but not if the button was clicked).
|
|
@@ -919,6 +959,16 @@ import type { CollaborationConfig } from 'pptx-vue-viewer';
|
|
|
919
959
|
import { PowerPointViewer } from 'pptx-vue-viewer';
|
|
920
960
|
import 'pptx-vue-viewer/styles.css';
|
|
921
961
|
|
|
962
|
+
/**
|
|
963
|
+
* The presentation formats this viewer can open: OOXML and the legacy binary
|
|
964
|
+
* PowerPoint format, which pptx-viewer-core converts on load. Kept as an
|
|
965
|
+
* explicit check because a drop event carries no accept filtering.
|
|
966
|
+
*/
|
|
967
|
+
function isPresentation(file: File | undefined): file is File {
|
|
968
|
+
const name = file?.name.toLowerCase() ?? '';
|
|
969
|
+
return name.endsWith('.pptx') || name.endsWith('.ppt');
|
|
970
|
+
}
|
|
971
|
+
|
|
922
972
|
const content = ref<Uint8Array>();
|
|
923
973
|
const over = ref(false);
|
|
924
974
|
const collab = ref<CollaborationConfig | undefined>();
|
|
@@ -930,7 +980,7 @@ async function loadFile(file: File) {
|
|
|
930
980
|
function onDrop(e: DragEvent) {
|
|
931
981
|
over.value = false;
|
|
932
982
|
const file = e.dataTransfer?.files?.[0];
|
|
933
|
-
if (file
|
|
983
|
+
if (isPresentation(file)) void loadFile(file);
|
|
934
984
|
}
|
|
935
985
|
|
|
936
986
|
function onPick(e: Event) {
|
|
@@ -968,10 +1018,10 @@ async function newPresentation() {
|
|
|
968
1018
|
>
|
|
969
1019
|
<div :class="['dropzone', { over }]">
|
|
970
1020
|
<h1>Open a Presentation</h1>
|
|
971
|
-
<p>Drag & drop a .pptx file here, or</p>
|
|
1021
|
+
<p>Drag & drop a .pptx or .ppt file here, or</p>
|
|
972
1022
|
<label class="pick-label" @click.stop>
|
|
973
|
-
Choose
|
|
974
|
-
<input ref="input" type="file" accept=".pptx" style="display: none" @change="onPick" />
|
|
1023
|
+
Choose a file
|
|
1024
|
+
<input ref="input" type="file" accept=".pptx,.ppt" style="display: none" @change="onPick" />
|
|
975
1025
|
</label>
|
|
976
1026
|
<span class="or-sep">or</span>
|
|
977
1027
|
<button class="new-btn" @click.stop="newPresentation">New Presentation</button>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christophervr/pptx-viewer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Interactive installer for the pptx-viewer family of packages: React, Vue, Angular, Svelte, and vanilla JS viewer components, the framework-agnostic core engine, and the MCP server.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|