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.
- package/dist/{PowerPointViewer-DtLlYf0r.d.mts → PowerPointViewer-CX0a7wz_.d.mts} +2 -0
- package/dist/{PowerPointViewer-DtLlYf0r.d.ts → PowerPointViewer-CX0a7wz_.d.ts} +2 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +373 -64
- package/dist/index.mjs +373 -64
- package/dist/pptx-viewer.css +1 -1
- package/dist/viewer/index.d.mts +11 -3
- package/dist/viewer/index.d.ts +11 -3
- package/dist/viewer/index.js +373 -64
- package/dist/viewer/index.mjs +373 -64
- package/node_modules/emf-converter/package.json +1 -1
- package/node_modules/mtx-decompressor/dist/index.d.mts +2 -1
- package/node_modules/mtx-decompressor/dist/index.d.ts +2 -1
- package/node_modules/mtx-decompressor/dist/index.js +85 -93
- package/node_modules/mtx-decompressor/dist/index.mjs +85 -93
- package/node_modules/mtx-decompressor/package.json +1 -1
- package/node_modules/pptx-viewer-core/dist/{SvgExporter-CPr1npgo.d.ts → SvgExporter--H1PDfAY.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{SvgExporter-B4-1_Hjp.d.mts → SvgExporter-Dq_2eV_r.d.mts} +1 -1
- package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +2 -2
- package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +2 -2
- package/node_modules/pptx-viewer-core/dist/cli/index.js +339 -235
- package/node_modules/pptx-viewer-core/dist/cli/index.mjs +339 -235
- package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +3 -3
- package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +3 -3
- package/node_modules/pptx-viewer-core/dist/index.d.mts +297 -6
- package/node_modules/pptx-viewer-core/dist/index.d.ts +297 -6
- package/node_modules/pptx-viewer-core/dist/index.js +1309 -235
- package/node_modules/pptx-viewer-core/dist/index.mjs +1285 -236
- package/node_modules/pptx-viewer-core/dist/{presentation-DgkIYhXo.d.mts → presentation-BozkirFp.d.mts} +17 -1
- package/node_modules/pptx-viewer-core/dist/{presentation-DgkIYhXo.d.ts → presentation-BozkirFp.d.ts} +17 -1
- package/node_modules/pptx-viewer-core/dist/{text-operations-dYKZp3zE.d.mts → text-operations-B2JbPA5H.d.mts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{text-operations-B6U6XxWt.d.ts → text-operations-zwF6i4eH.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/package.json +1 -1
- package/package.json +4 -4
package/dist/viewer/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 ===
|
|
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
|
-
|
|
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
|
|
43380
|
-
exports$1.useSyncExternalStore = void 0 !==
|
|
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
|
|
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, useMemo42 = React97.useMemo, useDebugValue = React97.useDebugValue;
|
|
43404
43404
|
exports$1.useSyncExternalStoreWithSelector = function(subscribe3, getSnapshot2, getServerSnapshot2, selector, isEqual) {
|
|
43405
|
-
var instRef =
|
|
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
|
-
|
|
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
|
|
52895
|
-
"../../node_modules/.bun/@react-three+fiber@9.
|
|
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.
|
|
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.
|
|
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.
|
|
53789
|
-
|
|
53790
|
-
|
|
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+
|
|
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+
|
|
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+
|
|
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+
|
|
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+
|
|
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+
|
|
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();
|
|
@@ -70399,12 +70411,40 @@ function toCssGradientStop(stop) {
|
|
|
70399
70411
|
const posStr = pos === Math.round(pos) ? `${pos}%` : `${pos.toFixed(1)}%`;
|
|
70400
70412
|
return `${color} ${posStr}`;
|
|
70401
70413
|
}
|
|
70414
|
+
function computeGradientCenter(fillToRect, focalPoint) {
|
|
70415
|
+
if (fillToRect) {
|
|
70416
|
+
const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
|
|
70417
|
+
let cx = (l2 + (1 - r2)) / 2 * 100;
|
|
70418
|
+
let cy = (t2 + (1 - b2)) / 2 * 100;
|
|
70419
|
+
if (focalPoint) {
|
|
70420
|
+
const fpX = focalPoint.x * 100;
|
|
70421
|
+
const fpY = focalPoint.y * 100;
|
|
70422
|
+
cx = (cx + fpX) / 2;
|
|
70423
|
+
cy = (cy + fpY) / 2;
|
|
70424
|
+
}
|
|
70425
|
+
return { cx, cy };
|
|
70426
|
+
}
|
|
70427
|
+
if (focalPoint) {
|
|
70428
|
+
return { cx: focalPoint.x * 100, cy: focalPoint.y * 100 };
|
|
70429
|
+
}
|
|
70430
|
+
return { cx: 50, cy: 50 };
|
|
70431
|
+
}
|
|
70432
|
+
function buildCirclePathGradient(stops, focalPoint, fillToRect) {
|
|
70433
|
+
const stopStr = stops.map(toCssGradientStop).join(", ");
|
|
70434
|
+
const { cx, cy } = computeGradientCenter(fillToRect, focalPoint);
|
|
70435
|
+
const posX = Math.round(cx) === 50 && !focalPoint && !fillToRect ? "center" : `${Math.round(cx)}%`;
|
|
70436
|
+
const posY = Math.round(cy) === 50 && !focalPoint && !fillToRect ? "center" : `${Math.round(cy)}%`;
|
|
70437
|
+
if (fillToRect) {
|
|
70438
|
+
const radius = Math.max(cx, 100 - cx, cy, 100 - cy);
|
|
70439
|
+
return `radial-gradient(circle ${Math.round(radius)}% at ${posX} ${posY}, ${stopStr})`;
|
|
70440
|
+
}
|
|
70441
|
+
return `radial-gradient(circle at ${posX} ${posY}, ${stopStr})`;
|
|
70442
|
+
}
|
|
70402
70443
|
function buildRectPathGradient(stops, focalPoint, fillToRect) {
|
|
70403
70444
|
const stopStr = stops.map(toCssGradientStop).join(", ");
|
|
70404
70445
|
if (fillToRect) {
|
|
70405
70446
|
const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
|
|
70406
|
-
const cx
|
|
70407
|
-
const cy = (t2 + (1 - b2)) / 2 * 100;
|
|
70447
|
+
const { cx, cy } = computeGradientCenter(fillToRect, focalPoint);
|
|
70408
70448
|
const semiX = Math.max(cx, 100 - cx);
|
|
70409
70449
|
const semiY = Math.max(cy, 100 - cy);
|
|
70410
70450
|
const posX2 = `${Math.round(cx)}%`;
|
|
@@ -70427,19 +70467,27 @@ function buildShapePathGradient(stops, focalPoint, fillToRect) {
|
|
|
70427
70467
|
const stopStr = stops.map(toCssGradientStop).join(", ");
|
|
70428
70468
|
if (fillToRect) {
|
|
70429
70469
|
const { l: l2, t: t2, r: r2, b: b2 } = fillToRect;
|
|
70430
|
-
const cx
|
|
70431
|
-
const
|
|
70432
|
-
const
|
|
70433
|
-
const
|
|
70470
|
+
const { cx: cx2, cy: cy2 } = computeGradientCenter(fillToRect, focalPoint);
|
|
70471
|
+
const posX2 = `${Math.round(cx2)}%`;
|
|
70472
|
+
const posY2 = `${Math.round(cy2)}%`;
|
|
70473
|
+
const semiX = Math.max(cx2, 100 - cx2);
|
|
70474
|
+
const semiY = Math.max(cy2, 100 - cy2);
|
|
70434
70475
|
const innerHalfW = (1 - l2 - r2) / 2 * 100;
|
|
70435
70476
|
const innerHalfH = (1 - t2 - b2) / 2 * 100;
|
|
70436
70477
|
if (innerHalfW > 0.5 && innerHalfH > 0.5 && Math.abs(innerHalfW - innerHalfH) > 1) {
|
|
70437
|
-
|
|
70478
|
+
const aspect2 = innerHalfW / innerHalfH;
|
|
70479
|
+
const adjustedSemiX = Math.round(Math.max(semiX, semiY * aspect2));
|
|
70480
|
+
const adjustedSemiY = Math.round(Math.max(semiY, semiX / aspect2));
|
|
70481
|
+
return `radial-gradient(${adjustedSemiX}% ${adjustedSemiY}% at ${posX2} ${posY2}, ${stopStr})`;
|
|
70482
|
+
}
|
|
70483
|
+
if (semiX > 0.5 || semiY > 0.5) {
|
|
70484
|
+
return `radial-gradient(${Math.round(semiX)}% ${Math.round(semiY)}% at ${posX2} ${posY2}, ${stopStr})`;
|
|
70438
70485
|
}
|
|
70439
70486
|
return `radial-gradient(farthest-side at ${posX2} ${posY2}, ${stopStr})`;
|
|
70440
70487
|
}
|
|
70441
|
-
const
|
|
70442
|
-
const
|
|
70488
|
+
const { cx, cy } = computeGradientCenter(void 0, focalPoint);
|
|
70489
|
+
const posX = focalPoint ? `${Math.round(cx)}%` : "center";
|
|
70490
|
+
const posY = focalPoint ? `${Math.round(cy)}%` : "center";
|
|
70443
70491
|
return `radial-gradient(farthest-side at ${posX} ${posY}, ${stopStr})`;
|
|
70444
70492
|
}
|
|
70445
70493
|
function buildCssGradientFromShapeStyle(style) {
|
|
@@ -70461,9 +70509,7 @@ function buildCssGradientFromShapeStyle(style) {
|
|
|
70461
70509
|
if (pathType === "shape") {
|
|
70462
70510
|
return buildShapePathGradient(stops, fp, ftr);
|
|
70463
70511
|
}
|
|
70464
|
-
|
|
70465
|
-
const posY = fp ? `${Math.round(fp.y * 100)}%` : "center";
|
|
70466
|
-
return `radial-gradient(circle at ${posX} ${posY}, ${stops.map(toCssGradientStop).join(", ")})`;
|
|
70512
|
+
return buildCirclePathGradient(stops, fp, ftr);
|
|
70467
70513
|
}
|
|
70468
70514
|
const normalizedAngle = typeof style.fillGradientAngle === "number" && Number.isFinite(style.fillGradientAngle) ? style.fillGradientAngle : 90;
|
|
70469
70515
|
return `linear-gradient(${Math.round(normalizedAngle)}deg, ${stops.map(toCssGradientStop).join(", ")})`;
|
|
@@ -70862,8 +70908,10 @@ function getTextStyleForElement(element2, fallbackColor) {
|
|
|
70862
70908
|
const verticalDirection = toCssVerticalDirection(element2.textStyle?.textDirection);
|
|
70863
70909
|
const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
|
|
70864
70910
|
const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
|
|
70911
|
+
const hasSegments = (element2.textSegments?.length ?? 0) > 0;
|
|
70865
70912
|
return {
|
|
70866
70913
|
color: resolvedTextColor,
|
|
70914
|
+
backgroundColor: !hasSegments && element2.textStyle?.highlightColor ? normalizeHexColor(element2.textStyle.highlightColor, void 0) : void 0,
|
|
70867
70915
|
textAlign: (() => {
|
|
70868
70916
|
const a2 = element2.textStyle?.align;
|
|
70869
70917
|
if (a2 === "justLow" || a2 === "dist" || a2 === "thaiDist") {
|
|
@@ -84937,6 +84985,79 @@ function comparePresentation(base, compare) {
|
|
|
84937
84985
|
unchangedCount
|
|
84938
84986
|
};
|
|
84939
84987
|
}
|
|
84988
|
+
function copyFormatFromElement(element2) {
|
|
84989
|
+
const result = {};
|
|
84990
|
+
if (pptxViewerCore.hasShapeProperties(element2) && element2.shapeStyle) {
|
|
84991
|
+
const s = element2.shapeStyle;
|
|
84992
|
+
result.shapeStyle = {
|
|
84993
|
+
fillColor: s.fillColor,
|
|
84994
|
+
fillMode: s.fillMode,
|
|
84995
|
+
fillGradient: s.fillGradient,
|
|
84996
|
+
fillGradientStops: s.fillGradientStops ? [...s.fillGradientStops] : void 0,
|
|
84997
|
+
fillGradientAngle: s.fillGradientAngle,
|
|
84998
|
+
fillGradientType: s.fillGradientType,
|
|
84999
|
+
fillOpacity: s.fillOpacity,
|
|
85000
|
+
fillPatternPreset: s.fillPatternPreset,
|
|
85001
|
+
fillPatternBackgroundColor: s.fillPatternBackgroundColor,
|
|
85002
|
+
strokeColor: s.strokeColor,
|
|
85003
|
+
strokeWidth: s.strokeWidth,
|
|
85004
|
+
strokeOpacity: s.strokeOpacity,
|
|
85005
|
+
strokeDash: s.strokeDash,
|
|
85006
|
+
lineJoin: s.lineJoin,
|
|
85007
|
+
lineCap: s.lineCap,
|
|
85008
|
+
shadowColor: s.shadowColor,
|
|
85009
|
+
shadowBlur: s.shadowBlur,
|
|
85010
|
+
shadowOffsetX: s.shadowOffsetX,
|
|
85011
|
+
shadowOffsetY: s.shadowOffsetY,
|
|
85012
|
+
shadowOpacity: s.shadowOpacity,
|
|
85013
|
+
glowColor: s.glowColor,
|
|
85014
|
+
glowRadius: s.glowRadius,
|
|
85015
|
+
glowOpacity: s.glowOpacity,
|
|
85016
|
+
softEdgeRadius: s.softEdgeRadius
|
|
85017
|
+
};
|
|
85018
|
+
}
|
|
85019
|
+
if (pptxViewerCore.hasTextProperties(element2) && element2.textStyle) {
|
|
85020
|
+
const t2 = element2.textStyle;
|
|
85021
|
+
result.textStyle = {
|
|
85022
|
+
fontFamily: t2.fontFamily,
|
|
85023
|
+
fontSize: t2.fontSize,
|
|
85024
|
+
bold: t2.bold,
|
|
85025
|
+
italic: t2.italic,
|
|
85026
|
+
underline: t2.underline,
|
|
85027
|
+
underlineStyle: t2.underlineStyle,
|
|
85028
|
+
strikethrough: t2.strikethrough,
|
|
85029
|
+
color: t2.color,
|
|
85030
|
+
align: t2.align,
|
|
85031
|
+
lineSpacing: t2.lineSpacing,
|
|
85032
|
+
paragraphSpacingBefore: t2.paragraphSpacingBefore,
|
|
85033
|
+
paragraphSpacingAfter: t2.paragraphSpacingAfter,
|
|
85034
|
+
textCaps: t2.textCaps
|
|
85035
|
+
};
|
|
85036
|
+
}
|
|
85037
|
+
return result;
|
|
85038
|
+
}
|
|
85039
|
+
function applyFormatToElement(element2, format) {
|
|
85040
|
+
let updated = { ...element2 };
|
|
85041
|
+
if (format.shapeStyle && pptxViewerCore.hasShapeProperties(updated)) {
|
|
85042
|
+
updated = {
|
|
85043
|
+
...updated,
|
|
85044
|
+
shapeStyle: {
|
|
85045
|
+
...updated.shapeStyle,
|
|
85046
|
+
...format.shapeStyle
|
|
85047
|
+
}
|
|
85048
|
+
};
|
|
85049
|
+
}
|
|
85050
|
+
if (format.textStyle && pptxViewerCore.hasTextProperties(updated)) {
|
|
85051
|
+
updated = {
|
|
85052
|
+
...updated,
|
|
85053
|
+
textStyle: {
|
|
85054
|
+
...updated.textStyle,
|
|
85055
|
+
...format.textStyle
|
|
85056
|
+
}
|
|
85057
|
+
};
|
|
85058
|
+
}
|
|
85059
|
+
return updated;
|
|
85060
|
+
}
|
|
84940
85061
|
|
|
84941
85062
|
// src/viewer/utils/animation-preview.ts
|
|
84942
85063
|
var PRESET_TO_EFFECT = {
|
|
@@ -91313,13 +91434,24 @@ function usePresenceTracking({
|
|
|
91313
91434
|
}, []);
|
|
91314
91435
|
return { remoteUsers, broadcastPresence };
|
|
91315
91436
|
}
|
|
91437
|
+
var CONNECTION_TIMEOUT_MS = 3e4;
|
|
91316
91438
|
function useYjsProvider({ config }) {
|
|
91317
91439
|
const [status, setStatus] = React10.useState("disconnected");
|
|
91318
91440
|
const [awareness, setAwareness] = React10.useState(null);
|
|
91319
91441
|
const [doc2, setDoc] = React10.useState(null);
|
|
91320
91442
|
const [clientId, setClientId] = React10.useState(null);
|
|
91321
91443
|
const cleanupRef = React10.useRef(null);
|
|
91444
|
+
const timeoutRef = React10.useRef(null);
|
|
91445
|
+
const teardown = React10.useCallback(() => {
|
|
91446
|
+
if (timeoutRef.current) {
|
|
91447
|
+
clearTimeout(timeoutRef.current);
|
|
91448
|
+
timeoutRef.current = null;
|
|
91449
|
+
}
|
|
91450
|
+
cleanupRef.current?.();
|
|
91451
|
+
cleanupRef.current = null;
|
|
91452
|
+
}, []);
|
|
91322
91453
|
const init = React10.useCallback(async () => {
|
|
91454
|
+
teardown();
|
|
91323
91455
|
const roomId = validateRoomId(config.roomId);
|
|
91324
91456
|
setStatus("connecting");
|
|
91325
91457
|
try {
|
|
@@ -91334,8 +91466,14 @@ function useYjsProvider({ config }) {
|
|
|
91334
91466
|
params: config.authToken ? { token: config.authToken } : void 0
|
|
91335
91467
|
}
|
|
91336
91468
|
);
|
|
91469
|
+
let connected = false;
|
|
91337
91470
|
const handleStatus = (event) => {
|
|
91338
91471
|
if (event.status === "connected") {
|
|
91472
|
+
connected = true;
|
|
91473
|
+
if (timeoutRef.current) {
|
|
91474
|
+
clearTimeout(timeoutRef.current);
|
|
91475
|
+
timeoutRef.current = null;
|
|
91476
|
+
}
|
|
91339
91477
|
setStatus("connected");
|
|
91340
91478
|
} else if (event.status === "disconnected") {
|
|
91341
91479
|
setStatus("disconnected");
|
|
@@ -91343,8 +91481,24 @@ function useYjsProvider({ config }) {
|
|
|
91343
91481
|
};
|
|
91344
91482
|
provider.on("status", handleStatus);
|
|
91345
91483
|
if (provider.wsconnected) {
|
|
91484
|
+
connected = true;
|
|
91346
91485
|
setStatus("connected");
|
|
91347
91486
|
}
|
|
91487
|
+
if (!connected) {
|
|
91488
|
+
timeoutRef.current = setTimeout(() => {
|
|
91489
|
+
timeoutRef.current = null;
|
|
91490
|
+
if (!connected) {
|
|
91491
|
+
provider.off("status", handleStatus);
|
|
91492
|
+
provider.destroy();
|
|
91493
|
+
yDoc.destroy();
|
|
91494
|
+
setDoc(null);
|
|
91495
|
+
setAwareness(null);
|
|
91496
|
+
setClientId(null);
|
|
91497
|
+
cleanupRef.current = null;
|
|
91498
|
+
setStatus("error");
|
|
91499
|
+
}
|
|
91500
|
+
}, CONNECTION_TIMEOUT_MS);
|
|
91501
|
+
}
|
|
91348
91502
|
setDoc(yDoc);
|
|
91349
91503
|
setAwareness(provider.awareness);
|
|
91350
91504
|
setClientId(provider.awareness.clientID);
|
|
@@ -91364,15 +91518,15 @@ function useYjsProvider({ config }) {
|
|
|
91364
91518
|
);
|
|
91365
91519
|
setStatus("error");
|
|
91366
91520
|
}
|
|
91367
|
-
}, [config.roomId, config.serverUrl, config.authToken]);
|
|
91521
|
+
}, [config.roomId, config.serverUrl, config.authToken, teardown]);
|
|
91368
91522
|
React10.useEffect(() => {
|
|
91369
91523
|
init();
|
|
91370
|
-
return
|
|
91371
|
-
|
|
91372
|
-
|
|
91373
|
-
|
|
91524
|
+
return teardown;
|
|
91525
|
+
}, [init, teardown]);
|
|
91526
|
+
const retry = React10.useCallback(() => {
|
|
91527
|
+
init();
|
|
91374
91528
|
}, [init]);
|
|
91375
|
-
return { status, awareness, doc: doc2, clientId };
|
|
91529
|
+
return { status, awareness, doc: doc2, clientId, retry };
|
|
91376
91530
|
}
|
|
91377
91531
|
|
|
91378
91532
|
// src/viewer/hooks/collaboration/useCollaborativeState.ts
|
|
@@ -91382,7 +91536,7 @@ function useCollaborativeState({
|
|
|
91382
91536
|
canvasHeight
|
|
91383
91537
|
}) {
|
|
91384
91538
|
const userColor = sanitizeColor(config.userColor, "#6366f1");
|
|
91385
|
-
const { status, awareness, doc: doc2, clientId } = useYjsProvider({ config });
|
|
91539
|
+
const { status, awareness, doc: doc2, clientId, retry } = useYjsProvider({ config });
|
|
91386
91540
|
const { remoteUsers, broadcastPresence } = usePresenceTracking({
|
|
91387
91541
|
awareness,
|
|
91388
91542
|
localClientId: clientId,
|
|
@@ -91400,7 +91554,8 @@ function useCollaborativeState({
|
|
|
91400
91554
|
broadcastPresence,
|
|
91401
91555
|
connectedCount,
|
|
91402
91556
|
config,
|
|
91403
|
-
doc: doc2
|
|
91557
|
+
doc: doc2,
|
|
91558
|
+
retry
|
|
91404
91559
|
};
|
|
91405
91560
|
}
|
|
91406
91561
|
var CollaborationContext = React10.createContext(null);
|
|
@@ -91611,7 +91766,8 @@ var STATUS_STYLES = {
|
|
|
91611
91766
|
};
|
|
91612
91767
|
function CollaborationStatusIndicator({
|
|
91613
91768
|
status,
|
|
91614
|
-
connectedCount
|
|
91769
|
+
connectedCount,
|
|
91770
|
+
onRetry
|
|
91615
91771
|
}) {
|
|
91616
91772
|
const { t: t2 } = reactI18next.useTranslation();
|
|
91617
91773
|
const style = STATUS_STYLES[status];
|
|
@@ -91626,7 +91782,17 @@ function CollaborationStatusIndicator({
|
|
|
91626
91782
|
}),
|
|
91627
91783
|
children: [
|
|
91628
91784
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `inline-block w-2 h-2 rounded-full ${style.dot}`, "aria-hidden": "true" }),
|
|
91629
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${style.text}`, children: status === "connected" ? t2("pptx.collaboration.userCount", { count: connectedCount }) : t2(`pptx.collaboration.status.${status}`) })
|
|
91785
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] ${style.text}`, children: status === "connected" ? t2("pptx.collaboration.userCount", { count: connectedCount }) : t2(`pptx.collaboration.status.${status}`) }),
|
|
91786
|
+
status === "error" && onRetry && /* @__PURE__ */ jsxRuntime.jsx(
|
|
91787
|
+
"button",
|
|
91788
|
+
{
|
|
91789
|
+
type: "button",
|
|
91790
|
+
onClick: onRetry,
|
|
91791
|
+
className: "text-[10px] text-blue-400 hover:text-blue-300 underline underline-offset-2 transition-colors",
|
|
91792
|
+
"aria-label": t2("pptx.collaboration.retry"),
|
|
91793
|
+
children: t2("pptx.collaboration.retry")
|
|
91794
|
+
}
|
|
91795
|
+
)
|
|
91630
91796
|
]
|
|
91631
91797
|
}
|
|
91632
91798
|
);
|
|
@@ -97256,6 +97422,11 @@ var OV = [
|
|
|
97256
97422
|
l: "Package for Sharing",
|
|
97257
97423
|
i: /* @__PURE__ */ jsxRuntime.jsx(lu.LuFolderOpen, { className: `${ics} text-muted-foreground` })
|
|
97258
97424
|
},
|
|
97425
|
+
{
|
|
97426
|
+
k: "pptx",
|
|
97427
|
+
l: "Save as Presentation (.pptx)",
|
|
97428
|
+
i: /* @__PURE__ */ jsxRuntime.jsx(lu.LuDownload, { className: `${ics} text-muted-foreground` })
|
|
97429
|
+
},
|
|
97259
97430
|
{
|
|
97260
97431
|
k: "ppsx",
|
|
97261
97432
|
l: "Save as Slide Show (.ppsx)",
|
|
@@ -97405,6 +97576,10 @@ function AnimationsSection(p3) {
|
|
|
97405
97576
|
{
|
|
97406
97577
|
type: "button",
|
|
97407
97578
|
disabled,
|
|
97579
|
+
onClick: () => p3.onAddAnimation?.(
|
|
97580
|
+
item.value,
|
|
97581
|
+
group.group.toLowerCase()
|
|
97582
|
+
),
|
|
97408
97583
|
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",
|
|
97409
97584
|
title: t2("pptx.animations.applyAnimation", {
|
|
97410
97585
|
name: t2(`pptx.animations.preset.${item.value}`)
|
|
@@ -97421,6 +97596,7 @@ function AnimationsSection(p3) {
|
|
|
97421
97596
|
{
|
|
97422
97597
|
type: "button",
|
|
97423
97598
|
disabled,
|
|
97599
|
+
onClick: p3.onRemoveAnimation,
|
|
97424
97600
|
className: pill,
|
|
97425
97601
|
title: t2("pptx.animations.removeTooltip"),
|
|
97426
97602
|
children: [
|
|
@@ -97830,6 +98006,10 @@ function DrawSection(p3) {
|
|
|
97830
98006
|
}
|
|
97831
98007
|
function FileSection(p3) {
|
|
97832
98008
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
98009
|
+
/* @__PURE__ */ jsxRuntime.jsxs("button", { onClick: p3.onSaveAsPptx, className: pill, title: "Save as Presentation (.pptx)", children: [
|
|
98010
|
+
/* @__PURE__ */ jsxRuntime.jsx(lu.LuDownload, { className: ic2 }),
|
|
98011
|
+
"Save .pptx"
|
|
98012
|
+
] }),
|
|
97833
98013
|
/* @__PURE__ */ jsxRuntime.jsxs("button", { onClick: p3.onSaveAsPpsx, className: pill, title: "Save as Slide Show (.ppsx)", children: [
|
|
97834
98014
|
/* @__PURE__ */ jsxRuntime.jsx(lu.LuPlay, { className: ic2 }),
|
|
97835
98015
|
"Save .ppsx"
|
|
@@ -98555,6 +98735,19 @@ function SlideShowSection(p3) {
|
|
|
98555
98735
|
)
|
|
98556
98736
|
] });
|
|
98557
98737
|
}
|
|
98738
|
+
function getEffectiveTextStyle(element2, tableEditorState) {
|
|
98739
|
+
if (!element2) {
|
|
98740
|
+
return void 0;
|
|
98741
|
+
}
|
|
98742
|
+
if (pptxViewerCore.hasTextProperties(element2)) {
|
|
98743
|
+
return element2.textStyle;
|
|
98744
|
+
}
|
|
98745
|
+
if (element2.type === "table" && tableEditorState && element2.tableData) {
|
|
98746
|
+
const cell = element2.tableData.rows[tableEditorState.rowIndex]?.cells[tableEditorState.columnIndex];
|
|
98747
|
+
return cell?.style;
|
|
98748
|
+
}
|
|
98749
|
+
return void 0;
|
|
98750
|
+
}
|
|
98558
98751
|
var FONT_COLOR_PRESETS = [
|
|
98559
98752
|
"#000000",
|
|
98560
98753
|
"#ffffff",
|
|
@@ -98585,7 +98778,8 @@ function TextSection(p3) {
|
|
|
98585
98778
|
const isTextEl = hasSel && p3.selectedElement !== null && pptxViewerCore.hasTextProperties(p3.selectedElement);
|
|
98586
98779
|
const isTable = hasSel && p3.selectedElement?.type === "table";
|
|
98587
98780
|
const canFormat = isTextEl || isTable;
|
|
98588
|
-
const
|
|
98781
|
+
const effectiveTs = getEffectiveTextStyle(p3.selectedElement, p3.tableEditorState);
|
|
98782
|
+
const currentColor = isTextEl && p3.selectedElement && pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.color ?? p3.selectedElement.textStyle?.color ?? "#000000" : effectiveTs?.color ?? "#000000";
|
|
98589
98783
|
const currentHighlight = isTextEl && p3.selectedElement && pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textSegments?.[0]?.style?.highlightColor ?? p3.selectedElement.textStyle?.highlightColor ?? "#ffff00" : "#ffff00";
|
|
98590
98784
|
const colorInputRef = React10.useRef(null);
|
|
98591
98785
|
const highlightInputRef = React10.useRef(null);
|
|
@@ -98615,7 +98809,7 @@ function TextSection(p3) {
|
|
|
98615
98809
|
if (!canFormat || !p3.selectedElement) {
|
|
98616
98810
|
return;
|
|
98617
98811
|
}
|
|
98618
|
-
const ts =
|
|
98812
|
+
const ts = effectiveTs;
|
|
98619
98813
|
switch (b2.t) {
|
|
98620
98814
|
case "Bold":
|
|
98621
98815
|
p3.onUpdateTextStyle({ bold: !ts?.bold });
|
|
@@ -98660,8 +98854,7 @@ function TextSection(p3) {
|
|
|
98660
98854
|
if (!canFormat || !p3.selectedElement) {
|
|
98661
98855
|
return;
|
|
98662
98856
|
}
|
|
98663
|
-
const
|
|
98664
|
-
const current = ts?.fontSize ?? 18;
|
|
98857
|
+
const current = effectiveTs?.fontSize ?? 18;
|
|
98665
98858
|
p3.onUpdateTextStyle({ fontSize: current + 2 });
|
|
98666
98859
|
},
|
|
98667
98860
|
className: gB,
|
|
@@ -98679,8 +98872,7 @@ function TextSection(p3) {
|
|
|
98679
98872
|
if (!canFormat || !p3.selectedElement) {
|
|
98680
98873
|
return;
|
|
98681
98874
|
}
|
|
98682
|
-
const
|
|
98683
|
-
const current = ts?.fontSize ?? 18;
|
|
98875
|
+
const current = effectiveTs?.fontSize ?? 18;
|
|
98684
98876
|
p3.onUpdateTextStyle({ fontSize: Math.max(1, current - 2) });
|
|
98685
98877
|
},
|
|
98686
98878
|
className: gB,
|
|
@@ -98851,9 +99043,8 @@ function TextSection(p3) {
|
|
|
98851
99043
|
if (!canFormat || !p3.selectedElement) {
|
|
98852
99044
|
return;
|
|
98853
99045
|
}
|
|
98854
|
-
const ts = pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
|
|
98855
99046
|
p3.onUpdateTextStyle({
|
|
98856
|
-
listType:
|
|
99047
|
+
listType: effectiveTs?.listType === "bullet" ? "none" : "bullet"
|
|
98857
99048
|
});
|
|
98858
99049
|
},
|
|
98859
99050
|
className: gB,
|
|
@@ -98871,9 +99062,8 @@ function TextSection(p3) {
|
|
|
98871
99062
|
if (!canFormat || !p3.selectedElement) {
|
|
98872
99063
|
return;
|
|
98873
99064
|
}
|
|
98874
|
-
const ts = pptxViewerCore.hasTextProperties(p3.selectedElement) ? p3.selectedElement.textStyle : void 0;
|
|
98875
99065
|
p3.onUpdateTextStyle({
|
|
98876
|
-
listType:
|
|
99066
|
+
listType: effectiveTs?.listType === "numbered" ? "none" : "numbered"
|
|
98877
99067
|
});
|
|
98878
99068
|
},
|
|
98879
99069
|
className: gL,
|
|
@@ -98893,8 +99083,7 @@ function TextSection(p3) {
|
|
|
98893
99083
|
if (!canFormat || !p3.selectedElement) {
|
|
98894
99084
|
return;
|
|
98895
99085
|
}
|
|
98896
|
-
const
|
|
98897
|
-
const current = ts?.paragraphMarginLeft ?? 0;
|
|
99086
|
+
const current = effectiveTs?.paragraphMarginLeft ?? 0;
|
|
98898
99087
|
p3.onUpdateTextStyle({
|
|
98899
99088
|
paragraphMarginLeft: Math.max(0, current - 24)
|
|
98900
99089
|
});
|
|
@@ -98914,8 +99103,7 @@ function TextSection(p3) {
|
|
|
98914
99103
|
if (!canFormat || !p3.selectedElement) {
|
|
98915
99104
|
return;
|
|
98916
99105
|
}
|
|
98917
|
-
const
|
|
98918
|
-
const current = ts?.paragraphMarginLeft ?? 0;
|
|
99106
|
+
const current = effectiveTs?.paragraphMarginLeft ?? 0;
|
|
98919
99107
|
p3.onUpdateTextStyle({
|
|
98920
99108
|
paragraphMarginLeft: current + 24
|
|
98921
99109
|
});
|
|
@@ -99252,6 +99440,7 @@ function OverflowMenu(p3) {
|
|
|
99252
99440
|
video: p3.onExportVideo,
|
|
99253
99441
|
gif: p3.onExportGif,
|
|
99254
99442
|
package: p3.onPackageForSharing,
|
|
99443
|
+
pptx: p3.onSaveAsPptx,
|
|
99255
99444
|
ppsx: p3.onSaveAsPpsx,
|
|
99256
99445
|
pptm: p3.onSaveAsPptm,
|
|
99257
99446
|
print: p3.onPrint,
|
|
@@ -99699,6 +99888,7 @@ function Toolbar(p3) {
|
|
|
99699
99888
|
onExportVideo: p3.onExportVideo,
|
|
99700
99889
|
onExportGif: p3.onExportGif,
|
|
99701
99890
|
onPackageForSharing: p3.onPackageForSharing,
|
|
99891
|
+
onSaveAsPptx: p3.onSaveAsPptx,
|
|
99702
99892
|
onSaveAsPpsx: p3.onSaveAsPpsx,
|
|
99703
99893
|
onSaveAsPptm: p3.onSaveAsPptm,
|
|
99704
99894
|
hasMacros: p3.hasMacros,
|
|
@@ -99748,6 +99938,7 @@ function Toolbar(p3) {
|
|
|
99748
99938
|
{
|
|
99749
99939
|
canEdit: p3.canEdit,
|
|
99750
99940
|
selectedElement: p3.selectedElement,
|
|
99941
|
+
tableEditorState: p3.tableEditorState,
|
|
99751
99942
|
onUpdateTextStyle: p3.onUpdateTextStyle
|
|
99752
99943
|
}
|
|
99753
99944
|
),
|
|
@@ -99808,7 +99999,9 @@ function Toolbar(p3) {
|
|
|
99808
99999
|
selectedElement: p3.selectedElement,
|
|
99809
100000
|
isInspectorPaneOpen: p3.isInspectorPaneOpen,
|
|
99810
100001
|
onToggleInspector: p3.onToggleInspector,
|
|
99811
|
-
onOpenAnimationPanel: p3.onOpenAnimationPanel
|
|
100002
|
+
onOpenAnimationPanel: p3.onOpenAnimationPanel,
|
|
100003
|
+
onAddAnimation: p3.onAddAnimation,
|
|
100004
|
+
onRemoveAnimation: p3.onRemoveAnimation
|
|
99812
100005
|
}
|
|
99813
100006
|
),
|
|
99814
100007
|
sSlw && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -109992,8 +110185,61 @@ function ViewerToolbarSection(props) {
|
|
|
109992
110185
|
onEnterPresenterView,
|
|
109993
110186
|
onEnterRehearsalMode,
|
|
109994
110187
|
onOpenSettings,
|
|
109995
|
-
onOpenShareDialog
|
|
110188
|
+
onOpenShareDialog,
|
|
110189
|
+
onToggleFormatPainter: onToggleFormatPainterProp
|
|
109996
110190
|
} = props;
|
|
110191
|
+
const handleAddAnimation = React10.useCallback(
|
|
110192
|
+
(preset, group) => {
|
|
110193
|
+
if (!selectedElement || !activeSlide) {
|
|
110194
|
+
return;
|
|
110195
|
+
}
|
|
110196
|
+
const current = activeSlide.animations ?? [];
|
|
110197
|
+
const existing = current.find((a2) => a2.elementId === selectedElement.id);
|
|
110198
|
+
const presetValue = preset;
|
|
110199
|
+
if (existing) {
|
|
110200
|
+
const updated = current.map(
|
|
110201
|
+
(a2) => a2.elementId === selectedElement.id ? { ...a2, [group]: presetValue } : a2
|
|
110202
|
+
);
|
|
110203
|
+
propertyHandlers.handleUpdateSlide({ animations: updated });
|
|
110204
|
+
} else {
|
|
110205
|
+
const newAnim = {
|
|
110206
|
+
elementId: selectedElement.id,
|
|
110207
|
+
[group]: presetValue,
|
|
110208
|
+
durationMs: 500,
|
|
110209
|
+
order: current.length,
|
|
110210
|
+
trigger: "onClick"
|
|
110211
|
+
};
|
|
110212
|
+
propertyHandlers.handleUpdateSlide({ animations: [...current, newAnim] });
|
|
110213
|
+
}
|
|
110214
|
+
},
|
|
110215
|
+
[selectedElement, activeSlide, propertyHandlers]
|
|
110216
|
+
);
|
|
110217
|
+
const handleRemoveAnimation = React10.useCallback(() => {
|
|
110218
|
+
if (!selectedElement || !activeSlide) {
|
|
110219
|
+
return;
|
|
110220
|
+
}
|
|
110221
|
+
const current = activeSlide.animations ?? [];
|
|
110222
|
+
const filtered = current.filter((a2) => a2.elementId !== selectedElement.id);
|
|
110223
|
+
propertyHandlers.handleUpdateSlide({ animations: filtered });
|
|
110224
|
+
}, [selectedElement, activeSlide, propertyHandlers]);
|
|
110225
|
+
const handleTransitionChange = React10.useCallback(
|
|
110226
|
+
(updates) => {
|
|
110227
|
+
if (!activeSlide) {
|
|
110228
|
+
return;
|
|
110229
|
+
}
|
|
110230
|
+
const current = activeSlide.transition ?? { type: "none" };
|
|
110231
|
+
propertyHandlers.handleUpdateSlide({ transition: { ...current, ...updates } });
|
|
110232
|
+
},
|
|
110233
|
+
[activeSlide, propertyHandlers]
|
|
110234
|
+
);
|
|
110235
|
+
const handleApplyTransitionToAll = React10.useCallback(() => {
|
|
110236
|
+
const transition = activeSlide?.transition;
|
|
110237
|
+
if (!transition) {
|
|
110238
|
+
return;
|
|
110239
|
+
}
|
|
110240
|
+
ops.updateSlides((prev) => prev.map((sl) => ({ ...sl, transition })));
|
|
110241
|
+
history.markDirty();
|
|
110242
|
+
}, [activeSlide, ops, history]);
|
|
109997
110243
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
109998
110244
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
109999
110245
|
Toolbar,
|
|
@@ -110012,6 +110258,7 @@ function ViewerToolbarSection(props) {
|
|
|
110012
110258
|
redoLabel: history.redoLabel,
|
|
110013
110259
|
findReplaceOpen: findReplace.findReplaceOpen,
|
|
110014
110260
|
selectedElement,
|
|
110261
|
+
tableEditorState: s.tableEditorState,
|
|
110015
110262
|
editTemplateMode: s.editTemplateMode,
|
|
110016
110263
|
newShapeType: s.newShapeType,
|
|
110017
110264
|
activeTool: s.activeTool,
|
|
@@ -110025,6 +110272,8 @@ function ViewerToolbarSection(props) {
|
|
|
110025
110272
|
s.setIsInspectorPaneOpen(true);
|
|
110026
110273
|
s.setSidebarPanelMode("properties");
|
|
110027
110274
|
},
|
|
110275
|
+
onAddAnimation: handleAddAnimation,
|
|
110276
|
+
onRemoveAnimation: handleRemoveAnimation,
|
|
110028
110277
|
onToggleCompactToolbar: () => s.setIsCompactToolbarOpen((p3) => !p3),
|
|
110029
110278
|
onSetToolbarSection: s.setToolbarSection,
|
|
110030
110279
|
onZoomIn: zoom.handleZoomIn,
|
|
@@ -110076,6 +110325,7 @@ function ViewerToolbarSection(props) {
|
|
|
110076
110325
|
onExportGif: exportHandlers.handleExportGif,
|
|
110077
110326
|
onPackageForSharing: exportHandlers.handlePackageForSharing,
|
|
110078
110327
|
onOpenShareDialog,
|
|
110328
|
+
onSaveAsPptx: exportHandlers.handleSaveAsPptx,
|
|
110079
110329
|
onSaveAsPpsx: exportHandlers.handleSaveAsPpsx,
|
|
110080
110330
|
onSaveAsPptm: exportHandlers.handleSaveAsPptm,
|
|
110081
110331
|
hasMacros: s.hasMacros,
|
|
@@ -110121,7 +110371,7 @@ function ViewerToolbarSection(props) {
|
|
|
110121
110371
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
110122
110372
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
110123
110373
|
formatPainterActive: s.formatPainterActive,
|
|
110124
|
-
onToggleFormatPainter: () => s.setFormatPainterActive((p3) => !p3),
|
|
110374
|
+
onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p3) => !p3)),
|
|
110125
110375
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
110126
110376
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p3) => !p3),
|
|
110127
110377
|
eyedropperActive: s.eyedropperActive,
|
|
@@ -110129,7 +110379,10 @@ function ViewerToolbarSection(props) {
|
|
|
110129
110379
|
onOpenSetUpSlideShow: () => dialogs.setIsSetUpSlideShowOpen(true),
|
|
110130
110380
|
onOpenBroadcastDialog: () => dialogs.setIsBroadcastDialogOpen(true),
|
|
110131
110381
|
onToggleSubtitles: dialogs.handleToggleSubtitles,
|
|
110132
|
-
showSubtitles: Boolean(s.presentationProperties.showSubtitles)
|
|
110382
|
+
showSubtitles: Boolean(s.presentationProperties.showSubtitles),
|
|
110383
|
+
activeSlide,
|
|
110384
|
+
onTransitionChange: handleTransitionChange,
|
|
110385
|
+
onApplyTransitionToAll: handleApplyTransitionToAll
|
|
110133
110386
|
}
|
|
110134
110387
|
),
|
|
110135
110388
|
s.hasDigitalSignatures && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center px-3 py-1 z-10", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -116923,12 +117176,50 @@ function useEditorOperations(input) {
|
|
|
116923
117176
|
}),
|
|
116924
117177
|
[ops, combinedUpdateTextStyle]
|
|
116925
117178
|
);
|
|
117179
|
+
const copiedFormatRef = React10.useRef(null);
|
|
117180
|
+
const prevFormatPainterRef = React10.useRef(false);
|
|
117181
|
+
React10.useEffect(() => {
|
|
117182
|
+
if (state2.formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
117183
|
+
copiedFormatRef.current = copyFormatFromElement(selectedElement);
|
|
117184
|
+
} else if (!state2.formatPainterActive) {
|
|
117185
|
+
copiedFormatRef.current = null;
|
|
117186
|
+
}
|
|
117187
|
+
prevFormatPainterRef.current = state2.formatPainterActive;
|
|
117188
|
+
}, [state2.formatPainterActive, selectedElement]);
|
|
117189
|
+
const formatPainterCanvasHandlers = React10.useMemo(
|
|
117190
|
+
() => ({
|
|
117191
|
+
...canvasHandlers,
|
|
117192
|
+
handleElementClick: (elementId, e2) => {
|
|
117193
|
+
if (state2.formatPainterActive && copiedFormatRef.current) {
|
|
117194
|
+
e2.stopPropagation();
|
|
117195
|
+
const element2 = state2.elementLookup.get(elementId);
|
|
117196
|
+
if (element2) {
|
|
117197
|
+
const updated = applyFormatToElement(element2, copiedFormatRef.current);
|
|
117198
|
+
const updates = {};
|
|
117199
|
+
if (pptxViewerCore.hasShapeProperties(updated)) {
|
|
117200
|
+
updates.shapeStyle = updated.shapeStyle;
|
|
117201
|
+
}
|
|
117202
|
+
if (pptxViewerCore.hasTextProperties(updated)) {
|
|
117203
|
+
updates.textStyle = updated.textStyle;
|
|
117204
|
+
}
|
|
117205
|
+
ops.updateElementById(elementId, updates);
|
|
117206
|
+
}
|
|
117207
|
+
copiedFormatRef.current = null;
|
|
117208
|
+
state2.setFormatPainterActive(false);
|
|
117209
|
+
ops.applySelection(elementId);
|
|
117210
|
+
return;
|
|
117211
|
+
}
|
|
117212
|
+
canvasHandlers.handleElementClick(elementId, e2);
|
|
117213
|
+
}
|
|
117214
|
+
}),
|
|
117215
|
+
[canvasHandlers, ops, state2]
|
|
117216
|
+
);
|
|
116926
117217
|
return {
|
|
116927
117218
|
ops: combinedOps,
|
|
116928
117219
|
sectionOps,
|
|
116929
117220
|
findReplace,
|
|
116930
117221
|
comments,
|
|
116931
|
-
canvasHandlers,
|
|
117222
|
+
canvasHandlers: formatPainterCanvasHandlers,
|
|
116932
117223
|
insertHandlers,
|
|
116933
117224
|
manipulation,
|
|
116934
117225
|
slideOps,
|
|
@@ -121127,6 +121418,9 @@ function useExportSaveAs(input) {
|
|
|
121127
121418
|
};
|
|
121128
121419
|
return handler.save(slidesWithGuides, saveOptions);
|
|
121129
121420
|
};
|
|
121421
|
+
const handleSaveAsPptx = () => {
|
|
121422
|
+
void handleSaveAsFormat("pptx");
|
|
121423
|
+
};
|
|
121130
121424
|
const handleSaveAsPpsx = () => {
|
|
121131
121425
|
void handleSaveAsFormat("ppsx");
|
|
121132
121426
|
};
|
|
@@ -121136,6 +121430,7 @@ function useExportSaveAs(input) {
|
|
|
121136
121430
|
return {
|
|
121137
121431
|
handlePackageForSharing,
|
|
121138
121432
|
handleSaveAsFormat,
|
|
121433
|
+
handleSaveAsPptx,
|
|
121139
121434
|
handleSaveAsPpsx,
|
|
121140
121435
|
handleSaveAsPptm
|
|
121141
121436
|
};
|
|
@@ -121176,7 +121471,13 @@ function useExportHandlers(input) {
|
|
|
121176
121471
|
setExportStatusMessage,
|
|
121177
121472
|
exportAbortRef
|
|
121178
121473
|
};
|
|
121179
|
-
const {
|
|
121474
|
+
const {
|
|
121475
|
+
handlePackageForSharing,
|
|
121476
|
+
handleSaveAsFormat,
|
|
121477
|
+
handleSaveAsPptx,
|
|
121478
|
+
handleSaveAsPpsx,
|
|
121479
|
+
handleSaveAsPptm
|
|
121480
|
+
} = useExportSaveAs({
|
|
121180
121481
|
slides,
|
|
121181
121482
|
filePath,
|
|
121182
121483
|
handlerRef,
|
|
@@ -121403,6 +121704,7 @@ function useExportHandlers(input) {
|
|
|
121403
121704
|
handleExportGif,
|
|
121404
121705
|
handlePackageForSharing,
|
|
121405
121706
|
handleSaveAsFormat,
|
|
121707
|
+
handleSaveAsPptx,
|
|
121406
121708
|
handleSaveAsPpsx,
|
|
121407
121709
|
handleSaveAsPptm,
|
|
121408
121710
|
handleCancelExport,
|
|
@@ -124046,7 +124348,14 @@ function CollaborationStatusStrip() {
|
|
|
124046
124348
|
if (!collab) {
|
|
124047
124349
|
return null;
|
|
124048
124350
|
}
|
|
124049
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
124351
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
124352
|
+
CollaborationStatusIndicator,
|
|
124353
|
+
{
|
|
124354
|
+
status: collab.status,
|
|
124355
|
+
connectedCount: collab.connectedCount,
|
|
124356
|
+
onRetry: collab.retry
|
|
124357
|
+
}
|
|
124358
|
+
);
|
|
124050
124359
|
}
|
|
124051
124360
|
function CollaborationDocumentSync({
|
|
124052
124361
|
slides,
|
|
@@ -124173,7 +124482,7 @@ scheduler/cjs/scheduler.development.js:
|
|
|
124173
124482
|
* LICENSE file in the root directory of this source tree.
|
|
124174
124483
|
*)
|
|
124175
124484
|
|
|
124176
|
-
@react-three/fiber/dist/events-
|
|
124485
|
+
@react-three/fiber/dist/events-760a1017.esm.js:
|
|
124177
124486
|
(**
|
|
124178
124487
|
* @license React
|
|
124179
124488
|
* react-reconciler-constants.production.js
|