@christophervr/pptx-viewer 1.4.1 → 1.4.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/index.mjs +49 -17
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,8 @@ 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.4.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/@christophervr/pptx-viewer@1.4.1) - 2026-07-05
|
|
8
|
+
|
|
7
9
|
## [1.4.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/@christophervr/pptx-viewer@1.4.0) - 2026-07-05
|
|
8
10
|
|
|
9
11
|
### Features
|
package/dist/index.mjs
CHANGED
|
@@ -440,16 +440,27 @@ export default function App() {
|
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
return (
|
|
443
|
-
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', gap:
|
|
444
|
-
<
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
443
|
+
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', gap: 24, height: '100vh', fontFamily: 'system-ui, sans-serif' }}>
|
|
444
|
+
<h1 style={{ margin: 0, fontSize: 24, fontWeight: 500, color: '#e5e7eb' }}>Open a Presentation</h1>
|
|
445
|
+
<label style={{ display: 'inline-flex', alignItems: 'center', gap: 8, padding: '10px 20px', borderRadius: 8, border: '1px solid #4b5563', background: '#1f2937', color: '#f3f4f6', cursor: 'pointer', fontSize: 14, transition: 'background 0.15s' }}>
|
|
446
|
+
Choose .pptx file
|
|
447
|
+
<input
|
|
448
|
+
type="file"
|
|
449
|
+
accept=".pptx"
|
|
450
|
+
style={{ display: 'none' }}
|
|
451
|
+
onChange={(e) => {
|
|
452
|
+
const file = e.target.files?.[0];
|
|
453
|
+
if (file) loadFile(file);
|
|
454
|
+
}}
|
|
455
|
+
/>
|
|
456
|
+
</label>
|
|
457
|
+
<span style={{ color: '#6b7280', fontSize: 13 }}>or</span>
|
|
458
|
+
<button
|
|
459
|
+
onClick={() => void newPresentation()}
|
|
460
|
+
style={{ padding: '10px 20px', borderRadius: 8, border: 'none', background: '#2563eb', color: '#fff', cursor: 'pointer', fontSize: 14, fontWeight: 500 }}
|
|
461
|
+
>
|
|
462
|
+
New Presentation
|
|
463
|
+
</button>
|
|
453
464
|
</div>
|
|
454
465
|
);
|
|
455
466
|
}
|
|
@@ -473,6 +484,14 @@ i18n.use(initReactI18next).init({
|
|
|
473
484
|
|
|
474
485
|
export default i18n;
|
|
475
486
|
`;
|
|
487
|
+
var REACT_INDEX_CSS = `:root {
|
|
488
|
+
color-scheme: light dark;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
body {
|
|
492
|
+
margin: 0;
|
|
493
|
+
}
|
|
494
|
+
`;
|
|
476
495
|
var VUE_APP_VUE = `<script setup lang="ts">
|
|
477
496
|
import { ref } from 'vue';
|
|
478
497
|
import { PptxHandler } from 'pptx-viewer-core';
|
|
@@ -505,9 +524,14 @@ async function newPresentation() {
|
|
|
505
524
|
<div v-if="content" style="height: 100vh">
|
|
506
525
|
<PowerPointViewer :content="content" can-edit style="height: 100%" />
|
|
507
526
|
</div>
|
|
508
|
-
<div v-else style="display: flex; flex-direction: column; align-items: center; justify-content: center; gap:
|
|
509
|
-
<
|
|
510
|
-
<
|
|
527
|
+
<div v-else style="display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; height: 100vh; font-family: system-ui, sans-serif">
|
|
528
|
+
<h1 style="margin: 0; font-size: 24px; font-weight: 500; color: #e5e7eb">Open a Presentation</h1>
|
|
529
|
+
<label style="display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 8px; border: 1px solid #4b5563; background: #1f2937; color: #f3f4f6; cursor: pointer; font-size: 14px">
|
|
530
|
+
Choose .pptx file
|
|
531
|
+
<input type="file" accept=".pptx" style="display: none" @change="onPick" />
|
|
532
|
+
</label>
|
|
533
|
+
<span style="color: #6b7280; font-size: 13px">or</span>
|
|
534
|
+
<button style="padding: 10px 20px; border-radius: 8px; border: none; background: #2563eb; color: #fff; cursor: pointer; font-size: 14px; font-weight: 500" @click="newPresentation">New Presentation</button>
|
|
511
535
|
</div>
|
|
512
536
|
</template>
|
|
513
537
|
`;
|
|
@@ -542,9 +566,14 @@ import { PowerPointViewerComponent } from 'pptx-angular-viewer';
|
|
|
542
566
|
<pptx-power-point-viewer [content]="c" [canEdit]="true" style="height: 100%" />
|
|
543
567
|
</div>
|
|
544
568
|
} @else {
|
|
545
|
-
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; gap:
|
|
546
|
-
<
|
|
547
|
-
<
|
|
569
|
+
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; height: 100vh; font-family: system-ui, sans-serif">
|
|
570
|
+
<h1 style="margin: 0; font-size: 24px; font-weight: 500; color: #e5e7eb">Open a Presentation</h1>
|
|
571
|
+
<label style="display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 8px; border: 1px solid #4b5563; background: #1f2937; color: #f3f4f6; cursor: pointer; font-size: 14px">
|
|
572
|
+
Choose .pptx file
|
|
573
|
+
<input type="file" accept=".pptx" style="display: none" (change)="onPick($event)" />
|
|
574
|
+
</label>
|
|
575
|
+
<span style="color: #6b7280; font-size: 13px">or</span>
|
|
576
|
+
<button style="padding: 10px 20px; border-radius: 8px; border: none; background: #2563eb; color: #fff; cursor: pointer; font-size: 14px; font-weight: 500" (click)="newPresentation()">New Presentation</button>
|
|
548
577
|
</div>
|
|
549
578
|
}
|
|
550
579
|
\`,
|
|
@@ -646,7 +675,10 @@ Docs: https://www.npmjs.com/package/pptx-react-viewer`,
|
|
|
646
675
|
],
|
|
647
676
|
entryCandidates: ["src/App.tsx"],
|
|
648
677
|
entryContent: REACT_APP_TSX,
|
|
649
|
-
extraFiles: {
|
|
678
|
+
extraFiles: {
|
|
679
|
+
"src/i18n.ts": REACT_I18N_TS,
|
|
680
|
+
"src/index.css": REACT_INDEX_CSS
|
|
681
|
+
}
|
|
650
682
|
}
|
|
651
683
|
},
|
|
652
684
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christophervr/pptx-viewer",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Interactive installer for the pptx-viewer family of packages: React, Vue, and Angular viewer components, the framework-agnostic core engine, and the MCP server.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|