pptx-react-viewer 4.55.0 → 4.56.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +16 -1
  3. package/dist/ai.d.ts +17 -0
  4. package/dist/ai.js +11 -0
  5. package/dist/ai.js.br +2 -0
  6. package/dist/ai.js.gz +0 -0
  7. package/dist/ai.mjs +9 -0
  8. package/dist/ai.mjs.br +0 -0
  9. package/dist/ai.mjs.gz +0 -0
  10. package/dist/{chunk-OIQAJR57.js → chunk-BL2P6K67.js} +100 -5
  11. package/dist/chunk-BL2P6K67.js.br +0 -0
  12. package/dist/chunk-BL2P6K67.js.gz +0 -0
  13. package/dist/{chunk-V7JICDSL.js → chunk-CNCPFDFS.js} +3113 -3132
  14. package/dist/chunk-CNCPFDFS.js.br +0 -0
  15. package/dist/chunk-CNCPFDFS.js.gz +0 -0
  16. package/dist/{chunk-64BFLDBT.mjs → chunk-EZRO5ETF.mjs} +101 -6
  17. package/dist/chunk-EZRO5ETF.mjs.br +0 -0
  18. package/dist/chunk-EZRO5ETF.mjs.gz +0 -0
  19. package/dist/chunk-F6WCYCHV.js +40 -0
  20. package/dist/chunk-F6WCYCHV.js.br +0 -0
  21. package/dist/chunk-F6WCYCHV.js.gz +0 -0
  22. package/dist/chunk-NE5JQMED.mjs +37 -0
  23. package/dist/chunk-NE5JQMED.mjs.br +0 -0
  24. package/dist/chunk-NE5JQMED.mjs.gz +0 -0
  25. package/dist/{chunk-EXSGJHOH.mjs → chunk-NESLWTLG.mjs} +3017 -3037
  26. package/dist/chunk-NESLWTLG.mjs.br +0 -0
  27. package/dist/chunk-NESLWTLG.mjs.gz +0 -0
  28. package/dist/index.d.ts +95 -14
  29. package/dist/index.js +28 -23
  30. package/dist/index.js.br +0 -0
  31. package/dist/index.js.gz +0 -0
  32. package/dist/index.mjs +3 -2
  33. package/dist/index.mjs.br +0 -0
  34. package/dist/index.mjs.gz +0 -0
  35. package/dist/internals.d.ts +64 -7
  36. package/dist/internals.js +80 -80
  37. package/dist/internals.js.br +0 -0
  38. package/dist/internals.js.gz +0 -0
  39. package/dist/internals.mjs +1 -1
  40. package/dist/internals.mjs.br +0 -0
  41. package/dist/internals.mjs.gz +0 -0
  42. package/dist/pptx-viewer-canvas.css +1 -1
  43. package/dist/pptx-viewer-canvas.css.br +0 -0
  44. package/dist/pptx-viewer-canvas.css.gz +0 -0
  45. package/dist/viewer/index.d.ts +20 -10
  46. package/dist/viewer/index.js +19 -18
  47. package/dist/viewer/index.js.br +0 -0
  48. package/dist/viewer/index.js.gz +0 -0
  49. package/dist/viewer/index.mjs +3 -2
  50. package/dist/viewer/index.mjs.br +0 -0
  51. package/dist/viewer/index.mjs.gz +0 -0
  52. package/package.json +9 -4
  53. package/dist/chunk-64BFLDBT.mjs.br +0 -0
  54. package/dist/chunk-64BFLDBT.mjs.gz +0 -0
  55. package/dist/chunk-EXSGJHOH.mjs.br +0 -0
  56. package/dist/chunk-EXSGJHOH.mjs.gz +0 -0
  57. package/dist/chunk-OIQAJR57.js.br +0 -0
  58. package/dist/chunk-OIQAJR57.js.gz +0 -0
  59. package/dist/chunk-V7JICDSL.js.br +0 -0
  60. package/dist/chunk-V7JICDSL.js.gz +0 -0
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  import { cloneTemplateElementsBySlideId, cloneSlide, cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, useTranslation, partitionTemplateElements, isTemplateElementId, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, comparePresentation, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, stopAllPersistentAudio, buildSaveSlides, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, getImageEffectsOpacity, getImageEffectsFilter, getImageRenderStyle, cn, isEditableTextElement, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, getElementLabel, normalizeHexColor, makeCloneId, DEFAULT_TEXT_FONT_SIZE, buildPdfFromTiledImageData, GRID_SIZE, copyFormatFromElement, hasCopyableFormat, isImageTiled, getDuotoneColors, DEFAULT_STROKE_COLOR, DEFAULT_FILL_COLOR, buildCssGradientFromShapeStyle, getCropShapeClipPath, getElementTransform, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, getTextWarpStyle, getTextCompensationTransform, renderTextSegments, buildReactChartViewModel, renderChartElement, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, buildTextBody3DSceneStyle, rerouteConnectorsForMovedElements, applyReroutedConnectors, updateCellTextStyleInRawXml, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, buildNotesPdf, canvasToJpegData, applyFormatToElement, isPpactionUrl, parsePpactionUrl, getImageTilingStyle, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getAriaRoleDescription as getAriaRoleDescription$1, getAriaLabel as getAriaLabel$1, getAriaRole, DEFAULT_FONT_FAMILY, ACTION_BUTTON_PRESETS, isUrlSafe, safeOpenUrl as safeOpenUrl$1, substituteFieldText, HYPERLINK_COLOR } from './chunk-MR3ZSEHS.mjs';
2
- import { defineThreeViewElement, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createCollaborationSessionController, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, createEditorHistoryController, historyTheme, crossedHistoryTheme, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, resolveMediaBookmarkTimesMs, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, resolveShowBackward, resolveShowForward, beginZoomExcursion, buildZoomTransitionOverride, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, INITIAL_FIND_REPLACE_SESSION, findReplaceSessionActions, visibleTemplateElements, createCollaborationLivePatcher, reportInlineTextDraft, initialInspectorOpen, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, resolveTextFillBlipUrls, seedRecentColors, resolveAuthoredCustomShowId, GlyphOutlineFontCache, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, resolveInitialSlideIndex, pptxLoadErrorMessage, resolveAutosaveIntervalMs, createAutosaveController, saveAutosaveSnapshot, updateMasterViewElement, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canMergeShapes, canInteractWithElement, prepareHtml2CanvasClone, html2canvasCaptureScope, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, DEFAULT_VIEWER_OPTIONS, resolveImageResolutionScale, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, createAutosaveRecoveryController, discardAutosaveRecovery, probeAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, rasterResultToPngBlob, downloadBlob, elementPictureFilename, canEditElementPoints, resolveGoogleFontsCss2Base, selectTrustedEmbeddedFonts, resolveFontWeight, resolveFontItalic, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, dispatchEditorKey, isFeatureEnabled, parentSelection, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, createCustomizationController, prepareElementForInsertion, slideSpaceElement, autosaveStatusKind, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, isKeyboardOpen, scopeLayoutOptionsToSlide, INITIAL_READ_ONLY_SESSION, readOnlySessionActions, applyReadOnlySessionEvent, readOnlyBannerVisible, readOnlyLocked, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, resolveCollaborationConfig, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, getResizeHandleHitAreaStyle, resolveElementInteractivity, getBackgroundAnimationState, getShapeEffectLayerPlacement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, getShapeEffectAnimationLayerStyle, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, resolvePalette as resolvePalette$1, mediaTransportVisible, oleActionsVisible, getGroupChildParentFill, deviceStrokeStageStyle, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, setPendingCaretPoint, resolveGroupDoubleClickTarget, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, contextMenuInspectorAnchor, savedPresentationFileName, deliverSavedPresentation, exportDeckJson, mapCustomizedEditorKey, isEditorTextInputTarget, groupElements, generateElementId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, planMergeShapes, applyMergeShapesPlan, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, createBlankSlide, insertSlidePaste, applySlidePasteTemplates, makeSlideId, insertedLayoutCompletion, buildSlideTemplateSlide, templateSchemeFromTheme, queueThemeWrite, needsOwnedSession, openOwnedCollaboration, resolveViewportFitOptions, editorViewportFitFor, calculateViewportFit, observeViewportClientSize, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, openUrlInNewTab, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, slideSpaceMembers, remapTextToSegments, getInlineEditorSelectionResult, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, createGestureController, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx as computeGridSpacingPx$1, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, rasterizeElement, cloneElementForPaste, applyPasteSpecialFormat, buildRasterPictureElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, writeBackReport, createSyncGate, observeExternalCollaborationReadiness, resolveHistoryDepth, lockExternalContentSetting, resolveAllowExternalContent, createBackstagePresentation, buildFieldSubstitutionContext, getImageColorWashStyle, attachRotateHandlePlacement, getSelectionControlArtworkStyle, getSelectionOutlineColor, paintedStrokeWidth, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, getAnimationOpacity, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, strokeOutlineViewBox, buildSummaryZoomView, readEditableText, placeCaretAt, takePendingCaretPoint, getPendingSelectionRestore, restoreSegmentSelection, mapInlineTextFormatKey, mapInlineEditorChord, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, chartFormatTargetFromEvent, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, getAriaRoleDescription, getAriaLabel, elementIdSelector, TOOLBAR_TABS, resolveGroupPressTarget, scrollInspectorSectionIntoView, computeScrollDelta, buildOutlinePrintJobDocument, printJobRasterFallback, applyThemeByPath, withHistoryTheme, withHistoryMasterThemes, writeThemeParts, loadedThemeName, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, withCellStyle, setCellText, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, stopCaptureStream, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, createSnapshotTextPositions, resolvePresentationAction, getImageSvgFilters, getCachedNativeImageSize, probeNativeImageSize, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, svgLineCap, screenStrokeWidth, connectorWrapperTransform, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, modelDataToBlobUrl, resolveZoomNavigationTarget, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, canDrillDown, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, measureSvgViewportRect, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, isWedgeCalloutPresetShape, getAriaRole as getAriaRole$1, isElementActionable, buildSmartArtPresetData, classifyMediaType, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, planPrintJob, openPrintWindow, buildVectorPrintJobDocument, openPendingPrintWindow, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, publishLiveGeometry, rasterizeElementTiledToCanvas, clampGifDimensions, rasterResultToPngDataUrl, shouldConfirmExternalHyperlink, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, findSmartArtNodeText, commitSmartArtNodeFill, commitSmartArtNodeText, groupIntoParagraphs as groupIntoParagraphs$1, createGlyphOutlineLookup, finishPrintWindow, buildRasterPrintJobDocument, applyMotionPathPreset, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, computeSmartArtElementLayout, flattenNodes, computeInlineEditorRect, smartArtNodeAtPoint, SMARTART_DEFAULT_PALETTE, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, centeredSvgTextLines, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, bringForward, sendBackward, bringToFront, sendToBack } from 'ooxml-ui/pptx';
2
+ import { defineThreeViewElement, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createCollaborationSessionController, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, createEditorHistoryController, historyTheme, crossedHistoryTheme, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, resolveMediaBookmarkTimesMs, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, resolveShowBackward, resolveShowForward, beginZoomExcursion, buildZoomTransitionOverride, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, INITIAL_FIND_REPLACE_SESSION, findReplaceSessionActions, visibleTemplateElements, createCollaborationLivePatcher, reportInlineTextDraft, initialInspectorOpen, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, resolveTextFillBlipUrls, seedRecentColors, resolveAuthoredCustomShowId, GlyphOutlineFontCache, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, resolveInitialSlideIndex, pptxLoadErrorMessage, resolveAutosaveIntervalMs, createAutosaveController, saveAutosaveSnapshot, updateMasterViewElement, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canMergeShapes, canInteractWithElement, prepareHtml2CanvasClone, html2canvasCaptureScope, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, DEFAULT_VIEWER_OPTIONS, resolveImageResolutionScale, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, createAutosaveRecoveryController, discardAutosaveRecovery, probeAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, rasterResultToPngBlob, downloadBlob, elementPictureFilename, canEditElementPoints, resolveGoogleFontsCss2Base, selectTrustedEmbeddedFonts, resolveFontWeight, resolveFontItalic, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, dispatchEditorKey, isFeatureEnabled, parentSelection, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, createCustomizationController, prepareElementForInsertion, slideSpaceElement, autosaveStatusKind, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, isKeyboardOpen, scopeLayoutOptionsToSlide, collaborationHistoryReady, bindCollaborationHistory, INITIAL_READ_ONLY_SESSION, readOnlySessionActions, applyReadOnlySessionEvent, readOnlyBannerVisible, readOnlyLocked, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, resolveCollaborationConfig, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, getResizeHandleHitAreaStyle, resolveElementInteractivity, getBackgroundAnimationState, getShapeEffectLayerPlacement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, getShapeEffectAnimationLayerStyle, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, resolvePalette as resolvePalette$1, mediaTransportVisible, oleActionsVisible, getGroupChildParentFill, deviceStrokeStageStyle, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, setPendingCaretPoint, resolveGroupDoubleClickTarget, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, contextMenuInspectorAnchor, savedPresentationFileName, deliverSavedPresentation, exportDeckJson, mapCustomizedEditorKey, isEditorTextInputTarget, groupElements, generateElementId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, planMergeShapes, applyMergeShapesPlan, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, createBlankSlide, insertSlidePaste, applySlidePasteTemplates, makeSlideId, insertedLayoutCompletion, buildSlideTemplateSlide, templateSchemeFromTheme, queueThemeWrite, needsOwnedSession, openOwnedCollaboration, resolveViewportFitOptions, editorViewportFitFor, calculateViewportFit, observeViewportClientSize, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, openUrlInNewTab, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, slideSpaceMembers, remapTextToSegments, getInlineEditorSelectionResult, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, createGestureController, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx as computeGridSpacingPx$1, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, rasterizeElement, cloneElementForPaste, applyPasteSpecialFormat, buildRasterPictureElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, writeBackReport, createSyncGate, observeExternalCollaborationReadiness, resolveHistoryDepth, lockExternalContentSetting, resolveAllowExternalContent, createBackstagePresentation, buildFieldSubstitutionContext, buildSlidesPaneFieldContext, buildSlidesPaneTableStyleContext, slidesPaneRehearsalTimings, openSlidesPaneLayoutGallery, getImageColorWashStyle, attachRotateHandlePlacement, getSelectionControlArtworkStyle, getSelectionOutlineColor, paintedStrokeWidth, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, getAnimationOpacity, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, strokeOutlineViewBox, buildSummaryZoomView, readEditableText, placeCaretAt, takePendingCaretPoint, getPendingSelectionRestore, restoreSegmentSelection, mapInlineTextFormatKey, mapInlineEditorChord, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, chartFormatTargetFromEvent, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, getAriaRoleDescription, getAriaLabel, elementIdSelector, TOOLBAR_TABS, resolveGroupPressTarget, scrollInspectorSectionIntoView, computeScrollDelta, buildOutlinePrintJobDocument, printJobRasterFallback, applyThemeByPath, withHistoryTheme, withHistoryMasterThemes, writeThemeParts, loadedThemeName, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, withCellStyle, getCellText, setCellText, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, stopCaptureStream, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, createSnapshotTextPositions, resolvePresentationAction, getImageSvgFilters, getCachedNativeImageSize, probeNativeImageSize, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, svgLineCap, screenStrokeWidth, connectorWrapperTransform, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, modelDataToBlobUrl, resolveZoomNavigationTarget, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, canDrillDown, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, measureSvgViewportRect, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, isWedgeCalloutPresetShape, getAriaRole as getAriaRole$1, isElementActionable, buildSmartArtPresetData, classifyMediaType, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, planPrintJob, openPrintWindow, buildVectorPrintJobDocument, openPendingPrintWindow, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, publishLiveGeometry, rasterizeElementTiledToCanvas, clampGifDimensions, rasterResultToPngDataUrl, shouldConfirmExternalHyperlink, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, findSmartArtNodeText, commitSmartArtNodeFill, commitSmartArtNodeText, groupIntoParagraphs as groupIntoParagraphs$1, createGlyphOutlineLookup, finishPrintWindow, buildRasterPrintJobDocument, applyMotionPathPreset, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, computeSmartArtElementLayout, flattenNodes, computeInlineEditorRect, smartArtNodeAtPoint, SMARTART_DEFAULT_PALETTE, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, centeredSvgTextLines, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, bringForward, sendBackward, bringToFront, sendToBack } from 'ooxml-ui/pptx';
3
3
  export { DUOTONE_PRESETS, MOBILE_BREAKPOINT, SLIDE_TRANSITION_KEYFRAMES, TABLET_BREAKPOINT, clearAudienceContent, computeVirtualRange, downloadBlob, getSlideTransitionAnimations, loadAudienceContent, storeAudienceContent } from 'ooxml-ui/pptx';
4
4
  import React17, { useRef, useState, useCallback, useEffect, useSyncExternalStore, useMemo, useContext, useLayoutEffect, createContext, useImperativeHandle, Suspense } from 'react';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -912,6 +912,7 @@ function useEditorHistory(input) {
912
912
  handleRedo,
913
913
  resetHistory,
914
914
  forgetHistory: history.forget,
915
+ attachCollaboration: history.attachCollaboration,
915
916
  markDirty,
916
917
  withoutUndoStep,
917
918
  buildHistorySnapshot
@@ -5644,7 +5645,7 @@ function useCanvasInteractions(input) {
5644
5645
  return;
5645
5646
  }
5646
5647
  const liveText = read?.snapshot.text ?? inlineEditingTextRef?.current ?? inlineEditingText;
5647
- const committedText = transformCommittedText ? transformCommittedText(liveText) : liveText;
5648
+ const committedText = transformCommittedText ? transformCommittedText(liveText, el.text) : liveText;
5648
5649
  const textPatch = buildInlineTextCommitPatch(
5649
5650
  el,
5650
5651
  committedText,
@@ -7116,7 +7117,7 @@ function createTableStructHandlers(input) {
7116
7117
  if (!el || el.type !== "table") {
7117
7118
  return;
7118
7119
  }
7119
- const text = transformCommittedText ? transformCommittedText(rawText) : rawText;
7120
+ const text = transformCommittedText ? transformCommittedText(rawText, getCellText(el, rowIndex, colIndex)) : rawText;
7120
7121
  const updates = {};
7121
7122
  if (el.tableData) {
7122
7123
  updates.tableData = setCellText(el, rowIndex, colIndex, text).tableData;
@@ -11988,6 +11989,70 @@ function buildCanvasProps(input) {
11988
11989
  }
11989
11990
  };
11990
11991
  }
11992
+ function useSlidesPaneProps({
11993
+ state,
11994
+ slides,
11995
+ canEdit,
11996
+ activeSlideIndex,
11997
+ slideSectionGroups,
11998
+ slideOps,
11999
+ sectionOps,
12000
+ recordedTimings,
12001
+ onOpenLayoutGallery
12002
+ }) {
12003
+ const { setActiveSlideIndex, setIsSlidesPaneOpen } = state;
12004
+ const fieldContext = useMemo(
12005
+ () => buildSlidesPaneFieldContext({
12006
+ headerFooter: state.headerFooter,
12007
+ customProperties: state.customProperties,
12008
+ firstSlideNumber: state.firstSlideNumber
12009
+ }),
12010
+ [state.headerFooter, state.customProperties, state.firstSlideNumber]
12011
+ );
12012
+ const tableStyleContext = useMemo(
12013
+ () => buildSlidesPaneTableStyleContext(state.theme, state.tableStyleMap),
12014
+ [state.theme, state.tableStyleMap]
12015
+ );
12016
+ const rehearsalTimings = useMemo(
12017
+ () => slidesPaneRehearsalTimings(recordedTimings),
12018
+ [recordedTimings]
12019
+ );
12020
+ const onOpenLayoutForSlide = useCallback(
12021
+ (slideIndex, x, y) => {
12022
+ openSlidesPaneLayoutGallery({ slideIndex, x, y }, setActiveSlideIndex, onOpenLayoutGallery);
12023
+ },
12024
+ [setActiveSlideIndex, onOpenLayoutGallery]
12025
+ );
12026
+ const onCollapse = useCallback(() => setIsSlidesPaneOpen(false), [setIsSlidesPaneOpen]);
12027
+ return {
12028
+ slides,
12029
+ templateElementsBySlideId: state.templateElementsBySlideId,
12030
+ activeSlideIndex,
12031
+ canvasSize: state.canvasSize,
12032
+ sectionGroups: slideSectionGroups,
12033
+ isOpen: state.isSlidesPaneOpen,
12034
+ canEdit,
12035
+ onSelectSlide: setActiveSlideIndex,
12036
+ onSlideContextMenu: slideOps.handleSlideContextMenu,
12037
+ onMoveSlide: slideOps.handleMoveSlide,
12038
+ onAddSlide: slideOps.handleAddSlide,
12039
+ onAddSlideAfter: slideOps.handleAddSlideAfter,
12040
+ onDuplicateSlides: slideOps.handleDuplicateSlides,
12041
+ onDeleteSlides: slideOps.handleDeleteSlides,
12042
+ onHideSlides: slideOps.handleToggleHideSlides,
12043
+ onOpenLayoutForSlide,
12044
+ onCollapse,
12045
+ onAddSection: sectionOps.addSection,
12046
+ onRenameSection: sectionOps.renameSection,
12047
+ onDeleteSection: sectionOps.deleteSection,
12048
+ onMoveSectionUp: sectionOps.moveSectionUp,
12049
+ onMoveSectionDown: sectionOps.moveSectionDown,
12050
+ onToggleSectionCollapse: sectionOps.toggleSectionCollapse,
12051
+ rehearsalTimings,
12052
+ fieldContext,
12053
+ tableStyleContext
12054
+ };
12055
+ }
11991
12056
 
11992
12057
  // src/viewer/hooks/createReviewCommentsHost.ts
11993
12058
  function createReviewCommentsHost(input) {
@@ -12462,7 +12527,7 @@ function RemoteSelectionOverlay({
12462
12527
  )) });
12463
12528
  }
12464
12529
  function useCollaborationDocumentSync(input) {
12465
- const { collaboration, ...state } = input;
12530
+ const { collaboration, history, ...state } = input;
12466
12531
  const latest = useRef(input);
12467
12532
  latest.current = input;
12468
12533
  const getSourceBytes = useCallback(() => {
@@ -12481,6 +12546,20 @@ function useCollaborationDocumentSync(input) {
12481
12546
  }
12482
12547
  }, []);
12483
12548
  const isConnected = config?.externalSession ? Boolean(collaboration?.doc) : collaboration?.status === "connected";
12549
+ const historyReady = collaborationHistoryReady({
12550
+ hasDoc: Boolean(doc),
12551
+ external: Boolean(config?.externalSession),
12552
+ connected: isConnected && !config?.externalSession,
12553
+ synced: collaboration?.synced ?? false,
12554
+ viewer: config?.role === "viewer"
12555
+ });
12556
+ const attachCollaboration = history?.attachCollaboration;
12557
+ useEffect(() => {
12558
+ if (!attachCollaboration || !doc || !historyReady) {
12559
+ return;
12560
+ }
12561
+ return bindCollaborationHistory({ attachCollaboration }, doc, collabModules.loadYjs);
12562
+ }, [attachCollaboration, doc, historyReady]);
12484
12563
  useYjsDocumentSync({
12485
12564
  ...state,
12486
12565
  doc: collaboration?.doc ?? null,
@@ -12517,6 +12596,7 @@ function useViewerBuildingBlocksCollaboration(input) {
12517
12596
  });
12518
12597
  useCollaborationDocumentSync({
12519
12598
  collaboration,
12599
+ history: input.core.history,
12520
12600
  content: input.content,
12521
12601
  slides: state.slides,
12522
12602
  setSlides: state.setSlides,
@@ -12621,7 +12701,7 @@ function useViewerBuildingBlocksCore(input) {
12621
12701
  setEditTemplateMode: state.setEditTemplateMode,
12622
12702
  setHeaderFooter: state.setHeaderFooter
12623
12703
  });
12624
- const { gridSpacingPx, visibleSlideIndexes, masterPseudoSlide } = useDerivedSlideState({
12704
+ const { gridSpacingPx, visibleSlideIndexes, masterPseudoSlide, slideSectionGroups } = useDerivedSlideState({
12625
12705
  slides,
12626
12706
  sections: state.sections,
12627
12707
  customShows: state.customShows,
@@ -12680,6 +12760,7 @@ function useViewerBuildingBlocksCore(input) {
12680
12760
  setExitModeHandler,
12681
12761
  masterPseudoSlide,
12682
12762
  gridSpacingPx,
12763
+ slideSectionGroups,
12683
12764
  // Multiplied against the pre-existing 2x baseline; see the matching
12684
12765
  // comment in `PowerPointViewer.tsx`.
12685
12766
  imageExportScale: 2 * resolveImageResolutionScale(viewerOptions),
@@ -13009,7 +13090,8 @@ function useViewerBuildingBlocks(input) {
13009
13090
  onSlideCountChange,
13010
13091
  onOpenSettings,
13011
13092
  onOpenHeaderFooter,
13012
- onOpenShareDialog
13093
+ onOpenShareDialog,
13094
+ onOpenLayoutGallery
13013
13095
  } = input;
13014
13096
  const collaborationConfig = resolveCollaborationConfig(input.collaboration);
13015
13097
  const [collaborationReadOnly, setCollaborationReadOnly] = useState(Boolean(collaborationConfig));
@@ -13057,6 +13139,7 @@ function useViewerBuildingBlocks(input) {
13057
13139
  presentation,
13058
13140
  masterPseudoSlide,
13059
13141
  gridSpacingPx,
13142
+ slideSectionGroups,
13060
13143
  viewerOptions
13061
13144
  } = core;
13062
13145
  const canEdit = resolveCollaborationShellEditability({
@@ -13163,6 +13246,17 @@ function useViewerBuildingBlocks(input) {
13163
13246
  ${url}`
13164
13247
  });
13165
13248
  canvasProps.collaborationOverlay = overlay;
13249
+ const slidesPaneProps = useSlidesPaneProps({
13250
+ state,
13251
+ slides,
13252
+ canEdit,
13253
+ activeSlideIndex,
13254
+ slideSectionGroups,
13255
+ slideOps: editorOps.slideOps,
13256
+ sectionOps: editorOps.sectionOps,
13257
+ recordedTimings: presentation.recordedTimings,
13258
+ onOpenLayoutGallery
13259
+ });
13166
13260
  const shellState = useMemo(
13167
13261
  () => resolveCollaborationShellState({
13168
13262
  authorizedCanEdit: requestedCanEdit,
@@ -13187,6 +13281,7 @@ ${url}`
13187
13281
  return {
13188
13282
  toolbarProps,
13189
13283
  canvasProps,
13284
+ slidesPaneProps,
13190
13285
  mode,
13191
13286
  loading,
13192
13287
  error,
Binary file
Binary file
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ var host = require('ooxml-ui/pptx/ai/host');
4
+ var react = require('react');
5
+ var lu = require('react-icons/lu');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ // src/viewer/ai-assistant-registry.ts
9
+ var aiAssistants = host.createAiAssistantRegistry({
10
+ owner: "pptx-react-viewer"
11
+ });
12
+ var AiChatPanel = /* @__PURE__ */ react.lazy(async () => {
13
+ const [{ useChat }, { default: Panel }] = await Promise.all([
14
+ import('@ai-sdk/react'),
15
+ import('./AiChatPanel-7DESUEAZ.js')
16
+ ]);
17
+ function BoundAiChatPanel(props) {
18
+ return /* @__PURE__ */ jsxRuntime.jsx(Panel, { ...props, useChat });
19
+ }
20
+ return { default: BoundAiChatPanel };
21
+ });
22
+ function AiChatPanelLazy(props) {
23
+ return /* @__PURE__ */ jsxRuntime.jsx(
24
+ react.Suspense,
25
+ {
26
+ fallback: /* @__PURE__ */ jsxRuntime.jsx(
27
+ "div",
28
+ {
29
+ className: "absolute right-0 top-0 z-30 flex h-full w-80 items-center justify-center border-l border-border bg-card text-muted-foreground max-md:inset-x-0 max-md:top-auto max-md:bottom-0 max-md:h-[75dvh] max-md:w-full max-md:rounded-t-2xl max-md:border-l-0 max-md:border-t max-md:shadow-2xl",
30
+ style: props.panelWidth ? { width: props.panelWidth } : void 0,
31
+ children: /* @__PURE__ */ jsxRuntime.jsx(lu.LuLoaderCircle, { className: "w-5 h-5 animate-spin" })
32
+ }
33
+ ),
34
+ children: /* @__PURE__ */ jsxRuntime.jsx(AiChatPanel, { ...props })
35
+ }
36
+ );
37
+ }
38
+
39
+ exports.AiChatPanelLazy = AiChatPanelLazy;
40
+ exports.aiAssistants = aiAssistants;
Binary file
Binary file
@@ -0,0 +1,37 @@
1
+ import { createAiAssistantRegistry } from 'ooxml-ui/pptx/ai/host';
2
+ import { Suspense, lazy } from 'react';
3
+ import { LuLoaderCircle } from 'react-icons/lu';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/viewer/ai-assistant-registry.ts
7
+ var aiAssistants = createAiAssistantRegistry({
8
+ owner: "pptx-react-viewer"
9
+ });
10
+ var AiChatPanel = /* @__PURE__ */ lazy(async () => {
11
+ const [{ useChat }, { default: Panel }] = await Promise.all([
12
+ import('@ai-sdk/react'),
13
+ import('./AiChatPanel-GQ64SIYP.mjs')
14
+ ]);
15
+ function BoundAiChatPanel(props) {
16
+ return /* @__PURE__ */ jsx(Panel, { ...props, useChat });
17
+ }
18
+ return { default: BoundAiChatPanel };
19
+ });
20
+ function AiChatPanelLazy(props) {
21
+ return /* @__PURE__ */ jsx(
22
+ Suspense,
23
+ {
24
+ fallback: /* @__PURE__ */ jsx(
25
+ "div",
26
+ {
27
+ className: "absolute right-0 top-0 z-30 flex h-full w-80 items-center justify-center border-l border-border bg-card text-muted-foreground max-md:inset-x-0 max-md:top-auto max-md:bottom-0 max-md:h-[75dvh] max-md:w-full max-md:rounded-t-2xl max-md:border-l-0 max-md:border-t max-md:shadow-2xl",
28
+ style: props.panelWidth ? { width: props.panelWidth } : void 0,
29
+ children: /* @__PURE__ */ jsx(LuLoaderCircle, { className: "w-5 h-5 animate-spin" })
30
+ }
31
+ ),
32
+ children: /* @__PURE__ */ jsx(AiChatPanel, { ...props })
33
+ }
34
+ );
35
+ }
36
+
37
+ export { AiChatPanelLazy, aiAssistants };
Binary file
Binary file