pptx-react-viewer 4.8.0 → 4.10.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 (135) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/dist/{AiChatPanel-4LMJIJUU.js → AiChatPanel-RBQFM6JK.js} +28 -28
  3. package/dist/AiChatPanel-RBQFM6JK.js.br +0 -0
  4. package/dist/AiChatPanel-RBQFM6JK.js.gz +0 -0
  5. package/dist/{AiChatPanel-XWYLYN26.mjs → AiChatPanel-SIEMT43N.mjs} +4 -4
  6. package/dist/AiChatPanel-SIEMT43N.mjs.br +0 -0
  7. package/dist/AiChatPanel-SIEMT43N.mjs.gz +0 -0
  8. package/dist/{Model3DScene-N6IZ7Q57.mjs → Model3DScene-HZ7SOUFQ.mjs} +1 -1
  9. package/dist/{Model3DScene-N6IZ7Q57.mjs.br → Model3DScene-HZ7SOUFQ.mjs.br} +0 -0
  10. package/dist/Model3DScene-HZ7SOUFQ.mjs.gz +0 -0
  11. package/dist/{Model3DScene-YAPQ5BCI.js → Model3DScene-ITAVIIVY.js} +2 -2
  12. package/dist/Model3DScene-ITAVIIVY.js.br +0 -0
  13. package/dist/Model3DScene-ITAVIIVY.js.gz +0 -0
  14. package/dist/{chunk-KHEJXP4I.mjs → chunk-3UZYGG6W.mjs} +2547 -1856
  15. package/dist/chunk-3UZYGG6W.mjs.br +0 -0
  16. package/dist/chunk-3UZYGG6W.mjs.gz +0 -0
  17. package/dist/{chunk-SOMUGI3Y.mjs → chunk-A5A6B2PA.mjs} +18 -14
  18. package/dist/chunk-A5A6B2PA.mjs.br +0 -0
  19. package/dist/chunk-A5A6B2PA.mjs.gz +0 -0
  20. package/dist/{chunk-YF2BQIW3.js → chunk-E5565MDK.js} +11989 -4273
  21. package/dist/chunk-E5565MDK.js.br +0 -0
  22. package/dist/chunk-E5565MDK.js.gz +0 -0
  23. package/dist/{chunk-YPDPSXPK.mjs → chunk-HDH4KFDK.mjs} +259 -0
  24. package/dist/chunk-HDH4KFDK.mjs.br +0 -0
  25. package/dist/chunk-HDH4KFDK.mjs.gz +0 -0
  26. package/dist/{chunk-LTBTG2QB.js → chunk-KPKO2ELT.js} +259 -0
  27. package/dist/chunk-KPKO2ELT.js.br +0 -0
  28. package/dist/chunk-KPKO2ELT.js.gz +0 -0
  29. package/dist/{chunk-SSXGPYBF.mjs → chunk-LMJU46E5.mjs} +34 -16
  30. package/dist/chunk-LMJU46E5.mjs.br +0 -0
  31. package/dist/chunk-LMJU46E5.mjs.gz +0 -0
  32. package/dist/{chunk-SAYZSUNQ.js → chunk-NTMJSTXL.js} +221 -203
  33. package/dist/chunk-NTMJSTXL.js.br +0 -0
  34. package/dist/chunk-NTMJSTXL.js.gz +0 -0
  35. package/dist/{chunk-UTP22QYH.js → chunk-PPDIZ3XP.js} +5 -5
  36. package/dist/chunk-PPDIZ3XP.js.br +0 -0
  37. package/dist/chunk-PPDIZ3XP.js.gz +0 -0
  38. package/dist/{chunk-Q4XJSJYI.mjs → chunk-WM33FDLD.mjs} +1 -1
  39. package/dist/chunk-WM33FDLD.mjs.br +0 -0
  40. package/dist/chunk-WM33FDLD.mjs.gz +0 -0
  41. package/dist/{chunk-NPZOVIHG.mjs → chunk-ZBFDEYLQ.mjs} +11968 -4273
  42. package/dist/chunk-ZBFDEYLQ.mjs.br +0 -0
  43. package/dist/chunk-ZBFDEYLQ.mjs.gz +0 -0
  44. package/dist/{chunk-NV2H57Q4.js → chunk-ZEQVK2FT.js} +4565 -3874
  45. package/dist/chunk-ZEQVK2FT.js.br +0 -0
  46. package/dist/chunk-ZEQVK2FT.js.gz +0 -0
  47. package/dist/{chunk-Q7NWWIPQ.js → chunk-ZI57KREY.js} +830 -826
  48. package/dist/chunk-ZI57KREY.js.br +0 -0
  49. package/dist/chunk-ZI57KREY.js.gz +0 -0
  50. package/dist/i18n/de.cjs +276 -9
  51. package/dist/i18n/de.cjs.br +0 -0
  52. package/dist/i18n/de.cjs.gz +0 -0
  53. package/dist/i18n/de.mjs +276 -9
  54. package/dist/i18n/de.mjs.br +0 -0
  55. package/dist/i18n/de.mjs.gz +0 -0
  56. package/dist/i18n/es.cjs +276 -9
  57. package/dist/i18n/es.cjs.br +0 -0
  58. package/dist/i18n/es.cjs.gz +0 -0
  59. package/dist/i18n/es.mjs +276 -9
  60. package/dist/i18n/es.mjs.br +0 -0
  61. package/dist/i18n/es.mjs.gz +0 -0
  62. package/dist/i18n/fr.cjs +276 -9
  63. package/dist/i18n/fr.cjs.br +0 -0
  64. package/dist/i18n/fr.cjs.gz +0 -0
  65. package/dist/i18n/fr.mjs +276 -9
  66. package/dist/i18n/fr.mjs.br +0 -0
  67. package/dist/i18n/fr.mjs.gz +0 -0
  68. package/dist/i18n/zh-CN.cjs +279 -12
  69. package/dist/i18n/zh-CN.cjs.br +0 -0
  70. package/dist/i18n/zh-CN.cjs.gz +0 -0
  71. package/dist/i18n/zh-CN.mjs +279 -12
  72. package/dist/i18n/zh-CN.mjs.br +0 -0
  73. package/dist/i18n/zh-CN.mjs.gz +0 -0
  74. package/dist/i18n.js +4 -4
  75. package/dist/i18n.js.br +0 -0
  76. package/dist/i18n.js.gz +0 -0
  77. package/dist/i18n.mjs +1 -1
  78. package/dist/i18n.mjs.br +0 -0
  79. package/dist/i18n.mjs.gz +0 -0
  80. package/dist/index.d.ts +683 -23
  81. package/dist/index.js +63 -63
  82. package/dist/index.js.br +0 -0
  83. package/dist/index.js.gz +0 -0
  84. package/dist/index.mjs +6 -6
  85. package/dist/index.mjs.br +0 -0
  86. package/dist/index.mjs.gz +0 -0
  87. package/dist/internals.d.ts +677 -14
  88. package/dist/internals.js +105 -105
  89. package/dist/internals.js.br +0 -0
  90. package/dist/internals.js.gz +0 -0
  91. package/dist/internals.mjs +4 -4
  92. package/dist/internals.mjs.br +0 -0
  93. package/dist/internals.mjs.gz +0 -0
  94. package/dist/pptx-viewer.css +1 -1
  95. package/dist/pptx-viewer.css.br +0 -0
  96. package/dist/pptx-viewer.css.gz +0 -0
  97. package/dist/viewer/index.d.ts +677 -23
  98. package/dist/viewer/index.js +27 -27
  99. package/dist/viewer/index.js.br +0 -0
  100. package/dist/viewer/index.js.gz +0 -0
  101. package/dist/viewer/index.mjs +6 -6
  102. package/dist/viewer/index.mjs.br +0 -0
  103. package/dist/viewer/index.mjs.gz +0 -0
  104. package/package.json +4 -3
  105. package/dist/AiChatPanel-4LMJIJUU.js.br +0 -0
  106. package/dist/AiChatPanel-4LMJIJUU.js.gz +0 -0
  107. package/dist/AiChatPanel-XWYLYN26.mjs.br +0 -0
  108. package/dist/AiChatPanel-XWYLYN26.mjs.gz +0 -0
  109. package/dist/Model3DScene-N6IZ7Q57.mjs.gz +0 -0
  110. package/dist/Model3DScene-YAPQ5BCI.js.br +0 -0
  111. package/dist/Model3DScene-YAPQ5BCI.js.gz +0 -0
  112. package/dist/chunk-KHEJXP4I.mjs.br +0 -0
  113. package/dist/chunk-KHEJXP4I.mjs.gz +0 -0
  114. package/dist/chunk-LTBTG2QB.js.br +0 -0
  115. package/dist/chunk-LTBTG2QB.js.gz +0 -0
  116. package/dist/chunk-NPZOVIHG.mjs.br +0 -0
  117. package/dist/chunk-NPZOVIHG.mjs.gz +0 -0
  118. package/dist/chunk-NV2H57Q4.js.br +0 -0
  119. package/dist/chunk-NV2H57Q4.js.gz +0 -0
  120. package/dist/chunk-Q4XJSJYI.mjs.br +0 -0
  121. package/dist/chunk-Q4XJSJYI.mjs.gz +0 -0
  122. package/dist/chunk-Q7NWWIPQ.js.br +0 -0
  123. package/dist/chunk-Q7NWWIPQ.js.gz +0 -0
  124. package/dist/chunk-SAYZSUNQ.js.br +0 -0
  125. package/dist/chunk-SAYZSUNQ.js.gz +0 -0
  126. package/dist/chunk-SOMUGI3Y.mjs.br +0 -0
  127. package/dist/chunk-SOMUGI3Y.mjs.gz +0 -0
  128. package/dist/chunk-SSXGPYBF.mjs.br +0 -0
  129. package/dist/chunk-SSXGPYBF.mjs.gz +0 -0
  130. package/dist/chunk-UTP22QYH.js.br +0 -0
  131. package/dist/chunk-UTP22QYH.js.gz +0 -0
  132. package/dist/chunk-YF2BQIW3.js.br +0 -0
  133. package/dist/chunk-YF2BQIW3.js.gz +0 -0
  134. package/dist/chunk-YPDPSXPK.mjs.br +0 -0
  135. package/dist/chunk-YPDPSXPK.mjs.gz +0 -0
@@ -1,5 +1,5 @@
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, 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, 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-NPZOVIHG.mjs';
2
- import { translationsEn } from './chunk-YPDPSXPK.mjs';
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-ZBFDEYLQ.mjs';
2
+ import { translationsEn } from './chunk-HDH4KFDK.mjs';
3
3
  import { clsx } from 'clsx';
4
4
  import { twMerge } from 'tailwind-merge';
5
5
  import React8, { useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect } from 'react';
@@ -1072,18 +1072,19 @@ function renderUnderlineWords(text, isUnderlineWords, wordDecoration, metric, ke
1072
1072
  } : void 0;
1073
1073
  return pieces.map((piece, i) => {
1074
1074
  const key = `${keyPrefix}-u${i}`;
1075
+ const following = followingText(pieces, i, metric?.following);
1075
1076
  if (!piece.underline) {
1076
- return /* @__PURE__ */ jsx(React8.Fragment, { children: inner(piece.text, key, gapMetric) }, key);
1077
+ return /* @__PURE__ */ jsx(React8.Fragment, { children: inner(piece.text, key, gapMetric && { ...gapMetric, following }) }, key);
1077
1078
  }
1078
- return /* @__PURE__ */ jsx("span", { style: wordDecoration, children: inner(piece.text, key, metric) }, key);
1079
+ return /* @__PURE__ */ jsx("span", { style: wordDecoration, children: inner(piece.text, key, metric && { ...metric, following }) }, key);
1079
1080
  });
1080
1081
  }
1081
1082
  function makeSegmentPieceRenderer(needsScriptFonts, scriptFonts, baseFontFamily, isUnderlineWords, wordDecoration, metric) {
1082
- return (text, key) => renderUnderlineWords(
1083
+ return (text, key, following) => renderUnderlineWords(
1083
1084
  text,
1084
1085
  isUnderlineWords,
1085
1086
  wordDecoration,
1086
- metric,
1087
+ metric && { ...metric, following },
1087
1088
  key,
1088
1089
  (subText, subKey, subMetric) => renderMetricPieces(
1089
1090
  subText,
@@ -1116,8 +1117,8 @@ function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underl
1116
1117
  ] }, key);
1117
1118
  }) });
1118
1119
  }
1119
- function renderEastAsianPieces(text, metric, keyPrefix, inner, baseStyle) {
1120
- const parts = splitEastAsianBreaks(text, metric.eastAsian, metric.font);
1120
+ function renderEastAsianPieces(text, metric, keyPrefix, inner, baseStyle, following) {
1121
+ const parts = splitEastAsianBreaks(text, metric.eastAsian, metric.font, following);
1121
1122
  if (parts.length === 1 && !parts[0].style) {
1122
1123
  return inner(parts[0].text, keyPrefix);
1123
1124
  }
@@ -1132,7 +1133,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
1132
1133
  }
1133
1134
  const pieces = splitRunForMetrics(text, metric.font);
1134
1135
  if (pieces.length <= 1) {
1135
- return renderEastAsianPieces(text, metric, keyPrefix, inner, void 0);
1136
+ return renderEastAsianPieces(text, metric, keyPrefix, inner, void 0, metric.following);
1136
1137
  }
1137
1138
  return pieces.map((piece, i) => {
1138
1139
  const key = `${keyPrefix}-w${i}`;
@@ -1140,7 +1141,14 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
1140
1141
  ...metric.nestedStyle,
1141
1142
  letterSpacing: pieceLetterSpacing(metric.authoredPx, piece.tracking)
1142
1143
  };
1143
- return /* @__PURE__ */ jsx("span", { style, children: renderEastAsianPieces(piece.text, metric, key, inner, style) }, key);
1144
+ return /* @__PURE__ */ jsx("span", { style, children: renderEastAsianPieces(
1145
+ piece.text,
1146
+ metric,
1147
+ key,
1148
+ inner,
1149
+ style,
1150
+ followingText(pieces, i, metric.following)
1151
+ ) }, key);
1144
1152
  });
1145
1153
  }
1146
1154
  function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFamily, keyPrefix, nestedStyle) {
@@ -1181,7 +1189,7 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
1181
1189
  renderLeaf,
1182
1190
  metric?.nestedStyle,
1183
1191
  isUnderlineWords
1184
- ) : renderLeaf(line, lineKey),
1192
+ ) : renderLeaf(line, lineKey, lineIndex < lines.length - 1 ? "\n" : metric?.following),
1185
1193
  lineIndex < lines.length - 1 ? /* @__PURE__ */ jsx("br", {}) : null
1186
1194
  ] }, lineKey);
1187
1195
  });
@@ -1222,10 +1230,10 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
1222
1230
  color: "inherit",
1223
1231
  borderRadius: 2
1224
1232
  },
1225
- children: renderLeaf(chunk.text, chunkKey)
1233
+ children: renderLeaf(chunk.text, chunkKey, followingText(chunks, ci, metric?.following))
1226
1234
  },
1227
1235
  chunkKey
1228
- ) : /* @__PURE__ */ jsx(React8.Fragment, { children: renderLeaf(chunk.text, chunkKey) }, chunkKey);
1236
+ ) : /* @__PURE__ */ jsx(React8.Fragment, { children: renderLeaf(chunk.text, chunkKey, followingText(chunks, ci, metric?.following)) }, chunkKey);
1229
1237
  });
1230
1238
  }
1231
1239
  function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber, fontSize) {
@@ -1406,7 +1414,8 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1406
1414
  font: metricFont,
1407
1415
  authoredPx: authoredLetterSpacing,
1408
1416
  nestedStyle,
1409
- eastAsian: ctx.eastAsianBreaks
1417
+ eastAsian: ctx.eastAsianBreaks,
1418
+ following: ctx.eastAsianFollowing
1410
1419
  };
1411
1420
  const spanStyle = { ...run.style };
1412
1421
  spanStyle.color = resolvedSegmentColor;
@@ -1558,7 +1567,12 @@ function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAn
1558
1567
  };
1559
1568
  const runs = joinRunsBySegment(para.runs);
1560
1569
  const listParagraph = inlineListSeed?.paragraphs[paraIndex];
1561
- const renderedRuns = listParagraph ? listParagraph.runs.map((run) => renderSeededListRun(run, runs, segments, runCtx)) : runs.map((run) => renderParagraphRun(run, segments[run.segmentIndex ?? -1], runCtx));
1570
+ const renderedRuns = listParagraph ? listParagraph.runs.map((run) => renderSeededListRun(run, runs, segments, runCtx)) : runs.map(
1571
+ (run, i) => renderParagraphRun(run, segments[run.segmentIndex ?? -1], {
1572
+ ...runCtx,
1573
+ eastAsianFollowing: para.eastAsianBreaks ? followingText(runs, i) : void 0
1574
+ })
1575
+ );
1562
1576
  const paraStyle = {
1563
1577
  // `text-align`, BiDi `direction` / `unicode-bidi` and the kinsoku
1564
1578
  // line-break rules, resolved by shared from this paragraph's own `a:pPr`.
@@ -3818,7 +3832,11 @@ function buildPdfFromTiledImageData(pages) {
3818
3832
  var activePreview = null;
3819
3833
  function startPreviewAnimation(elementId, preset, options) {
3820
3834
  stopPreviewAnimation();
3821
- const descriptor = buildPreviewAnimation(preset, options);
3835
+ const domEl = document.querySelector(`[data-element-id="${elementId}"]`);
3836
+ const descriptor = buildPreviewAnimation(preset, {
3837
+ ...options,
3838
+ geometry: domEl ? measurePreviewGeometry(domEl) : void 0
3839
+ });
3822
3840
  if (!descriptor) {
3823
3841
  return;
3824
3842
  }
Binary file
Binary file