@aixa-transformation/pptx-viewer 2.0.24 → 2.0.29

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.
@@ -1,11 +1,12 @@
1
- import { DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, MIN_ELEMENT_SIZE, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, useReducedMotion, useViewerState, useViewerOptions, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useLayoutSwitching, useYjsDocumentSync, useFollowMode, useBroadcastFollower, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getCropShapeClipPath, resolvePalette, resolveStyle, layoutToCategory, wrapChrome, isImageTiled, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, buildTextBody3DSceneStyle, SLIDE_TRANSITION_OPTIONS, SLIDE_NAV_THUMBNAIL_WIDTH, scopeLayoutOptionsToActiveSlide, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useCollaborativeState, styleShadow, styleStroke, colour, fitFontSize, smartArtNodeGroupProps, chevronPoints, SmartArtNodeText, contrastingTextColor, renderStepDownProcess, renderAlternatingFlow, renderDescendingProcess, renderPictureAccentList, renderVerticalBlockList, renderGroupedList, renderPyramidList, renderHorizontalPictureList, renderAccentProcess, renderVerticalChevronList, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, TOOLBAR_SECTIONS, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, buildTree, treeWidth, treeDepth, nodeOpacity, truncate, gearPath, resolveSmartArtDataPalette, HYPERLINK_COLOR, GRID_SIZE, startPreviewAnimation, stopPreviewAnimation } from './chunk-RI6OBMEG.mjs';
2
- import { normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, getElementTransform, isEditableTextElement, getAriaRole, getAriaLabel, getAriaRoleDescription, getImageEffectsOpacity, getImageEffectsFilter, getElementTransformWithoutRotation, ACTION_BUTTON_PRESETS, getElementLabel, RULER_THICKNESS, RULER_FONT_SIZE, EQUATION_TEMPLATES, convertLatexToOmml, convertOmmlToMathMl, sanitizeMathMl, DEFAULT_VIEWER_OPTIONS, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, viewerOptionsToPreferences, applyPreferenceToOptions, listAutosaveSnapshots, deleteAutosaveSnapshot, createBackstagePresentation, buildCssGradientFromShapeStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getGroupChildParentFill, revealedSmartArtNodeCount, buildSmartArtA11y, buildSummaryZoomView, getImageColorWashStyle, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, applyChartBuildReveal, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleTypeColor, getOleTypeLabel, resolveGroupChildFill, shouldUseSvgWarp, buildPreviewElements, themeToCssVars, DEFAULT_INSERT_CHART_TYPE, hasCopyableFormat, printPropertiesFrameSlides, printPropertiesSlidesPerPage, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, resolveDrawingShapeNodeId, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, findChartPartTarget, dragValueForPart, withChartPointValue, dragAnchorViewY, withChartTitle, computeSmartArtLayout, buildSmartArt3DModel, extractPathPoints, generatePressureCircles, isBrowserOpenableMime, formatBytes, getOleBadgeLabel, openUrlInNewTab, getWarpPath, getSlideBackgroundStyle, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, shouldConfirmExternalHyperlink, safeOpenUrl, isPpactionUrl, parsePpactionUrl, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, clampPercent, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, activateModalFocus, buildCollaborationShareUrl, presentationInkPath, mobileElapsedSince, isFirstSlide, isLastSlide, formatMobileElapsed, mobileSlideCounter, formatElapsed, computeInlineEditorRect, findSmartArtNodeText, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, groupIntoParagraphs, substituteFieldText, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, INSERT_CHART_TYPES, SLIDE_VIRTUALIZATION_THRESHOLD, getShapeAdjustmentHandleDescriptor, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, formatSlideCounter, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, QUICK_ACCESS_COMMAND_CATALOG, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, getConnectionSites, generateTicks, getCommentMarkerPosition, buildThemeColorGrid, THEME_COLOR_LABELS, buildSmartArtPresetData, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, TABLE_STYLE_PRESETS, withFrameSlides, withSlidesPerPage, formatCommentTimestamp, DIRECTIONAL_PRESETS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, DUOTONE_PRESETS, ARTISTIC_EFFECTS, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS } from './chunk-45A3IISI.mjs';
1
+ import { DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, useReducedMotion, useViewerState, useViewerOptions, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useLayoutSwitching, useYjsDocumentSync, useFollowMode, useBroadcastFollower, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getCropShapeClipPath, MIN_ELEMENT_SIZE, resolvePalette, resolveStyle, layoutToCategory, wrapChrome, isImageTiled, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, buildTextBody3DSceneStyle, SLIDE_TRANSITION_OPTIONS, SLIDE_NAV_THUMBNAIL_WIDTH, scopeLayoutOptionsToActiveSlide, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useCollaborativeState, styleShadow, styleStroke, colour, fitFontSize, smartArtNodeGroupProps, chevronPoints, SmartArtNodeText, contrastingTextColor, renderStepDownProcess, renderAlternatingFlow, renderDescendingProcess, renderPictureAccentList, renderVerticalBlockList, renderGroupedList, renderPyramidList, renderHorizontalPictureList, renderAccentProcess, renderVerticalChevronList, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, TOOLBAR_SECTIONS, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, buildTree, treeWidth, treeDepth, nodeOpacity, truncate, gearPath, resolveSmartArtDataPalette, HYPERLINK_COLOR, GRID_SIZE, startPreviewAnimation, stopPreviewAnimation } from './chunk-TYXOHBKR.mjs';
2
+ import { normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, getElementTransform, isEditableTextElement, getAriaRole, getAriaLabel, getAriaRoleDescription, getImageEffectsOpacity, getImageEffectsFilter, getElementTransformWithoutRotation, ACTION_BUTTON_PRESETS, getElementLabel, RULER_THICKNESS, RULER_FONT_SIZE, EQUATION_TEMPLATES, convertLatexToOmml, convertOmmlToMathMl, sanitizeMathMl, DEFAULT_VIEWER_OPTIONS, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, viewerOptionsToPreferences, applyPreferenceToOptions, listAutosaveSnapshots, deleteAutosaveSnapshot, createBackstagePresentation, buildCssGradientFromShapeStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getGroupChildParentFill, revealedSmartArtNodeCount, buildSmartArtA11y, buildSummaryZoomView, getImageColorWashStyle, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, applyChartBuildReveal, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleTypeColor, getOleTypeLabel, resolveGroupChildFill, shouldUseSvgWarp, buildPreviewElements, themeToCssVars, DEFAULT_INSERT_CHART_TYPE, hasCopyableFormat, printPropertiesFrameSlides, printPropertiesSlidesPerPage, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, resolveDrawingShapeNodeId, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, findChartPartTarget, dragValueForPart, withChartPointValue, dragAnchorViewY, withChartTitle, computeSmartArtLayout, buildSmartArt3DModel, extractPathPoints, generatePressureCircles, isBrowserOpenableMime, formatBytes, getOleBadgeLabel, openUrlInNewTab, getWarpPath, getSlideBackgroundStyle, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, shouldConfirmExternalHyperlink, safeOpenUrl, isPpactionUrl, parsePpactionUrl, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, clampPercent, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, activateModalFocus, buildCollaborationShareUrl, presentationInkPath, mobileElapsedSince, isFirstSlide, isLastSlide, formatMobileElapsed, mobileSlideCounter, formatElapsed, computeInlineEditorRect, findSmartArtNodeText, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, groupIntoParagraphs, substituteFieldText, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, INSERT_CHART_TYPES, SLIDE_VIRTUALIZATION_THRESHOLD, getShapeAdjustmentHandleDescriptor, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, formatSlideCounter, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, QUICK_ACCESS_COMMAND_CATALOG, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, getConnectionSites, generateTicks, getCommentMarkerPosition, buildThemeColorGrid, THEME_COLOR_LABELS, buildSmartArtPresetData, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, TABLE_STYLE_PRESETS, withFrameSlides, withSlidesPerPage, formatCommentTimestamp, DIRECTIONAL_PRESETS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, DUOTONE_PRESETS, ARTISTIC_EFFECTS, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS } from './chunk-YVQPLQ3C.mjs';
3
3
  import { LOCALE_CATALOG, translationsEn } from './chunk-2X72MOPZ.mjs';
4
- import { hasShapeProperties, hasTextProperties, isInkElement, SWITCHABLE_LAYOUT_TYPES, isImageLikeElement, getLinkedTextBoxSegments, getSubstituteFontFamily, themeColorSchemesEqual, setSmartArtNodeStyle, updateSmartArtNodeText, THEME_COLOR_SCHEME_KEYS, chartDataChangeType, chartDataUpdatePoint, chartDataAddCategory, chartDataRemoveCategory, chartDataAddSeries, chartDataRemoveSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, getOleObjectTypeLabel, pptxActionToElementAction, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, addSmartArtNodeAsChild, removeSmartArtNode, elementActionToPptxAction, switchSmartArtLayout, addSmartArtNode, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode } from './chunk-LTBO2ZJC.mjs';
4
+ import { hasShapeProperties, hasTextProperties, isInkElement, SWITCHABLE_LAYOUT_TYPES, isImageLikeElement, getLinkedTextBoxSegments, getSubstituteFontFamily, themeColorSchemesEqual, setSmartArtNodeStyle, updateSmartArtNodeText, THEME_COLOR_SCHEME_KEYS, chartDataChangeType, chartDataUpdatePoint, chartDataAddCategory, chartDataRemoveCategory, chartDataAddSeries, chartDataRemoveSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, getOleObjectTypeLabel, pptxActionToElementAction, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, addSmartArtNodeAsChild, removeSmartArtNode, elementActionToPptxAction, switchSmartArtLayout, addSmartArtNode, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode } from './chunk-JJ5MVLCK.mjs';
5
5
  import React18, { createContext, useMemo, useState, useCallback, forwardRef, useEffect, useRef, Suspense, useLayoutEffect, useContext, useDeferredValue } from 'react';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
7
  import { useTranslation } from 'react-i18next';
8
8
  import { LuRotateCw, LuMessageSquare, LuEyeOff, LuSettings, LuX, LuCalendarDays, LuHash, LuText, LuCast, LuSave, LuUndo, LuRedo, LuSearch, LuShieldCheck, LuPlus, LuPanelLeftClose, LuStickyNote, LuMonitor, LuColumns2, LuPresentation, LuMinus, LuLayers, LuSettings2, LuClock, LuDownload, LuTrash2, LuCheck, LuLock, LuEye, LuFileText, LuType, LuLoader, LuShieldAlert, LuSignature, LuInfo, LuTriangleAlert, LuPrinter, LuPenTool, LuChevronUp, LuChevronDown, LuWifi, LuWifiOff, LuUsers, LuCopy, LuChevronLeft, LuChevronRight, LuPlay, LuPause, LuMenu, LuSparkles, LuShare2, LuPanelLeft, LuPanelRight, LuArrowLeft, LuFolderOpen, LuPackage, LuFileImage, LuVideo, LuBox, LuClipboardPaste, LuScissors, LuPaintbrush, LuUpload, LuSquare, LuImage, LuDatabase, LuAArrowUp, LuAArrowDown, LuRemoveFormatting, LuHighlighter, LuList, LuListOrdered, LuIndentDecrease, LuIndentIncrease, LuReplace, LuMousePointer2, LuShapes, LuPaintBucket, LuPenLine, LuPalette, LuPencil, LuStar, LuMoveRight, LuMousePointerClick, LuClock3, LuMonitorPlay, LuListVideo, LuCaptions, LuCamera, LuEraser, LuRotateCcw, LuCircleHelp, LuSpellCheck, LuBookOpen, LuLanguages, LuGlobe, LuGitCompare, LuMessageSquarePlus, LuLockKeyhole, LuPanelTop, LuLayoutGrid, LuGrid3X3, LuPipette, LuRuler, LuZoomIn, LuMaximize2, LuCode, LuCaseSensitive, LuTimer, LuGripVertical, LuBold, LuItalic, LuUnderline, LuStrikethrough, LuLink, LuGrid2X2, LuCopyPlus, LuCirclePlay, LuCirclePause, LuZoomOut, LuScan, LuMonitorOff, LuClipboardCopy, LuWand, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuFilePlus2, LuHouse, LuUser, LuHardDrive, LuLogIn, LuFolderPlus, LuAlignLeft, LuAlignCenter, LuAlignRight, LuAlignJustify, LuColumns3, LuSpline, LuAlignHorizontalSpaceAround, LuAlignVerticalSpaceAround, LuMove, LuRadio, LuLockOpen, LuArrowDown, LuArrowUp, LuArrowRight, LuReply, LuBookmark } from 'react-icons/lu';
9
+ import JSZip from 'jszip';
9
10
 
10
11
  var ViewerThemeContext = createContext(void 0);
11
12
  function ViewerThemeProvider({ theme, children }) {
@@ -1334,7 +1335,7 @@ function AccountPage() {
1334
1335
  return void 0;
1335
1336
  });
1336
1337
  };
1337
- const version = "2.0.24" ;
1338
+ const version = "2.0.29" ;
1338
1339
  return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
1339
1340
  /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
1340
1341
  /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
@@ -2616,8 +2617,14 @@ var ConnectorElementRenderer = React18.memo(
2616
2617
  style: {
2617
2618
  left: el.x,
2618
2619
  top: el.y,
2619
- width: Math.max(el.width, MIN_ELEMENT_SIZE),
2620
- height: Math.max(el.height, MIN_ELEMENT_SIZE),
2620
+ // Do not apply the editor's minimum resize-box size to the visual
2621
+ // connector canvas. A horizontal OOXML connector commonly has a
2622
+ // zero (or sub-pixel) height; expanding that canvas to 12px changes
2623
+ // the SVG aspect ratio and makes a straight PowerPoint line appear
2624
+ // diagonal and displaced. The transparent SVG stroke below already
2625
+ // provides a comfortably large interaction target.
2626
+ width: viewWidth,
2627
+ height: viewHeight,
2621
2628
  transform: getElementTransform(el),
2622
2629
  transformOrigin: "center",
2623
2630
  background: "transparent",
@@ -2882,7 +2889,8 @@ function getContainerStyle({
2882
2889
  const blurGrowVisible = Boolean(
2883
2890
  ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
2884
2891
  );
2885
- const overflowValue = has3DExtrusion || blurGrowVisible ? "visible" : isImg ? "hidden" : void 0;
2892
+ const overflowValue = el.type === "table" || has3DExtrusion || blurGrowVisible ? "visible" : isImg ? "hidden" : void 0;
2893
+ const allowsUnclippedTextOverflow = hasTextProperties(el) && el.textStyle?.autoFitMode === "none" && el.textStyle?.vertOverflow !== "clip" && (!("shapeType" in el) || el.shapeType === void 0 || el.shapeType === "rect");
2886
2894
  return {
2887
2895
  left: isFullscreenMedia ? 0 : el.x,
2888
2896
  top: isFullscreenMedia ? 0 : el.y,
@@ -2900,6 +2908,10 @@ function getContainerStyle({
2900
2908
  transition: isFullscreenMedia ? "left 0.3s ease, top 0.3s ease, width 0.3s ease, height 0.3s ease" : void 0,
2901
2909
  borderColor: isFullscreenMedia ? "transparent" : void 0,
2902
2910
  ...shapeVisualStyle,
2911
+ // A rectangle clip-path is useful for painted shapes, but it must not
2912
+ // clip a:noAutofit text. PowerPoint allows that text to continue beyond
2913
+ // the placeholder boundary when vertOverflow is not `clip`.
2914
+ ...allowsUnclippedTextOverflow ? { overflow: "visible", clipPath: "none" } : {},
2903
2915
  // Editable-template affordance: a distinct amber dashed ring + slight
2904
2916
  // transparency so inherited master/layout shapes read as "template" while
2905
2917
  // edit-template mode is on. Applied after the shape style so it wins; never
@@ -3841,7 +3853,7 @@ function FailedToLoad() {
3841
3853
  var LazyModel3DScene = React18.lazy(
3842
3854
  async () => {
3843
3855
  try {
3844
- return await import('./Model3DScene-QPOSBRM4.mjs');
3856
+ return await import('./Model3DScene-OOLYRN3I.mjs');
3845
3857
  } catch {
3846
3858
  return { default: FailedToLoad };
3847
3859
  }
@@ -6183,6 +6195,10 @@ function ActionButtonGlyphOverlay({
6183
6195
  }
6184
6196
  );
6185
6197
  }
6198
+ function shouldRenderTextBody(isTextElement, hasActualText, promptText, isPresentationPassive) {
6199
+ if (!isTextElement) return Boolean(promptText) && !isPresentationPassive;
6200
+ return hasActualText || !promptText || !isPresentationPassive;
6201
+ }
6186
6202
  function renderTextElementBody(options) {
6187
6203
  const {
6188
6204
  el,
@@ -6213,12 +6229,22 @@ function renderTextElementBody(options) {
6213
6229
  ...scene3dStyle?.transformStyle ? { transformStyle: scene3dStyle.transformStyle } : {},
6214
6230
  ...isLinkedTextBox ? { overflow: "hidden" } : {}
6215
6231
  };
6232
+ const allowsNaturalVerticalOverflow = hasTextProperties(el) && el.textStyle?.autoFitMode === "none" && el.textStyle?.vertOverflow !== "clip" && (el.textStyle?.vAlign === void 0 || el.textStyle.vAlign === "top") && !isLinkedTextBox;
6233
+ const textBodySizeStyle = allowsNaturalVerticalOverflow ? { height: "auto", minHeight: "100%" } : void 0;
6216
6234
  const shapeType = "shapeType" in el ? el.shapeType : void 0;
6217
- const shouldRenderText = isTxtEl || hasTextProperties(el) && Boolean(el.promptText);
6235
+ const textProperties = hasTextProperties(el) ? el : void 0;
6236
+ const hasActualText = Boolean(textProperties?.text) || Boolean(textProperties?.textSegments?.length);
6237
+ const shouldRenderText = shouldRenderTextBody(
6238
+ isTxtEl,
6239
+ hasActualText,
6240
+ textProperties?.promptText,
6241
+ isPresentationPassive
6242
+ );
6243
+ if (!shouldRenderText) return null;
6218
6244
  return /* @__PURE__ */ jsxs(Fragment, { children: [
6219
6245
  vecShape,
6220
6246
  isActionButtonShape(shapeType) && /* @__PURE__ */ jsx(ActionButtonGlyphOverlay, { element: el }),
6221
- shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsx(
6247
+ useSvgWarp ? /* @__PURE__ */ jsx(
6222
6248
  "div",
6223
6249
  {
6224
6250
  className: cn(
@@ -6249,7 +6275,8 @@ function renderTextElementBody(options) {
6249
6275
  ...getTextLayoutStyle(el),
6250
6276
  ...txtS,
6251
6277
  ...getTextWarpStyle(txtSE),
6252
- ...transformStyle
6278
+ ...transformStyle,
6279
+ ...textBodySizeStyle
6253
6280
  },
6254
6281
  children: renderTextSegments(
6255
6282
  el,
@@ -6263,7 +6290,7 @@ function renderTextElementBody(options) {
6263
6290
  !isPresentationPassive
6264
6291
  )
6265
6292
  }
6266
- ))
6293
+ )
6267
6294
  ] });
6268
6295
  }
6269
6296
  function ZoomElementRenderer({
@@ -6664,7 +6691,9 @@ function StaticElementRendererImpl({
6664
6691
  element.type === "shape" && hasFill ? "#ffffff" : DEFAULT_TEXT_COLOR
6665
6692
  );
6666
6693
  const isImage = element.type === "picture" || element.type === "image";
6667
- const allowsTextOverflow = hasTextProperties(element) && element.textStyle?.vertOverflow !== "clip";
6694
+ const isTable = element.type === "table";
6695
+ const allowsTextOverflow = isTable || hasTextProperties(element) && element.textStyle?.vertOverflow !== "clip";
6696
+ const allowsUnclippedTextOverflow = hasTextProperties(element) && element.textStyle?.autoFitMode === "none" && element.textStyle?.vertOverflow !== "clip" && (!("shapeType" in element) || element.shapeType === void 0 || element.shapeType === "rect");
6668
6697
  return /* @__PURE__ */ jsxs(
6669
6698
  "div",
6670
6699
  {
@@ -6678,7 +6707,8 @@ function StaticElementRendererImpl({
6678
6707
  transform: positioned ? getElementTransform(element) : void 0,
6679
6708
  transformOrigin: "center",
6680
6709
  zIndex,
6681
- ...visualStyle
6710
+ ...visualStyle,
6711
+ ...allowsUnclippedTextOverflow || isTable ? { overflow: "visible", clipPath: "none" } : {}
6682
6712
  },
6683
6713
  children: [
6684
6714
  /* @__PURE__ */ jsx(ShapeEffectOverlay, { element }),
@@ -6718,7 +6748,10 @@ function StaticElementRendererImpl({
6718
6748
  onEditChange: noop,
6719
6749
  onCommit: noop,
6720
6750
  onCancel: noop,
6721
- isPresentationPassive: false,
6751
+ // Inherited master/layout and preview elements are read-only. Keeping
6752
+ // this passive prevents edit-time placeholder prompts and missing-media
6753
+ // diagnostics from leaking into the rendered slide.
6754
+ isPresentationPassive: STATIC_ELEMENTS_ARE_PRESENTATION_PASSIVE,
6722
6755
  slideElements: activeSlide?.elements,
6723
6756
  allSlides,
6724
6757
  sourceSlideIndex,
@@ -6733,6 +6766,7 @@ function StaticElementRendererImpl({
6733
6766
  }
6734
6767
  var StaticElementRenderer = React18.memo(StaticElementRendererImpl);
6735
6768
  StaticElementRenderer.displayName = "StaticElementRenderer";
6769
+ var STATIC_ELEMENTS_ARE_PRESENTATION_PASSIVE = true;
6736
6770
  function LayoutPreview({ layout }) {
6737
6771
  const width = Math.max(layout.previewWidth ?? 960, 1);
6738
6772
  const height = Math.max(layout.previewHeight ?? 540, 1);
@@ -7029,6 +7063,13 @@ var COMMON_FONTS = [
7029
7063
  "Verdana"
7030
7064
  ];
7031
7065
  var COMMON_SIZES = [8, 9, 10, 11, 12, 14, 16, 18, 20, 24, 28, 32, 36, 40, 44, 48, 54, 60, 72, 96];
7066
+ var CUSTOM_FONT_FILE_EXTENSION = /\.(?:ttf|otf|woff2?)$/iu;
7067
+ var getZipEntryBaseName = (path) => path.replace(/\\/gu, "/").split("/").filter(Boolean).pop() ?? path;
7068
+ var isUsableZipFontEntry = (path) => {
7069
+ const normalized = path.replace(/\\/gu, "/").toLowerCase();
7070
+ if (normalized.includes("__macosx/") || normalized.endsWith("/.ds_store")) return false;
7071
+ return CUSTOM_FONT_FILE_EXTENSION.test(normalized);
7072
+ };
7032
7073
  function HomeSection(p) {
7033
7074
  const { t } = useTranslation();
7034
7075
  const [fontMenuOpen, setFontMenuOpen] = useState(false);
@@ -7061,33 +7102,89 @@ function HomeSection(p) {
7061
7102
  p.onUpdateTextStyle?.({ fontFamily: family });
7062
7103
  setFontMenuOpen(false);
7063
7104
  };
7064
- const registerLocalFont = async (file) => {
7065
- const stem = file.name.replace(/\.(?:ttf|otf|woff2?)$/iu, "");
7105
+ const fontSourceFromFile = async (file) => {
7106
+ const baseName = getZipEntryBaseName(file.name);
7107
+ const stem = baseName.replace(CUSTOM_FONT_FILE_EXTENSION, "");
7066
7108
  const bold = /(?:^|[-_\s])(?:bold|semibold|demibold|black)(?:$|[-_\s])/iu.test(stem);
7067
7109
  const italic = /(?:^|[-_\s])(?:italic|oblique)(?:$|[-_\s])/iu.test(stem);
7068
7110
  const family = stem.replace(/(?:[-_\s])(?:regular|normal|book|medium|bold|semibold|demibold|black|italic|oblique)+$/iu, "").replace(/[-_]+/gu, " ").trim();
7069
- if (!family || typeof FontFace === "undefined") {
7070
- return;
7111
+ if (!family) return null;
7112
+ const normalizedName = baseName.toLowerCase();
7113
+ const format = normalizedName.endsWith(".woff2") ? "woff2" : normalizedName.endsWith(".woff") ? "woff" : normalizedName.endsWith(".otf") ? "opentype" : "truetype";
7114
+ return {
7115
+ family,
7116
+ src: URL.createObjectURL(file),
7117
+ format,
7118
+ weight: bold ? 700 : 400,
7119
+ style: italic ? "italic" : "normal",
7120
+ data: await file.arrayBuffer()
7121
+ };
7122
+ };
7123
+ const registerFontSources = async (sources) => {
7124
+ if (typeof FontFace === "undefined") return;
7125
+ const loadedSources = [];
7126
+ for (const source of sources) {
7127
+ try {
7128
+ const face = new FontFace(source.family, source.data, {
7129
+ weight: String(source.weight ?? 400),
7130
+ style: source.style ?? "normal"
7131
+ });
7132
+ await face.load();
7133
+ document.fonts.add(face);
7134
+ loadedSources.push(source);
7135
+ } catch (error) {
7136
+ console.warn(`[PowerPointViewer] Could not load custom font ${source.family}.`, error);
7137
+ }
7071
7138
  }
7072
- const face = new FontFace(family, await file.arrayBuffer(), {
7073
- weight: bold ? "700" : "400",
7074
- style: italic ? "italic" : "normal"
7075
- });
7076
- await face.load();
7077
- document.fonts.add(face);
7078
- const next = Array.from(/* @__PURE__ */ new Set([...customFontFamilies, family]));
7139
+ if (loadedSources.length === 0) {
7140
+ throw new Error("None of the selected font files could be loaded by this browser.");
7141
+ }
7142
+ const next = Array.from(/* @__PURE__ */ new Set([...customFontFamilies, ...loadedSources.map((source) => source.family)]));
7079
7143
  setCustomFontFamilies(next);
7080
7144
  const fontWindow = window;
7081
7145
  fontWindow.__AIXA_PPTX_CUSTOM_FONT_FAMILIES__ = next;
7082
7146
  window.dispatchEvent(new CustomEvent("aixa:pptx-custom-fonts", { detail: next }));
7083
- applyFont(family);
7147
+ if (loadedSources[0]) applyFont(loadedSources[0].family);
7148
+ };
7149
+ const registerLocalFontPackage = async (file) => {
7150
+ let sources = [];
7151
+ if (/\.zip$/iu.test(file.name)) {
7152
+ const zip = await JSZip.loadAsync(file);
7153
+ const entries = Object.values(zip.files).filter(
7154
+ (entry) => !entry.dir && isUsableZipFontEntry(entry.name)
7155
+ );
7156
+ sources = (await Promise.all(entries.map(async (entry) => {
7157
+ const blob = await entry.async("blob");
7158
+ return fontSourceFromFile(
7159
+ new File([blob], getZipEntryBaseName(entry.name), { type: blob.type })
7160
+ );
7161
+ }))).filter((source) => Boolean(source));
7162
+ } else {
7163
+ const source = await fontSourceFromFile(file);
7164
+ if (source) sources = [source];
7165
+ }
7166
+ if (sources.length === 0) throw new Error("No browser-compatible font files were found.");
7167
+ await p.onUploadCustomFontPackage?.(
7168
+ file,
7169
+ sources.map(({ data: _data, ...source }) => source)
7170
+ );
7171
+ await registerFontSources(sources);
7172
+ p.onEmbedCustomFonts?.(
7173
+ sources.map((source) => ({
7174
+ name: source.family,
7175
+ dataUrl: "",
7176
+ bold: Number(source.weight ?? 400) >= 600,
7177
+ italic: source.style === "italic" || source.style === "oblique",
7178
+ format: source.format,
7179
+ rawFontData: new Uint8Array(source.data.slice(0))
7180
+ }))
7181
+ );
7084
7182
  };
7085
7183
  useEffect(() => {
7086
7184
  const handleCustomFonts = (event) => {
7087
7185
  const families = event.detail;
7088
- setCustomFontFamilies(
7089
- Array.isArray(families) ? families.filter((family) => typeof family === "string" && family.trim().length > 0) : []
7090
- );
7186
+ const incoming = Array.isArray(families) ? families.filter((family) => typeof family === "string" && family.trim().length > 0) : [];
7187
+ setCustomFontFamilies((current) => Array.from(/* @__PURE__ */ new Set([...current, ...incoming])));
7091
7188
  };
7092
7189
  window.addEventListener("aixa:pptx-custom-fonts", handleCustomFonts);
7093
7190
  return () => window.removeEventListener("aixa:pptx-custom-fonts", handleCustomFonts);
@@ -7278,7 +7375,7 @@ function HomeSection(p) {
7278
7375
  onClick: () => fontFileInputRef.current?.click(),
7279
7376
  children: [
7280
7377
  /* @__PURE__ */ jsx(LuUpload, { className: "h-4 w-4" }),
7281
- "Add custom font file"
7378
+ "Add custom font package"
7282
7379
  ]
7283
7380
  }
7284
7381
  ),
@@ -7287,11 +7384,11 @@ function HomeSection(p) {
7287
7384
  {
7288
7385
  ref: fontFileInputRef,
7289
7386
  type: "file",
7290
- accept: ".ttf,.otf,.woff,.woff2,font/ttf,font/otf,font/woff,font/woff2",
7387
+ accept: ".zip,.ttf,.otf,.woff,.woff2,application/zip,font/ttf,font/otf,font/woff,font/woff2",
7291
7388
  className: "hidden",
7292
7389
  onChange: (event) => {
7293
7390
  const file = event.currentTarget.files?.[0];
7294
- if (file) void registerLocalFont(file);
7391
+ if (file) void registerLocalFontPackage(file);
7295
7392
  event.currentTarget.value = "";
7296
7393
  }
7297
7394
  }
@@ -10479,7 +10576,9 @@ function Toolbar(p) {
10479
10576
  selectedElement: p.selectedElement,
10480
10577
  onUpdateTextStyle: p.onUpdateTextStyle,
10481
10578
  themeFonts: p.themeFonts,
10482
- embeddedFontFamilies: p.embeddedFontFamilies
10579
+ embeddedFontFamilies: p.embeddedFontFamilies,
10580
+ onEmbedCustomFonts: p.onEmbedCustomFonts,
10581
+ onUploadCustomFontPackage: p.onUploadCustomFontPackage
10483
10582
  }
10484
10583
  ),
10485
10584
  sIns && /* @__PURE__ */ jsx(
@@ -29974,6 +30073,8 @@ function ViewerToolbarSection(props) {
29974
30073
  onOpenHeaderFooter,
29975
30074
  onOpenShareDialog,
29976
30075
  onOpenFile,
30076
+ onUploadCustomFontPackage,
30077
+ onEmbedCustomFonts,
29977
30078
  onOpenRecentFile,
29978
30079
  onToggleFormatPainter: onToggleFormatPainterProp,
29979
30080
  fileName,
@@ -30308,6 +30409,8 @@ function ViewerToolbarSection(props) {
30308
30409
  body: s.theme?.fontScheme?.minorFont?.latin
30309
30410
  },
30310
30411
  embeddedFontFamilies: Array.from(new Set(s.embeddedFonts.map((font) => font.name))),
30412
+ onUploadCustomFontPackage,
30413
+ onEmbedCustomFonts,
30311
30414
  onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
30312
30415
  onApplyLayout: (path) => void onApplyLayout(path),
30313
30416
  customShows: s.customShows,
@@ -34033,6 +34136,7 @@ var PowerPointViewer = forwardRef(
34033
34136
  content: incomingContent,
34034
34137
  singleSlideOnly = false,
34035
34138
  fonts = [],
34139
+ onUploadCustomFontPackage,
34036
34140
  filePath,
34037
34141
  fileName,
34038
34142
  canEdit = false,
@@ -34566,7 +34670,22 @@ var PowerPointViewer = forwardRef(
34566
34670
  hiddenActions,
34567
34671
  aiEnabled: Boolean(ai),
34568
34672
  isAiPanelOpen: aiPanel.isOpen,
34569
- onToggleAiPanel: aiPanel.toggle
34673
+ onToggleAiPanel: aiPanel.toggle,
34674
+ onUploadCustomFontPackage,
34675
+ onEmbedCustomFonts: (fonts2) => {
34676
+ state.setEmbeddedFonts((current) => {
34677
+ const merged = [...current];
34678
+ for (const font of fonts2) {
34679
+ const index = merged.findIndex(
34680
+ (existing) => existing.name === font.name && Boolean(existing.bold) === Boolean(font.bold) && Boolean(existing.italic) === Boolean(font.italic)
34681
+ );
34682
+ if (index >= 0) merged[index] = font;
34683
+ else merged.push(font);
34684
+ }
34685
+ return merged;
34686
+ });
34687
+ state.setIsDirty(true);
34688
+ }
34570
34689
  }
34571
34690
  ),
34572
34691
  /* @__PURE__ */ jsx(