@mkabatek/pptx-viewer 1.5.3 → 1.5.5
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/README.md +13 -9
- package/package.json +2 -9
- package/node_modules/emf-converter/LICENSE +0 -21
- package/node_modules/emf-converter/README.md +0 -629
- package/node_modules/emf-converter/dist/index.d.mts +0 -86
- package/node_modules/emf-converter/dist/index.d.ts +0 -86
- package/node_modules/emf-converter/dist/index.js +0 -4257
- package/node_modules/emf-converter/dist/index.mjs +0 -4253
- package/node_modules/emf-converter/package.json +0 -53
- package/node_modules/mtx-decompressor/LICENSE +0 -373
- package/node_modules/mtx-decompressor/README.md +0 -271
- package/node_modules/mtx-decompressor/dist/index.d.mts +0 -84
- package/node_modules/mtx-decompressor/dist/index.d.ts +0 -84
- package/node_modules/mtx-decompressor/dist/index.js +0 -1532
- package/node_modules/mtx-decompressor/dist/index.mjs +0 -1528
- package/node_modules/mtx-decompressor/package.json +0 -44
- package/node_modules/pptx-viewer-core/LICENSE +0 -21
- package/node_modules/pptx-viewer-core/NOTICE +0 -16
- package/node_modules/pptx-viewer-core/README.md +0 -1294
- package/node_modules/pptx-viewer-core/dist/SvgExporter-BtZczTlB.d.ts +0 -557
- package/node_modules/pptx-viewer-core/dist/SvgExporter-D4mBWJHE.d.mts +0 -557
- package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +0 -150
- package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +0 -150
- package/node_modules/pptx-viewer-core/dist/cli/index.js +0 -0
- package/node_modules/pptx-viewer-core/dist/cli/index.mjs +0 -0
- package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +0 -48
- package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +0 -48
- package/node_modules/pptx-viewer-core/dist/converter/index.js +0 -0
- package/node_modules/pptx-viewer-core/dist/converter/index.mjs +0 -0
- package/node_modules/pptx-viewer-core/dist/index.d.mts +0 -12744
- package/node_modules/pptx-viewer-core/dist/index.d.ts +0 -12744
- package/node_modules/pptx-viewer-core/dist/index.js +0 -66894
- package/node_modules/pptx-viewer-core/dist/index.mjs +0 -66420
- package/node_modules/pptx-viewer-core/dist/presentation-nZxgWvXq.d.mts +0 -5645
- package/node_modules/pptx-viewer-core/dist/presentation-nZxgWvXq.d.ts +0 -5645
- package/node_modules/pptx-viewer-core/dist/signature-inspection-status-BCUpfCQh.d.mts +0 -220
- package/node_modules/pptx-viewer-core/dist/signature-inspection-status-BCUpfCQh.d.ts +0 -220
- package/node_modules/pptx-viewer-core/dist/signature-node/index.d.mts +0 -177
- package/node_modules/pptx-viewer-core/dist/signature-node/index.d.ts +0 -177
- package/node_modules/pptx-viewer-core/dist/signature-node/index.js +0 -1206
- package/node_modules/pptx-viewer-core/dist/signature-node/index.mjs +0 -1143
- package/node_modules/pptx-viewer-core/dist/text-operations-DCTGMltY.d.mts +0 -134
- package/node_modules/pptx-viewer-core/dist/text-operations-DYmhoi7U.d.ts +0 -134
- package/node_modules/pptx-viewer-core/package.json +0 -96
package/README.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
# pptx-viewer
|
|
1
|
+
# @mkabatek/pptx-viewer
|
|
2
|
+
|
|
3
|
+
> **This is a fork of [ChristopherVR/pptx-viewer](https://github.com/ChristopherVR/pptx-viewer), published as `@mkabatek/pptx-viewer` on npm.**
|
|
4
|
+
> Full credit for the library design, implementation, and documentation goes to the original author.
|
|
5
|
+
> See the [fork changelog](https://github.com/mkabatek/pptx-viewer#fork-changes) for what was changed and why.
|
|
2
6
|
|
|
3
7
|
A full-featured **React** component for viewing, editing, and presenting PowerPoint (.pptx) files in the browser. Built on top of `pptx-viewer-core`, it provides a complete UI with toolbar, inspector panels, slide canvas, animation engine, presentation mode, real-time collaboration, and export capabilities.
|
|
4
8
|
|
|
@@ -74,12 +78,12 @@ This package provides a drop-in React component that turns raw `.pptx` bytes int
|
|
|
74
78
|
## Quick Start
|
|
75
79
|
|
|
76
80
|
```tsx
|
|
77
|
-
import { PowerPointViewer } from 'pptx-viewer';
|
|
78
|
-
import type { PowerPointViewerHandle } from 'pptx-viewer';
|
|
81
|
+
import { PowerPointViewer } from '@mkabatek/pptx-viewer';
|
|
82
|
+
import type { PowerPointViewerHandle } from '@mkabatek/pptx-viewer';
|
|
79
83
|
import { useRef, useEffect, useState } from 'react';
|
|
80
84
|
|
|
81
85
|
// If your project does NOT use Tailwind CSS, import the bundled stylesheet:
|
|
82
|
-
import 'pptx-viewer/styles';
|
|
86
|
+
import '@mkabatek/pptx-viewer/styles';
|
|
83
87
|
|
|
84
88
|
function App() {
|
|
85
89
|
const viewerRef = useRef<PowerPointViewerHandle>(null);
|
|
@@ -150,7 +154,7 @@ Exposed via `ref`. Extends `FileViewerHandle`.
|
|
|
150
154
|
Standalone utility for rendering a DOM element to a Canvas with oklch colour space workaround.
|
|
151
155
|
|
|
152
156
|
```typescript
|
|
153
|
-
import { renderToCanvas } from 'pptx-viewer';
|
|
157
|
+
import { renderToCanvas } from '@mkabatek/pptx-viewer';
|
|
154
158
|
|
|
155
159
|
const canvas = await renderToCanvas(element, options);
|
|
156
160
|
// => HTMLCanvasElement with the rendered content
|
|
@@ -183,8 +187,8 @@ Import the self-contained CSS file that ships with the package. It includes all
|
|
|
183
187
|
|
|
184
188
|
```tsx
|
|
185
189
|
// Import once at your app's entry point
|
|
186
|
-
import 'pptx-viewer/styles';
|
|
187
|
-
// or: import "pptx-viewer/styles.css";
|
|
190
|
+
import '@mkabatek/pptx-viewer/styles';
|
|
191
|
+
// or: import "@mkabatek/pptx-viewer/styles.css";
|
|
188
192
|
```
|
|
189
193
|
|
|
190
194
|
Then optionally customise with the `theme` prop or by setting CSS custom properties in your own stylesheet.
|
|
@@ -219,7 +223,7 @@ If you want full control, define the `--pptx-*` custom properties yourself and s
|
|
|
219
223
|
### `ViewerTheme` reference
|
|
220
224
|
|
|
221
225
|
```typescript
|
|
222
|
-
import type { ViewerTheme } from 'pptx-viewer';
|
|
226
|
+
import type { ViewerTheme } from '@mkabatek/pptx-viewer';
|
|
223
227
|
|
|
224
228
|
const myTheme: ViewerTheme = {
|
|
225
229
|
colors: {
|
|
@@ -263,7 +267,7 @@ import {
|
|
|
263
267
|
defaultCssVars, // Get all default --pptx-* CSS vars
|
|
264
268
|
ViewerThemeProvider, // React context provider (advanced)
|
|
265
269
|
useViewerTheme, // Hook to read current theme from context
|
|
266
|
-
} from 'pptx-viewer';
|
|
270
|
+
} from '@mkabatek/pptx-viewer';
|
|
267
271
|
```
|
|
268
272
|
|
|
269
273
|
### Light theme example
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mkabatek/pptx-viewer",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"description": "React-based PowerPoint viewer, editor, and canvas export — depends on pptx-viewer-core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"editor",
|
|
@@ -58,10 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"clsx": "^2.1.1",
|
|
60
60
|
"dompurify": "^3.4.2",
|
|
61
|
-
"emf-converter": "workspace:*",
|
|
62
61
|
"html2canvas-pro": "^2.0.2",
|
|
63
|
-
"mtx-decompressor": "workspace:*",
|
|
64
|
-
"pptx-viewer-core": "workspace:*",
|
|
65
62
|
"tailwind-merge": "^3.5.0"
|
|
66
63
|
},
|
|
67
64
|
"devDependencies": {
|
|
@@ -95,9 +92,5 @@
|
|
|
95
92
|
"y-websocket": "^3.0.0",
|
|
96
93
|
"yjs": "^13.6.30"
|
|
97
94
|
},
|
|
98
|
-
"bundledDependencies": [
|
|
99
|
-
"emf-converter",
|
|
100
|
-
"mtx-decompressor",
|
|
101
|
-
"pptx-viewer-core"
|
|
102
|
-
]
|
|
95
|
+
"bundledDependencies": []
|
|
103
96
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025-present pptx-viewer contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|