pptx-react-viewer 1.0.12 → 1.1.2

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 (35) hide show
  1. package/dist/{PowerPointViewer-DtLlYf0r.d.mts → PowerPointViewer-CX0a7wz_.d.mts} +2 -0
  2. package/dist/{PowerPointViewer-DtLlYf0r.d.ts → PowerPointViewer-CX0a7wz_.d.ts} +2 -0
  3. package/dist/index.d.mts +2 -2
  4. package/dist/index.d.ts +2 -2
  5. package/dist/index.js +373 -64
  6. package/dist/index.mjs +373 -64
  7. package/dist/pptx-viewer.css +1 -1
  8. package/dist/viewer/index.d.mts +11 -3
  9. package/dist/viewer/index.d.ts +11 -3
  10. package/dist/viewer/index.js +373 -64
  11. package/dist/viewer/index.mjs +373 -64
  12. package/node_modules/emf-converter/package.json +1 -1
  13. package/node_modules/mtx-decompressor/dist/index.d.mts +2 -1
  14. package/node_modules/mtx-decompressor/dist/index.d.ts +2 -1
  15. package/node_modules/mtx-decompressor/dist/index.js +85 -93
  16. package/node_modules/mtx-decompressor/dist/index.mjs +85 -93
  17. package/node_modules/mtx-decompressor/package.json +1 -1
  18. package/node_modules/pptx-viewer-core/dist/{SvgExporter-CPr1npgo.d.ts → SvgExporter--H1PDfAY.d.ts} +1 -1
  19. package/node_modules/pptx-viewer-core/dist/{SvgExporter-B4-1_Hjp.d.mts → SvgExporter-Dq_2eV_r.d.mts} +1 -1
  20. package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +2 -2
  21. package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +2 -2
  22. package/node_modules/pptx-viewer-core/dist/cli/index.js +339 -235
  23. package/node_modules/pptx-viewer-core/dist/cli/index.mjs +339 -235
  24. package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +3 -3
  25. package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +3 -3
  26. package/node_modules/pptx-viewer-core/dist/index.d.mts +297 -6
  27. package/node_modules/pptx-viewer-core/dist/index.d.ts +297 -6
  28. package/node_modules/pptx-viewer-core/dist/index.js +1309 -235
  29. package/node_modules/pptx-viewer-core/dist/index.mjs +1285 -236
  30. package/node_modules/pptx-viewer-core/dist/{presentation-DgkIYhXo.d.mts → presentation-BozkirFp.d.mts} +17 -1
  31. package/node_modules/pptx-viewer-core/dist/{presentation-DgkIYhXo.d.ts → presentation-BozkirFp.d.ts} +17 -1
  32. package/node_modules/pptx-viewer-core/dist/{text-operations-dYKZp3zE.d.mts → text-operations-B2JbPA5H.d.mts} +1 -1
  33. package/node_modules/pptx-viewer-core/dist/{text-operations-B6U6XxWt.d.ts → text-operations-zwF6i4eH.d.ts} +1 -1
  34. package/node_modules/pptx-viewer-core/package.json +1 -1
  35. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -43302,7 +43302,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
43302
43302
  return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
43303
43303
  }
43304
43304
  function useSyncExternalStore$2(subscribe3, getSnapshot2) {
43305
- didWarnOld18Alpha || void 0 === React96.startTransition || (didWarnOld18Alpha = true, console.error(
43305
+ didWarnOld18Alpha || void 0 === React97.startTransition || (didWarnOld18Alpha = true, console.error(
43306
43306
  "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
43307
43307
  ));
43308
43308
  var value = getSnapshot2();
@@ -43324,7 +43324,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
43324
43324
  },
43325
43325
  [subscribe3, value, getSnapshot2]
43326
43326
  );
43327
- useEffect71(
43327
+ useEffect72(
43328
43328
  function() {
43329
43329
  checkIfSnapshotChanged(inst) && forceUpdate({ inst });
43330
43330
  return subscribe3(function() {
@@ -43350,8 +43350,8 @@ var require_use_sync_external_store_shim_development = __commonJS({
43350
43350
  return getSnapshot2();
43351
43351
  }
43352
43352
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
43353
- var React96 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is2, useState85 = React96.useState, useEffect71 = React96.useEffect, useLayoutEffect7 = React96.useLayoutEffect, useDebugValue = React96.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
43354
- exports$1.useSyncExternalStore = void 0 !== React96.useSyncExternalStore ? React96.useSyncExternalStore : shim;
43353
+ var React97 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is2, useState85 = React97.useState, useEffect72 = React97.useEffect, useLayoutEffect7 = React97.useLayoutEffect, useDebugValue = React97.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
43354
+ exports$1.useSyncExternalStore = void 0 !== React97.useSyncExternalStore ? React97.useSyncExternalStore : shim;
43355
43355
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
43356
43356
  })();
43357
43357
  }
@@ -43374,9 +43374,9 @@ var require_with_selector_development = __commonJS({
43374
43374
  return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
43375
43375
  }
43376
43376
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
43377
- var React96 = __require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is2, useSyncExternalStore3 = shim.useSyncExternalStore, useRef72 = React96.useRef, useEffect71 = React96.useEffect, useMemo41 = React96.useMemo, useDebugValue = React96.useDebugValue;
43377
+ var React97 = __require("react"), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is2, useSyncExternalStore3 = shim.useSyncExternalStore, useRef73 = React97.useRef, useEffect72 = React97.useEffect, useMemo41 = React97.useMemo, useDebugValue = React97.useDebugValue;
43378
43378
  exports$1.useSyncExternalStoreWithSelector = function(subscribe3, getSnapshot2, getServerSnapshot2, selector, isEqual) {
43379
- var instRef = useRef72(null);
43379
+ var instRef = useRef73(null);
43380
43380
  if (null === instRef.current) {
43381
43381
  var inst = { hasValue: false, value: null };
43382
43382
  instRef.current = inst;
@@ -43417,7 +43417,7 @@ var require_with_selector_development = __commonJS({
43417
43417
  [getSnapshot2, getServerSnapshot2, selector, isEqual]
43418
43418
  );
43419
43419
  var value = useSyncExternalStore3(subscribe3, instRef[0], instRef[1]);
43420
- useEffect71(
43420
+ useEffect72(
43421
43421
  function() {
43422
43422
  inst.hasValue = true;
43423
43423
  inst.value = value;
@@ -44146,6 +44146,18 @@ function applyProps(object, props) {
44146
44146
  } else if (target !== null && typeof target === "object" && typeof target.set === "function" && typeof value === "number") {
44147
44147
  if (typeof target.setScalar === "function") target.setScalar(value);
44148
44148
  else target.set(value);
44149
+ } else if (root instanceof ShaderMaterial && key === "uniforms" && is.obj(value)) {
44150
+ if (!is.obj(root.uniforms)) root.uniforms = {};
44151
+ const uniforms = root.uniforms;
44152
+ const nextUniforms = value;
44153
+ for (const name in nextUniforms) {
44154
+ const uniform = nextUniforms[name];
44155
+ const targetUniform = uniforms[name];
44156
+ if (targetUniform) Object.assign(targetUniform, uniform);
44157
+ else uniforms[name] = {
44158
+ ...uniform
44159
+ };
44160
+ }
44149
44161
  } else {
44150
44162
  var _root$key;
44151
44163
  root[key] = value;
@@ -52865,8 +52877,8 @@ function createPointerEvents(store) {
52865
52877
  };
52866
52878
  }
52867
52879
  var import_scheduler, threeTypes, act2, isOrthographicCamera, isRef, isColorRepresentation, useIsomorphicLayoutEffect, ErrorBoundary, is, REACT_INTERNAL_PROPS, INDEX_REGEX, RESERVED_PROPS, MEMOIZED_PROTOTYPES, colorMaps, EVENT_REGEX, isObject3D, isRenderer, context, createStore2, memoizedLoaders, isConstructor$1, t, o2, r, e, packageData, Rm, Og, Mg, Rb, Eb, t0, r0, NoEventPriority, catalogue, PREFIX_REGEX, toPascalCase, i2, isConstructor, reconstructed, handleTextInstance, NO_CONTEXT, currentUpdatePriority, NoFlags, Update, reconciler, _roots, shallowLoose, globalEffects, globalAfterEffects, globalTailEffects, addEffect, addAfterEffect, addTail, subscribers, subscription, running, useFrameInProgress, repeat, frame, state, DOM_EVENTS;
52868
- var init_events_5a94e5eb_esm = __esm({
52869
- "../../node_modules/.bun/@react-three+fiber@9.5.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/events-5a94e5eb.esm.js"() {
52880
+ var init_events_760a1017_esm = __esm({
52881
+ "../../node_modules/.bun/@react-three+fiber@9.6.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/events-760a1017.esm.js"() {
52870
52882
  init_three_module();
52871
52883
  init_traditional();
52872
52884
  init_suspend_react();
@@ -53190,7 +53202,7 @@ var init_events_5a94e5eb_esm = __esm({
53190
53202
  e = 2;
53191
53203
  packageData = {
53192
53204
  name: "@react-three/fiber",
53193
- version: "9.5.0",
53205
+ version: "9.6.0",
53194
53206
  description: "A React renderer for Threejs",
53195
53207
  keywords: [
53196
53208
  "react",
@@ -53590,7 +53602,7 @@ var init_dist2 = __esm({
53590
53602
  }
53591
53603
  });
53592
53604
 
53593
- // ../../node_modules/.bun/@react-three+fiber@9.5.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/react-three-fiber.esm.js
53605
+ // ../../node_modules/.bun/@react-three+fiber@9.6.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/react-three-fiber.esm.js
53594
53606
  var react_three_fiber_esm_exports = {};
53595
53607
  __export(react_three_fiber_esm_exports, {
53596
53608
  Canvas: () => Canvas,
@@ -53759,9 +53771,9 @@ function Canvas(props) {
53759
53771
  });
53760
53772
  }
53761
53773
  var init_react_three_fiber_esm = __esm({
53762
- "../../node_modules/.bun/@react-three+fiber@9.5.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/react-three-fiber.esm.js"() {
53763
- init_events_5a94e5eb_esm();
53764
- init_events_5a94e5eb_esm();
53774
+ "../../node_modules/.bun/@react-three+fiber@9.6.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/react-three-fiber.esm.js"() {
53775
+ init_events_760a1017_esm();
53776
+ init_events_760a1017_esm();
53765
53777
  init_three_module();
53766
53778
  init_dist2();
53767
53779
  init_dist();
@@ -53833,7 +53845,7 @@ function isRefObject(ref) {
53833
53845
  }
53834
53846
  var v1, v2, v3, v4, epsilon, getCameraCSSMatrix, getObjectCSSMatrix, Html;
53835
53847
  var init_Html = __esm({
53836
- "../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/web/Html.js"() {
53848
+ "../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/web/Html.js"() {
53837
53849
  init_extends();
53838
53850
  init_three_module();
53839
53851
  init_react_three_fiber_esm();
@@ -58388,7 +58400,7 @@ function extensions(useDraco = true, useMeshopt = true, extendLoader) {
58388
58400
  }
58389
58401
  var dracoLoader, decoderPath, useGLTF;
58390
58402
  var init_Gltf = __esm({
58391
- "../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/core/Gltf.js"() {
58403
+ "../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/core/Gltf.js"() {
58392
58404
  init_extends();
58393
58405
  init_three_stdlib();
58394
58406
  init_react_three_fiber_esm();
@@ -58404,7 +58416,7 @@ var init_Gltf = __esm({
58404
58416
  });
58405
58417
  var OrbitControls2;
58406
58418
  var init_OrbitControls2 = __esm({
58407
- "../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/core/OrbitControls.js"() {
58419
+ "../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/core/OrbitControls.js"() {
58408
58420
  init_extends();
58409
58421
  init_react_three_fiber_esm();
58410
58422
  init_three_stdlib();
@@ -58487,7 +58499,7 @@ var init_camera_controls_module = __esm({
58487
58499
  });
58488
58500
  var Center;
58489
58501
  var init_Center = __esm({
58490
- "../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/core/Center.js"() {
58502
+ "../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/core/Center.js"() {
58491
58503
  init_extends();
58492
58504
  init_three_module();
58493
58505
  Center = /* @__PURE__ */ React10.forwardRef(function Center2({
@@ -58552,9 +58564,9 @@ var init_Center = __esm({
58552
58564
  }
58553
58565
  });
58554
58566
 
58555
- // ../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/index.js
58567
+ // ../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/index.js
58556
58568
  var init_drei = __esm({
58557
- "../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/index.js"() {
58569
+ "../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/index.js"() {
58558
58570
  init_Html();
58559
58571
  init_Gltf();
58560
58572
  init_OrbitControls2();
@@ -70384,12 +70396,40 @@ function toCssGradientStop(stop) {
70384
70396
  const posStr = pos === Math.round(pos) ? `${pos}%` : `${pos.toFixed(1)}%`;
70385
70397
  return `${color} ${posStr}`;
70386
70398
  }
70399
+ function computeGradientCenter(fillToRect, focalPoint) {
70400
+ if (fillToRect) {
70401
+ const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
70402
+ let cx = (l2 + (1 - r2)) / 2 * 100;
70403
+ let cy = (t2 + (1 - b2)) / 2 * 100;
70404
+ if (focalPoint) {
70405
+ const fpX = focalPoint.x * 100;
70406
+ const fpY = focalPoint.y * 100;
70407
+ cx = (cx + fpX) / 2;
70408
+ cy = (cy + fpY) / 2;
70409
+ }
70410
+ return { cx, cy };
70411
+ }
70412
+ if (focalPoint) {
70413
+ return { cx: focalPoint.x * 100, cy: focalPoint.y * 100 };
70414
+ }
70415
+ return { cx: 50, cy: 50 };
70416
+ }
70417
+ function buildCirclePathGradient(stops, focalPoint, fillToRect) {
70418
+ const stopStr = stops.map(toCssGradientStop).join(", ");
70419
+ const { cx, cy } = computeGradientCenter(fillToRect, focalPoint);
70420
+ const posX = Math.round(cx) === 50 && !focalPoint && !fillToRect ? "center" : `${Math.round(cx)}%`;
70421
+ const posY = Math.round(cy) === 50 && !focalPoint && !fillToRect ? "center" : `${Math.round(cy)}%`;
70422
+ if (fillToRect) {
70423
+ const radius = Math.max(cx, 100 - cx, cy, 100 - cy);
70424
+ return `radial-gradient(circle ${Math.round(radius)}% at ${posX} ${posY}, ${stopStr})`;
70425
+ }
70426
+ return `radial-gradient(circle at ${posX} ${posY}, ${stopStr})`;
70427
+ }
70387
70428
  function buildRectPathGradient(stops, focalPoint, fillToRect) {
70388
70429
  const stopStr = stops.map(toCssGradientStop).join(", ");
70389
70430
  if (fillToRect) {
70390
70431
  const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
70391
- const cx = (l2 + (1 - r2)) / 2 * 100;
70392
- const cy = (t2 + (1 - b2)) / 2 * 100;
70432
+ const { cx, cy } = computeGradientCenter(fillToRect, focalPoint);
70393
70433
  const semiX = Math.max(cx, 100 - cx);
70394
70434
  const semiY = Math.max(cy, 100 - cy);
70395
70435
  const posX2 = `${Math.round(cx)}%`;
@@ -70412,19 +70452,27 @@ function buildShapePathGradient(stops, focalPoint, fillToRect) {
70412
70452
  const stopStr = stops.map(toCssGradientStop).join(", ");
70413
70453
  if (fillToRect) {
70414
70454
  const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
70415
- const cx = (l2 + (1 - r2)) / 2 * 100;
70416
- const cy = (t2 + (1 - b2)) / 2 * 100;
70417
- const posX2 = `${Math.round(cx)}%`;
70418
- const posY2 = `${Math.round(cy)}%`;
70455
+ const { cx: cx2, cy: cy2 } = computeGradientCenter(fillToRect, focalPoint);
70456
+ const posX2 = `${Math.round(cx2)}%`;
70457
+ const posY2 = `${Math.round(cy2)}%`;
70458
+ const semiX = Math.max(cx2, 100 - cx2);
70459
+ const semiY = Math.max(cy2, 100 - cy2);
70419
70460
  const innerHalfW = (1 - l2 - r2) / 2 * 100;
70420
70461
  const innerHalfH = (1 - t2 - b2) / 2 * 100;
70421
70462
  if (innerHalfW > 0.5 && innerHalfH > 0.5 && Math.abs(innerHalfW - innerHalfH) > 1) {
70422
- return `radial-gradient(${Math.round(innerHalfW)}% ${Math.round(innerHalfH)}% at ${posX2} ${posY2}, ${stopStr})`;
70463
+ const aspect2 = innerHalfW / innerHalfH;
70464
+ const adjustedSemiX = Math.round(Math.max(semiX, semiY * aspect2));
70465
+ const adjustedSemiY = Math.round(Math.max(semiY, semiX / aspect2));
70466
+ return `radial-gradient(${adjustedSemiX}% ${adjustedSemiY}% at ${posX2} ${posY2}, ${stopStr})`;
70467
+ }
70468
+ if (semiX > 0.5 || semiY > 0.5) {
70469
+ return `radial-gradient(${Math.round(semiX)}% ${Math.round(semiY)}% at ${posX2} ${posY2}, ${stopStr})`;
70423
70470
  }
70424
70471
  return `radial-gradient(farthest-side at ${posX2} ${posY2}, ${stopStr})`;
70425
70472
  }
70426
- const posX = focalPoint ? `${Math.round(focalPoint.x * 100)}%` : "center";
70427
- const posY = focalPoint ? `${Math.round(focalPoint.y * 100)}%` : "center";
70473
+ const { cx, cy } = computeGradientCenter(void 0, focalPoint);
70474
+ const posX = focalPoint ? `${Math.round(cx)}%` : "center";
70475
+ const posY = focalPoint ? `${Math.round(cy)}%` : "center";
70428
70476
  return `radial-gradient(farthest-side at ${posX} ${posY}, ${stopStr})`;
70429
70477
  }
70430
70478
  function buildCssGradientFromShapeStyle(style) {
@@ -70446,9 +70494,7 @@ function buildCssGradientFromShapeStyle(style) {
70446
70494
  if (pathType === "shape") {
70447
70495
  return buildShapePathGradient(stops, fp, ftr);
70448
70496
  }
70449
- const posX = fp ? `${Math.round(fp.x * 100)}%` : "center";
70450
- const posY = fp ? `${Math.round(fp.y * 100)}%` : "center";
70451
- return `radial-gradient(circle at ${posX} ${posY}, ${stops.map(toCssGradientStop).join(", ")})`;
70497
+ return buildCirclePathGradient(stops, fp, ftr);
70452
70498
  }
70453
70499
  const normalizedAngle = typeof style.fillGradientAngle === "number" && Number.isFinite(style.fillGradientAngle) ? style.fillGradientAngle : 90;
70454
70500
  return `linear-gradient(${Math.round(normalizedAngle)}deg, ${stops.map(toCssGradientStop).join(", ")})`;
@@ -70847,8 +70893,10 @@ function getTextStyleForElement(element2, fallbackColor) {
70847
70893
  const verticalDirection = toCssVerticalDirection(element2.textStyle?.textDirection);
70848
70894
  const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
70849
70895
  const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
70896
+ const hasSegments = (element2.textSegments?.length ?? 0) > 0;
70850
70897
  return {
70851
70898
  color: resolvedTextColor,
70899
+ backgroundColor: !hasSegments && element2.textStyle?.highlightColor ? normalizeHexColor(element2.textStyle.highlightColor, void 0) : void 0,
70852
70900
  textAlign: (() => {
70853
70901
  const a2 = element2.textStyle?.align;
70854
70902
  if (a2 === "justLow" || a2 === "dist" || a2 === "thaiDist") {
@@ -84922,6 +84970,79 @@ function comparePresentation(base, compare) {
84922
84970
  unchangedCount
84923
84971
  };
84924
84972
  }
84973
+ function copyFormatFromElement(element2) {
84974
+ const result = {};
84975
+ if (hasShapeProperties(element2) && element2.shapeStyle) {
84976
+ const s = element2.shapeStyle;
84977
+ result.shapeStyle = {
84978
+ fillColor: s.fillColor,
84979
+ fillMode: s.fillMode,
84980
+ fillGradient: s.fillGradient,
84981
+ fillGradientStops: s.fillGradientStops ? [...s.fillGradientStops] : void 0,
84982
+ fillGradientAngle: s.fillGradientAngle,
84983
+ fillGradientType: s.fillGradientType,
84984
+ fillOpacity: s.fillOpacity,
84985
+ fillPatternPreset: s.fillPatternPreset,
84986
+ fillPatternBackgroundColor: s.fillPatternBackgroundColor,
84987
+ strokeColor: s.strokeColor,
84988
+ strokeWidth: s.strokeWidth,
84989
+ strokeOpacity: s.strokeOpacity,
84990
+ strokeDash: s.strokeDash,
84991
+ lineJoin: s.lineJoin,
84992
+ lineCap: s.lineCap,
84993
+ shadowColor: s.shadowColor,
84994
+ shadowBlur: s.shadowBlur,
84995
+ shadowOffsetX: s.shadowOffsetX,
84996
+ shadowOffsetY: s.shadowOffsetY,
84997
+ shadowOpacity: s.shadowOpacity,
84998
+ glowColor: s.glowColor,
84999
+ glowRadius: s.glowRadius,
85000
+ glowOpacity: s.glowOpacity,
85001
+ softEdgeRadius: s.softEdgeRadius
85002
+ };
85003
+ }
85004
+ if (hasTextProperties(element2) && element2.textStyle) {
85005
+ const t2 = element2.textStyle;
85006
+ result.textStyle = {
85007
+ fontFamily: t2.fontFamily,
85008
+ fontSize: t2.fontSize,
85009
+ bold: t2.bold,
85010
+ italic: t2.italic,
85011
+ underline: t2.underline,
85012
+ underlineStyle: t2.underlineStyle,
85013
+ strikethrough: t2.strikethrough,
85014
+ color: t2.color,
85015
+ align: t2.align,
85016
+ lineSpacing: t2.lineSpacing,
85017
+ paragraphSpacingBefore: t2.paragraphSpacingBefore,
85018
+ paragraphSpacingAfter: t2.paragraphSpacingAfter,
85019
+ textCaps: t2.textCaps
85020
+ };
85021
+ }
85022
+ return result;
85023
+ }
85024
+ function applyFormatToElement(element2, format) {
85025
+ let updated = { ...element2 };
85026
+ if (format.shapeStyle && hasShapeProperties(updated)) {
85027
+ updated = {
85028
+ ...updated,
85029
+ shapeStyle: {
85030
+ ...updated.shapeStyle,
85031
+ ...format.shapeStyle
85032
+ }
85033
+ };
85034
+ }
85035
+ if (format.textStyle && hasTextProperties(updated)) {
85036
+ updated = {
85037
+ ...updated,
85038
+ textStyle: {
85039
+ ...updated.textStyle,
85040
+ ...format.textStyle
85041
+ }
85042
+ };
85043
+ }
85044
+ return updated;
85045
+ }
84925
85046
 
84926
85047
  // src/viewer/utils/animation-preview.ts
84927
85048
  var PRESET_TO_EFFECT = {
@@ -91298,13 +91419,24 @@ function usePresenceTracking({
91298
91419
  }, []);
91299
91420
  return { remoteUsers, broadcastPresence };
91300
91421
  }
91422
+ var CONNECTION_TIMEOUT_MS = 3e4;
91301
91423
  function useYjsProvider({ config }) {
91302
91424
  const [status, setStatus] = useState("disconnected");
91303
91425
  const [awareness, setAwareness] = useState(null);
91304
91426
  const [doc2, setDoc] = useState(null);
91305
91427
  const [clientId, setClientId] = useState(null);
91306
91428
  const cleanupRef = useRef(null);
91429
+ const timeoutRef = useRef(null);
91430
+ const teardown = useCallback(() => {
91431
+ if (timeoutRef.current) {
91432
+ clearTimeout(timeoutRef.current);
91433
+ timeoutRef.current = null;
91434
+ }
91435
+ cleanupRef.current?.();
91436
+ cleanupRef.current = null;
91437
+ }, []);
91307
91438
  const init = useCallback(async () => {
91439
+ teardown();
91308
91440
  const roomId = validateRoomId(config.roomId);
91309
91441
  setStatus("connecting");
91310
91442
  try {
@@ -91319,8 +91451,14 @@ function useYjsProvider({ config }) {
91319
91451
  params: config.authToken ? { token: config.authToken } : void 0
91320
91452
  }
91321
91453
  );
91454
+ let connected = false;
91322
91455
  const handleStatus = (event) => {
91323
91456
  if (event.status === "connected") {
91457
+ connected = true;
91458
+ if (timeoutRef.current) {
91459
+ clearTimeout(timeoutRef.current);
91460
+ timeoutRef.current = null;
91461
+ }
91324
91462
  setStatus("connected");
91325
91463
  } else if (event.status === "disconnected") {
91326
91464
  setStatus("disconnected");
@@ -91328,8 +91466,24 @@ function useYjsProvider({ config }) {
91328
91466
  };
91329
91467
  provider.on("status", handleStatus);
91330
91468
  if (provider.wsconnected) {
91469
+ connected = true;
91331
91470
  setStatus("connected");
91332
91471
  }
91472
+ if (!connected) {
91473
+ timeoutRef.current = setTimeout(() => {
91474
+ timeoutRef.current = null;
91475
+ if (!connected) {
91476
+ provider.off("status", handleStatus);
91477
+ provider.destroy();
91478
+ yDoc.destroy();
91479
+ setDoc(null);
91480
+ setAwareness(null);
91481
+ setClientId(null);
91482
+ cleanupRef.current = null;
91483
+ setStatus("error");
91484
+ }
91485
+ }, CONNECTION_TIMEOUT_MS);
91486
+ }
91333
91487
  setDoc(yDoc);
91334
91488
  setAwareness(provider.awareness);
91335
91489
  setClientId(provider.awareness.clientID);
@@ -91349,15 +91503,15 @@ function useYjsProvider({ config }) {
91349
91503
  );
91350
91504
  setStatus("error");
91351
91505
  }
91352
- }, [config.roomId, config.serverUrl, config.authToken]);
91506
+ }, [config.roomId, config.serverUrl, config.authToken, teardown]);
91353
91507
  useEffect(() => {
91354
91508
  init();
91355
- return () => {
91356
- cleanupRef.current?.();
91357
- cleanupRef.current = null;
91358
- };
91509
+ return teardown;
91510
+ }, [init, teardown]);
91511
+ const retry = useCallback(() => {
91512
+ init();
91359
91513
  }, [init]);
91360
- return { status, awareness, doc: doc2, clientId };
91514
+ return { status, awareness, doc: doc2, clientId, retry };
91361
91515
  }
91362
91516
 
91363
91517
  // src/viewer/hooks/collaboration/useCollaborativeState.ts
@@ -91367,7 +91521,7 @@ function useCollaborativeState({
91367
91521
  canvasHeight
91368
91522
  }) {
91369
91523
  const userColor = sanitizeColor(config.userColor, "#6366f1");
91370
- const { status, awareness, doc: doc2, clientId } = useYjsProvider({ config });
91524
+ const { status, awareness, doc: doc2, clientId, retry } = useYjsProvider({ config });
91371
91525
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
91372
91526
  awareness,
91373
91527
  localClientId: clientId,
@@ -91385,7 +91539,8 @@ function useCollaborativeState({
91385
91539
  broadcastPresence,
91386
91540
  connectedCount,
91387
91541
  config,
91388
- doc: doc2
91542
+ doc: doc2,
91543
+ retry
91389
91544
  };
91390
91545
  }
91391
91546
  var CollaborationContext = createContext(null);
@@ -91501,7 +91656,8 @@ var STATUS_STYLES = {
91501
91656
  };
91502
91657
  function CollaborationStatusIndicator({
91503
91658
  status,
91504
- connectedCount
91659
+ connectedCount,
91660
+ onRetry
91505
91661
  }) {
91506
91662
  const { t: t2 } = useTranslation();
91507
91663
  const style = STATUS_STYLES[status];
@@ -91516,7 +91672,17 @@ function CollaborationStatusIndicator({
91516
91672
  }),
91517
91673
  children: [
91518
91674
  /* @__PURE__ */ jsx("span", { className: `inline-block w-2 h-2 rounded-full ${style.dot}`, "aria-hidden": "true" }),
91519
- /* @__PURE__ */ jsx("span", { className: `text-[10px] ${style.text}`, children: status === "connected" ? t2("pptx.collaboration.userCount", { count: connectedCount }) : t2(`pptx.collaboration.status.${status}`) })
91675
+ /* @__PURE__ */ jsx("span", { className: `text-[10px] ${style.text}`, children: status === "connected" ? t2("pptx.collaboration.userCount", { count: connectedCount }) : t2(`pptx.collaboration.status.${status}`) }),
91676
+ status === "error" && onRetry && /* @__PURE__ */ jsx(
91677
+ "button",
91678
+ {
91679
+ type: "button",
91680
+ onClick: onRetry,
91681
+ className: "text-[10px] text-blue-400 hover:text-blue-300 underline underline-offset-2 transition-colors",
91682
+ "aria-label": t2("pptx.collaboration.retry"),
91683
+ children: t2("pptx.collaboration.retry")
91684
+ }
91685
+ )
91520
91686
  ]
91521
91687
  }
91522
91688
  );
@@ -97146,6 +97312,11 @@ var OV = [
97146
97312
  l: "Package for Sharing",
97147
97313
  i: /* @__PURE__ */ jsx(LuFolderOpen, { className: `${ics} text-muted-foreground` })
97148
97314
  },
97315
+ {
97316
+ k: "pptx",
97317
+ l: "Save as Presentation (.pptx)",
97318
+ i: /* @__PURE__ */ jsx(LuDownload, { className: `${ics} text-muted-foreground` })
97319
+ },
97149
97320
  {
97150
97321
  k: "ppsx",
97151
97322
  l: "Save as Slide Show (.ppsx)",
@@ -97295,6 +97466,10 @@ function AnimationsSection(p3) {
97295
97466
  {
97296
97467
  type: "button",
97297
97468
  disabled,
97469
+ onClick: () => p3.onAddAnimation?.(
97470
+ item.value,
97471
+ group.group.toLowerCase()
97472
+ ),
97298
97473
  className: "flex items-center gap-2 w-full px-3 py-1.5 text-xs text-foreground hover:bg-muted transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
97299
97474
  title: t2("pptx.animations.applyAnimation", {
97300
97475
  name: t2(`pptx.animations.preset.${item.value}`)
@@ -97311,6 +97486,7 @@ function AnimationsSection(p3) {
97311
97486
  {
97312
97487
  type: "button",
97313
97488
  disabled,
97489
+ onClick: p3.onRemoveAnimation,
97314
97490
  className: pill,
97315
97491
  title: t2("pptx.animations.removeTooltip"),
97316
97492
  children: [
@@ -97720,6 +97896,10 @@ function DrawSection(p3) {
97720
97896
  }
97721
97897
  function FileSection(p3) {
97722
97898
  return /* @__PURE__ */ jsxs(Fragment, { children: [
97899
+ /* @__PURE__ */ jsxs("button", { onClick: p3.onSaveAsPptx, className: pill, title: "Save as Presentation (.pptx)", children: [
97900
+ /* @__PURE__ */ jsx(LuDownload, { className: ic2 }),
97901
+ "Save .pptx"
97902
+ ] }),
97723
97903
  /* @__PURE__ */ jsxs("button", { onClick: p3.onSaveAsPpsx, className: pill, title: "Save as Slide Show (.ppsx)", children: [
97724
97904
  /* @__PURE__ */ jsx(LuPlay, { className: ic2 }),
97725
97905
  "Save .ppsx"
@@ -98445,6 +98625,19 @@ function SlideShowSection(p3) {
98445
98625
  )
98446
98626
  ] });
98447
98627
  }
98628
+ function getEffectiveTextStyle(element2, tableEditorState) {
98629
+ if (!element2) {
98630
+ return void 0;
98631
+ }
98632
+ if (hasTextProperties(element2)) {
98633
+ return element2.textStyle;
98634
+ }
98635
+ if (element2.type === "table" && tableEditorState && element2.tableData) {
98636
+ const cell = element2.tableData.rows[tableEditorState.rowIndex]?.cells[tableEditorState.columnIndex];
98637
+ return cell?.style;
98638
+ }
98639
+ return void 0;
98640
+ }
98448
98641
  var FONT_COLOR_PRESETS = [
98449
98642
  "#000000",
98450
98643
  "#ffffff",
@@ -98475,7 +98668,8 @@ function TextSection(p3) {
98475
98668
  const isTextEl = hasSel && p3.selectedElement !== null && hasTextProperties(p3.selectedElement);
98476
98669
  const isTable = hasSel && p3.selectedElement?.type === "table";
98477
98670
  const canFormat = isTextEl || isTable;
98478
- const currentColor = isTextEl && p3.selectedElement && hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.color ?? p3.selectedElement.textStyle?.color ?? "#000000" : "#000000";
98671
+ const effectiveTs = getEffectiveTextStyle(p3.selectedElement, p3.tableEditorState);
98672
+ const currentColor = isTextEl && p3.selectedElement && hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.color ?? p3.selectedElement.textStyle?.color ?? "#000000" : effectiveTs?.color ?? "#000000";
98479
98673
  const currentHighlight = isTextEl && p3.selectedElement && hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.highlightColor ?? p3.selectedElement.textStyle?.highlightColor ?? "#ffff00" : "#ffff00";
98480
98674
  const colorInputRef = useRef(null);
98481
98675
  const highlightInputRef = useRef(null);
@@ -98505,7 +98699,7 @@ function TextSection(p3) {
98505
98699
  if (!canFormat || !p3.selectedElement) {
98506
98700
  return;
98507
98701
  }
98508
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98702
+ const ts = effectiveTs;
98509
98703
  switch (b2.t) {
98510
98704
  case "Bold":
98511
98705
  p3.onUpdateTextStyle({ bold: !ts?.bold });
@@ -98550,8 +98744,7 @@ function TextSection(p3) {
98550
98744
  if (!canFormat || !p3.selectedElement) {
98551
98745
  return;
98552
98746
  }
98553
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98554
- const current = ts?.fontSize ?? 18;
98747
+ const current = effectiveTs?.fontSize ?? 18;
98555
98748
  p3.onUpdateTextStyle({ fontSize: current + 2 });
98556
98749
  },
98557
98750
  className: gB,
@@ -98569,8 +98762,7 @@ function TextSection(p3) {
98569
98762
  if (!canFormat || !p3.selectedElement) {
98570
98763
  return;
98571
98764
  }
98572
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98573
- const current = ts?.fontSize ?? 18;
98765
+ const current = effectiveTs?.fontSize ?? 18;
98574
98766
  p3.onUpdateTextStyle({ fontSize: Math.max(1, current - 2) });
98575
98767
  },
98576
98768
  className: gB,
@@ -98741,9 +98933,8 @@ function TextSection(p3) {
98741
98933
  if (!canFormat || !p3.selectedElement) {
98742
98934
  return;
98743
98935
  }
98744
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98745
98936
  p3.onUpdateTextStyle({
98746
- listType: ts?.listType === "bullet" ? "none" : "bullet"
98937
+ listType: effectiveTs?.listType === "bullet" ? "none" : "bullet"
98747
98938
  });
98748
98939
  },
98749
98940
  className: gB,
@@ -98761,9 +98952,8 @@ function TextSection(p3) {
98761
98952
  if (!canFormat || !p3.selectedElement) {
98762
98953
  return;
98763
98954
  }
98764
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98765
98955
  p3.onUpdateTextStyle({
98766
- listType: ts?.listType === "numbered" ? "none" : "numbered"
98956
+ listType: effectiveTs?.listType === "numbered" ? "none" : "numbered"
98767
98957
  });
98768
98958
  },
98769
98959
  className: gL,
@@ -98783,8 +98973,7 @@ function TextSection(p3) {
98783
98973
  if (!canFormat || !p3.selectedElement) {
98784
98974
  return;
98785
98975
  }
98786
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98787
- const current = ts?.paragraphMarginLeft ?? 0;
98976
+ const current = effectiveTs?.paragraphMarginLeft ?? 0;
98788
98977
  p3.onUpdateTextStyle({
98789
98978
  paragraphMarginLeft: Math.max(0, current - 24)
98790
98979
  });
@@ -98804,8 +98993,7 @@ function TextSection(p3) {
98804
98993
  if (!canFormat || !p3.selectedElement) {
98805
98994
  return;
98806
98995
  }
98807
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98808
- const current = ts?.paragraphMarginLeft ?? 0;
98996
+ const current = effectiveTs?.paragraphMarginLeft ?? 0;
98809
98997
  p3.onUpdateTextStyle({
98810
98998
  paragraphMarginLeft: current + 24
98811
98999
  });
@@ -99142,6 +99330,7 @@ function OverflowMenu(p3) {
99142
99330
  video: p3.onExportVideo,
99143
99331
  gif: p3.onExportGif,
99144
99332
  package: p3.onPackageForSharing,
99333
+ pptx: p3.onSaveAsPptx,
99145
99334
  ppsx: p3.onSaveAsPpsx,
99146
99335
  pptm: p3.onSaveAsPptm,
99147
99336
  print: p3.onPrint,
@@ -99589,6 +99778,7 @@ function Toolbar(p3) {
99589
99778
  onExportVideo: p3.onExportVideo,
99590
99779
  onExportGif: p3.onExportGif,
99591
99780
  onPackageForSharing: p3.onPackageForSharing,
99781
+ onSaveAsPptx: p3.onSaveAsPptx,
99592
99782
  onSaveAsPpsx: p3.onSaveAsPpsx,
99593
99783
  onSaveAsPptm: p3.onSaveAsPptm,
99594
99784
  hasMacros: p3.hasMacros,
@@ -99638,6 +99828,7 @@ function Toolbar(p3) {
99638
99828
  {
99639
99829
  canEdit: p3.canEdit,
99640
99830
  selectedElement: p3.selectedElement,
99831
+ tableEditorState: p3.tableEditorState,
99641
99832
  onUpdateTextStyle: p3.onUpdateTextStyle
99642
99833
  }
99643
99834
  ),
@@ -99698,7 +99889,9 @@ function Toolbar(p3) {
99698
99889
  selectedElement: p3.selectedElement,
99699
99890
  isInspectorPaneOpen: p3.isInspectorPaneOpen,
99700
99891
  onToggleInspector: p3.onToggleInspector,
99701
- onOpenAnimationPanel: p3.onOpenAnimationPanel
99892
+ onOpenAnimationPanel: p3.onOpenAnimationPanel,
99893
+ onAddAnimation: p3.onAddAnimation,
99894
+ onRemoveAnimation: p3.onRemoveAnimation
99702
99895
  }
99703
99896
  ),
99704
99897
  sSlw && /* @__PURE__ */ jsx(
@@ -109882,8 +110075,61 @@ function ViewerToolbarSection(props) {
109882
110075
  onEnterPresenterView,
109883
110076
  onEnterRehearsalMode,
109884
110077
  onOpenSettings,
109885
- onOpenShareDialog
110078
+ onOpenShareDialog,
110079
+ onToggleFormatPainter: onToggleFormatPainterProp
109886
110080
  } = props;
110081
+ const handleAddAnimation = useCallback(
110082
+ (preset, group) => {
110083
+ if (!selectedElement || !activeSlide) {
110084
+ return;
110085
+ }
110086
+ const current = activeSlide.animations ?? [];
110087
+ const existing = current.find((a2) => a2.elementId === selectedElement.id);
110088
+ const presetValue = preset;
110089
+ if (existing) {
110090
+ const updated = current.map(
110091
+ (a2) => a2.elementId === selectedElement.id ? { ...a2, [group]: presetValue } : a2
110092
+ );
110093
+ propertyHandlers.handleUpdateSlide({ animations: updated });
110094
+ } else {
110095
+ const newAnim = {
110096
+ elementId: selectedElement.id,
110097
+ [group]: presetValue,
110098
+ durationMs: 500,
110099
+ order: current.length,
110100
+ trigger: "onClick"
110101
+ };
110102
+ propertyHandlers.handleUpdateSlide({ animations: [...current, newAnim] });
110103
+ }
110104
+ },
110105
+ [selectedElement, activeSlide, propertyHandlers]
110106
+ );
110107
+ const handleRemoveAnimation = useCallback(() => {
110108
+ if (!selectedElement || !activeSlide) {
110109
+ return;
110110
+ }
110111
+ const current = activeSlide.animations ?? [];
110112
+ const filtered = current.filter((a2) => a2.elementId !== selectedElement.id);
110113
+ propertyHandlers.handleUpdateSlide({ animations: filtered });
110114
+ }, [selectedElement, activeSlide, propertyHandlers]);
110115
+ const handleTransitionChange = useCallback(
110116
+ (updates) => {
110117
+ if (!activeSlide) {
110118
+ return;
110119
+ }
110120
+ const current = activeSlide.transition ?? { type: "none" };
110121
+ propertyHandlers.handleUpdateSlide({ transition: { ...current, ...updates } });
110122
+ },
110123
+ [activeSlide, propertyHandlers]
110124
+ );
110125
+ const handleApplyTransitionToAll = useCallback(() => {
110126
+ const transition = activeSlide?.transition;
110127
+ if (!transition) {
110128
+ return;
110129
+ }
110130
+ ops.updateSlides((prev) => prev.map((sl) => ({ ...sl, transition })));
110131
+ history.markDirty();
110132
+ }, [activeSlide, ops, history]);
109887
110133
  return /* @__PURE__ */ jsxs(Fragment, { children: [
109888
110134
  /* @__PURE__ */ jsx(
109889
110135
  Toolbar,
@@ -109902,6 +110148,7 @@ function ViewerToolbarSection(props) {
109902
110148
  redoLabel: history.redoLabel,
109903
110149
  findReplaceOpen: findReplace.findReplaceOpen,
109904
110150
  selectedElement,
110151
+ tableEditorState: s.tableEditorState,
109905
110152
  editTemplateMode: s.editTemplateMode,
109906
110153
  newShapeType: s.newShapeType,
109907
110154
  activeTool: s.activeTool,
@@ -109915,6 +110162,8 @@ function ViewerToolbarSection(props) {
109915
110162
  s.setIsInspectorPaneOpen(true);
109916
110163
  s.setSidebarPanelMode("properties");
109917
110164
  },
110165
+ onAddAnimation: handleAddAnimation,
110166
+ onRemoveAnimation: handleRemoveAnimation,
109918
110167
  onToggleCompactToolbar: () => s.setIsCompactToolbarOpen((p3) => !p3),
109919
110168
  onSetToolbarSection: s.setToolbarSection,
109920
110169
  onZoomIn: zoom.handleZoomIn,
@@ -109966,6 +110215,7 @@ function ViewerToolbarSection(props) {
109966
110215
  onExportGif: exportHandlers.handleExportGif,
109967
110216
  onPackageForSharing: exportHandlers.handlePackageForSharing,
109968
110217
  onOpenShareDialog,
110218
+ onSaveAsPptx: exportHandlers.handleSaveAsPptx,
109969
110219
  onSaveAsPpsx: exportHandlers.handleSaveAsPpsx,
109970
110220
  onSaveAsPptm: exportHandlers.handleSaveAsPptm,
109971
110221
  hasMacros: s.hasMacros,
@@ -110011,7 +110261,7 @@ function ViewerToolbarSection(props) {
110011
110261
  isCommentsPanelOpen: s.isInspectorPaneOpen,
110012
110262
  slideCommentCount: activeSlide?.comments?.length ?? 0,
110013
110263
  formatPainterActive: s.formatPainterActive,
110014
- onToggleFormatPainter: () => s.setFormatPainterActive((p3) => !p3),
110264
+ onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p3) => !p3)),
110015
110265
  isSelectionPaneOpen: s.isSelectionPaneOpen,
110016
110266
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p3) => !p3),
110017
110267
  eyedropperActive: s.eyedropperActive,
@@ -110019,7 +110269,10 @@ function ViewerToolbarSection(props) {
110019
110269
  onOpenSetUpSlideShow: () => dialogs.setIsSetUpSlideShowOpen(true),
110020
110270
  onOpenBroadcastDialog: () => dialogs.setIsBroadcastDialogOpen(true),
110021
110271
  onToggleSubtitles: dialogs.handleToggleSubtitles,
110022
- showSubtitles: Boolean(s.presentationProperties.showSubtitles)
110272
+ showSubtitles: Boolean(s.presentationProperties.showSubtitles),
110273
+ activeSlide,
110274
+ onTransitionChange: handleTransitionChange,
110275
+ onApplyTransitionToAll: handleApplyTransitionToAll
110023
110276
  }
110024
110277
  ),
110025
110278
  s.hasDigitalSignatures && /* @__PURE__ */ jsx("div", { className: "flex items-center px-3 py-1 z-10", children: /* @__PURE__ */ jsx(
@@ -116784,12 +117037,50 @@ function useEditorOperations(input) {
116784
117037
  }),
116785
117038
  [ops, combinedUpdateTextStyle]
116786
117039
  );
117040
+ const copiedFormatRef = useRef(null);
117041
+ const prevFormatPainterRef = useRef(false);
117042
+ useEffect(() => {
117043
+ if (state2.formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
117044
+ copiedFormatRef.current = copyFormatFromElement(selectedElement);
117045
+ } else if (!state2.formatPainterActive) {
117046
+ copiedFormatRef.current = null;
117047
+ }
117048
+ prevFormatPainterRef.current = state2.formatPainterActive;
117049
+ }, [state2.formatPainterActive, selectedElement]);
117050
+ const formatPainterCanvasHandlers = useMemo(
117051
+ () => ({
117052
+ ...canvasHandlers,
117053
+ handleElementClick: (elementId, e2) => {
117054
+ if (state2.formatPainterActive && copiedFormatRef.current) {
117055
+ e2.stopPropagation();
117056
+ const element2 = state2.elementLookup.get(elementId);
117057
+ if (element2) {
117058
+ const updated = applyFormatToElement(element2, copiedFormatRef.current);
117059
+ const updates = {};
117060
+ if (hasShapeProperties(updated)) {
117061
+ updates.shapeStyle = updated.shapeStyle;
117062
+ }
117063
+ if (hasTextProperties(updated)) {
117064
+ updates.textStyle = updated.textStyle;
117065
+ }
117066
+ ops.updateElementById(elementId, updates);
117067
+ }
117068
+ copiedFormatRef.current = null;
117069
+ state2.setFormatPainterActive(false);
117070
+ ops.applySelection(elementId);
117071
+ return;
117072
+ }
117073
+ canvasHandlers.handleElementClick(elementId, e2);
117074
+ }
117075
+ }),
117076
+ [canvasHandlers, ops, state2]
117077
+ );
116787
117078
  return {
116788
117079
  ops: combinedOps,
116789
117080
  sectionOps,
116790
117081
  findReplace,
116791
117082
  comments,
116792
- canvasHandlers,
117083
+ canvasHandlers: formatPainterCanvasHandlers,
116793
117084
  insertHandlers,
116794
117085
  manipulation,
116795
117086
  slideOps,
@@ -120961,6 +121252,9 @@ function useExportSaveAs(input) {
120961
121252
  };
120962
121253
  return handler.save(slidesWithGuides, saveOptions);
120963
121254
  };
121255
+ const handleSaveAsPptx = () => {
121256
+ void handleSaveAsFormat("pptx");
121257
+ };
120964
121258
  const handleSaveAsPpsx = () => {
120965
121259
  void handleSaveAsFormat("ppsx");
120966
121260
  };
@@ -120970,6 +121264,7 @@ function useExportSaveAs(input) {
120970
121264
  return {
120971
121265
  handlePackageForSharing,
120972
121266
  handleSaveAsFormat,
121267
+ handleSaveAsPptx,
120973
121268
  handleSaveAsPpsx,
120974
121269
  handleSaveAsPptm
120975
121270
  };
@@ -121010,7 +121305,13 @@ function useExportHandlers(input) {
121010
121305
  setExportStatusMessage,
121011
121306
  exportAbortRef
121012
121307
  };
121013
- const { handlePackageForSharing, handleSaveAsFormat, handleSaveAsPpsx, handleSaveAsPptm } = useExportSaveAs({
121308
+ const {
121309
+ handlePackageForSharing,
121310
+ handleSaveAsFormat,
121311
+ handleSaveAsPptx,
121312
+ handleSaveAsPpsx,
121313
+ handleSaveAsPptm
121314
+ } = useExportSaveAs({
121014
121315
  slides,
121015
121316
  filePath,
121016
121317
  handlerRef,
@@ -121237,6 +121538,7 @@ function useExportHandlers(input) {
121237
121538
  handleExportGif,
121238
121539
  handlePackageForSharing,
121239
121540
  handleSaveAsFormat,
121541
+ handleSaveAsPptx,
121240
121542
  handleSaveAsPpsx,
121241
121543
  handleSaveAsPptm,
121242
121544
  handleCancelExport,
@@ -123880,7 +124182,14 @@ function CollaborationStatusStrip() {
123880
124182
  if (!collab) {
123881
124183
  return null;
123882
124184
  }
123883
- return /* @__PURE__ */ jsx(CollaborationStatusIndicator, { status: collab.status, connectedCount: collab.connectedCount });
124185
+ return /* @__PURE__ */ jsx(
124186
+ CollaborationStatusIndicator,
124187
+ {
124188
+ status: collab.status,
124189
+ connectedCount: collab.connectedCount,
124190
+ onRetry: collab.retry
124191
+ }
124192
+ );
123884
124193
  }
123885
124194
  function CollaborationDocumentSync({
123886
124195
  slides,
@@ -123952,7 +124261,7 @@ scheduler/cjs/scheduler.development.js:
123952
124261
  * LICENSE file in the root directory of this source tree.
123953
124262
  *)
123954
124263
 
123955
- @react-three/fiber/dist/events-5a94e5eb.esm.js:
124264
+ @react-three/fiber/dist/events-760a1017.esm.js:
123956
124265
  (**
123957
124266
  * @license React
123958
124267
  * react-reconciler-constants.production.js