pptx-svelte-viewer 4.5.0 → 4.7.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/dist/index.js CHANGED
@@ -1,41 +1,55 @@
1
- import { $t as e, Ap as a, Fh as o, Hl as t, Ih as i, Lh as r, Nl as l, Ph as n, Rh as S, Sp as m, Ul as d, Uo as p, cs as h, dd as v, ds as T, fs as g, gs as P, in as c, kl as u, ls as f, oc as A, qu as C, sh as N, tf as k, vc as E, zc as D, zl as b } from "./transition-overlay-BfpjfjU4.js";
2
- import { i as I } from "./translator-C-KdhJw4.js";
3
- import { M as B, a as L, c as O, l as R, o as _, s as V, t as w } from "./export-Bln1wHMQ.js";
1
+ import { $u as a, An as e, At as o, Ef as r, F as t, Fr as i, Hu as S, Ir as _, Iu as T, Ju as l, Ms as n, N as E, Pr as I, Qu as A, Rr as m, Tn as D, Tt as N, Vl as O, Vm as P, Xn as d, Ym as C, _p as p, a_ as c, bl as R, cc as g, cl as v, dc as u, fc as f, fn as B, gc as h, i_ as M, kg as V, lc as k, mn as F, o_ as b, pn as x, r_ as L, s_ as G, sf as X, xr as U, z as W } from "./transition-overlay-BjAhkWT1.js";
2
+ import { i as y } from "./translator-D5VddVYr.js";
3
+ import { M as K, a as z, c as J, l as Q, o as Y, s as $, t as j } from "./export-BmYgdMk2.js";
4
4
  import "./i18n.js";
5
5
  export {
6
- e as PPTX_OPEN_ACCEPT,
7
- c as PRESENTATION_OPEN_EXTENSIONS,
8
- w as PowerPointViewer,
9
- p as createImageElementFromFile,
10
- h as defaultCssVars,
11
- f as defaultRadius,
12
- T as defaultThemeColors,
13
- g as deleteAutosaveSnapshot,
14
- P as describeCollaborationShellState,
15
- L as exportAllSlidesToSvg,
16
- _ as exportAllSlidesToSvgBlobs,
17
- V as exportSlideAsSvg,
18
- O as exportSlideToSvg,
19
- R as exportSlideToSvgBlob,
20
- A as forgetSessionDeck,
21
- E as getAutosaveSnapshot,
22
- D as getSessionTabId,
23
- u as isLegacyBinaryPresentation,
24
- l as isSupportedPresentationFile,
25
- b as listAutosaveSnapshots,
26
- t as loadPresentationDeck,
27
- d as loadSessionDeck,
28
- C as parsePresentationSessionId,
29
- v as presentationBaseName,
30
- I as registerTranslations,
31
- k as rememberSessionDeck,
32
- B as renderToCanvas,
33
- m as restoreSessionDeck,
34
- a as savedPresentationFileName,
35
- N as themeToCssVars,
36
- n as vermilionDarkColors,
37
- o as vermilionDarkTheme,
38
- i as vermilionLightColors,
39
- r as vermilionLightTheme,
40
- S as vermilionRadius
6
+ E as BACKSTAGE_CARD_IDS,
7
+ t as BACKSTAGE_PAGE_IDS,
8
+ W as CANVAS_CONTEXT_MENU_COMMAND_IDS,
9
+ N as EDITOR_SHORTCUT_ACTION_IDS,
10
+ o as ELEMENT_CONTEXT_MENU_COMMAND_IDS,
11
+ B as OPTIONS_PAGE_IDS,
12
+ x as OPTIONS_SECTION_IDS,
13
+ F as OPTIONS_SETTING_IDS,
14
+ D as PPTX_OPEN_ACCEPT,
15
+ e as PRESENTATION_OPEN_EXTENSIONS,
16
+ j as PowerPointViewer,
17
+ d as RIBBON_TAB_IDS,
18
+ U as TOOLBAR_BUTTON_IDS,
19
+ I as VIEWER_DIALOG_IDS,
20
+ i as VIEWER_EXPORT_FORMAT_IDS,
21
+ _ as VIEWER_FEATURE_IDS,
22
+ m as VIEWER_PANEL_IDS,
23
+ n as createImageElementFromFile,
24
+ g as defaultCssVars,
25
+ k as defaultRadius,
26
+ u as defaultThemeColors,
27
+ f as deleteAutosaveSnapshot,
28
+ h as describeCollaborationShellState,
29
+ z as exportAllSlidesToSvg,
30
+ Y as exportAllSlidesToSvgBlobs,
31
+ $ as exportSlideAsSvg,
32
+ J as exportSlideToSvg,
33
+ Q as exportSlideToSvgBlob,
34
+ v as forgetSessionDeck,
35
+ R as getAutosaveSnapshot,
36
+ O as getSessionTabId,
37
+ T as isLegacyBinaryPresentation,
38
+ S as isSupportedPresentationFile,
39
+ l as listAutosaveSnapshots,
40
+ A as loadPresentationDeck,
41
+ a as loadSessionDeck,
42
+ X as parsePresentationSessionId,
43
+ r as presentationBaseName,
44
+ y as registerTranslations,
45
+ p as rememberSessionDeck,
46
+ K as renderToCanvas,
47
+ P as restoreSessionDeck,
48
+ C as savedPresentationFileName,
49
+ V as themeToCssVars,
50
+ L as vermilionDarkColors,
51
+ M as vermilionDarkTheme,
52
+ c as vermilionLightColors,
53
+ b as vermilionLightTheme,
54
+ G as vermilionRadius
41
55
  };
@@ -1481,8 +1481,16 @@ interface TextStyle {
1481
1481
  textOutlineWidth?: number;
1482
1482
  /** Text outline colour as hex string (`a:rPr > a:ln > a:solidFill`). */
1483
1483
  textOutlineColor?: string;
1484
+ /** Text outline dash preset (`a:rPr > a:ln > a:prstDash/@val`), e.g. `dash`; absent for solid. */
1485
+ textOutlineDash?: string;
1484
1486
  /** When true, the text body has no fill (`a:rPr > a:noFill`), producing hollow/outline-only text. */
1485
1487
  textFillNone?: boolean;
1488
+ /**
1489
+ * When true, the run authored an EMPTY `<a:effectLst/>`: an explicit "no
1490
+ * effects" override that blocks an inherited shadow or glow. Kept so a
1491
+ * rewrite re-emits it instead of letting the inherited effect return.
1492
+ */
1493
+ textEffectsExplicitNone?: boolean;
1486
1494
  /** Superscript/subscript baseline shift as percentage (`a:rPr/@baseline`). Positive = super, negative = sub. */
1487
1495
  baseline?: number;
1488
1496
  /** Character spacing in hundredths of a point (`a:rPr/@spc`). */
@@ -1516,6 +1524,25 @@ interface TextStyle {
1516
1524
  textFillPatternForeground?: string;
1517
1525
  /** Text-level pattern background colour. */
1518
1526
  textFillPatternBackground?: string;
1527
+ /**
1528
+ * Raw `a:rPr > a:blipFill` XML, preserved verbatim for round-trip
1529
+ * serialization AND as the input to the image resolution pass that fills
1530
+ * in {@link textFillBlipUrl} (parsing a run's fill happens synchronously,
1531
+ * with no zip/relationship access at that point; resolving the blip to a
1532
+ * displayable URL needs both, so it happens in a later async pass over
1533
+ * the slide's parsed elements, mirroring how a shape's OWN image fill is
1534
+ * resolved). A picture-filled text run (`a:rPr > a:blipFill`) was
1535
+ * documented as handled ("Handles gradient fills, pattern fills, and
1536
+ * image fills on text runs") but never actually parsed, so it silently
1537
+ * fell through to the run's plain `color` and rendered solid black
1538
+ * (COM-verified: `audit-text` slide 13's "PICTURE FILL" run shows the
1539
+ * fill image through the glyphs in PowerPoint).
1540
+ */
1541
+ textFillBlipXml?: XmlObject;
1542
+ /** Resolved displayable URL for {@link textFillBlipXml}, or the archive-relative path when unresolved (lazy decode). */
1543
+ textFillBlipUrl?: string;
1544
+ /** Tiling mode for {@link textFillBlipUrl} (`a:blipFill/a:tile` present -> 'tile', else 'stretch'). */
1545
+ textFillBlipMode?: 'stretch' | 'tile';
1519
1546
  hyperlink?: string;
1520
1547
  /** Relationship ID for the hyperlink (`a:hlinkClick/@r:id`) — preserved for round-trip serialization. */
1521
1548
  hyperlinkRId?: string;
@@ -1601,6 +1628,13 @@ interface TextStyle {
1601
1628
  position: number;
1602
1629
  align: 'l' | 'ctr' | 'r' | 'dec';
1603
1630
  leader?: 'none' | 'dot' | 'hyphen' | 'underscore';
1631
+ /**
1632
+ * True when the source spelled out the schema-default `@algn="l"`, so the
1633
+ * writer re-emits it instead of treating it as an omitted default.
1634
+ */
1635
+ alignAuthored?: boolean;
1636
+ /** True when the source spelled out the schema-default `@leader="none"`. */
1637
+ leaderAuthored?: boolean;
1604
1638
  }>;
1605
1639
  /**
1606
1640
  * True when the paragraph's own `a:pPr` authored an EMPTY `<a:tabLst/>`
@@ -1964,6 +1998,19 @@ interface TextStyle {
1964
1998
  * convention used for {@link bulletInfo} / {@link endParaRunProperties}).
1965
1999
  */
1966
2000
  paragraphDefaultRunPropertiesXml?: XmlObject;
2001
+ /**
2002
+ * The bullet colour / size / typeface children (`a:buClrTx`, `a:buClr`,
2003
+ * `a:buSzTx`, `a:buSzPct`, `a:buSzPts`, `a:buFontTx`, `a:buFont`) a
2004
+ * paragraph authored in its own `<a:pPr>` WITHOUT a bullet type
2005
+ * (`a:buNone` / `a:buChar` / `a:buAutoNum` / `a:buBlip`), captured
2006
+ * verbatim in source order. Such a paragraph restyles an inherited bullet
2007
+ * rather than declaring one, so its {@link BulletInfo} resolves from the
2008
+ * cascade and is (correctly) not written back; without this capture the
2009
+ * paragraph's own override vanished on every rewrite.
2010
+ *
2011
+ * Only meaningful on a paragraph's own authored properties.
2012
+ */
2013
+ paragraphBulletPropertiesXml?: XmlObject;
1967
2014
  }
1968
2015
  /**
1969
2016
  * Structured bullet metadata attached to the first {@link TextSegment}
@@ -3109,6 +3156,26 @@ type PptxChartMarkerSymbol = 'circle' | 'dash' | 'diamond' | 'dot' | 'none' | 'p
3109
3156
  */
3110
3157
  type PptxChartScatterStyle = 'none' | 'line' | 'lineMarker' | 'marker' | 'smooth' | 'smoothMarker';
3111
3158
  /** Shape properties extracted from c:spPr for chart formatting. */
3159
+ /**
3160
+ * A render-ready gradient fill from a chart `c:spPr/a:gradFill` (chart area,
3161
+ * plot area or series). Positions are 0..100; a linear gradient's `angle` is
3162
+ * in degrees clockwise from left-to-right (`a:lin/@ang`); a radial (`a:path`)
3163
+ * gradient centres on `focalPoint` (0..1 fractions of the box), the middle
3164
+ * when absent.
3165
+ */
3166
+ interface PptxChartGradientFill {
3167
+ type: 'linear' | 'radial';
3168
+ stops: Array<{
3169
+ color: string;
3170
+ position: number;
3171
+ opacity?: number;
3172
+ }>;
3173
+ angle?: number;
3174
+ focalPoint?: {
3175
+ x: number;
3176
+ y: number;
3177
+ };
3178
+ }
3112
3179
  interface PptxChartShapeProps {
3113
3180
  fillColor?: string;
3114
3181
  strokeColor?: string;
@@ -3434,6 +3501,12 @@ interface PptxChartSeries {
3434
3501
  */
3435
3502
  idx?: number;
3436
3503
  values: number[];
3504
+ /**
3505
+ * Series gradient fill (`c:ser/c:spPr/a:gradFill`), painted on every mark
3506
+ * of the series that has no per-point override. Render-only: the series'
3507
+ * own `c:spPr` round-trips untouched.
3508
+ */
3509
+ gradientFill?: PptxChartGradientFill;
3437
3510
  /**
3438
3511
  * Per-series x values from `c:ser/c:xVal` (scatter and bubble series only).
3439
3512
  *
@@ -3608,6 +3681,12 @@ interface PptxChartFilteredSeries {
3608
3681
  * and `c:dLblPos`.
3609
3682
  */
3610
3683
  interface PptxChartDataLabelOptions {
3684
+ /** Label box fill/outline (`c:dLbls/c:spPr`), see `chart-data-label-box.ts`. */
3685
+ labelShape?: PptxChartShapeProps;
3686
+ /** Callout geometry of the label box (`c15:spPr/a:prstGeom/@prst`, e.g. `wedgeRectCallout`). */
3687
+ calloutShape?: string;
3688
+ /** The chart15 extension's `c15:showLeaderLines`, which wins for a moved label's leader line. */
3689
+ extLeaderLines?: boolean;
3611
3690
  /** Show the numeric value (`c:showVal`). */
3612
3691
  showValue?: boolean;
3613
3692
  /** Show the category name (`c:showCatName`). */
@@ -3733,6 +3812,10 @@ interface PptxChartStyle {
3733
3812
  chartAreaFill?: string;
3734
3813
  /** Plot-area fill from `c:plotArea/c:spPr`. See {@link chartAreaFill}. */
3735
3814
  plotAreaFill?: string;
3815
+ /** Chart-area gradient (`c:chartSpace/c:spPr/a:gradFill`); wins over {@link chartAreaFill}. */
3816
+ chartAreaGradient?: PptxChartGradientFill;
3817
+ /** Plot-area gradient (`c:plotArea/c:spPr/a:gradFill`); wins over {@link plotAreaFill}. */
3818
+ plotAreaGradient?: PptxChartGradientFill;
3736
3819
  /** Whether data labels are shown. */
3737
3820
  hasDataLabels?: boolean;
3738
3821
  /** Chart-level data-label content/position options (when `hasDataLabels`). */
@@ -7099,7 +7182,15 @@ type PptxAnimationTimingCurve = 'ease' | 'ease-in' | 'ease-out' | 'linear';
7099
7182
  /** Repeat mode for animations. */
7100
7183
  type PptxAnimationRepeatMode = 'untilNextClick' | 'untilEndOfSlide';
7101
7184
  /** Animation trigger type from OOXML `p:cTn`. */
7102
- type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevious' | 'withPrevious' | 'afterDelay';
7185
+ type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevious' | 'withPrevious' | 'afterDelay' |
7186
+ /**
7187
+ * Starts when a media element's playback reaches a named bookmark
7188
+ * (PowerPoint's "Trigger > On Bookmark"). The media element is
7189
+ * {@link PptxElementAnimation.triggerShapeId} and the bookmark
7190
+ * {@link PptxElementAnimation.triggerBookmark}; saved as an interactive
7191
+ * sequence gated on `p:cond evt="onMediaBookmark"` with a `p14:bmkTgt`.
7192
+ */
7193
+ 'onMediaBookmark';
7103
7194
  /**
7104
7195
  * Native animation kind. The historic shape-targeted preset animations are
7105
7196
  * implicitly the default kind (`undefined`). Media animations (`p:audio`,
@@ -7252,8 +7343,13 @@ interface PptxNativeAnimation {
7252
7343
  target?: PptxAnimationTarget;
7253
7344
  /** Trigger type. */
7254
7345
  trigger?: PptxAnimationTrigger;
7255
- /** Shape ID that triggers this animation when clicked (interactive sequence). */
7346
+ /**
7347
+ * Shape ID that triggers this animation: the clicked shape of an
7348
+ * interactive sequence, or the media element of an `onMediaBookmark` one.
7349
+ */
7256
7350
  triggerShapeId?: string;
7351
+ /** Bookmark name an `onMediaBookmark` interactive sequence waits for. */
7352
+ triggerBookmark?: string;
7257
7353
  /** Whether this effect belongs to an OOXML `interactiveSeq`. */
7258
7354
  interactiveSequence?: boolean;
7259
7355
  /** Whether `p:endSync/p:rtn[@val="all"]` makes that sequence replayable. */
@@ -7752,12 +7848,15 @@ interface PptxAttributeAnimation {
7752
7848
  /**
7753
7849
  * `p:anim/@_p14:bounceEnd` (Office 2010 `p14` extension attribute,
7754
7850
  * MS-OI29500), normalized to a 0-1 fraction of this behaviour's own
7755
- * duration. PowerPoint's Fly In "Bounce End" effect option writes this on
7756
- * the position-ramp `p:anim` node(s): the fraction of the duration at
7757
- * which the primary travel completes, with the remainder spent bouncing
7758
- * and settling at the final value. Mirrored verbatim by PowerPoint onto
7759
- * the enclosing `p:cTn/@_p14:presetBounceEnd`. Absent for every animation
7760
- * that doesn't use this effect option (the overwhelming majority).
7851
+ * duration. PowerPoint's "Bounce End" effect option (COM:
7852
+ * `Effect.Timing.BounceEnd` + `BounceEndIntensity`) writes this on the
7853
+ * position-ramp `p:anim` node(s): the share of the duration spent
7854
+ * BOUNCING at the end. Measured from PowerPoint's own CreateVideo frames,
7855
+ * the travel completes at `1 - bounceEnd` and the rest is a damped
7856
+ * oscillation about the final value (see shared's `animation-bounce-end`).
7857
+ * Mirrored verbatim by PowerPoint onto the enclosing
7858
+ * `p:cTn/@_p14:presetBounceEnd`. Absent for every animation that doesn't
7859
+ * use this effect option (the overwhelming majority).
7761
7860
  */
7762
7861
  bounceEnd?: number;
7763
7862
  }
@@ -7935,9 +8034,24 @@ interface PptxElementAnimation {
7935
8034
  durationMs?: number;
7936
8035
  delayMs?: number;
7937
8036
  order?: number;
8037
+ /**
8038
+ * The {@link order} the loader derived from the slide's `p:timing` tree for
8039
+ * an entry whose `pptx:editorMeta` record authored no `@order`. The tree
8040
+ * already expresses that position (and every load re-derives it), so the
8041
+ * writer omits `@order` while `order` still equals this value; a reorder
8042
+ * changes `order` and the attribute is written again. Load-time bookkeeping
8043
+ * only; never set it by hand.
8044
+ */
8045
+ orderFromTimeline?: number;
7938
8046
  trigger?: PptxAnimationTrigger;
7939
- /** Shape ID that triggers this animation when clicked (interactive sequence). */
8047
+ /**
8048
+ * Shape ID that triggers this animation: the shape clicked for
8049
+ * `onShapeClick`, or the media element whose bookmark fires it for
8050
+ * `onMediaBookmark`.
8051
+ */
7940
8052
  triggerShapeId?: string;
8053
+ /** Bookmark name (`p14:bmk/@name`) an `onMediaBookmark` trigger waits for. */
8054
+ triggerBookmark?: string;
7941
8055
  timingCurve?: PptxAnimationTimingCurve;
7942
8056
  repeatCount?: number;
7943
8057
  repeatMode?: PptxAnimationRepeatMode;
package/dist/internals.js CHANGED
@@ -1,26 +1,26 @@
1
- import { G as a, Jt as t, Mc as T, Mn as i, Nn as n, Pt as S, Rf as e, Vc as _, Yt as A, er as E, ft as o, gn as I, lr as N, mp as r, ot as R, qt as O, rt as M, sp as D, t as l, tp as P, vp as L, xc as v, zf as F } from "./transition-overlay-BfpjfjU4.js";
1
+ import { Cl as a, Ct as T, Hn as n, Lm as i, Nm as e, Or as S, Pl as _, Tm as t, Ul as A, Vr as E, Y as o, _t as I, ar as r, bn as N, em as R, en as O, mt as l, or as m, t as M, tm as D, xn as L, ym as P, yn as C } from "./transition-overlay-BjAhkWT1.js";
2
2
  export {
3
- a as CINEMATIC_TRANSITION_KEYFRAMES,
4
- M as DEFAULT_MORPH_DURATION_MS,
5
- R as DEFAULT_TRANSITION_DURATION_MS,
6
- o as EASE,
7
- S as INSTANT,
8
- O as P14_TRANSITION_KEYFRAMES,
9
- t as P14_TRANSITION_KEYFRAMES_2,
10
- A as P14_TRANSITION_KEYFRAMES_ALL,
11
- l as PresentationTransitionOverlay,
12
- I as RANDOM_ELIGIBLE_TYPES,
13
- i as SLIDE_TRANSITION_KEYFRAMES,
14
- n as SLIDE_TRANSITION_KEYFRAMES_CSS,
15
- E as TRANSITION_SPEED_DURATION_MS,
16
- N as WHEEL_SPOKE_COUNTS,
17
- v as getCinematicTransitionAnimations,
18
- T as getP14TransitionAnimations,
19
- _ as getSlideTransitionAnimations,
20
- e as resolveDirection,
21
- F as resolveDirection8,
3
+ o as CINEMATIC_TRANSITION_KEYFRAMES,
4
+ l as DEFAULT_MORPH_DURATION_MS,
5
+ I as DEFAULT_TRANSITION_DURATION_MS,
6
+ T as EASE,
7
+ O as INSTANT,
8
+ C as P14_TRANSITION_KEYFRAMES,
9
+ N as P14_TRANSITION_KEYFRAMES_2,
10
+ L as P14_TRANSITION_KEYFRAMES_ALL,
11
+ M as PresentationTransitionOverlay,
12
+ n as RANDOM_ELIGIBLE_TYPES,
13
+ r as SLIDE_TRANSITION_KEYFRAMES,
14
+ m as SLIDE_TRANSITION_KEYFRAMES_CSS,
15
+ S as TRANSITION_SPEED_DURATION_MS,
16
+ E as WHEEL_SPOKE_COUNTS,
17
+ a as getCinematicTransitionAnimations,
18
+ _ as getP14TransitionAnimations,
19
+ A as getSlideTransitionAnimations,
20
+ R as resolveDirection,
21
+ D as resolveDirection8,
22
22
  P as resolveOrientation,
23
- D as resolveSlideTransition,
24
- r as resolveTransitionDurationMs,
25
- L as resolveWheelSpokeCount
23
+ t as resolveSlideTransition,
24
+ e as resolveTransitionDurationMs,
25
+ i as resolveWheelSpokeCount
26
26
  };