@files-preview-app/preview-file 1.3.5 → 1.3.6

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.
@@ -1,6 +1,6 @@
1
1
  import { OnInit, OnChanges, OnDestroy, EventEmitter, ElementRef, NgZone, SimpleChanges } from '@angular/core';
2
2
  import { FilePreviewViewer } from './index.cjs';
3
- import { F as FileSource, P as PreviewPlugin, a as PreviewViewerOptions, b as PreviewInstance } from './index.d-B79v0jxi.cjs';
3
+ import { F as FileSource, P as PreviewPlugin, a as PreviewViewerOptions, b as PreviewInstance } from './index.d-DPqVo4OT.cjs';
4
4
 
5
5
  declare class FilePreviewComponent implements OnInit, OnChanges, OnDestroy {
6
6
  private ngZone;
package/dist/angular.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { OnInit, OnChanges, OnDestroy, EventEmitter, ElementRef, NgZone, SimpleChanges } from '@angular/core';
2
2
  import { FilePreviewViewer } from './index.js';
3
- import { F as FileSource, P as PreviewPlugin, a as PreviewViewerOptions, b as PreviewInstance } from './index.d-B79v0jxi.js';
3
+ import { F as FileSource, P as PreviewPlugin, a as PreviewViewerOptions, b as PreviewInstance } from './index.d-DPqVo4OT.js';
4
4
 
5
5
  declare class FilePreviewComponent implements OnInit, OnChanges, OnDestroy {
6
6
  private ngZone;
package/dist/angular.js CHANGED
@@ -543,6 +543,7 @@ var ICON_COPY = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" str
543
543
  var ICON_FAST_FORWARD = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon></svg>`;
544
544
  var ICON_REWIND = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon></svg>`;
545
545
  var ICON_EXTERNAL_WINDOW = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"></rect><line x1="3" y1="8" x2="21" y2="8"></line><circle cx="6" cy="5.5" r="0.75" fill="currentColor"></circle><circle cx="8.5" cy="5.5" r="0.75" fill="currentColor"></circle><polyline points="14 13 18 13 18 17"></polyline><line x1="11" y1="20" x2="18" y2="13"></line></svg>`;
546
+ var ICON_RESET_ZOOM = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><path d="M13 11a3 3 0 1 0-3 3"></path><path d="M10 11v3h3"></path></svg>`;
546
547
  var ICON_MAP = {
547
548
  "zoom-in": ICON_ZOOM_IN,
548
549
  "zoom-out": ICON_ZOOM_OUT,
@@ -572,7 +573,10 @@ var ICON_MAP = {
572
573
  "open-window": ICON_EXTERNAL_WINDOW,
573
574
  "external-window": ICON_EXTERNAL_WINDOW,
574
575
  "openWindow": ICON_EXTERNAL_WINDOW,
575
- "openSeparateWindow": ICON_EXTERNAL_WINDOW
576
+ "openSeparateWindow": ICON_EXTERNAL_WINDOW,
577
+ "reset-zoom": ICON_RESET_ZOOM,
578
+ "zoom-reset": ICON_RESET_ZOOM,
579
+ "resetZoom": ICON_RESET_ZOOM
576
580
  };
577
581
  var ToolbarController = class {
578
582
  el;
@@ -605,6 +609,10 @@ var ToolbarController = class {
605
609
  this.config.fitToPage = false;
606
610
  this.config.fitWidth = false;
607
611
  }
612
+ if (actionId === "reset-zoom" || actionId === "zoom-reset" || actionId === "resetZoom") {
613
+ this.config.resetZoom = false;
614
+ this.config.zoomReset = false;
615
+ }
608
616
  if (actionId === "rotate-cw" || actionId === "rotate" || actionId === "rotateCW") this.config.rotate = false;
609
617
  if (actionId === "fullscreen") this.config.fullscreen = false;
610
618
  if (actionId === "download") this.config.download = false;
@@ -629,6 +637,10 @@ var ToolbarController = class {
629
637
  this.config.fitToPage = true;
630
638
  this.config.fitWidth = true;
631
639
  }
640
+ if (actionId === "reset-zoom" || actionId === "zoom-reset" || actionId === "resetZoom") {
641
+ this.config.resetZoom = true;
642
+ this.config.zoomReset = true;
643
+ }
632
644
  if (actionId === "rotate-cw" || actionId === "rotate" || actionId === "rotateCW") this.config.rotate = true;
633
645
  if (actionId === "fullscreen") this.config.fullscreen = true;
634
646
  if (actionId === "download") this.config.download = true;
@@ -648,6 +660,7 @@ var ToolbarController = class {
648
660
  if (actionId === "zoomIn") return "zoom-in";
649
661
  if (actionId === "zoomOut") return "zoom-out";
650
662
  if (actionId === "fitPage" || actionId === "fitToPage" || actionId === "fitWidth") return "fit-page";
663
+ if (actionId === "resetZoom" || actionId === "zoomReset") return "reset-zoom";
651
664
  if (actionId === "rotateCW") return "rotate-cw";
652
665
  if (actionId === "rotateCCW") return "rotate-ccw";
653
666
  if (actionId === "openWindow" || actionId === "openSeparateWindow") return "open-window";
@@ -690,6 +703,9 @@ var ToolbarController = class {
690
703
  if ((id === "fit-page" || id === "fit-width" || id === "fit-slide") && (c.fitPage === false || c.fitToPage === false || c.fitWidth === false || c["fit-page"] === false || c["fit-width"] === false)) {
691
704
  return false;
692
705
  }
706
+ if ((id === "reset-zoom" || id === "zoom-reset") && (c.resetZoom === false || c.zoomReset === false || c["reset-zoom"] === false || c["zoom-reset"] === false)) {
707
+ return false;
708
+ }
693
709
  if ((id === "rotate-cw" || id === "rotate-ccw" || id === "rotate") && (c.rotate === false || c.rotateCW === false || c.rotateCCW === false || c["rotate-cw"] === false)) {
694
710
  return false;
695
711
  }
@@ -1136,6 +1152,9 @@ var FilePreviewViewer = class _FilePreviewViewer {
1136
1152
  this.activeInstance = instance;
1137
1153
  instance.openInSeparateWindow = () => this.openInSeparateWindow();
1138
1154
  instance.toggleThumbnails = () => this.toggleThumbnails();
1155
+ if (!instance.resetZoom && instance.fitToPage) {
1156
+ instance.resetZoom = () => instance.fitToPage?.();
1157
+ }
1139
1158
  this.hideLoading();
1140
1159
  this.eventEmitter.emit("loaded", { metadata, plugin: matchedPlugin.id });
1141
1160
  const isToolbarVisible = options.showToolbar !== false && options.toolbar !== false;
@@ -1419,6 +1438,16 @@ var FilePreviewViewer = class _FilePreviewViewer {
1419
1438
  fitToPage() {
1420
1439
  this.activeInstance?.fitToPage?.();
1421
1440
  }
1441
+ /**
1442
+ * Reset zoom level to initial/default fit state.
1443
+ */
1444
+ resetZoom() {
1445
+ if (this.activeInstance?.resetZoom) {
1446
+ this.activeInstance.resetZoom();
1447
+ } else if (this.activeInstance?.fitToPage) {
1448
+ this.activeInstance.fitToPage();
1449
+ }
1450
+ }
1422
1451
  /**
1423
1452
  * Zoom in.
1424
1453
  */
@@ -2040,6 +2069,14 @@ var PdfPlugin = class {
2040
2069
  group: "zoom",
2041
2070
  execute: () => instance.fitToPage?.()
2042
2071
  },
2072
+ {
2073
+ id: "reset-zoom",
2074
+ icon: "reset-zoom",
2075
+ label: "Reset Zoom",
2076
+ type: "button",
2077
+ group: "zoom",
2078
+ execute: () => instance.resetZoom?.()
2079
+ },
2043
2080
  {
2044
2081
  id: "fit-width",
2045
2082
  icon: "fit-width",
@@ -2302,6 +2339,14 @@ var PdfPlugin = class {
2302
2339
  zoomScale = 1;
2303
2340
  renderPage(currentPage);
2304
2341
  },
2342
+ resetZoom: () => {
2343
+ fitMode = "page";
2344
+ zoomScale = 1;
2345
+ rotation = 0;
2346
+ container.scrollTop = 0;
2347
+ container.scrollLeft = 0;
2348
+ renderPage(currentPage);
2349
+ },
2305
2350
  fitToWidth: () => {
2306
2351
  fitMode = "width";
2307
2352
  zoomScale = 1;
@@ -2469,6 +2514,16 @@ var MediaPlugin = class {
2469
2514
  instance.fitToPage?.();
2470
2515
  }
2471
2516
  },
2517
+ {
2518
+ id: "reset-zoom",
2519
+ icon: "reset-zoom",
2520
+ label: "Reset Zoom",
2521
+ type: "button",
2522
+ group: "zoom",
2523
+ execute: () => {
2524
+ instance.resetZoom?.();
2525
+ }
2526
+ },
2472
2527
  {
2473
2528
  id: "rotate-cw",
2474
2529
  icon: "rotate-cw",
@@ -2642,6 +2697,13 @@ var MediaPlugin = class {
2642
2697
  rotation = 0;
2643
2698
  applyTransform();
2644
2699
  } : void 0,
2700
+ resetZoom: isImage ? () => {
2701
+ currentZoom = 1;
2702
+ rotation = 0;
2703
+ ctx.container.scrollTop = 0;
2704
+ ctx.container.scrollLeft = 0;
2705
+ applyTransform();
2706
+ } : void 0,
2645
2707
  rotateCW: isImage || isVideo ? () => {
2646
2708
  rotation = (rotation + 90) % 360;
2647
2709
  applyTransform();
@@ -2758,6 +2820,14 @@ var DocxPlugin = class {
2758
2820
  group: "zoom",
2759
2821
  execute: () => instance.fitToPage?.()
2760
2822
  },
2823
+ {
2824
+ id: "reset-zoom",
2825
+ icon: "reset-zoom",
2826
+ label: "Reset Zoom",
2827
+ type: "button",
2828
+ group: "zoom",
2829
+ execute: () => instance.resetZoom?.()
2830
+ },
2761
2831
  {
2762
2832
  id: "rotate-cw",
2763
2833
  icon: "rotate-cw",
@@ -3074,6 +3144,14 @@ var DocxPlugin = class {
3074
3144
  rotation = 0;
3075
3145
  applyTransform();
3076
3146
  },
3147
+ resetZoom: () => {
3148
+ isUserZoomed = false;
3149
+ scale = calculateFitScale("page");
3150
+ rotation = 0;
3151
+ ctx.container.scrollTop = 0;
3152
+ ctx.container.scrollLeft = 0;
3153
+ applyTransform();
3154
+ },
3077
3155
  rotateCW: () => {
3078
3156
  rotation = (rotation + 90) % 360;
3079
3157
  applyTransform();
@@ -3523,6 +3601,16 @@ var ExcelPlugin = class {
3523
3601
  instance.zoomIn?.();
3524
3602
  }
3525
3603
  },
3604
+ {
3605
+ id: "reset-zoom",
3606
+ icon: "reset-zoom",
3607
+ label: "Reset Zoom",
3608
+ type: "button",
3609
+ group: "zoom",
3610
+ execute: () => {
3611
+ instance.resetZoom?.();
3612
+ }
3613
+ },
3526
3614
  {
3527
3615
  id: "download",
3528
3616
  icon: "download",
@@ -3710,6 +3798,12 @@ var ExcelPlugin = class {
3710
3798
  scale = calculateFitScale();
3711
3799
  applyTransform();
3712
3800
  },
3801
+ resetZoom: () => {
3802
+ scale = calculateFitScale();
3803
+ contentArea.scrollTop = 0;
3804
+ contentArea.scrollLeft = 0;
3805
+ applyTransform();
3806
+ },
3713
3807
  rotateCW: () => {
3714
3808
  },
3715
3809
  rotateCCW: () => {
@@ -3840,6 +3934,16 @@ var CsvPlugin = class {
3840
3934
  instance.zoomIn?.();
3841
3935
  }
3842
3936
  },
3937
+ {
3938
+ id: "reset-zoom",
3939
+ icon: "reset-zoom",
3940
+ label: "Reset Zoom",
3941
+ type: "button",
3942
+ group: "zoom",
3943
+ execute: () => {
3944
+ instance.resetZoom?.();
3945
+ }
3946
+ },
3843
3947
  {
3844
3948
  id: "download",
3845
3949
  icon: "download",
@@ -4029,6 +4133,12 @@ var CsvPlugin = class {
4029
4133
  scale = calculateFitScale();
4030
4134
  applyScale();
4031
4135
  },
4136
+ resetZoom: () => {
4137
+ scale = calculateFitScale();
4138
+ container.scrollTop = 0;
4139
+ container.scrollLeft = 0;
4140
+ applyScale();
4141
+ },
4032
4142
  rotateCW: () => {
4033
4143
  },
4034
4144
  rotateCCW: () => {
@@ -4144,6 +4254,16 @@ var CodePlugin = class {
4144
4254
  instance.zoomIn?.();
4145
4255
  }
4146
4256
  },
4257
+ {
4258
+ id: "reset-zoom",
4259
+ icon: "reset-zoom",
4260
+ label: "Reset Zoom",
4261
+ type: "button",
4262
+ group: "zoom",
4263
+ execute: () => {
4264
+ instance.resetZoom?.();
4265
+ }
4266
+ },
4147
4267
  {
4148
4268
  id: "copy",
4149
4269
  icon: "copy",
@@ -4423,6 +4543,15 @@ var CodePlugin = class {
4423
4543
  zoomLevel = isTxt ? calculateTxtFit() : 1;
4424
4544
  updateTransform();
4425
4545
  },
4546
+ resetZoom: () => {
4547
+ isUserZoomed = false;
4548
+ fontSize = 13;
4549
+ rotation = 0;
4550
+ zoomLevel = isTxt ? calculateTxtFit() : 1;
4551
+ container.scrollTop = 0;
4552
+ container.scrollLeft = 0;
4553
+ updateTransform();
4554
+ },
4426
4555
  rotateCW: () => {
4427
4556
  rotation = (rotation + 90) % 360;
4428
4557
  updateTransform();
@@ -4485,11 +4614,19 @@ var ArchivePlugin = class {
4485
4614
  {
4486
4615
  id: "fit-page",
4487
4616
  icon: "fit-page",
4488
- label: "Reset Zoom",
4617
+ label: "Fit to Page",
4489
4618
  type: "button",
4490
4619
  group: "zoom",
4491
4620
  execute: () => instance.fitToPage?.()
4492
4621
  },
4622
+ {
4623
+ id: "reset-zoom",
4624
+ icon: "reset-zoom",
4625
+ label: "Reset Zoom",
4626
+ type: "button",
4627
+ group: "zoom",
4628
+ execute: () => instance.resetZoom?.()
4629
+ },
4493
4630
  {
4494
4631
  id: "download",
4495
4632
  icon: "download",
@@ -4644,7 +4781,13 @@ var ArchivePlugin = class {
4644
4781
  },
4645
4782
  fitToPage: () => {
4646
4783
  scale = 1;
4647
- wrapper.style.transform = `scale(1)`;
4784
+ wrapper.style.transform = "scale(1)";
4785
+ },
4786
+ resetZoom: () => {
4787
+ scale = 1;
4788
+ wrapper.style.transform = "scale(1)";
4789
+ ctx.container.scrollTop = 0;
4790
+ ctx.container.scrollLeft = 0;
4648
4791
  },
4649
4792
  download: () => {
4650
4793
  downloadFile(ctx.buffer, ctx.metadata.name || "archive.zip", "application/zip");
@@ -4696,6 +4839,14 @@ var MarkdownPlugin = class {
4696
4839
  group: "zoom",
4697
4840
  execute: () => instance.fitToPage?.()
4698
4841
  },
4842
+ {
4843
+ id: "reset-zoom",
4844
+ icon: "reset-zoom",
4845
+ label: "Reset Zoom",
4846
+ type: "button",
4847
+ group: "zoom",
4848
+ execute: () => instance.resetZoom?.()
4849
+ },
4699
4850
  {
4700
4851
  id: "copy",
4701
4852
  icon: "copy",
@@ -4849,6 +5000,12 @@ var MarkdownPlugin = class {
4849
5000
  fontSize = 15;
4850
5001
  wrapper.style.fontSize = "15px";
4851
5002
  },
5003
+ resetZoom: () => {
5004
+ fontSize = 15;
5005
+ wrapper.style.fontSize = "15px";
5006
+ ctx.container.scrollTop = 0;
5007
+ ctx.container.scrollLeft = 0;
5008
+ },
4852
5009
  download: () => {
4853
5010
  downloadFile(ctx.buffer, ctx.metadata.name || "document.md", "text/markdown");
4854
5011
  },
@@ -4942,6 +5099,14 @@ var PptxPlugin = class {
4942
5099
  group: "zoom",
4943
5100
  execute: () => instance.fitToPage?.()
4944
5101
  },
5102
+ {
5103
+ id: "reset-zoom",
5104
+ icon: "reset-zoom",
5105
+ label: "Reset Zoom",
5106
+ type: "button",
5107
+ group: "zoom",
5108
+ execute: () => instance.resetZoom?.()
5109
+ },
4945
5110
  {
4946
5111
  id: "rotate-cw",
4947
5112
  icon: "rotate-cw",
@@ -5061,6 +5226,13 @@ var PptxPlugin = class {
5061
5226
  rotation = 0;
5062
5227
  applyTransform();
5063
5228
  },
5229
+ resetZoom: () => {
5230
+ scale = calculateFitScale();
5231
+ rotation = 0;
5232
+ wrapper.scrollTop = 0;
5233
+ wrapper.scrollLeft = 0;
5234
+ applyTransform();
5235
+ },
5064
5236
  rotateCW: () => {
5065
5237
  rotation = (rotation + 90) % 360;
5066
5238
  applyTransform();
@@ -5136,6 +5308,14 @@ var ThreeDPlugin = class {
5136
5308
  group: "zoom",
5137
5309
  execute: () => instance.fitToPage?.()
5138
5310
  },
5311
+ {
5312
+ id: "reset-zoom",
5313
+ icon: "reset-zoom",
5314
+ label: "Reset Zoom",
5315
+ type: "button",
5316
+ group: "zoom",
5317
+ execute: () => instance.resetZoom?.()
5318
+ },
5139
5319
  {
5140
5320
  id: "rotate-cw",
5141
5321
  icon: "rotate-cw",
@@ -5272,6 +5452,7 @@ var ThreeDPlugin = class {
5272
5452
  controls.update();
5273
5453
  },
5274
5454
  fitToPage: fitCamera,
5455
+ resetZoom: fitCamera,
5275
5456
  rotateCW: () => {
5276
5457
  isWireframe = !isWireframe;
5277
5458
  materials.forEach((m) => {
@@ -5486,6 +5667,14 @@ var RtfPlugin = class {
5486
5667
  group: "zoom",
5487
5668
  execute: () => instance.fitToPage?.()
5488
5669
  },
5670
+ {
5671
+ id: "reset-zoom",
5672
+ icon: "reset-zoom",
5673
+ label: "Reset Zoom",
5674
+ type: "button",
5675
+ group: "zoom",
5676
+ execute: () => instance.resetZoom?.()
5677
+ },
5489
5678
  {
5490
5679
  id: "rotate-cw",
5491
5680
  icon: "rotate-cw",
@@ -5955,6 +6144,15 @@ var RtfPlugin = class {
5955
6144
  rotation = 0;
5956
6145
  applyTransform();
5957
6146
  },
6147
+ resetZoom: () => {
6148
+ isUserZoomed = false;
6149
+ fitMode = "width";
6150
+ scale = calculateFitScale("width");
6151
+ rotation = 0;
6152
+ ctx.container.scrollTop = 0;
6153
+ ctx.container.scrollLeft = 0;
6154
+ applyTransform();
6155
+ },
5958
6156
  rotateCW: () => {
5959
6157
  rotation = (rotation + 90) % 360;
5960
6158
  applyTransform();
@@ -6022,6 +6220,14 @@ var HtmlPreviewPlugin = class {
6022
6220
  group: "zoom",
6023
6221
  execute: () => instance.fitToPage?.()
6024
6222
  },
6223
+ {
6224
+ id: "reset-zoom",
6225
+ icon: "reset-zoom",
6226
+ label: "Reset Zoom",
6227
+ type: "button",
6228
+ group: "zoom",
6229
+ execute: () => instance.resetZoom?.()
6230
+ },
6025
6231
  {
6026
6232
  id: "copy",
6027
6233
  icon: "copy",
@@ -6094,6 +6300,12 @@ var HtmlPreviewPlugin = class {
6094
6300
  scale = 1;
6095
6301
  iframe.style.transform = "scale(1)";
6096
6302
  },
6303
+ resetZoom: () => {
6304
+ scale = 1;
6305
+ iframe.style.transform = "scale(1)";
6306
+ ctx.container.scrollTop = 0;
6307
+ ctx.container.scrollLeft = 0;
6308
+ },
6097
6309
  copy: () => {
6098
6310
  navigator.clipboard.writeText(rawHtml);
6099
6311
  },
@@ -6194,6 +6406,14 @@ var OpenDocumentPlugin = class {
6194
6406
  group: "zoom",
6195
6407
  execute: () => instance.fitToPage?.()
6196
6408
  },
6409
+ {
6410
+ id: "reset-zoom",
6411
+ icon: "reset-zoom",
6412
+ label: "Reset Zoom",
6413
+ type: "button",
6414
+ group: "zoom",
6415
+ execute: () => instance.resetZoom?.()
6416
+ },
6197
6417
  {
6198
6418
  id: "rotate-cw",
6199
6419
  icon: "rotate-cw",
@@ -6461,6 +6681,15 @@ var OpenDocumentPlugin = class {
6461
6681
  rotation = 0;
6462
6682
  applyTransform();
6463
6683
  },
6684
+ resetZoom: () => {
6685
+ isUserZoomed = false;
6686
+ fitMode = "width";
6687
+ scale = calculateFitScale("width");
6688
+ rotation = 0;
6689
+ container.scrollTop = 0;
6690
+ container.scrollLeft = 0;
6691
+ applyTransform();
6692
+ },
6464
6693
  rotateCW: () => {
6465
6694
  rotation = (rotation + 90) % 360;
6466
6695
  applyTransform();
@@ -6804,6 +7033,14 @@ var DocPlugin = class {
6804
7033
  group: "zoom",
6805
7034
  execute: () => instance.fitToPage?.()
6806
7035
  },
7036
+ {
7037
+ id: "reset-zoom",
7038
+ icon: "reset-zoom",
7039
+ label: "Reset Zoom",
7040
+ type: "button",
7041
+ group: "zoom",
7042
+ execute: () => instance.resetZoom?.()
7043
+ },
6807
7044
  {
6808
7045
  id: "rotate-cw",
6809
7046
  icon: "rotate-cw",
@@ -7010,6 +7247,15 @@ var DocPlugin = class {
7010
7247
  rotation = 0;
7011
7248
  applyTransform();
7012
7249
  },
7250
+ resetZoom: () => {
7251
+ isUserZoomed = false;
7252
+ fitMode = "width";
7253
+ scale = calculateFitScale("width");
7254
+ rotation = 0;
7255
+ ctx.container.scrollTop = 0;
7256
+ ctx.container.scrollLeft = 0;
7257
+ applyTransform();
7258
+ },
7013
7259
  rotateCW: () => {
7014
7260
  rotation = (rotation + 90) % 360;
7015
7261
  applyTransform();
@@ -7490,6 +7736,14 @@ var PptPlugin = class {
7490
7736
  group: "zoom",
7491
7737
  execute: () => instance.fitToPage?.()
7492
7738
  },
7739
+ {
7740
+ id: "reset-zoom",
7741
+ icon: "reset-zoom",
7742
+ label: "Reset Zoom",
7743
+ type: "button",
7744
+ group: "zoom",
7745
+ execute: () => instance.resetZoom?.()
7746
+ },
7493
7747
  {
7494
7748
  id: "rotate-cw",
7495
7749
  icon: "rotate-cw",
@@ -7678,6 +7932,13 @@ var PptPlugin = class {
7678
7932
  rotation = 0;
7679
7933
  applyTransform();
7680
7934
  },
7935
+ resetZoom: () => {
7936
+ scale = calculateFitScale();
7937
+ rotation = 0;
7938
+ container.scrollTop = 0;
7939
+ container.scrollLeft = 0;
7940
+ applyTransform();
7941
+ },
7681
7942
  rotateCW: () => {
7682
7943
  rotation = (rotation + 90) % 360;
7683
7944
  applyTransform();