pptx-react-viewer 3.17.0 → 3.17.1
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 +30 -0
- package/dist/{AiChatPanel-VWVGQ5DD.js → AiChatPanel-GYH43XWW.js} +10 -10
- package/dist/AiChatPanel-GYH43XWW.js.br +0 -0
- package/dist/AiChatPanel-GYH43XWW.js.gz +0 -0
- package/dist/{AiChatPanel-4LKH44IE.mjs → AiChatPanel-SINEEZBW.mjs} +2 -2
- package/dist/AiChatPanel-SINEEZBW.mjs.br +0 -0
- package/dist/AiChatPanel-SINEEZBW.mjs.gz +0 -0
- package/dist/{chunk-3AJ54EAB.js → chunk-64FUV37N.js} +9 -0
- package/dist/chunk-64FUV37N.js.br +0 -0
- package/dist/{chunk-3AJ54EAB.js.gz → chunk-64FUV37N.js.gz} +0 -0
- package/dist/{chunk-NJ3WCYYG.js → chunk-7FBKS7OS.js} +9 -9
- package/dist/chunk-7FBKS7OS.js.br +0 -0
- package/dist/chunk-7FBKS7OS.js.gz +0 -0
- package/dist/{chunk-3UGVURWU.js → chunk-E55VEC37.js} +40 -40
- package/dist/chunk-E55VEC37.js.br +0 -0
- package/dist/chunk-E55VEC37.js.gz +0 -0
- package/dist/{chunk-72LYFUGL.js → chunk-IRG7SIUX.js} +359 -362
- package/dist/chunk-IRG7SIUX.js.br +0 -0
- package/dist/chunk-IRG7SIUX.js.gz +0 -0
- package/dist/{chunk-EDMJYVCS.mjs → chunk-IXKAIIA2.mjs} +23 -26
- package/dist/chunk-IXKAIIA2.mjs.br +0 -0
- package/dist/chunk-IXKAIIA2.mjs.gz +0 -0
- package/dist/{chunk-HMX3MQR7.mjs → chunk-LAU34UMB.mjs} +9 -1
- package/dist/chunk-LAU34UMB.mjs.br +0 -0
- package/dist/{chunk-HMX3MQR7.mjs.gz → chunk-LAU34UMB.mjs.gz} +0 -0
- package/dist/{chunk-7YOA4HNP.mjs → chunk-OAKDJYYT.mjs} +2 -2
- package/dist/chunk-OAKDJYYT.mjs.br +0 -0
- package/dist/chunk-OAKDJYYT.mjs.gz +0 -0
- package/dist/{chunk-23PW4Y4R.mjs → chunk-VYSMTC5C.mjs} +1 -1
- package/dist/chunk-VYSMTC5C.mjs.br +0 -0
- package/dist/chunk-VYSMTC5C.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.js +15 -15
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +75 -75
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.js +17 -17
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-4LKH44IE.mjs.br +0 -0
- package/dist/AiChatPanel-4LKH44IE.mjs.gz +0 -0
- package/dist/AiChatPanel-VWVGQ5DD.js.br +0 -0
- package/dist/AiChatPanel-VWVGQ5DD.js.gz +0 -0
- package/dist/chunk-23PW4Y4R.mjs.br +0 -0
- package/dist/chunk-23PW4Y4R.mjs.gz +0 -0
- package/dist/chunk-3AJ54EAB.js.br +0 -0
- package/dist/chunk-3UGVURWU.js.br +0 -0
- package/dist/chunk-3UGVURWU.js.gz +0 -0
- package/dist/chunk-72LYFUGL.js.br +0 -0
- package/dist/chunk-72LYFUGL.js.gz +0 -0
- package/dist/chunk-7YOA4HNP.mjs.br +0 -0
- package/dist/chunk-7YOA4HNP.mjs.gz +0 -0
- package/dist/chunk-EDMJYVCS.mjs.br +0 -0
- package/dist/chunk-EDMJYVCS.mjs.gz +0 -0
- package/dist/chunk-HMX3MQR7.mjs.br +0 -0
- package/dist/chunk-NJ3WCYYG.js.br +0 -0
- package/dist/chunk-NJ3WCYYG.js.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,36 @@ A release listed with no entries carried no Conventional Commit in this package'
|
|
|
7
7
|
scope: scripts/release-plan.mjs re-releases a package whenever any of its files
|
|
8
8
|
change, not only on conventional ones.
|
|
9
9
|
|
|
10
|
+
## [3.17.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@3.17.0) - 2026-09-13
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **shared:** Add configurable viewport fit options (by @Sudhansh6) ([93e3218](https://github.com/ChristopherVR/pptx-viewer/commit/93e3218de54ce8d153761e2fba83f3558fc3051b))
|
|
15
|
+
- **react:** Add configurable viewport fit options (by @Sudhansh6) ([358a18e](https://github.com/ChristopherVR/pptx-viewer/commit/358a18ea3bddc36dcc51d3224049a1ad434bbcaf))
|
|
16
|
+
- **shared:** Expose public element insertion across viewers (by @Sudhansh6) ([2701047](https://github.com/ChristopherVR/pptx-viewer/commit/2701047d5011b5d7ce8408009addc1dc31f6e3f7))
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- **core:** Preserve empty paragraph insertion formatting (by @Sudhansh6) ([121f6bf](https://github.com/ChristopherVR/pptx-viewer/commit/121f6bf9f64a29ab07e07b5d4f042a4b075d7876))
|
|
21
|
+
- **shared:** Preserve empty paragraph insertion formatting (by @Sudhansh6) ([b34d0f5](https://github.com/ChristopherVR/pptx-viewer/commit/b34d0f5ab9879e02f1de85c0e50b15f3947735c3))
|
|
22
|
+
- **react:** Preserve empty paragraph insertion formatting (by @Sudhansh6) ([2539f01](https://github.com/ChristopherVR/pptx-viewer/commit/2539f015beb19d2fc71c302216fc184a9452f60b))
|
|
23
|
+
- **shared:** Continue inserted paragraphs from the local list (by @Sudhansh6) ([78b8226](https://github.com/ChristopherVR/pptx-viewer/commit/78b82261a320b93052627ec9e6e460c4845f6f32))
|
|
24
|
+
- **shared:** Leave empty clipboard paste shortcuts unclaimed (by @Sudhansh6) ([aec446f](https://github.com/ChristopherVR/pptx-viewer/commit/aec446f7f36371ad2f9c1cf3e68b7aaeb4f2cc28))
|
|
25
|
+
|
|
26
|
+
### Other
|
|
27
|
+
|
|
28
|
+
- Retain empty paragraph styles with source alignment (by @Sudhansh6) ([d979cd2](https://github.com/ChristopherVR/pptx-viewer/commit/d979cd25b7c05cef0fc4d4501c39d2bb11e572e0))
|
|
29
|
+
- Integrate semantic list commands with empty paragraph formatting (by @Sudhansh6) ([c5d9a6f](https://github.com/ChristopherVR/pptx-viewer/commit/c5d9a6f4f52c44180111c1f5fca0f10299dce47a))
|
|
30
|
+
- Sync main font and SmartArt fixes (by @Sudhansh6) ([f2066eb](https://github.com/ChristopherVR/pptx-viewer/commit/f2066eb87b62884cadd77593e8b36426398c3312))
|
|
31
|
+
- Sync main paragraph and history fixes (by @Sudhansh6) ([a18a2d7](https://github.com/ChristopherVR/pptx-viewer/commit/a18a2d7fe2bccf7d8c49b72d7a80087d423d1da0))
|
|
32
|
+
- Sync viewport fit changes from main (by @Sudhansh6) ([3c3c0bd](https://github.com/ChristopherVR/pptx-viewer/commit/3c3c0bdb2f88648dd20ffac9b6fd5a691741253d))
|
|
33
|
+
- Sync public insertion with viewport fit API (by @Sudhansh6) ([47df3db](https://github.com/ChristopherVR/pptx-viewer/commit/47df3db6bb7bb6bbee06e36c9ff9565b2fc61252))
|
|
34
|
+
- Sync public insertion with empty paragraph formatting (by @Sudhansh6) ([d1ad9c9](https://github.com/ChristopherVR/pptx-viewer/commit/d1ad9c9562313085cab62f3b9f9fa0abc6d0fa1f))
|
|
35
|
+
|
|
36
|
+
### Documentation
|
|
37
|
+
|
|
38
|
+
- Move viewport fitting into developer guides (by @Sudhansh6) ([60707eb](https://github.com/ChristopherVR/pptx-viewer/commit/60707ebf8f261779b2ebfa41ff0741267a672bd3))
|
|
39
|
+
|
|
10
40
|
## [3.16.7](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@3.16.7) - 2026-09-13
|
|
11
41
|
|
|
12
42
|
### Bug Fixes
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkKVXB22D3_js = require('./chunk-KVXB22D3.js');
|
|
4
|
-
var
|
|
4
|
+
var chunk7FBKS7OS_js = require('./chunk-7FBKS7OS.js');
|
|
5
5
|
require('./chunk-4SPZ5IZN.js');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-64FUV37N.js');
|
|
7
7
|
require('./chunk-4VNS5WPM.js');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
@@ -419,7 +419,7 @@ function AiComposer({
|
|
|
419
419
|
disabled: value.trim().length === 0,
|
|
420
420
|
title: t("pptx.ai.send"),
|
|
421
421
|
"aria-label": t("pptx.ai.send"),
|
|
422
|
-
className:
|
|
422
|
+
className: chunk7FBKS7OS_js.cn(
|
|
423
423
|
"shrink-0 rounded-sm p-1.5 transition-colors",
|
|
424
424
|
value.trim().length === 0 ? "text-muted-foreground/50" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
425
425
|
),
|
|
@@ -450,7 +450,7 @@ function AiFocusBar({
|
|
|
450
450
|
chips.map((chip) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
451
451
|
"span",
|
|
452
452
|
{
|
|
453
|
-
className:
|
|
453
|
+
className: chunk7FBKS7OS_js.cn(
|
|
454
454
|
"inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]",
|
|
455
455
|
hasPicks || isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground"
|
|
456
456
|
),
|
|
@@ -487,7 +487,7 @@ function AiFocusBar({
|
|
|
487
487
|
title: t("pptx.ai.pickElement"),
|
|
488
488
|
"aria-label": t("pptx.ai.pickAria"),
|
|
489
489
|
"aria-pressed": pickMode,
|
|
490
|
-
className:
|
|
490
|
+
className: chunk7FBKS7OS_js.cn(
|
|
491
491
|
"rounded-sm p-1 max-md:min-w-[44px]! max-md:min-h-[44px]! flex items-center justify-center",
|
|
492
492
|
pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent"
|
|
493
493
|
),
|
|
@@ -566,7 +566,7 @@ function AiHistoryList({ chats, activeChatId, onResume, onDelete }) {
|
|
|
566
566
|
{
|
|
567
567
|
type: "button",
|
|
568
568
|
onClick: () => onResume(chat.id),
|
|
569
|
-
className:
|
|
569
|
+
className: chunk7FBKS7OS_js.cn(
|
|
570
570
|
"flex min-w-0 flex-1 items-start gap-2 rounded-sm px-2 py-1.5 text-left hover:bg-accent",
|
|
571
571
|
chat.id === activeChatId && "bg-accent/60"
|
|
572
572
|
),
|
|
@@ -730,17 +730,17 @@ function AiToolCallCard({ part }) {
|
|
|
730
730
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
731
731
|
Icon,
|
|
732
732
|
{
|
|
733
|
-
className:
|
|
733
|
+
className: chunk7FBKS7OS_js.cn(
|
|
734
734
|
"w-3.5 h-3.5 shrink-0",
|
|
735
735
|
failed ? "text-destructive" : "text-muted-foreground"
|
|
736
736
|
)
|
|
737
737
|
}
|
|
738
738
|
),
|
|
739
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
739
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk7FBKS7OS_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
|
|
740
740
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
741
741
|
"span",
|
|
742
742
|
{
|
|
743
|
-
className:
|
|
743
|
+
className: chunk7FBKS7OS_js.cn(
|
|
744
744
|
"ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]",
|
|
745
745
|
failed ? "bg-destructive/15 text-destructive" : done ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
|
|
746
746
|
),
|
|
@@ -788,7 +788,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
788
788
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
789
789
|
"div",
|
|
790
790
|
{
|
|
791
|
-
className:
|
|
791
|
+
className: chunk7FBKS7OS_js.cn(
|
|
792
792
|
"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full",
|
|
793
793
|
isUser ? "bg-secondary text-muted-foreground" : "bg-primary/15 text-primary"
|
|
794
794
|
),
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { deckIdFromBridge, isAiAvailable, createAiChatSession, toolCanvasTarget, createChatHistoryStore, focusTargetChips, isTwoTableFocus, mergeTablesDirective, humanizeDiffLine, buildDeckContext, describeToolActivity, summarizeToolArgs, toolLabel } from './chunk-7YJBRPCT.mjs';
|
|
2
|
-
import { cn } from './chunk-
|
|
2
|
+
import { cn } from './chunk-VYSMTC5C.mjs';
|
|
3
3
|
import './chunk-QTGCOL5H.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-LAU34UMB.mjs';
|
|
5
5
|
import './chunk-XGB3TDIC.mjs';
|
|
6
6
|
import { useMemo, useRef, useState, useEffect, useReducer, useCallback } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
Binary file
|
|
Binary file
|
|
@@ -3850,7 +3850,16 @@ var LOCALE_CATALOG = [
|
|
|
3850
3850
|
{ code: "es", label: "Spanish", nativeLabel: "Espa\xF1ol" },
|
|
3851
3851
|
{ code: "de", label: "German", nativeLabel: "Deutsch" }
|
|
3852
3852
|
];
|
|
3853
|
+
var ALIGNMENT_LABEL_KEYS = {
|
|
3854
|
+
left: "pptx.ribbon.alignLeft",
|
|
3855
|
+
center: "pptx.ribbon.alignCenter",
|
|
3856
|
+
right: "pptx.ribbon.alignRight",
|
|
3857
|
+
top: "pptx.ribbon.alignTop",
|
|
3858
|
+
middle: "pptx.ribbon.alignMiddle",
|
|
3859
|
+
bottom: "pptx.ribbon.alignBottom"
|
|
3860
|
+
};
|
|
3853
3861
|
|
|
3862
|
+
exports.ALIGNMENT_LABEL_KEYS = ALIGNMENT_LABEL_KEYS;
|
|
3854
3863
|
exports.LOCALE_CATALOG = LOCALE_CATALOG;
|
|
3855
3864
|
exports.keyToLabel = keyToLabel;
|
|
3856
3865
|
exports.translationsEn = translationsEn;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk4SPZ5IZN_js = require('./chunk-4SPZ5IZN.js');
|
|
4
|
-
var
|
|
4
|
+
var chunk64FUV37N_js = require('./chunk-64FUV37N.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var React7 = require('react');
|
|
@@ -581,7 +581,7 @@ function PresentationMediaController({
|
|
|
581
581
|
] });
|
|
582
582
|
}
|
|
583
583
|
function label(key) {
|
|
584
|
-
return key === void 0 ? void 0 :
|
|
584
|
+
return key === void 0 ? void 0 : chunk64FUV37N_js.translationsEn[key];
|
|
585
585
|
}
|
|
586
586
|
function FallbackIcon({
|
|
587
587
|
paths,
|
|
@@ -674,7 +674,7 @@ function renderMediaFallback({
|
|
|
674
674
|
"img",
|
|
675
675
|
{
|
|
676
676
|
src: posterUrl,
|
|
677
|
-
alt: visual.dimPoster ?
|
|
677
|
+
alt: visual.dimPoster ? chunk64FUV37N_js.translationsEn["pptx.media.posterAlt"] : chunk64FUV37N_js.translationsEn["pptx.media.videoPosterAlt"],
|
|
678
678
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
679
679
|
style: chunk4SPZ5IZN_js.getImageFitStyle(element)
|
|
680
680
|
}
|
|
@@ -686,7 +686,7 @@ function renderMediaFallback({
|
|
|
686
686
|
}
|
|
687
687
|
function renderMediaElement(element, mediaDataUrls, options) {
|
|
688
688
|
if (element.type !== "media") {
|
|
689
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
689
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk64FUV37N_js.translationsEn["pptx.media.title"] });
|
|
690
690
|
}
|
|
691
691
|
const mediaType = element.mediaType;
|
|
692
692
|
const mediaPath = element.mediaPath;
|
|
@@ -772,7 +772,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
772
772
|
if (surface.presenting || surface.preview) {
|
|
773
773
|
return null;
|
|
774
774
|
}
|
|
775
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
775
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk64FUV37N_js.translationsEn["pptx.media.title"] });
|
|
776
776
|
}
|
|
777
777
|
|
|
778
778
|
// src/viewer/utils/text-utils.tsx
|
|
@@ -1218,7 +1218,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1218
1218
|
},
|
|
1219
1219
|
dangerouslySetInnerHTML: { __html: safeMathml }
|
|
1220
1220
|
}
|
|
1221
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children:
|
|
1221
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunk64FUV37N_js.translationsEn["pptx.textSegment.equationFallback"] });
|
|
1222
1222
|
if (equationNumber) {
|
|
1223
1223
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1224
1224
|
"span",
|
|
@@ -3263,7 +3263,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
3263
3263
|
if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
|
|
3264
3264
|
return renderTableFromTableData(tableEl2, textStyle, options);
|
|
3265
3265
|
}
|
|
3266
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3266
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk64FUV37N_js.translationsEn["pptx.table.title"] });
|
|
3267
3267
|
}
|
|
3268
3268
|
const selectedCell = options?.selectedCell || null;
|
|
3269
3269
|
const isEditable = Boolean(options?.editable) && chunk4SPZ5IZN_js.canDrillDown(element);
|
|
@@ -3754,11 +3754,11 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3754
3754
|
}
|
|
3755
3755
|
function renderChartElement(element) {
|
|
3756
3756
|
if (element.type !== "chart") {
|
|
3757
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3757
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk64FUV37N_js.translationsEn["pptx.chart.heading"] });
|
|
3758
3758
|
}
|
|
3759
3759
|
const chartData = element.chartData;
|
|
3760
3760
|
if (!chartData || chartData.series.length === 0) {
|
|
3761
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
3761
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk64FUV37N_js.translationsEn["pptx.chart.heading"] });
|
|
3762
3762
|
}
|
|
3763
3763
|
const kind = chunk4SPZ5IZN_js.resolveChartKind(chartData.chartType ?? "bar");
|
|
3764
3764
|
return renderChartViewModel(
|
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7FBKS7OS_js = require('./chunk-7FBKS7OS.js');
|
|
4
4
|
var chunk4SPZ5IZN_js = require('./chunk-4SPZ5IZN.js');
|
|
5
|
-
var
|
|
5
|
+
var chunk64FUV37N_js = require('./chunk-64FUV37N.js');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
8
8
|
|
|
@@ -582,8 +582,8 @@ function useEditorHistory(input) {
|
|
|
582
582
|
const currentSnapshot = buildHistorySnapshot();
|
|
583
583
|
historyFutureRef.current.push(currentSnapshot);
|
|
584
584
|
isApplyingHistoryRef.current = true;
|
|
585
|
-
const nextSnapshot =
|
|
586
|
-
lastHistorySnapshotRef.current =
|
|
585
|
+
const nextSnapshot = chunk7FBKS7OS_js.cloneHistorySnapshot(previousSnapshot);
|
|
586
|
+
lastHistorySnapshotRef.current = chunk7FBKS7OS_js.cloneHistorySnapshot(nextSnapshot);
|
|
587
587
|
lastHistorySerializedRef.current = serializeDocument(nextSnapshot);
|
|
588
588
|
applyHistorySnapshot(nextSnapshot);
|
|
589
589
|
updateHistoryAvailability();
|
|
@@ -604,8 +604,8 @@ function useEditorHistory(input) {
|
|
|
604
604
|
const currentSnapshot = buildHistorySnapshot();
|
|
605
605
|
historyPastRef.current.push(currentSnapshot);
|
|
606
606
|
isApplyingHistoryRef.current = true;
|
|
607
|
-
const targetSnapshot =
|
|
608
|
-
lastHistorySnapshotRef.current =
|
|
607
|
+
const targetSnapshot = chunk7FBKS7OS_js.cloneHistorySnapshot(nextSnapshot);
|
|
608
|
+
lastHistorySnapshotRef.current = chunk7FBKS7OS_js.cloneHistorySnapshot(targetSnapshot);
|
|
609
609
|
lastHistorySerializedRef.current = serializeDocument(targetSnapshot);
|
|
610
610
|
applyHistorySnapshot(targetSnapshot);
|
|
611
611
|
updateHistoryAvailability();
|
|
@@ -623,7 +623,7 @@ function useEditorHistory(input) {
|
|
|
623
623
|
historyPastRef.current = [];
|
|
624
624
|
historyFutureRef.current = [];
|
|
625
625
|
if (initialSnapshot) {
|
|
626
|
-
const clonedInitial =
|
|
626
|
+
const clonedInitial = chunk7FBKS7OS_js.cloneHistorySnapshot(initialSnapshot);
|
|
627
627
|
lastHistorySnapshotRef.current = clonedInitial;
|
|
628
628
|
lastHistorySerializedRef.current = serializeDocument(clonedInitial);
|
|
629
629
|
} else {
|
|
@@ -671,19 +671,19 @@ function useEditorHistory(input) {
|
|
|
671
671
|
}
|
|
672
672
|
const previousSnapshot = lastHistorySnapshotRef.current;
|
|
673
673
|
if (!previousSnapshot) {
|
|
674
|
-
lastHistorySnapshotRef.current =
|
|
674
|
+
lastHistorySnapshotRef.current = chunk7FBKS7OS_js.cloneHistorySnapshot(snapshot);
|
|
675
675
|
lastHistorySerializedRef.current = serialized;
|
|
676
676
|
lastCheapHashRef.current = cheapHash;
|
|
677
677
|
updateHistoryAvailability();
|
|
678
678
|
return;
|
|
679
679
|
}
|
|
680
680
|
onDirtyRef.current?.();
|
|
681
|
-
historyPastRef.current.push(
|
|
681
|
+
historyPastRef.current.push(chunk7FBKS7OS_js.cloneHistorySnapshot(previousSnapshot));
|
|
682
682
|
while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
|
|
683
683
|
historyPastRef.current.shift();
|
|
684
684
|
}
|
|
685
685
|
historyFutureRef.current = [];
|
|
686
|
-
lastHistorySnapshotRef.current =
|
|
686
|
+
lastHistorySnapshotRef.current = chunk7FBKS7OS_js.cloneHistorySnapshot(snapshot);
|
|
687
687
|
lastHistorySerializedRef.current = serialized;
|
|
688
688
|
lastCheapHashRef.current = cheapHash;
|
|
689
689
|
updateHistoryAvailability();
|
|
@@ -852,22 +852,22 @@ function useZoomViewport({
|
|
|
852
852
|
selectedElements.forEach((element) => {
|
|
853
853
|
minX = Math.min(minX, element.x);
|
|
854
854
|
minY = Math.min(minY, element.y);
|
|
855
|
-
maxX = Math.max(maxX, element.x + Math.max(element.width,
|
|
856
|
-
maxY = Math.max(maxY, element.y + Math.max(element.height,
|
|
855
|
+
maxX = Math.max(maxX, element.x + Math.max(element.width, chunk7FBKS7OS_js.MIN_ELEMENT_SIZE));
|
|
856
|
+
maxY = Math.max(maxY, element.y + Math.max(element.height, chunk7FBKS7OS_js.MIN_ELEMENT_SIZE));
|
|
857
857
|
});
|
|
858
858
|
if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
|
|
859
859
|
return;
|
|
860
860
|
}
|
|
861
861
|
const selectionBounds = { minX, minY, maxX, maxY };
|
|
862
|
-
const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX,
|
|
863
|
-
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY,
|
|
862
|
+
const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk7FBKS7OS_js.MIN_ELEMENT_SIZE);
|
|
863
|
+
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk7FBKS7OS_js.MIN_ELEMENT_SIZE);
|
|
864
864
|
const availableWidth = Math.max(
|
|
865
|
-
effectiveEditorDimensions.width -
|
|
866
|
-
|
|
865
|
+
effectiveEditorDimensions.width - chunk7FBKS7OS_js.ZOOM_TO_SELECTION_PADDING,
|
|
866
|
+
chunk7FBKS7OS_js.MIN_ELEMENT_SIZE
|
|
867
867
|
);
|
|
868
868
|
const availableHeight = Math.max(
|
|
869
|
-
effectiveEditorDimensions.height -
|
|
870
|
-
|
|
869
|
+
effectiveEditorDimensions.height - chunk7FBKS7OS_js.ZOOM_TO_SELECTION_PADDING,
|
|
870
|
+
chunk7FBKS7OS_js.MIN_ELEMENT_SIZE
|
|
871
871
|
);
|
|
872
872
|
const targetEditorScale = Math.min(
|
|
873
873
|
availableWidth / boundsWidth,
|
|
@@ -3656,8 +3656,8 @@ function useViewerCoreState(_input) {
|
|
|
3656
3656
|
const [slides, setSlides] = react.useState([]);
|
|
3657
3657
|
const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
|
|
3658
3658
|
const [canvasSize, setCanvasSize] = react.useState({
|
|
3659
|
-
width:
|
|
3660
|
-
height:
|
|
3659
|
+
width: chunk7FBKS7OS_js.DEFAULT_CANVAS_WIDTH,
|
|
3660
|
+
height: chunk7FBKS7OS_js.DEFAULT_CANVAS_HEIGHT
|
|
3661
3661
|
});
|
|
3662
3662
|
const [slideSizeEmu, setSlideSizeEmu] = react.useState();
|
|
3663
3663
|
const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
|
|
@@ -4118,8 +4118,8 @@ function useLoadContent({
|
|
|
4118
4118
|
setSlides(partition.slides);
|
|
4119
4119
|
setTemplateElementsBySlideId(partition.templateElementsBySlideId);
|
|
4120
4120
|
setCanvasSize({
|
|
4121
|
-
width: parsed.width ??
|
|
4122
|
-
height: parsed.height ??
|
|
4121
|
+
width: parsed.width ?? chunk7FBKS7OS_js.DEFAULT_CANVAS_WIDTH,
|
|
4122
|
+
height: parsed.height ?? chunk7FBKS7OS_js.DEFAULT_CANVAS_HEIGHT
|
|
4123
4123
|
});
|
|
4124
4124
|
setSlideSizeEmu(
|
|
4125
4125
|
typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
|
|
@@ -4672,15 +4672,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
|
|
|
4672
4672
|
// src/viewer/hooks/pointer-move-handlers.ts
|
|
4673
4673
|
function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
|
|
4674
4674
|
const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
|
|
4675
|
-
let resized = chunk4SPZ5IZN_js.applyResize(startBox, handle, dx, dy, 1, { minSize:
|
|
4675
|
+
let resized = chunk4SPZ5IZN_js.applyResize(startBox, handle, dx, dy, 1, { minSize: chunk7FBKS7OS_js.MIN_ELEMENT_SIZE });
|
|
4676
4676
|
if (lockAspect) {
|
|
4677
|
-
resized = chunk4SPZ5IZN_js.lockResizeAspect(resized, startBox, handle,
|
|
4677
|
+
resized = chunk4SPZ5IZN_js.lockResizeAspect(resized, startBox, handle, chunk7FBKS7OS_js.MIN_ELEMENT_SIZE);
|
|
4678
4678
|
}
|
|
4679
4679
|
const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
|
|
4680
4680
|
if (!snapToGrid) {
|
|
4681
4681
|
return box;
|
|
4682
4682
|
}
|
|
4683
|
-
return chunk4SPZ5IZN_js.snapBoxToGrid(box, handle, gridSpacingPx,
|
|
4683
|
+
return chunk4SPZ5IZN_js.snapBoxToGrid(box, handle, gridSpacingPx, chunk7FBKS7OS_js.MIN_ELEMENT_SIZE);
|
|
4684
4684
|
}
|
|
4685
4685
|
function resolveLiveTarget(input) {
|
|
4686
4686
|
const { livePatcher, editTemplateMode, activeSlide } = input;
|
|
@@ -4867,8 +4867,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
|
|
|
4867
4867
|
rs.lastY = geo.y;
|
|
4868
4868
|
rs.lastWidth = geo.width;
|
|
4869
4869
|
rs.lastHeight = geo.height;
|
|
4870
|
-
const width = Math.max(geo.width,
|
|
4871
|
-
const height = Math.max(geo.height,
|
|
4870
|
+
const width = Math.max(geo.width, chunk7FBKS7OS_js.MIN_ELEMENT_SIZE);
|
|
4871
|
+
const height = Math.max(geo.height, chunk7FBKS7OS_js.MIN_ELEMENT_SIZE);
|
|
4872
4872
|
if (rs.domEl) {
|
|
4873
4873
|
rs.domEl.style.left = `${geo.x}px`;
|
|
4874
4874
|
rs.domEl.style.top = `${geo.y}px`;
|
|
@@ -5841,7 +5841,7 @@ function useInsertElements(input) {
|
|
|
5841
5841
|
width: 300,
|
|
5842
5842
|
height: 60,
|
|
5843
5843
|
text: "",
|
|
5844
|
-
textStyle: { fontSize:
|
|
5844
|
+
textStyle: { fontSize: chunk7FBKS7OS_js.DEFAULT_TEXT_FONT_SIZE }
|
|
5845
5845
|
});
|
|
5846
5846
|
};
|
|
5847
5847
|
const handleAddShape = () => {
|
|
@@ -5868,7 +5868,7 @@ function useInsertElements(input) {
|
|
|
5868
5868
|
return;
|
|
5869
5869
|
}
|
|
5870
5870
|
addElement({
|
|
5871
|
-
...chunk4SPZ5IZN_js.newTableElement(
|
|
5871
|
+
...chunk4SPZ5IZN_js.newTableElement(chunk7FBKS7OS_js.DEFAULT_TABLE_ROWS, chunk7FBKS7OS_js.DEFAULT_TABLE_COLUMNS, 100, 200),
|
|
5872
5872
|
id: chunk4SPZ5IZN_js.generateElementId()
|
|
5873
5873
|
});
|
|
5874
5874
|
};
|
|
@@ -7205,9 +7205,9 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
7205
7205
|
onProgress?.(totalSlides, totalSlides);
|
|
7206
7206
|
setActiveSlide(currentSlideIndex);
|
|
7207
7207
|
if (pages.length === 0) {
|
|
7208
|
-
throw new Error(
|
|
7208
|
+
throw new Error(chunk64FUV37N_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
|
|
7209
7209
|
}
|
|
7210
|
-
const pdfBlobUrl =
|
|
7210
|
+
const pdfBlobUrl = chunk7FBKS7OS_js.buildPdfFromTiledImageData(pages);
|
|
7211
7211
|
chunk4SPZ5IZN_js.downloadDataUrl(pdfBlobUrl, filename);
|
|
7212
7212
|
}
|
|
7213
7213
|
async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
|
|
@@ -7235,9 +7235,9 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
|
|
|
7235
7235
|
onProgress?.(totalSlides, totalSlides);
|
|
7236
7236
|
setActiveSlide(currentSlideIndex);
|
|
7237
7237
|
if (pages.length === 0) {
|
|
7238
|
-
throw new Error(
|
|
7238
|
+
throw new Error(chunk64FUV37N_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
|
|
7239
7239
|
}
|
|
7240
|
-
const pdfDataUrl =
|
|
7240
|
+
const pdfDataUrl = chunk7FBKS7OS_js.buildNotesPdf(pages);
|
|
7241
7241
|
chunk4SPZ5IZN_js.downloadDataUrl(pdfDataUrl, filename);
|
|
7242
7242
|
}
|
|
7243
7243
|
|
|
@@ -7269,7 +7269,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
|
|
|
7269
7269
|
}
|
|
7270
7270
|
setActiveSlide(currentSlideIndex);
|
|
7271
7271
|
if (slideCanvases.length === 0) {
|
|
7272
|
-
throw new Error(
|
|
7272
|
+
throw new Error(chunk64FUV37N_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
|
|
7273
7273
|
}
|
|
7274
7274
|
const firstCanvas = slideCanvases[0];
|
|
7275
7275
|
const recordingCanvas = document.createElement("canvas");
|
|
@@ -7277,7 +7277,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
|
|
|
7277
7277
|
recordingCanvas.height = firstCanvas.height;
|
|
7278
7278
|
const ctx = recordingCanvas.getContext("2d");
|
|
7279
7279
|
if (!ctx) {
|
|
7280
|
-
throw new Error(
|
|
7280
|
+
throw new Error(chunk64FUV37N_js.translationsEn["pptx.export.errorNo2dContext"]);
|
|
7281
7281
|
}
|
|
7282
7282
|
const fps = 30;
|
|
7283
7283
|
const stream = recordingCanvas.captureStream(fps);
|
|
@@ -7374,7 +7374,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
|
|
|
7374
7374
|
}
|
|
7375
7375
|
setActiveSlide(currentSlideIndex);
|
|
7376
7376
|
if (frames.length === 0) {
|
|
7377
|
-
throw new Error(
|
|
7377
|
+
throw new Error(chunk64FUV37N_js.translationsEn["pptx.export.errorNoSlidesGif"]);
|
|
7378
7378
|
}
|
|
7379
7379
|
const gifBytes = chunk4SPZ5IZN_js.encodeGif(frames, Math.round(slideDurationMs / 10));
|
|
7380
7380
|
onProgress?.(totalSlides, totalSlides);
|
|
@@ -8598,7 +8598,7 @@ function useViewerDialogs(input) {
|
|
|
8598
8598
|
};
|
|
8599
8599
|
}
|
|
8600
8600
|
function computeGridSpacingPx2(documentGridSpacing) {
|
|
8601
|
-
return chunk4SPZ5IZN_js.computeGridSpacingPx(documentGridSpacing,
|
|
8601
|
+
return chunk4SPZ5IZN_js.computeGridSpacingPx(documentGridSpacing, chunk7FBKS7OS_js.GRID_SIZE);
|
|
8602
8602
|
}
|
|
8603
8603
|
function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
|
|
8604
8604
|
const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
|
|
@@ -8607,7 +8607,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
|
|
|
8607
8607
|
}
|
|
8608
8608
|
function computeSlideSectionGroups(slides, sections) {
|
|
8609
8609
|
return chunk4SPZ5IZN_js.groupSlidesBySection(sections, slides).map((group) => ({
|
|
8610
|
-
id: group.section?.id ?? (sections.length > 0 ?
|
|
8610
|
+
id: group.section?.id ?? (sections.length > 0 ? chunk7FBKS7OS_js.UNGROUPED_SECTION_ID : chunk7FBKS7OS_js.DEFAULT_SECTION_GROUP_ID),
|
|
8611
8611
|
label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
|
|
8612
8612
|
slideIndexes: group.slideIndexes,
|
|
8613
8613
|
...group.section?.color !== void 0 ? { color: group.section.color } : {},
|
|
@@ -8652,10 +8652,10 @@ function useDerivedSlideState(input) {
|
|
|
8652
8652
|
);
|
|
8653
8653
|
const slideSectionGroups = react.useMemo(
|
|
8654
8654
|
() => computeSlideSectionGroups(slides, sections).map((group) => {
|
|
8655
|
-
if (group.id ===
|
|
8655
|
+
if (group.id === chunk7FBKS7OS_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
|
|
8656
8656
|
return { ...group, label: t("pptx.slides.ungroupedSlides") };
|
|
8657
8657
|
}
|
|
8658
|
-
if (group.id ===
|
|
8658
|
+
if (group.id === chunk7FBKS7OS_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
|
|
8659
8659
|
return { ...group, label: t("pptx.sections.slides") };
|
|
8660
8660
|
}
|
|
8661
8661
|
return group;
|
|
Binary file
|
|
Binary file
|