pptx-svelte-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 +18 -0
- package/dist/{AiChatPanel-CO-BVNBN.js → AiChatPanel-D2xEoaRP.js} +1 -1
- package/dist/{export-ko5GUtEk.js → export-Doev_dGg.js} +75816 -58293
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +112 -87
- package/dist/index.js +16 -16
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/{translator-D2iZRR15.js → translator-DL83W_OP.js} +1 -0
- package/dist/viewer/components/props.d.ts +7 -0
- package/dist/viewer/components/props.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +138 -88
- package/dist/viewer/index.js +49 -47
- package/dist/viewer/presentation/animation-playback.svelte.d.ts +5 -1
- package/dist/viewer/presentation/animation-playback.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/apply-animation-styles.d.ts.map +1 -1
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts +21 -0
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/presenter-session.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -1
- package/dist/viewer/state/presentation-element-states-context.d.ts +11 -0
- package/dist/viewer/state/presentation-element-states-context.d.ts.map +1 -1
- package/dist/viewer/state/viewport-handlers.d.ts.map +1 -1
- package/dist/{y-webrtc-BiViqyU2.js → y-webrtc-Cph8DzuM.js} +876 -863
- package/package.json +3 -3
- package/dist/__vite-browser-external-DOmiXdGM.js +0 -7
- package/dist/dist-BAMsFiYQ.js +0 -63126
- package/dist/rolldown-runtime--_vEcKDh.js +0 -29
package/dist/i18n.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -533,6 +533,62 @@ interface PptxCustomPathProperties {
|
|
|
533
533
|
customGeometryTextRect?: CustomGeometryTextRect;
|
|
534
534
|
}
|
|
535
535
|
//#endregion
|
|
536
|
+
//#region src/core/types/effect-dag.d.ts
|
|
537
|
+
type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
|
|
538
|
+
type EffectDagContainerType = 'sib' | 'tree';
|
|
539
|
+
type EffectDagNode = EffectDagContainer | EffectDagBlend | EffectDagXfrm | EffectDagRelOff | EffectDagBlur | EffectDagAlphaOutset | EffectDagPresetShadow | EffectDagRawLeaf;
|
|
540
|
+
interface EffectDagContainer {
|
|
541
|
+
kind: 'cont';
|
|
542
|
+
type: EffectDagContainerType;
|
|
543
|
+
name?: string;
|
|
544
|
+
children: EffectDagNode[];
|
|
545
|
+
}
|
|
546
|
+
interface EffectDagBlend {
|
|
547
|
+
kind: 'blend';
|
|
548
|
+
mode: EffectDagBlendMode;
|
|
549
|
+
container: EffectDagContainer;
|
|
550
|
+
}
|
|
551
|
+
interface EffectDagXfrm {
|
|
552
|
+
kind: 'xfrmEffect';
|
|
553
|
+
sx?: number;
|
|
554
|
+
sy?: number;
|
|
555
|
+
kx?: number;
|
|
556
|
+
ky?: number;
|
|
557
|
+
tx?: number;
|
|
558
|
+
ty?: number;
|
|
559
|
+
}
|
|
560
|
+
interface EffectDagRelOff {
|
|
561
|
+
kind: 'relOff';
|
|
562
|
+
tx?: number;
|
|
563
|
+
ty?: number;
|
|
564
|
+
}
|
|
565
|
+
/** Typed CT_BlurEffect with its original payload retained for lossless edits. */
|
|
566
|
+
interface EffectDagBlur {
|
|
567
|
+
kind: 'blur';
|
|
568
|
+
radiusEmu?: number;
|
|
569
|
+
grow?: boolean;
|
|
570
|
+
xml: XmlObject;
|
|
571
|
+
}
|
|
572
|
+
/** Typed CT_AlphaOutsetEffect with original XML retained for lossless edits. */
|
|
573
|
+
interface EffectDagAlphaOutset {
|
|
574
|
+
kind: 'alphaOutset';
|
|
575
|
+
radiusEmu?: number;
|
|
576
|
+
xml: XmlObject;
|
|
577
|
+
}
|
|
578
|
+
/** Typed CT_PresetShadowEffect with colour and extension XML retained verbatim. */
|
|
579
|
+
interface EffectDagPresetShadow {
|
|
580
|
+
kind: 'prstShdw';
|
|
581
|
+
preset?: `shdw${number}`;
|
|
582
|
+
distanceEmu?: number;
|
|
583
|
+
direction?: number;
|
|
584
|
+
xml: XmlObject;
|
|
585
|
+
}
|
|
586
|
+
interface EffectDagRawLeaf {
|
|
587
|
+
kind: 'raw';
|
|
588
|
+
tag: string;
|
|
589
|
+
xml: Record<string, unknown>;
|
|
590
|
+
}
|
|
591
|
+
//#endregion
|
|
536
592
|
//#region src/core/types/three-d.d.ts
|
|
537
593
|
/**
|
|
538
594
|
* 3-D effect properties, text warp (WordArt) presets, and scene/shape bevel
|
|
@@ -763,6 +819,18 @@ interface ShapeStyle {
|
|
|
763
819
|
/** Original `gradFill` XML retained for unknown-child and extension round-tripping. */
|
|
764
820
|
fillGradientXml?: XmlObject;
|
|
765
821
|
fillMode?: 'solid' | 'gradient' | 'pattern' | 'none' | 'image' | 'theme' | 'group';
|
|
822
|
+
/**
|
|
823
|
+
* `<p:sp useBgFill="1">`: the shape paints with the SLIDE BACKGROUND's fill
|
|
824
|
+
* rather than its own or its theme style's.
|
|
825
|
+
*
|
|
826
|
+
* PowerPoint's designer emits full-bleed rectangles this way, and they also
|
|
827
|
+
* carry an `a:fillRef` pointing at `accent1`. Ignoring the attribute painted
|
|
828
|
+
* those panels in the accent colour, so a black-and-white title slide came out
|
|
829
|
+
* black-and-blue. The load pipeline copies the resolved slide background onto
|
|
830
|
+
* the fill fields; the flag stays for round-trip and for renderers that want
|
|
831
|
+
* to re-resolve against a changed background.
|
|
832
|
+
*/
|
|
833
|
+
useBackgroundFill?: boolean;
|
|
766
834
|
fillPatternPreset?: string;
|
|
767
835
|
fillPatternBackgroundColor?: string;
|
|
768
836
|
/** Original `pattFill` XML retained for unknown-child round-tripping. */
|
|
@@ -995,6 +1063,15 @@ interface ShapeStyle {
|
|
|
995
1063
|
lineGlowOpacity?: number;
|
|
996
1064
|
/** Raw `a:effectDag` XML node preserved for round-trip serialisation. */
|
|
997
1065
|
effectDagXml?: XmlObject;
|
|
1066
|
+
/**
|
|
1067
|
+
* Typed effect graph parsed from {@link ShapeStyle.effectDagXml}. The four
|
|
1068
|
+
* structural container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`,
|
|
1069
|
+
* `a:relOff`) are fully typed; any other leaf effect (e.g. `a:outerShdw`,
|
|
1070
|
+
* `a:glow`, `a:alphaInv`) is captured as
|
|
1071
|
+
* {@link import('./effect-dag').EffectDagRawLeaf} so we never have to
|
|
1072
|
+
* recurse into the full effect taxonomy.
|
|
1073
|
+
*/
|
|
1074
|
+
effectDagTree?: EffectDagContainer;
|
|
998
1075
|
/** Grayscale flag from effectDag `a:grayscl`. */
|
|
999
1076
|
dagGrayscale?: boolean;
|
|
1000
1077
|
/** Bi-level threshold (0-100) from effectDag `a:biLevel`. */
|
|
@@ -1429,6 +1506,20 @@ interface TextStyle {
|
|
|
1429
1506
|
textPresetShadowDirection?: number;
|
|
1430
1507
|
/** Text blur effect radius in px (`a:blur`). */
|
|
1431
1508
|
textBlurRadius?: number;
|
|
1509
|
+
/**
|
|
1510
|
+
* Raw `a:effectDag` XML node from `a:rPr`, preserved verbatim for
|
|
1511
|
+
* round-trip serialisation. Mirrors the shape-level
|
|
1512
|
+
* {@link import('./shape-style').ShapeStyle.effectDagXml} field.
|
|
1513
|
+
*/
|
|
1514
|
+
textEffectDagXml?: XmlObject;
|
|
1515
|
+
/**
|
|
1516
|
+
* Typed effect graph parsed from `textEffectDagXml`. The four structural
|
|
1517
|
+
* container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`, `a:relOff`) are
|
|
1518
|
+
* fully typed; any other leaf effect is captured as
|
|
1519
|
+
* {@link import('./effect-dag').EffectDagRawLeaf} so we never have to
|
|
1520
|
+
* recurse into the full effect taxonomy.
|
|
1521
|
+
*/
|
|
1522
|
+
textEffectDagTree?: EffectDagContainer;
|
|
1432
1523
|
/** Text alpha modulation fixed (0-100) from `a:alphaModFix`. */
|
|
1433
1524
|
textAlphaModFix?: number;
|
|
1434
1525
|
/** Text alpha modulation from `a:alphaMod` (0-100 percentage). */
|
|
@@ -2819,62 +2910,6 @@ interface PptxChartData {
|
|
|
2819
2910
|
clrMapOvr?: Record<string, string>;
|
|
2820
2911
|
}
|
|
2821
2912
|
//#endregion
|
|
2822
|
-
//#region src/core/types/effect-dag.d.ts
|
|
2823
|
-
type EffectDagBlendMode = 'darken' | 'lighten' | 'mult' | 'over' | 'screen';
|
|
2824
|
-
type EffectDagContainerType = 'sib' | 'tree';
|
|
2825
|
-
type EffectDagNode = EffectDagContainer | EffectDagBlend | EffectDagXfrm | EffectDagRelOff | EffectDagBlur | EffectDagAlphaOutset | EffectDagPresetShadow | EffectDagRawLeaf;
|
|
2826
|
-
interface EffectDagContainer {
|
|
2827
|
-
kind: 'cont';
|
|
2828
|
-
type: EffectDagContainerType;
|
|
2829
|
-
name?: string;
|
|
2830
|
-
children: EffectDagNode[];
|
|
2831
|
-
}
|
|
2832
|
-
interface EffectDagBlend {
|
|
2833
|
-
kind: 'blend';
|
|
2834
|
-
mode: EffectDagBlendMode;
|
|
2835
|
-
container: EffectDagContainer;
|
|
2836
|
-
}
|
|
2837
|
-
interface EffectDagXfrm {
|
|
2838
|
-
kind: 'xfrmEffect';
|
|
2839
|
-
sx?: number;
|
|
2840
|
-
sy?: number;
|
|
2841
|
-
kx?: number;
|
|
2842
|
-
ky?: number;
|
|
2843
|
-
tx?: number;
|
|
2844
|
-
ty?: number;
|
|
2845
|
-
}
|
|
2846
|
-
interface EffectDagRelOff {
|
|
2847
|
-
kind: 'relOff';
|
|
2848
|
-
tx?: number;
|
|
2849
|
-
ty?: number;
|
|
2850
|
-
}
|
|
2851
|
-
/** Typed CT_BlurEffect with its original payload retained for lossless edits. */
|
|
2852
|
-
interface EffectDagBlur {
|
|
2853
|
-
kind: 'blur';
|
|
2854
|
-
radiusEmu?: number;
|
|
2855
|
-
grow?: boolean;
|
|
2856
|
-
xml: XmlObject;
|
|
2857
|
-
}
|
|
2858
|
-
/** Typed CT_AlphaOutsetEffect with original XML retained for lossless edits. */
|
|
2859
|
-
interface EffectDagAlphaOutset {
|
|
2860
|
-
kind: 'alphaOutset';
|
|
2861
|
-
radiusEmu?: number;
|
|
2862
|
-
xml: XmlObject;
|
|
2863
|
-
}
|
|
2864
|
-
/** Typed CT_PresetShadowEffect with colour and extension XML retained verbatim. */
|
|
2865
|
-
interface EffectDagPresetShadow {
|
|
2866
|
-
kind: 'prstShdw';
|
|
2867
|
-
preset?: `shdw${number}`;
|
|
2868
|
-
distanceEmu?: number;
|
|
2869
|
-
direction?: number;
|
|
2870
|
-
xml: XmlObject;
|
|
2871
|
-
}
|
|
2872
|
-
interface EffectDagRawLeaf {
|
|
2873
|
-
kind: 'raw';
|
|
2874
|
-
tag: string;
|
|
2875
|
-
xml: Record<string, unknown>;
|
|
2876
|
-
}
|
|
2877
|
-
//#endregion
|
|
2878
2913
|
//#region src/core/types/image.d.ts
|
|
2879
2914
|
/**
|
|
2880
2915
|
* Image recolour/adjustment properties parsed from blip extensions.
|
|
@@ -3077,36 +3112,6 @@ interface PptxImageProperties {
|
|
|
3077
3112
|
/** Crop-to-shape — CSS clip-path shape name. */
|
|
3078
3113
|
cropShape?: PptxCropShape;
|
|
3079
3114
|
}
|
|
3080
|
-
declare module "./index" {
|
|
3081
|
-
interface TextStyle {
|
|
3082
|
-
/**
|
|
3083
|
-
* Raw `a:effectDag` XML node from `a:rPr`, preserved verbatim for
|
|
3084
|
-
* round-trip serialisation. Mirrors the shape-level
|
|
3085
|
-
* {@link import('./shape-style').ShapeStyle.effectDagXml} field.
|
|
3086
|
-
*/
|
|
3087
|
-
textEffectDagXml?: XmlObject;
|
|
3088
|
-
/**
|
|
3089
|
-
* Typed effect graph parsed from `textEffectDagXml`. The four structural
|
|
3090
|
-
* container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`, `a:relOff`) are
|
|
3091
|
-
* fully typed; any other leaf effect is captured as
|
|
3092
|
-
* {@link EffectDagRawLeaf} so we never have to recurse into the full
|
|
3093
|
-
* effect taxonomy.
|
|
3094
|
-
*/
|
|
3095
|
-
textEffectDagTree?: EffectDagContainer;
|
|
3096
|
-
}
|
|
3097
|
-
}
|
|
3098
|
-
declare module "./index" {
|
|
3099
|
-
interface ShapeStyle {
|
|
3100
|
-
/**
|
|
3101
|
-
* Typed effect graph parsed from {@link ShapeStyle.effectDagXml}. The four
|
|
3102
|
-
* structural container nodes (`a:cont`, `a:blend`, `a:xfrmEffect`,
|
|
3103
|
-
* `a:relOff`) are fully typed; any other leaf effect (e.g. `a:outerShdw`,
|
|
3104
|
-
* `a:glow`, `a:alphaInv`) is captured as {@link EffectDagRawLeaf} so we
|
|
3105
|
-
* never have to recurse into the full effect taxonomy.
|
|
3106
|
-
*/
|
|
3107
|
-
effectDagTree?: EffectDagContainer;
|
|
3108
|
-
}
|
|
3109
|
-
}
|
|
3110
3115
|
//#endregion
|
|
3111
3116
|
//#region src/core/types/media.d.ts
|
|
3112
3117
|
/**
|
|
@@ -5163,6 +5168,27 @@ interface PptxNativeAnimation {
|
|
|
5163
5168
|
soundPath?: string;
|
|
5164
5169
|
/** Whether to stop any currently playing sound (`p:endSnd`). */
|
|
5165
5170
|
stopSound?: boolean;
|
|
5171
|
+
/**
|
|
5172
|
+
* Whether the enclosing click-level group (a direct `p:par` child of the
|
|
5173
|
+
* `mainSeq`) begins automatically when the slide appears, rather than waiting
|
|
5174
|
+
* for a click.
|
|
5175
|
+
*
|
|
5176
|
+
* PowerPoint gates a click step with a lone `<p:cond delay="indefinite"/>`;
|
|
5177
|
+
* a group that also carries a time-node condition (`onBegin`/`onEnd` with a
|
|
5178
|
+
* `@tn`) or a finite delay starts on slide entry ("With/After Previous" as the
|
|
5179
|
+
* first effect on the slide). The flat animation list cannot express that on
|
|
5180
|
+
* its own, so the parse layer stamps it here.
|
|
5181
|
+
*/
|
|
5182
|
+
groupAutoStart?: boolean;
|
|
5183
|
+
/**
|
|
5184
|
+
* Index of the enclosing effect-wrapper `p:par` inside the click-level group.
|
|
5185
|
+
*
|
|
5186
|
+
* Effects that share a wrapper are OOXML siblings: they all start when that
|
|
5187
|
+
* wrapper starts, and each `p:cond/@delay` is measured from the wrapper's
|
|
5188
|
+
* start, NOT chained off the effect before it. Playback uses this to place
|
|
5189
|
+
* simultaneous effects at their true offsets instead of accumulating delays.
|
|
5190
|
+
*/
|
|
5191
|
+
parGroupIndex?: number;
|
|
5166
5192
|
/** Structured start conditions parsed from `p:stCondLst`. */
|
|
5167
5193
|
startConditions?: AnimationCondition[];
|
|
5168
5194
|
/** Structured end conditions parsed from `p:endCondLst`. */
|
|
@@ -6826,7 +6852,6 @@ interface PptxEmbeddedFont {
|
|
|
6826
6852
|
originalPartBytes?: Uint8Array;
|
|
6827
6853
|
}
|
|
6828
6854
|
|
|
6829
|
-
//#endregion
|
|
6830
6855
|
//#region src/core/types/theme-presets.d.ts
|
|
6831
6856
|
/**
|
|
6832
6857
|
* A complete theme preset that can be applied to a presentation.
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { C as e,
|
|
2
|
-
import { i as b } from "./translator-
|
|
1
|
+
import { C as e, Ct as t, S as a, St as o, _t as i, b as r, bt as l, dt as n, ft as S, gt as m, ht as d, lt as v, mt as p, t as g, ut as h, vt as u, w as T, x, xt as C, yt as f } from "./export-Doev_dGg.js";
|
|
2
|
+
import { i as b } from "./translator-DL83W_OP.js";
|
|
3
3
|
import "./i18n.js";
|
|
4
4
|
export {
|
|
5
5
|
g as PowerPointViewer,
|
|
6
|
-
|
|
6
|
+
v as defaultCssVars,
|
|
7
7
|
h as defaultRadius,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
n as defaultThemeColors,
|
|
9
|
+
S as deleteAutosaveSnapshot,
|
|
10
|
+
r as exportAllSlidesToSvg,
|
|
11
11
|
x as exportAllSlidesToSvgBlobs,
|
|
12
|
-
|
|
12
|
+
a as exportSlideAsSvg,
|
|
13
13
|
e as exportSlideToSvg,
|
|
14
14
|
T as exportSlideToSvgBlob,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
p as getAutosaveSnapshot,
|
|
16
|
+
d as listAutosaveSnapshots,
|
|
17
17
|
m as loadPresentationDeck,
|
|
18
|
-
|
|
18
|
+
i as parsePresentationSessionId,
|
|
19
19
|
b as registerTranslations,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
u as themeToCssVars,
|
|
21
|
+
f as vermilionDarkColors,
|
|
22
|
+
l as vermilionDarkTheme,
|
|
23
|
+
C as vermilionLightColors,
|
|
24
|
+
o as vermilionLightTheme,
|
|
25
|
+
t as vermilionRadius
|
|
26
26
|
};
|