pptx-react-viewer 4.73.0 → 4.74.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/CHANGELOG.md +17 -0
- package/dist/ai.d.ts +15 -0
- package/dist/{chunk-DHCM6STL.mjs → chunk-CRC3V4UG.mjs} +1 -1
- package/dist/chunk-CRC3V4UG.mjs.br +0 -0
- package/dist/{chunk-DHCM6STL.mjs.gz → chunk-CRC3V4UG.mjs.gz} +0 -0
- package/dist/{chunk-RBRWOKRR.js → chunk-D4WC35PL.js} +232 -282
- package/dist/chunk-D4WC35PL.js.br +0 -0
- package/dist/chunk-D4WC35PL.js.gz +0 -0
- package/dist/{chunk-IDIWOXL4.mjs → chunk-SQ7OASDY.mjs} +116 -167
- package/dist/chunk-SQ7OASDY.mjs.br +0 -0
- package/dist/chunk-SQ7OASDY.mjs.gz +0 -0
- package/dist/{chunk-BYPHHRBZ.js → chunk-XG4WSJ4O.js} +1 -1
- package/dist/chunk-XG4WSJ4O.js.br +0 -0
- package/dist/{chunk-BYPHHRBZ.js.gz → chunk-XG4WSJ4O.js.gz} +0 -0
- package/dist/index.d.ts +28 -5
- package/dist/index.js +28 -24
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +16 -16
- package/dist/internals.js +80 -80
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +1 -1
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer-canvas.css +2 -2
- package/dist/pptx-viewer-canvas.css.br +0 -0
- package/dist/pptx-viewer-canvas.css.gz +0 -0
- package/dist/pptx-viewer.css +2 -2
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/{three.module-MBFHAT6M.js → three.module-JBKIR2OB.js} +1369 -1174
- package/dist/three.module-JBKIR2OB.js.br +0 -0
- package/dist/three.module-JBKIR2OB.js.gz +0 -0
- package/dist/{three.module-EBJVANGB.mjs → three.module-PMXOC26V.mjs} +1370 -1174
- package/dist/three.module-PMXOC26V.mjs.br +0 -0
- package/dist/three.module-PMXOC26V.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +12 -12
- package/dist/viewer/index.js +18 -18
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +2 -2
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +10 -10
- package/dist/chunk-BYPHHRBZ.js.br +0 -0
- package/dist/chunk-DHCM6STL.mjs.br +0 -0
- package/dist/chunk-IDIWOXL4.mjs.br +0 -0
- package/dist/chunk-IDIWOXL4.mjs.gz +0 -0
- package/dist/chunk-RBRWOKRR.js.br +0 -0
- package/dist/chunk-RBRWOKRR.js.gz +0 -0
- package/dist/three.module-EBJVANGB.mjs.br +0 -0
- package/dist/three.module-EBJVANGB.mjs.gz +0 -0
- package/dist/three.module-MBFHAT6M.js.br +0 -0
- package/dist/three.module-MBFHAT6M.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkLVEFHZ76_js = require('./chunk-LVEFHZ76.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkXG4WSJ4O_js = require('./chunk-XG4WSJ4O.js');
|
|
5
5
|
var chunkP2COO2QO_js = require('./chunk-P2COO2QO.js');
|
|
6
6
|
var pptx = require('ooxml-ui/pptx');
|
|
7
7
|
var React108 = require('react');
|
|
@@ -36,6 +36,113 @@ function useThemeStyle(theme) {
|
|
|
36
36
|
return vars;
|
|
37
37
|
}, [theme]);
|
|
38
38
|
}
|
|
39
|
+
function getReactSlideBackgroundStyle(slide, slideSize) {
|
|
40
|
+
const style = pptx.getSlideBackgroundStyle(slide, slideSize);
|
|
41
|
+
return {
|
|
42
|
+
backgroundColor: style["background-color"],
|
|
43
|
+
backgroundImage: slide?.backgroundImage ? void 0 : style["background-image"],
|
|
44
|
+
backgroundSize: style["background-size"],
|
|
45
|
+
backgroundRepeat: style["background-repeat"]
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function SlideThumbnailImpl({
|
|
49
|
+
slide,
|
|
50
|
+
templateElements,
|
|
51
|
+
canvasSize,
|
|
52
|
+
previewWidth,
|
|
53
|
+
fieldContext,
|
|
54
|
+
tableStyleContext
|
|
55
|
+
}) {
|
|
56
|
+
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
57
|
+
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
58
|
+
const layout = pptx.slideThumbnailLayout(
|
|
59
|
+
safeCanvasWidth,
|
|
60
|
+
safeCanvasHeight,
|
|
61
|
+
previewWidth ?? chunkP2COO2QO_js.SLIDE_NAV_THUMBNAIL_WIDTH
|
|
62
|
+
);
|
|
63
|
+
const { height: previewHeight, scale } = layout;
|
|
64
|
+
const previewElements = pptx.buildPreviewElements(slide, templateElements);
|
|
65
|
+
const slideFieldContext = pptx.deriveSlideFieldContext(fieldContext, slide);
|
|
66
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
67
|
+
const transitionBadge = pptx.slideThumbnailTransitionBadge(slide, t);
|
|
68
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: previewWidth === void 0 ? "relative w-full overflow-hidden rounded border border-border bg-white" : "relative w-full overflow-hidden bg-white",
|
|
72
|
+
style: {
|
|
73
|
+
height: previewHeight,
|
|
74
|
+
...getReactSlideBackgroundStyle(slide, {
|
|
75
|
+
widthPx: safeCanvasWidth,
|
|
76
|
+
heightPx: safeCanvasHeight
|
|
77
|
+
})
|
|
78
|
+
},
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: "absolute top-0 left-0 origin-top-left",
|
|
84
|
+
style: {
|
|
85
|
+
width: safeCanvasWidth,
|
|
86
|
+
height: safeCanvasHeight,
|
|
87
|
+
transform: `scale(${scale})`,
|
|
88
|
+
transformOrigin: "top left",
|
|
89
|
+
...pptx.deviceStrokeStageStyle(scale)
|
|
90
|
+
},
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkXG4WSJ4O_js.SlideBackgroundImageLayer, { slide }),
|
|
93
|
+
previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
94
|
+
chunkXG4WSJ4O_js.StaticElementRenderer,
|
|
95
|
+
{
|
|
96
|
+
element,
|
|
97
|
+
activeSlide: slide,
|
|
98
|
+
allSlides: [slide],
|
|
99
|
+
zIndex: index,
|
|
100
|
+
fieldContext: slideFieldContext,
|
|
101
|
+
tableStyleContext
|
|
102
|
+
},
|
|
103
|
+
element.id
|
|
104
|
+
))
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
transitionBadge && /* @__PURE__ */ jsxRuntime.jsx(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
"data-pptx-thumbnail-transition": "",
|
|
112
|
+
title: transitionBadge.title,
|
|
113
|
+
style: pptx.slideThumbnailTransitionBadgeStyle(layout),
|
|
114
|
+
children: transitionBadge.label
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
function slideThumbnailPropsEqual(prev, next) {
|
|
122
|
+
if (prev.previewWidth !== next.previewWidth) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
if (prev.slide !== next.slide) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
if (prev.templateElements !== next.templateElements) {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
if (prev.fieldContext !== next.fieldContext) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
if (prev.tableStyleContext !== next.tableStyleContext) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
if (prev.canvasSize.width !== next.canvasSize.width || prev.canvasSize.height !== next.canvasSize.height) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
var SlideThumbnail = /* @__PURE__ */ React108__default.default.memo(
|
|
143
|
+
SlideThumbnailImpl,
|
|
144
|
+
slideThumbnailPropsEqual
|
|
145
|
+
);
|
|
39
146
|
function getInitials(name) {
|
|
40
147
|
const parts = name.trim().split(/\s+/u);
|
|
41
148
|
if (parts.length >= 2) {
|
|
@@ -525,134 +632,6 @@ function SlideContextMenu({
|
|
|
525
632
|
}
|
|
526
633
|
);
|
|
527
634
|
}
|
|
528
|
-
function getReactSlideBackgroundStyle(slide, slideSize) {
|
|
529
|
-
const style = pptx.getSlideBackgroundStyle(slide, slideSize);
|
|
530
|
-
return {
|
|
531
|
-
backgroundColor: style["background-color"],
|
|
532
|
-
backgroundImage: slide?.backgroundImage ? void 0 : style["background-image"],
|
|
533
|
-
backgroundSize: style["background-size"],
|
|
534
|
-
backgroundRepeat: style["background-repeat"]
|
|
535
|
-
};
|
|
536
|
-
}
|
|
537
|
-
function SlideThumbnailImpl({
|
|
538
|
-
slide,
|
|
539
|
-
templateElements,
|
|
540
|
-
canvasSize,
|
|
541
|
-
previewWidth,
|
|
542
|
-
fieldContext,
|
|
543
|
-
tableStyleContext
|
|
544
|
-
}) {
|
|
545
|
-
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
546
|
-
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
547
|
-
const width = previewWidth ?? chunkP2COO2QO_js.SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
548
|
-
const scale = width / safeCanvasWidth;
|
|
549
|
-
const previewHeight = pptx.editorThumbnailHeight(safeCanvasWidth, safeCanvasHeight, width);
|
|
550
|
-
const previewElements = pptx.buildPreviewElements(slide, templateElements);
|
|
551
|
-
const slideFieldContext = pptx.deriveSlideFieldContext(fieldContext, slide);
|
|
552
|
-
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
553
|
-
const transitionLabel = slide.transition ? (() => {
|
|
554
|
-
const opt = chunkP2COO2QO_js.SLIDE_TRANSITION_OPTIONS.find((o) => o.value === slide.transition?.type);
|
|
555
|
-
return opt ? t(opt.i18nKey) : slide.transition.type;
|
|
556
|
-
})() : void 0;
|
|
557
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
558
|
-
"div",
|
|
559
|
-
{
|
|
560
|
-
className: previewWidth === void 0 ? "relative w-full overflow-hidden rounded border border-border bg-white" : "relative w-full overflow-hidden bg-white",
|
|
561
|
-
style: {
|
|
562
|
-
height: previewHeight,
|
|
563
|
-
...getReactSlideBackgroundStyle(slide, {
|
|
564
|
-
widthPx: safeCanvasWidth,
|
|
565
|
-
heightPx: safeCanvasHeight
|
|
566
|
-
})
|
|
567
|
-
},
|
|
568
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
569
|
-
"div",
|
|
570
|
-
{
|
|
571
|
-
className: "absolute top-0 left-0 origin-top-left",
|
|
572
|
-
style: {
|
|
573
|
-
width: safeCanvasWidth,
|
|
574
|
-
height: safeCanvasHeight,
|
|
575
|
-
transform: `scale(${scale})`,
|
|
576
|
-
transformOrigin: "top left",
|
|
577
|
-
...pptx.deviceStrokeStageStyle(scale)
|
|
578
|
-
},
|
|
579
|
-
children: [
|
|
580
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunkBYPHHRBZ_js.SlideBackgroundImageLayer, { slide }),
|
|
581
|
-
slide.transition && slide.transition.type !== "none" && slide.transition.type !== "cut" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
582
|
-
"div",
|
|
583
|
-
{
|
|
584
|
-
className: "absolute top-0.5 right-0.5 z-10 px-1 py-px rounded bg-primary/80 text-[7px] text-white leading-tight pointer-events-none",
|
|
585
|
-
title: t("pptx.slideThumbnail.transitionTooltip", { name: transitionLabel }),
|
|
586
|
-
children: transitionLabel
|
|
587
|
-
}
|
|
588
|
-
),
|
|
589
|
-
previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
590
|
-
chunkBYPHHRBZ_js.StaticElementRenderer,
|
|
591
|
-
{
|
|
592
|
-
element,
|
|
593
|
-
activeSlide: slide,
|
|
594
|
-
allSlides: [slide],
|
|
595
|
-
zIndex: index,
|
|
596
|
-
fieldContext: slideFieldContext,
|
|
597
|
-
tableStyleContext
|
|
598
|
-
},
|
|
599
|
-
element.id
|
|
600
|
-
))
|
|
601
|
-
]
|
|
602
|
-
}
|
|
603
|
-
)
|
|
604
|
-
}
|
|
605
|
-
);
|
|
606
|
-
}
|
|
607
|
-
function slideThumbnailPropsEqual(prev, next) {
|
|
608
|
-
if (prev.previewWidth !== next.previewWidth) {
|
|
609
|
-
return false;
|
|
610
|
-
}
|
|
611
|
-
if (prev.slide.id !== next.slide.id) {
|
|
612
|
-
return false;
|
|
613
|
-
}
|
|
614
|
-
if (prev.slide.isDirty !== next.slide.isDirty) {
|
|
615
|
-
return false;
|
|
616
|
-
}
|
|
617
|
-
if (prev.slide.hidden !== next.slide.hidden) {
|
|
618
|
-
return false;
|
|
619
|
-
}
|
|
620
|
-
if (prev.slide.elements !== next.slide.elements) {
|
|
621
|
-
return false;
|
|
622
|
-
}
|
|
623
|
-
if (prev.slide.showMasterShapes !== next.slide.showMasterShapes) {
|
|
624
|
-
return false;
|
|
625
|
-
}
|
|
626
|
-
if (prev.slide.backgroundColor !== next.slide.backgroundColor) {
|
|
627
|
-
return false;
|
|
628
|
-
}
|
|
629
|
-
if (prev.slide.backgroundImage !== next.slide.backgroundImage) {
|
|
630
|
-
return false;
|
|
631
|
-
}
|
|
632
|
-
if (prev.slide.backgroundGradient !== next.slide.backgroundGradient) {
|
|
633
|
-
return false;
|
|
634
|
-
}
|
|
635
|
-
if (prev.slide.backgroundPattern !== next.slide.backgroundPattern) {
|
|
636
|
-
return false;
|
|
637
|
-
}
|
|
638
|
-
if (prev.templateElements !== next.templateElements) {
|
|
639
|
-
return false;
|
|
640
|
-
}
|
|
641
|
-
if (prev.fieldContext !== next.fieldContext) {
|
|
642
|
-
return false;
|
|
643
|
-
}
|
|
644
|
-
if (prev.tableStyleContext !== next.tableStyleContext) {
|
|
645
|
-
return false;
|
|
646
|
-
}
|
|
647
|
-
if (prev.canvasSize.width !== next.canvasSize.width || prev.canvasSize.height !== next.canvasSize.height) {
|
|
648
|
-
return false;
|
|
649
|
-
}
|
|
650
|
-
return true;
|
|
651
|
-
}
|
|
652
|
-
var SlideThumbnail = /* @__PURE__ */ React108__default.default.memo(
|
|
653
|
-
SlideThumbnailImpl,
|
|
654
|
-
slideThumbnailPropsEqual
|
|
655
|
-
);
|
|
656
635
|
function LazyThumbnailInner({
|
|
657
636
|
slide,
|
|
658
637
|
templateElements,
|
|
@@ -1042,7 +1021,7 @@ function SlidesPaneSidebar({
|
|
|
1042
1021
|
tableStyleContext
|
|
1043
1022
|
}) {
|
|
1044
1023
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
1045
|
-
const collab =
|
|
1024
|
+
const collab = chunkXG4WSJ4O_js.useCollaboration();
|
|
1046
1025
|
const slideRefs = React108.useRef(/* @__PURE__ */ new Map());
|
|
1047
1026
|
const renameInputRef = React108.useRef(null);
|
|
1048
1027
|
const slidePresenceMap = React108.useMemo(() => {
|
|
@@ -1137,7 +1116,7 @@ function SlidesPaneSidebar({
|
|
|
1137
1116
|
[sectionGroups, showSectionHeaders, effectiveCollapsed]
|
|
1138
1117
|
);
|
|
1139
1118
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
1140
|
-
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } =
|
|
1119
|
+
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = chunkXG4WSJ4O_js.useVirtualizedSlides({
|
|
1141
1120
|
totalItems: shouldVirtualize ? flatItems.length : 0,
|
|
1142
1121
|
itemHeight: estimatedItemHeight
|
|
1143
1122
|
});
|
|
@@ -1421,7 +1400,7 @@ function SlideTemplatePreview({
|
|
|
1421
1400
|
transformOrigin: "top left"
|
|
1422
1401
|
},
|
|
1423
1402
|
children: previewSlide.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1424
|
-
|
|
1403
|
+
chunkXG4WSJ4O_js.StaticElementRenderer,
|
|
1425
1404
|
{
|
|
1426
1405
|
element,
|
|
1427
1406
|
activeSlide: previewSlide,
|
|
@@ -1490,7 +1469,7 @@ function SlideTemplateGalleryDialog({
|
|
|
1490
1469
|
scheme
|
|
1491
1470
|
}) {
|
|
1492
1471
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
1493
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
1472
|
+
const { panelStyle, handlers: dragHandlers } = chunkXG4WSJ4O_js.useModalDismissDrag(onClose);
|
|
1494
1473
|
const [selected, setSelected] = React108.useState(null);
|
|
1495
1474
|
const dialogRef = React108.useRef(null);
|
|
1496
1475
|
useModalFocus(isOpen, dialogRef, onClose);
|
|
@@ -2041,7 +2020,7 @@ function MobileSheet({
|
|
|
2041
2020
|
}) {
|
|
2042
2021
|
const sheetRef = React108.useRef(null);
|
|
2043
2022
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2044
|
-
const { dragY, dragging, handlers } =
|
|
2023
|
+
const { dragY, dragging, handlers } = chunkXG4WSJ4O_js.useSheetDismissDrag(onClose);
|
|
2045
2024
|
useModalFocus(open, sheetRef, onClose);
|
|
2046
2025
|
if (!open) {
|
|
2047
2026
|
return null;
|
|
@@ -2310,7 +2289,7 @@ function WebHomeControls({
|
|
|
2310
2289
|
function ShapeArrangeExtras(p) {
|
|
2311
2290
|
const commands = useShapeFormatContext();
|
|
2312
2291
|
const crop = commands?.crop;
|
|
2313
|
-
const { isHidden } =
|
|
2292
|
+
const { isHidden } = chunkXG4WSJ4O_js.useToolbarVisibility(p.hiddenActions);
|
|
2314
2293
|
const { onGroupElements, onUngroupElement, onUpdateElementStyle } = p;
|
|
2315
2294
|
const controls = React108.useMemo(
|
|
2316
2295
|
() => pptx.arrangeShapeHomeControls({
|
|
@@ -2645,7 +2624,7 @@ function TransitionsSection(p) {
|
|
|
2645
2624
|
case "soundPreview": {
|
|
2646
2625
|
const url = pptx.ribbonTransitionStockSoundUrl(transition);
|
|
2647
2626
|
if (url) {
|
|
2648
|
-
|
|
2627
|
+
chunkXG4WSJ4O_js.playAnimationSound(url);
|
|
2649
2628
|
}
|
|
2650
2629
|
break;
|
|
2651
2630
|
}
|
|
@@ -2853,7 +2832,7 @@ function AccountPage() {
|
|
|
2853
2832
|
refreshUsage();
|
|
2854
2833
|
setTimeout(() => setCleared(false), 4e3);
|
|
2855
2834
|
};
|
|
2856
|
-
const version = "4.
|
|
2835
|
+
const version = "4.74.0" ;
|
|
2857
2836
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
2858
2837
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: cardClass, children: [
|
|
2859
2838
|
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -3118,7 +3097,7 @@ function FileSection(p) {
|
|
|
3118
3097
|
const page = offered(requestedPage) ? requestedPage : offered("home") ? "home" : nav.find((item) => item.id !== "save" && item.id !== "close")?.id ?? "home";
|
|
3119
3098
|
const [query, setQuery] = React108.useState("");
|
|
3120
3099
|
const [recent, setRecent] = React108.useState([]);
|
|
3121
|
-
const { isHidden } =
|
|
3100
|
+
const { isHidden } = chunkXG4WSJ4O_js.useToolbarVisibility(p.hiddenActions);
|
|
3122
3101
|
const exportHidden = isHidden("export");
|
|
3123
3102
|
const storage = useViewerStorage();
|
|
3124
3103
|
const cloud = useViewerCloudFiles();
|
|
@@ -3487,7 +3466,7 @@ function LayoutArtwork({
|
|
|
3487
3466
|
backgroundColor
|
|
3488
3467
|
};
|
|
3489
3468
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (preview?.elements ?? []).slice(0, MAX_PREVIEW_ELEMENTS).map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3490
|
-
|
|
3469
|
+
chunkXG4WSJ4O_js.StaticElementRenderer,
|
|
3491
3470
|
{
|
|
3492
3471
|
element,
|
|
3493
3472
|
activeSlide: slide,
|
|
@@ -3842,7 +3821,7 @@ function SlideShowOptions({
|
|
|
3842
3821
|
}
|
|
3843
3822
|
function SubtitleSettingsControl() {
|
|
3844
3823
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
3845
|
-
const supplied = React108.useContext(
|
|
3824
|
+
const supplied = React108.useContext(chunkXG4WSJ4O_js.ViewerOptionsStoreContext);
|
|
3846
3825
|
const fallback = React108.useRef(null);
|
|
3847
3826
|
if (!supplied) {
|
|
3848
3827
|
fallback.current ??= pptx.createViewerOptionsStore({ persist: false });
|
|
@@ -3876,7 +3855,7 @@ function SubtitleSettingsControl() {
|
|
|
3876
3855
|
}
|
|
3877
3856
|
function SlideShowSection(p) {
|
|
3878
3857
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
3879
|
-
const { isHidden } =
|
|
3858
|
+
const { isHidden } = chunkXG4WSJ4O_js.useToolbarVisibility(p.hiddenActions);
|
|
3880
3859
|
const actions = {
|
|
3881
3860
|
"slideShow.startSlideShow.fromBeginning": p.onPresentFromBeginning ?? (() => p.onSetMode("present")),
|
|
3882
3861
|
"slideShow.startSlideShow.fromCurrent": p.onPresent,
|
|
@@ -4396,7 +4375,7 @@ function MobileMenuSheet(props) {
|
|
|
4396
4375
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4397
4376
|
const { open, onClose } = props;
|
|
4398
4377
|
const [active, setActive] = React108.useState("home");
|
|
4399
|
-
const { isTabVisible } =
|
|
4378
|
+
const { isTabVisible } = chunkXG4WSJ4O_js.useToolbarVisibility(props.hiddenActions);
|
|
4400
4379
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4401
4380
|
MobileSheet,
|
|
4402
4381
|
{
|
|
@@ -4688,7 +4667,7 @@ function MobileToolbar(props) {
|
|
|
4688
4667
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4689
4668
|
const { mode, canUndo, canRedo, onUndo, onRedo, onSetMode, onSaveAsPptx } = props;
|
|
4690
4669
|
const [menuOpen, setMenuOpen] = React108.useState(false);
|
|
4691
|
-
const { isHidden } =
|
|
4670
|
+
const { isHidden } = chunkXG4WSJ4O_js.useToolbarVisibility(props.hiddenActions);
|
|
4692
4671
|
const showEdit = mode === "edit" || mode === "master";
|
|
4693
4672
|
const hidden = [];
|
|
4694
4673
|
if (isHidden("undo")) {
|
|
@@ -4735,7 +4714,7 @@ function MobileToolbar(props) {
|
|
|
4735
4714
|
}
|
|
4736
4715
|
function ChartSelectionStrip() {
|
|
4737
4716
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4738
|
-
const commands =
|
|
4717
|
+
const commands = chunkXG4WSJ4O_js.useChartFormatContext();
|
|
4739
4718
|
const chart = commands?.chart;
|
|
4740
4719
|
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
4741
4720
|
const controls = React108.useMemo(
|
|
@@ -4766,7 +4745,7 @@ function PictureSizeStrip({
|
|
|
4766
4745
|
hiddenActions
|
|
4767
4746
|
}) {
|
|
4768
4747
|
const crop = useShapeFormatContext()?.crop;
|
|
4769
|
-
const { isHidden } =
|
|
4748
|
+
const { isHidden } = chunkXG4WSJ4O_js.useToolbarVisibility(hiddenActions);
|
|
4770
4749
|
const controls = React108.useMemo(
|
|
4771
4750
|
() => pptx.pictureSizeHomeControls({
|
|
4772
4751
|
editable: Boolean(crop),
|
|
@@ -4939,7 +4918,7 @@ var TAB_BASE = "relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap t
|
|
|
4939
4918
|
var TAB_UNDERLINE = "after:absolute after:-bottom-px after:left-0 after:right-0 after:h-[2.5px] after:bg-primary";
|
|
4940
4919
|
function RibbonTabBar(p) {
|
|
4941
4920
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4942
|
-
const viewerOptions =
|
|
4921
|
+
const viewerOptions = chunkXG4WSJ4O_js.useViewerOptionsContext();
|
|
4943
4922
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4944
4923
|
"div",
|
|
4945
4924
|
{
|
|
@@ -5016,9 +4995,9 @@ function RibbonTabBar(p) {
|
|
|
5016
4995
|
}
|
|
5017
4996
|
function TabRowActions(p) {
|
|
5018
4997
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5019
|
-
const collab =
|
|
4998
|
+
const collab = chunkXG4WSJ4O_js.useCollaboration();
|
|
5020
4999
|
const isCollaborating = Boolean(collab && collab.status === "connected");
|
|
5021
|
-
const { isHidden } =
|
|
5000
|
+
const { isHidden } = chunkXG4WSJ4O_js.useToolbarVisibility(p.hiddenActions);
|
|
5022
5001
|
const customization = useViewerCustomizationContext();
|
|
5023
5002
|
const ref = React108.useRef(null);
|
|
5024
5003
|
const handlers = React108.useRef(p);
|
|
@@ -5073,7 +5052,7 @@ function TabRowActions(p) {
|
|
|
5073
5052
|
}
|
|
5074
5053
|
function TitleBarElement(p) {
|
|
5075
5054
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5076
|
-
const options =
|
|
5055
|
+
const options = chunkXG4WSJ4O_js.useViewerOptionsContext();
|
|
5077
5056
|
const customization = useViewerCustomizationContext();
|
|
5078
5057
|
const ref = React108.useRef(null);
|
|
5079
5058
|
const stripVisible = options.quickAccess.visible && pptx.isPanelVisible(customization, "quickAccessToolbar");
|
|
@@ -5504,7 +5483,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5504
5483
|
onToggleSidebar,
|
|
5505
5484
|
onToggleInspector
|
|
5506
5485
|
} = p;
|
|
5507
|
-
const collab =
|
|
5486
|
+
const collab = chunkXG4WSJ4O_js.useCollaboration();
|
|
5508
5487
|
const customization = useViewerCustomizationContext();
|
|
5509
5488
|
const showSlidesToggle = pptx.isPanelVisible(customization, "slidesPane");
|
|
5510
5489
|
const showInspectorToggle = pptx.isPanelVisible(customization, "inspector");
|
|
@@ -5805,8 +5784,8 @@ function ToolbarLateTabs({
|
|
|
5805
5784
|
function Toolbar(p) {
|
|
5806
5785
|
const { mode, isNarrowViewport, isCompactToolbarOpen, toolbarSection, onSetToolbarSection } = p;
|
|
5807
5786
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5808
|
-
const { isTabVisible } =
|
|
5809
|
-
const viewerOptions =
|
|
5787
|
+
const { isTabVisible } = chunkXG4WSJ4O_js.useToolbarVisibility(p.hiddenActions);
|
|
5788
|
+
const viewerOptions = chunkXG4WSJ4O_js.useViewerOptionsContext();
|
|
5810
5789
|
const customization = useViewerCustomizationContext();
|
|
5811
5790
|
const belowInput = React108.useMemo(
|
|
5812
5791
|
() => ({
|
|
@@ -6783,7 +6762,7 @@ function DrawingOverlaySvg({
|
|
|
6783
6762
|
onPointerDown,
|
|
6784
6763
|
onPointerMove,
|
|
6785
6764
|
onPointerUp,
|
|
6786
|
-
children: isStrokeActive && liveStrokeView ?
|
|
6765
|
+
children: isStrokeActive && liveStrokeView ? chunkXG4WSJ4O_js.renderStrokeView(liveStrokeView, true, void 0, "ink-live-preview") : isStrokeActive && liveStrokeD && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6787
6766
|
"path",
|
|
6788
6767
|
{
|
|
6789
6768
|
d: liveStrokeD,
|
|
@@ -7333,7 +7312,7 @@ function PictureCropOverlay({
|
|
|
7333
7312
|
};
|
|
7334
7313
|
};
|
|
7335
7314
|
const { ghost, frame, handles } = overlay;
|
|
7336
|
-
const src =
|
|
7315
|
+
const src = chunkXG4WSJ4O_js.imgSrc(element);
|
|
7337
7316
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7338
7317
|
"div",
|
|
7339
7318
|
{
|
|
@@ -7509,7 +7488,7 @@ function HorizontalRulerView({ ticks, widthPx, highlight }) {
|
|
|
7509
7488
|
}
|
|
7510
7489
|
);
|
|
7511
7490
|
}
|
|
7512
|
-
var HorizontalRuler = /* @__PURE__ */
|
|
7491
|
+
var HorizontalRuler = /* @__PURE__ */ chunkXG4WSJ4O_js.withDisplayName(
|
|
7513
7492
|
/* @__PURE__ */ React108__default.default.memo(HorizontalRulerView),
|
|
7514
7493
|
"HorizontalRuler"
|
|
7515
7494
|
);
|
|
@@ -7583,7 +7562,7 @@ function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
|
7583
7562
|
}
|
|
7584
7563
|
);
|
|
7585
7564
|
}
|
|
7586
|
-
var VerticalRuler = /* @__PURE__ */
|
|
7565
|
+
var VerticalRuler = /* @__PURE__ */ chunkXG4WSJ4O_js.withDisplayName(
|
|
7587
7566
|
/* @__PURE__ */ React108__default.default.memo(VerticalRulerView),
|
|
7588
7567
|
"VerticalRuler"
|
|
7589
7568
|
);
|
|
@@ -7777,7 +7756,7 @@ function SelectionHandleOverlay({
|
|
|
7777
7756
|
onDoubleClick: (e) => onDoubleClick(element.id, e),
|
|
7778
7757
|
onContextMenu: (e) => onContextMenu(element.id, e),
|
|
7779
7758
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7780
|
-
|
|
7759
|
+
chunkXG4WSJ4O_js.ResizeHandles,
|
|
7781
7760
|
{
|
|
7782
7761
|
elementId: element.id,
|
|
7783
7762
|
adjustmentHandles,
|
|
@@ -8488,7 +8467,7 @@ function SlideCanvas(props) {
|
|
|
8488
8467
|
props.registerInlineEditReader
|
|
8489
8468
|
]
|
|
8490
8469
|
);
|
|
8491
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8470
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkXG4WSJ4O_js.InlineCollaborationContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(SlideCanvasContent, { ...props }) });
|
|
8492
8471
|
}
|
|
8493
8472
|
function SlideCanvasContent({
|
|
8494
8473
|
imagePaste,
|
|
@@ -8761,7 +8740,7 @@ function SlideCanvasContent({
|
|
|
8761
8740
|
onPointerMove: handleStagePointerMove,
|
|
8762
8741
|
onPointerUp: handleStagePointerUp,
|
|
8763
8742
|
children: [
|
|
8764
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8743
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkXG4WSJ4O_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
8765
8744
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
8766
8745
|
/* @__PURE__ */ jsxRuntime.jsx(GridOverlay, { canvasSize, gridSpacingPx, visible: showGrid }),
|
|
8767
8746
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8773,7 +8752,7 @@ function SlideCanvasContent({
|
|
|
8773
8752
|
}
|
|
8774
8753
|
),
|
|
8775
8754
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8776
|
-
|
|
8755
|
+
chunkXG4WSJ4O_js.ElementRenderer,
|
|
8777
8756
|
{
|
|
8778
8757
|
element,
|
|
8779
8758
|
activeSlide,
|
|
@@ -8818,7 +8797,7 @@ function SlideCanvasContent({
|
|
|
8818
8797
|
`tpl-${element.id}`
|
|
8819
8798
|
)),
|
|
8820
8799
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8821
|
-
|
|
8800
|
+
chunkXG4WSJ4O_js.ElementRenderer,
|
|
8822
8801
|
{
|
|
8823
8802
|
element,
|
|
8824
8803
|
activeSlide,
|
|
@@ -8885,7 +8864,7 @@ function SlideCanvasContent({
|
|
|
8885
8864
|
editingMember && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8886
8865
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `[data-element-id="${cssAttr(editingMember.parentId)}"] [data-element-id="${cssAttr(editingMember.member.id)}"]{visibility:hidden}` }),
|
|
8887
8866
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8888
|
-
|
|
8867
|
+
chunkXG4WSJ4O_js.ElementRenderer,
|
|
8889
8868
|
{
|
|
8890
8869
|
element: editingMember.member,
|
|
8891
8870
|
activeSlide,
|
|
@@ -9402,7 +9381,7 @@ function ContextMenu(props) {
|
|
|
9402
9381
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9403
9382
|
const customization = useViewerCustomizationContext();
|
|
9404
9383
|
const shapeFormat = useShapeFormatContext();
|
|
9405
|
-
const chartFormat =
|
|
9384
|
+
const chartFormat = chunkXG4WSJ4O_js.useChartFormatContext();
|
|
9406
9385
|
const open = Boolean(contextMenuState) && mode === "edit";
|
|
9407
9386
|
const handlers = {
|
|
9408
9387
|
...contextMenuHandlers(props, shapeFormat),
|
|
@@ -10600,17 +10579,8 @@ function SlideCardImpl({
|
|
|
10600
10579
|
}
|
|
10601
10580
|
);
|
|
10602
10581
|
}
|
|
10603
|
-
function
|
|
10604
|
-
if (prev.slide
|
|
10605
|
-
return false;
|
|
10606
|
-
}
|
|
10607
|
-
if (prev.slide.isDirty !== next.slide.isDirty) {
|
|
10608
|
-
return false;
|
|
10609
|
-
}
|
|
10610
|
-
if (prev.slide.hidden !== next.slide.hidden) {
|
|
10611
|
-
return false;
|
|
10612
|
-
}
|
|
10613
|
-
if (prev.slide.elements !== next.slide.elements) {
|
|
10582
|
+
function slideCardPropsEqual(prev, next) {
|
|
10583
|
+
if (prev.slide !== next.slide) {
|
|
10614
10584
|
return false;
|
|
10615
10585
|
}
|
|
10616
10586
|
if (prev.index !== next.index) {
|
|
@@ -10642,7 +10612,7 @@ function arePropsEqual(prev, next) {
|
|
|
10642
10612
|
}
|
|
10643
10613
|
return true;
|
|
10644
10614
|
}
|
|
10645
|
-
var SlideCard = /* @__PURE__ */ React108__default.default.memo(SlideCardImpl,
|
|
10615
|
+
var SlideCard = /* @__PURE__ */ React108__default.default.memo(SlideCardImpl, slideCardPropsEqual);
|
|
10646
10616
|
var ICON_CLASS = "h-3.5 w-3.5 text-muted-foreground";
|
|
10647
10617
|
function SorterContextMenu({
|
|
10648
10618
|
x,
|
|
@@ -11371,7 +11341,7 @@ function ReadingViewStage({
|
|
|
11371
11341
|
className: "absolute left-0 top-0 origin-top-left",
|
|
11372
11342
|
style: { width, height, transform: `scale(${scale})`, ...pptx.deviceStrokeStageStyle(scale) },
|
|
11373
11343
|
children: elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11374
|
-
|
|
11344
|
+
chunkXG4WSJ4O_js.StaticElementRenderer,
|
|
11375
11345
|
{
|
|
11376
11346
|
element,
|
|
11377
11347
|
activeSlide: slide,
|
|
@@ -12026,7 +11996,7 @@ function SlideNotesPanel({
|
|
|
12026
11996
|
});
|
|
12027
11997
|
const hasNotes = draft.trim().length > 0;
|
|
12028
11998
|
const slideLabel = activeSlide ? t("pptx.notes.slideN", { n: activeSlide.slideNumber }) : t("pptx.notes.noSlide");
|
|
12029
|
-
const { dragY, handlers: dragHandlers } =
|
|
11999
|
+
const { dragY, handlers: dragHandlers } = chunkXG4WSJ4O_js.useSheetDismissDrag(onToggle);
|
|
12030
12000
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12031
12001
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12032
12002
|
"button",
|
|
@@ -13163,7 +13133,7 @@ function DocumentPropertiesDialog({
|
|
|
13163
13133
|
const handleClose = React108.useCallback(() => {
|
|
13164
13134
|
onClose();
|
|
13165
13135
|
}, [onClose]);
|
|
13166
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
13136
|
+
const { panelStyle, handlers: dragHandlers } = chunkXG4WSJ4O_js.useModalDismissDrag(handleClose);
|
|
13167
13137
|
if (!isOpen) {
|
|
13168
13138
|
return null;
|
|
13169
13139
|
}
|
|
@@ -13760,7 +13730,7 @@ function PresentationSubtitleBar({
|
|
|
13760
13730
|
}) {
|
|
13761
13731
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13762
13732
|
const language = pptx.subtitleRecognitionLanguage(
|
|
13763
|
-
pptx.subtitleSettingsFromOptions(
|
|
13733
|
+
pptx.subtitleSettingsFromOptions(chunkXG4WSJ4O_js.useViewerOptionsContext()),
|
|
13764
13734
|
typeof navigator === "undefined" ? "en-US" : navigator.language
|
|
13765
13735
|
);
|
|
13766
13736
|
const [captionText, setCaptionText] = React108.useState("");
|
|
@@ -13954,7 +13924,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13954
13924
|
...pptx.deviceStrokeStageStyle(scale)
|
|
13955
13925
|
},
|
|
13956
13926
|
children: previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13957
|
-
|
|
13927
|
+
chunkXG4WSJ4O_js.StaticElementRenderer,
|
|
13958
13928
|
{
|
|
13959
13929
|
element,
|
|
13960
13930
|
activeSlide: slide,
|
|
@@ -13970,28 +13940,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13970
13940
|
);
|
|
13971
13941
|
}
|
|
13972
13942
|
function scaledSlidePreviewPropsEqual(prev, next) {
|
|
13973
|
-
if (prev.slide
|
|
13974
|
-
return false;
|
|
13975
|
-
}
|
|
13976
|
-
if (prev.slide.isDirty !== next.slide.isDirty) {
|
|
13977
|
-
return false;
|
|
13978
|
-
}
|
|
13979
|
-
if (prev.slide.hidden !== next.slide.hidden) {
|
|
13980
|
-
return false;
|
|
13981
|
-
}
|
|
13982
|
-
if (prev.slide.elements !== next.slide.elements) {
|
|
13983
|
-
return false;
|
|
13984
|
-
}
|
|
13985
|
-
if (prev.slide.showMasterShapes !== next.slide.showMasterShapes) {
|
|
13986
|
-
return false;
|
|
13987
|
-
}
|
|
13988
|
-
if (prev.slide.backgroundColor !== next.slide.backgroundColor) {
|
|
13989
|
-
return false;
|
|
13990
|
-
}
|
|
13991
|
-
if (prev.slide.backgroundImage !== next.slide.backgroundImage) {
|
|
13992
|
-
return false;
|
|
13993
|
-
}
|
|
13994
|
-
if (prev.slide.backgroundGradient !== next.slide.backgroundGradient) {
|
|
13943
|
+
if (prev.slide !== next.slide) {
|
|
13995
13944
|
return false;
|
|
13996
13945
|
}
|
|
13997
13946
|
if (prev.templateElements !== next.templateElements) {
|
|
@@ -15288,7 +15237,7 @@ function EffectSoundRow({
|
|
|
15288
15237
|
}
|
|
15289
15238
|
const asset = pptx.getEffectSoundAsset(soundState.catalogueId);
|
|
15290
15239
|
if (asset) {
|
|
15291
|
-
|
|
15240
|
+
chunkXG4WSJ4O_js.playAnimationSound(asset.dataUrl);
|
|
15292
15241
|
}
|
|
15293
15242
|
};
|
|
15294
15243
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -15800,7 +15749,7 @@ function AnimationPanel({
|
|
|
15800
15749
|
onUpdateSlide
|
|
15801
15750
|
}) {
|
|
15802
15751
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
15803
|
-
const { viewportWidth } =
|
|
15752
|
+
const { viewportWidth } = chunkXG4WSJ4O_js.useIsMobile();
|
|
15804
15753
|
const directionBtnPx = Math.max(28, pptx.getDensePanelTouchTargetPx(viewportWidth));
|
|
15805
15754
|
const fieldStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
15806
15755
|
const handlers = useAnimationHandlers({
|
|
@@ -17925,8 +17874,8 @@ function ChartUserShapeOptions({
|
|
|
17925
17874
|
}
|
|
17926
17875
|
function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
17927
17876
|
const chartData = selectedElement.chartData;
|
|
17928
|
-
const followDataPoint =
|
|
17929
|
-
const { selection: partSelection } =
|
|
17877
|
+
const followDataPoint = chunkXG4WSJ4O_js.useViewerOptionsContext().advanced.chartPropertiesFollowDataPoint;
|
|
17878
|
+
const { selection: partSelection } = chunkXG4WSJ4O_js.useChartPartSelection();
|
|
17930
17879
|
const canvasPart = partSelection?.elementId === selectedElement.id ? partSelection.part : null;
|
|
17931
17880
|
const title = chartData?.title;
|
|
17932
17881
|
const chartType = chartData?.chartType;
|
|
@@ -19122,7 +19071,7 @@ function DuotonePanel({
|
|
|
19122
19071
|
] }),
|
|
19123
19072
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
19124
19073
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-[10px]", children: t("pptx.image.duotonePresets") }),
|
|
19125
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
19074
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunkXG4WSJ4O_js.DUOTONE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19126
19075
|
"button",
|
|
19127
19076
|
{
|
|
19128
19077
|
type: "button",
|
|
@@ -22380,7 +22329,7 @@ function SmartArtPropertiesPanel({
|
|
|
22380
22329
|
const reflowed = box ? pptx.rebuildDrawingShapesIfCleared(
|
|
22381
22330
|
newData,
|
|
22382
22331
|
newData.layout,
|
|
22383
|
-
|
|
22332
|
+
chunkXG4WSJ4O_js.resolveSmartArtDataPalette(newData),
|
|
22384
22333
|
newData.style ?? "flat",
|
|
22385
22334
|
"inspector",
|
|
22386
22335
|
box
|
|
@@ -22453,7 +22402,7 @@ function TableDataGrid({
|
|
|
22453
22402
|
}) {
|
|
22454
22403
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
22455
22404
|
const grid = pptx.buildTableDataGrid(tableElement);
|
|
22456
|
-
const { viewportWidth } =
|
|
22405
|
+
const { viewportWidth } = chunkXG4WSJ4O_js.useIsMobile();
|
|
22457
22406
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
22458
22407
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
22459
22408
|
const stickyGutterClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10" : "";
|
|
@@ -24302,7 +24251,7 @@ function InspectorPaneHeader({
|
|
|
24302
24251
|
onClose
|
|
24303
24252
|
}) {
|
|
24304
24253
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24305
|
-
const { viewportWidth } =
|
|
24254
|
+
const { viewportWidth } = chunkXG4WSJ4O_js.useIsMobile();
|
|
24306
24255
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
24307
24256
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
24308
24257
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -25003,7 +24952,7 @@ function TransitionPreview({
|
|
|
25003
24952
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
25004
24953
|
const durationMs = transition.durationMs ?? 500;
|
|
25005
24954
|
const animations = React108.useMemo(
|
|
25006
|
-
() =>
|
|
24955
|
+
() => chunkXG4WSJ4O_js.getSlideTransitionAnimations(
|
|
25007
24956
|
transition.type,
|
|
25008
24957
|
durationMs,
|
|
25009
24958
|
transition.direction,
|
|
@@ -25072,7 +25021,7 @@ function TransitionPreview({
|
|
|
25072
25021
|
]
|
|
25073
25022
|
}
|
|
25074
25023
|
),
|
|
25075
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
25024
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkXG4WSJ4O_js.SLIDE_TRANSITION_KEYFRAMES })
|
|
25076
25025
|
] });
|
|
25077
25026
|
}
|
|
25078
25027
|
var DEFAULT_DURATION_MS = 320;
|
|
@@ -25735,7 +25684,7 @@ function InspectorPane(props) {
|
|
|
25735
25684
|
} = props;
|
|
25736
25685
|
const hasSelection = selectedElement !== null;
|
|
25737
25686
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
25738
|
-
const { dragY, handlers: dragHandlers } =
|
|
25687
|
+
const { dragY, handlers: dragHandlers } = chunkXG4WSJ4O_js.useSheetDismissDrag(onClose);
|
|
25739
25688
|
const {
|
|
25740
25689
|
animationPanelHeight,
|
|
25741
25690
|
effectiveThemeOptions,
|
|
@@ -26148,7 +26097,7 @@ function PresentationTouchControls({
|
|
|
26148
26097
|
hideNavigation = false
|
|
26149
26098
|
}) {
|
|
26150
26099
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26151
|
-
const { isTouchDevice } =
|
|
26100
|
+
const { isTouchDevice } = chunkXG4WSJ4O_js.useIsMobile();
|
|
26152
26101
|
if (!isTouchDevice) {
|
|
26153
26102
|
return null;
|
|
26154
26103
|
}
|
|
@@ -26795,11 +26744,11 @@ function PrintDialog({
|
|
|
26795
26744
|
}) {
|
|
26796
26745
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26797
26746
|
const regionRenderer = useRegionRenderer("dialog.print");
|
|
26798
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
26799
|
-
const { viewportWidth } =
|
|
26747
|
+
const { panelStyle, handlers: dragHandlers } = chunkXG4WSJ4O_js.useModalDismissDrag(onClose);
|
|
26748
|
+
const { viewportWidth } = chunkXG4WSJ4O_js.useIsMobile();
|
|
26800
26749
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
26801
26750
|
const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
26802
|
-
const printOptionDefaults = pptx.resolveDefaultPrintSettings(
|
|
26751
|
+
const printOptionDefaults = pptx.resolveDefaultPrintSettings(chunkXG4WSJ4O_js.useViewerOptionsContext());
|
|
26803
26752
|
const [printWhat, setPrintWhat] = React108.useState(printOptionDefaults?.printWhat ?? "slides");
|
|
26804
26753
|
const [orientation, setOrientation] = React108.useState("landscape");
|
|
26805
26754
|
const [colorMode, setColorMode] = React108.useState(
|
|
@@ -27289,14 +27238,14 @@ function BroadcastDialog({
|
|
|
27289
27238
|
}) {
|
|
27290
27239
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
27291
27240
|
const regionRenderer = useRegionRenderer("dialog.broadcast");
|
|
27292
|
-
const collab =
|
|
27241
|
+
const collab = chunkXG4WSJ4O_js.useCollaboration();
|
|
27293
27242
|
const isBroadcasting = collab !== null && collab.status !== "disconnected" && collab.status !== "error" && collab.config.role === "owner";
|
|
27294
27243
|
const [roomId, setRoomId] = React108.useState("");
|
|
27295
27244
|
const [userName, setUserName] = React108.useState("");
|
|
27296
27245
|
const [serverUrl, setServerUrl] = React108.useState("");
|
|
27297
27246
|
const [copied, setCopied] = React108.useState(false);
|
|
27298
27247
|
const dialogRef = React108.useRef(null);
|
|
27299
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27248
|
+
const { panelStyle, handlers: dragHandlers } = chunkXG4WSJ4O_js.useModalDismissDrag(onClose);
|
|
27300
27249
|
useModalFocus(open, dialogRef, onClose);
|
|
27301
27250
|
React108.useEffect(() => {
|
|
27302
27251
|
if (open && !isBroadcasting) {
|
|
@@ -27612,7 +27561,7 @@ function ActiveSessionView({
|
|
|
27612
27561
|
onCopyRoomId,
|
|
27613
27562
|
onStopCollaboration
|
|
27614
27563
|
}) {
|
|
27615
|
-
const { t } = chunkP2COO2QO_js.useTranslation(), viewerOptions =
|
|
27564
|
+
const { t } = chunkP2COO2QO_js.useTranslation(), viewerOptions = chunkXG4WSJ4O_js.useViewerOptionsContext(), statusColor = collab.status === "connected" ? "text-green-400" : collab.status === "connecting" ? "text-yellow-400" : "text-red-400", statusIcon = collab.status === "connected" || collab.status === "connecting" ? /* @__PURE__ */ jsxRuntime.jsx(lu.LuWifi, { className: "w-4 h-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lu.LuWifiOff, { className: "w-4 h-4" }), sessionUsers = pptx.buildActiveSessionUsers({
|
|
27616
27565
|
localUserName: activeCollaboration?.userName ?? collab.config.userName,
|
|
27617
27566
|
localUserInitials: viewerOptions.general.userInitials,
|
|
27618
27567
|
localUserColor: collab.config.userColor,
|
|
@@ -27711,7 +27660,7 @@ function StartSessionForm({
|
|
|
27711
27660
|
onRetry
|
|
27712
27661
|
}) {
|
|
27713
27662
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
27714
|
-
const { viewportWidth } =
|
|
27663
|
+
const { viewportWidth } = chunkXG4WSJ4O_js.useIsMobile();
|
|
27715
27664
|
const tabBtnStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
27716
27665
|
const inputReadOnlyClass = preconfigured ? " opacity-70 cursor-not-allowed" : "";
|
|
27717
27666
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -27845,7 +27794,7 @@ function ShareDialog({
|
|
|
27845
27794
|
defaultUserName,
|
|
27846
27795
|
defaultServerUrl
|
|
27847
27796
|
}) {
|
|
27848
|
-
const collab =
|
|
27797
|
+
const collab = chunkXG4WSJ4O_js.useCollaboration();
|
|
27849
27798
|
const isActive = collab !== null && collab.status !== "disconnected" && collab.status !== "error";
|
|
27850
27799
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
27851
27800
|
const regionRenderer = useRegionRenderer("dialog.share");
|
|
@@ -27856,9 +27805,9 @@ function ShareDialog({
|
|
|
27856
27805
|
const [invitation, setInvitation] = React108.useState("");
|
|
27857
27806
|
const [copied, setCopied] = React108.useState(false);
|
|
27858
27807
|
const dialogRef = React108.useRef(null);
|
|
27859
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27808
|
+
const { panelStyle, handlers: dragHandlers } = chunkXG4WSJ4O_js.useModalDismissDrag(onClose);
|
|
27860
27809
|
useModalFocus(open, dialogRef, onClose);
|
|
27861
|
-
const { viewportWidth, viewportHeight } =
|
|
27810
|
+
const { viewportWidth, viewportHeight } = chunkXG4WSJ4O_js.useIsMobile();
|
|
27862
27811
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
27863
27812
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
27864
27813
|
const stickyFooterClass = pptx.shouldStickyActionRow(viewportWidth, viewportHeight) ? "sticky bottom-0 bg-popover" : "";
|
|
@@ -28157,12 +28106,12 @@ function HyperlinkEditDialog({
|
|
|
28157
28106
|
onCancel
|
|
28158
28107
|
}) {
|
|
28159
28108
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
28160
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28109
|
+
const { panelStyle, handlers: dragHandlers } = chunkXG4WSJ4O_js.useModalDismissDrag(onCancel);
|
|
28161
28110
|
const inputRef = React108.useRef(null);
|
|
28162
|
-
const detectedType =
|
|
28163
|
-
const emailParts =
|
|
28164
|
-
const detectedSlide =
|
|
28165
|
-
const detectedVerb = initialAction ?
|
|
28111
|
+
const detectedType = chunkXG4WSJ4O_js.detectTargetType(initialUrl, initialAction);
|
|
28112
|
+
const emailParts = chunkXG4WSJ4O_js.parseEmailUrl(initialUrl || "");
|
|
28113
|
+
const detectedSlide = chunkXG4WSJ4O_js.parseSlideFromUrl(initialUrl, initialAction);
|
|
28114
|
+
const detectedVerb = initialAction ? chunkXG4WSJ4O_js.ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
28166
28115
|
const [targetType, setTargetType] = React108.useState(detectedType);
|
|
28167
28116
|
const [url, setUrl] = React108.useState(
|
|
28168
28117
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -28441,7 +28390,7 @@ function ViewerBottomPanels({
|
|
|
28441
28390
|
notesStyle,
|
|
28442
28391
|
onNotesHeightChange
|
|
28443
28392
|
}) {
|
|
28444
|
-
const { isHidden } =
|
|
28393
|
+
const { isHidden } = chunkXG4WSJ4O_js.useToolbarVisibility(hiddenActions);
|
|
28445
28394
|
const customization = useViewerCustomizationContext();
|
|
28446
28395
|
const showNotes = pptx.isPanelVisible(customization, "notes");
|
|
28447
28396
|
const notesRenderer = useRegionRenderer("notes");
|
|
@@ -28840,7 +28789,7 @@ function ViewerToolbarSection(props) {
|
|
|
28840
28789
|
[activeSlide, propertyHandlers]
|
|
28841
28790
|
);
|
|
28842
28791
|
const scopedLayoutOptions = React108__default.default.useMemo(
|
|
28843
|
-
() =>
|
|
28792
|
+
() => chunkXG4WSJ4O_js.scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
28844
28793
|
[s.layoutOptions, activeSlide]
|
|
28845
28794
|
);
|
|
28846
28795
|
const handleResetSlide = React108.useCallback(() => {
|
|
@@ -29247,7 +29196,7 @@ function ViewerToolbarSection(props) {
|
|
|
29247
29196
|
isMobileInsertOpen: s.isMobileInsertOpen,
|
|
29248
29197
|
onCloseMobileInsert: () => s.setIsMobileInsertOpen(false),
|
|
29249
29198
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
29250
|
-
reviewComments:
|
|
29199
|
+
reviewComments: chunkXG4WSJ4O_js.createReviewCommentsHost({
|
|
29251
29200
|
state: s,
|
|
29252
29201
|
activeSlideIndex,
|
|
29253
29202
|
updateSlides: ops.updateSlides,
|
|
@@ -29370,7 +29319,7 @@ function CustomShowsDialog({
|
|
|
29370
29319
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
29371
29320
|
[]
|
|
29372
29321
|
);
|
|
29373
|
-
|
|
29322
|
+
chunkXG4WSJ4O_js.useController(controller);
|
|
29374
29323
|
const view = controller.view(slides);
|
|
29375
29324
|
const [active, setActive] = React108.useState(activeCustomShowId ?? "");
|
|
29376
29325
|
const pickerValue = view.shows.some(({ id }) => id === active) ? active : "";
|
|
@@ -29650,7 +29599,7 @@ function EquationEditorDialog({
|
|
|
29650
29599
|
existingOmml
|
|
29651
29600
|
}) {
|
|
29652
29601
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
29653
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29602
|
+
const { panelStyle, handlers: dragHandlers } = chunkXG4WSJ4O_js.useModalDismissDrag(onClose);
|
|
29654
29603
|
const initialLatex = React108.useMemo(() => {
|
|
29655
29604
|
if (!existingOmml) {
|
|
29656
29605
|
return "";
|
|
@@ -30368,11 +30317,11 @@ function PresentationStage({
|
|
|
30368
30317
|
})
|
|
30369
30318
|
},
|
|
30370
30319
|
children: [
|
|
30371
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30320
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkXG4WSJ4O_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
30372
30321
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: pptx.PRESENTATION_HIT_TEST_CSS }),
|
|
30373
30322
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
30374
30323
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30375
|
-
|
|
30324
|
+
chunkXG4WSJ4O_js.ElementRenderer,
|
|
30376
30325
|
{
|
|
30377
30326
|
element,
|
|
30378
30327
|
activeSlide,
|
|
@@ -30410,7 +30359,7 @@ function PresentationStage({
|
|
|
30410
30359
|
`tpl-${element.id}`
|
|
30411
30360
|
)),
|
|
30412
30361
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30413
|
-
|
|
30362
|
+
chunkXG4WSJ4O_js.ElementRenderer,
|
|
30414
30363
|
{
|
|
30415
30364
|
element,
|
|
30416
30365
|
activeSlide,
|
|
@@ -30522,7 +30471,7 @@ function PresentationTransitionMount({
|
|
|
30522
30471
|
templateElementsBySlideId
|
|
30523
30472
|
);
|
|
30524
30473
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30525
|
-
|
|
30474
|
+
chunkXG4WSJ4O_js.PresentationTransitionOverlay,
|
|
30526
30475
|
{
|
|
30527
30476
|
outgoingSlide,
|
|
30528
30477
|
templateElements: templates.outgoing,
|
|
@@ -30568,8 +30517,8 @@ function ViewerCanvasArea(props) {
|
|
|
30568
30517
|
aiCanvasActive = false
|
|
30569
30518
|
} = props;
|
|
30570
30519
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
30571
|
-
const { isHidden } =
|
|
30572
|
-
const viewerOptions =
|
|
30520
|
+
const { isHidden } = chunkXG4WSJ4O_js.useToolbarVisibility(hiddenActions);
|
|
30521
|
+
const viewerOptions = chunkXG4WSJ4O_js.useViewerOptionsContext();
|
|
30573
30522
|
const outlineAuthoring = useOutlineAuthoring({
|
|
30574
30523
|
state: s,
|
|
30575
30524
|
updateElement: canvasHandlers.handleUpdateSmartArtElement,
|
|
@@ -30702,7 +30651,7 @@ function ViewerCanvasArea(props) {
|
|
|
30702
30651
|
s.setActiveSlideIndex((i) => Math.max(0, i - 1));
|
|
30703
30652
|
}
|
|
30704
30653
|
}, [mode, presentation, s]);
|
|
30705
|
-
const swipe =
|
|
30654
|
+
const swipe = chunkXG4WSJ4O_js.useSwipeNavigation({
|
|
30706
30655
|
enabled: swipeEnabled,
|
|
30707
30656
|
onNext: handleSwipeNext,
|
|
30708
30657
|
onPrev: handleSwipePrev
|
|
@@ -30888,14 +30837,14 @@ function ViewerCanvasArea(props) {
|
|
|
30888
30837
|
outlineAuthoring,
|
|
30889
30838
|
collaborationOverlay: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30890
30839
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30891
|
-
|
|
30840
|
+
chunkXG4WSJ4O_js.RemoteSelectionOverlay,
|
|
30892
30841
|
{
|
|
30893
30842
|
elements: effectiveSlide?.elements ?? [],
|
|
30894
30843
|
activeSlideIndex
|
|
30895
30844
|
}
|
|
30896
30845
|
),
|
|
30897
30846
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30898
|
-
|
|
30847
|
+
chunkXG4WSJ4O_js.CollaborationCursorOverlay,
|
|
30899
30848
|
{
|
|
30900
30849
|
activeSlideIndex,
|
|
30901
30850
|
canvasWidth: canvasSize.width,
|
|
@@ -31133,7 +31082,7 @@ function AiChangeOverlay({ batch, activeSlideIndex }) {
|
|
|
31133
31082
|
}
|
|
31134
31083
|
function ChartFormatPanel() {
|
|
31135
31084
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
31136
|
-
const commands =
|
|
31085
|
+
const commands = chunkXG4WSJ4O_js.useChartFormatContext();
|
|
31137
31086
|
const ref = React108.useRef(null);
|
|
31138
31087
|
const chart = commands?.chart;
|
|
31139
31088
|
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
@@ -31206,7 +31155,7 @@ function MobileDismissSheet({
|
|
|
31206
31155
|
children
|
|
31207
31156
|
}) {
|
|
31208
31157
|
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
31209
|
-
const { dragY, handlers } =
|
|
31158
|
+
const { dragY, handlers } = chunkXG4WSJ4O_js.useSheetDismissDrag(onClose);
|
|
31210
31159
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31211
31160
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31212
31161
|
"button",
|
|
@@ -31950,7 +31899,7 @@ function ViewerMainContent(props) {
|
|
|
31950
31899
|
);
|
|
31951
31900
|
const layoutGalleryAnchorRef = React108.useRef(null);
|
|
31952
31901
|
const layoutGalleryPreviews = useLayoutPreviews(loadLayoutPreviews, layoutGalleryAnchor !== null);
|
|
31953
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31902
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkXG4WSJ4O_js.ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-chrome": "body", className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
31954
31903
|
showSlidesPane && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31955
31904
|
slidesPaneRenderer ? (
|
|
31956
31905
|
// The rail's slot (width, collapse, resize handle) stays the viewer's.
|
|
@@ -32455,7 +32404,7 @@ function MobileChromeOverlay(props) {
|
|
|
32455
32404
|
slideSectionGroups,
|
|
32456
32405
|
canEdit,
|
|
32457
32406
|
commentCount
|
|
32458
|
-
} = props, { keyboardInset, isKeyboardOpen } =
|
|
32407
|
+
} = props, { keyboardInset, isKeyboardOpen } = chunkXG4WSJ4O_js.useKeyboardInsets(), activeSheet = s.isMobileInsertOpen ? "insert" : s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null, closeAllSheets = () => {
|
|
32459
32408
|
s.setIsSlidesPaneOpen(false);
|
|
32460
32409
|
s.setIsMobileInsertOpen(false);
|
|
32461
32410
|
s.setIsInspectorPaneOpen(false);
|
|
@@ -32932,7 +32881,7 @@ async function exportAiChatLogs(options) {
|
|
|
32932
32881
|
chats,
|
|
32933
32882
|
{ format: options?.format, detailed: options?.detailed, now: options?.now },
|
|
32934
32883
|
(filename, content, mime) => {
|
|
32935
|
-
|
|
32884
|
+
chunkXG4WSJ4O_js.downloadBlob(new Blob([content], { type: mime }), filename);
|
|
32936
32885
|
}
|
|
32937
32886
|
);
|
|
32938
32887
|
}
|
|
@@ -33285,7 +33234,7 @@ function ViewerOptionsProvider({
|
|
|
33285
33234
|
store,
|
|
33286
33235
|
children
|
|
33287
33236
|
}) {
|
|
33288
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33237
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkXG4WSJ4O_js.ViewerOptionsStoreContext.Provider, { value: store, children: /* @__PURE__ */ jsxRuntime.jsx(chunkXG4WSJ4O_js.ViewerOptionsContext.Provider, { value: options, children }) });
|
|
33289
33238
|
}
|
|
33290
33239
|
function useAiBridge(input) {
|
|
33291
33240
|
const ref = React108.useRef(input);
|
|
@@ -33368,7 +33317,7 @@ function useAiPanelController(input) {
|
|
|
33368
33317
|
getSelectedElement: () => inputRef.current.selectedElement
|
|
33369
33318
|
})
|
|
33370
33319
|
);
|
|
33371
|
-
const state =
|
|
33320
|
+
const state = chunkXG4WSJ4O_js.useController(controller);
|
|
33372
33321
|
React108.useEffect(() => () => controller.dispose(), [controller]);
|
|
33373
33322
|
const liveFocusTargets = React108.useMemo(
|
|
33374
33323
|
() => host.computeFocusTargets({ activeSlideIndex, selectedElementIds, selectedElementId }),
|
|
@@ -34146,7 +34095,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34146
34095
|
limits
|
|
34147
34096
|
} = props;
|
|
34148
34097
|
const cloudDocument = React108.useMemo(() => pptx.createCloudDocumentController(), []);
|
|
34149
|
-
const cloudFile =
|
|
34098
|
+
const cloudFile = chunkXG4WSJ4O_js.useController(cloudDocument).file;
|
|
34150
34099
|
const {
|
|
34151
34100
|
storage: viewerStorage,
|
|
34152
34101
|
fileName,
|
|
@@ -34160,7 +34109,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34160
34109
|
filePath: hostFilePath
|
|
34161
34110
|
});
|
|
34162
34111
|
const saveProgress = React108.useMemo(() => pptx.createSaveProgressController(), []);
|
|
34163
|
-
const saveProgressState =
|
|
34112
|
+
const saveProgressState = chunkXG4WSJ4O_js.useController(saveProgress);
|
|
34164
34113
|
const storage = React108.useMemo(
|
|
34165
34114
|
() => viewerStorage ? saveProgress.wrap(viewerStorage) : viewerStorage,
|
|
34166
34115
|
[viewerStorage, saveProgress]
|
|
@@ -34259,7 +34208,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34259
34208
|
},
|
|
34260
34209
|
[hostStorage, cloudDocument]
|
|
34261
34210
|
);
|
|
34262
|
-
const { optionsStore, options: viewerOptions } =
|
|
34211
|
+
const { optionsStore, options: viewerOptions } = chunkXG4WSJ4O_js.useViewerOptions();
|
|
34263
34212
|
const custom = useViewerCustomization(
|
|
34264
34213
|
customization,
|
|
34265
34214
|
legacyHiddenActions,
|
|
@@ -34279,8 +34228,8 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34279
34228
|
const handleEnableEditing = React108.useCallback(() => {
|
|
34280
34229
|
setProtectedViewOverridden(true);
|
|
34281
34230
|
}, []);
|
|
34282
|
-
const readOnlyRec =
|
|
34283
|
-
const compatToastsState =
|
|
34231
|
+
const readOnlyRec = chunkXG4WSJ4O_js.useReadOnlyRecommendationState(content);
|
|
34232
|
+
const compatToastsState = chunkXG4WSJ4O_js.useCompatibilityToastsState();
|
|
34284
34233
|
const [notesBarHeight, setNotesBarHeight] = React108.useState(0);
|
|
34285
34234
|
const runProgramNoticesState = useRunProgramNoticesState();
|
|
34286
34235
|
const [collaborationReadOnly, setCollaborationReadOnly] = React108.useState(Boolean(collaboration));
|
|
@@ -34303,8 +34252,8 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34303
34252
|
filePath
|
|
34304
34253
|
});
|
|
34305
34254
|
const [isShareDialogOpen, setIsShareDialogOpen] = React108.useState(false);
|
|
34306
|
-
const { reducedMotion, toggleReducedMotion } =
|
|
34307
|
-
const state =
|
|
34255
|
+
const { reducedMotion, toggleReducedMotion } = chunkXG4WSJ4O_js.useReducedMotion();
|
|
34256
|
+
const state = chunkXG4WSJ4O_js.useViewerState({
|
|
34308
34257
|
content,
|
|
34309
34258
|
canEdit,
|
|
34310
34259
|
inspectorInitiallyOpen: props.inspectorInitiallyOpen
|
|
@@ -34431,16 +34380,16 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34431
34380
|
}
|
|
34432
34381
|
}, [settings, optionsStore]);
|
|
34433
34382
|
const handleClearOptionsCache = useAutosaveCacheMaintenance(viewerOptions, storage);
|
|
34434
|
-
const mobile =
|
|
34383
|
+
const mobile = chunkXG4WSJ4O_js.useIsMobile();
|
|
34435
34384
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
34436
|
-
const resizablePanels =
|
|
34385
|
+
const resizablePanels = chunkXG4WSJ4O_js.useResizablePanels();
|
|
34437
34386
|
const {
|
|
34438
34387
|
gridSpacingPx,
|
|
34439
34388
|
visibleSlideIndexes,
|
|
34440
34389
|
slideSectionGroups,
|
|
34441
34390
|
masterPseudoSlide,
|
|
34442
34391
|
authoredRange
|
|
34443
|
-
} =
|
|
34392
|
+
} = chunkXG4WSJ4O_js.useDerivedSlideState({
|
|
34444
34393
|
slides,
|
|
34445
34394
|
sections: state.sections,
|
|
34446
34395
|
customShows: state.customShows,
|
|
@@ -34465,7 +34414,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34465
34414
|
state.cropSessionRef
|
|
34466
34415
|
]
|
|
34467
34416
|
);
|
|
34468
|
-
const zoom =
|
|
34417
|
+
const zoom = chunkXG4WSJ4O_js.useZoomViewport({
|
|
34469
34418
|
canvasSize,
|
|
34470
34419
|
selectedElements: state.selectedElements,
|
|
34471
34420
|
fitPadding: props.fitPadding,
|
|
@@ -34481,7 +34430,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34481
34430
|
onChangeCallback.current?.();
|
|
34482
34431
|
}, [setIsDirty]);
|
|
34483
34432
|
const restoreHistoryThemeRef = React108.useRef(void 0);
|
|
34484
|
-
const history =
|
|
34433
|
+
const history = chunkXG4WSJ4O_js.useEditorHistory({
|
|
34485
34434
|
slides,
|
|
34486
34435
|
canvasSize,
|
|
34487
34436
|
activeSlideIndex,
|
|
@@ -34510,7 +34459,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34510
34459
|
setEditTemplateMode: state.setEditTemplateMode,
|
|
34511
34460
|
setHeaderFooter: state.setHeaderFooter
|
|
34512
34461
|
});
|
|
34513
|
-
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } =
|
|
34462
|
+
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = chunkXG4WSJ4O_js.usePresentationSetup({
|
|
34514
34463
|
mode,
|
|
34515
34464
|
slides,
|
|
34516
34465
|
visibleSlideIndexes,
|
|
@@ -34589,7 +34538,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34589
34538
|
loading,
|
|
34590
34539
|
error
|
|
34591
34540
|
]);
|
|
34592
|
-
|
|
34541
|
+
chunkXG4WSJ4O_js.useTouchGestures({
|
|
34593
34542
|
targetRef: zoom.canvasViewportRef,
|
|
34594
34543
|
currentScale: zoom.scale,
|
|
34595
34544
|
callbacks: {
|
|
@@ -34611,7 +34560,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34611
34560
|
},
|
|
34612
34561
|
enabled: isTouchDevice
|
|
34613
34562
|
});
|
|
34614
|
-
const dialogs =
|
|
34563
|
+
const dialogs = chunkXG4WSJ4O_js.useViewerDialogs({
|
|
34615
34564
|
mode,
|
|
34616
34565
|
slides,
|
|
34617
34566
|
activeSlide,
|
|
@@ -34639,7 +34588,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34639
34588
|
history,
|
|
34640
34589
|
embeddedFontFamilies: state.embeddedFonts.map((font) => font.name)
|
|
34641
34590
|
});
|
|
34642
|
-
|
|
34591
|
+
chunkXG4WSJ4O_js.useClearSelectionOnSlideChange(state, activeSlideIndex);
|
|
34643
34592
|
const zoomBeforePresentRef = React108.useRef(null);
|
|
34644
34593
|
React108.useEffect(() => {
|
|
34645
34594
|
if (mode !== "present") {
|
|
@@ -34657,7 +34606,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34657
34606
|
zoom.handleZoomToFit();
|
|
34658
34607
|
zoom.canvasViewportRef.current?.scrollTo({ left: 0, top: 0 });
|
|
34659
34608
|
}, [mode]);
|
|
34660
|
-
const editorOps =
|
|
34609
|
+
const editorOps = chunkXG4WSJ4O_js.useEditorOperations({
|
|
34661
34610
|
state,
|
|
34662
34611
|
history,
|
|
34663
34612
|
zoom,
|
|
@@ -34702,7 +34651,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34702
34651
|
handlerRef,
|
|
34703
34652
|
viewerApi,
|
|
34704
34653
|
loadVersion
|
|
34705
|
-
} =
|
|
34654
|
+
} = chunkXG4WSJ4O_js.useViewerIntegration({
|
|
34706
34655
|
transformCommittedText: (text, previous) => pptx.applyAutoCorrectToEdit(text, previous, viewerOptions.proofing),
|
|
34707
34656
|
state,
|
|
34708
34657
|
zoom,
|
|
@@ -34847,7 +34796,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34847
34796
|
updateElementById: editorOps.ops.updateElementById
|
|
34848
34797
|
});
|
|
34849
34798
|
const ribbonScope = useRibbonScopeToken();
|
|
34850
|
-
const viewPreferencesSync =
|
|
34799
|
+
const viewPreferencesSync = chunkXG4WSJ4O_js.useViewPreferencesSync({
|
|
34851
34800
|
loadVersion,
|
|
34852
34801
|
viewProperties: state.viewProperties,
|
|
34853
34802
|
setViewProperties: state.setViewProperties,
|
|
@@ -34898,7 +34847,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34898
34847
|
},
|
|
34899
34848
|
[state]
|
|
34900
34849
|
);
|
|
34901
|
-
const layoutSwitching =
|
|
34850
|
+
const layoutSwitching = chunkXG4WSJ4O_js.useLayoutSwitching({
|
|
34902
34851
|
handler: handlerRef.current,
|
|
34903
34852
|
slides,
|
|
34904
34853
|
activeSlideIndex,
|
|
@@ -35419,8 +35368,8 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
35419
35368
|
// Nothing previously provided it, so every one of those consumers was
|
|
35420
35369
|
// silently reading `DEFAULT_VIEWER_OPTIONS` forever, no matter what
|
|
35421
35370
|
// the user changed in the Options dialog.
|
|
35422
|
-
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerStorageContext.Provider, { value: hostStorage, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCloudFilesContext.Provider, { value: cloudFiles, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerRegionBaseContext.Provider, { value: regionBase, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsxRuntime.jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
35423
|
-
|
|
35371
|
+
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerStorageContext.Provider, { value: hostStorage, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCloudFilesContext.Provider, { value: cloudFiles, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerRegionBaseContext.Provider, { value: regionBase, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsxRuntime.jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsxRuntime.jsx(chunkXG4WSJ4O_js.Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35372
|
+
chunkXG4WSJ4O_js.CollaborationProvider,
|
|
35424
35373
|
{
|
|
35425
35374
|
config: collaboration,
|
|
35426
35375
|
canvasWidth: canvasSize.width,
|
|
@@ -35477,19 +35426,19 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
35477
35426
|
slideCount: slides.length
|
|
35478
35427
|
}
|
|
35479
35428
|
),
|
|
35480
|
-
/* @__PURE__ */ jsxRuntime.jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
35429
|
+
/* @__PURE__ */ jsxRuntime.jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsxRuntime.jsx(chunkXG4WSJ4O_js.ChartFormatContext.Provider, { value: chartFormat, children: viewerContent }) }) })
|
|
35481
35430
|
]
|
|
35482
35431
|
}
|
|
35483
35432
|
) }) }) }) }) }) }) }) }) })
|
|
35484
35433
|
);
|
|
35485
35434
|
}
|
|
35486
35435
|
);
|
|
35487
|
-
var PowerPointViewer2 = /* @__PURE__ */
|
|
35436
|
+
var PowerPointViewer2 = /* @__PURE__ */ chunkXG4WSJ4O_js.withDisplayName(
|
|
35488
35437
|
PowerPointViewerComponent,
|
|
35489
35438
|
"PowerPointViewer"
|
|
35490
35439
|
);
|
|
35491
35440
|
function CollaborationStatusStrip() {
|
|
35492
|
-
const collab =
|
|
35441
|
+
const collab = chunkXG4WSJ4O_js.useCollaboration();
|
|
35493
35442
|
if (!collab) {
|
|
35494
35443
|
return null;
|
|
35495
35444
|
}
|
|
@@ -35506,9 +35455,9 @@ function CollaborationStateReporter({
|
|
|
35506
35455
|
onChange,
|
|
35507
35456
|
onStatus
|
|
35508
35457
|
}) {
|
|
35509
|
-
const collab =
|
|
35458
|
+
const collab = chunkXG4WSJ4O_js.useCollaboration();
|
|
35510
35459
|
useCollaborationStateReport(collab, onChange);
|
|
35511
|
-
|
|
35460
|
+
chunkXG4WSJ4O_js.useReportOnChange(collab?.status ?? "disconnected", onStatus, "disconnected");
|
|
35512
35461
|
return null;
|
|
35513
35462
|
}
|
|
35514
35463
|
function CollaborationDocumentSync({
|
|
@@ -35523,8 +35472,8 @@ function CollaborationDocumentSync({
|
|
|
35523
35472
|
onReadOnlyChange,
|
|
35524
35473
|
history
|
|
35525
35474
|
}) {
|
|
35526
|
-
const collab =
|
|
35527
|
-
|
|
35475
|
+
const collab = chunkXG4WSJ4O_js.useCollaboration();
|
|
35476
|
+
chunkXG4WSJ4O_js.useCollaborationDocumentSync({
|
|
35528
35477
|
collaboration: collab,
|
|
35529
35478
|
history,
|
|
35530
35479
|
slides,
|
|
@@ -35544,14 +35493,14 @@ function CollaborationFollowLayer({
|
|
|
35544
35493
|
setActiveSlideIndex,
|
|
35545
35494
|
slideCount
|
|
35546
35495
|
}) {
|
|
35547
|
-
const collab =
|
|
35548
|
-
const { followedClientId, followUser } =
|
|
35496
|
+
const collab = chunkXG4WSJ4O_js.useCollaboration();
|
|
35497
|
+
const { followedClientId, followUser } = chunkXG4WSJ4O_js.useFollowMode({
|
|
35549
35498
|
collab,
|
|
35550
35499
|
activeSlideIndex,
|
|
35551
35500
|
setActiveSlideIndex,
|
|
35552
35501
|
slideCount
|
|
35553
35502
|
});
|
|
35554
|
-
|
|
35503
|
+
chunkXG4WSJ4O_js.useBroadcastFollower({
|
|
35555
35504
|
collab,
|
|
35556
35505
|
activeSlideIndex,
|
|
35557
35506
|
setActiveSlideIndex,
|
|
@@ -35646,6 +35595,7 @@ exports.PptxI18nProvider = PptxI18nProvider;
|
|
|
35646
35595
|
exports.SlideCanvas = SlideCanvas;
|
|
35647
35596
|
exports.SlideTemplateGalleryDialog = SlideTemplateGalleryDialog;
|
|
35648
35597
|
exports.SlideTemplatePreview = SlideTemplatePreview;
|
|
35598
|
+
exports.SlideThumbnail = SlideThumbnail;
|
|
35649
35599
|
exports.SlidesPaneSidebar = SlidesPaneSidebar;
|
|
35650
35600
|
exports.Toolbar = Toolbar;
|
|
35651
35601
|
exports.UserAvatarBar = UserAvatarBar;
|