pptx-angular-viewer 1.11.0 → 1.11.1

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.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "Angular PowerPoint viewer and editor component: render, edit, and export PPTX slides in the browser.",
5
5
  "keywords": [
6
6
  "angular",
@@ -46,7 +46,7 @@
46
46
  "html2canvas-pro": "^2.0.4",
47
47
  "jspdf": "^4.2.1",
48
48
  "jszip": "^3.10.1",
49
- "pptx-viewer-core": "^1.2.4",
49
+ "pptx-viewer-core": "^1.2.5",
50
50
  "tslib": "^2.8.1"
51
51
  },
52
52
  "peerDependencies": {
@@ -3000,7 +3000,6 @@ declare class EditorStateService {
3000
3000
  private zOrder;
3001
3001
  private commit;
3002
3002
  private syncHistory;
3003
- private clone;
3004
3003
  private newId;
3005
3004
  private idCounter;
3006
3005
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditorStateService, never>;
@@ -3838,11 +3837,22 @@ declare class ViewerCustomShowsService {
3838
3837
  readonly activeId: _angular_core.WritableSignal<string | null>;
3839
3838
  /** Active-slide index of the host viewer (bound from the component). */
3840
3839
  private activeSlideIndex;
3841
- /** Wire the host's active-slide-index accessor (called once from the constructor). */
3842
- bind(activeSlideIndex: () => number): void;
3840
+ /**
3841
+ * The viewer's LIVE (edited) slides accessor, bound from the component. The
3842
+ * presentation overlay must reflect in-session edits (inserted media, moved
3843
+ * shapes, etc.), so it reads these rather than the pristine loaded deck
3844
+ * (`loader.slides()`), mirroring React/Vue where present mode shows the
3845
+ * working set. Defaults to the loaded slides until bound.
3846
+ */
3847
+ private liveSlides;
3848
+ /** Wire the host's active-slide-index + live-slides accessors (called once from the constructor). */
3849
+ bind(accessors: {
3850
+ activeSlideIndex: () => number;
3851
+ liveSlides: () => readonly PptxSlide[];
3852
+ }): void;
3843
3853
  /** Custom shows mapped to the core shape consumed by set-up-slide-show. */
3844
3854
  readonly pptxCustomShows: _angular_core.Signal<PptxCustomShow[]>;
3845
- /** Slides shown in presentation mode: the active custom show, else the full deck. */
3855
+ /** Slides shown in presentation mode: the active custom show, else the full (live) deck. */
3846
3856
  readonly presentationSlides: _angular_core.Signal<PptxSlide[]>;
3847
3857
  /** Start index into {@link presentationSlides}: first slide of a custom show, else the active slide. */
3848
3858
  readonly presentationStartIndex: _angular_core.Signal<number>;
@@ -4352,7 +4362,11 @@ declare class ViewerPresentationModeService {
4352
4362
  /** Wire the host accessors (called once from the component constructor). */
4353
4363
  bind(host: PresentationModeHost): void;
4354
4364
  private requireHost;
4355
- /** Open the fullscreen presentation overlay from the current slide. */
4365
+ /**
4366
+ * Open the presentation overlay from the current slide. The overlay itself
4367
+ * (`PresentationOverlayComponent`) requests real browser fullscreen once it
4368
+ * mounts as a result of `presenting` flipping true.
4369
+ */
4356
4370
  present(): void;
4357
4371
  /**
4358
4372
  * Map a presentation-overlay index back to the full-deck `activeSlideIndex`.
@@ -4922,6 +4936,12 @@ declare class SlideCanvasComponent {
4922
4936
  * e2e selectors from matching multiple elements.
4923
4937
  */
4924
4938
  readonly interactive: _angular_core.InputSignal<boolean>;
4939
+ /**
4940
+ * True only for the live presentation stage: slide-content media autoplays.
4941
+ * Left false for thumbnails, the sorter and the editor canvas so their media
4942
+ * stays quiet (the template layer never autoplays regardless).
4943
+ */
4944
+ readonly presenting: _angular_core.InputSignal<boolean>;
4925
4945
  /** Ids of currently-selected elements (drawn with a selection outline). */
4926
4946
  readonly selectedIds: _angular_core.InputSignal<readonly string[]>;
4927
4947
  /** Id of the element currently being text-edited inline (or null). */
@@ -5135,7 +5155,7 @@ declare class SlideCanvasComponent {
5135
5155
  readonly vRulerTicks: _angular_core.Signal<readonly RulerTick[]>;
5136
5156
  readonly stageStyle: _angular_core.Signal<StyleMap>;
5137
5157
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SlideCanvasComponent, never>;
5138
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SlideCanvasComponent, "pptx-slide-canvas", never, { "slide": { "alias": "slide"; "required": false; "isSignal": true; }; "canvasSize": { "alias": "canvasSize"; "required": true; "isSignal": true; }; "mediaDataUrls": { "alias": "mediaDataUrls"; "required": false; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "showGrid": { "alias": "showGrid"; "required": false; "isSignal": true; }; "showRulers": { "alias": "showRulers"; "required": false; "isSignal": true; }; "showGuides": { "alias": "showGuides"; "required": false; "isSignal": true; }; "snapToGrid": { "alias": "snapToGrid"; "required": false; "isSignal": true; }; "snapToGuides": { "alias": "snapToGuides"; "required": false; "isSignal": true; }; "autoFit": { "alias": "autoFit"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; "editingId": { "alias": "editingId"; "required": false; "isSignal": true; }; "editTemplateMode": { "alias": "editTemplateMode"; "required": false; "isSignal": true; }; "templateElements": { "alias": "templateElements"; "required": false; "isSignal": true; }; "drawTool": { "alias": "drawTool"; "required": false; "isSignal": true; }; "drawColor": { "alias": "drawColor"; "required": false; "isSignal": true; }; "drawWidth": { "alias": "drawWidth"; "required": false; "isSignal": true; }; }, { "elementSelect": "elementSelect"; "backgroundClick": "backgroundClick"; "transformStart": "transformStart"; "transformUpdate": "transformUpdate"; "contextMenu": "contextMenu"; "textEditStart": "textEditStart"; "textCommit": "textCommit"; "textCancel": "textCancel"; "textFormat": "textFormat"; "rotateUpdate": "rotateUpdate"; "marqueeSelect": "marqueeSelect"; "inkStrokeComplete": "inkStrokeComplete"; "eraserHit": "eraserHit"; "cellCommit": "cellCommit"; "tableChange": "tableChange"; }, never, never, true, never>;
5158
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SlideCanvasComponent, "pptx-slide-canvas", never, { "slide": { "alias": "slide"; "required": false; "isSignal": true; }; "canvasSize": { "alias": "canvasSize"; "required": true; "isSignal": true; }; "mediaDataUrls": { "alias": "mediaDataUrls"; "required": false; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "showGrid": { "alias": "showGrid"; "required": false; "isSignal": true; }; "showRulers": { "alias": "showRulers"; "required": false; "isSignal": true; }; "showGuides": { "alias": "showGuides"; "required": false; "isSignal": true; }; "snapToGrid": { "alias": "snapToGrid"; "required": false; "isSignal": true; }; "snapToGuides": { "alias": "snapToGuides"; "required": false; "isSignal": true; }; "autoFit": { "alias": "autoFit"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "presenting": { "alias": "presenting"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; "editingId": { "alias": "editingId"; "required": false; "isSignal": true; }; "editTemplateMode": { "alias": "editTemplateMode"; "required": false; "isSignal": true; }; "templateElements": { "alias": "templateElements"; "required": false; "isSignal": true; }; "drawTool": { "alias": "drawTool"; "required": false; "isSignal": true; }; "drawColor": { "alias": "drawColor"; "required": false; "isSignal": true; }; "drawWidth": { "alias": "drawWidth"; "required": false; "isSignal": true; }; }, { "elementSelect": "elementSelect"; "backgroundClick": "backgroundClick"; "transformStart": "transformStart"; "transformUpdate": "transformUpdate"; "contextMenu": "contextMenu"; "textEditStart": "textEditStart"; "textCommit": "textCommit"; "textCancel": "textCancel"; "textFormat": "textFormat"; "rotateUpdate": "rotateUpdate"; "marqueeSelect": "marqueeSelect"; "inkStrokeComplete": "inkStrokeComplete"; "eraserHit": "eraserHit"; "cellCommit": "cellCommit"; "tableChange": "tableChange"; }, never, never, true, never>;
5139
5159
  }
5140
5160
 
5141
5161
  /**
@@ -5331,6 +5351,12 @@ declare class ElementRendererComponent {
5331
5351
  * separate lightweight renderer).
5332
5352
  */
5333
5353
  readonly interactive: _angular_core.InputSignal<boolean>;
5354
+ /**
5355
+ * True only on the live presentation stage; threaded to the media renderer so
5356
+ * a slide's media autoplays when the slide becomes active (and to group
5357
+ * children so nested media autoplays too). False everywhere else.
5358
+ */
5359
+ readonly presenting: _angular_core.InputSignal<boolean>;
5334
5360
  /** Whether inline editing (e.g. table-cell text input) is enabled. */
5335
5361
  readonly editable: _angular_core.InputSignal<boolean>;
5336
5362
  /**
@@ -5395,7 +5421,7 @@ declare class ElementRendererComponent {
5395
5421
  readonly hasText: _angular_core.Signal<boolean>;
5396
5422
  readonly placeholderLabel: _angular_core.Signal<string>;
5397
5423
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ElementRendererComponent, never>;
5398
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ElementRendererComponent, "pptx-element-renderer", never, { "element": { "alias": "element"; "required": true; "isSignal": true; }; "mediaDataUrls": { "alias": "mediaDataUrls"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "obstacles": { "alias": "obstacles"; "required": false; "isSignal": true; }; "canvasWidth": { "alias": "canvasWidth"; "required": false; "isSignal": true; }; "canvasHeight": { "alias": "canvasHeight"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "fieldContext": { "alias": "fieldContext"; "required": false; "isSignal": true; }; "editTemplateMode": { "alias": "editTemplateMode"; "required": false; "isSignal": true; }; }, { "cellCommit": "cellCommit"; "tableChange": "tableChange"; }, never, never, true, never>;
5424
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ElementRendererComponent, "pptx-element-renderer", never, { "element": { "alias": "element"; "required": true; "isSignal": true; }; "mediaDataUrls": { "alias": "mediaDataUrls"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "obstacles": { "alias": "obstacles"; "required": false; "isSignal": true; }; "canvasWidth": { "alias": "canvasWidth"; "required": false; "isSignal": true; }; "canvasHeight": { "alias": "canvasHeight"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "presenting": { "alias": "presenting"; "required": false; "isSignal": true; }; "editable": { "alias": "editable"; "required": false; "isSignal": true; }; "fieldContext": { "alias": "fieldContext"; "required": false; "isSignal": true; }; "editTemplateMode": { "alias": "editTemplateMode"; "required": false; "isSignal": true; }; }, { "cellCommit": "cellCommit"; "tableChange": "tableChange"; }, never, never, true, never>;
5399
5425
  }
5400
5426
 
5401
5427
  /**
@@ -5877,6 +5903,13 @@ declare class OleRendererComponent {
5877
5903
  * when no rows are available.
5878
5904
  */
5879
5905
  readonly infoTitle: _angular_core.Signal<string>;
5906
+ /**
5907
+ * Open the recovered embedded payload in a new browser tab. Routes through
5908
+ * the shared {@link openUrlInNewTab} helper, which converts the `data:` URL to
5909
+ * a Blob object URL first: browsers silently refuse to navigate a new
5910
+ * top-level tab straight to a `data:` URL.
5911
+ */
5912
+ openEmbedded(): void;
5880
5913
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<OleRendererComponent, never>;
5881
5914
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<OleRendererComponent, "pptx-ole-renderer", never, { "element": { "alias": "element"; "required": true; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
5882
5915
  }
@@ -6272,6 +6305,17 @@ declare class PresentationAnnotationsService {
6272
6305
  * Horizontal swipe → left → next, right → previous
6273
6306
  *
6274
6307
  * Click on the overlay body → advance to next visible slide.
6308
+ *
6309
+ * Fullscreen (mirrors the React `usePresentationMode` / Vue `PresentationMode.vue`
6310
+ * behavior, on top of the CSS-fixed full-viewport overlay above): the real
6311
+ * Fullscreen API is requested on this component's root element once it mounts,
6312
+ * and released again on destroy, so the browser chrome (address bar, etc.) gets
6313
+ * out of the way on mobile the same way it does for React/Vue. A
6314
+ * `fullscreenchange` listener syncs back to `closed` when fullscreen is exited
6315
+ * from outside this component's own close/Escape handling (browser UI, the
6316
+ * Android back gesture, etc.). Environments without Fullscreen API support
6317
+ * (iOS Safari's partial support, `jsdom` in tests) degrade silently to the
6318
+ * plain CSS overlay.
6275
6319
  */
6276
6320
  declare class PresentationOverlayComponent implements OnInit {
6277
6321
  readonly slides: _angular_core.InputSignal<PptxSlide[]>;
@@ -6309,8 +6353,19 @@ declare class PresentationOverlayComponent implements OnInit {
6309
6353
  protected readonly subtitlesVisible: _angular_core.WritableSignal<boolean>;
6310
6354
  /** The slide stage root; animation styles are applied to its elements. */
6311
6355
  private readonly stageRef;
6312
- /** The overlay root; the shared touch-gesture recogniser attaches here. */
6356
+ /**
6357
+ * The overlay root; the shared touch-gesture recogniser attaches here, and
6358
+ * it is the element the real Fullscreen API is requested on (see
6359
+ * {@link setupFullscreen}).
6360
+ */
6313
6361
  private readonly rootRef;
6362
+ /**
6363
+ * Guards against handling the same exit twice: e.g. Escape both reaches our
6364
+ * own `keydown` handler AND causes the browser to natively exit fullscreen
6365
+ * (firing `fullscreenchange`), or the close button's `click` and `touchend`
6366
+ * both fire for one tap.
6367
+ */
6368
+ private closing;
6314
6369
  constructor();
6315
6370
  /**
6316
6371
  * Imperatively apply animation reveal / pending CSS to the slide's element
@@ -6349,6 +6404,24 @@ declare class PresentationOverlayComponent implements OnInit {
6349
6404
  * (afterNextRender) and is torn down on destroy.
6350
6405
  */
6351
6406
  private setupTouchGestures;
6407
+ /**
6408
+ * Request real fullscreen on the overlay root once it mounts, and release
6409
+ * it again when the overlay is destroyed (`presenting` flips back to
6410
+ * false, closing this `@if` block). Mirrors Vue's `onMounted` /
6411
+ * `onBeforeUnmount` pair on its own overlay root; feature-detected so
6412
+ * unsupported environments just keep the CSS overlay.
6413
+ */
6414
+ private setupFullscreen;
6415
+ /**
6416
+ * Sync back to `closed` when fullscreen is exited from OUTSIDE this
6417
+ * component's own close/Escape handling: the browser's native Esc handling
6418
+ * can beat (or replace) our `keydown` listener, and mobile back
6419
+ * gestures/browser-UI exits never reach it at all. Without this, `presenting`
6420
+ * would stay stuck true while the app has silently fallen back to the plain
6421
+ * CSS overlay. `emitClosed()` is itself guarded against double-firing, so it
6422
+ * is safe if our own close flow *also* triggers this event.
6423
+ */
6424
+ protected onFullscreenChange(): void;
6352
6425
  ngOnInit(): void;
6353
6426
  onWindowResize(): void;
6354
6427
  private snapViewport;