pptx-svelte-viewer 4.2.0 → 4.3.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 +32 -0
- package/dist/{AiChatPanel-fey6hh2R.js → AiChatPanel-6uxswiBd.js} +2 -2
- package/dist/{export-DoyAdIHl.js → export-CVIAWQ_T.js} +8054 -7902
- package/dist/i18n/de.cjs +2 -2
- package/dist/i18n/de.mjs +2 -2
- package/dist/i18n/es.cjs +2 -2
- package/dist/i18n/es.mjs +2 -2
- package/dist/i18n/fr.cjs +2 -2
- package/dist/i18n/fr.mjs +2 -2
- package/dist/i18n/zh-CN.cjs +2 -2
- package/dist/i18n/zh-CN.mjs +2 -2
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +230 -2
- package/dist/index.js +34 -34
- package/dist/internals.d.ts +182 -1
- package/dist/internals.js +23 -23
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/{transition-overlay-BcUomRXK.js → transition-overlay-BmUNA9xJ.js} +45610 -39284
- package/dist/{translator-D7duxy6A.js → translator-BZ6HUBWJ.js} +2 -2
- package/dist/viewer/index.d.ts +291 -4
- package/dist/viewer/index.js +9 -9
- package/package.json +1 -1
- package/dist/canvas_emf-converter-CKs-EBwD.js +0 -5
|
@@ -40,7 +40,7 @@ var n = {
|
|
|
40
40
|
"pptx.animation.catalogPreset.entr27": "Credits",
|
|
41
41
|
"pptx.animation.catalogPreset.entr28": "Float Up",
|
|
42
42
|
"pptx.animation.catalogPreset.entr29": "Pinwheel",
|
|
43
|
-
"pptx.animation.catalogPreset.entr30": "
|
|
43
|
+
"pptx.animation.catalogPreset.entr30": "Float In",
|
|
44
44
|
"pptx.animation.catalogPreset.entr31": "Expand",
|
|
45
45
|
"pptx.animation.catalogPreset.entr32": "Whip",
|
|
46
46
|
"pptx.animation.catalogPreset.entr33": "Arrive",
|
|
@@ -108,7 +108,7 @@ var n = {
|
|
|
108
108
|
"pptx.animation.catalogPreset.exit27": "Credits",
|
|
109
109
|
"pptx.animation.catalogPreset.exit28": "Float Down",
|
|
110
110
|
"pptx.animation.catalogPreset.exit29": "Pinwheel",
|
|
111
|
-
"pptx.animation.catalogPreset.exit30": "
|
|
111
|
+
"pptx.animation.catalogPreset.exit30": "Float Out",
|
|
112
112
|
"pptx.animation.catalogPreset.exit31": "Contract",
|
|
113
113
|
"pptx.animation.catalogPreset.exit32": "Whip",
|
|
114
114
|
"pptx.animation.catalogPreset.exit33": "Leave",
|
package/dist/viewer/index.d.ts
CHANGED
|
@@ -1397,6 +1397,32 @@ interface TextStyle {
|
|
|
1397
1397
|
* @see element-paragraph-geometry.ts
|
|
1398
1398
|
*/
|
|
1399
1399
|
resolvedParagraphGeometry?: TextStyle;
|
|
1400
|
+
/**
|
|
1401
|
+
* Snapshot of the ELEMENT-scope `a:bodyPr` properties (vertical anchor,
|
|
1402
|
+
* text direction, columns, overflow, autofit, body insets, text wrap, and
|
|
1403
|
+
* the boolean/rotation attributes) as the load pipeline resolved them.
|
|
1404
|
+
*
|
|
1405
|
+
* A shape's own `a:bodyPr` is parsed first, then whatever it left
|
|
1406
|
+
* `undefined` is back-filled from the placeholder / layout / master
|
|
1407
|
+
* defaults (`applyPlaceholderBodyDefaults`), and a placeholder shape with
|
|
1408
|
+
* no `a:bodyPr` of its own has the INHERITED one parsed as if it were its
|
|
1409
|
+
* own. None of those three sources is distinguishable at
|
|
1410
|
+
* `element.textStyle` once the cascade finishes, so a writer that
|
|
1411
|
+
* re-emits every defined field turns an inherited anchor, inset, autofit
|
|
1412
|
+
* mode or `rtlCol` into a value pinned on the slide forever (and an
|
|
1413
|
+
* inherited `a:normAutofit` with no scale gets written back as
|
|
1414
|
+
* `a:spAutoFit`, flipping AutoSize from "shrink text" to "resize shape").
|
|
1415
|
+
*
|
|
1416
|
+
* Present only on an `element.textStyle` that came from a parsed deck.
|
|
1417
|
+
* The save path diffs the live style against this snapshot: a field that
|
|
1418
|
+
* still matches is an inheritance artefact and the writer leaves the
|
|
1419
|
+
* underlying `a:bodyPr` attribute untouched (whatever it already is,
|
|
1420
|
+
* present or absent); a field that differs was authored or has since
|
|
1421
|
+
* been edited and is written out.
|
|
1422
|
+
*
|
|
1423
|
+
* @see element-body-properties.ts
|
|
1424
|
+
*/
|
|
1425
|
+
resolvedBodyProperties?: TextStyle;
|
|
1400
1426
|
fontFamily?: string;
|
|
1401
1427
|
fontSize?: number;
|
|
1402
1428
|
/** When true, some form of autofit is in effect; see {@link autoFitMode} for which. */
|
|
@@ -1579,6 +1605,16 @@ interface TextStyle {
|
|
|
1579
1605
|
align: 'l' | 'ctr' | 'r' | 'dec';
|
|
1580
1606
|
leader?: 'none' | 'dot' | 'hyphen' | 'underscore';
|
|
1581
1607
|
}>;
|
|
1608
|
+
/**
|
|
1609
|
+
* True when the paragraph's own `a:pPr` authored an EMPTY `<a:tabLst/>`
|
|
1610
|
+
* (explicitly "no tab stops", overriding whatever the cascade would
|
|
1611
|
+
* otherwise supply) rather than omitting the element entirely (inherit).
|
|
1612
|
+
* fast-xml-parser gives a childless element as the empty string, so
|
|
1613
|
+
* `tabLst` and no-`tabLst` are otherwise indistinguishable once `tabStops`
|
|
1614
|
+
* comes back empty either way. Paragraph-scope only; not part of the
|
|
1615
|
+
* element-level geometry cascade.
|
|
1616
|
+
*/
|
|
1617
|
+
tabStopsExplicitEmpty?: boolean;
|
|
1582
1618
|
/** Body text wrapping mode from `a:bodyPr/@wrap`. */
|
|
1583
1619
|
textWrap?: 'square' | 'none';
|
|
1584
1620
|
/** Preset text warp type from `a:bodyPr/a:prstTxWarp`. */
|
|
@@ -1621,6 +1657,20 @@ interface TextStyle {
|
|
|
1621
1657
|
* serialised back on save, so it never disturbs the round-trip typefaces.
|
|
1622
1658
|
*/
|
|
1623
1659
|
scriptFallbackFont?: string;
|
|
1660
|
+
/**
|
|
1661
|
+
* Set alongside {@link scriptFallbackFont} when the resolved {@link fontFamily}
|
|
1662
|
+
* came only from the paragraph/list-style/theme CASCADE (the run's own
|
|
1663
|
+
* `a:rPr` authored no `a:latin`/`a:ea`/`a:cs` of its own). A run always
|
|
1664
|
+
* inherits SOME font this way (typically the theme's `+mn-lt`), so without
|
|
1665
|
+
* this flag `fontFamily` was indistinguishable from a run that genuinely
|
|
1666
|
+
* chose that font itself, and the renderer never applied the theme's
|
|
1667
|
+
* per-script override (see #83): `+mn-lt` names only the LATIN member of
|
|
1668
|
+
* the font scheme and was never meant to cover text in a different
|
|
1669
|
+
* dominant script. An explicit `a:latin`/`a:ea`/`a:cs` authored on the run
|
|
1670
|
+
* itself still always wins; only the cascade default yields to the
|
|
1671
|
+
* script-specific override.
|
|
1672
|
+
*/
|
|
1673
|
+
fontFamilyIsCascadeDefault?: boolean;
|
|
1624
1674
|
/** Text language from `a:rPr/@lang`. */
|
|
1625
1675
|
language?: string;
|
|
1626
1676
|
/** Hyperlink mouse-over target from `a:hlinkMouseOver`. */
|
|
@@ -1973,6 +2023,18 @@ interface BulletInfo {
|
|
|
1973
2023
|
/** When true, `<a:buSzTx/>` was specified — inherit the bullet size from
|
|
1974
2024
|
* the run text font size. */
|
|
1975
2025
|
sizeInherit?: boolean;
|
|
2026
|
+
/**
|
|
2027
|
+
* True when this bullet resolution came from the paragraph's OWN `a:pPr`
|
|
2028
|
+
* rather than the shape's `a:lstStyle`, an inherited placeholder, or the
|
|
2029
|
+
* master's `a:defPPr` / `p:txStyles`. `resolveParagraphBulletInfo` walks
|
|
2030
|
+
* that cascade and returns the first match, so without this flag a
|
|
2031
|
+
* writer that re-emits every resolved `BulletInfo` in full pins an
|
|
2032
|
+
* inherited bullet (e.g. a master `buFont="Arial"` / `buChar="•"`) onto
|
|
2033
|
+
* every paragraph's own `a:pPr` the moment the slide is rewritten. The
|
|
2034
|
+
* save path only writes the bullet group when this is `true`, mirroring
|
|
2035
|
+
* how `paragraphProperties` gates every other per-paragraph field.
|
|
2036
|
+
*/
|
|
2037
|
+
ownedByParagraph?: boolean;
|
|
1976
2038
|
}
|
|
1977
2039
|
/**
|
|
1978
2040
|
* A single text run within a paragraph.
|
|
@@ -2015,6 +2077,23 @@ interface TextSegment {
|
|
|
2015
2077
|
fieldParagraphPropertiesXml?: XmlObject;
|
|
2016
2078
|
/** Raw OMML XML node for equation segments (from `a14:m` / `m:oMathPara`). */
|
|
2017
2079
|
equationXml?: Record<string, unknown>;
|
|
2080
|
+
/**
|
|
2081
|
+
* The ORIGINAL top-level paragraph child that carried this equation,
|
|
2082
|
+
* captured verbatim at parse time and keyed by its own tag: `{ 'a14:m':
|
|
2083
|
+
* ... }`, `{ 'm:oMathPara': ... }`, `{ 'm:oMath': ... }`, or `{
|
|
2084
|
+
* 'mc:AlternateContent': ... }` for an equation authored behind a
|
|
2085
|
+
* Choice/Fallback switch. `equationXml` above is the resolved math content
|
|
2086
|
+
* used for rendering (unwrapped one level for `a14:m`/`mc:AlternateContent`
|
|
2087
|
+
* sources); this field exists solely so the writer can re-emit an UNTOUCHED
|
|
2088
|
+
* equation byte-for-byte, Choice and Fallback both, instead of collapsing
|
|
2089
|
+
* it to a bare math element PowerPoint's own writer never produces.
|
|
2090
|
+
* `undefined` for a freshly inserted or edited equation, which the writer
|
|
2091
|
+
* instead reconstructs from `equationXml` (always `{ 'm:oMathPara': ... }`
|
|
2092
|
+
* or `{ 'm:oMath': ... }` for those cases). Any code that replaces
|
|
2093
|
+
* `equationXml` on an existing segment must drop this field, or the writer
|
|
2094
|
+
* would keep re-emitting the equation's OLD XML instead of the edit.
|
|
2095
|
+
*/
|
|
2096
|
+
equationSourceXml?: Record<string, unknown>;
|
|
2018
2097
|
/**
|
|
2019
2098
|
* Optional equation number for numbered equations (e.g. "(1)", "(2.3)").
|
|
2020
2099
|
* When present, the equation is rendered centered with the number right-aligned.
|
|
@@ -2299,6 +2378,24 @@ interface PptxShapeProperties {
|
|
|
2299
2378
|
*/
|
|
2300
2379
|
interface PlaceholderTextLevelStyle {
|
|
2301
2380
|
fontFamily?: string;
|
|
2381
|
+
/**
|
|
2382
|
+
* The RAW `a:defRPr/a:latin/@typeface` string (verbatim: a theme alias
|
|
2383
|
+
* such as `+mj-lt`/`+mn-lt`, or a literal face name) {@link fontFamily}
|
|
2384
|
+
* was resolved from. Master/layout text styles are parsed once and
|
|
2385
|
+
* cached, so `fontFamily` is a resolved-for-display snapshot; re-emitting
|
|
2386
|
+
* it as the literal name on every save (the master-level analogue of
|
|
2387
|
+
* `colorChoiceXml` below) flattens the theme alias the moment ANYTHING
|
|
2388
|
+
* about the deck is rewritten, even when this level was never touched.
|
|
2389
|
+
* Absent when the level declares no `a:latin`.
|
|
2390
|
+
*/
|
|
2391
|
+
fontTypefaceXml?: string;
|
|
2392
|
+
/**
|
|
2393
|
+
* Snapshot of {@link fontFamily} exactly as parsed, before any edit. The
|
|
2394
|
+
* save path diffs the live value against this: unchanged means re-emit
|
|
2395
|
+
* {@link fontTypefaceXml} verbatim (preserve the alias); different means
|
|
2396
|
+
* a genuine edit, so the new literal name is written instead.
|
|
2397
|
+
*/
|
|
2398
|
+
resolvedFontFamily?: string;
|
|
2302
2399
|
fontSize?: number;
|
|
2303
2400
|
bold?: boolean;
|
|
2304
2401
|
italic?: boolean;
|
|
@@ -2348,8 +2445,32 @@ interface PlaceholderTextLevelStyle {
|
|
|
2348
2445
|
tabStops?: TextStyle['tabStops'];
|
|
2349
2446
|
lineSpacing?: number;
|
|
2350
2447
|
lineSpacingExactPt?: number;
|
|
2448
|
+
/**
|
|
2449
|
+
* Space before the paragraph in px, resolved from EITHER `a:spcPts`
|
|
2450
|
+
* (absolute) or `a:spcPct` (a percentage of this level's own `a:defRPr`
|
|
2451
|
+
* font size) - the OOXML source is not distinguishable from this field
|
|
2452
|
+
* alone. See {@link spaceBeforePercent} / {@link resolvedSpaceBefore}.
|
|
2453
|
+
*/
|
|
2351
2454
|
spaceBefore?: number;
|
|
2352
2455
|
spaceAfter?: number;
|
|
2456
|
+
/**
|
|
2457
|
+
* Snapshot of {@link spaceBefore} / {@link spaceAfter} exactly as parsed.
|
|
2458
|
+
* Diffed the same way as {@link resolvedFontFamily}: unchanged means the
|
|
2459
|
+
* writer re-emits the ORIGINAL form (`a:spcPct` when
|
|
2460
|
+
* {@link spaceBeforePercent} / {@link spaceAfterPercent} is set); a value
|
|
2461
|
+
* that has since moved away from the snapshot is a genuine edit and is
|
|
2462
|
+
* always written as `a:spcPts`, since an editor works in absolute units.
|
|
2463
|
+
*/
|
|
2464
|
+
resolvedSpaceBefore?: number;
|
|
2465
|
+
resolvedSpaceAfter?: number;
|
|
2466
|
+
/**
|
|
2467
|
+
* The raw `a:spcPct` fraction (e.g. `0.2` for 20%) {@link spaceBefore} /
|
|
2468
|
+
* {@link spaceAfter} was resolved from, when the source used percentage
|
|
2469
|
+
* spacing rather than `a:spcPts`. Absent when the source used `a:spcPts`
|
|
2470
|
+
* (or authored no spacing at all).
|
|
2471
|
+
*/
|
|
2472
|
+
spaceBeforePercent?: number;
|
|
2473
|
+
spaceAfterPercent?: number;
|
|
2353
2474
|
/** Default tab interval in CSS pixels (`a:lvlXpPr/@defTabSz`). */
|
|
2354
2475
|
defaultTabSize?: number;
|
|
2355
2476
|
/** Whether East Asian line-breaking rules are enabled. */
|
|
@@ -5082,6 +5203,18 @@ interface PptxSmartArtLayoutDefinition {
|
|
|
5082
5203
|
rootNode: PptxSmartArtLayoutNode;
|
|
5083
5204
|
/** Original definition retained for constraint evaluation and foreign rules. */
|
|
5084
5205
|
rawXml?: XmlObject;
|
|
5206
|
+
/**
|
|
5207
|
+
* The un-parsed layout-definition part text (starting at `<dgm:layoutDef>`,
|
|
5208
|
+
* XML declaration included). `rawXml` above loses the document order of
|
|
5209
|
+
* differently-named siblings (the package-wide `fast-xml-parser`
|
|
5210
|
+
* configuration groups children into one array per tag), which the
|
|
5211
|
+
* per-point DiagramML engine (`core/utils/smartart-engine/`) needs to
|
|
5212
|
+
* execute a `layoutNode` body's `forEach`/`choose`/`constrLst` statements
|
|
5213
|
+
* in their real declared sequence - see that package's `ordered-xml.ts`.
|
|
5214
|
+
* `undefined` when the part could not be read (matches `rawXml`'s own
|
|
5215
|
+
* optionality); the engine falls back to the legacy interpreter then.
|
|
5216
|
+
*/
|
|
5217
|
+
rawXmlText?: string;
|
|
5085
5218
|
}
|
|
5086
5219
|
//#endregion
|
|
5087
5220
|
//#region src/core/types/smart-art-node.d.ts
|
|
@@ -6194,6 +6327,20 @@ interface PptxTableData {
|
|
|
6194
6327
|
* present when there is at least one effect.
|
|
6195
6328
|
*/
|
|
6196
6329
|
tableEffects?: ParsedTableStyleEffect[];
|
|
6330
|
+
/**
|
|
6331
|
+
* Table-cell-context default text size in points, resolved from the
|
|
6332
|
+
* slide's master `p:otherStyle` (ECMA-376 §19.3.1.42 CT_TextListStyle,
|
|
6333
|
+
* §19.3.1.52 for `p:txStyles`). PowerPoint sizes a table cell's text off
|
|
6334
|
+
* this master default (commonly 18pt) whenever neither the run nor the
|
|
6335
|
+
* (size-less) table style provides one; without it, cell text without an
|
|
6336
|
+
* explicit `a:rPr@sz` fell back to the browser's own default font size
|
|
6337
|
+
* (16px / 12pt) instead. A render-only hint: it is not part of any
|
|
6338
|
+
* individual cell's parsed style and is never written back on save, so
|
|
6339
|
+
* resaving an unstyled cell does not bake in an explicit size that was
|
|
6340
|
+
* never authored. `undefined` when no master/otherStyle size resolves
|
|
6341
|
+
* (renderers should leave the browser default in place in that case).
|
|
6342
|
+
*/
|
|
6343
|
+
defaultCellFontSize?: number;
|
|
6197
6344
|
}
|
|
6198
6345
|
/**
|
|
6199
6346
|
* A single fill reference within a table style section.
|
|
@@ -6219,6 +6366,14 @@ interface ParsedTableStyleFill {
|
|
|
6219
6366
|
tint?: number;
|
|
6220
6367
|
/** Shade value (0-100 000). */
|
|
6221
6368
|
shade?: number;
|
|
6369
|
+
/**
|
|
6370
|
+
* Alpha (opacity) value (0-100 000, where 100 000 is fully opaque) from an
|
|
6371
|
+
* `a:alpha` child of `a:schemeClr`/`a:srgbClr`. Several built-in table
|
|
6372
|
+
* styles (e.g. "Light Style 1/3", "Themed Style 1/2") band their rows with
|
|
6373
|
+
* a partially transparent tint of the theme colour rather than a tint/shade
|
|
6374
|
+
* blend.
|
|
6375
|
+
*/
|
|
6376
|
+
alpha?: number;
|
|
6222
6377
|
/** Explicit sRGB hex colour (e.g. `#FF8800`) from `a:srgbClr`. */
|
|
6223
6378
|
color?: string;
|
|
6224
6379
|
/** The fill was `a:noFill`: renders transparent and clears lower layers. */
|
|
@@ -7054,6 +7209,20 @@ interface ContentPartInkStroke {
|
|
|
7054
7209
|
* NAMES differ.
|
|
7055
7210
|
*/
|
|
7056
7211
|
tiltEncoding?: 'vector' | 'azimuthAltitude';
|
|
7212
|
+
/**
|
|
7213
|
+
* Per-point timestamps (milliseconds), decoded from the source InkML
|
|
7214
|
+
* trace's `T` channel when it declared one.
|
|
7215
|
+
*
|
|
7216
|
+
* Absent for the overwhelming majority of real decks: PowerPoint's own
|
|
7217
|
+
* SaveAs output declares only `X`/`Y` and has no per-point time channel at
|
|
7218
|
+
* all (see `contentpart-real-ink-roundtrip.test.ts`'s fixture), so this is
|
|
7219
|
+
* populated only for InkML sources that genuinely author one (a captured
|
|
7220
|
+
* digitizer session, OneNote, a Surface Hub export). When present, ink
|
|
7221
|
+
* replay ("watch the ink get drawn") uses each stroke's own first/last
|
|
7222
|
+
* timestamp to time its reveal instead of the fixed per-stroke cascade; see
|
|
7223
|
+
* `pptx-viewer-shared`'s `render/ink-replay-timeline.ts`.
|
|
7224
|
+
*/
|
|
7225
|
+
pointTimestamps?: number[];
|
|
7057
7226
|
}
|
|
7058
7227
|
/**
|
|
7059
7228
|
* A content-part element wrapped in `mc:AlternateContent`.
|
|
@@ -7098,6 +7267,28 @@ interface ZoomPptxElement extends PptxElementBase, PptxImageProperties {
|
|
|
7098
7267
|
summaryTargets?: SummaryZoomTarget[];
|
|
7099
7268
|
/** Layout mode authored on the Summary Zoom container. */
|
|
7100
7269
|
summaryLayout?: 'grid' | 'fixed';
|
|
7270
|
+
/**
|
|
7271
|
+
* `zmPr/@returnToParent` (MS-PPTX `CT_ZoomObjectProperties`, shared by all
|
|
7272
|
+
* three Zoom kinds): whether continuing forward from the destination slide
|
|
7273
|
+
* during a live show returns to this Zoom's origin slide instead of
|
|
7274
|
+
* advancing linearly through the deck. OOXML default is `true` when the
|
|
7275
|
+
* attribute is present but this codebase leaves it `undefined` when the
|
|
7276
|
+
* source XML omits it, so a round-trip never fabricates the attribute.
|
|
7277
|
+
* For `zoomType: 'summary'`, this mirrors the first tile's own value; see
|
|
7278
|
+
* {@link SummaryZoomTarget.returnToParent} for the per-tile value.
|
|
7279
|
+
*/
|
|
7280
|
+
returnToParent?: boolean;
|
|
7281
|
+
/**
|
|
7282
|
+
* `zmPr/@transitionDur` (MS-PPTX `CT_ZoomObjectProperties`): the
|
|
7283
|
+
* zoom-transition length in milliseconds. PowerPoint's own writer emits a
|
|
7284
|
+
* unitless decimal-millisecond value for every OOXML `ST_UniversalTimeOffset`
|
|
7285
|
+
* this codebase has observed (see the media-trim/-fade parsers), so this
|
|
7286
|
+
* follows the same convention rather than the full TIMEOFFSET grammar's
|
|
7287
|
+
* unit suffixes. Undefined uses the destination slide's own transition.
|
|
7288
|
+
* For `zoomType: 'summary'`, this mirrors the first tile's own value; see
|
|
7289
|
+
* {@link SummaryZoomTarget.transitionDurationMs} for the per-tile value.
|
|
7290
|
+
*/
|
|
7291
|
+
transitionDurationMs?: number;
|
|
7101
7292
|
}
|
|
7102
7293
|
/** A single section tile within a PowerPoint Summary Zoom container. */
|
|
7103
7294
|
interface SummaryZoomTarget extends PptxImageProperties {
|
|
@@ -7113,6 +7304,10 @@ interface SummaryZoomTarget extends PptxImageProperties {
|
|
|
7113
7304
|
offsetFactorY?: number;
|
|
7114
7305
|
scaleFactorX?: number;
|
|
7115
7306
|
scaleFactorY?: number;
|
|
7307
|
+
/** This tile's own `zmPr/@returnToParent`; see {@link ZoomPptxElement.returnToParent}. */
|
|
7308
|
+
returnToParent?: boolean;
|
|
7309
|
+
/** This tile's own `zmPr/@transitionDur` in milliseconds; see {@link ZoomPptxElement.transitionDurationMs}. */
|
|
7310
|
+
transitionDurationMs?: number;
|
|
7116
7311
|
rawXml?: XmlObject;
|
|
7117
7312
|
}
|
|
7118
7313
|
/**
|
|
@@ -8113,6 +8308,17 @@ interface PptxAttributeAnimation {
|
|
|
8113
8308
|
* IS consulted regardless of this field's value. Absent means `lin`.
|
|
8114
8309
|
*/
|
|
8115
8310
|
calcMode?: 'discrete' | 'lin' | 'fmla';
|
|
8311
|
+
/**
|
|
8312
|
+
* `p:anim/@_p14:bounceEnd` (Office 2010 `p14` extension attribute,
|
|
8313
|
+
* MS-OI29500), normalized to a 0-1 fraction of this behaviour's own
|
|
8314
|
+
* duration. PowerPoint's Fly In "Bounce End" effect option writes this on
|
|
8315
|
+
* the position-ramp `p:anim` node(s): the fraction of the duration at
|
|
8316
|
+
* which the primary travel completes, with the remainder spent bouncing
|
|
8317
|
+
* and settling at the final value. Mirrored verbatim by PowerPoint onto
|
|
8318
|
+
* the enclosing `p:cTn/@_p14:presetBounceEnd`. Absent for every animation
|
|
8319
|
+
* that doesn't use this effect option (the overwhelming majority).
|
|
8320
|
+
*/
|
|
8321
|
+
bounceEnd?: number;
|
|
8116
8322
|
}
|
|
8117
8323
|
/** Signed HSL channel deltas parsed from `p:animClr/p:by/p:hsl`. */
|
|
8118
8324
|
interface PptxHslColorDelta {
|
|
@@ -8194,7 +8400,19 @@ interface PptxTextAnimationTarget {
|
|
|
8194
8400
|
* These map directly to OOXML condition event attribute values
|
|
8195
8401
|
* (ISO/IEC 29500-1 S19.5.28 CT_TLTimeCondition).
|
|
8196
8402
|
*/
|
|
8197
|
-
type AnimationConditionEvent = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick' | 'onMouseOver' | 'onMouseOut' | 'onNext' | 'onPrev' | 'onStopAudio' | 'onDblClick';
|
|
8403
|
+
type AnimationConditionEvent = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick' | 'onMouseOver' | 'onMouseOut' | 'onNext' | 'onPrev' | 'onStopAudio' | 'onDblClick' | 'onMediaBookmark';
|
|
8404
|
+
/**
|
|
8405
|
+
* `p14:bmkTgt` (Office 2010 `p14` extension, MS-OI29500): names the specific
|
|
8406
|
+
* media element and bookmark an `evt="onMediaBookmark"` condition fires for.
|
|
8407
|
+
* `bookmarkName` matches a `p14:bmk/@_name` on that media element's own
|
|
8408
|
+
* `p14:bmkLst` (see `MediaBookmark.label` in `core/types/elements.ts`).
|
|
8409
|
+
*/
|
|
8410
|
+
interface PptxMediaBookmarkTarget {
|
|
8411
|
+
/** `p14:bmkTgt/@_spid`: the media element's shape id. */
|
|
8412
|
+
shapeId: string;
|
|
8413
|
+
/** `p14:bmkTgt/@_bmkName`: the bookmark's name. */
|
|
8414
|
+
bookmarkName: string;
|
|
8415
|
+
}
|
|
8198
8416
|
/**
|
|
8199
8417
|
* Structured representation of a single OOXML animation condition
|
|
8200
8418
|
* from `p:cond` elements inside `p:stCondLst` or `p:endCondLst`.
|
|
@@ -8214,6 +8432,11 @@ type AnimationConditionEvent = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick'
|
|
|
8214
8432
|
interface AnimationCondition {
|
|
8215
8433
|
/** Event that triggers the condition. */
|
|
8216
8434
|
event?: AnimationConditionEvent;
|
|
8435
|
+
/**
|
|
8436
|
+
* The media element/bookmark this condition fires for, when
|
|
8437
|
+
* {@link event} is `onMediaBookmark`. See {@link PptxMediaBookmarkTarget}.
|
|
8438
|
+
*/
|
|
8439
|
+
bookmarkTarget?: PptxMediaBookmarkTarget;
|
|
8217
8440
|
/** Delay in milliseconds (from `@_delay`). "indefinite" is represented as -1. */
|
|
8218
8441
|
delay?: number;
|
|
8219
8442
|
/** Target time node ID reference (from `@_tn`). */
|
|
@@ -9532,7 +9755,12 @@ interface PptxHeaderFooter {
|
|
|
9532
9755
|
hasDateTime?: boolean;
|
|
9533
9756
|
dateTimeText?: string;
|
|
9534
9757
|
dateTimeAuto?: boolean;
|
|
9535
|
-
/**
|
|
9758
|
+
/**
|
|
9759
|
+
* The master date placeholder's own `a:fld/@type` (e.g. "datetime2"), NOT a
|
|
9760
|
+
* format pattern. It is one of the predefined OOXML datetime field types
|
|
9761
|
+
* (`datetime1`-`datetime13`); the display pattern for each is resolved by
|
|
9762
|
+
* `resolveFieldDateText` in `packages/shared/src/render/text-field-substitution.ts`.
|
|
9763
|
+
*/
|
|
9536
9764
|
dateFormat?: string;
|
|
9537
9765
|
hasSlideNumber?: boolean;
|
|
9538
9766
|
}
|
|
@@ -12522,13 +12750,21 @@ interface InlineTextSelection {
|
|
|
12522
12750
|
* Pure string logic: resolves OOXML field runs (slide number, date/time,
|
|
12523
12751
|
* header/footer, document properties, slide title) into their display text.
|
|
12524
12752
|
* Extracted from the React `viewer/utils/text-field-substitution` module so
|
|
12525
|
-
* every binding substitutes identically.
|
|
12753
|
+
* every binding substitutes identically. The locale-aware datetime engine
|
|
12754
|
+
* lives in `text-field-datetime.ts`.
|
|
12526
12755
|
*/
|
|
12527
12756
|
/** Context for substituting field placeholders (slide number, date/time, header/footer, etc.). */
|
|
12528
12757
|
interface FieldSubstitutionContext {
|
|
12529
12758
|
slideNumber?: number;
|
|
12530
12759
|
dateTimeText?: string;
|
|
12531
|
-
/**
|
|
12760
|
+
/**
|
|
12761
|
+
* The deck's master date-field default TYPE (`a:fld/@type` on the slide
|
|
12762
|
+
* master's `dt` placeholder, e.g. "datetime2"; see `header-footer-parts.ts`).
|
|
12763
|
+
* This is a field TYPE, not a format pattern, and is used ONLY as a
|
|
12764
|
+
* fallback for a field authored with the generic, unnumbered `datetime`
|
|
12765
|
+
* type - a field that already names its own `datetime1`-`datetime13` type
|
|
12766
|
+
* always uses that type, never this one (see `substituteFieldText`).
|
|
12767
|
+
*/
|
|
12532
12768
|
dateFormat?: string;
|
|
12533
12769
|
/** Footer text from PptxHeaderFooter settings. */
|
|
12534
12770
|
footerText?: string;
|
|
@@ -13046,6 +13282,20 @@ interface InkStrokeView {
|
|
|
13046
13282
|
* existed.
|
|
13047
13283
|
*/
|
|
13048
13284
|
nibMarks: NibMark[] | null;
|
|
13285
|
+
/**
|
|
13286
|
+
* CSS `mix-blend-mode` this stroke should paint with: `'multiply'` for a
|
|
13287
|
+
* highlighter-style stroke, so overlapping highlighter strokes darken
|
|
13288
|
+
* where they cross (and a highlighter stroke darkens whatever slide
|
|
13289
|
+
* content sits underneath it) the way a real highlighter pen does, instead
|
|
13290
|
+
* of plain alpha compositing. `'normal'` for every other stroke. A binding
|
|
13291
|
+
* applies this as an inline `mix-blend-mode` style on the stroke's own
|
|
13292
|
+
* `<path>`/`<g>` (not on the element's outer `<svg>`): setting it on the
|
|
13293
|
+
* container instead would blend the whole element's already-composited
|
|
13294
|
+
* output against the backdrop as one unit, so strokes sharing that
|
|
13295
|
+
* container would still alpha-composite (not multiply) against each
|
|
13296
|
+
* other.
|
|
13297
|
+
*/
|
|
13298
|
+
blendMode: 'normal' | 'multiply';
|
|
13049
13299
|
}
|
|
13050
13300
|
//#endregion
|
|
13051
13301
|
//#region src/render/mobile-chrome.d.ts
|
|
@@ -15864,6 +16114,19 @@ interface EditorControllerDeps {
|
|
|
15864
16114
|
* shell-owned UI state, so the controller only signals the intent.
|
|
15865
16115
|
*/
|
|
15866
16116
|
toggleFind?(): void;
|
|
16117
|
+
/**
|
|
16118
|
+
* Open the find bar already switched to its Replace row (Ctrl/Cmd+H). The
|
|
16119
|
+
* panel has no distinct find-only/replace mode, so this is the same panel
|
|
16120
|
+
* `toggleFind` opens; kept as its own hook only so a host can tell the two
|
|
16121
|
+
* chords apart if it ever grows one.
|
|
16122
|
+
*/
|
|
16123
|
+
toggleFindReplace?(): void;
|
|
16124
|
+
/**
|
|
16125
|
+
* Insert a new slide after the active one (Ctrl+M). Optional because the
|
|
16126
|
+
* deck-level API this calls is constructed after the controller (see
|
|
16127
|
+
* `create-viewer-state.svelte.ts`), so a host wires it in once it exists.
|
|
16128
|
+
*/
|
|
16129
|
+
newSlide?(): void;
|
|
15867
16130
|
}
|
|
15868
16131
|
|
|
15869
16132
|
interface EditorMarqueeRect extends MarqueeRect {
|
|
@@ -15904,6 +16167,13 @@ declare class EditorController {
|
|
|
15904
16167
|
snapLines: readonly SnapLine[];
|
|
15905
16168
|
editingId: string | null;
|
|
15906
16169
|
marquee: EditorMarqueeRect | null;
|
|
16170
|
+
/**
|
|
16171
|
+
* The hyperlink dialog, opened by Ctrl+K or the Insert-tab/context-menu
|
|
16172
|
+
* buttons. Lives here (not on the always-mounted `ViewerStage`) so the
|
|
16173
|
+
* keyboard shortcut has one flag to flip regardless of which of those two
|
|
16174
|
+
* pre-existing triggers a host renders.
|
|
16175
|
+
*/
|
|
16176
|
+
hyperlinkOpen: boolean;
|
|
15907
16177
|
constructor(editor: EditorState, deps: EditorControllerDeps);
|
|
15908
16178
|
/** The elements the pointer acts on (slide, or master/layout), for overlays. */
|
|
15909
16179
|
get activeElements(): PptxElement[];
|
|
@@ -15950,6 +16220,23 @@ declare class EditorController {
|
|
|
15950
16220
|
patcher: CollaborationLivePatcher;
|
|
15951
16221
|
slideId: string;
|
|
15952
16222
|
} | undefined;
|
|
16223
|
+
/** Open the hyperlink dialog for the current selection (Ctrl+K). */
|
|
16224
|
+
openHyperlink(): void;
|
|
16225
|
+
/**
|
|
16226
|
+
* Apply an element patch built by a formatting shortcut, mid-edit or not.
|
|
16227
|
+
* `InlineTextEditor` has no access to `EditorState`, only to this
|
|
16228
|
+
* controller and the element it is editing, so this is its way to reach
|
|
16229
|
+
* the same `patchSelected` the root keyboard handler and the ribbon use.
|
|
16230
|
+
*/
|
|
16231
|
+
patchSelected(patch: Partial<PptxElement> | ((element: PptxElement) => Partial<PptxElement>)): void;
|
|
16232
|
+
/** Arm the format painter from the current selection (Ctrl+Shift+C). */
|
|
16233
|
+
copyFormat(): void;
|
|
16234
|
+
/** Apply the copied format to the current selection (Ctrl+Shift+V). */
|
|
16235
|
+
pasteFormat(): void;
|
|
16236
|
+
/** Open the find bar (Ctrl+F), including mid-edit; see `EditorControllerDeps`. */
|
|
16237
|
+
toggleFind(): void;
|
|
16238
|
+
/** Open the find bar's replace row (Ctrl+H), including mid-edit. */
|
|
16239
|
+
toggleFindReplace(): void;
|
|
15953
16240
|
/** Commit the inline editor's text onto the element and close it. */
|
|
15954
16241
|
commitInline(id: string, text: string, snapshot?: InlineTextEditSnapshot): void;
|
|
15955
16242
|
/** Register a live reader with this viewer's document and editing session. */
|
package/dist/viewer/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as e, I as a, M as o, N as r, P as s, c as n, d, f as b, i as m, j as t, l as p, m as c, n as g, o as x, p as
|
|
3
|
-
var y = a, A = s, V = o, f = t, u = e,
|
|
1
|
+
import { Bh as l, zh as S } from "../transition-overlay-BmUNA9xJ.js";
|
|
2
|
+
import { A as e, I as a, M as o, N as r, P as s, c as n, d, f as b, i as m, j as t, l as p, m as c, n as g, o as x, p as w, r as C, s as P, t as T, u as $ } from "../export-CVIAWQ_T.js";
|
|
3
|
+
var y = a, A = s, V = o, f = t, u = e, B = r;
|
|
4
4
|
export {
|
|
5
5
|
f as CollaborationCursors,
|
|
6
|
-
|
|
6
|
+
B as EditorLayer,
|
|
7
7
|
T as PowerPointViewer,
|
|
8
8
|
m as PresentationLoader,
|
|
9
9
|
u as RemoteSelectionOverlay,
|
|
10
10
|
y as Ribbon,
|
|
11
11
|
V as SlideCanvas,
|
|
12
|
-
|
|
12
|
+
C as ViewerState,
|
|
13
13
|
A as ViewerToolbar,
|
|
14
14
|
d as clampSlideIndex,
|
|
15
15
|
c as createSvelteAiBridge,
|
|
16
16
|
g as createViewerState,
|
|
17
17
|
x as exportAllSlidesToSvg,
|
|
18
|
-
|
|
18
|
+
P as exportAllSlidesToSvgBlobs,
|
|
19
19
|
n as exportSlideAsSvg,
|
|
20
20
|
p as exportSlideToSvg,
|
|
21
21
|
$ as exportSlideToSvgBlob,
|
|
22
22
|
b as fitScale,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
w as resolveNavigationKey,
|
|
24
|
+
S as zoomInPercent,
|
|
25
|
+
l as zoomOutPercent
|
|
26
26
|
};
|
package/package.json
CHANGED