pptx-react-viewer 4.65.0 → 4.67.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 +85 -0
- package/README.md +10 -0
- package/dist/{AiChatPanel-7U7IJRNY.mjs → AiChatPanel-E7CJSTW7.mjs} +1 -1
- package/dist/AiChatPanel-E7CJSTW7.mjs.br +0 -0
- package/dist/AiChatPanel-E7CJSTW7.mjs.gz +0 -0
- package/dist/{AiChatPanel-7AFFNYEN.js → AiChatPanel-PLQ3NBTK.js} +19 -19
- package/dist/AiChatPanel-PLQ3NBTK.js.br +0 -0
- package/dist/AiChatPanel-PLQ3NBTK.js.gz +0 -0
- package/dist/ai.js +2 -2
- package/dist/ai.js.br +0 -0
- package/dist/ai.js.gz +0 -0
- package/dist/ai.mjs +1 -1
- package/dist/ai.mjs.br +0 -0
- package/dist/ai.mjs.gz +0 -0
- package/dist/{chunk-G5JGUSBL.mjs → chunk-3LJ5QUU3.mjs} +271 -261
- package/dist/chunk-3LJ5QUU3.mjs.br +0 -0
- package/dist/chunk-3LJ5QUU3.mjs.gz +0 -0
- package/dist/{chunk-VGU5S37T.js → chunk-F5UOILTY.js} +466 -456
- package/dist/chunk-F5UOILTY.js.br +0 -0
- package/dist/chunk-F5UOILTY.js.gz +0 -0
- package/dist/{chunk-5ZW3GP6C.mjs → chunk-FBSPQYRE.mjs} +72 -738
- package/dist/chunk-FBSPQYRE.mjs.br +0 -0
- package/dist/chunk-FBSPQYRE.mjs.gz +0 -0
- package/dist/{chunk-WAIX4VJ2.mjs → chunk-JZE6BORE.mjs} +1 -1
- package/dist/chunk-JZE6BORE.mjs.br +0 -0
- package/dist/chunk-JZE6BORE.mjs.gz +0 -0
- package/dist/{chunk-VMX3IDQB.mjs → chunk-LRDW6EH7.mjs} +22 -11
- package/dist/chunk-LRDW6EH7.mjs.br +0 -0
- package/dist/chunk-LRDW6EH7.mjs.gz +0 -0
- package/dist/{chunk-PNDORR6S.js → chunk-LVEFHZ76.js} +1 -1
- package/dist/chunk-LVEFHZ76.js.br +0 -0
- package/dist/chunk-LVEFHZ76.js.gz +0 -0
- package/dist/{chunk-5DBKW7F3.js → chunk-P2COO2QO.js} +71 -736
- package/dist/chunk-P2COO2QO.js.br +0 -0
- package/dist/chunk-P2COO2QO.js.gz +0 -0
- package/dist/{chunk-LUKGXRHZ.js → chunk-ZLPMXC55.js} +578 -567
- package/dist/chunk-ZLPMXC55.js.br +0 -0
- package/dist/chunk-ZLPMXC55.js.gz +0 -0
- package/dist/i18n/de.cjs +3 -0
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +3 -0
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +3 -0
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +3 -0
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +3 -0
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +3 -0
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +3 -0
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +3 -0
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +27 -27
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +9 -2
- package/dist/internals.js +81 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +2 -2
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +4 -1
- package/dist/viewer/index.js +21 -21
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +4 -4
- package/dist/AiChatPanel-7AFFNYEN.js.br +0 -0
- package/dist/AiChatPanel-7AFFNYEN.js.gz +0 -0
- package/dist/AiChatPanel-7U7IJRNY.mjs.br +0 -0
- package/dist/AiChatPanel-7U7IJRNY.mjs.gz +0 -0
- package/dist/chunk-5DBKW7F3.js.br +0 -0
- package/dist/chunk-5DBKW7F3.js.gz +0 -0
- package/dist/chunk-5ZW3GP6C.mjs.br +0 -0
- package/dist/chunk-5ZW3GP6C.mjs.gz +0 -0
- package/dist/chunk-G5JGUSBL.mjs.br +0 -0
- package/dist/chunk-G5JGUSBL.mjs.gz +0 -0
- package/dist/chunk-LUKGXRHZ.js.br +0 -0
- package/dist/chunk-LUKGXRHZ.js.gz +0 -0
- package/dist/chunk-PNDORR6S.js.br +0 -0
- package/dist/chunk-PNDORR6S.js.gz +0 -0
- package/dist/chunk-VGU5S37T.js.br +0 -0
- package/dist/chunk-VGU5S37T.js.gz +0 -0
- package/dist/chunk-VMX3IDQB.mjs.br +0 -0
- package/dist/chunk-VMX3IDQB.mjs.gz +0 -0
- package/dist/chunk-WAIX4VJ2.mjs.br +0 -0
- package/dist/chunk-WAIX4VJ2.mjs.gz +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkLVEFHZ76_js = require('./chunk-LVEFHZ76.js');
|
|
4
|
+
var chunkF5UOILTY_js = require('./chunk-F5UOILTY.js');
|
|
5
|
+
var chunkP2COO2QO_js = require('./chunk-P2COO2QO.js');
|
|
6
6
|
var pptx = require('ooxml-ui/pptx');
|
|
7
7
|
var React108 = require('react');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -49,7 +49,7 @@ function AvatarCircle({
|
|
|
49
49
|
avatar,
|
|
50
50
|
isLocal
|
|
51
51
|
}) {
|
|
52
|
-
const { t } =
|
|
52
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
53
53
|
const initials = getInitials(name);
|
|
54
54
|
const title = isLocal ? t("pptx.collaboration.youLabel", { name }) : name;
|
|
55
55
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -84,7 +84,7 @@ function UserAvatarBar({
|
|
|
84
84
|
status,
|
|
85
85
|
maxVisible = 5
|
|
86
86
|
}) {
|
|
87
|
-
const { t } =
|
|
87
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
88
88
|
if (status === "disconnected" || status === "error") {
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
@@ -158,7 +158,7 @@ function CollaborationStatusIndicator({
|
|
|
158
158
|
connectedCount,
|
|
159
159
|
onRetry
|
|
160
160
|
}) {
|
|
161
|
-
const { t } =
|
|
161
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
162
162
|
const style = STATUS_STYLES[status];
|
|
163
163
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
164
164
|
"div",
|
|
@@ -199,7 +199,7 @@ function FollowModeBar({
|
|
|
199
199
|
followedClientId,
|
|
200
200
|
onFollow
|
|
201
201
|
}) {
|
|
202
|
-
const { t } =
|
|
202
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
203
203
|
if (presences.length === 0) {
|
|
204
204
|
return null;
|
|
205
205
|
}
|
|
@@ -304,7 +304,7 @@ function SectionContextMenu({
|
|
|
304
304
|
onAddSection,
|
|
305
305
|
onClose
|
|
306
306
|
}) {
|
|
307
|
-
const { t } =
|
|
307
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
308
308
|
React108.useEffect(() => {
|
|
309
309
|
const onKeyDown = (event) => {
|
|
310
310
|
if (event.key === "Escape") {
|
|
@@ -405,7 +405,7 @@ function SectionHeader({
|
|
|
405
405
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
406
406
|
lu.LuChevronDown,
|
|
407
407
|
{
|
|
408
|
-
className:
|
|
408
|
+
className: chunkP2COO2QO_js.cn(
|
|
409
409
|
"h-3 w-3 flex-shrink-0 transition-transform",
|
|
410
410
|
isCollapsed ? "-rotate-90" : "rotate-0"
|
|
411
411
|
)
|
|
@@ -480,7 +480,7 @@ function SlideContextMenu({
|
|
|
480
480
|
onAddSection,
|
|
481
481
|
onClose
|
|
482
482
|
}) {
|
|
483
|
-
const { t } =
|
|
483
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
484
484
|
const selected = state.selectedIndexes;
|
|
485
485
|
const selectedSlides = selected.map((i) => slides[i]).filter((s) => Boolean(s));
|
|
486
486
|
const entries = pptx.buildSlidePaneContextMenuEntries({
|
|
@@ -544,14 +544,14 @@ function SlideThumbnailImpl({
|
|
|
544
544
|
}) {
|
|
545
545
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
546
546
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
547
|
-
const width = previewWidth ??
|
|
547
|
+
const width = previewWidth ?? chunkP2COO2QO_js.SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
548
548
|
const scale = width / safeCanvasWidth;
|
|
549
549
|
const previewHeight = pptx.editorThumbnailHeight(safeCanvasWidth, safeCanvasHeight, width);
|
|
550
550
|
const previewElements = pptx.buildPreviewElements(slide, templateElements);
|
|
551
551
|
const slideFieldContext = pptx.deriveSlideFieldContext(fieldContext, slide);
|
|
552
|
-
const { t } =
|
|
552
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
553
553
|
const transitionLabel = slide.transition ? (() => {
|
|
554
|
-
const opt =
|
|
554
|
+
const opt = chunkP2COO2QO_js.SLIDE_TRANSITION_OPTIONS.find((o) => o.value === slide.transition?.type);
|
|
555
555
|
return opt ? t(opt.i18nKey) : slide.transition.type;
|
|
556
556
|
})() : void 0;
|
|
557
557
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -577,7 +577,7 @@ function SlideThumbnailImpl({
|
|
|
577
577
|
...pptx.deviceStrokeStageStyle(scale)
|
|
578
578
|
},
|
|
579
579
|
children: [
|
|
580
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
580
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkF5UOILTY_js.SlideBackgroundImageLayer, { slide }),
|
|
581
581
|
slide.transition && slide.transition.type !== "none" && slide.transition.type !== "cut" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
582
582
|
"div",
|
|
583
583
|
{
|
|
@@ -587,7 +587,7 @@ function SlideThumbnailImpl({
|
|
|
587
587
|
}
|
|
588
588
|
),
|
|
589
589
|
previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
590
|
-
|
|
590
|
+
chunkF5UOILTY_js.StaticElementRenderer,
|
|
591
591
|
{
|
|
592
592
|
element,
|
|
593
593
|
activeSlide: slide,
|
|
@@ -713,7 +713,7 @@ function LazyThumbnailInner({
|
|
|
713
713
|
}
|
|
714
714
|
var LazyThumbnail = /* @__PURE__ */ React108__default.default.memo(LazyThumbnailInner);
|
|
715
715
|
function declaredSectionFacts(groups, sectionId) {
|
|
716
|
-
const declared = groups.filter((group) => group.id !==
|
|
716
|
+
const declared = groups.filter((group) => group.id !== chunkP2COO2QO_js.DEFAULT_SECTION_GROUP_ID && group.id !== chunkP2COO2QO_js.UNGROUPED_SECTION_ID).map((group) => group.id);
|
|
717
717
|
return {
|
|
718
718
|
isDeclared: declared.includes(sectionId),
|
|
719
719
|
index: declared.indexOf(sectionId),
|
|
@@ -770,7 +770,7 @@ function SlideItemInner({
|
|
|
770
770
|
onDrop,
|
|
771
771
|
slideRef
|
|
772
772
|
}) {
|
|
773
|
-
const { t } =
|
|
773
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
774
774
|
const isHidden = Boolean(slide.hidden);
|
|
775
775
|
const cue = pptx.hiddenSlideCue(slide.hidden, "rail", slideIndex);
|
|
776
776
|
const handleContextMenu = React108.useCallback(
|
|
@@ -798,7 +798,7 @@ function SlideItemInner({
|
|
|
798
798
|
"data-pptx-chrome": "slide-row",
|
|
799
799
|
"aria-describedby": cue.labelId,
|
|
800
800
|
"data-pptx-slide-hidden": cue.marker,
|
|
801
|
-
className:
|
|
801
|
+
className: chunkP2COO2QO_js.cn(
|
|
802
802
|
"group relative flex w-full items-center gap-1 cursor-pointer border-0 bg-transparent py-0.5 px-1 text-left transition-all",
|
|
803
803
|
isActive && "bg-accent/40 before:absolute before:left-0 before:top-1 before:bottom-1 before:w-[3px] before:bg-primary before:rounded-r",
|
|
804
804
|
isSelected && !isActive && "bg-accent/20 ring-1 ring-inset ring-primary/50",
|
|
@@ -820,7 +820,7 @@ function SlideItemInner({
|
|
|
820
820
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
821
821
|
"span",
|
|
822
822
|
{
|
|
823
|
-
className:
|
|
823
|
+
className: chunkP2COO2QO_js.cn(
|
|
824
824
|
"text-[10px] tabular-nums text-right select-none w-full",
|
|
825
825
|
isActive ? "text-primary font-medium" : "text-muted-foreground"
|
|
826
826
|
),
|
|
@@ -843,7 +843,7 @@ function SlideItemInner({
|
|
|
843
843
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
844
844
|
"div",
|
|
845
845
|
{
|
|
846
|
-
className:
|
|
846
|
+
className: chunkP2COO2QO_js.cn(
|
|
847
847
|
"relative shrink-0 overflow-hidden border transition-colors bg-white",
|
|
848
848
|
isActive ? "border-primary/60" : "border-transparent group-hover:border-border/40"
|
|
849
849
|
),
|
|
@@ -1041,8 +1041,8 @@ function SlidesPaneSidebar({
|
|
|
1041
1041
|
fieldContext,
|
|
1042
1042
|
tableStyleContext
|
|
1043
1043
|
}) {
|
|
1044
|
-
const { t } =
|
|
1045
|
-
const collab =
|
|
1044
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
1045
|
+
const collab = chunkF5UOILTY_js.useCollaboration();
|
|
1046
1046
|
const slideRefs = React108.useRef(/* @__PURE__ */ new Map());
|
|
1047
1047
|
const renameInputRef = React108.useRef(null);
|
|
1048
1048
|
const slidePresenceMap = React108.useMemo(() => {
|
|
@@ -1067,7 +1067,7 @@ function SlidesPaneSidebar({
|
|
|
1067
1067
|
() => estimateSlideItemHeight(canvasSize.width, canvasSize.height, previewWidth),
|
|
1068
1068
|
[canvasSize.width, canvasSize.height, previewWidth]
|
|
1069
1069
|
);
|
|
1070
|
-
const showSectionHeaders = sectionGroups.some((group) => group.id !==
|
|
1070
|
+
const showSectionHeaders = sectionGroups.some((group) => group.id !== chunkP2COO2QO_js.DEFAULT_SECTION_GROUP_ID);
|
|
1071
1071
|
const {
|
|
1072
1072
|
collapsedSections,
|
|
1073
1073
|
renamingSectionId,
|
|
@@ -1137,7 +1137,7 @@ function SlidesPaneSidebar({
|
|
|
1137
1137
|
[sectionGroups, showSectionHeaders, effectiveCollapsed]
|
|
1138
1138
|
);
|
|
1139
1139
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
1140
|
-
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } =
|
|
1140
|
+
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = chunkF5UOILTY_js.useVirtualizedSlides({
|
|
1141
1141
|
totalItems: shouldVirtualize ? flatItems.length : 0,
|
|
1142
1142
|
itemHeight: estimatedItemHeight
|
|
1143
1143
|
});
|
|
@@ -1421,7 +1421,7 @@ function SlideTemplatePreview({
|
|
|
1421
1421
|
transformOrigin: "top left"
|
|
1422
1422
|
},
|
|
1423
1423
|
children: previewSlide.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1424
|
-
|
|
1424
|
+
chunkF5UOILTY_js.StaticElementRenderer,
|
|
1425
1425
|
{
|
|
1426
1426
|
element,
|
|
1427
1427
|
activeSlide: previewSlide,
|
|
@@ -1489,8 +1489,8 @@ function SlideTemplateGalleryDialog({
|
|
|
1489
1489
|
onInsert,
|
|
1490
1490
|
scheme
|
|
1491
1491
|
}) {
|
|
1492
|
-
const { t } =
|
|
1493
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
1492
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
1493
|
+
const { panelStyle, handlers: dragHandlers } = chunkF5UOILTY_js.useModalDismissDrag(onClose);
|
|
1494
1494
|
const [selected, setSelected] = React108.useState(null);
|
|
1495
1495
|
const dialogRef = React108.useRef(null);
|
|
1496
1496
|
useModalFocus(isOpen, dialogRef, onClose);
|
|
@@ -1575,7 +1575,7 @@ function SlideTemplateGalleryDialog({
|
|
|
1575
1575
|
onInsert(spec.id);
|
|
1576
1576
|
onClose();
|
|
1577
1577
|
},
|
|
1578
|
-
className:
|
|
1578
|
+
className: chunkP2COO2QO_js.cn(
|
|
1579
1579
|
"flex flex-col items-center gap-1 p-2 rounded border transition-colors",
|
|
1580
1580
|
selected === spec.id ? "border-primary bg-primary/20" : "border-border hover:border-border hover:bg-muted/50"
|
|
1581
1581
|
),
|
|
@@ -1785,7 +1785,7 @@ function nowLocalInputValue() {
|
|
|
1785
1785
|
return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}T${pad(now.getHours())}:${pad(now.getMinutes())}`;
|
|
1786
1786
|
}
|
|
1787
1787
|
function DateTimeFieldDialog(p) {
|
|
1788
|
-
const { t } =
|
|
1788
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
1789
1789
|
const [datePickerValue, setDatePickerValue] = React108.useState(nowLocalInputValue);
|
|
1790
1790
|
const [dateFormat, setDateFormat] = React108.useState("locale");
|
|
1791
1791
|
const confirmDatePicker = React108.useCallback(() => {
|
|
@@ -1891,7 +1891,7 @@ function useViewerCustomizationContext() {
|
|
|
1891
1891
|
return React108.useContext(ViewerCustomizationContext);
|
|
1892
1892
|
}
|
|
1893
1893
|
function InsertSection(p) {
|
|
1894
|
-
const { t } =
|
|
1894
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
1895
1895
|
const customization = useViewerCustomizationContext();
|
|
1896
1896
|
const ref = React108.useRef(null);
|
|
1897
1897
|
const [datePickerOpen, setDatePickerOpen] = React108.useState(false);
|
|
@@ -2040,8 +2040,8 @@ function MobileSheet({
|
|
|
2040
2040
|
headerRight
|
|
2041
2041
|
}) {
|
|
2042
2042
|
const sheetRef = React108.useRef(null);
|
|
2043
|
-
const { t } =
|
|
2044
|
-
const { dragY, dragging, handlers } =
|
|
2043
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2044
|
+
const { dragY, dragging, handlers } = chunkF5UOILTY_js.useSheetDismissDrag(onClose);
|
|
2045
2045
|
useModalFocus(open, sheetRef, onClose);
|
|
2046
2046
|
if (!open) {
|
|
2047
2047
|
return null;
|
|
@@ -2065,7 +2065,7 @@ function MobileSheet({
|
|
|
2065
2065
|
"aria-modal": "true",
|
|
2066
2066
|
"aria-label": typeof title === "string" ? title : t("pptx.mobileSheet.ariaLabel"),
|
|
2067
2067
|
tabIndex: -1,
|
|
2068
|
-
className:
|
|
2068
|
+
className: chunkP2COO2QO_js.cn(
|
|
2069
2069
|
"relative bg-background border-t border-border rounded-t-2xl shadow-2xl flex flex-col overflow-hidden",
|
|
2070
2070
|
"animate-in slide-in-from-bottom duration-200",
|
|
2071
2071
|
className
|
|
@@ -2112,7 +2112,7 @@ function MobileSheet({
|
|
|
2112
2112
|
] });
|
|
2113
2113
|
}
|
|
2114
2114
|
function MobileInsertSheet(p) {
|
|
2115
|
-
const { t } =
|
|
2115
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2116
2116
|
const close = () => p.onCloseMobileInsert?.();
|
|
2117
2117
|
const customization = useViewerCustomizationContext();
|
|
2118
2118
|
const [dateOpen, setDateOpen] = React108.useState(false);
|
|
@@ -2188,7 +2188,7 @@ function MobileInsertSheet(p) {
|
|
|
2188
2188
|
] });
|
|
2189
2189
|
}
|
|
2190
2190
|
function AnimationsSection(p) {
|
|
2191
|
-
const { t } =
|
|
2191
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2192
2192
|
const ref = React108.useRef(null);
|
|
2193
2193
|
const [previewActive, setPreviewActive] = React108.useState(false);
|
|
2194
2194
|
const timer = React108.useRef(void 0);
|
|
@@ -2269,7 +2269,7 @@ function WebHomeControls({
|
|
|
2269
2269
|
onPopup,
|
|
2270
2270
|
layoutArtwork
|
|
2271
2271
|
}) {
|
|
2272
|
-
const { t } =
|
|
2272
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2273
2273
|
const ref = React108.useRef(null);
|
|
2274
2274
|
React108.useEffect(() => {
|
|
2275
2275
|
if (ref.current) {
|
|
@@ -2310,7 +2310,7 @@ function WebHomeControls({
|
|
|
2310
2310
|
function ShapeArrangeExtras(p) {
|
|
2311
2311
|
const commands = useShapeFormatContext();
|
|
2312
2312
|
const crop = commands?.crop;
|
|
2313
|
-
const { isHidden } =
|
|
2313
|
+
const { isHidden } = chunkF5UOILTY_js.useToolbarVisibility(p.hiddenActions);
|
|
2314
2314
|
const { onGroupElements, onUngroupElement, onUpdateElementStyle } = p;
|
|
2315
2315
|
const controls = React108.useMemo(
|
|
2316
2316
|
() => pptx.arrangeShapeHomeControls({
|
|
@@ -2361,7 +2361,7 @@ function ShapeArrangeExtras(p) {
|
|
|
2361
2361
|
return /* @__PURE__ */ jsxRuntime.jsx(WebHomeControls, { family: "arrange-shape", controls, onRequest: request });
|
|
2362
2362
|
}
|
|
2363
2363
|
function ArrangeSection(p) {
|
|
2364
|
-
const { t } =
|
|
2364
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2365
2365
|
const {
|
|
2366
2366
|
onAlignElements,
|
|
2367
2367
|
onDistributeElements,
|
|
@@ -2468,7 +2468,7 @@ function RibbonGallery({
|
|
|
2468
2468
|
tagControl = true,
|
|
2469
2469
|
onCommand
|
|
2470
2470
|
}) {
|
|
2471
|
-
const { t } =
|
|
2471
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2472
2472
|
const ref = React108.useRef(null);
|
|
2473
2473
|
const commands = useRibbonGalleryCommands();
|
|
2474
2474
|
const context = commands?.context;
|
|
@@ -2603,7 +2603,7 @@ function WebRibbonToggle({
|
|
|
2603
2603
|
);
|
|
2604
2604
|
}
|
|
2605
2605
|
function TransitionsSection(p) {
|
|
2606
|
-
const { t } =
|
|
2606
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2607
2607
|
const ref = React108.useRef(null);
|
|
2608
2608
|
const draft = React108.useMemo(() => pptx.readRibbonTransitionDraft(p.activeSlide), [p.activeSlide]);
|
|
2609
2609
|
const transition = p.activeSlide?.transition;
|
|
@@ -2645,7 +2645,7 @@ function TransitionsSection(p) {
|
|
|
2645
2645
|
case "soundPreview": {
|
|
2646
2646
|
const url = pptx.ribbonTransitionStockSoundUrl(transition);
|
|
2647
2647
|
if (url) {
|
|
2648
|
-
|
|
2648
|
+
chunkF5UOILTY_js.playAnimationSound(url);
|
|
2649
2649
|
}
|
|
2650
2650
|
break;
|
|
2651
2651
|
}
|
|
@@ -2664,7 +2664,7 @@ function TransitionsSection(p) {
|
|
|
2664
2664
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-ribbon-transitions", { ref });
|
|
2665
2665
|
}
|
|
2666
2666
|
function DesignSection(p) {
|
|
2667
|
-
const { t } =
|
|
2667
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2668
2668
|
const actions = {
|
|
2669
2669
|
"design.themes.browseThemes": p.onToggleThemeGallery,
|
|
2670
2670
|
"design.themes.editTheme": p.onToggleThemeEditor,
|
|
@@ -2727,7 +2727,7 @@ function useRecentColors() {
|
|
|
2727
2727
|
return React108.useContext(RecentColorsContext);
|
|
2728
2728
|
}
|
|
2729
2729
|
function DrawSection(p) {
|
|
2730
|
-
const { t } =
|
|
2730
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2731
2731
|
const { pushColor, recentColors } = useRecentColors();
|
|
2732
2732
|
const ref = React108.useRef(null);
|
|
2733
2733
|
React108.useEffect(() => {
|
|
@@ -2825,7 +2825,7 @@ var AccountAuthContext = /* @__PURE__ */ React108.createContext(
|
|
|
2825
2825
|
);
|
|
2826
2826
|
var cardClass = "border border-border bg-card p-6 text-card-foreground";
|
|
2827
2827
|
function AccountPage() {
|
|
2828
|
-
const { t } =
|
|
2828
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2829
2829
|
const accountAuth = React108.useContext(AccountAuthContext);
|
|
2830
2830
|
const storage = useViewerStorage();
|
|
2831
2831
|
const cloud = useViewerCloudFiles();
|
|
@@ -2853,7 +2853,7 @@ function AccountPage() {
|
|
|
2853
2853
|
refreshUsage();
|
|
2854
2854
|
setTimeout(() => setCleared(false), 4e3);
|
|
2855
2855
|
};
|
|
2856
|
-
const version = "4.
|
|
2856
|
+
const version = "4.67.0" ;
|
|
2857
2857
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
2858
2858
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: cardClass, children: [
|
|
2859
2859
|
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -2893,7 +2893,7 @@ function AccountPage() {
|
|
|
2893
2893
|
"aria-label": color,
|
|
2894
2894
|
"aria-pressed": profile.avatarColor === color,
|
|
2895
2895
|
onClick: () => updateProfile({ avatarColor: color }),
|
|
2896
|
-
className:
|
|
2896
|
+
className: chunkP2COO2QO_js.cn(
|
|
2897
2897
|
"size-7 rounded-full border-2 transition-transform",
|
|
2898
2898
|
profile.avatarColor === color ? "border-foreground scale-110" : "border-transparent hover:scale-105"
|
|
2899
2899
|
),
|
|
@@ -2968,7 +2968,7 @@ function BackstageAction(props) {
|
|
|
2968
2968
|
] });
|
|
2969
2969
|
}
|
|
2970
2970
|
function BackstageNewGallery(props) {
|
|
2971
|
-
const { t } =
|
|
2971
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2972
2972
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2973
2973
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mt-7 text-[17px] font-semibold", children: t("pptx.backstage.newHeading") }),
|
|
2974
2974
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5 grid grid-cols-[repeat(auto-fill,minmax(150px,1fr))] gap-6", children: pptx.BACKSTAGE_TEMPLATES.map((template) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2994,7 +2994,7 @@ function BackstageNewGallery(props) {
|
|
|
2994
2994
|
] });
|
|
2995
2995
|
}
|
|
2996
2996
|
function BackstageRecentList(props) {
|
|
2997
|
-
const { t } =
|
|
2997
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
2998
2998
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-5 border-t border-border", children: [
|
|
2999
2999
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_120px_90px] px-3 py-2 text-[11px] font-semibold text-muted-foreground", children: [
|
|
3000
3000
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("pptx.backstage.columnName") }),
|
|
@@ -3048,7 +3048,7 @@ function BackstageCards({
|
|
|
3048
3048
|
props,
|
|
3049
3049
|
run
|
|
3050
3050
|
}) {
|
|
3051
|
-
const { t } =
|
|
3051
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
3052
3052
|
const handlers = {
|
|
3053
3053
|
protect: props.onOpenPasswordProtection,
|
|
3054
3054
|
inspect: props.onOpenDocumentProperties,
|
|
@@ -3110,7 +3110,7 @@ function BackstageNavIcon({ page }) {
|
|
|
3110
3110
|
return Icon ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-[17px] shrink-0", "aria-hidden": "true" }) : null;
|
|
3111
3111
|
}
|
|
3112
3112
|
function FileSection(p) {
|
|
3113
|
-
const { t, locale } =
|
|
3113
|
+
const { t, locale } = chunkP2COO2QO_js.useTranslation();
|
|
3114
3114
|
const [requestedPage, setRequestedPage] = React108.useState("home");
|
|
3115
3115
|
const customization = useViewerCustomizationContext();
|
|
3116
3116
|
const nav = pptx.backstageNavEntries(pptx.BACKSTAGE_NAV, customization);
|
|
@@ -3118,7 +3118,7 @@ function FileSection(p) {
|
|
|
3118
3118
|
const page = offered(requestedPage) ? requestedPage : offered("home") ? "home" : nav.find((item) => item.id !== "save" && item.id !== "close")?.id ?? "home";
|
|
3119
3119
|
const [query, setQuery] = React108.useState("");
|
|
3120
3120
|
const [recent, setRecent] = React108.useState([]);
|
|
3121
|
-
const { isHidden } =
|
|
3121
|
+
const { isHidden } = chunkF5UOILTY_js.useToolbarVisibility(p.hiddenActions);
|
|
3122
3122
|
const exportHidden = isHidden("export");
|
|
3123
3123
|
const storage = useViewerStorage();
|
|
3124
3124
|
const cloud = useViewerCloudFiles();
|
|
@@ -3387,7 +3387,7 @@ function RibbonMenu({
|
|
|
3387
3387
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3388
3388
|
"div",
|
|
3389
3389
|
{
|
|
3390
|
-
className:
|
|
3390
|
+
className: chunkP2COO2QO_js.cn("fixed z-50", className),
|
|
3391
3391
|
style: pos ? { left: pos.left, top: pos.top } : { visibility: "hidden" },
|
|
3392
3392
|
children
|
|
3393
3393
|
}
|
|
@@ -3397,7 +3397,7 @@ var THUMB_WIDTH = 128;
|
|
|
3397
3397
|
var THUMB_HEIGHT = 72;
|
|
3398
3398
|
var MAX_PREVIEW_ELEMENTS = 100;
|
|
3399
3399
|
function LayoutGalleryMenu(p) {
|
|
3400
|
-
const { t } =
|
|
3400
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
3401
3401
|
return /* @__PURE__ */ jsxRuntime.jsx(RibbonMenu, { anchorRef: p.anchorRef, className: "flex flex-col w-[620px] pt-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3402
3402
|
"div",
|
|
3403
3403
|
{
|
|
@@ -3413,7 +3413,7 @@ function LayoutGalleryMenu(p) {
|
|
|
3413
3413
|
type: "button",
|
|
3414
3414
|
"aria-current": isCurrent ? "true" : void 0,
|
|
3415
3415
|
title: isCurrent ? `${layout.name} (${t("pptx.layoutGallery.current")})` : layout.name,
|
|
3416
|
-
className:
|
|
3416
|
+
className: chunkP2COO2QO_js.cn(
|
|
3417
3417
|
"relative flex min-w-0 flex-col items-center gap-1 rounded border-2 p-1 text-xs text-foreground transition-colors hover:bg-muted",
|
|
3418
3418
|
isCurrent ? "border-primary bg-primary/10" : "border-transparent"
|
|
3419
3419
|
),
|
|
@@ -3487,7 +3487,7 @@ function LayoutArtwork({
|
|
|
3487
3487
|
backgroundColor
|
|
3488
3488
|
};
|
|
3489
3489
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (preview?.elements ?? []).slice(0, MAX_PREVIEW_ELEMENTS).map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3490
|
-
|
|
3490
|
+
chunkF5UOILTY_js.StaticElementRenderer,
|
|
3491
3491
|
{
|
|
3492
3492
|
element,
|
|
3493
3493
|
activeSlide: slide,
|
|
@@ -3762,7 +3762,7 @@ function WebRibbonSection({
|
|
|
3762
3762
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-ribbon-section", { ref });
|
|
3763
3763
|
}
|
|
3764
3764
|
function ReviewSection(p) {
|
|
3765
|
-
const { t } =
|
|
3765
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
3766
3766
|
const [activeCommentId, setActiveCommentId] = React108.useState(null);
|
|
3767
3767
|
React108.useEffect(() => pptx.trackActiveComment(document, setActiveCommentId), []);
|
|
3768
3768
|
const host = p.commentsHost;
|
|
@@ -3822,7 +3822,7 @@ function SlideShowOptions({
|
|
|
3822
3822
|
children
|
|
3823
3823
|
}) {
|
|
3824
3824
|
const ref = React108.useRef(null);
|
|
3825
|
-
const { t } =
|
|
3825
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
3826
3826
|
React108.useLayoutEffect(() => {
|
|
3827
3827
|
if (!ref.current) {
|
|
3828
3828
|
return;
|
|
@@ -3841,8 +3841,8 @@ function SlideShowOptions({
|
|
|
3841
3841
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-slide-show-options", { ref, children });
|
|
3842
3842
|
}
|
|
3843
3843
|
function SubtitleSettingsControl() {
|
|
3844
|
-
const { t } =
|
|
3845
|
-
const supplied = React108.useContext(
|
|
3844
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
3845
|
+
const supplied = React108.useContext(chunkF5UOILTY_js.ViewerOptionsStoreContext);
|
|
3846
3846
|
const fallback = React108.useRef(null);
|
|
3847
3847
|
if (!supplied) {
|
|
3848
3848
|
fallback.current ??= pptx.createViewerOptionsStore({ persist: false });
|
|
@@ -3875,8 +3875,8 @@ function SubtitleSettingsControl() {
|
|
|
3875
3875
|
);
|
|
3876
3876
|
}
|
|
3877
3877
|
function SlideShowSection(p) {
|
|
3878
|
-
const { t } =
|
|
3879
|
-
const { isHidden } =
|
|
3878
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
3879
|
+
const { isHidden } = chunkF5UOILTY_js.useToolbarVisibility(p.hiddenActions);
|
|
3880
3880
|
const actions = {
|
|
3881
3881
|
"slideShow.startSlideShow.fromBeginning": p.onPresentFromBeginning ?? (() => p.onSetMode("present")),
|
|
3882
3882
|
"slideShow.startSlideShow.fromCurrent": p.onPresent,
|
|
@@ -4120,7 +4120,7 @@ function FontFormatGroup(p) {
|
|
|
4120
4120
|
return /* @__PURE__ */ jsxRuntime.jsx(WebHomeControls, { family: "font", controls, onRequest: request });
|
|
4121
4121
|
}
|
|
4122
4122
|
function FontPickerGroup(p) {
|
|
4123
|
-
const { t } =
|
|
4123
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4124
4124
|
const { enabled, fontFamily, fontSize, themeFonts, embeddedFonts, customFonts } = p;
|
|
4125
4125
|
const { onFamily, onSize } = p;
|
|
4126
4126
|
const controls = React108.useMemo(
|
|
@@ -4143,7 +4143,7 @@ function FontPickerGroup(p) {
|
|
|
4143
4143
|
return /* @__PURE__ */ jsxRuntime.jsx(WebHomeControls, { family: "font-picker", controls, onRequest: request });
|
|
4144
4144
|
}
|
|
4145
4145
|
function ParagraphGroup(p) {
|
|
4146
|
-
const { t } =
|
|
4146
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4147
4147
|
const { canMut, canFormat, effectiveTs, onUpdateTextStyle, onToggleBullets } = p;
|
|
4148
4148
|
const commands = useRibbonGalleryCommands();
|
|
4149
4149
|
const align = pptx.paragraphHomeAlign(effectiveTs?.align);
|
|
@@ -4244,7 +4244,7 @@ function useParagraphListKind(element) {
|
|
|
4244
4244
|
return React108.useSyncExternalStore(subscribe, read, readServer);
|
|
4245
4245
|
}
|
|
4246
4246
|
function TextSection(p) {
|
|
4247
|
-
const { t } =
|
|
4247
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4248
4248
|
const hasSel = Boolean(p.selectedElement);
|
|
4249
4249
|
const canMut = hasSel && p.canEdit;
|
|
4250
4250
|
const { fontFamily, fontSize } = extractFontInfo(p.selectedElement, p.themeFonts);
|
|
@@ -4320,7 +4320,7 @@ function TextSection(p) {
|
|
|
4320
4320
|
] });
|
|
4321
4321
|
}
|
|
4322
4322
|
function ViewSection(p) {
|
|
4323
|
-
const { t } =
|
|
4323
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4324
4324
|
const ref = React108.useRef(null);
|
|
4325
4325
|
React108.useEffect(() => {
|
|
4326
4326
|
const host = ref.current;
|
|
@@ -4393,10 +4393,10 @@ var MENU_ITEMS = [
|
|
|
4393
4393
|
{ key: "file", label: "pptx.ribbon.tab.file", icon: lu.LuFile }
|
|
4394
4394
|
];
|
|
4395
4395
|
function MobileMenuSheet(props) {
|
|
4396
|
-
const { t } =
|
|
4396
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4397
4397
|
const { open, onClose } = props;
|
|
4398
4398
|
const [active, setActive] = React108.useState("home");
|
|
4399
|
-
const { isTabVisible } =
|
|
4399
|
+
const { isTabVisible } = chunkF5UOILTY_js.useToolbarVisibility(props.hiddenActions);
|
|
4400
4400
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4401
4401
|
MobileSheet,
|
|
4402
4402
|
{
|
|
@@ -4410,7 +4410,7 @@ function MobileMenuSheet(props) {
|
|
|
4410
4410
|
{
|
|
4411
4411
|
type: "button",
|
|
4412
4412
|
onClick: () => setActive(active === key ? null : key),
|
|
4413
|
-
className:
|
|
4413
|
+
className: chunkP2COO2QO_js.cn(
|
|
4414
4414
|
"inline-flex items-center gap-1.5 shrink-0 px-3 py-2 rounded-full text-[12px] font-medium border transition-colors min-h-[36px]",
|
|
4415
4415
|
active === key ? "bg-primary text-white border-primary" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent/40"
|
|
4416
4416
|
),
|
|
@@ -4685,10 +4685,10 @@ function MobileSectionBody({
|
|
|
4685
4685
|
}
|
|
4686
4686
|
}
|
|
4687
4687
|
function MobileToolbar(props) {
|
|
4688
|
-
const { t } =
|
|
4688
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4689
4689
|
const { mode, canUndo, canRedo, onUndo, onRedo, onSetMode, onSaveAsPptx } = props;
|
|
4690
4690
|
const [menuOpen, setMenuOpen] = React108.useState(false);
|
|
4691
|
-
const { isHidden } =
|
|
4691
|
+
const { isHidden } = chunkF5UOILTY_js.useToolbarVisibility(props.hiddenActions);
|
|
4692
4692
|
const showEdit = mode === "edit" || mode === "master";
|
|
4693
4693
|
const hidden = [];
|
|
4694
4694
|
if (isHidden("undo")) {
|
|
@@ -4734,8 +4734,8 @@ function MobileToolbar(props) {
|
|
|
4734
4734
|
] });
|
|
4735
4735
|
}
|
|
4736
4736
|
function ChartSelectionStrip() {
|
|
4737
|
-
const { t } =
|
|
4738
|
-
const commands =
|
|
4737
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4738
|
+
const commands = chunkF5UOILTY_js.useChartFormatContext();
|
|
4739
4739
|
const chart = commands?.chart;
|
|
4740
4740
|
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
4741
4741
|
const controls = React108.useMemo(
|
|
@@ -4766,7 +4766,7 @@ function PictureSizeStrip({
|
|
|
4766
4766
|
hiddenActions
|
|
4767
4767
|
}) {
|
|
4768
4768
|
const crop = useShapeFormatContext()?.crop;
|
|
4769
|
-
const { isHidden } =
|
|
4769
|
+
const { isHidden } = chunkF5UOILTY_js.useToolbarVisibility(hiddenActions);
|
|
4770
4770
|
const controls = React108.useMemo(
|
|
4771
4771
|
() => pptx.pictureSizeHomeControls({
|
|
4772
4772
|
editable: Boolean(crop),
|
|
@@ -4783,7 +4783,7 @@ function PictureSizeStrip({
|
|
|
4783
4783
|
return /* @__PURE__ */ jsxRuntime.jsx(WebHomeControls, { family: "picture-size", controls, onRequest: request });
|
|
4784
4784
|
}
|
|
4785
4785
|
function useTranslateOr() {
|
|
4786
|
-
const { t } =
|
|
4786
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4787
4787
|
return (key, fallback) => pptx.galleryTextLabel(t, key, fallback);
|
|
4788
4788
|
}
|
|
4789
4789
|
function ContextualTabSection({
|
|
@@ -4806,7 +4806,7 @@ function ContextualTabSection({
|
|
|
4806
4806
|
)) });
|
|
4807
4807
|
}
|
|
4808
4808
|
function DrawingGroup(p) {
|
|
4809
|
-
const { t } =
|
|
4809
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4810
4810
|
const { recentColors, pushColor } = useRecentColors();
|
|
4811
4811
|
const themeColors = useThemeColorMap();
|
|
4812
4812
|
const commands = useRibbonGalleryCommands();
|
|
@@ -4892,7 +4892,7 @@ function DrawingGroup(p) {
|
|
|
4892
4892
|
] });
|
|
4893
4893
|
}
|
|
4894
4894
|
function EditingSection(p) {
|
|
4895
|
-
const { t } =
|
|
4895
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4896
4896
|
const { onToggleFindReplace, onSelectAll } = p;
|
|
4897
4897
|
const controls = React108.useMemo(
|
|
4898
4898
|
() => pptx.editingHomeControls({ selectAll: Boolean(onSelectAll) }),
|
|
@@ -4938,8 +4938,8 @@ function RibbonAddInSection({ tab }) {
|
|
|
4938
4938
|
var TAB_BASE = "relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap transition-colors max-md:min-h-[36px] max-md:px-3";
|
|
4939
4939
|
var TAB_UNDERLINE = "after:absolute after:-bottom-px after:left-0 after:right-0 after:h-[2.5px] after:bg-primary";
|
|
4940
4940
|
function RibbonTabBar(p) {
|
|
4941
|
-
const { t } =
|
|
4942
|
-
const viewerOptions =
|
|
4941
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
4942
|
+
const viewerOptions = chunkF5UOILTY_js.useViewerOptionsContext();
|
|
4943
4943
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4944
4944
|
"div",
|
|
4945
4945
|
{
|
|
@@ -4947,7 +4947,7 @@ function RibbonTabBar(p) {
|
|
|
4947
4947
|
"data-pptx-chrome": "ribbon-tabs",
|
|
4948
4948
|
className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
|
|
4949
4949
|
children: [
|
|
4950
|
-
|
|
4950
|
+
chunkP2COO2QO_js.TOOLBAR_SECTIONS.filter((s) => p.isTabVisible(s.id)).map((s) => {
|
|
4951
4951
|
const selected = p.activeSection === s.id;
|
|
4952
4952
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4953
4953
|
"button",
|
|
@@ -4957,7 +4957,7 @@ function RibbonTabBar(p) {
|
|
|
4957
4957
|
"aria-selected": selected,
|
|
4958
4958
|
title: pptx.resolveScreenTip(viewerOptions, t(s.labelKey)),
|
|
4959
4959
|
onClick: () => p.onSelectSection(s.id),
|
|
4960
|
-
className:
|
|
4960
|
+
className: chunkP2COO2QO_js.cn(
|
|
4961
4961
|
TAB_BASE,
|
|
4962
4962
|
selected ? s.id === "file" ? "text-white bg-primary/80 rounded-sm" : `text-foreground ${TAB_UNDERLINE}` : s.id === "file" ? "text-primary hover:bg-primary/15 rounded-sm" : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
|
|
4963
4963
|
),
|
|
@@ -4977,7 +4977,7 @@ function RibbonTabBar(p) {
|
|
|
4977
4977
|
...{ [pptx.RIBBON_ADD_IN_TAB_ATTR]: tab.id },
|
|
4978
4978
|
title: pptx.resolveScreenTip(viewerOptions, tab.label),
|
|
4979
4979
|
onClick: () => p.onSelectAddIn?.(tab.id),
|
|
4980
|
-
className:
|
|
4980
|
+
className: chunkP2COO2QO_js.cn(
|
|
4981
4981
|
TAB_BASE,
|
|
4982
4982
|
selected ? `text-foreground ${TAB_UNDERLINE}` : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
|
|
4983
4983
|
),
|
|
@@ -4998,7 +4998,7 @@ function RibbonTabBar(p) {
|
|
|
4998
4998
|
...{ [pptx.RIBBON_CONTEXTUAL_TAB_ATTR]: id },
|
|
4999
4999
|
title: pptx.resolveScreenTip(viewerOptions, label),
|
|
5000
5000
|
onClick: () => p.onSelectContextual(id),
|
|
5001
|
-
className:
|
|
5001
|
+
className: chunkP2COO2QO_js.cn(
|
|
5002
5002
|
TAB_BASE,
|
|
5003
5003
|
"text-primary",
|
|
5004
5004
|
selected ? TAB_UNDERLINE : "hover:bg-primary/10"
|
|
@@ -5015,10 +5015,10 @@ function RibbonTabBar(p) {
|
|
|
5015
5015
|
);
|
|
5016
5016
|
}
|
|
5017
5017
|
function TabRowActions(p) {
|
|
5018
|
-
const { t } =
|
|
5019
|
-
const collab =
|
|
5018
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5019
|
+
const collab = chunkF5UOILTY_js.useCollaboration();
|
|
5020
5020
|
const isCollaborating = Boolean(collab && collab.status === "connected");
|
|
5021
|
-
const { isHidden } =
|
|
5021
|
+
const { isHidden } = chunkF5UOILTY_js.useToolbarVisibility(p.hiddenActions);
|
|
5022
5022
|
const customization = useViewerCustomizationContext();
|
|
5023
5023
|
const ref = React108.useRef(null);
|
|
5024
5024
|
const handlers = React108.useRef(p);
|
|
@@ -5072,8 +5072,8 @@ function TabRowActions(p) {
|
|
|
5072
5072
|
] });
|
|
5073
5073
|
}
|
|
5074
5074
|
function TitleBarElement(p) {
|
|
5075
|
-
const { t } =
|
|
5076
|
-
const options =
|
|
5075
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5076
|
+
const options = chunkF5UOILTY_js.useViewerOptionsContext();
|
|
5077
5077
|
const customization = useViewerCustomizationContext();
|
|
5078
5078
|
const ref = React108.useRef(null);
|
|
5079
5079
|
const stripVisible = options.quickAccess.visible && pptx.isPanelVisible(customization, "quickAccessToolbar");
|
|
@@ -5138,7 +5138,7 @@ function CustomShowsControls({
|
|
|
5138
5138
|
onDeleteActiveCustomShow,
|
|
5139
5139
|
onToggleCurrentSlideInActiveShow
|
|
5140
5140
|
}) {
|
|
5141
|
-
const { t } =
|
|
5141
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5142
5142
|
if (customShows.length > 0) {
|
|
5143
5143
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5144
5144
|
sep,
|
|
@@ -5193,7 +5193,7 @@ function CustomShowsControls({
|
|
|
5193
5193
|
{
|
|
5194
5194
|
type: "button",
|
|
5195
5195
|
onClick: onToggleCurrentSlideInActiveShow,
|
|
5196
|
-
className:
|
|
5196
|
+
className: chunkP2COO2QO_js.cn(
|
|
5197
5197
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
5198
5198
|
isCurrentSlideInActiveShow ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
5199
5199
|
),
|
|
@@ -5232,7 +5232,7 @@ function PresentDropdown({
|
|
|
5232
5232
|
onToggleSubtitles,
|
|
5233
5233
|
showSubtitles
|
|
5234
5234
|
}) {
|
|
5235
|
-
const { t } =
|
|
5235
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5236
5236
|
const [open, setOpen] = React108.useState(false);
|
|
5237
5237
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
5238
5238
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-stretch rounded border border-border bg-muted text-xs overflow-hidden", children: [
|
|
@@ -5241,7 +5241,7 @@ function PresentDropdown({
|
|
|
5241
5241
|
{
|
|
5242
5242
|
type: "button",
|
|
5243
5243
|
onClick: onPresent,
|
|
5244
|
-
className:
|
|
5244
|
+
className: chunkP2COO2QO_js.cn(
|
|
5245
5245
|
"px-2 py-1 transition-colors",
|
|
5246
5246
|
isActive ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
5247
5247
|
),
|
|
@@ -5254,7 +5254,7 @@ function PresentDropdown({
|
|
|
5254
5254
|
{
|
|
5255
5255
|
type: "button",
|
|
5256
5256
|
onClick: () => setOpen((prev) => !prev),
|
|
5257
|
-
className:
|
|
5257
|
+
className: chunkP2COO2QO_js.cn(
|
|
5258
5258
|
"inline-flex items-center px-1 transition-colors border-l border-border",
|
|
5259
5259
|
open ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
5260
5260
|
),
|
|
@@ -5382,7 +5382,7 @@ function ModeSwitcher({
|
|
|
5382
5382
|
onToggleSubtitles,
|
|
5383
5383
|
showSubtitles
|
|
5384
5384
|
}) {
|
|
5385
|
-
const { t } =
|
|
5385
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5386
5386
|
if (mode === "master") {
|
|
5387
5387
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1.5", children: [
|
|
5388
5388
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded-sm bg-amber-600/90 text-[10px] text-amber-50", children: t("pptx.mode.masterView") }),
|
|
@@ -5420,7 +5420,7 @@ var EXPORT_CARD_OF = {
|
|
|
5420
5420
|
copyImg: "copyImage"
|
|
5421
5421
|
};
|
|
5422
5422
|
function OverflowMenu(p) {
|
|
5423
|
-
const { t } =
|
|
5423
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5424
5424
|
const customization = useViewerCustomizationContext();
|
|
5425
5425
|
const offered = (k) => {
|
|
5426
5426
|
const card = EXPORT_CARD_OF[k];
|
|
@@ -5457,7 +5457,7 @@ function OverflowMenu(p) {
|
|
|
5457
5457
|
{
|
|
5458
5458
|
type: "button",
|
|
5459
5459
|
onClick: () => p.onSetOverflowMenuOpen(!p.isOverflowMenuOpen),
|
|
5460
|
-
className:
|
|
5460
|
+
className: chunkP2COO2QO_js.cn(
|
|
5461
5461
|
"p-1.5 rounded transition-colors",
|
|
5462
5462
|
p.isOverflowMenuOpen ? "bg-primary/80 text-white" : "bg-muted hover:bg-accent"
|
|
5463
5463
|
),
|
|
@@ -5495,7 +5495,7 @@ function OverflowMenu(p) {
|
|
|
5495
5495
|
] });
|
|
5496
5496
|
}
|
|
5497
5497
|
function ToolbarPrimaryRow(p) {
|
|
5498
|
-
const { t } =
|
|
5498
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5499
5499
|
const {
|
|
5500
5500
|
mode,
|
|
5501
5501
|
canEdit,
|
|
@@ -5504,7 +5504,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5504
5504
|
onToggleSidebar,
|
|
5505
5505
|
onToggleInspector
|
|
5506
5506
|
} = p;
|
|
5507
|
-
const collab =
|
|
5507
|
+
const collab = chunkF5UOILTY_js.useCollaboration();
|
|
5508
5508
|
const customization = useViewerCustomizationContext();
|
|
5509
5509
|
const showSlidesToggle = pptx.isPanelVisible(customization, "slidesPane");
|
|
5510
5510
|
const showInspectorToggle = pptx.isPanelVisible(customization, "inspector");
|
|
@@ -5524,7 +5524,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5524
5524
|
{
|
|
5525
5525
|
type: "button",
|
|
5526
5526
|
onClick: onToggleSidebar,
|
|
5527
|
-
className:
|
|
5527
|
+
className: chunkP2COO2QO_js.cn(qab, !isSidebarCollapsed ? "text-foreground" : "text-muted-foreground"),
|
|
5528
5528
|
title: t("pptx.toolbar.toggleSlidesPanel"),
|
|
5529
5529
|
"aria-label": t("pptx.toolbar.toggleSlidesPanel"),
|
|
5530
5530
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelLeft, { className: ic })
|
|
@@ -5585,7 +5585,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5585
5585
|
{
|
|
5586
5586
|
type: "button",
|
|
5587
5587
|
onClick: onToggleInspector,
|
|
5588
|
-
className:
|
|
5588
|
+
className: chunkP2COO2QO_js.cn(qab, isInspectorPaneOpen ? "text-foreground" : "text-muted-foreground"),
|
|
5589
5589
|
title: t("pptx.toolbar.toggleInspector"),
|
|
5590
5590
|
"aria-label": t("pptx.toolbar.toggleInspector"),
|
|
5591
5591
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelRight, { className: ic })
|
|
@@ -5596,7 +5596,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5596
5596
|
{
|
|
5597
5597
|
type: "button",
|
|
5598
5598
|
onClick: p.onToggleAiPanel,
|
|
5599
|
-
className:
|
|
5599
|
+
className: chunkP2COO2QO_js.cn(qab, p.isAiPanelOpen ? "text-primary" : "text-muted-foreground"),
|
|
5600
5600
|
title: t("pptx.toolbar.toggleAiAssistant"),
|
|
5601
5601
|
"aria-label": t("pptx.toolbar.toggleAiAssistant"),
|
|
5602
5602
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSparkles, { className: ic })
|
|
@@ -5607,7 +5607,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5607
5607
|
{
|
|
5608
5608
|
type: "button",
|
|
5609
5609
|
onClick: p.onOpenSettings ?? p.onToggleShortcuts,
|
|
5610
|
-
className:
|
|
5610
|
+
className: chunkP2COO2QO_js.cn(qab, "text-muted-foreground"),
|
|
5611
5611
|
title: t("pptx.toolbar.settingsShortcuts"),
|
|
5612
5612
|
"aria-label": t("pptx.toolbar.settings"),
|
|
5613
5613
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSettings, { className: ics })
|
|
@@ -5651,7 +5651,7 @@ function useContextualRibbonTab(selectedElement, customization, onFallback) {
|
|
|
5651
5651
|
return { visible, active, fellBack, select: setChosen };
|
|
5652
5652
|
}
|
|
5653
5653
|
function HelpSection(p) {
|
|
5654
|
-
const { t } =
|
|
5654
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5655
5655
|
const groups = pptx.buildHelpRibbon(t, {
|
|
5656
5656
|
options: pptx.isDialogAvailable(useViewerCustomizationContext(), "options")
|
|
5657
5657
|
});
|
|
@@ -5671,7 +5671,7 @@ function HelpSection(p) {
|
|
|
5671
5671
|
return /* @__PURE__ */ jsxRuntime.jsx(WebRibbonSection, { groups, onCommand: request });
|
|
5672
5672
|
}
|
|
5673
5673
|
function RecordSection(props) {
|
|
5674
|
-
const { t } =
|
|
5674
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5675
5675
|
const request = (id) => {
|
|
5676
5676
|
if (id === "record.record.fromBeginning") {
|
|
5677
5677
|
props.onRecordFromBeginning();
|
|
@@ -5804,9 +5804,9 @@ function ToolbarLateTabs({
|
|
|
5804
5804
|
}
|
|
5805
5805
|
function Toolbar(p) {
|
|
5806
5806
|
const { mode, isNarrowViewport, isCompactToolbarOpen, toolbarSection, onSetToolbarSection } = p;
|
|
5807
|
-
const { t } =
|
|
5808
|
-
const { isTabVisible } =
|
|
5809
|
-
const viewerOptions =
|
|
5807
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
5808
|
+
const { isTabVisible } = chunkF5UOILTY_js.useToolbarVisibility(p.hiddenActions);
|
|
5809
|
+
const viewerOptions = chunkF5UOILTY_js.useViewerOptionsContext();
|
|
5810
5810
|
const customization = useViewerCustomizationContext();
|
|
5811
5811
|
const belowInput = React108.useMemo(
|
|
5812
5812
|
() => ({
|
|
@@ -5904,7 +5904,7 @@ function Toolbar(p) {
|
|
|
5904
5904
|
{
|
|
5905
5905
|
type: "button",
|
|
5906
5906
|
onClick: p.onToggleCompactToolbar,
|
|
5907
|
-
className:
|
|
5907
|
+
className: chunkP2COO2QO_js.cn(
|
|
5908
5908
|
"px-2 py-1 rounded text-[11px] transition-colors mr-1",
|
|
5909
5909
|
isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
|
|
5910
5910
|
),
|
|
@@ -5930,7 +5930,7 @@ function Toolbar(p) {
|
|
|
5930
5930
|
{
|
|
5931
5931
|
ref: attachOverflow,
|
|
5932
5932
|
"data-pptx-chrome": "ribbon-content",
|
|
5933
|
-
className:
|
|
5933
|
+
className: chunkP2COO2QO_js.cn(
|
|
5934
5934
|
// Plain controls stay compact; labelled RibbonGroups opt into stretching.
|
|
5935
5935
|
// `RibbonGroupScope` wraps controls in a `display: contents` div, so its
|
|
5936
5936
|
// children are this row's flex items too and must not shrink (a shrunk
|
|
@@ -6120,7 +6120,7 @@ function Toolbar(p) {
|
|
|
6120
6120
|
);
|
|
6121
6121
|
}
|
|
6122
6122
|
function CanvasGuides({ guides, onDeleteGuide, onStartGuideDrag }) {
|
|
6123
|
-
const { t } =
|
|
6123
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
6124
6124
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: guides.map((guide) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6125
6125
|
"div",
|
|
6126
6126
|
{
|
|
@@ -6332,7 +6332,7 @@ function ChartQuickActionsOverlay({
|
|
|
6332
6332
|
scale: stageScale = 1,
|
|
6333
6333
|
onUpdateElement
|
|
6334
6334
|
}) {
|
|
6335
|
-
const { t } =
|
|
6335
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
6336
6336
|
const [open, setOpen] = React108.useState(null);
|
|
6337
6337
|
const hostRef = React108.useRef(null);
|
|
6338
6338
|
React108.useEffect(() => {
|
|
@@ -6503,7 +6503,7 @@ function CommentMarkersOverlay({
|
|
|
6503
6503
|
canvasSize,
|
|
6504
6504
|
onCommentMarkerClick
|
|
6505
6505
|
}) {
|
|
6506
|
-
const { t } =
|
|
6506
|
+
const { t } = chunkP2COO2QO_js.useTranslation(), half = pptx.COMMENT_MARKER_SIZE / 2, markers = pptx.buildCommentMarkers(
|
|
6507
6507
|
comments,
|
|
6508
6508
|
canvasSize.width,
|
|
6509
6509
|
canvasSize.height,
|
|
@@ -6547,7 +6547,7 @@ function ConnectorEndpointOverlay({
|
|
|
6547
6547
|
canvasStageRef,
|
|
6548
6548
|
onUpdateElement
|
|
6549
6549
|
}) {
|
|
6550
|
-
const { t } =
|
|
6550
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
6551
6551
|
const [drag, setDrag] = React108.useState(null);
|
|
6552
6552
|
const candidates = React108.useMemo(
|
|
6553
6553
|
() => pptx.collectConnectorSiteCandidates(elements.filter((el) => el.id !== connector.id)),
|
|
@@ -6783,7 +6783,7 @@ function DrawingOverlaySvg({
|
|
|
6783
6783
|
onPointerDown,
|
|
6784
6784
|
onPointerMove,
|
|
6785
6785
|
onPointerUp,
|
|
6786
|
-
children: isStrokeActive && liveStrokeView ?
|
|
6786
|
+
children: isStrokeActive && liveStrokeView ? chunkF5UOILTY_js.renderStrokeView(liveStrokeView, true, void 0, "ink-live-preview") : isStrokeActive && liveStrokeD && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6787
6787
|
"path",
|
|
6788
6788
|
{
|
|
6789
6789
|
d: liveStrokeD,
|
|
@@ -6798,7 +6798,7 @@ function DrawingOverlaySvg({
|
|
|
6798
6798
|
}
|
|
6799
6799
|
);
|
|
6800
6800
|
}
|
|
6801
|
-
function GridOverlay({ canvasSize, gridSpacingPx =
|
|
6801
|
+
function GridOverlay({ canvasSize, gridSpacingPx = chunkP2COO2QO_js.GRID_SIZE, visible }) {
|
|
6802
6802
|
const spacing = Math.max(gridSpacingPx, 2);
|
|
6803
6803
|
const patternId = React108.useMemo(() => `grid-dot-pattern-${Math.random().toString(36).slice(2, 8)}`, []);
|
|
6804
6804
|
if (!visible) {
|
|
@@ -6826,7 +6826,7 @@ function MotionPathOverlay({
|
|
|
6826
6826
|
canEdit,
|
|
6827
6827
|
onChangePath
|
|
6828
6828
|
}) {
|
|
6829
|
-
const { t } =
|
|
6829
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
6830
6830
|
const dragRef = React108.useRef(null);
|
|
6831
6831
|
const frame = {
|
|
6832
6832
|
originX: element.x + element.width / 2,
|
|
@@ -6940,7 +6940,7 @@ function MotionPathOverlay({
|
|
|
6940
6940
|
);
|
|
6941
6941
|
}
|
|
6942
6942
|
function EditPointsMenu({ menu, onRun }) {
|
|
6943
|
-
const { t } =
|
|
6943
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
6944
6944
|
const stop2 = (event) => event.stopPropagation();
|
|
6945
6945
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6946
6946
|
"div",
|
|
@@ -6986,7 +6986,7 @@ function EditPointsOverlay({
|
|
|
6986
6986
|
onCommit,
|
|
6987
6987
|
onExit
|
|
6988
6988
|
}) {
|
|
6989
|
-
const { t } =
|
|
6989
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
6990
6990
|
const [, rerender] = React108.useReducer((n) => n + 1, 0);
|
|
6991
6991
|
const svgRef = React108.useRef(null);
|
|
6992
6992
|
const latest = React108.useRef({ onCommit, onExit });
|
|
@@ -7142,7 +7142,7 @@ function FreeformToolOverlay({
|
|
|
7142
7142
|
onCommit,
|
|
7143
7143
|
onCancel
|
|
7144
7144
|
}) {
|
|
7145
|
-
const { t } =
|
|
7145
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
7146
7146
|
const [, rerender] = React108.useReducer((n) => n + 1, 0);
|
|
7147
7147
|
const svgRef = React108.useRef(null);
|
|
7148
7148
|
const latest = React108.useRef({ onCommit, onCancel });
|
|
@@ -7285,7 +7285,7 @@ function PictureCropOverlay({
|
|
|
7285
7285
|
onUpdate,
|
|
7286
7286
|
onContextMenu
|
|
7287
7287
|
}) {
|
|
7288
|
-
const { t } =
|
|
7288
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
7289
7289
|
const overlay = pptx.buildCropOverlay(element, scale);
|
|
7290
7290
|
const dragRef = React108.useRef(null);
|
|
7291
7291
|
const latest = React108.useRef({ scale, onUpdate });
|
|
@@ -7333,7 +7333,7 @@ function PictureCropOverlay({
|
|
|
7333
7333
|
};
|
|
7334
7334
|
};
|
|
7335
7335
|
const { ghost, frame, handles } = overlay;
|
|
7336
|
-
const src =
|
|
7336
|
+
const src = chunkF5UOILTY_js.imgSrc(element);
|
|
7337
7337
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7338
7338
|
"div",
|
|
7339
7339
|
{
|
|
@@ -7509,7 +7509,7 @@ function HorizontalRulerView({ ticks, widthPx, highlight }) {
|
|
|
7509
7509
|
}
|
|
7510
7510
|
);
|
|
7511
7511
|
}
|
|
7512
|
-
var HorizontalRuler = /* @__PURE__ */
|
|
7512
|
+
var HorizontalRuler = /* @__PURE__ */ chunkF5UOILTY_js.withDisplayName(
|
|
7513
7513
|
/* @__PURE__ */ React108__default.default.memo(HorizontalRulerView),
|
|
7514
7514
|
"HorizontalRuler"
|
|
7515
7515
|
);
|
|
@@ -7583,7 +7583,7 @@ function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
|
7583
7583
|
}
|
|
7584
7584
|
);
|
|
7585
7585
|
}
|
|
7586
|
-
var VerticalRuler = /* @__PURE__ */
|
|
7586
|
+
var VerticalRuler = /* @__PURE__ */ chunkF5UOILTY_js.withDisplayName(
|
|
7587
7587
|
/* @__PURE__ */ React108__default.default.memo(VerticalRulerView),
|
|
7588
7588
|
"VerticalRuler"
|
|
7589
7589
|
);
|
|
@@ -7750,10 +7750,10 @@ function SelectionHandleOverlay({
|
|
|
7750
7750
|
position: "absolute",
|
|
7751
7751
|
left: element.x,
|
|
7752
7752
|
top: element.y,
|
|
7753
|
-
width: Math.max(element.width,
|
|
7754
|
-
height: Math.max(element.height,
|
|
7755
|
-
["--pptx-selection-width"]: `${Math.max(element.width,
|
|
7756
|
-
["--pptx-selection-height"]: `${Math.max(element.height,
|
|
7753
|
+
width: Math.max(element.width, chunkP2COO2QO_js.MIN_ELEMENT_SIZE),
|
|
7754
|
+
height: Math.max(element.height, chunkP2COO2QO_js.MIN_ELEMENT_SIZE),
|
|
7755
|
+
["--pptx-selection-width"]: `${Math.max(element.width, chunkP2COO2QO_js.MIN_ELEMENT_SIZE)}px`,
|
|
7756
|
+
["--pptx-selection-height"]: `${Math.max(element.height, chunkP2COO2QO_js.MIN_ELEMENT_SIZE)}px`,
|
|
7757
7757
|
// Every slide element carries an explicit numeric `zIndex` (see
|
|
7758
7758
|
// `getContainerStyle`), so a sibling with no z-index at all paints
|
|
7759
7759
|
// at the CSS "z-index: 0" level regardless of DOM order: any
|
|
@@ -7765,7 +7765,7 @@ function SelectionHandleOverlay({
|
|
|
7765
7765
|
// (marquee z-50, connector overlay z-55/56) to match, well clear of
|
|
7766
7766
|
// any realistic per-slide element count.
|
|
7767
7767
|
zIndex: 58,
|
|
7768
|
-
transform:
|
|
7768
|
+
transform: chunkP2COO2QO_js.getElementTransform(element),
|
|
7769
7769
|
transformOrigin: "center",
|
|
7770
7770
|
// Transparent everywhere a handle button is not, so a click that
|
|
7771
7771
|
// misses every handle still reaches the shape (or whatever is
|
|
@@ -7777,14 +7777,14 @@ function SelectionHandleOverlay({
|
|
|
7777
7777
|
onDoubleClick: (e) => onDoubleClick(element.id, e),
|
|
7778
7778
|
onContextMenu: (e) => onContextMenu(element.id, e),
|
|
7779
7779
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7780
|
-
|
|
7780
|
+
chunkF5UOILTY_js.ResizeHandles,
|
|
7781
7781
|
{
|
|
7782
7782
|
elementId: element.id,
|
|
7783
7783
|
adjustmentHandles,
|
|
7784
7784
|
onResizePointerDown,
|
|
7785
7785
|
onAdjustmentPointerDown,
|
|
7786
7786
|
rotation: element.rotation,
|
|
7787
|
-
nonRotationTransform:
|
|
7787
|
+
nonRotationTransform: chunkP2COO2QO_js.getElementTransformWithoutRotation(element),
|
|
7788
7788
|
onRotate: allow.rotatable ? onRotate : void 0,
|
|
7789
7789
|
forcePointerEvents: true
|
|
7790
7790
|
}
|
|
@@ -8488,7 +8488,7 @@ function SlideCanvas(props) {
|
|
|
8488
8488
|
props.registerInlineEditReader
|
|
8489
8489
|
]
|
|
8490
8490
|
);
|
|
8491
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8491
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkF5UOILTY_js.InlineCollaborationContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(SlideCanvasContent, { ...props }) });
|
|
8492
8492
|
}
|
|
8493
8493
|
function SlideCanvasContent({
|
|
8494
8494
|
imagePaste,
|
|
@@ -8761,7 +8761,7 @@ function SlideCanvasContent({
|
|
|
8761
8761
|
onPointerMove: handleStagePointerMove,
|
|
8762
8762
|
onPointerUp: handleStagePointerUp,
|
|
8763
8763
|
children: [
|
|
8764
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8764
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkF5UOILTY_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
8765
8765
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
8766
8766
|
/* @__PURE__ */ jsxRuntime.jsx(GridOverlay, { canvasSize, gridSpacingPx, visible: showGrid }),
|
|
8767
8767
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8773,7 +8773,7 @@ function SlideCanvasContent({
|
|
|
8773
8773
|
}
|
|
8774
8774
|
),
|
|
8775
8775
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8776
|
-
|
|
8776
|
+
chunkF5UOILTY_js.ElementRenderer,
|
|
8777
8777
|
{
|
|
8778
8778
|
element,
|
|
8779
8779
|
activeSlide,
|
|
@@ -8796,7 +8796,7 @@ function SlideCanvasContent({
|
|
|
8796
8796
|
),
|
|
8797
8797
|
renderInk: false,
|
|
8798
8798
|
renderGroups: true,
|
|
8799
|
-
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ?
|
|
8799
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? chunkP2COO2QO_js.getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
8800
8800
|
onResizePointerDown: stableResizePointerDown,
|
|
8801
8801
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
8802
8802
|
onRotate: stableRotate,
|
|
@@ -8818,7 +8818,7 @@ function SlideCanvasContent({
|
|
|
8818
8818
|
`tpl-${element.id}`
|
|
8819
8819
|
)),
|
|
8820
8820
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8821
|
-
|
|
8821
|
+
chunkF5UOILTY_js.ElementRenderer,
|
|
8822
8822
|
{
|
|
8823
8823
|
element,
|
|
8824
8824
|
activeSlide,
|
|
@@ -8841,7 +8841,7 @@ function SlideCanvasContent({
|
|
|
8841
8841
|
),
|
|
8842
8842
|
renderInk: true,
|
|
8843
8843
|
renderGroups: true,
|
|
8844
|
-
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ?
|
|
8844
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? chunkP2COO2QO_js.getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
8845
8845
|
onResizePointerDown: stableResizePointerDown,
|
|
8846
8846
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
8847
8847
|
onRotate: stableRotate,
|
|
@@ -8885,7 +8885,7 @@ function SlideCanvasContent({
|
|
|
8885
8885
|
editingMember && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8886
8886
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `[data-element-id="${cssAttr(editingMember.parentId)}"] [data-element-id="${cssAttr(editingMember.member.id)}"]{visibility:hidden}` }),
|
|
8887
8887
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8888
|
-
|
|
8888
|
+
chunkF5UOILTY_js.ElementRenderer,
|
|
8889
8889
|
{
|
|
8890
8890
|
element: editingMember.member,
|
|
8891
8891
|
activeSlide,
|
|
@@ -8920,11 +8920,11 @@ function SlideCanvasContent({
|
|
|
8920
8920
|
`group-member-edit-${editingMember.member.id}`
|
|
8921
8921
|
)
|
|
8922
8922
|
] }),
|
|
8923
|
-
selectedElement && selectedElement.id !== cropElement?.id && pptx.shouldShowElementHandles(isEditableCanvas, true, selectedElementIdSet.size) && !
|
|
8923
|
+
selectedElement && selectedElement.id !== cropElement?.id && pptx.shouldShowElementHandles(isEditableCanvas, true, selectedElementIdSet.size) && !chunkP2COO2QO_js.isConnectorOrLineElement(selectedElement) && outlineAuthoring?.editPointsElementId !== selectedElement.id && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8924
8924
|
SelectionHandleOverlay,
|
|
8925
8925
|
{
|
|
8926
8926
|
element: selectedElement,
|
|
8927
|
-
adjustmentHandles:
|
|
8927
|
+
adjustmentHandles: chunkP2COO2QO_js.getShapeAdjustmentHandleDescriptors(selectedElement),
|
|
8928
8928
|
onResizePointerDown: stableResizePointerDown,
|
|
8929
8929
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
8930
8930
|
onRotate: stableRotate,
|
|
@@ -9030,15 +9030,15 @@ function SlideCanvasContent({
|
|
|
9030
9030
|
}
|
|
9031
9031
|
);
|
|
9032
9032
|
}
|
|
9033
|
-
function LoadingState({ className }) {
|
|
9034
|
-
const { t } =
|
|
9033
|
+
function LoadingState({ className, fontProgress }) {
|
|
9034
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9035
9035
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9036
9036
|
"div",
|
|
9037
9037
|
{
|
|
9038
9038
|
role: "status",
|
|
9039
9039
|
"aria-live": "polite",
|
|
9040
9040
|
"aria-atomic": "true",
|
|
9041
|
-
className:
|
|
9041
|
+
className: chunkP2COO2QO_js.cn(
|
|
9042
9042
|
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
9043
9043
|
className
|
|
9044
9044
|
),
|
|
@@ -9050,7 +9050,10 @@ function LoadingState({ className }) {
|
|
|
9050
9050
|
"aria-hidden": "true"
|
|
9051
9051
|
}
|
|
9052
9052
|
),
|
|
9053
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("pptx.viewer.
|
|
9053
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: fontProgress ? t("pptx.viewer.loadingFonts", {
|
|
9054
|
+
loaded: fontProgress.loaded,
|
|
9055
|
+
total: fontProgress.total
|
|
9056
|
+
}) : t("pptx.viewer.loading") })
|
|
9054
9057
|
] })
|
|
9055
9058
|
}
|
|
9056
9059
|
);
|
|
@@ -9061,7 +9064,7 @@ function ErrorState({ className, error }) {
|
|
|
9061
9064
|
{
|
|
9062
9065
|
role: "alert",
|
|
9063
9066
|
"aria-live": "assertive",
|
|
9064
|
-
className:
|
|
9067
|
+
className: chunkP2COO2QO_js.cn(
|
|
9065
9068
|
"h-full w-full flex items-center justify-center p-6 text-center text-red-400",
|
|
9066
9069
|
className
|
|
9067
9070
|
),
|
|
@@ -9070,7 +9073,7 @@ function ErrorState({ className, error }) {
|
|
|
9070
9073
|
);
|
|
9071
9074
|
}
|
|
9072
9075
|
function ShortcutPanel({ isOpen, onClose }) {
|
|
9073
|
-
const { t } =
|
|
9076
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9074
9077
|
if (!isOpen) {
|
|
9075
9078
|
return null;
|
|
9076
9079
|
}
|
|
@@ -9092,7 +9095,7 @@ function ShortcutPanel({ isOpen, onClose }) {
|
|
|
9092
9095
|
}
|
|
9093
9096
|
)
|
|
9094
9097
|
] }),
|
|
9095
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children:
|
|
9098
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children: chunkP2COO2QO_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9096
9099
|
"div",
|
|
9097
9100
|
{
|
|
9098
9101
|
className: "flex items-center justify-between gap-3 rounded bg-muted/80 px-2 py-1.5",
|
|
@@ -9114,7 +9117,7 @@ function AccessibilityPanel({
|
|
|
9114
9117
|
reducedMotion,
|
|
9115
9118
|
onToggleReducedMotion
|
|
9116
9119
|
}) {
|
|
9117
|
-
const { t } =
|
|
9120
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9118
9121
|
if (!isOpen) {
|
|
9119
9122
|
return null;
|
|
9120
9123
|
}
|
|
@@ -9152,14 +9155,14 @@ function AccessibilityPanel({
|
|
|
9152
9155
|
"aria-label": t("pptx.accessibility.reduceMotion"),
|
|
9153
9156
|
"aria-checked": reducedMotion ?? false,
|
|
9154
9157
|
onClick: onToggleReducedMotion,
|
|
9155
|
-
className:
|
|
9158
|
+
className: chunkP2COO2QO_js.cn(
|
|
9156
9159
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
9157
9160
|
reducedMotion ? "bg-primary" : "bg-muted-foreground/30"
|
|
9158
9161
|
),
|
|
9159
9162
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9160
9163
|
"span",
|
|
9161
9164
|
{
|
|
9162
|
-
className:
|
|
9165
|
+
className: chunkP2COO2QO_js.cn(
|
|
9163
9166
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
9164
9167
|
reducedMotion ? "translate-x-4" : "translate-x-0.5"
|
|
9165
9168
|
)
|
|
@@ -9178,7 +9181,7 @@ function AccessibilityPanel({
|
|
|
9178
9181
|
"div",
|
|
9179
9182
|
{
|
|
9180
9183
|
role: "listitem",
|
|
9181
|
-
className:
|
|
9184
|
+
className: chunkP2COO2QO_js.cn(
|
|
9182
9185
|
"flex items-start gap-2 rounded px-2 py-1.5 text-xs",
|
|
9183
9186
|
/* Severity-based background and text colouring */
|
|
9184
9187
|
issue.severity === "error" ? "bg-red-900/30 text-red-300" : issue.severity === "warning" ? "bg-amber-900/30 text-amber-300" : "bg-muted/50 text-muted-foreground"
|
|
@@ -9206,7 +9209,7 @@ function ExportProgressModal({
|
|
|
9206
9209
|
statusMessage,
|
|
9207
9210
|
onCancel
|
|
9208
9211
|
}) {
|
|
9209
|
-
const { t } =
|
|
9212
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9210
9213
|
const ref = useWebControl(
|
|
9211
9214
|
{ open: isOpen, title, progress, status: statusMessage, translate: t },
|
|
9212
9215
|
{ "export-cancel": () => onCancel() }
|
|
@@ -9214,7 +9217,7 @@ function ExportProgressModal({
|
|
|
9214
9217
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-export-progress", { ref });
|
|
9215
9218
|
}
|
|
9216
9219
|
function StatusBar(p) {
|
|
9217
|
-
const { t } =
|
|
9220
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9218
9221
|
const ref = React108.useRef(null);
|
|
9219
9222
|
React108.useEffect(() => {
|
|
9220
9223
|
const host = ref.current;
|
|
@@ -9295,7 +9298,7 @@ function ResizeHandle({
|
|
|
9295
9298
|
{
|
|
9296
9299
|
role: "separator",
|
|
9297
9300
|
"aria-orientation": direction,
|
|
9298
|
-
className:
|
|
9301
|
+
className: chunkP2COO2QO_js.cn(
|
|
9299
9302
|
// Outer container: generous hit area for easy clicking.
|
|
9300
9303
|
// The visible indicator is rendered via the inner pseudo-element (::after).
|
|
9301
9304
|
"relative flex-shrink-0 z-20 group",
|
|
@@ -9306,7 +9309,7 @@ function ResizeHandle({
|
|
|
9306
9309
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9307
9310
|
"div",
|
|
9308
9311
|
{
|
|
9309
|
-
className:
|
|
9312
|
+
className: chunkP2COO2QO_js.cn(
|
|
9310
9313
|
"absolute transition-colors",
|
|
9311
9314
|
direction === "horizontal" ? "top-0 bottom-0 left-1/2 -translate-x-1/2 w-0.5 group-hover:w-1 group-hover:bg-primary/40 group-active:w-1 group-active:bg-primary/60" : "left-0 right-0 top-1/2 -translate-y-1/2 h-0.5 group-hover:h-1 group-hover:bg-primary/40 group-active:h-1 group-active:bg-primary/60"
|
|
9312
9315
|
)
|
|
@@ -9395,10 +9398,10 @@ function contextMenuHandlers(props, shapeFormat = null) {
|
|
|
9395
9398
|
}
|
|
9396
9399
|
function ContextMenu(props) {
|
|
9397
9400
|
const { contextMenuState, mode, onClose } = props;
|
|
9398
|
-
const { t } =
|
|
9401
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9399
9402
|
const customization = useViewerCustomizationContext();
|
|
9400
9403
|
const shapeFormat = useShapeFormatContext();
|
|
9401
|
-
const chartFormat =
|
|
9404
|
+
const chartFormat = chunkF5UOILTY_js.useChartFormatContext();
|
|
9402
9405
|
const open = Boolean(contextMenuState) && mode === "edit";
|
|
9403
9406
|
const handlers = {
|
|
9404
9407
|
...contextMenuHandlers(props, shapeFormat),
|
|
@@ -9474,7 +9477,7 @@ function canvasContextMenuHandlers(props) {
|
|
|
9474
9477
|
}
|
|
9475
9478
|
function CanvasContextMenu(props) {
|
|
9476
9479
|
const { canvasContextMenuState, mode, onClose } = props;
|
|
9477
|
-
const { t } =
|
|
9480
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9478
9481
|
const customization = useViewerCustomizationContext();
|
|
9479
9482
|
const open = Boolean(canvasContextMenuState) && mode === "edit";
|
|
9480
9483
|
const handlers = canvasContextMenuHandlers(props);
|
|
@@ -9537,7 +9540,7 @@ function FindReplacePanel({
|
|
|
9537
9540
|
onReplaceAll,
|
|
9538
9541
|
onClose
|
|
9539
9542
|
}) {
|
|
9540
|
-
const { t } =
|
|
9543
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9541
9544
|
const searchInputRef = React108.useRef(null);
|
|
9542
9545
|
React108.useEffect(() => {
|
|
9543
9546
|
searchInputRef.current?.focus();
|
|
@@ -9728,7 +9731,7 @@ function HandoutMasterPanel({
|
|
|
9728
9731
|
onSlidesPerPageChange,
|
|
9729
9732
|
onBackgroundChange
|
|
9730
9733
|
}) {
|
|
9731
|
-
const { t } =
|
|
9734
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9732
9735
|
if (!handoutMaster) {
|
|
9733
9736
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-4 text-center text-xs text-muted-foreground", children: t("pptx.master.noHandoutMaster") });
|
|
9734
9737
|
}
|
|
@@ -9740,7 +9743,7 @@ function HandoutMasterPanel({
|
|
|
9740
9743
|
{
|
|
9741
9744
|
type: "button",
|
|
9742
9745
|
"aria-pressed": slidesPerPage === count,
|
|
9743
|
-
className:
|
|
9746
|
+
className: chunkP2COO2QO_js.cn(
|
|
9744
9747
|
"px-2 py-1.5 rounded text-[11px] font-medium transition-colors",
|
|
9745
9748
|
slidesPerPage === count ? "bg-primary text-white" : "bg-accent/50 text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
|
9746
9749
|
),
|
|
@@ -9783,7 +9786,7 @@ function NotesMasterPanel({
|
|
|
9783
9786
|
notesMaster,
|
|
9784
9787
|
onBackgroundChange
|
|
9785
9788
|
}) {
|
|
9786
|
-
const { t } =
|
|
9789
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9787
9790
|
const placeholderLabels = React108.useMemo(() => {
|
|
9788
9791
|
if (!notesMaster?.placeholders) {
|
|
9789
9792
|
return [];
|
|
@@ -9845,7 +9848,7 @@ function SlideMastersList({
|
|
|
9845
9848
|
React108.useEffect(() => {
|
|
9846
9849
|
activeRef.current?.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
9847
9850
|
}, [activeMasterIndex, activeLayoutIndex]);
|
|
9848
|
-
const { t } =
|
|
9851
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9849
9852
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9850
9853
|
slideMasters.map((master, masterIdx) => {
|
|
9851
9854
|
const isMasterActive = masterIdx === activeMasterIndex && activeLayoutIndex === null;
|
|
@@ -9858,7 +9861,7 @@ function SlideMastersList({
|
|
|
9858
9861
|
ref: isMasterActive ? activeRef : void 0,
|
|
9859
9862
|
"aria-pressed": isMasterActive,
|
|
9860
9863
|
"aria-label": master.name || t("pptx.master.master"),
|
|
9861
|
-
className:
|
|
9864
|
+
className: chunkP2COO2QO_js.cn(
|
|
9862
9865
|
"group relative block w-full cursor-pointer rounded-lg border-2 p-1 text-left transition-all",
|
|
9863
9866
|
isMasterActive ? "border-amber-500 bg-amber-500/10" : "border-border bg-background/40 hover:border-border"
|
|
9864
9867
|
),
|
|
@@ -9875,7 +9878,7 @@ function SlideMastersList({
|
|
|
9875
9878
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 px-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9876
9879
|
"span",
|
|
9877
9880
|
{
|
|
9878
|
-
className:
|
|
9881
|
+
className: chunkP2COO2QO_js.cn(
|
|
9879
9882
|
"text-[10px] font-medium",
|
|
9880
9883
|
isMasterActive ? "text-amber-400" : "text-muted-foreground"
|
|
9881
9884
|
),
|
|
@@ -9894,7 +9897,7 @@ function SlideMastersList({
|
|
|
9894
9897
|
ref: isLayoutActive ? activeRef : void 0,
|
|
9895
9898
|
"aria-pressed": isLayoutActive,
|
|
9896
9899
|
"aria-label": layout.name || t("pptx.master.layout"),
|
|
9897
|
-
className:
|
|
9900
|
+
className: chunkP2COO2QO_js.cn(
|
|
9898
9901
|
"group relative block w-full cursor-pointer rounded-md border-2 p-0.5 text-left transition-all",
|
|
9899
9902
|
isLayoutActive ? "border-primary bg-primary/10" : "border-border bg-background/40 hover:border-border"
|
|
9900
9903
|
),
|
|
@@ -9911,7 +9914,7 @@ function SlideMastersList({
|
|
|
9911
9914
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 px-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9912
9915
|
"span",
|
|
9913
9916
|
{
|
|
9914
|
-
className:
|
|
9917
|
+
className: chunkP2COO2QO_js.cn(
|
|
9915
9918
|
"text-[9px]",
|
|
9916
9919
|
isLayoutActive ? "text-primary" : "text-muted-foreground"
|
|
9917
9920
|
),
|
|
@@ -9955,7 +9958,7 @@ function MasterViewSidebar({
|
|
|
9955
9958
|
onSlidesBackgroundChange
|
|
9956
9959
|
}) {
|
|
9957
9960
|
const scrollRef = React108.useRef(null);
|
|
9958
|
-
const { t } =
|
|
9961
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
9959
9962
|
const slidesBackground = pptx.masterViewBackgroundColor(
|
|
9960
9963
|
{ slideMasters },
|
|
9961
9964
|
{ tab: "slides", masterIndex: activeMasterIndex, layoutIndex: activeLayoutIndex }
|
|
@@ -10003,7 +10006,7 @@ function MasterViewSidebar({
|
|
|
10003
10006
|
type: "button",
|
|
10004
10007
|
role: "tab",
|
|
10005
10008
|
"aria-selected": masterViewTab === tab.key,
|
|
10006
|
-
className:
|
|
10009
|
+
className: chunkP2COO2QO_js.cn(
|
|
10007
10010
|
"flex-1 px-1 py-1.5 text-[10px] font-medium transition-colors border-b-2",
|
|
10008
10011
|
masterViewTab === tab.key ? "border-amber-500 text-amber-400" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
10009
10012
|
),
|
|
@@ -10105,7 +10108,7 @@ function NotesMasterCanvas({
|
|
|
10105
10108
|
notesText,
|
|
10106
10109
|
slideNumber
|
|
10107
10110
|
}) {
|
|
10108
|
-
const { t } =
|
|
10111
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
10109
10112
|
const pageWidth = notesCanvasSize?.width ?? DEFAULT_NOTES_WIDTH;
|
|
10110
10113
|
const pageHeight = notesCanvasSize?.height ?? DEFAULT_NOTES_HEIGHT;
|
|
10111
10114
|
const scale = React108.useMemo(() => {
|
|
@@ -10365,7 +10368,7 @@ function HandoutMasterCanvas({
|
|
|
10365
10368
|
slideThumbnails,
|
|
10366
10369
|
pageNumber
|
|
10367
10370
|
}) {
|
|
10368
|
-
const { t } =
|
|
10371
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
10369
10372
|
const slideAspect = 4 / 3;
|
|
10370
10373
|
const scale = React108.useMemo(() => {
|
|
10371
10374
|
const scaleX = canvasSize.width / PAGE_WIDTH;
|
|
@@ -10506,7 +10509,7 @@ function SectionBlock({
|
|
|
10506
10509
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10507
10510
|
lu.LuChevronDown,
|
|
10508
10511
|
{
|
|
10509
|
-
className:
|
|
10512
|
+
className: chunkP2COO2QO_js.cn("h-3 w-3 transition-transform", collapsed ? "-rotate-90" : "rotate-0")
|
|
10510
10513
|
}
|
|
10511
10514
|
),
|
|
10512
10515
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-left", children: section.label }),
|
|
@@ -10550,12 +10553,12 @@ function SlideCardImpl({
|
|
|
10550
10553
|
onDragLeave,
|
|
10551
10554
|
onDrop
|
|
10552
10555
|
}) {
|
|
10553
|
-
const { t } =
|
|
10556
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
10554
10557
|
const cue = pptx.hiddenSlideCue(slide.hidden, "sorter", index);
|
|
10555
10558
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10556
10559
|
"div",
|
|
10557
10560
|
{
|
|
10558
|
-
className:
|
|
10561
|
+
className: chunkP2COO2QO_js.cn(
|
|
10559
10562
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
10560
10563
|
isDragTarget ? "border-primary bg-primary/20" : isSelected ? "border-primary bg-primary/10 ring-1 ring-primary/50" : isActive ? "border-primary/50 bg-primary/5" : "border-border bg-background/50 hover:border-border",
|
|
10561
10564
|
slide.hidden && "opacity-40"
|
|
@@ -10578,7 +10581,7 @@ function SlideCardImpl({
|
|
|
10578
10581
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10579
10582
|
"span",
|
|
10580
10583
|
{
|
|
10581
|
-
className:
|
|
10584
|
+
className: chunkP2COO2QO_js.cn(
|
|
10582
10585
|
"text-[11px] font-medium px-0.5",
|
|
10583
10586
|
isSelected ? "text-primary" : isActive ? "text-primary/70" : "text-muted-foreground"
|
|
10584
10587
|
),
|
|
@@ -10656,7 +10659,7 @@ function SorterContextMenu({
|
|
|
10656
10659
|
onToggleHide,
|
|
10657
10660
|
onClose
|
|
10658
10661
|
}) {
|
|
10659
|
-
const { t } =
|
|
10662
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
10660
10663
|
const menuX = Math.max(8, Math.min(x, window.innerWidth - 220));
|
|
10661
10664
|
const menuY = Math.max(8, Math.min(y, window.innerHeight - 300));
|
|
10662
10665
|
const entries = pptx.buildSlideSorterContextMenuEntries({
|
|
@@ -11011,7 +11014,7 @@ function SlideSorterOverlay({
|
|
|
11011
11014
|
onToggleHideSlides,
|
|
11012
11015
|
onClose
|
|
11013
11016
|
}) {
|
|
11014
|
-
const { t } =
|
|
11017
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
11015
11018
|
const state = useSlideSorterState({
|
|
11016
11019
|
slides,
|
|
11017
11020
|
templateElementsBySlideId,
|
|
@@ -11257,7 +11260,7 @@ function OutlineViewOverlay({
|
|
|
11257
11260
|
bumpHistory,
|
|
11258
11261
|
onClose
|
|
11259
11262
|
}) {
|
|
11260
|
-
const { t } =
|
|
11263
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
11261
11264
|
const { rows, containerRef, run, onRowKeyDown } = useOutlineView({
|
|
11262
11265
|
slides,
|
|
11263
11266
|
canvasSize,
|
|
@@ -11348,7 +11351,7 @@ function ReadingViewStage({
|
|
|
11348
11351
|
"div",
|
|
11349
11352
|
{
|
|
11350
11353
|
className: "absolute inset-0",
|
|
11351
|
-
style: { backgroundColor:
|
|
11354
|
+
style: { backgroundColor: chunkP2COO2QO_js.normalizeHexColor(slide.backgroundColor, "#ffffff") }
|
|
11352
11355
|
}
|
|
11353
11356
|
),
|
|
11354
11357
|
slide.backgroundImage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11367,7 +11370,7 @@ function ReadingViewStage({
|
|
|
11367
11370
|
className: "absolute left-0 top-0 origin-top-left",
|
|
11368
11371
|
style: { width, height, transform: `scale(${scale})`, ...pptx.deviceStrokeStageStyle(scale) },
|
|
11369
11372
|
children: elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11370
|
-
|
|
11373
|
+
chunkF5UOILTY_js.StaticElementRenderer,
|
|
11371
11374
|
{
|
|
11372
11375
|
element,
|
|
11373
11376
|
activeSlide: slide,
|
|
@@ -11448,7 +11451,7 @@ function ReadingViewOverlay({
|
|
|
11448
11451
|
activeSlideIndex,
|
|
11449
11452
|
onExit
|
|
11450
11453
|
}) {
|
|
11451
|
-
const { t } =
|
|
11454
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
11452
11455
|
const { state, viewportRef, scale, run } = useReadingView({
|
|
11453
11456
|
slideCount: slides.length,
|
|
11454
11457
|
canvasSize,
|
|
@@ -11579,7 +11582,7 @@ function renderRichNotesSegments(segments) {
|
|
|
11579
11582
|
if (segment.style.fontFamily) {
|
|
11580
11583
|
style.fontFamily = segment.style.fontFamily;
|
|
11581
11584
|
}
|
|
11582
|
-
if (segment.style.hyperlink &&
|
|
11585
|
+
if (segment.style.hyperlink && chunkP2COO2QO_js.isUrlSafe(segment.style.hyperlink)) {
|
|
11583
11586
|
const safeHref = segment.style.hyperlink;
|
|
11584
11587
|
style.color = "#4a9eff";
|
|
11585
11588
|
style.textDecoration = "underline";
|
|
@@ -11592,7 +11595,7 @@ function renderRichNotesSegments(segments) {
|
|
|
11592
11595
|
style,
|
|
11593
11596
|
onClick: (e) => {
|
|
11594
11597
|
e.preventDefault();
|
|
11595
|
-
|
|
11598
|
+
chunkP2COO2QO_js.safeOpenUrl(safeHref);
|
|
11596
11599
|
},
|
|
11597
11600
|
children: segment.text
|
|
11598
11601
|
},
|
|
@@ -11616,7 +11619,7 @@ function NotesPrintDialog({
|
|
|
11616
11619
|
onClose,
|
|
11617
11620
|
notesStyle
|
|
11618
11621
|
}) {
|
|
11619
|
-
const { t } =
|
|
11622
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
11620
11623
|
const printFrameRef = React108.useRef(null);
|
|
11621
11624
|
const handlePrint = React108.useCallback(() => {
|
|
11622
11625
|
const iframe = printFrameRef.current;
|
|
@@ -11674,7 +11677,7 @@ function NotesPrintDialog({
|
|
|
11674
11677
|
] }) });
|
|
11675
11678
|
}
|
|
11676
11679
|
function NotesToolbar(p) {
|
|
11677
|
-
const { t } =
|
|
11680
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
11678
11681
|
const ref = React108.useRef(null);
|
|
11679
11682
|
React108.useEffect(() => {
|
|
11680
11683
|
const host = ref.current;
|
|
@@ -11941,7 +11944,7 @@ function useSlideNotes({
|
|
|
11941
11944
|
const href = target.getAttribute("data-hyperlink") || target.getAttribute("href");
|
|
11942
11945
|
if (href && (e.ctrlKey || e.metaKey)) {
|
|
11943
11946
|
e.preventDefault();
|
|
11944
|
-
|
|
11947
|
+
chunkP2COO2QO_js.safeOpenUrl(href);
|
|
11945
11948
|
}
|
|
11946
11949
|
}, []);
|
|
11947
11950
|
return {
|
|
@@ -11978,7 +11981,7 @@ function SlideNotesPanel({
|
|
|
11978
11981
|
notesStyle,
|
|
11979
11982
|
onHeightChange
|
|
11980
11983
|
}) {
|
|
11981
|
-
const { t } =
|
|
11984
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
11982
11985
|
const rootRef = React108__default.default.useRef(null);
|
|
11983
11986
|
React108__default.default.useEffect(() => {
|
|
11984
11987
|
const el = rootRef.current;
|
|
@@ -12022,7 +12025,7 @@ function SlideNotesPanel({
|
|
|
12022
12025
|
});
|
|
12023
12026
|
const hasNotes = draft.trim().length > 0;
|
|
12024
12027
|
const slideLabel = activeSlide ? t("pptx.notes.slideN", { n: activeSlide.slideNumber }) : t("pptx.notes.noSlide");
|
|
12025
|
-
const { dragY, handlers: dragHandlers } =
|
|
12028
|
+
const { dragY, handlers: dragHandlers } = chunkF5UOILTY_js.useSheetDismissDrag(onToggle);
|
|
12026
12029
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12027
12030
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12028
12031
|
"button",
|
|
@@ -12038,7 +12041,7 @@ function SlideNotesPanel({
|
|
|
12038
12041
|
{
|
|
12039
12042
|
ref: rootRef,
|
|
12040
12043
|
"data-pptx-chrome": "notes",
|
|
12041
|
-
className:
|
|
12044
|
+
className: chunkP2COO2QO_js.cn(
|
|
12042
12045
|
"flex flex-col border-t border-border/60 bg-background select-none",
|
|
12043
12046
|
// On mobile, hide the entire notes strip when collapsed: the
|
|
12044
12047
|
// MobileBottomBar's Notes button is the entry point instead.
|
|
@@ -12222,7 +12225,7 @@ function VersionHistoryPanel({
|
|
|
12222
12225
|
onClose,
|
|
12223
12226
|
onRestore
|
|
12224
12227
|
}) {
|
|
12225
|
-
const { t } =
|
|
12228
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
12226
12229
|
const [versions, setVersions] = React108.useState([]);
|
|
12227
12230
|
const [loading, setLoading] = React108.useState(false);
|
|
12228
12231
|
const [restoringKey, setRestoringKey] = React108.useState(null);
|
|
@@ -12368,7 +12371,7 @@ function SlideDiffRow({
|
|
|
12368
12371
|
onAccept,
|
|
12369
12372
|
onReject
|
|
12370
12373
|
}) {
|
|
12371
|
-
const { t } =
|
|
12374
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
12372
12375
|
const [expanded, setExpanded] = React108.useState(diff.status === "changed");
|
|
12373
12376
|
const statusLabel = (() => {
|
|
12374
12377
|
switch (diff.status) {
|
|
@@ -12402,7 +12405,7 @@ function SlideDiffRow({
|
|
|
12402
12405
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12403
12406
|
"div",
|
|
12404
12407
|
{
|
|
12405
|
-
className:
|
|
12408
|
+
className: chunkP2COO2QO_js.cn(
|
|
12406
12409
|
"rounded-lg border transition-colors",
|
|
12407
12410
|
isResolved ? "border-border/60 bg-card/40 opacity-60" : "border-border bg-background/70"
|
|
12408
12411
|
),
|
|
@@ -12416,7 +12419,7 @@ function SlideDiffRow({
|
|
|
12416
12419
|
children: [
|
|
12417
12420
|
expanded ? /* @__PURE__ */ jsxRuntime.jsx(lu.LuChevronDown, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(lu.LuChevronRight, { className: "w-3.5 h-3.5 text-muted-foreground flex-shrink-0" }),
|
|
12418
12421
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: t("pptx.compare.slideNumber", { number: slideNumber }) }),
|
|
12419
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
12422
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkP2COO2QO_js.cn("rounded-full px-2 py-0.5 text-[10px] font-medium", statusColor), children: statusLabel }),
|
|
12420
12423
|
diff.changes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
12421
12424
|
diff.changes.length,
|
|
12422
12425
|
" ",
|
|
@@ -12426,7 +12429,7 @@ function SlideDiffRow({
|
|
|
12426
12429
|
isResolved && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12427
12430
|
"span",
|
|
12428
12431
|
{
|
|
12429
|
-
className:
|
|
12432
|
+
className: chunkP2COO2QO_js.cn(
|
|
12430
12433
|
"text-[10px] font-medium",
|
|
12431
12434
|
accepted ? "text-green-400" : "text-muted-foreground"
|
|
12432
12435
|
),
|
|
@@ -12454,7 +12457,7 @@ function SlideDiffRow({
|
|
|
12454
12457
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12455
12458
|
"div",
|
|
12456
12459
|
{
|
|
12457
|
-
className:
|
|
12460
|
+
className: chunkP2COO2QO_js.cn(
|
|
12458
12461
|
"rounded border overflow-hidden",
|
|
12459
12462
|
diff.status === "added" ? "border-green-700/60" : diff.status === "changed" ? "border-amber-700/60" : "border-border"
|
|
12460
12463
|
),
|
|
@@ -12521,7 +12524,7 @@ function ComparePanel({
|
|
|
12521
12524
|
onRejectSlide,
|
|
12522
12525
|
onAcceptAll
|
|
12523
12526
|
}) {
|
|
12524
|
-
const { t } =
|
|
12527
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
12525
12528
|
const [accepted, setAccepted] = React108.useState({});
|
|
12526
12529
|
const [rejected, setRejected] = React108.useState({});
|
|
12527
12530
|
const handleAccept = React108.useCallback(
|
|
@@ -12650,7 +12653,7 @@ function PasswordProtectionDialog({
|
|
|
12650
12653
|
onSetPassword,
|
|
12651
12654
|
onRemovePassword
|
|
12652
12655
|
}) {
|
|
12653
|
-
const { t } =
|
|
12656
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
12654
12657
|
const [password, setPassword] = React108.useState("");
|
|
12655
12658
|
const [confirmPassword, setConfirmPassword] = React108.useState("");
|
|
12656
12659
|
const [showPassword, setShowPassword] = React108.useState(false);
|
|
@@ -12866,7 +12869,7 @@ function DocumentPropertiesCustomTab({
|
|
|
12866
12869
|
customProperties,
|
|
12867
12870
|
onUpdate
|
|
12868
12871
|
}) {
|
|
12869
|
-
const { t } =
|
|
12872
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
12870
12873
|
const handleAdd = React108.useCallback(() => {
|
|
12871
12874
|
onUpdate([...customProperties, { name: "", value: "", type: "lpwstr" }]);
|
|
12872
12875
|
}, [customProperties, onUpdate]);
|
|
@@ -13068,7 +13071,7 @@ function DocumentPropertiesStatisticsTab({
|
|
|
13068
13071
|
onUpdateAppProperties,
|
|
13069
13072
|
canEdit
|
|
13070
13073
|
}) {
|
|
13071
|
-
const { t } =
|
|
13074
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13072
13075
|
const handleEditableChange = React108.useCallback(
|
|
13073
13076
|
(key, value) => {
|
|
13074
13077
|
onUpdateAppProperties({ [key]: value });
|
|
@@ -13108,7 +13111,7 @@ function DocumentPropertiesDialog({
|
|
|
13108
13111
|
onClose,
|
|
13109
13112
|
onSave
|
|
13110
13113
|
}) {
|
|
13111
|
-
const { t } =
|
|
13114
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13112
13115
|
const [activeTab, setActiveTab] = React108.useState("summary");
|
|
13113
13116
|
const [draftCore, setDraftCore] = React108.useState({});
|
|
13114
13117
|
const [draftCustom, setDraftCustom] = React108.useState([]);
|
|
@@ -13159,7 +13162,7 @@ function DocumentPropertiesDialog({
|
|
|
13159
13162
|
const handleClose = React108.useCallback(() => {
|
|
13160
13163
|
onClose();
|
|
13161
13164
|
}, [onClose]);
|
|
13162
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
13165
|
+
const { panelStyle, handlers: dragHandlers } = chunkF5UOILTY_js.useModalDismissDrag(handleClose);
|
|
13163
13166
|
if (!isOpen) {
|
|
13164
13167
|
return null;
|
|
13165
13168
|
}
|
|
@@ -13296,7 +13299,7 @@ function FontEmbeddingPanel({
|
|
|
13296
13299
|
onClose,
|
|
13297
13300
|
onToggleEmbedFonts
|
|
13298
13301
|
}) {
|
|
13299
|
-
const { t } =
|
|
13302
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13300
13303
|
const [availableFamilies, setAvailableFamilies] = React108.useState(/* @__PURE__ */ new Set());
|
|
13301
13304
|
const [scanning, setScanning] = React108.useState(false);
|
|
13302
13305
|
const [scanned, setScanned] = React108.useState(false);
|
|
@@ -13424,7 +13427,7 @@ function DigitalSignaturesDialog({
|
|
|
13424
13427
|
hasSignatures,
|
|
13425
13428
|
signatureCount
|
|
13426
13429
|
}) {
|
|
13427
|
-
const { t } =
|
|
13430
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13428
13431
|
if (!isOpen) {
|
|
13429
13432
|
return null;
|
|
13430
13433
|
}
|
|
@@ -13496,7 +13499,7 @@ function SignatureStatusBadge({
|
|
|
13496
13499
|
signatureCount,
|
|
13497
13500
|
onClick
|
|
13498
13501
|
}) {
|
|
13499
|
-
const { t } =
|
|
13502
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13500
13503
|
if (!hasSignatures || signatureCount === 0) {
|
|
13501
13504
|
return null;
|
|
13502
13505
|
}
|
|
@@ -13522,7 +13525,7 @@ function SignatureStrippedDialog({
|
|
|
13522
13525
|
onConfirm,
|
|
13523
13526
|
onCancel
|
|
13524
13527
|
}) {
|
|
13525
|
-
const { t } =
|
|
13528
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13526
13529
|
if (!isOpen) {
|
|
13527
13530
|
return null;
|
|
13528
13531
|
}
|
|
@@ -13591,7 +13594,7 @@ function EncryptedFileDialog({
|
|
|
13591
13594
|
isOpen,
|
|
13592
13595
|
onClose
|
|
13593
13596
|
}) {
|
|
13594
|
-
const { t } =
|
|
13597
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13595
13598
|
if (!isOpen) {
|
|
13596
13599
|
return null;
|
|
13597
13600
|
}
|
|
@@ -13738,7 +13741,7 @@ function PresentationAudienceEffects({ snapshot }) {
|
|
|
13738
13741
|
] });
|
|
13739
13742
|
}
|
|
13740
13743
|
function PresentationEndOverlay({ onExit }) {
|
|
13741
|
-
const { t } =
|
|
13744
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13742
13745
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13743
13746
|
"button",
|
|
13744
13747
|
{
|
|
@@ -13754,9 +13757,9 @@ function PresentationSubtitleBar({
|
|
|
13754
13757
|
visible,
|
|
13755
13758
|
onCaptionChange
|
|
13756
13759
|
}) {
|
|
13757
|
-
const { t } =
|
|
13760
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13758
13761
|
const language = pptx.subtitleRecognitionLanguage(
|
|
13759
|
-
pptx.subtitleSettingsFromOptions(
|
|
13762
|
+
pptx.subtitleSettingsFromOptions(chunkF5UOILTY_js.useViewerOptionsContext()),
|
|
13760
13763
|
typeof navigator === "undefined" ? "en-US" : navigator.language
|
|
13761
13764
|
);
|
|
13762
13765
|
const [captionText, setCaptionText] = React108.useState("");
|
|
@@ -13833,7 +13836,7 @@ function renderNotesSegments(segments) {
|
|
|
13833
13836
|
});
|
|
13834
13837
|
}
|
|
13835
13838
|
function PresenterConsoleToolbar(p) {
|
|
13836
|
-
const { t } =
|
|
13839
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
13837
13840
|
const ref = useWebControl(
|
|
13838
13841
|
{ ...pptx.presenterConsoleViewState(p.snapshot, p.audienceOpen), translate: t },
|
|
13839
13842
|
{
|
|
@@ -13924,7 +13927,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13924
13927
|
{
|
|
13925
13928
|
className: "absolute inset-0",
|
|
13926
13929
|
style: {
|
|
13927
|
-
backgroundColor:
|
|
13930
|
+
backgroundColor: chunkP2COO2QO_js.normalizeHexColor(slide.backgroundColor, "#ffffff")
|
|
13928
13931
|
}
|
|
13929
13932
|
}
|
|
13930
13933
|
),
|
|
@@ -13950,7 +13953,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13950
13953
|
...pptx.deviceStrokeStageStyle(scale)
|
|
13951
13954
|
},
|
|
13952
13955
|
children: previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13953
|
-
|
|
13956
|
+
chunkF5UOILTY_js.StaticElementRenderer,
|
|
13954
13957
|
{
|
|
13955
13958
|
element,
|
|
13956
13959
|
activeSlide: slide,
|
|
@@ -14017,7 +14020,7 @@ function PresenterNotesRail({
|
|
|
14017
14020
|
onMove,
|
|
14018
14021
|
onUpdateNotes
|
|
14019
14022
|
}) {
|
|
14020
|
-
const { t } =
|
|
14023
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
14021
14024
|
const slide = slides[current];
|
|
14022
14025
|
const nextSlide = pptx.nextPresentedSlide(slides, current, activeCustomShow, authoredRange);
|
|
14023
14026
|
const notesText = slide?.notes ?? "";
|
|
@@ -14142,7 +14145,7 @@ function PresenterNotesRail({
|
|
|
14142
14145
|
] });
|
|
14143
14146
|
}
|
|
14144
14147
|
function PresenterSlideNavigator(props) {
|
|
14145
|
-
const { t } =
|
|
14148
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
14146
14149
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${pptx.PRESENTER_CONSOLE_CLASSES.navigator} text-foreground`, children: [
|
|
14147
14150
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-4 flex items-center justify-between border-b border-border pb-4", children: [
|
|
14148
14151
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -14284,7 +14287,7 @@ function PresenterView({
|
|
|
14284
14287
|
onSwapDisplays,
|
|
14285
14288
|
onUpdateNotes
|
|
14286
14289
|
}) {
|
|
14287
|
-
const { t } =
|
|
14290
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
14288
14291
|
const [now, setNow] = React108.useState(Date.now());
|
|
14289
14292
|
React108.useEffect(() => {
|
|
14290
14293
|
const interval = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -14441,7 +14444,7 @@ function MobilePresenterView({
|
|
|
14441
14444
|
onMovePresentationSlide,
|
|
14442
14445
|
onExit
|
|
14443
14446
|
}) {
|
|
14444
|
-
const { t } =
|
|
14447
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
14445
14448
|
const [now, setNow] = React108.useState(Date.now());
|
|
14446
14449
|
React108.useEffect(() => {
|
|
14447
14450
|
const interval = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -14554,7 +14557,7 @@ function RehearseTimingsHud({
|
|
|
14554
14557
|
paused,
|
|
14555
14558
|
onTogglePause
|
|
14556
14559
|
}) {
|
|
14557
|
-
const { t } =
|
|
14560
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
14558
14561
|
const [tick, setTick] = React108.useState(0);
|
|
14559
14562
|
React108.useEffect(() => {
|
|
14560
14563
|
if (paused) {
|
|
@@ -14602,7 +14605,7 @@ function RehearseTimingsSummary({
|
|
|
14602
14605
|
onSave,
|
|
14603
14606
|
onDiscard
|
|
14604
14607
|
}) {
|
|
14605
|
-
const { t } =
|
|
14608
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
14606
14609
|
const totalMs = Object.values(recordedTimings).reduce((sum, ms) => sum + ms, 0);
|
|
14607
14610
|
const sortedEntries = Object.entries(recordedTimings).map(([idx, ms]) => ({ slideIndex: Number(idx), ms })).sort((a, b) => a.slideIndex - b.slideIndex);
|
|
14608
14611
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 z-[9999] flex items-center justify-center bg-black/60 backdrop-blur-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full max-w-lg rounded-xl border border-border bg-background shadow-2xl", children: [
|
|
@@ -14686,7 +14689,7 @@ function SelectionPane({
|
|
|
14686
14689
|
markDirty,
|
|
14687
14690
|
onClose
|
|
14688
14691
|
}) {
|
|
14689
|
-
const { t } =
|
|
14692
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
14690
14693
|
const activeSlide = slides[activeSlideIndex];
|
|
14691
14694
|
const elements = activeSlide?.elements ?? [];
|
|
14692
14695
|
const [editingId, setEditingId] = React108.useState(null);
|
|
@@ -14841,7 +14844,7 @@ function SelectionPane({
|
|
|
14841
14844
|
setDragIndex(null);
|
|
14842
14845
|
setDragOverIndex(null);
|
|
14843
14846
|
},
|
|
14844
|
-
className:
|
|
14847
|
+
className: chunkP2COO2QO_js.cn(
|
|
14845
14848
|
"flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer transition-colors",
|
|
14846
14849
|
isSelected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground",
|
|
14847
14850
|
dragOverIndex === realIndex ? "border-t-2 border-primary" : ""
|
|
@@ -14895,13 +14898,13 @@ function SelectionPane({
|
|
|
14895
14898
|
}
|
|
14896
14899
|
var INPUT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14897
14900
|
var SELECT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14898
|
-
var ENTRANCE_PRESETS = /* @__PURE__ */
|
|
14901
|
+
var ENTRANCE_PRESETS = /* @__PURE__ */ chunkP2COO2QO_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14899
14902
|
(o) => o.value === "fadeIn" || o.value === "flyIn" || o.value === "zoomIn"
|
|
14900
14903
|
);
|
|
14901
|
-
var EXIT_PRESETS = /* @__PURE__ */
|
|
14904
|
+
var EXIT_PRESETS = /* @__PURE__ */ chunkP2COO2QO_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14902
14905
|
(o) => o.value === "fadeOut" || o.value === "flyOut" || o.value === "zoomOut"
|
|
14903
14906
|
);
|
|
14904
|
-
var EMPHASIS_PRESETS = /* @__PURE__ */
|
|
14907
|
+
var EMPHASIS_PRESETS = /* @__PURE__ */ chunkP2COO2QO_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14905
14908
|
(o) => o.value === "spin" || o.value === "pulse" || o.value === "colorWave" || o.value === "bounce" || o.value === "flash" || o.value === "growShrink" || o.value === "teeter"
|
|
14906
14909
|
);
|
|
14907
14910
|
var TIMING_CURVE_OPTIONS = [
|
|
@@ -15002,7 +15005,7 @@ function AfterAnimationRow({
|
|
|
15002
15005
|
onActionChange,
|
|
15003
15006
|
onColorChange
|
|
15004
15007
|
}) {
|
|
15005
|
-
const { t } =
|
|
15008
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
15006
15009
|
const commitRecentColor = useRecentColorCommit();
|
|
15007
15010
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
15008
15011
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -15053,7 +15056,7 @@ function AnimationTimelineSection({
|
|
|
15053
15056
|
canEdit,
|
|
15054
15057
|
handlers
|
|
15055
15058
|
}) {
|
|
15056
|
-
const { t } =
|
|
15059
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
15057
15060
|
const effectLabel = (anim) => pptx.animationEffectLabel(anim, (key) => t(key));
|
|
15058
15061
|
const {
|
|
15059
15062
|
sortedAnimations,
|
|
@@ -15084,7 +15087,7 @@ function AnimationTimelineSection({
|
|
|
15084
15087
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-6 rounded bg-muted/50 border border-border overflow-hidden", children: timelineBarData.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
15085
15088
|
"div",
|
|
15086
15089
|
{
|
|
15087
|
-
className:
|
|
15090
|
+
className: chunkP2COO2QO_js.cn(
|
|
15088
15091
|
"absolute top-0.5 bottom-0.5 rounded-sm transition-colors",
|
|
15089
15092
|
animationTypeColor(bar.anim),
|
|
15090
15093
|
bar.anim.elementId === selectedElementId && "ring-1 ring-primary"
|
|
@@ -15113,7 +15116,7 @@ function AnimationTimelineSection({
|
|
|
15113
15116
|
onDragLeave: handleDragLeave,
|
|
15114
15117
|
onDrop: (e) => handleDrop(index, e),
|
|
15115
15118
|
title: t("pptx.animation.nativeEffectHint"),
|
|
15116
|
-
className:
|
|
15119
|
+
className: chunkP2COO2QO_js.cn(
|
|
15117
15120
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] italic",
|
|
15118
15121
|
"bg-muted/20 text-muted-foreground/70",
|
|
15119
15122
|
isDragOver && "border-t-2 border-primary"
|
|
@@ -15152,7 +15155,7 @@ function AnimationTimelineSection({
|
|
|
15152
15155
|
onDragEnd: handleDragEnd,
|
|
15153
15156
|
onMouseEnter: () => handleAnimationHover(anim),
|
|
15154
15157
|
onMouseLeave: handleAnimationHoverEnd,
|
|
15155
|
-
className:
|
|
15158
|
+
className: chunkP2COO2QO_js.cn(
|
|
15156
15159
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] cursor-grab transition-colors",
|
|
15157
15160
|
isSelected ? "bg-primary/30 text-primary" : "bg-muted/50 text-muted-foreground",
|
|
15158
15161
|
isDragging && "opacity-40",
|
|
@@ -15213,7 +15216,7 @@ function BookmarkTriggerRow({
|
|
|
15213
15216
|
style,
|
|
15214
15217
|
onChange
|
|
15215
15218
|
}) {
|
|
15216
|
-
const { t } =
|
|
15219
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
15217
15220
|
const options = pptx.listMediaBookmarkOptions(elements);
|
|
15218
15221
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
15219
15222
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-[11px]", children: t("pptx.animation.trigger.bookmarkLabel") }),
|
|
@@ -15246,7 +15249,7 @@ function EffectSoundRow({
|
|
|
15246
15249
|
onPick,
|
|
15247
15250
|
onPickStock
|
|
15248
15251
|
}) {
|
|
15249
|
-
const { t } =
|
|
15252
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
15250
15253
|
const fileInputRef = React108__default.default.useRef(null);
|
|
15251
15254
|
const selectedValue = soundState.catalogueId ?? (soundState.hasSound ? CURRENT_VALUE : NONE_VALUE);
|
|
15252
15255
|
const handleSelectChange = (event) => {
|
|
@@ -15284,7 +15287,7 @@ function EffectSoundRow({
|
|
|
15284
15287
|
}
|
|
15285
15288
|
const asset = pptx.getEffectSoundAsset(soundState.catalogueId);
|
|
15286
15289
|
if (asset) {
|
|
15287
|
-
|
|
15290
|
+
chunkF5UOILTY_js.playAnimationSound(asset.dataUrl);
|
|
15288
15291
|
}
|
|
15289
15292
|
};
|
|
15290
15293
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -15337,7 +15340,7 @@ function MotionPathRow({
|
|
|
15337
15340
|
canEdit,
|
|
15338
15341
|
onChange
|
|
15339
15342
|
}) {
|
|
15340
|
-
const { t } =
|
|
15343
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
15341
15344
|
const presetId = pptx.motionPathPresetIdForPath(motionPath);
|
|
15342
15345
|
const isCustom = Boolean(motionPath) && !presetId;
|
|
15343
15346
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -15459,7 +15462,7 @@ function useAnimationPreview({
|
|
|
15459
15462
|
}) {
|
|
15460
15463
|
const handleAnimationHover = React108.useCallback((anim) => {
|
|
15461
15464
|
if (anim.motionPath) {
|
|
15462
|
-
|
|
15465
|
+
chunkP2COO2QO_js.startMotionPathPreview(anim.elementId, anim.motionPath, {
|
|
15463
15466
|
durationMs: anim.durationMs,
|
|
15464
15467
|
delayMs: anim.delayMs,
|
|
15465
15468
|
timingCurve: anim.timingCurve
|
|
@@ -15470,19 +15473,19 @@ function useAnimationPreview({
|
|
|
15470
15473
|
if (!preset || preset === "none") {
|
|
15471
15474
|
return;
|
|
15472
15475
|
}
|
|
15473
|
-
|
|
15476
|
+
chunkP2COO2QO_js.startPreviewAnimation(anim.elementId, preset, {
|
|
15474
15477
|
direction: anim.direction,
|
|
15475
15478
|
durationMs: anim.durationMs ?? 500,
|
|
15476
15479
|
timingCurve: anim.timingCurve
|
|
15477
15480
|
});
|
|
15478
15481
|
}, []);
|
|
15479
|
-
const handleAnimationHoverEnd = React108.useCallback(() =>
|
|
15482
|
+
const handleAnimationHoverEnd = React108.useCallback(() => chunkP2COO2QO_js.stopPreviewAnimation(), []);
|
|
15480
15483
|
const handlePreviewClick = React108.useCallback(() => {
|
|
15481
15484
|
if (!selectedElementAnimation) {
|
|
15482
15485
|
return;
|
|
15483
15486
|
}
|
|
15484
15487
|
if (selectedElementAnimation.motionPath) {
|
|
15485
|
-
|
|
15488
|
+
chunkP2COO2QO_js.startMotionPathPreview(selectedElementId, selectedElementAnimation.motionPath, {
|
|
15486
15489
|
durationMs: selectedElementAnimation.durationMs,
|
|
15487
15490
|
delayMs: selectedElementAnimation.delayMs,
|
|
15488
15491
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -15493,7 +15496,7 @@ function useAnimationPreview({
|
|
|
15493
15496
|
if (!preset || preset === "none") {
|
|
15494
15497
|
return;
|
|
15495
15498
|
}
|
|
15496
|
-
|
|
15499
|
+
chunkP2COO2QO_js.startPreviewAnimation(selectedElementId, preset, {
|
|
15497
15500
|
direction: selectedElementAnimation.direction,
|
|
15498
15501
|
durationMs: selectedElementAnimation.durationMs ?? 500,
|
|
15499
15502
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -15728,7 +15731,7 @@ function useAnimationHandlers({
|
|
|
15728
15731
|
return anim.elementId.slice(0, 8);
|
|
15729
15732
|
}
|
|
15730
15733
|
const text = pptx$1.hasTextProperties(el) ? el.text : void 0;
|
|
15731
|
-
return text ||
|
|
15734
|
+
return text || chunkP2COO2QO_js.getElementLabel(el);
|
|
15732
15735
|
},
|
|
15733
15736
|
[activeSlide.elements]
|
|
15734
15737
|
);
|
|
@@ -15739,7 +15742,7 @@ function useAnimationHandlers({
|
|
|
15739
15742
|
return id.slice(0, 8);
|
|
15740
15743
|
}
|
|
15741
15744
|
const text = pptx$1.hasTextProperties(el) ? el.text : void 0;
|
|
15742
|
-
return text ||
|
|
15745
|
+
return text || chunkP2COO2QO_js.getElementLabel(el);
|
|
15743
15746
|
}).join(", "),
|
|
15744
15747
|
[activeSlide.elements]
|
|
15745
15748
|
);
|
|
@@ -15795,8 +15798,8 @@ function AnimationPanel({
|
|
|
15795
15798
|
canEdit,
|
|
15796
15799
|
onUpdateSlide
|
|
15797
15800
|
}) {
|
|
15798
|
-
const { t } =
|
|
15799
|
-
const { viewportWidth } =
|
|
15801
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
15802
|
+
const { viewportWidth } = chunkF5UOILTY_js.useIsMobile();
|
|
15800
15803
|
const directionBtnPx = Math.max(28, pptx.getDensePanelTouchTargetPx(viewportWidth));
|
|
15801
15804
|
const fieldStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
15802
15805
|
const handlers = useAnimationHandlers({
|
|
@@ -15924,7 +15927,7 @@ function AnimationPanel({
|
|
|
15924
15927
|
type: "button",
|
|
15925
15928
|
disabled: !canEdit,
|
|
15926
15929
|
style: { minWidth: directionBtnPx, minHeight: directionBtnPx },
|
|
15927
|
-
className:
|
|
15930
|
+
className: chunkP2COO2QO_js.cn(
|
|
15928
15931
|
"flex items-center justify-center rounded border transition-colors",
|
|
15929
15932
|
isActive ? "border-primary bg-primary/20 text-primary" : "border-border bg-muted text-muted-foreground hover:bg-accent"
|
|
15930
15933
|
),
|
|
@@ -15990,7 +15993,7 @@ function AnimationPanel({
|
|
|
15990
15993
|
style: fieldStyle,
|
|
15991
15994
|
children: [
|
|
15992
15995
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("pptx.animation.trigger.selectShape") }),
|
|
15993
|
-
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children:
|
|
15996
|
+
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children: chunkP2COO2QO_js.getElementLabel(el) }, el.id))
|
|
15994
15997
|
]
|
|
15995
15998
|
}
|
|
15996
15999
|
)
|
|
@@ -16134,7 +16137,7 @@ function ActionTargetFields({
|
|
|
16134
16137
|
returnAfter,
|
|
16135
16138
|
onChange
|
|
16136
16139
|
}) {
|
|
16137
|
-
const { t } =
|
|
16140
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16138
16141
|
const urlLabelKey = URL_LABEL_KEY[type];
|
|
16139
16142
|
if (urlLabelKey) {
|
|
16140
16143
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16143,7 +16146,7 @@ function ActionTargetFields({
|
|
|
16143
16146
|
type: "text",
|
|
16144
16147
|
disabled: !canEdit,
|
|
16145
16148
|
"aria-label": t(urlLabelKey),
|
|
16146
|
-
className:
|
|
16149
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "w-full"),
|
|
16147
16150
|
placeholder: "https://...",
|
|
16148
16151
|
value: url ?? "",
|
|
16149
16152
|
onChange: (e) => onChange({ url: e.target.value })
|
|
@@ -16157,7 +16160,7 @@ function ActionTargetFields({
|
|
|
16157
16160
|
type: "number",
|
|
16158
16161
|
disabled: !canEdit,
|
|
16159
16162
|
"aria-label": t("pptx.action.gotoSlide"),
|
|
16160
|
-
className:
|
|
16163
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "w-full"),
|
|
16161
16164
|
placeholder: t("pptx.action.slideNumberPlaceholder"),
|
|
16162
16165
|
min: 1,
|
|
16163
16166
|
max: slideCount,
|
|
@@ -16179,7 +16182,7 @@ function ActionTargetFields({
|
|
|
16179
16182
|
"data-testid": "pptx-action-custom-show",
|
|
16180
16183
|
disabled: !canEdit,
|
|
16181
16184
|
"aria-label": t("pptx.hyperlink.customShowLabel"),
|
|
16182
|
-
className:
|
|
16185
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "w-full"),
|
|
16183
16186
|
value: customShowId ?? "",
|
|
16184
16187
|
onChange: (e) => onChange({ customShowId: e.target.value, returnAfter }),
|
|
16185
16188
|
children: [
|
|
@@ -16211,7 +16214,7 @@ function ActionSettingsPanel({
|
|
|
16211
16214
|
customShows,
|
|
16212
16215
|
onUpdateElement
|
|
16213
16216
|
}) {
|
|
16214
|
-
const { t } =
|
|
16217
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16215
16218
|
const clickAction = selectedElement.actionClick ? pptx$1.pptxActionToElementAction(selectedElement.actionClick, "click") : void 0;
|
|
16216
16219
|
const hoverAction = selectedElement.actionHover ? pptx$1.pptxActionToElementAction(selectedElement.actionHover, "hover") : void 0;
|
|
16217
16220
|
const updateAction = (trigger, type, patch) => {
|
|
@@ -16287,7 +16290,7 @@ function ActionTriggerSection({
|
|
|
16287
16290
|
onChangeType,
|
|
16288
16291
|
onChangeTarget
|
|
16289
16292
|
}) {
|
|
16290
|
-
const { t } =
|
|
16293
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16291
16294
|
const [pendingType, setPendingType] = React108.useState(void 0);
|
|
16292
16295
|
const effectiveType = pptx.resolveActionType(pendingType, activeType);
|
|
16293
16296
|
const changeType = (type) => {
|
|
@@ -16301,7 +16304,7 @@ function ActionTriggerSection({
|
|
|
16301
16304
|
{
|
|
16302
16305
|
disabled: !canEdit,
|
|
16303
16306
|
"aria-label": label,
|
|
16304
|
-
className:
|
|
16307
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "w-full"),
|
|
16305
16308
|
value: effectiveType,
|
|
16306
16309
|
onChange: (e) => changeType(e.target.value),
|
|
16307
16310
|
children: pptx.ELEMENT_ACTION_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.labelKey) }, o.value))
|
|
@@ -16329,7 +16332,7 @@ var AXIS_ROWS = [
|
|
|
16329
16332
|
{ type: "catAx", labelKey: "pptx.chart.categoryAxis", hasScale: false }
|
|
16330
16333
|
];
|
|
16331
16334
|
function ChartAxisOptions({ axes, canEdit, onUpdateAxis }) {
|
|
16332
|
-
const { t } =
|
|
16335
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16333
16336
|
const rows = AXIS_ROWS.map((row) => ({
|
|
16334
16337
|
...row,
|
|
16335
16338
|
axis: axes?.find((a) => a.axisType === row.type)
|
|
@@ -16474,7 +16477,7 @@ function ChartAxisStyleOptions({
|
|
|
16474
16477
|
onSetTitleStyle,
|
|
16475
16478
|
onSetGridlineStyle
|
|
16476
16479
|
}) {
|
|
16477
|
-
const { t } =
|
|
16480
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16478
16481
|
const commitRecentColor = useRecentColorCommit();
|
|
16479
16482
|
const rows = SCALE_AXES.map((row) => ({
|
|
16480
16483
|
...row,
|
|
@@ -16646,7 +16649,7 @@ function ChartComboTypeOptions({
|
|
|
16646
16649
|
canEdit,
|
|
16647
16650
|
onSetSeriesType
|
|
16648
16651
|
}) {
|
|
16649
|
-
const { t } =
|
|
16652
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16650
16653
|
if (!COMBO_SUPPORTED_TYPES.has(chartType) || series.length < 2) {
|
|
16651
16654
|
return null;
|
|
16652
16655
|
}
|
|
@@ -16675,7 +16678,7 @@ function ChartDataLabelOptions({
|
|
|
16675
16678
|
canEdit,
|
|
16676
16679
|
onUpdateStyle
|
|
16677
16680
|
}) {
|
|
16678
|
-
const { t } =
|
|
16681
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16679
16682
|
if (!style?.hasDataLabels) {
|
|
16680
16683
|
return null;
|
|
16681
16684
|
}
|
|
@@ -16723,7 +16726,7 @@ function ChartDataPointMarkerOptions({
|
|
|
16723
16726
|
canEdit,
|
|
16724
16727
|
onSetPointMarker
|
|
16725
16728
|
}) {
|
|
16726
|
-
const { t } =
|
|
16729
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16727
16730
|
const commitRecentColor = useRecentColorCommit();
|
|
16728
16731
|
const [seriesIndex, setSeriesIndex] = React108.useState(0);
|
|
16729
16732
|
if (!MARKER_SUPPORTED_TYPES.has(chartType) || series.length === 0 || categories.length === 0) {
|
|
@@ -16829,7 +16832,7 @@ function ChartDataPointOptions({
|
|
|
16829
16832
|
onSetPointExplosion,
|
|
16830
16833
|
onSetPointLabel
|
|
16831
16834
|
}) {
|
|
16832
|
-
const { t } =
|
|
16835
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16833
16836
|
const commitRecentColor = useRecentColorCommit();
|
|
16834
16837
|
const [seriesIndex, setSeriesIndex] = React108.useState(0);
|
|
16835
16838
|
if (series.length === 0 || categories.length === 0) {
|
|
@@ -16931,7 +16934,7 @@ function ChartDataSheet({
|
|
|
16931
16934
|
highlightCell,
|
|
16932
16935
|
onChange
|
|
16933
16936
|
}) {
|
|
16934
|
-
const { t } =
|
|
16937
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16935
16938
|
const ref = React108.useRef(null);
|
|
16936
16939
|
React108.useLayoutEffect(() => {
|
|
16937
16940
|
if (ref.current) {
|
|
@@ -16962,7 +16965,7 @@ function ChartDisplayOptions({
|
|
|
16962
16965
|
hasGridlines,
|
|
16963
16966
|
onToggleGridlines
|
|
16964
16967
|
}) {
|
|
16965
|
-
const { t } =
|
|
16968
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
16966
16969
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD, children: [
|
|
16967
16970
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: t("pptx.chart.display") }),
|
|
16968
16971
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
@@ -17039,7 +17042,7 @@ function ChartErrorBarOptions({
|
|
|
17039
17042
|
canEdit,
|
|
17040
17043
|
onSetErrorBars
|
|
17041
17044
|
}) {
|
|
17042
|
-
const { t } =
|
|
17045
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17043
17046
|
if (!ERROR_BAR_SUPPORTED_TYPES.has(chartType) || series.length === 0) {
|
|
17044
17047
|
return null;
|
|
17045
17048
|
}
|
|
@@ -17119,7 +17122,7 @@ function ChartFilteredSeriesOptions({
|
|
|
17119
17122
|
onRestoreSeries,
|
|
17120
17123
|
onSetDataLabelsRangeCache
|
|
17121
17124
|
}) {
|
|
17122
|
-
const { t } =
|
|
17125
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17123
17126
|
const filteredSeries = chartData.filteredSeries ?? [];
|
|
17124
17127
|
const seriesWithRange = chartData.series.map((series, index) => ({ series, index })).filter(({ series }) => series.dataLabelOptions?.dataLabelsRange);
|
|
17125
17128
|
if (filteredSeries.length === 0 && seriesWithRange.length === 0 && chartData.series.length <= 1) {
|
|
@@ -17199,7 +17202,7 @@ function ChartMarkerOptions({
|
|
|
17199
17202
|
canEdit,
|
|
17200
17203
|
onSetMarker
|
|
17201
17204
|
}) {
|
|
17202
|
-
const { t } =
|
|
17205
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17203
17206
|
const commitRecentColor = useRecentColorCommit();
|
|
17204
17207
|
if (!MARKER_SUPPORTED_TYPES.has(chartType) || series.length === 0) {
|
|
17205
17208
|
return null;
|
|
@@ -17308,7 +17311,7 @@ function ChartSeriesColorOptions({
|
|
|
17308
17311
|
onSetColor,
|
|
17309
17312
|
onToggleSecondaryAxis
|
|
17310
17313
|
}) {
|
|
17311
|
-
const { t } =
|
|
17314
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17312
17315
|
const series = chartData.series;
|
|
17313
17316
|
if (series.length === 0) {
|
|
17314
17317
|
return null;
|
|
@@ -17358,7 +17361,7 @@ function ChartSubtypeOptions({
|
|
|
17358
17361
|
canEdit,
|
|
17359
17362
|
onUpdateChartData
|
|
17360
17363
|
}) {
|
|
17361
|
-
const { t } =
|
|
17364
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17362
17365
|
if (chartData.chartType !== "bar3D" && chartData.chartType !== "radar" && chartData.chartType !== "surface") {
|
|
17363
17366
|
return null;
|
|
17364
17367
|
}
|
|
@@ -17424,7 +17427,7 @@ function ChartTrendlineOptions({
|
|
|
17424
17427
|
canEdit,
|
|
17425
17428
|
onSetTrendline
|
|
17426
17429
|
}) {
|
|
17427
|
-
const { t } =
|
|
17430
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17428
17431
|
if (!TRENDLINE_SUPPORTED_TYPES.has(chartType) || series.length === 0) {
|
|
17429
17432
|
return null;
|
|
17430
17433
|
}
|
|
@@ -17497,7 +17500,7 @@ function ChartTypeSelector({
|
|
|
17497
17500
|
onUpdateChartData,
|
|
17498
17501
|
onTitleChange
|
|
17499
17502
|
}) {
|
|
17500
|
-
const { t } =
|
|
17503
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17501
17504
|
const supportsGrouping = GROUPING_SUPPORTED_TYPES.has(chartType);
|
|
17502
17505
|
const displayedType = pptx.resolveDisplayedChartType(chartData);
|
|
17503
17506
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD, children: [
|
|
@@ -17578,7 +17581,7 @@ function RotationField({
|
|
|
17578
17581
|
canEdit,
|
|
17579
17582
|
onRotationPatch
|
|
17580
17583
|
}) {
|
|
17581
|
-
const { t } =
|
|
17584
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17582
17585
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17583
17586
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeRotation") }),
|
|
17584
17587
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17600,7 +17603,7 @@ function FlipFields({
|
|
|
17600
17603
|
canEdit,
|
|
17601
17604
|
onFlipPatch
|
|
17602
17605
|
}) {
|
|
17603
|
-
const { t } =
|
|
17606
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17604
17607
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17605
17608
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 cursor-pointer", children: [
|
|
17606
17609
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17639,7 +17642,7 @@ function ChartUserShapePositionFields({
|
|
|
17639
17642
|
onRotationPatch,
|
|
17640
17643
|
onFlipPatch
|
|
17641
17644
|
}) {
|
|
17642
|
-
const { t } =
|
|
17645
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17643
17646
|
const update = (patch) => onPatch(row.path, patch);
|
|
17644
17647
|
if (row.depth === 0) {
|
|
17645
17648
|
const from = row.from;
|
|
@@ -17763,7 +17766,7 @@ function ChartUserShapeOptions({
|
|
|
17763
17766
|
canEdit,
|
|
17764
17767
|
onUpdateChartData
|
|
17765
17768
|
}) {
|
|
17766
|
-
const { t } =
|
|
17769
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
17767
17770
|
const shapes = chartData.userShapes;
|
|
17768
17771
|
const rows = pptx.listChartUserShapeRows(shapes);
|
|
17769
17772
|
const kindLabel = (kind) => {
|
|
@@ -17921,8 +17924,8 @@ function ChartUserShapeOptions({
|
|
|
17921
17924
|
}
|
|
17922
17925
|
function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
17923
17926
|
const chartData = selectedElement.chartData;
|
|
17924
|
-
const followDataPoint =
|
|
17925
|
-
const { selection: partSelection } =
|
|
17927
|
+
const followDataPoint = chunkF5UOILTY_js.useViewerOptionsContext().advanced.chartPropertiesFollowDataPoint;
|
|
17928
|
+
const { selection: partSelection } = chunkF5UOILTY_js.useChartPartSelection();
|
|
17926
17929
|
const canvasPart = partSelection?.elementId === selectedElement.id ? partSelection.part : null;
|
|
17927
17930
|
const title = chartData?.title;
|
|
17928
17931
|
const chartType = chartData?.chartType;
|
|
@@ -18360,7 +18363,7 @@ function OleEditorDialog({
|
|
|
18360
18363
|
element,
|
|
18361
18364
|
onUpdateElement
|
|
18362
18365
|
}) {
|
|
18363
|
-
const { t } =
|
|
18366
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
18364
18367
|
const dialogRef = React108.useRef(null);
|
|
18365
18368
|
const fileInputRef = React108.useRef(null);
|
|
18366
18369
|
const descriptor = pptx.buildOleEditDialogDescriptor(element);
|
|
@@ -18608,7 +18611,7 @@ function ConnectorArrowsSection({
|
|
|
18608
18611
|
onUpdateShapeStyle,
|
|
18609
18612
|
markDirty
|
|
18610
18613
|
}) {
|
|
18611
|
-
const { t } =
|
|
18614
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
18612
18615
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
18613
18616
|
["Start", "End"].map((end) => {
|
|
18614
18617
|
const key = end === "Start" ? "connectorStartArrow" : "connectorEndArrow";
|
|
@@ -18627,7 +18630,7 @@ function ConnectorArrowsSection({
|
|
|
18627
18630
|
},
|
|
18628
18631
|
disabled: !canEdit,
|
|
18629
18632
|
className: SELECT_CLS2,
|
|
18630
|
-
children:
|
|
18633
|
+
children: chunkP2COO2QO_js.CONNECTOR_ARROW_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18631
18634
|
}
|
|
18632
18635
|
)
|
|
18633
18636
|
] }, end);
|
|
@@ -18651,7 +18654,7 @@ function ConnectorArrowsSection({
|
|
|
18651
18654
|
},
|
|
18652
18655
|
disabled: !canEdit,
|
|
18653
18656
|
className: SELECT_CLS2,
|
|
18654
|
-
children:
|
|
18657
|
+
children: chunkP2COO2QO_js.ARROW_SIZE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18655
18658
|
}
|
|
18656
18659
|
)
|
|
18657
18660
|
] }),
|
|
@@ -18670,7 +18673,7 @@ function ConnectorArrowsSection({
|
|
|
18670
18673
|
},
|
|
18671
18674
|
disabled: !canEdit,
|
|
18672
18675
|
className: SELECT_CLS2,
|
|
18673
|
-
children:
|
|
18676
|
+
children: chunkP2COO2QO_js.ARROW_SIZE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18674
18677
|
}
|
|
18675
18678
|
)
|
|
18676
18679
|
] })
|
|
@@ -18701,7 +18704,7 @@ function ConnectorPanel({
|
|
|
18701
18704
|
function GroupInfoPanel({
|
|
18702
18705
|
selectedElement
|
|
18703
18706
|
}) {
|
|
18704
|
-
const { t } =
|
|
18707
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
18705
18708
|
if (selectedElement.type !== "group") {
|
|
18706
18709
|
return null;
|
|
18707
18710
|
}
|
|
@@ -18716,7 +18719,7 @@ function OlePropertiesPanel({
|
|
|
18716
18719
|
canEdit,
|
|
18717
18720
|
onUpdateElement
|
|
18718
18721
|
}) {
|
|
18719
|
-
const { t } =
|
|
18722
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
18720
18723
|
const [isEditorOpen, setIsEditorOpen] = React108.useState(false);
|
|
18721
18724
|
if (selectedElement.type !== "ole") {
|
|
18722
18725
|
return null;
|
|
@@ -18761,7 +18764,7 @@ function OlePropertiesPanel({
|
|
|
18761
18764
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18762
18765
|
"span",
|
|
18763
18766
|
{
|
|
18764
|
-
className:
|
|
18767
|
+
className: chunkP2COO2QO_js.cn(
|
|
18765
18768
|
"inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium",
|
|
18766
18769
|
ole.isLinked ? "bg-blue-500/20 text-blue-400" : "bg-green-500/20 text-green-400"
|
|
18767
18770
|
),
|
|
@@ -18814,7 +18817,7 @@ function LayerOrderButtons({
|
|
|
18814
18817
|
"button",
|
|
18815
18818
|
{
|
|
18816
18819
|
type: "button",
|
|
18817
|
-
className:
|
|
18820
|
+
className: chunkP2COO2QO_js.cn("flex-1", BTN2),
|
|
18818
18821
|
disabled: !canEdit,
|
|
18819
18822
|
onClick: () => onMoveLayer("forward"),
|
|
18820
18823
|
children: "\u2191 Forward"
|
|
@@ -18824,7 +18827,7 @@ function LayerOrderButtons({
|
|
|
18824
18827
|
"button",
|
|
18825
18828
|
{
|
|
18826
18829
|
type: "button",
|
|
18827
|
-
className:
|
|
18830
|
+
className: chunkP2COO2QO_js.cn("flex-1", BTN2),
|
|
18828
18831
|
disabled: !canEdit,
|
|
18829
18832
|
onClick: () => onMoveLayer("backward"),
|
|
18830
18833
|
children: "\u2193 Backward"
|
|
@@ -18838,7 +18841,7 @@ function ArtisticEffectsGallery({
|
|
|
18838
18841
|
canEdit,
|
|
18839
18842
|
updateEffects
|
|
18840
18843
|
}) {
|
|
18841
|
-
const { t } =
|
|
18844
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
18842
18845
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px]", children: [
|
|
18843
18846
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.image.artisticEffects") }),
|
|
18844
18847
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: pptx.ARTISTIC_EFFECTS.map(([effectName, tKey, cssFilter]) => {
|
|
@@ -18848,7 +18851,7 @@ function ArtisticEffectsGallery({
|
|
|
18848
18851
|
{
|
|
18849
18852
|
type: "button",
|
|
18850
18853
|
disabled: !canEdit,
|
|
18851
|
-
className:
|
|
18854
|
+
className: chunkP2COO2QO_js.cn(
|
|
18852
18855
|
"flex flex-col items-center gap-0.5 rounded border p-0.5 hover:bg-accent/50",
|
|
18853
18856
|
isActive ? "border-primary bg-primary/10" : "border-border"
|
|
18854
18857
|
),
|
|
@@ -18883,7 +18886,7 @@ function ColorChangeSection({
|
|
|
18883
18886
|
canEdit,
|
|
18884
18887
|
updateEffects
|
|
18885
18888
|
}) {
|
|
18886
|
-
const { t } =
|
|
18889
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
18887
18890
|
const cc = fx?.clrChange;
|
|
18888
18891
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px]", children: [
|
|
18889
18892
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -18910,7 +18913,7 @@ function ColorChangeSection({
|
|
|
18910
18913
|
DebouncedColorInput,
|
|
18911
18914
|
{
|
|
18912
18915
|
disabled: !canEdit,
|
|
18913
|
-
value:
|
|
18916
|
+
value: chunkP2COO2QO_js.normalizeHexColor(cc.clrFrom, "#ffffff"),
|
|
18914
18917
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18915
18918
|
onCommit: (hex) => updateEffects({
|
|
18916
18919
|
clrChange: {
|
|
@@ -18928,7 +18931,7 @@ function ColorChangeSection({
|
|
|
18928
18931
|
DebouncedColorInput,
|
|
18929
18932
|
{
|
|
18930
18933
|
disabled: !canEdit || Boolean(cc.clrToTransparent),
|
|
18931
|
-
value:
|
|
18934
|
+
value: chunkP2COO2QO_js.normalizeHexColor(cc.clrTo, "#000000"),
|
|
18932
18935
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18933
18936
|
onCommit: (hex) => updateEffects({
|
|
18934
18937
|
clrChange: {
|
|
@@ -18965,7 +18968,7 @@ function ColorWashSection({
|
|
|
18965
18968
|
canEdit,
|
|
18966
18969
|
updateEffects
|
|
18967
18970
|
}) {
|
|
18968
|
-
const { t } =
|
|
18971
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
18969
18972
|
const wash = fx?.colorWash;
|
|
18970
18973
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px]", children: [
|
|
18971
18974
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -18988,7 +18991,7 @@ function ColorWashSection({
|
|
|
18988
18991
|
DebouncedColorInput,
|
|
18989
18992
|
{
|
|
18990
18993
|
disabled: !canEdit,
|
|
18991
|
-
value:
|
|
18994
|
+
value: chunkP2COO2QO_js.normalizeHexColor(wash.color, "#0066cc"),
|
|
18992
18995
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18993
18996
|
onCommit: (hex) => updateEffects({
|
|
18994
18997
|
colorWash: { color: hex, opacity: wash.opacity ?? 40 }
|
|
@@ -19065,7 +19068,7 @@ function DuotonePanel({
|
|
|
19065
19068
|
canEdit,
|
|
19066
19069
|
onUpdateElement
|
|
19067
19070
|
}) {
|
|
19068
|
-
const { t } =
|
|
19071
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
19069
19072
|
const effects = "imageEffects" in selectedElement ? selectedElement.imageEffects : void 0;
|
|
19070
19073
|
const commitDuotone = React108.useCallback(
|
|
19071
19074
|
(color1, color2) => {
|
|
@@ -19086,8 +19089,8 @@ function DuotonePanel({
|
|
|
19086
19089
|
}
|
|
19087
19090
|
});
|
|
19088
19091
|
}, [effects, onUpdateElement]);
|
|
19089
|
-
const shadowColor =
|
|
19090
|
-
const highlightColor =
|
|
19092
|
+
const shadowColor = chunkP2COO2QO_js.normalizeHexColor(effects?.duotone?.color1, "#000000");
|
|
19093
|
+
const highlightColor = chunkP2COO2QO_js.normalizeHexColor(effects?.duotone?.color2, "#ffffff");
|
|
19091
19094
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px]", children: [
|
|
19092
19095
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-medium", children: t("pptx.image.duotone") }),
|
|
19093
19096
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -19118,7 +19121,7 @@ function DuotonePanel({
|
|
|
19118
19121
|
] }),
|
|
19119
19122
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
19120
19123
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-[10px]", children: t("pptx.image.duotonePresets") }),
|
|
19121
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
19124
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunkF5UOILTY_js.DUOTONE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19122
19125
|
"button",
|
|
19123
19126
|
{
|
|
19124
19127
|
type: "button",
|
|
@@ -19154,7 +19157,7 @@ function ImageAdjustmentsPanel({
|
|
|
19154
19157
|
canEdit,
|
|
19155
19158
|
onUpdateElement
|
|
19156
19159
|
}) {
|
|
19157
|
-
const { t } =
|
|
19160
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
19158
19161
|
const effects = React108.useMemo(
|
|
19159
19162
|
() => "imageEffects" in selectedElement ? selectedElement.imageEffects : void 0,
|
|
19160
19163
|
[selectedElement]
|
|
@@ -19255,7 +19258,7 @@ function ImageCropSection({
|
|
|
19255
19258
|
canEdit,
|
|
19256
19259
|
onUpdateElement
|
|
19257
19260
|
}) {
|
|
19258
|
-
const { t } =
|
|
19261
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
19259
19262
|
if (!pptx$1.isImageLikeElement(selectedElement)) {
|
|
19260
19263
|
return null;
|
|
19261
19264
|
}
|
|
@@ -19273,7 +19276,7 @@ function ImageCropSection({
|
|
|
19273
19276
|
max: MAX_CROP_PERCENT,
|
|
19274
19277
|
disabled: !croppable,
|
|
19275
19278
|
className: "accent-primary",
|
|
19276
|
-
value: Math.round(
|
|
19279
|
+
value: Math.round(chunkP2COO2QO_js.clampCropValue(selectedElement[key]) * 100),
|
|
19277
19280
|
onChange: (e) => onUpdateElement({
|
|
19278
19281
|
[key]: Number(e.target.value) / 100
|
|
19279
19282
|
})
|
|
@@ -19320,7 +19323,7 @@ function ImagePropertiesPanel({
|
|
|
19320
19323
|
canEdit,
|
|
19321
19324
|
onUpdateElement
|
|
19322
19325
|
}) {
|
|
19323
|
-
const { t } =
|
|
19326
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
19324
19327
|
const fx = selectedElement.imageEffects;
|
|
19325
19328
|
const updateEffects = (patch) => {
|
|
19326
19329
|
onUpdateElement({
|
|
@@ -19337,7 +19340,7 @@ function ImagePropertiesPanel({
|
|
|
19337
19340
|
{
|
|
19338
19341
|
rows: 2,
|
|
19339
19342
|
disabled: !canEdit,
|
|
19340
|
-
className:
|
|
19343
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "resize-none text-[11px]"),
|
|
19341
19344
|
value: selectedElement.altText ?? "",
|
|
19342
19345
|
onChange: (e) => onUpdateElement({
|
|
19343
19346
|
altText: e.target.value
|
|
@@ -19525,7 +19528,7 @@ function InspectorFields({
|
|
|
19525
19528
|
liveTarget,
|
|
19526
19529
|
livePatch
|
|
19527
19530
|
}) {
|
|
19528
|
-
const { t } =
|
|
19531
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
19529
19532
|
const views = pptx.resolveInspectorSections(sections, target);
|
|
19530
19533
|
const change = (sectionId, fieldId, raw) => {
|
|
19531
19534
|
const patch = pptx.inspectorFieldPatch(sections, sectionId, fieldId, target, raw);
|
|
@@ -19753,7 +19756,7 @@ function MediaInspector({
|
|
|
19753
19756
|
durationSeconds,
|
|
19754
19757
|
onUpdateElement
|
|
19755
19758
|
}) {
|
|
19756
|
-
const { t } =
|
|
19759
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
19757
19760
|
const trimStartMs = element.trimStartMs ?? 0;
|
|
19758
19761
|
const trimEndMs = element.trimEndMs ?? 0;
|
|
19759
19762
|
const durationMs = durationSeconds * 1e3;
|
|
@@ -19983,7 +19986,7 @@ function MediaPlaybackBookmarks({
|
|
|
19983
19986
|
onUpdateElement,
|
|
19984
19987
|
onSeekTo
|
|
19985
19988
|
}) {
|
|
19986
|
-
const { t } =
|
|
19989
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
19987
19990
|
const [newBookmarkLabel, setNewBookmarkLabel] = React108.useState("");
|
|
19988
19991
|
const volumePercent = Math.round((element.volume ?? 1) * 100);
|
|
19989
19992
|
const handleAddBookmark = React108.useCallback(() => {
|
|
@@ -20233,7 +20236,7 @@ function MediaPropertiesPanel({
|
|
|
20233
20236
|
canEdit,
|
|
20234
20237
|
onUpdateElement
|
|
20235
20238
|
}) {
|
|
20236
|
-
const { t } =
|
|
20239
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
20237
20240
|
const mediaRef = React108.useRef(null);
|
|
20238
20241
|
const [isPlaying, setIsPlaying] = React108.useState(false);
|
|
20239
20242
|
const [currentTime, setCurrentTime] = React108.useState(0);
|
|
@@ -20467,7 +20470,7 @@ function AccessibilityTextSection({
|
|
|
20467
20470
|
canEdit,
|
|
20468
20471
|
onUpdateElement
|
|
20469
20472
|
}) {
|
|
20470
|
-
const { t } =
|
|
20473
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
20471
20474
|
const fields = pptx.getNonVisualDescriptionFields(selectedElement);
|
|
20472
20475
|
if (!fields.showAltText && !fields.showTitle) {
|
|
20473
20476
|
return null;
|
|
@@ -20482,7 +20485,7 @@ function AccessibilityTextSection({
|
|
|
20482
20485
|
rows: 2,
|
|
20483
20486
|
disabled: !canEdit,
|
|
20484
20487
|
placeholder: t("pptx.elementAccessibility.altTextPlaceholder"),
|
|
20485
|
-
className:
|
|
20488
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "resize-none text-[11px]"),
|
|
20486
20489
|
value: fields.altText,
|
|
20487
20490
|
onChange: (e) => onUpdateElement({ altText: e.target.value })
|
|
20488
20491
|
}
|
|
@@ -20496,7 +20499,7 @@ function AccessibilityTextSection({
|
|
|
20496
20499
|
type: "text",
|
|
20497
20500
|
disabled: !canEdit,
|
|
20498
20501
|
placeholder: t("pptx.elementAccessibility.titlePlaceholder"),
|
|
20499
|
-
className:
|
|
20502
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "text-[11px]"),
|
|
20500
20503
|
value: fields.title,
|
|
20501
20504
|
onChange: (e) => onUpdateElement({ title: e.target.value })
|
|
20502
20505
|
}
|
|
@@ -20524,7 +20527,7 @@ function RecentColorsRow({
|
|
|
20524
20527
|
disabled,
|
|
20525
20528
|
onCommit
|
|
20526
20529
|
}) {
|
|
20527
|
-
const { t } =
|
|
20530
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
20528
20531
|
const { recentColors, pushColor } = useRecentColors();
|
|
20529
20532
|
const shown = recentColors.length > 0;
|
|
20530
20533
|
const ref = React108.useRef(null);
|
|
@@ -20566,7 +20569,7 @@ function ThemeColorSwatchGrid({
|
|
|
20566
20569
|
selectedHex,
|
|
20567
20570
|
onPick
|
|
20568
20571
|
}) {
|
|
20569
|
-
const { t } =
|
|
20572
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
20570
20573
|
const themeColorMap = useThemeColorMap();
|
|
20571
20574
|
const columns = React108.useMemo(
|
|
20572
20575
|
() => pptx.buildThemeColorSwatchGrid(themeColorMap, (key, params) => t(key, params)),
|
|
@@ -20613,7 +20616,7 @@ function SelectRow({
|
|
|
20613
20616
|
options,
|
|
20614
20617
|
onChange
|
|
20615
20618
|
}) {
|
|
20616
|
-
const { t } =
|
|
20619
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
20617
20620
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: `flex flex-col gap-1 ${span2 ? COL2 : ""}`, children: [
|
|
20618
20621
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: label }),
|
|
20619
20622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -20637,14 +20640,14 @@ function ColorPickerRow({
|
|
|
20637
20640
|
onChange,
|
|
20638
20641
|
styleChange
|
|
20639
20642
|
}) {
|
|
20640
|
-
const { t } =
|
|
20643
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
20641
20644
|
const { pushColor } = useRecentColors();
|
|
20642
20645
|
const commit = (color, ref) => {
|
|
20643
20646
|
onChange(color, ref);
|
|
20644
20647
|
pushColor(color);
|
|
20645
20648
|
};
|
|
20646
20649
|
const handleEyedropper = async () => {
|
|
20647
|
-
const color = await
|
|
20650
|
+
const color = await chunkP2COO2QO_js.openNativeEyeDropper();
|
|
20648
20651
|
if (color) {
|
|
20649
20652
|
commit(color);
|
|
20650
20653
|
}
|
|
@@ -20717,7 +20720,7 @@ function GradientStopRow({
|
|
|
20717
20720
|
onUpdate,
|
|
20718
20721
|
allStops
|
|
20719
20722
|
}) {
|
|
20720
|
-
const { t } =
|
|
20723
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
20721
20724
|
const { pushColor } = useRecentColors();
|
|
20722
20725
|
const commitRecentColor = useRecentColorCommit();
|
|
20723
20726
|
const patchStop = (patch) => {
|
|
@@ -20730,9 +20733,9 @@ function GradientStopRow({
|
|
|
20730
20733
|
"input",
|
|
20731
20734
|
{
|
|
20732
20735
|
type: "color",
|
|
20733
|
-
value:
|
|
20736
|
+
value: chunkP2COO2QO_js.normalizeHexColor(stop2.color, "#3b82f6"),
|
|
20734
20737
|
ref: commitRecentColor,
|
|
20735
|
-
onChange: (e) => patchStop({ color:
|
|
20738
|
+
onChange: (e) => patchStop({ color: chunkP2COO2QO_js.normalizeHexColor(e.target.value, "#3b82f6"), colorRef: void 0 }),
|
|
20736
20739
|
className: "h-7 w-10 rounded border border-border bg-muted"
|
|
20737
20740
|
}
|
|
20738
20741
|
),
|
|
@@ -20807,7 +20810,7 @@ function FillAdvancedControls({
|
|
|
20807
20810
|
onUpdateGradientStops,
|
|
20808
20811
|
onSetFillColor: _onSetFillColor
|
|
20809
20812
|
}) {
|
|
20810
|
-
const { t } =
|
|
20813
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
20811
20814
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20812
20815
|
showGradient && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20813
20816
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -20861,7 +20864,7 @@ function FillAdvancedControls({
|
|
|
20861
20864
|
onClick: () => onUpdateGradientStops([
|
|
20862
20865
|
...gradientStops,
|
|
20863
20866
|
{
|
|
20864
|
-
color:
|
|
20867
|
+
color: chunkP2COO2QO_js.normalizeHexColor(style?.fillColor, chunkP2COO2QO_js.DEFAULT_FILL_COLOR),
|
|
20865
20868
|
position: 50,
|
|
20866
20869
|
opacity: 1
|
|
20867
20870
|
}
|
|
@@ -20875,9 +20878,9 @@ function FillAdvancedControls({
|
|
|
20875
20878
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${COL2} flex flex-col gap-2`, children: [
|
|
20876
20879
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: "Pattern" }),
|
|
20877
20880
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-8 gap-1 max-h-48 overflow-y-auto rounded border border-border p-2", children: PATTERN_PRESET_OPTIONS.map((opt) => {
|
|
20878
|
-
const fgColor =
|
|
20879
|
-
const bgColor =
|
|
20880
|
-
const svgPattern =
|
|
20881
|
+
const fgColor = chunkP2COO2QO_js.normalizeHexColor(style?.fillColor, chunkP2COO2QO_js.DEFAULT_FILL_COLOR);
|
|
20882
|
+
const bgColor = chunkP2COO2QO_js.normalizeHexColor(style?.fillPatternBackgroundColor, "#ffffff");
|
|
20883
|
+
const svgPattern = chunkP2COO2QO_js.getPatternSvg(opt.value, fgColor, bgColor);
|
|
20881
20884
|
const isSelected = (style.fillPatternPreset || "pct20") === opt.value;
|
|
20882
20885
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20883
20886
|
"button",
|
|
@@ -20910,7 +20913,7 @@ function FillAdvancedControls({
|
|
|
20910
20913
|
{
|
|
20911
20914
|
label: t("pptx.fillAdvanced.foregroundColor"),
|
|
20912
20915
|
prefix: "pattern-fg",
|
|
20913
|
-
value:
|
|
20916
|
+
value: chunkP2COO2QO_js.normalizeHexColor(style?.fillColor, chunkP2COO2QO_js.DEFAULT_FILL_COLOR),
|
|
20914
20917
|
disabled: isLine,
|
|
20915
20918
|
onChange: (color) => onUpdateShapeStyle(patternForeground(color)),
|
|
20916
20919
|
styleChange: patternForeground
|
|
@@ -20921,7 +20924,7 @@ function FillAdvancedControls({
|
|
|
20921
20924
|
{
|
|
20922
20925
|
label: t("pptx.fillAdvanced.backgroundColor"),
|
|
20923
20926
|
prefix: "pattern-bg",
|
|
20924
|
-
value:
|
|
20927
|
+
value: chunkP2COO2QO_js.normalizeHexColor(style?.fillPatternBackgroundColor, "#ffffff"),
|
|
20925
20928
|
disabled: isLine,
|
|
20926
20929
|
onChange: (color) => onUpdateShapeStyle(patternBackground(color)),
|
|
20927
20930
|
styleChange: patternBackground
|
|
@@ -20986,7 +20989,7 @@ var QUICK_STYLES = pptx.buildQuickStylesGallery();
|
|
|
20986
20989
|
function QuickStylesGallery({
|
|
20987
20990
|
onUpdateShapeStyle
|
|
20988
20991
|
}) {
|
|
20989
|
-
const { t } =
|
|
20992
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
20990
20993
|
const ref = React108.useRef(null);
|
|
20991
20994
|
React108.useLayoutEffect(() => {
|
|
20992
20995
|
const gallery = ref.current;
|
|
@@ -21023,14 +21026,14 @@ function StrokeEffectsSection({
|
|
|
21023
21026
|
onUpdateShapeStyle,
|
|
21024
21027
|
onSetStrokeColor
|
|
21025
21028
|
}) {
|
|
21026
|
-
const { t } =
|
|
21029
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
21027
21030
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
21028
21031
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
21029
21032
|
ColorPickerRow,
|
|
21030
21033
|
{
|
|
21031
21034
|
label: t("pptx.inspector.stroke"),
|
|
21032
21035
|
prefix: "stroke",
|
|
21033
|
-
value:
|
|
21036
|
+
value: chunkP2COO2QO_js.normalizeHexColor(style?.strokeColor, chunkP2COO2QO_js.DEFAULT_STROKE_COLOR),
|
|
21034
21037
|
selectedRef: style?.strokeColorRef,
|
|
21035
21038
|
onChange: onSetStrokeColor,
|
|
21036
21039
|
styleChange: (hex, current) => pptx.shapeOutlineChange(hex, void 0, current)
|
|
@@ -21073,7 +21076,7 @@ function FillStrokeProperties({
|
|
|
21073
21076
|
onSetFillColor,
|
|
21074
21077
|
onSetStrokeColor
|
|
21075
21078
|
}) {
|
|
21076
|
-
const { t } =
|
|
21079
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
21077
21080
|
const line = isLineish(selectedElement, selectedShapeType);
|
|
21078
21081
|
const style = selectedShapeStyle;
|
|
21079
21082
|
const handleFillModeChange = (nextMode) => {
|
|
@@ -21089,10 +21092,10 @@ function FillStrokeProperties({
|
|
|
21089
21092
|
return;
|
|
21090
21093
|
}
|
|
21091
21094
|
if (nextMode === "gradient") {
|
|
21092
|
-
const existing =
|
|
21095
|
+
const existing = chunkP2COO2QO_js.sanitizeGradientStops(style?.fillGradientStops);
|
|
21093
21096
|
const stops = existing.length >= 2 ? existing : [
|
|
21094
21097
|
{
|
|
21095
|
-
color:
|
|
21098
|
+
color: chunkP2COO2QO_js.normalizeHexColor(style?.fillColor, chunkP2COO2QO_js.DEFAULT_FILL_COLOR),
|
|
21096
21099
|
position: 0,
|
|
21097
21100
|
opacity: 1
|
|
21098
21101
|
},
|
|
@@ -21117,7 +21120,7 @@ function FillStrokeProperties({
|
|
|
21117
21120
|
onUpdateShapeStyle({ fillMode: "solid" });
|
|
21118
21121
|
};
|
|
21119
21122
|
const gradientStops = selectedGradientStops.length > 0 ? selectedGradientStops : [
|
|
21120
|
-
{ color:
|
|
21123
|
+
{ color: chunkP2COO2QO_js.DEFAULT_FILL_COLOR, position: 0 },
|
|
21121
21124
|
{ color: "#ffffff", position: 100 }
|
|
21122
21125
|
];
|
|
21123
21126
|
const showGradient = style?.fillMode === "gradient" || selectedGradientStops.length > 0;
|
|
@@ -21144,7 +21147,7 @@ function FillStrokeProperties({
|
|
|
21144
21147
|
{
|
|
21145
21148
|
label: t("pptx.fill.fill"),
|
|
21146
21149
|
prefix: "fill",
|
|
21147
|
-
value:
|
|
21150
|
+
value: chunkP2COO2QO_js.normalizeHexColor(style?.fillColor, chunkP2COO2QO_js.DEFAULT_FILL_COLOR),
|
|
21148
21151
|
selectedRef: style?.fillColorRef,
|
|
21149
21152
|
disabled: line,
|
|
21150
21153
|
onChange: onSetFillColor,
|
|
@@ -21182,7 +21185,7 @@ function Text3DProperties({
|
|
|
21182
21185
|
ts,
|
|
21183
21186
|
onUpdateTextStyle
|
|
21184
21187
|
}) {
|
|
21185
|
-
const { t } =
|
|
21188
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
21186
21189
|
const commitRecentColor = useRecentColorCommit();
|
|
21187
21190
|
const t3d = ts?.text3d;
|
|
21188
21191
|
const hasExtrusion = Boolean(t3d?.extrusionHeight && t3d.extrusionHeight > 0);
|
|
@@ -21229,7 +21232,7 @@ function Text3DProperties({
|
|
|
21229
21232
|
"input",
|
|
21230
21233
|
{
|
|
21231
21234
|
type: "color",
|
|
21232
|
-
value:
|
|
21235
|
+
value: chunkP2COO2QO_js.normalizeHexColor(t3d?.extrusionColor, "#888888"),
|
|
21233
21236
|
ref: commitRecentColor,
|
|
21234
21237
|
onChange: (e) => update3d({ extrusionColor: e.target.value }),
|
|
21235
21238
|
className: COLOR_CLS
|
|
@@ -21396,7 +21399,7 @@ function AdvancedTextFormatting({
|
|
|
21396
21399
|
onUpdateTextStyle,
|
|
21397
21400
|
numChange
|
|
21398
21401
|
}) {
|
|
21399
|
-
const { t } =
|
|
21402
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
21400
21403
|
const commitRecentColor = useRecentColorCommit();
|
|
21401
21404
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 rounded border border-border bg-card p-2 space-y-2", children: [
|
|
21402
21405
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[11px] uppercase tracking-wide text-muted-foreground", children: t("pptx.textProperties.advancedTextHeading") }),
|
|
@@ -21418,7 +21421,7 @@ function AdvancedTextFormatting({
|
|
|
21418
21421
|
"input",
|
|
21419
21422
|
{
|
|
21420
21423
|
type: "color",
|
|
21421
|
-
value:
|
|
21424
|
+
value: chunkP2COO2QO_js.normalizeHexColor(ts?.highlightColor, "#ffff00"),
|
|
21422
21425
|
ref: commitRecentColor,
|
|
21423
21426
|
onChange: (e) => onUpdateTextStyle({ highlightColor: e.target.value }),
|
|
21424
21427
|
disabled: !canEdit,
|
|
@@ -21560,7 +21563,7 @@ function TextReflectionSection({
|
|
|
21560
21563
|
onUpdateTextStyle,
|
|
21561
21564
|
numChange
|
|
21562
21565
|
}) {
|
|
21563
|
-
const { t } =
|
|
21566
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
21564
21567
|
const hasReflection = Boolean(ts?.textReflection);
|
|
21565
21568
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
21566
21569
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "inline-flex items-center gap-2 text-foreground", children: [
|
|
@@ -21668,7 +21671,7 @@ function TextEffectsPanel({
|
|
|
21668
21671
|
onUpdateTextStyle,
|
|
21669
21672
|
numChange
|
|
21670
21673
|
}) {
|
|
21671
|
-
const { t } =
|
|
21674
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
21672
21675
|
const commitRecentColor = useRecentColorCommit();
|
|
21673
21676
|
const hasShadow = Boolean(
|
|
21674
21677
|
ts?.textShadowColor || typeof ts?.textShadowBlur === "number" && ts.textShadowBlur > 0
|
|
@@ -21714,7 +21717,7 @@ function TextEffectsPanel({
|
|
|
21714
21717
|
"input",
|
|
21715
21718
|
{
|
|
21716
21719
|
type: "color",
|
|
21717
|
-
value:
|
|
21720
|
+
value: chunkP2COO2QO_js.normalizeHexColor(ts?.textShadowColor, "#000000"),
|
|
21718
21721
|
ref: commitRecentColor,
|
|
21719
21722
|
onChange: (e) => onUpdateTextStyle({ textShadowColor: e.target.value }),
|
|
21720
21723
|
className: COLOR_CLS2
|
|
@@ -21819,7 +21822,7 @@ function TextEffectsPanel({
|
|
|
21819
21822
|
"input",
|
|
21820
21823
|
{
|
|
21821
21824
|
type: "color",
|
|
21822
|
-
value:
|
|
21825
|
+
value: chunkP2COO2QO_js.normalizeHexColor(ts?.textGlowColor, "#ffff00"),
|
|
21823
21826
|
ref: commitRecentColor,
|
|
21824
21827
|
onChange: (e) => onUpdateTextStyle({ textGlowColor: e.target.value }),
|
|
21825
21828
|
className: COLOR_CLS2
|
|
@@ -21869,7 +21872,7 @@ function TextWarpGallery({
|
|
|
21869
21872
|
ts,
|
|
21870
21873
|
onUpdateTextStyle
|
|
21871
21874
|
}) {
|
|
21872
|
-
const { t } =
|
|
21875
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
21873
21876
|
const [expanded, setExpanded] = React108__default.default.useState(false);
|
|
21874
21877
|
const currentPreset = ts?.textWarpPreset || "textNoShape";
|
|
21875
21878
|
const descriptor = React108.useMemo(() => pptx.buildTextWarpGallery(ts?.textWarpPreset), [ts?.textWarpPreset]);
|
|
@@ -21950,7 +21953,7 @@ function ShapeTextPanels({
|
|
|
21950
21953
|
onUpdateElementStyle,
|
|
21951
21954
|
onUpdateTextStyle
|
|
21952
21955
|
}) {
|
|
21953
|
-
const { t } =
|
|
21956
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
21954
21957
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
21955
21958
|
pptx$1.hasShapeProperties(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
21956
21959
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.shape.type", "Shape Type") }),
|
|
@@ -21959,11 +21962,11 @@ function ShapeTextPanels({
|
|
|
21959
21962
|
{
|
|
21960
21963
|
value: selectedElement.shapeType || "rect",
|
|
21961
21964
|
disabled: !canEdit,
|
|
21962
|
-
className:
|
|
21965
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "w-full"),
|
|
21963
21966
|
onChange: (e) => onUpdateElement({
|
|
21964
21967
|
shapeType: e.target.value
|
|
21965
21968
|
}),
|
|
21966
|
-
children:
|
|
21969
|
+
children: chunkP2COO2QO_js.SHAPE_PRESETS.filter((p) => p.type !== "connector").map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.type, children: t(p.i18nKey) }, p.type))
|
|
21967
21970
|
}
|
|
21968
21971
|
)
|
|
21969
21972
|
] }),
|
|
@@ -21975,7 +21978,7 @@ function ShapeTextPanels({
|
|
|
21975
21978
|
selectedElement,
|
|
21976
21979
|
selectedShapeStyle: selectedElement.shapeStyle,
|
|
21977
21980
|
selectedShapeType: selectedElement.shapeType,
|
|
21978
|
-
selectedGradientStops:
|
|
21981
|
+
selectedGradientStops: chunkP2COO2QO_js.sanitizeGradientStops(
|
|
21979
21982
|
selectedElement.shapeStyle?.fillGradientStops
|
|
21980
21983
|
),
|
|
21981
21984
|
canEdit,
|
|
@@ -22011,7 +22014,7 @@ function ShapeTextPanels({
|
|
|
22011
22014
|
{
|
|
22012
22015
|
disabled: !canEdit,
|
|
22013
22016
|
"aria-label": "Text Color",
|
|
22014
|
-
value:
|
|
22017
|
+
value: chunkP2COO2QO_js.normalizeHexColor(selectedElement.textStyle?.color, "#000000"),
|
|
22015
22018
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
22016
22019
|
onApply: (hex) => onUpdateTextStyle({ color: hex, colorRef: void 0 }),
|
|
22017
22020
|
patch: textColorPatch
|
|
@@ -22102,7 +22105,7 @@ function TextFormatToggle({
|
|
|
22102
22105
|
{
|
|
22103
22106
|
type: "button",
|
|
22104
22107
|
disabled,
|
|
22105
|
-
className:
|
|
22108
|
+
className: chunkP2COO2QO_js.cn(
|
|
22106
22109
|
"px-2 py-1 rounded text-[11px] transition-colors max-md:min-w-[44px]! max-md:min-h-[44px]!",
|
|
22107
22110
|
italic && "italic",
|
|
22108
22111
|
underline && "underline",
|
|
@@ -22271,7 +22274,7 @@ function SmartArtLayoutSwitcher({
|
|
|
22271
22274
|
canEdit,
|
|
22272
22275
|
onUpdateSmartArt
|
|
22273
22276
|
}) {
|
|
22274
|
-
const { t } =
|
|
22277
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
22275
22278
|
const currentLayout = smartArtData.resolvedLayoutType ?? "list";
|
|
22276
22279
|
const handleLayoutSwitch = (newLayout) => {
|
|
22277
22280
|
if (!canEdit || newLayout === currentLayout) {
|
|
@@ -22290,7 +22293,7 @@ function SmartArtLayoutSwitcher({
|
|
|
22290
22293
|
type: "button",
|
|
22291
22294
|
"data-testid": `smartart-layout-${type}`,
|
|
22292
22295
|
disabled: !canEdit,
|
|
22293
|
-
className:
|
|
22296
|
+
className: chunkP2COO2QO_js.cn(
|
|
22294
22297
|
"flex flex-col items-center gap-0.5 rounded border p-1.5 transition-colors",
|
|
22295
22298
|
"text-[9px] leading-tight",
|
|
22296
22299
|
isActive ? "border-primary bg-primary/15 text-primary" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -22317,7 +22320,7 @@ function SmartArtStyleControls({
|
|
|
22317
22320
|
onChangeColorScheme,
|
|
22318
22321
|
onChangeStyle
|
|
22319
22322
|
}) {
|
|
22320
|
-
const { t } =
|
|
22323
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
22321
22324
|
const translate = React108__default.default.useCallback((key) => t(key), [t]);
|
|
22322
22325
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22323
22326
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1 text-[11px]", children: [
|
|
@@ -22328,7 +22331,7 @@ function SmartArtStyleControls({
|
|
|
22328
22331
|
disabled: !canEdit,
|
|
22329
22332
|
"data-testid": "smartart-color-scheme",
|
|
22330
22333
|
"aria-label": t("pptx.smartart.colorScheme"),
|
|
22331
|
-
className:
|
|
22334
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "w-full"),
|
|
22332
22335
|
value: colorScheme,
|
|
22333
22336
|
onChange: (e) => onChangeColorScheme(e.target.value),
|
|
22334
22337
|
children: colorSchemes.map((cs) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: cs, children: pptx.schemaLabel(pptx.SMARTART_COLOR_SCHEME_LABEL_KEYS, cs, translate) }, cs))
|
|
@@ -22343,7 +22346,7 @@ function SmartArtStyleControls({
|
|
|
22343
22346
|
type: "button",
|
|
22344
22347
|
disabled: !canEdit,
|
|
22345
22348
|
"aria-pressed": style === s,
|
|
22346
|
-
className:
|
|
22349
|
+
className: chunkP2COO2QO_js.cn(
|
|
22347
22350
|
"flex-1 px-2 py-1 text-[10px] rounded border transition-colors",
|
|
22348
22351
|
style === s ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground hover:bg-muted"
|
|
22349
22352
|
),
|
|
@@ -22369,14 +22372,14 @@ function SmartArtPropertiesPanel({
|
|
|
22369
22372
|
onUpdateElement,
|
|
22370
22373
|
box
|
|
22371
22374
|
}) {
|
|
22372
|
-
const { t } =
|
|
22375
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
22373
22376
|
const { pushColor } = useRecentColors();
|
|
22374
22377
|
const paneRef = React108__default.default.useRef(null);
|
|
22375
22378
|
const applySmartArtData = (newData) => {
|
|
22376
22379
|
const reflowed = box ? pptx.rebuildDrawingShapesIfCleared(
|
|
22377
22380
|
newData,
|
|
22378
22381
|
newData.layout,
|
|
22379
|
-
|
|
22382
|
+
chunkF5UOILTY_js.resolveSmartArtDataPalette(newData),
|
|
22380
22383
|
newData.style ?? "flat",
|
|
22381
22384
|
"inspector",
|
|
22382
22385
|
box
|
|
@@ -22447,9 +22450,9 @@ function TableDataGrid({
|
|
|
22447
22450
|
canEdit,
|
|
22448
22451
|
onUpdateElement
|
|
22449
22452
|
}) {
|
|
22450
|
-
const { t } =
|
|
22453
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
22451
22454
|
const grid = pptx.buildTableDataGrid(tableElement);
|
|
22452
|
-
const { viewportWidth } =
|
|
22455
|
+
const { viewportWidth } = chunkF5UOILTY_js.useIsMobile();
|
|
22453
22456
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
22454
22457
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
22455
22458
|
const stickyGutterClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10" : "";
|
|
@@ -22613,7 +22616,7 @@ function TableCellPatternFill({
|
|
|
22613
22616
|
canEdit,
|
|
22614
22617
|
onUpdateCellStyle
|
|
22615
22618
|
}) {
|
|
22616
|
-
const { t } =
|
|
22619
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
22617
22620
|
const commitRecentColor = useRecentColorCommit();
|
|
22618
22621
|
const translate = (key) => t(key);
|
|
22619
22622
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
@@ -22668,7 +22671,7 @@ function TableCellAdvancedFill({
|
|
|
22668
22671
|
canEdit,
|
|
22669
22672
|
onUpdateCellStyle
|
|
22670
22673
|
}) {
|
|
22671
|
-
const { t } =
|
|
22674
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
22672
22675
|
const fillMode = cellStyle.fillMode ?? "solid";
|
|
22673
22676
|
const handleFillModeChange = (mode) => {
|
|
22674
22677
|
const next = mode;
|
|
@@ -22756,7 +22759,7 @@ function GradientControls({
|
|
|
22756
22759
|
canEdit,
|
|
22757
22760
|
onUpdateCellStyle
|
|
22758
22761
|
}) {
|
|
22759
|
-
const { t } =
|
|
22762
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
22760
22763
|
const commitRecentColor = useRecentColorCommit();
|
|
22761
22764
|
const stops = cellStyle.gradientFillStops ?? [];
|
|
22762
22765
|
const gradType = cellStyle.gradientFillType ?? "linear";
|
|
@@ -22854,7 +22857,7 @@ function TableCellColorField({
|
|
|
22854
22857
|
disabled,
|
|
22855
22858
|
onCommit
|
|
22856
22859
|
}) {
|
|
22857
|
-
const hex =
|
|
22860
|
+
const hex = chunkP2COO2QO_js.normalizeHexColor(value, fallback);
|
|
22858
22861
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
22859
22862
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: label }),
|
|
22860
22863
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -22884,7 +22887,7 @@ function TableCellFormattingPanel({
|
|
|
22884
22887
|
onUpdateTableData,
|
|
22885
22888
|
onUpdateMergeRows
|
|
22886
22889
|
}) {
|
|
22887
|
-
const { t } =
|
|
22890
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
22888
22891
|
const { rowIndex, columnIndex } = tableEditorState;
|
|
22889
22892
|
const cell = td.rows[rowIndex]?.cells[columnIndex];
|
|
22890
22893
|
if (!cell) {
|
|
@@ -22962,7 +22965,7 @@ function TableCellFormattingPanel({
|
|
|
22962
22965
|
{
|
|
22963
22966
|
type: "button",
|
|
22964
22967
|
disabled: !canEdit,
|
|
22965
|
-
className:
|
|
22968
|
+
className: chunkP2COO2QO_js.cn(
|
|
22966
22969
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22967
22970
|
cls,
|
|
22968
22971
|
cs[key] ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
@@ -22981,7 +22984,7 @@ function TableCellFormattingPanel({
|
|
|
22981
22984
|
{
|
|
22982
22985
|
type: "button",
|
|
22983
22986
|
disabled: !canEdit,
|
|
22984
|
-
className:
|
|
22987
|
+
className: chunkP2COO2QO_js.cn(
|
|
22985
22988
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22986
22989
|
cs.align === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
22987
22990
|
),
|
|
@@ -22999,7 +23002,7 @@ function TableCellFormattingPanel({
|
|
|
22999
23002
|
{
|
|
23000
23003
|
type: "button",
|
|
23001
23004
|
disabled: !canEdit,
|
|
23002
|
-
className:
|
|
23005
|
+
className: chunkP2COO2QO_js.cn(
|
|
23003
23006
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
23004
23007
|
cs.vAlign === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
23005
23008
|
),
|
|
@@ -23022,7 +23025,7 @@ function TableCellFormattingPanel({
|
|
|
23022
23025
|
DebouncedColorInput,
|
|
23023
23026
|
{
|
|
23024
23027
|
disabled: !canEdit,
|
|
23025
|
-
value:
|
|
23028
|
+
value: chunkP2COO2QO_js.normalizeHexColor(cs[colorKey], "#374151"),
|
|
23026
23029
|
className: "w-7 h-6 rounded border border-border bg-transparent cursor-pointer shrink-0",
|
|
23027
23030
|
onCommit: (hex) => updateCellStyle({ [colorKey]: hex })
|
|
23028
23031
|
}
|
|
@@ -23032,7 +23035,7 @@ function TableCellFormattingPanel({
|
|
|
23032
23035
|
{
|
|
23033
23036
|
type: "number",
|
|
23034
23037
|
disabled: !canEdit,
|
|
23035
|
-
className:
|
|
23038
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "w-14"),
|
|
23036
23039
|
min: 0,
|
|
23037
23040
|
max: 10,
|
|
23038
23041
|
value: pptx.inspectorNumber(cs[widthKey], 1),
|
|
@@ -23048,7 +23051,7 @@ function TableCellFormattingPanel({
|
|
|
23048
23051
|
{
|
|
23049
23052
|
type: "button",
|
|
23050
23053
|
disabled: !canEdit,
|
|
23051
|
-
className:
|
|
23054
|
+
className: chunkP2COO2QO_js.cn(BTN2, "text-center"),
|
|
23052
23055
|
onClick: () => {
|
|
23053
23056
|
const newRows = pptx.computeMergeCellRight(td, rowIndex, columnIndex);
|
|
23054
23057
|
if (newRows) {
|
|
@@ -23063,7 +23066,7 @@ function TableCellFormattingPanel({
|
|
|
23063
23066
|
{
|
|
23064
23067
|
type: "button",
|
|
23065
23068
|
disabled: !canEdit,
|
|
23066
|
-
className:
|
|
23069
|
+
className: chunkP2COO2QO_js.cn(BTN2, "text-center"),
|
|
23067
23070
|
onClick: () => {
|
|
23068
23071
|
const newRows = pptx.computeMergeCellDown(td, rowIndex, columnIndex);
|
|
23069
23072
|
if (newRows) {
|
|
@@ -23078,7 +23081,7 @@ function TableCellFormattingPanel({
|
|
|
23078
23081
|
{
|
|
23079
23082
|
type: "button",
|
|
23080
23083
|
disabled: !canEdit,
|
|
23081
|
-
className:
|
|
23084
|
+
className: chunkP2COO2QO_js.cn(BTN2, "text-center"),
|
|
23082
23085
|
onClick: () => {
|
|
23083
23086
|
const newRows = pptx.computeSplitCell(td, rowIndex, columnIndex);
|
|
23084
23087
|
if (newRows) {
|
|
@@ -23097,7 +23100,7 @@ function TableStyleEditorFields({
|
|
|
23097
23100
|
canEdit,
|
|
23098
23101
|
onEdit
|
|
23099
23102
|
}) {
|
|
23100
|
-
const { t } =
|
|
23103
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
23101
23104
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
23102
23105
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
23103
23106
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.tableStyleEditor.fillSection") }),
|
|
@@ -23202,7 +23205,7 @@ function BorderSideRow({
|
|
|
23202
23205
|
canEdit,
|
|
23203
23206
|
onEdit
|
|
23204
23207
|
}) {
|
|
23205
|
-
const { t } =
|
|
23208
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
23206
23209
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-[11px]", children: [
|
|
23207
23210
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-28 shrink-0 text-muted-foreground", children: t(pptx.TABLE_STYLE_BORDER_SIDE_LABEL_KEYS[side]) }),
|
|
23208
23211
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23259,7 +23262,7 @@ function TableStyleEditor({
|
|
|
23259
23262
|
onAssignStyle,
|
|
23260
23263
|
onClose
|
|
23261
23264
|
}) {
|
|
23262
|
-
const { t } =
|
|
23265
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
23263
23266
|
const themeColorMap = useThemeColorMap();
|
|
23264
23267
|
const [activeStyleId, setActiveStyleId] = React108.useState(
|
|
23265
23268
|
styleId ? pptx$1.normalizeTableStyleGuid(styleId) : ""
|
|
@@ -23351,7 +23354,7 @@ function TablePropertiesPanel({
|
|
|
23351
23354
|
onTableStyleMapChange,
|
|
23352
23355
|
onDeleteTableStyle
|
|
23353
23356
|
}) {
|
|
23354
|
-
const { t } =
|
|
23357
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
23355
23358
|
const [showStyleEditor, setShowStyleEditor] = React108.useState(false);
|
|
23356
23359
|
const td = tableElement.tableData;
|
|
23357
23360
|
if (!td) {
|
|
@@ -23433,7 +23436,7 @@ function TablePropertiesPanel({
|
|
|
23433
23436
|
] }),
|
|
23434
23437
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
23435
23438
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.table.stylePresets") }),
|
|
23436
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children:
|
|
23439
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children: chunkP2COO2QO_js.TABLE_STYLE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
23437
23440
|
"button",
|
|
23438
23441
|
{
|
|
23439
23442
|
type: "button",
|
|
@@ -23581,7 +23584,7 @@ function ElementInspectorBody({
|
|
|
23581
23584
|
onUpdateTextStyle,
|
|
23582
23585
|
onMoveLayer
|
|
23583
23586
|
}) {
|
|
23584
|
-
const { t } =
|
|
23587
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
23585
23588
|
const isLocked = pptx.isElementLocked(selectedElement);
|
|
23586
23589
|
const handleToggleLock = () => {
|
|
23587
23590
|
if (!canEdit) {
|
|
@@ -23731,7 +23734,7 @@ function CommentMentionTextarea({
|
|
|
23731
23734
|
className,
|
|
23732
23735
|
ariaLabel
|
|
23733
23736
|
}) {
|
|
23734
|
-
const { t } =
|
|
23737
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
23735
23738
|
const textareaRef = React108.useRef(null);
|
|
23736
23739
|
const [caret, setCaret] = React108.useState(value.length);
|
|
23737
23740
|
const [highlighted, setHighlighted] = React108.useState(0);
|
|
@@ -23820,7 +23823,7 @@ function CommentMentionTextarea({
|
|
|
23820
23823
|
"data-testid": "pptx-comment-mention-option",
|
|
23821
23824
|
role: "option",
|
|
23822
23825
|
"aria-selected": index === safeHighlighted,
|
|
23823
|
-
className:
|
|
23826
|
+
className: chunkP2COO2QO_js.cn(
|
|
23824
23827
|
"block w-full px-2 py-1 text-left text-[11px] hover:bg-accent",
|
|
23825
23828
|
index === safeHighlighted && "bg-accent"
|
|
23826
23829
|
),
|
|
@@ -23867,7 +23870,7 @@ function InspectorCommentReplyForm({
|
|
|
23867
23870
|
onSubmit,
|
|
23868
23871
|
onCancel
|
|
23869
23872
|
}) {
|
|
23870
|
-
const { t } =
|
|
23873
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
23871
23874
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 space-y-1.5 pl-3 border-l-2 border-l-primary/40", children: [
|
|
23872
23875
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23873
23876
|
CommentMentionTextarea,
|
|
@@ -23933,7 +23936,7 @@ function InspectorCommentRow({
|
|
|
23933
23936
|
onSelectElement,
|
|
23934
23937
|
depth = 0
|
|
23935
23938
|
}) {
|
|
23936
|
-
const { t } =
|
|
23939
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
23937
23940
|
const isEditing = editingCommentId === comment.id;
|
|
23938
23941
|
const isReplying = replyingToCommentId === comment.id;
|
|
23939
23942
|
const replyDraft = replyDraftByCommentId[comment.id] ?? "";
|
|
@@ -23943,7 +23946,7 @@ function InspectorCommentRow({
|
|
|
23943
23946
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23944
23947
|
"div",
|
|
23945
23948
|
{
|
|
23946
|
-
className:
|
|
23949
|
+
className: chunkP2COO2QO_js.cn(
|
|
23947
23950
|
"rounded border border-border bg-card p-2",
|
|
23948
23951
|
depth > 0 && "ml-3 border-l-2 border-l-primary/40"
|
|
23949
23952
|
),
|
|
@@ -23957,7 +23960,7 @@ function InspectorCommentRow({
|
|
|
23957
23960
|
t("pptx.comments.resolved")
|
|
23958
23961
|
] })
|
|
23959
23962
|
] }),
|
|
23960
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children:
|
|
23963
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children: chunkP2COO2QO_js.formatCommentTimestamp(comment.createdAt) })
|
|
23961
23964
|
] }),
|
|
23962
23965
|
comment.elementId && (targetElement ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23963
23966
|
"button",
|
|
@@ -23965,12 +23968,12 @@ function InspectorCommentRow({
|
|
|
23965
23968
|
type: "button",
|
|
23966
23969
|
className: "mt-1 inline-flex items-center gap-1 rounded bg-primary/20 px-1.5 py-0.5 text-[10px] text-primary hover:bg-primary/30 transition-colors",
|
|
23967
23970
|
title: t("pptx.comments.commentingOn", {
|
|
23968
|
-
element:
|
|
23971
|
+
element: chunkP2COO2QO_js.getElementLabel(targetElement)
|
|
23969
23972
|
}),
|
|
23970
23973
|
onClick: () => onSelectElement(targetElement.id),
|
|
23971
23974
|
children: [
|
|
23972
23975
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
23973
|
-
|
|
23976
|
+
chunkP2COO2QO_js.getElementLabel(targetElement)
|
|
23974
23977
|
]
|
|
23975
23978
|
}
|
|
23976
23979
|
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 inline-flex items-center gap-1 rounded bg-muted/60 px-1.5 py-0.5 text-[10px] text-muted-foreground", children: t("pptx.comments.deletedElement") })),
|
|
@@ -24039,7 +24042,7 @@ function InspectorCommentRow({
|
|
|
24039
24042
|
"button",
|
|
24040
24043
|
{
|
|
24041
24044
|
type: "button",
|
|
24042
|
-
className:
|
|
24045
|
+
className: chunkP2COO2QO_js.cn(
|
|
24043
24046
|
"inline-flex items-center justify-center p-1.5 border-l border-border transition-colors",
|
|
24044
24047
|
comment.resolved ? "bg-green-900/40 text-green-300 hover:bg-green-900/60" : "hover:bg-accent text-foreground hover:text-foreground"
|
|
24045
24048
|
),
|
|
@@ -24145,7 +24148,7 @@ function InspectorCommentsSection({
|
|
|
24145
24148
|
onSubmitReply,
|
|
24146
24149
|
onSelectElement
|
|
24147
24150
|
}) {
|
|
24148
|
-
const { t } =
|
|
24151
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24149
24152
|
const HEADING_CLS = "text-[11px] uppercase tracking-wide text-muted-foreground";
|
|
24150
24153
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
24151
24154
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -24182,7 +24185,7 @@ function InspectorCommentsSection({
|
|
|
24182
24185
|
selectedElement && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1 rounded bg-primary/20 px-1.5 py-0.5 text-[10px] text-primary", children: [
|
|
24183
24186
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
24184
24187
|
t("pptx.comments.commentingOn", {
|
|
24185
|
-
element:
|
|
24188
|
+
element: chunkP2COO2QO_js.getElementLabel(selectedElement)
|
|
24186
24189
|
})
|
|
24187
24190
|
] }),
|
|
24188
24191
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -24193,7 +24196,7 @@ function InspectorCommentsSection({
|
|
|
24193
24196
|
authors: commentAuthors,
|
|
24194
24197
|
rows: 2,
|
|
24195
24198
|
placeholder: selectedElement ? t("pptx.comments.addOnElement", {
|
|
24196
|
-
element:
|
|
24199
|
+
element: chunkP2COO2QO_js.getElementLabel(selectedElement)
|
|
24197
24200
|
}) : t("pptx.comments.addPlaceholder"),
|
|
24198
24201
|
className: "w-full bg-muted border border-border rounded px-2 py-1 text-xs resize-y outline-none focus:border-primary",
|
|
24199
24202
|
onChange: onSetCommentDraft,
|
|
@@ -24206,7 +24209,7 @@ function InspectorCommentsSection({
|
|
|
24206
24209
|
type: "button",
|
|
24207
24210
|
onClick: onAddComment,
|
|
24208
24211
|
disabled: !commentDraft.trim(),
|
|
24209
|
-
className:
|
|
24212
|
+
className: chunkP2COO2QO_js.cn(
|
|
24210
24213
|
"w-full inline-flex items-center justify-center gap-1 rounded px-2 py-1 text-[11px] font-medium transition-colors max-md:min-h-[44px]!",
|
|
24211
24214
|
commentDraft.trim() ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
24212
24215
|
),
|
|
@@ -24231,7 +24234,7 @@ function InspectorElementsTab({
|
|
|
24231
24234
|
onSelectElement,
|
|
24232
24235
|
onUpdateSlide
|
|
24233
24236
|
}) {
|
|
24234
|
-
const { t } =
|
|
24237
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24235
24238
|
const toggleHidden = (elementId2) => {
|
|
24236
24239
|
const elements2 = activeSlide?.elements;
|
|
24237
24240
|
if (!canEdit || !elements2) {
|
|
@@ -24247,13 +24250,13 @@ function InspectorElementsTab({
|
|
|
24247
24250
|
};
|
|
24248
24251
|
if (!activeSlide) {
|
|
24249
24252
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
24250
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
24253
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkP2COO2QO_js.cn(HEADING2, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
24251
24254
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground italic", children: t("pptx.inspector.noSlideSelected") })
|
|
24252
24255
|
] });
|
|
24253
24256
|
}
|
|
24254
24257
|
const elements = activeSlide.elements || [];
|
|
24255
24258
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", "data-pptx-elements-tab": true, children: [
|
|
24256
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
24259
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkP2COO2QO_js.cn(HEADING2, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
24257
24260
|
[...elements].reverse().map((el, reversedIndex) => {
|
|
24258
24261
|
const index = elements.length - 1 - reversedIndex;
|
|
24259
24262
|
const selected = selectedElementId === el.id || selectedElementIds.includes(el.id);
|
|
@@ -24261,7 +24264,7 @@ function InspectorElementsTab({
|
|
|
24261
24264
|
"div",
|
|
24262
24265
|
{
|
|
24263
24266
|
title: `${el.type} - ${el.id}`,
|
|
24264
|
-
className:
|
|
24267
|
+
className: chunkP2COO2QO_js.cn(
|
|
24265
24268
|
"flex items-center gap-2 px-2 py-1 rounded cursor-pointer transition-colors",
|
|
24266
24269
|
selected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground"
|
|
24267
24270
|
),
|
|
@@ -24297,8 +24300,8 @@ function InspectorPaneHeader({
|
|
|
24297
24300
|
onSetActiveTab,
|
|
24298
24301
|
onClose
|
|
24299
24302
|
}) {
|
|
24300
|
-
const { t } =
|
|
24301
|
-
const { viewportWidth } =
|
|
24303
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24304
|
+
const { viewportWidth } = chunkF5UOILTY_js.useIsMobile();
|
|
24302
24305
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
24303
24306
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
24304
24307
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -24321,7 +24324,7 @@ function InspectorPaneHeader({
|
|
|
24321
24324
|
type: "button",
|
|
24322
24325
|
title: t(labelKey),
|
|
24323
24326
|
style: touchBtnStyle,
|
|
24324
|
-
className:
|
|
24327
|
+
className: chunkP2COO2QO_js.cn(
|
|
24325
24328
|
"flex items-center justify-center gap-1 px-2 py-1 rounded text-[11px] transition-colors",
|
|
24326
24329
|
activeTab === key ? "bg-primary text-white" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
24327
24330
|
),
|
|
@@ -24381,7 +24384,7 @@ function CustomPropertiesBlock({
|
|
|
24381
24384
|
canEdit,
|
|
24382
24385
|
onUpdate
|
|
24383
24386
|
}) {
|
|
24384
|
-
const { t } =
|
|
24387
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24385
24388
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
24386
24389
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
24387
24390
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.documentProperties.custom.heading") }),
|
|
@@ -24435,7 +24438,7 @@ function CustomPropertiesBlock({
|
|
|
24435
24438
|
"button",
|
|
24436
24439
|
{
|
|
24437
24440
|
type: "button",
|
|
24438
|
-
className:
|
|
24441
|
+
className: chunkP2COO2QO_js.cn(BTN2, "px-1.5 text-red-400 hover:text-red-300"),
|
|
24439
24442
|
onClick: () => onUpdate(customProperties.filter((_, i) => i !== index)),
|
|
24440
24443
|
children: "\xD7"
|
|
24441
24444
|
}
|
|
@@ -24448,7 +24451,7 @@ function NotesHandoutCard({
|
|
|
24448
24451
|
notesMaster,
|
|
24449
24452
|
handoutMaster
|
|
24450
24453
|
}) {
|
|
24451
|
-
const { t } =
|
|
24454
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24452
24455
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
24453
24456
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.documentProperties.notesHandoutHeading") }),
|
|
24454
24457
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px] text-muted-foreground", children: [
|
|
@@ -24485,7 +24488,7 @@ function DocumentPropertiesCard({
|
|
|
24485
24488
|
onUpdateAppProperties,
|
|
24486
24489
|
onUpdateCustomProperties
|
|
24487
24490
|
}) {
|
|
24488
|
-
const { t } =
|
|
24491
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24489
24492
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
24490
24493
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.documentProperties.documentHeading") }),
|
|
24491
24494
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px] text-muted-foreground", children: [
|
|
@@ -24539,7 +24542,7 @@ function DocumentPropertiesCard({
|
|
|
24539
24542
|
function SlideSizeRescalePrompt({
|
|
24540
24543
|
onChoose
|
|
24541
24544
|
}) {
|
|
24542
|
-
const { t } =
|
|
24545
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24543
24546
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5 rounded border border-border bg-muted/40 p-2 text-[11px]", children: [
|
|
24544
24547
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: t("pptx.slideSize.rescaleTitle") }),
|
|
24545
24548
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: t("pptx.slideSize.rescaleDescription") }),
|
|
@@ -24581,7 +24584,7 @@ function SlideSizeCard({
|
|
|
24581
24584
|
onUpdateSlideSize,
|
|
24582
24585
|
hasContent
|
|
24583
24586
|
}) {
|
|
24584
|
-
const { t } =
|
|
24587
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24585
24588
|
const selection = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize });
|
|
24586
24589
|
const presetDisabled = !canEdit || !onUpdateSlideSize;
|
|
24587
24590
|
const [pendingSize, setPendingSize] = React108.useState(null);
|
|
@@ -24692,7 +24695,7 @@ function PresentationSettingsCard({
|
|
|
24692
24695
|
canEdit,
|
|
24693
24696
|
onUpdate
|
|
24694
24697
|
}) {
|
|
24695
|
-
const { t } =
|
|
24698
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24696
24699
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CARD2} pptx-editor-presentation-card`, children: [
|
|
24697
24700
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.slideInspector.presentation") }),
|
|
24698
24701
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-chrome": "presentation-fields", className: "space-y-1.5 text-[11px]", children: [
|
|
@@ -24763,7 +24766,7 @@ function PresentationSettingsCard({
|
|
|
24763
24766
|
min: 1,
|
|
24764
24767
|
max: 16,
|
|
24765
24768
|
disabled: !canEdit,
|
|
24766
|
-
className:
|
|
24769
|
+
className: chunkP2COO2QO_js.cn(INPUT2, "w-20"),
|
|
24767
24770
|
value: pptx.printPropertiesSlidesPerPage(presentationProperties.printProperties),
|
|
24768
24771
|
onChange: (e) => onUpdate({
|
|
24769
24772
|
printProperties: pptx.withSlidesPerPage(
|
|
@@ -24784,7 +24787,7 @@ function ThemeSelectorCard({
|
|
|
24784
24787
|
canEdit,
|
|
24785
24788
|
onApplyTheme
|
|
24786
24789
|
}) {
|
|
24787
|
-
const { t } =
|
|
24790
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24788
24791
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
24789
24792
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.documentProperties.themeHeading") }),
|
|
24790
24793
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px]", children: [
|
|
@@ -24847,7 +24850,7 @@ function SlideThemeOverridePanel({
|
|
|
24847
24850
|
canEdit,
|
|
24848
24851
|
onUpdateSlide
|
|
24849
24852
|
}) {
|
|
24850
|
-
const { t } =
|
|
24853
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24851
24854
|
const translate = React108.useCallback((key) => t(key), [t]);
|
|
24852
24855
|
const override = activeSlide?.clrMapOverride;
|
|
24853
24856
|
const isOverrideActive = override !== void 0;
|
|
@@ -24954,7 +24957,7 @@ function DirectionPicker({
|
|
|
24954
24957
|
disabled,
|
|
24955
24958
|
onChange
|
|
24956
24959
|
}) {
|
|
24957
|
-
const { t } =
|
|
24960
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
24958
24961
|
if (directions.length <= 3) {
|
|
24959
24962
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1", children: directions.map((dir) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24960
24963
|
"button",
|
|
@@ -24996,10 +24999,10 @@ function TransitionPreview({
|
|
|
24996
24999
|
const previewRef = React108.useRef(null);
|
|
24997
25000
|
const [playing, setPlaying] = React108.useState(false);
|
|
24998
25001
|
const [animKey, setAnimKey] = React108.useState(0);
|
|
24999
|
-
const { t } =
|
|
25002
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
25000
25003
|
const durationMs = transition.durationMs ?? 500;
|
|
25001
25004
|
const animations = React108.useMemo(
|
|
25002
|
-
() =>
|
|
25005
|
+
() => chunkF5UOILTY_js.getSlideTransitionAnimations(
|
|
25003
25006
|
transition.type,
|
|
25004
25007
|
durationMs,
|
|
25005
25008
|
transition.direction,
|
|
@@ -25068,7 +25071,7 @@ function TransitionPreview({
|
|
|
25068
25071
|
]
|
|
25069
25072
|
}
|
|
25070
25073
|
),
|
|
25071
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
25074
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkF5UOILTY_js.SLIDE_TRANSITION_KEYFRAMES })
|
|
25072
25075
|
] });
|
|
25073
25076
|
}
|
|
25074
25077
|
var DEFAULT_DURATION_MS = 320;
|
|
@@ -25080,7 +25083,7 @@ function SlideTransitionSection({
|
|
|
25080
25083
|
canEdit = true,
|
|
25081
25084
|
onTransitionChange
|
|
25082
25085
|
}) {
|
|
25083
|
-
const { t } =
|
|
25086
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
25084
25087
|
if (!activeSlide) {
|
|
25085
25088
|
return null;
|
|
25086
25089
|
}
|
|
@@ -25111,7 +25114,7 @@ function SlideTransitionSection({
|
|
|
25111
25114
|
type: e.target.value
|
|
25112
25115
|
}),
|
|
25113
25116
|
className: "bg-muted border border-border rounded px-2 py-1 max-md:min-h-[44px]!",
|
|
25114
|
-
children:
|
|
25117
|
+
children: chunkP2COO2QO_js.SLIDE_TRANSITION_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: t(option.i18nKey) }, option.value))
|
|
25115
25118
|
}
|
|
25116
25119
|
)
|
|
25117
25120
|
] }),
|
|
@@ -25269,7 +25272,7 @@ function TagsSection({
|
|
|
25269
25272
|
onUpdateTagCollections,
|
|
25270
25273
|
canEdit
|
|
25271
25274
|
}) {
|
|
25272
|
-
const { t } =
|
|
25275
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
25273
25276
|
const [collapsed, setCollapsed] = React108.useState(true);
|
|
25274
25277
|
const allTags = pptx.flattenTagCollections(tagCollections);
|
|
25275
25278
|
const updateTag = (colIdx, tagIdx, field, newValue) => {
|
|
@@ -25327,7 +25330,7 @@ function TagsSection({
|
|
|
25327
25330
|
"button",
|
|
25328
25331
|
{
|
|
25329
25332
|
type: "button",
|
|
25330
|
-
className:
|
|
25333
|
+
className: chunkP2COO2QO_js.cn(BTN2, "px-1.5 text-red-400 hover:text-red-300"),
|
|
25331
25334
|
title: t("pptx.tags.deleteTag"),
|
|
25332
25335
|
onClick: () => deleteTag(tag.colIdx, tag.tagIdx),
|
|
25333
25336
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuTrash2, { className: "w-3 h-3" })
|
|
@@ -25369,7 +25372,7 @@ function PresentationPropertiesPanel({
|
|
|
25369
25372
|
tagCollections,
|
|
25370
25373
|
onUpdateTagCollections
|
|
25371
25374
|
}) {
|
|
25372
|
-
const { t } =
|
|
25375
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
25373
25376
|
const handleTransitionChange = React108__default.default.useCallback(
|
|
25374
25377
|
(updates) => {
|
|
25375
25378
|
onUpdateSlide({
|
|
@@ -25456,7 +25459,7 @@ function PresentationPropertiesPanel({
|
|
|
25456
25459
|
canEdit
|
|
25457
25460
|
}
|
|
25458
25461
|
) }),
|
|
25459
|
-
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-inspector-card": "slide", className:
|
|
25462
|
+
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-inspector-card": "slide", className: chunkP2COO2QO_js.cn(CARD2, "space-y-1"), children: [
|
|
25460
25463
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: "Slide" }),
|
|
25461
25464
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[11px] text-muted-foreground", children: [
|
|
25462
25465
|
activeSlide.elements?.length ?? 0,
|
|
@@ -25474,17 +25477,17 @@ function SlideBackgroundPanel({
|
|
|
25474
25477
|
onSetTemplateBackground,
|
|
25475
25478
|
onGetTemplateBackgroundColor
|
|
25476
25479
|
}) {
|
|
25477
|
-
const { t } =
|
|
25480
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
25478
25481
|
const bgImageInputRef = React108.useRef(null);
|
|
25479
25482
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
25480
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
25483
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkP2COO2QO_js.cn(CARD2, "space-y-2"), children: [
|
|
25481
25484
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.viewer.background") }),
|
|
25482
25485
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
25483
25486
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-10 shrink-0", children: t("pptx.slideBackground.colour") }),
|
|
25484
25487
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25485
25488
|
DebouncedColorInput,
|
|
25486
25489
|
{
|
|
25487
|
-
value:
|
|
25490
|
+
value: chunkP2COO2QO_js.normalizeHexColor(activeSlide.backgroundColor, "#ffffff"),
|
|
25488
25491
|
disabled: !canEdit,
|
|
25489
25492
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
25490
25493
|
onCommit: (hex) => onUpdateSlide({ backgroundColor: hex })
|
|
@@ -25523,7 +25526,7 @@ function SlideBackgroundPanel({
|
|
|
25523
25526
|
"button",
|
|
25524
25527
|
{
|
|
25525
25528
|
type: "button",
|
|
25526
|
-
className:
|
|
25529
|
+
className: chunkP2COO2QO_js.cn(BTN2, "flex-1 text-center"),
|
|
25527
25530
|
disabled: !canEdit,
|
|
25528
25531
|
onClick: () => bgImageInputRef.current?.click(),
|
|
25529
25532
|
children: activeSlide.backgroundImage ? t("pptx.slideBackground.replaceImage") : t("pptx.slideBackground.chooseImage")
|
|
@@ -25556,7 +25559,7 @@ function SlideBackgroundPanel({
|
|
|
25556
25559
|
"button",
|
|
25557
25560
|
{
|
|
25558
25561
|
type: "button",
|
|
25559
|
-
className:
|
|
25562
|
+
className: chunkP2COO2QO_js.cn(BTN2, "w-full text-center text-red-400 hover:text-red-300"),
|
|
25560
25563
|
disabled: !pptx.slideBackgroundClearState(activeSlide, canEdit).enabled,
|
|
25561
25564
|
onClick: () => onUpdateSlide(pptx.slideBackgroundClearPatch()),
|
|
25562
25565
|
children: t("pptx.slideBackground.clearBackground")
|
|
@@ -25593,21 +25596,21 @@ function TemplateBackgroundCard({
|
|
|
25593
25596
|
onSetTemplateBackground,
|
|
25594
25597
|
onGetTemplateBackgroundColor
|
|
25595
25598
|
}) {
|
|
25596
|
-
const { t } =
|
|
25599
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
25597
25600
|
const rows = pptx.resolveTemplateBackgroundRows(
|
|
25598
25601
|
activeSlide,
|
|
25599
25602
|
slideMasters,
|
|
25600
25603
|
t("pptx.master.layout"),
|
|
25601
25604
|
t("pptx.master.master")
|
|
25602
25605
|
);
|
|
25603
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
25606
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkP2COO2QO_js.cn(CARD2, "space-y-2"), children: [
|
|
25604
25607
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.slideBackground.templateBackgroundsHeading") }),
|
|
25605
25608
|
rows.layout && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
25606
25609
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-14 shrink-0 truncate", title: rows.layout.title, children: t("pptx.master.layout") }),
|
|
25607
25610
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25608
25611
|
DebouncedColorInput,
|
|
25609
25612
|
{
|
|
25610
|
-
value:
|
|
25613
|
+
value: chunkP2COO2QO_js.normalizeHexColor(onGetTemplateBackgroundColor(rows.layout.path), "#ffffff"),
|
|
25611
25614
|
disabled: !canEdit,
|
|
25612
25615
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
25613
25616
|
onCommit: (hex) => onSetTemplateBackground(rows.layout.path, hex)
|
|
@@ -25620,7 +25623,7 @@ function TemplateBackgroundCard({
|
|
|
25620
25623
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25621
25624
|
DebouncedColorInput,
|
|
25622
25625
|
{
|
|
25623
|
-
value:
|
|
25626
|
+
value: chunkP2COO2QO_js.normalizeHexColor(onGetTemplateBackgroundColor(rows.master.path), "#ffffff"),
|
|
25624
25627
|
disabled: !canEdit,
|
|
25625
25628
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
25626
25629
|
onCommit: (hex) => onSetTemplateBackground(rows.master.path, hex)
|
|
@@ -25730,8 +25733,8 @@ function InspectorPane(props) {
|
|
|
25730
25733
|
panelWidth
|
|
25731
25734
|
} = props;
|
|
25732
25735
|
const hasSelection = selectedElement !== null;
|
|
25733
|
-
const { t } =
|
|
25734
|
-
const { dragY, handlers: dragHandlers } =
|
|
25736
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
25737
|
+
const { dragY, handlers: dragHandlers } = chunkF5UOILTY_js.useSheetDismissDrag(onClose);
|
|
25735
25738
|
const {
|
|
25736
25739
|
animationPanelHeight,
|
|
25737
25740
|
effectiveThemeOptions,
|
|
@@ -25753,7 +25756,7 @@ function InspectorPane(props) {
|
|
|
25753
25756
|
"div",
|
|
25754
25757
|
{
|
|
25755
25758
|
"data-pptx-chrome": "inspector",
|
|
25756
|
-
className:
|
|
25759
|
+
className: chunkP2COO2QO_js.cn(
|
|
25757
25760
|
// Shared styles
|
|
25758
25761
|
"bg-background flex flex-col text-xs text-foreground shadow-xl",
|
|
25759
25762
|
// Mobile: absolute bottom sheet overlay sized via dvh so it
|
|
@@ -26084,7 +26087,7 @@ function PresentationAnnotationOverlay({
|
|
|
26084
26087
|
);
|
|
26085
26088
|
}
|
|
26086
26089
|
function PresentationToolbar(p) {
|
|
26087
|
-
const { t } =
|
|
26090
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26088
26091
|
const ref = useWebControl(
|
|
26089
26092
|
{
|
|
26090
26093
|
current: p.currentSlideIndex,
|
|
@@ -26143,8 +26146,8 @@ function PresentationTouchControls({
|
|
|
26143
26146
|
onEndPresentation,
|
|
26144
26147
|
hideNavigation = false
|
|
26145
26148
|
}) {
|
|
26146
|
-
const { t } =
|
|
26147
|
-
const { isTouchDevice } =
|
|
26149
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26150
|
+
const { isTouchDevice } = chunkF5UOILTY_js.useIsMobile();
|
|
26148
26151
|
if (!isTouchDevice) {
|
|
26149
26152
|
return null;
|
|
26150
26153
|
}
|
|
@@ -26226,7 +26229,7 @@ function KeepAnnotationsDialog({
|
|
|
26226
26229
|
onKeep,
|
|
26227
26230
|
onDiscard
|
|
26228
26231
|
}) {
|
|
26229
|
-
const { t } =
|
|
26232
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26230
26233
|
if (!isOpen) {
|
|
26231
26234
|
return null;
|
|
26232
26235
|
}
|
|
@@ -26274,7 +26277,7 @@ function PasteSpecialDialog({
|
|
|
26274
26277
|
onCancel,
|
|
26275
26278
|
onConfirm
|
|
26276
26279
|
}) {
|
|
26277
|
-
const { t } =
|
|
26280
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26278
26281
|
const [selected, setSelected] = React108.useState("keep-source-formatting");
|
|
26279
26282
|
if (!isOpen) {
|
|
26280
26283
|
return null;
|
|
@@ -26332,7 +26335,7 @@ function PasteOptionsToolbar({
|
|
|
26332
26335
|
onChoose,
|
|
26333
26336
|
onDismiss
|
|
26334
26337
|
}) {
|
|
26335
|
-
const { t } =
|
|
26338
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26336
26339
|
const [rect, setRect] = React108.useState(null);
|
|
26337
26340
|
React108.useEffect(() => {
|
|
26338
26341
|
const node = elementId2 ? pptx.findCanvasElementNode(document, elementId2, { canvasOnly: true }) : null;
|
|
@@ -26359,7 +26362,7 @@ function NotesPagePreview({
|
|
|
26359
26362
|
frameSlides,
|
|
26360
26363
|
maxPages = 3
|
|
26361
26364
|
}) {
|
|
26362
|
-
const { t } =
|
|
26365
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26363
26366
|
const pages = React108.useMemo(() => pptx.computeAllNotesPages(slideIndices), [slideIndices]);
|
|
26364
26367
|
const printable = React108.useMemo(() => pptx.getNotesPrintableArea(), []);
|
|
26365
26368
|
const visiblePages = pages.slice(0, maxPages);
|
|
@@ -26447,15 +26450,15 @@ function PrintPreview({
|
|
|
26447
26450
|
frameSlides,
|
|
26448
26451
|
maxPages = 3
|
|
26449
26452
|
}) {
|
|
26450
|
-
const { t } =
|
|
26453
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26451
26454
|
const pages = React108.useMemo(
|
|
26452
|
-
() =>
|
|
26455
|
+
() => chunkP2COO2QO_js.computeHandoutLayout(slideIndices, slidesPerPage, orientation),
|
|
26453
26456
|
[slideIndices, slidesPerPage, orientation]
|
|
26454
26457
|
);
|
|
26455
|
-
const printable = React108.useMemo(() =>
|
|
26458
|
+
const printable = React108.useMemo(() => chunkP2COO2QO_js.getPrintableArea(orientation), [orientation]);
|
|
26456
26459
|
const visiblePages = pages.slice(0, maxPages);
|
|
26457
26460
|
const isThreePerPage = slidesPerPage === 3;
|
|
26458
|
-
const noteLineCount =
|
|
26461
|
+
const noteLineCount = chunkP2COO2QO_js.generateNoteLineCount();
|
|
26459
26462
|
const scaledW = printable.width * PREVIEW_SCALE3;
|
|
26460
26463
|
const scaledH = printable.height * PREVIEW_SCALE3;
|
|
26461
26464
|
const noteAreaFraction = 0.5;
|
|
@@ -26553,7 +26556,7 @@ function PrintSettingsPanel({
|
|
|
26553
26556
|
totalSlides,
|
|
26554
26557
|
activeSlideIndex
|
|
26555
26558
|
}) {
|
|
26556
|
-
const { t } =
|
|
26559
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26557
26560
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-5 min-w-0", children: [
|
|
26558
26561
|
/* @__PURE__ */ jsxRuntime.jsxs("fieldset", { children: [
|
|
26559
26562
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-xs font-medium text-muted-foreground mb-2 uppercase tracking-wide", children: t("pptx.print.printWhat") }),
|
|
@@ -26789,13 +26792,13 @@ function PrintDialog({
|
|
|
26789
26792
|
defaultSlidesPerPage,
|
|
26790
26793
|
defaultFrameSlides
|
|
26791
26794
|
}) {
|
|
26792
|
-
const { t } =
|
|
26795
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26793
26796
|
const regionRenderer = useRegionRenderer("dialog.print");
|
|
26794
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
26795
|
-
const { viewportWidth } =
|
|
26797
|
+
const { panelStyle, handlers: dragHandlers } = chunkF5UOILTY_js.useModalDismissDrag(onClose);
|
|
26798
|
+
const { viewportWidth } = chunkF5UOILTY_js.useIsMobile();
|
|
26796
26799
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
26797
26800
|
const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
26798
|
-
const printOptionDefaults = pptx.resolveDefaultPrintSettings(
|
|
26801
|
+
const printOptionDefaults = pptx.resolveDefaultPrintSettings(chunkF5UOILTY_js.useViewerOptionsContext());
|
|
26799
26802
|
const [printWhat, setPrintWhat] = React108.useState(printOptionDefaults?.printWhat ?? "slides");
|
|
26800
26803
|
const [orientation, setOrientation] = React108.useState("landscape");
|
|
26801
26804
|
const [colorMode, setColorMode] = React108.useState(
|
|
@@ -26979,7 +26982,7 @@ function ShowOptionsFieldset({
|
|
|
26979
26982
|
draft,
|
|
26980
26983
|
update
|
|
26981
26984
|
}) {
|
|
26982
|
-
const { t } =
|
|
26985
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
26983
26986
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-1.5", children: [
|
|
26984
26987
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wide mb-1", children: t("pptx.slideShow.showOptions") }),
|
|
26985
26988
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
@@ -27037,7 +27040,7 @@ function ShowSlidesFieldset({
|
|
|
27037
27040
|
slideCount,
|
|
27038
27041
|
customShows
|
|
27039
27042
|
}) {
|
|
27040
|
-
const { t } =
|
|
27043
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
27041
27044
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-1.5", children: [
|
|
27042
27045
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wide mb-1", children: t("pptx.slideShow.showSlides") }),
|
|
27043
27046
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
@@ -27147,7 +27150,7 @@ function SetUpSlideShowDialog({
|
|
|
27147
27150
|
customShows,
|
|
27148
27151
|
slideCount
|
|
27149
27152
|
}) {
|
|
27150
|
-
const { t } =
|
|
27153
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
27151
27154
|
const [draft, setDraft] = React108.useState({
|
|
27152
27155
|
...properties
|
|
27153
27156
|
});
|
|
@@ -27283,16 +27286,16 @@ function BroadcastDialog({
|
|
|
27283
27286
|
defaultUserName,
|
|
27284
27287
|
defaultServerUrl
|
|
27285
27288
|
}) {
|
|
27286
|
-
const { t } =
|
|
27289
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
27287
27290
|
const regionRenderer = useRegionRenderer("dialog.broadcast");
|
|
27288
|
-
const collab =
|
|
27291
|
+
const collab = chunkF5UOILTY_js.useCollaboration();
|
|
27289
27292
|
const isBroadcasting = collab !== null && collab.status !== "disconnected" && collab.status !== "error" && collab.config.role === "owner";
|
|
27290
27293
|
const [roomId, setRoomId] = React108.useState("");
|
|
27291
27294
|
const [userName, setUserName] = React108.useState("");
|
|
27292
27295
|
const [serverUrl, setServerUrl] = React108.useState("");
|
|
27293
27296
|
const [copied, setCopied] = React108.useState(false);
|
|
27294
27297
|
const dialogRef = React108.useRef(null);
|
|
27295
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27298
|
+
const { panelStyle, handlers: dragHandlers } = chunkF5UOILTY_js.useModalDismissDrag(onClose);
|
|
27296
27299
|
useModalFocus(open, dialogRef, onClose);
|
|
27297
27300
|
React108.useEffect(() => {
|
|
27298
27301
|
if (open && !isBroadcasting) {
|
|
@@ -27451,7 +27454,7 @@ function StartBroadcastForm({
|
|
|
27451
27454
|
onUserNameChange,
|
|
27452
27455
|
onServerUrlChange
|
|
27453
27456
|
}) {
|
|
27454
|
-
const { t } =
|
|
27457
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
27455
27458
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
27456
27459
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] text-muted-foreground leading-relaxed", children: t("pptx.broadcast.description") }),
|
|
27457
27460
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
@@ -27527,7 +27530,7 @@ function ActiveBroadcastView({
|
|
|
27527
27530
|
onCopyUrl,
|
|
27528
27531
|
onStopBroadcast
|
|
27529
27532
|
}) {
|
|
27530
|
-
const { t } =
|
|
27533
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
27531
27534
|
const statusColor = collab.status === "connected" ? "text-green-400" : collab.status === "connecting" ? "text-yellow-400" : "text-red-400";
|
|
27532
27535
|
const 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" });
|
|
27533
27536
|
const viewerCount = collab.remoteUsers.filter((u) => u.role === "viewer").length;
|
|
@@ -27608,7 +27611,7 @@ function ActiveSessionView({
|
|
|
27608
27611
|
onCopyRoomId,
|
|
27609
27612
|
onStopCollaboration
|
|
27610
27613
|
}) {
|
|
27611
|
-
const { t } =
|
|
27614
|
+
const { t } = chunkP2COO2QO_js.useTranslation(), viewerOptions = chunkF5UOILTY_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({
|
|
27612
27615
|
localUserName: activeCollaboration?.userName ?? collab.config.userName,
|
|
27613
27616
|
localUserInitials: viewerOptions.general.userInitials,
|
|
27614
27617
|
localUserColor: collab.config.userColor,
|
|
@@ -27706,8 +27709,8 @@ function StartSessionForm({
|
|
|
27706
27709
|
connectionFailed,
|
|
27707
27710
|
onRetry
|
|
27708
27711
|
}) {
|
|
27709
|
-
const { t } =
|
|
27710
|
-
const { viewportWidth } =
|
|
27712
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
27713
|
+
const { viewportWidth } = chunkF5UOILTY_js.useIsMobile();
|
|
27711
27714
|
const tabBtnStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
27712
27715
|
const inputReadOnlyClass = preconfigured ? " opacity-70 cursor-not-allowed" : "";
|
|
27713
27716
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -27841,9 +27844,9 @@ function ShareDialog({
|
|
|
27841
27844
|
defaultUserName,
|
|
27842
27845
|
defaultServerUrl
|
|
27843
27846
|
}) {
|
|
27844
|
-
const collab =
|
|
27847
|
+
const collab = chunkF5UOILTY_js.useCollaboration();
|
|
27845
27848
|
const isActive = collab !== null && collab.status !== "disconnected" && collab.status !== "error";
|
|
27846
|
-
const { t } =
|
|
27849
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
27847
27850
|
const regionRenderer = useRegionRenderer("dialog.share");
|
|
27848
27851
|
const [roomId, setRoomId] = React108.useState(defaultRoomId ?? "");
|
|
27849
27852
|
const [userName, setUserName] = React108.useState(defaultUserName ?? "");
|
|
@@ -27852,9 +27855,9 @@ function ShareDialog({
|
|
|
27852
27855
|
const [invitation, setInvitation] = React108.useState("");
|
|
27853
27856
|
const [copied, setCopied] = React108.useState(false);
|
|
27854
27857
|
const dialogRef = React108.useRef(null);
|
|
27855
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27858
|
+
const { panelStyle, handlers: dragHandlers } = chunkF5UOILTY_js.useModalDismissDrag(onClose);
|
|
27856
27859
|
useModalFocus(open, dialogRef, onClose);
|
|
27857
|
-
const { viewportWidth, viewportHeight } =
|
|
27860
|
+
const { viewportWidth, viewportHeight } = chunkF5UOILTY_js.useIsMobile();
|
|
27858
27861
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
27859
27862
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
27860
27863
|
const stickyFooterClass = pptx.shouldStickyActionRow(viewportWidth, viewportHeight) ? "sticky bottom-0 bg-popover" : "";
|
|
@@ -28027,7 +28030,7 @@ function HyperlinkTabContent({
|
|
|
28027
28030
|
inputCls,
|
|
28028
28031
|
onEnterConfirm
|
|
28029
28032
|
}) {
|
|
28030
|
-
const { t } =
|
|
28033
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
28031
28034
|
const handleEnterKey = (e) => {
|
|
28032
28035
|
if (e.key === "Enter") {
|
|
28033
28036
|
onEnterConfirm();
|
|
@@ -28152,13 +28155,13 @@ function HyperlinkEditDialog({
|
|
|
28152
28155
|
onConfirm,
|
|
28153
28156
|
onCancel
|
|
28154
28157
|
}) {
|
|
28155
|
-
const { t } =
|
|
28156
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
28158
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
28159
|
+
const { panelStyle, handlers: dragHandlers } = chunkF5UOILTY_js.useModalDismissDrag(onCancel);
|
|
28157
28160
|
const inputRef = React108.useRef(null);
|
|
28158
|
-
const detectedType =
|
|
28159
|
-
const emailParts =
|
|
28160
|
-
const detectedSlide =
|
|
28161
|
-
const detectedVerb = initialAction ?
|
|
28161
|
+
const detectedType = chunkF5UOILTY_js.detectTargetType(initialUrl, initialAction);
|
|
28162
|
+
const emailParts = chunkF5UOILTY_js.parseEmailUrl(initialUrl || "");
|
|
28163
|
+
const detectedSlide = chunkF5UOILTY_js.parseSlideFromUrl(initialUrl, initialAction);
|
|
28164
|
+
const detectedVerb = initialAction ? chunkF5UOILTY_js.ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
28162
28165
|
const [targetType, setTargetType] = React108.useState(detectedType);
|
|
28163
28166
|
const [url, setUrl] = React108.useState(
|
|
28164
28167
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -28189,7 +28192,7 @@ function HyperlinkEditDialog({
|
|
|
28189
28192
|
actionVerb
|
|
28190
28193
|
});
|
|
28191
28194
|
};
|
|
28192
|
-
const tabCls = (active) =>
|
|
28195
|
+
const tabCls = (active) => chunkP2COO2QO_js.cn(
|
|
28193
28196
|
"px-3 py-1.5 text-xs rounded-t border-b-2 transition-colors",
|
|
28194
28197
|
active ? "border-primary text-primary font-medium" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
28195
28198
|
);
|
|
@@ -28436,7 +28439,7 @@ function ViewerBottomPanels({
|
|
|
28436
28439
|
notesStyle,
|
|
28437
28440
|
onNotesHeightChange
|
|
28438
28441
|
}) {
|
|
28439
|
-
const { isHidden } =
|
|
28442
|
+
const { isHidden } = chunkF5UOILTY_js.useToolbarVisibility(hiddenActions);
|
|
28440
28443
|
const customization = useViewerCustomizationContext();
|
|
28441
28444
|
const showNotes = pptx.isPanelVisible(customization, "notes");
|
|
28442
28445
|
const notesRenderer = useRegionRenderer("notes");
|
|
@@ -28566,7 +28569,7 @@ function ViewerInspector({
|
|
|
28566
28569
|
onPreviewElement,
|
|
28567
28570
|
elementById
|
|
28568
28571
|
}) {
|
|
28569
|
-
const { t } =
|
|
28572
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
28570
28573
|
const regionRenderer = useRegionRenderer("inspector");
|
|
28571
28574
|
const liveEdit = onPreviewElement ? {
|
|
28572
28575
|
element: selectedElement,
|
|
@@ -28781,7 +28784,7 @@ function ViewerToolbarSection(props) {
|
|
|
28781
28784
|
onSetSnapToShape,
|
|
28782
28785
|
onSetShowGuides
|
|
28783
28786
|
} = props;
|
|
28784
|
-
const { t } =
|
|
28787
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
28785
28788
|
const customization = useViewerCustomizationContext();
|
|
28786
28789
|
const handleAddAnimation = React108.useCallback(
|
|
28787
28790
|
(preset, group) => {
|
|
@@ -28834,7 +28837,7 @@ function ViewerToolbarSection(props) {
|
|
|
28834
28837
|
[activeSlide, propertyHandlers]
|
|
28835
28838
|
);
|
|
28836
28839
|
const scopedLayoutOptions = React108__default.default.useMemo(
|
|
28837
|
-
() =>
|
|
28840
|
+
() => chunkF5UOILTY_js.scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
28838
28841
|
[s.layoutOptions, activeSlide]
|
|
28839
28842
|
);
|
|
28840
28843
|
const handleResetSlide = React108.useCallback(() => {
|
|
@@ -29241,14 +29244,14 @@ function ViewerToolbarSection(props) {
|
|
|
29241
29244
|
isMobileInsertOpen: s.isMobileInsertOpen,
|
|
29242
29245
|
onCloseMobileInsert: () => s.setIsMobileInsertOpen(false),
|
|
29243
29246
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
29244
|
-
reviewComments:
|
|
29247
|
+
reviewComments: chunkF5UOILTY_js.createReviewCommentsHost({
|
|
29245
29248
|
state: s,
|
|
29246
29249
|
activeSlideIndex,
|
|
29247
29250
|
updateSlides: ops.updateSlides,
|
|
29248
29251
|
markDirty: history.markDirty
|
|
29249
29252
|
}),
|
|
29250
29253
|
formatPainterActive: s.formatPainterActive,
|
|
29251
|
-
canActivateFormatPainter:
|
|
29254
|
+
canActivateFormatPainter: chunkP2COO2QO_js.hasCopyableFormat(selectedElement),
|
|
29252
29255
|
onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p) => !p)),
|
|
29253
29256
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
29254
29257
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -29357,14 +29360,14 @@ function CustomShowsDialog({
|
|
|
29357
29360
|
onRun,
|
|
29358
29361
|
onClose
|
|
29359
29362
|
}) {
|
|
29360
|
-
const { t } =
|
|
29363
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
29361
29364
|
const controller = React108.useMemo(
|
|
29362
29365
|
() => pptx.createCustomShowsController(customShows, activeCustomShowId),
|
|
29363
29366
|
// A fresh draft per open: the host mounts this only while the dialog is open.
|
|
29364
29367
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
29365
29368
|
[]
|
|
29366
29369
|
);
|
|
29367
|
-
|
|
29370
|
+
chunkF5UOILTY_js.useController(controller);
|
|
29368
29371
|
const view = controller.view(slides);
|
|
29369
29372
|
const [active, setActive] = React108.useState(activeCustomShowId ?? "");
|
|
29370
29373
|
const pickerValue = view.shows.some(({ id }) => id === active) ? active : "";
|
|
@@ -29643,8 +29646,8 @@ function EquationEditorDialog({
|
|
|
29643
29646
|
onInsert,
|
|
29644
29647
|
existingOmml
|
|
29645
29648
|
}) {
|
|
29646
|
-
const { t } =
|
|
29647
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29649
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
29650
|
+
const { panelStyle, handlers: dragHandlers } = chunkF5UOILTY_js.useModalDismissDrag(onClose);
|
|
29648
29651
|
const initialLatex = React108.useMemo(() => {
|
|
29649
29652
|
if (!existingOmml) {
|
|
29650
29653
|
return "";
|
|
@@ -29766,7 +29769,7 @@ function EquationEditorDialog({
|
|
|
29766
29769
|
{
|
|
29767
29770
|
type: "button",
|
|
29768
29771
|
onClick: () => handleTemplateClick(tmpl.latex),
|
|
29769
|
-
className:
|
|
29772
|
+
className: chunkP2COO2QO_js.cn(
|
|
29770
29773
|
"flex flex-col items-center gap-1 p-2 rounded-lg border transition-colors",
|
|
29771
29774
|
latex === tmpl.latex ? "border-primary bg-primary/10" : "border-border bg-muted/40 hover:bg-accent/60 hover:border-border"
|
|
29772
29775
|
),
|
|
@@ -29831,7 +29834,7 @@ function InsertSmartArtDialog({
|
|
|
29831
29834
|
onInsert
|
|
29832
29835
|
}) {
|
|
29833
29836
|
const ref = React108.useRef(null);
|
|
29834
|
-
const { t } =
|
|
29837
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
29835
29838
|
React108.useLayoutEffect(() => {
|
|
29836
29839
|
if (ref.current) {
|
|
29837
29840
|
ref.current.translateLabel = t;
|
|
@@ -29855,7 +29858,7 @@ function InsertChartDialog({
|
|
|
29855
29858
|
onInsert
|
|
29856
29859
|
}) {
|
|
29857
29860
|
const ref = React108.useRef(null);
|
|
29858
|
-
const { t } =
|
|
29861
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
29859
29862
|
React108.useLayoutEffect(() => {
|
|
29860
29863
|
if (ref.current) {
|
|
29861
29864
|
ref.current.translateLabel = t;
|
|
@@ -30362,11 +30365,11 @@ function PresentationStage({
|
|
|
30362
30365
|
})
|
|
30363
30366
|
},
|
|
30364
30367
|
children: [
|
|
30365
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30368
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkF5UOILTY_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
30366
30369
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: pptx.PRESENTATION_HIT_TEST_CSS }),
|
|
30367
30370
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
30368
30371
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30369
|
-
|
|
30372
|
+
chunkF5UOILTY_js.ElementRenderer,
|
|
30370
30373
|
{
|
|
30371
30374
|
element,
|
|
30372
30375
|
activeSlide,
|
|
@@ -30404,7 +30407,7 @@ function PresentationStage({
|
|
|
30404
30407
|
`tpl-${element.id}`
|
|
30405
30408
|
)),
|
|
30406
30409
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30407
|
-
|
|
30410
|
+
chunkF5UOILTY_js.ElementRenderer,
|
|
30408
30411
|
{
|
|
30409
30412
|
element,
|
|
30410
30413
|
activeSlide,
|
|
@@ -30457,7 +30460,7 @@ function PresentationStage({
|
|
|
30457
30460
|
function noop() {
|
|
30458
30461
|
}
|
|
30459
30462
|
function PresentationContextMenu(p) {
|
|
30460
|
-
const { t } =
|
|
30463
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
30461
30464
|
const sections = pptx.getPresentationContextMenuSections({
|
|
30462
30465
|
seeAllSlides: Boolean(p.onSeeAllSlides),
|
|
30463
30466
|
presenterView: Boolean(p.onShowPresenterView),
|
|
@@ -30516,7 +30519,7 @@ function PresentationTransitionMount({
|
|
|
30516
30519
|
templateElementsBySlideId
|
|
30517
30520
|
);
|
|
30518
30521
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30519
|
-
|
|
30522
|
+
chunkF5UOILTY_js.PresentationTransitionOverlay,
|
|
30520
30523
|
{
|
|
30521
30524
|
outgoingSlide,
|
|
30522
30525
|
templateElements: templates.outgoing,
|
|
@@ -30561,9 +30564,9 @@ function ViewerCanvasArea(props) {
|
|
|
30561
30564
|
aiHighlightOverlay,
|
|
30562
30565
|
aiCanvasActive = false
|
|
30563
30566
|
} = props;
|
|
30564
|
-
const { t } =
|
|
30565
|
-
const { isHidden } =
|
|
30566
|
-
const viewerOptions =
|
|
30567
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
30568
|
+
const { isHidden } = chunkF5UOILTY_js.useToolbarVisibility(hiddenActions);
|
|
30569
|
+
const viewerOptions = chunkF5UOILTY_js.useViewerOptionsContext();
|
|
30567
30570
|
const outlineAuthoring = useOutlineAuthoring({
|
|
30568
30571
|
state: s,
|
|
30569
30572
|
updateElement: canvasHandlers.handleUpdateSmartArtElement,
|
|
@@ -30609,9 +30612,9 @@ function ViewerCanvasArea(props) {
|
|
|
30609
30612
|
);
|
|
30610
30613
|
const handleHyperlinkClick = React108.useCallback(
|
|
30611
30614
|
(url) => {
|
|
30612
|
-
if (
|
|
30615
|
+
if (chunkP2COO2QO_js.isPpactionUrl(url)) {
|
|
30613
30616
|
if (mode === "present") {
|
|
30614
|
-
const parsed =
|
|
30617
|
+
const parsed = chunkP2COO2QO_js.parsePpactionUrl(url);
|
|
30615
30618
|
if (parsed) {
|
|
30616
30619
|
const action = {
|
|
30617
30620
|
action: parsed.action,
|
|
@@ -30696,7 +30699,7 @@ function ViewerCanvasArea(props) {
|
|
|
30696
30699
|
s.setActiveSlideIndex((i) => Math.max(0, i - 1));
|
|
30697
30700
|
}
|
|
30698
30701
|
}, [mode, presentation, s]);
|
|
30699
|
-
const swipe =
|
|
30702
|
+
const swipe = chunkF5UOILTY_js.useSwipeNavigation({
|
|
30700
30703
|
enabled: swipeEnabled,
|
|
30701
30704
|
onNext: handleSwipeNext,
|
|
30702
30705
|
onPrev: handleSwipePrev
|
|
@@ -30882,14 +30885,14 @@ function ViewerCanvasArea(props) {
|
|
|
30882
30885
|
outlineAuthoring,
|
|
30883
30886
|
collaborationOverlay: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30884
30887
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30885
|
-
|
|
30888
|
+
chunkF5UOILTY_js.RemoteSelectionOverlay,
|
|
30886
30889
|
{
|
|
30887
30890
|
elements: effectiveSlide?.elements ?? [],
|
|
30888
30891
|
activeSlideIndex
|
|
30889
30892
|
}
|
|
30890
30893
|
),
|
|
30891
30894
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30892
|
-
|
|
30895
|
+
chunkF5UOILTY_js.CollaborationCursorOverlay,
|
|
30893
30896
|
{
|
|
30894
30897
|
activeSlideIndex,
|
|
30895
30898
|
canvasWidth: canvasSize.width,
|
|
@@ -31126,8 +31129,8 @@ function AiChangeOverlay({ batch, activeSlideIndex }) {
|
|
|
31126
31129
|
] });
|
|
31127
31130
|
}
|
|
31128
31131
|
function ChartFormatPanel() {
|
|
31129
|
-
const { t } =
|
|
31130
|
-
const commands =
|
|
31132
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
31133
|
+
const commands = chunkF5UOILTY_js.useChartFormatContext();
|
|
31131
31134
|
const ref = React108.useRef(null);
|
|
31132
31135
|
const chart = commands?.chart;
|
|
31133
31136
|
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
@@ -31162,7 +31165,7 @@ function ChartFormatPanel() {
|
|
|
31162
31165
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-chart-format-pane", { ref, "data-testid": "chart-format-pane" });
|
|
31163
31166
|
}
|
|
31164
31167
|
function ThemeEditorPanel({ theme, canEdit, onApply, onClose }) {
|
|
31165
|
-
const { t } =
|
|
31168
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
31166
31169
|
const ref = React108.useRef(null);
|
|
31167
31170
|
React108.useEffect(() => {
|
|
31168
31171
|
const node = ref.current;
|
|
@@ -31199,8 +31202,8 @@ function MobileDismissSheet({
|
|
|
31199
31202
|
className,
|
|
31200
31203
|
children
|
|
31201
31204
|
}) {
|
|
31202
|
-
const { t } =
|
|
31203
|
-
const { dragY, handlers } =
|
|
31205
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
31206
|
+
const { dragY, handlers } = chunkF5UOILTY_js.useSheetDismissDrag(onClose);
|
|
31204
31207
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31205
31208
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31206
31209
|
"button",
|
|
@@ -31469,7 +31472,7 @@ function ThemeThumbnail({
|
|
|
31469
31472
|
{
|
|
31470
31473
|
type: "button",
|
|
31471
31474
|
onClick,
|
|
31472
|
-
className:
|
|
31475
|
+
className: chunkP2COO2QO_js.cn(
|
|
31473
31476
|
"group relative flex flex-col rounded-lg border-2 transition-all overflow-hidden",
|
|
31474
31477
|
selected ? "border-primary shadow-lg scale-[1.02]" : "border-border hover:border-primary/50 hover:shadow-md"
|
|
31475
31478
|
),
|
|
@@ -31500,7 +31503,7 @@ function ThemeGallery({
|
|
|
31500
31503
|
onApplyTheme,
|
|
31501
31504
|
onImportTheme
|
|
31502
31505
|
}) {
|
|
31503
|
-
const { t } =
|
|
31506
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
31504
31507
|
const [selectedTheme, setSelectedTheme] = React108.useState(currentTheme ?? null);
|
|
31505
31508
|
const fileInputRef = React108.useRef(null);
|
|
31506
31509
|
React108.useEffect(() => {
|
|
@@ -31637,8 +31640,8 @@ function ViewerSidePanels(props) {
|
|
|
31637
31640
|
aiBridge,
|
|
31638
31641
|
aiPanel
|
|
31639
31642
|
} = props;
|
|
31640
|
-
const aiAssistant =
|
|
31641
|
-
const AiPanel = aiAssistant?.panel ??
|
|
31643
|
+
const aiAssistant = chunkLVEFHZ76_js.aiAssistants.resolve(aiConfig);
|
|
31644
|
+
const AiPanel = aiAssistant?.panel ?? chunkLVEFHZ76_js.AiChatPanelLazy;
|
|
31642
31645
|
const handleSetSlideSize = (size, rescaleMode) => {
|
|
31643
31646
|
if (rescaleMode && s.slideSizeEmu) {
|
|
31644
31647
|
s.setSlides(pptx.scaleSlidesForSizeChange(slides, s.slideSizeEmu, size, rescaleMode));
|
|
@@ -31944,7 +31947,7 @@ function ViewerMainContent(props) {
|
|
|
31944
31947
|
);
|
|
31945
31948
|
const layoutGalleryAnchorRef = React108.useRef(null);
|
|
31946
31949
|
const layoutGalleryPreviews = useLayoutPreviews(loadLayoutPreviews, layoutGalleryAnchor !== null);
|
|
31947
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31950
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkF5UOILTY_js.ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-chrome": "body", className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
31948
31951
|
showSlidesPane && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31949
31952
|
slidesPaneRenderer ? (
|
|
31950
31953
|
// The rail's slot (width, collapse, resize handle) stays the viewer's.
|
|
@@ -32154,7 +32157,7 @@ function AutosaveRecoveryDialog({
|
|
|
32154
32157
|
onDiscard,
|
|
32155
32158
|
busy = false
|
|
32156
32159
|
}) {
|
|
32157
|
-
const { t } =
|
|
32160
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32158
32161
|
if (!prompt) {
|
|
32159
32162
|
return null;
|
|
32160
32163
|
}
|
|
@@ -32210,7 +32213,7 @@ function CompatibilityToasts({
|
|
|
32210
32213
|
rightInset = 0,
|
|
32211
32214
|
bottomInset = 0
|
|
32212
32215
|
}) {
|
|
32213
|
-
const { t } =
|
|
32216
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32214
32217
|
const ref = useWebControl(
|
|
32215
32218
|
{ toasts, rightInset, bottomInset, translate: t },
|
|
32216
32219
|
{
|
|
@@ -32255,7 +32258,7 @@ function HeaderFooterPanel({
|
|
|
32255
32258
|
onApplyToCurrent,
|
|
32256
32259
|
onClose
|
|
32257
32260
|
}) {
|
|
32258
|
-
const { t } =
|
|
32261
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32259
32262
|
const showDateTime = headerFooter.hasDateTime ?? false;
|
|
32260
32263
|
const dateTimeAuto = headerFooter.dateTimeAuto ?? false;
|
|
32261
32264
|
const showDateText = pptx.isHeaderFooterDateTextVisible(headerFooter);
|
|
@@ -32396,7 +32399,7 @@ function HeaderFooterPanel({
|
|
|
32396
32399
|
] }) });
|
|
32397
32400
|
}
|
|
32398
32401
|
function MobileBottomBar(p) {
|
|
32399
|
-
const { t } =
|
|
32402
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32400
32403
|
const handlers = {
|
|
32401
32404
|
slides: p.onOpenSlides,
|
|
32402
32405
|
insert: p.onOpenInsert,
|
|
@@ -32422,7 +32425,7 @@ function MobileSlidesSheet({
|
|
|
32422
32425
|
onClose,
|
|
32423
32426
|
...sidebar
|
|
32424
32427
|
}) {
|
|
32425
|
-
const { t } =
|
|
32428
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32426
32429
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32427
32430
|
MobileSheet,
|
|
32428
32431
|
{
|
|
@@ -32449,7 +32452,7 @@ function MobileChromeOverlay(props) {
|
|
|
32449
32452
|
slideSectionGroups,
|
|
32450
32453
|
canEdit,
|
|
32451
32454
|
commentCount
|
|
32452
|
-
} = props, { keyboardInset, isKeyboardOpen } =
|
|
32455
|
+
} = props, { keyboardInset, isKeyboardOpen } = chunkF5UOILTY_js.useKeyboardInsets(), activeSheet = s.isMobileInsertOpen ? "insert" : s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null, closeAllSheets = () => {
|
|
32453
32456
|
s.setIsSlidesPaneOpen(false);
|
|
32454
32457
|
s.setIsMobileInsertOpen(false);
|
|
32455
32458
|
s.setIsInspectorPaneOpen(false);
|
|
@@ -32549,7 +32552,7 @@ function MobileChromeOverlay(props) {
|
|
|
32549
32552
|
] });
|
|
32550
32553
|
}
|
|
32551
32554
|
function ReadOnlyBanner(p) {
|
|
32552
|
-
const { t } =
|
|
32555
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32553
32556
|
const ref = useWebControl(
|
|
32554
32557
|
pptx.readOnlyBannerState(
|
|
32555
32558
|
p.recommendation,
|
|
@@ -32583,7 +32586,7 @@ function RibbonCustomizationStyle({
|
|
|
32583
32586
|
return /* @__PURE__ */ jsxRuntime.jsx("style", { "data-pptx-ribbon-customization": "", children: css });
|
|
32584
32587
|
}
|
|
32585
32588
|
function RunProgramNotices({ notices, onDismiss }) {
|
|
32586
|
-
const { t } =
|
|
32589
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32587
32590
|
if (notices.length === 0) {
|
|
32588
32591
|
return null;
|
|
32589
32592
|
}
|
|
@@ -32641,14 +32644,14 @@ function AddinTable({
|
|
|
32641
32644
|
selectedId,
|
|
32642
32645
|
onSelect
|
|
32643
32646
|
}) {
|
|
32644
|
-
const { t } =
|
|
32647
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32645
32648
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
32646
32649
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "mb-1 text-xs font-semibold text-foreground", children: title }),
|
|
32647
32650
|
rows.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-2 py-1 text-xs italic text-muted-foreground", children: t("pptx.options.addIns.description") }) : /* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full border-collapse text-left", children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32648
32651
|
"tr",
|
|
32649
32652
|
{
|
|
32650
32653
|
onClick: () => onSelect(row.id),
|
|
32651
|
-
className:
|
|
32654
|
+
className: chunkP2COO2QO_js.cn(
|
|
32652
32655
|
"cursor-pointer border-b border-border/40 transition-colors",
|
|
32653
32656
|
selectedId === row.id ? "bg-primary/10" : "hover:bg-accent"
|
|
32654
32657
|
),
|
|
@@ -32663,7 +32666,7 @@ function AddinTable({
|
|
|
32663
32666
|
] });
|
|
32664
32667
|
}
|
|
32665
32668
|
function OptionsAddInsPane({ addinStatus }) {
|
|
32666
|
-
const { t } =
|
|
32669
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32667
32670
|
const [selectedId, setSelectedId] = React108.useState(null);
|
|
32668
32671
|
const rows = pptx.resolveViewerAddinRows(addinStatus);
|
|
32669
32672
|
const active = rows.filter((row) => row.active);
|
|
@@ -32706,7 +32709,7 @@ function CommandList({
|
|
|
32706
32709
|
selectedId,
|
|
32707
32710
|
onSelect
|
|
32708
32711
|
}) {
|
|
32709
|
-
const { t } =
|
|
32712
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32710
32713
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
32711
32714
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 text-xs font-medium text-muted-foreground", children: title }),
|
|
32712
32715
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -32727,7 +32730,7 @@ function CommandList({
|
|
|
32727
32730
|
role: "option",
|
|
32728
32731
|
"aria-selected": selectedId === id,
|
|
32729
32732
|
onClick: () => onSelect(id),
|
|
32730
|
-
className:
|
|
32733
|
+
className: chunkP2COO2QO_js.cn(
|
|
32731
32734
|
"flex w-full items-center rounded px-2 py-1.5 text-left text-sm transition-colors",
|
|
32732
32735
|
selectedId === id ? "bg-primary/15 text-primary" : "text-foreground hover:bg-accent"
|
|
32733
32736
|
),
|
|
@@ -32745,7 +32748,7 @@ function OptionsQuickAccessPane({
|
|
|
32745
32748
|
onQuickAccessCommandsChange,
|
|
32746
32749
|
onResetQuickAccess
|
|
32747
32750
|
}) {
|
|
32748
|
-
const { t } =
|
|
32751
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32749
32752
|
const [selectedAvailable, setSelectedAvailable] = React108.useState(null);
|
|
32750
32753
|
const [selectedCurrent, setSelectedCurrent] = React108.useState(null);
|
|
32751
32754
|
const current = options.quickAccess.commandIds;
|
|
@@ -32859,7 +32862,7 @@ function OptionsRibbonPane({
|
|
|
32859
32862
|
onRibbonTabHiddenChange,
|
|
32860
32863
|
onResetRibbon
|
|
32861
32864
|
}) {
|
|
32862
|
-
const { t } =
|
|
32865
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32863
32866
|
const hidden = new Set(options.ribbon.hiddenTabIds);
|
|
32864
32867
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
32865
32868
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
@@ -32871,7 +32874,7 @@ function OptionsRibbonPane({
|
|
|
32871
32874
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32872
32875
|
"label",
|
|
32873
32876
|
{
|
|
32874
|
-
className:
|
|
32877
|
+
className: chunkP2COO2QO_js.cn(
|
|
32875
32878
|
"flex items-center gap-2 rounded px-2 py-1.5",
|
|
32876
32879
|
isFile ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-accent"
|
|
32877
32880
|
),
|
|
@@ -32905,7 +32908,7 @@ function OptionsRibbonPane({
|
|
|
32905
32908
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: pptx.SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32906
32909
|
"div",
|
|
32907
32910
|
{
|
|
32908
|
-
className:
|
|
32911
|
+
className: chunkP2COO2QO_js.cn(
|
|
32909
32912
|
"flex items-center justify-between gap-3 rounded px-3 py-2",
|
|
32910
32913
|
i % 2 === 0 ? "bg-muted/60" : ""
|
|
32911
32914
|
),
|
|
@@ -32926,12 +32929,12 @@ async function exportAiChatLogs(options) {
|
|
|
32926
32929
|
chats,
|
|
32927
32930
|
{ format: options?.format, detailed: options?.detailed, now: options?.now },
|
|
32928
32931
|
(filename, content, mime) => {
|
|
32929
|
-
|
|
32932
|
+
chunkF5UOILTY_js.downloadBlob(new Blob([content], { type: mime }), filename);
|
|
32930
32933
|
}
|
|
32931
32934
|
);
|
|
32932
32935
|
}
|
|
32933
32936
|
function SettingsAiTab({ store }) {
|
|
32934
|
-
const { t } =
|
|
32937
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
32935
32938
|
const activeStore = React108.useMemo(() => store ?? host.createChatHistoryStore(), [store]);
|
|
32936
32939
|
const [chatCount, setChatCount] = React108.useState(null);
|
|
32937
32940
|
const [detailed, setDetailed] = React108.useState(true);
|
|
@@ -33023,7 +33026,7 @@ function SettingsAppearanceTab({
|
|
|
33023
33026
|
themes,
|
|
33024
33027
|
onSelectTheme
|
|
33025
33028
|
}) {
|
|
33026
|
-
const { t } =
|
|
33029
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
33027
33030
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-3", children: themes.map((entry) => {
|
|
33028
33031
|
const isActive = entry.key === activeThemeKey;
|
|
33029
33032
|
const previewBackground = entry.theme?.colors?.background ?? "#0b0f19";
|
|
@@ -33034,7 +33037,7 @@ function SettingsAppearanceTab({
|
|
|
33034
33037
|
type: "button",
|
|
33035
33038
|
onClick: () => onSelectTheme(entry.key),
|
|
33036
33039
|
"aria-pressed": isActive,
|
|
33037
|
-
className:
|
|
33040
|
+
className: chunkP2COO2QO_js.cn(
|
|
33038
33041
|
"flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",
|
|
33039
33042
|
isActive ? "border-primary bg-primary/10" : "border-border hover:border-primary/50 hover:bg-accent"
|
|
33040
33043
|
),
|
|
@@ -33051,7 +33054,7 @@ function SettingsAppearanceTab({
|
|
|
33051
33054
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33052
33055
|
"span",
|
|
33053
33056
|
{
|
|
33054
|
-
className:
|
|
33057
|
+
className: chunkP2COO2QO_js.cn("text-xs font-medium", isActive ? "text-primary" : "text-foreground"),
|
|
33055
33058
|
children: t(entry.labelKey)
|
|
33056
33059
|
}
|
|
33057
33060
|
)
|
|
@@ -33066,7 +33069,7 @@ function SettingsCustomFontsSection({
|
|
|
33066
33069
|
families,
|
|
33067
33070
|
onRegistered
|
|
33068
33071
|
}) {
|
|
33069
|
-
const { t } =
|
|
33072
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
33070
33073
|
const inputRef = React108.useRef(null);
|
|
33071
33074
|
const [error, setError] = React108.useState(false);
|
|
33072
33075
|
const handleFile = async (file) => {
|
|
@@ -33131,7 +33134,7 @@ function SettingsLanguageTab({
|
|
|
33131
33134
|
type: "button",
|
|
33132
33135
|
onClick: () => onSelectLocale(locale.code),
|
|
33133
33136
|
"aria-pressed": isActive,
|
|
33134
|
-
className:
|
|
33137
|
+
className: chunkP2COO2QO_js.cn(
|
|
33135
33138
|
"flex w-full items-center justify-between rounded px-3 py-2.5 text-left transition-colors",
|
|
33136
33139
|
isActive ? "bg-primary/10 text-primary" : "text-foreground hover:bg-accent"
|
|
33137
33140
|
),
|
|
@@ -33170,7 +33173,7 @@ function OpenSettingsDialog({
|
|
|
33170
33173
|
customFontFamilies = NO_CUSTOM_FONT_FAMILIES,
|
|
33171
33174
|
onCustomFontRegistered
|
|
33172
33175
|
}) {
|
|
33173
|
-
const { t } =
|
|
33176
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
33174
33177
|
const viewerCustomization = useViewerCustomizationContext();
|
|
33175
33178
|
const customization = React108.useMemo(
|
|
33176
33179
|
() => languageSelectable ? viewerCustomization : {
|
|
@@ -33279,7 +33282,7 @@ function ViewerOptionsProvider({
|
|
|
33279
33282
|
store,
|
|
33280
33283
|
children
|
|
33281
33284
|
}) {
|
|
33282
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33285
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkF5UOILTY_js.ViewerOptionsStoreContext.Provider, { value: store, children: /* @__PURE__ */ jsxRuntime.jsx(chunkF5UOILTY_js.ViewerOptionsContext.Provider, { value: options, children }) });
|
|
33283
33286
|
}
|
|
33284
33287
|
function useAiBridge(input) {
|
|
33285
33288
|
const ref = React108.useRef(input);
|
|
@@ -33362,7 +33365,7 @@ function useAiPanelController(input) {
|
|
|
33362
33365
|
getSelectedElement: () => inputRef.current.selectedElement
|
|
33363
33366
|
})
|
|
33364
33367
|
);
|
|
33365
|
-
const state =
|
|
33368
|
+
const state = chunkF5UOILTY_js.useController(controller);
|
|
33366
33369
|
React108.useEffect(() => () => controller.dispose(), [controller]);
|
|
33367
33370
|
const liveFocusTargets = React108.useMemo(
|
|
33368
33371
|
() => host.computeFocusTargets({ activeSlideIndex, selectedElementIds, selectedElementId }),
|
|
@@ -33595,7 +33598,7 @@ function useMasterViewCrud(input) {
|
|
|
33595
33598
|
forgetHistory,
|
|
33596
33599
|
pushToast
|
|
33597
33600
|
} = input;
|
|
33598
|
-
const { t } =
|
|
33601
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
33599
33602
|
const data = React108.useMemo(
|
|
33600
33603
|
() => ({ slides, slideMasters }),
|
|
33601
33604
|
[slides, slideMasters]
|
|
@@ -33936,16 +33939,20 @@ function useShapeFormatCommands(input) {
|
|
|
33936
33939
|
crop
|
|
33937
33940
|
};
|
|
33938
33941
|
}
|
|
33939
|
-
function useViewerCustomization(customization, legacyHiddenActions, optionsStore, allowExternalContent) {
|
|
33942
|
+
function useViewerCustomization(customization, legacyHiddenActions, optionsStore, allowExternalContent, googleFonts) {
|
|
33940
33943
|
const controllerRef = React108.useRef(null);
|
|
33941
33944
|
if (!controllerRef.current) {
|
|
33942
33945
|
controllerRef.current = pptx.createCustomizationController(customization);
|
|
33943
33946
|
controllerRef.current.setAllowExternalContent(allowExternalContent);
|
|
33947
|
+
controllerRef.current.setGoogleFonts(googleFonts);
|
|
33944
33948
|
}
|
|
33945
33949
|
const controller = controllerRef.current;
|
|
33946
33950
|
React108.useLayoutEffect(() => {
|
|
33947
33951
|
controller.setAllowExternalContent(allowExternalContent);
|
|
33948
33952
|
}, [controller, allowExternalContent]);
|
|
33953
|
+
React108.useLayoutEffect(() => {
|
|
33954
|
+
controller.setGoogleFonts(googleFonts);
|
|
33955
|
+
}, [controller, googleFonts]);
|
|
33949
33956
|
const appliedRef = React108.useRef(customization);
|
|
33950
33957
|
React108.useLayoutEffect(() => {
|
|
33951
33958
|
if (appliedRef.current === customization) {
|
|
@@ -33984,7 +33991,7 @@ function useHostLanguage({
|
|
|
33984
33991
|
availableLocales,
|
|
33985
33992
|
onLocaleChange
|
|
33986
33993
|
}) {
|
|
33987
|
-
const { t, i18n } =
|
|
33994
|
+
const { t, i18n } = chunkP2COO2QO_js.useHostI18next();
|
|
33988
33995
|
const [localeCode, setLocaleCode] = React108.useState(
|
|
33989
33996
|
() => defaultLocale ?? pptx.readStoredViewerPrefs().localeCode ?? "en"
|
|
33990
33997
|
);
|
|
@@ -34024,7 +34031,7 @@ function useProvidedLanguage({
|
|
|
34024
34031
|
availableLocales,
|
|
34025
34032
|
onLocaleChange
|
|
34026
34033
|
}) {
|
|
34027
|
-
const state = React108.useContext(
|
|
34034
|
+
const state = React108.useContext(chunkP2COO2QO_js.PptxI18nContext);
|
|
34028
34035
|
const { locale } = state;
|
|
34029
34036
|
const locales = availableLocales ?? NO_LOCALES;
|
|
34030
34037
|
const controls = React108.useMemo(
|
|
@@ -34044,7 +34051,7 @@ function useProvidedLanguage({
|
|
|
34044
34051
|
return { state, controls };
|
|
34045
34052
|
}
|
|
34046
34053
|
function provideLanguage({ state, controls }, children) {
|
|
34047
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34054
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkP2COO2QO_js.ViewerI18nContext.Provider, { value: state, children: /* @__PURE__ */ jsxRuntime.jsx(chunkP2COO2QO_js.ViewerLocaleControlsContext.Provider, { value: controls, children }) });
|
|
34048
34055
|
}
|
|
34049
34056
|
function HostLanguageRoot({ children, ...props }) {
|
|
34050
34057
|
return provideLanguage(useHostLanguage(props), children);
|
|
@@ -34053,11 +34060,11 @@ function ProvidedLanguageRoot({ children, ...props }) {
|
|
|
34053
34060
|
return provideLanguage(useProvidedLanguage(props), children);
|
|
34054
34061
|
}
|
|
34055
34062
|
function ViewerI18nRoot(props) {
|
|
34056
|
-
const Root = React108.useContext(
|
|
34063
|
+
const Root = React108.useContext(chunkP2COO2QO_js.PptxI18nContext) ? ProvidedLanguageRoot : HostLanguageRoot;
|
|
34057
34064
|
return /* @__PURE__ */ jsxRuntime.jsx(Root, { ...props });
|
|
34058
34065
|
}
|
|
34059
34066
|
function useViewerLocaleControls() {
|
|
34060
|
-
return React108.useContext(
|
|
34067
|
+
return React108.useContext(chunkP2COO2QO_js.ViewerLocaleControlsContext);
|
|
34061
34068
|
}
|
|
34062
34069
|
var NO_RIBBON_ADD_INS = [];
|
|
34063
34070
|
var NO_FILE_PROVIDERS = [];
|
|
@@ -34136,7 +34143,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34136
34143
|
limits
|
|
34137
34144
|
} = props;
|
|
34138
34145
|
const cloudDocument = React108.useMemo(() => pptx.createCloudDocumentController(), []);
|
|
34139
|
-
const cloudFile =
|
|
34146
|
+
const cloudFile = chunkF5UOILTY_js.useController(cloudDocument).file;
|
|
34140
34147
|
const {
|
|
34141
34148
|
storage: viewerStorage,
|
|
34142
34149
|
fileName,
|
|
@@ -34150,13 +34157,14 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34150
34157
|
filePath: hostFilePath
|
|
34151
34158
|
});
|
|
34152
34159
|
const saveProgress = React108.useMemo(() => pptx.createSaveProgressController(), []);
|
|
34153
|
-
const saveProgressState =
|
|
34160
|
+
const saveProgressState = chunkF5UOILTY_js.useController(saveProgress);
|
|
34154
34161
|
const storage = React108.useMemo(
|
|
34155
34162
|
() => viewerStorage ? saveProgress.wrap(viewerStorage) : viewerStorage,
|
|
34156
34163
|
[viewerStorage, saveProgress]
|
|
34157
34164
|
);
|
|
34158
34165
|
const collaboration = pptx.resolveCollaborationConfig(collaborationInput);
|
|
34159
34166
|
const rootOptions = pptx.resolveViewerRootOptions(props);
|
|
34167
|
+
React108.useEffect(() => pptx.installSvgIdScope(), []);
|
|
34160
34168
|
React108.useEffect(() => {
|
|
34161
34169
|
const css = pptx.buildUserFontFaceStyles(fonts);
|
|
34162
34170
|
if (!css) {
|
|
@@ -34191,7 +34199,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34191
34199
|
(current) => current.includes(family) ? current : [...current, family]
|
|
34192
34200
|
);
|
|
34193
34201
|
}, []);
|
|
34194
|
-
const { t } =
|
|
34202
|
+
const { t } = chunkP2COO2QO_js.useTranslation();
|
|
34195
34203
|
const {
|
|
34196
34204
|
localeCode,
|
|
34197
34205
|
locales: resolvedLocales,
|
|
@@ -34248,12 +34256,13 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34248
34256
|
},
|
|
34249
34257
|
[hostStorage, cloudDocument]
|
|
34250
34258
|
);
|
|
34251
|
-
const { optionsStore, options: viewerOptions } =
|
|
34259
|
+
const { optionsStore, options: viewerOptions } = chunkF5UOILTY_js.useViewerOptions();
|
|
34252
34260
|
const custom = useViewerCustomization(
|
|
34253
34261
|
customization,
|
|
34254
34262
|
legacyHiddenActions,
|
|
34255
34263
|
optionsStore,
|
|
34256
|
-
allowExternalContent
|
|
34264
|
+
allowExternalContent,
|
|
34265
|
+
googleFonts
|
|
34257
34266
|
);
|
|
34258
34267
|
const { resolved: customizationResolved, hiddenActions } = custom;
|
|
34259
34268
|
const aiEnabled = Boolean(ai) && pptx.isFeatureEnabled(customizationResolved, "ai");
|
|
@@ -34267,8 +34276,8 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34267
34276
|
const handleEnableEditing = React108.useCallback(() => {
|
|
34268
34277
|
setProtectedViewOverridden(true);
|
|
34269
34278
|
}, []);
|
|
34270
|
-
const readOnlyRec =
|
|
34271
|
-
const compatToastsState =
|
|
34279
|
+
const readOnlyRec = chunkF5UOILTY_js.useReadOnlyRecommendationState(content);
|
|
34280
|
+
const compatToastsState = chunkF5UOILTY_js.useCompatibilityToastsState();
|
|
34272
34281
|
const [notesBarHeight, setNotesBarHeight] = React108.useState(0);
|
|
34273
34282
|
const runProgramNoticesState = useRunProgramNoticesState();
|
|
34274
34283
|
const [collaborationReadOnly, setCollaborationReadOnly] = React108.useState(Boolean(collaboration));
|
|
@@ -34291,8 +34300,8 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34291
34300
|
filePath
|
|
34292
34301
|
});
|
|
34293
34302
|
const [isShareDialogOpen, setIsShareDialogOpen] = React108.useState(false);
|
|
34294
|
-
const { reducedMotion, toggleReducedMotion } =
|
|
34295
|
-
const state =
|
|
34303
|
+
const { reducedMotion, toggleReducedMotion } = chunkF5UOILTY_js.useReducedMotion();
|
|
34304
|
+
const state = chunkF5UOILTY_js.useViewerState({
|
|
34296
34305
|
content,
|
|
34297
34306
|
canEdit,
|
|
34298
34307
|
inspectorInitiallyOpen: props.inspectorInitiallyOpen
|
|
@@ -34419,16 +34428,16 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34419
34428
|
}
|
|
34420
34429
|
}, [settings, optionsStore]);
|
|
34421
34430
|
const handleClearOptionsCache = useAutosaveCacheMaintenance(viewerOptions, storage);
|
|
34422
|
-
const mobile =
|
|
34431
|
+
const mobile = chunkF5UOILTY_js.useIsMobile();
|
|
34423
34432
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
34424
|
-
const resizablePanels =
|
|
34433
|
+
const resizablePanels = chunkF5UOILTY_js.useResizablePanels();
|
|
34425
34434
|
const {
|
|
34426
34435
|
gridSpacingPx,
|
|
34427
34436
|
visibleSlideIndexes,
|
|
34428
34437
|
slideSectionGroups,
|
|
34429
34438
|
masterPseudoSlide,
|
|
34430
34439
|
authoredRange
|
|
34431
|
-
} =
|
|
34440
|
+
} = chunkF5UOILTY_js.useDerivedSlideState({
|
|
34432
34441
|
slides,
|
|
34433
34442
|
sections: state.sections,
|
|
34434
34443
|
customShows: state.customShows,
|
|
@@ -34453,7 +34462,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34453
34462
|
state.cropSessionRef
|
|
34454
34463
|
]
|
|
34455
34464
|
);
|
|
34456
|
-
const zoom =
|
|
34465
|
+
const zoom = chunkF5UOILTY_js.useZoomViewport({
|
|
34457
34466
|
canvasSize,
|
|
34458
34467
|
selectedElements: state.selectedElements,
|
|
34459
34468
|
fitPadding: props.fitPadding,
|
|
@@ -34469,7 +34478,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34469
34478
|
onChangeCallback.current?.();
|
|
34470
34479
|
}, [setIsDirty]);
|
|
34471
34480
|
const restoreHistoryThemeRef = React108.useRef(void 0);
|
|
34472
|
-
const history =
|
|
34481
|
+
const history = chunkF5UOILTY_js.useEditorHistory({
|
|
34473
34482
|
slides,
|
|
34474
34483
|
canvasSize,
|
|
34475
34484
|
activeSlideIndex,
|
|
@@ -34498,7 +34507,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34498
34507
|
setEditTemplateMode: state.setEditTemplateMode,
|
|
34499
34508
|
setHeaderFooter: state.setHeaderFooter
|
|
34500
34509
|
});
|
|
34501
|
-
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } =
|
|
34510
|
+
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = chunkF5UOILTY_js.usePresentationSetup({
|
|
34502
34511
|
mode,
|
|
34503
34512
|
slides,
|
|
34504
34513
|
visibleSlideIndexes,
|
|
@@ -34577,7 +34586,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34577
34586
|
loading,
|
|
34578
34587
|
error
|
|
34579
34588
|
]);
|
|
34580
|
-
|
|
34589
|
+
chunkF5UOILTY_js.useTouchGestures({
|
|
34581
34590
|
targetRef: zoom.canvasViewportRef,
|
|
34582
34591
|
currentScale: zoom.scale,
|
|
34583
34592
|
callbacks: {
|
|
@@ -34599,7 +34608,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34599
34608
|
},
|
|
34600
34609
|
enabled: isTouchDevice
|
|
34601
34610
|
});
|
|
34602
|
-
const dialogs =
|
|
34611
|
+
const dialogs = chunkF5UOILTY_js.useViewerDialogs({
|
|
34603
34612
|
mode,
|
|
34604
34613
|
slides,
|
|
34605
34614
|
activeSlide,
|
|
@@ -34627,7 +34636,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34627
34636
|
history,
|
|
34628
34637
|
embeddedFontFamilies: state.embeddedFonts.map((font) => font.name)
|
|
34629
34638
|
});
|
|
34630
|
-
|
|
34639
|
+
chunkF5UOILTY_js.useClearSelectionOnSlideChange(state, activeSlideIndex);
|
|
34631
34640
|
const zoomBeforePresentRef = React108.useRef(null);
|
|
34632
34641
|
React108.useEffect(() => {
|
|
34633
34642
|
if (mode !== "present") {
|
|
@@ -34645,7 +34654,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34645
34654
|
zoom.handleZoomToFit();
|
|
34646
34655
|
zoom.canvasViewportRef.current?.scrollTo({ left: 0, top: 0 });
|
|
34647
34656
|
}, [mode]);
|
|
34648
|
-
const editorOps =
|
|
34657
|
+
const editorOps = chunkF5UOILTY_js.useEditorOperations({
|
|
34649
34658
|
state,
|
|
34650
34659
|
history,
|
|
34651
34660
|
zoom,
|
|
@@ -34690,7 +34699,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34690
34699
|
handlerRef,
|
|
34691
34700
|
viewerApi,
|
|
34692
34701
|
loadVersion
|
|
34693
|
-
} =
|
|
34702
|
+
} = chunkF5UOILTY_js.useViewerIntegration({
|
|
34694
34703
|
transformCommittedText: (text, previous) => pptx.applyAutoCorrectToEdit(text, previous, viewerOptions.proofing),
|
|
34695
34704
|
state,
|
|
34696
34705
|
zoom,
|
|
@@ -34723,7 +34732,9 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34723
34732
|
// http(s) image sources actually load.
|
|
34724
34733
|
allowExternalImages: pptx.resolveAllowExternalContent(allowExternalContent, viewerOptions),
|
|
34725
34734
|
initialSlide,
|
|
34726
|
-
googleFonts,
|
|
34735
|
+
// Host `googleFonts` first, else Trust Center > "Download fonts"; read per render, so the
|
|
34736
|
+
// managed webfont link follows the option and the next load never sees a stale value.
|
|
34737
|
+
googleFonts: pptx.resolveEffectiveGoogleFonts(googleFonts, viewerOptions),
|
|
34727
34738
|
limits,
|
|
34728
34739
|
setReadOnlyRecommendation: readOnlyRec.setRecommendation,
|
|
34729
34740
|
setModifyVerifier: readOnlyRec.setModifyVerifier,
|
|
@@ -34833,7 +34844,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34833
34844
|
updateElementById: editorOps.ops.updateElementById
|
|
34834
34845
|
});
|
|
34835
34846
|
const ribbonScope = useRibbonScopeToken();
|
|
34836
|
-
const viewPreferencesSync =
|
|
34847
|
+
const viewPreferencesSync = chunkF5UOILTY_js.useViewPreferencesSync({
|
|
34837
34848
|
loadVersion,
|
|
34838
34849
|
viewProperties: state.viewProperties,
|
|
34839
34850
|
setViewProperties: state.setViewProperties,
|
|
@@ -34884,7 +34895,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
34884
34895
|
},
|
|
34885
34896
|
[state]
|
|
34886
34897
|
);
|
|
34887
|
-
const layoutSwitching =
|
|
34898
|
+
const layoutSwitching = chunkF5UOILTY_js.useLayoutSwitching({
|
|
34888
34899
|
handler: handlerRef.current,
|
|
34889
34900
|
slides,
|
|
34890
34901
|
activeSlideIndex,
|
|
@@ -35003,7 +35014,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
35003
35014
|
"data-pptx-editor-chrome": "",
|
|
35004
35015
|
...{ [pptx.RIBBON_SCOPE_ATTR]: ribbonScope },
|
|
35005
35016
|
"aria-busy": loading,
|
|
35006
|
-
className:
|
|
35017
|
+
className: chunkP2COO2QO_js.cn(
|
|
35007
35018
|
"h-full w-full bg-background text-foreground relative",
|
|
35008
35019
|
...pptx.resolveOptionRootClasses(viewerOptions, "pptx")
|
|
35009
35020
|
),
|
|
@@ -35016,7 +35027,7 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
35016
35027
|
ref: containerRef,
|
|
35017
35028
|
tabIndex: 0,
|
|
35018
35029
|
className: "h-full w-full flex flex-col overflow-hidden outline-none",
|
|
35019
|
-
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingState, {}) : error ? /* @__PURE__ */ jsxRuntime.jsx(ErrorState, { error }) : /* @__PURE__ */ jsxRuntime.jsx(ThemeColorMapProvider, { value: themeColorMapValue, children: /* @__PURE__ */ jsxRuntime.jsxs(RecentColorsProvider, { value: recentColorsValue, children: [
|
|
35030
|
+
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingState, { fontProgress: state.fontProgress }) : error ? /* @__PURE__ */ jsxRuntime.jsx(ErrorState, { error }) : /* @__PURE__ */ jsxRuntime.jsx(ThemeColorMapProvider, { value: themeColorMapValue, children: /* @__PURE__ */ jsxRuntime.jsxs(RecentColorsProvider, { value: recentColorsValue, children: [
|
|
35020
35031
|
mode !== "present" && rootOptions.showToolbar && /* @__PURE__ */ jsxRuntime.jsx(
|
|
35021
35032
|
ViewerToolbarSection,
|
|
35022
35033
|
{
|
|
@@ -35404,8 +35415,8 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
35404
35415
|
// Nothing previously provided it, so every one of those consumers was
|
|
35405
35416
|
// silently reading `DEFAULT_VIEWER_OPTIONS` forever, no matter what
|
|
35406
35417
|
// the user changed in the Options dialog.
|
|
35407
|
-
/* @__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(
|
|
35408
|
-
|
|
35418
|
+
/* @__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(chunkF5UOILTY_js.Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
35419
|
+
chunkF5UOILTY_js.CollaborationProvider,
|
|
35409
35420
|
{
|
|
35410
35421
|
config: collaboration,
|
|
35411
35422
|
canvasWidth: canvasSize.width,
|
|
@@ -35462,19 +35473,19 @@ var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
|
35462
35473
|
slideCount: slides.length
|
|
35463
35474
|
}
|
|
35464
35475
|
),
|
|
35465
|
-
/* @__PURE__ */ jsxRuntime.jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
35476
|
+
/* @__PURE__ */ jsxRuntime.jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsxRuntime.jsx(chunkF5UOILTY_js.ChartFormatContext.Provider, { value: chartFormat, children: viewerContent }) }) })
|
|
35466
35477
|
]
|
|
35467
35478
|
}
|
|
35468
35479
|
) }) }) }) }) }) }) }) }) })
|
|
35469
35480
|
);
|
|
35470
35481
|
}
|
|
35471
35482
|
);
|
|
35472
|
-
var PowerPointViewer2 = /* @__PURE__ */
|
|
35483
|
+
var PowerPointViewer2 = /* @__PURE__ */ chunkF5UOILTY_js.withDisplayName(
|
|
35473
35484
|
PowerPointViewerComponent,
|
|
35474
35485
|
"PowerPointViewer"
|
|
35475
35486
|
);
|
|
35476
35487
|
function CollaborationStatusStrip() {
|
|
35477
|
-
const collab =
|
|
35488
|
+
const collab = chunkF5UOILTY_js.useCollaboration();
|
|
35478
35489
|
if (!collab) {
|
|
35479
35490
|
return null;
|
|
35480
35491
|
}
|
|
@@ -35491,9 +35502,9 @@ function CollaborationStateReporter({
|
|
|
35491
35502
|
onChange,
|
|
35492
35503
|
onStatus
|
|
35493
35504
|
}) {
|
|
35494
|
-
const collab =
|
|
35505
|
+
const collab = chunkF5UOILTY_js.useCollaboration();
|
|
35495
35506
|
useCollaborationStateReport(collab, onChange);
|
|
35496
|
-
|
|
35507
|
+
chunkF5UOILTY_js.useReportOnChange(collab?.status ?? "disconnected", onStatus, "disconnected");
|
|
35497
35508
|
return null;
|
|
35498
35509
|
}
|
|
35499
35510
|
function CollaborationDocumentSync({
|
|
@@ -35508,8 +35519,8 @@ function CollaborationDocumentSync({
|
|
|
35508
35519
|
onReadOnlyChange,
|
|
35509
35520
|
history
|
|
35510
35521
|
}) {
|
|
35511
|
-
const collab =
|
|
35512
|
-
|
|
35522
|
+
const collab = chunkF5UOILTY_js.useCollaboration();
|
|
35523
|
+
chunkF5UOILTY_js.useCollaborationDocumentSync({
|
|
35513
35524
|
collaboration: collab,
|
|
35514
35525
|
history,
|
|
35515
35526
|
slides,
|
|
@@ -35529,14 +35540,14 @@ function CollaborationFollowLayer({
|
|
|
35529
35540
|
setActiveSlideIndex,
|
|
35530
35541
|
slideCount
|
|
35531
35542
|
}) {
|
|
35532
|
-
const collab =
|
|
35533
|
-
const { followedClientId, followUser } =
|
|
35543
|
+
const collab = chunkF5UOILTY_js.useCollaboration();
|
|
35544
|
+
const { followedClientId, followUser } = chunkF5UOILTY_js.useFollowMode({
|
|
35534
35545
|
collab,
|
|
35535
35546
|
activeSlideIndex,
|
|
35536
35547
|
setActiveSlideIndex,
|
|
35537
35548
|
slideCount
|
|
35538
35549
|
});
|
|
35539
|
-
|
|
35550
|
+
chunkF5UOILTY_js.useBroadcastFollower({
|
|
35540
35551
|
collab,
|
|
35541
35552
|
activeSlideIndex,
|
|
35542
35553
|
setActiveSlideIndex,
|
|
@@ -35578,7 +35589,7 @@ function PptxI18nProvider({
|
|
|
35578
35589
|
() => ({ t: withEnglishFallback(translate), locale }),
|
|
35579
35590
|
[translate, locale]
|
|
35580
35591
|
);
|
|
35581
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
35592
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkP2COO2QO_js.PptxI18nContext.Provider, { value: state, children });
|
|
35582
35593
|
}
|
|
35583
35594
|
|
|
35584
35595
|
Object.defineProperty(exports, "THEME_CATALOG", {
|