pptx-svelte-viewer 4.1.6 → 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 +38 -0
- package/dist/{AiChatPanel-C4TquPtV.js → AiChatPanel-6uxswiBd.js} +6 -6
- package/dist/{export-CKRGg8D0.js → export-CVIAWQ_T.js} +13054 -13068
- 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 +278 -3
- package/dist/index.js +38 -38
- package/dist/internals.d.ts +230 -2
- package/dist/internals.js +21 -21
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/{transition-overlay-DIPxa90i.js → transition-overlay-BmUNA9xJ.js} +60119 -51929
- package/dist/{translator-D7duxy6A.js → translator-BZ6HUBWJ.js} +2 -2
- package/dist/viewer/index.d.ts +357 -23
- package/dist/viewer/index.js +6 -6
- package/package.json +1 -1
- package/dist/canvas_emf-converter-CKs-EBwD.js +0 -5
- package/dist/smartart-3d-D1MLYTBe.js +0 -290
|
@@ -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
|
|
@@ -5320,7 +5453,6 @@ interface PptxSmartArtNode {
|
|
|
5320
5453
|
}
|
|
5321
5454
|
//#endregion
|
|
5322
5455
|
//#region src/core/types/smart-art-style-definition.d.ts
|
|
5323
|
-
/** Editable metadata shared by DiagramML quick-style and color definitions. */
|
|
5324
5456
|
interface PptxSmartArtDefinitionText {
|
|
5325
5457
|
value: string;
|
|
5326
5458
|
language?: string;
|
|
@@ -5420,6 +5552,17 @@ interface PptxSmartArtQuickStyle extends PptxSmartArtDefinitionMetadata {
|
|
|
5420
5552
|
effectIntensity?: string;
|
|
5421
5553
|
/** Ordered CT_StyleLabel metadata. Complex style payload remains preserved XML. */
|
|
5422
5554
|
labels?: PptxSmartArtQuickStyleLabel[];
|
|
5555
|
+
/**
|
|
5556
|
+
* Whole-diagram 3D scene (camera preset/rotation/zoom/fov, light rig,
|
|
5557
|
+
* backdrop) from the quick style's own `dgm:styleDef/dgm:scene3d`, present
|
|
5558
|
+
* for the "Scene" quick styles (Brick, Flat, Metallic, Sunset, Bird's Eye
|
|
5559
|
+
* Scene). One camera renders the whole diagram; per-shape `a:scene3d` is
|
|
5560
|
+
* absent for those styles (see `PptxSmartArtDrawingShape.scene3d`). Each
|
|
5561
|
+
* `dgm:styleLbl` also carries its own per-label `dgm:scene3d`/`dgm:sp3d`,
|
|
5562
|
+
* but PowerPoint bakes those fully resolved onto each cached shape's own
|
|
5563
|
+
* `dsp:spPr/a:sp3d`, so only the diagram-level scene is exposed here.
|
|
5564
|
+
*/
|
|
5565
|
+
scene3d?: Pptx3DScene;
|
|
5423
5566
|
}
|
|
5424
5567
|
//#endregion
|
|
5425
5568
|
//#region src/core/types/smart-art.d.ts
|
|
@@ -5620,6 +5763,29 @@ interface PptxSmartArtDrawingShape extends PptxCustomPathProperties {
|
|
|
5620
5763
|
textFrameY?: number;
|
|
5621
5764
|
textFrameWidth?: number;
|
|
5622
5765
|
textFrameHeight?: number;
|
|
5766
|
+
/**
|
|
5767
|
+
* 3D scene (camera/light rig/backdrop) from `dsp:spPr/a:scene3d`, when this
|
|
5768
|
+
* cached shape carries its own per-shape camera. Bevel quick styles
|
|
5769
|
+
* (Polished, Inset, Cartoon, Powder) cache one per shape (always
|
|
5770
|
+
* `orthographicFront`, so the 2D layout stays undistorted). Scene quick
|
|
5771
|
+
* styles (Brick, Flat, Metallic, Sunset, Bird's Eye) instead put ONE camera
|
|
5772
|
+
* on the whole diagram (see `PptxSmartArtQuickStyle.scene3d`) and leave this
|
|
5773
|
+
* undefined on every shape.
|
|
5774
|
+
*/
|
|
5775
|
+
scene3d?: Pptx3DScene;
|
|
5776
|
+
/**
|
|
5777
|
+
* 3D extrusion/bevel/contour/material from `dsp:spPr/a:sp3d`. PowerPoint
|
|
5778
|
+
* caches this fully resolved (from the quick style's per-label `dgm:sp3d`)
|
|
5779
|
+
* on every shape for every non-flat quick style, bevel or scene alike.
|
|
5780
|
+
*/
|
|
5781
|
+
shape3d?: Pptx3DShape;
|
|
5782
|
+
/**
|
|
5783
|
+
* Text-body 3D extrusion/bevel from `dsp:txBody/a:bodyPr/a:sp3d`. Rare:
|
|
5784
|
+
* present when a quick style extrudes the label text itself off the shape
|
|
5785
|
+
* face (e.g. Bird's Eye Scene: `extrusionH="28000"`), rather than only the
|
|
5786
|
+
* shape body.
|
|
5787
|
+
*/
|
|
5788
|
+
text3d?: Text3DStyle;
|
|
5623
5789
|
}
|
|
5624
5790
|
/**
|
|
5625
5791
|
* Presentation layout variables from `dgm:prSet/dgm:presLayoutVars` (data model)
|
|
@@ -6161,6 +6327,20 @@ interface PptxTableData {
|
|
|
6161
6327
|
* present when there is at least one effect.
|
|
6162
6328
|
*/
|
|
6163
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;
|
|
6164
6344
|
}
|
|
6165
6345
|
/**
|
|
6166
6346
|
* A single fill reference within a table style section.
|
|
@@ -6186,6 +6366,14 @@ interface ParsedTableStyleFill {
|
|
|
6186
6366
|
tint?: number;
|
|
6187
6367
|
/** Shade value (0-100 000). */
|
|
6188
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;
|
|
6189
6377
|
/** Explicit sRGB hex colour (e.g. `#FF8800`) from `a:srgbClr`. */
|
|
6190
6378
|
color?: string;
|
|
6191
6379
|
/** The fill was `a:noFill`: renders transparent and clears lower layers. */
|
|
@@ -7021,6 +7209,20 @@ interface ContentPartInkStroke {
|
|
|
7021
7209
|
* NAMES differ.
|
|
7022
7210
|
*/
|
|
7023
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[];
|
|
7024
7226
|
}
|
|
7025
7227
|
/**
|
|
7026
7228
|
* A content-part element wrapped in `mc:AlternateContent`.
|
|
@@ -7065,6 +7267,28 @@ interface ZoomPptxElement extends PptxElementBase, PptxImageProperties {
|
|
|
7065
7267
|
summaryTargets?: SummaryZoomTarget[];
|
|
7066
7268
|
/** Layout mode authored on the Summary Zoom container. */
|
|
7067
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;
|
|
7068
7292
|
}
|
|
7069
7293
|
/** A single section tile within a PowerPoint Summary Zoom container. */
|
|
7070
7294
|
interface SummaryZoomTarget extends PptxImageProperties {
|
|
@@ -7080,6 +7304,10 @@ interface SummaryZoomTarget extends PptxImageProperties {
|
|
|
7080
7304
|
offsetFactorY?: number;
|
|
7081
7305
|
scaleFactorX?: number;
|
|
7082
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;
|
|
7083
7311
|
rawXml?: XmlObject;
|
|
7084
7312
|
}
|
|
7085
7313
|
/**
|
|
@@ -8080,6 +8308,17 @@ interface PptxAttributeAnimation {
|
|
|
8080
8308
|
* IS consulted regardless of this field's value. Absent means `lin`.
|
|
8081
8309
|
*/
|
|
8082
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;
|
|
8083
8322
|
}
|
|
8084
8323
|
/** Signed HSL channel deltas parsed from `p:animClr/p:by/p:hsl`. */
|
|
8085
8324
|
interface PptxHslColorDelta {
|
|
@@ -8161,7 +8400,19 @@ interface PptxTextAnimationTarget {
|
|
|
8161
8400
|
* These map directly to OOXML condition event attribute values
|
|
8162
8401
|
* (ISO/IEC 29500-1 S19.5.28 CT_TLTimeCondition).
|
|
8163
8402
|
*/
|
|
8164
|
-
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
|
+
}
|
|
8165
8416
|
/**
|
|
8166
8417
|
* Structured representation of a single OOXML animation condition
|
|
8167
8418
|
* from `p:cond` elements inside `p:stCondLst` or `p:endCondLst`.
|
|
@@ -8181,6 +8432,11 @@ type AnimationConditionEvent = 'onBegin' | 'onEnd' | 'begin' | 'end' | 'onClick'
|
|
|
8181
8432
|
interface AnimationCondition {
|
|
8182
8433
|
/** Event that triggers the condition. */
|
|
8183
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;
|
|
8184
8440
|
/** Delay in milliseconds (from `@_delay`). "indefinite" is represented as -1. */
|
|
8185
8441
|
delay?: number;
|
|
8186
8442
|
/** Target time node ID reference (from `@_tn`). */
|
|
@@ -9499,7 +9755,12 @@ interface PptxHeaderFooter {
|
|
|
9499
9755
|
hasDateTime?: boolean;
|
|
9500
9756
|
dateTimeText?: string;
|
|
9501
9757
|
dateTimeAuto?: boolean;
|
|
9502
|
-
/**
|
|
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
|
+
*/
|
|
9503
9764
|
dateFormat?: string;
|
|
9504
9765
|
hasSlideNumber?: boolean;
|
|
9505
9766
|
}
|
|
@@ -11576,23 +11837,6 @@ interface ThemeCatalogEntry {
|
|
|
11576
11837
|
theme: ViewerTheme | undefined;
|
|
11577
11838
|
}
|
|
11578
11839
|
|
|
11579
|
-
//#region src/render/animation-text-style-resolve.d.ts
|
|
11580
|
-
/**
|
|
11581
|
-
* Framework-neutral text-style override a font-style emphasis effect applies
|
|
11582
|
-
* on top of its target's own authored per-run bold/italic/underline/size/
|
|
11583
|
-
* colour. Every binding maps this onto its own text container so it OVERRIDES
|
|
11584
|
-
* the runs' inline styles (the runs carry explicit inline styles of their
|
|
11585
|
-
* own, so plain CSS inheritance cannot reach them).
|
|
11586
|
-
*/
|
|
11587
|
-
interface TextStyleAnimationDescriptor {
|
|
11588
|
-
bold?: boolean;
|
|
11589
|
-
italic?: boolean;
|
|
11590
|
-
underline?: boolean;
|
|
11591
|
-
/** Relative multiplier against each run's own authored font size. */
|
|
11592
|
-
fontScale?: number;
|
|
11593
|
-
color?: string;
|
|
11594
|
-
}
|
|
11595
|
-
|
|
11596
11840
|
//#region src/render/collaboration-presence.d.ts
|
|
11597
11841
|
/** Connection lifecycle states for the Yjs WebSocket provider. */
|
|
11598
11842
|
type ConnectionStatus = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
@@ -12032,6 +12276,23 @@ type ElementBuildState = {
|
|
|
12032
12276
|
mode: DiagramBuildMode;
|
|
12033
12277
|
progress: number;
|
|
12034
12278
|
};
|
|
12279
|
+
//#endregion
|
|
12280
|
+
//#region src/render/animation-text-style-resolve.d.ts
|
|
12281
|
+
/**
|
|
12282
|
+
* Framework-neutral text-style override a font-style emphasis effect applies
|
|
12283
|
+
* on top of its target's own authored per-run bold/italic/underline/size/
|
|
12284
|
+
* colour. Every binding maps this onto its own text container so it OVERRIDES
|
|
12285
|
+
* the runs' inline styles (the runs carry explicit inline styles of their
|
|
12286
|
+
* own, so plain CSS inheritance cannot reach them).
|
|
12287
|
+
*/
|
|
12288
|
+
interface TextStyleAnimationDescriptor {
|
|
12289
|
+
bold?: boolean;
|
|
12290
|
+
italic?: boolean;
|
|
12291
|
+
underline?: boolean;
|
|
12292
|
+
/** Relative multiplier against each run's own authored font size. */
|
|
12293
|
+
fontScale?: number;
|
|
12294
|
+
color?: string;
|
|
12295
|
+
}
|
|
12035
12296
|
/** Snapshot of a single element's animation state at a point in the timeline. */
|
|
12036
12297
|
interface ElementAnimationState {
|
|
12037
12298
|
/** Whether the element should be visible. */
|
|
@@ -12489,13 +12750,21 @@ interface InlineTextSelection {
|
|
|
12489
12750
|
* Pure string logic: resolves OOXML field runs (slide number, date/time,
|
|
12490
12751
|
* header/footer, document properties, slide title) into their display text.
|
|
12491
12752
|
* Extracted from the React `viewer/utils/text-field-substitution` module so
|
|
12492
|
-
* every binding substitutes identically.
|
|
12753
|
+
* every binding substitutes identically. The locale-aware datetime engine
|
|
12754
|
+
* lives in `text-field-datetime.ts`.
|
|
12493
12755
|
*/
|
|
12494
12756
|
/** Context for substituting field placeholders (slide number, date/time, header/footer, etc.). */
|
|
12495
12757
|
interface FieldSubstitutionContext {
|
|
12496
12758
|
slideNumber?: number;
|
|
12497
12759
|
dateTimeText?: string;
|
|
12498
|
-
/**
|
|
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
|
+
*/
|
|
12499
12768
|
dateFormat?: string;
|
|
12500
12769
|
/** Footer text from PptxHeaderFooter settings. */
|
|
12501
12770
|
footerText?: string;
|
|
@@ -13013,6 +13282,20 @@ interface InkStrokeView {
|
|
|
13013
13282
|
* existed.
|
|
13014
13283
|
*/
|
|
13015
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';
|
|
13016
13299
|
}
|
|
13017
13300
|
//#endregion
|
|
13018
13301
|
//#region src/render/mobile-chrome.d.ts
|
|
@@ -13684,6 +13967,20 @@ interface RasterizeElementTilesResult {
|
|
|
13684
13967
|
/** Every tile, row-major order. Exactly one entry when `tiled` is `false`. */
|
|
13685
13968
|
tiles: RasterizedTile[];
|
|
13686
13969
|
}
|
|
13970
|
+
//#endregion
|
|
13971
|
+
//#region src/web-components/select-value.d.ts
|
|
13972
|
+
/** Public DOM shape used by all bindings; the element is not a native select. */
|
|
13973
|
+
interface PptxUiSelectElement extends HTMLElement {
|
|
13974
|
+
value: string;
|
|
13975
|
+
disabled: boolean;
|
|
13976
|
+
readonly options: HTMLOptionElement[];
|
|
13977
|
+
selectedIndex: number;
|
|
13978
|
+
}
|
|
13979
|
+
declare global {
|
|
13980
|
+
interface HTMLElementTagNameMap {
|
|
13981
|
+
'pptx-ui-select': PptxUiSelectElement;
|
|
13982
|
+
}
|
|
13983
|
+
}
|
|
13687
13984
|
|
|
13688
13985
|
//#endregion
|
|
13689
13986
|
//#region src/ai/change-diff.d.ts
|
|
@@ -15817,6 +16114,19 @@ interface EditorControllerDeps {
|
|
|
15817
16114
|
* shell-owned UI state, so the controller only signals the intent.
|
|
15818
16115
|
*/
|
|
15819
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;
|
|
15820
16130
|
}
|
|
15821
16131
|
|
|
15822
16132
|
interface EditorMarqueeRect extends MarqueeRect {
|
|
@@ -15857,6 +16167,13 @@ declare class EditorController {
|
|
|
15857
16167
|
snapLines: readonly SnapLine[];
|
|
15858
16168
|
editingId: string | null;
|
|
15859
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;
|
|
15860
16177
|
constructor(editor: EditorState, deps: EditorControllerDeps);
|
|
15861
16178
|
/** The elements the pointer acts on (slide, or master/layout), for overlays. */
|
|
15862
16179
|
get activeElements(): PptxElement[];
|
|
@@ -15903,6 +16220,23 @@ declare class EditorController {
|
|
|
15903
16220
|
patcher: CollaborationLivePatcher;
|
|
15904
16221
|
slideId: string;
|
|
15905
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;
|
|
15906
16240
|
/** Commit the inline editor's text onto the element and close it. */
|
|
15907
16241
|
commitInline(id: string, text: string, snapshot?: InlineTextEditSnapshot): void;
|
|
15908
16242
|
/** Register a live reader with this viewer's document and editing session. */
|
|
@@ -17564,7 +17898,7 @@ interface ViewerStateBag {
|
|
|
17564
17898
|
* MUST be called synchronously from a `.svelte` component's own script body
|
|
17565
17899
|
* (top level, not inside a callback or after an `await`): it registers
|
|
17566
17900
|
* `onMount` / `onDestroy` hooks and Svelte context (`setContext`) via
|
|
17567
|
-
* `provideTranslator` / `
|
|
17901
|
+
* `provideTranslator` / `provideRendering3DFlags` / `provideRenderContext` /
|
|
17568
17902
|
* `provideInspectorDeck` / `provideFieldContext` (plus more inside the
|
|
17569
17903
|
* clusters), all of which require an active component-initialisation
|
|
17570
17904
|
* context. Svelte's lifecycle context stays active for the whole synchronous
|
package/dist/viewer/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as e,
|
|
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,
|
|
@@ -21,6 +21,6 @@ export {
|
|
|
21
21
|
$ as exportSlideToSvgBlob,
|
|
22
22
|
b as fitScale,
|
|
23
23
|
w as resolveNavigationKey,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
S as zoomInPercent,
|
|
25
|
+
l as zoomOutPercent
|
|
26
26
|
};
|
package/package.json
CHANGED