@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.
package/dist/react.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
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
  interface FilePreviewProps {
6
6
  /** File to preview. Accepts URL string, File, Blob, ArrayBuffer, or Uint8Array */
package/dist/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
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
  interface FilePreviewProps {
6
6
  /** File to preview. Accepts URL string, File, Blob, ArrayBuffer, or Uint8Array */
package/dist/react.js CHANGED
@@ -496,6 +496,7 @@ var ICON_COPY = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" str
496
496
  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>`;
497
497
  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>`;
498
498
  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>`;
499
+ 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>`;
499
500
  var ICON_MAP = {
500
501
  "zoom-in": ICON_ZOOM_IN,
501
502
  "zoom-out": ICON_ZOOM_OUT,
@@ -525,7 +526,10 @@ var ICON_MAP = {
525
526
  "open-window": ICON_EXTERNAL_WINDOW,
526
527
  "external-window": ICON_EXTERNAL_WINDOW,
527
528
  "openWindow": ICON_EXTERNAL_WINDOW,
528
- "openSeparateWindow": ICON_EXTERNAL_WINDOW
529
+ "openSeparateWindow": ICON_EXTERNAL_WINDOW,
530
+ "reset-zoom": ICON_RESET_ZOOM,
531
+ "zoom-reset": ICON_RESET_ZOOM,
532
+ "resetZoom": ICON_RESET_ZOOM
529
533
  };
530
534
  var ToolbarController = class {
531
535
  el;
@@ -558,6 +562,10 @@ var ToolbarController = class {
558
562
  this.config.fitToPage = false;
559
563
  this.config.fitWidth = false;
560
564
  }
565
+ if (actionId === "reset-zoom" || actionId === "zoom-reset" || actionId === "resetZoom") {
566
+ this.config.resetZoom = false;
567
+ this.config.zoomReset = false;
568
+ }
561
569
  if (actionId === "rotate-cw" || actionId === "rotate" || actionId === "rotateCW") this.config.rotate = false;
562
570
  if (actionId === "fullscreen") this.config.fullscreen = false;
563
571
  if (actionId === "download") this.config.download = false;
@@ -582,6 +590,10 @@ var ToolbarController = class {
582
590
  this.config.fitToPage = true;
583
591
  this.config.fitWidth = true;
584
592
  }
593
+ if (actionId === "reset-zoom" || actionId === "zoom-reset" || actionId === "resetZoom") {
594
+ this.config.resetZoom = true;
595
+ this.config.zoomReset = true;
596
+ }
585
597
  if (actionId === "rotate-cw" || actionId === "rotate" || actionId === "rotateCW") this.config.rotate = true;
586
598
  if (actionId === "fullscreen") this.config.fullscreen = true;
587
599
  if (actionId === "download") this.config.download = true;
@@ -601,6 +613,7 @@ var ToolbarController = class {
601
613
  if (actionId === "zoomIn") return "zoom-in";
602
614
  if (actionId === "zoomOut") return "zoom-out";
603
615
  if (actionId === "fitPage" || actionId === "fitToPage" || actionId === "fitWidth") return "fit-page";
616
+ if (actionId === "resetZoom" || actionId === "zoomReset") return "reset-zoom";
604
617
  if (actionId === "rotateCW") return "rotate-cw";
605
618
  if (actionId === "rotateCCW") return "rotate-ccw";
606
619
  if (actionId === "openWindow" || actionId === "openSeparateWindow") return "open-window";
@@ -643,6 +656,9 @@ var ToolbarController = class {
643
656
  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)) {
644
657
  return false;
645
658
  }
659
+ if ((id === "reset-zoom" || id === "zoom-reset") && (c.resetZoom === false || c.zoomReset === false || c["reset-zoom"] === false || c["zoom-reset"] === false)) {
660
+ return false;
661
+ }
646
662
  if ((id === "rotate-cw" || id === "rotate-ccw" || id === "rotate") && (c.rotate === false || c.rotateCW === false || c.rotateCCW === false || c["rotate-cw"] === false)) {
647
663
  return false;
648
664
  }
@@ -1089,6 +1105,9 @@ var FilePreviewViewer = class _FilePreviewViewer {
1089
1105
  this.activeInstance = instance;
1090
1106
  instance.openInSeparateWindow = () => this.openInSeparateWindow();
1091
1107
  instance.toggleThumbnails = () => this.toggleThumbnails();
1108
+ if (!instance.resetZoom && instance.fitToPage) {
1109
+ instance.resetZoom = () => instance.fitToPage?.();
1110
+ }
1092
1111
  this.hideLoading();
1093
1112
  this.eventEmitter.emit("loaded", { metadata, plugin: matchedPlugin.id });
1094
1113
  const isToolbarVisible = options.showToolbar !== false && options.toolbar !== false;
@@ -1372,6 +1391,16 @@ var FilePreviewViewer = class _FilePreviewViewer {
1372
1391
  fitToPage() {
1373
1392
  this.activeInstance?.fitToPage?.();
1374
1393
  }
1394
+ /**
1395
+ * Reset zoom level to initial/default fit state.
1396
+ */
1397
+ resetZoom() {
1398
+ if (this.activeInstance?.resetZoom) {
1399
+ this.activeInstance.resetZoom();
1400
+ } else if (this.activeInstance?.fitToPage) {
1401
+ this.activeInstance.fitToPage();
1402
+ }
1403
+ }
1375
1404
  /**
1376
1405
  * Zoom in.
1377
1406
  */
@@ -1993,6 +2022,14 @@ var PdfPlugin = class {
1993
2022
  group: "zoom",
1994
2023
  execute: () => instance.fitToPage?.()
1995
2024
  },
2025
+ {
2026
+ id: "reset-zoom",
2027
+ icon: "reset-zoom",
2028
+ label: "Reset Zoom",
2029
+ type: "button",
2030
+ group: "zoom",
2031
+ execute: () => instance.resetZoom?.()
2032
+ },
1996
2033
  {
1997
2034
  id: "fit-width",
1998
2035
  icon: "fit-width",
@@ -2255,6 +2292,14 @@ var PdfPlugin = class {
2255
2292
  zoomScale = 1;
2256
2293
  renderPage(currentPage);
2257
2294
  },
2295
+ resetZoom: () => {
2296
+ fitMode = "page";
2297
+ zoomScale = 1;
2298
+ rotation = 0;
2299
+ container.scrollTop = 0;
2300
+ container.scrollLeft = 0;
2301
+ renderPage(currentPage);
2302
+ },
2258
2303
  fitToWidth: () => {
2259
2304
  fitMode = "width";
2260
2305
  zoomScale = 1;
@@ -2422,6 +2467,16 @@ var MediaPlugin = class {
2422
2467
  instance.fitToPage?.();
2423
2468
  }
2424
2469
  },
2470
+ {
2471
+ id: "reset-zoom",
2472
+ icon: "reset-zoom",
2473
+ label: "Reset Zoom",
2474
+ type: "button",
2475
+ group: "zoom",
2476
+ execute: () => {
2477
+ instance.resetZoom?.();
2478
+ }
2479
+ },
2425
2480
  {
2426
2481
  id: "rotate-cw",
2427
2482
  icon: "rotate-cw",
@@ -2595,6 +2650,13 @@ var MediaPlugin = class {
2595
2650
  rotation = 0;
2596
2651
  applyTransform();
2597
2652
  } : void 0,
2653
+ resetZoom: isImage ? () => {
2654
+ currentZoom = 1;
2655
+ rotation = 0;
2656
+ ctx.container.scrollTop = 0;
2657
+ ctx.container.scrollLeft = 0;
2658
+ applyTransform();
2659
+ } : void 0,
2598
2660
  rotateCW: isImage || isVideo ? () => {
2599
2661
  rotation = (rotation + 90) % 360;
2600
2662
  applyTransform();
@@ -2711,6 +2773,14 @@ var DocxPlugin = class {
2711
2773
  group: "zoom",
2712
2774
  execute: () => instance.fitToPage?.()
2713
2775
  },
2776
+ {
2777
+ id: "reset-zoom",
2778
+ icon: "reset-zoom",
2779
+ label: "Reset Zoom",
2780
+ type: "button",
2781
+ group: "zoom",
2782
+ execute: () => instance.resetZoom?.()
2783
+ },
2714
2784
  {
2715
2785
  id: "rotate-cw",
2716
2786
  icon: "rotate-cw",
@@ -3027,6 +3097,14 @@ var DocxPlugin = class {
3027
3097
  rotation = 0;
3028
3098
  applyTransform();
3029
3099
  },
3100
+ resetZoom: () => {
3101
+ isUserZoomed = false;
3102
+ scale = calculateFitScale("page");
3103
+ rotation = 0;
3104
+ ctx.container.scrollTop = 0;
3105
+ ctx.container.scrollLeft = 0;
3106
+ applyTransform();
3107
+ },
3030
3108
  rotateCW: () => {
3031
3109
  rotation = (rotation + 90) % 360;
3032
3110
  applyTransform();
@@ -3476,6 +3554,16 @@ var ExcelPlugin = class {
3476
3554
  instance.zoomIn?.();
3477
3555
  }
3478
3556
  },
3557
+ {
3558
+ id: "reset-zoom",
3559
+ icon: "reset-zoom",
3560
+ label: "Reset Zoom",
3561
+ type: "button",
3562
+ group: "zoom",
3563
+ execute: () => {
3564
+ instance.resetZoom?.();
3565
+ }
3566
+ },
3479
3567
  {
3480
3568
  id: "download",
3481
3569
  icon: "download",
@@ -3663,6 +3751,12 @@ var ExcelPlugin = class {
3663
3751
  scale = calculateFitScale();
3664
3752
  applyTransform();
3665
3753
  },
3754
+ resetZoom: () => {
3755
+ scale = calculateFitScale();
3756
+ contentArea.scrollTop = 0;
3757
+ contentArea.scrollLeft = 0;
3758
+ applyTransform();
3759
+ },
3666
3760
  rotateCW: () => {
3667
3761
  },
3668
3762
  rotateCCW: () => {
@@ -3793,6 +3887,16 @@ var CsvPlugin = class {
3793
3887
  instance.zoomIn?.();
3794
3888
  }
3795
3889
  },
3890
+ {
3891
+ id: "reset-zoom",
3892
+ icon: "reset-zoom",
3893
+ label: "Reset Zoom",
3894
+ type: "button",
3895
+ group: "zoom",
3896
+ execute: () => {
3897
+ instance.resetZoom?.();
3898
+ }
3899
+ },
3796
3900
  {
3797
3901
  id: "download",
3798
3902
  icon: "download",
@@ -3982,6 +4086,12 @@ var CsvPlugin = class {
3982
4086
  scale = calculateFitScale();
3983
4087
  applyScale();
3984
4088
  },
4089
+ resetZoom: () => {
4090
+ scale = calculateFitScale();
4091
+ container.scrollTop = 0;
4092
+ container.scrollLeft = 0;
4093
+ applyScale();
4094
+ },
3985
4095
  rotateCW: () => {
3986
4096
  },
3987
4097
  rotateCCW: () => {
@@ -4097,6 +4207,16 @@ var CodePlugin = class {
4097
4207
  instance.zoomIn?.();
4098
4208
  }
4099
4209
  },
4210
+ {
4211
+ id: "reset-zoom",
4212
+ icon: "reset-zoom",
4213
+ label: "Reset Zoom",
4214
+ type: "button",
4215
+ group: "zoom",
4216
+ execute: () => {
4217
+ instance.resetZoom?.();
4218
+ }
4219
+ },
4100
4220
  {
4101
4221
  id: "copy",
4102
4222
  icon: "copy",
@@ -4376,6 +4496,15 @@ var CodePlugin = class {
4376
4496
  zoomLevel = isTxt ? calculateTxtFit() : 1;
4377
4497
  updateTransform();
4378
4498
  },
4499
+ resetZoom: () => {
4500
+ isUserZoomed = false;
4501
+ fontSize = 13;
4502
+ rotation = 0;
4503
+ zoomLevel = isTxt ? calculateTxtFit() : 1;
4504
+ container.scrollTop = 0;
4505
+ container.scrollLeft = 0;
4506
+ updateTransform();
4507
+ },
4379
4508
  rotateCW: () => {
4380
4509
  rotation = (rotation + 90) % 360;
4381
4510
  updateTransform();
@@ -4438,11 +4567,19 @@ var ArchivePlugin = class {
4438
4567
  {
4439
4568
  id: "fit-page",
4440
4569
  icon: "fit-page",
4441
- label: "Reset Zoom",
4570
+ label: "Fit to Page",
4442
4571
  type: "button",
4443
4572
  group: "zoom",
4444
4573
  execute: () => instance.fitToPage?.()
4445
4574
  },
4575
+ {
4576
+ id: "reset-zoom",
4577
+ icon: "reset-zoom",
4578
+ label: "Reset Zoom",
4579
+ type: "button",
4580
+ group: "zoom",
4581
+ execute: () => instance.resetZoom?.()
4582
+ },
4446
4583
  {
4447
4584
  id: "download",
4448
4585
  icon: "download",
@@ -4597,7 +4734,13 @@ var ArchivePlugin = class {
4597
4734
  },
4598
4735
  fitToPage: () => {
4599
4736
  scale = 1;
4600
- wrapper.style.transform = `scale(1)`;
4737
+ wrapper.style.transform = "scale(1)";
4738
+ },
4739
+ resetZoom: () => {
4740
+ scale = 1;
4741
+ wrapper.style.transform = "scale(1)";
4742
+ ctx.container.scrollTop = 0;
4743
+ ctx.container.scrollLeft = 0;
4601
4744
  },
4602
4745
  download: () => {
4603
4746
  downloadFile(ctx.buffer, ctx.metadata.name || "archive.zip", "application/zip");
@@ -4649,6 +4792,14 @@ var MarkdownPlugin = class {
4649
4792
  group: "zoom",
4650
4793
  execute: () => instance.fitToPage?.()
4651
4794
  },
4795
+ {
4796
+ id: "reset-zoom",
4797
+ icon: "reset-zoom",
4798
+ label: "Reset Zoom",
4799
+ type: "button",
4800
+ group: "zoom",
4801
+ execute: () => instance.resetZoom?.()
4802
+ },
4652
4803
  {
4653
4804
  id: "copy",
4654
4805
  icon: "copy",
@@ -4802,6 +4953,12 @@ var MarkdownPlugin = class {
4802
4953
  fontSize = 15;
4803
4954
  wrapper.style.fontSize = "15px";
4804
4955
  },
4956
+ resetZoom: () => {
4957
+ fontSize = 15;
4958
+ wrapper.style.fontSize = "15px";
4959
+ ctx.container.scrollTop = 0;
4960
+ ctx.container.scrollLeft = 0;
4961
+ },
4805
4962
  download: () => {
4806
4963
  downloadFile(ctx.buffer, ctx.metadata.name || "document.md", "text/markdown");
4807
4964
  },
@@ -4895,6 +5052,14 @@ var PptxPlugin = class {
4895
5052
  group: "zoom",
4896
5053
  execute: () => instance.fitToPage?.()
4897
5054
  },
5055
+ {
5056
+ id: "reset-zoom",
5057
+ icon: "reset-zoom",
5058
+ label: "Reset Zoom",
5059
+ type: "button",
5060
+ group: "zoom",
5061
+ execute: () => instance.resetZoom?.()
5062
+ },
4898
5063
  {
4899
5064
  id: "rotate-cw",
4900
5065
  icon: "rotate-cw",
@@ -5014,6 +5179,13 @@ var PptxPlugin = class {
5014
5179
  rotation = 0;
5015
5180
  applyTransform();
5016
5181
  },
5182
+ resetZoom: () => {
5183
+ scale = calculateFitScale();
5184
+ rotation = 0;
5185
+ wrapper.scrollTop = 0;
5186
+ wrapper.scrollLeft = 0;
5187
+ applyTransform();
5188
+ },
5017
5189
  rotateCW: () => {
5018
5190
  rotation = (rotation + 90) % 360;
5019
5191
  applyTransform();
@@ -5089,6 +5261,14 @@ var ThreeDPlugin = class {
5089
5261
  group: "zoom",
5090
5262
  execute: () => instance.fitToPage?.()
5091
5263
  },
5264
+ {
5265
+ id: "reset-zoom",
5266
+ icon: "reset-zoom",
5267
+ label: "Reset Zoom",
5268
+ type: "button",
5269
+ group: "zoom",
5270
+ execute: () => instance.resetZoom?.()
5271
+ },
5092
5272
  {
5093
5273
  id: "rotate-cw",
5094
5274
  icon: "rotate-cw",
@@ -5225,6 +5405,7 @@ var ThreeDPlugin = class {
5225
5405
  controls.update();
5226
5406
  },
5227
5407
  fitToPage: fitCamera,
5408
+ resetZoom: fitCamera,
5228
5409
  rotateCW: () => {
5229
5410
  isWireframe = !isWireframe;
5230
5411
  materials.forEach((m) => {
@@ -5439,6 +5620,14 @@ var RtfPlugin = class {
5439
5620
  group: "zoom",
5440
5621
  execute: () => instance.fitToPage?.()
5441
5622
  },
5623
+ {
5624
+ id: "reset-zoom",
5625
+ icon: "reset-zoom",
5626
+ label: "Reset Zoom",
5627
+ type: "button",
5628
+ group: "zoom",
5629
+ execute: () => instance.resetZoom?.()
5630
+ },
5442
5631
  {
5443
5632
  id: "rotate-cw",
5444
5633
  icon: "rotate-cw",
@@ -5908,6 +6097,15 @@ var RtfPlugin = class {
5908
6097
  rotation = 0;
5909
6098
  applyTransform();
5910
6099
  },
6100
+ resetZoom: () => {
6101
+ isUserZoomed = false;
6102
+ fitMode = "width";
6103
+ scale = calculateFitScale("width");
6104
+ rotation = 0;
6105
+ ctx.container.scrollTop = 0;
6106
+ ctx.container.scrollLeft = 0;
6107
+ applyTransform();
6108
+ },
5911
6109
  rotateCW: () => {
5912
6110
  rotation = (rotation + 90) % 360;
5913
6111
  applyTransform();
@@ -5975,6 +6173,14 @@ var HtmlPreviewPlugin = class {
5975
6173
  group: "zoom",
5976
6174
  execute: () => instance.fitToPage?.()
5977
6175
  },
6176
+ {
6177
+ id: "reset-zoom",
6178
+ icon: "reset-zoom",
6179
+ label: "Reset Zoom",
6180
+ type: "button",
6181
+ group: "zoom",
6182
+ execute: () => instance.resetZoom?.()
6183
+ },
5978
6184
  {
5979
6185
  id: "copy",
5980
6186
  icon: "copy",
@@ -6047,6 +6253,12 @@ var HtmlPreviewPlugin = class {
6047
6253
  scale = 1;
6048
6254
  iframe.style.transform = "scale(1)";
6049
6255
  },
6256
+ resetZoom: () => {
6257
+ scale = 1;
6258
+ iframe.style.transform = "scale(1)";
6259
+ ctx.container.scrollTop = 0;
6260
+ ctx.container.scrollLeft = 0;
6261
+ },
6050
6262
  copy: () => {
6051
6263
  navigator.clipboard.writeText(rawHtml);
6052
6264
  },
@@ -6147,6 +6359,14 @@ var OpenDocumentPlugin = class {
6147
6359
  group: "zoom",
6148
6360
  execute: () => instance.fitToPage?.()
6149
6361
  },
6362
+ {
6363
+ id: "reset-zoom",
6364
+ icon: "reset-zoom",
6365
+ label: "Reset Zoom",
6366
+ type: "button",
6367
+ group: "zoom",
6368
+ execute: () => instance.resetZoom?.()
6369
+ },
6150
6370
  {
6151
6371
  id: "rotate-cw",
6152
6372
  icon: "rotate-cw",
@@ -6414,6 +6634,15 @@ var OpenDocumentPlugin = class {
6414
6634
  rotation = 0;
6415
6635
  applyTransform();
6416
6636
  },
6637
+ resetZoom: () => {
6638
+ isUserZoomed = false;
6639
+ fitMode = "width";
6640
+ scale = calculateFitScale("width");
6641
+ rotation = 0;
6642
+ container.scrollTop = 0;
6643
+ container.scrollLeft = 0;
6644
+ applyTransform();
6645
+ },
6417
6646
  rotateCW: () => {
6418
6647
  rotation = (rotation + 90) % 360;
6419
6648
  applyTransform();
@@ -6757,6 +6986,14 @@ var DocPlugin = class {
6757
6986
  group: "zoom",
6758
6987
  execute: () => instance.fitToPage?.()
6759
6988
  },
6989
+ {
6990
+ id: "reset-zoom",
6991
+ icon: "reset-zoom",
6992
+ label: "Reset Zoom",
6993
+ type: "button",
6994
+ group: "zoom",
6995
+ execute: () => instance.resetZoom?.()
6996
+ },
6760
6997
  {
6761
6998
  id: "rotate-cw",
6762
6999
  icon: "rotate-cw",
@@ -6963,6 +7200,15 @@ var DocPlugin = class {
6963
7200
  rotation = 0;
6964
7201
  applyTransform();
6965
7202
  },
7203
+ resetZoom: () => {
7204
+ isUserZoomed = false;
7205
+ fitMode = "width";
7206
+ scale = calculateFitScale("width");
7207
+ rotation = 0;
7208
+ ctx.container.scrollTop = 0;
7209
+ ctx.container.scrollLeft = 0;
7210
+ applyTransform();
7211
+ },
6966
7212
  rotateCW: () => {
6967
7213
  rotation = (rotation + 90) % 360;
6968
7214
  applyTransform();
@@ -7443,6 +7689,14 @@ var PptPlugin = class {
7443
7689
  group: "zoom",
7444
7690
  execute: () => instance.fitToPage?.()
7445
7691
  },
7692
+ {
7693
+ id: "reset-zoom",
7694
+ icon: "reset-zoom",
7695
+ label: "Reset Zoom",
7696
+ type: "button",
7697
+ group: "zoom",
7698
+ execute: () => instance.resetZoom?.()
7699
+ },
7446
7700
  {
7447
7701
  id: "rotate-cw",
7448
7702
  icon: "rotate-cw",
@@ -7631,6 +7885,13 @@ var PptPlugin = class {
7631
7885
  rotation = 0;
7632
7886
  applyTransform();
7633
7887
  },
7888
+ resetZoom: () => {
7889
+ scale = calculateFitScale();
7890
+ rotation = 0;
7891
+ container.scrollTop = 0;
7892
+ container.scrollLeft = 0;
7893
+ applyTransform();
7894
+ },
7634
7895
  rotateCW: () => {
7635
7896
  rotation = (rotation + 90) % 360;
7636
7897
  applyTransform();