pptx-react-viewer 4.26.0 → 4.29.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 (169) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/README.md +3 -0
  3. package/dist/{AiChatPanel-TIJ3MRTR.mjs → AiChatPanel-6EIOUV7J.mjs} +3 -7
  4. package/dist/AiChatPanel-6EIOUV7J.mjs.br +0 -0
  5. package/dist/AiChatPanel-6EIOUV7J.mjs.gz +0 -0
  6. package/dist/{AiChatPanel-PGZDMW4M.js → AiChatPanel-AK6X4NJD.js} +27 -31
  7. package/dist/AiChatPanel-AK6X4NJD.js.br +0 -0
  8. package/dist/AiChatPanel-AK6X4NJD.js.gz +0 -0
  9. package/dist/{Model3DScene-SJGIK2TB.mjs → Model3DScene-EZDCI7TT.mjs} +2 -2
  10. package/dist/Model3DScene-EZDCI7TT.mjs.br +0 -0
  11. package/dist/Model3DScene-EZDCI7TT.mjs.gz +0 -0
  12. package/dist/{Model3DScene-LQBTZGVN.js → Model3DScene-KYIYYLMY.js} +3 -3
  13. package/dist/Model3DScene-KYIYYLMY.js.br +0 -0
  14. package/dist/Model3DScene-KYIYYLMY.js.gz +0 -0
  15. package/dist/{chunk-QJNZZBVF.mjs → chunk-6YOFWVII.mjs} +149 -167
  16. package/dist/chunk-6YOFWVII.mjs.br +0 -0
  17. package/dist/chunk-6YOFWVII.mjs.gz +0 -0
  18. package/dist/{chunk-ZW2WNQN7.js → chunk-7JMO6R6B.js} +1215 -1190
  19. package/dist/chunk-7JMO6R6B.js.br +0 -0
  20. package/dist/chunk-7JMO6R6B.js.gz +0 -0
  21. package/dist/{chunk-VEVEP7VF.js → chunk-CTL42ZRR.js} +533 -272
  22. package/dist/chunk-CTL42ZRR.js.br +0 -0
  23. package/dist/chunk-CTL42ZRR.js.gz +0 -0
  24. package/dist/{chunk-4VNS5WPM.js → chunk-DFFCFNK2.js} +2 -5
  25. package/dist/chunk-DFFCFNK2.js.br +0 -0
  26. package/dist/chunk-DFFCFNK2.js.gz +0 -0
  27. package/dist/{chunk-K564H64A.mjs → chunk-EW45F35P.mjs} +125 -176
  28. package/dist/chunk-EW45F35P.mjs.br +0 -0
  29. package/dist/chunk-EW45F35P.mjs.gz +0 -0
  30. package/dist/{chunk-XGB3TDIC.mjs → chunk-GDQSMJQZ.mjs} +2 -5
  31. package/dist/chunk-GDQSMJQZ.mjs.br +0 -0
  32. package/dist/chunk-GDQSMJQZ.mjs.gz +0 -0
  33. package/dist/{chunk-PW3YOZFA.js → chunk-K3EGXT6W.js} +921 -933
  34. package/dist/chunk-K3EGXT6W.js.br +0 -0
  35. package/dist/chunk-K3EGXT6W.js.gz +0 -0
  36. package/dist/{chunk-USJXG5TE.mjs → chunk-VI575UU6.mjs} +87 -105
  37. package/dist/chunk-VI575UU6.mjs.br +0 -0
  38. package/dist/chunk-VI575UU6.mjs.gz +0 -0
  39. package/dist/i18n.d.ts +1 -46
  40. package/dist/i18n.js +5 -5
  41. package/dist/i18n.js.br +2 -2
  42. package/dist/i18n.js.gz +0 -0
  43. package/dist/i18n.mjs +2 -2
  44. package/dist/i18n.mjs.br +0 -0
  45. package/dist/i18n.mjs.gz +0 -0
  46. package/dist/index.d.ts +28 -3703
  47. package/dist/index.js +96 -97
  48. package/dist/index.js.br +0 -0
  49. package/dist/index.js.gz +0 -0
  50. package/dist/index.mjs +6 -7
  51. package/dist/index.mjs.br +0 -0
  52. package/dist/index.mjs.gz +0 -0
  53. package/dist/internals.d.ts +16 -3848
  54. package/dist/internals.js +114 -115
  55. package/dist/internals.js.br +0 -0
  56. package/dist/internals.js.gz +0 -0
  57. package/dist/internals.mjs +4 -5
  58. package/dist/internals.mjs.br +0 -0
  59. package/dist/internals.mjs.gz +0 -0
  60. package/dist/{chunk-NJYF5KTY.mjs → three.module-2R4ADL7W.mjs} +2 -0
  61. package/dist/three.module-2R4ADL7W.mjs.br +0 -0
  62. package/dist/three.module-2R4ADL7W.mjs.gz +0 -0
  63. package/dist/{chunk-QS3GAPPA.js → three.module-LS32MK23.js} +2 -0
  64. package/dist/three.module-LS32MK23.js.br +0 -0
  65. package/dist/three.module-LS32MK23.js.gz +0 -0
  66. package/dist/viewer/index.d.ts +29 -2633
  67. package/dist/viewer/index.js +35 -37
  68. package/dist/viewer/index.js.br +0 -0
  69. package/dist/viewer/index.js.gz +0 -0
  70. package/dist/viewer/index.mjs +5 -7
  71. package/dist/viewer/index.mjs.br +0 -0
  72. package/dist/viewer/index.mjs.gz +0 -0
  73. package/dist/{y-webrtc-GAHCEZSS.mjs → y-webrtc-6DZI5KUK.mjs} +1 -1
  74. package/dist/y-webrtc-6DZI5KUK.mjs.br +0 -0
  75. package/dist/y-webrtc-6DZI5KUK.mjs.gz +0 -0
  76. package/dist/{y-webrtc-F2H7BRUK.js → y-webrtc-OTRGEYOH.js} +5 -5
  77. package/dist/y-webrtc-OTRGEYOH.js.br +0 -0
  78. package/dist/y-webrtc-OTRGEYOH.js.gz +0 -0
  79. package/dist/{y-websocket-FBMB63F4.js → y-websocket-AWBYMAHL.js} +1 -1
  80. package/dist/y-websocket-AWBYMAHL.js.br +0 -0
  81. package/dist/y-websocket-AWBYMAHL.js.gz +0 -0
  82. package/dist/{y-websocket-MAGDFVLN.mjs → y-websocket-VAKUVRQT.mjs} +1 -1
  83. package/dist/y-websocket-VAKUVRQT.mjs.br +0 -0
  84. package/dist/y-websocket-VAKUVRQT.mjs.gz +0 -0
  85. package/package.json +4 -4
  86. package/dist/AiChatPanel-PGZDMW4M.js.br +0 -0
  87. package/dist/AiChatPanel-PGZDMW4M.js.gz +0 -0
  88. package/dist/AiChatPanel-TIJ3MRTR.mjs.br +0 -0
  89. package/dist/AiChatPanel-TIJ3MRTR.mjs.gz +0 -0
  90. package/dist/GLTFLoader-O7FNKCHG.mjs +0 -2649
  91. package/dist/GLTFLoader-O7FNKCHG.mjs.br +0 -0
  92. package/dist/GLTFLoader-O7FNKCHG.mjs.gz +0 -0
  93. package/dist/GLTFLoader-UM56GMCK.js +0 -2651
  94. package/dist/GLTFLoader-UM56GMCK.js.br +0 -0
  95. package/dist/GLTFLoader-UM56GMCK.js.gz +0 -0
  96. package/dist/Model3DScene-LQBTZGVN.js.br +0 -0
  97. package/dist/Model3DScene-LQBTZGVN.js.gz +0 -0
  98. package/dist/Model3DScene-SJGIK2TB.mjs.br +0 -0
  99. package/dist/Model3DScene-SJGIK2TB.mjs.gz +0 -0
  100. package/dist/OrbitControls-EXEHIXFI.js +0 -922
  101. package/dist/OrbitControls-EXEHIXFI.js.br +0 -0
  102. package/dist/OrbitControls-EXEHIXFI.js.gz +0 -0
  103. package/dist/OrbitControls-PZQ4CBVS.mjs +0 -920
  104. package/dist/OrbitControls-PZQ4CBVS.mjs.br +0 -0
  105. package/dist/OrbitControls-PZQ4CBVS.mjs.gz +0 -0
  106. package/dist/UTIF-6SHLXCNF.js +0 -6402
  107. package/dist/UTIF-6SHLXCNF.js.br +0 -0
  108. package/dist/UTIF-6SHLXCNF.js.gz +0 -0
  109. package/dist/UTIF-CNNXS5Z5.mjs +0 -6400
  110. package/dist/UTIF-CNNXS5Z5.mjs.br +0 -0
  111. package/dist/UTIF-CNNXS5Z5.mjs.gz +0 -0
  112. package/dist/chunk-4VNS5WPM.js.br +0 -0
  113. package/dist/chunk-4VNS5WPM.js.gz +0 -0
  114. package/dist/chunk-6HMJTCFO.js +0 -4247
  115. package/dist/chunk-6HMJTCFO.js.br +0 -0
  116. package/dist/chunk-6HMJTCFO.js.gz +0 -0
  117. package/dist/chunk-DKMPRUXL.mjs +0 -22197
  118. package/dist/chunk-DKMPRUXL.mjs.br +0 -0
  119. package/dist/chunk-DKMPRUXL.mjs.gz +0 -0
  120. package/dist/chunk-K564H64A.mjs.br +0 -0
  121. package/dist/chunk-K564H64A.mjs.gz +0 -0
  122. package/dist/chunk-LCWNHXHZ.mjs +0 -312894
  123. package/dist/chunk-LCWNHXHZ.mjs.br +0 -0
  124. package/dist/chunk-LCWNHXHZ.mjs.gz +0 -0
  125. package/dist/chunk-NJYF5KTY.mjs.br +0 -0
  126. package/dist/chunk-NJYF5KTY.mjs.gz +0 -0
  127. package/dist/chunk-NWZKMLGC.js +0 -22241
  128. package/dist/chunk-NWZKMLGC.js.br +0 -0
  129. package/dist/chunk-NWZKMLGC.js.gz +0 -0
  130. package/dist/chunk-PW3YOZFA.js.br +0 -0
  131. package/dist/chunk-PW3YOZFA.js.gz +0 -0
  132. package/dist/chunk-QJNZZBVF.mjs.br +0 -0
  133. package/dist/chunk-QJNZZBVF.mjs.gz +0 -0
  134. package/dist/chunk-QS3GAPPA.js.br +0 -0
  135. package/dist/chunk-QS3GAPPA.js.gz +0 -0
  136. package/dist/chunk-UHW3R465.js +0 -314151
  137. package/dist/chunk-UHW3R465.js.br +0 -0
  138. package/dist/chunk-UHW3R465.js.gz +0 -0
  139. package/dist/chunk-USJXG5TE.mjs.br +0 -0
  140. package/dist/chunk-USJXG5TE.mjs.gz +0 -0
  141. package/dist/chunk-VEVEP7VF.js.br +0 -0
  142. package/dist/chunk-VEVEP7VF.js.gz +0 -0
  143. package/dist/chunk-XGB3TDIC.mjs.br +0 -0
  144. package/dist/chunk-XGB3TDIC.mjs.gz +0 -0
  145. package/dist/chunk-XLPQM7OJ.mjs +0 -4243
  146. package/dist/chunk-XLPQM7OJ.mjs.br +0 -0
  147. package/dist/chunk-XLPQM7OJ.mjs.gz +0 -0
  148. package/dist/chunk-ZW2WNQN7.js.br +0 -0
  149. package/dist/chunk-ZW2WNQN7.js.gz +0 -0
  150. package/dist/smartart-layouts-5T2QZGLG.js +0 -2494
  151. package/dist/smartart-layouts-5T2QZGLG.js.br +0 -0
  152. package/dist/smartart-layouts-5T2QZGLG.js.gz +0 -0
  153. package/dist/smartart-layouts-UCAFYVFW.mjs +0 -2487
  154. package/dist/smartart-layouts-UCAFYVFW.mjs.br +0 -0
  155. package/dist/smartart-layouts-UCAFYVFW.mjs.gz +0 -0
  156. package/dist/three.module-BLHG4FHZ.js +0 -1783
  157. package/dist/three.module-BLHG4FHZ.js.br +0 -0
  158. package/dist/three.module-BLHG4FHZ.js.gz +0 -0
  159. package/dist/three.module-ZSSMKKHW.mjs +0 -2
  160. package/dist/three.module-ZSSMKKHW.mjs.br +0 -0
  161. package/dist/three.module-ZSSMKKHW.mjs.gz +0 -0
  162. package/dist/y-webrtc-F2H7BRUK.js.br +0 -0
  163. package/dist/y-webrtc-F2H7BRUK.js.gz +0 -0
  164. package/dist/y-webrtc-GAHCEZSS.mjs.br +0 -0
  165. package/dist/y-webrtc-GAHCEZSS.mjs.gz +0 -0
  166. package/dist/y-websocket-FBMB63F4.js.br +0 -0
  167. package/dist/y-websocket-FBMB63F4.js.gz +0 -0
  168. package/dist/y-websocket-MAGDFVLN.mjs.br +0 -0
  169. package/dist/y-websocket-MAGDFVLN.mjs.gz +0 -0
Binary file
Binary file
@@ -1,26 +1,28 @@
1
- import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, getImageFitStyle, getImageFillCounterTransform, getComputedFillStyle, isImageLikeElement, getCropShapeClipPath, getImageTilingStyle, mediaPlaybackAttributes, getOnlineVideoEmbed, ONLINE_VIDEO_IFRAME_SANDBOX, ONLINE_VIDEO_IFRAME_ALLOW, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle, buildParagraphs, followingText, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, getConnectorPathGeometry, normalizeStrokeDashType, getSvgStrokeDasharray, buildSvgGradientDef, buildStrokeOutline, getPresetShapeVectorGeometry, isWedgeCalloutPresetShape, svgGradientFillRef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, canDrillDown, computeSelectionRect, DEFAULT_FONT_FAMILY, cellStyleToCss, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildTiledSlidesPdfBytes, buildPreviewAnimation, measurePreviewGeometry, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, shouldShowMediaFullscreenStopButton, withInlineListDecorationDefaults, segmentStyleToCss, resolveAutoFitFontScale, applyUnderlineVariant, nestedTextDecorationStyle, scaleFontSizeForAutoFit, resolveFontKerning, getSubstituteFontFamily, parsePanoseString, resolveScriptFontSet, hasDistinctScriptFonts, authoredLetterSpacingPx, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, splitsUnderlineIntoWords, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects, customGeometryPathsToSvgSubpaths, buildSubpathPaints, computeColumnBoundaries, getTableCellBandStyle, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, xmlText, cellRunStyle, getChartStylePalette, computeChartLegendLayout, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, ooxmlGradientAngleToCssDegrees, buildRectPathGradient, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitEastAsianBreaks, splitRunByScriptFont } from './chunk-LCWNHXHZ.mjs';
2
- import { translationsEn } from './chunk-XLPQM7OJ.mjs';
1
+ import { __reExport } from './chunk-GDQSMJQZ.mjs';
2
+ import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS as STROKE_DASH_OPTIONS$1, getAnimationInitialStyle as getAnimationInitialStyle$1, cloneHistorySnapshot as cloneHistorySnapshot$1, getImageFitStyle, getImageFillCounterTransform, getComputedFillStyle, getCropShapeClipPath as getCropShapeClipPath$1, getImageTilingStyle as getImageTilingStyle$1, mediaPlaybackAttributes, getOnlineVideoEmbed, ONLINE_VIDEO_IFRAME_SANDBOX, ONLINE_VIDEO_IFRAME_ALLOW, buildTextBlockStyle, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle as buildTextBody3DSceneStyle$1, buildParagraphs, followingText, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData as build3DExtrusionData$1, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, normalizeStrokeDashType, getSvgStrokeDasharray, buildSvgGradientDef, buildStrokeOutline, getPresetShapeVectorGeometry, isWedgeCalloutPresetShape, svgGradientFillRef, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, canDrillDown, computeSelectionRect, DEFAULT_FONT_FAMILY as DEFAULT_FONT_FAMILY$1, cellStyleToCss, TABLE_CELL_TEXT_DEFAULTS, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildTiledSlidesPdfBytes, buildPreviewAnimation, measurePreviewGeometry, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, shouldShowMediaFullscreenStopButton, withInlineListDecorationDefaults, segmentStyleToCss, resolveAutoFitFontScale, applyUnderlineVariant, nestedTextDecorationStyle, scaleFontSizeForAutoFit, resolveFontKerning, resolveScriptFontSet, hasDistinctScriptFonts, authoredLetterSpacingPx, eastAsianBreaksForRun, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, splitsUnderlineIntoWords, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects as apply3dEffects$1, buildSubpathPaints, computeColumnBoundaries, getTableCellBandStyle as getTableCellBandStyle$1, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders as getCellDiagonalBorders$1, cellRunStyle, getChartStylePalette, computeChartLegendLayout, resolveChartSvgDef, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, buildRectPathGradient, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitEastAsianBreaks, splitRunByScriptFont } from 'ooxml-ui/pptx';
3
+ export { ACTION_BUTTON_PRESETS, DEFAULT_COLOR_CHANGE_TOLERANCE, INK_REPLAY_KEYFRAMES, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, SHAPE_QUICK_STYLES, SLIDE_TRANSITION_OPTIONS, TABLE_STYLE_PRESETS, applyColorChange, applyFormatToElement, applyReroutedConnectors, buildCacheKey, buildContentPartStrokes, buildCssGradientFromShapeStyle, buildInkGroupStrokes, buildSaveSlides, canvasToJpegData, clampCropValue, cloneSlide, cloneTemplateElementsBySlideId, colorWithOpacity, comparePresentation, computeHandoutLayout, computeSnapToShape, copyFormatFromElement, formatCommentTimestamp, generateNoteLineCount, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCompoundLineOffsets, getCompoundLineWidths, getContentPartReplayStyles, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getImageEffectsFilter, getImageEffectsOpacity, getInkReplayStyles, getPatternSvg, getPrintableArea, getShapeAdjustmentHandleDescriptors, getSvgStrokeDasharray, getTextCompensationTransform, hasCopyableFormat, isEditableTextElement, isImageTiled, isPpactionUrl, isTemplateElementId, isUrlSafe, makeCloneId, mergeCells, normalizeHexColor, normalizeStrokeDashType, openNativeEyeDropper, parsePpactionUrl, partitionTemplateElements, rerouteConnectorsForMovedElements, safeOpenUrl, sanitizeGradientStops, setCachedResult, splitCell, stopAllPersistentAudio, substituteFieldText } from 'ooxml-ui/pptx';
4
+ import * as pptx_star from 'ooxml-core/pptx';
3
5
  import { clsx } from 'clsx';
4
6
  import { twMerge } from 'tailwind-merge';
5
7
  import React8, { useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect } from 'react';
6
8
  import { LuTriangle, LuPlus, LuMoveRight, LuMinus, LuDiamond, LuDatabase, LuCircle, LuSquare } from 'react-icons/lu';
7
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
+ import { translationsEn } from 'ooxml-ui/pptx/i18n';
8
11
  import { useTranslation } from 'react-i18next';
9
12
 
10
- // src/viewer/utils/animation-effects.ts
11
- function getAnimationInitialStyle2(preset, nativeAnimation) {
12
- return getAnimationInitialStyle(preset, nativeAnimation);
13
+ function getAnimationInitialStyle(preset, nativeAnimation) {
14
+ return getAnimationInitialStyle$1(preset, nativeAnimation);
13
15
  }
16
+
17
+ // ../core/dist/index.mjs
18
+ var dist_exports = {};
19
+ __reExport(dist_exports, pptx_star);
14
20
  function cn(...inputs) {
15
21
  return twMerge(clsx(inputs));
16
22
  }
17
-
18
- // src/viewer/utils/clone.ts
19
- function cloneHistorySnapshot2(snapshot) {
20
- return cloneHistorySnapshot(snapshot);
23
+ function cloneHistorySnapshot(snapshot) {
24
+ return cloneHistorySnapshot$1(snapshot);
21
25
  }
22
-
23
- // src/viewer/constants/scalar.ts
24
26
  var DEFAULT_CANVAS_WIDTH = 1280;
25
27
  var DEFAULT_CANVAS_HEIGHT = 720;
26
28
  var MIN_ELEMENT_SIZE = 12;
@@ -29,7 +31,7 @@ var DEFAULT_BODY_INSET_TB_PX = 45720 / 9525;
29
31
  var DEFAULT_TEXT_COLOR = "#111827";
30
32
  var DEFAULT_FILL_COLOR = "#3b82f6";
31
33
  var DEFAULT_STROKE_COLOR = "#1f2937";
32
- var DEFAULT_FONT_FAMILY2 = '"Segoe UI", "Helvetica Neue", Arial, sans-serif';
34
+ var DEFAULT_FONT_FAMILY = '"Segoe UI", "Helvetica Neue", Arial, sans-serif';
33
35
  var DEFAULT_TEXT_FONT_SIZE = 24;
34
36
  var HYPERLINK_COLOR = "#0563C1";
35
37
  var DEFAULT_TABLE_ROWS = 3;
@@ -39,8 +41,6 @@ var GRID_SIZE = 8;
39
41
  var SLIDE_NAV_THUMBNAIL_WIDTH = 156;
40
42
  var UNGROUPED_SECTION_ID = "__ungrouped__";
41
43
  var DEFAULT_SECTION_GROUP_ID = "default";
42
-
43
- // src/viewer/constants/toolbar.ts
44
44
  var TOOLBAR_SECTIONS = [
45
45
  { id: "file", labelKey: "pptx.ribbon.tab.file" },
46
46
  { id: "home", labelKey: "pptx.ribbon.tab.home" },
@@ -56,8 +56,6 @@ var TOOLBAR_SECTIONS = [
56
56
  { id: "help", labelKey: "pptx.ribbon.tab.help" }
57
57
  ];
58
58
  var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
59
-
60
- // src/viewer/constants/transitions-animations.ts
61
59
  var ANIMATION_PRESET_OPTIONS = [
62
60
  { value: "fadeIn", label: "Fade In", i18nKey: "pptx.animation.preset.fadeIn" },
63
61
  { value: "flyIn", label: "Fly In", i18nKey: "pptx.animation.preset.flyIn" },
@@ -93,8 +91,6 @@ var SHAPE_PRESETS = SHAPE_PRESET_DEFS.map(
93
91
  })
94
92
  })
95
93
  );
96
-
97
- // src/viewer/constants/connectors-strokes.ts
98
94
  var CONNECTOR_ARROW_OPTIONS = [
99
95
  { value: "none", label: "None", i18nKey: "pptx.arrowhead.none" },
100
96
  { value: "triangle", label: "Triangle", i18nKey: "pptx.arrowhead.triangle" },
@@ -108,7 +104,7 @@ var ARROW_SIZE_OPTIONS = [
108
104
  { value: "med", label: "Medium", i18nKey: "pptx.connectorOptions.sizeMedium" },
109
105
  { value: "lg", label: "Large", i18nKey: "pptx.connectorOptions.sizeLarge" }
110
106
  ];
111
- var STROKE_DASH_OPTIONS2 = STROKE_DASH_OPTIONS;
107
+ var STROKE_DASH_OPTIONS = STROKE_DASH_OPTIONS$1;
112
108
 
113
109
  // src/viewer/utils/shape-types.tsx
114
110
  function getShapeType(shapeType) {
@@ -211,22 +207,18 @@ function getShapeType(shapeType) {
211
207
  }
212
208
  return "rect";
213
209
  }
214
-
215
- // src/viewer/utils/element.ts
216
210
  function isConnectorOrLineElement(element) {
217
211
  if (element.type === "connector") {
218
212
  return true;
219
213
  }
220
- if (!hasShapeProperties(element)) {
214
+ if (!(0, dist_exports.hasShapeProperties)(element)) {
221
215
  return false;
222
216
  }
223
217
  const st = getShapeType(element.shapeType);
224
218
  return st === "connector" || st === "line" || element.shapeType === "line";
225
219
  }
226
-
227
- // src/viewer/utils/image-style.ts
228
220
  function getImageMaskStyle(element) {
229
- if (!hasShapeProperties(element)) {
221
+ if (!(0, dist_exports.hasShapeProperties)(element)) {
230
222
  return void 0;
231
223
  }
232
224
  const geometry = resolveShapeGeometry(element);
@@ -252,11 +244,11 @@ function getImageSurfaceMaskStyle(element) {
252
244
  return {
253
245
  overflow: "hidden",
254
246
  borderRadius: mask?.borderRadius,
255
- clipPath: mask?.clipPath ?? getCropShapeClipPath2(element)
247
+ clipPath: mask?.clipPath ?? getCropShapeClipPath(element)
256
248
  };
257
249
  }
258
250
  function getImageSurfaceStyle(element) {
259
- const fill = hasShapeProperties(element) ? getComputedFillStyle(element) : void 0;
251
+ const fill = (0, dist_exports.hasShapeProperties)(element) ? getComputedFillStyle(element) : void 0;
260
252
  return {
261
253
  position: "absolute",
262
254
  inset: 0,
@@ -268,14 +260,14 @@ function getImageSurfaceStyle(element) {
268
260
  backgroundPosition: fill?.backgroundPosition
269
261
  };
270
262
  }
271
- function getCropShapeClipPath2(element) {
272
- if (!isImageLikeElement(element)) {
263
+ function getCropShapeClipPath(element) {
264
+ if (!(0, dist_exports.isImageLikeElement)(element)) {
273
265
  return void 0;
274
266
  }
275
- return getCropShapeClipPath(element.cropShape, element.width, element.height);
267
+ return getCropShapeClipPath$1(element.cropShape, element.width, element.height);
276
268
  }
277
- function getImageTilingStyle2(element, nativeSize) {
278
- return getImageTilingStyle(element, nativeSize);
269
+ function getImageTilingStyle(element, nativeSize) {
270
+ return getImageTilingStyle$1(element, nativeSize);
279
271
  }
280
272
 
281
273
  // src/viewer/utils/geometry-image.ts
@@ -313,8 +305,6 @@ function ensureArrayValue(value) {
313
305
  }
314
306
  return Array.isArray(value) ? value : [value];
315
307
  }
316
-
317
- // src/viewer/utils/media-persistent-audio.tsx
318
308
  function buildTrimFragment(element) {
319
309
  const start = element.trimStartMs;
320
310
  if (start === void 0 || start <= 0) {
@@ -789,15 +779,11 @@ function renderMediaElement(element, mediaDataUrls, options) {
789
779
  }
790
780
  return /* @__PURE__ */ jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: translationsEn["pptx.media.title"] });
791
781
  }
792
-
793
- // src/viewer/utils/text-utils.tsx
794
782
  function getTextStyleForElement(element, fallbackColor) {
795
783
  return buildTextBlockStyle(element, { fallbackColor });
796
784
  }
797
-
798
- // src/viewer/utils/text-layout.tsx
799
785
  function getTextLayoutStyle(element) {
800
- if (!hasTextProperties(element)) {
786
+ if (!(0, dist_exports.hasTextProperties)(element)) {
801
787
  return {};
802
788
  }
803
789
  const writingMode = toCssWritingMode(element.textStyle?.textDirection);
@@ -805,7 +791,7 @@ function getTextLayoutStyle(element) {
805
791
  const verticalDirection = toCssVerticalDirection(element.textStyle?.textDirection);
806
792
  const textWrapNone = element.textStyle?.textWrap === "none";
807
793
  const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
808
- const hasParagraphIndents = hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
794
+ const hasParagraphIndents = (0, dist_exports.hasTextProperties)(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
809
795
  const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
810
796
  const paragraphIndent = element.textStyle?.paragraphIndent;
811
797
  const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
@@ -839,10 +825,8 @@ function getTextLayoutStyle(element) {
839
825
  } : {}
840
826
  };
841
827
  }
842
-
843
- // src/viewer/utils/text-effects.tsx
844
- function buildTextBody3DSceneStyle2(textStyle, elementSize) {
845
- return buildTextBody3DSceneStyle(textStyle, elementSize);
828
+ function buildTextBody3DSceneStyle(textStyle, elementSize) {
829
+ return buildTextBody3DSceneStyle$1(textStyle, elementSize);
846
830
  }
847
831
 
848
832
  // src/viewer/utils/text-warp-css.tsx
@@ -1396,10 +1380,10 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1396
1380
  segmentStyle.scriptFallbackFont && segmentStyle.fontFamilyIsCascadeDefault
1397
1381
  );
1398
1382
  const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
1399
- const baseFontFamily = scriptFallbackWins ? getSubstituteFontFamily(segmentStyle.scriptFallbackFont) : rawFontFamily ? getSubstituteFontFamily(
1383
+ const baseFontFamily = scriptFallbackWins ? (0, dist_exports.getSubstituteFontFamily)(segmentStyle.scriptFallbackFont) : rawFontFamily ? (0, dist_exports.getSubstituteFontFamily)(
1400
1384
  rawFontFamily,
1401
- parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
1402
- ) : DEFAULT_FONT_FAMILY2;
1385
+ (0, dist_exports.parsePanoseString)(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
1386
+ ) : DEFAULT_FONT_FAMILY;
1403
1387
  const scriptFonts = resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
1404
1388
  const needsScriptFonts = hasDistinctScriptFonts(scriptFonts);
1405
1389
  const authoredLetterSpacing = authoredLetterSpacingPx(segmentStyle);
@@ -1414,7 +1398,8 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1414
1398
  font: metricFont,
1415
1399
  authoredPx: authoredLetterSpacing,
1416
1400
  nestedStyle,
1417
- eastAsian: ctx.eastAsianBreaks,
1401
+ // Resolved per run, so a Korean run keeps its Hangul words whole.
1402
+ eastAsian: eastAsianBreaksForRun(ctx.eastAsianBreaks, segmentStyle.language),
1418
1403
  following: ctx.eastAsianFollowing
1419
1404
  };
1420
1405
  const spanStyle = { ...run.style };
@@ -1513,7 +1498,7 @@ function renderSeededListRun(seed, runs, segments, context) {
1513
1498
  });
1514
1499
  }
1515
1500
  function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt, inlineListSeed) {
1516
- if (!hasTextProperties(element)) {
1501
+ if (!(0, dist_exports.hasTextProperties)(element)) {
1517
1502
  return emptyFallback || null;
1518
1503
  }
1519
1504
  const segments = segmentOverrides ?? element.textSegments;
@@ -1676,13 +1661,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
1676
1661
  );
1677
1662
  }
1678
1663
  function getDuotoneColors(element) {
1679
- if (!isImageLikeElement(element)) {
1664
+ if (!(0, dist_exports.isImageLikeElement)(element)) {
1680
1665
  return void 0;
1681
1666
  }
1682
1667
  return element.imageEffects?.duotone;
1683
1668
  }
1684
1669
  function buildLineShadowCss(element) {
1685
- if (!hasShapeProperties(element)) {
1670
+ if (!(0, dist_exports.hasShapeProperties)(element)) {
1686
1671
  return void 0;
1687
1672
  }
1688
1673
  const ss = element.shapeStyle;
@@ -1699,7 +1684,7 @@ function buildLineShadowCss(element) {
1699
1684
  )}`;
1700
1685
  }
1701
1686
  function buildLineGlowFilter(element) {
1702
- if (!hasShapeProperties(element)) {
1687
+ if (!(0, dist_exports.hasShapeProperties)(element)) {
1703
1688
  return void 0;
1704
1689
  }
1705
1690
  const ss = element.shapeStyle;
@@ -1715,7 +1700,7 @@ function getDagDuotoneFilterId(elementId) {
1715
1700
  return `dag-duotone-${elementId}`;
1716
1701
  }
1717
1702
  function hasDagDuotoneEffect(element) {
1718
- if (!hasShapeProperties(element)) {
1703
+ if (!(0, dist_exports.hasShapeProperties)(element)) {
1719
1704
  return false;
1720
1705
  }
1721
1706
  return Boolean(element.shapeStyle?.dagDuotone);
@@ -1764,10 +1749,8 @@ function renderDagDuotoneSvgFilter(elementId, color1, color2) {
1764
1749
  }
1765
1750
  );
1766
1751
  }
1767
-
1768
- // src/viewer/utils/shape-visual-3d.ts
1769
- function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
1770
- return build3DExtrusionData(
1752
+ function build3DExtrusionData(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
1753
+ return build3DExtrusionData$1(
1771
1754
  shape3d,
1772
1755
  scene3d,
1773
1756
  fillColor,
@@ -1775,8 +1758,8 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
1775
1758
  elementHeight
1776
1759
  );
1777
1760
  }
1778
- function apply3dEffects2(base, scene3d, shape3d, fillColorFallback, elementSize, elementId) {
1779
- apply3dEffects(
1761
+ function apply3dEffects(base, scene3d, shape3d, fillColorFallback, elementSize, elementId) {
1762
+ apply3dEffects$1(
1780
1763
  base,
1781
1764
  scene3d,
1782
1765
  shape3d,
@@ -1805,7 +1788,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
1805
1788
  }
1806
1789
  return groupStyle;
1807
1790
  }
1808
- if (!hasShapeProperties(element)) {
1791
+ if (!(0, dist_exports.hasShapeProperties)(element)) {
1809
1792
  return {};
1810
1793
  }
1811
1794
  const ss = element.shapeStyle;
@@ -1861,7 +1844,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
1861
1844
  base.borderColor = void 0;
1862
1845
  base.borderStyle = void 0;
1863
1846
  }
1864
- apply3dEffects2(
1847
+ apply3dEffects(
1865
1848
  base,
1866
1849
  ss?.scene3d,
1867
1850
  ss?.shape3d,
@@ -1909,8 +1892,8 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
1909
1892
  return base;
1910
1893
  }
1911
1894
  }
1912
- function getConnectorPathGeometry2(element) {
1913
- return getConnectorPathGeometry(element);
1895
+ function getConnectorPathGeometry(element) {
1896
+ return (0, dist_exports.getConnectorPathGeometry)(element);
1914
1897
  }
1915
1898
  var ARROW_SIZE_SCALE = {
1916
1899
  sm: 0.6,
@@ -2006,7 +1989,7 @@ function strokeStrands(d, keyBase, ctx) {
2006
1989
  }
2007
1990
  function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
2008
1991
  const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
2009
- const subpaths = structuredPaths && structuredPaths.length > 0 ? customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
1992
+ const subpaths = structuredPaths && structuredPaths.length > 0 ? (0, dist_exports.customGeometryPathsToSvgSubpaths)(structuredPaths, pathWidth, pathHeight) : void 0;
2010
1993
  const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
2011
1994
  const gradientPaint = gradient ? svgGradientFillRef(gradient) : void 0;
2012
1995
  const nodes = [];
@@ -2066,7 +2049,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
2066
2049
  );
2067
2050
  }
2068
2051
  function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
2069
- if (!hasShapeProperties(element)) {
2052
+ if (!(0, dist_exports.hasShapeProperties)(element)) {
2070
2053
  return null;
2071
2054
  }
2072
2055
  const normalizedType = (element.shapeType || "").toLowerCase();
@@ -2232,18 +2215,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
2232
2215
  );
2233
2216
  }
2234
2217
  }
2235
- if (isCalloutShape(normalizedType)) {
2218
+ if ((0, dist_exports.isCalloutShape)(normalizedType)) {
2236
2219
  const width = Math.max(element.width, 1);
2237
2220
  const height = Math.max(element.height, 1);
2238
- const geometry = getCalloutLeaderLineGeometry(
2221
+ const geometry = (0, dist_exports.getCalloutLeaderLineGeometry)(
2239
2222
  normalizedType,
2240
2223
  width,
2241
2224
  height,
2242
2225
  element.shapeAdjustments
2243
2226
  );
2244
2227
  if (geometry && geometry.points.length >= 2) {
2245
- const leaderPath = buildCalloutLeaderLineSvgPath(geometry);
2246
- const bounds = getCalloutViewBoxBounds(width, height, geometry);
2228
+ const leaderPath = (0, dist_exports.buildCalloutLeaderLineSvgPath)(geometry);
2229
+ const bounds = (0, dist_exports.getCalloutViewBoxBounds)(width, height, geometry);
2247
2230
  const lineStroke = Math.max(strokeWidth, 1);
2248
2231
  const offsetLeft = bounds.minX;
2249
2232
  const offsetTop = bounds.minY;
@@ -2295,7 +2278,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
2295
2278
  if (element.type === "connector" || getShapeType(element.shapeType) === "connector" || element.shapeType === "line") {
2296
2279
  const viewWidth = Math.max(element.width, 1);
2297
2280
  const viewHeight = Math.max(element.height, 1);
2298
- const { pathData } = getConnectorPathGeometry2(element);
2281
+ const { pathData } = getConnectorPathGeometry(element);
2299
2282
  const markerSeed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
2300
2283
  const startMarkerId = `${markerSeed}-start-arrow`;
2301
2284
  const endMarkerId = `${markerSeed}-end-arrow`;
@@ -2384,7 +2367,7 @@ function parseGradientFillCss(gradFill) {
2384
2367
  const lin = gradFill["a:lin"];
2385
2368
  if (lin) {
2386
2369
  const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
2387
- const angleDeg = Math.round(ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
2370
+ const angleDeg = Math.round((0, dist_exports.ooxmlGradientAngleToCssDegrees)(angRaw / 6e4));
2388
2371
  return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
2389
2372
  }
2390
2373
  const path = gradFill["a:path"];
@@ -2589,11 +2572,11 @@ function extractCellText(cellXml) {
2589
2572
  const textParts = [];
2590
2573
  const runs = ensureArrayValue(paragraph["a:r"]);
2591
2574
  runs.forEach((run) => {
2592
- textParts.push(xmlText(run["a:t"]) ?? "");
2575
+ textParts.push((0, dist_exports.xmlText)(run["a:t"]) ?? "");
2593
2576
  });
2594
2577
  const fields = ensureArrayValue(paragraph["a:fld"]);
2595
2578
  fields.forEach((field) => {
2596
- textParts.push(xmlText(field["a:t"]) ?? "");
2579
+ textParts.push((0, dist_exports.xmlText)(field["a:t"]) ?? "");
2597
2580
  });
2598
2581
  paragraphTexts.push(textParts.join(""));
2599
2582
  });
@@ -2691,22 +2674,22 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
2691
2674
  }
2692
2675
  }
2693
2676
  if (cellProperties) {
2694
- const marL = Number.parseInt(String(cellProperties["@_marL"] || ""), 10);
2695
- const marR = Number.parseInt(String(cellProperties["@_marR"] || ""), 10);
2696
- const marT = Number.parseInt(String(cellProperties["@_marT"] || ""), 10);
2697
- const marB = Number.parseInt(String(cellProperties["@_marB"] || ""), 10);
2698
- const toPx = (emu) => Math.round(emu / 12700);
2699
- if (Number.isFinite(marL) && marL > 0) {
2700
- cellStyle.paddingLeft = toPx(marL);
2677
+ const margin = (key) => Number.parseInt(String(cellProperties[key] ?? ""), 10) / EMU_PER_PX;
2678
+ const marL = margin("@_marL");
2679
+ const marR = margin("@_marR");
2680
+ const marT = margin("@_marT");
2681
+ const marB = margin("@_marB");
2682
+ if (marL >= 0) {
2683
+ cellStyle.paddingLeft = marL;
2701
2684
  }
2702
- if (Number.isFinite(marR) && marR > 0) {
2703
- cellStyle.paddingRight = toPx(marR);
2685
+ if (marR >= 0) {
2686
+ cellStyle.paddingRight = marR;
2704
2687
  }
2705
- if (Number.isFinite(marT) && marT > 0) {
2706
- cellStyle.paddingTop = toPx(marT);
2688
+ if (marT >= 0) {
2689
+ cellStyle.paddingTop = marT;
2707
2690
  }
2708
- if (Number.isFinite(marB) && marB > 0) {
2709
- cellStyle.paddingBottom = toPx(marB);
2691
+ if (marB >= 0) {
2692
+ cellStyle.paddingBottom = marB;
2710
2693
  }
2711
2694
  }
2712
2695
  if (cellProperties?.["@_anchor"]) {
@@ -2748,13 +2731,11 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
2748
2731
  }
2749
2732
  return cellStyle;
2750
2733
  }
2751
-
2752
- // src/viewer/utils/table-band-style.tsx
2753
- function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCount, styleCtx) {
2734
+ function getTableCellBandStyle(element, rowIndex, cellIndex, rowCount, columnCount, styleCtx) {
2754
2735
  if (element.type !== "table") {
2755
2736
  return void 0;
2756
2737
  }
2757
- return getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
2738
+ return getTableCellBandStyle$1(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
2758
2739
  tableStyleMap: styleCtx?.tableStyleMap,
2759
2740
  colorScheme: styleCtx?.theme?.colorScheme,
2760
2741
  fontScheme: styleCtx?.theme?.fontScheme
@@ -2841,8 +2822,8 @@ function renderTableCellContent(cell, fallbackText) {
2841
2822
  );
2842
2823
  });
2843
2824
  }
2844
- function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
2845
- return getCellDiagonalBorders(style, tableData, pos, {
2825
+ function getCellDiagonalBorders(style, tableData, pos, styleCtx) {
2826
+ return getCellDiagonalBorders$1(style, tableData, pos, {
2846
2827
  tableStyleMap: styleCtx?.tableStyleMap,
2847
2828
  colorScheme: styleCtx?.theme?.colorScheme,
2848
2829
  fontScheme: styleCtx?.theme?.fontScheme
@@ -3145,7 +3126,7 @@ function renderTableFromTableData(element, textStyle, options) {
3145
3126
  {
3146
3127
  className: "w-full h-full border-collapse table-fixed",
3147
3128
  style: {
3148
- fontFamily: DEFAULT_FONT_FAMILY,
3129
+ fontFamily: DEFAULT_FONT_FAMILY$1,
3149
3130
  // `a:tblPr@rtl` mirrors the column order for RTL decks.
3150
3131
  ...tableContainerCss(tableData)
3151
3132
  },
@@ -3168,7 +3149,7 @@ function renderTableFromTableData(element, textStyle, options) {
3168
3149
  const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
3169
3150
  const isInMultiSelection = isCellInRect(rowIndex, cellIndex, selectionRect);
3170
3151
  const isCellEditing = isCellSelected && selectedCell?.isEditing;
3171
- const diag = getCellDiagonalBorders2(
3152
+ const diag = getCellDiagonalBorders(
3172
3153
  cell.style,
3173
3154
  tableData,
3174
3155
  { rowIndex, cellIndex, rowCount, columnCount },
@@ -3305,7 +3286,7 @@ function renderTableElement(element, textStyle, options) {
3305
3286
  {
3306
3287
  className: "w-full h-full border-collapse table-fixed",
3307
3288
  style: {
3308
- fontFamily: DEFAULT_FONT_FAMILY,
3289
+ fontFamily: DEFAULT_FONT_FAMILY$1,
3309
3290
  // `a:tblPr@rtl` mirrors the column order for RTL decks.
3310
3291
  ...tableContainerCss(tableEl.tableData)
3311
3292
  },
@@ -3335,7 +3316,7 @@ function renderTableElement(element, textStyle, options) {
3335
3316
  const colSpan = Number.isFinite(gridSpanRaw) && gridSpanRaw > 1 ? gridSpanRaw : void 0;
3336
3317
  const rowSpanRaw = Number.parseInt(String(cell["@_rowSpan"] || ""), 10);
3337
3318
  const rSpan = Number.isFinite(rowSpanRaw) && rowSpanRaw > 1 ? rowSpanRaw : void 0;
3338
- const bandStyle = getTableCellBandStyle2(
3319
+ const bandStyle = getTableCellBandStyle(
3339
3320
  element,
3340
3321
  rowIndex,
3341
3322
  cellIndex,
@@ -3345,7 +3326,7 @@ function renderTableElement(element, textStyle, options) {
3345
3326
  );
3346
3327
  const xmlCellStyle = extractTableCellStyle(cell, textStyle, schemeOverrides);
3347
3328
  const tdCellOverride = tableEl.tableData?.rows[rowIndex]?.cells[cellIndex]?.style;
3348
- const diag = getCellDiagonalBorders2(
3329
+ const diag = getCellDiagonalBorders(
3349
3330
  tdCellOverride,
3350
3331
  tableEl.tableData,
3351
3332
  {
@@ -3362,6 +3343,9 @@ function renderTableElement(element, textStyle, options) {
3362
3343
  // is the only source when neither the table style band nor
3363
3344
  // an explicit run/cell colour applies.
3364
3345
  color: textStyle.color,
3346
+ // PowerPoint's line spacing and default margins, as
3347
+ // `tableCellCss` gives the structured-model path.
3348
+ ...TABLE_CELL_TEXT_DEFAULTS,
3365
3349
  ...bandStyle,
3366
3350
  ...xmlCellStyle,
3367
3351
  ...tdCellOverride ? cellStyleToCss(tdCellOverride) : void 0,
@@ -3522,6 +3506,7 @@ function renderPrimitive(prim, key) {
3522
3506
  points: p.points,
3523
3507
  stroke: p.stroke,
3524
3508
  strokeWidth: p.strokeWidth,
3509
+ strokeDasharray: p.dashArray,
3525
3510
  fill: p.fill,
3526
3511
  opacity: p.opacity ?? 1,
3527
3512
  ...partAttrs(p.part),
@@ -3539,6 +3524,8 @@ function renderPrimitive(prim, key) {
3539
3524
  cy: c.cy,
3540
3525
  r: c.r,
3541
3526
  fill: c.fill,
3527
+ stroke: c.stroke,
3528
+ strokeWidth: c.strokeWidth,
3542
3529
  opacity: c.opacity ?? 1,
3543
3530
  ...partAttrs(c.part),
3544
3531
  children: c.title !== void 0 ? /* @__PURE__ */ jsx("title", { children: c.title }) : null
@@ -3635,7 +3622,7 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
3635
3622
  viewBox: `0 0 ${vm.svgWidth} ${vm.svgHeight}`,
3636
3623
  preserveAspectRatio,
3637
3624
  children: [
3638
- vm.defs && vm.defs.length > 0 && /* @__PURE__ */ jsx("defs", { children: vm.defs.map(
3625
+ vm.defs && vm.defs.length > 0 && /* @__PURE__ */ jsx("defs", { children: vm.defs.map(resolveChartSvgDef).map(
3639
3626
  (def, i) => def.kind === "linearGradient" ? /* @__PURE__ */ jsx(
3640
3627
  "linearGradient",
3641
3628
  {
@@ -3662,6 +3649,7 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
3662
3649
  {
3663
3650
  id: def.id,
3664
3651
  patternUnits: def.patternUnits,
3652
+ patternContentUnits: def.patternContentUnits,
3665
3653
  x: def.x,
3666
3654
  y: def.y,
3667
3655
  width: def.width,
@@ -3803,8 +3791,6 @@ function renderChartElement(element) {
3803
3791
  chartPreserveAspectRatio(kind)
3804
3792
  );
3805
3793
  }
3806
-
3807
- // src/viewer/utils/pdf-builder-notes-builder.ts
3808
3794
  function buildNotesPdf(pages) {
3809
3795
  const images = pages.map((page) => {
3810
3796
  const dataUrl = page.canvas.toDataURL("image/jpeg", 0.92);
@@ -3824,15 +3810,11 @@ function buildNotesPdf(pages) {
3824
3810
  const blob = new Blob([bytes], { type: "application/pdf" });
3825
3811
  return URL.createObjectURL(blob);
3826
3812
  }
3827
-
3828
- // src/viewer/utils/pdf-builder-slides.ts
3829
3813
  function buildPdfFromTiledImageData(pages) {
3830
3814
  const bytes = buildTiledSlidesPdfBytes(pages);
3831
3815
  const blob = new Blob([bytes], { type: "application/pdf" });
3832
3816
  return URL.createObjectURL(blob);
3833
3817
  }
3834
-
3835
- // src/viewer/utils/animation-preview.ts
3836
3818
  var activePreview = null;
3837
3819
  function startPreviewAnimation(elementId, preset, options) {
3838
3820
  stopPreviewAnimation();
@@ -3912,4 +3894,4 @@ function stopPreviewAnimation() {
3912
3894
  activePreview = null;
3913
3895
  }
3914
3896
 
3915
- export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY2 as DEFAULT_FONT_FAMILY, DEFAULT_SECTION_GROUP_ID, DEFAULT_STROKE_COLOR, DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ROWS, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, STROKE_DASH_OPTIONS2 as STROKE_DASH_OPTIONS, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromTiledImageData, buildReactChartViewModel, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, cloneHistorySnapshot2 as cloneHistorySnapshot, cn, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry2 as getConnectorPathGeometry, getCropShapeClipPath2 as getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageSurfaceMaskStyle, getImageSurfaceStyle, getImageTilingStyle2 as getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isConnectorOrLineElement, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderMediaElement, renderTableElement, renderTextSegments, renderVectorShape, shouldRenderFallbackLabel, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation };
3897
+ export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_SECTION_GROUP_ID, DEFAULT_STROKE_COLOR, DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ROWS, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, STROKE_DASH_OPTIONS, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromTiledImageData, buildReactChartViewModel, buildTextBody3DSceneStyle, cloneHistorySnapshot, cn, dist_exports, getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageSurfaceMaskStyle, getImageSurfaceStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isConnectorOrLineElement, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderMediaElement, renderTableElement, renderTextSegments, renderVectorShape, shouldRenderFallbackLabel, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation };
Binary file
Binary file
package/dist/i18n.d.ts CHANGED
@@ -1,46 +1 @@
1
- //#region ../shared/dist/i18n/index.d.ts
2
- //#region src/i18n/translations-en.d.ts
3
- /**
4
- * The canonical English UI-string dictionary for pptx-viewer. None of the
5
- * React/Vue/Angular binding packages ship translations themselves - each
6
- * only calls its framework's translation function (react-i18next's `t()`,
7
- * vue-i18n's `t()`, ngx-translate's `TranslateService`/`translate` pipe)
8
- * against dotted `pptx.*` keys. The host app supplies the dictionary; this
9
- * module is that dictionary for the demos, shared so all three stay in sync
10
- * instead of drifting into three separate copies.
11
- */
12
- declare const translationsEn: Record<string, string>;
13
- /**
14
- * Every key in the English dictionary. A new locale dictionary typed as
15
- * `Record<TranslationKey, string>` gets a compile error for any key it's
16
- * missing or misspells, so translation contributions stay complete without a
17
- * separate parity test.
18
- */
19
- type TranslationKey = keyof typeof translationsEn;
20
- /**
21
- * Convert a dotted translation key to a human-readable label when no
22
- * explicit dictionary entry exists yet. Takes the last segment and converts
23
- * camelCase to Title Case, e.g. "pptx.slideSorter.zoomIn" -> "Zoom In".
24
- */
25
- declare function keyToLabel(key: string): string;
26
- //#endregion
27
- //#region src/i18n/locale-catalog.d.ts
28
- /** One selectable entry in the viewer chrome's built-in language picker (File > Options > Language). */
29
- interface LocaleCatalogEntry {
30
- /** BCP-47-ish locale code, e.g. `'en'`, `'fr'`. Matches `pptx-viewer-locales`' exports. */
31
- code: string;
32
- /** English display name, used before a translation dictionary for the target locale is loaded. */
33
- label: string;
34
- /** The locale's own name for itself, e.g. `'Français'` for `fr`. */
35
- nativeLabel: string;
36
- }
37
- /**
38
- * Built-in language choices offered by File > Options > Language when a host
39
- * doesn't supply its own `availableLocales`. Mirrors the locales shipped by
40
- * the optional `pptx-viewer-locales` package (English needs no dictionary,
41
- * it's the viewer's own baseline).
42
- */
43
- declare const LOCALE_CATALOG: readonly LocaleCatalogEntry[];
44
-
45
- export { LOCALE_CATALOG, keyToLabel, translationsEn };
46
- export type { LocaleCatalogEntry, TranslationKey };
1
+ export { LOCALE_CATALOG, LocaleCatalogEntry, TranslationKey, keyToLabel, translationsEn } from 'ooxml-ui/pptx/i18n';
package/dist/i18n.js CHANGED
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var chunk6HMJTCFO_js = require('./chunk-6HMJTCFO.js');
4
- require('./chunk-4VNS5WPM.js');
3
+ require('./chunk-DFFCFNK2.js');
4
+ var i18n = require('ooxml-ui/pptx/i18n');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "LOCALE_CATALOG", {
9
9
  enumerable: true,
10
- get: function () { return chunk6HMJTCFO_js.LOCALE_CATALOG; }
10
+ get: function () { return i18n.LOCALE_CATALOG; }
11
11
  });
12
12
  Object.defineProperty(exports, "keyToLabel", {
13
13
  enumerable: true,
14
- get: function () { return chunk6HMJTCFO_js.keyToLabel; }
14
+ get: function () { return i18n.keyToLabel; }
15
15
  });
16
16
  Object.defineProperty(exports, "translationsEn", {
17
17
  enumerable: true,
18
- get: function () { return chunk6HMJTCFO_js.translationsEn; }
18
+ get: function () { return i18n.translationsEn; }
19
19
  });
package/dist/i18n.js.br CHANGED
@@ -1,2 +1,2 @@
1
- � ��tc/����bxi`��b���@o�T���q��Y�q``�M��Df������u\o������f���Z\�]/���+�γ%p�w��kZ!�_v�A] �9Xn���ű����p��0���
2
- ���4�ݜb����ڷiq��_paK�����t���{<j� ����5����<0
1
+ ����tc/����b�h`���NNRZ7��z 9��_hF� I6�6�(Y�6�n<�� W�#z�����9T7\c2��U_'�r�IB�7��BZ��ƞ�m{-3{�}���FT0���H(��@����>]n��
2
+ 4�oR97�: t�Mݦ9����D��}�yj��v�jp�b�ʱM�**W���