pptx-react-viewer 4.50.0 → 4.51.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 +19 -0
- package/README.md +38 -4
- package/dist/{AiChatPanel-WYAL24DX.js → AiChatPanel-EV22O7UO.js} +19 -20
- package/dist/AiChatPanel-EV22O7UO.js.br +0 -0
- package/dist/AiChatPanel-EV22O7UO.js.gz +0 -0
- package/dist/{AiChatPanel-VJV5OEG2.mjs → AiChatPanel-R323KNGN.mjs} +1 -2
- package/dist/AiChatPanel-R323KNGN.mjs.br +0 -0
- package/dist/AiChatPanel-R323KNGN.mjs.gz +0 -0
- package/dist/{chunk-QHGEPW5G.mjs → chunk-ACFR4LFQ.mjs} +15 -18
- package/dist/chunk-ACFR4LFQ.mjs.br +0 -0
- package/dist/chunk-ACFR4LFQ.mjs.gz +0 -0
- package/dist/{chunk-5JJQLK7N.mjs → chunk-ETJ752B5.mjs} +151 -48
- package/dist/chunk-ETJ752B5.mjs.br +0 -0
- package/dist/chunk-ETJ752B5.mjs.gz +0 -0
- package/dist/{chunk-D5NXYXPP.js → chunk-V3XADJ2O.js} +213 -216
- package/dist/chunk-V3XADJ2O.js.br +0 -0
- package/dist/chunk-V3XADJ2O.js.gz +0 -0
- package/dist/{chunk-4OF7X5EE.js → chunk-VI5DQRQZ.js} +693 -589
- package/dist/chunk-VI5DQRQZ.js.br +0 -0
- package/dist/chunk-VI5DQRQZ.js.gz +0 -0
- package/dist/{chunk-JWNBTFZZ.js → chunk-Z22RD3E2.js} +41 -6
- package/dist/chunk-Z22RD3E2.js.br +0 -0
- package/dist/chunk-Z22RD3E2.js.gz +0 -0
- package/dist/{chunk-77IXTLKU.mjs → chunk-ZCGYPCZM.mjs} +35 -5
- package/dist/chunk-ZCGYPCZM.mjs.br +0 -0
- package/dist/chunk-ZCGYPCZM.mjs.gz +0 -0
- package/dist/index.d.ts +51 -12
- package/dist/index.js +28 -24
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- 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 +51 -12
- package/dist/viewer/index.js +23 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-VJV5OEG2.mjs.br +0 -0
- package/dist/AiChatPanel-VJV5OEG2.mjs.gz +0 -0
- package/dist/AiChatPanel-WYAL24DX.js.br +0 -0
- package/dist/AiChatPanel-WYAL24DX.js.gz +0 -0
- package/dist/chunk-4OF7X5EE.js.br +0 -0
- package/dist/chunk-4OF7X5EE.js.gz +0 -0
- package/dist/chunk-5JJQLK7N.mjs.br +0 -0
- package/dist/chunk-5JJQLK7N.mjs.gz +0 -0
- package/dist/chunk-77IXTLKU.mjs.br +0 -0
- package/dist/chunk-77IXTLKU.mjs.gz +0 -0
- package/dist/chunk-D5NXYXPP.js.br +0 -0
- package/dist/chunk-D5NXYXPP.js.gz +0 -0
- package/dist/chunk-JWNBTFZZ.js.br +0 -0
- package/dist/chunk-JWNBTFZZ.js.gz +0 -0
- package/dist/chunk-QHGEPW5G.mjs.br +0 -0
- package/dist/chunk-QHGEPW5G.mjs.gz +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkV3XADJ2O_js = require('./chunk-V3XADJ2O.js');
|
|
4
|
+
var chunkZ22RD3E2_js = require('./chunk-Z22RD3E2.js');
|
|
5
5
|
var pptx = require('ooxml-ui/pptx');
|
|
6
6
|
var React108 = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
var reactI18next = require('react-i18next');
|
|
9
8
|
var lu = require('react-icons/lu');
|
|
10
9
|
var reactDom = require('react-dom');
|
|
11
10
|
var pptx$1 = require('ooxml-core/pptx');
|
|
12
|
-
var i18n = require('ooxml-ui/pptx/i18n');
|
|
13
11
|
var ai = require('ooxml-ui/pptx/ai');
|
|
12
|
+
var i18n$1 = require('ooxml-core/i18n');
|
|
13
|
+
var i18n = require('ooxml-ui/pptx/i18n');
|
|
14
14
|
|
|
15
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
|
|
@@ -48,7 +48,7 @@ function AvatarCircle({
|
|
|
48
48
|
avatar,
|
|
49
49
|
isLocal
|
|
50
50
|
}) {
|
|
51
|
-
const { t } =
|
|
51
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
52
52
|
const initials = getInitials(name);
|
|
53
53
|
const title = isLocal ? t("pptx.collaboration.youLabel", { name }) : name;
|
|
54
54
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -83,7 +83,7 @@ function UserAvatarBar({
|
|
|
83
83
|
status,
|
|
84
84
|
maxVisible = 5
|
|
85
85
|
}) {
|
|
86
|
-
const { t } =
|
|
86
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
87
87
|
if (status === "disconnected" || status === "error") {
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
@@ -157,7 +157,7 @@ function CollaborationStatusIndicator({
|
|
|
157
157
|
connectedCount,
|
|
158
158
|
onRetry
|
|
159
159
|
}) {
|
|
160
|
-
const { t } =
|
|
160
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
161
161
|
const style = STATUS_STYLES[status];
|
|
162
162
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
163
163
|
"div",
|
|
@@ -198,7 +198,7 @@ function FollowModeBar({
|
|
|
198
198
|
followedClientId,
|
|
199
199
|
onFollow
|
|
200
200
|
}) {
|
|
201
|
-
const { t } =
|
|
201
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
202
202
|
if (presences.length === 0) {
|
|
203
203
|
return null;
|
|
204
204
|
}
|
|
@@ -309,7 +309,7 @@ function SlideTemplatePreview({
|
|
|
309
309
|
transformOrigin: "top left"
|
|
310
310
|
},
|
|
311
311
|
children: previewSlide.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
312
|
-
|
|
312
|
+
chunkV3XADJ2O_js.StaticElementRenderer,
|
|
313
313
|
{
|
|
314
314
|
element,
|
|
315
315
|
activeSlide: previewSlide,
|
|
@@ -377,8 +377,8 @@ function SlideTemplateGalleryDialog({
|
|
|
377
377
|
onInsert,
|
|
378
378
|
scheme
|
|
379
379
|
}) {
|
|
380
|
-
const { t } =
|
|
381
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
380
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
381
|
+
const { panelStyle, handlers: dragHandlers } = chunkV3XADJ2O_js.useModalDismissDrag(onClose);
|
|
382
382
|
const [selected, setSelected] = React108.useState(null);
|
|
383
383
|
const dialogRef = React108.useRef(null);
|
|
384
384
|
useModalFocus(isOpen, dialogRef, onClose);
|
|
@@ -463,7 +463,7 @@ function SlideTemplateGalleryDialog({
|
|
|
463
463
|
onInsert(spec.id);
|
|
464
464
|
onClose();
|
|
465
465
|
},
|
|
466
|
-
className:
|
|
466
|
+
className: chunkZ22RD3E2_js.cn(
|
|
467
467
|
"flex flex-col items-center gap-1 p-2 rounded border transition-colors",
|
|
468
468
|
selected === spec.id ? "border-primary bg-primary/20" : "border-border hover:border-border hover:bg-muted/50"
|
|
469
469
|
),
|
|
@@ -620,7 +620,7 @@ function nowLocalInputValue() {
|
|
|
620
620
|
return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}T${pad(now.getHours())}:${pad(now.getMinutes())}`;
|
|
621
621
|
}
|
|
622
622
|
function DateTimeFieldDialog(p) {
|
|
623
|
-
const { t } =
|
|
623
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
624
624
|
const [datePickerValue, setDatePickerValue] = React108.useState(nowLocalInputValue);
|
|
625
625
|
const [dateFormat, setDateFormat] = React108.useState("locale");
|
|
626
626
|
const confirmDatePicker = React108.useCallback(() => {
|
|
@@ -726,7 +726,7 @@ function useViewerCustomizationContext() {
|
|
|
726
726
|
return React108.useContext(ViewerCustomizationContext);
|
|
727
727
|
}
|
|
728
728
|
function InsertSection(p) {
|
|
729
|
-
const { t } =
|
|
729
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
730
730
|
const customization = useViewerCustomizationContext();
|
|
731
731
|
const ref = React108.useRef(null);
|
|
732
732
|
const [datePickerOpen, setDatePickerOpen] = React108.useState(false);
|
|
@@ -875,8 +875,8 @@ function MobileSheet({
|
|
|
875
875
|
headerRight
|
|
876
876
|
}) {
|
|
877
877
|
const sheetRef = React108.useRef(null);
|
|
878
|
-
const { t } =
|
|
879
|
-
const { dragY, dragging, handlers } =
|
|
878
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
879
|
+
const { dragY, dragging, handlers } = chunkV3XADJ2O_js.useSheetDismissDrag(onClose);
|
|
880
880
|
useModalFocus(open, sheetRef, onClose);
|
|
881
881
|
if (!open) {
|
|
882
882
|
return null;
|
|
@@ -900,7 +900,7 @@ function MobileSheet({
|
|
|
900
900
|
"aria-modal": "true",
|
|
901
901
|
"aria-label": typeof title === "string" ? title : t("pptx.mobileSheet.ariaLabel"),
|
|
902
902
|
tabIndex: -1,
|
|
903
|
-
className:
|
|
903
|
+
className: chunkZ22RD3E2_js.cn(
|
|
904
904
|
"relative bg-background border-t border-border rounded-t-2xl shadow-2xl flex flex-col overflow-hidden",
|
|
905
905
|
"animate-in slide-in-from-bottom duration-200",
|
|
906
906
|
className
|
|
@@ -947,7 +947,7 @@ function MobileSheet({
|
|
|
947
947
|
] });
|
|
948
948
|
}
|
|
949
949
|
function MobileInsertSheet(p) {
|
|
950
|
-
const { t } =
|
|
950
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
951
951
|
const close = () => p.onCloseMobileInsert?.();
|
|
952
952
|
const customization = useViewerCustomizationContext();
|
|
953
953
|
const [dateOpen, setDateOpen] = React108.useState(false);
|
|
@@ -1023,7 +1023,7 @@ function MobileInsertSheet(p) {
|
|
|
1023
1023
|
] });
|
|
1024
1024
|
}
|
|
1025
1025
|
function AnimationsSection(p) {
|
|
1026
|
-
const { t } =
|
|
1026
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1027
1027
|
const ref = React108.useRef(null);
|
|
1028
1028
|
const [previewActive, setPreviewActive] = React108.useState(false);
|
|
1029
1029
|
const timer = React108.useRef(void 0);
|
|
@@ -1104,7 +1104,7 @@ function WebHomeControls({
|
|
|
1104
1104
|
onPopup,
|
|
1105
1105
|
layoutArtwork
|
|
1106
1106
|
}) {
|
|
1107
|
-
const { t } =
|
|
1107
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1108
1108
|
const ref = React108.useRef(null);
|
|
1109
1109
|
React108.useEffect(() => {
|
|
1110
1110
|
if (ref.current) {
|
|
@@ -1145,7 +1145,7 @@ function WebHomeControls({
|
|
|
1145
1145
|
function ShapeArrangeExtras(p) {
|
|
1146
1146
|
const commands = useShapeFormatContext();
|
|
1147
1147
|
const crop = commands?.crop;
|
|
1148
|
-
const { isHidden } =
|
|
1148
|
+
const { isHidden } = chunkV3XADJ2O_js.useToolbarVisibility(p.hiddenActions);
|
|
1149
1149
|
const { onGroupElements, onUngroupElement, onUpdateElementStyle } = p;
|
|
1150
1150
|
const controls = React108.useMemo(
|
|
1151
1151
|
() => pptx.arrangeShapeHomeControls({
|
|
@@ -1196,7 +1196,7 @@ function ShapeArrangeExtras(p) {
|
|
|
1196
1196
|
return /* @__PURE__ */ jsxRuntime.jsx(WebHomeControls, { family: "arrange-shape", controls, onRequest: request });
|
|
1197
1197
|
}
|
|
1198
1198
|
function ArrangeSection(p) {
|
|
1199
|
-
const { t } =
|
|
1199
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1200
1200
|
const {
|
|
1201
1201
|
onAlignElements,
|
|
1202
1202
|
onDistributeElements,
|
|
@@ -1303,7 +1303,7 @@ function RibbonGallery({
|
|
|
1303
1303
|
tagControl = true,
|
|
1304
1304
|
onCommand
|
|
1305
1305
|
}) {
|
|
1306
|
-
const { t } =
|
|
1306
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1307
1307
|
const ref = React108.useRef(null);
|
|
1308
1308
|
const commands = useRibbonGalleryCommands();
|
|
1309
1309
|
const context = commands?.context;
|
|
@@ -1438,7 +1438,7 @@ function WebRibbonToggle({
|
|
|
1438
1438
|
);
|
|
1439
1439
|
}
|
|
1440
1440
|
function TransitionsSection(p) {
|
|
1441
|
-
const { t } =
|
|
1441
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1442
1442
|
const ref = React108.useRef(null);
|
|
1443
1443
|
const draft = React108.useMemo(() => pptx.readRibbonTransitionDraft(p.activeSlide), [p.activeSlide]);
|
|
1444
1444
|
const transition = p.activeSlide?.transition;
|
|
@@ -1480,7 +1480,7 @@ function TransitionsSection(p) {
|
|
|
1480
1480
|
case "soundPreview": {
|
|
1481
1481
|
const url = pptx.ribbonTransitionStockSoundUrl(transition);
|
|
1482
1482
|
if (url) {
|
|
1483
|
-
|
|
1483
|
+
chunkV3XADJ2O_js.playAnimationSound(url);
|
|
1484
1484
|
}
|
|
1485
1485
|
break;
|
|
1486
1486
|
}
|
|
@@ -1499,7 +1499,7 @@ function TransitionsSection(p) {
|
|
|
1499
1499
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-ribbon-transitions", { ref });
|
|
1500
1500
|
}
|
|
1501
1501
|
function DesignSection(p) {
|
|
1502
|
-
const { t } =
|
|
1502
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1503
1503
|
const actions = {
|
|
1504
1504
|
"design.themes.browseThemes": p.onToggleThemeGallery,
|
|
1505
1505
|
"design.themes.editTheme": p.onToggleThemeEditor,
|
|
@@ -1562,7 +1562,7 @@ function useRecentColors() {
|
|
|
1562
1562
|
return React108.useContext(RecentColorsContext);
|
|
1563
1563
|
}
|
|
1564
1564
|
function DrawSection(p) {
|
|
1565
|
-
const { t } =
|
|
1565
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1566
1566
|
const { pushColor, recentColors } = useRecentColors();
|
|
1567
1567
|
const ref = React108.useRef(null);
|
|
1568
1568
|
React108.useEffect(() => {
|
|
@@ -1655,7 +1655,7 @@ var AccountAuthContext = /* @__PURE__ */ React108.createContext(
|
|
|
1655
1655
|
);
|
|
1656
1656
|
var cardClass = "border border-border bg-card p-6 text-card-foreground";
|
|
1657
1657
|
function AccountPage() {
|
|
1658
|
-
const { t } =
|
|
1658
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1659
1659
|
const accountAuth = React108.useContext(AccountAuthContext);
|
|
1660
1660
|
const storage = useViewerStorage();
|
|
1661
1661
|
const [profile, setProfile] = React108.useState(
|
|
@@ -1683,7 +1683,7 @@ function AccountPage() {
|
|
|
1683
1683
|
return void 0;
|
|
1684
1684
|
});
|
|
1685
1685
|
};
|
|
1686
|
-
const version = "4.
|
|
1686
|
+
const version = "4.51.0" ;
|
|
1687
1687
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1688
1688
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: cardClass, children: [
|
|
1689
1689
|
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -1723,7 +1723,7 @@ function AccountPage() {
|
|
|
1723
1723
|
"aria-label": color,
|
|
1724
1724
|
"aria-pressed": profile.avatarColor === color,
|
|
1725
1725
|
onClick: () => updateProfile({ avatarColor: color }),
|
|
1726
|
-
className:
|
|
1726
|
+
className: chunkZ22RD3E2_js.cn(
|
|
1727
1727
|
"size-7 rounded-full border-2 transition-transform",
|
|
1728
1728
|
profile.avatarColor === color ? "border-foreground scale-110" : "border-transparent hover:scale-105"
|
|
1729
1729
|
),
|
|
@@ -1797,7 +1797,7 @@ function BackstageAction(props) {
|
|
|
1797
1797
|
] });
|
|
1798
1798
|
}
|
|
1799
1799
|
function BackstageNewGallery(props) {
|
|
1800
|
-
const { t } =
|
|
1800
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1801
1801
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1802
1802
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "mt-7 text-[17px] font-semibold", children: t("pptx.backstage.newHeading") }),
|
|
1803
1803
|
/* @__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(
|
|
@@ -1823,7 +1823,7 @@ function BackstageNewGallery(props) {
|
|
|
1823
1823
|
] });
|
|
1824
1824
|
}
|
|
1825
1825
|
function BackstageRecentList(props) {
|
|
1826
|
-
const { t } =
|
|
1826
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1827
1827
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-5 border-t border-border", children: [
|
|
1828
1828
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_120px_90px] px-3 py-2 text-[11px] font-semibold text-muted-foreground", children: [
|
|
1829
1829
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("pptx.backstage.columnName") }),
|
|
@@ -1877,7 +1877,7 @@ function BackstageCards({
|
|
|
1877
1877
|
props,
|
|
1878
1878
|
run
|
|
1879
1879
|
}) {
|
|
1880
|
-
const { t } =
|
|
1880
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1881
1881
|
const handlers = {
|
|
1882
1882
|
protect: props.onOpenPasswordProtection,
|
|
1883
1883
|
inspect: props.onOpenDocumentProperties,
|
|
@@ -1939,7 +1939,7 @@ function BackstageNavIcon({ page }) {
|
|
|
1939
1939
|
return Icon ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-[17px] shrink-0", "aria-hidden": "true" }) : null;
|
|
1940
1940
|
}
|
|
1941
1941
|
function FileSection(p) {
|
|
1942
|
-
const { t } =
|
|
1942
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
1943
1943
|
const [requestedPage, setRequestedPage] = React108.useState("home");
|
|
1944
1944
|
const customization = useViewerCustomizationContext();
|
|
1945
1945
|
const nav = pptx.backstageNavEntries(pptx.BACKSTAGE_NAV, customization);
|
|
@@ -1947,7 +1947,7 @@ function FileSection(p) {
|
|
|
1947
1947
|
const page = offered(requestedPage) ? requestedPage : offered("home") ? "home" : nav.find((item) => item.id !== "save" && item.id !== "close")?.id ?? "home";
|
|
1948
1948
|
const [query, setQuery] = React108.useState("");
|
|
1949
1949
|
const [recent, setRecent] = React108.useState([]);
|
|
1950
|
-
const { isHidden } =
|
|
1950
|
+
const { isHidden } = chunkV3XADJ2O_js.useToolbarVisibility(p.hiddenActions);
|
|
1951
1951
|
const exportHidden = isHidden("export");
|
|
1952
1952
|
const storage = useViewerStorage();
|
|
1953
1953
|
React108.useEffect(() => {
|
|
@@ -2196,7 +2196,7 @@ function RibbonMenu({
|
|
|
2196
2196
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2197
2197
|
"div",
|
|
2198
2198
|
{
|
|
2199
|
-
className:
|
|
2199
|
+
className: chunkZ22RD3E2_js.cn("fixed z-50", className),
|
|
2200
2200
|
style: pos ? { left: pos.left, top: pos.top } : { visibility: "hidden" },
|
|
2201
2201
|
children
|
|
2202
2202
|
}
|
|
@@ -2206,7 +2206,7 @@ var THUMB_WIDTH = 128;
|
|
|
2206
2206
|
var THUMB_HEIGHT = 72;
|
|
2207
2207
|
var MAX_PREVIEW_ELEMENTS = 100;
|
|
2208
2208
|
function LayoutGalleryMenu(p) {
|
|
2209
|
-
const { t } =
|
|
2209
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
2210
2210
|
return /* @__PURE__ */ jsxRuntime.jsx(RibbonMenu, { anchorRef: p.anchorRef, className: "flex flex-col w-[620px] pt-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2211
2211
|
"div",
|
|
2212
2212
|
{
|
|
@@ -2222,7 +2222,7 @@ function LayoutGalleryMenu(p) {
|
|
|
2222
2222
|
type: "button",
|
|
2223
2223
|
"aria-current": isCurrent ? "true" : void 0,
|
|
2224
2224
|
title: isCurrent ? `${layout.name} (${t("pptx.layoutGallery.current")})` : layout.name,
|
|
2225
|
-
className:
|
|
2225
|
+
className: chunkZ22RD3E2_js.cn(
|
|
2226
2226
|
"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",
|
|
2227
2227
|
isCurrent ? "border-primary bg-primary/10" : "border-transparent"
|
|
2228
2228
|
),
|
|
@@ -2296,7 +2296,7 @@ function LayoutArtwork({
|
|
|
2296
2296
|
backgroundColor
|
|
2297
2297
|
};
|
|
2298
2298
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (preview?.elements ?? []).slice(0, MAX_PREVIEW_ELEMENTS).map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2299
|
-
|
|
2299
|
+
chunkV3XADJ2O_js.StaticElementRenderer,
|
|
2300
2300
|
{
|
|
2301
2301
|
element,
|
|
2302
2302
|
activeSlide: slide,
|
|
@@ -2571,7 +2571,7 @@ function WebRibbonSection({
|
|
|
2571
2571
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-ribbon-section", { ref });
|
|
2572
2572
|
}
|
|
2573
2573
|
function ReviewSection(p) {
|
|
2574
|
-
const { t } =
|
|
2574
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
2575
2575
|
const [activeCommentId, setActiveCommentId] = React108.useState(null);
|
|
2576
2576
|
React108.useEffect(() => pptx.trackActiveComment(document, setActiveCommentId), []);
|
|
2577
2577
|
const host = p.commentsHost;
|
|
@@ -2636,7 +2636,7 @@ function CustomShowsControls({
|
|
|
2636
2636
|
onDeleteActiveCustomShow,
|
|
2637
2637
|
onToggleCurrentSlideInActiveShow
|
|
2638
2638
|
}) {
|
|
2639
|
-
const { t } =
|
|
2639
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
2640
2640
|
if (customShows.length > 0) {
|
|
2641
2641
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2642
2642
|
sep,
|
|
@@ -2691,7 +2691,7 @@ function CustomShowsControls({
|
|
|
2691
2691
|
{
|
|
2692
2692
|
type: "button",
|
|
2693
2693
|
onClick: onToggleCurrentSlideInActiveShow,
|
|
2694
|
-
className:
|
|
2694
|
+
className: chunkZ22RD3E2_js.cn(
|
|
2695
2695
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
2696
2696
|
isCurrentSlideInActiveShow ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
2697
2697
|
),
|
|
@@ -2726,7 +2726,7 @@ function SlideShowOptions({
|
|
|
2726
2726
|
children
|
|
2727
2727
|
}) {
|
|
2728
2728
|
const ref = React108.useRef(null);
|
|
2729
|
-
const { t } =
|
|
2729
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
2730
2730
|
React108.useLayoutEffect(() => {
|
|
2731
2731
|
if (!ref.current) {
|
|
2732
2732
|
return;
|
|
@@ -2745,8 +2745,8 @@ function SlideShowOptions({
|
|
|
2745
2745
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-slide-show-options", { ref, children });
|
|
2746
2746
|
}
|
|
2747
2747
|
function SubtitleSettingsControl() {
|
|
2748
|
-
const { t } =
|
|
2749
|
-
const supplied = React108.useContext(
|
|
2748
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
2749
|
+
const supplied = React108.useContext(chunkV3XADJ2O_js.ViewerOptionsStoreContext);
|
|
2750
2750
|
const fallback = React108.useRef(null);
|
|
2751
2751
|
if (!supplied) {
|
|
2752
2752
|
fallback.current ??= pptx.createViewerOptionsStore({ persist: false });
|
|
@@ -2779,8 +2779,8 @@ function SubtitleSettingsControl() {
|
|
|
2779
2779
|
);
|
|
2780
2780
|
}
|
|
2781
2781
|
function SlideShowSection(p) {
|
|
2782
|
-
const { t } =
|
|
2783
|
-
const { isHidden } =
|
|
2782
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
2783
|
+
const { isHidden } = chunkV3XADJ2O_js.useToolbarVisibility(p.hiddenActions);
|
|
2784
2784
|
const [showsOpen, setShowsOpen] = React108.useState(false);
|
|
2785
2785
|
const showsRef = React108.useRef(null);
|
|
2786
2786
|
React108.useEffect(() => {
|
|
@@ -3043,7 +3043,7 @@ function FontFormatGroup(p) {
|
|
|
3043
3043
|
return /* @__PURE__ */ jsxRuntime.jsx(WebHomeControls, { family: "font", controls, onRequest: request });
|
|
3044
3044
|
}
|
|
3045
3045
|
function FontPickerGroup(p) {
|
|
3046
|
-
const { t } =
|
|
3046
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3047
3047
|
const { enabled, fontFamily, fontSize, themeFonts, embeddedFonts, customFonts } = p;
|
|
3048
3048
|
const { onFamily, onSize } = p;
|
|
3049
3049
|
const controls = React108.useMemo(
|
|
@@ -3066,7 +3066,7 @@ function FontPickerGroup(p) {
|
|
|
3066
3066
|
return /* @__PURE__ */ jsxRuntime.jsx(WebHomeControls, { family: "font-picker", controls, onRequest: request });
|
|
3067
3067
|
}
|
|
3068
3068
|
function ParagraphGroup(p) {
|
|
3069
|
-
const { t } =
|
|
3069
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3070
3070
|
const { canMut, canFormat, effectiveTs, onUpdateTextStyle, onToggleBullets } = p;
|
|
3071
3071
|
const commands = useRibbonGalleryCommands();
|
|
3072
3072
|
const align = pptx.paragraphHomeAlign(effectiveTs?.align);
|
|
@@ -3167,7 +3167,7 @@ function useParagraphListKind(element) {
|
|
|
3167
3167
|
return React108.useSyncExternalStore(subscribe, read, readServer);
|
|
3168
3168
|
}
|
|
3169
3169
|
function TextSection(p) {
|
|
3170
|
-
const { t } =
|
|
3170
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3171
3171
|
const hasSel = Boolean(p.selectedElement);
|
|
3172
3172
|
const canMut = hasSel && p.canEdit;
|
|
3173
3173
|
const { fontFamily, fontSize } = extractFontInfo(p.selectedElement, p.themeFonts);
|
|
@@ -3243,7 +3243,7 @@ function TextSection(p) {
|
|
|
3243
3243
|
] });
|
|
3244
3244
|
}
|
|
3245
3245
|
function ViewSection(p) {
|
|
3246
|
-
const { t } =
|
|
3246
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3247
3247
|
const ref = React108.useRef(null);
|
|
3248
3248
|
React108.useEffect(() => {
|
|
3249
3249
|
const host = ref.current;
|
|
@@ -3316,10 +3316,10 @@ var MENU_ITEMS = [
|
|
|
3316
3316
|
{ key: "file", label: "pptx.ribbon.tab.file", icon: lu.LuFile }
|
|
3317
3317
|
];
|
|
3318
3318
|
function MobileMenuSheet(props) {
|
|
3319
|
-
const { t } =
|
|
3319
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3320
3320
|
const { open, onClose } = props;
|
|
3321
3321
|
const [active, setActive] = React108.useState("home");
|
|
3322
|
-
const { isTabVisible } =
|
|
3322
|
+
const { isTabVisible } = chunkV3XADJ2O_js.useToolbarVisibility(props.hiddenActions);
|
|
3323
3323
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3324
3324
|
MobileSheet,
|
|
3325
3325
|
{
|
|
@@ -3333,7 +3333,7 @@ function MobileMenuSheet(props) {
|
|
|
3333
3333
|
{
|
|
3334
3334
|
type: "button",
|
|
3335
3335
|
onClick: () => setActive(active === key ? null : key),
|
|
3336
|
-
className:
|
|
3336
|
+
className: chunkZ22RD3E2_js.cn(
|
|
3337
3337
|
"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]",
|
|
3338
3338
|
active === key ? "bg-primary text-white border-primary" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent/40"
|
|
3339
3339
|
),
|
|
@@ -3607,10 +3607,10 @@ function MobileSectionBody({
|
|
|
3607
3607
|
}
|
|
3608
3608
|
}
|
|
3609
3609
|
function MobileToolbar(props) {
|
|
3610
|
-
const { t } =
|
|
3610
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3611
3611
|
const { mode, canUndo, canRedo, onUndo, onRedo, onSetMode, onSaveAsPptx } = props;
|
|
3612
3612
|
const [menuOpen, setMenuOpen] = React108.useState(false);
|
|
3613
|
-
const { isHidden } =
|
|
3613
|
+
const { isHidden } = chunkV3XADJ2O_js.useToolbarVisibility(props.hiddenActions);
|
|
3614
3614
|
const showEdit = mode === "edit" || mode === "master";
|
|
3615
3615
|
const hidden = [];
|
|
3616
3616
|
if (isHidden("undo")) {
|
|
@@ -3656,8 +3656,8 @@ function MobileToolbar(props) {
|
|
|
3656
3656
|
] });
|
|
3657
3657
|
}
|
|
3658
3658
|
function ChartSelectionStrip() {
|
|
3659
|
-
const { t } =
|
|
3660
|
-
const commands =
|
|
3659
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3660
|
+
const commands = chunkV3XADJ2O_js.useChartFormatContext();
|
|
3661
3661
|
const chart = commands?.chart;
|
|
3662
3662
|
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
3663
3663
|
const controls = React108.useMemo(
|
|
@@ -3688,7 +3688,7 @@ function PictureSizeStrip({
|
|
|
3688
3688
|
hiddenActions
|
|
3689
3689
|
}) {
|
|
3690
3690
|
const crop = useShapeFormatContext()?.crop;
|
|
3691
|
-
const { isHidden } =
|
|
3691
|
+
const { isHidden } = chunkV3XADJ2O_js.useToolbarVisibility(hiddenActions);
|
|
3692
3692
|
const controls = React108.useMemo(
|
|
3693
3693
|
() => pptx.pictureSizeHomeControls({
|
|
3694
3694
|
editable: Boolean(crop),
|
|
@@ -3705,7 +3705,7 @@ function PictureSizeStrip({
|
|
|
3705
3705
|
return /* @__PURE__ */ jsxRuntime.jsx(WebHomeControls, { family: "picture-size", controls, onRequest: request });
|
|
3706
3706
|
}
|
|
3707
3707
|
function useTranslateOr() {
|
|
3708
|
-
const { t } =
|
|
3708
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3709
3709
|
return (key, fallback) => pptx.galleryTextLabel(t, key, fallback);
|
|
3710
3710
|
}
|
|
3711
3711
|
function ContextualTabSection({
|
|
@@ -3728,7 +3728,7 @@ function ContextualTabSection({
|
|
|
3728
3728
|
)) });
|
|
3729
3729
|
}
|
|
3730
3730
|
function DrawingGroup(p) {
|
|
3731
|
-
const { t } =
|
|
3731
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3732
3732
|
const { recentColors, pushColor } = useRecentColors();
|
|
3733
3733
|
const themeColors = useThemeColorMap();
|
|
3734
3734
|
const commands = useRibbonGalleryCommands();
|
|
@@ -3814,7 +3814,7 @@ function DrawingGroup(p) {
|
|
|
3814
3814
|
] });
|
|
3815
3815
|
}
|
|
3816
3816
|
function EditingSection(p) {
|
|
3817
|
-
const { t } =
|
|
3817
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3818
3818
|
const { onToggleFindReplace, onSelectAll } = p;
|
|
3819
3819
|
const controls = React108.useMemo(
|
|
3820
3820
|
() => pptx.editingHomeControls({ selectAll: Boolean(onSelectAll) }),
|
|
@@ -3860,8 +3860,8 @@ function RibbonAddInSection({ tab }) {
|
|
|
3860
3860
|
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";
|
|
3861
3861
|
var TAB_UNDERLINE = "after:absolute after:-bottom-px after:left-0 after:right-0 after:h-[2.5px] after:bg-primary";
|
|
3862
3862
|
function RibbonTabBar(p) {
|
|
3863
|
-
const { t } =
|
|
3864
|
-
const viewerOptions =
|
|
3863
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3864
|
+
const viewerOptions = chunkV3XADJ2O_js.useViewerOptionsContext();
|
|
3865
3865
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3866
3866
|
"div",
|
|
3867
3867
|
{
|
|
@@ -3869,7 +3869,7 @@ function RibbonTabBar(p) {
|
|
|
3869
3869
|
"data-pptx-chrome": "ribbon-tabs",
|
|
3870
3870
|
className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
|
|
3871
3871
|
children: [
|
|
3872
|
-
|
|
3872
|
+
chunkZ22RD3E2_js.TOOLBAR_SECTIONS.filter((s) => p.isTabVisible(s.id)).map((s) => {
|
|
3873
3873
|
const selected = p.activeSection === s.id;
|
|
3874
3874
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3875
3875
|
"button",
|
|
@@ -3879,7 +3879,7 @@ function RibbonTabBar(p) {
|
|
|
3879
3879
|
"aria-selected": selected,
|
|
3880
3880
|
title: pptx.resolveScreenTip(viewerOptions, t(s.labelKey)),
|
|
3881
3881
|
onClick: () => p.onSelectSection(s.id),
|
|
3882
|
-
className:
|
|
3882
|
+
className: chunkZ22RD3E2_js.cn(
|
|
3883
3883
|
TAB_BASE,
|
|
3884
3884
|
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"
|
|
3885
3885
|
),
|
|
@@ -3899,7 +3899,7 @@ function RibbonTabBar(p) {
|
|
|
3899
3899
|
...{ [pptx.RIBBON_ADD_IN_TAB_ATTR]: tab.id },
|
|
3900
3900
|
title: pptx.resolveScreenTip(viewerOptions, tab.label),
|
|
3901
3901
|
onClick: () => p.onSelectAddIn?.(tab.id),
|
|
3902
|
-
className:
|
|
3902
|
+
className: chunkZ22RD3E2_js.cn(
|
|
3903
3903
|
TAB_BASE,
|
|
3904
3904
|
selected ? `text-foreground ${TAB_UNDERLINE}` : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
|
|
3905
3905
|
),
|
|
@@ -3920,7 +3920,7 @@ function RibbonTabBar(p) {
|
|
|
3920
3920
|
...{ [pptx.RIBBON_CONTEXTUAL_TAB_ATTR]: id },
|
|
3921
3921
|
title: pptx.resolveScreenTip(viewerOptions, label),
|
|
3922
3922
|
onClick: () => p.onSelectContextual(id),
|
|
3923
|
-
className:
|
|
3923
|
+
className: chunkZ22RD3E2_js.cn(
|
|
3924
3924
|
TAB_BASE,
|
|
3925
3925
|
"text-primary",
|
|
3926
3926
|
selected ? TAB_UNDERLINE : "hover:bg-primary/10"
|
|
@@ -3937,10 +3937,10 @@ function RibbonTabBar(p) {
|
|
|
3937
3937
|
);
|
|
3938
3938
|
}
|
|
3939
3939
|
function TabRowActions(p) {
|
|
3940
|
-
const { t } =
|
|
3941
|
-
const collab =
|
|
3940
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3941
|
+
const collab = chunkV3XADJ2O_js.useCollaboration();
|
|
3942
3942
|
const isCollaborating = Boolean(collab && collab.status === "connected");
|
|
3943
|
-
const { isHidden } =
|
|
3943
|
+
const { isHidden } = chunkV3XADJ2O_js.useToolbarVisibility(p.hiddenActions);
|
|
3944
3944
|
const customization = useViewerCustomizationContext();
|
|
3945
3945
|
const ref = React108.useRef(null);
|
|
3946
3946
|
const handlers = React108.useRef(p);
|
|
@@ -3994,8 +3994,8 @@ function TabRowActions(p) {
|
|
|
3994
3994
|
] });
|
|
3995
3995
|
}
|
|
3996
3996
|
function TitleBarElement(p) {
|
|
3997
|
-
const { t } =
|
|
3998
|
-
const options =
|
|
3997
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
3998
|
+
const options = chunkV3XADJ2O_js.useViewerOptionsContext();
|
|
3999
3999
|
const customization = useViewerCustomizationContext();
|
|
4000
4000
|
const ref = React108.useRef(null);
|
|
4001
4001
|
const stripVisible = options.quickAccess.visible && pptx.isPanelVisible(customization, "quickAccessToolbar");
|
|
@@ -4059,7 +4059,7 @@ function PresentDropdown({
|
|
|
4059
4059
|
onToggleSubtitles,
|
|
4060
4060
|
showSubtitles
|
|
4061
4061
|
}) {
|
|
4062
|
-
const { t } =
|
|
4062
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
4063
4063
|
const [open, setOpen] = React108.useState(false);
|
|
4064
4064
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
4065
4065
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-stretch rounded border border-border bg-muted text-xs overflow-hidden", children: [
|
|
@@ -4068,7 +4068,7 @@ function PresentDropdown({
|
|
|
4068
4068
|
{
|
|
4069
4069
|
type: "button",
|
|
4070
4070
|
onClick: onPresent,
|
|
4071
|
-
className:
|
|
4071
|
+
className: chunkZ22RD3E2_js.cn(
|
|
4072
4072
|
"px-2 py-1 transition-colors",
|
|
4073
4073
|
isActive ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
4074
4074
|
),
|
|
@@ -4081,7 +4081,7 @@ function PresentDropdown({
|
|
|
4081
4081
|
{
|
|
4082
4082
|
type: "button",
|
|
4083
4083
|
onClick: () => setOpen((prev) => !prev),
|
|
4084
|
-
className:
|
|
4084
|
+
className: chunkZ22RD3E2_js.cn(
|
|
4085
4085
|
"inline-flex items-center px-1 transition-colors border-l border-border",
|
|
4086
4086
|
open ? "bg-primary text-white" : "hover:bg-accent text-foreground"
|
|
4087
4087
|
),
|
|
@@ -4209,7 +4209,7 @@ function ModeSwitcher({
|
|
|
4209
4209
|
onToggleSubtitles,
|
|
4210
4210
|
showSubtitles
|
|
4211
4211
|
}) {
|
|
4212
|
-
const { t } =
|
|
4212
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
4213
4213
|
if (mode === "master") {
|
|
4214
4214
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1.5", children: [
|
|
4215
4215
|
/* @__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") }),
|
|
@@ -4247,7 +4247,7 @@ var EXPORT_CARD_OF = {
|
|
|
4247
4247
|
copyImg: "copyImage"
|
|
4248
4248
|
};
|
|
4249
4249
|
function OverflowMenu(p) {
|
|
4250
|
-
const { t } =
|
|
4250
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
4251
4251
|
const customization = useViewerCustomizationContext();
|
|
4252
4252
|
const offered = (k) => {
|
|
4253
4253
|
const card = EXPORT_CARD_OF[k];
|
|
@@ -4284,7 +4284,7 @@ function OverflowMenu(p) {
|
|
|
4284
4284
|
{
|
|
4285
4285
|
type: "button",
|
|
4286
4286
|
onClick: () => p.onSetOverflowMenuOpen(!p.isOverflowMenuOpen),
|
|
4287
|
-
className:
|
|
4287
|
+
className: chunkZ22RD3E2_js.cn(
|
|
4288
4288
|
"p-1.5 rounded transition-colors",
|
|
4289
4289
|
p.isOverflowMenuOpen ? "bg-primary/80 text-white" : "bg-muted hover:bg-accent"
|
|
4290
4290
|
),
|
|
@@ -4322,7 +4322,7 @@ function OverflowMenu(p) {
|
|
|
4322
4322
|
] });
|
|
4323
4323
|
}
|
|
4324
4324
|
function ToolbarPrimaryRow(p) {
|
|
4325
|
-
const { t } =
|
|
4325
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
4326
4326
|
const {
|
|
4327
4327
|
mode,
|
|
4328
4328
|
canEdit,
|
|
@@ -4331,7 +4331,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4331
4331
|
onToggleSidebar,
|
|
4332
4332
|
onToggleInspector
|
|
4333
4333
|
} = p;
|
|
4334
|
-
const collab =
|
|
4334
|
+
const collab = chunkV3XADJ2O_js.useCollaboration();
|
|
4335
4335
|
const customization = useViewerCustomizationContext();
|
|
4336
4336
|
const showSlidesToggle = pptx.isPanelVisible(customization, "slidesPane");
|
|
4337
4337
|
const showInspectorToggle = pptx.isPanelVisible(customization, "inspector");
|
|
@@ -4349,7 +4349,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4349
4349
|
{
|
|
4350
4350
|
type: "button",
|
|
4351
4351
|
onClick: onToggleSidebar,
|
|
4352
|
-
className:
|
|
4352
|
+
className: chunkZ22RD3E2_js.cn(qab, !isSidebarCollapsed ? "text-foreground" : "text-muted-foreground"),
|
|
4353
4353
|
title: t("pptx.toolbar.toggleSlidesPanel"),
|
|
4354
4354
|
"aria-label": t("pptx.toolbar.toggleSlidesPanel"),
|
|
4355
4355
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelLeft, { className: ic })
|
|
@@ -4410,7 +4410,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4410
4410
|
{
|
|
4411
4411
|
type: "button",
|
|
4412
4412
|
onClick: onToggleInspector,
|
|
4413
|
-
className:
|
|
4413
|
+
className: chunkZ22RD3E2_js.cn(qab, isInspectorPaneOpen ? "text-foreground" : "text-muted-foreground"),
|
|
4414
4414
|
title: t("pptx.toolbar.toggleInspector"),
|
|
4415
4415
|
"aria-label": t("pptx.toolbar.toggleInspector"),
|
|
4416
4416
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuPanelRight, { className: ic })
|
|
@@ -4421,7 +4421,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4421
4421
|
{
|
|
4422
4422
|
type: "button",
|
|
4423
4423
|
onClick: p.onToggleAiPanel,
|
|
4424
|
-
className:
|
|
4424
|
+
className: chunkZ22RD3E2_js.cn(qab, p.isAiPanelOpen ? "text-primary" : "text-muted-foreground"),
|
|
4425
4425
|
title: t("pptx.toolbar.toggleAiAssistant"),
|
|
4426
4426
|
"aria-label": t("pptx.toolbar.toggleAiAssistant"),
|
|
4427
4427
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSparkles, { className: ic })
|
|
@@ -4432,7 +4432,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
4432
4432
|
{
|
|
4433
4433
|
type: "button",
|
|
4434
4434
|
onClick: p.onOpenSettings ?? p.onToggleShortcuts,
|
|
4435
|
-
className:
|
|
4435
|
+
className: chunkZ22RD3E2_js.cn(qab, "text-muted-foreground"),
|
|
4436
4436
|
title: t("pptx.toolbar.settingsShortcuts"),
|
|
4437
4437
|
"aria-label": t("pptx.toolbar.settings"),
|
|
4438
4438
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuSettings, { className: ics })
|
|
@@ -4468,7 +4468,7 @@ function useContextualRibbonTab(selectedElement, customization, onFallback) {
|
|
|
4468
4468
|
return { visible, active, fellBack, select: setChosen };
|
|
4469
4469
|
}
|
|
4470
4470
|
function HelpSection(p) {
|
|
4471
|
-
const { t } =
|
|
4471
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
4472
4472
|
const groups = pptx.buildHelpRibbon(t, {
|
|
4473
4473
|
options: pptx.isDialogAvailable(useViewerCustomizationContext(), "options")
|
|
4474
4474
|
});
|
|
@@ -4488,7 +4488,7 @@ function HelpSection(p) {
|
|
|
4488
4488
|
return /* @__PURE__ */ jsxRuntime.jsx(WebRibbonSection, { groups, onCommand: request });
|
|
4489
4489
|
}
|
|
4490
4490
|
function RecordSection(props) {
|
|
4491
|
-
const { t } =
|
|
4491
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
4492
4492
|
const request = (id) => {
|
|
4493
4493
|
if (id === "record.record.fromBeginning") {
|
|
4494
4494
|
props.onRecordFromBeginning();
|
|
@@ -4620,9 +4620,9 @@ function ToolbarLateTabs({
|
|
|
4620
4620
|
}
|
|
4621
4621
|
function Toolbar(p) {
|
|
4622
4622
|
const { mode, isNarrowViewport, isCompactToolbarOpen, toolbarSection, onSetToolbarSection } = p;
|
|
4623
|
-
const { t } =
|
|
4624
|
-
const { isTabVisible } =
|
|
4625
|
-
const viewerOptions =
|
|
4623
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
4624
|
+
const { isTabVisible } = chunkV3XADJ2O_js.useToolbarVisibility(p.hiddenActions);
|
|
4625
|
+
const viewerOptions = chunkV3XADJ2O_js.useViewerOptionsContext();
|
|
4626
4626
|
const customization = useViewerCustomizationContext();
|
|
4627
4627
|
const belowInput = React108.useMemo(
|
|
4628
4628
|
() => ({
|
|
@@ -4720,7 +4720,7 @@ function Toolbar(p) {
|
|
|
4720
4720
|
{
|
|
4721
4721
|
type: "button",
|
|
4722
4722
|
onClick: p.onToggleCompactToolbar,
|
|
4723
|
-
className:
|
|
4723
|
+
className: chunkZ22RD3E2_js.cn(
|
|
4724
4724
|
"px-2 py-1 rounded text-[11px] transition-colors mr-1",
|
|
4725
4725
|
isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
|
|
4726
4726
|
),
|
|
@@ -4746,7 +4746,7 @@ function Toolbar(p) {
|
|
|
4746
4746
|
{
|
|
4747
4747
|
ref: attachOverflow,
|
|
4748
4748
|
"data-pptx-chrome": "ribbon-content",
|
|
4749
|
-
className:
|
|
4749
|
+
className: chunkZ22RD3E2_js.cn(
|
|
4750
4750
|
// Plain controls stay compact; labelled RibbonGroups opt into stretching.
|
|
4751
4751
|
// `RibbonGroupScope` wraps controls in a `display: contents` div, so its
|
|
4752
4752
|
// children are this row's flex items too and must not shrink (a shrunk
|
|
@@ -4945,7 +4945,7 @@ function getReactSlideBackgroundStyle(slide, slideSize) {
|
|
|
4945
4945
|
};
|
|
4946
4946
|
}
|
|
4947
4947
|
function CanvasGuides({ guides, onDeleteGuide, onStartGuideDrag }) {
|
|
4948
|
-
const { t } =
|
|
4948
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
4949
4949
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: guides.map((guide) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4950
4950
|
"div",
|
|
4951
4951
|
{
|
|
@@ -5157,7 +5157,7 @@ function ChartQuickActionsOverlay({
|
|
|
5157
5157
|
scale: stageScale = 1,
|
|
5158
5158
|
onUpdateElement
|
|
5159
5159
|
}) {
|
|
5160
|
-
const { t } =
|
|
5160
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
5161
5161
|
const [open, setOpen] = React108.useState(null);
|
|
5162
5162
|
const hostRef = React108.useRef(null);
|
|
5163
5163
|
React108.useEffect(() => {
|
|
@@ -5328,7 +5328,7 @@ function CommentMarkersOverlay({
|
|
|
5328
5328
|
canvasSize,
|
|
5329
5329
|
onCommentMarkerClick
|
|
5330
5330
|
}) {
|
|
5331
|
-
const { t } =
|
|
5331
|
+
const { t } = chunkZ22RD3E2_js.useTranslation(), half = pptx.COMMENT_MARKER_SIZE / 2, markers = pptx.buildCommentMarkers(
|
|
5332
5332
|
comments,
|
|
5333
5333
|
canvasSize.width,
|
|
5334
5334
|
canvasSize.height,
|
|
@@ -5372,7 +5372,7 @@ function ConnectorEndpointOverlay({
|
|
|
5372
5372
|
canvasStageRef,
|
|
5373
5373
|
onUpdateElement
|
|
5374
5374
|
}) {
|
|
5375
|
-
const { t } =
|
|
5375
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
5376
5376
|
const [drag, setDrag] = React108.useState(null);
|
|
5377
5377
|
const candidates = React108.useMemo(
|
|
5378
5378
|
() => pptx.collectConnectorSiteCandidates(elements.filter((el) => el.id !== connector.id)),
|
|
@@ -5608,7 +5608,7 @@ function DrawingOverlaySvg({
|
|
|
5608
5608
|
onPointerDown,
|
|
5609
5609
|
onPointerMove,
|
|
5610
5610
|
onPointerUp,
|
|
5611
|
-
children: isStrokeActive && liveStrokeView ?
|
|
5611
|
+
children: isStrokeActive && liveStrokeView ? chunkV3XADJ2O_js.renderStrokeView(liveStrokeView, true, void 0, "ink-live-preview") : isStrokeActive && liveStrokeD && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5612
5612
|
"path",
|
|
5613
5613
|
{
|
|
5614
5614
|
d: liveStrokeD,
|
|
@@ -5623,7 +5623,7 @@ function DrawingOverlaySvg({
|
|
|
5623
5623
|
}
|
|
5624
5624
|
);
|
|
5625
5625
|
}
|
|
5626
|
-
function GridOverlay({ canvasSize, gridSpacingPx =
|
|
5626
|
+
function GridOverlay({ canvasSize, gridSpacingPx = chunkZ22RD3E2_js.GRID_SIZE, visible }) {
|
|
5627
5627
|
const spacing = Math.max(gridSpacingPx, 2);
|
|
5628
5628
|
const patternId = React108.useMemo(() => `grid-dot-pattern-${Math.random().toString(36).slice(2, 8)}`, []);
|
|
5629
5629
|
if (!visible) {
|
|
@@ -5651,7 +5651,7 @@ function MotionPathOverlay({
|
|
|
5651
5651
|
canEdit,
|
|
5652
5652
|
onChangePath
|
|
5653
5653
|
}) {
|
|
5654
|
-
const { t } =
|
|
5654
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
5655
5655
|
const dragRef = React108.useRef(null);
|
|
5656
5656
|
const frame = {
|
|
5657
5657
|
originX: element.x + element.width / 2,
|
|
@@ -5794,7 +5794,7 @@ function ContextMenuSeparator() {
|
|
|
5794
5794
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "separator", "aria-orientation": "horizontal", className: "my-1 border-t border-border" });
|
|
5795
5795
|
}
|
|
5796
5796
|
function EditPointsMenu({ menu, onRun }) {
|
|
5797
|
-
const { t } =
|
|
5797
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
5798
5798
|
const stop2 = (event) => event.stopPropagation();
|
|
5799
5799
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5800
5800
|
"div",
|
|
@@ -5840,7 +5840,7 @@ function EditPointsOverlay({
|
|
|
5840
5840
|
onCommit,
|
|
5841
5841
|
onExit
|
|
5842
5842
|
}) {
|
|
5843
|
-
const { t } =
|
|
5843
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
5844
5844
|
const [, rerender] = React108.useReducer((n) => n + 1, 0);
|
|
5845
5845
|
const svgRef = React108.useRef(null);
|
|
5846
5846
|
const latest = React108.useRef({ onCommit, onExit });
|
|
@@ -5996,7 +5996,7 @@ function FreeformToolOverlay({
|
|
|
5996
5996
|
onCommit,
|
|
5997
5997
|
onCancel
|
|
5998
5998
|
}) {
|
|
5999
|
-
const { t } =
|
|
5999
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
6000
6000
|
const [, rerender] = React108.useReducer((n) => n + 1, 0);
|
|
6001
6001
|
const svgRef = React108.useRef(null);
|
|
6002
6002
|
const latest = React108.useRef({ onCommit, onCancel });
|
|
@@ -6139,7 +6139,7 @@ function PictureCropOverlay({
|
|
|
6139
6139
|
onUpdate,
|
|
6140
6140
|
onContextMenu
|
|
6141
6141
|
}) {
|
|
6142
|
-
const { t } =
|
|
6142
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
6143
6143
|
const overlay = pptx.buildCropOverlay(element, scale);
|
|
6144
6144
|
const dragRef = React108.useRef(null);
|
|
6145
6145
|
const latest = React108.useRef({ scale, onUpdate });
|
|
@@ -6187,7 +6187,7 @@ function PictureCropOverlay({
|
|
|
6187
6187
|
};
|
|
6188
6188
|
};
|
|
6189
6189
|
const { ghost, frame, handles } = overlay;
|
|
6190
|
-
const src =
|
|
6190
|
+
const src = chunkV3XADJ2O_js.imgSrc(element);
|
|
6191
6191
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6192
6192
|
"div",
|
|
6193
6193
|
{
|
|
@@ -6363,7 +6363,7 @@ function HorizontalRulerView({ ticks, widthPx, highlight }) {
|
|
|
6363
6363
|
}
|
|
6364
6364
|
);
|
|
6365
6365
|
}
|
|
6366
|
-
var HorizontalRuler = /* @__PURE__ */
|
|
6366
|
+
var HorizontalRuler = /* @__PURE__ */ chunkV3XADJ2O_js.withDisplayName(
|
|
6367
6367
|
/* @__PURE__ */ React108__default.default.memo(HorizontalRulerView),
|
|
6368
6368
|
"HorizontalRuler"
|
|
6369
6369
|
);
|
|
@@ -6437,7 +6437,7 @@ function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
|
6437
6437
|
}
|
|
6438
6438
|
);
|
|
6439
6439
|
}
|
|
6440
|
-
var VerticalRuler = /* @__PURE__ */
|
|
6440
|
+
var VerticalRuler = /* @__PURE__ */ chunkV3XADJ2O_js.withDisplayName(
|
|
6441
6441
|
/* @__PURE__ */ React108__default.default.memo(VerticalRulerView),
|
|
6442
6442
|
"VerticalRuler"
|
|
6443
6443
|
);
|
|
@@ -6604,10 +6604,10 @@ function SelectionHandleOverlay({
|
|
|
6604
6604
|
position: "absolute",
|
|
6605
6605
|
left: element.x,
|
|
6606
6606
|
top: element.y,
|
|
6607
|
-
width: Math.max(element.width,
|
|
6608
|
-
height: Math.max(element.height,
|
|
6609
|
-
["--pptx-selection-width"]: `${Math.max(element.width,
|
|
6610
|
-
["--pptx-selection-height"]: `${Math.max(element.height,
|
|
6607
|
+
width: Math.max(element.width, chunkZ22RD3E2_js.MIN_ELEMENT_SIZE),
|
|
6608
|
+
height: Math.max(element.height, chunkZ22RD3E2_js.MIN_ELEMENT_SIZE),
|
|
6609
|
+
["--pptx-selection-width"]: `${Math.max(element.width, chunkZ22RD3E2_js.MIN_ELEMENT_SIZE)}px`,
|
|
6610
|
+
["--pptx-selection-height"]: `${Math.max(element.height, chunkZ22RD3E2_js.MIN_ELEMENT_SIZE)}px`,
|
|
6611
6611
|
// Every slide element carries an explicit numeric `zIndex` (see
|
|
6612
6612
|
// `getContainerStyle`), so a sibling with no z-index at all paints
|
|
6613
6613
|
// at the CSS "z-index: 0" level regardless of DOM order: any
|
|
@@ -6619,7 +6619,7 @@ function SelectionHandleOverlay({
|
|
|
6619
6619
|
// (marquee z-50, connector overlay z-55/56) to match, well clear of
|
|
6620
6620
|
// any realistic per-slide element count.
|
|
6621
6621
|
zIndex: 58,
|
|
6622
|
-
transform:
|
|
6622
|
+
transform: chunkZ22RD3E2_js.getElementTransform(element),
|
|
6623
6623
|
transformOrigin: "center",
|
|
6624
6624
|
// Transparent everywhere a handle button is not, so a click that
|
|
6625
6625
|
// misses every handle still reaches the shape (or whatever is
|
|
@@ -6631,14 +6631,14 @@ function SelectionHandleOverlay({
|
|
|
6631
6631
|
onDoubleClick: (e) => onDoubleClick(element.id, e),
|
|
6632
6632
|
onContextMenu: (e) => onContextMenu(element.id, e),
|
|
6633
6633
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6634
|
-
|
|
6634
|
+
chunkV3XADJ2O_js.ResizeHandles,
|
|
6635
6635
|
{
|
|
6636
6636
|
elementId: element.id,
|
|
6637
6637
|
adjustmentHandles,
|
|
6638
6638
|
onResizePointerDown,
|
|
6639
6639
|
onAdjustmentPointerDown,
|
|
6640
6640
|
rotation: element.rotation,
|
|
6641
|
-
nonRotationTransform:
|
|
6641
|
+
nonRotationTransform: chunkZ22RD3E2_js.getElementTransformWithoutRotation(element),
|
|
6642
6642
|
onRotate: allow.rotatable ? onRotate : void 0,
|
|
6643
6643
|
forcePointerEvents: true
|
|
6644
6644
|
}
|
|
@@ -7342,7 +7342,7 @@ function SlideCanvas(props) {
|
|
|
7342
7342
|
props.registerInlineEditReader
|
|
7343
7343
|
]
|
|
7344
7344
|
);
|
|
7345
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7345
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkV3XADJ2O_js.InlineCollaborationContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(SlideCanvasContent, { ...props }) });
|
|
7346
7346
|
}
|
|
7347
7347
|
function SlideCanvasContent({
|
|
7348
7348
|
imagePaste,
|
|
@@ -7611,7 +7611,7 @@ function SlideCanvasContent({
|
|
|
7611
7611
|
onPointerMove: handleStagePointerMove,
|
|
7612
7612
|
onPointerUp: handleStagePointerUp,
|
|
7613
7613
|
children: [
|
|
7614
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7614
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkV3XADJ2O_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
7615
7615
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
7616
7616
|
/* @__PURE__ */ jsxRuntime.jsx(GridOverlay, { canvasSize, gridSpacingPx, visible: showGrid }),
|
|
7617
7617
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7623,7 +7623,7 @@ function SlideCanvasContent({
|
|
|
7623
7623
|
}
|
|
7624
7624
|
),
|
|
7625
7625
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7626
|
-
|
|
7626
|
+
chunkV3XADJ2O_js.ElementRenderer,
|
|
7627
7627
|
{
|
|
7628
7628
|
element,
|
|
7629
7629
|
activeSlide,
|
|
@@ -7645,7 +7645,7 @@ function SlideCanvasContent({
|
|
|
7645
7645
|
),
|
|
7646
7646
|
renderInk: false,
|
|
7647
7647
|
renderGroups: true,
|
|
7648
|
-
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ?
|
|
7648
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? chunkZ22RD3E2_js.getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
7649
7649
|
onResizePointerDown: stableResizePointerDown,
|
|
7650
7650
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7651
7651
|
onRotate: stableRotate,
|
|
@@ -7667,7 +7667,7 @@ function SlideCanvasContent({
|
|
|
7667
7667
|
`tpl-${element.id}`
|
|
7668
7668
|
)),
|
|
7669
7669
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7670
|
-
|
|
7670
|
+
chunkV3XADJ2O_js.ElementRenderer,
|
|
7671
7671
|
{
|
|
7672
7672
|
element,
|
|
7673
7673
|
activeSlide,
|
|
@@ -7689,7 +7689,7 @@ function SlideCanvasContent({
|
|
|
7689
7689
|
),
|
|
7690
7690
|
renderInk: true,
|
|
7691
7691
|
renderGroups: true,
|
|
7692
|
-
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ?
|
|
7692
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? chunkZ22RD3E2_js.getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
7693
7693
|
onResizePointerDown: stableResizePointerDown,
|
|
7694
7694
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7695
7695
|
onRotate: stableRotate,
|
|
@@ -7733,7 +7733,7 @@ function SlideCanvasContent({
|
|
|
7733
7733
|
editingMember && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7734
7734
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `[data-element-id="${cssAttr(editingMember.parentId)}"] [data-element-id="${cssAttr(editingMember.member.id)}"]{visibility:hidden}` }),
|
|
7735
7735
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7736
|
-
|
|
7736
|
+
chunkV3XADJ2O_js.ElementRenderer,
|
|
7737
7737
|
{
|
|
7738
7738
|
element: editingMember.member,
|
|
7739
7739
|
activeSlide,
|
|
@@ -7768,11 +7768,11 @@ function SlideCanvasContent({
|
|
|
7768
7768
|
`group-member-edit-${editingMember.member.id}`
|
|
7769
7769
|
)
|
|
7770
7770
|
] }),
|
|
7771
|
-
selectedElement && selectedElement.id !== cropElement?.id && pptx.shouldShowElementHandles(isEditableCanvas, true, selectedElementIdSet.size) && !
|
|
7771
|
+
selectedElement && selectedElement.id !== cropElement?.id && pptx.shouldShowElementHandles(isEditableCanvas, true, selectedElementIdSet.size) && !chunkZ22RD3E2_js.isConnectorOrLineElement(selectedElement) && outlineAuthoring?.editPointsElementId !== selectedElement.id && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7772
7772
|
SelectionHandleOverlay,
|
|
7773
7773
|
{
|
|
7774
7774
|
element: selectedElement,
|
|
7775
|
-
adjustmentHandles:
|
|
7775
|
+
adjustmentHandles: chunkZ22RD3E2_js.getShapeAdjustmentHandleDescriptors(selectedElement),
|
|
7776
7776
|
onResizePointerDown: stableResizePointerDown,
|
|
7777
7777
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
7778
7778
|
onRotate: stableRotate,
|
|
@@ -7879,14 +7879,14 @@ function SlideCanvasContent({
|
|
|
7879
7879
|
);
|
|
7880
7880
|
}
|
|
7881
7881
|
function LoadingState({ className }) {
|
|
7882
|
-
const { t } =
|
|
7882
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
7883
7883
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7884
7884
|
"div",
|
|
7885
7885
|
{
|
|
7886
7886
|
role: "status",
|
|
7887
7887
|
"aria-live": "polite",
|
|
7888
7888
|
"aria-atomic": "true",
|
|
7889
|
-
className:
|
|
7889
|
+
className: chunkZ22RD3E2_js.cn(
|
|
7890
7890
|
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
7891
7891
|
className
|
|
7892
7892
|
),
|
|
@@ -7909,7 +7909,7 @@ function ErrorState({ className, error }) {
|
|
|
7909
7909
|
{
|
|
7910
7910
|
role: "alert",
|
|
7911
7911
|
"aria-live": "assertive",
|
|
7912
|
-
className:
|
|
7912
|
+
className: chunkZ22RD3E2_js.cn(
|
|
7913
7913
|
"h-full w-full flex items-center justify-center p-6 text-center text-red-400",
|
|
7914
7914
|
className
|
|
7915
7915
|
),
|
|
@@ -7918,7 +7918,7 @@ function ErrorState({ className, error }) {
|
|
|
7918
7918
|
);
|
|
7919
7919
|
}
|
|
7920
7920
|
function ShortcutPanel({ isOpen, onClose }) {
|
|
7921
|
-
const { t } =
|
|
7921
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
7922
7922
|
if (!isOpen) {
|
|
7923
7923
|
return null;
|
|
7924
7924
|
}
|
|
@@ -7940,7 +7940,7 @@ function ShortcutPanel({ isOpen, onClose }) {
|
|
|
7940
7940
|
}
|
|
7941
7941
|
)
|
|
7942
7942
|
] }),
|
|
7943
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children:
|
|
7943
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children: chunkZ22RD3E2_js.SHORTCUT_REFERENCE_ITEMS.map((shortcut) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7944
7944
|
"div",
|
|
7945
7945
|
{
|
|
7946
7946
|
className: "flex items-center justify-between gap-3 rounded bg-muted/80 px-2 py-1.5",
|
|
@@ -7962,7 +7962,7 @@ function AccessibilityPanel({
|
|
|
7962
7962
|
reducedMotion,
|
|
7963
7963
|
onToggleReducedMotion
|
|
7964
7964
|
}) {
|
|
7965
|
-
const { t } =
|
|
7965
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
7966
7966
|
if (!isOpen) {
|
|
7967
7967
|
return null;
|
|
7968
7968
|
}
|
|
@@ -8000,14 +8000,14 @@ function AccessibilityPanel({
|
|
|
8000
8000
|
"aria-label": t("pptx.accessibility.reduceMotion"),
|
|
8001
8001
|
"aria-checked": reducedMotion ?? false,
|
|
8002
8002
|
onClick: onToggleReducedMotion,
|
|
8003
|
-
className:
|
|
8003
|
+
className: chunkZ22RD3E2_js.cn(
|
|
8004
8004
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
8005
8005
|
reducedMotion ? "bg-primary" : "bg-muted-foreground/30"
|
|
8006
8006
|
),
|
|
8007
8007
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8008
8008
|
"span",
|
|
8009
8009
|
{
|
|
8010
|
-
className:
|
|
8010
|
+
className: chunkZ22RD3E2_js.cn(
|
|
8011
8011
|
"inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",
|
|
8012
8012
|
reducedMotion ? "translate-x-4" : "translate-x-0.5"
|
|
8013
8013
|
)
|
|
@@ -8026,7 +8026,7 @@ function AccessibilityPanel({
|
|
|
8026
8026
|
"div",
|
|
8027
8027
|
{
|
|
8028
8028
|
role: "listitem",
|
|
8029
|
-
className:
|
|
8029
|
+
className: chunkZ22RD3E2_js.cn(
|
|
8030
8030
|
"flex items-start gap-2 rounded px-2 py-1.5 text-xs",
|
|
8031
8031
|
/* Severity-based background and text colouring */
|
|
8032
8032
|
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"
|
|
@@ -8054,7 +8054,7 @@ function ExportProgressModal({
|
|
|
8054
8054
|
statusMessage,
|
|
8055
8055
|
onCancel
|
|
8056
8056
|
}) {
|
|
8057
|
-
const { t } =
|
|
8057
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
8058
8058
|
const ref = useWebControl(
|
|
8059
8059
|
{ open: isOpen, title, progress, status: statusMessage, translate: t },
|
|
8060
8060
|
{ "export-cancel": () => onCancel() }
|
|
@@ -8062,7 +8062,7 @@ function ExportProgressModal({
|
|
|
8062
8062
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-export-progress", { ref });
|
|
8063
8063
|
}
|
|
8064
8064
|
function StatusBar(p) {
|
|
8065
|
-
const { t } =
|
|
8065
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
8066
8066
|
const ref = React108.useRef(null);
|
|
8067
8067
|
React108.useEffect(() => {
|
|
8068
8068
|
const host = ref.current;
|
|
@@ -8142,7 +8142,7 @@ function ResizeHandle({
|
|
|
8142
8142
|
{
|
|
8143
8143
|
role: "separator",
|
|
8144
8144
|
"aria-orientation": direction,
|
|
8145
|
-
className:
|
|
8145
|
+
className: chunkZ22RD3E2_js.cn(
|
|
8146
8146
|
// Outer container: generous hit area for easy clicking.
|
|
8147
8147
|
// The visible indicator is rendered via the inner pseudo-element (::after).
|
|
8148
8148
|
"relative flex-shrink-0 z-20 group",
|
|
@@ -8153,7 +8153,7 @@ function ResizeHandle({
|
|
|
8153
8153
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8154
8154
|
"div",
|
|
8155
8155
|
{
|
|
8156
|
-
className:
|
|
8156
|
+
className: chunkZ22RD3E2_js.cn(
|
|
8157
8157
|
"absolute transition-colors",
|
|
8158
8158
|
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"
|
|
8159
8159
|
)
|
|
@@ -8172,14 +8172,14 @@ function SlideThumbnailImpl({
|
|
|
8172
8172
|
}) {
|
|
8173
8173
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
8174
8174
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
8175
|
-
const width = previewWidth ??
|
|
8175
|
+
const width = previewWidth ?? chunkZ22RD3E2_js.SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
8176
8176
|
const scale = width / safeCanvasWidth;
|
|
8177
8177
|
const previewHeight = pptx.editorThumbnailHeight(safeCanvasWidth, safeCanvasHeight, width);
|
|
8178
8178
|
const previewElements = pptx.buildPreviewElements(slide, templateElements);
|
|
8179
8179
|
const slideFieldContext = pptx.deriveSlideFieldContext(fieldContext, slide);
|
|
8180
|
-
const { t } =
|
|
8180
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
8181
8181
|
const transitionLabel = slide.transition ? (() => {
|
|
8182
|
-
const opt =
|
|
8182
|
+
const opt = chunkZ22RD3E2_js.SLIDE_TRANSITION_OPTIONS.find((o) => o.value === slide.transition?.type);
|
|
8183
8183
|
return opt ? t(opt.i18nKey) : slide.transition.type;
|
|
8184
8184
|
})() : void 0;
|
|
8185
8185
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8205,7 +8205,7 @@ function SlideThumbnailImpl({
|
|
|
8205
8205
|
...pptx.deviceStrokeStageStyle(scale)
|
|
8206
8206
|
},
|
|
8207
8207
|
children: [
|
|
8208
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8208
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkV3XADJ2O_js.SlideBackgroundImageLayer, { slide }),
|
|
8209
8209
|
slide.transition && slide.transition.type !== "none" && slide.transition.type !== "cut" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8210
8210
|
"div",
|
|
8211
8211
|
{
|
|
@@ -8215,7 +8215,7 @@ function SlideThumbnailImpl({
|
|
|
8215
8215
|
}
|
|
8216
8216
|
),
|
|
8217
8217
|
previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8218
|
-
|
|
8218
|
+
chunkV3XADJ2O_js.StaticElementRenderer,
|
|
8219
8219
|
{
|
|
8220
8220
|
element,
|
|
8221
8221
|
activeSlide: slide,
|
|
@@ -8390,10 +8390,10 @@ function ContextMenuSurface({
|
|
|
8390
8390
|
}
|
|
8391
8391
|
function ContextMenu(props) {
|
|
8392
8392
|
const { contextMenuState, mode, onClose } = props;
|
|
8393
|
-
const { t } =
|
|
8393
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
8394
8394
|
const customization = useViewerCustomizationContext();
|
|
8395
8395
|
const shapeFormat = useShapeFormatContext();
|
|
8396
|
-
const chartFormat =
|
|
8396
|
+
const chartFormat = chunkV3XADJ2O_js.useChartFormatContext();
|
|
8397
8397
|
const open = Boolean(contextMenuState) && mode === "edit";
|
|
8398
8398
|
const handlers = {
|
|
8399
8399
|
...contextMenuHandlers(props, shapeFormat),
|
|
@@ -8469,7 +8469,7 @@ function canvasContextMenuHandlers(props) {
|
|
|
8469
8469
|
}
|
|
8470
8470
|
function CanvasContextMenu(props) {
|
|
8471
8471
|
const { canvasContextMenuState, mode, onClose } = props;
|
|
8472
|
-
const { t } =
|
|
8472
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
8473
8473
|
const customization = useViewerCustomizationContext();
|
|
8474
8474
|
const open = Boolean(canvasContextMenuState) && mode === "edit";
|
|
8475
8475
|
const handlers = canvasContextMenuHandlers(props);
|
|
@@ -8532,7 +8532,7 @@ function FindReplacePanel({
|
|
|
8532
8532
|
onReplaceAll,
|
|
8533
8533
|
onClose
|
|
8534
8534
|
}) {
|
|
8535
|
-
const { t } =
|
|
8535
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
8536
8536
|
const searchInputRef = React108.useRef(null);
|
|
8537
8537
|
React108.useEffect(() => {
|
|
8538
8538
|
searchInputRef.current?.focus();
|
|
@@ -8727,7 +8727,7 @@ function SectionContextMenu({
|
|
|
8727
8727
|
onAddSection,
|
|
8728
8728
|
onClose
|
|
8729
8729
|
}) {
|
|
8730
|
-
const { t } =
|
|
8730
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
8731
8731
|
React108.useEffect(() => {
|
|
8732
8732
|
const onKeyDown = (event) => {
|
|
8733
8733
|
if (event.key === "Escape") {
|
|
@@ -8828,7 +8828,7 @@ function SectionHeader({
|
|
|
8828
8828
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8829
8829
|
lu.LuChevronDown,
|
|
8830
8830
|
{
|
|
8831
|
-
className:
|
|
8831
|
+
className: chunkZ22RD3E2_js.cn(
|
|
8832
8832
|
"h-3 w-3 flex-shrink-0 transition-transform",
|
|
8833
8833
|
isCollapsed ? "-rotate-90" : "rotate-0"
|
|
8834
8834
|
)
|
|
@@ -8874,7 +8874,7 @@ function SlideContextMenu({
|
|
|
8874
8874
|
onAddSection,
|
|
8875
8875
|
onClose
|
|
8876
8876
|
}) {
|
|
8877
|
-
const { t } =
|
|
8877
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
8878
8878
|
const selected = state.selectedIndexes;
|
|
8879
8879
|
const selectedSlides = selected.map((i) => slides[i]).filter((s) => Boolean(s));
|
|
8880
8880
|
const entries = pptx.buildSlidePaneContextMenuEntries({
|
|
@@ -8979,7 +8979,7 @@ function LazyThumbnailInner({
|
|
|
8979
8979
|
}
|
|
8980
8980
|
var LazyThumbnail = /* @__PURE__ */ React108__default.default.memo(LazyThumbnailInner);
|
|
8981
8981
|
function declaredSectionFacts(groups, sectionId) {
|
|
8982
|
-
const declared = groups.filter((group) => group.id !==
|
|
8982
|
+
const declared = groups.filter((group) => group.id !== chunkZ22RD3E2_js.DEFAULT_SECTION_GROUP_ID && group.id !== chunkZ22RD3E2_js.UNGROUPED_SECTION_ID).map((group) => group.id);
|
|
8983
8983
|
return {
|
|
8984
8984
|
isDeclared: declared.includes(sectionId),
|
|
8985
8985
|
index: declared.indexOf(sectionId),
|
|
@@ -9036,7 +9036,7 @@ function SlideItemInner({
|
|
|
9036
9036
|
onDrop,
|
|
9037
9037
|
slideRef
|
|
9038
9038
|
}) {
|
|
9039
|
-
const { t } =
|
|
9039
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
9040
9040
|
const isHidden = Boolean(slide.hidden);
|
|
9041
9041
|
const cue = pptx.hiddenSlideCue(slide.hidden, "rail", slideIndex);
|
|
9042
9042
|
const handleContextMenu = React108.useCallback(
|
|
@@ -9064,7 +9064,7 @@ function SlideItemInner({
|
|
|
9064
9064
|
"data-pptx-chrome": "slide-row",
|
|
9065
9065
|
"aria-describedby": cue.labelId,
|
|
9066
9066
|
"data-pptx-slide-hidden": cue.marker,
|
|
9067
|
-
className:
|
|
9067
|
+
className: chunkZ22RD3E2_js.cn(
|
|
9068
9068
|
"group relative flex w-full items-center gap-1 cursor-pointer border-0 bg-transparent py-0.5 px-1 text-left transition-all",
|
|
9069
9069
|
isActive && "bg-accent/40 before:absolute before:left-0 before:top-1 before:bottom-1 before:w-[3px] before:bg-primary before:rounded-r",
|
|
9070
9070
|
isSelected && !isActive && "bg-accent/20 ring-1 ring-inset ring-primary/50",
|
|
@@ -9086,7 +9086,7 @@ function SlideItemInner({
|
|
|
9086
9086
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9087
9087
|
"span",
|
|
9088
9088
|
{
|
|
9089
|
-
className:
|
|
9089
|
+
className: chunkZ22RD3E2_js.cn(
|
|
9090
9090
|
"text-[10px] tabular-nums text-right select-none w-full",
|
|
9091
9091
|
isActive ? "text-primary font-medium" : "text-muted-foreground"
|
|
9092
9092
|
),
|
|
@@ -9109,7 +9109,7 @@ function SlideItemInner({
|
|
|
9109
9109
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9110
9110
|
"div",
|
|
9111
9111
|
{
|
|
9112
|
-
className:
|
|
9112
|
+
className: chunkZ22RD3E2_js.cn(
|
|
9113
9113
|
"relative shrink-0 overflow-hidden border transition-colors bg-white",
|
|
9114
9114
|
isActive ? "border-primary/60" : "border-transparent group-hover:border-border/40"
|
|
9115
9115
|
),
|
|
@@ -9307,8 +9307,8 @@ function SlidesPaneSidebar({
|
|
|
9307
9307
|
fieldContext,
|
|
9308
9308
|
tableStyleContext
|
|
9309
9309
|
}) {
|
|
9310
|
-
const { t } =
|
|
9311
|
-
const collab =
|
|
9310
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
9311
|
+
const collab = chunkV3XADJ2O_js.useCollaboration();
|
|
9312
9312
|
const slideRefs = React108.useRef(/* @__PURE__ */ new Map());
|
|
9313
9313
|
const renameInputRef = React108.useRef(null);
|
|
9314
9314
|
const slidePresenceMap = React108.useMemo(() => {
|
|
@@ -9333,7 +9333,7 @@ function SlidesPaneSidebar({
|
|
|
9333
9333
|
() => estimateSlideItemHeight(canvasSize.width, canvasSize.height, previewWidth),
|
|
9334
9334
|
[canvasSize.width, canvasSize.height, previewWidth]
|
|
9335
9335
|
);
|
|
9336
|
-
const showSectionHeaders = sectionGroups.some((group) => group.id !==
|
|
9336
|
+
const showSectionHeaders = sectionGroups.some((group) => group.id !== chunkZ22RD3E2_js.DEFAULT_SECTION_GROUP_ID);
|
|
9337
9337
|
const {
|
|
9338
9338
|
collapsedSections,
|
|
9339
9339
|
renamingSectionId,
|
|
@@ -9403,7 +9403,7 @@ function SlidesPaneSidebar({
|
|
|
9403
9403
|
[sectionGroups, showSectionHeaders, effectiveCollapsed]
|
|
9404
9404
|
);
|
|
9405
9405
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
9406
|
-
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } =
|
|
9406
|
+
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = chunkV3XADJ2O_js.useVirtualizedSlides({
|
|
9407
9407
|
totalItems: shouldVirtualize ? flatItems.length : 0,
|
|
9408
9408
|
itemHeight: estimatedItemHeight
|
|
9409
9409
|
});
|
|
@@ -9648,7 +9648,7 @@ function HandoutMasterPanel({
|
|
|
9648
9648
|
onSlidesPerPageChange,
|
|
9649
9649
|
onBackgroundChange
|
|
9650
9650
|
}) {
|
|
9651
|
-
const { t } =
|
|
9651
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
9652
9652
|
if (!handoutMaster) {
|
|
9653
9653
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-4 text-center text-xs text-muted-foreground", children: t("pptx.master.noHandoutMaster") });
|
|
9654
9654
|
}
|
|
@@ -9660,7 +9660,7 @@ function HandoutMasterPanel({
|
|
|
9660
9660
|
{
|
|
9661
9661
|
type: "button",
|
|
9662
9662
|
"aria-pressed": slidesPerPage === count,
|
|
9663
|
-
className:
|
|
9663
|
+
className: chunkZ22RD3E2_js.cn(
|
|
9664
9664
|
"px-2 py-1.5 rounded text-[11px] font-medium transition-colors",
|
|
9665
9665
|
slidesPerPage === count ? "bg-primary text-white" : "bg-accent/50 text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
|
9666
9666
|
),
|
|
@@ -9703,7 +9703,7 @@ function NotesMasterPanel({
|
|
|
9703
9703
|
notesMaster,
|
|
9704
9704
|
onBackgroundChange
|
|
9705
9705
|
}) {
|
|
9706
|
-
const { t } =
|
|
9706
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
9707
9707
|
const placeholderLabels = React108.useMemo(() => {
|
|
9708
9708
|
if (!notesMaster?.placeholders) {
|
|
9709
9709
|
return [];
|
|
@@ -9765,7 +9765,7 @@ function SlideMastersList({
|
|
|
9765
9765
|
React108.useEffect(() => {
|
|
9766
9766
|
activeRef.current?.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
9767
9767
|
}, [activeMasterIndex, activeLayoutIndex]);
|
|
9768
|
-
const { t } =
|
|
9768
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
9769
9769
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9770
9770
|
slideMasters.map((master, masterIdx) => {
|
|
9771
9771
|
const isMasterActive = masterIdx === activeMasterIndex && activeLayoutIndex === null;
|
|
@@ -9778,7 +9778,7 @@ function SlideMastersList({
|
|
|
9778
9778
|
ref: isMasterActive ? activeRef : void 0,
|
|
9779
9779
|
"aria-pressed": isMasterActive,
|
|
9780
9780
|
"aria-label": master.name || t("pptx.master.master"),
|
|
9781
|
-
className:
|
|
9781
|
+
className: chunkZ22RD3E2_js.cn(
|
|
9782
9782
|
"group relative block w-full cursor-pointer rounded-lg border-2 p-1 text-left transition-all",
|
|
9783
9783
|
isMasterActive ? "border-amber-500 bg-amber-500/10" : "border-border bg-background/40 hover:border-border"
|
|
9784
9784
|
),
|
|
@@ -9795,7 +9795,7 @@ function SlideMastersList({
|
|
|
9795
9795
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 px-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9796
9796
|
"span",
|
|
9797
9797
|
{
|
|
9798
|
-
className:
|
|
9798
|
+
className: chunkZ22RD3E2_js.cn(
|
|
9799
9799
|
"text-[10px] font-medium",
|
|
9800
9800
|
isMasterActive ? "text-amber-400" : "text-muted-foreground"
|
|
9801
9801
|
),
|
|
@@ -9814,7 +9814,7 @@ function SlideMastersList({
|
|
|
9814
9814
|
ref: isLayoutActive ? activeRef : void 0,
|
|
9815
9815
|
"aria-pressed": isLayoutActive,
|
|
9816
9816
|
"aria-label": layout.name || t("pptx.master.layout"),
|
|
9817
|
-
className:
|
|
9817
|
+
className: chunkZ22RD3E2_js.cn(
|
|
9818
9818
|
"group relative block w-full cursor-pointer rounded-md border-2 p-0.5 text-left transition-all",
|
|
9819
9819
|
isLayoutActive ? "border-primary bg-primary/10" : "border-border bg-background/40 hover:border-border"
|
|
9820
9820
|
),
|
|
@@ -9831,7 +9831,7 @@ function SlideMastersList({
|
|
|
9831
9831
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 px-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9832
9832
|
"span",
|
|
9833
9833
|
{
|
|
9834
|
-
className:
|
|
9834
|
+
className: chunkZ22RD3E2_js.cn(
|
|
9835
9835
|
"text-[9px]",
|
|
9836
9836
|
isLayoutActive ? "text-primary" : "text-muted-foreground"
|
|
9837
9837
|
),
|
|
@@ -9875,7 +9875,7 @@ function MasterViewSidebar({
|
|
|
9875
9875
|
onSlidesBackgroundChange
|
|
9876
9876
|
}) {
|
|
9877
9877
|
const scrollRef = React108.useRef(null);
|
|
9878
|
-
const { t } =
|
|
9878
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
9879
9879
|
const slidesBackground = pptx.masterViewBackgroundColor(
|
|
9880
9880
|
{ slideMasters },
|
|
9881
9881
|
{ tab: "slides", masterIndex: activeMasterIndex, layoutIndex: activeLayoutIndex }
|
|
@@ -9923,7 +9923,7 @@ function MasterViewSidebar({
|
|
|
9923
9923
|
type: "button",
|
|
9924
9924
|
role: "tab",
|
|
9925
9925
|
"aria-selected": masterViewTab === tab.key,
|
|
9926
|
-
className:
|
|
9926
|
+
className: chunkZ22RD3E2_js.cn(
|
|
9927
9927
|
"flex-1 px-1 py-1.5 text-[10px] font-medium transition-colors border-b-2",
|
|
9928
9928
|
masterViewTab === tab.key ? "border-amber-500 text-amber-400" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
9929
9929
|
),
|
|
@@ -10025,7 +10025,7 @@ function NotesMasterCanvas({
|
|
|
10025
10025
|
notesText,
|
|
10026
10026
|
slideNumber
|
|
10027
10027
|
}) {
|
|
10028
|
-
const { t } =
|
|
10028
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
10029
10029
|
const pageWidth = notesCanvasSize?.width ?? DEFAULT_NOTES_WIDTH;
|
|
10030
10030
|
const pageHeight = notesCanvasSize?.height ?? DEFAULT_NOTES_HEIGHT;
|
|
10031
10031
|
const scale = React108.useMemo(() => {
|
|
@@ -10285,7 +10285,7 @@ function HandoutMasterCanvas({
|
|
|
10285
10285
|
slideThumbnails,
|
|
10286
10286
|
pageNumber
|
|
10287
10287
|
}) {
|
|
10288
|
-
const { t } =
|
|
10288
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
10289
10289
|
const slideAspect = 4 / 3;
|
|
10290
10290
|
const scale = React108.useMemo(() => {
|
|
10291
10291
|
const scaleX = canvasSize.width / PAGE_WIDTH;
|
|
@@ -10426,7 +10426,7 @@ function SectionBlock({
|
|
|
10426
10426
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10427
10427
|
lu.LuChevronDown,
|
|
10428
10428
|
{
|
|
10429
|
-
className:
|
|
10429
|
+
className: chunkZ22RD3E2_js.cn("h-3 w-3 transition-transform", collapsed ? "-rotate-90" : "rotate-0")
|
|
10430
10430
|
}
|
|
10431
10431
|
),
|
|
10432
10432
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-left", children: section.label }),
|
|
@@ -10470,12 +10470,12 @@ function SlideCardImpl({
|
|
|
10470
10470
|
onDragLeave,
|
|
10471
10471
|
onDrop
|
|
10472
10472
|
}) {
|
|
10473
|
-
const { t } =
|
|
10473
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
10474
10474
|
const cue = pptx.hiddenSlideCue(slide.hidden, "sorter", index);
|
|
10475
10475
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10476
10476
|
"div",
|
|
10477
10477
|
{
|
|
10478
|
-
className:
|
|
10478
|
+
className: chunkZ22RD3E2_js.cn(
|
|
10479
10479
|
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
10480
10480
|
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",
|
|
10481
10481
|
slide.hidden && "opacity-40"
|
|
@@ -10498,7 +10498,7 @@ function SlideCardImpl({
|
|
|
10498
10498
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10499
10499
|
"span",
|
|
10500
10500
|
{
|
|
10501
|
-
className:
|
|
10501
|
+
className: chunkZ22RD3E2_js.cn(
|
|
10502
10502
|
"text-[11px] font-medium px-0.5",
|
|
10503
10503
|
isSelected ? "text-primary" : isActive ? "text-primary/70" : "text-muted-foreground"
|
|
10504
10504
|
),
|
|
@@ -10576,7 +10576,7 @@ function SorterContextMenu({
|
|
|
10576
10576
|
onToggleHide,
|
|
10577
10577
|
onClose
|
|
10578
10578
|
}) {
|
|
10579
|
-
const { t } =
|
|
10579
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
10580
10580
|
const menuX = Math.max(8, Math.min(x, window.innerWidth - 220));
|
|
10581
10581
|
const menuY = Math.max(8, Math.min(y, window.innerHeight - 300));
|
|
10582
10582
|
const entries = pptx.buildSlideSorterContextMenuEntries({
|
|
@@ -10931,7 +10931,7 @@ function SlideSorterOverlay({
|
|
|
10931
10931
|
onToggleHideSlides,
|
|
10932
10932
|
onClose
|
|
10933
10933
|
}) {
|
|
10934
|
-
const { t } =
|
|
10934
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
10935
10935
|
const state = useSlideSorterState({
|
|
10936
10936
|
slides,
|
|
10937
10937
|
templateElementsBySlideId,
|
|
@@ -11177,7 +11177,7 @@ function OutlineViewOverlay({
|
|
|
11177
11177
|
bumpHistory,
|
|
11178
11178
|
onClose
|
|
11179
11179
|
}) {
|
|
11180
|
-
const { t } =
|
|
11180
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
11181
11181
|
const { rows, containerRef, run, onRowKeyDown } = useOutlineView({
|
|
11182
11182
|
slides,
|
|
11183
11183
|
canvasSize,
|
|
@@ -11268,7 +11268,7 @@ function ReadingViewStage({
|
|
|
11268
11268
|
"div",
|
|
11269
11269
|
{
|
|
11270
11270
|
className: "absolute inset-0",
|
|
11271
|
-
style: { backgroundColor:
|
|
11271
|
+
style: { backgroundColor: chunkZ22RD3E2_js.normalizeHexColor(slide.backgroundColor, "#ffffff") }
|
|
11272
11272
|
}
|
|
11273
11273
|
),
|
|
11274
11274
|
slide.backgroundImage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11287,7 +11287,7 @@ function ReadingViewStage({
|
|
|
11287
11287
|
className: "absolute left-0 top-0 origin-top-left",
|
|
11288
11288
|
style: { width, height, transform: `scale(${scale})`, ...pptx.deviceStrokeStageStyle(scale) },
|
|
11289
11289
|
children: elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11290
|
-
|
|
11290
|
+
chunkV3XADJ2O_js.StaticElementRenderer,
|
|
11291
11291
|
{
|
|
11292
11292
|
element,
|
|
11293
11293
|
activeSlide: slide,
|
|
@@ -11368,7 +11368,7 @@ function ReadingViewOverlay({
|
|
|
11368
11368
|
activeSlideIndex,
|
|
11369
11369
|
onExit
|
|
11370
11370
|
}) {
|
|
11371
|
-
const { t } =
|
|
11371
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
11372
11372
|
const { state, viewportRef, scale, run } = useReadingView({
|
|
11373
11373
|
slideCount: slides.length,
|
|
11374
11374
|
canvasSize,
|
|
@@ -11499,7 +11499,7 @@ function renderRichNotesSegments(segments) {
|
|
|
11499
11499
|
if (segment.style.fontFamily) {
|
|
11500
11500
|
style.fontFamily = segment.style.fontFamily;
|
|
11501
11501
|
}
|
|
11502
|
-
if (segment.style.hyperlink &&
|
|
11502
|
+
if (segment.style.hyperlink && chunkZ22RD3E2_js.isUrlSafe(segment.style.hyperlink)) {
|
|
11503
11503
|
const safeHref = segment.style.hyperlink;
|
|
11504
11504
|
style.color = "#4a9eff";
|
|
11505
11505
|
style.textDecoration = "underline";
|
|
@@ -11512,7 +11512,7 @@ function renderRichNotesSegments(segments) {
|
|
|
11512
11512
|
style,
|
|
11513
11513
|
onClick: (e) => {
|
|
11514
11514
|
e.preventDefault();
|
|
11515
|
-
|
|
11515
|
+
chunkZ22RD3E2_js.safeOpenUrl(safeHref);
|
|
11516
11516
|
},
|
|
11517
11517
|
children: segment.text
|
|
11518
11518
|
},
|
|
@@ -11536,7 +11536,7 @@ function NotesPrintDialog({
|
|
|
11536
11536
|
onClose,
|
|
11537
11537
|
notesStyle
|
|
11538
11538
|
}) {
|
|
11539
|
-
const { t } =
|
|
11539
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
11540
11540
|
const printFrameRef = React108.useRef(null);
|
|
11541
11541
|
const handlePrint = React108.useCallback(() => {
|
|
11542
11542
|
const iframe = printFrameRef.current;
|
|
@@ -11594,7 +11594,7 @@ function NotesPrintDialog({
|
|
|
11594
11594
|
] }) });
|
|
11595
11595
|
}
|
|
11596
11596
|
function NotesToolbar(p) {
|
|
11597
|
-
const { t } =
|
|
11597
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
11598
11598
|
const ref = React108.useRef(null);
|
|
11599
11599
|
React108.useEffect(() => {
|
|
11600
11600
|
const host = ref.current;
|
|
@@ -11861,7 +11861,7 @@ function useSlideNotes({
|
|
|
11861
11861
|
const href = target.getAttribute("data-hyperlink") || target.getAttribute("href");
|
|
11862
11862
|
if (href && (e.ctrlKey || e.metaKey)) {
|
|
11863
11863
|
e.preventDefault();
|
|
11864
|
-
|
|
11864
|
+
chunkZ22RD3E2_js.safeOpenUrl(href);
|
|
11865
11865
|
}
|
|
11866
11866
|
}, []);
|
|
11867
11867
|
return {
|
|
@@ -11898,7 +11898,7 @@ function SlideNotesPanel({
|
|
|
11898
11898
|
notesStyle,
|
|
11899
11899
|
onHeightChange
|
|
11900
11900
|
}) {
|
|
11901
|
-
const { t } =
|
|
11901
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
11902
11902
|
const rootRef = React108__default.default.useRef(null);
|
|
11903
11903
|
React108__default.default.useEffect(() => {
|
|
11904
11904
|
const el = rootRef.current;
|
|
@@ -11942,7 +11942,7 @@ function SlideNotesPanel({
|
|
|
11942
11942
|
});
|
|
11943
11943
|
const hasNotes = draft.trim().length > 0;
|
|
11944
11944
|
const slideLabel = activeSlide ? t("pptx.notes.slideN", { n: activeSlide.slideNumber }) : t("pptx.notes.noSlide");
|
|
11945
|
-
const { dragY, handlers: dragHandlers } =
|
|
11945
|
+
const { dragY, handlers: dragHandlers } = chunkV3XADJ2O_js.useSheetDismissDrag(onToggle);
|
|
11946
11946
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11947
11947
|
isExpanded && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11948
11948
|
"button",
|
|
@@ -11958,7 +11958,7 @@ function SlideNotesPanel({
|
|
|
11958
11958
|
{
|
|
11959
11959
|
ref: rootRef,
|
|
11960
11960
|
"data-pptx-chrome": "notes",
|
|
11961
|
-
className:
|
|
11961
|
+
className: chunkZ22RD3E2_js.cn(
|
|
11962
11962
|
"flex flex-col border-t border-border/60 bg-background select-none",
|
|
11963
11963
|
// On mobile, hide the entire notes strip when collapsed: the
|
|
11964
11964
|
// MobileBottomBar's Notes button is the entry point instead.
|
|
@@ -12142,7 +12142,7 @@ function VersionHistoryPanel({
|
|
|
12142
12142
|
onClose,
|
|
12143
12143
|
onRestore
|
|
12144
12144
|
}) {
|
|
12145
|
-
const { t } =
|
|
12145
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
12146
12146
|
const [versions, setVersions] = React108.useState([]);
|
|
12147
12147
|
const [loading, setLoading] = React108.useState(false);
|
|
12148
12148
|
const [restoringKey, setRestoringKey] = React108.useState(null);
|
|
@@ -12288,7 +12288,7 @@ function SlideDiffRow({
|
|
|
12288
12288
|
onAccept,
|
|
12289
12289
|
onReject
|
|
12290
12290
|
}) {
|
|
12291
|
-
const { t } =
|
|
12291
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
12292
12292
|
const [expanded, setExpanded] = React108.useState(diff.status === "changed");
|
|
12293
12293
|
const statusLabel = (() => {
|
|
12294
12294
|
switch (diff.status) {
|
|
@@ -12322,7 +12322,7 @@ function SlideDiffRow({
|
|
|
12322
12322
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12323
12323
|
"div",
|
|
12324
12324
|
{
|
|
12325
|
-
className:
|
|
12325
|
+
className: chunkZ22RD3E2_js.cn(
|
|
12326
12326
|
"rounded-lg border transition-colors",
|
|
12327
12327
|
isResolved ? "border-border/60 bg-card/40 opacity-60" : "border-border bg-background/70"
|
|
12328
12328
|
),
|
|
@@ -12336,7 +12336,7 @@ function SlideDiffRow({
|
|
|
12336
12336
|
children: [
|
|
12337
12337
|
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" }),
|
|
12338
12338
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground", children: t("pptx.compare.slideNumber", { number: slideNumber }) }),
|
|
12339
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
12339
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkZ22RD3E2_js.cn("rounded-full px-2 py-0.5 text-[10px] font-medium", statusColor), children: statusLabel }),
|
|
12340
12340
|
diff.changes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
12341
12341
|
diff.changes.length,
|
|
12342
12342
|
" ",
|
|
@@ -12346,7 +12346,7 @@ function SlideDiffRow({
|
|
|
12346
12346
|
isResolved && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12347
12347
|
"span",
|
|
12348
12348
|
{
|
|
12349
|
-
className:
|
|
12349
|
+
className: chunkZ22RD3E2_js.cn(
|
|
12350
12350
|
"text-[10px] font-medium",
|
|
12351
12351
|
accepted ? "text-green-400" : "text-muted-foreground"
|
|
12352
12352
|
),
|
|
@@ -12374,7 +12374,7 @@ function SlideDiffRow({
|
|
|
12374
12374
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12375
12375
|
"div",
|
|
12376
12376
|
{
|
|
12377
|
-
className:
|
|
12377
|
+
className: chunkZ22RD3E2_js.cn(
|
|
12378
12378
|
"rounded border overflow-hidden",
|
|
12379
12379
|
diff.status === "added" ? "border-green-700/60" : diff.status === "changed" ? "border-amber-700/60" : "border-border"
|
|
12380
12380
|
),
|
|
@@ -12441,7 +12441,7 @@ function ComparePanel({
|
|
|
12441
12441
|
onRejectSlide,
|
|
12442
12442
|
onAcceptAll
|
|
12443
12443
|
}) {
|
|
12444
|
-
const { t } =
|
|
12444
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
12445
12445
|
const [accepted, setAccepted] = React108.useState({});
|
|
12446
12446
|
const [rejected, setRejected] = React108.useState({});
|
|
12447
12447
|
const handleAccept = React108.useCallback(
|
|
@@ -12570,7 +12570,7 @@ function PasswordProtectionDialog({
|
|
|
12570
12570
|
onSetPassword,
|
|
12571
12571
|
onRemovePassword
|
|
12572
12572
|
}) {
|
|
12573
|
-
const { t } =
|
|
12573
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
12574
12574
|
const [password, setPassword] = React108.useState("");
|
|
12575
12575
|
const [confirmPassword, setConfirmPassword] = React108.useState("");
|
|
12576
12576
|
const [showPassword, setShowPassword] = React108.useState(false);
|
|
@@ -12786,7 +12786,7 @@ function DocumentPropertiesCustomTab({
|
|
|
12786
12786
|
customProperties,
|
|
12787
12787
|
onUpdate
|
|
12788
12788
|
}) {
|
|
12789
|
-
const { t } =
|
|
12789
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
12790
12790
|
const handleAdd = React108.useCallback(() => {
|
|
12791
12791
|
onUpdate([...customProperties, { name: "", value: "", type: "lpwstr" }]);
|
|
12792
12792
|
}, [customProperties, onUpdate]);
|
|
@@ -12988,7 +12988,7 @@ function DocumentPropertiesStatisticsTab({
|
|
|
12988
12988
|
onUpdateAppProperties,
|
|
12989
12989
|
canEdit
|
|
12990
12990
|
}) {
|
|
12991
|
-
const { t } =
|
|
12991
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
12992
12992
|
const handleEditableChange = React108.useCallback(
|
|
12993
12993
|
(key, value) => {
|
|
12994
12994
|
onUpdateAppProperties({ [key]: value });
|
|
@@ -13028,7 +13028,7 @@ function DocumentPropertiesDialog({
|
|
|
13028
13028
|
onClose,
|
|
13029
13029
|
onSave
|
|
13030
13030
|
}) {
|
|
13031
|
-
const { t } =
|
|
13031
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
13032
13032
|
const [activeTab, setActiveTab] = React108.useState("summary");
|
|
13033
13033
|
const [draftCore, setDraftCore] = React108.useState({});
|
|
13034
13034
|
const [draftCustom, setDraftCustom] = React108.useState([]);
|
|
@@ -13079,7 +13079,7 @@ function DocumentPropertiesDialog({
|
|
|
13079
13079
|
const handleClose = React108.useCallback(() => {
|
|
13080
13080
|
onClose();
|
|
13081
13081
|
}, [onClose]);
|
|
13082
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
13082
|
+
const { panelStyle, handlers: dragHandlers } = chunkV3XADJ2O_js.useModalDismissDrag(handleClose);
|
|
13083
13083
|
if (!isOpen) {
|
|
13084
13084
|
return null;
|
|
13085
13085
|
}
|
|
@@ -13216,7 +13216,7 @@ function FontEmbeddingPanel({
|
|
|
13216
13216
|
onClose,
|
|
13217
13217
|
onToggleEmbedFonts
|
|
13218
13218
|
}) {
|
|
13219
|
-
const { t } =
|
|
13219
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
13220
13220
|
const [availableFamilies, setAvailableFamilies] = React108.useState(/* @__PURE__ */ new Set());
|
|
13221
13221
|
const [scanning, setScanning] = React108.useState(false);
|
|
13222
13222
|
const [scanned, setScanned] = React108.useState(false);
|
|
@@ -13344,7 +13344,7 @@ function DigitalSignaturesDialog({
|
|
|
13344
13344
|
hasSignatures,
|
|
13345
13345
|
signatureCount
|
|
13346
13346
|
}) {
|
|
13347
|
-
const { t } =
|
|
13347
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
13348
13348
|
if (!isOpen) {
|
|
13349
13349
|
return null;
|
|
13350
13350
|
}
|
|
@@ -13416,7 +13416,7 @@ function SignatureStatusBadge({
|
|
|
13416
13416
|
signatureCount,
|
|
13417
13417
|
onClick
|
|
13418
13418
|
}) {
|
|
13419
|
-
const { t } =
|
|
13419
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
13420
13420
|
if (!hasSignatures || signatureCount === 0) {
|
|
13421
13421
|
return null;
|
|
13422
13422
|
}
|
|
@@ -13442,7 +13442,7 @@ function SignatureStrippedDialog({
|
|
|
13442
13442
|
onConfirm,
|
|
13443
13443
|
onCancel
|
|
13444
13444
|
}) {
|
|
13445
|
-
const { t } =
|
|
13445
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
13446
13446
|
if (!isOpen) {
|
|
13447
13447
|
return null;
|
|
13448
13448
|
}
|
|
@@ -13511,7 +13511,7 @@ function EncryptedFileDialog({
|
|
|
13511
13511
|
isOpen,
|
|
13512
13512
|
onClose
|
|
13513
13513
|
}) {
|
|
13514
|
-
const { t } =
|
|
13514
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
13515
13515
|
if (!isOpen) {
|
|
13516
13516
|
return null;
|
|
13517
13517
|
}
|
|
@@ -13658,7 +13658,7 @@ function PresentationAudienceEffects({ snapshot }) {
|
|
|
13658
13658
|
] });
|
|
13659
13659
|
}
|
|
13660
13660
|
function PresentationEndOverlay({ onExit }) {
|
|
13661
|
-
const { t } =
|
|
13661
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
13662
13662
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13663
13663
|
"button",
|
|
13664
13664
|
{
|
|
@@ -13674,9 +13674,9 @@ function PresentationSubtitleBar({
|
|
|
13674
13674
|
visible,
|
|
13675
13675
|
onCaptionChange
|
|
13676
13676
|
}) {
|
|
13677
|
-
const { t } =
|
|
13677
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
13678
13678
|
const language = pptx.subtitleRecognitionLanguage(
|
|
13679
|
-
pptx.subtitleSettingsFromOptions(
|
|
13679
|
+
pptx.subtitleSettingsFromOptions(chunkV3XADJ2O_js.useViewerOptionsContext()),
|
|
13680
13680
|
typeof navigator === "undefined" ? "en-US" : navigator.language
|
|
13681
13681
|
);
|
|
13682
13682
|
const [captionText, setCaptionText] = React108.useState("");
|
|
@@ -13753,7 +13753,7 @@ function renderNotesSegments(segments) {
|
|
|
13753
13753
|
});
|
|
13754
13754
|
}
|
|
13755
13755
|
function PresenterConsoleToolbar(p) {
|
|
13756
|
-
const { t } =
|
|
13756
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
13757
13757
|
const ref = useWebControl(
|
|
13758
13758
|
{ ...pptx.presenterConsoleViewState(p.snapshot, p.audienceOpen), translate: t },
|
|
13759
13759
|
{
|
|
@@ -13844,7 +13844,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13844
13844
|
{
|
|
13845
13845
|
className: "absolute inset-0",
|
|
13846
13846
|
style: {
|
|
13847
|
-
backgroundColor:
|
|
13847
|
+
backgroundColor: chunkZ22RD3E2_js.normalizeHexColor(slide.backgroundColor, "#ffffff")
|
|
13848
13848
|
}
|
|
13849
13849
|
}
|
|
13850
13850
|
),
|
|
@@ -13870,7 +13870,7 @@ function ScaledSlidePreviewImpl({
|
|
|
13870
13870
|
...pptx.deviceStrokeStageStyle(scale)
|
|
13871
13871
|
},
|
|
13872
13872
|
children: previewElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13873
|
-
|
|
13873
|
+
chunkV3XADJ2O_js.StaticElementRenderer,
|
|
13874
13874
|
{
|
|
13875
13875
|
element,
|
|
13876
13876
|
activeSlide: slide,
|
|
@@ -13937,7 +13937,7 @@ function PresenterNotesRail({
|
|
|
13937
13937
|
onMove,
|
|
13938
13938
|
onUpdateNotes
|
|
13939
13939
|
}) {
|
|
13940
|
-
const { t } =
|
|
13940
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
13941
13941
|
const slide = slides[current];
|
|
13942
13942
|
const nextSlide = pptx.nextPresentedSlide(slides, current, activeCustomShow, authoredRange);
|
|
13943
13943
|
const notesText = slide?.notes ?? "";
|
|
@@ -14062,7 +14062,7 @@ function PresenterNotesRail({
|
|
|
14062
14062
|
] });
|
|
14063
14063
|
}
|
|
14064
14064
|
function PresenterSlideNavigator(props) {
|
|
14065
|
-
const { t } =
|
|
14065
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
14066
14066
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${pptx.PRESENTER_CONSOLE_CLASSES.navigator} text-foreground`, children: [
|
|
14067
14067
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-4 flex items-center justify-between border-b border-border pb-4", children: [
|
|
14068
14068
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -14204,7 +14204,7 @@ function PresenterView({
|
|
|
14204
14204
|
onSwapDisplays,
|
|
14205
14205
|
onUpdateNotes
|
|
14206
14206
|
}) {
|
|
14207
|
-
const { t } =
|
|
14207
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
14208
14208
|
const [now, setNow] = React108.useState(Date.now());
|
|
14209
14209
|
React108.useEffect(() => {
|
|
14210
14210
|
const interval = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -14361,7 +14361,7 @@ function MobilePresenterView({
|
|
|
14361
14361
|
onMovePresentationSlide,
|
|
14362
14362
|
onExit
|
|
14363
14363
|
}) {
|
|
14364
|
-
const { t } =
|
|
14364
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
14365
14365
|
const [now, setNow] = React108.useState(Date.now());
|
|
14366
14366
|
React108.useEffect(() => {
|
|
14367
14367
|
const interval = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
@@ -14474,7 +14474,7 @@ function RehearseTimingsHud({
|
|
|
14474
14474
|
paused,
|
|
14475
14475
|
onTogglePause
|
|
14476
14476
|
}) {
|
|
14477
|
-
const { t } =
|
|
14477
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
14478
14478
|
const [tick, setTick] = React108.useState(0);
|
|
14479
14479
|
React108.useEffect(() => {
|
|
14480
14480
|
if (paused) {
|
|
@@ -14522,7 +14522,7 @@ function RehearseTimingsSummary({
|
|
|
14522
14522
|
onSave,
|
|
14523
14523
|
onDiscard
|
|
14524
14524
|
}) {
|
|
14525
|
-
const { t } =
|
|
14525
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
14526
14526
|
const totalMs = Object.values(recordedTimings).reduce((sum, ms) => sum + ms, 0);
|
|
14527
14527
|
const sortedEntries = Object.entries(recordedTimings).map(([idx, ms]) => ({ slideIndex: Number(idx), ms })).sort((a, b) => a.slideIndex - b.slideIndex);
|
|
14528
14528
|
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: [
|
|
@@ -14606,7 +14606,7 @@ function SelectionPane({
|
|
|
14606
14606
|
markDirty,
|
|
14607
14607
|
onClose
|
|
14608
14608
|
}) {
|
|
14609
|
-
const { t } =
|
|
14609
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
14610
14610
|
const activeSlide = slides[activeSlideIndex];
|
|
14611
14611
|
const elements = activeSlide?.elements ?? [];
|
|
14612
14612
|
const [editingId, setEditingId] = React108.useState(null);
|
|
@@ -14761,7 +14761,7 @@ function SelectionPane({
|
|
|
14761
14761
|
setDragIndex(null);
|
|
14762
14762
|
setDragOverIndex(null);
|
|
14763
14763
|
},
|
|
14764
|
-
className:
|
|
14764
|
+
className: chunkZ22RD3E2_js.cn(
|
|
14765
14765
|
"flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer transition-colors",
|
|
14766
14766
|
isSelected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground",
|
|
14767
14767
|
dragOverIndex === realIndex ? "border-t-2 border-primary" : ""
|
|
@@ -14815,13 +14815,13 @@ function SelectionPane({
|
|
|
14815
14815
|
}
|
|
14816
14816
|
var INPUT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14817
14817
|
var SELECT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14818
|
-
var ENTRANCE_PRESETS = /* @__PURE__ */
|
|
14818
|
+
var ENTRANCE_PRESETS = /* @__PURE__ */ chunkZ22RD3E2_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14819
14819
|
(o) => o.value === "fadeIn" || o.value === "flyIn" || o.value === "zoomIn"
|
|
14820
14820
|
);
|
|
14821
|
-
var EXIT_PRESETS = /* @__PURE__ */
|
|
14821
|
+
var EXIT_PRESETS = /* @__PURE__ */ chunkZ22RD3E2_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14822
14822
|
(o) => o.value === "fadeOut" || o.value === "flyOut" || o.value === "zoomOut"
|
|
14823
14823
|
);
|
|
14824
|
-
var EMPHASIS_PRESETS = /* @__PURE__ */
|
|
14824
|
+
var EMPHASIS_PRESETS = /* @__PURE__ */ chunkZ22RD3E2_js.ANIMATION_PRESET_OPTIONS.filter(
|
|
14825
14825
|
(o) => o.value === "spin" || o.value === "pulse" || o.value === "colorWave" || o.value === "bounce" || o.value === "flash" || o.value === "growShrink" || o.value === "teeter"
|
|
14826
14826
|
);
|
|
14827
14827
|
var TIMING_CURVE_OPTIONS = [
|
|
@@ -14922,7 +14922,7 @@ function AfterAnimationRow({
|
|
|
14922
14922
|
onActionChange,
|
|
14923
14923
|
onColorChange
|
|
14924
14924
|
}) {
|
|
14925
|
-
const { t } =
|
|
14925
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
14926
14926
|
const commitRecentColor = useRecentColorCommit();
|
|
14927
14927
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
14928
14928
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -14973,7 +14973,7 @@ function AnimationTimelineSection({
|
|
|
14973
14973
|
canEdit,
|
|
14974
14974
|
handlers
|
|
14975
14975
|
}) {
|
|
14976
|
-
const { t } =
|
|
14976
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
14977
14977
|
const effectLabel = (anim) => pptx.animationEffectLabel(anim, (key) => t(key));
|
|
14978
14978
|
const {
|
|
14979
14979
|
sortedAnimations,
|
|
@@ -15004,7 +15004,7 @@ function AnimationTimelineSection({
|
|
|
15004
15004
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-6 rounded bg-muted/50 border border-border overflow-hidden", children: timelineBarData.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
15005
15005
|
"div",
|
|
15006
15006
|
{
|
|
15007
|
-
className:
|
|
15007
|
+
className: chunkZ22RD3E2_js.cn(
|
|
15008
15008
|
"absolute top-0.5 bottom-0.5 rounded-sm transition-colors",
|
|
15009
15009
|
animationTypeColor(bar.anim),
|
|
15010
15010
|
bar.anim.elementId === selectedElementId && "ring-1 ring-primary"
|
|
@@ -15033,7 +15033,7 @@ function AnimationTimelineSection({
|
|
|
15033
15033
|
onDragLeave: handleDragLeave,
|
|
15034
15034
|
onDrop: (e) => handleDrop(index, e),
|
|
15035
15035
|
title: t("pptx.animation.nativeEffectHint"),
|
|
15036
|
-
className:
|
|
15036
|
+
className: chunkZ22RD3E2_js.cn(
|
|
15037
15037
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] italic",
|
|
15038
15038
|
"bg-muted/20 text-muted-foreground/70",
|
|
15039
15039
|
isDragOver && "border-t-2 border-primary"
|
|
@@ -15072,7 +15072,7 @@ function AnimationTimelineSection({
|
|
|
15072
15072
|
onDragEnd: handleDragEnd,
|
|
15073
15073
|
onMouseEnter: () => handleAnimationHover(anim),
|
|
15074
15074
|
onMouseLeave: handleAnimationHoverEnd,
|
|
15075
|
-
className:
|
|
15075
|
+
className: chunkZ22RD3E2_js.cn(
|
|
15076
15076
|
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] cursor-grab transition-colors",
|
|
15077
15077
|
isSelected ? "bg-primary/30 text-primary" : "bg-muted/50 text-muted-foreground",
|
|
15078
15078
|
isDragging && "opacity-40",
|
|
@@ -15133,7 +15133,7 @@ function BookmarkTriggerRow({
|
|
|
15133
15133
|
style,
|
|
15134
15134
|
onChange
|
|
15135
15135
|
}) {
|
|
15136
|
-
const { t } =
|
|
15136
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
15137
15137
|
const options = pptx.listMediaBookmarkOptions(elements);
|
|
15138
15138
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
15139
15139
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-[11px]", children: t("pptx.animation.trigger.bookmarkLabel") }),
|
|
@@ -15166,7 +15166,7 @@ function EffectSoundRow({
|
|
|
15166
15166
|
onPick,
|
|
15167
15167
|
onPickStock
|
|
15168
15168
|
}) {
|
|
15169
|
-
const { t } =
|
|
15169
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
15170
15170
|
const fileInputRef = React108__default.default.useRef(null);
|
|
15171
15171
|
const selectedValue = soundState.catalogueId ?? (soundState.hasSound ? CURRENT_VALUE : NONE_VALUE);
|
|
15172
15172
|
const handleSelectChange = (event) => {
|
|
@@ -15204,7 +15204,7 @@ function EffectSoundRow({
|
|
|
15204
15204
|
}
|
|
15205
15205
|
const asset = pptx.getEffectSoundAsset(soundState.catalogueId);
|
|
15206
15206
|
if (asset) {
|
|
15207
|
-
|
|
15207
|
+
chunkV3XADJ2O_js.playAnimationSound(asset.dataUrl);
|
|
15208
15208
|
}
|
|
15209
15209
|
};
|
|
15210
15210
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -15257,7 +15257,7 @@ function MotionPathRow({
|
|
|
15257
15257
|
canEdit,
|
|
15258
15258
|
onChange
|
|
15259
15259
|
}) {
|
|
15260
|
-
const { t } =
|
|
15260
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
15261
15261
|
const presetId = pptx.motionPathPresetIdForPath(motionPath);
|
|
15262
15262
|
const isCustom = Boolean(motionPath) && !presetId;
|
|
15263
15263
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -15379,7 +15379,7 @@ function useAnimationPreview({
|
|
|
15379
15379
|
}) {
|
|
15380
15380
|
const handleAnimationHover = React108.useCallback((anim) => {
|
|
15381
15381
|
if (anim.motionPath) {
|
|
15382
|
-
|
|
15382
|
+
chunkZ22RD3E2_js.startMotionPathPreview(anim.elementId, anim.motionPath, {
|
|
15383
15383
|
durationMs: anim.durationMs,
|
|
15384
15384
|
delayMs: anim.delayMs,
|
|
15385
15385
|
timingCurve: anim.timingCurve
|
|
@@ -15390,19 +15390,19 @@ function useAnimationPreview({
|
|
|
15390
15390
|
if (!preset || preset === "none") {
|
|
15391
15391
|
return;
|
|
15392
15392
|
}
|
|
15393
|
-
|
|
15393
|
+
chunkZ22RD3E2_js.startPreviewAnimation(anim.elementId, preset, {
|
|
15394
15394
|
direction: anim.direction,
|
|
15395
15395
|
durationMs: anim.durationMs ?? 500,
|
|
15396
15396
|
timingCurve: anim.timingCurve
|
|
15397
15397
|
});
|
|
15398
15398
|
}, []);
|
|
15399
|
-
const handleAnimationHoverEnd = React108.useCallback(() =>
|
|
15399
|
+
const handleAnimationHoverEnd = React108.useCallback(() => chunkZ22RD3E2_js.stopPreviewAnimation(), []);
|
|
15400
15400
|
const handlePreviewClick = React108.useCallback(() => {
|
|
15401
15401
|
if (!selectedElementAnimation) {
|
|
15402
15402
|
return;
|
|
15403
15403
|
}
|
|
15404
15404
|
if (selectedElementAnimation.motionPath) {
|
|
15405
|
-
|
|
15405
|
+
chunkZ22RD3E2_js.startMotionPathPreview(selectedElementId, selectedElementAnimation.motionPath, {
|
|
15406
15406
|
durationMs: selectedElementAnimation.durationMs,
|
|
15407
15407
|
delayMs: selectedElementAnimation.delayMs,
|
|
15408
15408
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -15413,7 +15413,7 @@ function useAnimationPreview({
|
|
|
15413
15413
|
if (!preset || preset === "none") {
|
|
15414
15414
|
return;
|
|
15415
15415
|
}
|
|
15416
|
-
|
|
15416
|
+
chunkZ22RD3E2_js.startPreviewAnimation(selectedElementId, preset, {
|
|
15417
15417
|
direction: selectedElementAnimation.direction,
|
|
15418
15418
|
durationMs: selectedElementAnimation.durationMs ?? 500,
|
|
15419
15419
|
timingCurve: selectedElementAnimation.timingCurve
|
|
@@ -15648,7 +15648,7 @@ function useAnimationHandlers({
|
|
|
15648
15648
|
return anim.elementId.slice(0, 8);
|
|
15649
15649
|
}
|
|
15650
15650
|
const text = pptx$1.hasTextProperties(el) ? el.text : void 0;
|
|
15651
|
-
return text ||
|
|
15651
|
+
return text || chunkZ22RD3E2_js.getElementLabel(el);
|
|
15652
15652
|
},
|
|
15653
15653
|
[activeSlide.elements]
|
|
15654
15654
|
);
|
|
@@ -15659,7 +15659,7 @@ function useAnimationHandlers({
|
|
|
15659
15659
|
return id.slice(0, 8);
|
|
15660
15660
|
}
|
|
15661
15661
|
const text = pptx$1.hasTextProperties(el) ? el.text : void 0;
|
|
15662
|
-
return text ||
|
|
15662
|
+
return text || chunkZ22RD3E2_js.getElementLabel(el);
|
|
15663
15663
|
}).join(", "),
|
|
15664
15664
|
[activeSlide.elements]
|
|
15665
15665
|
);
|
|
@@ -15715,8 +15715,8 @@ function AnimationPanel({
|
|
|
15715
15715
|
canEdit,
|
|
15716
15716
|
onUpdateSlide
|
|
15717
15717
|
}) {
|
|
15718
|
-
const { t } =
|
|
15719
|
-
const { viewportWidth } =
|
|
15718
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
15719
|
+
const { viewportWidth } = chunkV3XADJ2O_js.useIsMobile();
|
|
15720
15720
|
const directionBtnPx = Math.max(28, pptx.getDensePanelTouchTargetPx(viewportWidth));
|
|
15721
15721
|
const fieldStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
15722
15722
|
const handlers = useAnimationHandlers({
|
|
@@ -15844,7 +15844,7 @@ function AnimationPanel({
|
|
|
15844
15844
|
type: "button",
|
|
15845
15845
|
disabled: !canEdit,
|
|
15846
15846
|
style: { minWidth: directionBtnPx, minHeight: directionBtnPx },
|
|
15847
|
-
className:
|
|
15847
|
+
className: chunkZ22RD3E2_js.cn(
|
|
15848
15848
|
"flex items-center justify-center rounded border transition-colors",
|
|
15849
15849
|
isActive ? "border-primary bg-primary/20 text-primary" : "border-border bg-muted text-muted-foreground hover:bg-accent"
|
|
15850
15850
|
),
|
|
@@ -15910,7 +15910,7 @@ function AnimationPanel({
|
|
|
15910
15910
|
style: fieldStyle,
|
|
15911
15911
|
children: [
|
|
15912
15912
|
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: t("pptx.animation.trigger.selectShape") }),
|
|
15913
|
-
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children:
|
|
15913
|
+
activeSlide.elements.filter((el) => el.id !== selectedElement.id).map((el) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: el.id, children: chunkZ22RD3E2_js.getElementLabel(el) }, el.id))
|
|
15914
15914
|
]
|
|
15915
15915
|
}
|
|
15916
15916
|
)
|
|
@@ -16054,7 +16054,7 @@ function ActionTargetFields({
|
|
|
16054
16054
|
returnAfter,
|
|
16055
16055
|
onChange
|
|
16056
16056
|
}) {
|
|
16057
|
-
const { t } =
|
|
16057
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16058
16058
|
const urlLabelKey = URL_LABEL_KEY[type];
|
|
16059
16059
|
if (urlLabelKey) {
|
|
16060
16060
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16063,7 +16063,7 @@ function ActionTargetFields({
|
|
|
16063
16063
|
type: "text",
|
|
16064
16064
|
disabled: !canEdit,
|
|
16065
16065
|
"aria-label": t(urlLabelKey),
|
|
16066
|
-
className:
|
|
16066
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "w-full"),
|
|
16067
16067
|
placeholder: "https://...",
|
|
16068
16068
|
value: url ?? "",
|
|
16069
16069
|
onChange: (e) => onChange({ url: e.target.value })
|
|
@@ -16077,7 +16077,7 @@ function ActionTargetFields({
|
|
|
16077
16077
|
type: "number",
|
|
16078
16078
|
disabled: !canEdit,
|
|
16079
16079
|
"aria-label": t("pptx.action.gotoSlide"),
|
|
16080
|
-
className:
|
|
16080
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "w-full"),
|
|
16081
16081
|
placeholder: t("pptx.action.slideNumberPlaceholder"),
|
|
16082
16082
|
min: 1,
|
|
16083
16083
|
max: slideCount,
|
|
@@ -16099,7 +16099,7 @@ function ActionTargetFields({
|
|
|
16099
16099
|
"data-testid": "pptx-action-custom-show",
|
|
16100
16100
|
disabled: !canEdit,
|
|
16101
16101
|
"aria-label": t("pptx.hyperlink.customShowLabel"),
|
|
16102
|
-
className:
|
|
16102
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "w-full"),
|
|
16103
16103
|
value: customShowId ?? "",
|
|
16104
16104
|
onChange: (e) => onChange({ customShowId: e.target.value, returnAfter }),
|
|
16105
16105
|
children: [
|
|
@@ -16131,7 +16131,7 @@ function ActionSettingsPanel({
|
|
|
16131
16131
|
customShows,
|
|
16132
16132
|
onUpdateElement
|
|
16133
16133
|
}) {
|
|
16134
|
-
const { t } =
|
|
16134
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16135
16135
|
const clickAction = selectedElement.actionClick ? pptx$1.pptxActionToElementAction(selectedElement.actionClick, "click") : void 0;
|
|
16136
16136
|
const hoverAction = selectedElement.actionHover ? pptx$1.pptxActionToElementAction(selectedElement.actionHover, "hover") : void 0;
|
|
16137
16137
|
const updateAction = (trigger, type, patch) => {
|
|
@@ -16207,7 +16207,7 @@ function ActionTriggerSection({
|
|
|
16207
16207
|
onChangeType,
|
|
16208
16208
|
onChangeTarget
|
|
16209
16209
|
}) {
|
|
16210
|
-
const { t } =
|
|
16210
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16211
16211
|
const [pendingType, setPendingType] = React108.useState(void 0);
|
|
16212
16212
|
const effectiveType = pptx.resolveActionType(pendingType, activeType);
|
|
16213
16213
|
const changeType = (type) => {
|
|
@@ -16221,7 +16221,7 @@ function ActionTriggerSection({
|
|
|
16221
16221
|
{
|
|
16222
16222
|
disabled: !canEdit,
|
|
16223
16223
|
"aria-label": label,
|
|
16224
|
-
className:
|
|
16224
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "w-full"),
|
|
16225
16225
|
value: effectiveType,
|
|
16226
16226
|
onChange: (e) => changeType(e.target.value),
|
|
16227
16227
|
children: pptx.ELEMENT_ACTION_TYPE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.labelKey) }, o.value))
|
|
@@ -16249,7 +16249,7 @@ var AXIS_ROWS = [
|
|
|
16249
16249
|
{ type: "catAx", labelKey: "pptx.chart.categoryAxis", hasScale: false }
|
|
16250
16250
|
];
|
|
16251
16251
|
function ChartAxisOptions({ axes, canEdit, onUpdateAxis }) {
|
|
16252
|
-
const { t } =
|
|
16252
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16253
16253
|
const rows = AXIS_ROWS.map((row) => ({
|
|
16254
16254
|
...row,
|
|
16255
16255
|
axis: axes?.find((a) => a.axisType === row.type)
|
|
@@ -16394,7 +16394,7 @@ function ChartAxisStyleOptions({
|
|
|
16394
16394
|
onSetTitleStyle,
|
|
16395
16395
|
onSetGridlineStyle
|
|
16396
16396
|
}) {
|
|
16397
|
-
const { t } =
|
|
16397
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16398
16398
|
const commitRecentColor = useRecentColorCommit();
|
|
16399
16399
|
const rows = SCALE_AXES.map((row) => ({
|
|
16400
16400
|
...row,
|
|
@@ -16566,7 +16566,7 @@ function ChartComboTypeOptions({
|
|
|
16566
16566
|
canEdit,
|
|
16567
16567
|
onSetSeriesType
|
|
16568
16568
|
}) {
|
|
16569
|
-
const { t } =
|
|
16569
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16570
16570
|
if (!COMBO_SUPPORTED_TYPES.has(chartType) || series.length < 2) {
|
|
16571
16571
|
return null;
|
|
16572
16572
|
}
|
|
@@ -16595,7 +16595,7 @@ function ChartDataLabelOptions({
|
|
|
16595
16595
|
canEdit,
|
|
16596
16596
|
onUpdateStyle
|
|
16597
16597
|
}) {
|
|
16598
|
-
const { t } =
|
|
16598
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16599
16599
|
if (!style?.hasDataLabels) {
|
|
16600
16600
|
return null;
|
|
16601
16601
|
}
|
|
@@ -16643,7 +16643,7 @@ function ChartDataPointMarkerOptions({
|
|
|
16643
16643
|
canEdit,
|
|
16644
16644
|
onSetPointMarker
|
|
16645
16645
|
}) {
|
|
16646
|
-
const { t } =
|
|
16646
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16647
16647
|
const commitRecentColor = useRecentColorCommit();
|
|
16648
16648
|
const [seriesIndex, setSeriesIndex] = React108.useState(0);
|
|
16649
16649
|
if (!MARKER_SUPPORTED_TYPES.has(chartType) || series.length === 0 || categories.length === 0) {
|
|
@@ -16749,7 +16749,7 @@ function ChartDataPointOptions({
|
|
|
16749
16749
|
onSetPointExplosion,
|
|
16750
16750
|
onSetPointLabel
|
|
16751
16751
|
}) {
|
|
16752
|
-
const { t } =
|
|
16752
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16753
16753
|
const commitRecentColor = useRecentColorCommit();
|
|
16754
16754
|
const [seriesIndex, setSeriesIndex] = React108.useState(0);
|
|
16755
16755
|
if (series.length === 0 || categories.length === 0) {
|
|
@@ -16851,7 +16851,7 @@ function ChartDataSheet({
|
|
|
16851
16851
|
highlightCell,
|
|
16852
16852
|
onChange
|
|
16853
16853
|
}) {
|
|
16854
|
-
const { t } =
|
|
16854
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16855
16855
|
const ref = React108.useRef(null);
|
|
16856
16856
|
React108.useLayoutEffect(() => {
|
|
16857
16857
|
if (ref.current) {
|
|
@@ -16882,7 +16882,7 @@ function ChartDisplayOptions({
|
|
|
16882
16882
|
hasGridlines,
|
|
16883
16883
|
onToggleGridlines
|
|
16884
16884
|
}) {
|
|
16885
|
-
const { t } =
|
|
16885
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16886
16886
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD, children: [
|
|
16887
16887
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING, children: t("pptx.chart.display") }),
|
|
16888
16888
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
@@ -16959,7 +16959,7 @@ function ChartErrorBarOptions({
|
|
|
16959
16959
|
canEdit,
|
|
16960
16960
|
onSetErrorBars
|
|
16961
16961
|
}) {
|
|
16962
|
-
const { t } =
|
|
16962
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
16963
16963
|
if (!ERROR_BAR_SUPPORTED_TYPES.has(chartType) || series.length === 0) {
|
|
16964
16964
|
return null;
|
|
16965
16965
|
}
|
|
@@ -17039,7 +17039,7 @@ function ChartFilteredSeriesOptions({
|
|
|
17039
17039
|
onRestoreSeries,
|
|
17040
17040
|
onSetDataLabelsRangeCache
|
|
17041
17041
|
}) {
|
|
17042
|
-
const { t } =
|
|
17042
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
17043
17043
|
const filteredSeries = chartData.filteredSeries ?? [];
|
|
17044
17044
|
const seriesWithRange = chartData.series.map((series, index) => ({ series, index })).filter(({ series }) => series.dataLabelOptions?.dataLabelsRange);
|
|
17045
17045
|
if (filteredSeries.length === 0 && seriesWithRange.length === 0 && chartData.series.length <= 1) {
|
|
@@ -17119,7 +17119,7 @@ function ChartMarkerOptions({
|
|
|
17119
17119
|
canEdit,
|
|
17120
17120
|
onSetMarker
|
|
17121
17121
|
}) {
|
|
17122
|
-
const { t } =
|
|
17122
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
17123
17123
|
const commitRecentColor = useRecentColorCommit();
|
|
17124
17124
|
if (!MARKER_SUPPORTED_TYPES.has(chartType) || series.length === 0) {
|
|
17125
17125
|
return null;
|
|
@@ -17228,7 +17228,7 @@ function ChartSeriesColorOptions({
|
|
|
17228
17228
|
onSetColor,
|
|
17229
17229
|
onToggleSecondaryAxis
|
|
17230
17230
|
}) {
|
|
17231
|
-
const { t } =
|
|
17231
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
17232
17232
|
const series = chartData.series;
|
|
17233
17233
|
if (series.length === 0) {
|
|
17234
17234
|
return null;
|
|
@@ -17278,7 +17278,7 @@ function ChartSubtypeOptions({
|
|
|
17278
17278
|
canEdit,
|
|
17279
17279
|
onUpdateChartData
|
|
17280
17280
|
}) {
|
|
17281
|
-
const { t } =
|
|
17281
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
17282
17282
|
if (chartData.chartType !== "bar3D" && chartData.chartType !== "radar" && chartData.chartType !== "surface") {
|
|
17283
17283
|
return null;
|
|
17284
17284
|
}
|
|
@@ -17344,7 +17344,7 @@ function ChartTrendlineOptions({
|
|
|
17344
17344
|
canEdit,
|
|
17345
17345
|
onSetTrendline
|
|
17346
17346
|
}) {
|
|
17347
|
-
const { t } =
|
|
17347
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
17348
17348
|
if (!TRENDLINE_SUPPORTED_TYPES.has(chartType) || series.length === 0) {
|
|
17349
17349
|
return null;
|
|
17350
17350
|
}
|
|
@@ -17417,7 +17417,7 @@ function ChartTypeSelector({
|
|
|
17417
17417
|
onUpdateChartData,
|
|
17418
17418
|
onTitleChange
|
|
17419
17419
|
}) {
|
|
17420
|
-
const { t } =
|
|
17420
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
17421
17421
|
const supportsGrouping = GROUPING_SUPPORTED_TYPES.has(chartType);
|
|
17422
17422
|
const displayedType = pptx.resolveDisplayedChartType(chartData);
|
|
17423
17423
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD, children: [
|
|
@@ -17498,7 +17498,7 @@ function RotationField({
|
|
|
17498
17498
|
canEdit,
|
|
17499
17499
|
onRotationPatch
|
|
17500
17500
|
}) {
|
|
17501
|
-
const { t } =
|
|
17501
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
17502
17502
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17503
17503
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.chart.userShapeRotation") }),
|
|
17504
17504
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17520,7 +17520,7 @@ function FlipFields({
|
|
|
17520
17520
|
canEdit,
|
|
17521
17521
|
onFlipPatch
|
|
17522
17522
|
}) {
|
|
17523
|
-
const { t } =
|
|
17523
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
17524
17524
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17525
17525
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 cursor-pointer", children: [
|
|
17526
17526
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17559,7 +17559,7 @@ function ChartUserShapePositionFields({
|
|
|
17559
17559
|
onRotationPatch,
|
|
17560
17560
|
onFlipPatch
|
|
17561
17561
|
}) {
|
|
17562
|
-
const { t } =
|
|
17562
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
17563
17563
|
const update = (patch) => onPatch(row.path, patch);
|
|
17564
17564
|
if (row.depth === 0) {
|
|
17565
17565
|
const from = row.from;
|
|
@@ -17683,7 +17683,7 @@ function ChartUserShapeOptions({
|
|
|
17683
17683
|
canEdit,
|
|
17684
17684
|
onUpdateChartData
|
|
17685
17685
|
}) {
|
|
17686
|
-
const { t } =
|
|
17686
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
17687
17687
|
const shapes = chartData.userShapes;
|
|
17688
17688
|
const rows = pptx.listChartUserShapeRows(shapes);
|
|
17689
17689
|
const kindLabel = (kind) => {
|
|
@@ -17841,8 +17841,8 @@ function ChartUserShapeOptions({
|
|
|
17841
17841
|
}
|
|
17842
17842
|
function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
17843
17843
|
const chartData = selectedElement.chartData;
|
|
17844
|
-
const followDataPoint =
|
|
17845
|
-
const { selection: partSelection } =
|
|
17844
|
+
const followDataPoint = chunkV3XADJ2O_js.useViewerOptionsContext().advanced.chartPropertiesFollowDataPoint;
|
|
17845
|
+
const { selection: partSelection } = chunkV3XADJ2O_js.useChartPartSelection();
|
|
17846
17846
|
const canvasPart = partSelection?.elementId === selectedElement.id ? partSelection.part : null;
|
|
17847
17847
|
const title = chartData?.title;
|
|
17848
17848
|
const chartType = chartData?.chartType;
|
|
@@ -18280,7 +18280,7 @@ function OleEditorDialog({
|
|
|
18280
18280
|
element,
|
|
18281
18281
|
onUpdateElement
|
|
18282
18282
|
}) {
|
|
18283
|
-
const { t } =
|
|
18283
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
18284
18284
|
const dialogRef = React108.useRef(null);
|
|
18285
18285
|
const fileInputRef = React108.useRef(null);
|
|
18286
18286
|
const descriptor = pptx.buildOleEditDialogDescriptor(element);
|
|
@@ -18528,7 +18528,7 @@ function ConnectorArrowsSection({
|
|
|
18528
18528
|
onUpdateShapeStyle,
|
|
18529
18529
|
markDirty
|
|
18530
18530
|
}) {
|
|
18531
|
-
const { t } =
|
|
18531
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
18532
18532
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
18533
18533
|
["Start", "End"].map((end) => {
|
|
18534
18534
|
const key = end === "Start" ? "connectorStartArrow" : "connectorEndArrow";
|
|
@@ -18547,7 +18547,7 @@ function ConnectorArrowsSection({
|
|
|
18547
18547
|
},
|
|
18548
18548
|
disabled: !canEdit,
|
|
18549
18549
|
className: SELECT_CLS2,
|
|
18550
|
-
children:
|
|
18550
|
+
children: chunkZ22RD3E2_js.CONNECTOR_ARROW_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18551
18551
|
}
|
|
18552
18552
|
)
|
|
18553
18553
|
] }, end);
|
|
@@ -18571,7 +18571,7 @@ function ConnectorArrowsSection({
|
|
|
18571
18571
|
},
|
|
18572
18572
|
disabled: !canEdit,
|
|
18573
18573
|
className: SELECT_CLS2,
|
|
18574
|
-
children:
|
|
18574
|
+
children: chunkZ22RD3E2_js.ARROW_SIZE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18575
18575
|
}
|
|
18576
18576
|
)
|
|
18577
18577
|
] }),
|
|
@@ -18590,7 +18590,7 @@ function ConnectorArrowsSection({
|
|
|
18590
18590
|
},
|
|
18591
18591
|
disabled: !canEdit,
|
|
18592
18592
|
className: SELECT_CLS2,
|
|
18593
|
-
children:
|
|
18593
|
+
children: chunkZ22RD3E2_js.ARROW_SIZE_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: o.value, children: t(o.i18nKey) }, o.value))
|
|
18594
18594
|
}
|
|
18595
18595
|
)
|
|
18596
18596
|
] })
|
|
@@ -18621,7 +18621,7 @@ function ConnectorPanel({
|
|
|
18621
18621
|
function GroupInfoPanel({
|
|
18622
18622
|
selectedElement
|
|
18623
18623
|
}) {
|
|
18624
|
-
const { t } =
|
|
18624
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
18625
18625
|
if (selectedElement.type !== "group") {
|
|
18626
18626
|
return null;
|
|
18627
18627
|
}
|
|
@@ -18636,7 +18636,7 @@ function OlePropertiesPanel({
|
|
|
18636
18636
|
canEdit,
|
|
18637
18637
|
onUpdateElement
|
|
18638
18638
|
}) {
|
|
18639
|
-
const { t } =
|
|
18639
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
18640
18640
|
const [isEditorOpen, setIsEditorOpen] = React108.useState(false);
|
|
18641
18641
|
if (selectedElement.type !== "ole") {
|
|
18642
18642
|
return null;
|
|
@@ -18681,7 +18681,7 @@ function OlePropertiesPanel({
|
|
|
18681
18681
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18682
18682
|
"span",
|
|
18683
18683
|
{
|
|
18684
|
-
className:
|
|
18684
|
+
className: chunkZ22RD3E2_js.cn(
|
|
18685
18685
|
"inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium",
|
|
18686
18686
|
ole.isLinked ? "bg-blue-500/20 text-blue-400" : "bg-green-500/20 text-green-400"
|
|
18687
18687
|
),
|
|
@@ -18734,7 +18734,7 @@ function LayerOrderButtons({
|
|
|
18734
18734
|
"button",
|
|
18735
18735
|
{
|
|
18736
18736
|
type: "button",
|
|
18737
|
-
className:
|
|
18737
|
+
className: chunkZ22RD3E2_js.cn("flex-1", BTN2),
|
|
18738
18738
|
disabled: !canEdit,
|
|
18739
18739
|
onClick: () => onMoveLayer("forward"),
|
|
18740
18740
|
children: "\u2191 Forward"
|
|
@@ -18744,7 +18744,7 @@ function LayerOrderButtons({
|
|
|
18744
18744
|
"button",
|
|
18745
18745
|
{
|
|
18746
18746
|
type: "button",
|
|
18747
|
-
className:
|
|
18747
|
+
className: chunkZ22RD3E2_js.cn("flex-1", BTN2),
|
|
18748
18748
|
disabled: !canEdit,
|
|
18749
18749
|
onClick: () => onMoveLayer("backward"),
|
|
18750
18750
|
children: "\u2193 Backward"
|
|
@@ -18758,7 +18758,7 @@ function ArtisticEffectsGallery({
|
|
|
18758
18758
|
canEdit,
|
|
18759
18759
|
updateEffects
|
|
18760
18760
|
}) {
|
|
18761
|
-
const { t } =
|
|
18761
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
18762
18762
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px]", children: [
|
|
18763
18763
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.image.artisticEffects") }),
|
|
18764
18764
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: pptx.ARTISTIC_EFFECTS.map(([effectName, tKey, cssFilter]) => {
|
|
@@ -18768,7 +18768,7 @@ function ArtisticEffectsGallery({
|
|
|
18768
18768
|
{
|
|
18769
18769
|
type: "button",
|
|
18770
18770
|
disabled: !canEdit,
|
|
18771
|
-
className:
|
|
18771
|
+
className: chunkZ22RD3E2_js.cn(
|
|
18772
18772
|
"flex flex-col items-center gap-0.5 rounded border p-0.5 hover:bg-accent/50",
|
|
18773
18773
|
isActive ? "border-primary bg-primary/10" : "border-border"
|
|
18774
18774
|
),
|
|
@@ -18803,7 +18803,7 @@ function ColorChangeSection({
|
|
|
18803
18803
|
canEdit,
|
|
18804
18804
|
updateEffects
|
|
18805
18805
|
}) {
|
|
18806
|
-
const { t } =
|
|
18806
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
18807
18807
|
const cc = fx?.clrChange;
|
|
18808
18808
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px]", children: [
|
|
18809
18809
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -18830,7 +18830,7 @@ function ColorChangeSection({
|
|
|
18830
18830
|
DebouncedColorInput,
|
|
18831
18831
|
{
|
|
18832
18832
|
disabled: !canEdit,
|
|
18833
|
-
value:
|
|
18833
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(cc.clrFrom, "#ffffff"),
|
|
18834
18834
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18835
18835
|
onCommit: (hex) => updateEffects({
|
|
18836
18836
|
clrChange: {
|
|
@@ -18848,7 +18848,7 @@ function ColorChangeSection({
|
|
|
18848
18848
|
DebouncedColorInput,
|
|
18849
18849
|
{
|
|
18850
18850
|
disabled: !canEdit || Boolean(cc.clrToTransparent),
|
|
18851
|
-
value:
|
|
18851
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(cc.clrTo, "#000000"),
|
|
18852
18852
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18853
18853
|
onCommit: (hex) => updateEffects({
|
|
18854
18854
|
clrChange: {
|
|
@@ -18885,7 +18885,7 @@ function ColorWashSection({
|
|
|
18885
18885
|
canEdit,
|
|
18886
18886
|
updateEffects
|
|
18887
18887
|
}) {
|
|
18888
|
-
const { t } =
|
|
18888
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
18889
18889
|
const wash = fx?.colorWash;
|
|
18890
18890
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px]", children: [
|
|
18891
18891
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -18908,7 +18908,7 @@ function ColorWashSection({
|
|
|
18908
18908
|
DebouncedColorInput,
|
|
18909
18909
|
{
|
|
18910
18910
|
disabled: !canEdit,
|
|
18911
|
-
value:
|
|
18911
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(wash.color, "#0066cc"),
|
|
18912
18912
|
className: "h-6 w-8 rounded border border-border bg-transparent cursor-pointer",
|
|
18913
18913
|
onCommit: (hex) => updateEffects({
|
|
18914
18914
|
colorWash: { color: hex, opacity: wash.opacity ?? 40 }
|
|
@@ -18990,7 +18990,7 @@ function DuotonePanel({
|
|
|
18990
18990
|
canEdit,
|
|
18991
18991
|
onUpdateElement
|
|
18992
18992
|
}) {
|
|
18993
|
-
const { t } =
|
|
18993
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
18994
18994
|
const effects = "imageEffects" in selectedElement ? selectedElement.imageEffects : void 0;
|
|
18995
18995
|
const commitDuotone = React108.useCallback(
|
|
18996
18996
|
(color1, color2) => {
|
|
@@ -19011,8 +19011,8 @@ function DuotonePanel({
|
|
|
19011
19011
|
}
|
|
19012
19012
|
});
|
|
19013
19013
|
}, [effects, onUpdateElement]);
|
|
19014
|
-
const shadowColor =
|
|
19015
|
-
const highlightColor =
|
|
19014
|
+
const shadowColor = chunkZ22RD3E2_js.normalizeHexColor(effects?.duotone?.color1, "#000000");
|
|
19015
|
+
const highlightColor = chunkZ22RD3E2_js.normalizeHexColor(effects?.duotone?.color2, "#ffffff");
|
|
19016
19016
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px]", children: [
|
|
19017
19017
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-medium", children: t("pptx.image.duotone") }),
|
|
19018
19018
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
@@ -19043,7 +19043,7 @@ function DuotonePanel({
|
|
|
19043
19043
|
] }),
|
|
19044
19044
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
19045
19045
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground text-[10px]", children: t("pptx.image.duotonePresets") }),
|
|
19046
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children:
|
|
19046
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-4 gap-1", children: chunkV3XADJ2O_js.DUOTONE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19047
19047
|
"button",
|
|
19048
19048
|
{
|
|
19049
19049
|
type: "button",
|
|
@@ -19079,7 +19079,7 @@ function ImageAdjustmentsPanel({
|
|
|
19079
19079
|
canEdit,
|
|
19080
19080
|
onUpdateElement
|
|
19081
19081
|
}) {
|
|
19082
|
-
const { t } =
|
|
19082
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
19083
19083
|
const effects = React108.useMemo(
|
|
19084
19084
|
() => "imageEffects" in selectedElement ? selectedElement.imageEffects : void 0,
|
|
19085
19085
|
[selectedElement]
|
|
@@ -19180,7 +19180,7 @@ function ImageCropSection({
|
|
|
19180
19180
|
canEdit,
|
|
19181
19181
|
onUpdateElement
|
|
19182
19182
|
}) {
|
|
19183
|
-
const { t } =
|
|
19183
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
19184
19184
|
if (!pptx$1.isImageLikeElement(selectedElement)) {
|
|
19185
19185
|
return null;
|
|
19186
19186
|
}
|
|
@@ -19198,7 +19198,7 @@ function ImageCropSection({
|
|
|
19198
19198
|
max: MAX_CROP_PERCENT,
|
|
19199
19199
|
disabled: !croppable,
|
|
19200
19200
|
className: "accent-primary",
|
|
19201
|
-
value: Math.round(
|
|
19201
|
+
value: Math.round(chunkZ22RD3E2_js.clampCropValue(selectedElement[key]) * 100),
|
|
19202
19202
|
onChange: (e) => onUpdateElement({
|
|
19203
19203
|
[key]: Number(e.target.value) / 100
|
|
19204
19204
|
})
|
|
@@ -19245,7 +19245,7 @@ function ImagePropertiesPanel({
|
|
|
19245
19245
|
canEdit,
|
|
19246
19246
|
onUpdateElement
|
|
19247
19247
|
}) {
|
|
19248
|
-
const { t } =
|
|
19248
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
19249
19249
|
const fx = selectedElement.imageEffects;
|
|
19250
19250
|
const updateEffects = (patch) => {
|
|
19251
19251
|
onUpdateElement({
|
|
@@ -19262,7 +19262,7 @@ function ImagePropertiesPanel({
|
|
|
19262
19262
|
{
|
|
19263
19263
|
rows: 2,
|
|
19264
19264
|
disabled: !canEdit,
|
|
19265
|
-
className:
|
|
19265
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "resize-none text-[11px]"),
|
|
19266
19266
|
value: selectedElement.altText ?? "",
|
|
19267
19267
|
onChange: (e) => onUpdateElement({
|
|
19268
19268
|
altText: e.target.value
|
|
@@ -19376,7 +19376,7 @@ function InspectorFields({
|
|
|
19376
19376
|
onPatch,
|
|
19377
19377
|
disabled = false
|
|
19378
19378
|
}) {
|
|
19379
|
-
const { t } =
|
|
19379
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
19380
19380
|
const commitRecentColor = useRecentColorCommit();
|
|
19381
19381
|
const views = pptx.resolveInspectorSections(sections, target);
|
|
19382
19382
|
const change = (sectionId, fieldId, raw) => {
|
|
@@ -19597,7 +19597,7 @@ function MediaInspector({
|
|
|
19597
19597
|
durationSeconds,
|
|
19598
19598
|
onUpdateElement
|
|
19599
19599
|
}) {
|
|
19600
|
-
const { t } =
|
|
19600
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
19601
19601
|
const trimStartMs = element.trimStartMs ?? 0;
|
|
19602
19602
|
const trimEndMs = element.trimEndMs ?? 0;
|
|
19603
19603
|
const durationMs = durationSeconds * 1e3;
|
|
@@ -19827,7 +19827,7 @@ function MediaPlaybackBookmarks({
|
|
|
19827
19827
|
onUpdateElement,
|
|
19828
19828
|
onSeekTo
|
|
19829
19829
|
}) {
|
|
19830
|
-
const { t } =
|
|
19830
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
19831
19831
|
const [newBookmarkLabel, setNewBookmarkLabel] = React108.useState("");
|
|
19832
19832
|
const volumePercent = Math.round((element.volume ?? 1) * 100);
|
|
19833
19833
|
const handleAddBookmark = React108.useCallback(() => {
|
|
@@ -20077,7 +20077,7 @@ function MediaPropertiesPanel({
|
|
|
20077
20077
|
canEdit,
|
|
20078
20078
|
onUpdateElement
|
|
20079
20079
|
}) {
|
|
20080
|
-
const { t } =
|
|
20080
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20081
20081
|
const mediaRef = React108.useRef(null);
|
|
20082
20082
|
const [isPlaying, setIsPlaying] = React108.useState(false);
|
|
20083
20083
|
const [currentTime, setCurrentTime] = React108.useState(0);
|
|
@@ -20311,7 +20311,7 @@ function AccessibilityTextSection({
|
|
|
20311
20311
|
canEdit,
|
|
20312
20312
|
onUpdateElement
|
|
20313
20313
|
}) {
|
|
20314
|
-
const { t } =
|
|
20314
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20315
20315
|
const fields = pptx.getNonVisualDescriptionFields(selectedElement);
|
|
20316
20316
|
if (!fields.showAltText && !fields.showTitle) {
|
|
20317
20317
|
return null;
|
|
@@ -20326,7 +20326,7 @@ function AccessibilityTextSection({
|
|
|
20326
20326
|
rows: 2,
|
|
20327
20327
|
disabled: !canEdit,
|
|
20328
20328
|
placeholder: t("pptx.elementAccessibility.altTextPlaceholder"),
|
|
20329
|
-
className:
|
|
20329
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "resize-none text-[11px]"),
|
|
20330
20330
|
value: fields.altText,
|
|
20331
20331
|
onChange: (e) => onUpdateElement({ altText: e.target.value })
|
|
20332
20332
|
}
|
|
@@ -20340,7 +20340,7 @@ function AccessibilityTextSection({
|
|
|
20340
20340
|
type: "text",
|
|
20341
20341
|
disabled: !canEdit,
|
|
20342
20342
|
placeholder: t("pptx.elementAccessibility.titlePlaceholder"),
|
|
20343
|
-
className:
|
|
20343
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "text-[11px]"),
|
|
20344
20344
|
value: fields.title,
|
|
20345
20345
|
onChange: (e) => onUpdateElement({ title: e.target.value })
|
|
20346
20346
|
}
|
|
@@ -20368,7 +20368,7 @@ function RecentColorsRow({
|
|
|
20368
20368
|
disabled,
|
|
20369
20369
|
onCommit
|
|
20370
20370
|
}) {
|
|
20371
|
-
const { t } =
|
|
20371
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20372
20372
|
const { recentColors, pushColor } = useRecentColors();
|
|
20373
20373
|
const shown = recentColors.length > 0;
|
|
20374
20374
|
const ref = React108.useRef(null);
|
|
@@ -20410,7 +20410,7 @@ function ThemeColorSwatchGrid({
|
|
|
20410
20410
|
selectedHex,
|
|
20411
20411
|
onPick
|
|
20412
20412
|
}) {
|
|
20413
|
-
const { t } =
|
|
20413
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20414
20414
|
const themeColorMap = useThemeColorMap();
|
|
20415
20415
|
const columns = React108.useMemo(
|
|
20416
20416
|
() => pptx.buildThemeColorSwatchGrid(themeColorMap, (key, params) => t(key, params)),
|
|
@@ -20457,7 +20457,7 @@ function SelectRow({
|
|
|
20457
20457
|
options,
|
|
20458
20458
|
onChange
|
|
20459
20459
|
}) {
|
|
20460
|
-
const { t } =
|
|
20460
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20461
20461
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: `flex flex-col gap-1 ${span2 ? COL2 : ""}`, children: [
|
|
20462
20462
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: label }),
|
|
20463
20463
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -20480,7 +20480,7 @@ function ColorPickerRow({
|
|
|
20480
20480
|
prefix,
|
|
20481
20481
|
onChange
|
|
20482
20482
|
}) {
|
|
20483
|
-
const { t } =
|
|
20483
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20484
20484
|
const { pushColor } = useRecentColors();
|
|
20485
20485
|
const commitRecentColor = useRecentColorCommit();
|
|
20486
20486
|
const commit = (color, ref) => {
|
|
@@ -20488,7 +20488,7 @@ function ColorPickerRow({
|
|
|
20488
20488
|
pushColor(color);
|
|
20489
20489
|
};
|
|
20490
20490
|
const handleEyedropper = async () => {
|
|
20491
|
-
const color = await
|
|
20491
|
+
const color = await chunkZ22RD3E2_js.openNativeEyeDropper();
|
|
20492
20492
|
if (color) {
|
|
20493
20493
|
commit(color);
|
|
20494
20494
|
}
|
|
@@ -20559,7 +20559,7 @@ function GradientStopRow({
|
|
|
20559
20559
|
onUpdate,
|
|
20560
20560
|
allStops
|
|
20561
20561
|
}) {
|
|
20562
|
-
const { t } =
|
|
20562
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20563
20563
|
const { pushColor } = useRecentColors();
|
|
20564
20564
|
const commitRecentColor = useRecentColorCommit();
|
|
20565
20565
|
const patchStop = (patch) => {
|
|
@@ -20572,9 +20572,9 @@ function GradientStopRow({
|
|
|
20572
20572
|
"input",
|
|
20573
20573
|
{
|
|
20574
20574
|
type: "color",
|
|
20575
|
-
value:
|
|
20575
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(stop2.color, "#3b82f6"),
|
|
20576
20576
|
ref: commitRecentColor,
|
|
20577
|
-
onChange: (e) => patchStop({ color:
|
|
20577
|
+
onChange: (e) => patchStop({ color: chunkZ22RD3E2_js.normalizeHexColor(e.target.value, "#3b82f6"), colorRef: void 0 }),
|
|
20578
20578
|
className: "h-7 w-10 rounded border border-border bg-muted"
|
|
20579
20579
|
}
|
|
20580
20580
|
),
|
|
@@ -20641,7 +20641,7 @@ function FillAdvancedControls({
|
|
|
20641
20641
|
onUpdateGradientStops,
|
|
20642
20642
|
onSetFillColor: _onSetFillColor
|
|
20643
20643
|
}) {
|
|
20644
|
-
const { t } =
|
|
20644
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20645
20645
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20646
20646
|
showGradient && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20647
20647
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -20695,7 +20695,7 @@ function FillAdvancedControls({
|
|
|
20695
20695
|
onClick: () => onUpdateGradientStops([
|
|
20696
20696
|
...gradientStops,
|
|
20697
20697
|
{
|
|
20698
|
-
color:
|
|
20698
|
+
color: chunkZ22RD3E2_js.normalizeHexColor(style?.fillColor, chunkZ22RD3E2_js.DEFAULT_FILL_COLOR),
|
|
20699
20699
|
position: 50,
|
|
20700
20700
|
opacity: 1
|
|
20701
20701
|
}
|
|
@@ -20709,9 +20709,9 @@ function FillAdvancedControls({
|
|
|
20709
20709
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${COL2} flex flex-col gap-2`, children: [
|
|
20710
20710
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: LBL, children: "Pattern" }),
|
|
20711
20711
|
/* @__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) => {
|
|
20712
|
-
const fgColor =
|
|
20713
|
-
const bgColor =
|
|
20714
|
-
const svgPattern =
|
|
20712
|
+
const fgColor = chunkZ22RD3E2_js.normalizeHexColor(style?.fillColor, chunkZ22RD3E2_js.DEFAULT_FILL_COLOR);
|
|
20713
|
+
const bgColor = chunkZ22RD3E2_js.normalizeHexColor(style?.fillPatternBackgroundColor, "#ffffff");
|
|
20714
|
+
const svgPattern = chunkZ22RD3E2_js.getPatternSvg(opt.value, fgColor, bgColor);
|
|
20715
20715
|
const isSelected = (style.fillPatternPreset || "pct20") === opt.value;
|
|
20716
20716
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
20717
20717
|
"button",
|
|
@@ -20744,7 +20744,7 @@ function FillAdvancedControls({
|
|
|
20744
20744
|
{
|
|
20745
20745
|
label: t("pptx.fillAdvanced.foregroundColor"),
|
|
20746
20746
|
prefix: "pattern-fg",
|
|
20747
|
-
value:
|
|
20747
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(style?.fillColor, chunkZ22RD3E2_js.DEFAULT_FILL_COLOR),
|
|
20748
20748
|
disabled: isLine,
|
|
20749
20749
|
onChange: (color) => onUpdateShapeStyle({ fillMode: "pattern", fillColor: color })
|
|
20750
20750
|
}
|
|
@@ -20754,7 +20754,7 @@ function FillAdvancedControls({
|
|
|
20754
20754
|
{
|
|
20755
20755
|
label: t("pptx.fillAdvanced.backgroundColor"),
|
|
20756
20756
|
prefix: "pattern-bg",
|
|
20757
|
-
value:
|
|
20757
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(style?.fillPatternBackgroundColor, "#ffffff"),
|
|
20758
20758
|
disabled: isLine,
|
|
20759
20759
|
onChange: (color) => onUpdateShapeStyle({
|
|
20760
20760
|
fillMode: "pattern",
|
|
@@ -20821,7 +20821,7 @@ var QUICK_STYLES = pptx.buildQuickStylesGallery();
|
|
|
20821
20821
|
function QuickStylesGallery({
|
|
20822
20822
|
onUpdateShapeStyle
|
|
20823
20823
|
}) {
|
|
20824
|
-
const { t } =
|
|
20824
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20825
20825
|
const ref = React108.useRef(null);
|
|
20826
20826
|
React108.useLayoutEffect(() => {
|
|
20827
20827
|
const gallery = ref.current;
|
|
@@ -20855,14 +20855,14 @@ function StrokeEffectsSection({
|
|
|
20855
20855
|
onUpdateShapeStyle,
|
|
20856
20856
|
onSetStrokeColor
|
|
20857
20857
|
}) {
|
|
20858
|
-
const { t } =
|
|
20858
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20859
20859
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
20860
20860
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20861
20861
|
ColorPickerRow,
|
|
20862
20862
|
{
|
|
20863
20863
|
label: t("pptx.inspector.stroke"),
|
|
20864
20864
|
prefix: "stroke",
|
|
20865
|
-
value:
|
|
20865
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(style?.strokeColor, chunkZ22RD3E2_js.DEFAULT_STROKE_COLOR),
|
|
20866
20866
|
selectedRef: style?.strokeColorRef,
|
|
20867
20867
|
onChange: onSetStrokeColor
|
|
20868
20868
|
}
|
|
@@ -20902,7 +20902,7 @@ function FillStrokeProperties({
|
|
|
20902
20902
|
onSetFillColor,
|
|
20903
20903
|
onSetStrokeColor
|
|
20904
20904
|
}) {
|
|
20905
|
-
const { t } =
|
|
20905
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
20906
20906
|
const line = isLineish(selectedElement, selectedShapeType);
|
|
20907
20907
|
const style = selectedShapeStyle;
|
|
20908
20908
|
const handleFillModeChange = (nextMode) => {
|
|
@@ -20918,10 +20918,10 @@ function FillStrokeProperties({
|
|
|
20918
20918
|
return;
|
|
20919
20919
|
}
|
|
20920
20920
|
if (nextMode === "gradient") {
|
|
20921
|
-
const existing =
|
|
20921
|
+
const existing = chunkZ22RD3E2_js.sanitizeGradientStops(style?.fillGradientStops);
|
|
20922
20922
|
const stops = existing.length >= 2 ? existing : [
|
|
20923
20923
|
{
|
|
20924
|
-
color:
|
|
20924
|
+
color: chunkZ22RD3E2_js.normalizeHexColor(style?.fillColor, chunkZ22RD3E2_js.DEFAULT_FILL_COLOR),
|
|
20925
20925
|
position: 0,
|
|
20926
20926
|
opacity: 1
|
|
20927
20927
|
},
|
|
@@ -20946,7 +20946,7 @@ function FillStrokeProperties({
|
|
|
20946
20946
|
onUpdateShapeStyle({ fillMode: "solid" });
|
|
20947
20947
|
};
|
|
20948
20948
|
const gradientStops = selectedGradientStops.length > 0 ? selectedGradientStops : [
|
|
20949
|
-
{ color:
|
|
20949
|
+
{ color: chunkZ22RD3E2_js.DEFAULT_FILL_COLOR, position: 0 },
|
|
20950
20950
|
{ color: "#ffffff", position: 100 }
|
|
20951
20951
|
];
|
|
20952
20952
|
const showGradient = style?.fillMode === "gradient" || selectedGradientStops.length > 0;
|
|
@@ -20973,7 +20973,7 @@ function FillStrokeProperties({
|
|
|
20973
20973
|
{
|
|
20974
20974
|
label: t("pptx.fill.fill"),
|
|
20975
20975
|
prefix: "fill",
|
|
20976
|
-
value:
|
|
20976
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(style?.fillColor, chunkZ22RD3E2_js.DEFAULT_FILL_COLOR),
|
|
20977
20977
|
selectedRef: style?.fillColorRef,
|
|
20978
20978
|
disabled: line,
|
|
20979
20979
|
onChange: onSetFillColor
|
|
@@ -21010,7 +21010,7 @@ function Text3DProperties({
|
|
|
21010
21010
|
ts,
|
|
21011
21011
|
onUpdateTextStyle
|
|
21012
21012
|
}) {
|
|
21013
|
-
const { t } =
|
|
21013
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
21014
21014
|
const commitRecentColor = useRecentColorCommit();
|
|
21015
21015
|
const t3d = ts?.text3d;
|
|
21016
21016
|
const hasExtrusion = Boolean(t3d?.extrusionHeight && t3d.extrusionHeight > 0);
|
|
@@ -21057,7 +21057,7 @@ function Text3DProperties({
|
|
|
21057
21057
|
"input",
|
|
21058
21058
|
{
|
|
21059
21059
|
type: "color",
|
|
21060
|
-
value:
|
|
21060
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(t3d?.extrusionColor, "#888888"),
|
|
21061
21061
|
ref: commitRecentColor,
|
|
21062
21062
|
onChange: (e) => update3d({ extrusionColor: e.target.value }),
|
|
21063
21063
|
className: COLOR_CLS
|
|
@@ -21224,7 +21224,7 @@ function AdvancedTextFormatting({
|
|
|
21224
21224
|
onUpdateTextStyle,
|
|
21225
21225
|
numChange
|
|
21226
21226
|
}) {
|
|
21227
|
-
const { t } =
|
|
21227
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
21228
21228
|
const commitRecentColor = useRecentColorCommit();
|
|
21229
21229
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 rounded border border-border bg-card p-2 space-y-2", children: [
|
|
21230
21230
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[11px] uppercase tracking-wide text-muted-foreground", children: t("pptx.textProperties.advancedTextHeading") }),
|
|
@@ -21246,7 +21246,7 @@ function AdvancedTextFormatting({
|
|
|
21246
21246
|
"input",
|
|
21247
21247
|
{
|
|
21248
21248
|
type: "color",
|
|
21249
|
-
value:
|
|
21249
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(ts?.highlightColor, "#ffff00"),
|
|
21250
21250
|
ref: commitRecentColor,
|
|
21251
21251
|
onChange: (e) => onUpdateTextStyle({ highlightColor: e.target.value }),
|
|
21252
21252
|
disabled: !canEdit,
|
|
@@ -21388,7 +21388,7 @@ function TextReflectionSection({
|
|
|
21388
21388
|
onUpdateTextStyle,
|
|
21389
21389
|
numChange
|
|
21390
21390
|
}) {
|
|
21391
|
-
const { t } =
|
|
21391
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
21392
21392
|
const hasReflection = Boolean(ts?.textReflection);
|
|
21393
21393
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
21394
21394
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "inline-flex items-center gap-2 text-foreground", children: [
|
|
@@ -21496,7 +21496,7 @@ function TextEffectsPanel({
|
|
|
21496
21496
|
onUpdateTextStyle,
|
|
21497
21497
|
numChange
|
|
21498
21498
|
}) {
|
|
21499
|
-
const { t } =
|
|
21499
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
21500
21500
|
const commitRecentColor = useRecentColorCommit();
|
|
21501
21501
|
const hasShadow = Boolean(
|
|
21502
21502
|
ts?.textShadowColor || typeof ts?.textShadowBlur === "number" && ts.textShadowBlur > 0
|
|
@@ -21542,7 +21542,7 @@ function TextEffectsPanel({
|
|
|
21542
21542
|
"input",
|
|
21543
21543
|
{
|
|
21544
21544
|
type: "color",
|
|
21545
|
-
value:
|
|
21545
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(ts?.textShadowColor, "#000000"),
|
|
21546
21546
|
ref: commitRecentColor,
|
|
21547
21547
|
onChange: (e) => onUpdateTextStyle({ textShadowColor: e.target.value }),
|
|
21548
21548
|
className: COLOR_CLS2
|
|
@@ -21647,7 +21647,7 @@ function TextEffectsPanel({
|
|
|
21647
21647
|
"input",
|
|
21648
21648
|
{
|
|
21649
21649
|
type: "color",
|
|
21650
|
-
value:
|
|
21650
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(ts?.textGlowColor, "#ffff00"),
|
|
21651
21651
|
ref: commitRecentColor,
|
|
21652
21652
|
onChange: (e) => onUpdateTextStyle({ textGlowColor: e.target.value }),
|
|
21653
21653
|
className: COLOR_CLS2
|
|
@@ -21697,7 +21697,7 @@ function TextWarpGallery({
|
|
|
21697
21697
|
ts,
|
|
21698
21698
|
onUpdateTextStyle
|
|
21699
21699
|
}) {
|
|
21700
|
-
const { t } =
|
|
21700
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
21701
21701
|
const [expanded, setExpanded] = React108__default.default.useState(false);
|
|
21702
21702
|
const currentPreset = ts?.textWarpPreset || "textNoShape";
|
|
21703
21703
|
const descriptor = React108.useMemo(() => pptx.buildTextWarpGallery(ts?.textWarpPreset), [ts?.textWarpPreset]);
|
|
@@ -21775,7 +21775,7 @@ function ShapeTextPanels({
|
|
|
21775
21775
|
onUpdateElementStyle,
|
|
21776
21776
|
onUpdateTextStyle
|
|
21777
21777
|
}) {
|
|
21778
|
-
const { t } =
|
|
21778
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
21779
21779
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
21780
21780
|
pptx$1.hasShapeProperties(selectedElement) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
21781
21781
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.shape.type", "Shape Type") }),
|
|
@@ -21784,11 +21784,11 @@ function ShapeTextPanels({
|
|
|
21784
21784
|
{
|
|
21785
21785
|
value: selectedElement.shapeType || "rect",
|
|
21786
21786
|
disabled: !canEdit,
|
|
21787
|
-
className:
|
|
21787
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "w-full"),
|
|
21788
21788
|
onChange: (e) => onUpdateElement({
|
|
21789
21789
|
shapeType: e.target.value
|
|
21790
21790
|
}),
|
|
21791
|
-
children:
|
|
21791
|
+
children: chunkZ22RD3E2_js.SHAPE_PRESETS.filter((p) => p.type !== "connector").map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.type, children: t(p.i18nKey) }, p.type))
|
|
21792
21792
|
}
|
|
21793
21793
|
)
|
|
21794
21794
|
] }),
|
|
@@ -21800,7 +21800,7 @@ function ShapeTextPanels({
|
|
|
21800
21800
|
selectedElement,
|
|
21801
21801
|
selectedShapeStyle: selectedElement.shapeStyle,
|
|
21802
21802
|
selectedShapeType: selectedElement.shapeType,
|
|
21803
|
-
selectedGradientStops:
|
|
21803
|
+
selectedGradientStops: chunkZ22RD3E2_js.sanitizeGradientStops(
|
|
21804
21804
|
selectedElement.shapeStyle?.fillGradientStops
|
|
21805
21805
|
),
|
|
21806
21806
|
canEdit,
|
|
@@ -21836,7 +21836,7 @@ function ShapeTextPanels({
|
|
|
21836
21836
|
{
|
|
21837
21837
|
disabled: !canEdit,
|
|
21838
21838
|
ariaLabel: "Text Color",
|
|
21839
|
-
value:
|
|
21839
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(selectedElement.textStyle?.color, "#000000"),
|
|
21840
21840
|
className: "w-full h-7 rounded border border-border bg-transparent cursor-pointer",
|
|
21841
21841
|
onCommit: (hex) => onUpdateTextStyle({ color: hex, colorRef: void 0 })
|
|
21842
21842
|
}
|
|
@@ -21926,7 +21926,7 @@ function TextFormatToggle({
|
|
|
21926
21926
|
{
|
|
21927
21927
|
type: "button",
|
|
21928
21928
|
disabled,
|
|
21929
|
-
className:
|
|
21929
|
+
className: chunkZ22RD3E2_js.cn(
|
|
21930
21930
|
"px-2 py-1 rounded text-[11px] transition-colors max-md:min-w-[44px]! max-md:min-h-[44px]!",
|
|
21931
21931
|
italic && "italic",
|
|
21932
21932
|
underline && "underline",
|
|
@@ -22095,7 +22095,7 @@ function SmartArtLayoutSwitcher({
|
|
|
22095
22095
|
canEdit,
|
|
22096
22096
|
onUpdateSmartArt
|
|
22097
22097
|
}) {
|
|
22098
|
-
const { t } =
|
|
22098
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
22099
22099
|
const currentLayout = smartArtData.resolvedLayoutType ?? "list";
|
|
22100
22100
|
const handleLayoutSwitch = (newLayout) => {
|
|
22101
22101
|
if (!canEdit || newLayout === currentLayout) {
|
|
@@ -22114,7 +22114,7 @@ function SmartArtLayoutSwitcher({
|
|
|
22114
22114
|
type: "button",
|
|
22115
22115
|
"data-testid": `smartart-layout-${type}`,
|
|
22116
22116
|
disabled: !canEdit,
|
|
22117
|
-
className:
|
|
22117
|
+
className: chunkZ22RD3E2_js.cn(
|
|
22118
22118
|
"flex flex-col items-center gap-0.5 rounded border p-1.5 transition-colors",
|
|
22119
22119
|
"text-[9px] leading-tight",
|
|
22120
22120
|
isActive ? "border-primary bg-primary/15 text-primary" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -22141,7 +22141,7 @@ function SmartArtStyleControls({
|
|
|
22141
22141
|
onChangeColorScheme,
|
|
22142
22142
|
onChangeStyle
|
|
22143
22143
|
}) {
|
|
22144
|
-
const { t } =
|
|
22144
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
22145
22145
|
const translate = React108__default.default.useCallback((key) => t(key), [t]);
|
|
22146
22146
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22147
22147
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1 text-[11px]", children: [
|
|
@@ -22152,7 +22152,7 @@ function SmartArtStyleControls({
|
|
|
22152
22152
|
disabled: !canEdit,
|
|
22153
22153
|
"data-testid": "smartart-color-scheme",
|
|
22154
22154
|
"aria-label": t("pptx.smartart.colorScheme"),
|
|
22155
|
-
className:
|
|
22155
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "w-full"),
|
|
22156
22156
|
value: colorScheme,
|
|
22157
22157
|
onChange: (e) => onChangeColorScheme(e.target.value),
|
|
22158
22158
|
children: colorSchemes.map((cs) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: cs, children: pptx.schemaLabel(pptx.SMARTART_COLOR_SCHEME_LABEL_KEYS, cs, translate) }, cs))
|
|
@@ -22167,7 +22167,7 @@ function SmartArtStyleControls({
|
|
|
22167
22167
|
type: "button",
|
|
22168
22168
|
disabled: !canEdit,
|
|
22169
22169
|
"aria-pressed": style === s,
|
|
22170
|
-
className:
|
|
22170
|
+
className: chunkZ22RD3E2_js.cn(
|
|
22171
22171
|
"flex-1 px-2 py-1 text-[10px] rounded border transition-colors",
|
|
22172
22172
|
style === s ? "border-primary bg-primary/20 text-primary" : "border-border text-muted-foreground hover:bg-muted"
|
|
22173
22173
|
),
|
|
@@ -22193,14 +22193,14 @@ function SmartArtPropertiesPanel({
|
|
|
22193
22193
|
onUpdateElement,
|
|
22194
22194
|
box
|
|
22195
22195
|
}) {
|
|
22196
|
-
const { t } =
|
|
22196
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
22197
22197
|
const { pushColor } = useRecentColors();
|
|
22198
22198
|
const paneRef = React108__default.default.useRef(null);
|
|
22199
22199
|
const applySmartArtData = (newData) => {
|
|
22200
22200
|
const reflowed = box ? pptx.rebuildDrawingShapesIfCleared(
|
|
22201
22201
|
newData,
|
|
22202
22202
|
newData.layout,
|
|
22203
|
-
|
|
22203
|
+
chunkV3XADJ2O_js.resolveSmartArtDataPalette(newData),
|
|
22204
22204
|
newData.style ?? "flat",
|
|
22205
22205
|
"inspector",
|
|
22206
22206
|
box
|
|
@@ -22271,9 +22271,9 @@ function TableDataGrid({
|
|
|
22271
22271
|
canEdit,
|
|
22272
22272
|
onUpdateElement
|
|
22273
22273
|
}) {
|
|
22274
|
-
const { t } =
|
|
22274
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
22275
22275
|
const grid = pptx.buildTableDataGrid(tableElement);
|
|
22276
|
-
const { viewportWidth } =
|
|
22276
|
+
const { viewportWidth } = chunkV3XADJ2O_js.useIsMobile();
|
|
22277
22277
|
const gridPlan = pptx.getDenseGridLayoutPlan(viewportWidth);
|
|
22278
22278
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
22279
22279
|
const stickyGutterClass = gridPlan.stickyFirstColumn ? "sticky left-0 z-10" : "";
|
|
@@ -22437,7 +22437,7 @@ function TableCellPatternFill({
|
|
|
22437
22437
|
canEdit,
|
|
22438
22438
|
onUpdateCellStyle
|
|
22439
22439
|
}) {
|
|
22440
|
-
const { t } =
|
|
22440
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
22441
22441
|
const commitRecentColor = useRecentColorCommit();
|
|
22442
22442
|
const translate = (key) => t(key);
|
|
22443
22443
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
@@ -22492,7 +22492,7 @@ function TableCellAdvancedFill({
|
|
|
22492
22492
|
canEdit,
|
|
22493
22493
|
onUpdateCellStyle
|
|
22494
22494
|
}) {
|
|
22495
|
-
const { t } =
|
|
22495
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
22496
22496
|
const fillMode = cellStyle.fillMode ?? "solid";
|
|
22497
22497
|
const handleFillModeChange = (mode) => {
|
|
22498
22498
|
const next = mode;
|
|
@@ -22580,7 +22580,7 @@ function GradientControls({
|
|
|
22580
22580
|
canEdit,
|
|
22581
22581
|
onUpdateCellStyle
|
|
22582
22582
|
}) {
|
|
22583
|
-
const { t } =
|
|
22583
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
22584
22584
|
const commitRecentColor = useRecentColorCommit();
|
|
22585
22585
|
const stops = cellStyle.gradientFillStops ?? [];
|
|
22586
22586
|
const gradType = cellStyle.gradientFillType ?? "linear";
|
|
@@ -22678,7 +22678,7 @@ function TableCellColorField({
|
|
|
22678
22678
|
disabled,
|
|
22679
22679
|
onCommit
|
|
22680
22680
|
}) {
|
|
22681
|
-
const hex =
|
|
22681
|
+
const hex = chunkZ22RD3E2_js.normalizeHexColor(value, fallback);
|
|
22682
22682
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
22683
22683
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: label }),
|
|
22684
22684
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -22708,7 +22708,7 @@ function TableCellFormattingPanel({
|
|
|
22708
22708
|
onUpdateTableData,
|
|
22709
22709
|
onUpdateMergeRows
|
|
22710
22710
|
}) {
|
|
22711
|
-
const { t } =
|
|
22711
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
22712
22712
|
const { rowIndex, columnIndex } = tableEditorState;
|
|
22713
22713
|
const cell = td.rows[rowIndex]?.cells[columnIndex];
|
|
22714
22714
|
if (!cell) {
|
|
@@ -22786,7 +22786,7 @@ function TableCellFormattingPanel({
|
|
|
22786
22786
|
{
|
|
22787
22787
|
type: "button",
|
|
22788
22788
|
disabled: !canEdit,
|
|
22789
|
-
className:
|
|
22789
|
+
className: chunkZ22RD3E2_js.cn(
|
|
22790
22790
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22791
22791
|
cls,
|
|
22792
22792
|
cs[key] ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
@@ -22805,7 +22805,7 @@ function TableCellFormattingPanel({
|
|
|
22805
22805
|
{
|
|
22806
22806
|
type: "button",
|
|
22807
22807
|
disabled: !canEdit,
|
|
22808
|
-
className:
|
|
22808
|
+
className: chunkZ22RD3E2_js.cn(
|
|
22809
22809
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22810
22810
|
cs.align === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
22811
22811
|
),
|
|
@@ -22823,7 +22823,7 @@ function TableCellFormattingPanel({
|
|
|
22823
22823
|
{
|
|
22824
22824
|
type: "button",
|
|
22825
22825
|
disabled: !canEdit,
|
|
22826
|
-
className:
|
|
22826
|
+
className: chunkZ22RD3E2_js.cn(
|
|
22827
22827
|
"px-2 py-1 rounded text-[11px] transition-colors",
|
|
22828
22828
|
cs.vAlign === val ? "bg-primary text-white" : "bg-muted hover:bg-accent"
|
|
22829
22829
|
),
|
|
@@ -22846,7 +22846,7 @@ function TableCellFormattingPanel({
|
|
|
22846
22846
|
DebouncedColorInput,
|
|
22847
22847
|
{
|
|
22848
22848
|
disabled: !canEdit,
|
|
22849
|
-
value:
|
|
22849
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(cs[colorKey], "#374151"),
|
|
22850
22850
|
className: "w-7 h-6 rounded border border-border bg-transparent cursor-pointer shrink-0",
|
|
22851
22851
|
onCommit: (hex) => updateCellStyle({ [colorKey]: hex })
|
|
22852
22852
|
}
|
|
@@ -22856,7 +22856,7 @@ function TableCellFormattingPanel({
|
|
|
22856
22856
|
{
|
|
22857
22857
|
type: "number",
|
|
22858
22858
|
disabled: !canEdit,
|
|
22859
|
-
className:
|
|
22859
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "w-14"),
|
|
22860
22860
|
min: 0,
|
|
22861
22861
|
max: 10,
|
|
22862
22862
|
value: pptx.inspectorNumber(cs[widthKey], 1),
|
|
@@ -22872,7 +22872,7 @@ function TableCellFormattingPanel({
|
|
|
22872
22872
|
{
|
|
22873
22873
|
type: "button",
|
|
22874
22874
|
disabled: !canEdit,
|
|
22875
|
-
className:
|
|
22875
|
+
className: chunkZ22RD3E2_js.cn(BTN2, "text-center"),
|
|
22876
22876
|
onClick: () => {
|
|
22877
22877
|
const newRows = pptx.computeMergeCellRight(td, rowIndex, columnIndex);
|
|
22878
22878
|
if (newRows) {
|
|
@@ -22887,7 +22887,7 @@ function TableCellFormattingPanel({
|
|
|
22887
22887
|
{
|
|
22888
22888
|
type: "button",
|
|
22889
22889
|
disabled: !canEdit,
|
|
22890
|
-
className:
|
|
22890
|
+
className: chunkZ22RD3E2_js.cn(BTN2, "text-center"),
|
|
22891
22891
|
onClick: () => {
|
|
22892
22892
|
const newRows = pptx.computeMergeCellDown(td, rowIndex, columnIndex);
|
|
22893
22893
|
if (newRows) {
|
|
@@ -22902,7 +22902,7 @@ function TableCellFormattingPanel({
|
|
|
22902
22902
|
{
|
|
22903
22903
|
type: "button",
|
|
22904
22904
|
disabled: !canEdit,
|
|
22905
|
-
className:
|
|
22905
|
+
className: chunkZ22RD3E2_js.cn(BTN2, "text-center"),
|
|
22906
22906
|
onClick: () => {
|
|
22907
22907
|
const newRows = pptx.computeSplitCell(td, rowIndex, columnIndex);
|
|
22908
22908
|
if (newRows) {
|
|
@@ -22921,7 +22921,7 @@ function TableStyleEditorFields({
|
|
|
22921
22921
|
canEdit,
|
|
22922
22922
|
onEdit
|
|
22923
22923
|
}) {
|
|
22924
|
-
const { t } =
|
|
22924
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
22925
22925
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
22926
22926
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
22927
22927
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.tableStyleEditor.fillSection") }),
|
|
@@ -23026,7 +23026,7 @@ function BorderSideRow({
|
|
|
23026
23026
|
canEdit,
|
|
23027
23027
|
onEdit
|
|
23028
23028
|
}) {
|
|
23029
|
-
const { t } =
|
|
23029
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
23030
23030
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-[11px]", children: [
|
|
23031
23031
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-28 shrink-0 text-muted-foreground", children: t(pptx.TABLE_STYLE_BORDER_SIDE_LABEL_KEYS[side]) }),
|
|
23032
23032
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23083,7 +23083,7 @@ function TableStyleEditor({
|
|
|
23083
23083
|
onAssignStyle,
|
|
23084
23084
|
onClose
|
|
23085
23085
|
}) {
|
|
23086
|
-
const { t } =
|
|
23086
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
23087
23087
|
const themeColorMap = useThemeColorMap();
|
|
23088
23088
|
const [activeStyleId, setActiveStyleId] = React108.useState(
|
|
23089
23089
|
styleId ? pptx$1.normalizeTableStyleGuid(styleId) : ""
|
|
@@ -23156,7 +23156,7 @@ function TablePropertiesPanel({
|
|
|
23156
23156
|
onTableStyleMapChange,
|
|
23157
23157
|
onDeleteTableStyle
|
|
23158
23158
|
}) {
|
|
23159
|
-
const { t } =
|
|
23159
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
23160
23160
|
const [showStyleEditor, setShowStyleEditor] = React108.useState(false);
|
|
23161
23161
|
const td = tableElement.tableData;
|
|
23162
23162
|
if (!td) {
|
|
@@ -23238,7 +23238,7 @@ function TablePropertiesPanel({
|
|
|
23238
23238
|
] }),
|
|
23239
23239
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
23240
23240
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.table.stylePresets") }),
|
|
23241
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children:
|
|
23241
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-1.5", children: chunkZ22RD3E2_js.TABLE_STYLE_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
23242
23242
|
"button",
|
|
23243
23243
|
{
|
|
23244
23244
|
type: "button",
|
|
@@ -23386,7 +23386,7 @@ function ElementInspectorBody({
|
|
|
23386
23386
|
onUpdateTextStyle,
|
|
23387
23387
|
onMoveLayer
|
|
23388
23388
|
}) {
|
|
23389
|
-
const { t } =
|
|
23389
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
23390
23390
|
const isLocked = pptx.isElementLocked(selectedElement);
|
|
23391
23391
|
const handleToggleLock = () => {
|
|
23392
23392
|
if (!canEdit) {
|
|
@@ -23536,7 +23536,7 @@ function CommentMentionTextarea({
|
|
|
23536
23536
|
className,
|
|
23537
23537
|
ariaLabel
|
|
23538
23538
|
}) {
|
|
23539
|
-
const { t } =
|
|
23539
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
23540
23540
|
const textareaRef = React108.useRef(null);
|
|
23541
23541
|
const [caret, setCaret] = React108.useState(value.length);
|
|
23542
23542
|
const [highlighted, setHighlighted] = React108.useState(0);
|
|
@@ -23625,7 +23625,7 @@ function CommentMentionTextarea({
|
|
|
23625
23625
|
"data-testid": "pptx-comment-mention-option",
|
|
23626
23626
|
role: "option",
|
|
23627
23627
|
"aria-selected": index === safeHighlighted,
|
|
23628
|
-
className:
|
|
23628
|
+
className: chunkZ22RD3E2_js.cn(
|
|
23629
23629
|
"block w-full px-2 py-1 text-left text-[11px] hover:bg-accent",
|
|
23630
23630
|
index === safeHighlighted && "bg-accent"
|
|
23631
23631
|
),
|
|
@@ -23672,7 +23672,7 @@ function InspectorCommentReplyForm({
|
|
|
23672
23672
|
onSubmit,
|
|
23673
23673
|
onCancel
|
|
23674
23674
|
}) {
|
|
23675
|
-
const { t } =
|
|
23675
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
23676
23676
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 space-y-1.5 pl-3 border-l-2 border-l-primary/40", children: [
|
|
23677
23677
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23678
23678
|
CommentMentionTextarea,
|
|
@@ -23738,7 +23738,7 @@ function InspectorCommentRow({
|
|
|
23738
23738
|
onSelectElement,
|
|
23739
23739
|
depth = 0
|
|
23740
23740
|
}) {
|
|
23741
|
-
const { t } =
|
|
23741
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
23742
23742
|
const isEditing = editingCommentId === comment.id;
|
|
23743
23743
|
const isReplying = replyingToCommentId === comment.id;
|
|
23744
23744
|
const replyDraft = replyDraftByCommentId[comment.id] ?? "";
|
|
@@ -23748,7 +23748,7 @@ function InspectorCommentRow({
|
|
|
23748
23748
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23749
23749
|
"div",
|
|
23750
23750
|
{
|
|
23751
|
-
className:
|
|
23751
|
+
className: chunkZ22RD3E2_js.cn(
|
|
23752
23752
|
"rounded border border-border bg-card p-2",
|
|
23753
23753
|
depth > 0 && "ml-3 border-l-2 border-l-primary/40"
|
|
23754
23754
|
),
|
|
@@ -23762,7 +23762,7 @@ function InspectorCommentRow({
|
|
|
23762
23762
|
t("pptx.comments.resolved")
|
|
23763
23763
|
] })
|
|
23764
23764
|
] }),
|
|
23765
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children:
|
|
23765
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-muted-foreground flex-shrink-0", children: chunkZ22RD3E2_js.formatCommentTimestamp(comment.createdAt) })
|
|
23766
23766
|
] }),
|
|
23767
23767
|
comment.elementId && (targetElement ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23768
23768
|
"button",
|
|
@@ -23770,12 +23770,12 @@ function InspectorCommentRow({
|
|
|
23770
23770
|
type: "button",
|
|
23771
23771
|
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",
|
|
23772
23772
|
title: t("pptx.comments.commentingOn", {
|
|
23773
|
-
element:
|
|
23773
|
+
element: chunkZ22RD3E2_js.getElementLabel(targetElement)
|
|
23774
23774
|
}),
|
|
23775
23775
|
onClick: () => onSelectElement(targetElement.id),
|
|
23776
23776
|
children: [
|
|
23777
23777
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
23778
|
-
|
|
23778
|
+
chunkZ22RD3E2_js.getElementLabel(targetElement)
|
|
23779
23779
|
]
|
|
23780
23780
|
}
|
|
23781
23781
|
) : /* @__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") })),
|
|
@@ -23844,7 +23844,7 @@ function InspectorCommentRow({
|
|
|
23844
23844
|
"button",
|
|
23845
23845
|
{
|
|
23846
23846
|
type: "button",
|
|
23847
|
-
className:
|
|
23847
|
+
className: chunkZ22RD3E2_js.cn(
|
|
23848
23848
|
"inline-flex items-center justify-center p-1.5 border-l border-border transition-colors",
|
|
23849
23849
|
comment.resolved ? "bg-green-900/40 text-green-300 hover:bg-green-900/60" : "hover:bg-accent text-foreground hover:text-foreground"
|
|
23850
23850
|
),
|
|
@@ -23950,7 +23950,7 @@ function InspectorCommentsSection({
|
|
|
23950
23950
|
onSubmitReply,
|
|
23951
23951
|
onSelectElement
|
|
23952
23952
|
}) {
|
|
23953
|
-
const { t } =
|
|
23953
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
23954
23954
|
const HEADING_CLS = "text-[11px] uppercase tracking-wide text-muted-foreground";
|
|
23955
23955
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
23956
23956
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -23987,7 +23987,7 @@ function InspectorCommentsSection({
|
|
|
23987
23987
|
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: [
|
|
23988
23988
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuType, { className: "h-2.5 w-2.5" }),
|
|
23989
23989
|
t("pptx.comments.commentingOn", {
|
|
23990
|
-
element:
|
|
23990
|
+
element: chunkZ22RD3E2_js.getElementLabel(selectedElement)
|
|
23991
23991
|
})
|
|
23992
23992
|
] }),
|
|
23993
23993
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -23998,7 +23998,7 @@ function InspectorCommentsSection({
|
|
|
23998
23998
|
authors: commentAuthors,
|
|
23999
23999
|
rows: 2,
|
|
24000
24000
|
placeholder: selectedElement ? t("pptx.comments.addOnElement", {
|
|
24001
|
-
element:
|
|
24001
|
+
element: chunkZ22RD3E2_js.getElementLabel(selectedElement)
|
|
24002
24002
|
}) : t("pptx.comments.addPlaceholder"),
|
|
24003
24003
|
className: "w-full bg-muted border border-border rounded px-2 py-1 text-xs resize-y outline-none focus:border-primary",
|
|
24004
24004
|
onChange: onSetCommentDraft,
|
|
@@ -24011,7 +24011,7 @@ function InspectorCommentsSection({
|
|
|
24011
24011
|
type: "button",
|
|
24012
24012
|
onClick: onAddComment,
|
|
24013
24013
|
disabled: !commentDraft.trim(),
|
|
24014
|
-
className:
|
|
24014
|
+
className: chunkZ22RD3E2_js.cn(
|
|
24015
24015
|
"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]!",
|
|
24016
24016
|
commentDraft.trim() ? "bg-primary hover:bg-primary/80 text-white" : "bg-muted text-muted-foreground cursor-not-allowed"
|
|
24017
24017
|
),
|
|
@@ -24036,7 +24036,7 @@ function InspectorElementsTab({
|
|
|
24036
24036
|
onSelectElement,
|
|
24037
24037
|
onUpdateSlide
|
|
24038
24038
|
}) {
|
|
24039
|
-
const { t } =
|
|
24039
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24040
24040
|
const toggleHidden = (elementId2) => {
|
|
24041
24041
|
const elements2 = activeSlide?.elements;
|
|
24042
24042
|
if (!canEdit || !elements2) {
|
|
@@ -24052,13 +24052,13 @@ function InspectorElementsTab({
|
|
|
24052
24052
|
};
|
|
24053
24053
|
if (!activeSlide) {
|
|
24054
24054
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
24055
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
24055
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkZ22RD3E2_js.cn(HEADING2, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
24056
24056
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground italic", children: t("pptx.inspector.noSlideSelected") })
|
|
24057
24057
|
] });
|
|
24058
24058
|
}
|
|
24059
24059
|
const elements = activeSlide.elements || [];
|
|
24060
24060
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", "data-pptx-elements-tab": true, children: [
|
|
24061
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
24061
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkZ22RD3E2_js.cn(HEADING2, "mb-2"), children: t("pptx.inspector.layerOrder") }),
|
|
24062
24062
|
[...elements].reverse().map((el, reversedIndex) => {
|
|
24063
24063
|
const index = elements.length - 1 - reversedIndex;
|
|
24064
24064
|
const selected = selectedElementId === el.id || selectedElementIds.includes(el.id);
|
|
@@ -24066,7 +24066,7 @@ function InspectorElementsTab({
|
|
|
24066
24066
|
"div",
|
|
24067
24067
|
{
|
|
24068
24068
|
title: `${el.type} - ${el.id}`,
|
|
24069
|
-
className:
|
|
24069
|
+
className: chunkZ22RD3E2_js.cn(
|
|
24070
24070
|
"flex items-center gap-2 px-2 py-1 rounded cursor-pointer transition-colors",
|
|
24071
24071
|
selected ? "bg-primary/30 text-primary" : "hover:bg-muted text-foreground"
|
|
24072
24072
|
),
|
|
@@ -24102,8 +24102,8 @@ function InspectorPaneHeader({
|
|
|
24102
24102
|
onSetActiveTab,
|
|
24103
24103
|
onClose
|
|
24104
24104
|
}) {
|
|
24105
|
-
const { t } =
|
|
24106
|
-
const { viewportWidth } =
|
|
24105
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24106
|
+
const { viewportWidth } = chunkV3XADJ2O_js.useIsMobile();
|
|
24107
24107
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
24108
24108
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
24109
24109
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -24126,7 +24126,7 @@ function InspectorPaneHeader({
|
|
|
24126
24126
|
type: "button",
|
|
24127
24127
|
title: t(labelKey),
|
|
24128
24128
|
style: touchBtnStyle,
|
|
24129
|
-
className:
|
|
24129
|
+
className: chunkZ22RD3E2_js.cn(
|
|
24130
24130
|
"flex items-center justify-center gap-1 px-2 py-1 rounded text-[11px] transition-colors",
|
|
24131
24131
|
activeTab === key ? "bg-primary text-white" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
24132
24132
|
),
|
|
@@ -24186,7 +24186,7 @@ function CustomPropertiesBlock({
|
|
|
24186
24186
|
canEdit,
|
|
24187
24187
|
onUpdate
|
|
24188
24188
|
}) {
|
|
24189
|
-
const { t } =
|
|
24189
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24190
24190
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
24191
24191
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
24192
24192
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t("pptx.documentProperties.custom.heading") }),
|
|
@@ -24240,7 +24240,7 @@ function CustomPropertiesBlock({
|
|
|
24240
24240
|
"button",
|
|
24241
24241
|
{
|
|
24242
24242
|
type: "button",
|
|
24243
|
-
className:
|
|
24243
|
+
className: chunkZ22RD3E2_js.cn(BTN2, "px-1.5 text-red-400 hover:text-red-300"),
|
|
24244
24244
|
onClick: () => onUpdate(customProperties.filter((_, i) => i !== index)),
|
|
24245
24245
|
children: "\xD7"
|
|
24246
24246
|
}
|
|
@@ -24253,7 +24253,7 @@ function NotesHandoutCard({
|
|
|
24253
24253
|
notesMaster,
|
|
24254
24254
|
handoutMaster
|
|
24255
24255
|
}) {
|
|
24256
|
-
const { t } =
|
|
24256
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24257
24257
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
24258
24258
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.documentProperties.notesHandoutHeading") }),
|
|
24259
24259
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 text-[11px] text-muted-foreground", children: [
|
|
@@ -24290,7 +24290,7 @@ function DocumentPropertiesCard({
|
|
|
24290
24290
|
onUpdateAppProperties,
|
|
24291
24291
|
onUpdateCustomProperties
|
|
24292
24292
|
}) {
|
|
24293
|
-
const { t } =
|
|
24293
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24294
24294
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
24295
24295
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.documentProperties.documentHeading") }),
|
|
24296
24296
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px] text-muted-foreground", children: [
|
|
@@ -24344,7 +24344,7 @@ function DocumentPropertiesCard({
|
|
|
24344
24344
|
function SlideSizeRescalePrompt({
|
|
24345
24345
|
onChoose
|
|
24346
24346
|
}) {
|
|
24347
|
-
const { t } =
|
|
24347
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24348
24348
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5 rounded border border-border bg-muted/40 p-2 text-[11px]", children: [
|
|
24349
24349
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: t("pptx.slideSize.rescaleTitle") }),
|
|
24350
24350
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: t("pptx.slideSize.rescaleDescription") }),
|
|
@@ -24386,7 +24386,7 @@ function SlideSizeCard({
|
|
|
24386
24386
|
onUpdateSlideSize,
|
|
24387
24387
|
hasContent
|
|
24388
24388
|
}) {
|
|
24389
|
-
const { t } =
|
|
24389
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24390
24390
|
const selection = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize });
|
|
24391
24391
|
const presetDisabled = !canEdit || !onUpdateSlideSize;
|
|
24392
24392
|
const [pendingSize, setPendingSize] = React108.useState(null);
|
|
@@ -24497,7 +24497,7 @@ function PresentationSettingsCard({
|
|
|
24497
24497
|
canEdit,
|
|
24498
24498
|
onUpdate
|
|
24499
24499
|
}) {
|
|
24500
|
-
const { t } =
|
|
24500
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24501
24501
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CARD2} pptx-editor-presentation-card`, children: [
|
|
24502
24502
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.slideInspector.presentation") }),
|
|
24503
24503
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-chrome": "presentation-fields", className: "space-y-1.5 text-[11px]", children: [
|
|
@@ -24568,7 +24568,7 @@ function PresentationSettingsCard({
|
|
|
24568
24568
|
min: 1,
|
|
24569
24569
|
max: 16,
|
|
24570
24570
|
disabled: !canEdit,
|
|
24571
|
-
className:
|
|
24571
|
+
className: chunkZ22RD3E2_js.cn(INPUT2, "w-20"),
|
|
24572
24572
|
value: pptx.printPropertiesSlidesPerPage(presentationProperties.printProperties),
|
|
24573
24573
|
onChange: (e) => onUpdate({
|
|
24574
24574
|
printProperties: pptx.withSlidesPerPage(
|
|
@@ -24589,7 +24589,7 @@ function ThemeSelectorCard({
|
|
|
24589
24589
|
canEdit,
|
|
24590
24590
|
onApplyTheme
|
|
24591
24591
|
}) {
|
|
24592
|
-
const { t } =
|
|
24592
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24593
24593
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: CARD2, children: [
|
|
24594
24594
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.documentProperties.themeHeading") }),
|
|
24595
24595
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 text-[11px]", children: [
|
|
@@ -24652,7 +24652,7 @@ function SlideThemeOverridePanel({
|
|
|
24652
24652
|
canEdit,
|
|
24653
24653
|
onUpdateSlide
|
|
24654
24654
|
}) {
|
|
24655
|
-
const { t } =
|
|
24655
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24656
24656
|
const translate = React108.useCallback((key) => t(key), [t]);
|
|
24657
24657
|
const override = activeSlide?.clrMapOverride;
|
|
24658
24658
|
const isOverrideActive = override !== void 0;
|
|
@@ -24759,7 +24759,7 @@ function DirectionPicker({
|
|
|
24759
24759
|
disabled,
|
|
24760
24760
|
onChange
|
|
24761
24761
|
}) {
|
|
24762
|
-
const { t } =
|
|
24762
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24763
24763
|
if (directions.length <= 3) {
|
|
24764
24764
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1", children: directions.map((dir) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
24765
24765
|
"button",
|
|
@@ -24801,10 +24801,10 @@ function TransitionPreview({
|
|
|
24801
24801
|
const previewRef = React108.useRef(null);
|
|
24802
24802
|
const [playing, setPlaying] = React108.useState(false);
|
|
24803
24803
|
const [animKey, setAnimKey] = React108.useState(0);
|
|
24804
|
-
const { t } =
|
|
24804
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24805
24805
|
const durationMs = transition.durationMs ?? 500;
|
|
24806
24806
|
const animations = React108.useMemo(
|
|
24807
|
-
() =>
|
|
24807
|
+
() => chunkV3XADJ2O_js.getSlideTransitionAnimations(
|
|
24808
24808
|
transition.type,
|
|
24809
24809
|
durationMs,
|
|
24810
24810
|
transition.direction,
|
|
@@ -24873,7 +24873,7 @@ function TransitionPreview({
|
|
|
24873
24873
|
]
|
|
24874
24874
|
}
|
|
24875
24875
|
),
|
|
24876
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
24876
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkV3XADJ2O_js.SLIDE_TRANSITION_KEYFRAMES })
|
|
24877
24877
|
] });
|
|
24878
24878
|
}
|
|
24879
24879
|
var DEFAULT_DURATION_MS = 320;
|
|
@@ -24885,7 +24885,7 @@ function SlideTransitionSection({
|
|
|
24885
24885
|
canEdit = true,
|
|
24886
24886
|
onTransitionChange
|
|
24887
24887
|
}) {
|
|
24888
|
-
const { t } =
|
|
24888
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
24889
24889
|
if (!activeSlide) {
|
|
24890
24890
|
return null;
|
|
24891
24891
|
}
|
|
@@ -24916,7 +24916,7 @@ function SlideTransitionSection({
|
|
|
24916
24916
|
type: e.target.value
|
|
24917
24917
|
}),
|
|
24918
24918
|
className: "bg-muted border border-border rounded px-2 py-1 max-md:min-h-[44px]!",
|
|
24919
|
-
children:
|
|
24919
|
+
children: chunkZ22RD3E2_js.SLIDE_TRANSITION_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: t(option.i18nKey) }, option.value))
|
|
24920
24920
|
}
|
|
24921
24921
|
)
|
|
24922
24922
|
] }),
|
|
@@ -25074,7 +25074,7 @@ function TagsSection({
|
|
|
25074
25074
|
onUpdateTagCollections,
|
|
25075
25075
|
canEdit
|
|
25076
25076
|
}) {
|
|
25077
|
-
const { t } =
|
|
25077
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
25078
25078
|
const [collapsed, setCollapsed] = React108.useState(true);
|
|
25079
25079
|
const allTags = pptx.flattenTagCollections(tagCollections);
|
|
25080
25080
|
const updateTag = (colIdx, tagIdx, field, newValue) => {
|
|
@@ -25132,7 +25132,7 @@ function TagsSection({
|
|
|
25132
25132
|
"button",
|
|
25133
25133
|
{
|
|
25134
25134
|
type: "button",
|
|
25135
|
-
className:
|
|
25135
|
+
className: chunkZ22RD3E2_js.cn(BTN2, "px-1.5 text-red-400 hover:text-red-300"),
|
|
25136
25136
|
title: t("pptx.tags.deleteTag"),
|
|
25137
25137
|
onClick: () => deleteTag(tag.colIdx, tag.tagIdx),
|
|
25138
25138
|
children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuTrash2, { className: "w-3 h-3" })
|
|
@@ -25174,7 +25174,7 @@ function PresentationPropertiesPanel({
|
|
|
25174
25174
|
tagCollections,
|
|
25175
25175
|
onUpdateTagCollections
|
|
25176
25176
|
}) {
|
|
25177
|
-
const { t } =
|
|
25177
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
25178
25178
|
const handleTransitionChange = React108__default.default.useCallback(
|
|
25179
25179
|
(updates) => {
|
|
25180
25180
|
onUpdateSlide({
|
|
@@ -25261,7 +25261,7 @@ function PresentationPropertiesPanel({
|
|
|
25261
25261
|
canEdit
|
|
25262
25262
|
}
|
|
25263
25263
|
) }),
|
|
25264
|
-
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-inspector-card": "slide", className:
|
|
25264
|
+
activeSlide && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-inspector-card": "slide", className: chunkZ22RD3E2_js.cn(CARD2, "space-y-1"), children: [
|
|
25265
25265
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: "Slide" }),
|
|
25266
25266
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[11px] text-muted-foreground", children: [
|
|
25267
25267
|
activeSlide.elements?.length ?? 0,
|
|
@@ -25279,17 +25279,17 @@ function SlideBackgroundPanel({
|
|
|
25279
25279
|
onSetTemplateBackground,
|
|
25280
25280
|
onGetTemplateBackgroundColor
|
|
25281
25281
|
}) {
|
|
25282
|
-
const { t } =
|
|
25282
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
25283
25283
|
const bgImageInputRef = React108.useRef(null);
|
|
25284
25284
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
25285
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
25285
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkZ22RD3E2_js.cn(CARD2, "space-y-2"), children: [
|
|
25286
25286
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.viewer.background") }),
|
|
25287
25287
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
25288
25288
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-10 shrink-0", children: t("pptx.slideBackground.colour") }),
|
|
25289
25289
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25290
25290
|
DebouncedColorInput,
|
|
25291
25291
|
{
|
|
25292
|
-
value:
|
|
25292
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(activeSlide.backgroundColor, "#ffffff"),
|
|
25293
25293
|
disabled: !canEdit,
|
|
25294
25294
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
25295
25295
|
onCommit: (hex) => onUpdateSlide({ backgroundColor: hex })
|
|
@@ -25328,7 +25328,7 @@ function SlideBackgroundPanel({
|
|
|
25328
25328
|
"button",
|
|
25329
25329
|
{
|
|
25330
25330
|
type: "button",
|
|
25331
|
-
className:
|
|
25331
|
+
className: chunkZ22RD3E2_js.cn(BTN2, "flex-1 text-center"),
|
|
25332
25332
|
disabled: !canEdit,
|
|
25333
25333
|
onClick: () => bgImageInputRef.current?.click(),
|
|
25334
25334
|
children: activeSlide.backgroundImage ? t("pptx.slideBackground.replaceImage") : t("pptx.slideBackground.chooseImage")
|
|
@@ -25361,7 +25361,7 @@ function SlideBackgroundPanel({
|
|
|
25361
25361
|
"button",
|
|
25362
25362
|
{
|
|
25363
25363
|
type: "button",
|
|
25364
|
-
className:
|
|
25364
|
+
className: chunkZ22RD3E2_js.cn(BTN2, "w-full text-center text-red-400 hover:text-red-300"),
|
|
25365
25365
|
disabled: !pptx.slideBackgroundClearState(activeSlide, canEdit).enabled,
|
|
25366
25366
|
onClick: () => onUpdateSlide(pptx.slideBackgroundClearPatch()),
|
|
25367
25367
|
children: t("pptx.slideBackground.clearBackground")
|
|
@@ -25398,21 +25398,21 @@ function TemplateBackgroundCard({
|
|
|
25398
25398
|
onSetTemplateBackground,
|
|
25399
25399
|
onGetTemplateBackgroundColor
|
|
25400
25400
|
}) {
|
|
25401
|
-
const { t } =
|
|
25401
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
25402
25402
|
const rows = pptx.resolveTemplateBackgroundRows(
|
|
25403
25403
|
activeSlide,
|
|
25404
25404
|
slideMasters,
|
|
25405
25405
|
t("pptx.master.layout"),
|
|
25406
25406
|
t("pptx.master.master")
|
|
25407
25407
|
);
|
|
25408
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
25408
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkZ22RD3E2_js.cn(CARD2, "space-y-2"), children: [
|
|
25409
25409
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: HEADING2, children: t("pptx.slideBackground.templateBackgroundsHeading") }),
|
|
25410
25410
|
rows.layout && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
25411
25411
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground w-14 shrink-0 truncate", title: rows.layout.title, children: t("pptx.master.layout") }),
|
|
25412
25412
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25413
25413
|
DebouncedColorInput,
|
|
25414
25414
|
{
|
|
25415
|
-
value:
|
|
25415
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(onGetTemplateBackgroundColor(rows.layout.path), "#ffffff"),
|
|
25416
25416
|
disabled: !canEdit,
|
|
25417
25417
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
25418
25418
|
onCommit: (hex) => onSetTemplateBackground(rows.layout.path, hex)
|
|
@@ -25425,7 +25425,7 @@ function TemplateBackgroundCard({
|
|
|
25425
25425
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25426
25426
|
DebouncedColorInput,
|
|
25427
25427
|
{
|
|
25428
|
-
value:
|
|
25428
|
+
value: chunkZ22RD3E2_js.normalizeHexColor(onGetTemplateBackgroundColor(rows.master.path), "#ffffff"),
|
|
25429
25429
|
disabled: !canEdit,
|
|
25430
25430
|
className: "h-6 w-8 rounded border border-border bg-muted cursor-pointer",
|
|
25431
25431
|
onCommit: (hex) => onSetTemplateBackground(rows.master.path, hex)
|
|
@@ -25535,8 +25535,8 @@ function InspectorPane(props) {
|
|
|
25535
25535
|
panelWidth
|
|
25536
25536
|
} = props;
|
|
25537
25537
|
const hasSelection = selectedElement !== null;
|
|
25538
|
-
const { t } =
|
|
25539
|
-
const { dragY, handlers: dragHandlers } =
|
|
25538
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
25539
|
+
const { dragY, handlers: dragHandlers } = chunkV3XADJ2O_js.useSheetDismissDrag(onClose);
|
|
25540
25540
|
const {
|
|
25541
25541
|
animationPanelHeight,
|
|
25542
25542
|
effectiveThemeOptions,
|
|
@@ -25558,7 +25558,7 @@ function InspectorPane(props) {
|
|
|
25558
25558
|
"div",
|
|
25559
25559
|
{
|
|
25560
25560
|
"data-pptx-chrome": "inspector",
|
|
25561
|
-
className:
|
|
25561
|
+
className: chunkZ22RD3E2_js.cn(
|
|
25562
25562
|
// Shared styles
|
|
25563
25563
|
"bg-background flex flex-col text-xs text-foreground shadow-xl",
|
|
25564
25564
|
// Mobile: absolute bottom sheet overlay sized via dvh so it
|
|
@@ -25889,7 +25889,7 @@ function PresentationAnnotationOverlay({
|
|
|
25889
25889
|
);
|
|
25890
25890
|
}
|
|
25891
25891
|
function PresentationToolbar(p) {
|
|
25892
|
-
const { t } =
|
|
25892
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
25893
25893
|
const ref = useWebControl(
|
|
25894
25894
|
{
|
|
25895
25895
|
current: p.currentSlideIndex,
|
|
@@ -25948,8 +25948,8 @@ function PresentationTouchControls({
|
|
|
25948
25948
|
onEndPresentation,
|
|
25949
25949
|
hideNavigation = false
|
|
25950
25950
|
}) {
|
|
25951
|
-
const { t } =
|
|
25952
|
-
const { isTouchDevice } =
|
|
25951
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
25952
|
+
const { isTouchDevice } = chunkV3XADJ2O_js.useIsMobile();
|
|
25953
25953
|
if (!isTouchDevice) {
|
|
25954
25954
|
return null;
|
|
25955
25955
|
}
|
|
@@ -26031,7 +26031,7 @@ function KeepAnnotationsDialog({
|
|
|
26031
26031
|
onKeep,
|
|
26032
26032
|
onDiscard
|
|
26033
26033
|
}) {
|
|
26034
|
-
const { t } =
|
|
26034
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
26035
26035
|
if (!isOpen) {
|
|
26036
26036
|
return null;
|
|
26037
26037
|
}
|
|
@@ -26079,7 +26079,7 @@ function PasteSpecialDialog({
|
|
|
26079
26079
|
onCancel,
|
|
26080
26080
|
onConfirm
|
|
26081
26081
|
}) {
|
|
26082
|
-
const { t } =
|
|
26082
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
26083
26083
|
const [selected, setSelected] = React108.useState("keep-source-formatting");
|
|
26084
26084
|
if (!isOpen) {
|
|
26085
26085
|
return null;
|
|
@@ -26137,7 +26137,7 @@ function PasteOptionsToolbar({
|
|
|
26137
26137
|
onChoose,
|
|
26138
26138
|
onDismiss
|
|
26139
26139
|
}) {
|
|
26140
|
-
const { t } =
|
|
26140
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
26141
26141
|
const [rect, setRect] = React108.useState(null);
|
|
26142
26142
|
React108.useEffect(() => {
|
|
26143
26143
|
const node = elementId2 ? pptx.findCanvasElementNode(document, elementId2, { canvasOnly: true }) : null;
|
|
@@ -26164,7 +26164,7 @@ function NotesPagePreview({
|
|
|
26164
26164
|
frameSlides,
|
|
26165
26165
|
maxPages = 3
|
|
26166
26166
|
}) {
|
|
26167
|
-
const { t } =
|
|
26167
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
26168
26168
|
const pages = React108.useMemo(() => pptx.computeAllNotesPages(slideIndices), [slideIndices]);
|
|
26169
26169
|
const printable = React108.useMemo(() => pptx.getNotesPrintableArea(), []);
|
|
26170
26170
|
const visiblePages = pages.slice(0, maxPages);
|
|
@@ -26252,15 +26252,15 @@ function PrintPreview({
|
|
|
26252
26252
|
frameSlides,
|
|
26253
26253
|
maxPages = 3
|
|
26254
26254
|
}) {
|
|
26255
|
-
const { t } =
|
|
26255
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
26256
26256
|
const pages = React108.useMemo(
|
|
26257
|
-
() =>
|
|
26257
|
+
() => chunkZ22RD3E2_js.computeHandoutLayout(slideIndices, slidesPerPage, orientation),
|
|
26258
26258
|
[slideIndices, slidesPerPage, orientation]
|
|
26259
26259
|
);
|
|
26260
|
-
const printable = React108.useMemo(() =>
|
|
26260
|
+
const printable = React108.useMemo(() => chunkZ22RD3E2_js.getPrintableArea(orientation), [orientation]);
|
|
26261
26261
|
const visiblePages = pages.slice(0, maxPages);
|
|
26262
26262
|
const isThreePerPage = slidesPerPage === 3;
|
|
26263
|
-
const noteLineCount =
|
|
26263
|
+
const noteLineCount = chunkZ22RD3E2_js.generateNoteLineCount();
|
|
26264
26264
|
const scaledW = printable.width * PREVIEW_SCALE3;
|
|
26265
26265
|
const scaledH = printable.height * PREVIEW_SCALE3;
|
|
26266
26266
|
const noteAreaFraction = 0.5;
|
|
@@ -26358,7 +26358,7 @@ function PrintSettingsPanel({
|
|
|
26358
26358
|
totalSlides,
|
|
26359
26359
|
activeSlideIndex
|
|
26360
26360
|
}) {
|
|
26361
|
-
const { t } =
|
|
26361
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
26362
26362
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-5 min-w-0", children: [
|
|
26363
26363
|
/* @__PURE__ */ jsxRuntime.jsxs("fieldset", { children: [
|
|
26364
26364
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-xs font-medium text-muted-foreground mb-2 uppercase tracking-wide", children: t("pptx.print.printWhat") }),
|
|
@@ -26594,13 +26594,13 @@ function PrintDialog({
|
|
|
26594
26594
|
defaultSlidesPerPage,
|
|
26595
26595
|
defaultFrameSlides
|
|
26596
26596
|
}) {
|
|
26597
|
-
const { t } =
|
|
26597
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
26598
26598
|
const regionRenderer = useRegionRenderer("dialog.print");
|
|
26599
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
26600
|
-
const { viewportWidth } =
|
|
26599
|
+
const { panelStyle, handlers: dragHandlers } = chunkV3XADJ2O_js.useModalDismissDrag(onClose);
|
|
26600
|
+
const { viewportWidth } = chunkV3XADJ2O_js.useIsMobile();
|
|
26601
26601
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
26602
26602
|
const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
26603
|
-
const printOptionDefaults = pptx.resolveDefaultPrintSettings(
|
|
26603
|
+
const printOptionDefaults = pptx.resolveDefaultPrintSettings(chunkV3XADJ2O_js.useViewerOptionsContext());
|
|
26604
26604
|
const [printWhat, setPrintWhat] = React108.useState(printOptionDefaults?.printWhat ?? "slides");
|
|
26605
26605
|
const [orientation, setOrientation] = React108.useState("landscape");
|
|
26606
26606
|
const [colorMode, setColorMode] = React108.useState(
|
|
@@ -26811,7 +26811,7 @@ function ShowOptionsFieldset({
|
|
|
26811
26811
|
draft,
|
|
26812
26812
|
update
|
|
26813
26813
|
}) {
|
|
26814
|
-
const { t } =
|
|
26814
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
26815
26815
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-1.5", children: [
|
|
26816
26816
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wide mb-1", children: t("pptx.slideShow.showOptions") }),
|
|
26817
26817
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
@@ -26869,7 +26869,7 @@ function ShowSlidesFieldset({
|
|
|
26869
26869
|
slideCount,
|
|
26870
26870
|
customShows
|
|
26871
26871
|
}) {
|
|
26872
|
-
const { t } =
|
|
26872
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
26873
26873
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "space-y-1.5", children: [
|
|
26874
26874
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wide mb-1", children: t("pptx.slideShow.showSlides") }),
|
|
26875
26875
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
@@ -26979,7 +26979,7 @@ function SetUpSlideShowDialog({
|
|
|
26979
26979
|
customShows,
|
|
26980
26980
|
slideCount
|
|
26981
26981
|
}) {
|
|
26982
|
-
const { t } =
|
|
26982
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
26983
26983
|
const [draft, setDraft] = React108.useState({
|
|
26984
26984
|
...properties
|
|
26985
26985
|
});
|
|
@@ -27115,16 +27115,16 @@ function BroadcastDialog({
|
|
|
27115
27115
|
defaultUserName,
|
|
27116
27116
|
defaultServerUrl
|
|
27117
27117
|
}) {
|
|
27118
|
-
const { t } =
|
|
27118
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
27119
27119
|
const regionRenderer = useRegionRenderer("dialog.broadcast");
|
|
27120
|
-
const collab =
|
|
27120
|
+
const collab = chunkV3XADJ2O_js.useCollaboration();
|
|
27121
27121
|
const isBroadcasting = collab !== null && collab.status !== "disconnected" && collab.status !== "error" && collab.config.role === "owner";
|
|
27122
27122
|
const [roomId, setRoomId] = React108.useState("");
|
|
27123
27123
|
const [userName, setUserName] = React108.useState("");
|
|
27124
27124
|
const [serverUrl, setServerUrl] = React108.useState("");
|
|
27125
27125
|
const [copied, setCopied] = React108.useState(false);
|
|
27126
27126
|
const dialogRef = React108.useRef(null);
|
|
27127
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27127
|
+
const { panelStyle, handlers: dragHandlers } = chunkV3XADJ2O_js.useModalDismissDrag(onClose);
|
|
27128
27128
|
useModalFocus(open, dialogRef, onClose);
|
|
27129
27129
|
React108.useEffect(() => {
|
|
27130
27130
|
if (open && !isBroadcasting) {
|
|
@@ -27283,7 +27283,7 @@ function StartBroadcastForm({
|
|
|
27283
27283
|
onUserNameChange,
|
|
27284
27284
|
onServerUrlChange
|
|
27285
27285
|
}) {
|
|
27286
|
-
const { t } =
|
|
27286
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
27287
27287
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
27288
27288
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] text-muted-foreground leading-relaxed", children: t("pptx.broadcast.description") }),
|
|
27289
27289
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
@@ -27359,7 +27359,7 @@ function ActiveBroadcastView({
|
|
|
27359
27359
|
onCopyUrl,
|
|
27360
27360
|
onStopBroadcast
|
|
27361
27361
|
}) {
|
|
27362
|
-
const { t } =
|
|
27362
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
27363
27363
|
const statusColor = collab.status === "connected" ? "text-green-400" : collab.status === "connecting" ? "text-yellow-400" : "text-red-400";
|
|
27364
27364
|
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" });
|
|
27365
27365
|
const viewerCount = collab.remoteUsers.filter((u) => u.role === "viewer").length;
|
|
@@ -27440,7 +27440,7 @@ function ActiveSessionView({
|
|
|
27440
27440
|
onCopyRoomId,
|
|
27441
27441
|
onStopCollaboration
|
|
27442
27442
|
}) {
|
|
27443
|
-
const { t } =
|
|
27443
|
+
const { t } = chunkZ22RD3E2_js.useTranslation(), viewerOptions = chunkV3XADJ2O_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({
|
|
27444
27444
|
localUserName: activeCollaboration?.userName ?? collab.config.userName,
|
|
27445
27445
|
localUserInitials: viewerOptions.general.userInitials,
|
|
27446
27446
|
localUserColor: collab.config.userColor,
|
|
@@ -27538,8 +27538,8 @@ function StartSessionForm({
|
|
|
27538
27538
|
connectionFailed,
|
|
27539
27539
|
onRetry
|
|
27540
27540
|
}) {
|
|
27541
|
-
const { t } =
|
|
27542
|
-
const { viewportWidth } =
|
|
27541
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
27542
|
+
const { viewportWidth } = chunkV3XADJ2O_js.useIsMobile();
|
|
27543
27543
|
const tabBtnStyle = { minHeight: pptx.getDensePanelTouchTargetPx(viewportWidth) };
|
|
27544
27544
|
const inputReadOnlyClass = preconfigured ? " opacity-70 cursor-not-allowed" : "";
|
|
27545
27545
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -27673,9 +27673,9 @@ function ShareDialog({
|
|
|
27673
27673
|
defaultUserName,
|
|
27674
27674
|
defaultServerUrl
|
|
27675
27675
|
}) {
|
|
27676
|
-
const collab =
|
|
27676
|
+
const collab = chunkV3XADJ2O_js.useCollaboration();
|
|
27677
27677
|
const isActive = collab !== null && collab.status !== "disconnected" && collab.status !== "error";
|
|
27678
|
-
const { t } =
|
|
27678
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
27679
27679
|
const regionRenderer = useRegionRenderer("dialog.share");
|
|
27680
27680
|
const [roomId, setRoomId] = React108.useState(defaultRoomId ?? "");
|
|
27681
27681
|
const [userName, setUserName] = React108.useState(defaultUserName ?? "");
|
|
@@ -27684,9 +27684,9 @@ function ShareDialog({
|
|
|
27684
27684
|
const [invitation, setInvitation] = React108.useState("");
|
|
27685
27685
|
const [copied, setCopied] = React108.useState(false);
|
|
27686
27686
|
const dialogRef = React108.useRef(null);
|
|
27687
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27687
|
+
const { panelStyle, handlers: dragHandlers } = chunkV3XADJ2O_js.useModalDismissDrag(onClose);
|
|
27688
27688
|
useModalFocus(open, dialogRef, onClose);
|
|
27689
|
-
const { viewportWidth, viewportHeight } =
|
|
27689
|
+
const { viewportWidth, viewportHeight } = chunkV3XADJ2O_js.useIsMobile();
|
|
27690
27690
|
const touchTargetPx = pptx.getDensePanelTouchTargetPx(viewportWidth);
|
|
27691
27691
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
27692
27692
|
const stickyFooterClass = pptx.shouldStickyActionRow(viewportWidth, viewportHeight) ? "sticky bottom-0 bg-popover" : "";
|
|
@@ -27859,7 +27859,7 @@ function HyperlinkTabContent({
|
|
|
27859
27859
|
inputCls,
|
|
27860
27860
|
onEnterConfirm
|
|
27861
27861
|
}) {
|
|
27862
|
-
const { t } =
|
|
27862
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
27863
27863
|
const handleEnterKey = (e) => {
|
|
27864
27864
|
if (e.key === "Enter") {
|
|
27865
27865
|
onEnterConfirm();
|
|
@@ -27984,13 +27984,13 @@ function HyperlinkEditDialog({
|
|
|
27984
27984
|
onConfirm,
|
|
27985
27985
|
onCancel
|
|
27986
27986
|
}) {
|
|
27987
|
-
const { t } =
|
|
27988
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
27987
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
27988
|
+
const { panelStyle, handlers: dragHandlers } = chunkV3XADJ2O_js.useModalDismissDrag(onCancel);
|
|
27989
27989
|
const inputRef = React108.useRef(null);
|
|
27990
|
-
const detectedType =
|
|
27991
|
-
const emailParts =
|
|
27992
|
-
const detectedSlide =
|
|
27993
|
-
const detectedVerb = initialAction ?
|
|
27990
|
+
const detectedType = chunkV3XADJ2O_js.detectTargetType(initialUrl, initialAction);
|
|
27991
|
+
const emailParts = chunkV3XADJ2O_js.parseEmailUrl(initialUrl || "");
|
|
27992
|
+
const detectedSlide = chunkV3XADJ2O_js.parseSlideFromUrl(initialUrl, initialAction);
|
|
27993
|
+
const detectedVerb = initialAction ? chunkV3XADJ2O_js.ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
27994
27994
|
const [targetType, setTargetType] = React108.useState(detectedType);
|
|
27995
27995
|
const [url, setUrl] = React108.useState(
|
|
27996
27996
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -28021,7 +28021,7 @@ function HyperlinkEditDialog({
|
|
|
28021
28021
|
actionVerb
|
|
28022
28022
|
});
|
|
28023
28023
|
};
|
|
28024
|
-
const tabCls = (active) =>
|
|
28024
|
+
const tabCls = (active) => chunkZ22RD3E2_js.cn(
|
|
28025
28025
|
"px-3 py-1.5 text-xs rounded-t border-b-2 transition-colors",
|
|
28026
28026
|
active ? "border-primary text-primary font-medium" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"
|
|
28027
28027
|
);
|
|
@@ -28267,7 +28267,7 @@ function ViewerBottomPanels({
|
|
|
28267
28267
|
notesStyle,
|
|
28268
28268
|
onNotesHeightChange
|
|
28269
28269
|
}) {
|
|
28270
|
-
const { isHidden } =
|
|
28270
|
+
const { isHidden } = chunkV3XADJ2O_js.useToolbarVisibility(hiddenActions);
|
|
28271
28271
|
const customization = useViewerCustomizationContext();
|
|
28272
28272
|
const showNotes = pptx.isPanelVisible(customization, "notes");
|
|
28273
28273
|
const notesRenderer = useRegionRenderer("notes");
|
|
@@ -28394,7 +28394,7 @@ function ViewerInspector({
|
|
|
28394
28394
|
onDeleteTableStyle,
|
|
28395
28395
|
panelWidth
|
|
28396
28396
|
}) {
|
|
28397
|
-
const { t } =
|
|
28397
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
28398
28398
|
const regionRenderer = useRegionRenderer("inspector");
|
|
28399
28399
|
if (!isOpen) {
|
|
28400
28400
|
return null;
|
|
@@ -28604,7 +28604,7 @@ function ViewerToolbarSection(props) {
|
|
|
28604
28604
|
onSetSnapToShape,
|
|
28605
28605
|
onSetShowGuides
|
|
28606
28606
|
} = props;
|
|
28607
|
-
const { t } =
|
|
28607
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
28608
28608
|
const customization = useViewerCustomizationContext();
|
|
28609
28609
|
const handleAddAnimation = React108.useCallback(
|
|
28610
28610
|
(preset, group) => {
|
|
@@ -28657,7 +28657,7 @@ function ViewerToolbarSection(props) {
|
|
|
28657
28657
|
[activeSlide, propertyHandlers]
|
|
28658
28658
|
);
|
|
28659
28659
|
const scopedLayoutOptions = React108__default.default.useMemo(
|
|
28660
|
-
() =>
|
|
28660
|
+
() => chunkV3XADJ2O_js.scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
28661
28661
|
[s.layoutOptions, activeSlide]
|
|
28662
28662
|
);
|
|
28663
28663
|
const handleResetSlide = React108.useCallback(() => {
|
|
@@ -29064,14 +29064,14 @@ function ViewerToolbarSection(props) {
|
|
|
29064
29064
|
isMobileInsertOpen: s.isMobileInsertOpen,
|
|
29065
29065
|
onCloseMobileInsert: () => s.setIsMobileInsertOpen(false),
|
|
29066
29066
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
29067
|
-
reviewComments:
|
|
29067
|
+
reviewComments: chunkV3XADJ2O_js.createReviewCommentsHost({
|
|
29068
29068
|
state: s,
|
|
29069
29069
|
activeSlideIndex,
|
|
29070
29070
|
updateSlides: ops.updateSlides,
|
|
29071
29071
|
markDirty: history.markDirty
|
|
29072
29072
|
}),
|
|
29073
29073
|
formatPainterActive: s.formatPainterActive,
|
|
29074
|
-
canActivateFormatPainter:
|
|
29074
|
+
canActivateFormatPainter: chunkZ22RD3E2_js.hasCopyableFormat(selectedElement),
|
|
29075
29075
|
onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p) => !p)),
|
|
29076
29076
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
29077
29077
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -29157,8 +29157,8 @@ function EquationEditorDialog({
|
|
|
29157
29157
|
onInsert,
|
|
29158
29158
|
existingOmml
|
|
29159
29159
|
}) {
|
|
29160
|
-
const { t } =
|
|
29161
|
-
const { panelStyle, handlers: dragHandlers } =
|
|
29160
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
29161
|
+
const { panelStyle, handlers: dragHandlers } = chunkV3XADJ2O_js.useModalDismissDrag(onClose);
|
|
29162
29162
|
const initialLatex = React108.useMemo(() => {
|
|
29163
29163
|
if (!existingOmml) {
|
|
29164
29164
|
return "";
|
|
@@ -29280,7 +29280,7 @@ function EquationEditorDialog({
|
|
|
29280
29280
|
{
|
|
29281
29281
|
type: "button",
|
|
29282
29282
|
onClick: () => handleTemplateClick(tmpl.latex),
|
|
29283
|
-
className:
|
|
29283
|
+
className: chunkZ22RD3E2_js.cn(
|
|
29284
29284
|
"flex flex-col items-center gap-1 p-2 rounded-lg border transition-colors",
|
|
29285
29285
|
latex === tmpl.latex ? "border-primary bg-primary/10" : "border-border bg-muted/40 hover:bg-accent/60 hover:border-border"
|
|
29286
29286
|
),
|
|
@@ -29345,7 +29345,7 @@ function InsertSmartArtDialog({
|
|
|
29345
29345
|
onInsert
|
|
29346
29346
|
}) {
|
|
29347
29347
|
const ref = React108.useRef(null);
|
|
29348
|
-
const { t } =
|
|
29348
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
29349
29349
|
React108.useLayoutEffect(() => {
|
|
29350
29350
|
if (ref.current) {
|
|
29351
29351
|
ref.current.translateLabel = t;
|
|
@@ -29369,7 +29369,7 @@ function InsertChartDialog({
|
|
|
29369
29369
|
onInsert
|
|
29370
29370
|
}) {
|
|
29371
29371
|
const ref = React108.useRef(null);
|
|
29372
|
-
const { t } =
|
|
29372
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
29373
29373
|
React108.useLayoutEffect(() => {
|
|
29374
29374
|
if (ref.current) {
|
|
29375
29375
|
ref.current.translateLabel = t;
|
|
@@ -29857,11 +29857,11 @@ function PresentationStage({
|
|
|
29857
29857
|
})
|
|
29858
29858
|
},
|
|
29859
29859
|
children: [
|
|
29860
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29860
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkV3XADJ2O_js.SlideBackgroundImageLayer, { slide: activeSlide }),
|
|
29861
29861
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: pptx.PRESENTATION_HIT_TEST_CSS }),
|
|
29862
29862
|
presentationKeyframesCss && /* @__PURE__ */ jsxRuntime.jsx("style", { children: presentationKeyframesCss }),
|
|
29863
29863
|
templateElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
29864
|
-
|
|
29864
|
+
chunkV3XADJ2O_js.ElementRenderer,
|
|
29865
29865
|
{
|
|
29866
29866
|
element,
|
|
29867
29867
|
activeSlide,
|
|
@@ -29898,7 +29898,7 @@ function PresentationStage({
|
|
|
29898
29898
|
`tpl-${element.id}`
|
|
29899
29899
|
)),
|
|
29900
29900
|
activeSlide?.elements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
29901
|
-
|
|
29901
|
+
chunkV3XADJ2O_js.ElementRenderer,
|
|
29902
29902
|
{
|
|
29903
29903
|
element,
|
|
29904
29904
|
activeSlide,
|
|
@@ -29950,7 +29950,7 @@ function PresentationStage({
|
|
|
29950
29950
|
function noop() {
|
|
29951
29951
|
}
|
|
29952
29952
|
function PresentationContextMenu(p) {
|
|
29953
|
-
const { t } =
|
|
29953
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
29954
29954
|
const sections = pptx.getPresentationContextMenuSections({
|
|
29955
29955
|
seeAllSlides: Boolean(p.onSeeAllSlides),
|
|
29956
29956
|
presenterView: Boolean(p.onShowPresenterView),
|
|
@@ -30019,9 +30019,9 @@ function ViewerCanvasArea(props) {
|
|
|
30019
30019
|
aiHighlightOverlay,
|
|
30020
30020
|
aiCanvasActive = false
|
|
30021
30021
|
} = props;
|
|
30022
|
-
const { t } =
|
|
30023
|
-
const { isHidden } =
|
|
30024
|
-
const viewerOptions =
|
|
30022
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
30023
|
+
const { isHidden } = chunkV3XADJ2O_js.useToolbarVisibility(hiddenActions);
|
|
30024
|
+
const viewerOptions = chunkV3XADJ2O_js.useViewerOptionsContext();
|
|
30025
30025
|
const outlineAuthoring = useOutlineAuthoring({
|
|
30026
30026
|
state: s,
|
|
30027
30027
|
updateElement: canvasHandlers.handleUpdateSmartArtElement,
|
|
@@ -30051,7 +30051,7 @@ function ViewerCanvasArea(props) {
|
|
|
30051
30051
|
${url}`)) {
|
|
30052
30052
|
return;
|
|
30053
30053
|
}
|
|
30054
|
-
|
|
30054
|
+
chunkZ22RD3E2_js.safeOpenUrl(url);
|
|
30055
30055
|
},
|
|
30056
30056
|
[viewerOptions, t]
|
|
30057
30057
|
);
|
|
@@ -30072,9 +30072,9 @@ ${url}`)) {
|
|
|
30072
30072
|
);
|
|
30073
30073
|
const handleHyperlinkClick = React108.useCallback(
|
|
30074
30074
|
(url) => {
|
|
30075
|
-
if (
|
|
30075
|
+
if (chunkZ22RD3E2_js.isPpactionUrl(url)) {
|
|
30076
30076
|
if (mode === "present") {
|
|
30077
|
-
const parsed =
|
|
30077
|
+
const parsed = chunkZ22RD3E2_js.parsePpactionUrl(url);
|
|
30078
30078
|
if (parsed) {
|
|
30079
30079
|
const action = {
|
|
30080
30080
|
action: parsed.action,
|
|
@@ -30159,7 +30159,7 @@ ${url}`)) {
|
|
|
30159
30159
|
s.setActiveSlideIndex((i) => Math.max(0, i - 1));
|
|
30160
30160
|
}
|
|
30161
30161
|
}, [mode, presentation, s]);
|
|
30162
|
-
const swipe =
|
|
30162
|
+
const swipe = chunkV3XADJ2O_js.useSwipeNavigation({
|
|
30163
30163
|
enabled: swipeEnabled,
|
|
30164
30164
|
onNext: handleSwipeNext,
|
|
30165
30165
|
onPrev: handleSwipePrev
|
|
@@ -30239,7 +30239,7 @@ ${url}`)) {
|
|
|
30239
30239
|
),
|
|
30240
30240
|
children: (stageScale) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30241
30241
|
presentation.transitionOverlay && slides[presentation.transitionOverlay.outgoingSlideIndex] && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30242
|
-
|
|
30242
|
+
chunkV3XADJ2O_js.PresentationTransitionOverlay,
|
|
30243
30243
|
{
|
|
30244
30244
|
outgoingSlide: slides[presentation.transitionOverlay.outgoingSlideIndex],
|
|
30245
30245
|
templateElements: [
|
|
@@ -30356,14 +30356,14 @@ ${url}`)) {
|
|
|
30356
30356
|
outlineAuthoring,
|
|
30357
30357
|
collaborationOverlay: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30358
30358
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30359
|
-
|
|
30359
|
+
chunkV3XADJ2O_js.RemoteSelectionOverlay,
|
|
30360
30360
|
{
|
|
30361
30361
|
elements: effectiveSlide?.elements ?? [],
|
|
30362
30362
|
activeSlideIndex
|
|
30363
30363
|
}
|
|
30364
30364
|
),
|
|
30365
30365
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30366
|
-
|
|
30366
|
+
chunkV3XADJ2O_js.CollaborationCursorOverlay,
|
|
30367
30367
|
{
|
|
30368
30368
|
activeSlideIndex,
|
|
30369
30369
|
canvasWidth: canvasSize.width,
|
|
@@ -30503,7 +30503,7 @@ function useTableStyleMapHandlers(input) {
|
|
|
30503
30503
|
var AiChatPanel = /* @__PURE__ */ React108.lazy(async () => {
|
|
30504
30504
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
30505
30505
|
import('@ai-sdk/react'),
|
|
30506
|
-
import('./AiChatPanel-
|
|
30506
|
+
import('./AiChatPanel-EV22O7UO.js')
|
|
30507
30507
|
]);
|
|
30508
30508
|
function BoundAiChatPanel(props) {
|
|
30509
30509
|
return /* @__PURE__ */ jsxRuntime.jsx(Panel, { ...props, useChat });
|
|
@@ -30626,8 +30626,8 @@ function AiChangeOverlay({ batch, activeSlideIndex }) {
|
|
|
30626
30626
|
] });
|
|
30627
30627
|
}
|
|
30628
30628
|
function ChartFormatPanel() {
|
|
30629
|
-
const { t } =
|
|
30630
|
-
const commands =
|
|
30629
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
30630
|
+
const commands = chunkV3XADJ2O_js.useChartFormatContext();
|
|
30631
30631
|
const ref = React108.useRef(null);
|
|
30632
30632
|
const chart = commands?.chart;
|
|
30633
30633
|
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
@@ -30662,7 +30662,7 @@ function ChartFormatPanel() {
|
|
|
30662
30662
|
return /* @__PURE__ */ jsxRuntime.jsx("pptx-ui-chart-format-pane", { ref, "data-testid": "chart-format-pane" });
|
|
30663
30663
|
}
|
|
30664
30664
|
function ThemeEditorPanel({ theme, canEdit, onApply, onClose }) {
|
|
30665
|
-
const { t } =
|
|
30665
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
30666
30666
|
const ref = React108.useRef(null);
|
|
30667
30667
|
React108.useEffect(() => {
|
|
30668
30668
|
const node = ref.current;
|
|
@@ -30699,8 +30699,8 @@ function MobileDismissSheet({
|
|
|
30699
30699
|
className,
|
|
30700
30700
|
children
|
|
30701
30701
|
}) {
|
|
30702
|
-
const { t } =
|
|
30703
|
-
const { dragY, handlers } =
|
|
30702
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
30703
|
+
const { dragY, handlers } = chunkV3XADJ2O_js.useSheetDismissDrag(onClose);
|
|
30704
30704
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30705
30705
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30706
30706
|
"button",
|
|
@@ -30969,7 +30969,7 @@ function ThemeThumbnail({
|
|
|
30969
30969
|
{
|
|
30970
30970
|
type: "button",
|
|
30971
30971
|
onClick,
|
|
30972
|
-
className:
|
|
30972
|
+
className: chunkZ22RD3E2_js.cn(
|
|
30973
30973
|
"group relative flex flex-col rounded-lg border-2 transition-all overflow-hidden",
|
|
30974
30974
|
selected ? "border-primary shadow-lg scale-[1.02]" : "border-border hover:border-primary/50 hover:shadow-md"
|
|
30975
30975
|
),
|
|
@@ -31000,7 +31000,7 @@ function ThemeGallery({
|
|
|
31000
31000
|
onApplyTheme,
|
|
31001
31001
|
onImportTheme
|
|
31002
31002
|
}) {
|
|
31003
|
-
const { t } =
|
|
31003
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
31004
31004
|
const [selectedTheme, setSelectedTheme] = React108.useState(currentTheme ?? null);
|
|
31005
31005
|
const fileInputRef = React108.useRef(null);
|
|
31006
31006
|
React108.useEffect(() => {
|
|
@@ -31440,7 +31440,7 @@ function ViewerMainContent(props) {
|
|
|
31440
31440
|
);
|
|
31441
31441
|
const layoutGalleryAnchorRef = React108.useRef(null);
|
|
31442
31442
|
const layoutGalleryPreviews = useLayoutPreviews(loadLayoutPreviews, layoutGalleryAnchor !== null);
|
|
31443
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31443
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkV3XADJ2O_js.ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-chrome": "body", className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
31444
31444
|
showSlidesPane && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31445
31445
|
slidesPaneRenderer ? (
|
|
31446
31446
|
// The rail's slot (width, collapse, resize handle) stays the viewer's.
|
|
@@ -31650,7 +31650,7 @@ function AutosaveRecoveryDialog({
|
|
|
31650
31650
|
onDiscard,
|
|
31651
31651
|
busy = false
|
|
31652
31652
|
}) {
|
|
31653
|
-
const { t } =
|
|
31653
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
31654
31654
|
if (!prompt) {
|
|
31655
31655
|
return null;
|
|
31656
31656
|
}
|
|
@@ -31706,7 +31706,7 @@ function CompatibilityToasts({
|
|
|
31706
31706
|
rightInset = 0,
|
|
31707
31707
|
bottomInset = 0
|
|
31708
31708
|
}) {
|
|
31709
|
-
const { t } =
|
|
31709
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
31710
31710
|
const ref = useWebControl(
|
|
31711
31711
|
{ toasts, rightInset, bottomInset, translate: t },
|
|
31712
31712
|
{
|
|
@@ -31751,7 +31751,7 @@ function HeaderFooterPanel({
|
|
|
31751
31751
|
onApplyToCurrent,
|
|
31752
31752
|
onClose
|
|
31753
31753
|
}) {
|
|
31754
|
-
const { t } =
|
|
31754
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
31755
31755
|
const showDateTime = headerFooter.hasDateTime ?? false;
|
|
31756
31756
|
const dateTimeAuto = headerFooter.dateTimeAuto ?? false;
|
|
31757
31757
|
const showDateText = pptx.isHeaderFooterDateTextVisible(headerFooter);
|
|
@@ -31892,7 +31892,7 @@ function HeaderFooterPanel({
|
|
|
31892
31892
|
] }) });
|
|
31893
31893
|
}
|
|
31894
31894
|
function MobileBottomBar(p) {
|
|
31895
|
-
const { t } =
|
|
31895
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
31896
31896
|
const handlers = {
|
|
31897
31897
|
slides: p.onOpenSlides,
|
|
31898
31898
|
insert: p.onOpenInsert,
|
|
@@ -31918,7 +31918,7 @@ function MobileSlidesSheet({
|
|
|
31918
31918
|
onClose,
|
|
31919
31919
|
...sidebar
|
|
31920
31920
|
}) {
|
|
31921
|
-
const { t } =
|
|
31921
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
31922
31922
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31923
31923
|
MobileSheet,
|
|
31924
31924
|
{
|
|
@@ -31945,7 +31945,7 @@ function MobileChromeOverlay(props) {
|
|
|
31945
31945
|
slideSectionGroups,
|
|
31946
31946
|
canEdit,
|
|
31947
31947
|
commentCount
|
|
31948
|
-
} = props, { keyboardInset, isKeyboardOpen } =
|
|
31948
|
+
} = props, { keyboardInset, isKeyboardOpen } = chunkV3XADJ2O_js.useKeyboardInsets(), activeSheet = s.isMobileInsertOpen ? "insert" : s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null, closeAllSheets = () => {
|
|
31949
31949
|
s.setIsSlidesPaneOpen(false);
|
|
31950
31950
|
s.setIsMobileInsertOpen(false);
|
|
31951
31951
|
s.setIsInspectorPaneOpen(false);
|
|
@@ -32045,7 +32045,7 @@ function MobileChromeOverlay(props) {
|
|
|
32045
32045
|
] });
|
|
32046
32046
|
}
|
|
32047
32047
|
function ReadOnlyBanner(p) {
|
|
32048
|
-
const { t } =
|
|
32048
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32049
32049
|
const ref = useWebControl(
|
|
32050
32050
|
pptx.readOnlyBannerState(
|
|
32051
32051
|
p.recommendation,
|
|
@@ -32079,7 +32079,7 @@ function RibbonCustomizationStyle({
|
|
|
32079
32079
|
return /* @__PURE__ */ jsxRuntime.jsx("style", { "data-pptx-ribbon-customization": "", children: css });
|
|
32080
32080
|
}
|
|
32081
32081
|
function RunProgramNotices({ notices, onDismiss }) {
|
|
32082
|
-
const { t } =
|
|
32082
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32083
32083
|
if (notices.length === 0) {
|
|
32084
32084
|
return null;
|
|
32085
32085
|
}
|
|
@@ -32137,14 +32137,14 @@ function AddinTable({
|
|
|
32137
32137
|
selectedId,
|
|
32138
32138
|
onSelect
|
|
32139
32139
|
}) {
|
|
32140
|
-
const { t } =
|
|
32140
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32141
32141
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
32142
32142
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "mb-1 text-xs font-semibold text-foreground", children: title }),
|
|
32143
32143
|
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(
|
|
32144
32144
|
"tr",
|
|
32145
32145
|
{
|
|
32146
32146
|
onClick: () => onSelect(row.id),
|
|
32147
|
-
className:
|
|
32147
|
+
className: chunkZ22RD3E2_js.cn(
|
|
32148
32148
|
"cursor-pointer border-b border-border/40 transition-colors",
|
|
32149
32149
|
selectedId === row.id ? "bg-primary/10" : "hover:bg-accent"
|
|
32150
32150
|
),
|
|
@@ -32159,7 +32159,7 @@ function AddinTable({
|
|
|
32159
32159
|
] });
|
|
32160
32160
|
}
|
|
32161
32161
|
function OptionsAddInsPane({ addinStatus }) {
|
|
32162
|
-
const { t } =
|
|
32162
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32163
32163
|
const [selectedId, setSelectedId] = React108.useState(null);
|
|
32164
32164
|
const rows = pptx.resolveViewerAddinRows(addinStatus);
|
|
32165
32165
|
const active = rows.filter((row) => row.active);
|
|
@@ -32202,7 +32202,7 @@ function CommandList({
|
|
|
32202
32202
|
selectedId,
|
|
32203
32203
|
onSelect
|
|
32204
32204
|
}) {
|
|
32205
|
-
const { t } =
|
|
32205
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32206
32206
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
32207
32207
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 text-xs font-medium text-muted-foreground", children: title }),
|
|
32208
32208
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -32223,7 +32223,7 @@ function CommandList({
|
|
|
32223
32223
|
role: "option",
|
|
32224
32224
|
"aria-selected": selectedId === id,
|
|
32225
32225
|
onClick: () => onSelect(id),
|
|
32226
|
-
className:
|
|
32226
|
+
className: chunkZ22RD3E2_js.cn(
|
|
32227
32227
|
"flex w-full items-center rounded px-2 py-1.5 text-left text-sm transition-colors",
|
|
32228
32228
|
selectedId === id ? "bg-primary/15 text-primary" : "text-foreground hover:bg-accent"
|
|
32229
32229
|
),
|
|
@@ -32241,7 +32241,7 @@ function OptionsQuickAccessPane({
|
|
|
32241
32241
|
onQuickAccessCommandsChange,
|
|
32242
32242
|
onResetQuickAccess
|
|
32243
32243
|
}) {
|
|
32244
|
-
const { t } =
|
|
32244
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32245
32245
|
const [selectedAvailable, setSelectedAvailable] = React108.useState(null);
|
|
32246
32246
|
const [selectedCurrent, setSelectedCurrent] = React108.useState(null);
|
|
32247
32247
|
const current = options.quickAccess.commandIds;
|
|
@@ -32355,7 +32355,7 @@ function OptionsRibbonPane({
|
|
|
32355
32355
|
onRibbonTabHiddenChange,
|
|
32356
32356
|
onResetRibbon
|
|
32357
32357
|
}) {
|
|
32358
|
-
const { t } =
|
|
32358
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32359
32359
|
const hidden = new Set(options.ribbon.hiddenTabIds);
|
|
32360
32360
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
32361
32361
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
@@ -32367,7 +32367,7 @@ function OptionsRibbonPane({
|
|
|
32367
32367
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32368
32368
|
"label",
|
|
32369
32369
|
{
|
|
32370
|
-
className:
|
|
32370
|
+
className: chunkZ22RD3E2_js.cn(
|
|
32371
32371
|
"flex items-center gap-2 rounded px-2 py-1.5",
|
|
32372
32372
|
isFile ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-accent"
|
|
32373
32373
|
),
|
|
@@ -32401,7 +32401,7 @@ function OptionsRibbonPane({
|
|
|
32401
32401
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", children: pptx.SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
32402
32402
|
"div",
|
|
32403
32403
|
{
|
|
32404
|
-
className:
|
|
32404
|
+
className: chunkZ22RD3E2_js.cn(
|
|
32405
32405
|
"flex items-center justify-between gap-3 rounded px-3 py-2",
|
|
32406
32406
|
i % 2 === 0 ? "bg-muted/60" : ""
|
|
32407
32407
|
),
|
|
@@ -32422,12 +32422,12 @@ async function exportAiChatLogs(options) {
|
|
|
32422
32422
|
chats,
|
|
32423
32423
|
{ format: options?.format, detailed: options?.detailed, now: options?.now },
|
|
32424
32424
|
(filename, content, mime) => {
|
|
32425
|
-
|
|
32425
|
+
chunkV3XADJ2O_js.downloadBlob(new Blob([content], { type: mime }), filename);
|
|
32426
32426
|
}
|
|
32427
32427
|
);
|
|
32428
32428
|
}
|
|
32429
32429
|
function SettingsAiTab({ store }) {
|
|
32430
|
-
const { t } =
|
|
32430
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32431
32431
|
const activeStore = React108.useMemo(() => store ?? ai.createChatHistoryStore(), [store]);
|
|
32432
32432
|
const [chatCount, setChatCount] = React108.useState(null);
|
|
32433
32433
|
const [detailed, setDetailed] = React108.useState(true);
|
|
@@ -32519,7 +32519,7 @@ function SettingsAppearanceTab({
|
|
|
32519
32519
|
themes,
|
|
32520
32520
|
onSelectTheme
|
|
32521
32521
|
}) {
|
|
32522
|
-
const { t } =
|
|
32522
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32523
32523
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-3", children: themes.map((entry) => {
|
|
32524
32524
|
const isActive = entry.key === activeThemeKey;
|
|
32525
32525
|
const previewBackground = entry.theme?.colors?.background ?? "#0b0f19";
|
|
@@ -32530,7 +32530,7 @@ function SettingsAppearanceTab({
|
|
|
32530
32530
|
type: "button",
|
|
32531
32531
|
onClick: () => onSelectTheme(entry.key),
|
|
32532
32532
|
"aria-pressed": isActive,
|
|
32533
|
-
className:
|
|
32533
|
+
className: chunkZ22RD3E2_js.cn(
|
|
32534
32534
|
"flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",
|
|
32535
32535
|
isActive ? "border-primary bg-primary/10" : "border-border hover:border-primary/50 hover:bg-accent"
|
|
32536
32536
|
),
|
|
@@ -32547,7 +32547,7 @@ function SettingsAppearanceTab({
|
|
|
32547
32547
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32548
32548
|
"span",
|
|
32549
32549
|
{
|
|
32550
|
-
className:
|
|
32550
|
+
className: chunkZ22RD3E2_js.cn("text-xs font-medium", isActive ? "text-primary" : "text-foreground"),
|
|
32551
32551
|
children: t(entry.labelKey)
|
|
32552
32552
|
}
|
|
32553
32553
|
)
|
|
@@ -32562,7 +32562,7 @@ function SettingsCustomFontsSection({
|
|
|
32562
32562
|
families,
|
|
32563
32563
|
onRegistered
|
|
32564
32564
|
}) {
|
|
32565
|
-
const { t } =
|
|
32565
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32566
32566
|
const inputRef = React108.useRef(null);
|
|
32567
32567
|
const [error, setError] = React108.useState(false);
|
|
32568
32568
|
const handleFile = async (file) => {
|
|
@@ -32627,7 +32627,7 @@ function SettingsLanguageTab({
|
|
|
32627
32627
|
type: "button",
|
|
32628
32628
|
onClick: () => onSelectLocale(locale.code),
|
|
32629
32629
|
"aria-pressed": isActive,
|
|
32630
|
-
className:
|
|
32630
|
+
className: chunkZ22RD3E2_js.cn(
|
|
32631
32631
|
"flex w-full items-center justify-between rounded px-3 py-2.5 text-left transition-colors",
|
|
32632
32632
|
isActive ? "bg-primary/10 text-primary" : "text-foreground hover:bg-accent"
|
|
32633
32633
|
),
|
|
@@ -32659,14 +32659,25 @@ function OpenSettingsDialog({
|
|
|
32659
32659
|
onSelectTheme,
|
|
32660
32660
|
localeCode,
|
|
32661
32661
|
availableLocales,
|
|
32662
|
+
languageSelectable = true,
|
|
32662
32663
|
onSelectLocale,
|
|
32663
32664
|
aiEnabled,
|
|
32664
32665
|
chatStore,
|
|
32665
32666
|
customFontFamilies = NO_CUSTOM_FONT_FAMILIES,
|
|
32666
32667
|
onCustomFontRegistered
|
|
32667
32668
|
}) {
|
|
32668
|
-
const { t } =
|
|
32669
|
-
const
|
|
32669
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
32670
|
+
const viewerCustomization = useViewerCustomizationContext();
|
|
32671
|
+
const customization = React108.useMemo(
|
|
32672
|
+
() => languageSelectable ? viewerCustomization : {
|
|
32673
|
+
...viewerCustomization,
|
|
32674
|
+
hiddenOptionsPages: /* @__PURE__ */ new Set([
|
|
32675
|
+
...viewerCustomization.hiddenOptionsPages,
|
|
32676
|
+
"language"
|
|
32677
|
+
])
|
|
32678
|
+
},
|
|
32679
|
+
[viewerCustomization, languageSelectable]
|
|
32680
|
+
);
|
|
32670
32681
|
const regionBase = React108.useContext(ViewerRegionBaseContext);
|
|
32671
32682
|
const regionContext = React108.useMemo(
|
|
32672
32683
|
() => regionBase ? { ...regionBase, region: "dialog.options", close: onClose } : null,
|
|
@@ -32764,7 +32775,7 @@ function ViewerOptionsProvider({
|
|
|
32764
32775
|
store,
|
|
32765
32776
|
children
|
|
32766
32777
|
}) {
|
|
32767
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32778
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkV3XADJ2O_js.ViewerOptionsStoreContext.Provider, { value: store, children: /* @__PURE__ */ jsxRuntime.jsx(chunkV3XADJ2O_js.ViewerOptionsContext.Provider, { value: options, children }) });
|
|
32768
32779
|
}
|
|
32769
32780
|
function useAiBridge(input) {
|
|
32770
32781
|
const ref = React108.useRef(input);
|
|
@@ -32845,7 +32856,7 @@ function useAiPanelController(input) {
|
|
|
32845
32856
|
getSelectedElement: () => inputRef.current.selectedElement
|
|
32846
32857
|
})
|
|
32847
32858
|
);
|
|
32848
|
-
const state =
|
|
32859
|
+
const state = chunkV3XADJ2O_js.useController(controller);
|
|
32849
32860
|
React108.useEffect(() => () => controller.dispose(), [controller]);
|
|
32850
32861
|
const liveFocusTargets = React108.useMemo(
|
|
32851
32862
|
() => ai.computeFocusTargets({ activeSlideIndex, selectedElementIds, selectedElementId }),
|
|
@@ -33077,7 +33088,7 @@ function useMasterViewCrud(input) {
|
|
|
33077
33088
|
markDirty,
|
|
33078
33089
|
pushToast
|
|
33079
33090
|
} = input;
|
|
33080
|
-
const { t } =
|
|
33091
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
33081
33092
|
const data = React108.useMemo(
|
|
33082
33093
|
() => ({ slides, slideMasters }),
|
|
33083
33094
|
[slides, slideMasters]
|
|
@@ -33097,7 +33108,7 @@ function useMasterViewCrud(input) {
|
|
|
33097
33108
|
if (id === "renameLayout" || id === "renameMaster") {
|
|
33098
33109
|
const master = slideMasters[target.masterIndex];
|
|
33099
33110
|
const current = id === "renameLayout" ? master?.layouts?.[target.layoutIndex ?? -1]?.name ?? "" : master?.name ?? "";
|
|
33100
|
-
const next =
|
|
33111
|
+
const next = chunkV3XADJ2O_js.safePrompt(t("pptx.masterView.renamePrompt"), current)?.trim();
|
|
33101
33112
|
if (!next) {
|
|
33102
33113
|
return;
|
|
33103
33114
|
}
|
|
@@ -33451,10 +33462,106 @@ function useViewerCustomization(customization, legacyHiddenActions, optionsStore
|
|
|
33451
33462
|
);
|
|
33452
33463
|
return { resolved, api: controller.api, hiddenActions };
|
|
33453
33464
|
}
|
|
33465
|
+
var NO_LOCALES = [];
|
|
33466
|
+
var toCatalogEntry = (code) => i18n.LOCALE_CATALOG.find((entry) => entry.code === code) ?? { code, label: code, nativeLabel: code };
|
|
33467
|
+
function useHostLanguage({
|
|
33468
|
+
defaultLocale,
|
|
33469
|
+
availableLocales,
|
|
33470
|
+
onLocaleChange
|
|
33471
|
+
}) {
|
|
33472
|
+
const { t, i18n } = chunkZ22RD3E2_js.useHostI18next();
|
|
33473
|
+
const [localeCode, setLocaleCode] = React108.useState(
|
|
33474
|
+
() => defaultLocale ?? pptx.readStoredViewerPrefs().localeCode ?? "en"
|
|
33475
|
+
);
|
|
33476
|
+
React108.useEffect(() => {
|
|
33477
|
+
if (localeCode !== "en" && !onLocaleChange) {
|
|
33478
|
+
void i18n.changeLanguage(localeCode);
|
|
33479
|
+
}
|
|
33480
|
+
}, []);
|
|
33481
|
+
const locales = React108.useMemo(() => {
|
|
33482
|
+
if (availableLocales) {
|
|
33483
|
+
return availableLocales;
|
|
33484
|
+
}
|
|
33485
|
+
const registeredCodes = i18n.options.resources ? Object.keys(i18n.options.resources) : i18n.languages ?? ["en"];
|
|
33486
|
+
return registeredCodes.map(toCatalogEntry);
|
|
33487
|
+
}, [availableLocales, i18n]);
|
|
33488
|
+
const selectLocale = React108.useCallback(
|
|
33489
|
+
(code) => {
|
|
33490
|
+
setLocaleCode(code);
|
|
33491
|
+
if (onLocaleChange) {
|
|
33492
|
+
onLocaleChange(code);
|
|
33493
|
+
} else {
|
|
33494
|
+
void i18n.changeLanguage(code);
|
|
33495
|
+
pptx.writeStoredViewerPrefs({ localeCode: code });
|
|
33496
|
+
}
|
|
33497
|
+
},
|
|
33498
|
+
[onLocaleChange, i18n]
|
|
33499
|
+
);
|
|
33500
|
+
const language = i18n.resolvedLanguage ?? i18n.language ?? localeCode;
|
|
33501
|
+
const state = React108.useMemo(() => ({ t, locale: language }), [t, language]);
|
|
33502
|
+
const controls = React108.useMemo(
|
|
33503
|
+
() => ({ localeCode, locales, selectLocale, languageSelectable: true }),
|
|
33504
|
+
[localeCode, locales, selectLocale]
|
|
33505
|
+
);
|
|
33506
|
+
return { state, controls };
|
|
33507
|
+
}
|
|
33508
|
+
function useProvidedLanguage({
|
|
33509
|
+
availableLocales,
|
|
33510
|
+
onLocaleChange
|
|
33511
|
+
}) {
|
|
33512
|
+
const state = React108.useContext(chunkZ22RD3E2_js.PptxI18nContext);
|
|
33513
|
+
const { locale } = state;
|
|
33514
|
+
const locales = availableLocales ?? NO_LOCALES;
|
|
33515
|
+
const controls = React108.useMemo(
|
|
33516
|
+
() => ({
|
|
33517
|
+
// `fr-CA` selects an offered `fr`: the host's locale need not be one of the codes.
|
|
33518
|
+
localeCode: i18n$1.normalizeLocale(
|
|
33519
|
+
locale,
|
|
33520
|
+
locales.map((entry) => entry.code),
|
|
33521
|
+
locale
|
|
33522
|
+
),
|
|
33523
|
+
locales,
|
|
33524
|
+
selectLocale: (code) => onLocaleChange?.(code),
|
|
33525
|
+
languageSelectable: onLocaleChange !== void 0 && locales.length > 1
|
|
33526
|
+
}),
|
|
33527
|
+
[locale, locales, onLocaleChange]
|
|
33528
|
+
);
|
|
33529
|
+
return { state, controls };
|
|
33530
|
+
}
|
|
33531
|
+
function provideLanguage({ state, controls }, children) {
|
|
33532
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkZ22RD3E2_js.ViewerI18nContext.Provider, { value: state, children: /* @__PURE__ */ jsxRuntime.jsx(chunkZ22RD3E2_js.ViewerLocaleControlsContext.Provider, { value: controls, children }) });
|
|
33533
|
+
}
|
|
33534
|
+
function HostLanguageRoot({ children, ...props }) {
|
|
33535
|
+
return provideLanguage(useHostLanguage(props), children);
|
|
33536
|
+
}
|
|
33537
|
+
function ProvidedLanguageRoot({ children, ...props }) {
|
|
33538
|
+
return provideLanguage(useProvidedLanguage(props), children);
|
|
33539
|
+
}
|
|
33540
|
+
function ViewerI18nRoot(props) {
|
|
33541
|
+
const Root = React108.useContext(chunkZ22RD3E2_js.PptxI18nContext) ? ProvidedLanguageRoot : HostLanguageRoot;
|
|
33542
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root, { ...props });
|
|
33543
|
+
}
|
|
33544
|
+
function useViewerLocaleControls() {
|
|
33545
|
+
return React108.useContext(chunkZ22RD3E2_js.ViewerLocaleControlsContext);
|
|
33546
|
+
}
|
|
33454
33547
|
var NO_RIBBON_ADD_INS = [];
|
|
33455
33548
|
var PowerPointViewerComponent = /* @__PURE__ */ React108.forwardRef(
|
|
33456
33549
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the forwardRef component its displayName
|
|
33457
33550
|
function PowerPointViewer(props, ref) {
|
|
33551
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33552
|
+
ViewerI18nRoot,
|
|
33553
|
+
{
|
|
33554
|
+
defaultLocale: props.defaultLocale,
|
|
33555
|
+
availableLocales: props.availableLocales,
|
|
33556
|
+
onLocaleChange: props.onLocaleChange,
|
|
33557
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(PowerPointViewerBody, { ...props, ref })
|
|
33558
|
+
}
|
|
33559
|
+
);
|
|
33560
|
+
}
|
|
33561
|
+
);
|
|
33562
|
+
var PowerPointViewerBody = /* @__PURE__ */ React108.forwardRef(
|
|
33563
|
+
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the forwardRef component its displayName
|
|
33564
|
+
function PowerPointViewerBody2(props, ref) {
|
|
33458
33565
|
const {
|
|
33459
33566
|
content: incomingContent,
|
|
33460
33567
|
fonts = [],
|
|
@@ -33479,9 +33586,6 @@ var PowerPointViewerComponent = /* @__PURE__ */ React108.forwardRef(
|
|
|
33479
33586
|
defaultThemeKey,
|
|
33480
33587
|
availableThemes,
|
|
33481
33588
|
onThemeChange,
|
|
33482
|
-
defaultLocale,
|
|
33483
|
-
availableLocales,
|
|
33484
|
-
onLocaleChange,
|
|
33485
33589
|
accountAuth,
|
|
33486
33590
|
authorName,
|
|
33487
33591
|
collaboration: collaborationInput,
|
|
@@ -33547,40 +33651,13 @@ var PowerPointViewerComponent = /* @__PURE__ */ React108.forwardRef(
|
|
|
33547
33651
|
(current) => current.includes(family) ? current : [...current, family]
|
|
33548
33652
|
);
|
|
33549
33653
|
}, []);
|
|
33550
|
-
const { t
|
|
33551
|
-
const
|
|
33552
|
-
|
|
33553
|
-
|
|
33554
|
-
|
|
33555
|
-
|
|
33556
|
-
|
|
33557
|
-
}
|
|
33558
|
-
}, []);
|
|
33559
|
-
const resolvedLocales = React108.useMemo(() => {
|
|
33560
|
-
if (availableLocales) {
|
|
33561
|
-
return availableLocales;
|
|
33562
|
-
}
|
|
33563
|
-
const registeredCodes = i18n$1.options.resources ? Object.keys(i18n$1.options.resources) : i18n$1.languages ?? ["en"];
|
|
33564
|
-
return registeredCodes.map(
|
|
33565
|
-
(code) => i18n.LOCALE_CATALOG.find((entry) => entry.code === code) ?? {
|
|
33566
|
-
code,
|
|
33567
|
-
label: code,
|
|
33568
|
-
nativeLabel: code
|
|
33569
|
-
}
|
|
33570
|
-
);
|
|
33571
|
-
}, [availableLocales, i18n$1]);
|
|
33572
|
-
const handleLocaleChange = React108.useCallback(
|
|
33573
|
-
(code) => {
|
|
33574
|
-
setLocaleCode(code);
|
|
33575
|
-
if (onLocaleChange) {
|
|
33576
|
-
onLocaleChange(code);
|
|
33577
|
-
} else {
|
|
33578
|
-
void i18n$1.changeLanguage(code);
|
|
33579
|
-
pptx.writeStoredViewerPrefs({ localeCode: code });
|
|
33580
|
-
}
|
|
33581
|
-
},
|
|
33582
|
-
[onLocaleChange, i18n$1]
|
|
33583
|
-
);
|
|
33654
|
+
const { t } = chunkZ22RD3E2_js.useTranslation();
|
|
33655
|
+
const {
|
|
33656
|
+
localeCode,
|
|
33657
|
+
locales: resolvedLocales,
|
|
33658
|
+
selectLocale: handleLocaleChange,
|
|
33659
|
+
languageSelectable
|
|
33660
|
+
} = useViewerLocaleControls();
|
|
33584
33661
|
const [content, setContent] = React108.useState(incomingContent);
|
|
33585
33662
|
const [loadOrigin, setLoadOrigin] = React108.useState("bootstrap");
|
|
33586
33663
|
React108.useEffect(() => {
|
|
@@ -33612,7 +33689,7 @@ var PowerPointViewerComponent = /* @__PURE__ */ React108.forwardRef(
|
|
|
33612
33689
|
},
|
|
33613
33690
|
[storage]
|
|
33614
33691
|
);
|
|
33615
|
-
const { optionsStore, options: viewerOptions } =
|
|
33692
|
+
const { optionsStore, options: viewerOptions } = chunkV3XADJ2O_js.useViewerOptions();
|
|
33616
33693
|
const custom = useViewerCustomization(customization, legacyHiddenActions, optionsStore);
|
|
33617
33694
|
const { resolved: customizationResolved, hiddenActions } = custom;
|
|
33618
33695
|
const aiEnabled = Boolean(ai) && pptx.isFeatureEnabled(customizationResolved, "ai");
|
|
@@ -33626,8 +33703,8 @@ var PowerPointViewerComponent = /* @__PURE__ */ React108.forwardRef(
|
|
|
33626
33703
|
const handleEnableEditing = React108.useCallback(() => {
|
|
33627
33704
|
setProtectedViewOverridden(true);
|
|
33628
33705
|
}, []);
|
|
33629
|
-
const readOnlyRec =
|
|
33630
|
-
const compatToastsState =
|
|
33706
|
+
const readOnlyRec = chunkV3XADJ2O_js.useReadOnlyRecommendationState(content);
|
|
33707
|
+
const compatToastsState = chunkV3XADJ2O_js.useCompatibilityToastsState();
|
|
33631
33708
|
const [notesBarHeight, setNotesBarHeight] = React108.useState(0);
|
|
33632
33709
|
const runProgramNoticesState = useRunProgramNoticesState();
|
|
33633
33710
|
const [collaborationReadOnly, setCollaborationReadOnly] = React108.useState(Boolean(collaboration));
|
|
@@ -33650,8 +33727,8 @@ var PowerPointViewerComponent = /* @__PURE__ */ React108.forwardRef(
|
|
|
33650
33727
|
filePath
|
|
33651
33728
|
});
|
|
33652
33729
|
const [isShareDialogOpen, setIsShareDialogOpen] = React108.useState(false);
|
|
33653
|
-
const { reducedMotion, toggleReducedMotion } =
|
|
33654
|
-
const state =
|
|
33730
|
+
const { reducedMotion, toggleReducedMotion } = chunkV3XADJ2O_js.useReducedMotion();
|
|
33731
|
+
const state = chunkV3XADJ2O_js.useViewerState({
|
|
33655
33732
|
content,
|
|
33656
33733
|
canEdit,
|
|
33657
33734
|
inspectorInitiallyOpen: props.inspectorInitiallyOpen
|
|
@@ -33778,16 +33855,16 @@ var PowerPointViewerComponent = /* @__PURE__ */ React108.forwardRef(
|
|
|
33778
33855
|
}
|
|
33779
33856
|
}, [settings, optionsStore]);
|
|
33780
33857
|
const handleClearOptionsCache = useAutosaveCacheMaintenance(viewerOptions, storage);
|
|
33781
|
-
const mobile =
|
|
33858
|
+
const mobile = chunkV3XADJ2O_js.useIsMobile();
|
|
33782
33859
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
33783
|
-
const resizablePanels =
|
|
33860
|
+
const resizablePanels = chunkV3XADJ2O_js.useResizablePanels();
|
|
33784
33861
|
const {
|
|
33785
33862
|
gridSpacingPx,
|
|
33786
33863
|
visibleSlideIndexes,
|
|
33787
33864
|
slideSectionGroups,
|
|
33788
33865
|
masterPseudoSlide,
|
|
33789
33866
|
authoredRange
|
|
33790
|
-
} =
|
|
33867
|
+
} = chunkV3XADJ2O_js.useDerivedSlideState({
|
|
33791
33868
|
slides,
|
|
33792
33869
|
sections: state.sections,
|
|
33793
33870
|
customShows: state.customShows,
|
|
@@ -33812,7 +33889,7 @@ var PowerPointViewerComponent = /* @__PURE__ */ React108.forwardRef(
|
|
|
33812
33889
|
state.cropSessionRef
|
|
33813
33890
|
]
|
|
33814
33891
|
);
|
|
33815
|
-
const zoom =
|
|
33892
|
+
const zoom = chunkV3XADJ2O_js.useZoomViewport({
|
|
33816
33893
|
canvasSize,
|
|
33817
33894
|
selectedElements: state.selectedElements,
|
|
33818
33895
|
fitPadding: props.fitPadding,
|
|
@@ -33827,7 +33904,7 @@ var PowerPointViewerComponent = /* @__PURE__ */ React108.forwardRef(
|
|
|
33827
33904
|
setIsDirty(true);
|
|
33828
33905
|
onChangeCallback.current?.();
|
|
33829
33906
|
}, [setIsDirty]);
|
|
33830
|
-
const history =
|
|
33907
|
+
const history = chunkV3XADJ2O_js.useEditorHistory({
|
|
33831
33908
|
slides,
|
|
33832
33909
|
canvasSize,
|
|
33833
33910
|
activeSlideIndex,
|
|
@@ -33853,7 +33930,7 @@ var PowerPointViewerComponent = /* @__PURE__ */ React108.forwardRef(
|
|
|
33853
33930
|
setEditTemplateMode: state.setEditTemplateMode,
|
|
33854
33931
|
setHeaderFooter: state.setHeaderFooter
|
|
33855
33932
|
});
|
|
33856
|
-
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } =
|
|
33933
|
+
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = chunkV3XADJ2O_js.usePresentationSetup({
|
|
33857
33934
|
mode,
|
|
33858
33935
|
slides,
|
|
33859
33936
|
visibleSlideIndexes,
|
|
@@ -33928,7 +34005,7 @@ ${url}`)
|
|
|
33928
34005
|
loading,
|
|
33929
34006
|
error
|
|
33930
34007
|
]);
|
|
33931
|
-
|
|
34008
|
+
chunkV3XADJ2O_js.useTouchGestures({
|
|
33932
34009
|
targetRef: zoom.canvasViewportRef,
|
|
33933
34010
|
currentScale: zoom.scale,
|
|
33934
34011
|
callbacks: {
|
|
@@ -33950,7 +34027,7 @@ ${url}`)
|
|
|
33950
34027
|
},
|
|
33951
34028
|
enabled: isTouchDevice
|
|
33952
34029
|
});
|
|
33953
|
-
const dialogs =
|
|
34030
|
+
const dialogs = chunkV3XADJ2O_js.useViewerDialogs({
|
|
33954
34031
|
mode,
|
|
33955
34032
|
slides,
|
|
33956
34033
|
activeSlide,
|
|
@@ -33999,7 +34076,7 @@ ${url}`)
|
|
|
33999
34076
|
zoom.handleZoomToFit();
|
|
34000
34077
|
zoom.canvasViewportRef.current?.scrollTo({ left: 0, top: 0 });
|
|
34001
34078
|
}, [mode]);
|
|
34002
|
-
const editorOps =
|
|
34079
|
+
const editorOps = chunkV3XADJ2O_js.useEditorOperations({
|
|
34003
34080
|
state,
|
|
34004
34081
|
history,
|
|
34005
34082
|
zoom,
|
|
@@ -34042,7 +34119,7 @@ ${url}`)
|
|
|
34042
34119
|
handlerRef,
|
|
34043
34120
|
viewerApi,
|
|
34044
34121
|
loadVersion
|
|
34045
|
-
} =
|
|
34122
|
+
} = chunkV3XADJ2O_js.useViewerIntegration({
|
|
34046
34123
|
transformCommittedText: (text) => pptx.applyAutoCorrect(text, viewerOptions.proofing),
|
|
34047
34124
|
state,
|
|
34048
34125
|
zoom,
|
|
@@ -34181,7 +34258,7 @@ ${url}`)
|
|
|
34181
34258
|
updateElementById: editorOps.ops.updateElementById
|
|
34182
34259
|
});
|
|
34183
34260
|
const ribbonScope = useRibbonScopeToken();
|
|
34184
|
-
const viewPreferencesSync =
|
|
34261
|
+
const viewPreferencesSync = chunkV3XADJ2O_js.useViewPreferencesSync({
|
|
34185
34262
|
loadVersion,
|
|
34186
34263
|
viewProperties: state.viewProperties,
|
|
34187
34264
|
setViewProperties: state.setViewProperties,
|
|
@@ -34223,7 +34300,7 @@ ${url}`)
|
|
|
34223
34300
|
},
|
|
34224
34301
|
[state]
|
|
34225
34302
|
);
|
|
34226
|
-
const layoutSwitching =
|
|
34303
|
+
const layoutSwitching = chunkV3XADJ2O_js.useLayoutSwitching({
|
|
34227
34304
|
handler: handlerRef.current,
|
|
34228
34305
|
slides,
|
|
34229
34306
|
activeSlideIndex,
|
|
@@ -34339,7 +34416,7 @@ ${url}`)
|
|
|
34339
34416
|
"data-pptx-editor-chrome": "",
|
|
34340
34417
|
...{ [pptx.RIBBON_SCOPE_ATTR]: ribbonScope },
|
|
34341
34418
|
"aria-busy": loading,
|
|
34342
|
-
className:
|
|
34419
|
+
className: chunkZ22RD3E2_js.cn(
|
|
34343
34420
|
"h-full w-full bg-background text-foreground relative",
|
|
34344
34421
|
...pptx.resolveOptionRootClasses(viewerOptions, "pptx")
|
|
34345
34422
|
),
|
|
@@ -34614,6 +34691,7 @@ ${url}`)
|
|
|
34614
34691
|
onSelectTheme: handleThemeChange,
|
|
34615
34692
|
localeCode,
|
|
34616
34693
|
availableLocales: resolvedLocales,
|
|
34694
|
+
languageSelectable,
|
|
34617
34695
|
onSelectLocale: handleLocaleChange,
|
|
34618
34696
|
aiEnabled,
|
|
34619
34697
|
customFontFamilies,
|
|
@@ -34735,8 +34813,8 @@ ${url}`)
|
|
|
34735
34813
|
// Nothing previously provided it, so every one of those consumers was
|
|
34736
34814
|
// silently reading `DEFAULT_VIEWER_OPTIONS` forever, no matter what
|
|
34737
34815
|
// the user changed in the Options dialog.
|
|
34738
|
-
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerStorageContext.Provider, { value: storage, 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(
|
|
34739
|
-
|
|
34816
|
+
/* @__PURE__ */ jsxRuntime.jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerStorageContext.Provider, { value: storage, 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(chunkV3XADJ2O_js.Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
34817
|
+
chunkV3XADJ2O_js.CollaborationProvider,
|
|
34740
34818
|
{
|
|
34741
34819
|
config: collaboration,
|
|
34742
34820
|
canvasWidth: canvasSize.width,
|
|
@@ -34792,19 +34870,19 @@ ${url}`)
|
|
|
34792
34870
|
slideCount: slides.length
|
|
34793
34871
|
}
|
|
34794
34872
|
),
|
|
34795
|
-
/* @__PURE__ */ jsxRuntime.jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34873
|
+
/* @__PURE__ */ jsxRuntime.jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsxRuntime.jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsxRuntime.jsx(chunkV3XADJ2O_js.ChartFormatContext.Provider, { value: chartFormat, children: viewerContent }) }) })
|
|
34796
34874
|
]
|
|
34797
34875
|
}
|
|
34798
34876
|
) }) }) }) }) }) }) }) })
|
|
34799
34877
|
);
|
|
34800
34878
|
}
|
|
34801
34879
|
);
|
|
34802
|
-
var PowerPointViewer2 = /* @__PURE__ */
|
|
34880
|
+
var PowerPointViewer2 = /* @__PURE__ */ chunkV3XADJ2O_js.withDisplayName(
|
|
34803
34881
|
PowerPointViewerComponent,
|
|
34804
34882
|
"PowerPointViewer"
|
|
34805
34883
|
);
|
|
34806
34884
|
function CollaborationStatusStrip() {
|
|
34807
|
-
const collab =
|
|
34885
|
+
const collab = chunkV3XADJ2O_js.useCollaboration();
|
|
34808
34886
|
if (!collab) {
|
|
34809
34887
|
return null;
|
|
34810
34888
|
}
|
|
@@ -34821,9 +34899,9 @@ function CollaborationStateReporter({
|
|
|
34821
34899
|
onChange,
|
|
34822
34900
|
onStatus
|
|
34823
34901
|
}) {
|
|
34824
|
-
const collab =
|
|
34902
|
+
const collab = chunkV3XADJ2O_js.useCollaboration();
|
|
34825
34903
|
useCollaborationStateReport(collab, onChange);
|
|
34826
|
-
|
|
34904
|
+
chunkV3XADJ2O_js.useReportOnChange(collab?.status ?? "disconnected", onStatus, "disconnected");
|
|
34827
34905
|
return null;
|
|
34828
34906
|
}
|
|
34829
34907
|
function CollaborationDocumentSync({
|
|
@@ -34837,8 +34915,8 @@ function CollaborationDocumentSync({
|
|
|
34837
34915
|
deckSaveState,
|
|
34838
34916
|
onReadOnlyChange
|
|
34839
34917
|
}) {
|
|
34840
|
-
const collab =
|
|
34841
|
-
|
|
34918
|
+
const collab = chunkV3XADJ2O_js.useCollaboration();
|
|
34919
|
+
chunkV3XADJ2O_js.useCollaborationDocumentSync({
|
|
34842
34920
|
collaboration: collab,
|
|
34843
34921
|
slides,
|
|
34844
34922
|
templateElementsBySlideId,
|
|
@@ -34857,14 +34935,14 @@ function CollaborationFollowLayer({
|
|
|
34857
34935
|
setActiveSlideIndex,
|
|
34858
34936
|
slideCount
|
|
34859
34937
|
}) {
|
|
34860
|
-
const collab =
|
|
34861
|
-
const { followedClientId, followUser } =
|
|
34938
|
+
const collab = chunkV3XADJ2O_js.useCollaboration();
|
|
34939
|
+
const { followedClientId, followUser } = chunkV3XADJ2O_js.useFollowMode({
|
|
34862
34940
|
collab,
|
|
34863
34941
|
activeSlideIndex,
|
|
34864
34942
|
setActiveSlideIndex,
|
|
34865
34943
|
slideCount
|
|
34866
34944
|
});
|
|
34867
|
-
|
|
34945
|
+
chunkV3XADJ2O_js.useBroadcastFollower({
|
|
34868
34946
|
collab,
|
|
34869
34947
|
activeSlideIndex,
|
|
34870
34948
|
setActiveSlideIndex,
|
|
@@ -34883,6 +34961,31 @@ function CollaborationFollowLayer({
|
|
|
34883
34961
|
}
|
|
34884
34962
|
) }) });
|
|
34885
34963
|
}
|
|
34964
|
+
var asMessageParams = (params) => params;
|
|
34965
|
+
function withEnglishFallback(translate) {
|
|
34966
|
+
return (key, defaultOrParams) => {
|
|
34967
|
+
const params = typeof defaultOrParams === "string" ? { defaultValue: defaultOrParams } : defaultOrParams;
|
|
34968
|
+
let text;
|
|
34969
|
+
try {
|
|
34970
|
+
text = params === void 0 ? translate(key) : translate(key, params);
|
|
34971
|
+
} catch {
|
|
34972
|
+
text = void 0;
|
|
34973
|
+
}
|
|
34974
|
+
const found = text && text !== key ? text : i18n.translationsEn[key] ?? params?.defaultValue;
|
|
34975
|
+
return typeof found === "string" ? i18n$1.interpolate(found, asMessageParams(params), "double") : i18n.keyToLabel(key);
|
|
34976
|
+
};
|
|
34977
|
+
}
|
|
34978
|
+
function PptxI18nProvider({
|
|
34979
|
+
translate,
|
|
34980
|
+
locale,
|
|
34981
|
+
children
|
|
34982
|
+
}) {
|
|
34983
|
+
const state = React108.useMemo(
|
|
34984
|
+
() => ({ t: withEnglishFallback(translate), locale }),
|
|
34985
|
+
[translate, locale]
|
|
34986
|
+
);
|
|
34987
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkZ22RD3E2_js.PptxI18nContext.Provider, { value: state, children });
|
|
34988
|
+
}
|
|
34886
34989
|
|
|
34887
34990
|
Object.defineProperty(exports, "THEME_CATALOG", {
|
|
34888
34991
|
enumerable: true,
|
|
@@ -34930,6 +35033,7 @@ Object.defineProperty(exports, "vermilionRadius", {
|
|
|
34930
35033
|
});
|
|
34931
35034
|
exports.CollaborationStatusIndicator = CollaborationStatusIndicator;
|
|
34932
35035
|
exports.PowerPointViewer = PowerPointViewer2;
|
|
35036
|
+
exports.PptxI18nProvider = PptxI18nProvider;
|
|
34933
35037
|
exports.SlideCanvas = SlideCanvas;
|
|
34934
35038
|
exports.SlideTemplateGalleryDialog = SlideTemplateGalleryDialog;
|
|
34935
35039
|
exports.SlideTemplatePreview = SlideTemplatePreview;
|