pptx-react-viewer 3.6.0 → 3.7.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.
- package/CHANGELOG.md +19 -0
- package/dist/{AiChatPanel-WRQGJJVD.mjs → AiChatPanel-L5QGWVZK.mjs} +4 -4
- package/dist/AiChatPanel-L5QGWVZK.mjs.br +0 -0
- package/dist/AiChatPanel-L5QGWVZK.mjs.gz +0 -0
- package/dist/{AiChatPanel-LEOEDIW2.js → AiChatPanel-M3AHKYPS.js} +25 -25
- package/dist/AiChatPanel-M3AHKYPS.js.br +0 -0
- package/dist/AiChatPanel-M3AHKYPS.js.gz +0 -0
- package/dist/{Area3DChartScene-SJC2ZB6R.mjs → Area3DChartScene-AE2XYKDW.mjs} +1 -1
- package/dist/Area3DChartScene-AE2XYKDW.mjs.br +1 -0
- package/dist/Area3DChartScene-AE2XYKDW.mjs.gz +0 -0
- package/dist/{Area3DChartScene-3TJ2GTGI.js → Area3DChartScene-ZQLQK6L4.js} +2 -2
- package/dist/Area3DChartScene-ZQLQK6L4.js.br +0 -0
- package/dist/Area3DChartScene-ZQLQK6L4.js.gz +0 -0
- package/dist/{Bar3DChartScene-SPER4LQA.mjs → Bar3DChartScene-FQV62XOI.mjs} +1 -1
- package/dist/Bar3DChartScene-FQV62XOI.mjs.br +2 -0
- package/dist/Bar3DChartScene-FQV62XOI.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-2ZGOMOZO.js → Bar3DChartScene-TZ6ADFBS.js} +2 -2
- package/dist/Bar3DChartScene-TZ6ADFBS.js.br +0 -0
- package/dist/Bar3DChartScene-TZ6ADFBS.js.gz +0 -0
- package/dist/{Line3DChartScene-42FYFGLU.js → Line3DChartScene-5CKPAX63.js} +2 -2
- package/dist/Line3DChartScene-5CKPAX63.js.br +0 -0
- package/dist/Line3DChartScene-5CKPAX63.js.gz +0 -0
- package/dist/{Line3DChartScene-FH3YHPXE.mjs → Line3DChartScene-FEUY3PCE.mjs} +1 -1
- package/dist/Line3DChartScene-FEUY3PCE.mjs.br +1 -0
- package/dist/Line3DChartScene-FEUY3PCE.mjs.gz +0 -0
- package/dist/{Model3DScene-EIU2GVUZ.js → Model3DScene-BLXEALM6.js} +2 -2
- package/dist/Model3DScene-BLXEALM6.js.br +0 -0
- package/dist/Model3DScene-BLXEALM6.js.gz +0 -0
- package/dist/{Model3DScene-2BCR2YYD.mjs → Model3DScene-V3DHIISV.mjs} +1 -1
- package/dist/Model3DScene-V3DHIISV.mjs.br +0 -0
- package/dist/Model3DScene-V3DHIISV.mjs.gz +0 -0
- package/dist/{PieChart3DScene-VQOHZPHI.js → PieChart3DScene-GHHT3PDV.js} +2 -2
- package/dist/PieChart3DScene-GHHT3PDV.js.br +0 -0
- package/dist/PieChart3DScene-GHHT3PDV.js.gz +0 -0
- package/dist/{PieChart3DScene-QFQUJFDP.mjs → PieChart3DScene-VZI2VARG.mjs} +1 -1
- package/dist/PieChart3DScene-VZI2VARG.mjs.br +0 -0
- package/dist/PieChart3DScene-VZI2VARG.mjs.gz +0 -0
- package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
- package/dist/{SurfaceChart3DScene-CGXMRBCL.mjs → SurfaceChart3DScene-T36E2HBA.mjs} +1 -1
- package/dist/SurfaceChart3DScene-T36E2HBA.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-T36E2HBA.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-FTVXZN6O.js → SurfaceChart3DScene-WWIMQ65D.js} +2 -2
- package/dist/SurfaceChart3DScene-WWIMQ65D.js.br +0 -0
- package/dist/SurfaceChart3DScene-WWIMQ65D.js.gz +0 -0
- package/dist/{chunk-ZWPHUPL4.js → chunk-3EJFZ7TE.js} +5 -5
- package/dist/chunk-3EJFZ7TE.js.br +0 -0
- package/dist/chunk-3EJFZ7TE.js.gz +0 -0
- package/dist/{chunk-AL2KLPOJ.js → chunk-DCNHUEWQ.js} +4058 -1841
- package/dist/chunk-DCNHUEWQ.js.br +0 -0
- package/dist/chunk-DCNHUEWQ.js.gz +0 -0
- package/dist/{chunk-TGCSZXOG.mjs → chunk-FGTMS7LR.mjs} +2 -23
- package/dist/chunk-FGTMS7LR.mjs.br +0 -0
- package/dist/chunk-FGTMS7LR.mjs.gz +0 -0
- package/dist/{chunk-WX7AFFBZ.mjs → chunk-JANUSAEK.mjs} +51 -68
- package/dist/chunk-JANUSAEK.mjs.br +0 -0
- package/dist/chunk-JANUSAEK.mjs.gz +0 -0
- package/dist/{chunk-ZUSYUWOV.mjs → chunk-NV55GU5V.mjs} +4046 -1839
- package/dist/chunk-NV55GU5V.mjs.br +0 -0
- package/dist/chunk-NV55GU5V.mjs.gz +0 -0
- package/dist/{chunk-ZHSBMG37.js → chunk-OBE4TB76.js} +447 -549
- package/dist/chunk-OBE4TB76.js.br +0 -0
- package/dist/chunk-OBE4TB76.js.gz +0 -0
- package/dist/{chunk-VYNICQ4O.mjs → chunk-PC62KGU3.mjs} +12 -114
- package/dist/chunk-PC62KGU3.mjs.br +0 -0
- package/dist/chunk-PC62KGU3.mjs.gz +0 -0
- package/dist/{chunk-NFOOONND.js → chunk-TUSALM3A.js} +1449 -1278
- package/dist/chunk-TUSALM3A.js.br +0 -0
- package/dist/chunk-TUSALM3A.js.gz +0 -0
- package/dist/{chunk-FG5VQFWP.mjs → chunk-TXY2E7VQ.mjs} +265 -94
- package/dist/chunk-TXY2E7VQ.mjs.br +0 -0
- package/dist/chunk-TXY2E7VQ.mjs.gz +0 -0
- package/dist/{chunk-7VPDHSWF.js → chunk-VIFDZIVX.js} +222 -240
- package/dist/chunk-VIFDZIVX.js.br +0 -0
- package/dist/chunk-VIFDZIVX.js.gz +0 -0
- package/dist/{chunk-MZI4DG3S.js → chunk-W24OJ7H5.js} +2 -23
- package/dist/chunk-W24OJ7H5.js.br +0 -0
- package/dist/chunk-W24OJ7H5.js.gz +0 -0
- package/dist/{chunk-T3V5FBXJ.mjs → chunk-WKODF5ZU.mjs} +1 -1
- package/dist/chunk-WKODF5ZU.mjs.br +0 -0
- package/dist/chunk-WKODF5ZU.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +419 -18
- package/dist/index.js +47 -47
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +419 -18
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +387 -18
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +2 -2
- package/dist/AiChatPanel-LEOEDIW2.js.br +0 -0
- package/dist/AiChatPanel-LEOEDIW2.js.gz +0 -0
- package/dist/AiChatPanel-WRQGJJVD.mjs.br +0 -0
- package/dist/AiChatPanel-WRQGJJVD.mjs.gz +0 -0
- package/dist/Area3DChartScene-3TJ2GTGI.js.br +0 -0
- package/dist/Area3DChartScene-3TJ2GTGI.js.gz +0 -0
- package/dist/Area3DChartScene-SJC2ZB6R.mjs.br +0 -2
- package/dist/Area3DChartScene-SJC2ZB6R.mjs.gz +0 -0
- package/dist/Bar3DChartScene-2ZGOMOZO.js.br +0 -0
- package/dist/Bar3DChartScene-2ZGOMOZO.js.gz +0 -0
- package/dist/Bar3DChartScene-SPER4LQA.mjs.br +0 -0
- package/dist/Bar3DChartScene-SPER4LQA.mjs.gz +0 -0
- package/dist/Line3DChartScene-42FYFGLU.js.br +0 -0
- package/dist/Line3DChartScene-42FYFGLU.js.gz +0 -0
- package/dist/Line3DChartScene-FH3YHPXE.mjs.br +0 -2
- package/dist/Line3DChartScene-FH3YHPXE.mjs.gz +0 -0
- package/dist/Model3DScene-2BCR2YYD.mjs.br +0 -0
- package/dist/Model3DScene-2BCR2YYD.mjs.gz +0 -0
- package/dist/Model3DScene-EIU2GVUZ.js.br +0 -0
- package/dist/Model3DScene-EIU2GVUZ.js.gz +0 -0
- package/dist/PieChart3DScene-QFQUJFDP.mjs.br +0 -0
- package/dist/PieChart3DScene-QFQUJFDP.mjs.gz +0 -0
- package/dist/PieChart3DScene-VQOHZPHI.js.br +0 -0
- package/dist/PieChart3DScene-VQOHZPHI.js.gz +0 -0
- package/dist/SurfaceChart3DScene-CGXMRBCL.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-CGXMRBCL.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-FTVXZN6O.js.br +0 -0
- package/dist/SurfaceChart3DScene-FTVXZN6O.js.gz +0 -0
- package/dist/chunk-7VPDHSWF.js.br +0 -0
- package/dist/chunk-7VPDHSWF.js.gz +0 -0
- package/dist/chunk-AL2KLPOJ.js.br +0 -0
- package/dist/chunk-AL2KLPOJ.js.gz +0 -0
- package/dist/chunk-FG5VQFWP.mjs.br +0 -0
- package/dist/chunk-FG5VQFWP.mjs.gz +0 -0
- package/dist/chunk-MZI4DG3S.js.br +0 -0
- package/dist/chunk-MZI4DG3S.js.gz +0 -0
- package/dist/chunk-NFOOONND.js.br +0 -0
- package/dist/chunk-NFOOONND.js.gz +0 -0
- package/dist/chunk-T3V5FBXJ.mjs.br +0 -0
- package/dist/chunk-T3V5FBXJ.mjs.gz +0 -0
- package/dist/chunk-TGCSZXOG.mjs.br +0 -0
- package/dist/chunk-TGCSZXOG.mjs.gz +0 -0
- package/dist/chunk-VYNICQ4O.mjs.br +0 -0
- package/dist/chunk-VYNICQ4O.mjs.gz +0 -0
- package/dist/chunk-WX7AFFBZ.mjs.br +0 -0
- package/dist/chunk-WX7AFFBZ.mjs.gz +0 -0
- package/dist/chunk-ZHSBMG37.js.br +0 -0
- package/dist/chunk-ZHSBMG37.js.gz +0 -0
- package/dist/chunk-ZUSYUWOV.mjs.br +0 -0
- package/dist/chunk-ZUSYUWOV.mjs.gz +0 -0
- package/dist/chunk-ZWPHUPL4.js.br +0 -0
- package/dist/chunk-ZWPHUPL4.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -193,29 +193,6 @@ var animationPresetTranslationsEn = {
|
|
|
193
193
|
"pptx.animation.catalogPreset.emph39": "Line Color",
|
|
194
194
|
"pptx.animation.catalogPreset.emph40": "Brush on Color (Sustain)",
|
|
195
195
|
"pptx.animation.catalogPreset.emph41": "Color Wave (Sustain)",
|
|
196
|
-
"pptx.animation.catalogPreset.emph42": "Flash",
|
|
197
|
-
"pptx.animation.catalogPreset.emph43": "Flicker Slow",
|
|
198
|
-
"pptx.animation.catalogPreset.emph44": "Grow Big",
|
|
199
|
-
"pptx.animation.catalogPreset.emph45": "Shrink Small",
|
|
200
|
-
"pptx.animation.catalogPreset.emph46": "Color Lighten",
|
|
201
|
-
"pptx.animation.catalogPreset.emph47": "Color Darken",
|
|
202
|
-
"pptx.animation.catalogPreset.emph48": "Bold Italics",
|
|
203
|
-
"pptx.animation.catalogPreset.emph49": "Spin Slow",
|
|
204
|
-
"pptx.animation.catalogPreset.emph50": "Spin Fast",
|
|
205
|
-
"pptx.animation.catalogPreset.emph51": "Wobble",
|
|
206
|
-
"pptx.animation.catalogPreset.emph52": "Jiggle",
|
|
207
|
-
"pptx.animation.catalogPreset.emph53": "Bounce In Place",
|
|
208
|
-
"pptx.animation.catalogPreset.emph54": "Heartbeat",
|
|
209
|
-
"pptx.animation.catalogPreset.emph55": "Glow",
|
|
210
|
-
"pptx.animation.catalogPreset.emph56": "Brighten",
|
|
211
|
-
"pptx.animation.catalogPreset.emph57": "Dim",
|
|
212
|
-
"pptx.animation.catalogPreset.emph58": "Saturate",
|
|
213
|
-
"pptx.animation.catalogPreset.emph59": "Color Cycle",
|
|
214
|
-
"pptx.animation.catalogPreset.emph60": "Rainbow",
|
|
215
|
-
"pptx.animation.catalogPreset.emph61": "Shake",
|
|
216
|
-
"pptx.animation.catalogPreset.emph62": "Vibrate",
|
|
217
|
-
"pptx.animation.catalogPreset.emph63": "Sway",
|
|
218
|
-
"pptx.animation.catalogPreset.emph64": "Bob",
|
|
219
196
|
// Motion path catalogue.
|
|
220
197
|
"pptx.animation.catalogPreset.pathLineUp": "Lines: Up",
|
|
221
198
|
"pptx.animation.catalogPreset.pathLineDown": "Lines: Down",
|
|
@@ -2870,6 +2847,8 @@ var translationsEn = {
|
|
|
2870
2847
|
"pptx.fillPatterns.wideVertical": "Wide Vertical",
|
|
2871
2848
|
"pptx.fillPatterns.zigZag": "Zig Zag",
|
|
2872
2849
|
"pptx.fillStroke.eyedropperTooltip": "Eyedropper: pick colour from screen",
|
|
2850
|
+
"pptx.colorPicker.themeColors": "Theme Colors",
|
|
2851
|
+
"pptx.colorPicker.standardColors": "Standard Colors",
|
|
2873
2852
|
"pptx.image.cropBottom": "Crop Bottom",
|
|
2874
2853
|
"pptx.image.cropLeft": "Crop Left",
|
|
2875
2854
|
"pptx.image.cropRight": "Crop Right",
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, getImageFitStyle, getComputedFillStyle, isImageLikeElement, getCropShapeClipPath, getImageTilingStyle, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle, buildParagraphs, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, 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, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, resolveAutoFitFontScale, resolveFontKerning, getSubstituteFontFamily, parsePanoseString, resolveScriptFontSet, hasDistinctScriptFonts, nestedTextDecorationStyle, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, buildSubpathPaints, computeColumnBoundaries, getTableCellBandStyle, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, cellRunStyle, getChartStylePalette, computeChartLegendLayout, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, ooxmlGradientAngleToCssDegrees, buildRectPathGradient, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitRunByScriptFont } from './chunk-
|
|
2
|
-
import { translationsEn } from './chunk-
|
|
1
|
+
import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, getImageFitStyle, getComputedFillStyle, isImageLikeElement, getCropShapeClipPath, getImageTilingStyle, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle, buildParagraphs, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, 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, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, resolveAutoFitFontScale, resolveFontKerning, getSubstituteFontFamily, parsePanoseString, resolveScriptFontSet, hasDistinctScriptFonts, nestedTextDecorationStyle, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, buildSubpathPaints, computeColumnBoundaries, getTableCellBandStyle, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, cellRunStyle, getChartStylePalette, computeChartLegendLayout, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, ooxmlGradientAngleToCssDegrees, buildRectPathGradient, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitRunByScriptFont } from './chunk-NV55GU5V.mjs';
|
|
2
|
+
import { translationsEn } from './chunk-FGTMS7LR.mjs';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import React7, { useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect } from 'react';
|
|
@@ -57,22 +57,6 @@ var TOOLBAR_SECTIONS = [
|
|
|
57
57
|
];
|
|
58
58
|
var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
|
|
59
59
|
|
|
60
|
-
// src/viewer/constants/theme.ts
|
|
61
|
-
var THEME_COLOR_SWATCHES = [
|
|
62
|
-
"#000000",
|
|
63
|
-
"#FFFFFF",
|
|
64
|
-
"#1F497D",
|
|
65
|
-
"#EEECE1",
|
|
66
|
-
"#4472C4",
|
|
67
|
-
"#ED7D31",
|
|
68
|
-
"#A5A5A5",
|
|
69
|
-
"#FFC000",
|
|
70
|
-
"#5B9BD5",
|
|
71
|
-
"#70AD47",
|
|
72
|
-
"#0563C1",
|
|
73
|
-
"#954F72"
|
|
74
|
-
];
|
|
75
|
-
|
|
76
60
|
// src/viewer/constants/transitions-animations.ts
|
|
77
61
|
var ANIMATION_PRESET_OPTIONS = [
|
|
78
62
|
{ value: "fadeIn", label: "Fade In", i18nKey: "pptx.animation.preset.fadeIn" },
|
|
@@ -1095,13 +1079,19 @@ function makeSegmentPieceRenderer(needsScriptFonts, scriptFonts, baseFontFamily,
|
|
|
1095
1079
|
)
|
|
1096
1080
|
);
|
|
1097
1081
|
}
|
|
1098
|
-
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle) {
|
|
1099
|
-
const [lineLayout] = buildRunTabLines(
|
|
1082
|
+
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underlineWords = false) {
|
|
1083
|
+
const [lineLayout] = buildRunTabLines(
|
|
1084
|
+
line,
|
|
1085
|
+
ctx,
|
|
1086
|
+
nestedStyle,
|
|
1087
|
+
void 0,
|
|
1088
|
+
underlineWords
|
|
1089
|
+
);
|
|
1100
1090
|
return /* @__PURE__ */ jsx("span", { style: { display: "inline-block", whiteSpace: "nowrap" }, children: lineLayout.pieces.map((piece, i) => {
|
|
1101
1091
|
const key = `${keyPrefix}-tab-${i}`;
|
|
1102
1092
|
return /* @__PURE__ */ jsxs(React7.Fragment, { children: [
|
|
1103
1093
|
piece.leaderStyle ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", style: piece.leaderStyle, children: piece.leaderText }) : null,
|
|
1104
|
-
/* @__PURE__ */ jsx("span", { style: piece.style, children: renderPiece(piece.text, key) })
|
|
1094
|
+
piece.words ? piece.words.map((word, w) => /* @__PURE__ */ jsx("span", { style: word.style, children: renderPiece(word.text, `${key}-w${w}`) }, `${key}-w${w}`)) : /* @__PURE__ */ jsx("span", { style: piece.style, children: renderPiece(piece.text, key) })
|
|
1105
1095
|
] }, key);
|
|
1106
1096
|
}) });
|
|
1107
1097
|
}
|
|
@@ -1156,7 +1146,14 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1156
1146
|
return lines.map((line, lineIndex) => {
|
|
1157
1147
|
const lineKey = `${elementId}-seg-${segmentIndex}-line-${lineIndex}`;
|
|
1158
1148
|
return /* @__PURE__ */ jsxs(React7.Fragment, { children: [
|
|
1159
|
-
tabContext && line.includes(" ") ? renderTabbedLine(
|
|
1149
|
+
tabContext && line.includes(" ") ? renderTabbedLine(
|
|
1150
|
+
line,
|
|
1151
|
+
tabContext,
|
|
1152
|
+
lineKey,
|
|
1153
|
+
renderLeaf,
|
|
1154
|
+
metric?.nestedStyle,
|
|
1155
|
+
isUnderlineWords
|
|
1156
|
+
) : renderLeaf(line, lineKey),
|
|
1160
1157
|
lineIndex < lines.length - 1 ? /* @__PURE__ */ jsx("br", {}) : null
|
|
1161
1158
|
] }, lineKey);
|
|
1162
1159
|
});
|
|
@@ -1384,7 +1381,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1384
1381
|
spanStyle.unicodeBidi = runRtl !== ctx.paragraphRtl ? "bidi-override" : "embed";
|
|
1385
1382
|
}
|
|
1386
1383
|
const isUnderlineWords = Boolean(segmentStyle.underline) && segmentStyle.underlineStyle === "words";
|
|
1387
|
-
const wordDecoration = isUnderlineWords ? nestedStyle : void 0;
|
|
1384
|
+
const wordDecoration = isUnderlineWords ? nestedStyle ?? run.underlineWordPieces?.find((piece) => piece.style)?.style : void 0;
|
|
1388
1385
|
if (isUnderlineWords) {
|
|
1389
1386
|
const stripped = stripUnderlineDecoration(spanStyle);
|
|
1390
1387
|
spanStyle.textDecoration = stripped.textDecoration;
|
|
@@ -1906,6 +1903,34 @@ function renderConnectorMarker(markerId, arrowType, color, arrowWidth, arrowLeng
|
|
|
1906
1903
|
}
|
|
1907
1904
|
);
|
|
1908
1905
|
}
|
|
1906
|
+
function renderSvgGradientDefs(gradient) {
|
|
1907
|
+
if (!gradient) {
|
|
1908
|
+
return null;
|
|
1909
|
+
}
|
|
1910
|
+
if (gradient.kind === "rectPath") {
|
|
1911
|
+
return /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: gradient.id, patternUnits: "objectBoundingBox", width: 1, height: 1, children: /* @__PURE__ */ jsx("image", { href: gradient.href, x: 0, y: 0, width: 1, height: 1, preserveAspectRatio: "none" }) }) });
|
|
1912
|
+
}
|
|
1913
|
+
const stops = gradient.stops.map((stop, index) => /* @__PURE__ */ jsx(
|
|
1914
|
+
"stop",
|
|
1915
|
+
{
|
|
1916
|
+
offset: stop.offset,
|
|
1917
|
+
stopColor: stop.color,
|
|
1918
|
+
stopOpacity: typeof stop.opacity === "number" ? stop.opacity : void 0
|
|
1919
|
+
},
|
|
1920
|
+
index
|
|
1921
|
+
));
|
|
1922
|
+
return /* @__PURE__ */ jsx("defs", { children: gradient.kind === "radial" ? /* @__PURE__ */ jsx("radialGradient", { id: gradient.id, cx: gradient.cx, cy: gradient.cy, r: gradient.r, children: stops }) : /* @__PURE__ */ jsx(
|
|
1923
|
+
"linearGradient",
|
|
1924
|
+
{
|
|
1925
|
+
id: gradient.id,
|
|
1926
|
+
x1: gradient.x1,
|
|
1927
|
+
y1: gradient.y1,
|
|
1928
|
+
x2: gradient.x2,
|
|
1929
|
+
y2: gradient.y2,
|
|
1930
|
+
children: stops
|
|
1931
|
+
}
|
|
1932
|
+
) });
|
|
1933
|
+
}
|
|
1909
1934
|
function joinStyle(shapeStyle) {
|
|
1910
1935
|
const lineJoin = shapeStyle?.lineJoin === "bevel" ? "bevel" : shapeStyle?.lineJoin === "miter" ? "miter" : "round";
|
|
1911
1936
|
const miterLimit = lineJoin === "miter" && typeof shapeStyle?.miterLimit === "number" ? Math.max(shapeStyle.miterLimit / 1e5, 1) : void 0;
|
|
@@ -1942,31 +1967,6 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
1942
1967
|
`${keyBase}-s${idx}`
|
|
1943
1968
|
));
|
|
1944
1969
|
}
|
|
1945
|
-
function gradientDefs(gradient) {
|
|
1946
|
-
if (!gradient) {
|
|
1947
|
-
return null;
|
|
1948
|
-
}
|
|
1949
|
-
const stops = gradient.stops.map((stop, idx) => /* @__PURE__ */ jsx(
|
|
1950
|
-
"stop",
|
|
1951
|
-
{
|
|
1952
|
-
offset: stop.offset,
|
|
1953
|
-
stopColor: stop.color,
|
|
1954
|
-
stopOpacity: typeof stop.opacity === "number" ? stop.opacity : void 0
|
|
1955
|
-
},
|
|
1956
|
-
idx
|
|
1957
|
-
));
|
|
1958
|
-
return /* @__PURE__ */ jsx("defs", { children: gradient.kind === "radial" ? /* @__PURE__ */ jsx("radialGradient", { id: gradient.id, cx: gradient.cx, cy: gradient.cy, r: gradient.r, children: stops }) : /* @__PURE__ */ jsx(
|
|
1959
|
-
"linearGradient",
|
|
1960
|
-
{
|
|
1961
|
-
id: gradient.id,
|
|
1962
|
-
x1: gradient.x1,
|
|
1963
|
-
y1: gradient.y1,
|
|
1964
|
-
x2: gradient.x2,
|
|
1965
|
-
y2: gradient.y2,
|
|
1966
|
-
children: stops
|
|
1967
|
-
}
|
|
1968
|
-
) });
|
|
1969
|
-
}
|
|
1970
1970
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
1971
1971
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
1972
1972
|
const subpaths = structuredPaths && structuredPaths.length > 0 ? customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
@@ -2022,29 +2022,12 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2022
2022
|
className: "w-full h-full pointer-events-none",
|
|
2023
2023
|
preserveAspectRatio: "none",
|
|
2024
2024
|
children: [
|
|
2025
|
-
animatesFill ? null :
|
|
2025
|
+
animatesFill ? null : renderSvgGradientDefs(gradient),
|
|
2026
2026
|
nodes
|
|
2027
2027
|
]
|
|
2028
2028
|
}
|
|
2029
2029
|
);
|
|
2030
2030
|
}
|
|
2031
|
-
function renderGradientDefs(gradient) {
|
|
2032
|
-
if (!gradient) {
|
|
2033
|
-
return null;
|
|
2034
|
-
}
|
|
2035
|
-
const stops = gradient.stops.map((stop, index) => /* @__PURE__ */ jsx("stop", { offset: stop.offset, stopColor: stop.color, stopOpacity: stop.opacity }, index));
|
|
2036
|
-
return /* @__PURE__ */ jsx("defs", { children: gradient.kind === "radial" ? /* @__PURE__ */ jsx("radialGradient", { id: gradient.id, cx: gradient.cx, cy: gradient.cy, r: gradient.r, children: stops }) : /* @__PURE__ */ jsx(
|
|
2037
|
-
"linearGradient",
|
|
2038
|
-
{
|
|
2039
|
-
id: gradient.id,
|
|
2040
|
-
x1: gradient.x1,
|
|
2041
|
-
y1: gradient.y1,
|
|
2042
|
-
x2: gradient.x2,
|
|
2043
|
-
y2: gradient.y2,
|
|
2044
|
-
children: stops
|
|
2045
|
-
}
|
|
2046
|
-
) });
|
|
2047
|
-
}
|
|
2048
2031
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2049
2032
|
if (!hasShapeProperties(element)) {
|
|
2050
2033
|
return null;
|
|
@@ -2195,7 +2178,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2195
2178
|
overflow: "visible"
|
|
2196
2179
|
},
|
|
2197
2180
|
children: [
|
|
2198
|
-
animatesFill ? null :
|
|
2181
|
+
animatesFill ? null : renderSvgGradientDefs(gradient),
|
|
2199
2182
|
/* @__PURE__ */ jsx(
|
|
2200
2183
|
"path",
|
|
2201
2184
|
{
|
|
@@ -3848,4 +3831,4 @@ function stopPreviewAnimation() {
|
|
|
3848
3831
|
activePreview = null;
|
|
3849
3832
|
}
|
|
3850
3833
|
|
|
3851
|
-
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,
|
|
3834
|
+
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, buildPdfFromImageData, buildReactChartViewModel, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, cloneHistorySnapshot2 as cloneHistorySnapshot, cn, getAnimationInitialStyle2 as getAnimationInitialStyle, 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 };
|
|
Binary file
|
|
Binary file
|