pptx-react-viewer 2.13.1 → 2.14.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 +8 -0
- package/dist/{AiChatPanel-FXPGFU6H.js → AiChatPanel-BJDFFVJG.js} +23 -23
- package/dist/AiChatPanel-BJDFFVJG.js.br +0 -0
- package/dist/AiChatPanel-BJDFFVJG.js.gz +0 -0
- package/dist/{AiChatPanel-WMGS5TNX.mjs → AiChatPanel-UJUN6HB3.mjs} +4 -4
- package/dist/AiChatPanel-UJUN6HB3.mjs.br +0 -0
- package/dist/AiChatPanel-UJUN6HB3.mjs.gz +0 -0
- package/dist/{Model3DScene-K5FPZTRG.js → Model3DScene-F53NQFY7.js} +2 -2
- package/dist/Model3DScene-F53NQFY7.js.br +0 -0
- package/dist/Model3DScene-F53NQFY7.js.gz +0 -0
- package/dist/{Model3DScene-E2XRQAMR.mjs → Model3DScene-LVFHZUVF.mjs} +1 -1
- package/dist/Model3DScene-LVFHZUVF.mjs.br +0 -0
- package/dist/Model3DScene-LVFHZUVF.mjs.gz +0 -0
- package/dist/{PowerPointViewer-Cjn1RgSz.d.ts → PowerPointViewer-Du7u4INi.d.ts} +2 -2
- package/dist/{PowerPointViewer-Cjn1RgSz.d.ts.map → PowerPointViewer-Du7u4INi.d.ts.map} +1 -1
- package/dist/{SurfaceChart3DScene-JDCFTXYT.js → SurfaceChart3DScene-IDJDIHVC.js} +2 -2
- package/dist/SurfaceChart3DScene-IDJDIHVC.js.br +0 -0
- package/dist/SurfaceChart3DScene-IDJDIHVC.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-2W2IFPLE.mjs → SurfaceChart3DScene-MVBQTD6J.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-2W2IFPLE.mjs.br → SurfaceChart3DScene-MVBQTD6J.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-MVBQTD6J.mjs.gz +0 -0
- package/dist/{audience-content-store-BMlth_3U.d.ts → audience-content-store-DaABTAcQ.d.ts} +2 -2
- package/dist/{audience-content-store-BMlth_3U.d.ts.map → audience-content-store-DaABTAcQ.d.ts.map} +1 -1
- package/dist/{chunk-CQ2CKMG4.mjs → chunk-2KRHLUCG.mjs} +37 -3
- package/dist/chunk-2KRHLUCG.mjs.br +0 -0
- package/dist/chunk-2KRHLUCG.mjs.gz +0 -0
- package/dist/{chunk-BXAK3JFM.js → chunk-3ISYPBSX.js} +74 -2
- package/dist/chunk-3ISYPBSX.js.br +0 -0
- package/dist/chunk-3ISYPBSX.js.gz +0 -0
- package/dist/{chunk-OWGPRVRK.mjs → chunk-5MMC7ZR3.mjs} +8532 -576
- package/dist/chunk-5MMC7ZR3.mjs.br +0 -0
- package/dist/chunk-5MMC7ZR3.mjs.gz +0 -0
- package/dist/{chunk-TEXIGSA6.mjs → chunk-5YV26HMJ.mjs} +74 -2
- package/dist/chunk-5YV26HMJ.mjs.br +0 -0
- package/dist/chunk-5YV26HMJ.mjs.gz +0 -0
- package/dist/{chunk-QFNJCEMS.js → chunk-7TEZJZ2O.js} +572 -427
- package/dist/chunk-7TEZJZ2O.js.br +0 -0
- package/dist/chunk-7TEZJZ2O.js.gz +0 -0
- package/dist/{chunk-3OV4FR6S.mjs → chunk-GROIHKI5.mjs} +11166 -10887
- package/dist/chunk-GROIHKI5.mjs.br +0 -0
- package/dist/chunk-GROIHKI5.mjs.gz +0 -0
- package/dist/{chunk-ZMIFFURL.js → chunk-HOIF5RQI.js} +12315 -12034
- package/dist/chunk-HOIF5RQI.js.br +0 -0
- package/dist/chunk-HOIF5RQI.js.gz +0 -0
- package/dist/{chunk-DD2YRS6Z.js → chunk-PB7KVDNV.js} +8551 -582
- package/dist/chunk-PB7KVDNV.js.br +0 -0
- package/dist/chunk-PB7KVDNV.js.gz +0 -0
- package/dist/{chunk-PTFCMG3A.js → chunk-QVQDC7HZ.js} +39 -5
- package/dist/chunk-QVQDC7HZ.js.br +0 -0
- package/dist/chunk-QVQDC7HZ.js.gz +0 -0
- package/dist/{chunk-GJEH27GD.mjs → chunk-R7MGJCZN.mjs} +285 -325
- package/dist/chunk-R7MGJCZN.mjs.br +0 -0
- package/dist/chunk-R7MGJCZN.mjs.gz +0 -0
- package/dist/{chunk-66ZHD7Y4.js → chunk-SMECSYCT.js} +527 -567
- package/dist/chunk-SMECSYCT.js.br +0 -0
- package/dist/chunk-SMECSYCT.js.gz +0 -0
- package/dist/{chunk-H5H57XMH.mjs → chunk-T4NHPN76.mjs} +249 -104
- package/dist/chunk-T4NHPN76.mjs.br +0 -0
- package/dist/chunk-T4NHPN76.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 +139 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -36
- 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 +124 -4
- 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/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/{types-DciBT90G.d.ts → types-DU35aAJK.d.ts} +2 -2
- package/dist/{types-DciBT90G.d.ts.map → types-DU35aAJK.d.ts.map} +1 -1
- package/dist/{useViewerBuildingBlocks-YvCYsxa3.d.ts → useViewerBuildingBlocks-CBZrHhxl.d.ts} +10 -5
- package/dist/useViewerBuildingBlocks-CBZrHhxl.d.ts.map +1 -0
- package/dist/viewer/index.d.ts +44 -2
- package/dist/viewer/index.js +22 -22
- 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 +1 -1
- package/dist/AiChatPanel-FXPGFU6H.js.br +0 -0
- package/dist/AiChatPanel-FXPGFU6H.js.gz +0 -0
- package/dist/AiChatPanel-WMGS5TNX.mjs.br +0 -0
- package/dist/AiChatPanel-WMGS5TNX.mjs.gz +0 -0
- package/dist/Model3DScene-E2XRQAMR.mjs.br +0 -0
- package/dist/Model3DScene-E2XRQAMR.mjs.gz +0 -0
- package/dist/Model3DScene-K5FPZTRG.js.br +0 -0
- package/dist/Model3DScene-K5FPZTRG.js.gz +0 -0
- package/dist/SurfaceChart3DScene-2W2IFPLE.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-JDCFTXYT.js.br +0 -0
- package/dist/SurfaceChart3DScene-JDCFTXYT.js.gz +0 -0
- package/dist/chunk-3OV4FR6S.mjs.br +0 -0
- package/dist/chunk-3OV4FR6S.mjs.gz +0 -0
- package/dist/chunk-66ZHD7Y4.js.br +0 -0
- package/dist/chunk-66ZHD7Y4.js.gz +0 -0
- package/dist/chunk-BXAK3JFM.js.br +0 -0
- package/dist/chunk-BXAK3JFM.js.gz +0 -0
- package/dist/chunk-CQ2CKMG4.mjs.br +0 -0
- package/dist/chunk-CQ2CKMG4.mjs.gz +0 -0
- package/dist/chunk-DD2YRS6Z.js.br +0 -0
- package/dist/chunk-DD2YRS6Z.js.gz +0 -0
- package/dist/chunk-GJEH27GD.mjs.br +0 -0
- package/dist/chunk-GJEH27GD.mjs.gz +0 -0
- package/dist/chunk-H5H57XMH.mjs.br +0 -0
- package/dist/chunk-H5H57XMH.mjs.gz +0 -0
- package/dist/chunk-OWGPRVRK.mjs.br +0 -0
- package/dist/chunk-OWGPRVRK.mjs.gz +0 -0
- package/dist/chunk-PTFCMG3A.js.br +0 -0
- package/dist/chunk-PTFCMG3A.js.gz +0 -0
- package/dist/chunk-QFNJCEMS.js.br +0 -0
- package/dist/chunk-QFNJCEMS.js.gz +0 -0
- package/dist/chunk-TEXIGSA6.mjs.br +0 -0
- package/dist/chunk-TEXIGSA6.mjs.gz +0 -0
- package/dist/chunk-ZMIFFURL.js.br +0 -0
- package/dist/chunk-ZMIFFURL.js.gz +0 -0
- package/dist/useViewerBuildingBlocks-YvCYsxa3.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { translationsEn } from './chunk-
|
|
2
|
-
import { SHAPE_PRESET_DEFS, computeValueRangeForChart, VIEWER_SHORTCUT_REFERENCE, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, isTemplateElement, getImageFitStyle, isImageLikeElement, runMediaCommand, findMediaElementByElementId, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, resolveParagraphStrutFontSize, colorWithOpacity, normalizeHexColor, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, suppressesCssBorder, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, buildSvgGradientDef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, getRoundRectRadiusPx, registerPersistentAudio, proportionalLineHeight, substituteFieldText, resolveUnderlineDecorationStyle, POWERPOINT_METRIC_TRACKING, resolveAutoFitFontScale, getSubstituteFontFamily, parsePanoseString, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle,
|
|
1
|
+
import { translationsEn } from './chunk-5YV26HMJ.mjs';
|
|
2
|
+
import { SHAPE_PRESET_DEFS, computeValueRangeForChart, VIEWER_SHORTCUT_REFERENCE, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, isTemplateElement, getImageFitStyle, isImageLikeElement, runMediaCommand, findMediaElementByElementId, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, resolveParagraphStrutFontSize, colorWithOpacity, normalizeHexColor, build3DExtrusionData, getResolvedShapeClipPath, isStrokeOnlyPresetElement, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, suppressesCssBorder, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, buildSvgGradientDef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, computeSelectionRect, DEFAULT_FONT_FAMILY, rectToCells, isCellInRect, buildChartViewModel, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, getRoundRectRadiusPx, registerPersistentAudio, proportionalLineHeight, substituteFieldText, resolveUnderlineDecorationStyle, POWERPOINT_METRIC_TRACKING, resolveAutoFitFontScale, getSubstituteFontFamily, parsePanoseString, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, sanitizeGradientStops, getGradientTileFlipCss, getGradientTileRectCss, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, svgGradientFillRef, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getPatternSvg, ooxmlDashToCssBorderStyle, cell3DBevelCss, getChartStylePalette, chartAreaFill, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, resolveFontRefIdx, tintColor2, shadeColor2, ooxmlGradientAngleToCssDegrees, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, hexToRgbChannels, chartPartToAttrs } from './chunk-5MMC7ZR3.mjs';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import React6, { useState, useEffect, useMemo, Suspense, useRef, useCallback, useLayoutEffect } from 'react';
|
|
@@ -29,7 +29,7 @@ var DEFAULT_BODY_INSET_TB_PX = 45720 / 9525;
|
|
|
29
29
|
var DEFAULT_TEXT_COLOR = "#111827";
|
|
30
30
|
var DEFAULT_FILL_COLOR = "#3b82f6";
|
|
31
31
|
var DEFAULT_STROKE_COLOR = "#1f2937";
|
|
32
|
-
var
|
|
32
|
+
var DEFAULT_FONT_FAMILY2 = '"Segoe UI", "Helvetica Neue", Arial, sans-serif';
|
|
33
33
|
var DEFAULT_TEXT_FONT_SIZE = 24;
|
|
34
34
|
var HYPERLINK_COLOR = "#0563C1";
|
|
35
35
|
var DEFAULT_TABLE_ROWS = 3;
|
|
@@ -1738,7 +1738,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1738
1738
|
const baseFontFamily = rawFontFamily ? getSubstituteFontFamily(
|
|
1739
1739
|
rawFontFamily,
|
|
1740
1740
|
parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1741
|
-
) :
|
|
1741
|
+
) : DEFAULT_FONT_FAMILY2;
|
|
1742
1742
|
const scriptFont = (name, panose) => name ? getSubstituteFontFamily(name, parsePanoseString(panose)) : baseFontFamily;
|
|
1743
1743
|
const scriptFonts = {
|
|
1744
1744
|
latin: baseFontFamily,
|
|
@@ -2232,67 +2232,6 @@ function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
|
|
|
2232
2232
|
apply3dEffects(base, scene3d, shape3d, fillColorFallback);
|
|
2233
2233
|
}
|
|
2234
2234
|
|
|
2235
|
-
// src/viewer/utils/vector-subpath-paint.ts
|
|
2236
|
-
function toHexByte(value) {
|
|
2237
|
-
const clamped = Math.max(0, Math.min(255, Math.round(value)));
|
|
2238
|
-
return clamped.toString(16).padStart(2, "0");
|
|
2239
|
-
}
|
|
2240
|
-
function shiftHex(hex, factor, towardsWhite) {
|
|
2241
|
-
const channels = hexToRgbChannels(hex);
|
|
2242
|
-
if (!channels) {
|
|
2243
|
-
return hex;
|
|
2244
|
-
}
|
|
2245
|
-
const shift = (c) => towardsWhite ? c + (255 - c) * factor : c * (1 - factor);
|
|
2246
|
-
return `#${toHexByte(shift(channels.r))}${toHexByte(shift(channels.g))}${toHexByte(shift(channels.b))}`;
|
|
2247
|
-
}
|
|
2248
|
-
function adjustFillForMode(fillHex, mode) {
|
|
2249
|
-
switch (mode) {
|
|
2250
|
-
case "lighten":
|
|
2251
|
-
return shiftHex(fillHex, 0.4, true);
|
|
2252
|
-
case "lightenLess":
|
|
2253
|
-
return shiftHex(fillHex, 0.2, true);
|
|
2254
|
-
case "darken":
|
|
2255
|
-
return shiftHex(fillHex, 0.4, false);
|
|
2256
|
-
case "darkenLess":
|
|
2257
|
-
return shiftHex(fillHex, 0.2, false);
|
|
2258
|
-
default:
|
|
2259
|
-
return fillHex;
|
|
2260
|
-
}
|
|
2261
|
-
}
|
|
2262
|
-
function buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity) {
|
|
2263
|
-
return subpaths.map((subpath) => {
|
|
2264
|
-
const fillOff = subpath.fillMode === "none" || !hasFill;
|
|
2265
|
-
return {
|
|
2266
|
-
d: subpath.d,
|
|
2267
|
-
fill: fillOff ? "none" : colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
|
|
2268
|
-
stroked: subpath.stroke !== false
|
|
2269
|
-
};
|
|
2270
|
-
});
|
|
2271
|
-
}
|
|
2272
|
-
function getStrokeOnlyPresetPaths(element) {
|
|
2273
|
-
if (element.type !== "shape" || !hasShapeProperties(element)) {
|
|
2274
|
-
return void 0;
|
|
2275
|
-
}
|
|
2276
|
-
const shapeType = element.shapeType;
|
|
2277
|
-
if (!shapeType || shapeType === "custom") {
|
|
2278
|
-
return void 0;
|
|
2279
|
-
}
|
|
2280
|
-
if (element.pathData) {
|
|
2281
|
-
return void 0;
|
|
2282
|
-
}
|
|
2283
|
-
const result = evaluatePresetShape(
|
|
2284
|
-
shapeType,
|
|
2285
|
-
Math.max(element.width, 1),
|
|
2286
|
-
Math.max(element.height, 1),
|
|
2287
|
-
element.shapeAdjustments
|
|
2288
|
-
);
|
|
2289
|
-
if (!result || !result.fillNone) {
|
|
2290
|
-
return void 0;
|
|
2291
|
-
}
|
|
2292
|
-
const drawable = result.paths.filter((path) => path.d !== "");
|
|
2293
|
-
return drawable.length > 0 ? drawable : void 0;
|
|
2294
|
-
}
|
|
2295
|
-
|
|
2296
2235
|
// src/viewer/utils/shape-visual-style.ts
|
|
2297
2236
|
function getGradientTilingCss(style) {
|
|
2298
2237
|
if (!style || style.fillMode !== "gradient") {
|
|
@@ -2314,7 +2253,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2314
2253
|
const normalizedShapeType = getShapeType(element.shapeType);
|
|
2315
2254
|
const clipPath = getResolvedShapeClipPath(element);
|
|
2316
2255
|
const rendersCustomVectorPath = (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
|
|
2317
|
-
const rendersStrokeOnlyPreset =
|
|
2256
|
+
const rendersStrokeOnlyPreset = isStrokeOnlyPresetElement(element);
|
|
2318
2257
|
const fillOpacity = element.shapeStyle?.fillOpacity;
|
|
2319
2258
|
const strokeOpacity = element.shapeStyle?.strokeOpacity;
|
|
2320
2259
|
const strokeDash = normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
@@ -2492,7 +2431,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2492
2431
|
clipPath
|
|
2493
2432
|
};
|
|
2494
2433
|
}
|
|
2495
|
-
if (normalizedShapeType === "line") {
|
|
2434
|
+
if (normalizedShapeType === "line" && !rendersStrokeOnlyPreset) {
|
|
2496
2435
|
return {
|
|
2497
2436
|
...base,
|
|
2498
2437
|
backgroundColor: "transparent",
|
|
@@ -2645,6 +2584,44 @@ function renderConnectorMarker(markerId, arrowType, color, arrowWidth, arrowLeng
|
|
|
2645
2584
|
}
|
|
2646
2585
|
);
|
|
2647
2586
|
}
|
|
2587
|
+
|
|
2588
|
+
// src/viewer/utils/vector-subpath-paint.ts
|
|
2589
|
+
function toHexByte(value) {
|
|
2590
|
+
const clamped = Math.max(0, Math.min(255, Math.round(value)));
|
|
2591
|
+
return clamped.toString(16).padStart(2, "0");
|
|
2592
|
+
}
|
|
2593
|
+
function shiftHex(hex, factor, towardsWhite) {
|
|
2594
|
+
const channels = hexToRgbChannels(hex);
|
|
2595
|
+
if (!channels) {
|
|
2596
|
+
return hex;
|
|
2597
|
+
}
|
|
2598
|
+
const shift = (c) => towardsWhite ? c + (255 - c) * factor : c * (1 - factor);
|
|
2599
|
+
return `#${toHexByte(shift(channels.r))}${toHexByte(shift(channels.g))}${toHexByte(shift(channels.b))}`;
|
|
2600
|
+
}
|
|
2601
|
+
function adjustFillForMode(fillHex, mode) {
|
|
2602
|
+
switch (mode) {
|
|
2603
|
+
case "lighten":
|
|
2604
|
+
return shiftHex(fillHex, 0.4, true);
|
|
2605
|
+
case "lightenLess":
|
|
2606
|
+
return shiftHex(fillHex, 0.2, true);
|
|
2607
|
+
case "darken":
|
|
2608
|
+
return shiftHex(fillHex, 0.4, false);
|
|
2609
|
+
case "darkenLess":
|
|
2610
|
+
return shiftHex(fillHex, 0.2, false);
|
|
2611
|
+
default:
|
|
2612
|
+
return fillHex;
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
function buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity) {
|
|
2616
|
+
return subpaths.map((subpath) => {
|
|
2617
|
+
const fillOff = subpath.fillMode === "none" || !hasFill;
|
|
2618
|
+
return {
|
|
2619
|
+
d: subpath.d,
|
|
2620
|
+
fill: fillOff ? "none" : colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
|
|
2621
|
+
stroked: subpath.stroke !== false
|
|
2622
|
+
};
|
|
2623
|
+
});
|
|
2624
|
+
}
|
|
2648
2625
|
function joinStyle(shapeStyle) {
|
|
2649
2626
|
const lineJoin = shapeStyle?.lineJoin === "bevel" ? "bevel" : shapeStyle?.lineJoin === "miter" ? "miter" : "round";
|
|
2650
2627
|
const miterLimit = lineJoin === "miter" && typeof shapeStyle?.miterLimit === "number" ? Math.max(shapeStyle.miterLimit / 1e5, 1) : void 0;
|
|
@@ -2767,25 +2744,6 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2767
2744
|
}
|
|
2768
2745
|
);
|
|
2769
2746
|
}
|
|
2770
|
-
function renderStrokeOnlyPreset(presetPaths, width, height, shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
2771
|
-
const ctx = strokeContext(shapeStyle, strokePaint, Math.max(strokeWidth, 1), dashArray);
|
|
2772
|
-
const nodes = [];
|
|
2773
|
-
presetPaths.forEach((path, idx) => {
|
|
2774
|
-
if (path.stroke === false) {
|
|
2775
|
-
return;
|
|
2776
|
-
}
|
|
2777
|
-
nodes.push(...strokeStrands(path.d, `pre${idx}`, ctx));
|
|
2778
|
-
});
|
|
2779
|
-
return /* @__PURE__ */ jsx(
|
|
2780
|
-
"svg",
|
|
2781
|
-
{
|
|
2782
|
-
viewBox: `0 0 ${Math.max(width, 1)} ${Math.max(height, 1)}`,
|
|
2783
|
-
className: "w-full h-full pointer-events-none",
|
|
2784
|
-
preserveAspectRatio: "none",
|
|
2785
|
-
children: nodes
|
|
2786
|
-
}
|
|
2787
|
-
);
|
|
2788
|
-
}
|
|
2789
2747
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2790
2748
|
if (!hasShapeProperties(element)) {
|
|
2791
2749
|
return null;
|
|
@@ -3004,18 +2962,6 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
3004
2962
|
}
|
|
3005
2963
|
);
|
|
3006
2964
|
}
|
|
3007
|
-
const strokeOnlyPreset = getStrokeOnlyPresetPaths(element);
|
|
3008
|
-
if (strokeOnlyPreset) {
|
|
3009
|
-
return renderStrokeOnlyPreset(
|
|
3010
|
-
strokeOnlyPreset,
|
|
3011
|
-
element.width,
|
|
3012
|
-
element.height,
|
|
3013
|
-
element.shapeStyle,
|
|
3014
|
-
strokePaint,
|
|
3015
|
-
strokeWidth,
|
|
3016
|
-
dashArray
|
|
3017
|
-
);
|
|
3018
|
-
}
|
|
3019
2965
|
return null;
|
|
3020
2966
|
}
|
|
3021
2967
|
|
|
@@ -4082,113 +4028,120 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4082
4028
|
"w-full h-full overflow-hidden",
|
|
4083
4029
|
isEditable && hasCellSelectionHandler ? "pointer-events-auto" : "pointer-events-none"
|
|
4084
4030
|
),
|
|
4085
|
-
children: /* @__PURE__ */ jsxs(
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
},
|
|
4151
|
-
onDoubleClick: (event) => {
|
|
4152
|
-
if (!isEditable || !hasCellSelectionHandler) {
|
|
4153
|
-
return;
|
|
4154
|
-
}
|
|
4155
|
-
event.stopPropagation();
|
|
4156
|
-
options?.onSelectCell?.({
|
|
4157
|
-
rowIndex,
|
|
4158
|
-
columnIndex: cellIndex,
|
|
4159
|
-
isEditing: true
|
|
4160
|
-
});
|
|
4161
|
-
},
|
|
4162
|
-
children: [
|
|
4163
|
-
diag ? /* @__PURE__ */ jsx(TableCellDiagonalBorders, { diag }) : null,
|
|
4164
|
-
isCellEditing ? /* @__PURE__ */ jsx(
|
|
4165
|
-
TableCellInput,
|
|
4166
|
-
{
|
|
4167
|
-
initialText: cell.text ?? "",
|
|
4168
|
-
style: {
|
|
4169
|
-
...textStyle,
|
|
4170
|
-
...cellStyleToCss(cell.style)
|
|
4171
|
-
},
|
|
4172
|
-
onCommit: (text) => {
|
|
4173
|
-
options?.onCommitCellEdit?.(rowIndex, cellIndex, text);
|
|
4174
|
-
},
|
|
4175
|
-
onCancel: () => {
|
|
4031
|
+
children: /* @__PURE__ */ jsxs(
|
|
4032
|
+
"table",
|
|
4033
|
+
{
|
|
4034
|
+
className: "w-full h-full border-collapse table-fixed",
|
|
4035
|
+
style: { fontFamily: DEFAULT_FONT_FAMILY },
|
|
4036
|
+
children: [
|
|
4037
|
+
tableData.columnWidths.length > 0 && /* @__PURE__ */ jsx("colgroup", { children: tableData.columnWidths.map((w, ci) => /* @__PURE__ */ jsx(
|
|
4038
|
+
"col",
|
|
4039
|
+
{
|
|
4040
|
+
style: { width: `${(w * 100).toFixed(2)}%` }
|
|
4041
|
+
},
|
|
4042
|
+
`${element.id}-col-${ci}`
|
|
4043
|
+
)) }),
|
|
4044
|
+
/* @__PURE__ */ jsx("tbody", { children: tableData.rows.map((row, rowIndex) => /* @__PURE__ */ jsx(
|
|
4045
|
+
"tr",
|
|
4046
|
+
{
|
|
4047
|
+
style: row.height ? { height: row.height } : void 0,
|
|
4048
|
+
children: row.cells.map((cell, cellIndex) => {
|
|
4049
|
+
if (cell.hMerge || cell.vMerge) {
|
|
4050
|
+
return null;
|
|
4051
|
+
}
|
|
4052
|
+
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
4053
|
+
const isInMultiSelection = isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
4054
|
+
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
4055
|
+
const diag = getCellDiagonalBorders2(
|
|
4056
|
+
cell.style,
|
|
4057
|
+
tableData,
|
|
4058
|
+
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
4059
|
+
options?.styleCtx
|
|
4060
|
+
);
|
|
4061
|
+
return /* @__PURE__ */ jsxs(
|
|
4062
|
+
"td",
|
|
4063
|
+
{
|
|
4064
|
+
className: cn(
|
|
4065
|
+
"border px-1 py-0.5 align-top",
|
|
4066
|
+
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-gray-400/50",
|
|
4067
|
+
isCellSelected ? "ring-1 ring-inset ring-blue-500" : null,
|
|
4068
|
+
isInMultiSelection && !isCellSelected ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
4069
|
+
),
|
|
4070
|
+
colSpan: cell.gridSpan && cell.gridSpan > 1 ? cell.gridSpan : void 0,
|
|
4071
|
+
rowSpan: cell.rowSpan && cell.rowSpan > 1 ? cell.rowSpan : void 0,
|
|
4072
|
+
style: {
|
|
4073
|
+
...textStyle,
|
|
4074
|
+
...cellStyleToCss(cell.style),
|
|
4075
|
+
...diag ? { position: "relative" } : void 0
|
|
4076
|
+
},
|
|
4077
|
+
onClick: (event) => {
|
|
4078
|
+
if (!isEditable || !hasCellSelectionHandler) {
|
|
4079
|
+
return;
|
|
4080
|
+
}
|
|
4081
|
+
event.stopPropagation();
|
|
4082
|
+
if (event.shiftKey && selectedCell) {
|
|
4083
|
+
const rect = computeSelectionRect(
|
|
4084
|
+
selectedCell.rowIndex,
|
|
4085
|
+
selectedCell.columnIndex,
|
|
4086
|
+
rowIndex,
|
|
4087
|
+
cellIndex,
|
|
4088
|
+
tableData
|
|
4089
|
+
);
|
|
4090
|
+
options?.onSelectCell?.({
|
|
4091
|
+
rowIndex: selectedCell.rowIndex,
|
|
4092
|
+
columnIndex: selectedCell.columnIndex,
|
|
4093
|
+
selectedCells: rectToCells(rect)
|
|
4094
|
+
});
|
|
4095
|
+
} else {
|
|
4176
4096
|
options?.onSelectCell?.({
|
|
4177
4097
|
rowIndex,
|
|
4178
4098
|
columnIndex: cellIndex
|
|
4179
4099
|
});
|
|
4180
4100
|
}
|
|
4181
|
-
}
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4101
|
+
},
|
|
4102
|
+
onDoubleClick: (event) => {
|
|
4103
|
+
if (!isEditable || !hasCellSelectionHandler) {
|
|
4104
|
+
return;
|
|
4105
|
+
}
|
|
4106
|
+
event.stopPropagation();
|
|
4107
|
+
options?.onSelectCell?.({
|
|
4108
|
+
rowIndex,
|
|
4109
|
+
columnIndex: cellIndex,
|
|
4110
|
+
isEditing: true
|
|
4111
|
+
});
|
|
4112
|
+
},
|
|
4113
|
+
children: [
|
|
4114
|
+
diag ? /* @__PURE__ */ jsx(TableCellDiagonalBorders, { diag }) : null,
|
|
4115
|
+
isCellEditing ? /* @__PURE__ */ jsx(
|
|
4116
|
+
TableCellInput,
|
|
4117
|
+
{
|
|
4118
|
+
initialText: cell.text ?? "",
|
|
4119
|
+
style: {
|
|
4120
|
+
...textStyle,
|
|
4121
|
+
...cellStyleToCss(cell.style)
|
|
4122
|
+
},
|
|
4123
|
+
onCommit: (text) => {
|
|
4124
|
+
options?.onCommitCellEdit?.(rowIndex, cellIndex, text);
|
|
4125
|
+
},
|
|
4126
|
+
onCancel: () => {
|
|
4127
|
+
options?.onSelectCell?.({
|
|
4128
|
+
rowIndex,
|
|
4129
|
+
columnIndex: cellIndex
|
|
4130
|
+
});
|
|
4131
|
+
}
|
|
4132
|
+
}
|
|
4133
|
+
) : cell.text || "\xA0"
|
|
4134
|
+
]
|
|
4135
|
+
},
|
|
4136
|
+
`${element.id}-cell-${rowIndex}-${cellIndex}`
|
|
4137
|
+
);
|
|
4138
|
+
})
|
|
4139
|
+
},
|
|
4140
|
+
`${element.id}-row-${rowIndex}`
|
|
4141
|
+
)) })
|
|
4142
|
+
]
|
|
4143
|
+
}
|
|
4144
|
+
)
|
|
4192
4145
|
}
|
|
4193
4146
|
)
|
|
4194
4147
|
}
|
|
@@ -4233,135 +4186,142 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4233
4186
|
"w-full h-full overflow-hidden",
|
|
4234
4187
|
isEditable && hasCellSelectionHandler ? "pointer-events-auto" : "pointer-events-none"
|
|
4235
4188
|
),
|
|
4236
|
-
children: /* @__PURE__ */ jsxs(
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
"
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
rowIndex
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
options?.styleCtx
|
|
4282
|
-
);
|
|
4283
|
-
const mergedStyle = {
|
|
4284
|
-
...bandStyle,
|
|
4285
|
-
...xmlCellStyle,
|
|
4286
|
-
...tdCellOverride ? cellStyleToCss(tdCellOverride) : void 0,
|
|
4287
|
-
...diag ? { position: "relative" } : void 0
|
|
4288
|
-
};
|
|
4289
|
-
return /* @__PURE__ */ jsxs(
|
|
4290
|
-
"td",
|
|
4291
|
-
{
|
|
4292
|
-
className: cn(
|
|
4293
|
-
"border px-1 py-0.5 align-top",
|
|
4294
|
-
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
4295
|
-
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
4296
|
-
isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
4297
|
-
),
|
|
4298
|
-
colSpan,
|
|
4299
|
-
rowSpan: rSpan,
|
|
4300
|
-
style: mergedStyle,
|
|
4301
|
-
onClick: (event) => {
|
|
4302
|
-
if (!isEditable || !hasCellSelectionHandler) {
|
|
4303
|
-
return;
|
|
4304
|
-
}
|
|
4305
|
-
event.stopPropagation();
|
|
4306
|
-
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
4307
|
-
const rect = computeSelectionRect(
|
|
4308
|
-
selectedCell.rowIndex,
|
|
4309
|
-
selectedCell.columnIndex,
|
|
4310
|
-
rowIndex,
|
|
4311
|
-
cellIndex,
|
|
4312
|
-
tableEl.tableData
|
|
4313
|
-
);
|
|
4314
|
-
options?.onSelectCell?.({
|
|
4315
|
-
rowIndex: selectedCell.rowIndex,
|
|
4316
|
-
columnIndex: selectedCell.columnIndex,
|
|
4317
|
-
selectedCells: rectToCells(rect)
|
|
4318
|
-
});
|
|
4319
|
-
} else {
|
|
4320
|
-
options?.onSelectCell?.({
|
|
4321
|
-
rowIndex,
|
|
4322
|
-
columnIndex: cellIndex
|
|
4323
|
-
});
|
|
4324
|
-
}
|
|
4325
|
-
},
|
|
4326
|
-
onDoubleClick: (event) => {
|
|
4327
|
-
if (!isEditable || !hasCellSelectionHandler) {
|
|
4328
|
-
return;
|
|
4329
|
-
}
|
|
4330
|
-
event.stopPropagation();
|
|
4331
|
-
options?.onSelectCell?.({
|
|
4189
|
+
children: /* @__PURE__ */ jsxs(
|
|
4190
|
+
"table",
|
|
4191
|
+
{
|
|
4192
|
+
className: "w-full h-full border-collapse table-fixed",
|
|
4193
|
+
style: { fontFamily: DEFAULT_FONT_FAMILY },
|
|
4194
|
+
children: [
|
|
4195
|
+
parsedTable.columnPercentages.length > 0 ? /* @__PURE__ */ jsx("colgroup", { children: parsedTable.columnPercentages.map((percentage, columnIndex) => /* @__PURE__ */ jsx(
|
|
4196
|
+
"col",
|
|
4197
|
+
{
|
|
4198
|
+
style: { width: `${percentage.toFixed(2)}%` }
|
|
4199
|
+
},
|
|
4200
|
+
`${element.id}-col-${columnIndex}`
|
|
4201
|
+
)) }) : null,
|
|
4202
|
+
/* @__PURE__ */ jsx("tbody", { children: parsedTable.rows.map((row, rowIndex) => {
|
|
4203
|
+
const cells = ensureArrayValue(row["a:tc"]);
|
|
4204
|
+
const rowHeightRaw = Number.parseInt(String(row["@_h"] || ""), 10);
|
|
4205
|
+
const rowHeight = Number.isFinite(rowHeightRaw) && rowHeightRaw > 0 ? Math.max(16, rowHeightRaw / EMU_PER_PX) : void 0;
|
|
4206
|
+
return /* @__PURE__ */ jsx(
|
|
4207
|
+
"tr",
|
|
4208
|
+
{
|
|
4209
|
+
style: rowHeight ? { height: rowHeight } : void 0,
|
|
4210
|
+
children: cells.map((cell, cellIndex) => {
|
|
4211
|
+
const isHMerged = cell["@_hMerge"] === "1";
|
|
4212
|
+
const isVMerged = cell["@_vMerge"] === "1";
|
|
4213
|
+
if (isHMerged || isVMerged) {
|
|
4214
|
+
return null;
|
|
4215
|
+
}
|
|
4216
|
+
const gridSpanRaw = Number.parseInt(String(cell["@_gridSpan"] || ""), 10);
|
|
4217
|
+
const colSpan = Number.isFinite(gridSpanRaw) && gridSpanRaw > 1 ? gridSpanRaw : void 0;
|
|
4218
|
+
const rowSpanRaw = Number.parseInt(String(cell["@_rowSpan"] || ""), 10);
|
|
4219
|
+
const rSpan = Number.isFinite(rowSpanRaw) && rowSpanRaw > 1 ? rowSpanRaw : void 0;
|
|
4220
|
+
const bandStyle = getTableCellBandStyle(
|
|
4221
|
+
element,
|
|
4222
|
+
rowIndex,
|
|
4223
|
+
cellIndex,
|
|
4224
|
+
parsedTable.rowCount,
|
|
4225
|
+
parsedTable.columnCount,
|
|
4226
|
+
options?.styleCtx
|
|
4227
|
+
);
|
|
4228
|
+
const xmlCellStyle = extractTableCellStyle(cell, textStyle, schemeOverrides);
|
|
4229
|
+
const tdCellOverride = tableEl.tableData?.rows[rowIndex]?.cells[cellIndex]?.style;
|
|
4230
|
+
const diag = getCellDiagonalBorders2(
|
|
4231
|
+
tdCellOverride,
|
|
4232
|
+
tableEl.tableData,
|
|
4233
|
+
{
|
|
4332
4234
|
rowIndex,
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4235
|
+
cellIndex,
|
|
4236
|
+
rowCount: parsedTable.rowCount,
|
|
4237
|
+
columnCount: parsedTable.columnCount
|
|
4238
|
+
},
|
|
4239
|
+
options?.styleCtx
|
|
4240
|
+
);
|
|
4241
|
+
const mergedStyle = {
|
|
4242
|
+
...bandStyle,
|
|
4243
|
+
...xmlCellStyle,
|
|
4244
|
+
...tdCellOverride ? cellStyleToCss(tdCellOverride) : void 0,
|
|
4245
|
+
...diag ? { position: "relative" } : void 0
|
|
4246
|
+
};
|
|
4247
|
+
return /* @__PURE__ */ jsxs(
|
|
4248
|
+
"td",
|
|
4249
|
+
{
|
|
4250
|
+
className: cn(
|
|
4251
|
+
"border px-1 py-0.5 align-top",
|
|
4252
|
+
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
4253
|
+
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
4254
|
+
isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
4255
|
+
),
|
|
4256
|
+
colSpan,
|
|
4257
|
+
rowSpan: rSpan,
|
|
4258
|
+
style: mergedStyle,
|
|
4259
|
+
onClick: (event) => {
|
|
4260
|
+
if (!isEditable || !hasCellSelectionHandler) {
|
|
4261
|
+
return;
|
|
4262
|
+
}
|
|
4263
|
+
event.stopPropagation();
|
|
4264
|
+
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
4265
|
+
const rect = computeSelectionRect(
|
|
4266
|
+
selectedCell.rowIndex,
|
|
4267
|
+
selectedCell.columnIndex,
|
|
4268
|
+
rowIndex,
|
|
4269
|
+
cellIndex,
|
|
4270
|
+
tableEl.tableData
|
|
4271
|
+
);
|
|
4272
|
+
options?.onSelectCell?.({
|
|
4273
|
+
rowIndex: selectedCell.rowIndex,
|
|
4274
|
+
columnIndex: selectedCell.columnIndex,
|
|
4275
|
+
selectedCells: rectToCells(rect)
|
|
4276
|
+
});
|
|
4277
|
+
} else {
|
|
4348
4278
|
options?.onSelectCell?.({
|
|
4349
4279
|
rowIndex,
|
|
4350
4280
|
columnIndex: cellIndex
|
|
4351
4281
|
});
|
|
4352
4282
|
}
|
|
4353
|
-
}
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4283
|
+
},
|
|
4284
|
+
onDoubleClick: (event) => {
|
|
4285
|
+
if (!isEditable || !hasCellSelectionHandler) {
|
|
4286
|
+
return;
|
|
4287
|
+
}
|
|
4288
|
+
event.stopPropagation();
|
|
4289
|
+
options?.onSelectCell?.({
|
|
4290
|
+
rowIndex,
|
|
4291
|
+
columnIndex: cellIndex,
|
|
4292
|
+
isEditing: true
|
|
4293
|
+
});
|
|
4294
|
+
},
|
|
4295
|
+
children: [
|
|
4296
|
+
diag ? /* @__PURE__ */ jsx(TableCellDiagonalBorders, { diag }) : null,
|
|
4297
|
+
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex && selectedCell?.isEditing ? /* @__PURE__ */ jsx(
|
|
4298
|
+
TableCellInput,
|
|
4299
|
+
{
|
|
4300
|
+
initialText: extractCellText(cell) ?? "",
|
|
4301
|
+
style: mergedStyle,
|
|
4302
|
+
onCommit: (text) => {
|
|
4303
|
+
options?.onCommitCellEdit?.(rowIndex, cellIndex, text);
|
|
4304
|
+
},
|
|
4305
|
+
onCancel: () => {
|
|
4306
|
+
options?.onSelectCell?.({
|
|
4307
|
+
rowIndex,
|
|
4308
|
+
columnIndex: cellIndex
|
|
4309
|
+
});
|
|
4310
|
+
}
|
|
4311
|
+
}
|
|
4312
|
+
) : extractCellText(cell) || "\xA0"
|
|
4313
|
+
]
|
|
4314
|
+
},
|
|
4315
|
+
`${element.id}-cell-${rowIndex}-${cellIndex}`
|
|
4316
|
+
);
|
|
4317
|
+
})
|
|
4318
|
+
},
|
|
4319
|
+
`${element.id}-row-${rowIndex}`
|
|
4320
|
+
);
|
|
4321
|
+
}) })
|
|
4322
|
+
]
|
|
4323
|
+
}
|
|
4324
|
+
)
|
|
4365
4325
|
}
|
|
4366
4326
|
)
|
|
4367
4327
|
}
|
|
@@ -6198,7 +6158,7 @@ function FailedToLoad() {
|
|
|
6198
6158
|
var LazySurfaceChart3DScene = React6.lazy(
|
|
6199
6159
|
async () => {
|
|
6200
6160
|
try {
|
|
6201
|
-
return await import('./SurfaceChart3DScene-
|
|
6161
|
+
return await import('./SurfaceChart3DScene-MVBQTD6J.mjs');
|
|
6202
6162
|
} catch {
|
|
6203
6163
|
return { default: FailedToLoad };
|
|
6204
6164
|
}
|
|
@@ -8004,4 +7964,4 @@ function stopPreviewAnimation() {
|
|
|
8004
7964
|
activePreview = null;
|
|
8005
7965
|
}
|
|
8006
7966
|
|
|
8007
|
-
export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_STROKE_COLOR, DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ROWS, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, EMU_PER_PX, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, STROKE_DASH_OPTIONS, SmartArtNodeText, THEME_COLOR_SWATCHES, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromImageData, buildReactChartViewModel, buildSaveSlides, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, buildTree, chevronPoints, cloneHistorySnapshot2 as cloneHistorySnapshot, cn, colour, executeMediaCommand, fitFontSize, gearPath, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isConnectorOrLineElement, isImageTiled, layoutToCategory, nodeOpacity, partitionTemplateElements, renderAccentProcess, renderAlternatingFlow, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderDescendingProcess, renderGroupedList, renderHorizontalPictureList, renderMediaElement, renderPictureAccentList, renderPyramidList, renderStepDownProcess, renderTableElement, renderTextSegments, renderVectorShape, renderVerticalBlockList, renderVerticalChevronList, resolvePalette, resolveSmartArtDataPalette, resolveStyle, shouldRenderFallbackLabel, smartArtNodeGroupProps, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, styleShadow, styleStroke, treeDepth, treeWidth, truncate, wrapChrome };
|
|
7967
|
+
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_STROKE_COLOR, DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ROWS, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, EMU_PER_PX, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, STROKE_DASH_OPTIONS, SmartArtNodeText, THEME_COLOR_SWATCHES, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromImageData, buildReactChartViewModel, buildSaveSlides, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, buildTree, chevronPoints, cloneHistorySnapshot2 as cloneHistorySnapshot, cn, colour, executeMediaCommand, fitFontSize, gearPath, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isConnectorOrLineElement, isImageTiled, layoutToCategory, nodeOpacity, partitionTemplateElements, renderAccentProcess, renderAlternatingFlow, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderDescendingProcess, renderGroupedList, renderHorizontalPictureList, renderMediaElement, renderPictureAccentList, renderPyramidList, renderStepDownProcess, renderTableElement, renderTextSegments, renderVectorShape, renderVerticalBlockList, renderVerticalChevronList, resolvePalette, resolveSmartArtDataPalette, resolveStyle, shouldRenderFallbackLabel, smartArtNodeGroupProps, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, styleShadow, styleStroke, treeDepth, treeWidth, truncate, wrapChrome };
|