pptx-react-viewer 1.1.1 → 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.js CHANGED
@@ -43328,7 +43328,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
43328
43328
  return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
43329
43329
  }
43330
43330
  function useSyncExternalStore$2(subscribe3, getSnapshot2) {
43331
- didWarnOld18Alpha || void 0 === React96.startTransition || (didWarnOld18Alpha = true, console.error(
43331
+ didWarnOld18Alpha || void 0 === React97.startTransition || (didWarnOld18Alpha = true, console.error(
43332
43332
  "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."
43333
43333
  ));
43334
43334
  var value = getSnapshot2();
@@ -43350,7 +43350,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
43350
43350
  },
43351
43351
  [subscribe3, value, getSnapshot2]
43352
43352
  );
43353
- useEffect71(
43353
+ useEffect72(
43354
43354
  function() {
43355
43355
  checkIfSnapshotChanged(inst) && forceUpdate({ inst });
43356
43356
  return subscribe3(function() {
@@ -43376,8 +43376,8 @@ var require_use_sync_external_store_shim_development = __commonJS({
43376
43376
  return getSnapshot2();
43377
43377
  }
43378
43378
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
43379
- 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;
43380
- exports$1.useSyncExternalStore = void 0 !== React96.useSyncExternalStore ? React96.useSyncExternalStore : shim;
43379
+ 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;
43380
+ exports$1.useSyncExternalStore = void 0 !== React97.useSyncExternalStore ? React97.useSyncExternalStore : shim;
43381
43381
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
43382
43382
  })();
43383
43383
  }
@@ -43400,9 +43400,9 @@ var require_with_selector_development = __commonJS({
43400
43400
  return x2 === y && (0 !== x2 || 1 / x2 === 1 / y) || x2 !== x2 && y !== y;
43401
43401
  }
43402
43402
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
43403
- 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;
43403
+ 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;
43404
43404
  exports$1.useSyncExternalStoreWithSelector = function(subscribe3, getSnapshot2, getServerSnapshot2, selector, isEqual) {
43405
- var instRef = useRef72(null);
43405
+ var instRef = useRef73(null);
43406
43406
  if (null === instRef.current) {
43407
43407
  var inst = { hasValue: false, value: null };
43408
43408
  instRef.current = inst;
@@ -43443,7 +43443,7 @@ var require_with_selector_development = __commonJS({
43443
43443
  [getSnapshot2, getServerSnapshot2, selector, isEqual]
43444
43444
  );
43445
43445
  var value = useSyncExternalStore3(subscribe3, instRef[0], instRef[1]);
43446
- useEffect71(
43446
+ useEffect72(
43447
43447
  function() {
43448
43448
  inst.hasValue = true;
43449
43449
  inst.value = value;
@@ -44172,6 +44172,18 @@ function applyProps(object, props) {
44172
44172
  } else if (target !== null && typeof target === "object" && typeof target.set === "function" && typeof value === "number") {
44173
44173
  if (typeof target.setScalar === "function") target.setScalar(value);
44174
44174
  else target.set(value);
44175
+ } else if (root instanceof ShaderMaterial && key === "uniforms" && is.obj(value)) {
44176
+ if (!is.obj(root.uniforms)) root.uniforms = {};
44177
+ const uniforms = root.uniforms;
44178
+ const nextUniforms = value;
44179
+ for (const name in nextUniforms) {
44180
+ const uniform = nextUniforms[name];
44181
+ const targetUniform = uniforms[name];
44182
+ if (targetUniform) Object.assign(targetUniform, uniform);
44183
+ else uniforms[name] = {
44184
+ ...uniform
44185
+ };
44186
+ }
44175
44187
  } else {
44176
44188
  var _root$key;
44177
44189
  root[key] = value;
@@ -52891,8 +52903,8 @@ function createPointerEvents(store) {
52891
52903
  };
52892
52904
  }
52893
52905
  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;
52894
- var init_events_5a94e5eb_esm = __esm({
52895
- "../../node_modules/.bun/@react-three+fiber@9.5.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/events-5a94e5eb.esm.js"() {
52906
+ var init_events_760a1017_esm = __esm({
52907
+ "../../node_modules/.bun/@react-three+fiber@9.6.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/events-760a1017.esm.js"() {
52896
52908
  init_three_module();
52897
52909
  init_traditional();
52898
52910
  init_suspend_react();
@@ -53216,7 +53228,7 @@ var init_events_5a94e5eb_esm = __esm({
53216
53228
  e = 2;
53217
53229
  packageData = {
53218
53230
  name: "@react-three/fiber",
53219
- version: "9.5.0",
53231
+ version: "9.6.0",
53220
53232
  description: "A React renderer for Threejs",
53221
53233
  keywords: [
53222
53234
  "react",
@@ -53616,7 +53628,7 @@ var init_dist2 = __esm({
53616
53628
  }
53617
53629
  });
53618
53630
 
53619
- // ../../node_modules/.bun/@react-three+fiber@9.5.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/react-three-fiber.esm.js
53631
+ // ../../node_modules/.bun/@react-three+fiber@9.6.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/react-three-fiber.esm.js
53620
53632
  var react_three_fiber_esm_exports = {};
53621
53633
  __export(react_three_fiber_esm_exports, {
53622
53634
  Canvas: () => Canvas,
@@ -53785,9 +53797,9 @@ function Canvas(props) {
53785
53797
  });
53786
53798
  }
53787
53799
  var init_react_three_fiber_esm = __esm({
53788
- "../../node_modules/.bun/@react-three+fiber@9.5.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/react-three-fiber.esm.js"() {
53789
- init_events_5a94e5eb_esm();
53790
- init_events_5a94e5eb_esm();
53800
+ "../../node_modules/.bun/@react-three+fiber@9.6.0+bae906b8c0d5d7d7/node_modules/@react-three/fiber/dist/react-three-fiber.esm.js"() {
53801
+ init_events_760a1017_esm();
53802
+ init_events_760a1017_esm();
53791
53803
  init_three_module();
53792
53804
  init_dist2();
53793
53805
  init_dist();
@@ -53859,7 +53871,7 @@ function isRefObject(ref) {
53859
53871
  }
53860
53872
  var v1, v2, v3, v4, epsilon, getCameraCSSMatrix, getObjectCSSMatrix, Html;
53861
53873
  var init_Html = __esm({
53862
- "../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/web/Html.js"() {
53874
+ "../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/web/Html.js"() {
53863
53875
  init_extends();
53864
53876
  init_three_module();
53865
53877
  init_react_three_fiber_esm();
@@ -58414,7 +58426,7 @@ function extensions(useDraco = true, useMeshopt = true, extendLoader) {
58414
58426
  }
58415
58427
  var dracoLoader, decoderPath, useGLTF;
58416
58428
  var init_Gltf = __esm({
58417
- "../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/core/Gltf.js"() {
58429
+ "../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/core/Gltf.js"() {
58418
58430
  init_extends();
58419
58431
  init_three_stdlib();
58420
58432
  init_react_three_fiber_esm();
@@ -58430,7 +58442,7 @@ var init_Gltf = __esm({
58430
58442
  });
58431
58443
  var OrbitControls2;
58432
58444
  var init_OrbitControls2 = __esm({
58433
- "../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/core/OrbitControls.js"() {
58445
+ "../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/core/OrbitControls.js"() {
58434
58446
  init_extends();
58435
58447
  init_react_three_fiber_esm();
58436
58448
  init_three_stdlib();
@@ -58513,7 +58525,7 @@ var init_camera_controls_module = __esm({
58513
58525
  });
58514
58526
  var Center;
58515
58527
  var init_Center = __esm({
58516
- "../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/core/Center.js"() {
58528
+ "../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/core/Center.js"() {
58517
58529
  init_extends();
58518
58530
  init_three_module();
58519
58531
  Center = /* @__PURE__ */ React10__namespace.forwardRef(function Center2({
@@ -58578,9 +58590,9 @@ var init_Center = __esm({
58578
58590
  }
58579
58591
  });
58580
58592
 
58581
- // ../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/index.js
58593
+ // ../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/index.js
58582
58594
  var init_drei = __esm({
58583
- "../../node_modules/.bun/@react-three+drei@10.7.7+e9988e4abcdec7a8/node_modules/@react-three/drei/index.js"() {
58595
+ "../../node_modules/.bun/@react-three+drei@10.7.7+cdb3bc7f51872c1f/node_modules/@react-three/drei/index.js"() {
58584
58596
  init_Html();
58585
58597
  init_Gltf();
58586
58598
  init_OrbitControls2();
@@ -70410,12 +70422,40 @@ function toCssGradientStop(stop) {
70410
70422
  const posStr = pos === Math.round(pos) ? `${pos}%` : `${pos.toFixed(1)}%`;
70411
70423
  return `${color} ${posStr}`;
70412
70424
  }
70425
+ function computeGradientCenter(fillToRect, focalPoint) {
70426
+ if (fillToRect) {
70427
+ const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
70428
+ let cx = (l2 + (1 - r2)) / 2 * 100;
70429
+ let cy = (t2 + (1 - b2)) / 2 * 100;
70430
+ if (focalPoint) {
70431
+ const fpX = focalPoint.x * 100;
70432
+ const fpY = focalPoint.y * 100;
70433
+ cx = (cx + fpX) / 2;
70434
+ cy = (cy + fpY) / 2;
70435
+ }
70436
+ return { cx, cy };
70437
+ }
70438
+ if (focalPoint) {
70439
+ return { cx: focalPoint.x * 100, cy: focalPoint.y * 100 };
70440
+ }
70441
+ return { cx: 50, cy: 50 };
70442
+ }
70443
+ function buildCirclePathGradient(stops, focalPoint, fillToRect) {
70444
+ const stopStr = stops.map(toCssGradientStop).join(", ");
70445
+ const { cx, cy } = computeGradientCenter(fillToRect, focalPoint);
70446
+ const posX = Math.round(cx) === 50 && !focalPoint && !fillToRect ? "center" : `${Math.round(cx)}%`;
70447
+ const posY = Math.round(cy) === 50 && !focalPoint && !fillToRect ? "center" : `${Math.round(cy)}%`;
70448
+ if (fillToRect) {
70449
+ const radius = Math.max(cx, 100 - cx, cy, 100 - cy);
70450
+ return `radial-gradient(circle ${Math.round(radius)}% at ${posX} ${posY}, ${stopStr})`;
70451
+ }
70452
+ return `radial-gradient(circle at ${posX} ${posY}, ${stopStr})`;
70453
+ }
70413
70454
  function buildRectPathGradient(stops, focalPoint, fillToRect) {
70414
70455
  const stopStr = stops.map(toCssGradientStop).join(", ");
70415
70456
  if (fillToRect) {
70416
70457
  const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
70417
- const cx = (l2 + (1 - r2)) / 2 * 100;
70418
- const cy = (t2 + (1 - b2)) / 2 * 100;
70458
+ const { cx, cy } = computeGradientCenter(fillToRect, focalPoint);
70419
70459
  const semiX = Math.max(cx, 100 - cx);
70420
70460
  const semiY = Math.max(cy, 100 - cy);
70421
70461
  const posX2 = `${Math.round(cx)}%`;
@@ -70438,19 +70478,27 @@ function buildShapePathGradient(stops, focalPoint, fillToRect) {
70438
70478
  const stopStr = stops.map(toCssGradientStop).join(", ");
70439
70479
  if (fillToRect) {
70440
70480
  const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
70441
- const cx = (l2 + (1 - r2)) / 2 * 100;
70442
- const cy = (t2 + (1 - b2)) / 2 * 100;
70443
- const posX2 = `${Math.round(cx)}%`;
70444
- const posY2 = `${Math.round(cy)}%`;
70481
+ const { cx: cx2, cy: cy2 } = computeGradientCenter(fillToRect, focalPoint);
70482
+ const posX2 = `${Math.round(cx2)}%`;
70483
+ const posY2 = `${Math.round(cy2)}%`;
70484
+ const semiX = Math.max(cx2, 100 - cx2);
70485
+ const semiY = Math.max(cy2, 100 - cy2);
70445
70486
  const innerHalfW = (1 - l2 - r2) / 2 * 100;
70446
70487
  const innerHalfH = (1 - t2 - b2) / 2 * 100;
70447
70488
  if (innerHalfW > 0.5 && innerHalfH > 0.5 && Math.abs(innerHalfW - innerHalfH) > 1) {
70448
- return `radial-gradient(${Math.round(innerHalfW)}% ${Math.round(innerHalfH)}% at ${posX2} ${posY2}, ${stopStr})`;
70489
+ const aspect2 = innerHalfW / innerHalfH;
70490
+ const adjustedSemiX = Math.round(Math.max(semiX, semiY * aspect2));
70491
+ const adjustedSemiY = Math.round(Math.max(semiY, semiX / aspect2));
70492
+ return `radial-gradient(${adjustedSemiX}% ${adjustedSemiY}% at ${posX2} ${posY2}, ${stopStr})`;
70493
+ }
70494
+ if (semiX > 0.5 || semiY > 0.5) {
70495
+ return `radial-gradient(${Math.round(semiX)}% ${Math.round(semiY)}% at ${posX2} ${posY2}, ${stopStr})`;
70449
70496
  }
70450
70497
  return `radial-gradient(farthest-side at ${posX2} ${posY2}, ${stopStr})`;
70451
70498
  }
70452
- const posX = focalPoint ? `${Math.round(focalPoint.x * 100)}%` : "center";
70453
- const posY = focalPoint ? `${Math.round(focalPoint.y * 100)}%` : "center";
70499
+ const { cx, cy } = computeGradientCenter(void 0, focalPoint);
70500
+ const posX = focalPoint ? `${Math.round(cx)}%` : "center";
70501
+ const posY = focalPoint ? `${Math.round(cy)}%` : "center";
70454
70502
  return `radial-gradient(farthest-side at ${posX} ${posY}, ${stopStr})`;
70455
70503
  }
70456
70504
  function buildCssGradientFromShapeStyle(style) {
@@ -70472,9 +70520,7 @@ function buildCssGradientFromShapeStyle(style) {
70472
70520
  if (pathType === "shape") {
70473
70521
  return buildShapePathGradient(stops, fp, ftr);
70474
70522
  }
70475
- const posX = fp ? `${Math.round(fp.x * 100)}%` : "center";
70476
- const posY = fp ? `${Math.round(fp.y * 100)}%` : "center";
70477
- return `radial-gradient(circle at ${posX} ${posY}, ${stops.map(toCssGradientStop).join(", ")})`;
70523
+ return buildCirclePathGradient(stops, fp, ftr);
70478
70524
  }
70479
70525
  const normalizedAngle = typeof style.fillGradientAngle === "number" && Number.isFinite(style.fillGradientAngle) ? style.fillGradientAngle : 90;
70480
70526
  return `linear-gradient(${Math.round(normalizedAngle)}deg, ${stops.map(toCssGradientStop).join(", ")})`;
@@ -70873,8 +70919,10 @@ function getTextStyleForElement(element2, fallbackColor) {
70873
70919
  const verticalDirection = toCssVerticalDirection(element2.textStyle?.textDirection);
70874
70920
  const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
70875
70921
  const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
70922
+ const hasSegments = (element2.textSegments?.length ?? 0) > 0;
70876
70923
  return {
70877
70924
  color: resolvedTextColor,
70925
+ backgroundColor: !hasSegments && element2.textStyle?.highlightColor ? normalizeHexColor(element2.textStyle.highlightColor, void 0) : void 0,
70878
70926
  textAlign: (() => {
70879
70927
  const a2 = element2.textStyle?.align;
70880
70928
  if (a2 === "justLow" || a2 === "dist" || a2 === "thaiDist") {
@@ -84948,6 +84996,79 @@ function comparePresentation(base, compare) {
84948
84996
  unchangedCount
84949
84997
  };
84950
84998
  }
84999
+ function copyFormatFromElement(element2) {
85000
+ const result = {};
85001
+ if (pptxViewerCore.hasShapeProperties(element2) && element2.shapeStyle) {
85002
+ const s = element2.shapeStyle;
85003
+ result.shapeStyle = {
85004
+ fillColor: s.fillColor,
85005
+ fillMode: s.fillMode,
85006
+ fillGradient: s.fillGradient,
85007
+ fillGradientStops: s.fillGradientStops ? [...s.fillGradientStops] : void 0,
85008
+ fillGradientAngle: s.fillGradientAngle,
85009
+ fillGradientType: s.fillGradientType,
85010
+ fillOpacity: s.fillOpacity,
85011
+ fillPatternPreset: s.fillPatternPreset,
85012
+ fillPatternBackgroundColor: s.fillPatternBackgroundColor,
85013
+ strokeColor: s.strokeColor,
85014
+ strokeWidth: s.strokeWidth,
85015
+ strokeOpacity: s.strokeOpacity,
85016
+ strokeDash: s.strokeDash,
85017
+ lineJoin: s.lineJoin,
85018
+ lineCap: s.lineCap,
85019
+ shadowColor: s.shadowColor,
85020
+ shadowBlur: s.shadowBlur,
85021
+ shadowOffsetX: s.shadowOffsetX,
85022
+ shadowOffsetY: s.shadowOffsetY,
85023
+ shadowOpacity: s.shadowOpacity,
85024
+ glowColor: s.glowColor,
85025
+ glowRadius: s.glowRadius,
85026
+ glowOpacity: s.glowOpacity,
85027
+ softEdgeRadius: s.softEdgeRadius
85028
+ };
85029
+ }
85030
+ if (pptxViewerCore.hasTextProperties(element2) && element2.textStyle) {
85031
+ const t2 = element2.textStyle;
85032
+ result.textStyle = {
85033
+ fontFamily: t2.fontFamily,
85034
+ fontSize: t2.fontSize,
85035
+ bold: t2.bold,
85036
+ italic: t2.italic,
85037
+ underline: t2.underline,
85038
+ underlineStyle: t2.underlineStyle,
85039
+ strikethrough: t2.strikethrough,
85040
+ color: t2.color,
85041
+ align: t2.align,
85042
+ lineSpacing: t2.lineSpacing,
85043
+ paragraphSpacingBefore: t2.paragraphSpacingBefore,
85044
+ paragraphSpacingAfter: t2.paragraphSpacingAfter,
85045
+ textCaps: t2.textCaps
85046
+ };
85047
+ }
85048
+ return result;
85049
+ }
85050
+ function applyFormatToElement(element2, format) {
85051
+ let updated = { ...element2 };
85052
+ if (format.shapeStyle && pptxViewerCore.hasShapeProperties(updated)) {
85053
+ updated = {
85054
+ ...updated,
85055
+ shapeStyle: {
85056
+ ...updated.shapeStyle,
85057
+ ...format.shapeStyle
85058
+ }
85059
+ };
85060
+ }
85061
+ if (format.textStyle && pptxViewerCore.hasTextProperties(updated)) {
85062
+ updated = {
85063
+ ...updated,
85064
+ textStyle: {
85065
+ ...updated.textStyle,
85066
+ ...format.textStyle
85067
+ }
85068
+ };
85069
+ }
85070
+ return updated;
85071
+ }
84951
85072
 
84952
85073
  // src/viewer/utils/animation-preview.ts
84953
85074
  var PRESET_TO_EFFECT = {
@@ -91324,13 +91445,24 @@ function usePresenceTracking({
91324
91445
  }, []);
91325
91446
  return { remoteUsers, broadcastPresence };
91326
91447
  }
91448
+ var CONNECTION_TIMEOUT_MS = 3e4;
91327
91449
  function useYjsProvider({ config }) {
91328
91450
  const [status, setStatus] = React10.useState("disconnected");
91329
91451
  const [awareness, setAwareness] = React10.useState(null);
91330
91452
  const [doc2, setDoc] = React10.useState(null);
91331
91453
  const [clientId, setClientId] = React10.useState(null);
91332
91454
  const cleanupRef = React10.useRef(null);
91455
+ const timeoutRef = React10.useRef(null);
91456
+ const teardown = React10.useCallback(() => {
91457
+ if (timeoutRef.current) {
91458
+ clearTimeout(timeoutRef.current);
91459
+ timeoutRef.current = null;
91460
+ }
91461
+ cleanupRef.current?.();
91462
+ cleanupRef.current = null;
91463
+ }, []);
91333
91464
  const init = React10.useCallback(async () => {
91465
+ teardown();
91334
91466
  const roomId = validateRoomId(config.roomId);
91335
91467
  setStatus("connecting");
91336
91468
  try {
@@ -91345,8 +91477,14 @@ function useYjsProvider({ config }) {
91345
91477
  params: config.authToken ? { token: config.authToken } : void 0
91346
91478
  }
91347
91479
  );
91480
+ let connected = false;
91348
91481
  const handleStatus = (event) => {
91349
91482
  if (event.status === "connected") {
91483
+ connected = true;
91484
+ if (timeoutRef.current) {
91485
+ clearTimeout(timeoutRef.current);
91486
+ timeoutRef.current = null;
91487
+ }
91350
91488
  setStatus("connected");
91351
91489
  } else if (event.status === "disconnected") {
91352
91490
  setStatus("disconnected");
@@ -91354,8 +91492,24 @@ function useYjsProvider({ config }) {
91354
91492
  };
91355
91493
  provider.on("status", handleStatus);
91356
91494
  if (provider.wsconnected) {
91495
+ connected = true;
91357
91496
  setStatus("connected");
91358
91497
  }
91498
+ if (!connected) {
91499
+ timeoutRef.current = setTimeout(() => {
91500
+ timeoutRef.current = null;
91501
+ if (!connected) {
91502
+ provider.off("status", handleStatus);
91503
+ provider.destroy();
91504
+ yDoc.destroy();
91505
+ setDoc(null);
91506
+ setAwareness(null);
91507
+ setClientId(null);
91508
+ cleanupRef.current = null;
91509
+ setStatus("error");
91510
+ }
91511
+ }, CONNECTION_TIMEOUT_MS);
91512
+ }
91359
91513
  setDoc(yDoc);
91360
91514
  setAwareness(provider.awareness);
91361
91515
  setClientId(provider.awareness.clientID);
@@ -91375,15 +91529,15 @@ function useYjsProvider({ config }) {
91375
91529
  );
91376
91530
  setStatus("error");
91377
91531
  }
91378
- }, [config.roomId, config.serverUrl, config.authToken]);
91532
+ }, [config.roomId, config.serverUrl, config.authToken, teardown]);
91379
91533
  React10.useEffect(() => {
91380
91534
  init();
91381
- return () => {
91382
- cleanupRef.current?.();
91383
- cleanupRef.current = null;
91384
- };
91535
+ return teardown;
91536
+ }, [init, teardown]);
91537
+ const retry = React10.useCallback(() => {
91538
+ init();
91385
91539
  }, [init]);
91386
- return { status, awareness, doc: doc2, clientId };
91540
+ return { status, awareness, doc: doc2, clientId, retry };
91387
91541
  }
91388
91542
 
91389
91543
  // src/viewer/hooks/collaboration/useCollaborativeState.ts
@@ -91393,7 +91547,7 @@ function useCollaborativeState({
91393
91547
  canvasHeight
91394
91548
  }) {
91395
91549
  const userColor = sanitizeColor(config.userColor, "#6366f1");
91396
- const { status, awareness, doc: doc2, clientId } = useYjsProvider({ config });
91550
+ const { status, awareness, doc: doc2, clientId, retry } = useYjsProvider({ config });
91397
91551
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
91398
91552
  awareness,
91399
91553
  localClientId: clientId,
@@ -91411,7 +91565,8 @@ function useCollaborativeState({
91411
91565
  broadcastPresence,
91412
91566
  connectedCount,
91413
91567
  config,
91414
- doc: doc2
91568
+ doc: doc2,
91569
+ retry
91415
91570
  };
91416
91571
  }
91417
91572
  var CollaborationContext = React10.createContext(null);
@@ -91527,7 +91682,8 @@ var STATUS_STYLES = {
91527
91682
  };
91528
91683
  function CollaborationStatusIndicator({
91529
91684
  status,
91530
- connectedCount
91685
+ connectedCount,
91686
+ onRetry
91531
91687
  }) {
91532
91688
  const { t: t2 } = reactI18next.useTranslation();
91533
91689
  const style = STATUS_STYLES[status];
@@ -91542,7 +91698,17 @@ function CollaborationStatusIndicator({
91542
91698
  }),
91543
91699
  children: [
91544
91700
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: `inline-block w-2 h-2 rounded-full ${style.dot}`, "aria-hidden": "true" }),
91545
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${style.text}`, children: status === "connected" ? t2("pptx.collaboration.userCount", { count: connectedCount }) : t2(`pptx.collaboration.status.${status}`) })
91701
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${style.text}`, children: status === "connected" ? t2("pptx.collaboration.userCount", { count: connectedCount }) : t2(`pptx.collaboration.status.${status}`) }),
91702
+ status === "error" && onRetry && /* @__PURE__ */ jsxRuntime.jsx(
91703
+ "button",
91704
+ {
91705
+ type: "button",
91706
+ onClick: onRetry,
91707
+ className: "text-[10px] text-blue-400 hover:text-blue-300 underline underline-offset-2 transition-colors",
91708
+ "aria-label": t2("pptx.collaboration.retry"),
91709
+ children: t2("pptx.collaboration.retry")
91710
+ }
91711
+ )
91546
91712
  ]
91547
91713
  }
91548
91714
  );
@@ -97172,6 +97338,11 @@ var OV = [
97172
97338
  l: "Package for Sharing",
97173
97339
  i: /* @__PURE__ */ jsxRuntime.jsx(lu.LuFolderOpen, { className: `${ics} text-muted-foreground` })
97174
97340
  },
97341
+ {
97342
+ k: "pptx",
97343
+ l: "Save as Presentation (.pptx)",
97344
+ i: /* @__PURE__ */ jsxRuntime.jsx(lu.LuDownload, { className: `${ics} text-muted-foreground` })
97345
+ },
97175
97346
  {
97176
97347
  k: "ppsx",
97177
97348
  l: "Save as Slide Show (.ppsx)",
@@ -97321,6 +97492,10 @@ function AnimationsSection(p3) {
97321
97492
  {
97322
97493
  type: "button",
97323
97494
  disabled,
97495
+ onClick: () => p3.onAddAnimation?.(
97496
+ item.value,
97497
+ group.group.toLowerCase()
97498
+ ),
97324
97499
  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",
97325
97500
  title: t2("pptx.animations.applyAnimation", {
97326
97501
  name: t2(`pptx.animations.preset.${item.value}`)
@@ -97337,6 +97512,7 @@ function AnimationsSection(p3) {
97337
97512
  {
97338
97513
  type: "button",
97339
97514
  disabled,
97515
+ onClick: p3.onRemoveAnimation,
97340
97516
  className: pill,
97341
97517
  title: t2("pptx.animations.removeTooltip"),
97342
97518
  children: [
@@ -97746,6 +97922,10 @@ function DrawSection(p3) {
97746
97922
  }
97747
97923
  function FileSection(p3) {
97748
97924
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
97925
+ /* @__PURE__ */ jsxRuntime.jsxs("button", { onClick: p3.onSaveAsPptx, className: pill, title: "Save as Presentation (.pptx)", children: [
97926
+ /* @__PURE__ */ jsxRuntime.jsx(lu.LuDownload, { className: ic2 }),
97927
+ "Save .pptx"
97928
+ ] }),
97749
97929
  /* @__PURE__ */ jsxRuntime.jsxs("button", { onClick: p3.onSaveAsPpsx, className: pill, title: "Save as Slide Show (.ppsx)", children: [
97750
97930
  /* @__PURE__ */ jsxRuntime.jsx(lu.LuPlay, { className: ic2 }),
97751
97931
  "Save .ppsx"
@@ -98471,6 +98651,19 @@ function SlideShowSection(p3) {
98471
98651
  )
98472
98652
  ] });
98473
98653
  }
98654
+ function getEffectiveTextStyle(element2, tableEditorState) {
98655
+ if (!element2) {
98656
+ return void 0;
98657
+ }
98658
+ if (pptxViewerCore.hasTextProperties(element2)) {
98659
+ return element2.textStyle;
98660
+ }
98661
+ if (element2.type === "table" && tableEditorState && element2.tableData) {
98662
+ const cell = element2.tableData.rows[tableEditorState.rowIndex]?.cells[tableEditorState.columnIndex];
98663
+ return cell?.style;
98664
+ }
98665
+ return void 0;
98666
+ }
98474
98667
  var FONT_COLOR_PRESETS = [
98475
98668
  "#000000",
98476
98669
  "#ffffff",
@@ -98501,7 +98694,8 @@ function TextSection(p3) {
98501
98694
  const isTextEl = hasSel && p3.selectedElement !== null && pptxViewerCore.hasTextProperties(p3.selectedElement);
98502
98695
  const isTable = hasSel && p3.selectedElement?.type === "table";
98503
98696
  const canFormat = isTextEl || isTable;
98504
- const currentColor = isTextEl && p3.selectedElement && pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.color ?? p3.selectedElement.textStyle?.color ?? "#000000" : "#000000";
98697
+ const effectiveTs = getEffectiveTextStyle(p3.selectedElement, p3.tableEditorState);
98698
+ const currentColor = isTextEl && p3.selectedElement && pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.color ?? p3.selectedElement.textStyle?.color ?? "#000000" : effectiveTs?.color ?? "#000000";
98505
98699
  const currentHighlight = isTextEl && p3.selectedElement && pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.highlightColor ?? p3.selectedElement.textStyle?.highlightColor ?? "#ffff00" : "#ffff00";
98506
98700
  const colorInputRef = React10.useRef(null);
98507
98701
  const highlightInputRef = React10.useRef(null);
@@ -98531,7 +98725,7 @@ function TextSection(p3) {
98531
98725
  if (!canFormat || !p3.selectedElement) {
98532
98726
  return;
98533
98727
  }
98534
- const ts = pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98728
+ const ts = effectiveTs;
98535
98729
  switch (b2.t) {
98536
98730
  case "Bold":
98537
98731
  p3.onUpdateTextStyle({ bold: !ts?.bold });
@@ -98576,8 +98770,7 @@ function TextSection(p3) {
98576
98770
  if (!canFormat || !p3.selectedElement) {
98577
98771
  return;
98578
98772
  }
98579
- const ts = pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98580
- const current = ts?.fontSize ?? 18;
98773
+ const current = effectiveTs?.fontSize ?? 18;
98581
98774
  p3.onUpdateTextStyle({ fontSize: current + 2 });
98582
98775
  },
98583
98776
  className: gB,
@@ -98595,8 +98788,7 @@ function TextSection(p3) {
98595
98788
  if (!canFormat || !p3.selectedElement) {
98596
98789
  return;
98597
98790
  }
98598
- const ts = pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98599
- const current = ts?.fontSize ?? 18;
98791
+ const current = effectiveTs?.fontSize ?? 18;
98600
98792
  p3.onUpdateTextStyle({ fontSize: Math.max(1, current - 2) });
98601
98793
  },
98602
98794
  className: gB,
@@ -98767,9 +98959,8 @@ function TextSection(p3) {
98767
98959
  if (!canFormat || !p3.selectedElement) {
98768
98960
  return;
98769
98961
  }
98770
- const ts = pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98771
98962
  p3.onUpdateTextStyle({
98772
- listType: ts?.listType === "bullet" ? "none" : "bullet"
98963
+ listType: effectiveTs?.listType === "bullet" ? "none" : "bullet"
98773
98964
  });
98774
98965
  },
98775
98966
  className: gB,
@@ -98787,9 +98978,8 @@ function TextSection(p3) {
98787
98978
  if (!canFormat || !p3.selectedElement) {
98788
98979
  return;
98789
98980
  }
98790
- const ts = pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98791
98981
  p3.onUpdateTextStyle({
98792
- listType: ts?.listType === "numbered" ? "none" : "numbered"
98982
+ listType: effectiveTs?.listType === "numbered" ? "none" : "numbered"
98793
98983
  });
98794
98984
  },
98795
98985
  className: gL,
@@ -98809,8 +98999,7 @@ function TextSection(p3) {
98809
98999
  if (!canFormat || !p3.selectedElement) {
98810
99000
  return;
98811
99001
  }
98812
- const ts = pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98813
- const current = ts?.paragraphMarginLeft ?? 0;
99002
+ const current = effectiveTs?.paragraphMarginLeft ?? 0;
98814
99003
  p3.onUpdateTextStyle({
98815
99004
  paragraphMarginLeft: Math.max(0, current - 24)
98816
99005
  });
@@ -98830,8 +99019,7 @@ function TextSection(p3) {
98830
99019
  if (!canFormat || !p3.selectedElement) {
98831
99020
  return;
98832
99021
  }
98833
- const ts = pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
98834
- const current = ts?.paragraphMarginLeft ?? 0;
99022
+ const current = effectiveTs?.paragraphMarginLeft ?? 0;
98835
99023
  p3.onUpdateTextStyle({
98836
99024
  paragraphMarginLeft: current + 24
98837
99025
  });
@@ -99168,6 +99356,7 @@ function OverflowMenu(p3) {
99168
99356
  video: p3.onExportVideo,
99169
99357
  gif: p3.onExportGif,
99170
99358
  package: p3.onPackageForSharing,
99359
+ pptx: p3.onSaveAsPptx,
99171
99360
  ppsx: p3.onSaveAsPpsx,
99172
99361
  pptm: p3.onSaveAsPptm,
99173
99362
  print: p3.onPrint,
@@ -99615,6 +99804,7 @@ function Toolbar(p3) {
99615
99804
  onExportVideo: p3.onExportVideo,
99616
99805
  onExportGif: p3.onExportGif,
99617
99806
  onPackageForSharing: p3.onPackageForSharing,
99807
+ onSaveAsPptx: p3.onSaveAsPptx,
99618
99808
  onSaveAsPpsx: p3.onSaveAsPpsx,
99619
99809
  onSaveAsPptm: p3.onSaveAsPptm,
99620
99810
  hasMacros: p3.hasMacros,
@@ -99664,6 +99854,7 @@ function Toolbar(p3) {
99664
99854
  {
99665
99855
  canEdit: p3.canEdit,
99666
99856
  selectedElement: p3.selectedElement,
99857
+ tableEditorState: p3.tableEditorState,
99667
99858
  onUpdateTextStyle: p3.onUpdateTextStyle
99668
99859
  }
99669
99860
  ),
@@ -99724,7 +99915,9 @@ function Toolbar(p3) {
99724
99915
  selectedElement: p3.selectedElement,
99725
99916
  isInspectorPaneOpen: p3.isInspectorPaneOpen,
99726
99917
  onToggleInspector: p3.onToggleInspector,
99727
- onOpenAnimationPanel: p3.onOpenAnimationPanel
99918
+ onOpenAnimationPanel: p3.onOpenAnimationPanel,
99919
+ onAddAnimation: p3.onAddAnimation,
99920
+ onRemoveAnimation: p3.onRemoveAnimation
99728
99921
  }
99729
99922
  ),
99730
99923
  sSlw && /* @__PURE__ */ jsxRuntime.jsx(
@@ -109908,8 +110101,61 @@ function ViewerToolbarSection(props) {
109908
110101
  onEnterPresenterView,
109909
110102
  onEnterRehearsalMode,
109910
110103
  onOpenSettings,
109911
- onOpenShareDialog
110104
+ onOpenShareDialog,
110105
+ onToggleFormatPainter: onToggleFormatPainterProp
109912
110106
  } = props;
110107
+ const handleAddAnimation = React10.useCallback(
110108
+ (preset, group) => {
110109
+ if (!selectedElement || !activeSlide) {
110110
+ return;
110111
+ }
110112
+ const current = activeSlide.animations ?? [];
110113
+ const existing = current.find((a2) => a2.elementId === selectedElement.id);
110114
+ const presetValue = preset;
110115
+ if (existing) {
110116
+ const updated = current.map(
110117
+ (a2) => a2.elementId === selectedElement.id ? { ...a2, [group]: presetValue } : a2
110118
+ );
110119
+ propertyHandlers.handleUpdateSlide({ animations: updated });
110120
+ } else {
110121
+ const newAnim = {
110122
+ elementId: selectedElement.id,
110123
+ [group]: presetValue,
110124
+ durationMs: 500,
110125
+ order: current.length,
110126
+ trigger: "onClick"
110127
+ };
110128
+ propertyHandlers.handleUpdateSlide({ animations: [...current, newAnim] });
110129
+ }
110130
+ },
110131
+ [selectedElement, activeSlide, propertyHandlers]
110132
+ );
110133
+ const handleRemoveAnimation = React10.useCallback(() => {
110134
+ if (!selectedElement || !activeSlide) {
110135
+ return;
110136
+ }
110137
+ const current = activeSlide.animations ?? [];
110138
+ const filtered = current.filter((a2) => a2.elementId !== selectedElement.id);
110139
+ propertyHandlers.handleUpdateSlide({ animations: filtered });
110140
+ }, [selectedElement, activeSlide, propertyHandlers]);
110141
+ const handleTransitionChange = React10.useCallback(
110142
+ (updates) => {
110143
+ if (!activeSlide) {
110144
+ return;
110145
+ }
110146
+ const current = activeSlide.transition ?? { type: "none" };
110147
+ propertyHandlers.handleUpdateSlide({ transition: { ...current, ...updates } });
110148
+ },
110149
+ [activeSlide, propertyHandlers]
110150
+ );
110151
+ const handleApplyTransitionToAll = React10.useCallback(() => {
110152
+ const transition = activeSlide?.transition;
110153
+ if (!transition) {
110154
+ return;
110155
+ }
110156
+ ops.updateSlides((prev) => prev.map((sl) => ({ ...sl, transition })));
110157
+ history.markDirty();
110158
+ }, [activeSlide, ops, history]);
109913
110159
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
109914
110160
  /* @__PURE__ */ jsxRuntime.jsx(
109915
110161
  Toolbar,
@@ -109928,6 +110174,7 @@ function ViewerToolbarSection(props) {
109928
110174
  redoLabel: history.redoLabel,
109929
110175
  findReplaceOpen: findReplace.findReplaceOpen,
109930
110176
  selectedElement,
110177
+ tableEditorState: s.tableEditorState,
109931
110178
  editTemplateMode: s.editTemplateMode,
109932
110179
  newShapeType: s.newShapeType,
109933
110180
  activeTool: s.activeTool,
@@ -109941,6 +110188,8 @@ function ViewerToolbarSection(props) {
109941
110188
  s.setIsInspectorPaneOpen(true);
109942
110189
  s.setSidebarPanelMode("properties");
109943
110190
  },
110191
+ onAddAnimation: handleAddAnimation,
110192
+ onRemoveAnimation: handleRemoveAnimation,
109944
110193
  onToggleCompactToolbar: () => s.setIsCompactToolbarOpen((p3) => !p3),
109945
110194
  onSetToolbarSection: s.setToolbarSection,
109946
110195
  onZoomIn: zoom.handleZoomIn,
@@ -109992,6 +110241,7 @@ function ViewerToolbarSection(props) {
109992
110241
  onExportGif: exportHandlers.handleExportGif,
109993
110242
  onPackageForSharing: exportHandlers.handlePackageForSharing,
109994
110243
  onOpenShareDialog,
110244
+ onSaveAsPptx: exportHandlers.handleSaveAsPptx,
109995
110245
  onSaveAsPpsx: exportHandlers.handleSaveAsPpsx,
109996
110246
  onSaveAsPptm: exportHandlers.handleSaveAsPptm,
109997
110247
  hasMacros: s.hasMacros,
@@ -110037,7 +110287,7 @@ function ViewerToolbarSection(props) {
110037
110287
  isCommentsPanelOpen: s.isInspectorPaneOpen,
110038
110288
  slideCommentCount: activeSlide?.comments?.length ?? 0,
110039
110289
  formatPainterActive: s.formatPainterActive,
110040
- onToggleFormatPainter: () => s.setFormatPainterActive((p3) => !p3),
110290
+ onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p3) => !p3)),
110041
110291
  isSelectionPaneOpen: s.isSelectionPaneOpen,
110042
110292
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p3) => !p3),
110043
110293
  eyedropperActive: s.eyedropperActive,
@@ -110045,7 +110295,10 @@ function ViewerToolbarSection(props) {
110045
110295
  onOpenSetUpSlideShow: () => dialogs.setIsSetUpSlideShowOpen(true),
110046
110296
  onOpenBroadcastDialog: () => dialogs.setIsBroadcastDialogOpen(true),
110047
110297
  onToggleSubtitles: dialogs.handleToggleSubtitles,
110048
- showSubtitles: Boolean(s.presentationProperties.showSubtitles)
110298
+ showSubtitles: Boolean(s.presentationProperties.showSubtitles),
110299
+ activeSlide,
110300
+ onTransitionChange: handleTransitionChange,
110301
+ onApplyTransitionToAll: handleApplyTransitionToAll
110049
110302
  }
110050
110303
  ),
110051
110304
  s.hasDigitalSignatures && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center px-3 py-1 z-10", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -116810,12 +117063,50 @@ function useEditorOperations(input) {
116810
117063
  }),
116811
117064
  [ops, combinedUpdateTextStyle]
116812
117065
  );
117066
+ const copiedFormatRef = React10.useRef(null);
117067
+ const prevFormatPainterRef = React10.useRef(false);
117068
+ React10.useEffect(() => {
117069
+ if (state2.formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
117070
+ copiedFormatRef.current = copyFormatFromElement(selectedElement);
117071
+ } else if (!state2.formatPainterActive) {
117072
+ copiedFormatRef.current = null;
117073
+ }
117074
+ prevFormatPainterRef.current = state2.formatPainterActive;
117075
+ }, [state2.formatPainterActive, selectedElement]);
117076
+ const formatPainterCanvasHandlers = React10.useMemo(
117077
+ () => ({
117078
+ ...canvasHandlers,
117079
+ handleElementClick: (elementId, e2) => {
117080
+ if (state2.formatPainterActive && copiedFormatRef.current) {
117081
+ e2.stopPropagation();
117082
+ const element2 = state2.elementLookup.get(elementId);
117083
+ if (element2) {
117084
+ const updated = applyFormatToElement(element2, copiedFormatRef.current);
117085
+ const updates = {};
117086
+ if (pptxViewerCore.hasShapeProperties(updated)) {
117087
+ updates.shapeStyle = updated.shapeStyle;
117088
+ }
117089
+ if (pptxViewerCore.hasTextProperties(updated)) {
117090
+ updates.textStyle = updated.textStyle;
117091
+ }
117092
+ ops.updateElementById(elementId, updates);
117093
+ }
117094
+ copiedFormatRef.current = null;
117095
+ state2.setFormatPainterActive(false);
117096
+ ops.applySelection(elementId);
117097
+ return;
117098
+ }
117099
+ canvasHandlers.handleElementClick(elementId, e2);
117100
+ }
117101
+ }),
117102
+ [canvasHandlers, ops, state2]
117103
+ );
116813
117104
  return {
116814
117105
  ops: combinedOps,
116815
117106
  sectionOps,
116816
117107
  findReplace,
116817
117108
  comments,
116818
- canvasHandlers,
117109
+ canvasHandlers: formatPainterCanvasHandlers,
116819
117110
  insertHandlers,
116820
117111
  manipulation,
116821
117112
  slideOps,
@@ -120987,6 +121278,9 @@ function useExportSaveAs(input) {
120987
121278
  };
120988
121279
  return handler.save(slidesWithGuides, saveOptions);
120989
121280
  };
121281
+ const handleSaveAsPptx = () => {
121282
+ void handleSaveAsFormat("pptx");
121283
+ };
120990
121284
  const handleSaveAsPpsx = () => {
120991
121285
  void handleSaveAsFormat("ppsx");
120992
121286
  };
@@ -120996,6 +121290,7 @@ function useExportSaveAs(input) {
120996
121290
  return {
120997
121291
  handlePackageForSharing,
120998
121292
  handleSaveAsFormat,
121293
+ handleSaveAsPptx,
120999
121294
  handleSaveAsPpsx,
121000
121295
  handleSaveAsPptm
121001
121296
  };
@@ -121036,7 +121331,13 @@ function useExportHandlers(input) {
121036
121331
  setExportStatusMessage,
121037
121332
  exportAbortRef
121038
121333
  };
121039
- const { handlePackageForSharing, handleSaveAsFormat, handleSaveAsPpsx, handleSaveAsPptm } = useExportSaveAs({
121334
+ const {
121335
+ handlePackageForSharing,
121336
+ handleSaveAsFormat,
121337
+ handleSaveAsPptx,
121338
+ handleSaveAsPpsx,
121339
+ handleSaveAsPptm
121340
+ } = useExportSaveAs({
121040
121341
  slides,
121041
121342
  filePath,
121042
121343
  handlerRef,
@@ -121263,6 +121564,7 @@ function useExportHandlers(input) {
121263
121564
  handleExportGif,
121264
121565
  handlePackageForSharing,
121265
121566
  handleSaveAsFormat,
121567
+ handleSaveAsPptx,
121266
121568
  handleSaveAsPpsx,
121267
121569
  handleSaveAsPptm,
121268
121570
  handleCancelExport,
@@ -123906,7 +124208,14 @@ function CollaborationStatusStrip() {
123906
124208
  if (!collab) {
123907
124209
  return null;
123908
124210
  }
123909
- return /* @__PURE__ */ jsxRuntime.jsx(CollaborationStatusIndicator, { status: collab.status, connectedCount: collab.connectedCount });
124211
+ return /* @__PURE__ */ jsxRuntime.jsx(
124212
+ CollaborationStatusIndicator,
124213
+ {
124214
+ status: collab.status,
124215
+ connectedCount: collab.connectedCount,
124216
+ onRetry: collab.retry
124217
+ }
124218
+ );
123910
124219
  }
123911
124220
  function CollaborationDocumentSync({
123912
124221
  slides,
@@ -123978,7 +124287,7 @@ scheduler/cjs/scheduler.development.js:
123978
124287
  * LICENSE file in the root directory of this source tree.
123979
124288
  *)
123980
124289
 
123981
- @react-three/fiber/dist/events-5a94e5eb.esm.js:
124290
+ @react-three/fiber/dist/events-760a1017.esm.js:
123982
124291
  (**
123983
124292
  * @license React
123984
124293
  * react-reconciler-constants.production.js