pptx-svelte-viewer 4.6.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/CHANGELOG.md +17 -0
- package/dist/{AiChatPanel-DyHv6ShJ.js → AiChatPanel-UtQgHZdw.js} +2 -2
- package/dist/{export-zzqiDncO.js → export-BmYgdMk2.js} +13647 -12921
- package/dist/i18n/de.cjs +70 -21
- package/dist/i18n/de.mjs +70 -21
- package/dist/i18n/es.cjs +70 -21
- package/dist/i18n/es.mjs +70 -21
- package/dist/i18n/fr.cjs +70 -21
- package/dist/i18n/fr.mjs +70 -21
- package/dist/i18n/zh-CN.cjs +48 -4
- package/dist/i18n/zh-CN.mjs +48 -4
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +153 -15
- package/dist/index.js +51 -51
- package/dist/internals.d.ts +123 -9
- package/dist/internals.js +23 -23
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/{transition-overlay-Dkooknvn.js → transition-overlay-BjAhkWT1.js} +67953 -64302
- package/dist/{translator-DC6tH5v7.js → translator-D5VddVYr.js} +44 -0
- package/dist/viewer/index.d.ts +267 -12
- package/dist/viewer/index.js +8 -8
- package/package.json +1 -1
|
@@ -1132,6 +1132,13 @@ var n = {
|
|
|
1132
1132
|
"pptx.shape.quickStyleSubtle": "Subtle",
|
|
1133
1133
|
"pptx.shape.quickStyleOutline": "Outline",
|
|
1134
1134
|
"pptx.shape.quickStyleDark": "Dark",
|
|
1135
|
+
"pptx.shape.mergeShapes": "Merge Shapes",
|
|
1136
|
+
"pptx.shape.mergeShapesHint": "Select two or more shapes to merge them",
|
|
1137
|
+
"pptx.shape.mergeUnion": "Union",
|
|
1138
|
+
"pptx.shape.mergeCombine": "Combine",
|
|
1139
|
+
"pptx.shape.mergeFragment": "Fragment",
|
|
1140
|
+
"pptx.shape.mergeIntersect": "Intersect",
|
|
1141
|
+
"pptx.shape.mergeSubtract": "Subtract",
|
|
1135
1142
|
"pptx.slideBackground.colour": "Colour",
|
|
1136
1143
|
"pptx.slideBackground.colourAriaLabel": "Slide background colour",
|
|
1137
1144
|
"pptx.slideBackground.image": "Image",
|
|
@@ -1173,6 +1180,10 @@ var n = {
|
|
|
1173
1180
|
"pptx.animation.trigger": "Trigger",
|
|
1174
1181
|
"pptx.animation.trigger.selectShape": "Select a shape",
|
|
1175
1182
|
"pptx.animation.trigger.shapeLabel": "Trigger shape",
|
|
1183
|
+
"pptx.animation.trigger.onMediaBookmark": "On bookmark",
|
|
1184
|
+
"pptx.animation.trigger.bookmarkLabel": "Bookmark",
|
|
1185
|
+
"pptx.animation.trigger.selectBookmark": "Select a bookmark",
|
|
1186
|
+
"pptx.animation.trigger.noBookmarks": "No media bookmarks on this slide",
|
|
1176
1187
|
"pptx.chart.heading": "Chart",
|
|
1177
1188
|
"pptx.comments.addOnElement": "Add a comment on {{element}}...",
|
|
1178
1189
|
"pptx.comments.addPlaceholder": "Add a comment...",
|
|
@@ -1220,6 +1231,12 @@ var n = {
|
|
|
1220
1231
|
"pptx.contextMenu.sizeAndPosition": "Size and Position...",
|
|
1221
1232
|
"pptx.contextMenu.splitCell": "Split Cell",
|
|
1222
1233
|
"pptx.contextMenu.ungroup": "Ungroup",
|
|
1234
|
+
"pptx.contextMenu.crop": "Crop",
|
|
1235
|
+
"pptx.contextMenu.mergeUnion": "Union Shapes",
|
|
1236
|
+
"pptx.contextMenu.mergeCombine": "Combine Shapes",
|
|
1237
|
+
"pptx.contextMenu.mergeFragment": "Fragment Shapes",
|
|
1238
|
+
"pptx.contextMenu.mergeIntersect": "Intersect Shapes",
|
|
1239
|
+
"pptx.contextMenu.mergeSubtract": "Subtract Shapes",
|
|
1223
1240
|
"pptx.pasteSpecial.dialogTitle": "Paste Special",
|
|
1224
1241
|
"pptx.pasteSpecial.keepSourceFormatting": "Keep Source Formatting",
|
|
1225
1242
|
"pptx.pasteSpecial.keepTextOnly": "Keep Text Only",
|
|
@@ -1555,6 +1572,21 @@ var n = {
|
|
|
1555
1572
|
"pptx.transition.pattern.rectangle": "Rectangles",
|
|
1556
1573
|
"pptx.transition.thruBlk": "Through black",
|
|
1557
1574
|
"pptx.contextMenu.ariaLabel": "Context menu",
|
|
1575
|
+
"pptx.contextMenu.editPoints": "Edit Points",
|
|
1576
|
+
"pptx.editPoints.addPoint": "Add Point",
|
|
1577
|
+
"pptx.editPoints.closePath": "Close Path",
|
|
1578
|
+
"pptx.editPoints.cornerPoint": "Corner Point",
|
|
1579
|
+
"pptx.editPoints.curvedSegment": "Curved Segment",
|
|
1580
|
+
"pptx.editPoints.deletePoint": "Delete Point",
|
|
1581
|
+
"pptx.editPoints.deleteSegment": "Delete Segment",
|
|
1582
|
+
"pptx.editPoints.exit": "Exit Edit Points",
|
|
1583
|
+
"pptx.editPoints.menu": "Edit Points commands",
|
|
1584
|
+
"pptx.editPoints.openPath": "Open Path",
|
|
1585
|
+
"pptx.editPoints.overlay": "Edit points of the selected shape",
|
|
1586
|
+
"pptx.editPoints.smoothPoint": "Smooth Point",
|
|
1587
|
+
"pptx.editPoints.straightPoint": "Straight Point",
|
|
1588
|
+
"pptx.editPoints.straightSegment": "Straight Segment",
|
|
1589
|
+
"pptx.freeformTool.overlay": "Click to add points; double-click or press Enter to finish",
|
|
1558
1590
|
"pptx.editorToolbar.ariaLabel": "Editor toolbar",
|
|
1559
1591
|
"pptx.editorToolbar.insert": "Insert",
|
|
1560
1592
|
"pptx.editorToolbar.insertTextBox": "Insert Text Box",
|
|
@@ -2785,6 +2817,16 @@ Item 3`,
|
|
|
2785
2817
|
"pptx.image.cropLeft": "Crop Left",
|
|
2786
2818
|
"pptx.image.cropRight": "Crop Right",
|
|
2787
2819
|
"pptx.image.cropTop": "Crop Top",
|
|
2820
|
+
"pptx.image.crop": "Crop",
|
|
2821
|
+
"pptx.image.cropToAspectRatio": "Crop to Aspect Ratio",
|
|
2822
|
+
"pptx.image.cropFill": "Fill",
|
|
2823
|
+
"pptx.image.cropFit": "Fit",
|
|
2824
|
+
"pptx.image.cropSquare": "Square",
|
|
2825
|
+
"pptx.image.cropPortrait": "Portrait",
|
|
2826
|
+
"pptx.image.cropLandscape": "Landscape",
|
|
2827
|
+
"pptx.image.cropHandle": "Crop handle",
|
|
2828
|
+
"pptx.image.cropModeHint": "Drag the black handles to crop. Press Enter to apply or Esc to cancel.",
|
|
2829
|
+
"pptx.image.cropHint": "Select a picture to crop it",
|
|
2788
2830
|
"pptx.imageTransform.altTextPlaceholder": "Describe this image for accessibility",
|
|
2789
2831
|
"pptx.ink.contentPartFallback": "Content Part",
|
|
2790
2832
|
"pptx.ink.groupChildAlt": "Group child",
|
|
@@ -2817,9 +2859,11 @@ Item 3`,
|
|
|
2817
2859
|
"pptx.shapePresets.chevron": "Chevron",
|
|
2818
2860
|
"pptx.shapePresets.circle": "Circle",
|
|
2819
2861
|
"pptx.shapePresets.cloud": "Cloud",
|
|
2862
|
+
"pptx.shapePresets.curve": "Curve",
|
|
2820
2863
|
"pptx.shapePresets.cylinder": "Cylinder",
|
|
2821
2864
|
"pptx.shapePresets.diamond": "Diamond",
|
|
2822
2865
|
"pptx.shapePresets.downArrow": "Down Arrow",
|
|
2866
|
+
"pptx.shapePresets.freeformShape": "Freeform: Shape",
|
|
2823
2867
|
"pptx.shapePresets.heart": "Heart",
|
|
2824
2868
|
"pptx.shapePresets.hexagon": "Hexagon",
|
|
2825
2869
|
"pptx.shapePresets.leftArrow": "Left Arrow",
|
package/dist/viewer/index.d.ts
CHANGED
|
@@ -1484,8 +1484,16 @@ interface TextStyle {
|
|
|
1484
1484
|
textOutlineWidth?: number;
|
|
1485
1485
|
/** Text outline colour as hex string (`a:rPr > a:ln > a:solidFill`). */
|
|
1486
1486
|
textOutlineColor?: string;
|
|
1487
|
+
/** Text outline dash preset (`a:rPr > a:ln > a:prstDash/@val`), e.g. `dash`; absent for solid. */
|
|
1488
|
+
textOutlineDash?: string;
|
|
1487
1489
|
/** When true, the text body has no fill (`a:rPr > a:noFill`), producing hollow/outline-only text. */
|
|
1488
1490
|
textFillNone?: boolean;
|
|
1491
|
+
/**
|
|
1492
|
+
* When true, the run authored an EMPTY `<a:effectLst/>`: an explicit "no
|
|
1493
|
+
* effects" override that blocks an inherited shadow or glow. Kept so a
|
|
1494
|
+
* rewrite re-emits it instead of letting the inherited effect return.
|
|
1495
|
+
*/
|
|
1496
|
+
textEffectsExplicitNone?: boolean;
|
|
1489
1497
|
/** Superscript/subscript baseline shift as percentage (`a:rPr/@baseline`). Positive = super, negative = sub. */
|
|
1490
1498
|
baseline?: number;
|
|
1491
1499
|
/** Character spacing in hundredths of a point (`a:rPr/@spc`). */
|
|
@@ -1519,6 +1527,25 @@ interface TextStyle {
|
|
|
1519
1527
|
textFillPatternForeground?: string;
|
|
1520
1528
|
/** Text-level pattern background colour. */
|
|
1521
1529
|
textFillPatternBackground?: string;
|
|
1530
|
+
/**
|
|
1531
|
+
* Raw `a:rPr > a:blipFill` XML, preserved verbatim for round-trip
|
|
1532
|
+
* serialization AND as the input to the image resolution pass that fills
|
|
1533
|
+
* in {@link textFillBlipUrl} (parsing a run's fill happens synchronously,
|
|
1534
|
+
* with no zip/relationship access at that point; resolving the blip to a
|
|
1535
|
+
* displayable URL needs both, so it happens in a later async pass over
|
|
1536
|
+
* the slide's parsed elements, mirroring how a shape's OWN image fill is
|
|
1537
|
+
* resolved). A picture-filled text run (`a:rPr > a:blipFill`) was
|
|
1538
|
+
* documented as handled ("Handles gradient fills, pattern fills, and
|
|
1539
|
+
* image fills on text runs") but never actually parsed, so it silently
|
|
1540
|
+
* fell through to the run's plain `color` and rendered solid black
|
|
1541
|
+
* (COM-verified: `audit-text` slide 13's "PICTURE FILL" run shows the
|
|
1542
|
+
* fill image through the glyphs in PowerPoint).
|
|
1543
|
+
*/
|
|
1544
|
+
textFillBlipXml?: XmlObject;
|
|
1545
|
+
/** Resolved displayable URL for {@link textFillBlipXml}, or the archive-relative path when unresolved (lazy decode). */
|
|
1546
|
+
textFillBlipUrl?: string;
|
|
1547
|
+
/** Tiling mode for {@link textFillBlipUrl} (`a:blipFill/a:tile` present -> 'tile', else 'stretch'). */
|
|
1548
|
+
textFillBlipMode?: 'stretch' | 'tile';
|
|
1522
1549
|
hyperlink?: string;
|
|
1523
1550
|
/** Relationship ID for the hyperlink (`a:hlinkClick/@r:id`) — preserved for round-trip serialization. */
|
|
1524
1551
|
hyperlinkRId?: string;
|
|
@@ -1604,6 +1631,13 @@ interface TextStyle {
|
|
|
1604
1631
|
position: number;
|
|
1605
1632
|
align: 'l' | 'ctr' | 'r' | 'dec';
|
|
1606
1633
|
leader?: 'none' | 'dot' | 'hyphen' | 'underscore';
|
|
1634
|
+
/**
|
|
1635
|
+
* True when the source spelled out the schema-default `@algn="l"`, so the
|
|
1636
|
+
* writer re-emits it instead of treating it as an omitted default.
|
|
1637
|
+
*/
|
|
1638
|
+
alignAuthored?: boolean;
|
|
1639
|
+
/** True when the source spelled out the schema-default `@leader="none"`. */
|
|
1640
|
+
leaderAuthored?: boolean;
|
|
1607
1641
|
}>;
|
|
1608
1642
|
/**
|
|
1609
1643
|
* True when the paragraph's own `a:pPr` authored an EMPTY `<a:tabLst/>`
|
|
@@ -1967,6 +2001,19 @@ interface TextStyle {
|
|
|
1967
2001
|
* convention used for {@link bulletInfo} / {@link endParaRunProperties}).
|
|
1968
2002
|
*/
|
|
1969
2003
|
paragraphDefaultRunPropertiesXml?: XmlObject;
|
|
2004
|
+
/**
|
|
2005
|
+
* The bullet colour / size / typeface children (`a:buClrTx`, `a:buClr`,
|
|
2006
|
+
* `a:buSzTx`, `a:buSzPct`, `a:buSzPts`, `a:buFontTx`, `a:buFont`) a
|
|
2007
|
+
* paragraph authored in its own `<a:pPr>` WITHOUT a bullet type
|
|
2008
|
+
* (`a:buNone` / `a:buChar` / `a:buAutoNum` / `a:buBlip`), captured
|
|
2009
|
+
* verbatim in source order. Such a paragraph restyles an inherited bullet
|
|
2010
|
+
* rather than declaring one, so its {@link BulletInfo} resolves from the
|
|
2011
|
+
* cascade and is (correctly) not written back; without this capture the
|
|
2012
|
+
* paragraph's own override vanished on every rewrite.
|
|
2013
|
+
*
|
|
2014
|
+
* Only meaningful on a paragraph's own authored properties.
|
|
2015
|
+
*/
|
|
2016
|
+
paragraphBulletPropertiesXml?: XmlObject;
|
|
1970
2017
|
}
|
|
1971
2018
|
/**
|
|
1972
2019
|
* Structured bullet metadata attached to the first {@link TextSegment}
|
|
@@ -3235,6 +3282,26 @@ type PptxChartMarkerSymbol = 'circle' | 'dash' | 'diamond' | 'dot' | 'none' | 'p
|
|
|
3235
3282
|
*/
|
|
3236
3283
|
type PptxChartScatterStyle = 'none' | 'line' | 'lineMarker' | 'marker' | 'smooth' | 'smoothMarker';
|
|
3237
3284
|
/** Shape properties extracted from c:spPr for chart formatting. */
|
|
3285
|
+
/**
|
|
3286
|
+
* A render-ready gradient fill from a chart `c:spPr/a:gradFill` (chart area,
|
|
3287
|
+
* plot area or series). Positions are 0..100; a linear gradient's `angle` is
|
|
3288
|
+
* in degrees clockwise from left-to-right (`a:lin/@ang`); a radial (`a:path`)
|
|
3289
|
+
* gradient centres on `focalPoint` (0..1 fractions of the box), the middle
|
|
3290
|
+
* when absent.
|
|
3291
|
+
*/
|
|
3292
|
+
interface PptxChartGradientFill {
|
|
3293
|
+
type: 'linear' | 'radial';
|
|
3294
|
+
stops: Array<{
|
|
3295
|
+
color: string;
|
|
3296
|
+
position: number;
|
|
3297
|
+
opacity?: number;
|
|
3298
|
+
}>;
|
|
3299
|
+
angle?: number;
|
|
3300
|
+
focalPoint?: {
|
|
3301
|
+
x: number;
|
|
3302
|
+
y: number;
|
|
3303
|
+
};
|
|
3304
|
+
}
|
|
3238
3305
|
interface PptxChartShapeProps {
|
|
3239
3306
|
fillColor?: string;
|
|
3240
3307
|
strokeColor?: string;
|
|
@@ -3560,6 +3627,12 @@ interface PptxChartSeries {
|
|
|
3560
3627
|
*/
|
|
3561
3628
|
idx?: number;
|
|
3562
3629
|
values: number[];
|
|
3630
|
+
/**
|
|
3631
|
+
* Series gradient fill (`c:ser/c:spPr/a:gradFill`), painted on every mark
|
|
3632
|
+
* of the series that has no per-point override. Render-only: the series'
|
|
3633
|
+
* own `c:spPr` round-trips untouched.
|
|
3634
|
+
*/
|
|
3635
|
+
gradientFill?: PptxChartGradientFill;
|
|
3563
3636
|
/**
|
|
3564
3637
|
* Per-series x values from `c:ser/c:xVal` (scatter and bubble series only).
|
|
3565
3638
|
*
|
|
@@ -3734,6 +3807,12 @@ interface PptxChartFilteredSeries {
|
|
|
3734
3807
|
* and `c:dLblPos`.
|
|
3735
3808
|
*/
|
|
3736
3809
|
interface PptxChartDataLabelOptions {
|
|
3810
|
+
/** Label box fill/outline (`c:dLbls/c:spPr`), see `chart-data-label-box.ts`. */
|
|
3811
|
+
labelShape?: PptxChartShapeProps;
|
|
3812
|
+
/** Callout geometry of the label box (`c15:spPr/a:prstGeom/@prst`, e.g. `wedgeRectCallout`). */
|
|
3813
|
+
calloutShape?: string;
|
|
3814
|
+
/** The chart15 extension's `c15:showLeaderLines`, which wins for a moved label's leader line. */
|
|
3815
|
+
extLeaderLines?: boolean;
|
|
3737
3816
|
/** Show the numeric value (`c:showVal`). */
|
|
3738
3817
|
showValue?: boolean;
|
|
3739
3818
|
/** Show the category name (`c:showCatName`). */
|
|
@@ -3859,6 +3938,10 @@ interface PptxChartStyle {
|
|
|
3859
3938
|
chartAreaFill?: string;
|
|
3860
3939
|
/** Plot-area fill from `c:plotArea/c:spPr`. See {@link chartAreaFill}. */
|
|
3861
3940
|
plotAreaFill?: string;
|
|
3941
|
+
/** Chart-area gradient (`c:chartSpace/c:spPr/a:gradFill`); wins over {@link chartAreaFill}. */
|
|
3942
|
+
chartAreaGradient?: PptxChartGradientFill;
|
|
3943
|
+
/** Plot-area gradient (`c:plotArea/c:spPr/a:gradFill`); wins over {@link plotAreaFill}. */
|
|
3944
|
+
plotAreaGradient?: PptxChartGradientFill;
|
|
3862
3945
|
/** Whether data labels are shown. */
|
|
3863
3946
|
hasDataLabels?: boolean;
|
|
3864
3947
|
/** Chart-level data-label content/position options (when `hasDataLabels`). */
|
|
@@ -7737,7 +7820,15 @@ type PptxAnimationTimingCurve = 'ease' | 'ease-in' | 'ease-out' | 'linear';
|
|
|
7737
7820
|
/** Repeat mode for animations. */
|
|
7738
7821
|
type PptxAnimationRepeatMode = 'untilNextClick' | 'untilEndOfSlide';
|
|
7739
7822
|
/** Animation trigger type from OOXML `p:cTn`. */
|
|
7740
|
-
type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevious' | 'withPrevious' | 'afterDelay'
|
|
7823
|
+
type PptxAnimationTrigger = 'onClick' | 'onShapeClick' | 'onHover' | 'afterPrevious' | 'withPrevious' | 'afterDelay' |
|
|
7824
|
+
/**
|
|
7825
|
+
* Starts when a media element's playback reaches a named bookmark
|
|
7826
|
+
* (PowerPoint's "Trigger > On Bookmark"). The media element is
|
|
7827
|
+
* {@link PptxElementAnimation.triggerShapeId} and the bookmark
|
|
7828
|
+
* {@link PptxElementAnimation.triggerBookmark}; saved as an interactive
|
|
7829
|
+
* sequence gated on `p:cond evt="onMediaBookmark"` with a `p14:bmkTgt`.
|
|
7830
|
+
*/
|
|
7831
|
+
'onMediaBookmark';
|
|
7741
7832
|
/**
|
|
7742
7833
|
* Native animation kind. The historic shape-targeted preset animations are
|
|
7743
7834
|
* implicitly the default kind (`undefined`). Media animations (`p:audio`,
|
|
@@ -7890,8 +7981,13 @@ interface PptxNativeAnimation {
|
|
|
7890
7981
|
target?: PptxAnimationTarget;
|
|
7891
7982
|
/** Trigger type. */
|
|
7892
7983
|
trigger?: PptxAnimationTrigger;
|
|
7893
|
-
/**
|
|
7984
|
+
/**
|
|
7985
|
+
* Shape ID that triggers this animation: the clicked shape of an
|
|
7986
|
+
* interactive sequence, or the media element of an `onMediaBookmark` one.
|
|
7987
|
+
*/
|
|
7894
7988
|
triggerShapeId?: string;
|
|
7989
|
+
/** Bookmark name an `onMediaBookmark` interactive sequence waits for. */
|
|
7990
|
+
triggerBookmark?: string;
|
|
7895
7991
|
/** Whether this effect belongs to an OOXML `interactiveSeq`. */
|
|
7896
7992
|
interactiveSequence?: boolean;
|
|
7897
7993
|
/** Whether `p:endSync/p:rtn[@val="all"]` makes that sequence replayable. */
|
|
@@ -8390,12 +8486,15 @@ interface PptxAttributeAnimation {
|
|
|
8390
8486
|
/**
|
|
8391
8487
|
* `p:anim/@_p14:bounceEnd` (Office 2010 `p14` extension attribute,
|
|
8392
8488
|
* MS-OI29500), normalized to a 0-1 fraction of this behaviour's own
|
|
8393
|
-
* duration. PowerPoint's
|
|
8394
|
-
*
|
|
8395
|
-
*
|
|
8396
|
-
*
|
|
8397
|
-
* the
|
|
8398
|
-
*
|
|
8489
|
+
* duration. PowerPoint's "Bounce End" effect option (COM:
|
|
8490
|
+
* `Effect.Timing.BounceEnd` + `BounceEndIntensity`) writes this on the
|
|
8491
|
+
* position-ramp `p:anim` node(s): the share of the duration spent
|
|
8492
|
+
* BOUNCING at the end. Measured from PowerPoint's own CreateVideo frames,
|
|
8493
|
+
* the travel completes at `1 - bounceEnd` and the rest is a damped
|
|
8494
|
+
* oscillation about the final value (see shared's `animation-bounce-end`).
|
|
8495
|
+
* Mirrored verbatim by PowerPoint onto the enclosing
|
|
8496
|
+
* `p:cTn/@_p14:presetBounceEnd`. Absent for every animation that doesn't
|
|
8497
|
+
* use this effect option (the overwhelming majority).
|
|
8399
8498
|
*/
|
|
8400
8499
|
bounceEnd?: number;
|
|
8401
8500
|
}
|
|
@@ -8573,9 +8672,24 @@ interface PptxElementAnimation {
|
|
|
8573
8672
|
durationMs?: number;
|
|
8574
8673
|
delayMs?: number;
|
|
8575
8674
|
order?: number;
|
|
8675
|
+
/**
|
|
8676
|
+
* The {@link order} the loader derived from the slide's `p:timing` tree for
|
|
8677
|
+
* an entry whose `pptx:editorMeta` record authored no `@order`. The tree
|
|
8678
|
+
* already expresses that position (and every load re-derives it), so the
|
|
8679
|
+
* writer omits `@order` while `order` still equals this value; a reorder
|
|
8680
|
+
* changes `order` and the attribute is written again. Load-time bookkeeping
|
|
8681
|
+
* only; never set it by hand.
|
|
8682
|
+
*/
|
|
8683
|
+
orderFromTimeline?: number;
|
|
8576
8684
|
trigger?: PptxAnimationTrigger;
|
|
8577
|
-
/**
|
|
8685
|
+
/**
|
|
8686
|
+
* Shape ID that triggers this animation: the shape clicked for
|
|
8687
|
+
* `onShapeClick`, or the media element whose bookmark fires it for
|
|
8688
|
+
* `onMediaBookmark`.
|
|
8689
|
+
*/
|
|
8578
8690
|
triggerShapeId?: string;
|
|
8691
|
+
/** Bookmark name (`p14:bmk/@name`) an `onMediaBookmark` trigger waits for. */
|
|
8692
|
+
triggerBookmark?: string;
|
|
8579
8693
|
timingCurve?: PptxAnimationTimingCurve;
|
|
8580
8694
|
repeatCount?: number;
|
|
8581
8695
|
repeatMode?: PptxAnimationRepeatMode;
|
|
@@ -11830,6 +11944,9 @@ interface SvgExportOptions {
|
|
|
11830
11944
|
defaultFontSize?: number;
|
|
11831
11945
|
}
|
|
11832
11946
|
|
|
11947
|
+
/** Supported merge shape operations (matching PowerPoint's Merge Shapes menu). */
|
|
11948
|
+
type MergeShapeOperation = 'union' | 'intersect' | 'subtract' | 'fragment' | 'combine';
|
|
11949
|
+
|
|
11833
11950
|
//#region src/theme/types.d.ts
|
|
11834
11951
|
/**
|
|
11835
11952
|
* Theme configuration types for the PowerPoint viewer.
|
|
@@ -13276,8 +13393,12 @@ interface PresentationInkStroke {
|
|
|
13276
13393
|
}
|
|
13277
13394
|
/** A logical editor command produced by one key press. */
|
|
13278
13395
|
type EditorKeyActionName = 'undo' | 'redo' | 'copy' | 'cut' | 'paste' | 'duplicate' | 'delete' | 'selectAll' | 'group' | 'ungroup' | 'nudge' | 'prevSlide' | 'nextSlide' | 'escape' | 'find' | 'findReplace' | 'toggleShortcuts' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'increaseFontSize' | 'decreaseFontSize' | 'copyFormat' | 'pasteFormat' | 'newSlide' | 'hyperlink' | 'clearFormatting' | 'cycleSelectionNext' | 'cycleSelectionPrev' | 'pasteSpecial';
|
|
13396
|
+
//#endregion
|
|
13397
|
+
//#region src/render/merge-shapes/merge-shapes-menu.d.ts
|
|
13398
|
+
/** The right-click command id for each operation. */
|
|
13399
|
+
type MergeShapesCommandId = 'merge-union' | 'merge-combine' | 'merge-fragment' | 'merge-intersect' | 'merge-subtract';
|
|
13279
13400
|
/** Every command a canvas context menu can offer, in no particular order. */
|
|
13280
|
-
type ContextMenuCommandId = 'copy' | 'cut' | 'paste' | 'duplicate' | 'edit-text' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'ai-ask' | 'ai-fix' | 'comment' | 'hyperlink' | 'table-insert-row-above' | 'table-insert-row-below' | 'table-delete-row' | 'table-insert-col-left' | 'table-insert-col-right' | 'table-delete-col' | 'table-merge-selected' | 'table-merge-right' | 'table-merge-down' | 'table-split' | 'group' | 'ungroup' | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape' | 'delete';
|
|
13401
|
+
type ContextMenuCommandId = 'copy' | 'cut' | 'paste' | 'duplicate' | 'edit-text' | 'edit-points' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'ai-ask' | 'ai-fix' | 'comment' | 'hyperlink' | 'table-insert-row-above' | 'table-insert-row-below' | 'table-delete-row' | 'table-insert-col-left' | 'table-insert-col-right' | 'table-delete-col' | 'table-merge-selected' | 'table-merge-right' | 'table-merge-down' | 'table-split' | 'group' | 'ungroup' | 'crop' | MergeShapesCommandId | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape' | 'delete';
|
|
13281
13402
|
//#endregion
|
|
13282
13403
|
//#region src/render/canvas-context-menu-commands.d.ts
|
|
13283
13404
|
/**
|
|
@@ -13735,7 +13856,7 @@ interface AccountAuthConfig {
|
|
|
13735
13856
|
* whole control cluster (zoom in/out/fit, prev/next) rather than each button
|
|
13736
13857
|
* in it, matching how hosts actually want to hide/keep them as a unit.
|
|
13737
13858
|
*/
|
|
13738
|
-
type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'record' | 'notes' | 'fullscreen' | 'zoom' | 'navigation';
|
|
13859
|
+
type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'record' | 'notes' | 'fullscreen' | 'zoom' | 'navigation' | 'mergeShapes' | 'crop';
|
|
13739
13860
|
/** A top-level ribbon tab. `record` intentionally shares its id with the quick-access Record button above: both surface the same recording feature, so hiding one hides the other. */
|
|
13740
13861
|
type ToolbarTabId = 'file' | 'home' | 'insert' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'record' | 'review' | 'view' | 'help';
|
|
13741
13862
|
type ToolbarActionId = ToolbarButtonId | ToolbarTabId;
|
|
@@ -13942,6 +14063,12 @@ interface PrintSettings {
|
|
|
13942
14063
|
*/
|
|
13943
14064
|
scaleToFit?: boolean;
|
|
13944
14065
|
}
|
|
14066
|
+
/** Every command the Edit Points right-click menu can offer. */
|
|
14067
|
+
type EditPointsCommandId = 'add-point' | 'delete-point' | 'delete-segment' | 'open-path' | 'close-path' | 'smooth-point' | 'straight-point' | 'corner-point' | 'straight-segment' | 'curved-segment' | 'exit';
|
|
14068
|
+
//#endregion
|
|
14069
|
+
//#region src/render/edit-points/freeform-tool-geometry.d.ts
|
|
14070
|
+
/** The two click-to-place drawing tools. */
|
|
14071
|
+
type FreeformToolKind = 'freeformShape' | 'curve';
|
|
13945
14072
|
//#endregion
|
|
13946
14073
|
//#region src/render/options/viewer-options-controls.d.ts
|
|
13947
14074
|
/**
|
|
@@ -14012,6 +14139,11 @@ interface ContextMenuCustomization {
|
|
|
14012
14139
|
hiddenElementCommands?: readonly ContextMenuCommandId[];
|
|
14013
14140
|
/** Entries to remove from the empty-canvas menu. */
|
|
14014
14141
|
hiddenCanvasCommands?: readonly CanvasContextMenuCommandId[];
|
|
14142
|
+
/**
|
|
14143
|
+
* Entries to remove from the Edit Points menu (right-click a vertex or a
|
|
14144
|
+
* segment while editing a shape's points).
|
|
14145
|
+
*/
|
|
14146
|
+
hiddenEditPointsCommands?: readonly EditPointsCommandId[];
|
|
14015
14147
|
/** Remove the element context menu entirely. */
|
|
14016
14148
|
disableElementMenu?: boolean;
|
|
14017
14149
|
/** Remove the empty-canvas context menu entirely. */
|
|
@@ -14041,7 +14173,12 @@ interface KeyboardCustomization {
|
|
|
14041
14173
|
*/
|
|
14042
14174
|
type ViewerPanelId = 'statusBar' | 'slidesPane' | 'inspector' | 'notes' | 'quickAccessToolbar' | 'titleBar';
|
|
14043
14175
|
/** Feature areas that can be switched off as a whole. */
|
|
14044
|
-
type ViewerFeatureId = 'ai' | 'collaboration' | 'comments' | 'presentMode';
|
|
14176
|
+
type ViewerFeatureId = 'ai' | 'collaboration' | 'comments' | 'presentMode' | 'editPoints';
|
|
14177
|
+
/**
|
|
14178
|
+
* The click-to-place drawing tools of Insert > Shapes > Lines: Freeform:
|
|
14179
|
+
* Shape and Curve.
|
|
14180
|
+
*/
|
|
14181
|
+
type ViewerDrawingToolId = FreeformToolKind;
|
|
14045
14182
|
/** Dialogs (and the entry points that open them) a host can remove. */
|
|
14046
14183
|
type ViewerDialogId = 'options' | 'share' | 'broadcast' | 'print' | 'export';
|
|
14047
14184
|
/** Export formats offered by the File > Export page. */
|
|
@@ -14064,6 +14201,8 @@ interface ViewerCustomization {
|
|
|
14064
14201
|
hiddenDialogs?: readonly ViewerDialogId[];
|
|
14065
14202
|
/** Export formats to remove from File > Export. */
|
|
14066
14203
|
hiddenExportFormats?: readonly ViewerExportFormatId[];
|
|
14204
|
+
/** Drawing tools to remove from the Insert > Shapes gallery. */
|
|
14205
|
+
hiddenDrawingTools?: readonly ViewerDrawingToolId[];
|
|
14067
14206
|
}
|
|
14068
14207
|
//#endregion
|
|
14069
14208
|
//#region src/render/options/viewer-options-constraints.d.ts
|
|
@@ -14109,6 +14248,8 @@ interface ResolvedCustomization {
|
|
|
14109
14248
|
hiddenBackstageCards: ReadonlySet<BackstageCardId>;
|
|
14110
14249
|
hiddenElementCommands: ReadonlySet<ContextMenuCommandId>;
|
|
14111
14250
|
hiddenCanvasCommands: ReadonlySet<CanvasContextMenuCommandId>;
|
|
14251
|
+
hiddenEditPointsCommands: ReadonlySet<EditPointsCommandId>;
|
|
14252
|
+
hiddenDrawingTools: ReadonlySet<ViewerDrawingToolId>;
|
|
14112
14253
|
elementMenuEnabled: boolean;
|
|
14113
14254
|
canvasMenuEnabled: boolean;
|
|
14114
14255
|
hiddenPanels: ReadonlySet<ViewerPanelId>;
|
|
@@ -14274,6 +14415,33 @@ interface ViewportFitOptions {
|
|
|
14274
14415
|
/** Positive fit-factor ceiling; null allows enlargement without a ceiling. */
|
|
14275
14416
|
maxFitScale?: number | null;
|
|
14276
14417
|
}
|
|
14418
|
+
/** The element fields an Edit Points commit writes. */
|
|
14419
|
+
type EditPointsElementPatch = Pick<ShapePptxElement, 'x' | 'y' | 'width' | 'height' | 'shapeType' | 'shapeAdjustments' | 'pathData' | 'pathWidth' | 'pathHeight' | 'customGeometryPaths' | 'customGeometryRawData' | 'customGeometryAdjustHandlesXY' | 'customGeometryAdjustHandlesPolar' | 'customGeometryConnectionSites' | 'customGeometryTextRect'>;
|
|
14420
|
+
//#endregion
|
|
14421
|
+
//#region src/render/picture-crop/crop-geometry.d.ts
|
|
14422
|
+
/** An axis-aligned rectangle in slide pixels. */
|
|
14423
|
+
interface CropRect {
|
|
14424
|
+
x: number;
|
|
14425
|
+
y: number;
|
|
14426
|
+
width: number;
|
|
14427
|
+
height: number;
|
|
14428
|
+
}
|
|
14429
|
+
/** The four `a:srcRect` insets as fractions of the image (negative pads). */
|
|
14430
|
+
interface CropInsets {
|
|
14431
|
+
cropLeft: number;
|
|
14432
|
+
cropTop: number;
|
|
14433
|
+
cropRight: number;
|
|
14434
|
+
cropBottom: number;
|
|
14435
|
+
}
|
|
14436
|
+
/** What a crop edit writes back onto the picture element. */
|
|
14437
|
+
type CropElementUpdate = CropInsets & CropRect;
|
|
14438
|
+
/** The snapshot a crop session restores on cancel. */
|
|
14439
|
+
interface CropSession {
|
|
14440
|
+
elementId: string;
|
|
14441
|
+
original: CropElementUpdate;
|
|
14442
|
+
/** Insets the picture did not carry at all (no `a:srcRect` opinion). */
|
|
14443
|
+
absentInsets: readonly (keyof CropInsets)[];
|
|
14444
|
+
}
|
|
14277
14445
|
//#endregion
|
|
14278
14446
|
//#region src/export/rasterize-element-strategy.d.ts
|
|
14279
14447
|
/** Which path actually produced the tile, for telemetry/tests. */
|
|
@@ -15568,6 +15736,12 @@ declare class EditorArrangeController {
|
|
|
15568
15736
|
groupSelected(): void;
|
|
15569
15737
|
/** Ungroup the primary selected group element. Selects the ungrouped children. */
|
|
15570
15738
|
ungroupSelected(): void;
|
|
15739
|
+
/**
|
|
15740
|
+
* Merge Shapes (Union / Combine / Fragment / Intersect / Subtract) over the
|
|
15741
|
+
* selection IN SELECTION ORDER, so the first-selected shape's formatting
|
|
15742
|
+
* survives. One undo step; selects the new shape(s). False when a no-op.
|
|
15743
|
+
*/
|
|
15744
|
+
mergeSelected(operation: MergeShapeOperation): boolean;
|
|
15571
15745
|
}
|
|
15572
15746
|
|
|
15573
15747
|
/**
|
|
@@ -15624,6 +15798,53 @@ declare class EditorClipboardController {
|
|
|
15624
15798
|
replaceElement(elementId: string, next: PptxElement): void;
|
|
15625
15799
|
}
|
|
15626
15800
|
|
|
15801
|
+
/**
|
|
15802
|
+
* On-canvas picture crop mode (Picture Format > Crop), driven by the shared
|
|
15803
|
+
* `picture-crop` lifecycle:
|
|
15804
|
+
*
|
|
15805
|
+
* - {@link enter}: the ribbon Crop button or the picture context menu's Crop.
|
|
15806
|
+
* - {@link preview}: handle and pan drags write the picture LIVE, with no
|
|
15807
|
+
* history, so the normal renderer shows the new `a:srcRect` as it changes.
|
|
15808
|
+
* - {@link commit}: Enter, a click outside, a selection or slide change, or
|
|
15809
|
+
* Crop again. Rewinds the picture to the entry snapshot, records history
|
|
15810
|
+
* there, then re-applies the result: exactly ONE undo step, whose undo
|
|
15811
|
+
* restores the pre-crop picture (none when nothing changed).
|
|
15812
|
+
* - {@link cancel}: Escape writes the snapshot back and leaves no undo step.
|
|
15813
|
+
*/
|
|
15814
|
+
declare class EditorCropController {
|
|
15815
|
+
#private;
|
|
15816
|
+
session: CropSession | null;
|
|
15817
|
+
constructor(editor: EditorState);
|
|
15818
|
+
get active(): boolean;
|
|
15819
|
+
/** The picture being cropped, as it is right now. */
|
|
15820
|
+
get element(): PptxElement | undefined;
|
|
15821
|
+
/** Editable, exactly one element selected, and it is a croppable picture. */
|
|
15822
|
+
get canCrop(): boolean;
|
|
15823
|
+
/** Enter crop mode on the selected picture. False when it cannot be cropped. */
|
|
15824
|
+
enter(): boolean;
|
|
15825
|
+
/** The ribbon Crop toggle: enter, or commit when already cropping. */
|
|
15826
|
+
toggle(): void;
|
|
15827
|
+
/** Apply a live crop update onto the picture without recording history. */
|
|
15828
|
+
preview(update: CropElementUpdate): void;
|
|
15829
|
+
/** End the session, leaving one undo step when the picture changed. */
|
|
15830
|
+
commit(): void;
|
|
15831
|
+
/** End the session and restore the picture as it was on entry, with no undo step. */
|
|
15832
|
+
cancel(): void;
|
|
15833
|
+
/**
|
|
15834
|
+
* Enter commits and Escape cancels while cropping; the key is consumed so
|
|
15835
|
+
* the editor's own Enter/Escape action does not also run. True when handled.
|
|
15836
|
+
*/
|
|
15837
|
+
handleKey(event: KeyboardEvent): boolean;
|
|
15838
|
+
/** Commit when the selection moved off the picture or the slide changed. */
|
|
15839
|
+
syncContext(selectedIds: readonly string[], slideIndex: number): void;
|
|
15840
|
+
/**
|
|
15841
|
+
* A one-click crop (aspect ratio, Fill, Fit) on the selected picture. Inside
|
|
15842
|
+
* a session it joins the session's single undo step; otherwise it is one
|
|
15843
|
+
* undoable update of its own.
|
|
15844
|
+
*/
|
|
15845
|
+
applyOnce(update: CropElementUpdate): void;
|
|
15846
|
+
}
|
|
15847
|
+
|
|
15627
15848
|
interface EditorSnapshot {
|
|
15628
15849
|
slides: PptxSlide[];
|
|
15629
15850
|
templateElementsBySlideId: TemplateElementMap;
|
|
@@ -15875,6 +16096,36 @@ declare class EditorMasterCrudController {
|
|
|
15875
16096
|
run(id: MasterViewCrudActionId, prompts: MasterViewCrudPrompts): Promise<boolean>;
|
|
15876
16097
|
}
|
|
15877
16098
|
|
|
16099
|
+
/**
|
|
16100
|
+
* EditorOutlineController: state for the two outline-authoring modes, Edit
|
|
16101
|
+
* Points on one shape and the armed Freeform: Shape / Curve drawing tool
|
|
16102
|
+
* (Svelte counterpart of React's `useEditPointsState` + `useOutlineAuthoring`).
|
|
16103
|
+
* At most one is active: arming a tool ends Edit Points and starting Edit
|
|
16104
|
+
* Points disarms the tool. Every behaviour (hit targets, drags, the vertex /
|
|
16105
|
+
* segment menu, the element patch) lives in the shared sessions; this only
|
|
16106
|
+
* holds which mode is on and routes their results through `EditorState`, so
|
|
16107
|
+
* each commit is one undo step. Instantiated as `EditorState.outlineOps`.
|
|
16108
|
+
*/
|
|
16109
|
+
declare class EditorOutlineController {
|
|
16110
|
+
#private;
|
|
16111
|
+
/** The shape in Edit Points mode, or null. */
|
|
16112
|
+
editPointsId: string | null;
|
|
16113
|
+
/** The armed click-to-place drawing tool, or null. */
|
|
16114
|
+
freeformTool: FreeformToolKind | null;
|
|
16115
|
+
constructor(editor: EditorState);
|
|
16116
|
+
/** The shape being edited, while it still exists on the active layer. */
|
|
16117
|
+
get editPointsElement(): PptxElement | undefined;
|
|
16118
|
+
/** Enter Edit Points on `id` when the shape allows it (not `noEditPoints`). */
|
|
16119
|
+
startEditPoints(id: string): void;
|
|
16120
|
+
exitEditPoints(): void;
|
|
16121
|
+
/** Apply one Edit Points edit as one undo step. */
|
|
16122
|
+
commitEditPoints(id: string, patch: EditPointsElementPatch): void;
|
|
16123
|
+
/** Arm (or, with null, disarm) a drawing tool. */
|
|
16124
|
+
armFreeformTool(tool: FreeformToolKind | null): void;
|
|
16125
|
+
/** Insert a drawn freeform (selected, one undo step) and disarm. */
|
|
16126
|
+
commitFreeform(shape: ShapePptxElement): void;
|
|
16127
|
+
}
|
|
16128
|
+
|
|
15878
16129
|
interface PresentationMetadataHost {
|
|
15879
16130
|
readonly editable: boolean;
|
|
15880
16131
|
pushHistory(): void;
|
|
@@ -16294,10 +16545,14 @@ declare class EditorState {
|
|
|
16294
16545
|
readonly slidesOps: EditorSlidesController;
|
|
16295
16546
|
readonly sectionOps: EditorSectionController;
|
|
16296
16547
|
readonly arrangeOps: EditorArrangeController;
|
|
16548
|
+
/** On-canvas picture crop mode (ribbon Crop / context-menu Crop). */
|
|
16549
|
+
readonly cropOps: EditorCropController;
|
|
16297
16550
|
readonly backgroundOps: EditorBackgroundController;
|
|
16298
16551
|
readonly transitionOps: EditorTransitionController;
|
|
16299
16552
|
readonly animationOps: EditorAnimationController;
|
|
16300
16553
|
readonly inkOps: EditorInkController;
|
|
16554
|
+
/** Edit Points and the Freeform: Shape / Curve tools. */
|
|
16555
|
+
readonly outlineOps: EditorOutlineController;
|
|
16301
16556
|
readonly masterOps: EditorMasterController;
|
|
16302
16557
|
readonly masterCrud: EditorMasterCrudController;
|
|
16303
16558
|
readonly formatPainter: EditorFormatPainterController;
|
package/dist/viewer/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as e, I as a, N as o, P as r, a as n, c as d, d as b, f as p, i as c, j as s, k as t, l as
|
|
1
|
+
import { E_ as l, T_ as S } from "../transition-overlay-BjAhkWT1.js";
|
|
2
|
+
import { A as e, I as a, N as o, P as r, a as n, c as d, d as b, f as p, i as c, j as s, k as t, l as m, n as g, o as x, p as T, r as w, s as C, t as P, u as $ } from "../export-BmYgdMk2.js";
|
|
3
3
|
var y = a, A = r, V = s, f = e, u = t, R = o;
|
|
4
4
|
export {
|
|
5
5
|
f as CollaborationCursors,
|
|
6
6
|
R as EditorLayer,
|
|
7
|
-
|
|
7
|
+
P as PowerPointViewer,
|
|
8
8
|
c as PresentationLoader,
|
|
9
9
|
u as RemoteSelectionOverlay,
|
|
10
10
|
y as Ribbon,
|
|
11
11
|
V as SlideCanvas,
|
|
12
|
-
|
|
12
|
+
w as ViewerState,
|
|
13
13
|
A as ViewerToolbar,
|
|
14
14
|
$ as clampSlideIndex,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
T as createSvelteAiBridge,
|
|
16
|
+
g as createViewerState,
|
|
17
17
|
n as exportAllSlidesToSvg,
|
|
18
18
|
x as exportAllSlidesToSvgBlobs,
|
|
19
|
-
|
|
19
|
+
C as exportSlideAsSvg,
|
|
20
20
|
d as exportSlideToSvg,
|
|
21
|
-
|
|
21
|
+
m as exportSlideToSvgBlob,
|
|
22
22
|
b as fitScale,
|
|
23
23
|
p as resolveNavigationKey,
|
|
24
24
|
S as zoomInPercent,
|