pptx-angular-viewer 1.1.10 → 1.1.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-angular-viewer",
3
- "version": "1.1.10",
3
+ "version": "1.1.12",
4
4
  "description": "Angular PowerPoint viewer/editor component — depends on pptx-viewer-core. Angular counterpart of the React `pptx-viewer` and Vue `pptx-vue-viewer` packages.",
5
5
  "keywords": [
6
6
  "angular",
@@ -34,12 +34,14 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
+ "html2canvas-pro": "^2.0.4",
38
+ "jspdf": "^4.2.1",
37
39
  "tslib": "^2.8.1"
38
40
  },
39
41
  "peerDependencies": {
40
42
  "@angular/common": "^22.0.1",
41
43
  "@angular/core": "^22.0.1",
42
- "pptx-viewer-core": "^1.1.10",
44
+ "pptx-viewer-core": "^1.1.12",
43
45
  "rxjs": "^7.8.0"
44
46
  },
45
47
  "module": "fesm2022/pptx-angular-viewer.mjs",
@@ -177,6 +177,115 @@
177
177
  box-sizing: border-box;
178
178
  }
179
179
 
180
+ .pptx-ng-canvas-stage.is-editable {
181
+ cursor: default;
182
+ }
183
+
184
+ .pptx-ng-canvas-stage.is-editable .pptx-ng-element {
185
+ cursor: pointer;
186
+ }
187
+
188
+ .pptx-ng-selection {
189
+ position: absolute;
190
+ box-sizing: border-box;
191
+ outline: 2px solid #4f86ff;
192
+ outline-offset: 1px;
193
+ background: rgba(79, 134, 255, 0.08);
194
+ pointer-events: none;
195
+ z-index: 10000;
196
+ }
197
+
198
+ .pptx-ng-handle {
199
+ position: absolute;
200
+ box-sizing: border-box;
201
+ background: #ffffff;
202
+ border: 1px solid #4f86ff;
203
+ border-radius: 2px;
204
+ pointer-events: auto;
205
+ touch-action: none;
206
+ z-index: 10001;
207
+ }
208
+
209
+ .pptx-ng-text-editor {
210
+ position: absolute;
211
+ box-sizing: border-box;
212
+ margin: 0;
213
+ padding: 2px;
214
+ border: 2px solid #4f86ff;
215
+ background: rgba(255, 255, 255, 0.96);
216
+ color: #000;
217
+ font: inherit;
218
+ line-height: 1.2;
219
+ resize: none;
220
+ overflow: auto;
221
+ z-index: 10002;
222
+ white-space: pre-wrap;
223
+ }
224
+
225
+ .pptx-ng-marquee {
226
+ position: absolute;
227
+ box-sizing: border-box;
228
+ border: 1px dashed #4f86ff;
229
+ background: rgba(79, 134, 255, 0.12);
230
+ pointer-events: none;
231
+ z-index: 9999;
232
+ }
233
+
234
+ .pptx-ng-snap-guide {
235
+ position: absolute;
236
+ box-sizing: border-box;
237
+ border-left: 1px solid #f43f8e;
238
+ border-top: 1px solid #f43f8e;
239
+ pointer-events: none;
240
+ z-index: 10003;
241
+ }
242
+
243
+ .pptx-ng-rotate-handle {
244
+ position: absolute;
245
+ box-sizing: border-box;
246
+ background: #ffffff;
247
+ border: 1px solid #4f86ff;
248
+ border-radius: 50%;
249
+ cursor: grab;
250
+ pointer-events: auto;
251
+ touch-action: none;
252
+ z-index: 10001;
253
+ }
254
+
255
+ .pptx-ng-inspector-host {
256
+ flex: 0 0 240px;
257
+ width: 240px;
258
+ overflow: auto;
259
+ border-left: 1px solid rgba(0, 0, 0, 0.1);
260
+ background: rgba(0, 0, 0, 0.02);
261
+ }
262
+
263
+ .pptx-ng-slide-props {
264
+ padding: 0.75rem;
265
+ display: flex;
266
+ flex-direction: column;
267
+ gap: 0.5rem;
268
+ font-size: 0.8125rem;
269
+ }
270
+
271
+ .pptx-ng-prop-row {
272
+ display: flex;
273
+ align-items: center;
274
+ justify-content: space-between;
275
+ gap: 0.5rem;
276
+ }
277
+
278
+ .pptx-ng-prop-row.pptx-ng-prop-col {
279
+ flex-direction: column;
280
+ align-items: stretch;
281
+ }
282
+
283
+ .pptx-ng-prop-row textarea {
284
+ width: 100%;
285
+ resize: vertical;
286
+ font: inherit;
287
+ }
288
+
180
289
  .pptx-ng-img {
181
290
  width: 100%;
182
291
  height: 100%;
@@ -188,6 +297,76 @@
188
297
  margin: 0;
189
298
  }
190
299
 
300
+ .pptx-ng-bullet {
301
+ white-space: pre;
302
+ }
303
+
304
+ .pptx-ng-link {
305
+ color: inherit;
306
+ text-decoration: underline;
307
+ cursor: pointer;
308
+ }
309
+
310
+ /* ── Toolbar actions + speaker notes ────────────────────────────────── */
311
+ .pptx-ng-actions {
312
+ display: flex;
313
+ gap: 0.25rem;
314
+ align-items: center;
315
+ }
316
+
317
+ .pptx-ng-notes {
318
+ max-height: 30%;
319
+ overflow: auto;
320
+ margin: 0.5rem 1rem 1rem;
321
+ padding: 0.5rem 0.75rem;
322
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
323
+ background: rgba(0, 0, 0, 0.02);
324
+ font-size: 0.875rem;
325
+ line-height: 1.4;
326
+ }
327
+
328
+ .pptx-ng-notes-title {
329
+ margin: 0 0 0.25rem;
330
+ font-size: 0.75rem;
331
+ font-weight: 600;
332
+ text-transform: uppercase;
333
+ letter-spacing: 0.04em;
334
+ opacity: 0.6;
335
+ }
336
+
337
+ .pptx-ng-notes-body {
338
+ margin: 0;
339
+ white-space: pre-wrap;
340
+ word-break: break-word;
341
+ }
342
+
343
+ /* ── Tables ─────────────────────────────────────────────────────────── */
344
+ .pptx-ng-table-wrapper {
345
+ width: 100%;
346
+ height: 100%;
347
+ overflow: hidden;
348
+ }
349
+
350
+ .pptx-ng-table-wrapper > .pptx-ng-table {
351
+ width: 100%;
352
+ height: 100%;
353
+ border-collapse: collapse;
354
+ table-layout: fixed;
355
+ }
356
+
357
+ .pptx-ng-table-wrapper > .pptx-ng-table td {
358
+ overflow: hidden;
359
+ word-break: break-word;
360
+ vertical-align: middle;
361
+ }
362
+
363
+ /* ── Charts ─────────────────────────────────────────────────────────── */
364
+ .pptx-ng-chart svg {
365
+ width: 100%;
366
+ height: 100%;
367
+ display: block;
368
+ }
369
+
191
370
  .pptx-ng-placeholder {
192
371
  display: flex;
193
372
  align-items: center;
@@ -199,3 +378,94 @@
199
378
  font-size: 0.75rem;
200
379
  background: rgba(99, 102, 241, 0.06);
201
380
  }
381
+
382
+ /* ── Mobile / coarse-pointer ─────────────────────────────────────────── */
383
+ /*
384
+ * On small screens and touch devices the toolbar buttons are too small to tap
385
+ * reliably and the toolbar overflows. Below we (1) grow the nav/zoom/action
386
+ * buttons to ≥44px touch targets, (2) let the toolbar and its action group
387
+ * wrap / scroll horizontally instead of overflowing, and (3) collapse the side
388
+ * panels so the slide canvas gets the available width. Swipe navigation is
389
+ * wired up in the component (touchstart/touchend on <main>) for non-editing
390
+ * mode; the large ‹ › buttons remain the always-available fallback.
391
+ */
392
+ @media (max-width: 640px), (pointer: coarse) {
393
+ .pptx-ng-toolbar {
394
+ flex-wrap: wrap;
395
+ gap: 0.5rem;
396
+ row-gap: 0.5rem;
397
+ padding: 0.5rem;
398
+ }
399
+
400
+ .pptx-ng-actions {
401
+ flex: 1 1 100%;
402
+ gap: 0.5rem;
403
+ overflow-x: auto;
404
+ -webkit-overflow-scrolling: touch;
405
+ scrollbar-width: thin;
406
+ padding-bottom: 0.15rem;
407
+ }
408
+
409
+ .pptx-ng-actions button {
410
+ flex: 0 0 auto;
411
+ }
412
+
413
+ .pptx-ng-nav button,
414
+ .pptx-ng-zoom button,
415
+ .pptx-ng-actions button {
416
+ min-width: 44px;
417
+ min-height: 44px;
418
+ height: auto;
419
+ padding: 0 0.65rem;
420
+ font-size: 1.1rem;
421
+ }
422
+
423
+ /* Emphasise the prev/next controls — primary mobile navigation. */
424
+ .pptx-ng-nav button {
425
+ font-size: 1.5rem;
426
+ font-weight: 600;
427
+ }
428
+
429
+ /* Shrink the slide thumbnails rail to a slim horizontal strip. */
430
+ .pptx-ng-thumbnails {
431
+ flex-direction: row;
432
+ width: auto;
433
+ max-width: 100%;
434
+ overflow-x: auto;
435
+ overflow-y: hidden;
436
+ border-right: none;
437
+ border-bottom: 1px solid var(--pptx-border);
438
+ padding: 0.5rem;
439
+ }
440
+
441
+ .pptx-ng-thumbnails .pptx-ng-thumb {
442
+ flex: 0 0 4.5rem;
443
+ width: 4.5rem;
444
+ }
445
+
446
+ /* Stack body vertically so the canvas spans the full width. */
447
+ .pptx-ng-body {
448
+ flex-direction: column;
449
+ }
450
+
451
+ /* Slides panel (editor mode): keep it from dominating the viewport. */
452
+ .pptx-ng-body > pptx-slides-panel {
453
+ flex: 0 0 auto;
454
+ max-height: 30vh;
455
+ }
456
+
457
+ /* Property/inspector aside: full width, bounded height, below the canvas. */
458
+ .pptx-ng-inspector-host {
459
+ flex: 0 0 auto;
460
+ width: 100%;
461
+ max-height: 40vh;
462
+ border-left: none;
463
+ border-top: 1px solid var(--pptx-border);
464
+ }
465
+
466
+ /* Give the canvas the bulk of the vertical space. */
467
+ .pptx-ng-main {
468
+ flex: 1 1 auto;
469
+ min-height: 50vh;
470
+ }
471
+ }