pptx-react-viewer 1.18.0 → 1.19.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 (98) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{Model3DScene-GVWQ6SOM.js → Model3DScene-CQP7JLKK.js} +3 -3
  3. package/dist/{Model3DScene-GVWQ6SOM.js.br → Model3DScene-CQP7JLKK.js.br} +0 -0
  4. package/dist/Model3DScene-CQP7JLKK.js.gz +0 -0
  5. package/dist/{Model3DScene-JGVLIDLD.mjs → Model3DScene-J2KBVMEZ.mjs} +2 -2
  6. package/dist/Model3DScene-J2KBVMEZ.mjs.br +0 -0
  7. package/dist/Model3DScene-J2KBVMEZ.mjs.gz +0 -0
  8. package/dist/PowerPointViewer-C4d7SKZf.d.ts.map +1 -1
  9. package/dist/{SurfaceChart3DScene-DBWSDSKI.mjs → SurfaceChart3DScene-52VUVZSC.mjs} +2 -2
  10. package/dist/SurfaceChart3DScene-52VUVZSC.mjs.br +0 -0
  11. package/dist/SurfaceChart3DScene-52VUVZSC.mjs.gz +0 -0
  12. package/dist/{SurfaceChart3DScene-ZOTOHOIE.js → SurfaceChart3DScene-U6LVKSKR.js} +3 -3
  13. package/dist/SurfaceChart3DScene-U6LVKSKR.js.br +0 -0
  14. package/dist/SurfaceChart3DScene-U6LVKSKR.js.gz +0 -0
  15. package/dist/{chunk-SBNTEQUA.mjs → chunk-3ZGCM6RC.mjs} +20269 -12232
  16. package/dist/chunk-3ZGCM6RC.mjs.br +0 -0
  17. package/dist/chunk-3ZGCM6RC.mjs.gz +0 -0
  18. package/dist/{chunk-EXDUEXTO.js → chunk-AD3EAEY6.js} +20282 -12231
  19. package/dist/chunk-AD3EAEY6.js.br +0 -0
  20. package/dist/chunk-AD3EAEY6.js.gz +0 -0
  21. package/dist/{chunk-73ST7AC6.js → chunk-DBZLZMED.js} +6795 -6485
  22. package/dist/chunk-DBZLZMED.js.br +0 -0
  23. package/dist/chunk-DBZLZMED.js.gz +0 -0
  24. package/dist/{chunk-HBXPK572.js → chunk-P3T4E6JQ.js} +2969 -743
  25. package/dist/chunk-P3T4E6JQ.js.br +0 -0
  26. package/dist/chunk-P3T4E6JQ.js.gz +0 -0
  27. package/dist/{chunk-HHTZQHKZ.mjs → chunk-R7FTNSSP.mjs} +2922 -719
  28. package/dist/chunk-R7FTNSSP.mjs.br +0 -0
  29. package/dist/chunk-R7FTNSSP.mjs.gz +0 -0
  30. package/dist/{chunk-KMLIWCNL.mjs → chunk-SLJXGFZS.mjs} +5783 -5473
  31. package/dist/chunk-SLJXGFZS.mjs.br +0 -0
  32. package/dist/chunk-SLJXGFZS.mjs.gz +0 -0
  33. package/dist/{chunk-Z4MDCPAY.mjs → chunk-XGTMHQR7.mjs} +26 -731
  34. package/dist/chunk-XGTMHQR7.mjs.br +0 -0
  35. package/dist/chunk-XGTMHQR7.mjs.gz +0 -0
  36. package/dist/{chunk-JDRC3PSY.js → chunk-YF6JD4DO.js} +470 -1186
  37. package/dist/chunk-YF6JD4DO.js.br +0 -0
  38. package/dist/chunk-YF6JD4DO.js.gz +0 -0
  39. package/dist/dist-3YRZ26TL.mjs +2 -0
  40. package/dist/dist-3YRZ26TL.mjs.br +0 -0
  41. package/dist/dist-3YRZ26TL.mjs.gz +0 -0
  42. package/dist/{dist-KRRXYUGI.js → dist-M2P6HBG4.js} +602 -546
  43. package/dist/dist-M2P6HBG4.js.br +0 -0
  44. package/dist/dist-M2P6HBG4.js.gz +0 -0
  45. package/dist/hooks-unstable.d.ts +523 -49
  46. package/dist/hooks-unstable.d.ts.map +1 -1
  47. package/dist/hooks-unstable.js +77 -77
  48. package/dist/hooks-unstable.js.br +0 -0
  49. package/dist/hooks-unstable.js.gz +0 -0
  50. package/dist/hooks-unstable.mjs +3 -3
  51. package/dist/hooks-unstable.mjs.br +0 -0
  52. package/dist/hooks-unstable.mjs.gz +0 -0
  53. package/dist/index.d.ts +417 -21
  54. package/dist/index.js +18 -18
  55. package/dist/index.js.br +3 -3
  56. package/dist/index.js.gz +0 -0
  57. package/dist/index.mjs +4 -4
  58. package/dist/index.mjs.br +0 -0
  59. package/dist/index.mjs.gz +0 -0
  60. package/dist/pptx-viewer.css +1 -1
  61. package/dist/pptx-viewer.css.br +0 -0
  62. package/dist/pptx-viewer.css.gz +0 -0
  63. package/dist/viewer/index.d.ts +509 -27
  64. package/dist/viewer/index.js +20 -20
  65. package/dist/viewer/index.js.br +0 -0
  66. package/dist/viewer/index.js.gz +0 -0
  67. package/dist/viewer/index.mjs +4 -4
  68. package/dist/viewer/index.mjs.br +0 -0
  69. package/dist/viewer/index.mjs.gz +0 -0
  70. package/package.json +1 -1
  71. package/dist/Model3DScene-GVWQ6SOM.js.gz +0 -0
  72. package/dist/Model3DScene-JGVLIDLD.mjs.br +0 -0
  73. package/dist/Model3DScene-JGVLIDLD.mjs.gz +0 -0
  74. package/dist/SurfaceChart3DScene-DBWSDSKI.mjs.br +0 -0
  75. package/dist/SurfaceChart3DScene-DBWSDSKI.mjs.gz +0 -0
  76. package/dist/SurfaceChart3DScene-ZOTOHOIE.js.br +0 -0
  77. package/dist/SurfaceChart3DScene-ZOTOHOIE.js.gz +0 -0
  78. package/dist/chunk-73ST7AC6.js.br +0 -0
  79. package/dist/chunk-73ST7AC6.js.gz +0 -0
  80. package/dist/chunk-EXDUEXTO.js.br +0 -0
  81. package/dist/chunk-EXDUEXTO.js.gz +0 -0
  82. package/dist/chunk-HBXPK572.js.br +0 -0
  83. package/dist/chunk-HBXPK572.js.gz +0 -0
  84. package/dist/chunk-HHTZQHKZ.mjs.br +0 -0
  85. package/dist/chunk-HHTZQHKZ.mjs.gz +0 -0
  86. package/dist/chunk-JDRC3PSY.js.br +0 -0
  87. package/dist/chunk-JDRC3PSY.js.gz +0 -0
  88. package/dist/chunk-KMLIWCNL.mjs.br +0 -0
  89. package/dist/chunk-KMLIWCNL.mjs.gz +0 -0
  90. package/dist/chunk-SBNTEQUA.mjs.br +0 -0
  91. package/dist/chunk-SBNTEQUA.mjs.gz +0 -0
  92. package/dist/chunk-Z4MDCPAY.mjs.br +0 -0
  93. package/dist/chunk-Z4MDCPAY.mjs.gz +0 -0
  94. package/dist/dist-KRRXYUGI.js.br +0 -0
  95. package/dist/dist-KRRXYUGI.js.gz +0 -0
  96. package/dist/dist-N6PAPXK6.mjs +0 -2
  97. package/dist/dist-N6PAPXK6.mjs.br +0 -0
  98. package/dist/dist-N6PAPXK6.mjs.gz +0 -0
@@ -1,6 +1,6 @@
1
- import { SHAPE_PRESET_DEFS, computeValueRangeForChart, cloneTemplateElementsBySlideId, cloneSlide, countTextSegments, expandTextBuildAnimations, TimelineEngine, TEXT_BUILD_ID_SEP, storePresentationDeck, loadPresentationDeck, clearPresentationDeck, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, isPresentationSessionMessage, collectMediaElements, collectImagePaths, buildInitialGuides, saveAutosaveSnapshot, getAnimationInitialStyle, normalizeHexColor, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, computeAutoFitTextStyle, resolveLineHeight, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, colorWithOpacity, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, clampCropValue, parseDrawingColor, parseDrawingColorOpacity, getPatternSvg, ooxmlDashToCssBorderStyle, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildPreviewAnimation, isTemplateElementId, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, comparePresentation, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, remapTextToSegments, copyFormatFromElement, applyFormatToElement, createSyncGate, validateRoomId, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, BROADCAST_THROTTLE_MS, sanitizeColor, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, createTouchGestureRecognizer, isKeyboardOpen, buildElementClipboardPayload, downloadBlob, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, derivePresenceList, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, cloneHistorySnapshot, createPresentationSessionId, resolveTransitionDurationMs, isUrlSafe, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, togglePresenterTimer, isTemplateElement, substituteFieldText, resolveUnderlineDecorationStyle, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, apply3dEffects, clampUnitInterval, getRoundRectRadiusPx, tintColor2, shadeColor2, computeColumnBoundaries, getChartStylePalette, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, sanitizeDownloadFilename, encodeGif, cloneElementForPaste, computeScrollDelta, rerouteConnectorsForMovedElements, applyReroutedConnectors, buildPrintHtmlDocument, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, deleteTableColumn, insertTableColumn, deleteTableRow, insertTableRow, splitCell, mergeCells, buildSlidesPdfBytes, buildNotesPdfBytes, ACTION_BUTTON_PRESETS, buildSmartArtPresetData, computeSnapToShape, computeMarqueeHitIds, mergeAdditiveSelection, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, applyResize, snapBoxToGrid, chartPartToAttrs } from './chunk-HHTZQHKZ.mjs';
1
+ import { SHAPE_PRESET_DEFS, computeValueRangeForChart, cloneTemplateElementsBySlideId, cloneSlide, countTextSegments, expandTextBuildAnimations, TimelineEngine, TEXT_BUILD_ID_SEP, computeEntranceAnimationDelay, storePresentationDeck, loadPresentationDeck, clearPresentationDeck, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, isPresentationSessionMessage, collectMediaElements, collectImagePaths, buildInitialGuides, saveAutosaveSnapshot, getAnimationInitialStyle, normalizeHexColor, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, computeAutoFitTextStyle, resolveLineHeight, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, colorWithOpacity, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, clampCropValue, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildPreviewAnimation, isTemplateElementId, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, remapTextToSegments, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, createSyncGate, validateRoomId, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, BROADCAST_THROTTLE_MS, sanitizeColor, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createTouchGestureRecognizer, isKeyboardOpen, buildElementClipboardPayload, generatePackageReadme, downloadBlob, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, derivePresenceList, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, cloneHistorySnapshot, createPresentationSessionId, resolveTransitionDurationMs, isUrlSafe, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, togglePresenterTimer, isTemplateElement, substituteFieldText, resolveUnderlineDecorationStyle, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, apply3dEffects, clampUnitInterval, getRoundRectRadiusPx, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getPatternSvg, ooxmlDashToCssBorderStyle, getChartStylePalette, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, sanitizeDownloadFilename, encodeGif, groupSlidesBySection, cloneElementForPaste, computeScrollDelta, rerouteConnectorsForMovedElements, applyReroutedConnectors, buildPrintHtmlDocument, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, tintColor2, shadeColor2, deleteTableColumn, insertTableColumn, deleteTableRow, insertTableRow, splitCell, mergeCells, buildSlidesPdfBytes, buildNotesPdfBytes, ACTION_BUTTON_PRESETS, buildSmartArtPresetData, computeSnapToShape, computeMarqueeHitIds, mergeAdditiveSelection, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, applyResize, snapBoxToGrid, chartPartToAttrs } from './chunk-R7FTNSSP.mjs';
2
2
  import { translationsEn } from './chunk-RIRK64DM.mjs';
3
- import { hasTextProperties, PptxHandler, EncryptedFileError, hasShapeProperties, isImageLikeElement, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, guidePxToEmu, mergeShapes, getSubstituteFontFamily, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, SvgExporter, rebuildTableStructureInRawXml, updateCellTextStyleInRawXml, updateCellTextInRawXml, updateMergeAttrsInRawXml, elementActionToPptxAction } from './chunk-SBNTEQUA.mjs';
3
+ import { hasTextProperties, PptxHandler, EncryptedFileError, hasShapeProperties, isImageLikeElement, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, guidePxToEmu, mergeShapes, getSubstituteFontFamily, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, SvgExporter, rebuildTableStructureInRawXml, updateCellTextStyleInRawXml, updateCellTextInRawXml, updateMergeAttrsInRawXml, elementActionToPptxAction } from './chunk-3ZGCM6RC.mjs';
4
4
  import React3, { useState, useEffect, useMemo, Suspense, useRef, useCallback, useSyncExternalStore, useImperativeHandle, useLayoutEffect } from 'react';
5
5
  import { LuTriangle, LuPlus, LuMoveRight, LuMinus, LuDiamond, LuDatabase, LuCircle, LuSquare } from 'react-icons/lu';
6
6
  import { clsx } from 'clsx';
@@ -547,30 +547,6 @@ function useZoomViewport({
547
547
  };
548
548
  }
549
549
 
550
- // src/viewer/hooks/usePresentationSetup-helpers.ts
551
- function shouldLoopContinuously(input) {
552
- return Boolean(input.loopContinuously) || input.showType === "kiosk";
553
- }
554
- function applyRehearsalTimings(slides, timings) {
555
- return slides.map((slide, idx) => {
556
- const ms = timings[idx];
557
- if (typeof ms !== "number") {
558
- return slide;
559
- }
560
- return {
561
- ...slide,
562
- transition: {
563
- ...slide.transition,
564
- type: slide.transition?.type ?? "none",
565
- advanceAfterMs: ms
566
- }
567
- };
568
- });
569
- }
570
- function computeEntranceAnimationDelay(delayMs, animationIndex) {
571
- return Math.max(0, delayMs || 0) + animationIndex * 60;
572
- }
573
-
574
550
  // src/viewer/hooks/presentation-mode/animation-helpers.ts
575
551
  function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationElementStates, presentationTimersRef) {
576
552
  for (const step of group.steps) {
@@ -4196,21 +4172,25 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
4196
4172
  return /* @__PURE__ */ jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
4197
4173
  }
4198
4174
  function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
4199
- const bulletSize = typeof bulletInfo.sizePts === "number" ? bulletInfo.sizePts : typeof bulletInfo.sizePercent === "number" ? baseFontSize * (bulletInfo.sizePercent / 100) : baseFontSize;
4200
- if (!bulletInfo.imageDataUrl) {
4175
+ const picture = resolvePictureBullet(bulletInfo, baseFontSize) ?? {
4176
+ sizePx: baseFontSize,
4177
+ fallbackMarker: "\u2022",
4178
+ accessibleLabel: "Bullet"
4179
+ };
4180
+ if (!picture.src) {
4201
4181
  return /* @__PURE__ */ jsx(
4202
4182
  "span",
4203
4183
  {
4204
4184
  style: {
4205
- fontSize: bulletSize,
4185
+ fontSize: picture.sizePx,
4206
4186
  display: "inline-block",
4207
4187
  verticalAlign: "middle",
4208
4188
  marginInlineEnd: 4,
4209
4189
  color: bulletInfo.color || void 0,
4210
4190
  fontFamily: bulletInfo.fontFamily || void 0
4211
4191
  },
4212
- "aria-label": translationsEn["pptx.textSegment.bulletAria"],
4213
- children: "\u2022 "
4192
+ "aria-label": picture.accessibleLabel,
4193
+ children: `${picture.fallbackMarker} `
4214
4194
  },
4215
4195
  `${elementId}-seg-${segmentIndex}-bullet-fallback`
4216
4196
  );
@@ -4218,11 +4198,11 @@ function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize)
4218
4198
  return /* @__PURE__ */ jsx(
4219
4199
  "img",
4220
4200
  {
4221
- src: bulletInfo.imageDataUrl,
4222
- alt: translationsEn["pptx.textSegment.bulletAria"],
4201
+ src: picture.src,
4202
+ alt: picture.accessibleLabel,
4223
4203
  style: {
4224
- width: bulletSize,
4225
- height: bulletSize,
4204
+ width: picture.sizePx,
4205
+ height: picture.sizePx,
4226
4206
  display: "inline-block",
4227
4207
  verticalAlign: "middle",
4228
4208
  marginInlineEnd: 4,
@@ -4632,9 +4612,6 @@ function isConnectorOrLineElement(element) {
4632
4612
  const st = getShapeType(element.shapeType);
4633
4613
  return st === "connector" || st === "line" || element.shapeType === "line";
4634
4614
  }
4635
- function getDuotoneFilterId(elementId) {
4636
- return `duotone-${elementId}`;
4637
- }
4638
4615
  function hexToRgbUnit(hex) {
4639
4616
  const clean = hex.replace("#", "");
4640
4617
  const r = parseInt(clean.substring(0, 2), 16) / 255;
@@ -4646,50 +4623,6 @@ function hexToRgbUnit(hex) {
4646
4623
  b: Number.isFinite(b) ? b : 0
4647
4624
  };
4648
4625
  }
4649
- function renderDuotoneSvgFilter(elementId, color1, color2) {
4650
- const filterId = getDuotoneFilterId(elementId);
4651
- const c1 = hexToRgbUnit(color1);
4652
- const c2 = hexToRgbUnit(color2);
4653
- const grayscaleMatrix = [
4654
- 0.2126,
4655
- 0.7152,
4656
- 0.0722,
4657
- 0,
4658
- 0,
4659
- 0.2126,
4660
- 0.7152,
4661
- 0.0722,
4662
- 0,
4663
- 0,
4664
- 0.2126,
4665
- 0.7152,
4666
- 0.0722,
4667
- 0,
4668
- 0,
4669
- 0,
4670
- 0,
4671
- 0,
4672
- 1,
4673
- 0
4674
- ].join(" ");
4675
- return /* @__PURE__ */ jsx(
4676
- "svg",
4677
- {
4678
- width: 0,
4679
- height: 0,
4680
- style: { position: "absolute", overflow: "hidden" },
4681
- "aria-hidden": "true",
4682
- children: /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("filter", { id: filterId, colorInterpolationFilters: "sRGB", children: [
4683
- /* @__PURE__ */ jsx("feColorMatrix", { type: "matrix", values: grayscaleMatrix }),
4684
- /* @__PURE__ */ jsxs("feComponentTransfer", { children: [
4685
- /* @__PURE__ */ jsx("feFuncR", { type: "linear", slope: c2.r - c1.r, intercept: c1.r }),
4686
- /* @__PURE__ */ jsx("feFuncG", { type: "linear", slope: c2.g - c1.g, intercept: c1.g }),
4687
- /* @__PURE__ */ jsx("feFuncB", { type: "linear", slope: c2.b - c1.b, intercept: c1.b })
4688
- ] })
4689
- ] }) })
4690
- }
4691
- );
4692
- }
4693
4626
  function getDuotoneColors(element) {
4694
4627
  if (!isImageLikeElement(element)) {
4695
4628
  return void 0;
@@ -4743,128 +4676,6 @@ function mapDagBlendModeToCss(blend) {
4743
4676
  return void 0;
4744
4677
  }
4745
4678
  }
4746
- function getImageAlphaFilterId(elementId) {
4747
- return `imgalpha-${elementId}`;
4748
- }
4749
- function hasAdvancedImageAlphaEffects(element) {
4750
- if (!isImageLikeElement(element)) {
4751
- return false;
4752
- }
4753
- const e = element.imageEffects;
4754
- if (!e) {
4755
- return false;
4756
- }
4757
- return Boolean(
4758
- typeof e.alphaModFix === "number" || e.alphaInv || e.alphaCeiling || e.alphaFloor || typeof e.alphaRepl === "number" || typeof e.alphaBiLevel === "number" || typeof e.biLevel === "number" || e.lum && (typeof e.lum.bright === "number" || typeof e.lum.contrast === "number") || e.hsl && (typeof e.hsl.sat === "number" || typeof e.hsl.lum === "number") || e.tint && typeof e.tint.amt === "number" || e.clrRepl
4759
- );
4760
- }
4761
- function renderImageAlphaSvgFilter(element) {
4762
- if (!isImageLikeElement(element)) {
4763
- return null;
4764
- }
4765
- const e = element.imageEffects;
4766
- if (!e || !hasAdvancedImageAlphaEffects(element)) {
4767
- return null;
4768
- }
4769
- const filterId = getImageAlphaFilterId(element.id);
4770
- const primitives = [];
4771
- let resultIdx = 0;
4772
- let inputRef = "SourceGraphic";
4773
- const next = (jsx42) => {
4774
- const result = `r${resultIdx++}`;
4775
- primitives.push(jsx42(inputRef, result));
4776
- inputRef = result;
4777
- };
4778
- if (typeof e.alphaModFix === "number") {
4779
- const mul = clamp(e.alphaModFix / 100, 0, 1);
4780
- next((inp, out) => /* @__PURE__ */ jsx(
4781
- "feColorMatrix",
4782
- {
4783
- in: inp,
4784
- result: out,
4785
- type: "matrix",
4786
- values: `1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${mul} 0`
4787
- },
4788
- out
4789
- ));
4790
- }
4791
- if (e.alphaInv) {
4792
- next((inp, out) => /* @__PURE__ */ jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsx("feFuncA", { type: "linear", slope: -1, intercept: 1 }) }, out));
4793
- }
4794
- if (e.alphaCeiling) {
4795
- next((inp, out) => /* @__PURE__ */ jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsx("feFuncA", { type: "discrete", tableValues: "0 1 1 1 1 1 1 1 1 1" }) }, out));
4796
- }
4797
- if (e.alphaFloor) {
4798
- next((inp, out) => /* @__PURE__ */ jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsx("feFuncA", { type: "discrete", tableValues: "0 0 0 0 0 0 0 0 0 1" }) }, out));
4799
- }
4800
- if (typeof e.alphaRepl === "number") {
4801
- const a = clamp(e.alphaRepl / 100, 0, 1);
4802
- next((inp, out) => /* @__PURE__ */ jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsx("feFuncA", { type: "linear", slope: 0, intercept: a }) }, out));
4803
- }
4804
- if (typeof e.alphaBiLevel === "number") {
4805
- const t = clamp(e.alphaBiLevel / 100, 0, 1);
4806
- const table = Array.from({ length: 10 }, (_, i) => i / 10 >= t ? "1" : "0").join(" ");
4807
- next((inp, out) => /* @__PURE__ */ jsx("feComponentTransfer", { in: inp, result: out, children: /* @__PURE__ */ jsx("feFuncA", { type: "discrete", tableValues: table }) }, out));
4808
- }
4809
- if (typeof e.biLevel === "number") {
4810
- next((inp, out) => /* @__PURE__ */ jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: "0" }, out));
4811
- const t = clamp(e.biLevel / 100, 0, 1);
4812
- const tbl = t < 0.5 ? "0 1" : "0 1";
4813
- next((inp, out) => /* @__PURE__ */ jsxs("feComponentTransfer", { in: inp, result: out, children: [
4814
- /* @__PURE__ */ jsx("feFuncR", { type: "discrete", tableValues: tbl }),
4815
- /* @__PURE__ */ jsx("feFuncG", { type: "discrete", tableValues: tbl }),
4816
- /* @__PURE__ */ jsx("feFuncB", { type: "discrete", tableValues: tbl })
4817
- ] }, out));
4818
- }
4819
- if (e.lum && (typeof e.lum.bright === "number" || typeof e.lum.contrast === "number")) {
4820
- const b = (e.lum.bright ?? 0) / 100;
4821
- const c = 1 + (e.lum.contrast ?? 0) / 100;
4822
- const slope = c;
4823
- const intercept = b + (1 - c) / 2;
4824
- next((inp, out) => /* @__PURE__ */ jsxs("feComponentTransfer", { in: inp, result: out, children: [
4825
- /* @__PURE__ */ jsx("feFuncR", { type: "linear", slope, intercept }),
4826
- /* @__PURE__ */ jsx("feFuncG", { type: "linear", slope, intercept }),
4827
- /* @__PURE__ */ jsx("feFuncB", { type: "linear", slope, intercept })
4828
- ] }, out));
4829
- }
4830
- if (e.hsl && typeof e.hsl.sat === "number") {
4831
- const v = clamp(1 + e.hsl.sat / 100, 0, 2);
4832
- next((inp, out) => /* @__PURE__ */ jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: String(v) }, out));
4833
- }
4834
- if (e.tint && typeof e.tint.amt === "number" && e.tint.amt < 0) {
4835
- const v = clamp(1 + e.tint.amt / 100, 0, 1);
4836
- next((inp, out) => /* @__PURE__ */ jsx("feColorMatrix", { in: inp, result: out, type: "saturate", values: String(v) }, out));
4837
- }
4838
- if (e.clrRepl) {
4839
- const c = hexToRgbUnit(e.clrRepl.color);
4840
- next((inp, out) => /* @__PURE__ */ jsx(
4841
- "feColorMatrix",
4842
- {
4843
- in: inp,
4844
- result: out,
4845
- type: "matrix",
4846
- values: `0 0 0 0 ${c.r} 0 0 0 0 ${c.g} 0 0 0 0 ${c.b} 0 0 0 1 0`
4847
- },
4848
- out
4849
- ));
4850
- }
4851
- if (primitives.length === 0) {
4852
- return null;
4853
- }
4854
- return /* @__PURE__ */ jsx(
4855
- "svg",
4856
- {
4857
- width: 0,
4858
- height: 0,
4859
- style: { position: "absolute", overflow: "hidden" },
4860
- "aria-hidden": "true",
4861
- children: /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("filter", { id: filterId, colorInterpolationFilters: "sRGB", children: primitives }) })
4862
- }
4863
- );
4864
- }
4865
- function clamp(v, lo, hi) {
4866
- return v < lo ? lo : v > hi ? hi : v;
4867
- }
4868
4679
  function getDagDuotoneFilterId(elementId) {
4869
4680
  return `dag-duotone-${elementId}`;
4870
4681
  }
@@ -8653,7 +8464,7 @@ function FailedToLoad() {
8653
8464
  var LazySurfaceChart3DScene = React3.lazy(
8654
8465
  async () => {
8655
8466
  try {
8656
- return await import('./SurfaceChart3DScene-DBWSDSKI.mjs');
8467
+ return await import('./SurfaceChart3DScene-52VUVZSC.mjs');
8657
8468
  } catch {
8658
8469
  return { default: FailedToLoad };
8659
8470
  }
@@ -11036,366 +10847,6 @@ function stopPreviewAnimation() {
11036
10847
  }
11037
10848
  activePreview = null;
11038
10849
  }
11039
- var SVG_FILTER_EFFECTS = /* @__PURE__ */ new Set([
11040
- "artisticFilmGrain",
11041
- "filmGrain",
11042
- "artisticCutout",
11043
- "cutout",
11044
- "artisticCement",
11045
- "cement",
11046
- "artisticTexturizer",
11047
- "texturizer",
11048
- "artisticCrisscrossEtching",
11049
- "crisscrossEtching",
11050
- "artisticMosaic",
11051
- "artisticMosaicBubbles",
11052
- "mosaicBubbles",
11053
- "mosaic",
11054
- "artisticGlowEdges",
11055
- "glowEdges",
11056
- "glow_edges",
11057
- "artisticChalkSketch",
11058
- "chalkSketch",
11059
- "chalk",
11060
- "artisticPencilSketch",
11061
- "pencilSketch",
11062
- "artisticPencilGrayscale",
11063
- "pencilGrayscale",
11064
- "grayPencil"
11065
- ]);
11066
- function getArtisticFilterId(elementId) {
11067
- return `artistic-fx-${elementId}`;
11068
- }
11069
- function needsSvgArtisticFilter(effectName) {
11070
- if (!effectName) {
11071
- return false;
11072
- }
11073
- return SVG_FILTER_EFFECTS.has(effectName);
11074
- }
11075
- function renderArtisticEffectSvgFilter(elementId, effectName, radius) {
11076
- if (!effectName || !needsSvgArtisticFilter(effectName)) {
11077
- return null;
11078
- }
11079
- const filterId = getArtisticFilterId(elementId);
11080
- const filterContent = buildFilterPrimitives(effectName, radius);
11081
- if (!filterContent) {
11082
- return null;
11083
- }
11084
- return /* @__PURE__ */ jsx(
11085
- "svg",
11086
- {
11087
- width: 0,
11088
- height: 0,
11089
- style: { position: "absolute", overflow: "hidden" },
11090
- "aria-hidden": "true",
11091
- children: /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
11092
- "filter",
11093
- {
11094
- id: filterId,
11095
- x: "0%",
11096
- y: "0%",
11097
- width: "100%",
11098
- height: "100%",
11099
- colorInterpolationFilters: "sRGB",
11100
- children: filterContent
11101
- }
11102
- ) })
11103
- }
11104
- );
11105
- }
11106
- function buildFilterPrimitives(effectName, radius) {
11107
- const normalizedRadius = Math.max(0, Math.min(100, radius)) / 100;
11108
- switch (effectName) {
11109
- // ── Film Grain ──────────────────────────────────────────────────────
11110
- // Subtle noise overlay using feTurbulence blended with the source.
11111
- case "artisticFilmGrain":
11112
- case "filmGrain": {
11113
- const freq = 0.5 + normalizedRadius * 0.5;
11114
- const opacity = 0.15 + normalizedRadius * 0.25;
11115
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11116
- /* @__PURE__ */ jsx(
11117
- "feTurbulence",
11118
- {
11119
- type: "fractalNoise",
11120
- baseFrequency: freq,
11121
- numOctaves: 4,
11122
- seed: 1,
11123
- stitchTiles: "stitch",
11124
- result: "grain"
11125
- }
11126
- ),
11127
- /* @__PURE__ */ jsx("feColorMatrix", { in: "grain", type: "saturate", values: "0", result: "grainGray" }),
11128
- /* @__PURE__ */ jsx("feBlend", { in: "SourceGraphic", in2: "grainGray", mode: "overlay" }),
11129
- /* @__PURE__ */ jsxs("feComponentTransfer", { children: [
11130
- /* @__PURE__ */ jsx("feFuncR", { type: "linear", slope: 1 + opacity * 0.3, intercept: opacity * 0.02 }),
11131
- /* @__PURE__ */ jsx("feFuncG", { type: "linear", slope: 1 + opacity * 0.3, intercept: opacity * 0.02 }),
11132
- /* @__PURE__ */ jsx("feFuncB", { type: "linear", slope: 1 + opacity * 0.3, intercept: opacity * 0.02 })
11133
- ] })
11134
- ] });
11135
- }
11136
- // ── Cutout ──────────────────────────────────────────────────────────
11137
- // Posterization: reduce colours to discrete steps using feComponentTransfer
11138
- // with `discrete` table values.
11139
- case "artisticCutout":
11140
- case "cutout": {
11141
- const steps = Math.max(2, Math.round(4 + normalizedRadius * 4));
11142
- const tableValues = buildDiscreteTable(steps);
11143
- return /* @__PURE__ */ jsxs("feComponentTransfer", { children: [
11144
- /* @__PURE__ */ jsx("feFuncR", { type: "discrete", tableValues }),
11145
- /* @__PURE__ */ jsx("feFuncG", { type: "discrete", tableValues }),
11146
- /* @__PURE__ */ jsx("feFuncB", { type: "discrete", tableValues })
11147
- ] });
11148
- }
11149
- // ── Cement ──────────────────────────────────────────────────────────
11150
- // Desaturated image with a fine noise texture overlay.
11151
- case "artisticCement":
11152
- case "cement": {
11153
- const freq = 1.5 + normalizedRadius * 2.5;
11154
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11155
- /* @__PURE__ */ jsx(
11156
- "feColorMatrix",
11157
- {
11158
- type: "saturate",
11159
- values: `${Math.max(0, 0.4 - normalizedRadius * 0.3)}`,
11160
- result: "desat"
11161
- }
11162
- ),
11163
- /* @__PURE__ */ jsx(
11164
- "feTurbulence",
11165
- {
11166
- type: "fractalNoise",
11167
- baseFrequency: freq,
11168
- numOctaves: 5,
11169
- seed: 2,
11170
- stitchTiles: "stitch",
11171
- result: "cementNoise"
11172
- }
11173
- ),
11174
- /* @__PURE__ */ jsx("feColorMatrix", { in: "cementNoise", type: "saturate", values: "0", result: "cementGray" }),
11175
- /* @__PURE__ */ jsx("feBlend", { in: "desat", in2: "cementGray", mode: "multiply" }),
11176
- /* @__PURE__ */ jsxs("feComponentTransfer", { children: [
11177
- /* @__PURE__ */ jsx("feFuncR", { type: "linear", slope: 1.2, intercept: 0 }),
11178
- /* @__PURE__ */ jsx("feFuncG", { type: "linear", slope: 1.2, intercept: 0 }),
11179
- /* @__PURE__ */ jsx("feFuncB", { type: "linear", slope: 1.2, intercept: 0 })
11180
- ] })
11181
- ] });
11182
- }
11183
- // ── Texturizer ─────────────────────────────────────────────────────
11184
- // Fine noise texture overlay on the original image.
11185
- case "artisticTexturizer":
11186
- case "texturizer": {
11187
- const freq = 2 + normalizedRadius * 3;
11188
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11189
- /* @__PURE__ */ jsx(
11190
- "feTurbulence",
11191
- {
11192
- type: "fractalNoise",
11193
- baseFrequency: freq,
11194
- numOctaves: 3,
11195
- seed: 3,
11196
- stitchTiles: "stitch",
11197
- result: "texNoise"
11198
- }
11199
- ),
11200
- /* @__PURE__ */ jsx("feColorMatrix", { in: "texNoise", type: "saturate", values: "0", result: "texGray" }),
11201
- /* @__PURE__ */ jsx("feBlend", { in: "SourceGraphic", in2: "texGray", mode: "overlay" }),
11202
- /* @__PURE__ */ jsxs("feComponentTransfer", { children: [
11203
- /* @__PURE__ */ jsx("feFuncR", { type: "linear", slope: 1.1, intercept: 0.02 }),
11204
- /* @__PURE__ */ jsx("feFuncG", { type: "linear", slope: 1.1, intercept: 0.02 }),
11205
- /* @__PURE__ */ jsx("feFuncB", { type: "linear", slope: 1.1, intercept: 0.02 })
11206
- ] })
11207
- ] });
11208
- }
11209
- // ── Crisscross Etching ─────────────────────────────────────────────
11210
- // Grayscale image with a hatching-like line pattern overlay.
11211
- case "artisticCrisscrossEtching":
11212
- case "crisscrossEtching": {
11213
- const freq = 0.08 + normalizedRadius * 0.12;
11214
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11215
- /* @__PURE__ */ jsx("feColorMatrix", { type: "saturate", values: "0", result: "gray" }),
11216
- /* @__PURE__ */ jsx(
11217
- "feTurbulence",
11218
- {
11219
- type: "turbulence",
11220
- baseFrequency: `${freq} ${freq * 3}`,
11221
- numOctaves: 1,
11222
- seed: 7,
11223
- result: "lines"
11224
- }
11225
- ),
11226
- /* @__PURE__ */ jsx("feColorMatrix", { in: "lines", type: "saturate", values: "0", result: "linesGray" }),
11227
- /* @__PURE__ */ jsx("feBlend", { in: "gray", in2: "linesGray", mode: "multiply" }),
11228
- /* @__PURE__ */ jsxs("feComponentTransfer", { children: [
11229
- /* @__PURE__ */ jsx("feFuncR", { type: "linear", slope: 1.3, intercept: -0.05 }),
11230
- /* @__PURE__ */ jsx("feFuncG", { type: "linear", slope: 1.3, intercept: -0.05 }),
11231
- /* @__PURE__ */ jsx("feFuncB", { type: "linear", slope: 1.3, intercept: -0.05 })
11232
- ] })
11233
- ] });
11234
- }
11235
- // ── Mosaic / Mosaic Bubbles ─────────────────────────────────────────
11236
- // Pixelation effect: achieved via heavy blur + displacement noise.
11237
- // True pixelation requires image-rendering: pixelated + downscale
11238
- // but SVG filter gives a reasonable approximation.
11239
- case "artisticMosaic":
11240
- case "artisticMosaicBubbles":
11241
- case "mosaicBubbles":
11242
- case "mosaic": {
11243
- const blurAmount = Math.max(2, Math.round(radius * 0.8));
11244
- const freq = 0.02 + normalizedRadius * 0.03;
11245
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11246
- /* @__PURE__ */ jsx("feGaussianBlur", { in: "SourceGraphic", stdDeviation: blurAmount, result: "blurred" }),
11247
- /* @__PURE__ */ jsx(
11248
- "feTurbulence",
11249
- {
11250
- type: "turbulence",
11251
- baseFrequency: freq,
11252
- numOctaves: 1,
11253
- seed: 4,
11254
- result: "cells"
11255
- }
11256
- ),
11257
- /* @__PURE__ */ jsx(
11258
- "feDisplacementMap",
11259
- {
11260
- in: "blurred",
11261
- in2: "cells",
11262
- scale: blurAmount * 0.5,
11263
- xChannelSelector: "R",
11264
- yChannelSelector: "G",
11265
- result: "mosaic"
11266
- }
11267
- ),
11268
- /* @__PURE__ */ jsxs("feComponentTransfer", { in: "mosaic", children: [
11269
- /* @__PURE__ */ jsx("feFuncR", { type: "linear", slope: 1.05, intercept: 0 }),
11270
- /* @__PURE__ */ jsx("feFuncG", { type: "linear", slope: 1.05, intercept: 0 }),
11271
- /* @__PURE__ */ jsx("feFuncB", { type: "linear", slope: 1.05, intercept: 0 })
11272
- ] })
11273
- ] });
11274
- }
11275
- // ── Glow Edges ─────────────────────────────────────────────────────
11276
- // Edge detection with glow: invert, blur slightly, overlay to
11277
- // create edge-glowing effect.
11278
- case "artisticGlowEdges":
11279
- case "glowEdges":
11280
- case "glow_edges": {
11281
- const edgeBlur = Math.max(1, Math.round(normalizedRadius * 3));
11282
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11283
- /* @__PURE__ */ jsx(
11284
- "feColorMatrix",
11285
- {
11286
- type: "matrix",
11287
- values: "-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0",
11288
- result: "inverted"
11289
- }
11290
- ),
11291
- /* @__PURE__ */ jsx("feGaussianBlur", { in: "inverted", stdDeviation: edgeBlur, result: "blurredInv" }),
11292
- /* @__PURE__ */ jsx("feBlend", { in: "SourceGraphic", in2: "blurredInv", mode: "screen" }),
11293
- /* @__PURE__ */ jsxs("feComponentTransfer", { children: [
11294
- /* @__PURE__ */ jsx("feFuncR", { type: "linear", slope: 2, intercept: -0.3 }),
11295
- /* @__PURE__ */ jsx("feFuncG", { type: "linear", slope: 2, intercept: -0.3 }),
11296
- /* @__PURE__ */ jsx("feFuncB", { type: "linear", slope: 2, intercept: -0.3 })
11297
- ] })
11298
- ] });
11299
- }
11300
- // ── Chalk Sketch ───────────────────────────────────────────────────
11301
- // Grayscale with high contrast and chalk-like noise texture.
11302
- case "artisticChalkSketch":
11303
- case "chalkSketch":
11304
- case "chalk": {
11305
- const freq = 1 + normalizedRadius * 2;
11306
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11307
- /* @__PURE__ */ jsx(
11308
- "feColorMatrix",
11309
- {
11310
- type: "saturate",
11311
- values: `${Math.max(0, 0.2 - normalizedRadius * 0.2)}`,
11312
- result: "gray"
11313
- }
11314
- ),
11315
- /* @__PURE__ */ jsx(
11316
- "feTurbulence",
11317
- {
11318
- type: "fractalNoise",
11319
- baseFrequency: freq,
11320
- numOctaves: 4,
11321
- seed: 5,
11322
- stitchTiles: "stitch",
11323
- result: "chalkTex"
11324
- }
11325
- ),
11326
- /* @__PURE__ */ jsx("feColorMatrix", { in: "chalkTex", type: "saturate", values: "0", result: "chalkGray" }),
11327
- /* @__PURE__ */ jsx("feBlend", { in: "gray", in2: "chalkGray", mode: "overlay" }),
11328
- /* @__PURE__ */ jsxs("feComponentTransfer", { children: [
11329
- /* @__PURE__ */ jsx("feFuncR", { type: "linear", slope: 1.5, intercept: 0.05 }),
11330
- /* @__PURE__ */ jsx("feFuncG", { type: "linear", slope: 1.5, intercept: 0.05 }),
11331
- /* @__PURE__ */ jsx("feFuncB", { type: "linear", slope: 1.5, intercept: 0.05 })
11332
- ] })
11333
- ] });
11334
- }
11335
- // ── Pencil Sketch ──────────────────────────────────────────────────
11336
- // Grayscale with edge enhancement: invert + blur + blend (multiply)
11337
- // to create pencil-drawing look.
11338
- case "artisticPencilSketch":
11339
- case "pencilSketch": {
11340
- const blurAmt = Math.max(3, Math.round(4 + normalizedRadius * 8));
11341
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11342
- /* @__PURE__ */ jsx("feColorMatrix", { type: "saturate", values: "0", result: "gray" }),
11343
- /* @__PURE__ */ jsx(
11344
- "feColorMatrix",
11345
- {
11346
- in: "gray",
11347
- type: "matrix",
11348
- values: "-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0",
11349
- result: "invGray"
11350
- }
11351
- ),
11352
- /* @__PURE__ */ jsx("feGaussianBlur", { in: "invGray", stdDeviation: blurAmt, result: "blurInv" }),
11353
- /* @__PURE__ */ jsx("feBlend", { in: "blurInv", in2: "gray", mode: "screen", result: "sketch" }),
11354
- /* @__PURE__ */ jsxs("feComponentTransfer", { in: "sketch", children: [
11355
- /* @__PURE__ */ jsx("feFuncR", { type: "linear", slope: 1.6, intercept: -0.15 }),
11356
- /* @__PURE__ */ jsx("feFuncG", { type: "linear", slope: 1.6, intercept: -0.15 }),
11357
- /* @__PURE__ */ jsx("feFuncB", { type: "linear", slope: 1.6, intercept: -0.15 })
11358
- ] })
11359
- ] });
11360
- }
11361
- // ── Pencil Grayscale ───────────────────────────────────────────────
11362
- // Desaturated image with enhanced edge contrast (sharpen effect).
11363
- case "artisticPencilGrayscale":
11364
- case "pencilGrayscale":
11365
- case "grayPencil": {
11366
- const sharpenBlur = Math.max(0.5, 1 + normalizedRadius * 2);
11367
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11368
- /* @__PURE__ */ jsx("feColorMatrix", { type: "saturate", values: "0", result: "gray" }),
11369
- /* @__PURE__ */ jsx("feGaussianBlur", { in: "gray", stdDeviation: sharpenBlur, result: "grayBlur" }),
11370
- /* @__PURE__ */ jsx(
11371
- "feComposite",
11372
- {
11373
- in: "gray",
11374
- in2: "grayBlur",
11375
- operator: "arithmetic",
11376
- k1: 0,
11377
- k2: 1.5,
11378
- k3: -0.5,
11379
- k4: 0
11380
- }
11381
- )
11382
- ] });
11383
- }
11384
- default:
11385
- return null;
11386
- }
11387
- }
11388
- function buildDiscreteTable(steps) {
11389
- const values = [];
11390
- for (let i = 0; i < steps; i++) {
11391
- const v = Math.round(i / (steps - 1) * 100) / 100;
11392
- const count = Math.ceil(256 / steps);
11393
- for (let j = 0; j < count; j++) {
11394
- values.push(v);
11395
- }
11396
- }
11397
- return values.slice(0, 256).join(" ");
11398
- }
11399
10850
 
11400
10851
  // src/viewer/hooks/useElementOperations.ts
11401
10852
  function useElementOperations(input) {
@@ -14134,24 +13585,6 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
14134
13585
  return new Blob([buf], { type: "image/gif" });
14135
13586
  }
14136
13587
 
14137
- // src/viewer/utils/export-package.ts
14138
- function generatePackageReadme(presentationFilename) {
14139
- return [
14140
- "Presentation Package",
14141
- "====================",
14142
- "",
14143
- `This folder contains the presentation "${presentationFilename}" along with`,
14144
- "all linked media files (images, audio, video) in the /media subfolder.",
14145
- "",
14146
- "To view this presentation:",
14147
- "1. Open the .pptx file with any compatible presentation software",
14148
- "2. Ensure the /media folder remains alongside the .pptx file",
14149
- "",
14150
- `Packaged on ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`,
14151
- ""
14152
- ].join("\n");
14153
- }
14154
-
14155
13588
  // src/viewer/utils/export-svg.ts
14156
13589
  function injectFontFaces(svg, fontFaces) {
14157
13590
  if (!fontFaces.length) {
@@ -15007,74 +14440,6 @@ function useThemeSwitching(input) {
15007
14440
  currentPreset
15008
14441
  };
15009
14442
  }
15010
-
15011
- // src/viewer/hooks/usePropertyHandlers-helpers.ts
15012
- function collectUsedFonts(slides) {
15013
- const fonts = /* @__PURE__ */ new Set();
15014
- for (const slide of slides) {
15015
- for (const el of slide.elements ?? []) {
15016
- collectFontsFromElement(el, fonts);
15017
- }
15018
- }
15019
- return Array.from(fonts).sort();
15020
- }
15021
- function collectFontsFromElement(el, fonts) {
15022
- if (hasTextProperties(el)) {
15023
- if (el.textStyle?.fontFamily) {
15024
- fonts.add(el.textStyle.fontFamily);
15025
- }
15026
- if (el.textSegments) {
15027
- for (const seg of el.textSegments) {
15028
- if (seg.style?.fontFamily) {
15029
- fonts.add(seg.style.fontFamily);
15030
- }
15031
- }
15032
- }
15033
- }
15034
- if (el.type === "group" && el.children) {
15035
- for (const child of el.children) {
15036
- collectFontsFromElement(child, fonts);
15037
- }
15038
- }
15039
- }
15040
- function applyAcceptSlide(slides, diff) {
15041
- const n = [...slides];
15042
- if (diff.status === "added" && diff.compareSlide) {
15043
- n.splice(Math.min(diff.compareIndex, n.length), 0, {
15044
- ...diff.compareSlide
15045
- });
15046
- } else if (diff.status === "changed" && diff.compareSlide && diff.baseIndex >= 0) {
15047
- n[diff.baseIndex] = { ...diff.compareSlide };
15048
- } else if (diff.status === "removed" && diff.baseIndex >= 0) {
15049
- n.splice(diff.baseIndex, 1);
15050
- }
15051
- return n;
15052
- }
15053
- function applyAcceptAllSlides(slides, compareResult) {
15054
- const n = [...slides];
15055
- const dd = [...compareResult.diffs];
15056
- for (let i = dd.length - 1; i >= 0; i--) {
15057
- const x = dd[i];
15058
- if (x.status === "removed" && x.baseIndex >= 0 && x.baseIndex < n.length) {
15059
- n.splice(x.baseIndex, 1);
15060
- }
15061
- }
15062
- for (const x of dd) {
15063
- if (x.status === "changed" && x.compareSlide && x.baseIndex >= 0 && x.baseIndex < n.length) {
15064
- n[x.baseIndex] = { ...x.compareSlide };
15065
- }
15066
- }
15067
- for (const x of dd) {
15068
- if (x.status === "added" && x.compareSlide) {
15069
- n.splice(Math.min(x.compareIndex, n.length), 0, {
15070
- ...x.compareSlide
15071
- });
15072
- }
15073
- }
15074
- return n;
15075
- }
15076
-
15077
- // src/viewer/hooks/usePropertyHandlers.ts
15078
14443
  function usePropertyHandlers(input) {
15079
14444
  const {
15080
14445
  slides,
@@ -15657,54 +15022,13 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
15657
15022
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
15658
15023
  }
15659
15024
  function computeSlideSectionGroups(slides, sections) {
15660
- if (slides.length === 0) {
15661
- return [];
15662
- }
15663
- if (sections.length > 0) {
15664
- const sectionSlideMap = /* @__PURE__ */ new Map();
15665
- const ungroupedIndexes = [];
15666
- for (let i = 0; i < slides.length; i++) {
15667
- const sid = slides[i].sectionId;
15668
- if (sid) {
15669
- const arr = sectionSlideMap.get(sid);
15670
- if (arr) {
15671
- arr.push(i);
15672
- } else {
15673
- sectionSlideMap.set(sid, [i]);
15674
- }
15675
- } else {
15676
- ungroupedIndexes.push(i);
15677
- }
15678
- }
15679
- const groups = sections.map((sec) => ({
15680
- id: sec.id,
15681
- label: sec.name,
15682
- slideIndexes: sectionSlideMap.get(sec.id) ?? [],
15683
- color: sec.color,
15684
- defaultCollapsed: sec.collapsed
15685
- })).filter((g) => g.slideIndexes.length > 0);
15686
- if (ungroupedIndexes.length > 0) {
15687
- groups.push({
15688
- id: UNGROUPED_SECTION_ID,
15689
- label: "Ungrouped Slides",
15690
- slideIndexes: ungroupedIndexes
15691
- });
15692
- }
15693
- return groups.length > 0 ? groups : [
15694
- {
15695
- id: "default",
15696
- label: "Slides",
15697
- slideIndexes: slides.map((_s, i) => i)
15698
- }
15699
- ];
15700
- }
15701
- return [
15702
- {
15703
- id: "default",
15704
- label: "Slides",
15705
- slideIndexes: slides.map((_s, i) => i)
15706
- }
15707
- ];
15025
+ return groupSlidesBySection(sections, slides).map((group) => ({
15026
+ id: group.section?.id ?? (sections.length > 0 ? UNGROUPED_SECTION_ID : "default"),
15027
+ label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
15028
+ slideIndexes: group.slideIndexes,
15029
+ ...group.section?.color !== void 0 ? { color: group.section.color } : {},
15030
+ ...group.section?.collapsed !== void 0 ? { defaultCollapsed: group.section.collapsed } : {}
15031
+ }));
15708
15032
  }
15709
15033
  function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
15710
15034
  if (mode !== "master") {
@@ -17677,7 +17001,7 @@ function useYjsDocumentSync({
17677
17001
  return;
17678
17002
  }
17679
17003
  try {
17680
- const { PptxHandler: PptxHandler2 } = await import('./dist-N6PAPXK6.mjs');
17004
+ const { PptxHandler: PptxHandler2 } = await import('./dist-3YRZ26TL.mjs');
17681
17005
  const handler = new PptxHandler2();
17682
17006
  await handler.load(sourceBytes.buffer);
17683
17007
  const currentSlides = readSlidesFromYDoc(
@@ -17884,39 +17208,10 @@ function useLayoutSwitching(input) {
17884
17208
  currentLayoutPath
17885
17209
  };
17886
17210
  }
17887
- var DEFAULT_OVERSCAN = 5;
17888
- function computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan = DEFAULT_OVERSCAN) {
17889
- const safeItemHeight = Math.max(itemHeight, 1);
17890
- const totalHeight = totalItems * safeItemHeight;
17891
- if (totalItems === 0) {
17892
- return {
17893
- startIndex: 0,
17894
- endIndex: -1,
17895
- totalHeight: 0,
17896
- offsetY: 0,
17897
- visibleRange: { start: 0, end: -1 }
17898
- };
17899
- }
17900
- const visibleStart = Math.floor(scrollTop / safeItemHeight);
17901
- const visibleEnd = Math.min(
17902
- totalItems - 1,
17903
- Math.floor((scrollTop + viewportHeight) / safeItemHeight)
17904
- );
17905
- const startIndex = Math.max(0, visibleStart - overscan);
17906
- const endIndex = Math.min(totalItems - 1, visibleEnd + overscan);
17907
- const offsetY = startIndex * safeItemHeight;
17908
- return {
17909
- startIndex,
17910
- endIndex,
17911
- totalHeight,
17912
- offsetY,
17913
- visibleRange: { start: visibleStart, end: visibleEnd }
17914
- };
17915
- }
17916
17211
  function useVirtualizedSlides({
17917
17212
  totalItems,
17918
17213
  itemHeight,
17919
- overscan = DEFAULT_OVERSCAN
17214
+ overscan = DEFAULT_VIRTUAL_OVERSCAN
17920
17215
  }) {
17921
17216
  const scrollContainerRef = useRef(null);
17922
17217
  const [scrollTop, setScrollTop] = useState(0);
@@ -18153,4 +17448,4 @@ function useSwipeNavigation(input) {
18153
17448
  return { onTouchStart, onTouchEnd };
18154
17449
  }
18155
17450
 
18156
- export { ACTION_VERB_MAP, ANIMATION_PRESET_OPTIONS, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, EMU_PER_PX, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, MIN_TOUCH_TARGET, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, SmartArtNodeText, TOOLBAR_SECTIONS, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildReactChartViewModel, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, buildTree, cellStyleToCss, chevronPoints, clearAudienceContent, cn, colour, computeVirtualRange, detectTargetType, ensureArrayValue, extractCellText, extractTableCellStyle, fitFontSize, gearPath, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageTilingStyle, getShapeVisualStyle, getTableCellBandStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isAudienceTab, isConnectorOrLineElement, isImageTiled, layoutToCategory, loadAudienceContent, nodeOpacity, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, parseTableElementData, renderAccentProcess, renderAlternatingFlow, renderArtisticEffectSvgFilter, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderDescendingProcess, renderDuotoneSvgFilter, renderGroupedList, renderHorizontalPictureList, renderImageAlphaSvgFilter, renderMediaElement, renderPictureAccentList, renderPyramidList, renderStepDownProcess, renderTableElement, renderTextSegments, renderToCanvas, renderVectorShape, renderVerticalBlockList, renderVerticalChevronList, resolvePalette, resolveSmartArtDataPalette, resolveStyle, shouldRenderFallbackLabel, smartArtNodeGroupProps, startPreviewAnimation, stopPreviewAnimation, storeAudienceContent, styleShadow, styleStroke, treeDepth, treeWidth, truncate, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useClipboardHandlers, useCollaborativeHistory, useCollaborativeState, useComments, useContentLifecycle, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useTouchGestures, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport, wrapChrome };
17451
+ export { ACTION_VERB_MAP, ANIMATION_PRESET_OPTIONS, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, MIN_TOUCH_TARGET, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, SmartArtNodeText, TOOLBAR_SECTIONS, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildReactChartViewModel, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, buildTree, chevronPoints, clearAudienceContent, cn, colour, detectTargetType, fitFontSize, gearPath, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isAudienceTab, isConnectorOrLineElement, isImageTiled, layoutToCategory, loadAudienceContent, nodeOpacity, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, renderAccentProcess, renderAlternatingFlow, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderDescendingProcess, renderGroupedList, renderHorizontalPictureList, renderMediaElement, renderPictureAccentList, renderPyramidList, renderStepDownProcess, renderTableElement, renderTextSegments, renderToCanvas, renderVectorShape, renderVerticalBlockList, renderVerticalChevronList, resolvePalette, resolveSmartArtDataPalette, resolveStyle, shouldRenderFallbackLabel, smartArtNodeGroupProps, startPreviewAnimation, stopPreviewAnimation, storeAudienceContent, styleShadow, styleStroke, treeDepth, treeWidth, truncate, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useClipboardHandlers, useCollaborativeHistory, useCollaborativeState, useComments, useContentLifecycle, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useTouchGestures, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport, wrapChrome };