pptx-vue-viewer 0.1.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/LICENSE +202 -0
- package/NOTICE +18 -0
- package/README.md +222 -0
- package/dist/PowerPointViewer.vue_vue_type_script_setup_true_lang-CjQ0x4Fx.cjs +16285 -0
- package/dist/PowerPointViewer.vue_vue_type_script_setup_true_lang-CjQ0x4Fx.cjs.br +0 -0
- package/dist/PowerPointViewer.vue_vue_type_script_setup_true_lang-CjQ0x4Fx.cjs.gz +0 -0
- package/dist/PowerPointViewer.vue_vue_type_script_setup_true_lang-DY0sfWPY.js +16315 -0
- package/dist/PowerPointViewer.vue_vue_type_script_setup_true_lang-DY0sfWPY.js.br +0 -0
- package/dist/PowerPointViewer.vue_vue_type_script_setup_true_lang-DY0sfWPY.js.gz +0 -0
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.br +0 -0
- package/dist/index.cjs.gz +0 -0
- package/dist/index.d.ts +7262 -0
- package/dist/index.js +21 -0
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/pptx-vue-viewer.css +200 -0
- package/dist/pptx-vue-viewer.css.br +0 -0
- package/dist/pptx-vue-viewer.css.gz +0 -0
- package/dist/viewer/index.cjs +4 -0
- package/dist/viewer/index.cjs.br +0 -0
- package/dist/viewer/index.cjs.gz +0 -0
- package/dist/viewer/index.d.ts +9 -0
- package/dist/viewer/index.js +21 -0
- package/dist/viewer/index.js.br +1 -0
- package/dist/viewer/index.js.gz +0 -0
- package/package.json +88 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { e, f, g, h, p, q, r, s, t, v, w } from "./PowerPointViewer.vue_vue_type_script_setup_true_lang-DY0sfWPY.js";
|
|
2
|
+
import "vue";
|
|
3
|
+
import { clsx as a } from "clsx";
|
|
4
|
+
import { twMerge as i } from "tailwind-merge";
|
|
5
|
+
function o(...e2) {
|
|
6
|
+
return i(a(e2));
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
e as ElementRenderer,
|
|
10
|
+
f as PowerPointViewer,
|
|
11
|
+
g as SlideCanvas,
|
|
12
|
+
h as SlideStage,
|
|
13
|
+
o as cn,
|
|
14
|
+
p as defaultCssVars,
|
|
15
|
+
q as defaultRadius,
|
|
16
|
+
r as defaultThemeColors,
|
|
17
|
+
s as provideViewerTheme,
|
|
18
|
+
t as themeToCssVars,
|
|
19
|
+
v as useThemeStyle,
|
|
20
|
+
w as useViewerTheme
|
|
21
|
+
};
|
package/dist/index.js.br
ADDED
|
Binary file
|
package/dist/index.js.gz
ADDED
|
Binary file
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base styles for the Vue PowerPoint viewer chrome.
|
|
3
|
+
*
|
|
4
|
+
* Minimal, self-contained CSS for the viewer-first milestone. The React
|
|
5
|
+
* package uses Tailwind CSS 4 utility classes compiled into a stylesheet; the
|
|
6
|
+
* Vue port currently ships hand-written CSS scoped under `.pptx-vue-viewer`.
|
|
7
|
+
* A Tailwind pipeline can be added later (see PORTING.md) if the editor chrome
|
|
8
|
+
* is ported wholesale.
|
|
9
|
+
*
|
|
10
|
+
* Theme tokens (`--pptx-*`) are emitted by `themeToCssVars` and bound to the
|
|
11
|
+
* root element via the `theme` prop.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
.pptx-vue-viewer {
|
|
15
|
+
--pptx-background: #030712;
|
|
16
|
+
--pptx-foreground: #f3f4f6;
|
|
17
|
+
--pptx-card: #111827;
|
|
18
|
+
--pptx-border: #374151;
|
|
19
|
+
--pptx-primary: #6366f1;
|
|
20
|
+
--pptx-muted-foreground: #9ca3af;
|
|
21
|
+
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
min-height: 0;
|
|
27
|
+
background: var(--pptx-background);
|
|
28
|
+
color: var(--pptx-foreground);
|
|
29
|
+
font-family:
|
|
30
|
+
system-ui,
|
|
31
|
+
-apple-system,
|
|
32
|
+
'Segoe UI',
|
|
33
|
+
Roboto,
|
|
34
|
+
sans-serif;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* ── States ─────────────────────────────────────────────────────────── */
|
|
38
|
+
.pptx-vue-state {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
gap: 0.75rem;
|
|
44
|
+
flex: 1;
|
|
45
|
+
padding: 2rem;
|
|
46
|
+
text-align: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.pptx-vue-error-detail {
|
|
50
|
+
max-width: 40rem;
|
|
51
|
+
overflow: auto;
|
|
52
|
+
padding: 0.75rem;
|
|
53
|
+
border-radius: 0.5rem;
|
|
54
|
+
background: var(--pptx-card);
|
|
55
|
+
color: var(--pptx-muted-foreground);
|
|
56
|
+
font-size: 0.8rem;
|
|
57
|
+
white-space: pre-wrap;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.pptx-vue-spinner {
|
|
61
|
+
width: 2rem;
|
|
62
|
+
height: 2rem;
|
|
63
|
+
border: 3px solid var(--pptx-border);
|
|
64
|
+
border-top-color: var(--pptx-primary);
|
|
65
|
+
border-radius: 50%;
|
|
66
|
+
animation: pptx-vue-spin 0.8s linear infinite;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes pptx-vue-spin {
|
|
70
|
+
to {
|
|
71
|
+
transform: rotate(360deg);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ── Toolbar ────────────────────────────────────────────────────────── */
|
|
76
|
+
.pptx-vue-toolbar {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: space-between;
|
|
80
|
+
gap: 1rem;
|
|
81
|
+
padding: 0.5rem 0.75rem;
|
|
82
|
+
border-bottom: 1px solid var(--pptx-border);
|
|
83
|
+
background: var(--pptx-card);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.pptx-vue-nav,
|
|
87
|
+
.pptx-vue-zoom {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: 0.5rem;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.pptx-vue-toolbar button {
|
|
94
|
+
min-width: 2rem;
|
|
95
|
+
height: 2rem;
|
|
96
|
+
padding: 0 0.5rem;
|
|
97
|
+
border: 1px solid var(--pptx-border);
|
|
98
|
+
border-radius: 0.375rem;
|
|
99
|
+
background: transparent;
|
|
100
|
+
color: var(--pptx-foreground);
|
|
101
|
+
font-size: 1rem;
|
|
102
|
+
line-height: 1;
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.pptx-vue-toolbar button:hover:not(:disabled) {
|
|
107
|
+
border-color: var(--pptx-primary);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.pptx-vue-toolbar button:disabled {
|
|
111
|
+
opacity: 0.4;
|
|
112
|
+
cursor: not-allowed;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.pptx-vue-slide-counter,
|
|
116
|
+
.pptx-vue-zoom-value {
|
|
117
|
+
font-variant-numeric: tabular-nums;
|
|
118
|
+
font-size: 0.85rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* ── Body / thumbnails / main ──────────────────────────────────────── */
|
|
122
|
+
.pptx-vue-body {
|
|
123
|
+
display: flex;
|
|
124
|
+
flex: 1;
|
|
125
|
+
min-height: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.pptx-vue-thumbnails {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
gap: 0.5rem;
|
|
132
|
+
width: 8rem;
|
|
133
|
+
padding: 0.75rem;
|
|
134
|
+
overflow-y: auto;
|
|
135
|
+
border-right: 1px solid var(--pptx-border);
|
|
136
|
+
background: var(--pptx-card);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.pptx-vue-thumb {
|
|
140
|
+
position: relative;
|
|
141
|
+
width: 100%;
|
|
142
|
+
padding: 0;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
border: 2px solid var(--pptx-border);
|
|
145
|
+
border-radius: 0.375rem;
|
|
146
|
+
background: #ffffff;
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.pptx-vue-thumb.is-active {
|
|
151
|
+
border-color: var(--pptx-primary);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Mini slide preview fills the button; non-interactive. */
|
|
155
|
+
.pptx-vue-thumb-stage {
|
|
156
|
+
position: absolute;
|
|
157
|
+
inset: 0;
|
|
158
|
+
pointer-events: none;
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.pptx-vue-thumb-index {
|
|
163
|
+
position: absolute;
|
|
164
|
+
bottom: 0.15rem;
|
|
165
|
+
right: 0.3rem;
|
|
166
|
+
padding: 0 0.2rem;
|
|
167
|
+
border-radius: 0.2rem;
|
|
168
|
+
font-size: 0.7rem;
|
|
169
|
+
color: #f3f4f6;
|
|
170
|
+
background: rgba(0, 0, 0, 0.55);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.pptx-vue-main {
|
|
174
|
+
flex: 1;
|
|
175
|
+
min-width: 0;
|
|
176
|
+
overflow: auto;
|
|
177
|
+
background: #1e293b;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* ── Canvas ─────────────────────────────────────────────────────────── */
|
|
181
|
+
.pptx-vue-canvas-viewport {
|
|
182
|
+
width: 100%;
|
|
183
|
+
height: 100%;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.pptx-vue-element {
|
|
187
|
+
box-sizing: border-box;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.pptx-vue-placeholder {
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
width: 100%;
|
|
195
|
+
height: 100%;
|
|
196
|
+
border: 1px dashed rgba(99, 102, 241, 0.5);
|
|
197
|
+
color: rgba(99, 102, 241, 0.8);
|
|
198
|
+
font-size: 0.75rem;
|
|
199
|
+
background: rgba(99, 102, 241, 0.06);
|
|
200
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const e = require("../PowerPointViewer.vue_vue_type_script_setup_true_lang-CjQ0x4Fx.cjs");
|
|
4
|
+
exports.ConnectorRenderer = e._sfc_main, exports.DEFAULT_CANVAS_HEIGHT = e.DEFAULT_CANVAS_HEIGHT, exports.DEFAULT_CANVAS_WIDTH = e.DEFAULT_CANVAS_WIDTH, exports.DEFAULT_FILL_COLOR = e.DEFAULT_FILL_COLOR, exports.DEFAULT_STROKE_COLOR = e.DEFAULT_STROKE_COLOR, exports.DEFAULT_TEXT_COLOR = e.DEFAULT_TEXT_COLOR, exports.ElementRenderer = e._sfc_main$1, exports.PowerPointViewer = e._sfc_main$2, exports.SlideCanvas = e._sfc_main$3, exports.SlideStage = e._sfc_main$4, exports.buildInitialGuides = e.buildInitialGuides, exports.collectImagePaths = e.collectImagePaths, exports.collectMediaElements = e.collectMediaElements, exports.getContainerStyle = e.getContainerStyle, exports.getImageSrc = e.getImageSrc, exports.getShapeFillStrokeStyle = e.getShapeFillStrokeStyle, exports.getTextBlockStyle = e.getTextBlockStyle, exports.useLoadContent = e.useLoadContent;
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as PowerPointViewer } from './PowerPointViewer.vue';
|
|
2
|
+
export { default as SlideCanvas } from './components/SlideCanvas.vue';
|
|
3
|
+
export { default as SlideStage } from './components/SlideStage.vue';
|
|
4
|
+
export { default as ElementRenderer } from './components/ElementRenderer.vue';
|
|
5
|
+
export { default as ConnectorRenderer } from './components/ConnectorRenderer.vue';
|
|
6
|
+
export type { PowerPointViewerProps, PowerPointViewerEmits, PowerPointViewerExpose, CollaborationConfig, CollaborationRole, CanvasSize, } from './types';
|
|
7
|
+
export * from './composables';
|
|
8
|
+
export { DEFAULT_CANVAS_WIDTH, DEFAULT_CANVAS_HEIGHT, DEFAULT_TEXT_COLOR, DEFAULT_FILL_COLOR, DEFAULT_STROKE_COLOR, } from './constants';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { _, D, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, u } from "../PowerPointViewer.vue_vue_type_script_setup_true_lang-DY0sfWPY.js";
|
|
2
|
+
export {
|
|
3
|
+
_ as ConnectorRenderer,
|
|
4
|
+
D as DEFAULT_CANVAS_HEIGHT,
|
|
5
|
+
a as DEFAULT_CANVAS_WIDTH,
|
|
6
|
+
b as DEFAULT_FILL_COLOR,
|
|
7
|
+
c as DEFAULT_STROKE_COLOR,
|
|
8
|
+
d as DEFAULT_TEXT_COLOR,
|
|
9
|
+
e as ElementRenderer,
|
|
10
|
+
f as PowerPointViewer,
|
|
11
|
+
g as SlideCanvas,
|
|
12
|
+
h as SlideStage,
|
|
13
|
+
i as buildInitialGuides,
|
|
14
|
+
j as collectImagePaths,
|
|
15
|
+
k as collectMediaElements,
|
|
16
|
+
l as getContainerStyle,
|
|
17
|
+
m as getImageSrc,
|
|
18
|
+
n as getShapeFillStrokeStyle,
|
|
19
|
+
o as getTextBlockStyle,
|
|
20
|
+
u as useLoadContent
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
g����#�pϲ����Fa��cǀk�}����Gگ�Fmk���mK�۷kC��Gs�ܤ���Ja��\x� D� RdÆ�7�'��l�]4���Ŷq �k�o_T���������/W���ÊcNo�1#���Y����)y�\%|M�|�'}�h��Ċ��%WH��5`=y���lfP|SL'Y�4�G.`z"��hF�U��F5�G�)��]m��C��"-L�?�+1L͌g�S���'�͆�ҪM�'.ڋM�Ϻ�"�'#�LI��Ͱ�>[�K�0
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pptx-vue-viewer",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Vue 3 PowerPoint viewer/editor component — depends on pptx-viewer-core. Vue counterpart of the React `pptx-viewer` package.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"editor",
|
|
7
|
+
"openxml",
|
|
8
|
+
"powerpoint",
|
|
9
|
+
"pptx",
|
|
10
|
+
"presentation",
|
|
11
|
+
"viewer",
|
|
12
|
+
"vue",
|
|
13
|
+
"vue3"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/ChristopherVR/pptx-viewer",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/ChristopherVR/pptx-viewer/issues"
|
|
18
|
+
},
|
|
19
|
+
"license": "Apache-2.0",
|
|
20
|
+
"author": "ChristopherVR",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/ChristopherVR/pptx-viewer.git",
|
|
24
|
+
"directory": "packages/vue"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist/",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"NOTICE",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"type": "module",
|
|
33
|
+
"main": "dist/index.cjs",
|
|
34
|
+
"module": "dist/index.js",
|
|
35
|
+
"types": "dist/index.d.ts",
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"import": "./dist/index.js",
|
|
40
|
+
"require": "./dist/index.cjs"
|
|
41
|
+
},
|
|
42
|
+
"./viewer": {
|
|
43
|
+
"types": "./dist/viewer/index.d.ts",
|
|
44
|
+
"import": "./dist/viewer/index.js",
|
|
45
|
+
"require": "./dist/viewer/index.cjs"
|
|
46
|
+
},
|
|
47
|
+
"./styles": "./dist/pptx-vue-viewer.css",
|
|
48
|
+
"./styles.css": "./dist/pptx-vue-viewer.css"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "vite build && cp src/styles/pptx-vue-viewer.css dist/pptx-vue-viewer.css && node ../../scripts/compress-dist.mjs dist",
|
|
52
|
+
"dev": "vite build --watch",
|
|
53
|
+
"typecheck": "vue-tsc --noEmit -p tsconfig.json",
|
|
54
|
+
"test": "vitest run",
|
|
55
|
+
"test:watch": "vitest",
|
|
56
|
+
"pack": "bun run build && bun pm pack"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"clsx": "^2.1.1",
|
|
60
|
+
"dompurify": "^3.4.10",
|
|
61
|
+
"tailwind-merge": "^3.6.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
65
|
+
"@tailwindcss/cli": "^4.3.1",
|
|
66
|
+
"@types/dompurify": "^3.2.0",
|
|
67
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
68
|
+
"@vue/test-utils": "^2.4.6",
|
|
69
|
+
"happy-dom": "^20.10.3",
|
|
70
|
+
"tailwindcss": "^4.3.1",
|
|
71
|
+
"terser": "^5.37.0",
|
|
72
|
+
"typescript": "^6.0.3",
|
|
73
|
+
"vite": "^8.0.16",
|
|
74
|
+
"vite-plugin-dts": "^5.0.2",
|
|
75
|
+
"vitest": "^4.1.8",
|
|
76
|
+
"vue-tsc": "^3.3.5"
|
|
77
|
+
},
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"fast-xml-parser": "^5.8.0",
|
|
80
|
+
"jspdf": "^4.2.1",
|
|
81
|
+
"jszip": "^3.10.1",
|
|
82
|
+
"vue": "^3.5.0"
|
|
83
|
+
},
|
|
84
|
+
"optionalDependencies": {
|
|
85
|
+
"y-websocket": "^3.0.0",
|
|
86
|
+
"yjs": "^13.6.31"
|
|
87
|
+
}
|
|
88
|
+
}
|