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
@@ -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, useMemo42 = 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, useMemo42 = 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();
@@ -70373,12 +70385,40 @@ function toCssGradientStop(stop) {
70373
70385
  const posStr = pos === Math.round(pos) ? `${pos}%` : `${pos.toFixed(1)}%`;
70374
70386
  return `${color} ${posStr}`;
70375
70387
  }
70388
+ function computeGradientCenter(fillToRect, focalPoint) {
70389
+ if (fillToRect) {
70390
+ const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
70391
+ let cx = (l2 + (1 - r2)) / 2 * 100;
70392
+ let cy = (t2 + (1 - b2)) / 2 * 100;
70393
+ if (focalPoint) {
70394
+ const fpX = focalPoint.x * 100;
70395
+ const fpY = focalPoint.y * 100;
70396
+ cx = (cx + fpX) / 2;
70397
+ cy = (cy + fpY) / 2;
70398
+ }
70399
+ return { cx, cy };
70400
+ }
70401
+ if (focalPoint) {
70402
+ return { cx: focalPoint.x * 100, cy: focalPoint.y * 100 };
70403
+ }
70404
+ return { cx: 50, cy: 50 };
70405
+ }
70406
+ function buildCirclePathGradient(stops, focalPoint, fillToRect) {
70407
+ const stopStr = stops.map(toCssGradientStop).join(", ");
70408
+ const { cx, cy } = computeGradientCenter(fillToRect, focalPoint);
70409
+ const posX = Math.round(cx) === 50 && !focalPoint && !fillToRect ? "center" : `${Math.round(cx)}%`;
70410
+ const posY = Math.round(cy) === 50 && !focalPoint && !fillToRect ? "center" : `${Math.round(cy)}%`;
70411
+ if (fillToRect) {
70412
+ const radius = Math.max(cx, 100 - cx, cy, 100 - cy);
70413
+ return `radial-gradient(circle ${Math.round(radius)}% at ${posX} ${posY}, ${stopStr})`;
70414
+ }
70415
+ return `radial-gradient(circle at ${posX} ${posY}, ${stopStr})`;
70416
+ }
70376
70417
  function buildRectPathGradient(stops, focalPoint, fillToRect) {
70377
70418
  const stopStr = stops.map(toCssGradientStop).join(", ");
70378
70419
  if (fillToRect) {
70379
70420
  const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
70380
- const cx = (l2 + (1 - r2)) / 2 * 100;
70381
- const cy = (t2 + (1 - b2)) / 2 * 100;
70421
+ const { cx, cy } = computeGradientCenter(fillToRect, focalPoint);
70382
70422
  const semiX = Math.max(cx, 100 - cx);
70383
70423
  const semiY = Math.max(cy, 100 - cy);
70384
70424
  const posX2 = `${Math.round(cx)}%`;
@@ -70401,19 +70441,27 @@ function buildShapePathGradient(stops, focalPoint, fillToRect) {
70401
70441
  const stopStr = stops.map(toCssGradientStop).join(", ");
70402
70442
  if (fillToRect) {
70403
70443
  const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
70404
- const cx = (l2 + (1 - r2)) / 2 * 100;
70405
- const cy = (t2 + (1 - b2)) / 2 * 100;
70406
- const posX2 = `${Math.round(cx)}%`;
70407
- const posY2 = `${Math.round(cy)}%`;
70444
+ const { cx: cx2, cy: cy2 } = computeGradientCenter(fillToRect, focalPoint);
70445
+ const posX2 = `${Math.round(cx2)}%`;
70446
+ const posY2 = `${Math.round(cy2)}%`;
70447
+ const semiX = Math.max(cx2, 100 - cx2);
70448
+ const semiY = Math.max(cy2, 100 - cy2);
70408
70449
  const innerHalfW = (1 - l2 - r2) / 2 * 100;
70409
70450
  const innerHalfH = (1 - t2 - b2) / 2 * 100;
70410
70451
  if (innerHalfW > 0.5 && innerHalfH > 0.5 && Math.abs(innerHalfW - innerHalfH) > 1) {
70411
- return `radial-gradient(${Math.round(innerHalfW)}% ${Math.round(innerHalfH)}% at ${posX2} ${posY2}, ${stopStr})`;
70452
+ const aspect2 = innerHalfW / innerHalfH;
70453
+ const adjustedSemiX = Math.round(Math.max(semiX, semiY * aspect2));
70454
+ const adjustedSemiY = Math.round(Math.max(semiY, semiX / aspect2));
70455
+ return `radial-gradient(${adjustedSemiX}% ${adjustedSemiY}% at ${posX2} ${posY2}, ${stopStr})`;
70456
+ }
70457
+ if (semiX > 0.5 || semiY > 0.5) {
70458
+ return `radial-gradient(${Math.round(semiX)}% ${Math.round(semiY)}% at ${posX2} ${posY2}, ${stopStr})`;
70412
70459
  }
70413
70460
  return `radial-gradient(farthest-side at ${posX2} ${posY2}, ${stopStr})`;
70414
70461
  }
70415
- const posX = focalPoint ? `${Math.round(focalPoint.x * 100)}%` : "center";
70416
- const posY = focalPoint ? `${Math.round(focalPoint.y * 100)}%` : "center";
70462
+ const { cx, cy } = computeGradientCenter(void 0, focalPoint);
70463
+ const posX = focalPoint ? `${Math.round(cx)}%` : "center";
70464
+ const posY = focalPoint ? `${Math.round(cy)}%` : "center";
70417
70465
  return `radial-gradient(farthest-side at ${posX} ${posY}, ${stopStr})`;
70418
70466
  }
70419
70467
  function buildCssGradientFromShapeStyle(style) {
@@ -70435,9 +70483,7 @@ function buildCssGradientFromShapeStyle(style) {
70435
70483
  if (pathType === "shape") {
70436
70484
  return buildShapePathGradient(stops, fp, ftr);
70437
70485
  }
70438
- const posX = fp ? `${Math.round(fp.x * 100)}%` : "center";
70439
- const posY = fp ? `${Math.round(fp.y * 100)}%` : "center";
70440
- return `radial-gradient(circle at ${posX} ${posY}, ${stops.map(toCssGradientStop).join(", ")})`;
70486
+ return buildCirclePathGradient(stops, fp, ftr);
70441
70487
  }
70442
70488
  const normalizedAngle = typeof style.fillGradientAngle === "number" && Number.isFinite(style.fillGradientAngle) ? style.fillGradientAngle : 90;
70443
70489
  return `linear-gradient(${Math.round(normalizedAngle)}deg, ${stops.map(toCssGradientStop).join(", ")})`;
@@ -70836,8 +70882,10 @@ function getTextStyleForElement(element2, fallbackColor) {
70836
70882
  const verticalDirection = toCssVerticalDirection(element2.textStyle?.textDirection);
70837
70883
  const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
70838
70884
  const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
70885
+ const hasSegments = (element2.textSegments?.length ?? 0) > 0;
70839
70886
  return {
70840
70887
  color: resolvedTextColor,
70888
+ backgroundColor: !hasSegments && element2.textStyle?.highlightColor ? normalizeHexColor(element2.textStyle.highlightColor, void 0) : void 0,
70841
70889
  textAlign: (() => {
70842
70890
  const a2 = element2.textStyle?.align;
70843
70891
  if (a2 === "justLow" || a2 === "dist" || a2 === "thaiDist") {
@@ -84911,6 +84959,79 @@ function comparePresentation(base, compare) {
84911
84959
  unchangedCount
84912
84960
  };
84913
84961
  }
84962
+ function copyFormatFromElement(element2) {
84963
+ const result = {};
84964
+ if (hasShapeProperties(element2) && element2.shapeStyle) {
84965
+ const s = element2.shapeStyle;
84966
+ result.shapeStyle = {
84967
+ fillColor: s.fillColor,
84968
+ fillMode: s.fillMode,
84969
+ fillGradient: s.fillGradient,
84970
+ fillGradientStops: s.fillGradientStops ? [...s.fillGradientStops] : void 0,
84971
+ fillGradientAngle: s.fillGradientAngle,
84972
+ fillGradientType: s.fillGradientType,
84973
+ fillOpacity: s.fillOpacity,
84974
+ fillPatternPreset: s.fillPatternPreset,
84975
+ fillPatternBackgroundColor: s.fillPatternBackgroundColor,
84976
+ strokeColor: s.strokeColor,
84977
+ strokeWidth: s.strokeWidth,
84978
+ strokeOpacity: s.strokeOpacity,
84979
+ strokeDash: s.strokeDash,
84980
+ lineJoin: s.lineJoin,
84981
+ lineCap: s.lineCap,
84982
+ shadowColor: s.shadowColor,
84983
+ shadowBlur: s.shadowBlur,
84984
+ shadowOffsetX: s.shadowOffsetX,
84985
+ shadowOffsetY: s.shadowOffsetY,
84986
+ shadowOpacity: s.shadowOpacity,
84987
+ glowColor: s.glowColor,
84988
+ glowRadius: s.glowRadius,
84989
+ glowOpacity: s.glowOpacity,
84990
+ softEdgeRadius: s.softEdgeRadius
84991
+ };
84992
+ }
84993
+ if (hasTextProperties(element2) && element2.textStyle) {
84994
+ const t2 = element2.textStyle;
84995
+ result.textStyle = {
84996
+ fontFamily: t2.fontFamily,
84997
+ fontSize: t2.fontSize,
84998
+ bold: t2.bold,
84999
+ italic: t2.italic,
85000
+ underline: t2.underline,
85001
+ underlineStyle: t2.underlineStyle,
85002
+ strikethrough: t2.strikethrough,
85003
+ color: t2.color,
85004
+ align: t2.align,
85005
+ lineSpacing: t2.lineSpacing,
85006
+ paragraphSpacingBefore: t2.paragraphSpacingBefore,
85007
+ paragraphSpacingAfter: t2.paragraphSpacingAfter,
85008
+ textCaps: t2.textCaps
85009
+ };
85010
+ }
85011
+ return result;
85012
+ }
85013
+ function applyFormatToElement(element2, format) {
85014
+ let updated = { ...element2 };
85015
+ if (format.shapeStyle && hasShapeProperties(updated)) {
85016
+ updated = {
85017
+ ...updated,
85018
+ shapeStyle: {
85019
+ ...updated.shapeStyle,
85020
+ ...format.shapeStyle
85021
+ }
85022
+ };
85023
+ }
85024
+ if (format.textStyle && hasTextProperties(updated)) {
85025
+ updated = {
85026
+ ...updated,
85027
+ textStyle: {
85028
+ ...updated.textStyle,
85029
+ ...format.textStyle
85030
+ }
85031
+ };
85032
+ }
85033
+ return updated;
85034
+ }
84914
85035
 
84915
85036
  // src/viewer/utils/animation-preview.ts
84916
85037
  var PRESET_TO_EFFECT = {
@@ -91287,13 +91408,24 @@ function usePresenceTracking({
91287
91408
  }, []);
91288
91409
  return { remoteUsers, broadcastPresence };
91289
91410
  }
91411
+ var CONNECTION_TIMEOUT_MS = 3e4;
91290
91412
  function useYjsProvider({ config }) {
91291
91413
  const [status, setStatus] = useState("disconnected");
91292
91414
  const [awareness, setAwareness] = useState(null);
91293
91415
  const [doc2, setDoc] = useState(null);
91294
91416
  const [clientId, setClientId] = useState(null);
91295
91417
  const cleanupRef = useRef(null);
91418
+ const timeoutRef = useRef(null);
91419
+ const teardown = useCallback(() => {
91420
+ if (timeoutRef.current) {
91421
+ clearTimeout(timeoutRef.current);
91422
+ timeoutRef.current = null;
91423
+ }
91424
+ cleanupRef.current?.();
91425
+ cleanupRef.current = null;
91426
+ }, []);
91296
91427
  const init = useCallback(async () => {
91428
+ teardown();
91297
91429
  const roomId = validateRoomId(config.roomId);
91298
91430
  setStatus("connecting");
91299
91431
  try {
@@ -91308,8 +91440,14 @@ function useYjsProvider({ config }) {
91308
91440
  params: config.authToken ? { token: config.authToken } : void 0
91309
91441
  }
91310
91442
  );
91443
+ let connected = false;
91311
91444
  const handleStatus = (event) => {
91312
91445
  if (event.status === "connected") {
91446
+ connected = true;
91447
+ if (timeoutRef.current) {
91448
+ clearTimeout(timeoutRef.current);
91449
+ timeoutRef.current = null;
91450
+ }
91313
91451
  setStatus("connected");
91314
91452
  } else if (event.status === "disconnected") {
91315
91453
  setStatus("disconnected");
@@ -91317,8 +91455,24 @@ function useYjsProvider({ config }) {
91317
91455
  };
91318
91456
  provider.on("status", handleStatus);
91319
91457
  if (provider.wsconnected) {
91458
+ connected = true;
91320
91459
  setStatus("connected");
91321
91460
  }
91461
+ if (!connected) {
91462
+ timeoutRef.current = setTimeout(() => {
91463
+ timeoutRef.current = null;
91464
+ if (!connected) {
91465
+ provider.off("status", handleStatus);
91466
+ provider.destroy();
91467
+ yDoc.destroy();
91468
+ setDoc(null);
91469
+ setAwareness(null);
91470
+ setClientId(null);
91471
+ cleanupRef.current = null;
91472
+ setStatus("error");
91473
+ }
91474
+ }, CONNECTION_TIMEOUT_MS);
91475
+ }
91322
91476
  setDoc(yDoc);
91323
91477
  setAwareness(provider.awareness);
91324
91478
  setClientId(provider.awareness.clientID);
@@ -91338,15 +91492,15 @@ function useYjsProvider({ config }) {
91338
91492
  );
91339
91493
  setStatus("error");
91340
91494
  }
91341
- }, [config.roomId, config.serverUrl, config.authToken]);
91495
+ }, [config.roomId, config.serverUrl, config.authToken, teardown]);
91342
91496
  useEffect(() => {
91343
91497
  init();
91344
- return () => {
91345
- cleanupRef.current?.();
91346
- cleanupRef.current = null;
91347
- };
91498
+ return teardown;
91499
+ }, [init, teardown]);
91500
+ const retry = useCallback(() => {
91501
+ init();
91348
91502
  }, [init]);
91349
- return { status, awareness, doc: doc2, clientId };
91503
+ return { status, awareness, doc: doc2, clientId, retry };
91350
91504
  }
91351
91505
 
91352
91506
  // src/viewer/hooks/collaboration/useCollaborativeState.ts
@@ -91356,7 +91510,7 @@ function useCollaborativeState({
91356
91510
  canvasHeight
91357
91511
  }) {
91358
91512
  const userColor = sanitizeColor(config.userColor, "#6366f1");
91359
- const { status, awareness, doc: doc2, clientId } = useYjsProvider({ config });
91513
+ const { status, awareness, doc: doc2, clientId, retry } = useYjsProvider({ config });
91360
91514
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
91361
91515
  awareness,
91362
91516
  localClientId: clientId,
@@ -91374,7 +91528,8 @@ function useCollaborativeState({
91374
91528
  broadcastPresence,
91375
91529
  connectedCount,
91376
91530
  config,
91377
- doc: doc2
91531
+ doc: doc2,
91532
+ retry
91378
91533
  };
91379
91534
  }
91380
91535
  var CollaborationContext = createContext(null);
@@ -91585,7 +91740,8 @@ var STATUS_STYLES = {
91585
91740
  };
91586
91741
  function CollaborationStatusIndicator({
91587
91742
  status,
91588
- connectedCount
91743
+ connectedCount,
91744
+ onRetry
91589
91745
  }) {
91590
91746
  const { t: t2 } = useTranslation();
91591
91747
  const style = STATUS_STYLES[status];
@@ -91600,7 +91756,17 @@ function CollaborationStatusIndicator({
91600
91756
  }),
91601
91757
  children: [
91602
91758
  /* @__PURE__ */ jsx("span", { className: `inline-block w-2 h-2 rounded-full ${style.dot}`, "aria-hidden": "true" }),
91603
- /* @__PURE__ */ jsx("span", { className: `text-[10px] ${style.text}`, children: status === "connected" ? t2("pptx.collaboration.userCount", { count: connectedCount }) : t2(`pptx.collaboration.status.${status}`) })
91759
+ /* @__PURE__ */ jsx("span", { className: `text-[10px] ${style.text}`, children: status === "connected" ? t2("pptx.collaboration.userCount", { count: connectedCount }) : t2(`pptx.collaboration.status.${status}`) }),
91760
+ status === "error" && onRetry && /* @__PURE__ */ jsx(
91761
+ "button",
91762
+ {
91763
+ type: "button",
91764
+ onClick: onRetry,
91765
+ className: "text-[10px] text-blue-400 hover:text-blue-300 underline underline-offset-2 transition-colors",
91766
+ "aria-label": t2("pptx.collaboration.retry"),
91767
+ children: t2("pptx.collaboration.retry")
91768
+ }
91769
+ )
91604
91770
  ]
91605
91771
  }
91606
91772
  );
@@ -97230,6 +97396,11 @@ var OV = [
97230
97396
  l: "Package for Sharing",
97231
97397
  i: /* @__PURE__ */ jsx(LuFolderOpen, { className: `${ics} text-muted-foreground` })
97232
97398
  },
97399
+ {
97400
+ k: "pptx",
97401
+ l: "Save as Presentation (.pptx)",
97402
+ i: /* @__PURE__ */ jsx(LuDownload, { className: `${ics} text-muted-foreground` })
97403
+ },
97233
97404
  {
97234
97405
  k: "ppsx",
97235
97406
  l: "Save as Slide Show (.ppsx)",
@@ -97379,6 +97550,10 @@ function AnimationsSection(p3) {
97379
97550
  {
97380
97551
  type: "button",
97381
97552
  disabled,
97553
+ onClick: () => p3.onAddAnimation?.(
97554
+ item.value,
97555
+ group.group.toLowerCase()
97556
+ ),
97382
97557
  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",
97383
97558
  title: t2("pptx.animations.applyAnimation", {
97384
97559
  name: t2(`pptx.animations.preset.${item.value}`)
@@ -97395,6 +97570,7 @@ function AnimationsSection(p3) {
97395
97570
  {
97396
97571
  type: "button",
97397
97572
  disabled,
97573
+ onClick: p3.onRemoveAnimation,
97398
97574
  className: pill,
97399
97575
  title: t2("pptx.animations.removeTooltip"),
97400
97576
  children: [
@@ -97804,6 +97980,10 @@ function DrawSection(p3) {
97804
97980
  }
97805
97981
  function FileSection(p3) {
97806
97982
  return /* @__PURE__ */ jsxs(Fragment, { children: [
97983
+ /* @__PURE__ */ jsxs("button", { onClick: p3.onSaveAsPptx, className: pill, title: "Save as Presentation (.pptx)", children: [
97984
+ /* @__PURE__ */ jsx(LuDownload, { className: ic2 }),
97985
+ "Save .pptx"
97986
+ ] }),
97807
97987
  /* @__PURE__ */ jsxs("button", { onClick: p3.onSaveAsPpsx, className: pill, title: "Save as Slide Show (.ppsx)", children: [
97808
97988
  /* @__PURE__ */ jsx(LuPlay, { className: ic2 }),
97809
97989
  "Save .ppsx"
@@ -98529,6 +98709,19 @@ function SlideShowSection(p3) {
98529
98709
  )
98530
98710
  ] });
98531
98711
  }
98712
+ function getEffectiveTextStyle(element2, tableEditorState) {
98713
+ if (!element2) {
98714
+ return void 0;
98715
+ }
98716
+ if (hasTextProperties(element2)) {
98717
+ return element2.textStyle;
98718
+ }
98719
+ if (element2.type === "table" && tableEditorState && element2.tableData) {
98720
+ const cell = element2.tableData.rows[tableEditorState.rowIndex]?.cells[tableEditorState.columnIndex];
98721
+ return cell?.style;
98722
+ }
98723
+ return void 0;
98724
+ }
98532
98725
  var FONT_COLOR_PRESETS = [
98533
98726
  "#000000",
98534
98727
  "#ffffff",
@@ -98559,7 +98752,8 @@ function TextSection(p3) {
98559
98752
  const isTextEl = hasSel && p3.selectedElement !== null && hasTextProperties(p3.selectedElement);
98560
98753
  const isTable = hasSel && p3.selectedElement?.type === "table";
98561
98754
  const canFormat = isTextEl || isTable;
98562
- const currentColor = isTextEl && p3.selectedElement && hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.color ?? p3.selectedElement.textStyle?.color ?? "#000000" : "#000000";
98755
+ const effectiveTs = getEffectiveTextStyle(p3.selectedElement, p3.tableEditorState);
98756
+ const currentColor = isTextEl && p3.selectedElement && hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.color ?? p3.selectedElement.textStyle?.color ?? "#000000" : effectiveTs?.color ?? "#000000";
98563
98757
  const currentHighlight = isTextEl && p3.selectedElement && hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.highlightColor ?? p3.selectedElement.textStyle?.highlightColor ?? "#ffff00" : "#ffff00";
98564
98758
  const colorInputRef = useRef(null);
98565
98759
  const highlightInputRef = useRef(null);
@@ -98589,7 +98783,7 @@ function TextSection(p3) {
98589
98783
  if (!canFormat || !p3.selectedElement) {
98590
98784
  return;
98591
98785
  }
98592
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98786
+ const ts = effectiveTs;
98593
98787
  switch (b2.t) {
98594
98788
  case "Bold":
98595
98789
  p3.onUpdateTextStyle({ bold: !ts?.bold });
@@ -98634,8 +98828,7 @@ function TextSection(p3) {
98634
98828
  if (!canFormat || !p3.selectedElement) {
98635
98829
  return;
98636
98830
  }
98637
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98638
- const current = ts?.fontSize ?? 18;
98831
+ const current = effectiveTs?.fontSize ?? 18;
98639
98832
  p3.onUpdateTextStyle({ fontSize: current + 2 });
98640
98833
  },
98641
98834
  className: gB,
@@ -98653,8 +98846,7 @@ function TextSection(p3) {
98653
98846
  if (!canFormat || !p3.selectedElement) {
98654
98847
  return;
98655
98848
  }
98656
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98657
- const current = ts?.fontSize ?? 18;
98849
+ const current = effectiveTs?.fontSize ?? 18;
98658
98850
  p3.onUpdateTextStyle({ fontSize: Math.max(1, current - 2) });
98659
98851
  },
98660
98852
  className: gB,
@@ -98825,9 +99017,8 @@ function TextSection(p3) {
98825
99017
  if (!canFormat || !p3.selectedElement) {
98826
99018
  return;
98827
99019
  }
98828
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98829
99020
  p3.onUpdateTextStyle({
98830
- listType: ts?.listType === "bullet" ? "none" : "bullet"
99021
+ listType: effectiveTs?.listType === "bullet" ? "none" : "bullet"
98831
99022
  });
98832
99023
  },
98833
99024
  className: gB,
@@ -98845,9 +99036,8 @@ function TextSection(p3) {
98845
99036
  if (!canFormat || !p3.selectedElement) {
98846
99037
  return;
98847
99038
  }
98848
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98849
99039
  p3.onUpdateTextStyle({
98850
- listType: ts?.listType === "numbered" ? "none" : "numbered"
99040
+ listType: effectiveTs?.listType === "numbered" ? "none" : "numbered"
98851
99041
  });
98852
99042
  },
98853
99043
  className: gL,
@@ -98867,8 +99057,7 @@ function TextSection(p3) {
98867
99057
  if (!canFormat || !p3.selectedElement) {
98868
99058
  return;
98869
99059
  }
98870
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98871
- const current = ts?.paragraphMarginLeft ?? 0;
99060
+ const current = effectiveTs?.paragraphMarginLeft ?? 0;
98872
99061
  p3.onUpdateTextStyle({
98873
99062
  paragraphMarginLeft: Math.max(0, current - 24)
98874
99063
  });
@@ -98888,8 +99077,7 @@ function TextSection(p3) {
98888
99077
  if (!canFormat || !p3.selectedElement) {
98889
99078
  return;
98890
99079
  }
98891
- const ts = hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98892
- const current = ts?.paragraphMarginLeft ?? 0;
99080
+ const current = effectiveTs?.paragraphMarginLeft ?? 0;
98893
99081
  p3.onUpdateTextStyle({
98894
99082
  paragraphMarginLeft: current + 24
98895
99083
  });
@@ -99226,6 +99414,7 @@ function OverflowMenu(p3) {
99226
99414
  video: p3.onExportVideo,
99227
99415
  gif: p3.onExportGif,
99228
99416
  package: p3.onPackageForSharing,
99417
+ pptx: p3.onSaveAsPptx,
99229
99418
  ppsx: p3.onSaveAsPpsx,
99230
99419
  pptm: p3.onSaveAsPptm,
99231
99420
  print: p3.onPrint,
@@ -99673,6 +99862,7 @@ function Toolbar(p3) {
99673
99862
  onExportVideo: p3.onExportVideo,
99674
99863
  onExportGif: p3.onExportGif,
99675
99864
  onPackageForSharing: p3.onPackageForSharing,
99865
+ onSaveAsPptx: p3.onSaveAsPptx,
99676
99866
  onSaveAsPpsx: p3.onSaveAsPpsx,
99677
99867
  onSaveAsPptm: p3.onSaveAsPptm,
99678
99868
  hasMacros: p3.hasMacros,
@@ -99722,6 +99912,7 @@ function Toolbar(p3) {
99722
99912
  {
99723
99913
  canEdit: p3.canEdit,
99724
99914
  selectedElement: p3.selectedElement,
99915
+ tableEditorState: p3.tableEditorState,
99725
99916
  onUpdateTextStyle: p3.onUpdateTextStyle
99726
99917
  }
99727
99918
  ),
@@ -99782,7 +99973,9 @@ function Toolbar(p3) {
99782
99973
  selectedElement: p3.selectedElement,
99783
99974
  isInspectorPaneOpen: p3.isInspectorPaneOpen,
99784
99975
  onToggleInspector: p3.onToggleInspector,
99785
- onOpenAnimationPanel: p3.onOpenAnimationPanel
99976
+ onOpenAnimationPanel: p3.onOpenAnimationPanel,
99977
+ onAddAnimation: p3.onAddAnimation,
99978
+ onRemoveAnimation: p3.onRemoveAnimation
99786
99979
  }
99787
99980
  ),
99788
99981
  sSlw && /* @__PURE__ */ jsx(
@@ -109966,8 +110159,61 @@ function ViewerToolbarSection(props) {
109966
110159
  onEnterPresenterView,
109967
110160
  onEnterRehearsalMode,
109968
110161
  onOpenSettings,
109969
- onOpenShareDialog
110162
+ onOpenShareDialog,
110163
+ onToggleFormatPainter: onToggleFormatPainterProp
109970
110164
  } = props;
110165
+ const handleAddAnimation = useCallback(
110166
+ (preset, group) => {
110167
+ if (!selectedElement || !activeSlide) {
110168
+ return;
110169
+ }
110170
+ const current = activeSlide.animations ?? [];
110171
+ const existing = current.find((a2) => a2.elementId === selectedElement.id);
110172
+ const presetValue = preset;
110173
+ if (existing) {
110174
+ const updated = current.map(
110175
+ (a2) => a2.elementId === selectedElement.id ? { ...a2, [group]: presetValue } : a2
110176
+ );
110177
+ propertyHandlers.handleUpdateSlide({ animations: updated });
110178
+ } else {
110179
+ const newAnim = {
110180
+ elementId: selectedElement.id,
110181
+ [group]: presetValue,
110182
+ durationMs: 500,
110183
+ order: current.length,
110184
+ trigger: "onClick"
110185
+ };
110186
+ propertyHandlers.handleUpdateSlide({ animations: [...current, newAnim] });
110187
+ }
110188
+ },
110189
+ [selectedElement, activeSlide, propertyHandlers]
110190
+ );
110191
+ const handleRemoveAnimation = useCallback(() => {
110192
+ if (!selectedElement || !activeSlide) {
110193
+ return;
110194
+ }
110195
+ const current = activeSlide.animations ?? [];
110196
+ const filtered = current.filter((a2) => a2.elementId !== selectedElement.id);
110197
+ propertyHandlers.handleUpdateSlide({ animations: filtered });
110198
+ }, [selectedElement, activeSlide, propertyHandlers]);
110199
+ const handleTransitionChange = useCallback(
110200
+ (updates) => {
110201
+ if (!activeSlide) {
110202
+ return;
110203
+ }
110204
+ const current = activeSlide.transition ?? { type: "none" };
110205
+ propertyHandlers.handleUpdateSlide({ transition: { ...current, ...updates } });
110206
+ },
110207
+ [activeSlide, propertyHandlers]
110208
+ );
110209
+ const handleApplyTransitionToAll = useCallback(() => {
110210
+ const transition = activeSlide?.transition;
110211
+ if (!transition) {
110212
+ return;
110213
+ }
110214
+ ops.updateSlides((prev) => prev.map((sl) => ({ ...sl, transition })));
110215
+ history.markDirty();
110216
+ }, [activeSlide, ops, history]);
109971
110217
  return /* @__PURE__ */ jsxs(Fragment, { children: [
109972
110218
  /* @__PURE__ */ jsx(
109973
110219
  Toolbar,
@@ -109986,6 +110232,7 @@ function ViewerToolbarSection(props) {
109986
110232
  redoLabel: history.redoLabel,
109987
110233
  findReplaceOpen: findReplace.findReplaceOpen,
109988
110234
  selectedElement,
110235
+ tableEditorState: s.tableEditorState,
109989
110236
  editTemplateMode: s.editTemplateMode,
109990
110237
  newShapeType: s.newShapeType,
109991
110238
  activeTool: s.activeTool,
@@ -109999,6 +110246,8 @@ function ViewerToolbarSection(props) {
109999
110246
  s.setIsInspectorPaneOpen(true);
110000
110247
  s.setSidebarPanelMode("properties");
110001
110248
  },
110249
+ onAddAnimation: handleAddAnimation,
110250
+ onRemoveAnimation: handleRemoveAnimation,
110002
110251
  onToggleCompactToolbar: () => s.setIsCompactToolbarOpen((p3) => !p3),
110003
110252
  onSetToolbarSection: s.setToolbarSection,
110004
110253
  onZoomIn: zoom.handleZoomIn,
@@ -110050,6 +110299,7 @@ function ViewerToolbarSection(props) {
110050
110299
  onExportGif: exportHandlers.handleExportGif,
110051
110300
  onPackageForSharing: exportHandlers.handlePackageForSharing,
110052
110301
  onOpenShareDialog,
110302
+ onSaveAsPptx: exportHandlers.handleSaveAsPptx,
110053
110303
  onSaveAsPpsx: exportHandlers.handleSaveAsPpsx,
110054
110304
  onSaveAsPptm: exportHandlers.handleSaveAsPptm,
110055
110305
  hasMacros: s.hasMacros,
@@ -110095,7 +110345,7 @@ function ViewerToolbarSection(props) {
110095
110345
  isCommentsPanelOpen: s.isInspectorPaneOpen,
110096
110346
  slideCommentCount: activeSlide?.comments?.length ?? 0,
110097
110347
  formatPainterActive: s.formatPainterActive,
110098
- onToggleFormatPainter: () => s.setFormatPainterActive((p3) => !p3),
110348
+ onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p3) => !p3)),
110099
110349
  isSelectionPaneOpen: s.isSelectionPaneOpen,
110100
110350
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p3) => !p3),
110101
110351
  eyedropperActive: s.eyedropperActive,
@@ -110103,7 +110353,10 @@ function ViewerToolbarSection(props) {
110103
110353
  onOpenSetUpSlideShow: () => dialogs.setIsSetUpSlideShowOpen(true),
110104
110354
  onOpenBroadcastDialog: () => dialogs.setIsBroadcastDialogOpen(true),
110105
110355
  onToggleSubtitles: dialogs.handleToggleSubtitles,
110106
- showSubtitles: Boolean(s.presentationProperties.showSubtitles)
110356
+ showSubtitles: Boolean(s.presentationProperties.showSubtitles),
110357
+ activeSlide,
110358
+ onTransitionChange: handleTransitionChange,
110359
+ onApplyTransitionToAll: handleApplyTransitionToAll
110107
110360
  }
110108
110361
  ),
110109
110362
  s.hasDigitalSignatures && /* @__PURE__ */ jsx("div", { className: "flex items-center px-3 py-1 z-10", children: /* @__PURE__ */ jsx(
@@ -116897,12 +117150,50 @@ function useEditorOperations(input) {
116897
117150
  }),
116898
117151
  [ops, combinedUpdateTextStyle]
116899
117152
  );
117153
+ const copiedFormatRef = useRef(null);
117154
+ const prevFormatPainterRef = useRef(false);
117155
+ useEffect(() => {
117156
+ if (state2.formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
117157
+ copiedFormatRef.current = copyFormatFromElement(selectedElement);
117158
+ } else if (!state2.formatPainterActive) {
117159
+ copiedFormatRef.current = null;
117160
+ }
117161
+ prevFormatPainterRef.current = state2.formatPainterActive;
117162
+ }, [state2.formatPainterActive, selectedElement]);
117163
+ const formatPainterCanvasHandlers = useMemo(
117164
+ () => ({
117165
+ ...canvasHandlers,
117166
+ handleElementClick: (elementId, e2) => {
117167
+ if (state2.formatPainterActive && copiedFormatRef.current) {
117168
+ e2.stopPropagation();
117169
+ const element2 = state2.elementLookup.get(elementId);
117170
+ if (element2) {
117171
+ const updated = applyFormatToElement(element2, copiedFormatRef.current);
117172
+ const updates = {};
117173
+ if (hasShapeProperties(updated)) {
117174
+ updates.shapeStyle = updated.shapeStyle;
117175
+ }
117176
+ if (hasTextProperties(updated)) {
117177
+ updates.textStyle = updated.textStyle;
117178
+ }
117179
+ ops.updateElementById(elementId, updates);
117180
+ }
117181
+ copiedFormatRef.current = null;
117182
+ state2.setFormatPainterActive(false);
117183
+ ops.applySelection(elementId);
117184
+ return;
117185
+ }
117186
+ canvasHandlers.handleElementClick(elementId, e2);
117187
+ }
117188
+ }),
117189
+ [canvasHandlers, ops, state2]
117190
+ );
116900
117191
  return {
116901
117192
  ops: combinedOps,
116902
117193
  sectionOps,
116903
117194
  findReplace,
116904
117195
  comments,
116905
- canvasHandlers,
117196
+ canvasHandlers: formatPainterCanvasHandlers,
116906
117197
  insertHandlers,
116907
117198
  manipulation,
116908
117199
  slideOps,
@@ -121101,6 +121392,9 @@ function useExportSaveAs(input) {
121101
121392
  };
121102
121393
  return handler.save(slidesWithGuides, saveOptions);
121103
121394
  };
121395
+ const handleSaveAsPptx = () => {
121396
+ void handleSaveAsFormat("pptx");
121397
+ };
121104
121398
  const handleSaveAsPpsx = () => {
121105
121399
  void handleSaveAsFormat("ppsx");
121106
121400
  };
@@ -121110,6 +121404,7 @@ function useExportSaveAs(input) {
121110
121404
  return {
121111
121405
  handlePackageForSharing,
121112
121406
  handleSaveAsFormat,
121407
+ handleSaveAsPptx,
121113
121408
  handleSaveAsPpsx,
121114
121409
  handleSaveAsPptm
121115
121410
  };
@@ -121150,7 +121445,13 @@ function useExportHandlers(input) {
121150
121445
  setExportStatusMessage,
121151
121446
  exportAbortRef
121152
121447
  };
121153
- const { handlePackageForSharing, handleSaveAsFormat, handleSaveAsPpsx, handleSaveAsPptm } = useExportSaveAs({
121448
+ const {
121449
+ handlePackageForSharing,
121450
+ handleSaveAsFormat,
121451
+ handleSaveAsPptx,
121452
+ handleSaveAsPpsx,
121453
+ handleSaveAsPptm
121454
+ } = useExportSaveAs({
121154
121455
  slides,
121155
121456
  filePath,
121156
121457
  handlerRef,
@@ -121377,6 +121678,7 @@ function useExportHandlers(input) {
121377
121678
  handleExportGif,
121378
121679
  handlePackageForSharing,
121379
121680
  handleSaveAsFormat,
121681
+ handleSaveAsPptx,
121380
121682
  handleSaveAsPpsx,
121381
121683
  handleSaveAsPptm,
121382
121684
  handleCancelExport,
@@ -124020,7 +124322,14 @@ function CollaborationStatusStrip() {
124020
124322
  if (!collab) {
124021
124323
  return null;
124022
124324
  }
124023
- return /* @__PURE__ */ jsx(CollaborationStatusIndicator, { status: collab.status, connectedCount: collab.connectedCount });
124325
+ return /* @__PURE__ */ jsx(
124326
+ CollaborationStatusIndicator,
124327
+ {
124328
+ status: collab.status,
124329
+ connectedCount: collab.connectedCount,
124330
+ onRetry: collab.retry
124331
+ }
124332
+ );
124024
124333
  }
124025
124334
  function CollaborationDocumentSync({
124026
124335
  slides,
@@ -124147,7 +124456,7 @@ scheduler/cjs/scheduler.development.js:
124147
124456
  * LICENSE file in the root directory of this source tree.
124148
124457
  *)
124149
124458
 
124150
- @react-three/fiber/dist/events-5a94e5eb.esm.js:
124459
+ @react-three/fiber/dist/events-760a1017.esm.js:
124151
124460
  (**
124152
124461
  * @license React
124153
124462
  * react-reconciler-constants.production.js