pptx-react-viewer 2.16.3 → 2.16.4
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 +12 -0
- package/dist/{AiChatPanel-RGIINA3S.mjs → AiChatPanel-7DDN4QUA.mjs} +3 -3
- package/dist/AiChatPanel-7DDN4QUA.mjs.br +0 -0
- package/dist/AiChatPanel-7DDN4QUA.mjs.gz +0 -0
- package/dist/{AiChatPanel-2WWE5U3X.js → AiChatPanel-KEORKCTT.js} +22 -22
- package/dist/AiChatPanel-KEORKCTT.js.br +0 -0
- package/dist/AiChatPanel-KEORKCTT.js.gz +0 -0
- package/dist/{Model3DScene-2ZP3V2P2.mjs → Model3DScene-DEAQMMUS.mjs} +1 -1
- package/dist/Model3DScene-DEAQMMUS.mjs.br +0 -0
- package/dist/Model3DScene-DEAQMMUS.mjs.gz +0 -0
- package/dist/{Model3DScene-D2ZJ5XGR.js → Model3DScene-SBUYEWHL.js} +2 -2
- package/dist/Model3DScene-SBUYEWHL.js.br +0 -0
- package/dist/Model3DScene-SBUYEWHL.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-DWQ3IP5C.js → SurfaceChart3DScene-I5D54YQ3.js} +2 -2
- package/dist/SurfaceChart3DScene-I5D54YQ3.js.br +0 -0
- package/dist/SurfaceChart3DScene-I5D54YQ3.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-L7YPNZ7X.mjs → SurfaceChart3DScene-TXGS2PBK.mjs} +1 -1
- package/dist/SurfaceChart3DScene-TXGS2PBK.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-TXGS2PBK.mjs.gz +0 -0
- package/dist/{chunk-KMT3SLZC.mjs → chunk-23WSCMWN.mjs} +91 -19
- package/dist/chunk-23WSCMWN.mjs.br +0 -0
- package/dist/{chunk-KMT3SLZC.mjs.gz → chunk-23WSCMWN.mjs.gz} +0 -0
- package/dist/{chunk-ZYBVQXLR.js → chunk-FQ3FTNKV.js} +1054 -1054
- package/dist/chunk-FQ3FTNKV.js.br +0 -0
- package/dist/chunk-FQ3FTNKV.js.gz +0 -0
- package/dist/{chunk-FVWVEWUG.mjs → chunk-GSAOP4Z4.mjs} +7 -7
- package/dist/chunk-GSAOP4Z4.mjs.br +0 -0
- package/dist/chunk-GSAOP4Z4.mjs.gz +0 -0
- package/dist/{chunk-LBP6BUD4.js → chunk-GZ2V3PWN.js} +3 -3
- package/dist/chunk-GZ2V3PWN.js.br +0 -0
- package/dist/chunk-GZ2V3PWN.js.gz +0 -0
- package/dist/{chunk-KTWK3D6O.js → chunk-HAQDKQ52.js} +255 -255
- package/dist/chunk-HAQDKQ52.js.br +0 -0
- package/dist/chunk-HAQDKQ52.js.gz +0 -0
- package/dist/{chunk-JHDAOYRQ.mjs → chunk-J4QZVO3S.mjs} +1 -1
- package/dist/chunk-J4QZVO3S.mjs.br +0 -0
- package/dist/chunk-J4QZVO3S.mjs.gz +0 -0
- package/dist/{chunk-OZ3HGL6E.mjs → chunk-LLTUDPRE.mjs} +2 -2
- package/dist/chunk-LLTUDPRE.mjs.br +0 -0
- package/dist/{chunk-OZ3HGL6E.mjs.gz → chunk-LLTUDPRE.mjs.gz} +0 -0
- package/dist/{chunk-2UVKMKRP.js → chunk-MZ47MV52.js} +91 -19
- package/dist/chunk-MZ47MV52.js.br +0 -0
- package/dist/{chunk-2UVKMKRP.js.gz → chunk-MZ47MV52.js.gz} +0 -0
- package/dist/{chunk-EBLFH3R2.mjs → chunk-PLBS7OL2.mjs} +2 -2
- package/dist/chunk-PLBS7OL2.mjs.br +0 -0
- package/dist/chunk-PLBS7OL2.mjs.gz +0 -0
- package/dist/{chunk-U7SASWG4.js → chunk-RBQUSVYR.js} +340 -340
- package/dist/chunk-RBQUSVYR.js.br +0 -0
- package/dist/chunk-RBQUSVYR.js.gz +0 -0
- package/dist/index.js +39 -39
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +78 -78
- 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 +26 -26
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +2 -2
- package/dist/AiChatPanel-2WWE5U3X.js.br +0 -0
- package/dist/AiChatPanel-2WWE5U3X.js.gz +0 -0
- package/dist/AiChatPanel-RGIINA3S.mjs.br +0 -0
- package/dist/AiChatPanel-RGIINA3S.mjs.gz +0 -0
- package/dist/Model3DScene-2ZP3V2P2.mjs.br +0 -0
- package/dist/Model3DScene-2ZP3V2P2.mjs.gz +0 -0
- package/dist/Model3DScene-D2ZJ5XGR.js.br +0 -0
- package/dist/Model3DScene-D2ZJ5XGR.js.gz +0 -0
- package/dist/SurfaceChart3DScene-DWQ3IP5C.js.br +0 -0
- package/dist/SurfaceChart3DScene-DWQ3IP5C.js.gz +0 -0
- package/dist/SurfaceChart3DScene-L7YPNZ7X.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-L7YPNZ7X.mjs.gz +0 -0
- package/dist/chunk-2UVKMKRP.js.br +0 -0
- package/dist/chunk-EBLFH3R2.mjs.br +0 -0
- package/dist/chunk-EBLFH3R2.mjs.gz +0 -0
- package/dist/chunk-FVWVEWUG.mjs.br +0 -0
- package/dist/chunk-FVWVEWUG.mjs.gz +0 -0
- package/dist/chunk-JHDAOYRQ.mjs.br +0 -0
- package/dist/chunk-JHDAOYRQ.mjs.gz +0 -0
- package/dist/chunk-KMT3SLZC.mjs.br +0 -0
- package/dist/chunk-KTWK3D6O.js.br +0 -0
- package/dist/chunk-KTWK3D6O.js.gz +0 -0
- package/dist/chunk-LBP6BUD4.js.br +0 -0
- package/dist/chunk-LBP6BUD4.js.gz +0 -0
- package/dist/chunk-OZ3HGL6E.mjs.br +0 -0
- package/dist/chunk-U7SASWG4.js.br +0 -0
- package/dist/chunk-U7SASWG4.js.gz +0 -0
- package/dist/chunk-ZYBVQXLR.js.br +0 -0
- package/dist/chunk-ZYBVQXLR.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ThemePresets, PptxMarkdownConverter } from './chunk-
|
|
1
|
+
import { ThemePresets, PptxMarkdownConverter } from './chunk-23WSCMWN.mjs';
|
|
2
2
|
import { __export } from './chunk-XGB3TDIC.mjs';
|
|
3
3
|
import * as mcp from 'pptx-viewer-mcp';
|
|
4
4
|
import * as mcpSchemas from 'pptx-viewer-mcp/schemas';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, partitionTemplateElements, UNGROUPED_SECTION_ID, buildSaveSlides, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, executeMediaCommand, buildPdfFromImageData, buildNotesPdf, EMU_PER_PX, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-
|
|
1
|
+
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, partitionTemplateElements, UNGROUPED_SECTION_ID, buildSaveSlides, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, executeMediaCommand, buildPdfFromImageData, buildNotesPdf, EMU_PER_PX, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-PLBS7OL2.mjs';
|
|
2
2
|
import { translationsEn } from './chunk-5IUEPQTK.mjs';
|
|
3
|
-
import { TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createPresenceProjector, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, PresentationAnimationController, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, attachPresentationVisibilityPause, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, collectImagePaths, buildInitialGuides, EncryptedFileError, saveAutosaveSnapshot, isTemplateElementId, hasShapeProperties, hasTextProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, downloadBlob, sanitizeDownloadFilename, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, mayLeaveSlideShow, stopAllPersistentAudio, remapTextToSegments, guidePxToEmu, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, exportDeckJson, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, firstShowSlideIndex, mapPresentationWheel, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, runPresentationAction, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, resolveShowSlideIndexes, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, buildPrintHtmlDocument, deleteTableColumn, rebuildTableStructureInRawXml, insertTableColumn, deleteTableRow, insertTableRow, updateCellTextStyleInRawXml, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, elementActionToPptxAction, buildSmartArtPresetData, computeSnapToShape, publishLiveGeometry, computeMarqueeHitIds, mergeAdditiveSelection, applyResize, snapBoxToGrid, applyMotionPathPreset } from './chunk-
|
|
3
|
+
import { TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createPresenceProjector, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, PresentationAnimationController, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, attachPresentationVisibilityPause, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, collectImagePaths, buildInitialGuides, EncryptedFileError, saveAutosaveSnapshot, isTemplateElementId, hasShapeProperties, hasTextProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, downloadBlob, sanitizeDownloadFilename, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, mayLeaveSlideShow, stopAllPersistentAudio, remapTextToSegments, guidePxToEmu, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, exportDeckJson, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, firstShowSlideIndex, mapPresentationWheel, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, runPresentationAction, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, resolveShowSlideIndexes, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, buildPrintHtmlDocument, deleteTableColumn, rebuildTableStructureInRawXml, insertTableColumn, deleteTableRow, insertTableRow, updateCellTextStyleInRawXml, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, elementActionToPptxAction, buildSmartArtPresetData, computeSnapToShape, publishLiveGeometry, computeMarqueeHitIds, mergeAdditiveSelection, applyResize, snapBoxToGrid, applyMotionPathPreset } from './chunk-23WSCMWN.mjs';
|
|
4
4
|
import { useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect, useSyncExternalStore, useImperativeHandle } from 'react';
|
|
5
5
|
import JSZip from 'jszip';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
Binary file
|
|
Binary file
|
|
@@ -108034,19 +108034,21 @@ function childrenPair(a, b) {
|
|
|
108034
108034
|
}
|
|
108035
108035
|
return boxOverlapRatio(a, b) >= CHILD_OVERLAP_RATIO;
|
|
108036
108036
|
}
|
|
108037
|
-
function
|
|
108037
|
+
function correspondingChildren(a, b) {
|
|
108038
108038
|
if (a.length !== b.length || a.length === 0) {
|
|
108039
|
-
return
|
|
108039
|
+
return void 0;
|
|
108040
108040
|
}
|
|
108041
108041
|
const unclaimed = b.map((child22) => child22);
|
|
108042
|
+
const paired = [];
|
|
108042
108043
|
for (const child22 of a) {
|
|
108043
108044
|
const index = unclaimed.findIndex((candidate) => childrenPair(child22, candidate));
|
|
108044
108045
|
if (index < 0) {
|
|
108045
|
-
return
|
|
108046
|
+
return void 0;
|
|
108046
108047
|
}
|
|
108048
|
+
paired.push([child22, unclaimed[index]]);
|
|
108047
108049
|
unclaimed.splice(index, 1);
|
|
108048
108050
|
}
|
|
108049
|
-
return
|
|
108051
|
+
return paired;
|
|
108050
108052
|
}
|
|
108051
108053
|
function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
|
|
108052
108054
|
const out = [];
|
|
@@ -108055,7 +108057,7 @@ function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
|
|
|
108055
108057
|
if (children8 && containsMorphNamedDescendant(element)) {
|
|
108056
108058
|
const twin = correspondingGroup(element, counterpart);
|
|
108057
108059
|
const twinChildren = twin ? groupChildren(twin) ?? [] : void 0;
|
|
108058
|
-
if (twinChildren &&
|
|
108060
|
+
if (twinChildren && correspondingChildren(children8, twinChildren)) {
|
|
108059
108061
|
out.push(
|
|
108060
108062
|
...flattenMorphElements(children8, twinChildren, offsetX + element.x, offsetY + element.y)
|
|
108061
108063
|
);
|
|
@@ -108066,6 +108068,29 @@ function flattenMorphElements(elements, counterpart, offsetX = 0, offsetY = 0) {
|
|
|
108066
108068
|
}
|
|
108067
108069
|
return out;
|
|
108068
108070
|
}
|
|
108071
|
+
function morphGroupChildPairs(elements, counterpart) {
|
|
108072
|
+
const pairs2 = /* @__PURE__ */ new Map();
|
|
108073
|
+
collectGroupChildPairs(elements, counterpart, pairs2);
|
|
108074
|
+
return pairs2;
|
|
108075
|
+
}
|
|
108076
|
+
function collectGroupChildPairs(elements, counterpart, into) {
|
|
108077
|
+
for (const element of elements) {
|
|
108078
|
+
const children8 = groupChildren(element);
|
|
108079
|
+
if (!children8 || !containsMorphNamedDescendant(element)) {
|
|
108080
|
+
continue;
|
|
108081
|
+
}
|
|
108082
|
+
const twin = correspondingGroup(element, counterpart);
|
|
108083
|
+
const twinChildren = twin ? groupChildren(twin) ?? [] : void 0;
|
|
108084
|
+
const corresponded = twinChildren ? correspondingChildren(children8, twinChildren) : void 0;
|
|
108085
|
+
if (!corresponded) {
|
|
108086
|
+
continue;
|
|
108087
|
+
}
|
|
108088
|
+
for (const [child22, twinChild] of corresponded) {
|
|
108089
|
+
into.set(child22.id, twinChild.id);
|
|
108090
|
+
}
|
|
108091
|
+
collectGroupChildPairs(children8, twinChildren ?? [], into);
|
|
108092
|
+
}
|
|
108093
|
+
}
|
|
108069
108094
|
var OUTLINE_SAMPLE_COUNT = 64;
|
|
108070
108095
|
var ELLIPSE_SAMPLE_COUNT = 48;
|
|
108071
108096
|
function resolveLength(token2, axis) {
|
|
@@ -108532,6 +108557,23 @@ function matchMorphElementsFull(fromSlide, toSlide) {
|
|
|
108532
108557
|
}
|
|
108533
108558
|
}
|
|
108534
108559
|
}
|
|
108560
|
+
const groupChildPairs = morphGroupChildPairs(fromSlide.elements, toSlide.elements);
|
|
108561
|
+
if (groupChildPairs.size > 0) {
|
|
108562
|
+
const toById = new Map(toElements.map((el) => [el.id, el]));
|
|
108563
|
+
for (const fromEl of fromElements) {
|
|
108564
|
+
if (usedFrom.has(fromEl.id)) {
|
|
108565
|
+
continue;
|
|
108566
|
+
}
|
|
108567
|
+
const toId = groupChildPairs.get(fromEl.id);
|
|
108568
|
+
const toEl = toId === void 0 ? void 0 : toById.get(toId);
|
|
108569
|
+
if (!toEl || usedTo.has(toEl.id) || fromEl.type !== toEl.type) {
|
|
108570
|
+
continue;
|
|
108571
|
+
}
|
|
108572
|
+
pairs2.push({ fromElement: fromEl, toElement: toEl });
|
|
108573
|
+
usedFrom.add(fromEl.id);
|
|
108574
|
+
usedTo.add(toEl.id);
|
|
108575
|
+
}
|
|
108576
|
+
}
|
|
108535
108577
|
for (const fromEl of fromElements) {
|
|
108536
108578
|
if (usedFrom.has(fromEl.id) || !fromEl.shapeId) {
|
|
108537
108579
|
continue;
|
|
@@ -108638,7 +108680,7 @@ function buildMorphMergedOrder(outgoing, incoming, pairs2) {
|
|
|
108638
108680
|
flushOutgoingBelow(outgoing.length);
|
|
108639
108681
|
return rank;
|
|
108640
108682
|
}
|
|
108641
|
-
function resolveMorphOverlayArrivals(outgoing, incoming, pairs2, holdingGhostIds) {
|
|
108683
|
+
function resolveMorphOverlayArrivals(outgoing, incoming, pairs2, holdingGhostIds, dissolvingInIds = /* @__PURE__ */ new Set()) {
|
|
108642
108684
|
const rank = buildMorphMergedOrder(outgoing, incoming, pairs2);
|
|
108643
108685
|
const matched = new Set(pairs2.map((pair) => pair.toElement.id));
|
|
108644
108686
|
const counterpart = new Map(pairs2.map((pair) => [pair.fromElement.id, pair.toElement]));
|
|
@@ -108648,7 +108690,7 @@ function resolveMorphOverlayArrivals(outgoing, incoming, pairs2, holdingGhostIds
|
|
|
108648
108690
|
}));
|
|
108649
108691
|
const lifted = /* @__PURE__ */ new Set();
|
|
108650
108692
|
for (const element of incoming) {
|
|
108651
|
-
if (matched.has(element.id)) {
|
|
108693
|
+
if (matched.has(element.id) && !dissolvingInIds.has(element.id)) {
|
|
108652
108694
|
continue;
|
|
108653
108695
|
}
|
|
108654
108696
|
const mine = rank.get(element.id) ?? 0;
|
|
@@ -108713,6 +108755,21 @@ function tokenizeText(element, mode) {
|
|
|
108713
108755
|
}
|
|
108714
108756
|
return tokens;
|
|
108715
108757
|
}
|
|
108758
|
+
var SAME_SLOT_OVERLAP = 0.5;
|
|
108759
|
+
function ownText(element) {
|
|
108760
|
+
return (element.text ?? "").replace(/\s+/gu, " ").trim();
|
|
108761
|
+
}
|
|
108762
|
+
function morphTextReplacedInSlot(fromElement, toElement) {
|
|
108763
|
+
if (fromElement.type !== "text" || toElement.type !== "text") {
|
|
108764
|
+
return false;
|
|
108765
|
+
}
|
|
108766
|
+
const from = ownText(fromElement);
|
|
108767
|
+
const to = ownText(toElement);
|
|
108768
|
+
if (from === "" || to === "" || from === to) {
|
|
108769
|
+
return false;
|
|
108770
|
+
}
|
|
108771
|
+
return boxOverlapRatio(fromElement, toElement) >= SAME_SLOT_OVERLAP;
|
|
108772
|
+
}
|
|
108716
108773
|
function diffTokens(fromTokens, toTokens) {
|
|
108717
108774
|
const n = fromTokens.length;
|
|
108718
108775
|
const m = toTokens.length;
|
|
@@ -108911,6 +108968,9 @@ function resolveMorphGhostIds(outgoingElements, pairs2) {
|
|
|
108911
108968
|
}
|
|
108912
108969
|
return painted;
|
|
108913
108970
|
}
|
|
108971
|
+
function morphPairIncomingFadesIn(fromElement, toElement, ghosted = true) {
|
|
108972
|
+
return !(ghosted && isInertMorphPair(fromElement, toElement)) && morphPairNeedsCrossfade(fromElement, toElement) && crossfadeIncomingMayFadeIn(toElement);
|
|
108973
|
+
}
|
|
108914
108974
|
function crossfadeIncomingMayFadeIn(element) {
|
|
108915
108975
|
const image = element;
|
|
108916
108976
|
if (image.imagePath || image.svgPath) {
|
|
@@ -108941,17 +109001,18 @@ function generateMorphAnimations(pairs2, durationMs, _mode = "object", ghostIds)
|
|
|
108941
109001
|
continue;
|
|
108942
109002
|
}
|
|
108943
109003
|
const safeName = `pptx-morph-${index}-${toElement.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
|
|
108944
|
-
const
|
|
108945
|
-
const
|
|
108946
|
-
const
|
|
108947
|
-
const
|
|
109004
|
+
const inSlot = morphTextReplacedInSlot(fromElement, toElement);
|
|
109005
|
+
const dx = inSlot ? 0 : fromElement.x + fromElement.width / 2 - (toElement.x + toElement.width / 2);
|
|
109006
|
+
const dy = inSlot ? 0 : fromElement.y + fromElement.height / 2 - (toElement.y + toElement.height / 2);
|
|
109007
|
+
const sx = inSlot ? 1 : Math.max(fromElement.width, 1) / Math.max(toElement.width, 1);
|
|
109008
|
+
const sy = inSlot ? 1 : Math.max(fromElement.height, 1) / Math.max(toElement.height, 1);
|
|
108948
109009
|
const fromOpacity = fromElement.opacity ?? 1;
|
|
108949
109010
|
const toOpacity = toElement.opacity ?? 1;
|
|
108950
109011
|
const toRot = toElement.rotation ?? 0;
|
|
108951
|
-
const fromRot = shortestRotationTarget(toRot, fromElement.rotation ?? 0);
|
|
109012
|
+
const fromRot = inSlot ? toRot : shortestRotationTarget(toRot, fromElement.rotation ?? 0);
|
|
108952
109013
|
const flips = `${toElement.flipHorizontal ? " scaleX(-1)" : ""}${toElement.flipVertical ? " scaleY(-1)" : ""}`;
|
|
108953
109014
|
const inert = ghosted && isInertMorphPair(fromElement, toElement);
|
|
108954
|
-
const crossfadesIn =
|
|
109015
|
+
const crossfadesIn = morphPairIncomingFadesIn(fromElement, toElement, ghosted);
|
|
108955
109016
|
const fromProps = [
|
|
108956
109017
|
` transform: translate(${dx}px, ${dy}px) scale(${sx}, ${sy}) rotate(${fromRot}deg)${flips};`
|
|
108957
109018
|
];
|
|
@@ -109006,12 +109067,13 @@ function generateMorphGhostAnimations(pairs2, durationMs, startIndex, ghostIds)
|
|
|
109006
109067
|
}
|
|
109007
109068
|
const fadesOut = morphPairNeedsCrossfade(fromElement, toElement);
|
|
109008
109069
|
const safeName = `pptx-morph-ghost-${startIndex + index}-${fromElement.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
|
|
109009
|
-
const
|
|
109010
|
-
const
|
|
109011
|
-
const
|
|
109012
|
-
const
|
|
109070
|
+
const inSlot = morphTextReplacedInSlot(fromElement, toElement);
|
|
109071
|
+
const dx = inSlot ? 0 : toElement.x + toElement.width / 2 - (fromElement.x + fromElement.width / 2);
|
|
109072
|
+
const dy = inSlot ? 0 : toElement.y + toElement.height / 2 - (fromElement.y + fromElement.height / 2);
|
|
109073
|
+
const sx = inSlot ? 1 : Math.max(toElement.width, 1) / Math.max(fromElement.width, 1);
|
|
109074
|
+
const sy = inSlot ? 1 : Math.max(toElement.height, 1) / Math.max(fromElement.height, 1);
|
|
109013
109075
|
const fromRot = fromElement.rotation ?? 0;
|
|
109014
|
-
const toRot = shortestRotationTarget(fromRot, toElement.rotation ?? 0);
|
|
109076
|
+
const toRot = inSlot ? fromRot : shortestRotationTarget(fromRot, toElement.rotation ?? 0);
|
|
109015
109077
|
const flips = `${fromElement.flipHorizontal ? " scaleX(-1)" : ""}${fromElement.flipVertical ? " scaleY(-1)" : ""}`;
|
|
109016
109078
|
const opacity2 = fromElement.opacity ?? 1;
|
|
109017
109079
|
const keyframes = `
|
|
@@ -109229,11 +109291,21 @@ function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object
|
|
|
109229
109291
|
(candidate) => outgoingAnimations.has(candidate.fromElement.id) && !morphPairNeedsCrossfade(candidate.fromElement, candidate.toElement)
|
|
109230
109292
|
).map((candidate) => candidate.fromElement.id)
|
|
109231
109293
|
);
|
|
109294
|
+
const dissolvingInIds = new Set(
|
|
109295
|
+
match.pairs.filter(
|
|
109296
|
+
(candidate) => morphPairIncomingFadesIn(
|
|
109297
|
+
candidate.fromElement,
|
|
109298
|
+
candidate.toElement,
|
|
109299
|
+
outgoingAnimations.has(candidate.fromElement.id)
|
|
109300
|
+
)
|
|
109301
|
+
).map((candidate) => candidate.toElement.id)
|
|
109302
|
+
);
|
|
109232
109303
|
const lifted = resolveMorphOverlayArrivals(
|
|
109233
109304
|
flattenedOutgoing,
|
|
109234
109305
|
flattenedIncoming,
|
|
109235
109306
|
match.pairs,
|
|
109236
|
-
holdingGhostIds
|
|
109307
|
+
holdingGhostIds,
|
|
109308
|
+
dissolvingInIds
|
|
109237
109309
|
);
|
|
109238
109310
|
const overlayIncomingAnimations = /* @__PURE__ */ new Map();
|
|
109239
109311
|
for (const id of lifted) {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { translationsEn } from './chunk-5IUEPQTK.mjs';
|
|
2
|
-
import { SHAPE_PRESET_DEFS, computeValueRangeForChart, VIEWER_SHORTCUT_REFERENCE, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, isTemplateElement, getImageFitStyle, isImageLikeElement, runMediaCommand, findMediaElementByElementId, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, resolveParagraphStrutFontSize, colorWithOpacity, normalizeHexColor, build3DExtrusionData, isIdentityRectClip, getResolvedShapeClipPath, isStrokeOnlyPresetElement, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, suppressesCssBorder, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, buildSvgGradientDef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, computeSelectionRect, DEFAULT_FONT_FAMILY, rectToCells, isCellInRect, buildChartViewModel, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, getRoundRectRadiusPx2, mediaFallbackVisual, registerPersistentAudio, proportionalLineHeight, substituteFieldText, resolveUnderlineDecorationStyle, resolveAutoFitFontScale, getSubstituteFontFamily, parsePanoseString, hasDistinctScriptFonts, pieceLetterSpacing, resolveMetricTrackingPx, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, sanitizeGradientStops, getGradientTileFlipCss, getGradientTileRectCss, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, svgGradientFillRef, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getPatternSvg, ooxmlDashToCssBorderStyle, cell3DBevelCss, getChartStylePalette, chartAreaFill, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, resolveFontRefIdx, tintColor2, shadeColor2, ooxmlGradientAngleToCssDegrees, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, splitRunForMetrics, hexToRgbChannels, chartPartToAttrs, segmentByScript, resolveFontForScript } from './chunk-
|
|
2
|
+
import { SHAPE_PRESET_DEFS, computeValueRangeForChart, VIEWER_SHORTCUT_REFERENCE, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, isTemplateElement, getImageFitStyle, isImageLikeElement, runMediaCommand, findMediaElementByElementId, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, resolveParagraphStrutFontSize, colorWithOpacity, normalizeHexColor, build3DExtrusionData, isIdentityRectClip, getResolvedShapeClipPath, isStrokeOnlyPresetElement, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, suppressesCssBorder, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, buildSvgGradientDef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, computeSelectionRect, DEFAULT_FONT_FAMILY, rectToCells, isCellInRect, buildChartViewModel, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, getRoundRectRadiusPx2, mediaFallbackVisual, registerPersistentAudio, proportionalLineHeight, substituteFieldText, resolveUnderlineDecorationStyle, resolveAutoFitFontScale, getSubstituteFontFamily, parsePanoseString, hasDistinctScriptFonts, pieceLetterSpacing, resolveMetricTrackingPx, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, sanitizeGradientStops, getGradientTileFlipCss, getGradientTileRectCss, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, svgGradientFillRef, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getPatternSvg, ooxmlDashToCssBorderStyle, cell3DBevelCss, getChartStylePalette, chartAreaFill, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, resolveFontRefIdx, tintColor2, shadeColor2, ooxmlGradientAngleToCssDegrees, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, splitRunForMetrics, hexToRgbChannels, chartPartToAttrs, segmentByScript, resolveFontForScript } from './chunk-23WSCMWN.mjs';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import React6, { useState, useEffect, useMemo, Suspense, useRef, useCallback, useLayoutEffect } from 'react';
|
|
@@ -6181,7 +6181,7 @@ function FailedToLoad() {
|
|
|
6181
6181
|
var LazySurfaceChart3DScene = React6.lazy(
|
|
6182
6182
|
async () => {
|
|
6183
6183
|
try {
|
|
6184
|
-
return await import('./SurfaceChart3DScene-
|
|
6184
|
+
return await import('./SurfaceChart3DScene-TXGS2PBK.mjs');
|
|
6185
6185
|
} catch {
|
|
6186
6186
|
return { default: FailedToLoad };
|
|
6187
6187
|
}
|
|
Binary file
|
|
Binary file
|