pptx-react-viewer 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/{AiChatPanel-PXZYHJUB.mjs → AiChatPanel-EMF3UYCE.mjs} +4 -5
- package/dist/AiChatPanel-EMF3UYCE.mjs.br +0 -0
- package/dist/AiChatPanel-EMF3UYCE.mjs.gz +0 -0
- package/dist/{AiChatPanel-HC3CE3TL.js → AiChatPanel-OHSLJNYG.js} +23 -24
- package/dist/AiChatPanel-OHSLJNYG.js.br +0 -0
- package/dist/AiChatPanel-OHSLJNYG.js.gz +0 -0
- package/dist/{Model3DScene-37QZRHV5.js → Model3DScene-ULHIJPMU.js} +2 -3
- package/dist/Model3DScene-ULHIJPMU.js.br +0 -0
- package/dist/Model3DScene-ULHIJPMU.js.gz +0 -0
- package/dist/{Model3DScene-ZG4HTMPX.mjs → Model3DScene-X6QJTWHV.mjs} +1 -2
- package/dist/Model3DScene-X6QJTWHV.mjs.br +0 -0
- package/dist/Model3DScene-X6QJTWHV.mjs.gz +0 -0
- package/dist/{PowerPointViewer-gmU5rc7K.d.ts → PowerPointViewer-Cjn1RgSz.d.ts} +2 -2
- package/dist/{PowerPointViewer-gmU5rc7K.d.ts.map → PowerPointViewer-Cjn1RgSz.d.ts.map} +1 -1
- package/dist/{SurfaceChart3DScene-QIREQ66D.js → SurfaceChart3DScene-K7Q5NYZ4.js} +2 -3
- package/dist/SurfaceChart3DScene-K7Q5NYZ4.js.br +0 -0
- package/dist/SurfaceChart3DScene-K7Q5NYZ4.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-Z7R6DZXN.mjs → SurfaceChart3DScene-PRCKQJQQ.mjs} +1 -2
- package/dist/SurfaceChart3DScene-PRCKQJQQ.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-PRCKQJQQ.mjs.gz +0 -0
- package/dist/audience-content-store-BMlth_3U.d.ts +386 -0
- package/dist/audience-content-store-BMlth_3U.d.ts.map +1 -0
- package/dist/{chunk-YIFO3WQO.js → chunk-25VSL2BB.js} +1 -0
- package/dist/chunk-25VSL2BB.js.br +0 -0
- package/dist/chunk-25VSL2BB.js.gz +0 -0
- package/dist/{chunk-L7JNCVTF.js → chunk-7Q7AEPO7.js} +384 -332
- package/dist/chunk-7Q7AEPO7.js.br +0 -0
- package/dist/chunk-7Q7AEPO7.js.gz +0 -0
- package/dist/{chunk-ZLSVW5GP.js → chunk-I4AFCPUC.js} +876 -882
- package/dist/chunk-I4AFCPUC.js.br +0 -0
- package/dist/chunk-I4AFCPUC.js.gz +0 -0
- package/dist/{chunk-J5A22DZ7.mjs → chunk-JSFUU2BB.mjs} +36 -42
- package/dist/chunk-JSFUU2BB.mjs.br +0 -0
- package/dist/chunk-JSFUU2BB.mjs.gz +0 -0
- package/dist/{chunk-I5LEMC5C.mjs → chunk-LIQGO45T.mjs} +74 -22
- package/dist/chunk-LIQGO45T.mjs.br +0 -0
- package/dist/chunk-LIQGO45T.mjs.gz +0 -0
- package/dist/{chunk-JFNMD6TM.mjs → chunk-LTEDT475.js} +48579 -31703
- package/dist/chunk-LTEDT475.js.br +0 -0
- package/dist/chunk-LTEDT475.js.gz +0 -0
- package/dist/{chunk-EUIFPDXZ.js → chunk-MJAEB43A.js} +3 -3
- package/dist/chunk-MJAEB43A.js.br +0 -0
- package/dist/chunk-MJAEB43A.js.gz +0 -0
- package/dist/{chunk-P7UVBRFO.js → chunk-NVH3RIN7.js} +282 -291
- package/dist/chunk-NVH3RIN7.js.br +0 -0
- package/dist/chunk-NVH3RIN7.js.gz +0 -0
- package/dist/{chunk-VOHTAUN4.mjs → chunk-TGVID6BB.mjs} +41 -50
- package/dist/chunk-TGVID6BB.mjs.br +0 -0
- package/dist/chunk-TGVID6BB.mjs.gz +0 -0
- package/dist/{chunk-3TB45PVK.js → chunk-VOV2N3NY.mjs} +48075 -32275
- package/dist/chunk-VOV2N3NY.mjs.br +0 -0
- package/dist/chunk-VOV2N3NY.mjs.gz +0 -0
- package/dist/{chunk-M5YR3QSB.mjs → chunk-WJKMTDXS.mjs} +1 -1
- package/dist/chunk-WJKMTDXS.mjs.br +0 -0
- package/dist/chunk-WJKMTDXS.mjs.gz +0 -0
- package/dist/{chunk-PZTPX3HK.mjs → chunk-Z6HIZWIQ.mjs} +1 -0
- package/dist/chunk-Z6HIZWIQ.mjs.br +0 -0
- package/dist/chunk-Z6HIZWIQ.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +112 -87
- package/dist/index.js +39 -40
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -7
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +563 -514
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -6
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/{animation-timeline-eb5z0SHW.d.ts → types-DciBT90G.d.ts} +4 -3
- package/dist/types-DciBT90G.d.ts.map +1 -0
- package/dist/{useViewerBuildingBlocks-CjureTRf.d.ts → useViewerBuildingBlocks-DMDZRawe.d.ts} +4 -4
- package/dist/{useViewerBuildingBlocks-CjureTRf.d.ts.map → useViewerBuildingBlocks-DMDZRawe.d.ts.map} +1 -1
- package/dist/viewer/index.d.ts +112 -88
- package/dist/viewer/index.js +22 -24
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -8
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +4 -4
- package/dist/AiChatPanel-HC3CE3TL.js.br +0 -0
- package/dist/AiChatPanel-HC3CE3TL.js.gz +0 -0
- package/dist/AiChatPanel-PXZYHJUB.mjs.br +0 -0
- package/dist/AiChatPanel-PXZYHJUB.mjs.gz +0 -0
- package/dist/Model3DScene-37QZRHV5.js.br +0 -0
- package/dist/Model3DScene-37QZRHV5.js.gz +0 -0
- package/dist/Model3DScene-ZG4HTMPX.mjs.br +0 -0
- package/dist/Model3DScene-ZG4HTMPX.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-QIREQ66D.js.br +0 -0
- package/dist/SurfaceChart3DScene-QIREQ66D.js.gz +0 -0
- package/dist/SurfaceChart3DScene-Z7R6DZXN.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-Z7R6DZXN.mjs.gz +0 -0
- package/dist/animation-timeline-eb5z0SHW.d.ts.map +0 -1
- package/dist/chunk-3TB45PVK.js.br +0 -0
- package/dist/chunk-3TB45PVK.js.gz +0 -0
- package/dist/chunk-4AAFZFGH.mjs +0 -27633
- package/dist/chunk-4AAFZFGH.mjs.br +0 -0
- package/dist/chunk-4AAFZFGH.mjs.gz +0 -0
- package/dist/chunk-EUIFPDXZ.js.br +0 -0
- package/dist/chunk-EUIFPDXZ.js.gz +0 -0
- package/dist/chunk-I5LEMC5C.mjs.br +0 -0
- package/dist/chunk-I5LEMC5C.mjs.gz +0 -0
- package/dist/chunk-IKBO6CZC.js +0 -2
- package/dist/chunk-IKBO6CZC.js.br +0 -3
- package/dist/chunk-IKBO6CZC.js.gz +0 -0
- package/dist/chunk-J5A22DZ7.mjs.br +0 -0
- package/dist/chunk-J5A22DZ7.mjs.gz +0 -0
- package/dist/chunk-JFNMD6TM.mjs.br +0 -0
- package/dist/chunk-JFNMD6TM.mjs.gz +0 -0
- package/dist/chunk-KDW3LLG5.js +0 -28067
- package/dist/chunk-KDW3LLG5.js.br +0 -0
- package/dist/chunk-KDW3LLG5.js.gz +0 -0
- package/dist/chunk-L7JNCVTF.js.br +0 -0
- package/dist/chunk-L7JNCVTF.js.gz +0 -0
- package/dist/chunk-M5YR3QSB.mjs.br +0 -0
- package/dist/chunk-M5YR3QSB.mjs.gz +0 -0
- package/dist/chunk-P7UVBRFO.js.br +0 -0
- package/dist/chunk-P7UVBRFO.js.gz +0 -0
- package/dist/chunk-PZTPX3HK.mjs.br +0 -0
- package/dist/chunk-PZTPX3HK.mjs.gz +0 -0
- package/dist/chunk-T5U6P2JH.mjs +0 -1
- package/dist/chunk-T5U6P2JH.mjs.br +0 -0
- package/dist/chunk-T5U6P2JH.mjs.gz +0 -0
- package/dist/chunk-VOHTAUN4.mjs.br +0 -0
- package/dist/chunk-VOHTAUN4.mjs.gz +0 -0
- package/dist/chunk-YIFO3WQO.js.br +0 -0
- package/dist/chunk-YIFO3WQO.js.gz +0 -0
- package/dist/chunk-ZLSVW5GP.js.br +0 -0
- package/dist/chunk-ZLSVW5GP.js.gz +0 -0
- package/dist/dist-FTEVZZPM.js +0 -2283
- package/dist/dist-FTEVZZPM.js.br +0 -0
- package/dist/dist-FTEVZZPM.js.gz +0 -0
- package/dist/dist-L7GZVBMG.mjs +0 -2
- package/dist/dist-L7GZVBMG.mjs.br +0 -0
- package/dist/dist-L7GZVBMG.mjs.gz +0 -0
- package/dist/index-CDCSXtK3.d.ts +0 -685
- package/dist/index-CDCSXtK3.d.ts.map +0 -1
package/dist/internals.d.ts
CHANGED
|
@@ -534,6 +534,62 @@ interface PptxCustomPathProperties {
|
|
|
534
534
|
customGeometryTextRect?: CustomGeometryTextRect;
|
|
535
535
|
}
|
|
536
536
|
//#endregion
|
|
537
|
+
//#region src/core/types/effect-dag.d.ts
|
|
538
|
+
type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
|
|
539
|
+
type EffectDagContainerType = 'sib' | 'tree';
|
|
540
|
+
type EffectDagNode = EffectDagContainer | EffectDagBlend | EffectDagXfrm | EffectDagRelOff | EffectDagBlur | EffectDagAlphaOutset | EffectDagPresetShadow | EffectDagRawLeaf;
|
|
541
|
+
interface EffectDagContainer {
|
|
542
|
+
kind: 'cont';
|
|
543
|
+
type: EffectDagContainerType;
|
|
544
|
+
name?: string;
|
|
545
|
+
children: EffectDagNode[];
|
|
546
|
+
}
|
|
547
|
+
interface EffectDagBlend {
|
|
548
|
+
kind: 'blend';
|
|
549
|
+
mode: EffectDagBlendMode;
|
|
550
|
+
container: EffectDagContainer;
|
|
551
|
+
}
|
|
552
|
+
interface EffectDagXfrm {
|
|
553
|
+
kind: 'xfrmEffect';
|
|
554
|
+
sx?: number;
|
|
555
|
+
sy?: number;
|
|
556
|
+
kx?: number;
|
|
557
|
+
ky?: number;
|
|
558
|
+
tx?: number;
|
|
559
|
+
ty?: number;
|
|
560
|
+
}
|
|
561
|
+
interface EffectDagRelOff {
|
|
562
|
+
kind: 'relOff';
|
|
563
|
+
tx?: number;
|
|
564
|
+
ty?: number;
|
|
565
|
+
}
|
|
566
|
+
/** Typed CT_BlurEffect with its original payload retained for lossless edits. */
|
|
567
|
+
interface EffectDagBlur {
|
|
568
|
+
kind: 'blur';
|
|
569
|
+
radiusEmu?: number;
|
|
570
|
+
grow?: boolean;
|
|
571
|
+
xml: XmlObject;
|
|
572
|
+
}
|
|
573
|
+
/** Typed CT_AlphaOutsetEffect with original XML retained for lossless edits. */
|
|
574
|
+
interface EffectDagAlphaOutset {
|
|
575
|
+
kind: 'alphaOutset';
|
|
576
|
+
radiusEmu?: number;
|
|
577
|
+
xml: XmlObject;
|
|
578
|
+
}
|
|
579
|
+
/** Typed CT_PresetShadowEffect with colour and extension XML retained verbatim. */
|
|
580
|
+
interface EffectDagPresetShadow {
|
|
581
|
+
kind: 'prstShdw';
|
|
582
|
+
preset?: `shdw${number}`;
|
|
583
|
+
distanceEmu?: number;
|
|
584
|
+
direction?: number;
|
|
585
|
+
xml: XmlObject;
|
|
586
|
+
}
|
|
587
|
+
interface EffectDagRawLeaf {
|
|
588
|
+
kind: 'raw';
|
|
589
|
+
tag: string;
|
|
590
|
+
xml: Record<string, unknown>;
|
|
591
|
+
}
|
|
592
|
+
//#endregion
|
|
537
593
|
//#region src/core/types/three-d.d.ts
|
|
538
594
|
/**
|
|
539
595
|
* 3-D effect properties, text warp (WordArt) presets, and scene/shape bevel
|
|
@@ -764,6 +820,18 @@ interface ShapeStyle {
|
|
|
764
820
|
/** Original `gradFill` XML retained for unknown-child and extension round-tripping. */
|
|
765
821
|
fillGradientXml?: XmlObject;
|
|
766
822
|
fillMode?: 'solid' | 'gradient' | 'pattern' | 'none' | 'image' | 'theme' | 'group';
|
|
823
|
+
/**
|
|
824
|
+
* `<p:sp useBgFill="1">`: the shape paints with the SLIDE BACKGROUND's fill
|
|
825
|
+
* rather than its own or its theme style's.
|
|
826
|
+
*
|
|
827
|
+
* PowerPoint's designer emits full-bleed rectangles this way, and they also
|
|
828
|
+
* carry an `a:fillRef` pointing at `accent1`. Ignoring the attribute painted
|
|
829
|
+
* those panels in the accent colour, so a black-and-white title slide came out
|
|
830
|
+
* black-and-blue. The load pipeline copies the resolved slide background onto
|
|
831
|
+
* the fill fields; the flag stays for round-trip and for renderers that want
|
|
832
|
+
* to re-resolve against a changed background.
|
|
833
|
+
*/
|
|
834
|
+
useBackgroundFill?: boolean;
|
|
767
835
|
fillPatternPreset?: string;
|
|
768
836
|
fillPatternBackgroundColor?: string;
|
|
769
837
|
/** Original `pattFill` XML retained for unknown-child round-tripping. */
|
|
@@ -996,6 +1064,15 @@ interface ShapeStyle {
|
|
|
996
1064
|
lineGlowOpacity?: number;
|
|
997
1065
|
/** Raw `a:effectDag` XML node preserved for round-trip serialisation. */
|
|
998
1066
|
effectDagXml?: XmlObject;
|
|
1067
|
+
/**
|
|
1068
|
+
* Typed effect graph parsed from {@link ShapeStyle.effectDagXml}. The four
|
|
1069
|
+
* structural container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`,
|
|
1070
|
+
* `a:relOff`) are fully typed; any other leaf effect (e.g. `a:outerShdw`,
|
|
1071
|
+
* `a:glow`, `a:alphaInv`) is captured as
|
|
1072
|
+
* {@link import('./effect-dag').EffectDagRawLeaf} so we never have to
|
|
1073
|
+
* recurse into the full effect taxonomy.
|
|
1074
|
+
*/
|
|
1075
|
+
effectDagTree?: EffectDagContainer;
|
|
999
1076
|
/** Grayscale flag from effectDag `a:grayscl`. */
|
|
1000
1077
|
dagGrayscale?: boolean;
|
|
1001
1078
|
/** Bi-level threshold (0-100) from effectDag `a:biLevel`. */
|
|
@@ -1430,6 +1507,20 @@ interface TextStyle {
|
|
|
1430
1507
|
textPresetShadowDirection?: number;
|
|
1431
1508
|
/** Text blur effect radius in px (`a:blur`). */
|
|
1432
1509
|
textBlurRadius?: number;
|
|
1510
|
+
/**
|
|
1511
|
+
* Raw `a:effectDag` XML node from `a:rPr`, preserved verbatim for
|
|
1512
|
+
* round-trip serialisation. Mirrors the shape-level
|
|
1513
|
+
* {@link import('./shape-style').ShapeStyle.effectDagXml} field.
|
|
1514
|
+
*/
|
|
1515
|
+
textEffectDagXml?: XmlObject;
|
|
1516
|
+
/**
|
|
1517
|
+
* Typed effect graph parsed from `textEffectDagXml`. The four structural
|
|
1518
|
+
* container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`, `a:relOff`) are
|
|
1519
|
+
* fully typed; any other leaf effect is captured as
|
|
1520
|
+
* {@link import('./effect-dag').EffectDagRawLeaf} so we never have to
|
|
1521
|
+
* recurse into the full effect taxonomy.
|
|
1522
|
+
*/
|
|
1523
|
+
textEffectDagTree?: EffectDagContainer;
|
|
1433
1524
|
/** Text alpha modulation fixed (0-100) from `a:alphaModFix`. */
|
|
1434
1525
|
textAlphaModFix?: number;
|
|
1435
1526
|
/** Text alpha modulation from `a:alphaMod` (0-100 percentage). */
|
|
@@ -2820,62 +2911,6 @@ interface PptxChartData {
|
|
|
2820
2911
|
clrMapOvr?: Record<string, string>;
|
|
2821
2912
|
}
|
|
2822
2913
|
//#endregion
|
|
2823
|
-
//#region src/core/types/effect-dag.d.ts
|
|
2824
|
-
type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
|
|
2825
|
-
type EffectDagContainerType = 'sib' | 'tree';
|
|
2826
|
-
type EffectDagNode = EffectDagContainer | EffectDagBlend | EffectDagXfrm | EffectDagRelOff | EffectDagBlur | EffectDagAlphaOutset | EffectDagPresetShadow | EffectDagRawLeaf;
|
|
2827
|
-
interface EffectDagContainer {
|
|
2828
|
-
kind: 'cont';
|
|
2829
|
-
type: EffectDagContainerType;
|
|
2830
|
-
name?: string;
|
|
2831
|
-
children: EffectDagNode[];
|
|
2832
|
-
}
|
|
2833
|
-
interface EffectDagBlend {
|
|
2834
|
-
kind: 'blend';
|
|
2835
|
-
mode: EffectDagBlendMode;
|
|
2836
|
-
container: EffectDagContainer;
|
|
2837
|
-
}
|
|
2838
|
-
interface EffectDagXfrm {
|
|
2839
|
-
kind: 'xfrmEffect';
|
|
2840
|
-
sx?: number;
|
|
2841
|
-
sy?: number;
|
|
2842
|
-
kx?: number;
|
|
2843
|
-
ky?: number;
|
|
2844
|
-
tx?: number;
|
|
2845
|
-
ty?: number;
|
|
2846
|
-
}
|
|
2847
|
-
interface EffectDagRelOff {
|
|
2848
|
-
kind: 'relOff';
|
|
2849
|
-
tx?: number;
|
|
2850
|
-
ty?: number;
|
|
2851
|
-
}
|
|
2852
|
-
/** Typed CT_BlurEffect with its original payload retained for lossless edits. */
|
|
2853
|
-
interface EffectDagBlur {
|
|
2854
|
-
kind: 'blur';
|
|
2855
|
-
radiusEmu?: number;
|
|
2856
|
-
grow?: boolean;
|
|
2857
|
-
xml: XmlObject;
|
|
2858
|
-
}
|
|
2859
|
-
/** Typed CT_AlphaOutsetEffect with original XML retained for lossless edits. */
|
|
2860
|
-
interface EffectDagAlphaOutset {
|
|
2861
|
-
kind: 'alphaOutset';
|
|
2862
|
-
radiusEmu?: number;
|
|
2863
|
-
xml: XmlObject;
|
|
2864
|
-
}
|
|
2865
|
-
/** Typed CT_PresetShadowEffect with colour and extension XML retained verbatim. */
|
|
2866
|
-
interface EffectDagPresetShadow {
|
|
2867
|
-
kind: 'prstShdw';
|
|
2868
|
-
preset?: `shdw${number}`;
|
|
2869
|
-
distanceEmu?: number;
|
|
2870
|
-
direction?: number;
|
|
2871
|
-
xml: XmlObject;
|
|
2872
|
-
}
|
|
2873
|
-
interface EffectDagRawLeaf {
|
|
2874
|
-
kind: 'raw';
|
|
2875
|
-
tag: string;
|
|
2876
|
-
xml: Record<string, unknown>;
|
|
2877
|
-
}
|
|
2878
|
-
//#endregion
|
|
2879
2914
|
//#region src/core/types/image.d.ts
|
|
2880
2915
|
/**
|
|
2881
2916
|
* Image recolour/adjustment properties parsed from blip extensions.
|
|
@@ -3078,36 +3113,6 @@ interface PptxImageProperties {
|
|
|
3078
3113
|
/** Crop-to-shape — CSS clip-path shape name. */
|
|
3079
3114
|
cropShape?: PptxCropShape;
|
|
3080
3115
|
}
|
|
3081
|
-
declare module "./internals" {
|
|
3082
|
-
interface TextStyle {
|
|
3083
|
-
/**
|
|
3084
|
-
* Raw `a:effectDag` XML node from `a:rPr`, preserved verbatim for
|
|
3085
|
-
* round-trip serialisation. Mirrors the shape-level
|
|
3086
|
-
* {@link import('./shape-style').ShapeStyle.effectDagXml} field.
|
|
3087
|
-
*/
|
|
3088
|
-
textEffectDagXml?: XmlObject;
|
|
3089
|
-
/**
|
|
3090
|
-
* Typed effect graph parsed from `textEffectDagXml`. The four structural
|
|
3091
|
-
* container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`, `a:relOff`) are
|
|
3092
|
-
* fully typed; any other leaf effect is captured as
|
|
3093
|
-
* {@link EffectDagRawLeaf} so we never have to recurse into the full
|
|
3094
|
-
* effect taxonomy.
|
|
3095
|
-
*/
|
|
3096
|
-
textEffectDagTree?: EffectDagContainer;
|
|
3097
|
-
}
|
|
3098
|
-
}
|
|
3099
|
-
declare module "./internals" {
|
|
3100
|
-
interface ShapeStyle {
|
|
3101
|
-
/**
|
|
3102
|
-
* Typed effect graph parsed from {@link ShapeStyle.effectDagXml}. The four
|
|
3103
|
-
* structural container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`,
|
|
3104
|
-
* `a:relOff`) are fully typed; any other leaf effect (e.g. `a:outerShdw`,
|
|
3105
|
-
* `a:glow`, `a:alphaInv`) is captured as {@link EffectDagRawLeaf} so we
|
|
3106
|
-
* never have to recurse into the full effect taxonomy.
|
|
3107
|
-
*/
|
|
3108
|
-
effectDagTree?: EffectDagContainer;
|
|
3109
|
-
}
|
|
3110
|
-
}
|
|
3111
3116
|
//#endregion
|
|
3112
3117
|
//#region src/core/types/media.d.ts
|
|
3113
3118
|
/**
|
|
@@ -5174,6 +5179,27 @@ interface PptxNativeAnimation {
|
|
|
5174
5179
|
soundPath?: string;
|
|
5175
5180
|
/** Whether to stop any currently playing sound (`p:endSnd`). */
|
|
5176
5181
|
stopSound?: boolean;
|
|
5182
|
+
/**
|
|
5183
|
+
* Whether the enclosing click-level group (a direct `p:par` child of the
|
|
5184
|
+
* `mainSeq`) begins automatically when the slide appears, rather than waiting
|
|
5185
|
+
* for a click.
|
|
5186
|
+
*
|
|
5187
|
+
* PowerPoint gates a click step with a lone `<p:cond delay="indefinite"/>`;
|
|
5188
|
+
* a group that also carries a time-node condition (`onBegin`/`onEnd` with a
|
|
5189
|
+
* `@tn`) or a finite delay starts on slide entry ("With/After Previous" as the
|
|
5190
|
+
* first effect on the slide). The flat animation list cannot express that on
|
|
5191
|
+
* its own, so the parse layer stamps it here.
|
|
5192
|
+
*/
|
|
5193
|
+
groupAutoStart?: boolean;
|
|
5194
|
+
/**
|
|
5195
|
+
* Index of the enclosing effect-wrapper `p:par` inside the click-level group.
|
|
5196
|
+
*
|
|
5197
|
+
* Effects that share a wrapper are OOXML siblings: they all start when that
|
|
5198
|
+
* wrapper starts, and each `p:cond/@delay` is measured from the wrapper's
|
|
5199
|
+
* start, NOT chained off the effect before it. Playback uses this to place
|
|
5200
|
+
* simultaneous effects at their true offsets instead of accumulating delays.
|
|
5201
|
+
*/
|
|
5202
|
+
parGroupIndex?: number;
|
|
5177
5203
|
/** Structured start conditions parsed from `p:stCondLst`. */
|
|
5178
5204
|
startConditions?: AnimationCondition[];
|
|
5179
5205
|
/** Structured end conditions parsed from `p:endCondLst`. */
|
|
@@ -6837,7 +6863,6 @@ interface PptxEmbeddedFont {
|
|
|
6837
6863
|
originalPartBytes?: Uint8Array;
|
|
6838
6864
|
}
|
|
6839
6865
|
|
|
6840
|
-
//#endregion
|
|
6841
6866
|
//#region src/core/types/theme-presets.d.ts
|
|
6842
6867
|
/**
|
|
6843
6868
|
* A complete theme preset that can be applied to a presentation.
|
|
@@ -9471,243 +9496,80 @@ interface ViewerBuildingBlocksResult {
|
|
|
9471
9496
|
}
|
|
9472
9497
|
declare function useViewerBuildingBlocks(input: UseViewerBuildingBlocksInput): ViewerBuildingBlocksResult;
|
|
9473
9498
|
|
|
9474
|
-
//#region src/viewer/hooks/
|
|
9499
|
+
//#region src/viewer/hooks/useThemeSwitching.d.ts
|
|
9500
|
+
interface UseThemeSwitchingInput {
|
|
9501
|
+
/** Ref to the PptxHandler instance. */
|
|
9502
|
+
handlerRef: RefObject<PptxHandler | null>;
|
|
9503
|
+
/** Current parsed presentation data (null when nothing is loaded). */
|
|
9504
|
+
data: PptxData | null;
|
|
9505
|
+
/** Callback to update the presentation data after theme switch. */
|
|
9506
|
+
onDataChange: (newData: PptxData) => void;
|
|
9507
|
+
/** Optional callback fired when theme switch completes successfully. */
|
|
9508
|
+
onThemeChanged?: (preset: PptxThemePreset) => void;
|
|
9509
|
+
}
|
|
9510
|
+
interface ThemeSwitchingResult {
|
|
9511
|
+
/** All available built-in theme presets. */
|
|
9512
|
+
presets: readonly PptxThemePreset[];
|
|
9513
|
+
/**
|
|
9514
|
+
* Apply a theme preset to the current presentation.
|
|
9515
|
+
* Updates both the in-memory ZIP and all resolved element colours.
|
|
9516
|
+
*/
|
|
9517
|
+
switchToPreset: (preset: PptxThemePreset) => Promise<void>;
|
|
9518
|
+
/**
|
|
9519
|
+
* Apply a custom colour scheme (and optional font scheme) to the
|
|
9520
|
+
* current presentation.
|
|
9521
|
+
*/
|
|
9522
|
+
switchToCustom: (colorScheme: PptxThemeColorScheme, fontScheme?: PptxThemeFontScheme, themeName?: string) => Promise<void>;
|
|
9523
|
+
/**
|
|
9524
|
+
* Get the preset matching the current presentation theme (if any).
|
|
9525
|
+
* Returns undefined if the current theme does not match a built-in preset.
|
|
9526
|
+
*/
|
|
9527
|
+
currentPreset: PptxThemePreset | undefined;
|
|
9528
|
+
}
|
|
9475
9529
|
/**
|
|
9476
|
-
*
|
|
9530
|
+
* React hook providing theme switching capabilities for the PowerPoint viewer.
|
|
9477
9531
|
*
|
|
9478
|
-
*
|
|
9479
|
-
*
|
|
9480
|
-
*
|
|
9481
|
-
*
|
|
9482
|
-
*
|
|
9532
|
+
* @example
|
|
9533
|
+
* ```tsx
|
|
9534
|
+
* const { presets, switchToPreset, currentPreset } = useThemeSwitching({
|
|
9535
|
+
* handlerRef,
|
|
9536
|
+
* data,
|
|
9537
|
+
* onDataChange: setData,
|
|
9538
|
+
* });
|
|
9539
|
+
*
|
|
9540
|
+
* return (
|
|
9541
|
+
* <div>
|
|
9542
|
+
* {presets.map(preset => (
|
|
9543
|
+
* <button
|
|
9544
|
+
* key={preset.id}
|
|
9545
|
+
* onClick={() => switchToPreset(preset)}
|
|
9546
|
+
* aria-pressed={preset.id === currentPreset?.id}
|
|
9547
|
+
* >
|
|
9548
|
+
* {preset.name}
|
|
9549
|
+
* </button>
|
|
9550
|
+
* ))}
|
|
9551
|
+
* </div>
|
|
9552
|
+
* );
|
|
9553
|
+
* ```
|
|
9483
9554
|
*/
|
|
9484
|
-
|
|
9555
|
+
declare function useThemeSwitching(input: UseThemeSwitchingInput): ThemeSwitchingResult;
|
|
9556
|
+
//#endregion
|
|
9557
|
+
//#region ../../node_modules/.bun/lib0@0.2.117/node_modules/lib0/observable.d.ts
|
|
9485
9558
|
/**
|
|
9486
|
-
*
|
|
9487
|
-
*
|
|
9488
|
-
*
|
|
9489
|
-
*
|
|
9559
|
+
* Handles named events.
|
|
9560
|
+
*
|
|
9561
|
+
* @deprecated
|
|
9562
|
+
* @template N
|
|
9490
9563
|
*/
|
|
9491
|
-
|
|
9492
|
-
/** Index of the leaving slide, rendered (animated) in the overlay layer. */
|
|
9493
|
-
outgoingSlideIndex: number;
|
|
9494
|
-
/** Index of the arriving slide, already live on the main stage. */
|
|
9495
|
-
incomingSlideIndex: number;
|
|
9496
|
-
/** The incoming slide's transition definition (drives the CSS animation). */
|
|
9497
|
-
transition: PptxSlideTransition;
|
|
9498
|
-
/** Resolved transition duration (ms). */
|
|
9499
|
-
durationMs: number;
|
|
9500
|
-
}
|
|
9501
|
-
interface UsePresentationModeInput {
|
|
9502
|
-
mode: ViewerMode;
|
|
9503
|
-
slides: PptxSlide[];
|
|
9504
|
-
visibleSlideIndexes: number[];
|
|
9505
|
-
activeSlideIndex: number;
|
|
9506
|
-
containerRef: React.RefObject<HTMLElement | null>;
|
|
9507
|
-
/** Raw PPTX bytes: forwarded to audience window for content sharing. */
|
|
9508
|
-
content?: ArrayBuffer | Uint8Array | null;
|
|
9509
|
-
onSetMode: (mode: ViewerMode) => void;
|
|
9510
|
-
onSetActiveSlideIndex: (index: number) => void;
|
|
9564
|
+
declare class Observable<N> {
|
|
9511
9565
|
/**
|
|
9512
|
-
*
|
|
9513
|
-
*
|
|
9514
|
-
* (used for transition sounds flagged with `soundLoop`).
|
|
9566
|
+
* Some desc.
|
|
9567
|
+
* @type {Map<N, any>}
|
|
9515
9568
|
*/
|
|
9516
|
-
|
|
9517
|
-
loop?: boolean;
|
|
9518
|
-
}) => void;
|
|
9519
|
-
/** Select a pointer tool (Ctrl+L laser, Ctrl+P pen, Ctrl+A arrow, Ctrl+E eraser). */
|
|
9520
|
-
onSetPointerTool?: (tool: PresentationPointerTool | 'arrow') => void;
|
|
9521
|
-
/** Erase the current slide's ink annotations (E). */
|
|
9522
|
-
onEraseAnnotations?: () => void;
|
|
9523
|
-
/** Show or hide ink markup (Ctrl+M). */
|
|
9524
|
-
onToggleInkMarkup?: () => void;
|
|
9525
|
-
/** Show or hide the slide-show chrome (Ctrl+H). */
|
|
9526
|
-
onToggleToolbar?: () => void;
|
|
9527
|
-
/** Open the All Slides navigator (Ctrl+S). */
|
|
9528
|
-
onShowAllSlides?: () => void;
|
|
9529
|
-
/** Called to persist rehearsal timings into slide transitions. */
|
|
9530
|
-
onSaveRehearsalTimings?: (timings: Record<number, number>) => void;
|
|
9531
|
-
/** Whether to loop continuously (kiosk or explicit loop setting). */
|
|
9532
|
-
loopContinuously?: boolean;
|
|
9533
|
-
/** Whether to play animations during the slide show (false = skip all animations). */
|
|
9534
|
-
showWithAnimation?: boolean;
|
|
9535
|
-
/** Whether to use rehearsed auto-advance timings (false = manual advance only). */
|
|
9536
|
-
useTimings?: boolean;
|
|
9569
|
+
_observers: Map<N, any>;
|
|
9537
9570
|
/**
|
|
9538
|
-
*
|
|
9539
|
-
*
|
|
9540
|
-
* screen; the next advance (or a click on it) exits. When false,
|
|
9541
|
-
* advancing past the last slide exits the show directly.
|
|
9542
|
-
*/
|
|
9543
|
-
endWithBlackSlide?: boolean;
|
|
9544
|
-
}
|
|
9545
|
-
interface UsePresentationModeResult {
|
|
9546
|
-
presentationSlideIndex: number;
|
|
9547
|
-
setPresentationSlideIndex: (index: number) => void;
|
|
9548
|
-
presentationSlideVisible: boolean;
|
|
9549
|
-
/** Active slide-transition overlay, or `null` when no transition is playing. */
|
|
9550
|
-
transitionOverlay: PresentationTransitionOverlayState | null;
|
|
9551
|
-
/** Tear down the transition overlay once its animation completes. */
|
|
9552
|
-
handleTransitionOverlayComplete: () => void;
|
|
9553
|
-
presentationAnimations: PresentationAnimationRuntime[];
|
|
9554
|
-
presentationElementStates: Map<string, ElementAnimationState>;
|
|
9555
|
-
presentationKeyframesCss: string;
|
|
9556
|
-
clearPresentationTimers: () => void;
|
|
9557
|
-
runPresentationEntranceAnimations: (slideIndex: number) => void;
|
|
9558
|
-
/** True while the black "End of slide show" screen is displayed. */
|
|
9559
|
-
endOfShowVisible: boolean;
|
|
9560
|
-
/** Whether the All Slides navigator (Ctrl+S) is open during the show. */
|
|
9561
|
-
allSlidesOpen: boolean;
|
|
9562
|
-
openAllSlides: () => void;
|
|
9563
|
-
closeAllSlides: () => void;
|
|
9564
|
-
movePresentationSlide: (direction: 1 | -1, trigger?: SlideAdvanceTrigger) => void;
|
|
9565
|
-
navigateToSlide: (slideIndex: number) => void;
|
|
9566
|
-
handlePresentationAction: (action: PptxAction) => void;
|
|
9567
|
-
/**
|
|
9568
|
-
* Handle a shape click in presentation mode. If the shape is an interactive
|
|
9569
|
-
* trigger, play its animation sequence. Returns `true` if handled.
|
|
9570
|
-
*/
|
|
9571
|
-
handleInteractiveShapeClick: (shapeId: string) => boolean;
|
|
9572
|
-
/** Set of shape IDs that are interactive sequence triggers on the current slide. */
|
|
9573
|
-
interactiveTriggerShapeIds: ReadonlySet<string>;
|
|
9574
|
-
/** Set of shape IDs that are hover animation triggers on the current slide. */
|
|
9575
|
-
hoverTriggerShapeIds: ReadonlySet<string>;
|
|
9576
|
-
/** Handle hover start on a shape. If the shape has a hover sequence, play it. Returns `true` if handled. */
|
|
9577
|
-
handleHoverStart: (shapeId: string) => boolean;
|
|
9578
|
-
/** Handle hover end on a shape. Resets the hover sequence for replay. */
|
|
9579
|
-
handleHoverEnd: (shapeId: string) => void;
|
|
9580
|
-
/** Must be called from a user-gesture handler (click) to satisfy browser fullscreen policy. */
|
|
9581
|
-
enterPresentMode: () => void;
|
|
9582
|
-
/** Whether presenter view (split-screen with notes) is active instead of fullscreen. */
|
|
9583
|
-
presenterMode: boolean;
|
|
9584
|
-
/** Enter presenter view mode (no fullscreen, shows notes panel). */
|
|
9585
|
-
enterPresenterView: () => void;
|
|
9586
|
-
/** Toggle between fullscreen and presenter view during presentation. */
|
|
9587
|
-
togglePresenterView: () => void;
|
|
9588
|
-
/** Timestamp (ms) when the presentation started: used for elapsed timer. */
|
|
9589
|
-
presentationStartTime: number | null;
|
|
9590
|
-
/** Whether the current presentation session is in rehearse-timings mode. */
|
|
9591
|
-
rehearsing: boolean;
|
|
9592
|
-
/** Enter rehearse-timings mode (fullscreen presentation + timing HUD). */
|
|
9593
|
-
enterRehearsalMode: () => void;
|
|
9594
|
-
/** Recorded timings in ms, keyed by slide index. Populated during rehearsal. */
|
|
9595
|
-
recordedTimings: Record<number, number>;
|
|
9596
|
-
/** Timestamp when the current slide started (ms since epoch). */
|
|
9597
|
-
slideStartTime: number | null;
|
|
9598
|
-
/** Whether the rehearsal summary dialog should be shown. */
|
|
9599
|
-
showRehearsalSummary: boolean;
|
|
9600
|
-
/** Dismiss the rehearsal summary (discard timings). */
|
|
9601
|
-
dismissRehearsalSummary: () => void;
|
|
9602
|
-
/** Save recorded timings into each slide's transition.advanceAfterMs. */
|
|
9603
|
-
saveRehearsalTimings: () => void;
|
|
9604
|
-
/** Whether rehearsal timer is paused. */
|
|
9605
|
-
rehearsalPaused: boolean;
|
|
9606
|
-
/** Toggle the rehearsal timer pause state. */
|
|
9607
|
-
toggleRehearsalPause: () => void;
|
|
9608
|
-
/** Handle a zoom element click in presentation mode. */
|
|
9609
|
-
handleZoomClick: (targetSlideIndex: number, returnSlideIndex: number) => void;
|
|
9610
|
-
/** Ref holding the slide index to return to after zoom navigation. */
|
|
9611
|
-
zoomReturnSlideIndex: React.RefObject<number | null>;
|
|
9612
|
-
/** Navigate back to the zoom summary slide. Returns true if navigation occurred. */
|
|
9613
|
-
returnToZoomSlide: () => boolean;
|
|
9614
|
-
/** Clear the stored zoom return index. */
|
|
9615
|
-
clearZoomReturn: () => void;
|
|
9616
|
-
/** Open the audience display in a separate browser window. Returns `true` if successful. */
|
|
9617
|
-
openAudienceWindow: () => boolean;
|
|
9618
|
-
/** Close the audience display window. */
|
|
9619
|
-
closeAudienceWindow: () => void;
|
|
9620
|
-
/** Whether the audience window is currently open. */
|
|
9621
|
-
isAudienceWindowOpen: () => boolean;
|
|
9622
|
-
/** Send a slide index to the audience window explicitly. */
|
|
9623
|
-
syncSlideToAudience: (slideIndex: number) => void;
|
|
9624
|
-
syncStateToAudience: (snapshot: PresentationSnapshot) => void;
|
|
9625
|
-
presenterSnapshot: PresentationSnapshot;
|
|
9626
|
-
setPresenterBlackout: (blackout: PresentationSnapshot['blackout']) => void;
|
|
9627
|
-
togglePresenterTimer: () => void;
|
|
9628
|
-
resetPresenterTimer: () => void;
|
|
9629
|
-
stepPresenterZoom: (direction: 1 | -1) => void;
|
|
9630
|
-
resetPresenterZoom: () => void;
|
|
9631
|
-
setPresenterCaption: (caption: string) => void;
|
|
9632
|
-
setPresenterSubtitlesVisible: (visible: boolean) => void;
|
|
9633
|
-
updatePresenterSnapshot: (patch: Partial<PresentationSnapshot>) => void;
|
|
9634
|
-
swapPresenterDisplays: () => Promise<boolean>;
|
|
9635
|
-
}
|
|
9636
|
-
//#endregion
|
|
9637
|
-
//#region src/viewer/hooks/useThemeSwitching.d.ts
|
|
9638
|
-
interface UseThemeSwitchingInput {
|
|
9639
|
-
/** Ref to the PptxHandler instance. */
|
|
9640
|
-
handlerRef: RefObject<PptxHandler | null>;
|
|
9641
|
-
/** Current parsed presentation data (null when nothing is loaded). */
|
|
9642
|
-
data: PptxData | null;
|
|
9643
|
-
/** Callback to update the presentation data after theme switch. */
|
|
9644
|
-
onDataChange: (newData: PptxData) => void;
|
|
9645
|
-
/** Optional callback fired when theme switch completes successfully. */
|
|
9646
|
-
onThemeChanged?: (preset: PptxThemePreset) => void;
|
|
9647
|
-
}
|
|
9648
|
-
interface ThemeSwitchingResult {
|
|
9649
|
-
/** All available built-in theme presets. */
|
|
9650
|
-
presets: readonly PptxThemePreset[];
|
|
9651
|
-
/**
|
|
9652
|
-
* Apply a theme preset to the current presentation.
|
|
9653
|
-
* Updates both the in-memory ZIP and all resolved element colours.
|
|
9654
|
-
*/
|
|
9655
|
-
switchToPreset: (preset: PptxThemePreset) => Promise<void>;
|
|
9656
|
-
/**
|
|
9657
|
-
* Apply a custom colour scheme (and optional font scheme) to the
|
|
9658
|
-
* current presentation.
|
|
9659
|
-
*/
|
|
9660
|
-
switchToCustom: (colorScheme: PptxThemeColorScheme, fontScheme?: PptxThemeFontScheme, themeName?: string) => Promise<void>;
|
|
9661
|
-
/**
|
|
9662
|
-
* Get the preset matching the current presentation theme (if any).
|
|
9663
|
-
* Returns undefined if the current theme does not match a built-in preset.
|
|
9664
|
-
*/
|
|
9665
|
-
currentPreset: PptxThemePreset | undefined;
|
|
9666
|
-
}
|
|
9667
|
-
/**
|
|
9668
|
-
* React hook providing theme switching capabilities for the PowerPoint viewer.
|
|
9669
|
-
*
|
|
9670
|
-
* @example
|
|
9671
|
-
* ```tsx
|
|
9672
|
-
* const { presets, switchToPreset, currentPreset } = useThemeSwitching({
|
|
9673
|
-
* handlerRef,
|
|
9674
|
-
* data,
|
|
9675
|
-
* onDataChange: setData,
|
|
9676
|
-
* });
|
|
9677
|
-
*
|
|
9678
|
-
* return (
|
|
9679
|
-
* <div>
|
|
9680
|
-
* {presets.map(preset => (
|
|
9681
|
-
* <button
|
|
9682
|
-
* key={preset.id}
|
|
9683
|
-
* onClick={() => switchToPreset(preset)}
|
|
9684
|
-
* aria-pressed={preset.id === currentPreset?.id}
|
|
9685
|
-
* >
|
|
9686
|
-
* {preset.name}
|
|
9687
|
-
* </button>
|
|
9688
|
-
* ))}
|
|
9689
|
-
* </div>
|
|
9690
|
-
* );
|
|
9691
|
-
* ```
|
|
9692
|
-
*/
|
|
9693
|
-
declare function useThemeSwitching(input: UseThemeSwitchingInput): ThemeSwitchingResult;
|
|
9694
|
-
//#endregion
|
|
9695
|
-
//#region ../../node_modules/.bun/lib0@0.2.117/node_modules/lib0/observable.d.ts
|
|
9696
|
-
/**
|
|
9697
|
-
* Handles named events.
|
|
9698
|
-
*
|
|
9699
|
-
* @deprecated
|
|
9700
|
-
* @template N
|
|
9701
|
-
*/
|
|
9702
|
-
declare class Observable<N> {
|
|
9703
|
-
/**
|
|
9704
|
-
* Some desc.
|
|
9705
|
-
* @type {Map<N, any>}
|
|
9706
|
-
*/
|
|
9707
|
-
_observers: Map<N, any>;
|
|
9708
|
-
/**
|
|
9709
|
-
* @param {N} name
|
|
9710
|
-
* @param {function} f
|
|
9571
|
+
* @param {N} name
|
|
9572
|
+
* @param {function} f
|
|
9711
9573
|
*/
|
|
9712
9574
|
on(name: N, f: Function): void;
|
|
9713
9575
|
/**
|
|
@@ -9986,67 +9848,149 @@ interface UseFollowModeResult {
|
|
|
9986
9848
|
followUser: (clientId: number | null) => void;
|
|
9987
9849
|
}
|
|
9988
9850
|
declare function useFollowMode({ collab, activeSlideIndex, setActiveSlideIndex, slideCount }: UseFollowModeInput): UseFollowModeResult;
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9851
|
+
interface UsePresenterWindowInput {
|
|
9852
|
+
currentSlideIndex: number;
|
|
9853
|
+
isPresenterMode: boolean;
|
|
9854
|
+
/** Raw PPTX bytes to share with the audience tab via IndexedDB. */
|
|
9855
|
+
content?: ArrayBuffer | Uint8Array | null;
|
|
9856
|
+
snapshot: PresentationSnapshot;
|
|
9857
|
+
}
|
|
9858
|
+
interface UsePresenterWindowResult {
|
|
9859
|
+
openAudienceWindow: () => boolean;
|
|
9860
|
+
closeAudienceWindow: () => void;
|
|
9861
|
+
isAudienceWindowOpen: () => boolean;
|
|
9862
|
+
syncSlideToAudience: (slideIndex: number) => void;
|
|
9863
|
+
syncStateToAudience: (snapshot: PresentationSnapshot) => void;
|
|
9864
|
+
swapDisplays: () => Promise<boolean>;
|
|
9865
|
+
}
|
|
9866
|
+
declare function usePresenterWindow(input: UsePresenterWindowInput): UsePresenterWindowResult;
|
|
9867
|
+
|
|
9868
|
+
//#region src/viewer/hooks/useEditorHistory.d.ts
|
|
9869
|
+
interface EditorHistoryInput {
|
|
9992
9870
|
slides: PptxSlide[];
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9871
|
+
canvasSize: CanvasSize;
|
|
9872
|
+
activeSlideIndex: number;
|
|
9873
|
+
templateElementsBySlideId: Record<string, PptxElement[]>;
|
|
9874
|
+
selectedElementId: string | null;
|
|
9875
|
+
selectedElementIds: string[];
|
|
9876
|
+
editTemplateMode: boolean;
|
|
9877
|
+
headerFooter: PptxHeaderFooter;
|
|
9878
|
+
loading: boolean;
|
|
9879
|
+
error: string | null;
|
|
9880
|
+
/**
|
|
9881
|
+
* Undo-stack depth (File > Options > Advanced > "Maximum number of undos",
|
|
9882
|
+
* resolved via the shared `resolveHistoryDepth`). Defaults to 120.
|
|
9883
|
+
*/
|
|
9884
|
+
maxHistoryEntries?: number;
|
|
9885
|
+
hasActivePointerInteraction: () => boolean;
|
|
9886
|
+
pointerCommitNonce: number;
|
|
9887
|
+
setSlides: (slides: PptxSlide[]) => void;
|
|
9888
|
+
setCanvasSize: (size: CanvasSize) => void;
|
|
9889
|
+
setActiveSlideIndex: (index: number) => void;
|
|
9890
|
+
setTemplateElementsBySlideId: (map: Record<string, PptxElement[]>) => void;
|
|
9891
|
+
setSelectedElementId: (id: string | null) => void;
|
|
9892
|
+
setSelectedElementIds: (ids: string[]) => void;
|
|
9893
|
+
setEditTemplateMode: (mode: boolean) => void;
|
|
9894
|
+
setHeaderFooter: (hf: PptxHeaderFooter) => void;
|
|
9996
9895
|
}
|
|
9997
|
-
interface
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
handleHoverEnd: (shapeId: string) => void;
|
|
10008
|
-
runPresentationEntranceAnimations: (slideIndex: number) => void;
|
|
10009
|
-
/** Exposed so the orchestrator can schedule additional timers (e.g. auto-advance). */
|
|
10010
|
-
presentationTimersRef: React.RefObject<number[]>;
|
|
9896
|
+
interface EditorHistoryResult {
|
|
9897
|
+
canUndo: boolean;
|
|
9898
|
+
canRedo: boolean;
|
|
9899
|
+
undoLabel: string | undefined;
|
|
9900
|
+
redoLabel: string | undefined;
|
|
9901
|
+
handleUndo: () => void;
|
|
9902
|
+
handleRedo: () => void;
|
|
9903
|
+
resetHistory: () => void;
|
|
9904
|
+
markDirty: () => void;
|
|
9905
|
+
buildHistorySnapshot: (actionLabel?: string) => EditorHistorySnapshot;
|
|
10011
9906
|
}
|
|
10012
|
-
declare function
|
|
9907
|
+
declare function useEditorHistory(input: EditorHistoryInput): EditorHistoryResult;
|
|
10013
9908
|
//#endregion
|
|
10014
|
-
//#region src/viewer/hooks/
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
9909
|
+
//#region src/viewer/hooks/useZoomViewport.d.ts
|
|
9910
|
+
/** Axis-aligned bounding box used by zoom / viewport helpers. */
|
|
9911
|
+
interface SelectionBounds {
|
|
9912
|
+
minX: number;
|
|
9913
|
+
minY: number;
|
|
9914
|
+
maxX: number;
|
|
9915
|
+
maxY: number;
|
|
10021
9916
|
}
|
|
10022
|
-
interface
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
recordedTimings: Record<number, number>;
|
|
10026
|
-
slideStartTime: number | null;
|
|
10027
|
-
showRehearsalSummary: boolean;
|
|
10028
|
-
setShowRehearsalSummary: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10029
|
-
rehearsalPaused: boolean;
|
|
10030
|
-
recordCurrentSlideTime: (slideIndex: number) => void;
|
|
10031
|
-
dismissRehearsalSummary: () => void;
|
|
10032
|
-
saveRehearsalTimings: () => void;
|
|
10033
|
-
enterRehearsalMode: () => void;
|
|
10034
|
-
toggleRehearsalPause: () => void;
|
|
9917
|
+
interface UseZoomViewportInput {
|
|
9918
|
+
canvasSize: CanvasSize;
|
|
9919
|
+
selectedElements: PptxElement[];
|
|
10035
9920
|
}
|
|
10036
|
-
|
|
9921
|
+
interface UseZoomViewportResult {
|
|
9922
|
+
editWrapperRef: React.RefObject<HTMLDivElement | null>;
|
|
9923
|
+
canvasStageRef: React.RefObject<HTMLDivElement | null>;
|
|
9924
|
+
canvasViewportRef: React.RefObject<HTMLDivElement | null>;
|
|
9925
|
+
renderScaleRef: React.MutableRefObject<number>;
|
|
9926
|
+
scale: number;
|
|
9927
|
+
setScale: (scale: number) => void;
|
|
9928
|
+
editorDimensions: CanvasSize | null;
|
|
9929
|
+
setEditorDimensions: (dims: CanvasSize | null) => void;
|
|
9930
|
+
fitScale: number;
|
|
9931
|
+
editorScale: number;
|
|
9932
|
+
handleZoomIn: () => void;
|
|
9933
|
+
handleZoomOut: () => void;
|
|
9934
|
+
handleResetZoom: () => void;
|
|
9935
|
+
handleZoomToFit: () => void;
|
|
9936
|
+
handleZoomToSelection: () => void;
|
|
9937
|
+
handleWheel: (e: WheelEvent) => void;
|
|
9938
|
+
centerBoundsInViewport: (bounds: SelectionBounds, nextScale: number) => void;
|
|
9939
|
+
getCanvasPointFromClient: (clientX: number, clientY: number) => {
|
|
9940
|
+
x: number;
|
|
9941
|
+
y: number;
|
|
9942
|
+
} | null;
|
|
9943
|
+
}
|
|
9944
|
+
declare function useZoomViewport({ canvasSize, selectedElements }: UseZoomViewportInput): UseZoomViewportResult;
|
|
10037
9945
|
//#endregion
|
|
10038
|
-
//#region src/viewer/hooks/presentation-mode/
|
|
10039
|
-
|
|
9946
|
+
//#region src/viewer/hooks/presentation-mode/types.d.ts
|
|
9947
|
+
/**
|
|
9948
|
+
* How a forward/backward slide advance was requested.
|
|
9949
|
+
*
|
|
9950
|
+
* - `'click'`: a click/tap on the slide surface (PowerPoint's "On Mouse Click"
|
|
9951
|
+
* advance). This is the only trigger governed by `advanceOnClick`.
|
|
9952
|
+
* - `'explicit'`: keyboard, navigation buttons, action triggers, and timed
|
|
9953
|
+
* auto-advance. These always navigate regardless of `advanceOnClick`, matching
|
|
9954
|
+
* PowerPoint (arrow keys / Next always work even when click-advance is off).
|
|
9955
|
+
*/
|
|
9956
|
+
type SlideAdvanceTrigger = 'click' | 'explicit';
|
|
9957
|
+
/**
|
|
9958
|
+
* State describing the transition overlay that plays while advancing into a
|
|
9959
|
+
* slide that carries a `p:transition`. The outgoing slide is snapshotted into
|
|
9960
|
+
* an animated overlay layer while the incoming slide renders underneath on the
|
|
9961
|
+
* main stage; the overlay tears down once `durationMs` elapses.
|
|
9962
|
+
*/
|
|
9963
|
+
interface PresentationTransitionOverlayState {
|
|
9964
|
+
/** Index of the leaving slide, rendered (animated) in the overlay layer. */
|
|
9965
|
+
outgoingSlideIndex: number;
|
|
9966
|
+
/** Index of the arriving slide, already live on the main stage. */
|
|
9967
|
+
incomingSlideIndex: number;
|
|
9968
|
+
/** The incoming slide's transition definition (drives the CSS animation). */
|
|
9969
|
+
transition: PptxSlideTransition;
|
|
9970
|
+
/** Resolved transition duration (ms). */
|
|
9971
|
+
durationMs: number;
|
|
9972
|
+
}
|
|
9973
|
+
interface UsePresentationModeInput {
|
|
10040
9974
|
mode: ViewerMode;
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
9975
|
+
slides: PptxSlide[];
|
|
9976
|
+
visibleSlideIndexes: number[];
|
|
9977
|
+
activeSlideIndex: number;
|
|
9978
|
+
containerRef: React.RefObject<HTMLElement | null>;
|
|
9979
|
+
/** Raw PPTX bytes: forwarded to audience window for content sharing. */
|
|
9980
|
+
content?: ArrayBuffer | Uint8Array | null;
|
|
10046
9981
|
onSetMode: (mode: ViewerMode) => void;
|
|
10047
|
-
|
|
9982
|
+
onSetActiveSlideIndex: (index: number) => void;
|
|
9983
|
+
/**
|
|
9984
|
+
* Play a sound file for an action/transition. When `options.loop` is true the
|
|
9985
|
+
* audio repeats until the next animation sound plays or the show exits
|
|
9986
|
+
* (used for transition sounds flagged with `soundLoop`).
|
|
9987
|
+
*/
|
|
9988
|
+
onPlayActionSound?: (soundPath: string, options?: {
|
|
9989
|
+
loop?: boolean;
|
|
9990
|
+
}) => void;
|
|
9991
|
+
/** Select a pointer tool (Ctrl+L laser, Ctrl+P pen, Ctrl+A arrow, Ctrl+E eraser). */
|
|
10048
9992
|
onSetPointerTool?: (tool: PresentationPointerTool | 'arrow') => void;
|
|
10049
|
-
/** Erase
|
|
9993
|
+
/** Erase the current slide's ink annotations (E). */
|
|
10050
9994
|
onEraseAnnotations?: () => void;
|
|
10051
9995
|
/** Show or hide ink markup (Ctrl+M). */
|
|
10052
9996
|
onToggleInkMarkup?: () => void;
|
|
@@ -10054,168 +9998,113 @@ interface UsePresentationKeyboardInput {
|
|
|
10054
9998
|
onToggleToolbar?: () => void;
|
|
10055
9999
|
/** Open the All Slides navigator (Ctrl+S). */
|
|
10056
10000
|
onShowAllSlides?: () => void;
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
recordCurrentSlideTime: (slideIndex: number) => void;
|
|
10061
|
-
presentationSlideIndex: number;
|
|
10062
|
-
setShowRehearsalSummary: (value: boolean) => void;
|
|
10063
|
-
}
|
|
10064
|
-
/**
|
|
10065
|
-
* Registers PowerPoint's slide-show shortcuts while a show is running.
|
|
10066
|
-
*
|
|
10067
|
-
* The key-to-action mapping lives in `pptx-viewer-shared` so every binding
|
|
10068
|
-
* resolves the same chords; this hook only performs the resulting actions.
|
|
10069
|
-
*/
|
|
10070
|
-
declare function usePresentationKeyboard(input: UsePresentationKeyboardInput): void;
|
|
10071
|
-
//#endregion
|
|
10072
|
-
//#region src/viewer/hooks/presentation-mode/useSlideNavigation.d.ts
|
|
10073
|
-
interface UseSlideNavigationInput {
|
|
10074
|
-
slides: PptxSlide[];
|
|
10075
|
-
visibleSlideIndexes: number[];
|
|
10076
|
-
presentationSlideIndex: number;
|
|
10077
|
-
setPresentationSlideIndex: (index: number) => void;
|
|
10078
|
-
setPresentationSlideVisible: (visible: boolean) => void;
|
|
10079
|
-
setTransitionOverlay: (state: PresentationTransitionOverlayState | null) => void;
|
|
10080
|
-
onSetMode: (mode: ViewerMode) => void;
|
|
10081
|
-
onSetActiveSlideIndex: (index: number) => void;
|
|
10082
|
-
onPlayActionSound?: (soundPath: string) => void;
|
|
10001
|
+
/** Called to persist rehearsal timings into slide transitions. */
|
|
10002
|
+
onSaveRehearsalTimings?: (timings: Record<number, number>) => void;
|
|
10003
|
+
/** Whether to loop continuously (kiosk or explicit loop setting). */
|
|
10083
10004
|
loopContinuously?: boolean;
|
|
10084
|
-
/** Whether to
|
|
10005
|
+
/** Whether to play animations during the slide show (false = skip all animations). */
|
|
10006
|
+
showWithAnimation?: boolean;
|
|
10007
|
+
/** Whether to use rehearsed auto-advance timings (false = manual advance only). */
|
|
10085
10008
|
useTimings?: boolean;
|
|
10086
10009
|
/**
|
|
10087
|
-
*
|
|
10088
|
-
*
|
|
10089
|
-
*
|
|
10010
|
+
* Options > Advanced > "End with black slide". When true (PowerPoint's
|
|
10011
|
+
* default), advancing past the last slide shows a black end-of-show
|
|
10012
|
+
* screen; the next advance (or a click on it) exits. When false,
|
|
10013
|
+
* advancing past the last slide exits the show directly.
|
|
10090
10014
|
*/
|
|
10091
|
-
|
|
10092
|
-
|
|
10015
|
+
endWithBlackSlide?: boolean;
|
|
10016
|
+
}
|
|
10017
|
+
interface UsePresentationModeResult {
|
|
10018
|
+
presentationSlideIndex: number;
|
|
10019
|
+
setPresentationSlideIndex: (index: number) => void;
|
|
10020
|
+
presentationSlideVisible: boolean;
|
|
10021
|
+
/** Active slide-transition overlay, or `null` when no transition is playing. */
|
|
10022
|
+
transitionOverlay: PresentationTransitionOverlayState | null;
|
|
10023
|
+
/** Tear down the transition overlay once its animation completes. */
|
|
10024
|
+
handleTransitionOverlayComplete: () => void;
|
|
10025
|
+
presentationAnimations: PresentationAnimationRuntime[];
|
|
10026
|
+
presentationElementStates: Map<string, ElementAnimationState>;
|
|
10027
|
+
presentationKeyframesCss: string;
|
|
10093
10028
|
clearPresentationTimers: () => void;
|
|
10094
10029
|
runPresentationEntranceAnimations: (slideIndex: number) => void;
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
}
|
|
10102
|
-
interface UseSlideNavigationResult {
|
|
10030
|
+
/** True while the black "End of slide show" screen is displayed. */
|
|
10031
|
+
endOfShowVisible: boolean;
|
|
10032
|
+
/** Whether the All Slides navigator (Ctrl+S) is open during the show. */
|
|
10033
|
+
allSlidesOpen: boolean;
|
|
10034
|
+
openAllSlides: () => void;
|
|
10035
|
+
closeAllSlides: () => void;
|
|
10103
10036
|
movePresentationSlide: (direction: 1 | -1, trigger?: SlideAdvanceTrigger) => void;
|
|
10104
10037
|
navigateToSlide: (slideIndex: number) => void;
|
|
10105
10038
|
handlePresentationAction: (action: PptxAction) => void;
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
|
|
10116
|
-
|
|
10039
|
+
/**
|
|
10040
|
+
* Handle a shape click in presentation mode. If the shape is an interactive
|
|
10041
|
+
* trigger, play its animation sequence. Returns `true` if handled.
|
|
10042
|
+
*/
|
|
10043
|
+
handleInteractiveShapeClick: (shapeId: string) => boolean;
|
|
10044
|
+
/** Set of shape IDs that are interactive sequence triggers on the current slide. */
|
|
10045
|
+
interactiveTriggerShapeIds: ReadonlySet<string>;
|
|
10046
|
+
/** Set of shape IDs that are hover animation triggers on the current slide. */
|
|
10047
|
+
hoverTriggerShapeIds: ReadonlySet<string>;
|
|
10048
|
+
/** Handle hover start on a shape. If the shape has a hover sequence, play it. Returns `true` if handled. */
|
|
10049
|
+
handleHoverStart: (shapeId: string) => boolean;
|
|
10050
|
+
/** Handle hover end on a shape. Resets the hover sequence for replay. */
|
|
10051
|
+
handleHoverEnd: (shapeId: string) => void;
|
|
10052
|
+
/** Must be called from a user-gesture handler (click) to satisfy browser fullscreen policy. */
|
|
10053
|
+
enterPresentMode: () => void;
|
|
10054
|
+
/** Whether presenter view (split-screen with notes) is active instead of fullscreen. */
|
|
10055
|
+
presenterMode: boolean;
|
|
10056
|
+
/** Enter presenter view mode (no fullscreen, shows notes panel). */
|
|
10057
|
+
enterPresenterView: () => void;
|
|
10058
|
+
/** Toggle between fullscreen and presenter view during presentation. */
|
|
10059
|
+
togglePresenterView: () => void;
|
|
10060
|
+
/** Timestamp (ms) when the presentation started: used for elapsed timer. */
|
|
10061
|
+
presentationStartTime: number | null;
|
|
10062
|
+
/** Whether the current presentation session is in rehearse-timings mode. */
|
|
10063
|
+
rehearsing: boolean;
|
|
10064
|
+
/** Enter rehearse-timings mode (fullscreen presentation + timing HUD). */
|
|
10065
|
+
enterRehearsalMode: () => void;
|
|
10066
|
+
/** Recorded timings in ms, keyed by slide index. Populated during rehearsal. */
|
|
10067
|
+
recordedTimings: Record<number, number>;
|
|
10068
|
+
/** Timestamp when the current slide started (ms since epoch). */
|
|
10069
|
+
slideStartTime: number | null;
|
|
10070
|
+
/** Whether the rehearsal summary dialog should be shown. */
|
|
10071
|
+
showRehearsalSummary: boolean;
|
|
10072
|
+
/** Dismiss the rehearsal summary (discard timings). */
|
|
10073
|
+
dismissRehearsalSummary: () => void;
|
|
10074
|
+
/** Save recorded timings into each slide's transition.advanceAfterMs. */
|
|
10075
|
+
saveRehearsalTimings: () => void;
|
|
10076
|
+
/** Whether rehearsal timer is paused. */
|
|
10077
|
+
rehearsalPaused: boolean;
|
|
10078
|
+
/** Toggle the rehearsal timer pause state. */
|
|
10079
|
+
toggleRehearsalPause: () => void;
|
|
10080
|
+
/** Handle a zoom element click in presentation mode. */
|
|
10081
|
+
handleZoomClick: (targetSlideIndex: number, returnSlideIndex: number) => void;
|
|
10082
|
+
/** Ref holding the slide index to return to after zoom navigation. */
|
|
10083
|
+
zoomReturnSlideIndex: React.RefObject<number | null>;
|
|
10084
|
+
/** Navigate back to the zoom summary slide. Returns true if navigation occurred. */
|
|
10085
|
+
returnToZoomSlide: () => boolean;
|
|
10086
|
+
/** Clear the stored zoom return index. */
|
|
10087
|
+
clearZoomReturn: () => void;
|
|
10088
|
+
/** Open the audience display in a separate browser window. Returns `true` if successful. */
|
|
10117
10089
|
openAudienceWindow: () => boolean;
|
|
10090
|
+
/** Close the audience display window. */
|
|
10118
10091
|
closeAudienceWindow: () => void;
|
|
10092
|
+
/** Whether the audience window is currently open. */
|
|
10119
10093
|
isAudienceWindowOpen: () => boolean;
|
|
10094
|
+
/** Send a slide index to the audience window explicitly. */
|
|
10120
10095
|
syncSlideToAudience: (slideIndex: number) => void;
|
|
10121
10096
|
syncStateToAudience: (snapshot: PresentationSnapshot) => void;
|
|
10122
|
-
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
onSnapshot?: (snapshot: PresentationSnapshot) => void;
|
|
10133
|
-
}
|
|
10134
|
-
/**
|
|
10135
|
-
* When the page was opened with the `#pptx-audience` hash, this hook:
|
|
10136
|
-
* 1. Auto-enters fullscreen presentation mode after content loads
|
|
10137
|
-
* 2. Listens on BroadcastChannel for slide-change messages from the presenter
|
|
10138
|
-
* 3. Exits presentation mode when the presenter sends an exit signal
|
|
10139
|
-
*/
|
|
10140
|
-
declare function useAudienceMode(input: UseAudienceModeInput): void;
|
|
10141
|
-
|
|
10142
|
-
//#region src/viewer/hooks/useEditorHistory.d.ts
|
|
10143
|
-
interface EditorHistoryInput {
|
|
10144
|
-
slides: PptxSlide[];
|
|
10145
|
-
canvasSize: CanvasSize;
|
|
10146
|
-
activeSlideIndex: number;
|
|
10147
|
-
templateElementsBySlideId: Record<string, PptxElement[]>;
|
|
10148
|
-
selectedElementId: string | null;
|
|
10149
|
-
selectedElementIds: string[];
|
|
10150
|
-
editTemplateMode: boolean;
|
|
10151
|
-
headerFooter: PptxHeaderFooter;
|
|
10152
|
-
loading: boolean;
|
|
10153
|
-
error: string | null;
|
|
10154
|
-
/**
|
|
10155
|
-
* Undo-stack depth (File > Options > Advanced > "Maximum number of undos",
|
|
10156
|
-
* resolved via the shared `resolveHistoryDepth`). Defaults to 120.
|
|
10157
|
-
*/
|
|
10158
|
-
maxHistoryEntries?: number;
|
|
10159
|
-
hasActivePointerInteraction: () => boolean;
|
|
10160
|
-
pointerCommitNonce: number;
|
|
10161
|
-
setSlides: (slides: PptxSlide[]) => void;
|
|
10162
|
-
setCanvasSize: (size: CanvasSize) => void;
|
|
10163
|
-
setActiveSlideIndex: (index: number) => void;
|
|
10164
|
-
setTemplateElementsBySlideId: (map: Record<string, PptxElement[]>) => void;
|
|
10165
|
-
setSelectedElementId: (id: string | null) => void;
|
|
10166
|
-
setSelectedElementIds: (ids: string[]) => void;
|
|
10167
|
-
setEditTemplateMode: (mode: boolean) => void;
|
|
10168
|
-
setHeaderFooter: (hf: PptxHeaderFooter) => void;
|
|
10169
|
-
}
|
|
10170
|
-
interface EditorHistoryResult {
|
|
10171
|
-
canUndo: boolean;
|
|
10172
|
-
canRedo: boolean;
|
|
10173
|
-
undoLabel: string | undefined;
|
|
10174
|
-
redoLabel: string | undefined;
|
|
10175
|
-
handleUndo: () => void;
|
|
10176
|
-
handleRedo: () => void;
|
|
10177
|
-
resetHistory: () => void;
|
|
10178
|
-
markDirty: () => void;
|
|
10179
|
-
buildHistorySnapshot: (actionLabel?: string) => EditorHistorySnapshot;
|
|
10180
|
-
}
|
|
10181
|
-
declare function useEditorHistory(input: EditorHistoryInput): EditorHistoryResult;
|
|
10182
|
-
//#endregion
|
|
10183
|
-
//#region src/viewer/hooks/useZoomViewport.d.ts
|
|
10184
|
-
/** Axis-aligned bounding box used by zoom / viewport helpers. */
|
|
10185
|
-
interface SelectionBounds {
|
|
10186
|
-
minX: number;
|
|
10187
|
-
minY: number;
|
|
10188
|
-
maxX: number;
|
|
10189
|
-
maxY: number;
|
|
10190
|
-
}
|
|
10191
|
-
interface UseZoomViewportInput {
|
|
10192
|
-
canvasSize: CanvasSize;
|
|
10193
|
-
selectedElements: PptxElement[];
|
|
10194
|
-
}
|
|
10195
|
-
interface UseZoomViewportResult {
|
|
10196
|
-
editWrapperRef: React.RefObject<HTMLDivElement | null>;
|
|
10197
|
-
canvasStageRef: React.RefObject<HTMLDivElement | null>;
|
|
10198
|
-
canvasViewportRef: React.RefObject<HTMLDivElement | null>;
|
|
10199
|
-
renderScaleRef: React.MutableRefObject<number>;
|
|
10200
|
-
scale: number;
|
|
10201
|
-
setScale: (scale: number) => void;
|
|
10202
|
-
editorDimensions: CanvasSize | null;
|
|
10203
|
-
setEditorDimensions: (dims: CanvasSize | null) => void;
|
|
10204
|
-
fitScale: number;
|
|
10205
|
-
editorScale: number;
|
|
10206
|
-
handleZoomIn: () => void;
|
|
10207
|
-
handleZoomOut: () => void;
|
|
10208
|
-
handleResetZoom: () => void;
|
|
10209
|
-
handleZoomToFit: () => void;
|
|
10210
|
-
handleZoomToSelection: () => void;
|
|
10211
|
-
handleWheel: (e: WheelEvent) => void;
|
|
10212
|
-
centerBoundsInViewport: (bounds: SelectionBounds, nextScale: number) => void;
|
|
10213
|
-
getCanvasPointFromClient: (clientX: number, clientY: number) => {
|
|
10214
|
-
x: number;
|
|
10215
|
-
y: number;
|
|
10216
|
-
} | null;
|
|
10097
|
+
presenterSnapshot: PresentationSnapshot;
|
|
10098
|
+
setPresenterBlackout: (blackout: PresentationSnapshot['blackout']) => void;
|
|
10099
|
+
togglePresenterTimer: () => void;
|
|
10100
|
+
resetPresenterTimer: () => void;
|
|
10101
|
+
stepPresenterZoom: (direction: 1 | -1) => void;
|
|
10102
|
+
resetPresenterZoom: () => void;
|
|
10103
|
+
setPresenterCaption: (caption: string) => void;
|
|
10104
|
+
setPresenterSubtitlesVisible: (visible: boolean) => void;
|
|
10105
|
+
updatePresenterSnapshot: (patch: Partial<PresentationSnapshot>) => void;
|
|
10106
|
+
swapPresenterDisplays: () => Promise<boolean>;
|
|
10217
10107
|
}
|
|
10218
|
-
declare function useZoomViewport({ canvasSize, selectedElements }: UseZoomViewportInput): UseZoomViewportResult;
|
|
10219
10108
|
//#endregion
|
|
10220
10109
|
//#region src/viewer/hooks/usePresentationMode.d.ts
|
|
10221
10110
|
declare function usePresentationMode(input: UsePresentationModeInput): UsePresentationModeResult;
|
|
@@ -12150,6 +12039,144 @@ interface UseSwipeNavigationResult {
|
|
|
12150
12039
|
}
|
|
12151
12040
|
declare function useSwipeNavigation(input: UseSwipeNavigationInput): UseSwipeNavigationResult;
|
|
12152
12041
|
//#endregion
|
|
12042
|
+
//#region src/viewer/hooks/presentation-mode/useAnimationPlayback.d.ts
|
|
12043
|
+
interface UseAnimationPlaybackInput {
|
|
12044
|
+
slides: PptxSlide[];
|
|
12045
|
+
onPlayActionSound?: (soundPath: string) => void;
|
|
12046
|
+
/** When false, all animations are skipped (elements shown immediately). */
|
|
12047
|
+
showWithAnimation?: boolean;
|
|
12048
|
+
}
|
|
12049
|
+
/** How a slide's animation timeline should be seeded when it becomes active. */
|
|
12050
|
+
interface SeedSlideAnimationOptions {
|
|
12051
|
+
/**
|
|
12052
|
+
* Seed the slide as fully built instead of playing it from the start.
|
|
12053
|
+
*
|
|
12054
|
+
* PowerPoint shows a slide you step BACKWARD onto with its builds already
|
|
12055
|
+
* complete; a further back press then walks them off. Replaying from zero
|
|
12056
|
+
* made a deck whose opening build auto-starts restart every time the
|
|
12057
|
+
* presenter stepped back onto it.
|
|
12058
|
+
*/
|
|
12059
|
+
completed?: boolean;
|
|
12060
|
+
}
|
|
12061
|
+
interface UseAnimationPlaybackResult {
|
|
12062
|
+
presentationAnimations: PresentationAnimationRuntime[];
|
|
12063
|
+
presentationElementStates: Map<string, ElementAnimationState>;
|
|
12064
|
+
presentationKeyframesCss: string;
|
|
12065
|
+
interactiveTriggerShapeIds: ReadonlySet<string>;
|
|
12066
|
+
hoverTriggerShapeIds: ReadonlySet<string>;
|
|
12067
|
+
clearPresentationTimers: () => void;
|
|
12068
|
+
playNextAnimationGroup: () => boolean;
|
|
12069
|
+
handleInteractiveShapeClick: (shapeId: string) => boolean;
|
|
12070
|
+
handleHoverStart: (shapeId: string) => boolean;
|
|
12071
|
+
handleHoverEnd: (shapeId: string) => void;
|
|
12072
|
+
runPresentationEntranceAnimations: (slideIndex: number, options?: SeedSlideAnimationOptions) => void;
|
|
12073
|
+
/**
|
|
12074
|
+
* True while the active slide is showing its builds as already complete
|
|
12075
|
+
* because the presenter stepped backward onto it. The next backward press
|
|
12076
|
+
* replays the slide instead of leaving it (PowerPoint's behaviour).
|
|
12077
|
+
*/
|
|
12078
|
+
isSeededCompleted: () => boolean;
|
|
12079
|
+
/** Exposed so the orchestrator can schedule additional timers (e.g. auto-advance). */
|
|
12080
|
+
presentationTimersRef: React.RefObject<number[]>;
|
|
12081
|
+
}
|
|
12082
|
+
declare function useAnimationPlayback(input: UseAnimationPlaybackInput): UseAnimationPlaybackResult;
|
|
12083
|
+
//#endregion
|
|
12084
|
+
//#region src/viewer/hooks/presentation-mode/useRehearsalTimings.d.ts
|
|
12085
|
+
interface UseRehearsalTimingsInput {
|
|
12086
|
+
containerRef: React.RefObject<HTMLElement | null>;
|
|
12087
|
+
onSetMode: (mode: ViewerMode) => void;
|
|
12088
|
+
onSaveRehearsalTimings?: (timings: Record<number, number>) => void;
|
|
12089
|
+
setPresentationStartTime: (time: number | null) => void;
|
|
12090
|
+
setPresenterMode: (mode: boolean) => void;
|
|
12091
|
+
}
|
|
12092
|
+
interface UseRehearsalTimingsResult {
|
|
12093
|
+
rehearsing: boolean;
|
|
12094
|
+
setRehearsing: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12095
|
+
recordedTimings: Record<number, number>;
|
|
12096
|
+
slideStartTime: number | null;
|
|
12097
|
+
showRehearsalSummary: boolean;
|
|
12098
|
+
setShowRehearsalSummary: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12099
|
+
rehearsalPaused: boolean;
|
|
12100
|
+
recordCurrentSlideTime: (slideIndex: number) => void;
|
|
12101
|
+
dismissRehearsalSummary: () => void;
|
|
12102
|
+
saveRehearsalTimings: () => void;
|
|
12103
|
+
enterRehearsalMode: () => void;
|
|
12104
|
+
toggleRehearsalPause: () => void;
|
|
12105
|
+
}
|
|
12106
|
+
declare function useRehearsalTimings(input: UseRehearsalTimingsInput): UseRehearsalTimingsResult;
|
|
12107
|
+
//#endregion
|
|
12108
|
+
//#region src/viewer/hooks/presentation-mode/usePresentationKeyboard.d.ts
|
|
12109
|
+
interface UsePresentationKeyboardInput {
|
|
12110
|
+
mode: ViewerMode;
|
|
12111
|
+
movePresentationSlide: (direction: 1 | -1) => void;
|
|
12112
|
+
/** Jump to a 0-based slide index (Home / End / typed slide number). */
|
|
12113
|
+
navigateToSlide: (index: number) => void;
|
|
12114
|
+
/** Total slide count, so End can resolve the last slide. */
|
|
12115
|
+
slideCount: number;
|
|
12116
|
+
onSetMode: (mode: ViewerMode) => void;
|
|
12117
|
+
/** Select a pointer tool (Ctrl+L / Ctrl+P / Ctrl+A / Ctrl+E). */
|
|
12118
|
+
onSetPointerTool?: (tool: PresentationPointerTool | 'arrow') => void;
|
|
12119
|
+
/** Erase this slide's ink annotations (E). */
|
|
12120
|
+
onEraseAnnotations?: () => void;
|
|
12121
|
+
/** Show or hide ink markup (Ctrl+M). */
|
|
12122
|
+
onToggleInkMarkup?: () => void;
|
|
12123
|
+
/** Show or hide the slide-show chrome (Ctrl+H). */
|
|
12124
|
+
onToggleToolbar?: () => void;
|
|
12125
|
+
/** Open the All Slides navigator (Ctrl+S). */
|
|
12126
|
+
onShowAllSlides?: () => void;
|
|
12127
|
+
onToggleBlackScreen?: () => void;
|
|
12128
|
+
onToggleWhiteScreen?: () => void;
|
|
12129
|
+
rehearsing: boolean;
|
|
12130
|
+
recordCurrentSlideTime: (slideIndex: number) => void;
|
|
12131
|
+
presentationSlideIndex: number;
|
|
12132
|
+
setShowRehearsalSummary: (value: boolean) => void;
|
|
12133
|
+
}
|
|
12134
|
+
/**
|
|
12135
|
+
* Registers PowerPoint's slide-show shortcuts while a show is running.
|
|
12136
|
+
*
|
|
12137
|
+
* The key-to-action mapping lives in `pptx-viewer-shared` so every binding
|
|
12138
|
+
* resolves the same chords; this hook only performs the resulting actions.
|
|
12139
|
+
*/
|
|
12140
|
+
declare function usePresentationKeyboard(input: UsePresentationKeyboardInput): void;
|
|
12141
|
+
//#endregion
|
|
12142
|
+
//#region src/viewer/hooks/presentation-mode/useSlideNavigation.d.ts
|
|
12143
|
+
interface UseSlideNavigationInput {
|
|
12144
|
+
slides: PptxSlide[];
|
|
12145
|
+
visibleSlideIndexes: number[];
|
|
12146
|
+
presentationSlideIndex: number;
|
|
12147
|
+
setPresentationSlideIndex: (index: number) => void;
|
|
12148
|
+
setPresentationSlideVisible: (visible: boolean) => void;
|
|
12149
|
+
setTransitionOverlay: (state: PresentationTransitionOverlayState | null) => void;
|
|
12150
|
+
onSetMode: (mode: ViewerMode) => void;
|
|
12151
|
+
onSetActiveSlideIndex: (index: number) => void;
|
|
12152
|
+
onPlayActionSound?: (soundPath: string) => void;
|
|
12153
|
+
loopContinuously?: boolean;
|
|
12154
|
+
/** Whether to use rehearsed auto-advance timings. When false, slides advance only on click. */
|
|
12155
|
+
useTimings?: boolean;
|
|
12156
|
+
/**
|
|
12157
|
+
* Fired when the user advances past the last slide (no loop, no rehearsal).
|
|
12158
|
+
* The presentation-mode hook uses it for PowerPoint's "End with black
|
|
12159
|
+
* slide" behavior. When absent, advancing past the end clamps as before.
|
|
12160
|
+
*/
|
|
12161
|
+
onAdvancePastLastSlide?: () => void;
|
|
12162
|
+
playNextAnimationGroup: () => boolean;
|
|
12163
|
+
clearPresentationTimers: () => void;
|
|
12164
|
+
runPresentationEntranceAnimations: (slideIndex: number) => void;
|
|
12165
|
+
presentationTimersRef: {
|
|
12166
|
+
current: number[];
|
|
12167
|
+
};
|
|
12168
|
+
rehearsing: boolean;
|
|
12169
|
+
recordCurrentSlideTime: (slideIndex: number) => void;
|
|
12170
|
+
setShowRehearsalSummary: (value: boolean) => void;
|
|
12171
|
+
}
|
|
12172
|
+
interface UseSlideNavigationResult {
|
|
12173
|
+
movePresentationSlide: (direction: 1 | -1, trigger?: SlideAdvanceTrigger) => void;
|
|
12174
|
+
navigateToSlide: (slideIndex: number) => void;
|
|
12175
|
+
handlePresentationAction: (action: PptxAction) => void;
|
|
12176
|
+
scheduleAutoAdvanceForSlide: (slideIndex: number) => void;
|
|
12177
|
+
}
|
|
12178
|
+
declare function useSlideNavigation(input: UseSlideNavigationInput): UseSlideNavigationResult;
|
|
12179
|
+
//#endregion
|
|
12153
12180
|
//#region src/viewer/hooks/presentation-mode/useZoomNavigation.d.ts
|
|
12154
12181
|
/**
|
|
12155
12182
|
* Input for the useZoomNavigation sub-hook.
|
|
@@ -12194,6 +12221,28 @@ interface UseZoomNavigationResult {
|
|
|
12194
12221
|
* the summary zoom slide.
|
|
12195
12222
|
*/
|
|
12196
12223
|
declare function useZoomNavigation(input: UseZoomNavigationInput): UseZoomNavigationResult;
|
|
12224
|
+
//#endregion
|
|
12225
|
+
//#region src/viewer/hooks/presentation-mode/useAudienceMode.d.ts
|
|
12226
|
+
interface UseAudienceModeInput {
|
|
12227
|
+
mode: ViewerMode;
|
|
12228
|
+
onSetMode: (mode: ViewerMode) => void;
|
|
12229
|
+
onSetActiveSlideIndex: (index: number) => void;
|
|
12230
|
+
containerRef: React.RefObject<HTMLElement | null>;
|
|
12231
|
+
onSnapshot?: (snapshot: PresentationSnapshot) => void;
|
|
12232
|
+
/**
|
|
12233
|
+
* Raise the end-of-slide-show screen. Called when the presenter ends the
|
|
12234
|
+
* session and the browser refuses to close this tab: the audience must see
|
|
12235
|
+
* the black end screen, never the editor.
|
|
12236
|
+
*/
|
|
12237
|
+
onPresenterEnded?: () => void;
|
|
12238
|
+
}
|
|
12239
|
+
/**
|
|
12240
|
+
* When the page was opened with the `#pptx-audience` hash, this hook:
|
|
12241
|
+
* 1. Auto-enters fullscreen presentation mode after content loads
|
|
12242
|
+
* 2. Listens on BroadcastChannel for slide-change messages from the presenter
|
|
12243
|
+
* 3. Exits presentation mode when the presenter sends an exit signal
|
|
12244
|
+
*/
|
|
12245
|
+
declare function useAudienceMode(input: UseAudienceModeInput): void;
|
|
12197
12246
|
|
|
12198
12247
|
export { MIN_TOUCH_TARGET, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, computeToolbarVisibility, computeVirtualRange, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useClipboardHandlers, useCollaborativeHistory, useCollaborativeState, useComments, useContentLifecycle, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useToolbarVisibility, useTouchGestures, useViewerBuildingBlocks, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerOptions, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport };
|
|
12199
12248
|
export type { AnnotationHandlersResult, AnnotationStroke, AutosaveStatus, CanvasInteractionHandlers, CollaborationConfig, CollaborationContextValue, ConnectionStatus, ContentLifecycleResult, DerivedElementState, DerivedSlideState, DeviceOrientation, EditorHistoryInput, EditorHistoryResult, EditorOperationsResult, ElementManipulationHandlers, ElementOperations, ExportHandlersResult, ExportSaveAsResult, IOHandlersResult, InsertElementHandlers, LayoutSwitchingResult, MergeShapesHandlerInput, MergeShapesHandlers, ModalDismissDrag, ModalDismissDragHandlers, PresentationSetupResult, PresentationTool, PrintHandlersResult, PropertyHandlersResult, SectionOperations, SheetDismissDrag, SheetDismissDragHandlers, SlideManagementHandlers, TableOperationHandlers, ThemeHandlersResult, ThemeSwitchingResult, ToolbarVisibility, TouchGestureCallbacks, UseAnimationPlaybackInput, UseAnimationPlaybackResult, UseAnnotationHandlersInput, UseAutosaveInput, UseAutosaveResult, UseBroadcastFollowerInput, UseCanvasInteractionsInput, UseCollaborativeHistoryInput, UseCollaborativeHistoryResult, UseCollaborativeStateInput, UseContentLifecycleInput, UseDerivedElementStateInput, UseDerivedSlideStateInput, UseDialogCustomShowsInput, UseDialogCustomShowsResult, UseEditorOperationsInput, UseElementManipulationInput, UseElementOperationsInput, UseExportHandlersInput, UseExportSaveAsInput, UseFollowModeInput, UseFollowModeResult, UseFontInjectionInput, UseIOHandlersInput, UseInsertElementsInput, UseIsMobileInput, UseIsMobileResult, UseKeyboardInsetsResult, UseKeyboardShortcutWiringInput, UseKeyboardShortcutsInput, UseLayoutSwitchingInput, UseLoadContentInput, UseLoadContentResult, UsePointerHandlersInput, UsePresenceTrackingInput, UsePresenceTrackingResult, UsePresentationAnnotationsResult, UsePresentationSetupInput, UsePresenterWindowInput, UsePresenterWindowResult, UsePrintHandlersInput, UsePropertyHandlersInput, UseRecoveryDetectionInput, UseReducedMotionResult, UseRehearsalTimingsInput, UseRehearsalTimingsResult, UseResizablePanelsResult, UseSectionOperationsInput, UseSerializeInput, UseSlideManagementInput, UseSlideNavigationInput, UseSlideNavigationResult, UseSwipeNavigationInput, UseSwipeNavigationResult, UseTableOperationsInput, UseThemeHandlersInput, UseThemeSwitchingInput, UseTouchGesturesInput, UseViewerBuildingBlocksInput, UseViewerCoreStateInput, UseViewerDialogsInput, UseViewerIntegrationInput, UseViewerOptionsResult, UseViewerStateInput, UseYjsDocumentSyncInput, UseYjsProviderInput, UseYjsProviderResult, UseZoomNavigationInput, UseZoomNavigationResult, UserPresence, ViewerBuildingBlocksResult, ViewerCoreState, ViewerDialogsResult, ViewerIntegrationResult, ViewerState, ViewerUIState, VirtualizedRange, VirtualizedSlidesOptions, VirtualizedSlidesResult };
|