ooxml-core 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PptxHandler-3A7VEXVK.cjs +13 -0
- package/dist/PptxHandler-7POULDRL.mjs +4 -0
- package/dist/{PptxHandler-KNBFECUE.mjs → PptxHandler-M35YFCUC.mjs} +2 -2
- package/dist/PresentationBuilder-C7NPM7OQ.mjs +4 -0
- package/dist/{PresentationBuilder-II7C4A3R.cjs → PresentationBuilder-XVRTITYR.cjs} +6 -5
- package/dist/{PresentationBuilder-5DCCFHWJ.mjs → PresentationBuilder-Y6DJK6H2.mjs} +2 -2
- package/dist/automation/index.cjs +1198 -1095
- package/dist/automation/index.mjs +1198 -1095
- package/dist/chunk-5W2QL4SB.cjs +244 -0
- package/dist/{chunk-TQE7FFNT.cjs → chunk-AHRFBMLK.cjs} +4070 -2015
- package/dist/{chunk-2D4IFQ5M.mjs → chunk-B37EVUMG.mjs} +1 -1
- package/dist/{chunk-4WZLFUUA.mjs → chunk-C2Y6SZDN.mjs} +934 -200
- package/dist/chunk-CA7KCNL3.mjs +236 -0
- package/dist/{chunk-BSUIDT6K.cjs → chunk-DWRJ62KP.cjs} +1 -0
- package/dist/{chunk-TNNXOW2O.mjs → chunk-KOX5Y5E5.mjs} +1 -1
- package/dist/{chunk-54ASP65T.mjs → chunk-LM6VBPQJ.mjs} +416 -15
- package/dist/{chunk-PC4MTLG4.cjs → chunk-OA5V3JJC.cjs} +8 -8
- package/dist/{chunk-ORH32TO3.mjs → chunk-OKGQ2X7D.mjs} +3092 -1037
- package/dist/{chunk-X7MGZQ6C.cjs → chunk-UGWY72WC.cjs} +396 -254
- package/dist/{chunk-XGXIS4PN.mjs → chunk-WBCV52YV.mjs} +3077 -1027
- package/dist/{chunk-2EBMHIGJ.mjs → chunk-WEFFRYXN.mjs} +379 -242
- package/dist/{chunk-AXF2FC4D.mjs → chunk-WSRCLCMB.mjs} +1 -0
- package/dist/{chunk-LMMP67YN.mjs → chunk-XCJRUBGJ.mjs} +1 -1
- package/dist/geometry/index.cjs +259 -0
- package/dist/geometry/index.d.ts +1 -0
- package/dist/geometry/index.d.ts.map +1 -1
- package/dist/geometry/index.mjs +255 -1
- package/dist/geometry/shape-gallery-catalog.d.ts +32 -0
- package/dist/geometry/shape-gallery-catalog.d.ts.map +1 -0
- package/dist/index.cjs +371 -112
- package/dist/index.mjs +371 -112
- package/dist/pptx/automation/index.cjs +4523 -1957
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{elements-tK7xnWeS.d.ts → elements-iUzpAeqR.d.ts} +232 -2
- package/dist/pptx/chunks/elements-iUzpAeqR.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-DS9Y4Ne3.d.ts → index-BWHNCVNC.d.ts} +1673 -1534
- package/dist/pptx/chunks/index-BWHNCVNC.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-BSpNQuvz.d.ts → index-CiyTR6mm.d.ts} +201 -5
- package/dist/pptx/chunks/index-CiyTR6mm.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-BdD_UQ11.d.ts → text-operations-CfLVZ7DK.d.ts} +81 -3
- package/dist/pptx/chunks/text-operations-CfLVZ7DK.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +4465 -1899
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +52 -1
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +4 -4
- package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-reconcile.cjs +7 -7
- package/dist/pptx/editor/render/collaboration-reconcile.mjs +2 -2
- package/dist/pptx/editor/render/collaboration-sync.cjs +14 -14
- package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
- package/dist/pptx/editor/render/collaboration-sync.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -14
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +2 -1
- package/dist/pptx/editor/render/slide-operations.cjs +9 -8
- package/dist/pptx/editor/render/slide-operations.mjs +3 -2
- package/dist/pptx/editor/render/slide-size-rescale.cjs +3 -3
- package/dist/pptx/editor/render/slide-size-rescale.d.ts +1 -1
- package/dist/pptx/editor/render/slide-size-rescale.d.ts.map +1 -1
- package/dist/pptx/editor/render/slide-size-rescale.mjs +3 -3
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
- package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
- package/dist/pptx/index.cjs +5656 -2290
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +5 -5
- package/dist/teams/ics.d.ts.map +1 -1
- package/dist/teams/index.cjs +631 -635
- package/dist/teams/index.d.ts +1 -0
- package/dist/teams/index.d.ts.map +1 -1
- package/dist/teams/index.mjs +616 -636
- package/dist/teams/meetings.d.ts +11 -1
- package/dist/teams/meetings.d.ts.map +1 -1
- package/dist/teams/recurrence-calendar.d.ts +41 -0
- package/dist/teams/recurrence-calendar.d.ts.map +1 -0
- package/dist/teams/recurrence.d.ts +1 -1
- package/dist/teams/recurrence.d.ts.map +1 -1
- package/dist/teams/server-session.d.ts +19 -0
- package/dist/teams/server-session.d.ts.map +1 -1
- package/dist/xlsx/edit/pivots.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +1137 -1027
- package/dist/xlsx/index.mjs +1136 -1028
- package/dist/xlsx/load/index.cjs +593 -652
- package/dist/xlsx/load/index.mjs +593 -652
- package/dist/xlsx/model-pivots.d.ts +64 -4
- package/dist/xlsx/model-pivots.d.ts.map +1 -1
- package/dist/xlsx/pivot/aggregate.d.ts +6 -3
- package/dist/xlsx/pivot/aggregate.d.ts.map +1 -1
- package/dist/xlsx/pivot/axes.d.ts +5 -0
- package/dist/xlsx/pivot/axes.d.ts.map +1 -1
- package/dist/xlsx/pivot/captions-locales.d.ts +3 -0
- package/dist/xlsx/pivot/captions-locales.d.ts.map +1 -0
- package/dist/xlsx/pivot/captions-read.d.ts +14 -0
- package/dist/xlsx/pivot/captions-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/captions.d.ts +26 -0
- package/dist/xlsx/pivot/captions.d.ts.map +1 -0
- package/dist/xlsx/pivot/columns.d.ts +9 -3
- package/dist/xlsx/pivot/columns.d.ts.map +1 -1
- package/dist/xlsx/pivot/data.d.ts +3 -2
- package/dist/xlsx/pivot/data.d.ts.map +1 -1
- package/dist/xlsx/pivot/date-axes.d.ts +1 -1
- package/dist/xlsx/pivot/date-axes.d.ts.map +1 -1
- package/dist/xlsx/pivot/date-group-read.d.ts.map +1 -1
- package/dist/xlsx/pivot/date-groups.d.ts +8 -3
- package/dist/xlsx/pivot/date-groups.d.ts.map +1 -1
- package/dist/xlsx/pivot/index.d.ts +2 -1
- package/dist/xlsx/pivot/index.d.ts.map +1 -1
- package/dist/xlsx/pivot/item-labels.d.ts +12 -0
- package/dist/xlsx/pivot/item-labels.d.ts.map +1 -0
- package/dist/xlsx/pivot/item-names-read.d.ts +8 -0
- package/dist/xlsx/pivot/item-names-read.d.ts.map +1 -0
- package/dist/xlsx/pivot/measures.d.ts +2 -8
- package/dist/xlsx/pivot/measures.d.ts.map +1 -1
- package/dist/xlsx/pivot/nested.d.ts +4 -2
- package/dist/xlsx/pivot/nested.d.ts.map +1 -1
- package/dist/xlsx/pivot/page-filter-admission.d.ts.map +1 -1
- package/dist/xlsx/pivot/page-filter.d.ts +1 -1
- package/dist/xlsx/pivot/page-filter.d.ts.map +1 -1
- package/dist/xlsx/pivot/read.d.ts.map +1 -1
- package/dist/xlsx/pivot/subtotals.d.ts +6 -1
- package/dist/xlsx/pivot/subtotals.d.ts.map +1 -1
- package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
- package/dist/xlsx/pivot/values-axis.d.ts +7 -4
- package/dist/xlsx/pivot/values-axis.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +1002 -1136
- package/dist/xlsx/ui/index.mjs +1002 -1136
- package/package.json +1 -1
- package/dist/PptxHandler-5YP75BPO.cjs +0 -12
- package/dist/PptxHandler-GT5Q66TG.mjs +0 -3
- package/dist/PresentationBuilder-CVM6LJ7L.mjs +0 -3
- package/dist/pptx/chunks/elements-tK7xnWeS.d.ts.map +0 -1
- package/dist/pptx/chunks/index-BSpNQuvz.d.ts.map +0 -1
- package/dist/pptx/chunks/index-DS9Y4Ne3.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-BdD_UQ11.d.ts.map +0 -1
- package/dist/xlsx/pivot/hierarchy-first.d.ts +0 -21
- package/dist/xlsx/pivot/hierarchy-first.d.ts.map +0 -1
- package/dist/xlsx/pivot/hierarchy.d.ts +0 -8
- package/dist/xlsx/pivot/hierarchy.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { D as StrokeDashType, S as ConnectorArrowType, T as PptxShapeLocks, i as TextStyle, k as XmlObject, r as TextSegment, t as BulletInfo } from "./text-D49FKllA.js";
|
|
2
2
|
import { t as PptxThemeColorRef } from "./color-ref-DT599vEx.js";
|
|
3
|
-
import { $ as ParsedTableStyleFill, $
|
|
3
|
+
import { $ as ParsedTableStyleFill, $n as PptxImageEffects, $t as PptxChartSeries, Bt as PptxChartGradientFill, C as SmartArtPptxElement, Dt as PptxChartDataLabel, Et as PptxChartData, F as PlaceholderTextLevelStyle, H as PptxAction, Jt as PptxChartMarkerSymbol, Lt as PptxChartErrBars, O as ZoomPptxElement, Ot as PptxChartDataLabelOptions, P as PlaceholderDefaults, T as TablePptxElement, Tt as PptxChartChrome, U as MediaBookmark, Vt as PptxChartHistogramOptions, Y as ParsedTableBackground, Yt as PptxChartOfPieOptions, Z as ParsedTableStyleBorders, Zt as PptxChartRegionMapOptions, _ as PptxElementWithText, a as GroupPptxElement, at as ParsedTableStyleText, bt as PptxChartAxisFormatting, c as MediaPptxElement, cn as PptxChartView3D, ct as PptxTableCellParagraph, d as OlePptxElement, dn as PptxEmbeddedWorkbookData, dt as PptxTableData, en as PptxChartShapeProps, fn as PptxExternalData, i as ContentPartPptxElement, ir as ShapeStyle, l as Model3DPptxElement, ln as PptxChartWaterfallOptions, lt as PptxTableCellStyle, m as PptxElement, n as ConnectorPptxElement, nn as PptxChartTreemapOptions, on as PptxChartType, pn as PptxChartUserShape, q as PptxMediaReferenceKind, qt as PptxChartMarker, rn as PptxChartTrendline, rr as ResolvedStyleMatrix, rt as ParsedTableStyleMap, s as InkPptxElement, t as ChartPptxElement, tn as PptxChartStyle, tr as PptxImageProperties, vn as ResolvedChartStyleDefinition, wt as PptxChartBoxWhiskerOptions, y as PptxImageLikeElement } from "./elements-iUzpAeqR.js";
|
|
4
4
|
import { B as PptxSmartArtTextRun, G as PptxSmartArtChrome, It as AdjustHandlePolar, Lt as AdjustHandleXY, P as PptxSmartArtQuickStyle, Rt as ConnectionSite, Ut as CustomGeometryTextRect, Vt as CustomGeometryRawData, Wt as GeometryAdjustmentHandle, f as PptxSmartArtColorTransform, j as PptxSmartArtNodeStyle, n as PptxSmartArtData, r as PptxSmartArtDrawingShape, t as PptxSmartArtConnection, zt as CustomGeometryPath } from "./smart-art-ENMMEbmW.js";
|
|
5
|
-
import { $ as PptxThemeOption, C as PptxSlide,
|
|
5
|
+
import { $ as PptxThemeOption, C as PptxSlide, Ct as PptxCustomProperty, D as PptxSmartTagsReference, Et as PptxTagCollection, J as PptxNotesMaster, K as PptxLayoutPreview, Kt as PptxElementAnimation, Lt as PptxAnimationPreset, P as PptxViewProperties, Q as PptxTextStyleLevels, S as PptxSection, St as PptxCoreProperties, T as PptxSlideSize, Ut as PptxAnimationTrigger, V as PptxEmbeddedFontList, W as PptxHandoutMaster, X as PptxSlideLayout, Xt as PptxNativeAnimation, Y as PptxPlaceholderFrame, Z as PptxSlideMaster, _ as PptxLayoutOption, a as MergeOptions, b as PptxPhotoAlbum, bn as PptxTransitionType, bt as PptxCommentAuthor, c as PptxCustomShow, ct as PptxThemeColorScheme, d as PptxData, f as PptxEmbeddedFont, ft as PptxThemeFontScheme, g as PptxKinsoku, gt as PptxThemeVariant, h as PptxHeaderFooter, ht as PptxThemeObjectDefaults, l as PptxCustomXmlPart, lt as PptxThemeEffectStyle, m as PptxExportOptions, mt as PptxThemeLineStyle, pn as PptxSlideTransition, pt as PptxThemeFormatScheme, q as PptxMasterTextStyles, s as PptxActiveXControl, st as PptxTheme, t as FindResult, u as PptxCustomerData, ut as PptxThemeFillStyle, v as PptxModernCommentPart, vt as PptxAppProperties, w as PptxSlideBackgroundPattern, wt as PptxModernCommentAuthor, x as PptxPresentationProperties, xt as PptxCompatibilityWarning, y as PptxModifyVerifier, yt as PptxComment } from "./text-operations-CfLVZ7DK.js";
|
|
6
6
|
import { XMLBuilder, XMLParser } from "fast-xml-parser";
|
|
7
7
|
import JSZip from "jszip";
|
|
8
8
|
//#region pptx/core/types/theme-presets.d.ts
|
|
@@ -1297,297 +1297,69 @@ declare class PptxSlideNotesBuilder {
|
|
|
1297
1297
|
private syncSegmentsFromNotes;
|
|
1298
1298
|
}
|
|
1299
1299
|
//#endregion
|
|
1300
|
-
//#region pptx/core/
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
* all archive entries exceeds this cap, `load()` rejects with a
|
|
1308
|
-
* {@link ZipBombError}. A hard cap of 65 536 archive entries also
|
|
1309
|
-
* applies.
|
|
1310
|
-
*/
|
|
1311
|
-
maxUncompressedBytes?: number;
|
|
1312
|
-
/**
|
|
1313
|
-
* When `false` (default), relationship targets that resolve to
|
|
1314
|
-
* `http://` or `https://` URLs are dropped from rendered slides
|
|
1315
|
-
* (image, picture, background). Set to `true` to allow external image
|
|
1316
|
-
* URLs to flow through to `<img src>`.
|
|
1317
|
-
*
|
|
1318
|
-
* Disabled by default to mitigate SSRF / privacy-leak vectors in
|
|
1319
|
-
* server-side rendering and headless export pipelines.
|
|
1320
|
-
*/
|
|
1321
|
-
allowExternalImages?: boolean;
|
|
1322
|
-
}
|
|
1323
|
-
/**
|
|
1324
|
-
* Default maximum uncompressed byte budget for {@link PptxHandlerLoadOptions.maxUncompressedBytes}.
|
|
1325
|
-
* 500 MiB.
|
|
1326
|
-
*/
|
|
1327
|
-
declare const DEFAULT_MAX_UNCOMPRESSED_BYTES: number;
|
|
1328
|
-
/**
|
|
1329
|
-
* Hard cap on archive entry count. Beyond this, the package is rejected.
|
|
1330
|
-
*/
|
|
1331
|
-
declare const MAX_ZIP_ENTRY_COUNT = 65536;
|
|
1332
|
-
/**
|
|
1333
|
-
* Thrown by the load pipeline when a ZIP archive exceeds the configured
|
|
1334
|
-
* uncompressed-size budget or the entry-count limit.
|
|
1335
|
-
*/
|
|
1336
|
-
declare class ZipBombError extends Error {
|
|
1337
|
-
readonly code = "ZIP_BOMB";
|
|
1338
|
-
readonly uncompressedBytes: number | undefined;
|
|
1339
|
-
readonly limit: number;
|
|
1340
|
-
readonly entryCount: number | undefined;
|
|
1341
|
-
constructor(message: string, details: {
|
|
1342
|
-
uncompressedBytes?: number;
|
|
1343
|
-
limit: number;
|
|
1344
|
-
entryCount?: number;
|
|
1345
|
-
});
|
|
1346
|
-
}
|
|
1347
|
-
/** Output format for the save pipeline. */
|
|
1348
|
-
type PptxSaveFormat = 'pptx' | 'ppsx' | 'pptm' | 'ppt';
|
|
1349
|
-
interface PptxHandlerSaveOptions {
|
|
1350
|
-
headerFooter?: PptxHeaderFooter;
|
|
1351
|
-
presentationProperties?: PptxPresentationProperties;
|
|
1352
|
-
customShows?: PptxCustomShow[];
|
|
1353
|
-
sections?: PptxSection[];
|
|
1354
|
-
coreProperties?: PptxCoreProperties;
|
|
1355
|
-
appProperties?: PptxAppProperties;
|
|
1356
|
-
customProperties?: PptxCustomProperty[];
|
|
1357
|
-
/** Updated notes master data to save back to notesMaster1.xml. */
|
|
1358
|
-
notesMaster?: PptxNotesMaster;
|
|
1359
|
-
/** Updated handout master data to save back to handoutMaster1.xml. */
|
|
1360
|
-
handoutMaster?: PptxHandoutMaster;
|
|
1361
|
-
/**
|
|
1362
|
-
* Updated slide masters to save back to ppt/slideMasters/slideMaster*.xml.
|
|
1363
|
-
* Each entry in the array applies typed mutations (clrMap, hf flags,
|
|
1364
|
-
* background) to the master at its `path`. Masters not listed here pass
|
|
1365
|
-
* through verbatim from the original load.
|
|
1366
|
-
*/
|
|
1367
|
-
slideMasters?: PptxSlideMaster[];
|
|
1368
|
-
/**
|
|
1369
|
-
* Updated slide layouts to save back to ppt/slideLayouts/slideLayout*.xml.
|
|
1370
|
-
* Each entry applies typed mutations (clrMapOverride, attrs, hf flags,
|
|
1371
|
-
* background) to the layout at its `path`. Layouts not listed here pass
|
|
1372
|
-
* through verbatim from the original load.
|
|
1373
|
-
*/
|
|
1374
|
-
slideLayouts?: PptxSlideLayout[];
|
|
1375
|
-
/** Updated tag collections to save back to ppt/tags/tag*.xml. */
|
|
1376
|
-
tags?: PptxTagCollection[];
|
|
1377
|
-
/** Presentation-level customer data references to author or update. */
|
|
1378
|
-
customerData?: PptxCustomerData[];
|
|
1379
|
-
/** Photo album metadata to save back to `p:photoAlbum`. */
|
|
1380
|
-
photoAlbum?: PptxPhotoAlbum;
|
|
1381
|
-
/**
|
|
1382
|
-
* Slide dimensions to write back to `p:sldSz`.
|
|
1383
|
-
*
|
|
1384
|
-
* Omitting the option preserves the load-time dimensions verbatim, which
|
|
1385
|
-
* is why an edit made through a viewer's Slide Size control has to reach
|
|
1386
|
-
* the save call: nothing else in the pipeline can observe it.
|
|
1387
|
-
*
|
|
1388
|
-
* PowerPoint derives `Presentation.PageSetup.SlideSize` from `@cx`/`@cy`
|
|
1389
|
-
* alone (verified by COM: an A4-typed `p:sldSz` carrying 4:3 dimensions
|
|
1390
|
-
* still reports `ppSlideSizeCustom`), so `type` is written for fidelity
|
|
1391
|
-
* but the dimensions are what actually decide the reported preset.
|
|
1392
|
-
*/
|
|
1393
|
-
slideSize?: PptxSlideSize;
|
|
1394
|
-
/** East Asian line-break settings to save back to `p:kinsoku`. */
|
|
1395
|
-
kinsoku?: PptxKinsoku | null;
|
|
1396
|
-
/** Write-protection verifier. Set to `null` to remove, `undefined` to preserve existing. */
|
|
1397
|
-
modifyVerifier?: PptxModifyVerifier | null;
|
|
1398
|
-
/**
|
|
1399
|
-
* `p:presentation/@embedTrueTypeFonts` to write. `undefined` preserves
|
|
1400
|
-
* whatever was loaded (or omits the attribute for a brand-new deck);
|
|
1401
|
-
* purely declarative here, see {@link PptxData.embedTrueTypeFonts}.
|
|
1402
|
-
*/
|
|
1403
|
-
embedTrueTypeFonts?: boolean;
|
|
1404
|
-
/**
|
|
1405
|
-
* Presentation-level default text style edits to save back to
|
|
1406
|
-
* `p:defaultTextStyle`. Only the levels present in the map are touched;
|
|
1407
|
-
* omitted levels and any unmodelled XML on an edited level survive
|
|
1408
|
-
* untouched. See {@link PptxData.defaultTextStyle}.
|
|
1409
|
-
*/
|
|
1410
|
-
defaultTextStyle?: PptxTextStyleLevels;
|
|
1411
|
-
/** View properties to save back to ppt/viewProps.xml. */
|
|
1412
|
-
viewProperties?: PptxViewProperties;
|
|
1413
|
-
/**
|
|
1414
|
-
* Table style edits to save back to `ppt/tableStyles.xml`. Pass the
|
|
1415
|
-
* `tableStyleMap` from `PptxData` (optionally with edited entries)
|
|
1416
|
-
* to persist user edits. The `def` GUID and any unmodelled XML are
|
|
1417
|
-
* preserved verbatim. Omitting the option round-trips the original
|
|
1418
|
-
* part untouched.
|
|
1419
|
-
*/
|
|
1420
|
-
tableStyles?: ParsedTableStyleMap;
|
|
1421
|
-
/**
|
|
1422
|
-
* Set `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` to this style GUID
|
|
1423
|
-
* (normalised to uppercase-with-braces). `undefined` preserves the
|
|
1424
|
-
* existing default; there is no removal form (`@def` is required by the
|
|
1425
|
-
* schema and PowerPoint always points it at a real style). No-op when the
|
|
1426
|
-
* archive has no `ppt/tableStyles.xml`, same as {@link tableStyles}.
|
|
1427
|
-
*/
|
|
1428
|
-
tableStylesDefaultId?: string;
|
|
1429
|
-
/**
|
|
1430
|
-
* Style GUIDs to remove from `ppt/tableStyles.xml` entirely, kept as a
|
|
1431
|
-
* separate opt-in list rather than inferred from omission on
|
|
1432
|
-
* {@link tableStyles}: that map is documented as safe to pass a PARTIAL
|
|
1433
|
-
* edit (only the entries a caller actually touched), so treating every
|
|
1434
|
-
* GUID missing from it as "delete this" would silently destroy untouched
|
|
1435
|
-
* styles on an ordinary targeted edit. A GUID here that is also the
|
|
1436
|
-
* current (or newly requested) default is left in place and skipped.
|
|
1437
|
-
*/
|
|
1438
|
-
tableStylesToDelete?: string[];
|
|
1439
|
-
/**
|
|
1440
|
-
* Target output format.
|
|
1441
|
-
* - `'pptx'` (default): Standard presentation.
|
|
1442
|
-
* - `'ppsx'`: Slide-show file (opens in presentation mode).
|
|
1443
|
-
* - `'pptm'`: Macro-enabled presentation (requires VBA data).
|
|
1444
|
-
* - `'ppt'`: Legacy binary PowerPoint 97-2003 presentation. Bypasses the
|
|
1445
|
-
* OOXML ZIP pipeline entirely; see `PptxHandlerRuntimeSaveLegacyPpt`.
|
|
1446
|
-
* Elements with no binary equivalent (charts, SmartArt, media, OLE, ink,
|
|
1447
|
-
* 3D models) are degraded to a rasterised preview picture or a labelled
|
|
1448
|
-
* placeholder, each reported via a `scope: 'save'`-adjacent
|
|
1449
|
-
* `PptxCompatibilityWarning`.
|
|
1450
|
-
*/
|
|
1451
|
-
outputFormat?: PptxSaveFormat;
|
|
1452
|
-
/**
|
|
1453
|
-
* Password for RC4 CryptoAPI encryption of a `'ppt'`-format save. Ignored
|
|
1454
|
-
* for every other {@link outputFormat}; encrypting a `.pptx`/`.ppsx`/`.pptm`
|
|
1455
|
-
* save uses {@link IPptxHandlerRuntime.saveEncrypted}'s separate AES/Agile
|
|
1456
|
-
* OLE2 wrapping instead, since the legacy binary format's own encryption
|
|
1457
|
-
* scheme is embedded directly in the `.ppt` stream rather than wrapping an
|
|
1458
|
-
* already-produced package.
|
|
1459
|
-
*/
|
|
1460
|
-
pptPassword?: string;
|
|
1461
|
-
/**
|
|
1462
|
-
* Embedded fonts to write back (or add) to the saved PPTX.
|
|
1463
|
-
*
|
|
1464
|
-
* Pass the `embeddedFonts` array from `PptxData` to preserve existing
|
|
1465
|
-
* embedded fonts during save. You can also add new fonts by including
|
|
1466
|
-
* entries with `rawFontData` populated.
|
|
1467
|
-
*
|
|
1468
|
-
* When omitted, the save pipeline will automatically re-embed any
|
|
1469
|
-
* fonts that were loaded from the original PPTX and have `rawFontData`
|
|
1470
|
-
* preserved (i.e. the default is lossless round-trip).
|
|
1471
|
-
*/
|
|
1472
|
-
embeddedFonts?: PptxEmbeddedFont[];
|
|
1473
|
-
/** Typed embedded-font list metadata. Set to null to remove fonts and relationships. */
|
|
1474
|
-
embeddedFontList?: PptxEmbeddedFontList | null;
|
|
1475
|
-
/**
|
|
1476
|
-
* OOXML conformance class for the saved output.
|
|
1477
|
-
* - `'preserve'` (default): use the same conformance as the loaded file.
|
|
1478
|
-
* - `'strict'`: force Strict Open XML (ISO/IEC 29500) namespace URIs.
|
|
1479
|
-
* - `'transitional'`: force Transitional (ECMA-376) namespace URIs.
|
|
1480
|
-
*/
|
|
1481
|
-
conformance?: 'strict' | 'transitional' | 'preserve';
|
|
1482
|
-
}
|
|
1483
|
-
interface IPptxHandlerRuntime {
|
|
1484
|
-
/**
|
|
1485
|
-
* Release all resources held by this runtime (Blob URLs, caches, ZIP).
|
|
1486
|
-
* After calling, the runtime cannot be used further.
|
|
1487
|
-
*/
|
|
1488
|
-
dispose(): void;
|
|
1489
|
-
/**
|
|
1490
|
-
* Revoke all Blob URLs created during image loading.
|
|
1491
|
-
*/
|
|
1492
|
-
revokeBlobUrls(): void;
|
|
1493
|
-
getCompatibilityWarnings(): PptxCompatibilityWarning[];
|
|
1494
|
-
getLayoutOptions(): PptxLayoutOption[];
|
|
1495
|
-
getLayoutPreview(layoutPath: string): Promise<PptxLayoutPreview | null>;
|
|
1496
|
-
getLayoutPreviews(layoutPaths?: readonly string[]): Promise<PptxLayoutPreview[]>;
|
|
1497
|
-
createXmlBuilder(data: PptxData): PptxXmlBuilder;
|
|
1498
|
-
Builder(data: PptxData): PptxXmlBuilder;
|
|
1499
|
-
setTemplateBackground(path: string, backgroundColor: string | undefined): void;
|
|
1500
|
-
setPresentationTheme(themePath: string, applyToAllMasters?: boolean): Promise<void>;
|
|
1501
|
-
getTemplateBackgroundColor(path: string): string | undefined;
|
|
1502
|
-
updateThemeColorScheme(colorScheme: PptxThemeColorScheme): Promise<void>;
|
|
1503
|
-
updateThemeFontScheme(fontScheme: PptxThemeFontScheme): Promise<void>;
|
|
1504
|
-
updateThemeName(name: string): Promise<void>;
|
|
1505
|
-
/** Resolve a `<p:style>` node against the loaded theme (see PptxHandlerRuntimeStyleMatrixResolve). */
|
|
1506
|
-
resolveStyleMatrixReferences(styleXml: XmlObject): ResolvedStyleMatrix;
|
|
1507
|
-
applyTheme(colorScheme: PptxThemeColorScheme, fontScheme: PptxThemeFontScheme, themeName?: string): Promise<void>;
|
|
1508
|
-
load(data: ArrayBuffer, options?: PptxHandlerLoadOptions): Promise<PptxData>;
|
|
1509
|
-
getChartDataForGraphicFrame(slidePath: string, graphicFrame: XmlObject | undefined): Promise<PptxChartData | undefined>;
|
|
1510
|
-
getSmartArtDataForGraphicFrame(slidePath: string, graphicFrame: XmlObject | undefined): Promise<PptxSmartArtData | undefined>;
|
|
1511
|
-
getImageData(imagePath: string): Promise<string | undefined>;
|
|
1512
|
-
/**
|
|
1513
|
-
* Extract a media file from the PPTX archive as an ArrayBuffer.
|
|
1514
|
-
* Returns undefined if the file is not found.
|
|
1515
|
-
*/
|
|
1516
|
-
getMediaArrayBuffer(mediaPath: string): Promise<ArrayBuffer | undefined>;
|
|
1517
|
-
save(slides: PptxSlide[], options?: PptxHandlerSaveOptions): Promise<Uint8Array>;
|
|
1518
|
-
exportSlides(slides: PptxSlide[], options: PptxExportOptions): Promise<Map<number, Uint8Array>>;
|
|
1519
|
-
/**
|
|
1520
|
-
* Get the available slide layouts for a specific slide, based on the
|
|
1521
|
-
* slide's master. Scans the slide master's relationships to find all
|
|
1522
|
-
* layouts that belong to it.
|
|
1523
|
-
*
|
|
1524
|
-
* @param slideIndex - Zero-based slide index.
|
|
1525
|
-
* @param slides - Current slides array.
|
|
1526
|
-
* @returns Array of layout options belonging to the same slide master.
|
|
1527
|
-
*/
|
|
1528
|
-
getAvailableLayoutsForSlide(slideIndex: number, slides: PptxSlide[]): Promise<PptxLayoutOption[]>;
|
|
1529
|
-
/**
|
|
1530
|
-
* Resolve the editable template (master + layout) elements a slide
|
|
1531
|
-
* inherits, each carrying a `master-` / `layout-` prefixed id. Excludes
|
|
1532
|
-
* placeholders; returns only decorative shapes/pictures/graphic frames.
|
|
1533
|
-
*
|
|
1534
|
-
* @param slideId - The slide's archive path (`PptxSlide.id`).
|
|
1535
|
-
*/
|
|
1536
|
-
getTemplateElementsForSlide(slideId: string): Promise<PptxElement[]>;
|
|
1537
|
-
/**
|
|
1538
|
-
* Scan the loaded PPTX archive for all theme parts.
|
|
1539
|
-
*/
|
|
1540
|
-
getAvailableThemes(): Promise<Array<{
|
|
1541
|
-
path: string;
|
|
1542
|
-
name?: string;
|
|
1543
|
-
}>>;
|
|
1544
|
-
/**
|
|
1545
|
-
* Apply a different layout to an existing slide by updating the slide's
|
|
1546
|
-
* relationship to point to the new layout and re-parsing layout
|
|
1547
|
-
* placeholders / background.
|
|
1548
|
-
*
|
|
1549
|
-
* @param slideIndex - Zero-based slide index.
|
|
1550
|
-
* @param layoutPath - Archive path of the target layout
|
|
1551
|
-
* (e.g. `ppt/slideLayouts/slideLayout2.xml`).
|
|
1552
|
-
* @param slides - Current slides array.
|
|
1553
|
-
* @returns The updated slide with new layout path, name, and background.
|
|
1554
|
-
*/
|
|
1555
|
-
applyLayoutToSlide(slideIndex: number, layoutPath: string, slides: PptxSlide[]): Promise<PptxSlide>;
|
|
1300
|
+
//#region pptx/core/utils/diagram-relationship-ids.d.ts
|
|
1301
|
+
/** Typed view of the four required relationship attributes on `dgm:relIds`. */
|
|
1302
|
+
interface DiagramRelationshipIds {
|
|
1303
|
+
dataRelId?: string;
|
|
1304
|
+
layoutRelId?: string;
|
|
1305
|
+
styleRelId?: string;
|
|
1306
|
+
colorsRelId?: string;
|
|
1556
1307
|
}
|
|
1557
|
-
//#endregion
|
|
1558
|
-
//#region pptx/core/core/PptxHandlerRuntimeFactory.d.ts
|
|
1559
1308
|
/**
|
|
1560
|
-
*
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1563
|
-
* Implement this interface to supply a custom runtime (e.g. a
|
|
1564
|
-
* WASM-backed or test-double runtime) to {@link PptxHandlerCore}.
|
|
1309
|
+
* Read `CT_RelIds` without assuming the conventional `dgm` or `r` prefixes.
|
|
1310
|
+
* Namespace prefixes are aliases and may legally differ in Strict documents.
|
|
1565
1311
|
*/
|
|
1566
|
-
|
|
1567
|
-
/** Instantiate and return a new runtime implementation. */
|
|
1568
|
-
createRuntime(): IPptxHandlerRuntime;
|
|
1569
|
-
}
|
|
1312
|
+
declare function parseDiagramRelationshipIds(graphicData: XmlObject | undefined): DiagramRelationshipIds | undefined;
|
|
1570
1313
|
/**
|
|
1571
|
-
*
|
|
1572
|
-
*
|
|
1573
|
-
* Used internally by {@link PptxHandlerCore} when no custom factory is
|
|
1574
|
-
* provided.
|
|
1314
|
+
* Apply edited relationship ids to an existing SmartArt graphic frame.
|
|
1315
|
+
* Unspecified ids, unknown attributes, child markup, and extensions are kept.
|
|
1575
1316
|
*/
|
|
1576
|
-
declare
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
*
|
|
1580
|
-
* @returns A freshly constructed runtime ready for loading a PPTX file.
|
|
1581
|
-
*/
|
|
1582
|
-
createRuntime(): IPptxHandlerRuntime;
|
|
1583
|
-
}
|
|
1317
|
+
declare function applyDiagramRelationshipIds(frame: XmlObject, data: Pick<PptxSmartArtData, 'dataRelId' | 'layoutRelId' | 'styleRelId' | 'colorsRelId'>): void;
|
|
1318
|
+
//#endregion
|
|
1319
|
+
//#region pptx/core/core/runtime/master-part-tags.d.ts
|
|
1584
1320
|
/**
|
|
1585
|
-
*
|
|
1586
|
-
*
|
|
1321
|
+
* @fileoverview Root tags and element-id prefixes for the four "template"
|
|
1322
|
+
* parts whose shape trees the Slide Master view renders and edits.
|
|
1587
1323
|
*
|
|
1588
|
-
*
|
|
1324
|
+
* Kept in its own module so the save-side writer can name the tag union
|
|
1325
|
+
* without importing the load-side parser, which sits further down the mixin
|
|
1326
|
+
* chain.
|
|
1589
1327
|
*/
|
|
1590
|
-
|
|
1328
|
+
/** Root tags of the parts whose shape tree the Slide Master view can edit. */
|
|
1329
|
+
type MasterPartRootTag = 'p:notesMaster' | 'p:handoutMaster' | 'p:sldMaster' | 'p:sldLayout';
|
|
1330
|
+
//#endregion
|
|
1331
|
+
//#region pptx/core/core/builders/PptxConnectorParser.d.ts
|
|
1332
|
+
interface ConnectorTextResult {
|
|
1333
|
+
text: string;
|
|
1334
|
+
textStyle: TextStyle;
|
|
1335
|
+
textSegments: TextSegment[];
|
|
1336
|
+
}
|
|
1337
|
+
interface PptxConnectorParserContext {
|
|
1338
|
+
emuPerPx: number;
|
|
1339
|
+
getOrderedSlidePaths: () => string[];
|
|
1340
|
+
slideRelsMap: Map<string, Map<string, string>>;
|
|
1341
|
+
parseGeometryAdjustments: (prstGeom: XmlObject | undefined) => Record<string, number> | undefined;
|
|
1342
|
+
readFlipState: (xfrm: XmlObject | undefined) => {
|
|
1343
|
+
flipHorizontal?: boolean;
|
|
1344
|
+
flipVertical?: boolean;
|
|
1345
|
+
};
|
|
1346
|
+
extractShapeStyle: (spPr: XmlObject | undefined, styleNode?: XmlObject) => ShapeStyle;
|
|
1347
|
+
parseShapeLocks: (spLocks: XmlObject | undefined) => PptxElement['locks'];
|
|
1348
|
+
parseElementActions: (cNvPr: XmlObject | undefined, slideRelationships: Map<string, string> | undefined, orderedSlidePaths: string[]) => {
|
|
1349
|
+
actionClick?: PptxElement['actionClick'];
|
|
1350
|
+
actionHover?: PptxElement['actionHover'];
|
|
1351
|
+
};
|
|
1352
|
+
/** Parse text body XML into text, style, and segments. */
|
|
1353
|
+
parseConnectorTextBody?: (txBody: XmlObject | undefined, slidePath?: string) => ConnectorTextResult | null;
|
|
1354
|
+
}
|
|
1355
|
+
interface IPptxConnectorParser {
|
|
1356
|
+
parseConnector(connector: XmlObject, id: string, slidePath?: string): PptxElement | null;
|
|
1357
|
+
}
|
|
1358
|
+
declare class PptxConnectorParser implements IPptxConnectorParser {
|
|
1359
|
+
private readonly context;
|
|
1360
|
+
constructor(context: PptxConnectorParserContext);
|
|
1361
|
+
parseConnector(connector: XmlObject, id: string, slidePath?: string): PptxElement | null;
|
|
1362
|
+
}
|
|
1591
1363
|
//#endregion
|
|
1592
1364
|
//#region pptx/core/services/PptxCompatibilityService.d.ts
|
|
1593
1365
|
interface CompatibilityWarningInput {
|
|
@@ -2263,25 +2035,6 @@ declare function parseCustomShows(presentationData: XmlObject | null, lookup: IP
|
|
|
2263
2035
|
declare function applyCustomShows(presentation: XmlObject, shows: PptxCustomShow[] | undefined, lookup: IPptxXmlLookupService, remap?: PptxSlideReferenceRemap): void;
|
|
2264
2036
|
declare function applySections(presentation: XmlObject, sections: PptxSection[] | undefined, lookup: IPptxXmlLookupService, remap?: PptxSlideReferenceRemap): void;
|
|
2265
2037
|
//#endregion
|
|
2266
|
-
//#region pptx/core/utils/diagram-relationship-ids.d.ts
|
|
2267
|
-
/** Typed view of the four required relationship attributes on `dgm:relIds`. */
|
|
2268
|
-
interface DiagramRelationshipIds {
|
|
2269
|
-
dataRelId?: string;
|
|
2270
|
-
layoutRelId?: string;
|
|
2271
|
-
styleRelId?: string;
|
|
2272
|
-
colorsRelId?: string;
|
|
2273
|
-
}
|
|
2274
|
-
/**
|
|
2275
|
-
* Read `CT_RelIds` without assuming the conventional `dgm` or `r` prefixes.
|
|
2276
|
-
* Namespace prefixes are aliases and may legally differ in Strict documents.
|
|
2277
|
-
*/
|
|
2278
|
-
declare function parseDiagramRelationshipIds(graphicData: XmlObject | undefined): DiagramRelationshipIds | undefined;
|
|
2279
|
-
/**
|
|
2280
|
-
* Apply edited relationship ids to an existing SmartArt graphic frame.
|
|
2281
|
-
* Unspecified ids, unknown attributes, child markup, and extensions are kept.
|
|
2282
|
-
*/
|
|
2283
|
-
declare function applyDiagramRelationshipIds(frame: XmlObject, data: Pick<PptxSmartArtData, 'dataRelId' | 'layoutRelId' | 'styleRelId' | 'colorsRelId'>): void;
|
|
2284
|
-
//#endregion
|
|
2285
2038
|
//#region crypto/types.d.ts
|
|
2286
2039
|
/**
|
|
2287
2040
|
* Type definitions for OOXML package encryption and decryption.
|
|
@@ -2690,6 +2443,13 @@ declare function convertXmlToStrict(node: Record<string, unknown>, setConformanc
|
|
|
2690
2443
|
*/
|
|
2691
2444
|
declare function parsePresentationSmartTags(zip: JSZip, parseXml: (xml: string) => XmlObject, presentationData: XmlObject | null | undefined): Promise<PptxSmartTagsReference | undefined>;
|
|
2692
2445
|
//#endregion
|
|
2446
|
+
//#region pptx/core/utils/theme-variants.d.ts
|
|
2447
|
+
/**
|
|
2448
|
+
* The variants a package carries, in the manager's order, for the deck's slide width (the first
|
|
2449
|
+
* size group when none matches). Empty when the package has no `themeVariants` relationship.
|
|
2450
|
+
*/
|
|
2451
|
+
declare function loadThemeVariants(zip: JSZip, parse: (xml: string) => XmlObject, deckSlideWidthEmu?: number): Promise<PptxThemeVariant[]>;
|
|
2452
|
+
//#endregion
|
|
2693
2453
|
//#region pptx/core/utils/chart-color-choice.d.ts
|
|
2694
2454
|
/**
|
|
2695
2455
|
* Resolve an authored colour-choice node (`a:schemeClr` with its transforms,
|
|
@@ -2733,51 +2493,6 @@ declare class PptxSaveConstantsFactory implements IFactory<PptxSaveConstants, Oo
|
|
|
2733
2493
|
}
|
|
2734
2494
|
declare const createPptxSaveConstants: (conformance?: OoxmlConformanceClass) => PptxSaveConstants;
|
|
2735
2495
|
//#endregion
|
|
2736
|
-
//#region pptx/core/core/runtime/master-part-tags.d.ts
|
|
2737
|
-
/**
|
|
2738
|
-
* @fileoverview Root tags and element-id prefixes for the four "template"
|
|
2739
|
-
* parts whose shape trees the Slide Master view renders and edits.
|
|
2740
|
-
*
|
|
2741
|
-
* Kept in its own module so the save-side writer can name the tag union
|
|
2742
|
-
* without importing the load-side parser, which sits further down the mixin
|
|
2743
|
-
* chain.
|
|
2744
|
-
*/
|
|
2745
|
-
/** Root tags of the parts whose shape tree the Slide Master view can edit. */
|
|
2746
|
-
type MasterPartRootTag = 'p:notesMaster' | 'p:handoutMaster' | 'p:sldMaster' | 'p:sldLayout';
|
|
2747
|
-
//#endregion
|
|
2748
|
-
//#region pptx/core/core/builders/PptxConnectorParser.d.ts
|
|
2749
|
-
interface ConnectorTextResult {
|
|
2750
|
-
text: string;
|
|
2751
|
-
textStyle: TextStyle;
|
|
2752
|
-
textSegments: TextSegment[];
|
|
2753
|
-
}
|
|
2754
|
-
interface PptxConnectorParserContext {
|
|
2755
|
-
emuPerPx: number;
|
|
2756
|
-
getOrderedSlidePaths: () => string[];
|
|
2757
|
-
slideRelsMap: Map<string, Map<string, string>>;
|
|
2758
|
-
parseGeometryAdjustments: (prstGeom: XmlObject | undefined) => Record<string, number> | undefined;
|
|
2759
|
-
readFlipState: (xfrm: XmlObject | undefined) => {
|
|
2760
|
-
flipHorizontal?: boolean;
|
|
2761
|
-
flipVertical?: boolean;
|
|
2762
|
-
};
|
|
2763
|
-
extractShapeStyle: (spPr: XmlObject | undefined, styleNode?: XmlObject) => ShapeStyle;
|
|
2764
|
-
parseShapeLocks: (spLocks: XmlObject | undefined) => PptxElement['locks'];
|
|
2765
|
-
parseElementActions: (cNvPr: XmlObject | undefined, slideRelationships: Map<string, string> | undefined, orderedSlidePaths: string[]) => {
|
|
2766
|
-
actionClick?: PptxElement['actionClick'];
|
|
2767
|
-
actionHover?: PptxElement['actionHover'];
|
|
2768
|
-
};
|
|
2769
|
-
/** Parse text body XML into text, style, and segments. */
|
|
2770
|
-
parseConnectorTextBody?: (txBody: XmlObject | undefined, slidePath?: string) => ConnectorTextResult | null;
|
|
2771
|
-
}
|
|
2772
|
-
interface IPptxConnectorParser {
|
|
2773
|
-
parseConnector(connector: XmlObject, id: string, slidePath?: string): PptxElement | null;
|
|
2774
|
-
}
|
|
2775
|
-
declare class PptxConnectorParser implements IPptxConnectorParser {
|
|
2776
|
-
private readonly context;
|
|
2777
|
-
constructor(context: PptxConnectorParserContext);
|
|
2778
|
-
parseConnector(connector: XmlObject, id: string, slidePath?: string): PptxElement | null;
|
|
2779
|
-
}
|
|
2780
|
-
//#endregion
|
|
2781
2496
|
//#region pptx/core/core/builders/PptxContentTypesBuilder.d.ts
|
|
2782
2497
|
interface PptxContentTypesSlideMediaBuildInput {
|
|
2783
2498
|
contentTypesData: XmlObject;
|
|
@@ -3769,7 +3484,7 @@ declare class TemplateElementBaselineTracker {
|
|
|
3769
3484
|
* the constructor of the final concrete class
|
|
3770
3485
|
* ({@link PptxHandlerRuntimeImplementation}).
|
|
3771
3486
|
*/
|
|
3772
|
-
declare class PptxHandlerRuntime$
|
|
3487
|
+
declare class PptxHandlerRuntime$103 {
|
|
3773
3488
|
/** The in-memory ZIP archive representing the OPC (.pptx) package. */
|
|
3774
3489
|
protected zip: JSZip;
|
|
3775
3490
|
/** fast-xml-parser instance used to parse XML strings into JS objects. */
|
|
@@ -3890,6 +3605,17 @@ declare class PptxHandlerRuntime$101 {
|
|
|
3890
3605
|
* Phase 2 Stream B / C-H4.
|
|
3891
3606
|
*/
|
|
3892
3607
|
protected masterClrMaps: Map<string, Record<string, string>>;
|
|
3608
|
+
/**
|
|
3609
|
+
* Background style (Design > Background Styles) applied to a master since load: its `p:bg` and
|
|
3610
|
+
* `p:clrMap`. The save writer applies them last, so a stale `PptxSlideMaster` model handed back
|
|
3611
|
+
* by the editor cannot undo them.
|
|
3612
|
+
*/
|
|
3613
|
+
/** Real theme variants the loaded package carries (see `loadThemeVariants`). */
|
|
3614
|
+
protected loadedThemeVariants: PptxThemeVariant[];
|
|
3615
|
+
protected masterStyleOverrides: Map<string, {
|
|
3616
|
+
bg: XmlObject;
|
|
3617
|
+
clrMap: Record<string, string>;
|
|
3618
|
+
}>;
|
|
3893
3619
|
/**
|
|
3894
3620
|
* Per-master theme color maps. Each master may reference its own theme
|
|
3895
3621
|
* file via `_rels/slideMasterN.xml.rels`. For multi-master decks, slides
|
|
@@ -4171,7 +3897,7 @@ declare class PptxHandlerRuntime$101 {
|
|
|
4171
3897
|
}
|
|
4172
3898
|
//#endregion
|
|
4173
3899
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeTableStyles.d.ts
|
|
4174
|
-
declare class PptxHandlerRuntime$
|
|
3900
|
+
declare class PptxHandlerRuntime$102 extends PptxHandlerRuntime$103 {
|
|
4175
3901
|
/**
|
|
4176
3902
|
* Export slides to a vector or raster format, keyed by slide index.
|
|
4177
3903
|
*
|
|
@@ -4261,7 +3987,7 @@ declare class PptxHandlerRuntime$100 extends PptxHandlerRuntime$101 {
|
|
|
4261
3987
|
}
|
|
4262
3988
|
//#endregion
|
|
4263
3989
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeElementActions.d.ts
|
|
4264
|
-
declare class PptxHandlerRuntime$
|
|
3990
|
+
declare class PptxHandlerRuntime$101 extends PptxHandlerRuntime$102 {
|
|
4265
3991
|
/**
|
|
4266
3992
|
* Write or remove a single `a:hlinkClick` / `a:hlinkHover` node on
|
|
4267
3993
|
* a `p:cNvPr` parent.
|
|
@@ -4318,7 +4044,7 @@ declare class PptxHandlerRuntime$99 extends PptxHandlerRuntime$100 {
|
|
|
4318
4044
|
}
|
|
4319
4045
|
//#endregion
|
|
4320
4046
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeTableStylesAndActions.d.ts
|
|
4321
|
-
declare class PptxHandlerRuntime$
|
|
4047
|
+
declare class PptxHandlerRuntime$100 extends PptxHandlerRuntime$101 {
|
|
4322
4048
|
/**
|
|
4323
4049
|
* Parse a single `a:hlinkClick` or `a:hlinkHover` node into a `PptxAction`.
|
|
4324
4050
|
*/
|
|
@@ -4373,7 +4099,7 @@ interface MediaTimingData {
|
|
|
4373
4099
|
*/
|
|
4374
4100
|
mediaEmbedPath?: string;
|
|
4375
4101
|
}
|
|
4376
|
-
declare class PptxHandlerRuntime$
|
|
4102
|
+
declare class PptxHandlerRuntime$99 extends PptxHandlerRuntime$100 {
|
|
4377
4103
|
/**
|
|
4378
4104
|
* Extract image recolour/brightness/contrast/artistic effects from blip extensions.
|
|
4379
4105
|
*/
|
|
@@ -4413,7 +4139,7 @@ declare class PptxHandlerRuntime$97 extends PptxHandlerRuntime$98 {
|
|
|
4413
4139
|
}
|
|
4414
4140
|
//#endregion
|
|
4415
4141
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeMediaTimingParsing.d.ts
|
|
4416
|
-
declare class PptxHandlerRuntime$
|
|
4142
|
+
declare class PptxHandlerRuntime$98 extends PptxHandlerRuntime$99 {
|
|
4417
4143
|
/**
|
|
4418
4144
|
* Recursively walk the timing tree looking for `p:video` and `p:audio`
|
|
4419
4145
|
* nodes that contain `p:cMediaNode`.
|
|
@@ -4446,7 +4172,7 @@ declare class PptxHandlerRuntime$96 extends PptxHandlerRuntime$97 {
|
|
|
4446
4172
|
}
|
|
4447
4173
|
//#endregion
|
|
4448
4174
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeMediaData.d.ts
|
|
4449
|
-
declare class PptxHandlerRuntime$
|
|
4175
|
+
declare class PptxHandlerRuntime$97 extends PptxHandlerRuntime$98 {
|
|
4450
4176
|
/** Forward declaration implemented later in the runtime inheritance chain. */
|
|
4451
4177
|
protected resolveThemeColor(_schemeKey: string): string | undefined;
|
|
4452
4178
|
/**
|
|
@@ -4492,7 +4218,7 @@ declare class PptxHandlerRuntime$95 extends PptxHandlerRuntime$96 {
|
|
|
4492
4218
|
}
|
|
4493
4219
|
//#endregion
|
|
4494
4220
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeDocProperties.d.ts
|
|
4495
|
-
declare class PptxHandlerRuntime$
|
|
4221
|
+
declare class PptxHandlerRuntime$96 extends PptxHandlerRuntime$97 {
|
|
4496
4222
|
protected buildRelativeTargetPath(fromPartPath: string, toPartPath: string): string;
|
|
4497
4223
|
protected setMasterThemeRelationship(masterPath: string, themePath: string): Promise<void>;
|
|
4498
4224
|
setPresentationTheme(themePath: string, applyToAllMasters?: boolean): Promise<void>;
|
|
@@ -4547,7 +4273,7 @@ declare class PptxHandlerRuntime$94 extends PptxHandlerRuntime$95 {
|
|
|
4547
4273
|
}
|
|
4548
4274
|
//#endregion
|
|
4549
4275
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSlideMasters.d.ts
|
|
4550
|
-
declare class PptxHandlerRuntime$
|
|
4276
|
+
declare class PptxHandlerRuntime$95 extends PptxHandlerRuntime$96 {
|
|
4551
4277
|
/**
|
|
4552
4278
|
* Parse background colour from a `p:bg` node.
|
|
4553
4279
|
*/
|
|
@@ -4592,7 +4318,7 @@ declare class PptxHandlerRuntime$93 extends PptxHandlerRuntime$94 {
|
|
|
4592
4318
|
}
|
|
4593
4319
|
//#endregion
|
|
4594
4320
|
//#region pptx/core/core/runtime/PptxHandlerRuntimePresentationProps.d.ts
|
|
4595
|
-
declare class PptxHandlerRuntime$
|
|
4321
|
+
declare class PptxHandlerRuntime$94 extends PptxHandlerRuntime$95 {
|
|
4596
4322
|
/**
|
|
4597
4323
|
* Forward declaration - implemented in PptxHandlerRuntimeTextStyleUtils.
|
|
4598
4324
|
* Resolves `+mj-lt` / `+mn-lt` theme font tokens to the theme typeface.
|
|
@@ -4651,7 +4377,7 @@ interface EmbedTransitionSoundContext {
|
|
|
4651
4377
|
slideAudioRelationshipType: string;
|
|
4652
4378
|
slideId: string;
|
|
4653
4379
|
}
|
|
4654
|
-
declare class PptxHandlerRuntime$
|
|
4380
|
+
declare class PptxHandlerRuntime$93 extends PptxHandlerRuntime$94 {
|
|
4655
4381
|
protected createEmptySlideXml(): XmlObject;
|
|
4656
4382
|
protected deepCloneXml(value: XmlObject | undefined): XmlObject | undefined;
|
|
4657
4383
|
protected findSourceSlidePath(requestedSourcePath: string | undefined): string | undefined;
|
|
@@ -4701,18 +4427,18 @@ declare class PptxHandlerRuntime$91 extends PptxHandlerRuntime$92 {
|
|
|
4701
4427
|
}
|
|
4702
4428
|
//#endregion
|
|
4703
4429
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveRunProperties.d.ts
|
|
4704
|
-
declare class PptxHandlerRuntime$
|
|
4430
|
+
declare class PptxHandlerRuntime$92 extends PptxHandlerRuntime$93 {
|
|
4705
4431
|
protected createRunPropertiesFromTextStyle(style: TextStyle | undefined, resolveHyperlinkRelationshipId?: (target: string) => string | undefined): XmlObject | undefined;
|
|
4706
4432
|
private applyHyperlinkExtraAttrs;
|
|
4707
4433
|
}
|
|
4708
4434
|
//#endregion
|
|
4709
4435
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveParagraphs.d.ts
|
|
4710
|
-
declare class PptxHandlerRuntime$
|
|
4436
|
+
declare class PptxHandlerRuntime$91 extends PptxHandlerRuntime$92 {
|
|
4711
4437
|
protected createParagraphsFromTextContent(text: string | undefined, textStyle: TextStyle | undefined, textSegments: TextSegment[] | undefined, resolveHyperlinkRelationshipId?: (target: string) => string | undefined): XmlObject[];
|
|
4712
4438
|
}
|
|
4713
4439
|
//#endregion
|
|
4714
4440
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveElements.d.ts
|
|
4715
|
-
declare class PptxHandlerRuntime$
|
|
4441
|
+
declare class PptxHandlerRuntime$90 extends PptxHandlerRuntime$91 {
|
|
4716
4442
|
protected updateNotesXmlText(notesXmlObj: XmlObject, notesText: string | undefined, notesSegments?: TextSegment[]): boolean;
|
|
4717
4443
|
protected createPictureXml(el: PptxImageLikeElement, relationshipId: string): XmlObject;
|
|
4718
4444
|
protected createMediaGraphicFrameXml(el: MediaPptxElement, relationshipId: string): XmlObject;
|
|
@@ -4742,7 +4468,7 @@ interface GroupOwnEmuOverride {
|
|
|
4742
4468
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveShapeXml.d.ts
|
|
4743
4469
|
/** The save context a group child needs to serialise like a top-level shape. */
|
|
4744
4470
|
type GroupChildSaveContext = SaveSlideContext;
|
|
4745
|
-
declare class PptxHandlerRuntime$
|
|
4471
|
+
declare class PptxHandlerRuntime$89 extends PptxHandlerRuntime$90 {
|
|
4746
4472
|
/** See `save-shape-xml-frames.ts`'s `buildTableGraphicFrameXml`. */
|
|
4747
4473
|
protected createTableGraphicFrameXml(el: TablePptxElement): XmlObject;
|
|
4748
4474
|
/** See `save-shape-xml-frames.ts`'s `buildChartGraphicFrameXml`. */
|
|
@@ -4796,7 +4522,7 @@ declare class PptxHandlerRuntime$87 extends PptxHandlerRuntime$88 {
|
|
|
4796
4522
|
}
|
|
4797
4523
|
//#endregion
|
|
4798
4524
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveImageEffects.d.ts
|
|
4799
|
-
declare class PptxHandlerRuntime$
|
|
4525
|
+
declare class PptxHandlerRuntime$88 extends PptxHandlerRuntime$89 {
|
|
4800
4526
|
protected clampCropForSave(value: unknown): number;
|
|
4801
4527
|
/** See {@link buildSrcRectXml} (issue G2: signed crop insets). */
|
|
4802
4528
|
protected applyImageCropToBlipFill(blipFill: XmlObject | undefined, element: PptxImageLikeElement): void;
|
|
@@ -4821,7 +4547,7 @@ declare class PptxHandlerRuntime$86 extends PptxHandlerRuntime$87 {
|
|
|
4821
4547
|
}
|
|
4822
4548
|
//#endregion
|
|
4823
4549
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeTextStyleUtils.d.ts
|
|
4824
|
-
declare class PptxHandlerRuntime$
|
|
4550
|
+
declare class PptxHandlerRuntime$87 extends PptxHandlerRuntime$88 {
|
|
4825
4551
|
/**
|
|
4826
4552
|
* Resolve the automatic per-script fallback face for a run's text from the
|
|
4827
4553
|
* theme's `<a:font script="...">` overrides (#83). Body (minor) fonts win
|
|
@@ -4856,7 +4582,7 @@ declare class PptxHandlerRuntime$85 extends PptxHandlerRuntime$86 {
|
|
|
4856
4582
|
}
|
|
4857
4583
|
//#endregion
|
|
4858
4584
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeTextRunEffects.d.ts
|
|
4859
|
-
declare class PptxHandlerRuntime$
|
|
4585
|
+
declare class PptxHandlerRuntime$86 extends PptxHandlerRuntime$87 {
|
|
4860
4586
|
/**
|
|
4861
4587
|
* Parse hyperlink-related properties (a:hlinkClick, a:hlinkMouseOver) from
|
|
4862
4588
|
* run-level XML and apply them to the given TextStyle.
|
|
@@ -4885,7 +4611,7 @@ declare class PptxHandlerRuntime$84 extends PptxHandlerRuntime$85 {
|
|
|
4885
4611
|
}
|
|
4886
4612
|
//#endregion
|
|
4887
4613
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeTextRunStyleExtraction.d.ts
|
|
4888
|
-
declare class PptxHandlerRuntime$
|
|
4614
|
+
declare class PptxHandlerRuntime$85 extends PptxHandlerRuntime$86 {
|
|
4889
4615
|
protected extractTextRunStyle(runProperties: XmlObject | undefined, align: TextStyle['align'], relationshipMap?: Map<string, string>, includeDefaultAlignment?: boolean, slidePath?: string): TextStyle;
|
|
4890
4616
|
/**
|
|
4891
4617
|
* Copy `@panose` / `@pitchFamily` / `@charset` from a font child node
|
|
@@ -4896,7 +4622,7 @@ declare class PptxHandlerRuntime$83 extends PptxHandlerRuntime$84 {
|
|
|
4896
4622
|
}
|
|
4897
4623
|
//#endregion
|
|
4898
4624
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeTextEditing.d.ts
|
|
4899
|
-
declare class PptxHandlerRuntime$
|
|
4625
|
+
declare class PptxHandlerRuntime$84 extends PptxHandlerRuntime$85 {
|
|
4900
4626
|
protected extractTextSegmentsFromTxBodyForRewrite(txBody: XmlObject | undefined, baseStyle: TextStyle | undefined, relationshipMap?: Map<string, string>): TextSegment[];
|
|
4901
4627
|
protected remapEditedTextToExistingStyles(existingSegments: TextSegment[], nextText: string, fallbackStyle: TextStyle | undefined): TextSegment[];
|
|
4902
4628
|
}
|
|
@@ -5098,7 +4824,7 @@ interface LayoutPlaceholderSlot {
|
|
|
5098
4824
|
* reposition the matched ones, keep content the new layout has no slot for,
|
|
5099
4825
|
* and inject empty placeholders that exist only in the target layout.
|
|
5100
4826
|
*/
|
|
5101
|
-
declare class PptxHandlerRuntime$
|
|
4827
|
+
declare class PptxHandlerRuntime$83 extends PptxHandlerRuntime$84 {
|
|
5102
4828
|
/**
|
|
5103
4829
|
* Read placeholder info from a `p:nvPr` XML node.
|
|
5104
4830
|
*
|
|
@@ -5175,7 +4901,7 @@ declare class PptxHandlerRuntime$81 extends PptxHandlerRuntime$82 {
|
|
|
5175
4901
|
}
|
|
5176
4902
|
//#endregion
|
|
5177
4903
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveTableStyles.d.ts
|
|
5178
|
-
declare class PptxHandlerRuntime$
|
|
4904
|
+
declare class PptxHandlerRuntime$82 extends PptxHandlerRuntime$83 {
|
|
5179
4905
|
/**
|
|
5180
4906
|
* Write plain text into a table cell's txBody, preserving
|
|
5181
4907
|
* existing run properties where possible.
|
|
@@ -5190,7 +4916,7 @@ declare class PptxHandlerRuntime$80 extends PptxHandlerRuntime$81 {
|
|
|
5190
4916
|
}
|
|
5191
4917
|
//#endregion
|
|
5192
4918
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeChartUserShapes.d.ts
|
|
5193
|
-
declare class PptxHandlerRuntime$
|
|
4919
|
+
declare class PptxHandlerRuntime$81 extends PptxHandlerRuntime$82 {
|
|
5194
4920
|
/**
|
|
5195
4921
|
* Reconcile a chart's `c:userShapes` reference and drawing part against
|
|
5196
4922
|
* the current `chartData.userShapes` typed model, writing a new or
|
|
@@ -5226,7 +4952,7 @@ declare class PptxHandlerRuntime$79 extends PptxHandlerRuntime$80 {
|
|
|
5226
4952
|
}
|
|
5227
4953
|
//#endregion
|
|
5228
4954
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveDataSerialization.d.ts
|
|
5229
|
-
declare class PptxHandlerRuntime$
|
|
4955
|
+
declare class PptxHandlerRuntime$80 extends PptxHandlerRuntime$81 {
|
|
5230
4956
|
/**
|
|
5231
4957
|
* Serialise modified `PptxTableData` back into the graphic frame's
|
|
5232
4958
|
* raw XML so that the round-tripped file preserves edits.
|
|
@@ -5241,6 +4967,8 @@ declare class PptxHandlerRuntime$78 extends PptxHandlerRuntime$79 {
|
|
|
5241
4967
|
* Record `chartData` as parsed, straight off `enrichChartData`, as this
|
|
5242
4968
|
* chart's load-time baseline. See {@link chartDataBaselines}.
|
|
5243
4969
|
*/
|
|
4970
|
+
/** The element formats the original chart part authors (see `chart-element-format-read-xml`). */
|
|
4971
|
+
private readAuthoredChartElementFormats;
|
|
5244
4972
|
protected rememberChartDataBaseline(chartData: PptxChartData): void;
|
|
5245
4973
|
/**
|
|
5246
4974
|
* Collect chart data for deferred async processing during save.
|
|
@@ -5342,7 +5070,7 @@ declare class PptxHandlerRuntime$78 extends PptxHandlerRuntime$79 {
|
|
|
5342
5070
|
}
|
|
5343
5071
|
//#endregion
|
|
5344
5072
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveDocumentParts.d.ts
|
|
5345
|
-
declare class PptxHandlerRuntime$
|
|
5073
|
+
declare class PptxHandlerRuntime$79 extends PptxHandlerRuntime$80 {
|
|
5346
5074
|
/** Pending SmartArt data updates to process during save. */
|
|
5347
5075
|
protected pendingSmartArtUpdates?: Array<{
|
|
5348
5076
|
element: SmartArtPptxElement;
|
|
@@ -5465,7 +5193,7 @@ declare class PptxHandlerRuntime$77 extends PptxHandlerRuntime$78 {
|
|
|
5465
5193
|
}
|
|
5466
5194
|
//#endregion
|
|
5467
5195
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSavePresPropsAndSignatures.d.ts
|
|
5468
|
-
declare class PptxHandlerRuntime$
|
|
5196
|
+
declare class PptxHandlerRuntime$78 extends PptxHandlerRuntime$79 {
|
|
5469
5197
|
protected applyPresentationPropertiesPart(properties: PptxPresentationProperties | undefined): Promise<void>;
|
|
5470
5198
|
/**
|
|
5471
5199
|
* Strip digital signature parts from the ZIP if the document was signed.
|
|
@@ -5475,7 +5203,7 @@ declare class PptxHandlerRuntime$76 extends PptxHandlerRuntime$77 {
|
|
|
5475
5203
|
}
|
|
5476
5204
|
//#endregion
|
|
5477
5205
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveMediaTimingWrite.d.ts
|
|
5478
|
-
declare class PptxHandlerRuntime$
|
|
5206
|
+
declare class PptxHandlerRuntime$77 extends PptxHandlerRuntime$78 {
|
|
5479
5207
|
protected collectMediaElements(elements: PptxElement[], output: MediaPptxElement[]): void;
|
|
5480
5208
|
protected getShapeIdFromRawXml(rawXml: XmlObject | undefined): string | undefined;
|
|
5481
5209
|
protected applyMediaTimingToTimingTree(node: XmlObject, mediaByShapeId: Map<string, MediaPptxElement>): void;
|
|
@@ -5502,7 +5230,7 @@ declare class PptxHandlerRuntime$75 extends PptxHandlerRuntime$76 {
|
|
|
5502
5230
|
}
|
|
5503
5231
|
//#endregion
|
|
5504
5232
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveXmlHelpers.d.ts
|
|
5505
|
-
declare class PptxHandlerRuntime$
|
|
5233
|
+
declare class PptxHandlerRuntime$76 extends PptxHandlerRuntime$77 {
|
|
5506
5234
|
/**
|
|
5507
5235
|
* Recursively walk an XML object tree and deduplicate extension list entries
|
|
5508
5236
|
* by `@_uri`. When multiple `a:ext` or `p:ext` entries share the same URI,
|
|
@@ -5525,7 +5253,7 @@ declare class PptxHandlerRuntime$74 extends PptxHandlerRuntime$75 {
|
|
|
5525
5253
|
}
|
|
5526
5254
|
//#endregion
|
|
5527
5255
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveShapeStyleWriter.d.ts
|
|
5528
|
-
declare class PptxHandlerRuntime$
|
|
5256
|
+
declare class PptxHandlerRuntime$75 extends PptxHandlerRuntime$76 {
|
|
5529
5257
|
/**
|
|
5530
5258
|
* Serialize shape fill, stroke, dash, arrows, line join/cap/compound,
|
|
5531
5259
|
* and line-level effects to the given spPr XML object.
|
|
@@ -5564,7 +5292,7 @@ declare class PptxHandlerRuntime$73 extends PptxHandlerRuntime$74 {
|
|
|
5564
5292
|
}
|
|
5565
5293
|
//#endregion
|
|
5566
5294
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveEffectsWriter.d.ts
|
|
5567
|
-
declare class PptxHandlerRuntime$
|
|
5295
|
+
declare class PptxHandlerRuntime$74 extends PptxHandlerRuntime$75 {
|
|
5568
5296
|
/**
|
|
5569
5297
|
* Serialize visual effects (shadow, glow, reflection, blur, soft edge),
|
|
5570
5298
|
* effectDag, 3D scene, and 3D shape properties to the given spPr XML object.
|
|
@@ -5579,7 +5307,7 @@ declare class PptxHandlerRuntime$72 extends PptxHandlerRuntime$73 {
|
|
|
5579
5307
|
}
|
|
5580
5308
|
//#endregion
|
|
5581
5309
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveTextWriter.d.ts
|
|
5582
|
-
declare class PptxHandlerRuntime$
|
|
5310
|
+
declare class PptxHandlerRuntime$73 extends PptxHandlerRuntime$74 {
|
|
5583
5311
|
/**
|
|
5584
5312
|
* Build and write the text body (`p:txBody`) for shapes, text boxes,
|
|
5585
5313
|
* and connectors that carry text content.
|
|
@@ -5651,7 +5379,7 @@ interface SaveSlideContext {
|
|
|
5651
5379
|
*/
|
|
5652
5380
|
readonly preserveGroupChildSpace?: GroupChildSpaceOwner;
|
|
5653
5381
|
}
|
|
5654
|
-
declare class PptxHandlerRuntime$
|
|
5382
|
+
declare class PptxHandlerRuntime$72 extends PptxHandlerRuntime$73 {
|
|
5655
5383
|
/** Serialize table, chart, and SmartArt data when applicable. */
|
|
5656
5384
|
protected applyDataSerialization(shape: XmlObject, el: PptxElement, slideId: string): void;
|
|
5657
5385
|
/** Apply image crop, effects, and alt text for picture/image elements. */
|
|
@@ -5665,7 +5393,7 @@ declare class PptxHandlerRuntime$70 extends PptxHandlerRuntime$71 {
|
|
|
5665
5393
|
}
|
|
5666
5394
|
//#endregion
|
|
5667
5395
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveSmartArtFabrication.d.ts
|
|
5668
|
-
declare class PptxHandlerRuntime$
|
|
5396
|
+
declare class PptxHandlerRuntime$71 extends PptxHandlerRuntime$72 {
|
|
5669
5397
|
/** Content-type overrides queued for diagram parts fabricated this save. */
|
|
5670
5398
|
protected pendingDiagramContentTypes?: Array<{
|
|
5671
5399
|
partName: string;
|
|
@@ -5704,7 +5432,7 @@ interface PendingOleContentUpdate {
|
|
|
5704
5432
|
* fresh by `createOleElementWithPayload` (`PptxHandlerRuntimeSaveOleEmbedding.ts`),
|
|
5705
5433
|
* which already embeds whatever `oleEmbeddedData` holds at save time.
|
|
5706
5434
|
*/
|
|
5707
|
-
declare class PptxHandlerRuntime$
|
|
5435
|
+
declare class PptxHandlerRuntime$70 extends PptxHandlerRuntime$71 {
|
|
5708
5436
|
protected pendingOleContentUpdates?: PendingOleContentUpdate[];
|
|
5709
5437
|
private nextOlePreviewImageIndex?;
|
|
5710
5438
|
private nextOlePreviewImagePath;
|
|
@@ -5722,7 +5450,7 @@ declare class PptxHandlerRuntime$68 extends PptxHandlerRuntime$69 {
|
|
|
5722
5450
|
}
|
|
5723
5451
|
//#endregion
|
|
5724
5452
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveOleEmbedding.d.ts
|
|
5725
|
-
declare class PptxHandlerRuntime$
|
|
5453
|
+
declare class PptxHandlerRuntime$69 extends PptxHandlerRuntime$70 {
|
|
5726
5454
|
private pendingOleContentTypes?;
|
|
5727
5455
|
private nextOleEmbeddingPath;
|
|
5728
5456
|
/** Write an SDK-authored OLE payload and return its graphic-frame envelope. */
|
|
@@ -5732,7 +5460,7 @@ declare class PptxHandlerRuntime$67 extends PptxHandlerRuntime$68 {
|
|
|
5732
5460
|
}
|
|
5733
5461
|
//#endregion
|
|
5734
5462
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveZoom.d.ts
|
|
5735
|
-
declare class PptxHandlerRuntime$
|
|
5463
|
+
declare class PptxHandlerRuntime$68 extends PptxHandlerRuntime$69 {
|
|
5736
5464
|
protected readonly newZoomFallbackByXml: Map<XmlObject, XmlObject>;
|
|
5737
5465
|
/** Update an existing slide Zoom or build a new Office 2016 Zoom node. */
|
|
5738
5466
|
protected createOrUpdateSlideZoomXml(el: ZoomPptxElement, shape: XmlObject | undefined, ctx: SaveSlideContext): XmlObject | undefined;
|
|
@@ -5751,7 +5479,7 @@ declare class PptxHandlerRuntime$66 extends PptxHandlerRuntime$67 {
|
|
|
5751
5479
|
}
|
|
5752
5480
|
//#endregion
|
|
5753
5481
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveSectionZoom.d.ts
|
|
5754
|
-
declare class PptxHandlerRuntime$
|
|
5482
|
+
declare class PptxHandlerRuntime$67 extends PptxHandlerRuntime$68 {
|
|
5755
5483
|
/** Dispatch typed Zoom elements to their distinct slide/section envelopes. */
|
|
5756
5484
|
protected createOrUpdateZoomXml(el: ZoomPptxElement, shape: XmlObject | undefined, ctx: SaveSlideContext): XmlObject | undefined;
|
|
5757
5485
|
private createOrUpdateSectionZoomXml;
|
|
@@ -5759,7 +5487,7 @@ declare class PptxHandlerRuntime$65 extends PptxHandlerRuntime$66 {
|
|
|
5759
5487
|
}
|
|
5760
5488
|
//#endregion
|
|
5761
5489
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveSummaryZoom.d.ts
|
|
5762
|
-
declare class PptxHandlerRuntime$
|
|
5490
|
+
declare class PptxHandlerRuntime$66 extends PptxHandlerRuntime$67 {
|
|
5763
5491
|
/** Dispatch Summary Zoom containers without conflating them with Section Zoom tiles. */
|
|
5764
5492
|
protected createOrUpdateZoomXml(el: ZoomPptxElement, shape: XmlObject | undefined, ctx: SaveSlideContext): XmlObject | undefined;
|
|
5765
5493
|
private createOrUpdateSummaryZoomXml;
|
|
@@ -5773,7 +5501,7 @@ declare class PptxHandlerRuntime$64 extends PptxHandlerRuntime$65 {
|
|
|
5773
5501
|
}
|
|
5774
5502
|
//#endregion
|
|
5775
5503
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveModel3D.d.ts
|
|
5776
|
-
declare class PptxHandlerRuntime$
|
|
5504
|
+
declare class PptxHandlerRuntime$65 extends PptxHandlerRuntime$66 {
|
|
5777
5505
|
private readonly newModel3DFallbackByXml;
|
|
5778
5506
|
/** Create or update an embedded GLB model, its poster, and package relationships. */
|
|
5779
5507
|
protected createOrUpdateModel3DXml(el: Model3DPptxElement, shape: XmlObject | undefined, ctx: SaveSlideContext): XmlObject | undefined;
|
|
@@ -5788,7 +5516,7 @@ declare class PptxHandlerRuntime$63 extends PptxHandlerRuntime$64 {
|
|
|
5788
5516
|
}
|
|
5789
5517
|
//#endregion
|
|
5790
5518
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveContentPartInk.d.ts
|
|
5791
|
-
declare class PptxHandlerRuntime$
|
|
5519
|
+
declare class PptxHandlerRuntime$64 extends PptxHandlerRuntime$65 {
|
|
5792
5520
|
private readonly newContentPartFallbackByXml;
|
|
5793
5521
|
/**
|
|
5794
5522
|
* Convert a Draw-tab pen/highlighter element (no `rawXml`) into the
|
|
@@ -5832,7 +5560,7 @@ interface SlideShapeCollectors {
|
|
|
5832
5560
|
readonly contentParts: XmlObject[];
|
|
5833
5561
|
readonly zooms: XmlObject[];
|
|
5834
5562
|
}
|
|
5835
|
-
declare class PptxHandlerRuntime$
|
|
5563
|
+
declare class PptxHandlerRuntime$63 extends PptxHandlerRuntime$64 {
|
|
5836
5564
|
private static readonly CHART_COLOR_CONTENT_TYPE;
|
|
5837
5565
|
private static readonly CHART_COLOR_REL_TYPE;
|
|
5838
5566
|
private static readonly CHART_EX_CONTENT_TYPE;
|
|
@@ -5983,7 +5711,7 @@ declare class PptxHandlerRuntime$61 extends PptxHandlerRuntime$62 {
|
|
|
5983
5711
|
}
|
|
5984
5712
|
//#endregion
|
|
5985
5713
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveSlideWriter.d.ts
|
|
5986
|
-
declare class PptxHandlerRuntime$
|
|
5714
|
+
declare class PptxHandlerRuntime$62 extends PptxHandlerRuntime$63 {
|
|
5987
5715
|
protected resolveModernCommentAuthorId(comment: PptxComment): string;
|
|
5988
5716
|
protected nextModernCommentPartPath(): string;
|
|
5989
5717
|
private createModernCommentAuthorId;
|
|
@@ -6073,7 +5801,7 @@ declare class PptxHandlerRuntime$60 extends PptxHandlerRuntime$61 {
|
|
|
6073
5801
|
* save pipeline to regenerate the theme part instead of re-emitting the
|
|
6074
5802
|
* original XML.
|
|
6075
5803
|
*/
|
|
6076
|
-
declare class PptxHandlerRuntime$
|
|
5804
|
+
declare class PptxHandlerRuntime$61 extends PptxHandlerRuntime$62 {
|
|
6077
5805
|
/**
|
|
6078
5806
|
* Mark a theme path as dirty so the save pipeline will regenerate
|
|
6079
5807
|
* the theme XML from in-memory state. Optional — without this the
|
|
@@ -6145,7 +5873,7 @@ declare class PptxHandlerRuntime$59 extends PptxHandlerRuntime$60 {
|
|
|
6145
5873
|
}
|
|
6146
5874
|
//#endregion
|
|
6147
5875
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveSlideMaster.d.ts
|
|
6148
|
-
declare class PptxHandlerRuntime$
|
|
5876
|
+
declare class PptxHandlerRuntime$60 extends PptxHandlerRuntime$61 {
|
|
6149
5877
|
/**
|
|
6150
5878
|
* Apply typed mutations from the supplied {@link PptxSlideMaster} array
|
|
6151
5879
|
* to each master's cached XmlObject. Called by the save pipeline before
|
|
@@ -6156,7 +5884,7 @@ declare class PptxHandlerRuntime$58 extends PptxHandlerRuntime$59 {
|
|
|
6156
5884
|
}
|
|
6157
5885
|
//#endregion
|
|
6158
5886
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveSlideLayout.d.ts
|
|
6159
|
-
declare class PptxHandlerRuntime$
|
|
5887
|
+
declare class PptxHandlerRuntime$59 extends PptxHandlerRuntime$60 {
|
|
6160
5888
|
/**
|
|
6161
5889
|
* Apply typed mutations from the supplied {@link PptxSlideLayout} array
|
|
6162
5890
|
* to each layout's cached XmlObject. Called by the save pipeline before
|
|
@@ -6180,7 +5908,7 @@ declare class PptxHandlerRuntime$57 extends PptxHandlerRuntime$58 {
|
|
|
6180
5908
|
}
|
|
6181
5909
|
//#endregion
|
|
6182
5910
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveMasterElements.d.ts
|
|
6183
|
-
declare class PptxHandlerRuntime$
|
|
5911
|
+
declare class PptxHandlerRuntime$58 extends PptxHandlerRuntime$59 {
|
|
6184
5912
|
/**
|
|
6185
5913
|
* Persist Slide Master view edits to every master and layout the caller
|
|
6186
5914
|
* handed back, then let the pipeline's passthrough flush emit them.
|
|
@@ -6220,7 +5948,7 @@ declare class PptxHandlerRuntime$56 extends PptxHandlerRuntime$57 {
|
|
|
6220
5948
|
}
|
|
6221
5949
|
//#endregion
|
|
6222
5950
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveNotesMaster.d.ts
|
|
6223
|
-
declare class PptxHandlerRuntime$
|
|
5951
|
+
declare class PptxHandlerRuntime$57 extends PptxHandlerRuntime$58 {
|
|
6224
5952
|
/**
|
|
6225
5953
|
* Apply clrMap and headerFooter mutations to the notes master XML.
|
|
6226
5954
|
* Background-colour mutations are still handled by the pre-existing
|
|
@@ -6232,7 +5960,7 @@ declare class PptxHandlerRuntime$55 extends PptxHandlerRuntime$56 {
|
|
|
6232
5960
|
}
|
|
6233
5961
|
//#endregion
|
|
6234
5962
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveHandoutMaster.d.ts
|
|
6235
|
-
declare class PptxHandlerRuntime$
|
|
5963
|
+
declare class PptxHandlerRuntime$56 extends PptxHandlerRuntime$57 {
|
|
6236
5964
|
/**
|
|
6237
5965
|
* Apply clrMap and headerFooter mutations to the handout master XML.
|
|
6238
5966
|
*/
|
|
@@ -6240,7 +5968,7 @@ declare class PptxHandlerRuntime$54 extends PptxHandlerRuntime$55 {
|
|
|
6240
5968
|
}
|
|
6241
5969
|
//#endregion
|
|
6242
5970
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveViewProperties.d.ts
|
|
6243
|
-
declare class PptxHandlerRuntime$
|
|
5971
|
+
declare class PptxHandlerRuntime$55 extends PptxHandlerRuntime$56 {
|
|
6244
5972
|
/**
|
|
6245
5973
|
* Re-emit `ppt/viewProps.xml` from the typed view properties. Walks
|
|
6246
5974
|
* `presentation.xml.rels` to find the viewProps target so non-default
|
|
@@ -6270,7 +5998,7 @@ declare class PptxHandlerRuntime$53 extends PptxHandlerRuntime$54 {
|
|
|
6270
5998
|
}
|
|
6271
5999
|
//#endregion
|
|
6272
6000
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveNotesInfrastructure.d.ts
|
|
6273
|
-
declare class PptxHandlerRuntime$
|
|
6001
|
+
declare class PptxHandlerRuntime$54 extends PptxHandlerRuntime$55 {
|
|
6274
6002
|
/** Ensure authored notes have the global notes-master OPC infrastructure. */
|
|
6275
6003
|
protected ensureNotesMasterForAuthoredNotes(slides: readonly PptxSlide[], constants: PptxSaveConstants): Promise<void>;
|
|
6276
6004
|
private buildDefaultNotesMaster;
|
|
@@ -6278,7 +6006,7 @@ declare class PptxHandlerRuntime$52 extends PptxHandlerRuntime$53 {
|
|
|
6278
6006
|
}
|
|
6279
6007
|
//#endregion
|
|
6280
6008
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSaveHandoutInfrastructure.d.ts
|
|
6281
|
-
declare class PptxHandlerRuntime$
|
|
6009
|
+
declare class PptxHandlerRuntime$53 extends PptxHandlerRuntime$54 {
|
|
6282
6010
|
/** Ensure an authored handout master has complete OPC package infrastructure. */
|
|
6283
6011
|
protected ensureHandoutMasterInfrastructure(handoutMaster: PptxHandoutMaster | undefined, constants: PptxSaveConstants): Promise<void>;
|
|
6284
6012
|
private ensureHandoutThemeRelationship;
|
|
@@ -6303,7 +6031,7 @@ type LegacyPptxSerializer = () => Promise<Uint8Array>;
|
|
|
6303
6031
|
* to resolve `media`-`audio` elements loaded from a real `.pptx` (see
|
|
6304
6032
|
* `resolveAudioMediaBytes`'s doc).
|
|
6305
6033
|
*/
|
|
6306
|
-
declare class PptxHandlerRuntime$
|
|
6034
|
+
declare class PptxHandlerRuntime$52 extends PptxHandlerRuntime$53 {
|
|
6307
6035
|
/**
|
|
6308
6036
|
* A `media`-`audio` element loaded from a real `.pptx` carries only
|
|
6309
6037
|
* `mediaPath` (a lazy reference into `this.zip`), never `mediaData`
|
|
@@ -6362,7 +6090,7 @@ declare class PptxHandlerRuntime$50 extends PptxHandlerRuntime$51 {
|
|
|
6362
6090
|
* back out with it on every save. See `save-structural-id-gate.ts` for the
|
|
6363
6091
|
* decision helpers.
|
|
6364
6092
|
*/
|
|
6365
|
-
declare class PptxHandlerRuntime$
|
|
6093
|
+
declare class PptxHandlerRuntime$51 extends PptxHandlerRuntime$52 {
|
|
6366
6094
|
protected repairStructuralIdsBeforeExport(slides: PptxSlide[]): Promise<void>;
|
|
6367
6095
|
/** The loader's cached parse of a part, which the live model's `rawXml` nodes belong to. */
|
|
6368
6096
|
private cachedStructuralPart;
|
|
@@ -6371,7 +6099,7 @@ declare class PptxHandlerRuntime$49 extends PptxHandlerRuntime$50 {
|
|
|
6371
6099
|
}
|
|
6372
6100
|
//#endregion
|
|
6373
6101
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSavePipeline.d.ts
|
|
6374
|
-
declare class PptxHandlerRuntime$
|
|
6102
|
+
declare class PptxHandlerRuntime$50 extends PptxHandlerRuntime$51 {
|
|
6375
6103
|
/**
|
|
6376
6104
|
* Resolve the effective conformance class for this save operation.
|
|
6377
6105
|
*
|
|
@@ -6405,7 +6133,7 @@ declare class PptxHandlerRuntime$48 extends PptxHandlerRuntime$49 {
|
|
|
6405
6133
|
}
|
|
6406
6134
|
//#endregion
|
|
6407
6135
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeElementParsing.d.ts
|
|
6408
|
-
declare class PptxHandlerRuntime$
|
|
6136
|
+
declare class PptxHandlerRuntime$49 extends PptxHandlerRuntime$50 {
|
|
6409
6137
|
/**
|
|
6410
6138
|
* Parse media data (video/audio path and MIME type) from graphic frame data.
|
|
6411
6139
|
*/
|
|
@@ -6466,7 +6194,7 @@ declare class PptxHandlerRuntime$47 extends PptxHandlerRuntime$48 {
|
|
|
6466
6194
|
}
|
|
6467
6195
|
//#endregion
|
|
6468
6196
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeZoomParsing.d.ts
|
|
6469
|
-
declare class PptxHandlerRuntime$
|
|
6197
|
+
declare class PptxHandlerRuntime$48 extends PptxHandlerRuntime$49 {
|
|
6470
6198
|
/** Parse an Office 2016 `pslz:sldZm` slide Zoom object. */
|
|
6471
6199
|
protected parseSlideZoomElement(zoom: XmlObject, id: string, slidePath: string): Promise<PptxElement | null>;
|
|
6472
6200
|
protected findSlideIndexByNumericId(value: unknown): number;
|
|
@@ -6481,13 +6209,13 @@ declare class PptxHandlerRuntime$46 extends PptxHandlerRuntime$47 {
|
|
|
6481
6209
|
}
|
|
6482
6210
|
//#endregion
|
|
6483
6211
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSectionZoomParsing.d.ts
|
|
6484
|
-
declare class PptxHandlerRuntime$
|
|
6212
|
+
declare class PptxHandlerRuntime$47 extends PptxHandlerRuntime$48 {
|
|
6485
6213
|
/** Parse an Office 2016 `psezm:sectionZm` section Zoom object. */
|
|
6486
6214
|
protected parseSectionZoomElement(zoom: XmlObject, id: string, slidePath: string): Promise<PptxElement | null>;
|
|
6487
6215
|
}
|
|
6488
6216
|
//#endregion
|
|
6489
6217
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeSummaryZoomParsing.d.ts
|
|
6490
|
-
declare class PptxHandlerRuntime$
|
|
6218
|
+
declare class PptxHandlerRuntime$46 extends PptxHandlerRuntime$47 {
|
|
6491
6219
|
/** Parse an Office 2016 Summary Zoom container and all section tiles. */
|
|
6492
6220
|
protected parseSummaryZoomElement(zoom: XmlObject, id: string, slidePath: string): Promise<PptxElement | null>;
|
|
6493
6221
|
private parseSummaryZoomPreview;
|
|
@@ -6504,7 +6232,7 @@ interface PlaceholderNodeContext extends PlaceholderLookupContext {
|
|
|
6504
6232
|
/** The inherited graphic frame XML object from the layout/master, if any. */
|
|
6505
6233
|
graphicFrame?: XmlObject;
|
|
6506
6234
|
}
|
|
6507
|
-
declare class PptxHandlerRuntime$
|
|
6235
|
+
declare class PptxHandlerRuntime$45 extends PptxHandlerRuntime$46 {
|
|
6508
6236
|
protected findPlaceholderInShapeTree(spTree: XmlObject | undefined, expected: PlaceholderInfo | null): PlaceholderNodeContext | undefined;
|
|
6509
6237
|
private scanPlaceholderBuckets;
|
|
6510
6238
|
/**
|
|
@@ -6560,7 +6288,7 @@ declare class PptxHandlerRuntime$43 extends PptxHandlerRuntime$44 {
|
|
|
6560
6288
|
}
|
|
6561
6289
|
//#endregion
|
|
6562
6290
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeGeometryParsing.d.ts
|
|
6563
|
-
declare class PptxHandlerRuntime$
|
|
6291
|
+
declare class PptxHandlerRuntime$44 extends PptxHandlerRuntime$45 {
|
|
6564
6292
|
protected parseGeometryAdjustments(prstGeom: XmlObject | undefined): Record<string, number> | undefined;
|
|
6565
6293
|
/**
|
|
6566
6294
|
* Parse adjustment handles from `a:ahLst` in a geometry definition.
|
|
@@ -6637,7 +6365,7 @@ declare class PptxHandlerRuntime$42 extends PptxHandlerRuntime$43 {
|
|
|
6637
6365
|
}
|
|
6638
6366
|
//#endregion
|
|
6639
6367
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeShapeImageFill.d.ts
|
|
6640
|
-
declare class PptxHandlerRuntime$
|
|
6368
|
+
declare class PptxHandlerRuntime$43 extends PptxHandlerRuntime$44 {
|
|
6641
6369
|
/**
|
|
6642
6370
|
* Parse a shape that has an image fill (a:blipFill inside spPr)
|
|
6643
6371
|
* This handles shapes like rectangles filled with images (e.g., wood texture backgrounds)
|
|
@@ -6648,7 +6376,7 @@ declare class PptxHandlerRuntime$41 extends PptxHandlerRuntime$42 {
|
|
|
6648
6376
|
}
|
|
6649
6377
|
//#endregion
|
|
6650
6378
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeTextDefaults.d.ts
|
|
6651
|
-
declare class PptxHandlerRuntime$
|
|
6379
|
+
declare class PptxHandlerRuntime$42 extends PptxHandlerRuntime$43 {
|
|
6652
6380
|
/**
|
|
6653
6381
|
* Apply {@link PlaceholderDefaults} body-level properties to a
|
|
6654
6382
|
* {@link TextStyle} as fallback values (only sets fields that are
|
|
@@ -6685,7 +6413,7 @@ declare class PptxHandlerRuntime$40 extends PptxHandlerRuntime$41 {
|
|
|
6685
6413
|
//#endregion
|
|
6686
6414
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeBulletParsing.d.ts
|
|
6687
6415
|
type LevelStyleMap = Record<number, PlaceholderTextLevelStyle>;
|
|
6688
|
-
declare class PptxHandlerRuntime$
|
|
6416
|
+
declare class PptxHandlerRuntime$41 extends PptxHandlerRuntime$42 {
|
|
6689
6417
|
protected resolveParagraphBulletInfo(paragraph: XmlObject | undefined, paragraphIndex: number, txBody: XmlObject | undefined, inheritedTxBody: XmlObject | undefined, isBodyPlaceholder?: boolean, slidePath?: string, effectiveLevelStyles?: LevelStyleMap): BulletInfo | null;
|
|
6690
6418
|
protected createBulletInfoFromLevelStyle(levelStyle: PlaceholderTextLevelStyle | undefined, paragraphIndex: number): BulletInfo | null;
|
|
6691
6419
|
/**
|
|
@@ -6708,7 +6436,7 @@ declare class PptxHandlerRuntime$39 extends PptxHandlerRuntime$40 {
|
|
|
6708
6436
|
}
|
|
6709
6437
|
//#endregion
|
|
6710
6438
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeShapeBodyParsing.d.ts
|
|
6711
|
-
declare class PptxHandlerRuntime$
|
|
6439
|
+
declare class PptxHandlerRuntime$40 extends PptxHandlerRuntime$41 {
|
|
6712
6440
|
/**
|
|
6713
6441
|
* Parse `a:spLocks` attributes into a structured {@link PptxShapeLocks} object.
|
|
6714
6442
|
* Returns `undefined` when the node is absent or contains no lock attributes.
|
|
@@ -6735,7 +6463,7 @@ declare class PptxHandlerRuntime$38 extends PptxHandlerRuntime$39 {
|
|
|
6735
6463
|
}
|
|
6736
6464
|
//#endregion
|
|
6737
6465
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeShapeTextParsing.d.ts
|
|
6738
|
-
declare class PptxHandlerRuntime$
|
|
6466
|
+
declare class PptxHandlerRuntime$39 extends PptxHandlerRuntime$40 {
|
|
6739
6467
|
/**
|
|
6740
6468
|
* A copy of an `a:lstStyle` level entry without its `a:defRPr`: run
|
|
6741
6469
|
* defaults follow their own precedence chain, so only the paragraph-level
|
|
@@ -6760,1464 +6488,1852 @@ declare class PptxHandlerRuntime$37 extends PptxHandlerRuntime$38 {
|
|
|
6760
6488
|
* bring them back. Three of the five govern East-Asian line breaking and
|
|
6761
6489
|
* justification, so the loss fell hardest on CJK decks.
|
|
6762
6490
|
*
|
|
6763
|
-
* The `a:pPr` child elements likewise round-trip: `lnSpc`/`spcBef`/`spcAft`
|
|
6764
|
-
* and `tabLst` below, `defRPr` and `extLst` verbatim, and the bullet group
|
|
6765
|
-
* separately as `TextSegment.bulletInfo`.
|
|
6491
|
+
* The `a:pPr` child elements likewise round-trip: `lnSpc`/`spcBef`/`spcAft`
|
|
6492
|
+
* and `tabLst` below, `defRPr` and `extLst` verbatim, and the bullet group
|
|
6493
|
+
* separately as `TextSegment.bulletInfo`.
|
|
6494
|
+
*/
|
|
6495
|
+
protected extractParagraphOwnProperties(p: XmlObject, basisFontSize: number | undefined): TextStyle | undefined;
|
|
6496
|
+
/**
|
|
6497
|
+
* Resolve paragraph-level styles (alignment, spacing, margins, tabs,
|
|
6498
|
+
* level styles) for a single paragraph. Modifies `textStyle` in place
|
|
6499
|
+
* for "first-wins" shape-level properties.
|
|
6500
|
+
*/
|
|
6501
|
+
protected resolveShapeParagraphStyle(p: XmlObject, textStyle: TextStyle, ctx: ShapeTextParsingContext): ParagraphStyleResult;
|
|
6502
|
+
}
|
|
6503
|
+
//#endregion
|
|
6504
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeShapeParagraphContentParsing.d.ts
|
|
6505
|
+
declare class PptxHandlerRuntime$38 extends PptxHandlerRuntime$39 {
|
|
6506
|
+
/**
|
|
6507
|
+
* Collect text content (runs, fields, equations, bullets) for a single
|
|
6508
|
+
* paragraph and return text parts + segments. The returned `seedStyle`
|
|
6509
|
+
* is the style from the first concrete content (used by the caller to
|
|
6510
|
+
* seed the shape-level textStyle).
|
|
6511
|
+
*/
|
|
6512
|
+
protected collectShapeParagraphContent(p: XmlObject, pIdx: number, paraCount: number, paraAlign: TextStyle['align'], mergedDefaultRunStyle: TextStyle, ctx: ShapeTextParsingContext): ParagraphContentResult;
|
|
6513
|
+
/**
|
|
6514
|
+
* Font size (px) of the first text run in a paragraph, or `undefined` when
|
|
6515
|
+
* that first run inherits its size.
|
|
6516
|
+
*
|
|
6517
|
+
* Used as the base for unsized and percentage-sized bullets. Only `a:r`
|
|
6518
|
+
* and `a:fld` carry renderable text; `a:br` does not.
|
|
6519
|
+
*/
|
|
6520
|
+
protected resolveFirstRunFontSize(p: XmlObject, paraAlign: TextStyle['align'], ctx: ShapeTextParsingContext): number | undefined;
|
|
6521
|
+
}
|
|
6522
|
+
//#endregion
|
|
6523
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeShapeParsing.d.ts
|
|
6524
|
+
declare class PptxHandlerRuntime$37 extends PptxHandlerRuntime$38 {
|
|
6525
|
+
protected parseShape(shape: XmlObject, id: string, slidePath?: string): PptxElement | null;
|
|
6526
|
+
}
|
|
6527
|
+
//#endregion
|
|
6528
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimePictureParsing.d.ts
|
|
6529
|
+
declare class PptxHandlerRuntime$36 extends PptxHandlerRuntime$37 {
|
|
6530
|
+
protected parsePicture(pic: XmlObject, id: string, slidePath: string): Promise<PptxElement | null>;
|
|
6531
|
+
}
|
|
6532
|
+
//#endregion
|
|
6533
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeSpTreeParsing.d.ts
|
|
6534
|
+
declare class PptxHandlerRuntime$35 extends PptxHandlerRuntime$36 {
|
|
6535
|
+
/**
|
|
6536
|
+
* Known element tag names that appear as direct children of `p:spTree`
|
|
6537
|
+
* (or `p:grpSp`) and represent renderable shapes/objects.
|
|
6538
|
+
*/
|
|
6539
|
+
private static readonly ELEMENT_TAGS;
|
|
6540
|
+
/**
|
|
6541
|
+
* Extract the document-order sequence of child element types from a raw
|
|
6542
|
+
* XML string. Returns an array of `{ tag, indexInType }` entries where
|
|
6543
|
+
* `indexInType` is the 0-based occurrence index within that tag's array.
|
|
6544
|
+
*
|
|
6545
|
+
* Falls back to the default type-grouped order when `xmlStr` is unavailable.
|
|
6546
|
+
*/
|
|
6547
|
+
protected extractSpTreeChildOrder(xmlStr: string | undefined, spTree: Record<string, unknown>, containerTag: string): Array<{
|
|
6548
|
+
tag: string;
|
|
6549
|
+
indexInType: number;
|
|
6550
|
+
}>;
|
|
6551
|
+
/**
|
|
6552
|
+
* Scan the raw XML to find direct child element tags of the first
|
|
6553
|
+
* occurrence of `containerTag`.
|
|
6554
|
+
*
|
|
6555
|
+
* Also handles `mc:AlternateContent` blocks: when one is found at
|
|
6556
|
+
* depth 0, the scanner resolves the selected branch (Choice or
|
|
6557
|
+
* Fallback) and includes element tags from that branch in the
|
|
6558
|
+
* document-order sequence.
|
|
6559
|
+
*/
|
|
6560
|
+
private scanDirectChildElements;
|
|
6561
|
+
/**
|
|
6562
|
+
* Find the position of a closing tag `</tagName>` in `xmlStr` starting
|
|
6563
|
+
* from `startPos`, properly handling nesting of the same tag.
|
|
6564
|
+
* Returns the index of the `<` of the closing tag, or -1 if not found.
|
|
6565
|
+
*/
|
|
6566
|
+
private static findClosingTag;
|
|
6567
|
+
/**
|
|
6568
|
+
* Given the inner content of an mc:AlternateContent block, determine
|
|
6569
|
+
* which branch (Choice or Fallback) to use and return the element
|
|
6570
|
+
* tags found in that branch.
|
|
6571
|
+
*/
|
|
6572
|
+
private static scanAlternateContentBranch;
|
|
6573
|
+
/**
|
|
6574
|
+
* Extract direct child element tag names from a branch content string.
|
|
6575
|
+
* Only looks at depth-0 children that match known element tags.
|
|
6576
|
+
*/
|
|
6577
|
+
private static extractElementTagsFromBranch;
|
|
6578
|
+
/**
|
|
6579
|
+
* Build the legacy type-grouped order (all shapes, then all pictures,
|
|
6580
|
+
* etc.). Used as a fallback when raw XML is unavailable.
|
|
6581
|
+
*/
|
|
6582
|
+
private buildTypeGroupedOrder;
|
|
6583
|
+
/**
|
|
6584
|
+
* Parse a single element from its tag and index within the type array.
|
|
6585
|
+
*/
|
|
6586
|
+
protected parseSpTreeChild(tag: string, indexInType: number, spTree: Record<string, unknown>, slidePath: string, idPrefix: string, rawXmlStr?: string): Promise<PptxElement | null>;
|
|
6587
|
+
/**
|
|
6588
|
+
* Parse all element children from an spTree (or similar container) in
|
|
6589
|
+
* document order.
|
|
6590
|
+
*/
|
|
6591
|
+
protected parseSpTreeChildren(spTree: Record<string, unknown>, slidePath: string, xmlStr: string | undefined, containerTag: string, idPrefix?: string): Promise<PptxElement[]>;
|
|
6592
|
+
/**
|
|
6593
|
+
* Unwrap mc:AlternateContent elements within a shape tree (or group),
|
|
6594
|
+
* merging selected branch children into the parent element arrays.
|
|
6595
|
+
* Delegates to the standalone alternate-content utility.
|
|
6596
|
+
*
|
|
6597
|
+
* Records each consumed AC envelope in {@link alternateContentBlockByRawXml}
|
|
6598
|
+
* so the save layer can re-emit the original `<mc:Choice>` /
|
|
6599
|
+
* `<mc:Fallback>` shape on dirty save (CC-4).
|
|
6600
|
+
*/
|
|
6601
|
+
protected unwrapAlternateContent(container: Record<string, unknown>): void;
|
|
6602
|
+
/**
|
|
6603
|
+
* Forward declaration – implemented in PptxHandlerRuntimeGroupParsing.
|
|
6604
|
+
*
|
|
6605
|
+
* `_depth` is the group's `p:grpSp` nesting level (0 for a `p:spTree`
|
|
6606
|
+
* child); the implementation recurses into nested groups with `depth + 1`.
|
|
6607
|
+
*/
|
|
6608
|
+
protected parseGroupShapeAsGroup(_group: XmlObject, _baseId: string, _slidePath: string, _rawXmlStr?: string, _depth?: number): Promise<PptxElement | null>;
|
|
6609
|
+
}
|
|
6610
|
+
//#endregion
|
|
6611
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeGroupParsing.d.ts
|
|
6612
|
+
declare class PptxHandlerRuntime$34 extends PptxHandlerRuntime$35 {
|
|
6613
|
+
/**
|
|
6614
|
+
* Parse the children of a `<p:grpSp>` into the group's own pixel space.
|
|
6615
|
+
*
|
|
6616
|
+
* A nested `<p:grpSp>` becomes a nested {@link GroupPptxElement}, NOT a
|
|
6617
|
+
* flattened run of its descendants. Flattening kept the content but
|
|
6618
|
+
* destroyed the wrapper: its `p:cNvPr/@name`, its `p:grpSpPr` fill and
|
|
6619
|
+
* locks, its animation identity and the user-visible grouping all vanished
|
|
6620
|
+
* from the saved file, silently degrading a two-level group into one.
|
|
6621
|
+
*/
|
|
6622
|
+
protected parseGroupShape(group: XmlObject, baseId: string, slidePath: string, rawXmlStr?: string, depth?: number): Promise<PptxElement[]>;
|
|
6623
|
+
/**
|
|
6624
|
+
* Parse a p:grpSp element into a GroupPptxElement with children.
|
|
6625
|
+
* Children have coordinates relative to the group's position.
|
|
6626
|
+
*
|
|
6627
|
+
* `depth` is the group's nesting level: 0 for a `<p:spTree>` child. Only a
|
|
6628
|
+
* top-level group rounds its transform to whole pixels; a nested one stays
|
|
6629
|
+
* unrounded, because its parent is still going to map it through
|
|
6630
|
+
* `ext / chExt` and rounding first collapses a compact child space to 0.
|
|
6631
|
+
*/
|
|
6632
|
+
protected parseGroupShapeAsGroup(group: XmlObject, baseId: string, slidePath: string, rawXmlStr?: string, depth?: number): Promise<PptxElement | null>;
|
|
6633
|
+
protected extractGradientFillColor(gradFill: XmlObject): string | undefined;
|
|
6634
|
+
}
|
|
6635
|
+
//#endregion
|
|
6636
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeSlideParsing.d.ts
|
|
6637
|
+
declare class PptxHandlerRuntime$33 extends PptxHandlerRuntime$34 {
|
|
6638
|
+
/**
|
|
6639
|
+
* Parse text body from a connector shape (p:cxnSp > p:txBody).
|
|
6640
|
+
* Uses the same text run extraction logic as regular shapes but
|
|
6641
|
+
* without placeholder inheritance (connectors don't have placeholders).
|
|
6642
|
+
*/
|
|
6643
|
+
protected parseConnectorTextBody(txBody: XmlObject | undefined, slidePath?: string): ConnectorTextResult | null;
|
|
6644
|
+
protected parseSlide(slideXml: XmlObject, slidePath: string): Promise<PptxElement[]>;
|
|
6645
|
+
}
|
|
6646
|
+
//#endregion
|
|
6647
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeColorAndEffects.d.ts
|
|
6648
|
+
declare class PptxHandlerRuntime$32 extends PptxHandlerRuntime$33 {
|
|
6649
|
+
/**
|
|
6650
|
+
* Forward declaration – implemented in PptxHandlerRuntimeThemeProcessing.
|
|
6651
|
+
* Re-resolves gradient stops by substituting `phClr` with the given colour.
|
|
6652
|
+
*/
|
|
6653
|
+
protected reResolveGradientWithPhClr(_gradNode: XmlObject, _phClrValue: string): {
|
|
6654
|
+
stops: NonNullable<ShapeStyle['fillGradientStops']>;
|
|
6655
|
+
css: string | undefined;
|
|
6656
|
+
};
|
|
6657
|
+
/**
|
|
6658
|
+
* Forward declaration – implemented in PptxHandlerRuntimeThemeProcessing.
|
|
6659
|
+
* Parses a layout-level colour map override.
|
|
6660
|
+
*/
|
|
6661
|
+
protected parseLayoutClrMapOverride(_layoutXml: XmlObject): Record<string, string> | null;
|
|
6662
|
+
protected getDefaultSchemeColorMap(): Record<string, string>;
|
|
6663
|
+
protected resolveThemeColor(schemeKey: string): string | undefined;
|
|
6664
|
+
protected normalizeStrokeDashType(value: unknown): StrokeDashType | undefined;
|
|
6665
|
+
protected normalizeConnectorArrowType(value: unknown): ConnectorArrowType | undefined;
|
|
6666
|
+
protected extractBlurStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6667
|
+
protected extractEffectDagStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6668
|
+
protected extractFillOverlayStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6669
|
+
protected extractReflectionStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6670
|
+
protected extractSoftEdgeStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6671
|
+
protected extractGlowStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6672
|
+
protected extractInnerShadowStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6673
|
+
protected extractShadowStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6674
|
+
protected extractGradientFillCss(gradFill: XmlObject): string | undefined;
|
|
6675
|
+
protected buildGradientCssFromStops(stops: NonNullable<ShapeStyle['fillGradientStops']>, type: NonNullable<ShapeStyle['fillGradientType']>, angle: number): string | undefined;
|
|
6676
|
+
protected extractGradientAngle(gradFill: XmlObject): number;
|
|
6677
|
+
protected extractGradientType(gradFill: XmlObject): NonNullable<ShapeStyle['fillGradientType']>;
|
|
6678
|
+
protected extractGradientStops(gradFill: XmlObject): NonNullable<ShapeStyle['fillGradientStops']>;
|
|
6679
|
+
protected extractGradientOpacity(gradFill: XmlObject): number | undefined;
|
|
6680
|
+
protected parseColorChoice(colorChoice: XmlObject | undefined, placeholderColor?: string): string | undefined;
|
|
6681
|
+
}
|
|
6682
|
+
//#endregion
|
|
6683
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeBackgroundParsing.d.ts
|
|
6684
|
+
declare class PptxHandlerRuntime$31 extends PptxHandlerRuntime$32 {
|
|
6685
|
+
/**
|
|
6686
|
+
* Preserve the visual properties authored on a background `a:blipFill`.
|
|
6687
|
+
*
|
|
6688
|
+
* The decoded image URL alone is not enough to reproduce PowerPoint: crop,
|
|
6689
|
+
* stretch/tile placement and blip effects such as `a:alphaModFix` live next
|
|
6690
|
+
* to the relationship id and otherwise disappear during slide assembly.
|
|
6691
|
+
*/
|
|
6692
|
+
protected extractBackgroundImageProperties(slideXml: XmlObject, rootElement?: string): PptxImageProperties | undefined;
|
|
6693
|
+
protected extractBackgroundImage(slideXml: XmlObject, slidePath: string, rootElement?: string): Promise<string | undefined>;
|
|
6694
|
+
protected extractBackgroundColor(slideXml: XmlObject, rootElement?: string): string | undefined;
|
|
6695
|
+
/**
|
|
6696
|
+
* Composite a resolved background colour with its `a:alpha` (or
|
|
6697
|
+
* `a:alphaMod`/`a:alphaOff`) opacity onto opaque white.
|
|
6698
|
+
*
|
|
6699
|
+
* PowerPoint renders a semi-transparent slide/layout/master background
|
|
6700
|
+
* against white, never against whatever happens to sit behind the
|
|
6701
|
+
* viewer's stage (a white canvas, a dark presentation-mode backdrop, a
|
|
6702
|
+
* thumbnail strip). Blending once here keeps `backgroundColor` a plain
|
|
6703
|
+
* `#RRGGBB` value that looks the same on every backdrop, matching
|
|
6704
|
+
* PowerPoint rather than emitting `rgba()` and letting alpha bleed
|
|
6705
|
+
* through whatever the stage happens to be. See issue #288.
|
|
6706
|
+
*/
|
|
6707
|
+
private blendBackgroundColorOntoWhite;
|
|
6708
|
+
/**
|
|
6709
|
+
* A deep-cloned snapshot of the slide's own `<p:bgPr>`, exactly as parsed,
|
|
6710
|
+
* for the save writer to restore verbatim when nothing about the
|
|
6711
|
+
* background changed (see {@link AuthoredSlideBackground.rawBgPr}).
|
|
6712
|
+
*
|
|
6713
|
+
* Deep-cloned rather than returned by reference: `extractBackgroundColor`
|
|
6714
|
+
* flattens this same node into a single colour string that survives on
|
|
6715
|
+
* the model across an arbitrary number of saves in one handler session,
|
|
6716
|
+
* while `slideXml` here is the cached parse of the ORIGINAL part, which
|
|
6717
|
+
* later saves mutate in place. A live reference would go stale the moment
|
|
6718
|
+
* a save touched the slide for an unrelated reason.
|
|
6719
|
+
*/
|
|
6720
|
+
protected extractOwnBackgroundNode(slideXml: XmlObject, rootElement?: string): XmlObject | undefined;
|
|
6721
|
+
/**
|
|
6722
|
+
* The `<p:bgRef>` twin of {@link extractOwnBackgroundNode}: a deep-cloned
|
|
6723
|
+
* snapshot of the slide's own `<p:bgRef idx="…"><a:schemeClr .../></p:bgRef>`
|
|
6724
|
+
* (a background that follows the theme's `a:bgFillStyleLst` rather than
|
|
6725
|
+
* carrying a literal fill), for the save writer to restore verbatim.
|
|
6726
|
+
*
|
|
6727
|
+
* Without this, a slide authoring `p:bgRef` had no snapshot at all (only
|
|
6728
|
+
* `p:bgPr` was captured), so the save writer's "nothing changed, preserve
|
|
6729
|
+
* verbatim" guard never matched and it fell through to rebuilding
|
|
6730
|
+
* `<p:bgPr><a:solidFill><a:srgbClr .../></a:solidFill></p:bgPr>` from the
|
|
6731
|
+
* flattened colour on every save, replacing the theme reference with a
|
|
6732
|
+
* literal fill and severing the slide from later theme changes.
|
|
6733
|
+
*/
|
|
6734
|
+
protected extractOwnBackgroundRefNode(slideXml: XmlObject, rootElement?: string): XmlObject | undefined;
|
|
6735
|
+
/**
|
|
6736
|
+
* Resolve a `<p:bgRef>` element to a flat colour string.
|
|
6737
|
+
*
|
|
6738
|
+
* Per ECMA-376 §20.1.4.2.10 the `@idx` attribute selects an entry
|
|
6739
|
+
* from one of two style matrices on the active theme:
|
|
6740
|
+
*
|
|
6741
|
+
* - `idx == 0` → no fill (transparent / undefined)
|
|
6742
|
+
* - `1 ≤ idx ≤ 999` → `fmtScheme/fillStyleLst[idx-1]`
|
|
6743
|
+
* - `1001 ≤ idx ≤ 1003` → `fmtScheme/bgFillStyleLst[idx-1001]`
|
|
6744
|
+
*
|
|
6745
|
+
* When the resolved fill is a gradient or pattern we surface its
|
|
6746
|
+
* primary colour; gradient CSS is handled separately by
|
|
6747
|
+
* {@link extractBackgroundGradient}. The colour child of `bgRef`
|
|
6748
|
+
* acts as the `phClr` placeholder for any `phClr` tokens inside the
|
|
6749
|
+
* referenced fill definition.
|
|
6766
6750
|
*/
|
|
6767
|
-
protected
|
|
6751
|
+
protected resolveBackgroundRefColor(bgRef: XmlObject): string | undefined;
|
|
6768
6752
|
/**
|
|
6769
|
-
*
|
|
6770
|
-
*
|
|
6771
|
-
*
|
|
6753
|
+
* Extract a structured pattern fill (`<a:pattFill>`) from a slide
|
|
6754
|
+
* background. Returns the preset name plus resolved fg/bg colours so
|
|
6755
|
+
* renderers can draw a real SVG pattern instead of a flat fill.
|
|
6756
|
+
*
|
|
6757
|
+
* `a:alpha` (or `a:alphaMod`/`a:alphaOff`) on either `a:fgClr` or
|
|
6758
|
+
* `a:bgClr` is composited onto white the same way the flat-colour
|
|
6759
|
+
* fallback in {@link extractBackgroundColor} already does, matching how
|
|
6760
|
+
* PowerPoint renders a semi-transparent pattern colour: always against
|
|
6761
|
+
* white, never against whatever backdrop happens to sit behind the
|
|
6762
|
+
* stage. See issue #288.
|
|
6763
|
+
*
|
|
6764
|
+
* ECMA-376 §20.1.8.47.
|
|
6772
6765
|
*/
|
|
6773
|
-
protected
|
|
6774
|
-
}
|
|
6775
|
-
//#endregion
|
|
6776
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeShapeParagraphContentParsing.d.ts
|
|
6777
|
-
declare class PptxHandlerRuntime$36 extends PptxHandlerRuntime$37 {
|
|
6766
|
+
protected extractBackgroundPattern(slideXml: XmlObject, rootElement?: string): PptxSlideBackgroundPattern | undefined;
|
|
6778
6767
|
/**
|
|
6779
|
-
*
|
|
6780
|
-
*
|
|
6781
|
-
*
|
|
6782
|
-
*
|
|
6768
|
+
* Extract the `<p:bgPr/@shadeToTitle>` boolean attribute from a slide
|
|
6769
|
+
* background. Captured here purely as a passthrough flag on the model;
|
|
6770
|
+
* the actual "shade the gradient toward the title colour" effect is
|
|
6771
|
+
* applied downstream by `pptx-viewer-shared`'s `getSlideBackgroundStyle`
|
|
6772
|
+
* (`render/background-shade-to-title.ts`), not by core.
|
|
6773
|
+
*
|
|
6774
|
+
* ECMA-376 §19.3.1.2 (CT_BackgroundProperties).
|
|
6783
6775
|
*/
|
|
6784
|
-
protected
|
|
6776
|
+
protected extractBackgroundShadeToTitle(slideXml: XmlObject, rootElement?: string): boolean | undefined;
|
|
6785
6777
|
/**
|
|
6786
|
-
*
|
|
6787
|
-
*
|
|
6788
|
-
*
|
|
6789
|
-
* Used as the base for unsized and percentage-sized bullets. Only `a:r`
|
|
6790
|
-
* and `a:fld` carry renderable text; `a:br` does not.
|
|
6778
|
+
* Extract a CSS gradient string from a slide/layout/master background.
|
|
6779
|
+
* Handles `a:gradFill` within `p:bgPr` and gradient-based `p:bgRef`.
|
|
6791
6780
|
*/
|
|
6792
|
-
protected
|
|
6793
|
-
}
|
|
6794
|
-
//#endregion
|
|
6795
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeShapeParsing.d.ts
|
|
6796
|
-
declare class PptxHandlerRuntime$35 extends PptxHandlerRuntime$36 {
|
|
6797
|
-
protected parseShape(shape: XmlObject, id: string, slidePath?: string): PptxElement | null;
|
|
6798
|
-
}
|
|
6799
|
-
//#endregion
|
|
6800
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimePictureParsing.d.ts
|
|
6801
|
-
declare class PptxHandlerRuntime$34 extends PptxHandlerRuntime$35 {
|
|
6802
|
-
protected parsePicture(pic: XmlObject, id: string, slidePath: string): Promise<PptxElement | null>;
|
|
6803
|
-
}
|
|
6804
|
-
//#endregion
|
|
6805
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeSpTreeParsing.d.ts
|
|
6806
|
-
declare class PptxHandlerRuntime$33 extends PptxHandlerRuntime$34 {
|
|
6781
|
+
protected extractBackgroundGradient(slideXml: XmlObject, rootElement?: string): string | undefined;
|
|
6807
6782
|
/**
|
|
6808
|
-
*
|
|
6809
|
-
*
|
|
6783
|
+
* Reuse the cached parse of a layout XML part, parsing (and caching) on a
|
|
6784
|
+
* miss. Background resolution runs per slide but the layout/master parts are
|
|
6785
|
+
* large (a themed master can be ~200 KB); re-parsing them for every slide
|
|
6786
|
+
* dominated load time, so share the same parsed object `getLayoutElements`
|
|
6787
|
+
* already populated.
|
|
6810
6788
|
*/
|
|
6811
|
-
|
|
6789
|
+
protected resolveCachedLayoutXml(layoutPath: string): Promise<XmlObject | undefined>;
|
|
6790
|
+
/** Reuse the cached parse of a master XML part, parsing (and caching) on a miss. */
|
|
6791
|
+
protected resolveCachedMasterXml(masterPath: string): Promise<XmlObject | undefined>;
|
|
6792
|
+
protected getMasterBackgroundImage(layoutPath: string): Promise<string | undefined>;
|
|
6793
|
+
protected getMasterBackgroundImageProperties(layoutPath: string): Promise<PptxImageProperties | undefined>;
|
|
6794
|
+
protected getLayoutBackgroundImage(slidePath: string): Promise<string | undefined>;
|
|
6795
|
+
protected getLayoutBackgroundImageProperties(slidePath: string): Promise<PptxImageProperties | undefined>;
|
|
6796
|
+
protected getLayoutBackgroundColor(slidePath: string): Promise<string | undefined>;
|
|
6812
6797
|
/**
|
|
6813
|
-
*
|
|
6814
|
-
* XML string. Returns an array of `{ tag, indexInType }` entries where
|
|
6815
|
-
* `indexInType` is the 0-based occurrence index within that tag's array.
|
|
6816
|
-
*
|
|
6817
|
-
* Falls back to the default type-grouped order when `xmlStr` is unavailable.
|
|
6798
|
+
* Resolve the slide master's background colour given a layout path.
|
|
6818
6799
|
*/
|
|
6819
|
-
protected
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6800
|
+
protected getMasterBackgroundColor(layoutPath: string): Promise<string | undefined>;
|
|
6801
|
+
}
|
|
6802
|
+
//#endregion
|
|
6803
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeSlideUtils.d.ts
|
|
6804
|
+
declare class PptxHandlerRuntime$30 extends PptxHandlerRuntime$31 {
|
|
6823
6805
|
/**
|
|
6824
|
-
*
|
|
6825
|
-
* occurrence of `containerTag`.
|
|
6826
|
-
*
|
|
6827
|
-
* Also handles `mc:AlternateContent` blocks: when one is found at
|
|
6828
|
-
* depth 0, the scanner resolves the selected branch (Choice or
|
|
6829
|
-
* Fallback) and includes element tags from that branch in the
|
|
6830
|
-
* document-order sequence.
|
|
6806
|
+
* Retrieve the background gradient from a layout, falling back to master.
|
|
6831
6807
|
*/
|
|
6832
|
-
|
|
6808
|
+
protected getLayoutBackgroundGradient(slidePath: string): Promise<string | undefined>;
|
|
6833
6809
|
/**
|
|
6834
|
-
*
|
|
6835
|
-
* from `startPos`, properly handling nesting of the same tag.
|
|
6836
|
-
* Returns the index of the `<` of the closing tag, or -1 if not found.
|
|
6810
|
+
* Resolve the slide master's background gradient given a layout path.
|
|
6837
6811
|
*/
|
|
6838
|
-
|
|
6812
|
+
protected getMasterBackgroundGradient(layoutPath: string): Promise<string | undefined>;
|
|
6839
6813
|
/**
|
|
6840
|
-
*
|
|
6841
|
-
* which branch (Choice or Fallback) to use and return the element
|
|
6842
|
-
* tags found in that branch.
|
|
6814
|
+
* Find the layout file path referenced by a slide via its relationships.
|
|
6843
6815
|
*/
|
|
6844
|
-
|
|
6816
|
+
protected findLayoutPathForSlide(slidePath: string): string | undefined;
|
|
6845
6817
|
/**
|
|
6846
|
-
*
|
|
6847
|
-
* Only looks at depth-0 children that match known element tags.
|
|
6818
|
+
* Find the master file path referenced by a layout via its relationships.
|
|
6848
6819
|
*/
|
|
6849
|
-
|
|
6820
|
+
protected findMasterPathForLayoutBase(layoutPath: string): string | undefined;
|
|
6850
6821
|
/**
|
|
6851
|
-
*
|
|
6852
|
-
*
|
|
6822
|
+
* Switch the active master state (clrMap + theme color/font/format
|
|
6823
|
+
* scheme) so that scheme-colour resolution for the slide currently
|
|
6824
|
+
* being parsed walks through the correct master.
|
|
6825
|
+
*
|
|
6826
|
+
* Multi-master decks must resolve scheme colours against each slide's
|
|
6827
|
+
* own master rather than always against `masterFiles[0]`.
|
|
6828
|
+
*
|
|
6829
|
+
* Phase 2 Stream B / C-H4.
|
|
6853
6830
|
*/
|
|
6854
|
-
|
|
6831
|
+
protected setActiveMasterForSlide(slidePath: string): Promise<void>;
|
|
6855
6832
|
/**
|
|
6856
|
-
*
|
|
6833
|
+
* Point colour/font/format resolution at one master's theme, or back at
|
|
6834
|
+
* the deck-wide snapshot when `masterPath` is undefined.
|
|
6835
|
+
*
|
|
6836
|
+
* Split out of {@link setActiveMasterForSlide} because the Slide Master
|
|
6837
|
+
* view parses each master's own shape tree outside any slide, and its
|
|
6838
|
+
* scheme colours must resolve through that master rather than through
|
|
6839
|
+
* whichever slide happened to be parsed last.
|
|
6857
6840
|
*/
|
|
6858
|
-
protected
|
|
6841
|
+
protected applyMasterThemeState(masterPath: string | undefined): void;
|
|
6859
6842
|
/**
|
|
6860
|
-
*
|
|
6861
|
-
*
|
|
6843
|
+
* Extract the `p:bg/@showAnimation` flag from a slide's XML.
|
|
6844
|
+
* Returns `true` when the background should animate, `false` when
|
|
6845
|
+
* explicitly disabled, or `undefined` when the attribute is absent
|
|
6846
|
+
* (defaults to true per OOXML spec).
|
|
6862
6847
|
*/
|
|
6863
|
-
protected
|
|
6848
|
+
protected extractBackgroundShowAnimation(slideXml: XmlObject): boolean | undefined;
|
|
6864
6849
|
/**
|
|
6865
|
-
*
|
|
6866
|
-
*
|
|
6867
|
-
*
|
|
6868
|
-
*
|
|
6869
|
-
* Records each consumed AC envelope in {@link alternateContentBlockByRawXml}
|
|
6870
|
-
* so the save layer can re-emit the original `<mc:Choice>` /
|
|
6871
|
-
* `<mc:Fallback>` shape on dirty save (CC-4).
|
|
6850
|
+
* Extract the `p:sld/@showMasterSp` flag.
|
|
6851
|
+
* Returns `false` when master shapes should be hidden, `true` when
|
|
6852
|
+
* explicitly shown, or `undefined` when the attribute is absent
|
|
6853
|
+
* (defaults to true per OOXML spec).
|
|
6872
6854
|
*/
|
|
6873
|
-
protected
|
|
6855
|
+
protected extractShowMasterShapes(slideXml: XmlObject): boolean | undefined;
|
|
6874
6856
|
/**
|
|
6875
|
-
*
|
|
6857
|
+
* Extract the `p:sld/@showMasterPhAnim` flag: whether inherited master
|
|
6858
|
+
* placeholder animations should replay on this slide. Mirrors
|
|
6859
|
+
* `p:sldLayout/@showMasterPhAnim` (see `parseSlideLayoutAttributes`).
|
|
6860
|
+
* Distinct from {@link extractShowMasterShapes}, which governs shape
|
|
6861
|
+
* VISIBILITY rather than animation timing.
|
|
6876
6862
|
*
|
|
6877
|
-
* `
|
|
6878
|
-
*
|
|
6863
|
+
* Returns `false` when disabled, `true` when explicitly enabled, or
|
|
6864
|
+
* `undefined` when the attribute is absent (defaults to true per spec).
|
|
6879
6865
|
*/
|
|
6880
|
-
protected
|
|
6866
|
+
protected extractShowMasterPhAnim(slideXml: XmlObject): boolean | undefined;
|
|
6867
|
+
protected isSlideHidden(slideXmlObj: XmlObject, slideIdEntry: XmlObject | undefined): boolean;
|
|
6868
|
+
protected extractTextFromTxBody(txBody: XmlObject | undefined): string;
|
|
6869
|
+
protected extractSlideNotes(slidePath: string): Promise<{
|
|
6870
|
+
notes?: string;
|
|
6871
|
+
notesSegments?: TextSegment[];
|
|
6872
|
+
notesShapes?: PptxElement[];
|
|
6873
|
+
notesClrMapOverride?: Record<string, string>;
|
|
6874
|
+
notesCSldName?: string;
|
|
6875
|
+
}>;
|
|
6881
6876
|
}
|
|
6882
6877
|
//#endregion
|
|
6883
|
-
//#region pptx/core/core/runtime/
|
|
6884
|
-
declare class PptxHandlerRuntime$
|
|
6878
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimePlaceholderStyles.d.ts
|
|
6879
|
+
declare class PptxHandlerRuntime$29 extends PptxHandlerRuntime$30 {
|
|
6885
6880
|
/**
|
|
6886
|
-
* Parse
|
|
6881
|
+
* Parse a single `a:lvlXpPr` node into a structured
|
|
6882
|
+
* {@link PlaceholderTextLevelStyle}.
|
|
6887
6883
|
*
|
|
6888
|
-
*
|
|
6889
|
-
*
|
|
6890
|
-
*
|
|
6891
|
-
*
|
|
6892
|
-
*
|
|
6884
|
+
* The paragraph-level attributes go through the same helpers the
|
|
6885
|
+
* per-paragraph `a:pPr` path uses (`paragraph-properties-parser`), so a
|
|
6886
|
+
* master `p:txStyles` or layout `a:lstStyle` level carries exactly the
|
|
6887
|
+
* field set a directly-authored paragraph does: margins on both sides,
|
|
6888
|
+
* `rtl`, tab stops, and the full `ST_TextAlignType` token set.
|
|
6893
6889
|
*/
|
|
6894
|
-
protected
|
|
6890
|
+
protected parsePlaceholderLevelStyle(levelProps: XmlObject | undefined): PlaceholderTextLevelStyle | null;
|
|
6891
|
+
/** Bullet group of an `a:lvlXpPr` node (`a:bu*` children). */
|
|
6892
|
+
private parsePlaceholderLevelBullet;
|
|
6893
|
+
/** Default run properties of a level (`a:defRPr`: font, size, bold, italic, colour). */
|
|
6894
|
+
private parsePlaceholderLevelRunDefaults;
|
|
6895
|
+
}
|
|
6896
|
+
//#endregion
|
|
6897
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimePlaceholderDefaults.d.ts
|
|
6898
|
+
declare class PptxHandlerRuntime$28 extends PptxHandlerRuntime$29 {
|
|
6895
6899
|
/**
|
|
6896
|
-
*
|
|
6897
|
-
*
|
|
6898
|
-
*
|
|
6899
|
-
* `depth` is the group's nesting level: 0 for a `<p:spTree>` child. Only a
|
|
6900
|
-
* top-level group rounds its transform to whole pixels; a nested one stays
|
|
6901
|
-
* unrounded, because its parent is still going to map it through
|
|
6902
|
-
* `ext / chExt` and rounding first collapses a compact child space to 0.
|
|
6900
|
+
* Extract structured {@link PlaceholderDefaults} from a layout or master
|
|
6901
|
+
* shape that carries a `p:ph` element.
|
|
6903
6902
|
*/
|
|
6904
|
-
protected
|
|
6905
|
-
protected extractGradientFillColor(gradFill: XmlObject): string | undefined;
|
|
6903
|
+
protected extractPlaceholderDefaultsFromShape(shape: XmlObject): PlaceholderDefaults | null;
|
|
6906
6904
|
}
|
|
6907
6905
|
//#endregion
|
|
6908
|
-
//#region pptx/core/core/runtime/
|
|
6909
|
-
declare class PptxHandlerRuntime$
|
|
6906
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeMasterElements.d.ts
|
|
6907
|
+
declare class PptxHandlerRuntime$27 extends PptxHandlerRuntime$28 {
|
|
6910
6908
|
/**
|
|
6911
|
-
* Parse
|
|
6912
|
-
*
|
|
6913
|
-
*
|
|
6909
|
+
* Parse a `CT_TextListStyle` node (`a:defPPr` + `a:lvl1pPr` … `a:lvl9pPr`)
|
|
6910
|
+
* into a level-keyed style map. Used for `<p:txStyles>` children
|
|
6911
|
+
* (`p:titleStyle`, `p:bodyStyle`, `p:otherStyle`) — see ECMA-376 §19.3.1.52.
|
|
6914
6912
|
*/
|
|
6915
|
-
protected
|
|
6916
|
-
|
|
6913
|
+
protected parseTextListStyle(node: XmlObject | undefined): PptxTextStyleLevels | undefined;
|
|
6914
|
+
/**
|
|
6915
|
+
* Parse `<p:txStyles>` from a slide-master XML object into a structured
|
|
6916
|
+
* {@link PptxMasterTextStyles}. Used to populate `PptxSlideMaster.txStyles`
|
|
6917
|
+
* so the title/body/other text-style cascade (P-H1) is visible on the
|
|
6918
|
+
* typed model.
|
|
6919
|
+
*/
|
|
6920
|
+
protected parseMasterTxStyles(masterXml: XmlObject | undefined): PptxMasterTextStyles | undefined;
|
|
6921
|
+
/**
|
|
6922
|
+
* Enrich an array of {@link PptxSlideMaster} entries (already produced by
|
|
6923
|
+
* `parseSlideMasters`) with parsed `<p:txStyles>`. Loads each master's XML
|
|
6924
|
+
* once, parses, and caches it in `masterXmlMap` for downstream consumers.
|
|
6925
|
+
*
|
|
6926
|
+
* Also stores the parsed result on the per-master cache so that the
|
|
6927
|
+
* inheritance chain in `applyMasterTextStyleCascade` can find it without
|
|
6928
|
+
* re-parsing.
|
|
6929
|
+
*/
|
|
6930
|
+
protected enrichSlideMastersWithTxStyles(slideMasters: PptxSlideMaster[]): Promise<void>;
|
|
6931
|
+
protected parsePresentationDefaultTextStyle(): void;
|
|
6932
|
+
protected getMasterElements(layoutPath: string): Promise<PptxElement[]>;
|
|
6917
6933
|
}
|
|
6918
6934
|
//#endregion
|
|
6919
|
-
//#region pptx/core/core/runtime/
|
|
6920
|
-
|
|
6935
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeAuxiliaryMasterElements.d.ts
|
|
6936
|
+
/** The slice of each master/layout model this parser writes to. */
|
|
6937
|
+
interface MasterPartElementHost {
|
|
6938
|
+
path: string;
|
|
6939
|
+
elements?: PptxElement[];
|
|
6940
|
+
backgroundImage?: string;
|
|
6941
|
+
backgroundImageProperties?: PptxImageProperties;
|
|
6921
6942
|
/**
|
|
6922
|
-
*
|
|
6923
|
-
*
|
|
6943
|
+
* Already resolved by the master/layout parser. Read here only so the save
|
|
6944
|
+
* side can tell a chosen colour from a flattened `p:bgRef`.
|
|
6924
6945
|
*/
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6946
|
+
backgroundColor?: string;
|
|
6947
|
+
}
|
|
6948
|
+
declare class PptxHandlerRuntime$26 extends PptxHandlerRuntime$27 {
|
|
6949
|
+
/** Parse every editable element in a master or layout shape tree. */
|
|
6950
|
+
protected enrichMasterPartElements(part: MasterPartElementHost | undefined, rootTag: MasterPartRootTag): Promise<void>;
|
|
6929
6951
|
/**
|
|
6930
|
-
*
|
|
6931
|
-
*
|
|
6952
|
+
* Populate `elements` on every slide master and on each of its layouts.
|
|
6953
|
+
*
|
|
6954
|
+
* Scheme colours on a master's own shapes must resolve through that
|
|
6955
|
+
* master's colour map and theme, so the active master state is switched
|
|
6956
|
+
* per part and reset to the deck-wide snapshot afterwards.
|
|
6932
6957
|
*/
|
|
6933
|
-
protected
|
|
6934
|
-
|
|
6935
|
-
protected
|
|
6936
|
-
|
|
6937
|
-
protected normalizeConnectorArrowType(value: unknown): ConnectorArrowType | undefined;
|
|
6938
|
-
protected extractBlurStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6939
|
-
protected extractEffectDagStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6940
|
-
protected extractFillOverlayStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6941
|
-
protected extractReflectionStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6942
|
-
protected extractSoftEdgeStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6943
|
-
protected extractGlowStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6944
|
-
protected extractInnerShadowStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6945
|
-
protected extractShadowStyle(shapeProps: XmlObject): Partial<ShapeStyle>;
|
|
6946
|
-
protected extractGradientFillCss(gradFill: XmlObject): string | undefined;
|
|
6947
|
-
protected buildGradientCssFromStops(stops: NonNullable<ShapeStyle['fillGradientStops']>, type: NonNullable<ShapeStyle['fillGradientType']>, angle: number): string | undefined;
|
|
6948
|
-
protected extractGradientAngle(gradFill: XmlObject): number;
|
|
6949
|
-
protected extractGradientType(gradFill: XmlObject): NonNullable<ShapeStyle['fillGradientType']>;
|
|
6950
|
-
protected extractGradientStops(gradFill: XmlObject): NonNullable<ShapeStyle['fillGradientStops']>;
|
|
6951
|
-
protected extractGradientOpacity(gradFill: XmlObject): number | undefined;
|
|
6952
|
-
protected parseColorChoice(colorChoice: XmlObject | undefined, placeholderColor?: string): string | undefined;
|
|
6958
|
+
protected enrichSlideMasterElements(masters: PptxSlideMaster[]): Promise<void>;
|
|
6959
|
+
/** Parse every editable element in a notes or handout master shape tree. */
|
|
6960
|
+
protected enrichAuxiliaryMasterElements(master: PptxNotesMaster | PptxHandoutMaster | undefined, rootTag: 'p:notesMaster' | 'p:handoutMaster'): Promise<void>;
|
|
6961
|
+
private rememberUnparsedMasterNodes;
|
|
6953
6962
|
}
|
|
6954
6963
|
//#endregion
|
|
6955
|
-
//#region pptx/core/core/runtime/
|
|
6956
|
-
declare class PptxHandlerRuntime$
|
|
6964
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeLayoutElements.d.ts
|
|
6965
|
+
declare class PptxHandlerRuntime$25 extends PptxHandlerRuntime$26 {
|
|
6957
6966
|
/**
|
|
6958
|
-
*
|
|
6967
|
+
* Parse the layout artwork inherited by a slide.
|
|
6959
6968
|
*
|
|
6960
|
-
*
|
|
6961
|
-
* stretch/tile placement and blip effects such as `a:alphaModFix` live next
|
|
6962
|
-
* to the relationship id and otherwise disappear during slide assembly.
|
|
6969
|
+
* @param slidePath - Archive path of the slide whose layout to resolve.
|
|
6963
6970
|
*/
|
|
6964
|
-
protected
|
|
6965
|
-
protected extractBackgroundImage(slideXml: XmlObject, slidePath: string, rootElement?: string): Promise<string | undefined>;
|
|
6966
|
-
protected extractBackgroundColor(slideXml: XmlObject, rootElement?: string): string | undefined;
|
|
6971
|
+
protected getLayoutElements(slidePath: string): Promise<PptxElement[]>;
|
|
6967
6972
|
/**
|
|
6968
|
-
*
|
|
6969
|
-
* `a:alphaMod`/`a:alphaOff`) opacity onto opaque white.
|
|
6973
|
+
* Parse a layout's artwork given the layout's own archive path.
|
|
6970
6974
|
*
|
|
6971
|
-
*
|
|
6972
|
-
*
|
|
6973
|
-
*
|
|
6974
|
-
* thumbnail strip). Blending once here keeps `backgroundColor` a plain
|
|
6975
|
-
* `#RRGGBB` value that looks the same on every backdrop, matching
|
|
6976
|
-
* PowerPoint rather than emitting `rgba()` and letting alpha bleed
|
|
6977
|
-
* through whatever the stage happens to be. See issue #288.
|
|
6978
|
-
*/
|
|
6979
|
-
private blendBackgroundColorOntoWhite;
|
|
6980
|
-
/**
|
|
6981
|
-
* A deep-cloned snapshot of the slide's own `<p:bgPr>`, exactly as parsed,
|
|
6982
|
-
* for the save writer to restore verbatim when nothing about the
|
|
6983
|
-
* background changed (see {@link AuthoredSlideBackground.rawBgPr}).
|
|
6975
|
+
* Split out from {@link getLayoutElements} so callers that already know
|
|
6976
|
+
* which layout they want (the layout gallery) do not have to invent a slide
|
|
6977
|
+
* that points at it.
|
|
6984
6978
|
*
|
|
6985
|
-
*
|
|
6986
|
-
* flattens this same node into a single colour string that survives on
|
|
6987
|
-
* the model across an arbitrary number of saves in one handler session,
|
|
6988
|
-
* while `slideXml` here is the cached parse of the ORIGINAL part, which
|
|
6989
|
-
* later saves mutate in place. A live reference would go stale the moment
|
|
6990
|
-
* a save touched the slide for an unrelated reason.
|
|
6979
|
+
* @param layoutPath - Archive path of the `p:sldLayout` part.
|
|
6991
6980
|
*/
|
|
6992
|
-
protected
|
|
6981
|
+
protected getLayoutElementsByPath(layoutPath: string): Promise<PptxElement[]>;
|
|
6982
|
+
}
|
|
6983
|
+
//#endregion
|
|
6984
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeLayoutPreviews.d.ts
|
|
6985
|
+
/**
|
|
6986
|
+
* Layout thumbnail sourcing for the New Slide / Layout galleries.
|
|
6987
|
+
*
|
|
6988
|
+
* Previews are produced on request rather than during load. Materialising
|
|
6989
|
+
* every layout's artwork means parsing each `p:sldLayout` part and decoding
|
|
6990
|
+
* the images it references, which is measurable on decks carrying several
|
|
6991
|
+
* masters, and the majority of sessions never open the gallery at all. The
|
|
6992
|
+
* results are memoised, so opening the gallery a second time is free.
|
|
6993
|
+
*/
|
|
6994
|
+
declare class PptxHandlerRuntime$24 extends PptxHandlerRuntime$25 {
|
|
6995
|
+
private layoutPreviewCache;
|
|
6993
6996
|
/**
|
|
6994
|
-
*
|
|
6995
|
-
* snapshot of the slide's own `<p:bgRef idx="…"><a:schemeClr .../></p:bgRef>`
|
|
6996
|
-
* (a background that follows the theme's `a:bgFillStyleLst` rather than
|
|
6997
|
-
* carrying a literal fill), for the save writer to restore verbatim.
|
|
6997
|
+
* Build (or return the memoised) preview for one layout.
|
|
6998
6998
|
*
|
|
6999
|
-
*
|
|
7000
|
-
*
|
|
7001
|
-
* verbatim" guard never matched and it fell through to rebuilding
|
|
7002
|
-
* `<p:bgPr><a:solidFill><a:srgbClr .../></a:solidFill></p:bgPr>` from the
|
|
7003
|
-
* flattened colour on every save, replacing the theme reference with a
|
|
7004
|
-
* literal fill and severing the slide from later theme changes.
|
|
6999
|
+
* @param layoutPath - Archive path of the `p:sldLayout` part.
|
|
7000
|
+
* @returns The preview, or `null` when the archive holds no such layout.
|
|
7005
7001
|
*/
|
|
7006
|
-
|
|
7002
|
+
getLayoutPreview(layoutPath: string): Promise<PptxLayoutPreview | null>;
|
|
7007
7003
|
/**
|
|
7008
|
-
*
|
|
7009
|
-
*
|
|
7010
|
-
* Per ECMA-376 §20.1.4.2.10 the `@idx` attribute selects an entry
|
|
7011
|
-
* from one of two style matrices on the active theme:
|
|
7004
|
+
* Build previews for every layout the presentation defines.
|
|
7012
7005
|
*
|
|
7013
|
-
*
|
|
7014
|
-
*
|
|
7015
|
-
* - `1001 ≤ idx ≤ 1003` → `fmtScheme/bgFillStyleLst[idx-1001]`
|
|
7006
|
+
* The default order matches `getLayoutOptions`, since both walk the layout
|
|
7007
|
+
* XML map, which the master parser fills in `p:sldLayoutIdLst` order.
|
|
7016
7008
|
*
|
|
7017
|
-
*
|
|
7018
|
-
*
|
|
7019
|
-
* {@link extractBackgroundGradient}. The colour child of `bgRef`
|
|
7020
|
-
* acts as the `phClr` placeholder for any `phClr` tokens inside the
|
|
7021
|
-
* referenced fill definition.
|
|
7009
|
+
* @param layoutPaths - Restricts the result to these layouts; defaults to
|
|
7010
|
+
* all of them, which is what an unscoped gallery wants.
|
|
7022
7011
|
*/
|
|
7023
|
-
|
|
7012
|
+
getLayoutPreviews(layoutPaths?: readonly string[]): Promise<PptxLayoutPreview[]>;
|
|
7013
|
+
/** Drop memoised previews, e.g. after a layout is edited in template mode. */
|
|
7014
|
+
protected invalidateLayoutPreviews(layoutPath?: string): void;
|
|
7024
7015
|
/**
|
|
7025
|
-
*
|
|
7026
|
-
*
|
|
7027
|
-
* renderers can draw a real SVG pattern instead of a flat fill.
|
|
7028
|
-
*
|
|
7029
|
-
* `a:alpha` (or `a:alphaMod`/`a:alphaOff`) on either `a:fgClr` or
|
|
7030
|
-
* `a:bgClr` is composited onto white the same way the flat-colour
|
|
7031
|
-
* fallback in {@link extractBackgroundColor} already does, matching how
|
|
7032
|
-
* PowerPoint renders a semi-transparent pattern colour: always against
|
|
7033
|
-
* white, never against whatever backdrop happens to sit behind the
|
|
7034
|
-
* stage. See issue #288.
|
|
7035
|
-
*
|
|
7036
|
-
* ECMA-376 §20.1.8.47.
|
|
7016
|
+
* Resolve the background a layout thumbnail should paint, falling back to
|
|
7017
|
+
* the layout's master when the layout itself declares none.
|
|
7037
7018
|
*/
|
|
7038
|
-
|
|
7019
|
+
private resolveLayoutPreviewBackground;
|
|
7020
|
+
}
|
|
7021
|
+
//#endregion
|
|
7022
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeThemeFormatScheme.d.ts
|
|
7023
|
+
/**
|
|
7024
|
+
* Ordered fill-child tag tokens recognised inside `a:fillStyleLst` /
|
|
7025
|
+
* `a:bgFillStyleLst`. Used by {@link extractFillStyleListChildOrder} to
|
|
7026
|
+
* recover document order from raw XML when fast-xml-parser has merged
|
|
7027
|
+
* heterogeneous siblings into typed buckets.
|
|
7028
|
+
*/
|
|
7029
|
+
declare const FILL_LIST_CHILD_TAGS: readonly ['a:solidFill', 'a:gradFill', 'a:pattFill', 'a:noFill', 'a:grpFill'];
|
|
7030
|
+
type FillListChildTag = (typeof FILL_LIST_CHILD_TAGS)[number];
|
|
7031
|
+
declare class PptxHandlerRuntime$23 extends PptxHandlerRuntime$24 {
|
|
7039
7032
|
/**
|
|
7040
|
-
*
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
*
|
|
7033
|
+
* Build a fill-style entry for one child node based on its tag.
|
|
7034
|
+
*/
|
|
7035
|
+
private buildFillStyleEntry;
|
|
7036
|
+
/**
|
|
7037
|
+
* Collect fill-style children from a style list node, preserving
|
|
7038
|
+
* document order when an `orderHint` is supplied (extracted from the
|
|
7039
|
+
* raw theme XML). Handles `a:solidFill`, `a:gradFill`, `a:pattFill`,
|
|
7040
|
+
* `a:noFill`, `a:grpFill`.
|
|
7045
7041
|
*
|
|
7046
|
-
*
|
|
7042
|
+
* fast-xml-parser without `preserveOrder` collapses heterogeneous
|
|
7043
|
+
* siblings into per-tag buckets and we lose the relative document
|
|
7044
|
+
* order. When the caller supplies an `orderHint` (a list of tag names
|
|
7045
|
+
* in source order recovered via {@link extractFillStyleListChildOrder})
|
|
7046
|
+
* we walk the buckets in step with the hint and emit entries in true
|
|
7047
|
+
* document order. Without a hint we fall back to the historical
|
|
7048
|
+
* solid → gradient → pattern → noFill → grpFill grouping.
|
|
7047
7049
|
*/
|
|
7048
|
-
protected
|
|
7050
|
+
protected collectFillChildren(listNode: XmlObject, orderHint?: readonly FillListChildTag[]): PptxThemeFillStyle[];
|
|
7049
7051
|
/**
|
|
7050
|
-
*
|
|
7051
|
-
*
|
|
7052
|
+
* Parse each child of a `a:fillStyleLst` (or `a:bgFillStyleLst`).
|
|
7053
|
+
* Children can be `a:solidFill`, `a:gradFill`, `a:pattFill`,
|
|
7054
|
+
* `a:noFill`, or `a:grpFill`. The list is ordered and 1-indexed by
|
|
7055
|
+
* position; supply `orderHint` to recover document order when the
|
|
7056
|
+
* parser collapsed heterogeneous siblings.
|
|
7052
7057
|
*/
|
|
7053
|
-
protected
|
|
7058
|
+
protected parseFillStyleList(listNode: XmlObject | undefined, orderHint?: readonly FillListChildTag[]): PptxThemeFillStyle[];
|
|
7054
7059
|
/**
|
|
7055
|
-
*
|
|
7056
|
-
*
|
|
7057
|
-
* large (a themed master can be ~200 KB); re-parsing them for every slide
|
|
7058
|
-
* dominated load time, so share the same parsed object `getLayoutElements`
|
|
7059
|
-
* already populated.
|
|
7060
|
+
* Parse `a:lnStyleLst` children (`a:ln` elements) into an array of
|
|
7061
|
+
* {@link PptxThemeLineStyle} entries.
|
|
7060
7062
|
*/
|
|
7061
|
-
protected
|
|
7062
|
-
/** Reuse the cached parse of a master XML part, parsing (and caching) on a miss. */
|
|
7063
|
-
protected resolveCachedMasterXml(masterPath: string): Promise<XmlObject | undefined>;
|
|
7064
|
-
protected getMasterBackgroundImage(layoutPath: string): Promise<string | undefined>;
|
|
7065
|
-
protected getMasterBackgroundImageProperties(layoutPath: string): Promise<PptxImageProperties | undefined>;
|
|
7066
|
-
protected getLayoutBackgroundImage(slidePath: string): Promise<string | undefined>;
|
|
7067
|
-
protected getLayoutBackgroundImageProperties(slidePath: string): Promise<PptxImageProperties | undefined>;
|
|
7068
|
-
protected getLayoutBackgroundColor(slidePath: string): Promise<string | undefined>;
|
|
7063
|
+
protected parseLineStyleList(listNode: XmlObject | undefined): PptxThemeLineStyle[];
|
|
7069
7064
|
/**
|
|
7070
|
-
*
|
|
7065
|
+
* Parse `a:effectStyleLst` children (`a:effectStyle`) into an array
|
|
7066
|
+
* of {@link PptxThemeEffectStyle} entries. Each style wraps an
|
|
7067
|
+
* `a:effectLst` node that can contain shadow, glow, soft-edge, etc.
|
|
7071
7068
|
*/
|
|
7072
|
-
protected
|
|
7069
|
+
protected parseEffectStyleList(listNode: XmlObject | undefined): PptxThemeEffectStyle[];
|
|
7073
7070
|
}
|
|
7074
7071
|
//#endregion
|
|
7075
|
-
//#region pptx/core/core/runtime/
|
|
7076
|
-
declare class PptxHandlerRuntime$
|
|
7072
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeThemeOverrides.d.ts
|
|
7073
|
+
declare class PptxHandlerRuntime$22 extends PptxHandlerRuntime$23 {
|
|
7077
7074
|
/**
|
|
7078
|
-
*
|
|
7075
|
+
* Parse the `a:fmtScheme` element from the theme into a structured
|
|
7076
|
+
* {@link PptxThemeFormatScheme}. Each sub-list (fillStyleLst, lnStyleLst,
|
|
7077
|
+
* effectStyleLst, bgFillStyleLst) contains up to three intensity levels
|
|
7078
|
+
* (subtle / moderate / intense) referenced by 1-based index.
|
|
7079
|
+
*
|
|
7080
|
+
* When `rawXml` is supplied (the original theme/themeOverride XML
|
|
7081
|
+
* source), the document order of fill children is recovered via a
|
|
7082
|
+
* targeted regex scan and threaded into {@link parseFillStyleList} so
|
|
7083
|
+
* mixed solid/grad/blip/grpFill lists round-trip in source order even
|
|
7084
|
+
* though fast-xml-parser collapses heterogeneous siblings into typed
|
|
7085
|
+
* buckets.
|
|
7086
|
+
*/
|
|
7087
|
+
protected parseFormatScheme(fmtScheme: XmlObject, rawXml?: string): PptxThemeFormatScheme;
|
|
7088
|
+
/**
|
|
7089
|
+
* Extract a colour map override from a `p:clrMapOvr` node.
|
|
7090
|
+
* Returns `null` when the node is absent, empty, or specifies
|
|
7091
|
+
* `a:masterClrMapping` (meaning "inherit from master").
|
|
7092
|
+
*
|
|
7093
|
+
* Each attribute value is an `ST_ColorSchemeIndex` token and is normalised
|
|
7094
|
+
* TO that enumeration rather than case-folded: the parsed map is written
|
|
7095
|
+
* straight back out by `buildClrMapOverrideXml`, and the enumeration is
|
|
7096
|
+
* case sensitive, so lowercasing `folHlink` (its only camel-cased member)
|
|
7097
|
+
* used to make PowerPoint refuse the whole saved package with 0x80070570.
|
|
7098
|
+
* A value outside the enumeration is dropped and reported, never written
|
|
7099
|
+
* through; the writer then supplies the standard default for that alias.
|
|
7079
7100
|
*/
|
|
7080
|
-
protected
|
|
7101
|
+
protected parseClrMapOverrideNode(clrMapOvr: XmlObject | undefined): Record<string, string> | null;
|
|
7081
7102
|
/**
|
|
7082
|
-
*
|
|
7103
|
+
* Parse `p:clrMapOvr` from a slide's XML. Returns a mapping from logical
|
|
7104
|
+
* colour name (bg1, tx1, ...) to the theme colour slot it should resolve to,
|
|
7105
|
+
* or `null` when the slide inherits from the master (`a:masterClrMapping`
|
|
7106
|
+
* or no override present).
|
|
7083
7107
|
*/
|
|
7084
|
-
protected
|
|
7108
|
+
protected parseSlideClrMapOverride(slideXml: XmlObject): Record<string, string> | null;
|
|
7085
7109
|
/**
|
|
7086
|
-
*
|
|
7110
|
+
* Parse `p:clrMapOvr` from a slide layout's XML. Layouts can override
|
|
7111
|
+
* the master's colour map just like slides can.
|
|
7087
7112
|
*/
|
|
7088
|
-
protected
|
|
7113
|
+
protected parseLayoutClrMapOverride(layoutXml: XmlObject): Record<string, string> | null;
|
|
7089
7114
|
/**
|
|
7090
|
-
*
|
|
7115
|
+
* Apply a theme override for the duration of parsing a layout or slide.
|
|
7116
|
+
* Saves the current theme state, applies the override, and returns a
|
|
7117
|
+
* restore function that must be called when done.
|
|
7091
7118
|
*/
|
|
7092
|
-
protected
|
|
7119
|
+
protected applyThemeOverrideState(override: {
|
|
7120
|
+
colorOverrides?: Record<string, string>;
|
|
7121
|
+
formatSchemeOverride?: PptxThemeFormatScheme;
|
|
7122
|
+
}): () => void;
|
|
7093
7123
|
/**
|
|
7094
|
-
*
|
|
7095
|
-
*
|
|
7096
|
-
*
|
|
7097
|
-
*
|
|
7098
|
-
* Multi-master decks must resolve scheme colours against each slide's
|
|
7099
|
-
* own master rather than always against `masterFiles[0]`.
|
|
7124
|
+
* Load and apply a theme override part referenced from a layout's or
|
|
7125
|
+
* slide's relationships. Theme overrides (`themeOverride*.xml`) can
|
|
7126
|
+
* replace the colour scheme, font scheme, and/or format scheme for
|
|
7127
|
+
* the scope of a specific layout or slide.
|
|
7100
7128
|
*
|
|
7101
|
-
*
|
|
7129
|
+
* The method caches results so each override file is parsed at most once.
|
|
7130
|
+
* Overrides are applied as temporary deltas: the caller should save and
|
|
7131
|
+
* restore `themeColorMap`, `themeFontMap`, and `themeFormatScheme` around
|
|
7132
|
+
* the scope where the override is active.
|
|
7102
7133
|
*/
|
|
7103
|
-
protected
|
|
7134
|
+
protected loadThemeOverride(partBasePath: string): Promise<{
|
|
7135
|
+
colorOverrides?: Record<string, string>;
|
|
7136
|
+
formatSchemeOverride?: PptxThemeFormatScheme;
|
|
7137
|
+
} | null>;
|
|
7138
|
+
}
|
|
7139
|
+
//#endregion
|
|
7140
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeThemeRefResolution.d.ts
|
|
7141
|
+
declare class PptxHandlerRuntime$21 extends PptxHandlerRuntime$22 {
|
|
7104
7142
|
/**
|
|
7105
|
-
*
|
|
7106
|
-
* the
|
|
7107
|
-
*
|
|
7108
|
-
* Split out of {@link setActiveMasterForSlide} because the Slide Master
|
|
7109
|
-
* view parses each master's own shape tree outside any slide, and its
|
|
7110
|
-
* scheme colours must resolve through that master rather than through
|
|
7111
|
-
* whichever slide happened to be parsed last.
|
|
7143
|
+
* Resolve a `a:effectRef` element into concrete effect properties
|
|
7144
|
+
* by looking up `@_idx` in the theme format scheme's effect style list.
|
|
7112
7145
|
*/
|
|
7113
|
-
protected
|
|
7146
|
+
protected resolveThemeEffectRef(refNode: XmlObject, style: ShapeStyle): void;
|
|
7114
7147
|
/**
|
|
7115
|
-
*
|
|
7116
|
-
*
|
|
7117
|
-
* explicitly disabled, or `undefined` when the attribute is absent
|
|
7118
|
-
* (defaults to true per OOXML spec).
|
|
7148
|
+
* Resolve a `a:lnRef` element into concrete stroke properties by
|
|
7149
|
+
* looking up `@_idx` in the theme format scheme's line style list.
|
|
7119
7150
|
*/
|
|
7120
|
-
protected
|
|
7151
|
+
protected resolveThemeLineRef(refNode: XmlObject, style: ShapeStyle): void;
|
|
7121
7152
|
/**
|
|
7122
|
-
*
|
|
7123
|
-
*
|
|
7124
|
-
*
|
|
7125
|
-
* (defaults to true per OOXML spec).
|
|
7153
|
+
* Re-resolve a gradient fill's stops by substituting `phClr` occurrences
|
|
7154
|
+
* with the given override colour. When the gradient node contains
|
|
7155
|
+
* `a:schemeClr @val="phClr"`, the override colour is injected.
|
|
7126
7156
|
*/
|
|
7127
|
-
protected
|
|
7157
|
+
protected reResolveGradientWithPhClr(gradNode: XmlObject, phClrValue: string): {
|
|
7158
|
+
stops: NonNullable<ShapeStyle['fillGradientStops']>;
|
|
7159
|
+
css: string | undefined;
|
|
7160
|
+
};
|
|
7128
7161
|
/**
|
|
7129
|
-
*
|
|
7130
|
-
*
|
|
7131
|
-
*
|
|
7132
|
-
* Distinct from {@link extractShowMasterShapes}, which governs shape
|
|
7133
|
-
* VISIBILITY rather than animation timing.
|
|
7162
|
+
* Resolve a `a:fillRef` element into concrete {@link ShapeStyle} fill
|
|
7163
|
+
* properties by looking up the 1-based `@_idx` in the theme's format
|
|
7164
|
+
* scheme fill style list.
|
|
7134
7165
|
*
|
|
7135
|
-
*
|
|
7136
|
-
*
|
|
7166
|
+
* Per the OOXML spec:
|
|
7167
|
+
* - idx 0 or 1000 → no fill
|
|
7168
|
+
* - idx 1-3 → fillStyleLst[idx-1]
|
|
7169
|
+
* - idx 1001-1003 → bgFillStyleLst[idx-1001]
|
|
7170
|
+
*
|
|
7171
|
+
* The colour child of the ref (e.g. `a:schemeClr`) acts as a
|
|
7172
|
+
* "placeholder colour" (`phClr`) override for `phClr` tokens inside
|
|
7173
|
+
* the fill definition.
|
|
7137
7174
|
*/
|
|
7138
|
-
protected
|
|
7139
|
-
protected isSlideHidden(slideXmlObj: XmlObject, slideIdEntry: XmlObject | undefined): boolean;
|
|
7140
|
-
protected extractTextFromTxBody(txBody: XmlObject | undefined): string;
|
|
7141
|
-
protected extractSlideNotes(slidePath: string): Promise<{
|
|
7142
|
-
notes?: string;
|
|
7143
|
-
notesSegments?: TextSegment[];
|
|
7144
|
-
notesShapes?: PptxElement[];
|
|
7145
|
-
notesClrMapOverride?: Record<string, string>;
|
|
7146
|
-
notesCSldName?: string;
|
|
7147
|
-
}>;
|
|
7175
|
+
protected resolveThemeFillRef(refNode: XmlObject, style: ShapeStyle): void;
|
|
7148
7176
|
}
|
|
7149
7177
|
//#endregion
|
|
7150
|
-
//#region pptx/core/core/runtime/
|
|
7151
|
-
declare class PptxHandlerRuntime$
|
|
7178
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeThemeLoading.d.ts
|
|
7179
|
+
declare class PptxHandlerRuntime$20 extends PptxHandlerRuntime$21 {
|
|
7180
|
+
protected resolvePrimaryThemePath(): Promise<string | undefined>;
|
|
7181
|
+
protected parseThemeOptions(): Promise<PptxThemeOption[]>;
|
|
7152
7182
|
/**
|
|
7153
|
-
*
|
|
7154
|
-
*
|
|
7155
|
-
*
|
|
7156
|
-
* The paragraph-level attributes go through the same helpers the
|
|
7157
|
-
* per-paragraph `a:pPr` path uses (`paragraph-properties-parser`), so a
|
|
7158
|
-
* master `p:txStyles` or layout `a:lstStyle` level carries exactly the
|
|
7159
|
-
* field set a directly-authored paragraph does: margins on both sides,
|
|
7160
|
-
* `rtl`, tab stops, and the full `ST_TextAlignType` token set.
|
|
7183
|
+
* Public API — scan the in-memory ZIP for `ppt/theme/theme*.xml` parts
|
|
7184
|
+
* and return their paths and display names. Delegates to the
|
|
7185
|
+
* protected {@link parseThemeOptions}.
|
|
7161
7186
|
*/
|
|
7162
|
-
|
|
7163
|
-
/** Bullet group of an `a:lvlXpPr` node (`a:bu*` children). */
|
|
7164
|
-
private parsePlaceholderLevelBullet;
|
|
7165
|
-
/** Default run properties of a level (`a:defRPr`: font, size, bold, italic, colour). */
|
|
7166
|
-
private parsePlaceholderLevelRunDefaults;
|
|
7167
|
-
}
|
|
7168
|
-
//#endregion
|
|
7169
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimePlaceholderDefaults.d.ts
|
|
7170
|
-
declare class PptxHandlerRuntime$26 extends PptxHandlerRuntime$27 {
|
|
7187
|
+
getAvailableThemes(): Promise<PptxThemeOption[]>;
|
|
7171
7188
|
/**
|
|
7172
|
-
*
|
|
7173
|
-
*
|
|
7189
|
+
* Build a structured PptxTheme object from the already-parsed
|
|
7190
|
+
* themeColorMap and themeFontMap for consumption by renderers / UI.
|
|
7174
7191
|
*/
|
|
7175
|
-
protected
|
|
7176
|
-
}
|
|
7177
|
-
//#endregion
|
|
7178
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeMasterElements.d.ts
|
|
7179
|
-
declare class PptxHandlerRuntime$25 extends PptxHandlerRuntime$26 {
|
|
7192
|
+
protected buildThemeObject(): PptxTheme | undefined;
|
|
7180
7193
|
/**
|
|
7181
|
-
* Parse
|
|
7182
|
-
*
|
|
7183
|
-
*
|
|
7194
|
+
* Parse every slide master's `<p:clrMap>` element and store the alias
|
|
7195
|
+
* dictionaries on {@link masterClrMaps}. Do *not* mutate
|
|
7196
|
+
* {@link themeColorMap} — alias resolution happens at colour-lookup
|
|
7197
|
+
* time so that:
|
|
7198
|
+
*
|
|
7199
|
+
* 1. The raw theme scheme stays the source of truth (clrMap is a
|
|
7200
|
+
* routing layer, not a colour table).
|
|
7201
|
+
* 2. Multi-master decks resolve each slide against its own master's
|
|
7202
|
+
* clrMap rather than always against `masterFiles[0]`.
|
|
7203
|
+
* 3. Layout `clrMapOvr` semantics work correctly when a slide's master
|
|
7204
|
+
* differs from the deck's first master.
|
|
7205
|
+
*
|
|
7206
|
+
* Phase 2 Stream B / C-H4.
|
|
7184
7207
|
*/
|
|
7185
|
-
protected
|
|
7208
|
+
protected applySlideMasterColorMap(_defaultMap: Record<string, string>): Promise<void>;
|
|
7186
7209
|
/**
|
|
7187
|
-
* Parse
|
|
7188
|
-
*
|
|
7189
|
-
*
|
|
7190
|
-
*
|
|
7210
|
+
* Parse a single theme part into structured colour, font, and format
|
|
7211
|
+
* scheme dictionaries. Used both for the global default theme and for
|
|
7212
|
+
* each master's per-master theme (multi-master support).
|
|
7213
|
+
*
|
|
7214
|
+
* Phase 2 Stream B / C-H4.
|
|
7191
7215
|
*/
|
|
7192
|
-
protected
|
|
7216
|
+
protected parseThemePart(themePath: string): Promise<{
|
|
7217
|
+
colorMap: Record<string, string>;
|
|
7218
|
+
fontMap: Record<string, string>;
|
|
7219
|
+
formatScheme: PptxThemeFormatScheme | undefined;
|
|
7220
|
+
} | null>;
|
|
7193
7221
|
/**
|
|
7194
|
-
*
|
|
7195
|
-
*
|
|
7196
|
-
* once, parses, and caches it in `masterXmlMap` for downstream consumers.
|
|
7222
|
+
* Parse `<a:font script="…" typeface="…"/>` children of a major or
|
|
7223
|
+
* minor font node into a `script -> typeface` dictionary.
|
|
7197
7224
|
*
|
|
7198
|
-
*
|
|
7199
|
-
*
|
|
7200
|
-
*
|
|
7225
|
+
* fast-xml-parser collapses repeated tags into arrays, so iterate
|
|
7226
|
+
* over the array form regardless of how many siblings are present.
|
|
7227
|
+
*
|
|
7228
|
+
* Phase 4 Stream A / M4.
|
|
7201
7229
|
*/
|
|
7202
|
-
protected enrichSlideMastersWithTxStyles(slideMasters: PptxSlideMaster[]): Promise<void>;
|
|
7203
|
-
protected parsePresentationDefaultTextStyle(): void;
|
|
7204
|
-
protected getMasterElements(layoutPath: string): Promise<PptxElement[]>;
|
|
7205
|
-
}
|
|
7206
|
-
//#endregion
|
|
7207
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeAuxiliaryMasterElements.d.ts
|
|
7208
|
-
/** The slice of each master/layout model this parser writes to. */
|
|
7209
|
-
interface MasterPartElementHost {
|
|
7210
|
-
path: string;
|
|
7211
|
-
elements?: PptxElement[];
|
|
7212
|
-
backgroundImage?: string;
|
|
7213
|
-
backgroundImageProperties?: PptxImageProperties;
|
|
7214
7230
|
/**
|
|
7215
|
-
*
|
|
7216
|
-
*
|
|
7231
|
+
* Flatten a per-theme-path script-override map (`themePath -> {script ->
|
|
7232
|
+
* typeface}`) into a single `{script -> typeface}` lookup for
|
|
7233
|
+
* {@link buildThemeObject}. Earlier entries win on collision, which matches
|
|
7234
|
+
* the primary-theme-first parse order. Phase 4 Stream A / M4 (#83).
|
|
7217
7235
|
*/
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
declare class PptxHandlerRuntime$24 extends PptxHandlerRuntime$25 {
|
|
7221
|
-
/** Parse every editable element in a master or layout shape tree. */
|
|
7222
|
-
protected enrichMasterPartElements(part: MasterPartElementHost | undefined, rootTag: MasterPartRootTag): Promise<void>;
|
|
7236
|
+
protected aggregateFontScriptOverrides(perPathMap: Map<string, Record<string, string>>): Record<string, string>;
|
|
7237
|
+
protected collectFontScriptOverrides(fontNode: XmlObject | undefined): Record<string, string>;
|
|
7223
7238
|
/**
|
|
7224
|
-
*
|
|
7225
|
-
*
|
|
7226
|
-
* Scheme colours on a master's own shapes must resolve through that
|
|
7227
|
-
* master's colour map and theme, so the active master state is switched
|
|
7228
|
-
* per part and reset to the deck-wide snapshot afterwards.
|
|
7239
|
+
* Resolve the theme file path referenced by a given master's `.rels`.
|
|
7240
|
+
* Returns `undefined` when the master has no theme relationship.
|
|
7229
7241
|
*/
|
|
7230
|
-
protected
|
|
7231
|
-
/**
|
|
7232
|
-
|
|
7233
|
-
|
|
7242
|
+
protected resolveThemePathForMaster(masterPath: string): Promise<string | undefined>;
|
|
7243
|
+
/**
|
|
7244
|
+
* Populate {@link masterThemeColorMaps}, {@link masterThemeFontMaps},
|
|
7245
|
+
* and {@link masterThemeFormatSchemes} for every slide master in the
|
|
7246
|
+
* deck. Multi-master support — Phase 2 Stream B / C-H4.
|
|
7247
|
+
*/
|
|
7248
|
+
protected loadPerMasterThemes(): Promise<void>;
|
|
7249
|
+
protected loadThemeData(): Promise<void>;
|
|
7234
7250
|
}
|
|
7235
7251
|
//#endregion
|
|
7236
|
-
//#region pptx/core/core/runtime/
|
|
7237
|
-
|
|
7252
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeThemeProcessing.d.ts
|
|
7253
|
+
/**
|
|
7254
|
+
* Theme editing: update colour scheme, font scheme, and name in the zip.
|
|
7255
|
+
*
|
|
7256
|
+
* A deck may carry one theme part per slide master. Every edit therefore
|
|
7257
|
+
* targets ALL theme parts the masters point at (the same set the save
|
|
7258
|
+
* pipeline's `persistThemeParts` walks), unless the caller narrows it with an
|
|
7259
|
+
* explicit `themePaths` list. The in-memory maps are refreshed alongside:
|
|
7260
|
+
* the per-master maps, the deck-wide snapshots, and the currently active
|
|
7261
|
+
* `themeColorMap` / `themeFontMap`.
|
|
7262
|
+
*/
|
|
7263
|
+
declare class PptxHandlerRuntime$19 extends PptxHandlerRuntime$20 {
|
|
7264
|
+
/**
|
|
7265
|
+
* The theme parts an edit should touch, primary theme first.
|
|
7266
|
+
*
|
|
7267
|
+
* Defaults to every theme referenced by a slide master. A deck whose
|
|
7268
|
+
* masters were never resolved (nothing loaded yet, or a bare zip) falls
|
|
7269
|
+
* back to the primary theme part so the legacy single-theme behaviour is
|
|
7270
|
+
* preserved.
|
|
7271
|
+
*/
|
|
7272
|
+
protected resolveThemeEditTargets(themePaths?: readonly string[]): Promise<string[]>;
|
|
7273
|
+
private readThemePart;
|
|
7238
7274
|
/**
|
|
7239
|
-
* Parse
|
|
7275
|
+
* Parse, edit, and write back every target theme part. Parts the edit
|
|
7276
|
+
* cannot apply to (no `a:themeElements`) are left untouched.
|
|
7240
7277
|
*
|
|
7241
|
-
* @
|
|
7278
|
+
* @returns the paths that were rewritten
|
|
7242
7279
|
*/
|
|
7243
|
-
protected
|
|
7280
|
+
protected rewriteThemeParts(themePaths: readonly string[] | undefined, edit: (data: XmlObject) => boolean): Promise<string[]>;
|
|
7281
|
+
/** Masters whose theme part is among the rewritten paths. */
|
|
7282
|
+
protected mastersUsingThemes(themePaths: readonly string[]): string[];
|
|
7244
7283
|
/**
|
|
7245
|
-
*
|
|
7284
|
+
* Update the theme's colour scheme in-memory and in the zip.
|
|
7246
7285
|
*
|
|
7247
|
-
*
|
|
7248
|
-
*
|
|
7249
|
-
*
|
|
7286
|
+
* Refreshes `themeColorMap`, the deck-wide snapshot, and every per-master
|
|
7287
|
+
* colour map whose theme was rewritten. The `tx1` / `bg1` / `tx2` / `bg2`
|
|
7288
|
+
* alias slots are routed through each master's own `p:clrMap` rather than
|
|
7289
|
+
* assuming the default `tx1 = dk1` mapping, so a master that swaps light
|
|
7290
|
+
* and dark keeps its swap after the edit.
|
|
7250
7291
|
*
|
|
7251
|
-
* @param
|
|
7292
|
+
* @param themePaths optional explicit theme parts to edit; defaults to
|
|
7293
|
+
* every theme a slide master references
|
|
7252
7294
|
*/
|
|
7253
|
-
|
|
7254
|
-
}
|
|
7255
|
-
//#endregion
|
|
7256
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeLayoutPreviews.d.ts
|
|
7257
|
-
/**
|
|
7258
|
-
* Layout thumbnail sourcing for the New Slide / Layout galleries.
|
|
7259
|
-
*
|
|
7260
|
-
* Previews are produced on request rather than during load. Materialising
|
|
7261
|
-
* every layout's artwork means parsing each `p:sldLayout` part and decoding
|
|
7262
|
-
* the images it references, which is measurable on decks carrying several
|
|
7263
|
-
* masters, and the majority of sessions never open the gallery at all. The
|
|
7264
|
-
* results are memoised, so opening the gallery a second time is free.
|
|
7265
|
-
*/
|
|
7266
|
-
declare class PptxHandlerRuntime$22 extends PptxHandlerRuntime$23 {
|
|
7267
|
-
private layoutPreviewCache;
|
|
7295
|
+
updateThemeColorScheme(colorScheme: PptxThemeColorScheme, themePaths?: readonly string[]): Promise<void>;
|
|
7268
7296
|
/**
|
|
7269
|
-
*
|
|
7297
|
+
* Update the theme's font scheme in-memory and in the zip, across every
|
|
7298
|
+
* target theme part and the matching per-master font maps.
|
|
7270
7299
|
*
|
|
7271
|
-
* @param
|
|
7272
|
-
*
|
|
7300
|
+
* @param themePaths optional explicit theme parts to edit; defaults to
|
|
7301
|
+
* every theme a slide master references
|
|
7273
7302
|
*/
|
|
7274
|
-
|
|
7303
|
+
updateThemeFontScheme(fontScheme: PptxThemeFontScheme, themePaths?: readonly string[]): Promise<void>;
|
|
7275
7304
|
/**
|
|
7276
|
-
*
|
|
7277
|
-
*
|
|
7278
|
-
* The default order matches `getLayoutOptions`, since both walk the layout
|
|
7279
|
-
* XML map, which the master parser fills in `p:sldLayoutIdLst` order.
|
|
7305
|
+
* Update the theme name in the zip, on every target theme part.
|
|
7280
7306
|
*
|
|
7281
|
-
* @param
|
|
7282
|
-
*
|
|
7307
|
+
* @param themePaths optional explicit theme parts to edit; defaults to
|
|
7308
|
+
* every theme a slide master references
|
|
7283
7309
|
*/
|
|
7284
|
-
|
|
7285
|
-
/** Drop memoised previews, e.g. after a layout is edited in template mode. */
|
|
7286
|
-
protected invalidateLayoutPreviews(layoutPath?: string): void;
|
|
7310
|
+
updateThemeName(name: string, themePaths?: readonly string[]): Promise<void>;
|
|
7287
7311
|
/**
|
|
7288
|
-
*
|
|
7289
|
-
*
|
|
7312
|
+
* Apply a complete theme (both colors and fonts) to the presentation.
|
|
7313
|
+
* This is a convenience method that combines updateThemeColorScheme
|
|
7314
|
+
* and updateThemeFontScheme.
|
|
7290
7315
|
*/
|
|
7291
|
-
|
|
7316
|
+
applyTheme(colorScheme: PptxThemeColorScheme, fontScheme: PptxThemeFontScheme, themeName?: string): Promise<void>;
|
|
7292
7317
|
}
|
|
7293
7318
|
//#endregion
|
|
7294
|
-
//#region pptx/core/core/runtime/
|
|
7295
|
-
|
|
7296
|
-
* Ordered fill-child tag tokens recognised inside `a:fillStyleLst` /
|
|
7297
|
-
* `a:bgFillStyleLst`. Used by {@link extractFillStyleListChildOrder} to
|
|
7298
|
-
* recover document order from raw XML when fast-xml-parser has merged
|
|
7299
|
-
* heterogeneous siblings into typed buckets.
|
|
7300
|
-
*/
|
|
7301
|
-
declare const FILL_LIST_CHILD_TAGS: readonly ['a:solidFill', 'a:gradFill', 'a:pattFill', 'a:noFill', 'a:grpFill'];
|
|
7302
|
-
type FillListChildTag = (typeof FILL_LIST_CHILD_TAGS)[number];
|
|
7303
|
-
declare class PptxHandlerRuntime$21 extends PptxHandlerRuntime$22 {
|
|
7319
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeComments.d.ts
|
|
7320
|
+
declare class PptxHandlerRuntime$18 extends PptxHandlerRuntime$19 {
|
|
7304
7321
|
/**
|
|
7305
|
-
*
|
|
7322
|
+
* Parse modern threaded comments (PowerPoint 2019+ / Office 365).
|
|
7323
|
+
* Modern comments use `p188:cmLst`/`p15:cmLst` roots within
|
|
7324
|
+
* `ppt/comments/modernComment*.xml` or `ppt/comments-extended/...`.
|
|
7325
|
+
* Each `p188:cm` / `p15:cm` node carries `@_id`, `@_authorId`,
|
|
7326
|
+
* `@_created`, `@_status`, text body in `p188:txBody`/`p15:txBody`,
|
|
7327
|
+
* and thread-parent via `@_parentCmId`.
|
|
7306
7328
|
*/
|
|
7307
|
-
|
|
7329
|
+
protected extractModernSlideComments(slidePath: string): Promise<PptxComment[]>;
|
|
7330
|
+
protected loadModernCommentAuthors(): Promise<void>;
|
|
7331
|
+
protected resolveSlideCommentTarget(slidePath: string): Promise<string | undefined>;
|
|
7332
|
+
protected extractCommentText(commentNode: XmlObject): string;
|
|
7333
|
+
protected extractSlideComments(slidePath: string): Promise<PptxComment[]>;
|
|
7334
|
+
protected loadCommentAuthors(): Promise<void>;
|
|
7335
|
+
/** Derive initials from an author name (first letter of up to 2 tokens). */
|
|
7336
|
+
private toCommentInitials;
|
|
7337
|
+
}
|
|
7338
|
+
//#endregion
|
|
7339
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeSmartArtXmlUtils.d.ts
|
|
7340
|
+
declare class PptxHandlerRuntime$17 extends PptxHandlerRuntime$18 {
|
|
7341
|
+
protected readXmlPartByRelationshipId(slidePath: string, relationshipId: string): Promise<{
|
|
7342
|
+
xml: XmlObject;
|
|
7343
|
+
partPath: string;
|
|
7344
|
+
text: string;
|
|
7345
|
+
} | undefined>;
|
|
7346
|
+
protected collectLocalTextValues(node: unknown, localName: string, output: string[]): void;
|
|
7308
7347
|
/**
|
|
7309
|
-
*
|
|
7310
|
-
*
|
|
7311
|
-
* raw theme XML). Handles `a:solidFill`, `a:gradFill`, `a:pattFill`,
|
|
7312
|
-
* `a:noFill`, `a:grpFill`.
|
|
7348
|
+
* Extract the per-run text + run-properties of a SmartArt content point's
|
|
7349
|
+
* first paragraph (`dgm:t/a:p/a:r`).
|
|
7313
7350
|
*
|
|
7314
|
-
*
|
|
7315
|
-
*
|
|
7316
|
-
*
|
|
7317
|
-
* in
|
|
7318
|
-
*
|
|
7319
|
-
*
|
|
7320
|
-
*
|
|
7351
|
+
* Each `a:r` yields one {@link PptxSmartArtTextRun} carrying its joined
|
|
7352
|
+
* `a:t` text and a verbatim copy of its `a:rPr` properties (when present).
|
|
7353
|
+
* Only the first paragraph is captured: SmartArt content points are
|
|
7354
|
+
* single-paragraph in practice, and the round-trip save path rebuilds a
|
|
7355
|
+
* single paragraph from these runs. Returns undefined when there is fewer
|
|
7356
|
+
* than one run worth preserving (a single run is still returned so per-run
|
|
7357
|
+
* formatting like a bold sole run survives).
|
|
7321
7358
|
*/
|
|
7322
|
-
protected
|
|
7359
|
+
protected extractSmartArtNodeRuns(point: XmlObject): PptxSmartArtTextRun[] | undefined;
|
|
7323
7360
|
/**
|
|
7324
|
-
*
|
|
7325
|
-
*
|
|
7326
|
-
*
|
|
7327
|
-
*
|
|
7328
|
-
*
|
|
7361
|
+
* Extract a content point's per-node visual override.
|
|
7362
|
+
*
|
|
7363
|
+
* Reads the point's presentation `spPr` solid fill and line colour, and the
|
|
7364
|
+
* first run's `rPr` bold / italic / solid fill, into a
|
|
7365
|
+
* {@link PptxSmartArtNodeStyle}. Every field is optional and only set when
|
|
7366
|
+
* present, so an unstyled point yields `undefined` (never throws on missing
|
|
7367
|
+
* structure). This lets the editing UI display the node's current colours.
|
|
7329
7368
|
*/
|
|
7330
|
-
protected
|
|
7369
|
+
protected extractSmartArtNodeStyle(point: XmlObject): PptxSmartArtNodeStyle | undefined;
|
|
7370
|
+
/** Read the first run's `rPr` of a content point's first paragraph. */
|
|
7371
|
+
private firstRunProperties;
|
|
7372
|
+
/** Interpret an OOXML boolean attribute ("1"/"true"/"on" => true). */
|
|
7373
|
+
private xmlBoolean;
|
|
7331
7374
|
/**
|
|
7332
|
-
* Parse `
|
|
7333
|
-
* {@link PptxThemeLineStyle} entries.
|
|
7375
|
+
* Parse background and outline chrome from `dgm:bg` and `dgm:whole`.
|
|
7334
7376
|
*/
|
|
7335
|
-
protected
|
|
7377
|
+
protected parseSmartArtChrome(dataModel: XmlObject | undefined): PptxSmartArtChrome | undefined;
|
|
7336
7378
|
/**
|
|
7337
|
-
*
|
|
7338
|
-
*
|
|
7339
|
-
*
|
|
7379
|
+
* Approximate a non-solid `dgm:bg` fill (gradient or pattern) as a single
|
|
7380
|
+
* display colour, matching the "approximate over drop" precedent used
|
|
7381
|
+
* elsewhere for SmartArt/shape fills: a gradient's own
|
|
7382
|
+
* `extractGradientFillColor` blend (the same helper shape/text gradient
|
|
7383
|
+
* fills already reduce to one colour with), or a pattern's foreground
|
|
7384
|
+
* colour. Returns `undefined` when `bg` has neither (e.g. a blip/picture
|
|
7385
|
+
* fill, or `a:noFill`) - still a silent drop, but no worse than before this
|
|
7386
|
+
* change, and rarer in practice for a diagram background.
|
|
7340
7387
|
*/
|
|
7341
|
-
|
|
7388
|
+
private approximateSmartArtBackgroundFill;
|
|
7389
|
+
/**
|
|
7390
|
+
* Parse colour transform from `ppt/diagrams/colors*.xml`.
|
|
7391
|
+
*/
|
|
7392
|
+
protected parseSmartArtColorTransform(slidePath: string, colorsRelId: string): Promise<PptxSmartArtColorTransform | undefined>;
|
|
7393
|
+
private parseSmartArtColorTransformImpl;
|
|
7394
|
+
/**
|
|
7395
|
+
* Resolve a scheme colour reference to a hex value using the theme colour map.
|
|
7396
|
+
*/
|
|
7397
|
+
protected resolveSmartArtSchemeColor(schemeClr: XmlObject | undefined): string | undefined;
|
|
7342
7398
|
}
|
|
7343
7399
|
//#endregion
|
|
7344
|
-
//#region pptx/core/core/runtime/
|
|
7345
|
-
declare class PptxHandlerRuntime$
|
|
7400
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeSmartArtParsing.d.ts
|
|
7401
|
+
declare class PptxHandlerRuntime$16 extends PptxHandlerRuntime$17 {
|
|
7402
|
+
protected reportIncompleteSmartArtRelationships(graphicFrame: XmlObject | undefined, relationshipIds: DiagramRelationshipIds | undefined, slidePath: string): void;
|
|
7403
|
+
protected parseSmartArtConnections(dataModel: XmlObject | undefined): {
|
|
7404
|
+
parsedConnections: PptxSmartArtConnection[];
|
|
7405
|
+
parentByNodeId: Map<string, string>;
|
|
7406
|
+
};
|
|
7346
7407
|
/**
|
|
7347
|
-
* Parse
|
|
7348
|
-
* {@link PptxThemeFormatScheme}. Each sub-list (fillStyleLst, lnStyleLst,
|
|
7349
|
-
* effectStyleLst, bgFillStyleLst) contains up to three intensity levels
|
|
7350
|
-
* (subtle / moderate / intense) referenced by 1-based index.
|
|
7351
|
-
*
|
|
7352
|
-
* When `rawXml` is supplied (the original theme/themeOverride XML
|
|
7353
|
-
* source), the document order of fill children is recovered via a
|
|
7354
|
-
* targeted regex scan and threaded into {@link parseFillStyleList} so
|
|
7355
|
-
* mixed solid/grad/blip/grpFill lists round-trip in source order even
|
|
7356
|
-
* though fast-xml-parser collapses heterogeneous siblings into typed
|
|
7357
|
-
* buckets.
|
|
7408
|
+
* Parse quick style from `ppt/diagrams/quickStyles*.xml`.
|
|
7358
7409
|
*/
|
|
7359
|
-
protected
|
|
7410
|
+
protected parseSmartArtQuickStyle(slidePath: string, styleRelId: string): Promise<PptxSmartArtQuickStyle | undefined>;
|
|
7360
7411
|
/**
|
|
7361
|
-
*
|
|
7362
|
-
|
|
7363
|
-
|
|
7412
|
+
* Parse pre-computed shapes from `ppt/diagrams/drawing*.xml`.
|
|
7413
|
+
*/
|
|
7414
|
+
protected parseSmartArtDrawingShapes(slidePath: string, drawingRelId: string): Promise<PptxSmartArtDrawingShape[]>;
|
|
7415
|
+
protected parseDrawingShape(sp: XmlObject, index: number, emuPerPx: number, mergedTextColor?: string): PptxSmartArtDrawingShape | null;
|
|
7416
|
+
/**
|
|
7417
|
+
* Build the injected accessor bundle used by the pure drawing-shape style
|
|
7418
|
+
* helpers, binding the shared XML-lookup / colour / gradient / shadow codec
|
|
7419
|
+
* methods so no new colour logic is duplicated here.
|
|
7420
|
+
*/
|
|
7421
|
+
private drawingShapeStyleDeps;
|
|
7422
|
+
}
|
|
7423
|
+
//#endregion
|
|
7424
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeSmartArt.d.ts
|
|
7425
|
+
declare class PptxHandlerRuntime$15 extends PptxHandlerRuntime$16 {
|
|
7426
|
+
getSmartArtDataForGraphicFrame(slidePath: string, graphicFrame: XmlObject | undefined): Promise<PptxSmartArtData | undefined>;
|
|
7427
|
+
private resolveSmartArtDrawingPart;
|
|
7428
|
+
/**
|
|
7429
|
+
* Parse cached SmartArt drawing shapes from an absolute part path.
|
|
7364
7430
|
*
|
|
7365
|
-
*
|
|
7366
|
-
*
|
|
7367
|
-
*
|
|
7368
|
-
* case sensitive, so lowercasing `folHlink` (its only camel-cased member)
|
|
7369
|
-
* used to make PowerPoint refuse the whole saved package with 0x80070570.
|
|
7370
|
-
* A value outside the enumeration is dropped and reported, never written
|
|
7371
|
-
* through; the writer then supplies the standard default for that alias.
|
|
7431
|
+
* Enumerates `dsp:sp` / bare `dsp:pic` (incl. nested `dsp:grpSp`) and
|
|
7432
|
+
* resolves picture (blip) fills to data URLs via the drawing part's own
|
|
7433
|
+
* relationships. Delegates to a pure helper with an injected dep bundle.
|
|
7372
7434
|
*/
|
|
7373
|
-
|
|
7435
|
+
private parseSmartArtDrawingShapesFromPath;
|
|
7436
|
+
/** Bind runtime zip / parser / lookup / image helpers for the drawing parser. */
|
|
7437
|
+
private drawingBlipDeps;
|
|
7438
|
+
}
|
|
7439
|
+
//#endregion
|
|
7440
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeChartDetection.d.ts
|
|
7441
|
+
declare class PptxHandlerRuntime$14 extends PptxHandlerRuntime$15 {
|
|
7442
|
+
protected detectChartType(plotArea: XmlObject | undefined): PptxChartData['chartType'];
|
|
7443
|
+
protected extractChartPointValues(seriesContainer: XmlObject | undefined, preferNumeric: boolean): string[];
|
|
7374
7444
|
/**
|
|
7375
|
-
*
|
|
7376
|
-
*
|
|
7377
|
-
*
|
|
7378
|
-
*
|
|
7445
|
+
* Extract a CATEGORY label list, expanded to its declared length.
|
|
7446
|
+
*
|
|
7447
|
+
* `c:strCache`/`c:numCache` is SPARSE and keyed by `@idx`: a blank category
|
|
7448
|
+
* is simply a missing `c:pt`, and `c:ptCount` gives the true length. A single
|
|
7449
|
+
* empty spacer cell in the source workbook therefore produces a cache with,
|
|
7450
|
+
* say, `ptCount="5"` and no `idx="2"`.
|
|
7451
|
+
*
|
|
7452
|
+
* {@link extractChartPointValues} collapses that to a DENSE four-entry list,
|
|
7453
|
+
* which is right for series names and error-bar arrays but wrong here: the
|
|
7454
|
+
* value cache next to it is expanded by index
|
|
7455
|
+
* (`extractSeriesNumbersWithBlanks`), so the categories came out shorter than
|
|
7456
|
+
* the values. Render sizes the category axis from this array, so every point
|
|
7457
|
+
* past the shortened list went unplotted and the surviving labels sat under
|
|
7458
|
+
* the wrong bars - silently wrong numbers, not a visual glitch.
|
|
7459
|
+
*
|
|
7460
|
+
* Blank slots are kept as empty strings so index alignment survives.
|
|
7379
7461
|
*/
|
|
7380
|
-
protected
|
|
7462
|
+
protected extractChartCategoryValues(categoryContainer: XmlObject | undefined, preferNumeric: boolean): string[];
|
|
7381
7463
|
/**
|
|
7382
|
-
*
|
|
7383
|
-
*
|
|
7464
|
+
* Extract hierarchical category levels from a classic `c:multiLvlStrRef`
|
|
7465
|
+
* (e.g. a PowerPoint Quarter > Month category grouping). See
|
|
7466
|
+
* {@link extractMultiLevelCategoryValues} for the extraction rules; this
|
|
7467
|
+
* is a thin wrapper binding it to the runtime's XML lookup service.
|
|
7384
7468
|
*/
|
|
7385
|
-
protected
|
|
7469
|
+
protected extractChartCategoryLevels(categoryContainer: XmlObject | undefined): {
|
|
7470
|
+
categories: string[];
|
|
7471
|
+
categoryLevels?: string[][];
|
|
7472
|
+
} | undefined;
|
|
7473
|
+
protected extractChartSeriesName(seriesNode: XmlObject): string;
|
|
7474
|
+
}
|
|
7475
|
+
//#endregion
|
|
7476
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeChartParsingHelpers.d.ts
|
|
7477
|
+
declare class PptxHandlerRuntime$13 extends PptxHandlerRuntime$14 {
|
|
7386
7478
|
/**
|
|
7387
|
-
*
|
|
7388
|
-
*
|
|
7389
|
-
*
|
|
7479
|
+
* Parse `c:plotVisOnly` from the chart root element.
|
|
7480
|
+
*
|
|
7481
|
+
* The `c:plotVisOnly` element controls whether hidden cells are plotted.
|
|
7482
|
+
* - `val="1"` or `val="true"` or absent → only visible data is plotted (returns `true`)
|
|
7483
|
+
* - `val="0"` or `val="false"` → hidden data IS plotted (returns `false`)
|
|
7484
|
+
*
|
|
7485
|
+
* Returns `undefined` when the element is absent (caller defaults to `true`).
|
|
7390
7486
|
*/
|
|
7391
|
-
protected
|
|
7392
|
-
colorOverrides?: Record<string, string>;
|
|
7393
|
-
formatSchemeOverride?: PptxThemeFormatScheme;
|
|
7394
|
-
}): () => void;
|
|
7487
|
+
protected parsePlotVisOnly(chartRoot: XmlObject | undefined): boolean | undefined;
|
|
7395
7488
|
/**
|
|
7396
|
-
*
|
|
7397
|
-
* slide's relationships. Theme overrides (`themeOverride*.xml`) can
|
|
7398
|
-
* replace the colour scheme, font scheme, and/or format scheme for
|
|
7399
|
-
* the scope of a specific layout or slide.
|
|
7489
|
+
* Parse `c:pivotSource` from the chart's `c:chartSpace`.
|
|
7400
7490
|
*
|
|
7401
|
-
* The
|
|
7402
|
-
*
|
|
7403
|
-
*
|
|
7404
|
-
*
|
|
7491
|
+
* The `c:pivotSource` element indicates the chart data originates from
|
|
7492
|
+
* a PivotTable. It contains:
|
|
7493
|
+
* - `c:name` — the pivot table reference (e.g. "[workbook.xlsx]Sheet1!PivotTable1")
|
|
7494
|
+
* - `c:fmtId/@val` — an optional format identifier
|
|
7495
|
+
*
|
|
7496
|
+
* The chart still renders using its cached series data; the pivot source
|
|
7497
|
+
* is metadata preserved for round-trip fidelity.
|
|
7405
7498
|
*/
|
|
7406
|
-
protected
|
|
7407
|
-
colorOverrides?: Record<string, string>;
|
|
7408
|
-
formatSchemeOverride?: PptxThemeFormatScheme;
|
|
7409
|
-
} | null>;
|
|
7410
|
-
}
|
|
7411
|
-
//#endregion
|
|
7412
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeThemeRefResolution.d.ts
|
|
7413
|
-
declare class PptxHandlerRuntime$19 extends PptxHandlerRuntime$20 {
|
|
7499
|
+
protected parsePivotSource(chartSpace: XmlObject | undefined): PptxChartData['pivotSource'];
|
|
7414
7500
|
/**
|
|
7415
|
-
*
|
|
7416
|
-
*
|
|
7501
|
+
* Parse `c:ofPieChart` options from the chart-type container.
|
|
7502
|
+
*
|
|
7503
|
+
* The `ofPieType` element is required by the schema; its `@val`
|
|
7504
|
+
* defaults to `"pie"` when absent. Other fields (`splitType`,
|
|
7505
|
+
* `splitPos`, `secondPieSize`, `serLines`, `gapWidth`, `custSplit`)
|
|
7506
|
+
* are optional and only included when present in the XML.
|
|
7417
7507
|
*/
|
|
7418
|
-
protected
|
|
7508
|
+
protected parseOfPieOptions(ofPieContainer: XmlObject | undefined): PptxChartOfPieOptions | undefined;
|
|
7419
7509
|
/**
|
|
7420
|
-
*
|
|
7421
|
-
*
|
|
7510
|
+
* Parse `c:view3D` (CT_View3D) from the chart root.
|
|
7511
|
+
*
|
|
7512
|
+
* Returns `undefined` when the element is absent so it does not
|
|
7513
|
+
* round-trip as an empty `<c:view3D/>` placeholder.
|
|
7422
7514
|
*/
|
|
7423
|
-
protected
|
|
7515
|
+
protected parseView3D(chartRoot: XmlObject | undefined): PptxChartView3D | undefined;
|
|
7424
7516
|
/**
|
|
7425
|
-
*
|
|
7426
|
-
*
|
|
7427
|
-
*
|
|
7517
|
+
* Parse top-level chart chrome flags from `c:chart`:
|
|
7518
|
+
* `c:autoTitleDeleted`, `c:dispBlanksAs`, `c:showDLblsOverMax`.
|
|
7519
|
+
*
|
|
7520
|
+
* Each flag is included in the result only when present on the
|
|
7521
|
+
* source XML so that absence does not produce empty elements on
|
|
7522
|
+
* save.
|
|
7428
7523
|
*/
|
|
7429
|
-
protected
|
|
7430
|
-
stops: NonNullable<ShapeStyle['fillGradientStops']>;
|
|
7431
|
-
css: string | undefined;
|
|
7432
|
-
};
|
|
7524
|
+
protected parseChartChrome(chartRoot: XmlObject | undefined): PptxChartChrome | undefined;
|
|
7433
7525
|
/**
|
|
7434
|
-
*
|
|
7435
|
-
* properties by looking up the 1-based `@_idx` in the theme's format
|
|
7436
|
-
* scheme fill style list.
|
|
7526
|
+
* Capture the raw `c:userShapes` subtree for verbatim round-trip.
|
|
7437
7527
|
*
|
|
7438
|
-
*
|
|
7439
|
-
*
|
|
7440
|
-
*
|
|
7441
|
-
|
|
7528
|
+
* The element references a separate drawing part; we never parse
|
|
7529
|
+
* the nested drawing tree here. Returning the raw object means the
|
|
7530
|
+
* save layer can re-emit it unchanged.
|
|
7531
|
+
*/
|
|
7532
|
+
protected parseUserShapesXml(chartSpace: XmlObject | undefined): unknown;
|
|
7533
|
+
/** Capture the raw `c:pivotFmts` subtree for verbatim round-trip. */
|
|
7534
|
+
protected parsePivotFmtsXml(chartRoot: XmlObject | undefined): unknown;
|
|
7535
|
+
/**
|
|
7536
|
+
* Parse `c:clrMapOvr` into a flat attribute map.
|
|
7442
7537
|
*
|
|
7443
|
-
* The
|
|
7444
|
-
*
|
|
7445
|
-
*
|
|
7538
|
+
* The element carries 12 `bg1/tx1/bg2/tx2/accent1…6/hlink/folHlink`
|
|
7539
|
+
* attributes that remap theme colour roles for the chart only.
|
|
7540
|
+
* Unknown attributes are preserved as-is so that future schema
|
|
7541
|
+
* additions round-trip without code changes.
|
|
7446
7542
|
*/
|
|
7447
|
-
protected
|
|
7543
|
+
protected parseClrMapOvr(chartSpace: XmlObject | undefined): Record<string, string> | undefined;
|
|
7448
7544
|
}
|
|
7449
7545
|
//#endregion
|
|
7450
|
-
//#region pptx/core/core/runtime/
|
|
7451
|
-
declare class PptxHandlerRuntime$
|
|
7452
|
-
protected resolvePrimaryThemePath(): Promise<string | undefined>;
|
|
7453
|
-
protected parseThemeOptions(): Promise<PptxThemeOption[]>;
|
|
7546
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeChartExternalData.d.ts
|
|
7547
|
+
declare class PptxHandlerRuntime$12 extends PptxHandlerRuntime$13 {
|
|
7454
7548
|
/**
|
|
7455
|
-
*
|
|
7456
|
-
*
|
|
7457
|
-
*
|
|
7549
|
+
* Parse `c:externalData` from the chart's `c:chartSpace` and resolve
|
|
7550
|
+
* the external relationship target from the chart part's .rels file.
|
|
7551
|
+
*
|
|
7552
|
+
* In OOXML, `c:externalData` contains `@r:id` referencing a relationship
|
|
7553
|
+
* in the chart part's own .rels file with `TargetMode="External"`, typically
|
|
7554
|
+
* pointing to an external Excel workbook.
|
|
7458
7555
|
*/
|
|
7459
|
-
|
|
7556
|
+
protected parseChartExternalData(chartSpace: XmlObject | undefined, chartPartPath: string): Promise<PptxExternalData | undefined>;
|
|
7460
7557
|
/**
|
|
7461
|
-
*
|
|
7462
|
-
*
|
|
7558
|
+
* Read and parse the embedded xlsx workbook referenced by chart external data.
|
|
7559
|
+
*
|
|
7560
|
+
* When an embedded xlsx binary is available in the external data reference,
|
|
7561
|
+
* this method uses the chart-xlsx-parser utility to extract structured
|
|
7562
|
+
* categories and series from the first worksheet.
|
|
7463
7563
|
*/
|
|
7464
|
-
protected
|
|
7564
|
+
protected parseEmbeddedWorkbook(externalData: PptxExternalData | undefined): Promise<PptxEmbeddedWorkbookData | undefined>;
|
|
7465
7565
|
/**
|
|
7466
|
-
*
|
|
7467
|
-
* dictionaries on {@link masterClrMaps}. Do *not* mutate
|
|
7468
|
-
* {@link themeColorMap} — alias resolution happens at colour-lookup
|
|
7469
|
-
* time so that:
|
|
7470
|
-
*
|
|
7471
|
-
* 1. The raw theme scheme stays the source of truth (clrMap is a
|
|
7472
|
-
* routing layer, not a colour table).
|
|
7473
|
-
* 2. Multi-master decks resolve each slide against its own master's
|
|
7474
|
-
* clrMap rather than always against `masterFiles[0]`.
|
|
7475
|
-
* 3. Layout `clrMapOvr` semantics work correctly when a slide's master
|
|
7476
|
-
* differs from the deck's first master.
|
|
7566
|
+
* Resolve and parse the chart's `c:userShapes` drawing overlay.
|
|
7477
7567
|
*
|
|
7478
|
-
*
|
|
7568
|
+
* The `c:userShapes/@r:id` references a separate drawing part
|
|
7569
|
+
* (`ppt/drawings/drawingN.xml`) via the chart part's `.rels`. This loads
|
|
7570
|
+
* that part and parses its `cdr:relSizeAnchor` / `cdr:absSizeAnchor` shapes
|
|
7571
|
+
* into a renderable {@link PptxChartUserShape} model. Returns `undefined`
|
|
7572
|
+
* when there is no reference, the target cannot be resolved, or the drawing
|
|
7573
|
+
* contains no shapes.
|
|
7479
7574
|
*/
|
|
7480
|
-
protected
|
|
7575
|
+
protected parseChartUserShapes(chartSpace: XmlObject | undefined, chartPartPath: string): Promise<PptxChartUserShape[] | undefined>;
|
|
7481
7576
|
/**
|
|
7482
|
-
*
|
|
7483
|
-
*
|
|
7484
|
-
* each master's per-master theme (multi-master support).
|
|
7485
|
-
*
|
|
7486
|
-
* Phase 2 Stream B / C-H4.
|
|
7577
|
+
* Read the chart part's `.rels` file and return all relationships as an
|
|
7578
|
+
* array of `{ id, type, target }` objects.
|
|
7487
7579
|
*/
|
|
7488
|
-
protected
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
}
|
|
7580
|
+
protected readChartRels(chartPartPath: string): Promise<Array<{
|
|
7581
|
+
id: string;
|
|
7582
|
+
type: string;
|
|
7583
|
+
target: string;
|
|
7584
|
+
}>>;
|
|
7585
|
+
}
|
|
7586
|
+
//#endregion
|
|
7587
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeChartColorStyle.d.ts
|
|
7588
|
+
declare class PptxHandlerRuntime$11 extends PptxHandlerRuntime$12 {
|
|
7493
7589
|
/**
|
|
7494
|
-
* Parse
|
|
7495
|
-
*
|
|
7590
|
+
* Parse the Office 2013+ chart-style part (`ppt/charts/style#.xml`)
|
|
7591
|
+
* referenced from the chart's relationships, sibling to
|
|
7592
|
+
* {@link parseChartColorStyle}. This is a SEPARATE part/relationship from
|
|
7593
|
+
* the colour style (`chartColorStyle*.xml`): the colour style cycles
|
|
7594
|
+
* series colours, this one carries per-element (title, axis, gridline,
|
|
7595
|
+
* data point, ...) font/line/fill defaults for the active built-in style.
|
|
7596
|
+
*/
|
|
7597
|
+
protected parseChartStyleDefinitionPart(chartPartPath: string): Promise<ResolvedChartStyleDefinition | undefined>;
|
|
7598
|
+
/**
|
|
7599
|
+
* Parse the Office 2013+ chart color style part (`chartColorStyle*.xml`)
|
|
7600
|
+
* referenced from the chart's relationships.
|
|
7496
7601
|
*
|
|
7497
|
-
*
|
|
7498
|
-
*
|
|
7602
|
+
* The color style XML contains `<cs:colorStyle meth="cycle" id="10">` with
|
|
7603
|
+
* child `<a:schemeClr val="accent1"/>` elements that define the ordered
|
|
7604
|
+
* color palette.
|
|
7499
7605
|
*
|
|
7500
|
-
*
|
|
7606
|
+
* Returns `{ palette, method }` where `palette` is an array of resolved hex
|
|
7607
|
+
* colors, or `undefined` when no color style is found.
|
|
7501
7608
|
*/
|
|
7609
|
+
protected parseChartColorStyle(chartPartPath: string): Promise<{
|
|
7610
|
+
palette: string[];
|
|
7611
|
+
method: PptxChartData['colorMethod'];
|
|
7612
|
+
partPath: string;
|
|
7613
|
+
} | undefined>;
|
|
7502
7614
|
/**
|
|
7503
|
-
*
|
|
7504
|
-
*
|
|
7505
|
-
*
|
|
7506
|
-
* the primary-theme-first parse order. Phase 4 Stream A / M4 (#83).
|
|
7615
|
+
* The theme's `accent1` to `accent6` as `#RRGGBB`, the colours a chart with no
|
|
7616
|
+
* colour-style part builds its `c:style` palette from. `undefined` unless the
|
|
7617
|
+
* theme resolves all six.
|
|
7507
7618
|
*/
|
|
7508
|
-
protected
|
|
7509
|
-
protected collectFontScriptOverrides(fontNode: XmlObject | undefined): Record<string, string>;
|
|
7619
|
+
protected resolveChartThemeAccents(): string[] | undefined;
|
|
7510
7620
|
/**
|
|
7511
|
-
*
|
|
7512
|
-
*
|
|
7621
|
+
* Traverse a `<cs:colorStyle>` element and extract ordered palette colors.
|
|
7622
|
+
*
|
|
7623
|
+
* Child elements can be:
|
|
7624
|
+
* - `<a:schemeClr val="accent1"/>` — resolved via theme color map
|
|
7625
|
+
* - `<a:srgbClr val="4472C4"/>` — explicit RGB
|
|
7513
7626
|
*/
|
|
7514
|
-
|
|
7627
|
+
private collectColorStylePalette;
|
|
7515
7628
|
/**
|
|
7516
|
-
*
|
|
7517
|
-
*
|
|
7518
|
-
* deck. Multi-master support — Phase 2 Stream B / C-H4.
|
|
7629
|
+
* Resolve a scheme color reference (`<a:schemeClr val="accent1"/>`) to a
|
|
7630
|
+
* concrete hex color using the presentation theme color map.
|
|
7519
7631
|
*/
|
|
7520
|
-
|
|
7521
|
-
protected loadThemeData(): Promise<void>;
|
|
7632
|
+
private resolveChartSchemeColor;
|
|
7522
7633
|
}
|
|
7523
7634
|
//#endregion
|
|
7524
|
-
//#region pptx/core/core/runtime/
|
|
7525
|
-
/**
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
* A deck may carry one theme part per slide master. Every edit therefore
|
|
7529
|
-
* targets ALL theme parts the masters point at (the same set the save
|
|
7530
|
-
* pipeline's `persistThemeParts` walks), unless the caller narrows it with an
|
|
7531
|
-
* explicit `themePaths` list. The in-memory maps are refreshed alongside:
|
|
7532
|
-
* the per-master maps, the deck-wide snapshots, and the currently active
|
|
7533
|
-
* `themeColorMap` / `themeFontMap`.
|
|
7534
|
-
*/
|
|
7535
|
-
declare class PptxHandlerRuntime$17 extends PptxHandlerRuntime$18 {
|
|
7635
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeChartExParsing.d.ts
|
|
7636
|
+
/** The chart-part facts {@link PptxHandlerRuntime.readChartPartFacts} returns. */
|
|
7637
|
+
type ChartPartFacts = Pick<PptxChartData, 'externalData' | 'embeddedWorkbookData' | 'pivotSource' | 'colorPalette' | 'themeAccentColors' | 'colorMethod' | 'colorStylePartPath' | 'colorStyleOriginalPalette' | 'colorStyleOriginalMethod' | 'chartStyleDefinition' | 'layouts' | 'userShapesXml' | 'userShapes' | 'pivotFormats' | 'printSettings' | 'protection'>;
|
|
7638
|
+
declare class PptxHandlerRuntime$10 extends PptxHandlerRuntime$11 {
|
|
7536
7639
|
/**
|
|
7537
|
-
* The
|
|
7538
|
-
*
|
|
7539
|
-
*
|
|
7540
|
-
*
|
|
7541
|
-
* back to the primary theme part so the legacy single-theme behaviour is
|
|
7542
|
-
* preserved.
|
|
7640
|
+
* The facts of a chart part that live outside the plot (or in other parts): the external data
|
|
7641
|
+
* reference and the embedded workbook's rows, pivot source and formats, the colour-style and
|
|
7642
|
+
* chart-style parts, layouts, user shapes, print settings and protection. Only the facts that
|
|
7643
|
+
* are present are set.
|
|
7543
7644
|
*/
|
|
7544
|
-
|
|
7545
|
-
private readThemePart;
|
|
7645
|
+
protected readChartPartFacts(chartSpace: XmlObject | undefined, chartRoot: XmlObject | undefined, chartPartPath: string): Promise<ChartPartFacts>;
|
|
7546
7646
|
/**
|
|
7547
|
-
*
|
|
7548
|
-
*
|
|
7549
|
-
*
|
|
7550
|
-
* @returns the paths that were rewritten
|
|
7647
|
+
* Resolve a chart title's text when it was authored as a linked cell reference
|
|
7648
|
+
* (`c:title/c:tx/c:strRef`, PowerPoint's "Title Linked to Cell") rather than rich text: its
|
|
7649
|
+
* cached text lives in `c:strRef/c:strCache/c:pt/c:v`.
|
|
7551
7650
|
*/
|
|
7552
|
-
|
|
7553
|
-
/** Masters whose theme part is among the rewritten paths. */
|
|
7554
|
-
private mastersUsingThemes;
|
|
7651
|
+
protected resolveChartLinkedTitleText(titleNode: XmlObject | undefined): string | undefined;
|
|
7555
7652
|
/**
|
|
7556
|
-
*
|
|
7557
|
-
*
|
|
7558
|
-
* Refreshes `themeColorMap`, the deck-wide snapshot, and every per-master
|
|
7559
|
-
* colour map whose theme was rewritten. The `tx1` / `bg1` / `tx2` / `bg2`
|
|
7560
|
-
* alias slots are routed through each master's own `p:clrMap` rather than
|
|
7561
|
-
* assuming the default `tx1 = dk1` mapping, so a master that swaps light
|
|
7562
|
-
* and dark keeps its swap after the edit.
|
|
7653
|
+
* Parse a cx: namespace (Office 2016+) chart using the utility parser.
|
|
7563
7654
|
*
|
|
7564
|
-
* @param
|
|
7565
|
-
*
|
|
7655
|
+
* @param plotArea - The `c:plotArea` XML object.
|
|
7656
|
+
* @param chartType - The detected chart type.
|
|
7657
|
+
* @param chartSpace - The `c:chartSpace` XML root.
|
|
7658
|
+
* @param chartRoot - The `c:chart` XML element.
|
|
7659
|
+
* @param chartPartPath - The ZIP path of the chart part.
|
|
7660
|
+
* @param chartRelationshipId - The relationship ID linking the slide to this chart.
|
|
7661
|
+
* @returns Parsed chart data, or `undefined` if cx parsing yields no series.
|
|
7566
7662
|
*/
|
|
7567
|
-
|
|
7663
|
+
protected parseCxChart(plotArea: XmlObject, chartType: PptxChartData['chartType'], chartSpace: XmlObject | undefined, chartRoot: XmlObject | undefined, chartPartPath: string, chartRelationshipId: string): Promise<PptxChartData | undefined>;
|
|
7664
|
+
}
|
|
7665
|
+
//#endregion
|
|
7666
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeChartParsing.d.ts
|
|
7667
|
+
declare class PptxHandlerRuntime$9 extends PptxHandlerRuntime$10 {
|
|
7568
7668
|
/**
|
|
7569
|
-
*
|
|
7570
|
-
* target theme part and the matching per-master font maps.
|
|
7669
|
+
* Parse chart data from a graphic frame element on a slide.
|
|
7571
7670
|
*
|
|
7572
|
-
*
|
|
7573
|
-
*
|
|
7671
|
+
* Resolves the chart relationship, reads the chart part, builds the chart model from the
|
|
7672
|
+
* neutral `c:chartSpace` model (classic parts) or the ChartEx reader, and gathers the part's
|
|
7673
|
+
* metadata (axes, data table, external data, colour style...) into one {@link PptxChartData}.
|
|
7674
|
+
*
|
|
7675
|
+
* @param slidePath - The ZIP path of the slide containing the graphic frame.
|
|
7676
|
+
* @param graphicFrame - The raw XML object for the `p:graphicFrame` element.
|
|
7677
|
+
* @returns The parsed chart data, or `undefined` if the frame is not a chart.
|
|
7574
7678
|
*/
|
|
7575
|
-
|
|
7679
|
+
getChartDataForGraphicFrame(slidePath: string, graphicFrame: XmlObject | undefined): Promise<PptxChartData | undefined>;
|
|
7680
|
+
/** The runtime services the object-tree half of the adapter reads with. */
|
|
7681
|
+
private chartTreeReader;
|
|
7576
7682
|
/**
|
|
7577
|
-
*
|
|
7578
|
-
*
|
|
7579
|
-
* @param themePaths optional explicit theme parts to edit; defaults to
|
|
7580
|
-
* every theme a slide master references
|
|
7683
|
+
* Every series of every chart group, built from the neutral model with the styles of its
|
|
7684
|
+
* object-tree node, plus the c15 filtered series and titles of the groups.
|
|
7581
7685
|
*/
|
|
7582
|
-
|
|
7686
|
+
private buildChartSeries;
|
|
7583
7687
|
/**
|
|
7584
|
-
*
|
|
7585
|
-
*
|
|
7586
|
-
*
|
|
7688
|
+
* The drop lines, high-low lines and up/down bars, and the data table and 3-D surfaces, with
|
|
7689
|
+
* their resolved styles. The line elements are legal only on some groups; on a combo whose
|
|
7690
|
+
* first group is another type (volume + stock writes c:barChart first), each is read from the
|
|
7691
|
+
* first group that allows it.
|
|
7587
7692
|
*/
|
|
7588
|
-
|
|
7589
|
-
}
|
|
7590
|
-
//#endregion
|
|
7591
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeComments.d.ts
|
|
7592
|
-
declare class PptxHandlerRuntime$16 extends PptxHandlerRuntime$17 {
|
|
7693
|
+
private readChartLinesAndChrome;
|
|
7593
7694
|
/**
|
|
7594
|
-
*
|
|
7595
|
-
*
|
|
7596
|
-
* `ppt/comments/modernComment*.xml` or `ppt/comments-extended/...`.
|
|
7597
|
-
* Each `p188:cm` / `p15:cm` node carries `@_id`, `@_authorId`,
|
|
7598
|
-
* `@_created`, `@_status`, text body in `p188:txBody`/`p15:txBody`,
|
|
7599
|
-
* and thread-parent via `@_parentCmId`.
|
|
7695
|
+
* A classic chart: structure from the neutral model, styles and the part facts from the
|
|
7696
|
+
* object tree, the embedded workbook as the fallback of empty caches.
|
|
7600
7697
|
*/
|
|
7601
|
-
|
|
7602
|
-
protected loadModernCommentAuthors(): Promise<void>;
|
|
7603
|
-
protected resolveSlideCommentTarget(slidePath: string): Promise<string | undefined>;
|
|
7604
|
-
protected extractCommentText(commentNode: XmlObject): string;
|
|
7605
|
-
protected extractSlideComments(slidePath: string): Promise<PptxComment[]>;
|
|
7606
|
-
protected loadCommentAuthors(): Promise<void>;
|
|
7607
|
-
/** Derive initials from an author name (first letter of up to 2 tokens). */
|
|
7608
|
-
private toCommentInitials;
|
|
7698
|
+
private buildClassicChart;
|
|
7609
7699
|
}
|
|
7610
7700
|
//#endregion
|
|
7611
|
-
//#region pptx/core/core/runtime/
|
|
7612
|
-
declare class PptxHandlerRuntime$
|
|
7613
|
-
protected
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7701
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimePresentationStructure.d.ts
|
|
7702
|
+
declare class PptxHandlerRuntime$8 extends PptxHandlerRuntime$9 {
|
|
7703
|
+
protected parseEditorAnimations(slideXml: XmlObject | undefined): PptxElementAnimation[] | undefined;
|
|
7704
|
+
protected parseSlideTransition(slideXml: XmlObject | undefined, slidePath?: string): PptxSlideTransition | undefined;
|
|
7705
|
+
protected extractSectionMap(): {
|
|
7706
|
+
sectionBySlideId: Map<string, {
|
|
7707
|
+
sectionId: string;
|
|
7708
|
+
sectionName: string;
|
|
7709
|
+
}>;
|
|
7710
|
+
orderedSections: PptxSection[];
|
|
7711
|
+
};
|
|
7619
7712
|
/**
|
|
7620
|
-
* Extract the
|
|
7621
|
-
* first paragraph (`dgm:t/a:p/a:r`).
|
|
7713
|
+
* Extract the Header & Footer dialog's state.
|
|
7622
7714
|
*
|
|
7623
|
-
*
|
|
7624
|
-
*
|
|
7625
|
-
*
|
|
7626
|
-
*
|
|
7627
|
-
*
|
|
7628
|
-
*
|
|
7629
|
-
*
|
|
7715
|
+
* This used to read `p:presentation/p:hf`, an element the OOXML schema
|
|
7716
|
+
* does not allow (CT_Presentation, §19.2.1.26) and that no real deck has
|
|
7717
|
+
* ever contained, so the dialog opened blank for every file. The flags and
|
|
7718
|
+
* the footer/date TEXT actually live on the slide master: `p:hf` for the
|
|
7719
|
+
* former, the master's `ftr` / `dt` / `hdr` placeholder shapes for the
|
|
7720
|
+
* latter. See `header-footer-parts.ts` for the COM evidence.
|
|
7721
|
+
*
|
|
7722
|
+
* The first slide master wins, matching the dialog's presentation-wide
|
|
7723
|
+
* shape. Multi-master decks can disagree; the per-master flags remain
|
|
7724
|
+
* available on `PptxData.slideMasters[n].headerFooter`.
|
|
7630
7725
|
*/
|
|
7631
|
-
protected
|
|
7726
|
+
protected extractHeaderFooter(): PptxHeaderFooter | undefined;
|
|
7727
|
+
/** The `p:sldMaster` node of the first master, in archive-path order. */
|
|
7728
|
+
private firstSlideMasterRoot;
|
|
7632
7729
|
/**
|
|
7633
|
-
* Extract
|
|
7634
|
-
*
|
|
7635
|
-
* Reads the point's presentation `spPr` solid fill and line colour, and the
|
|
7636
|
-
* first run's `rPr` bold / italic / solid fill, into a
|
|
7637
|
-
* {@link PptxSmartArtNodeStyle}. Every field is optional and only set when
|
|
7638
|
-
* present, so an unstyled point yields `undefined` (never throws on missing
|
|
7639
|
-
* structure). This lets the editing UI display the node's current colours.
|
|
7730
|
+
* Extract photo album metadata from `p:photoAlbum` in presentation XML.
|
|
7640
7731
|
*/
|
|
7641
|
-
protected
|
|
7642
|
-
/** Read the first run's `rPr` of a content point's first paragraph. */
|
|
7643
|
-
private firstRunProperties;
|
|
7644
|
-
/** Interpret an OOXML boolean attribute ("1"/"true"/"on" => true). */
|
|
7645
|
-
private xmlBoolean;
|
|
7732
|
+
protected extractPhotoAlbum(): PptxPhotoAlbum | undefined;
|
|
7646
7733
|
/**
|
|
7647
|
-
*
|
|
7734
|
+
* Extract write-protection verifier from `p:modifyVerifier` in presentation XML.
|
|
7648
7735
|
*/
|
|
7649
|
-
protected
|
|
7736
|
+
protected extractModifyVerifier(): PptxModifyVerifier | undefined;
|
|
7650
7737
|
/**
|
|
7651
|
-
*
|
|
7652
|
-
* display colour, matching the "approximate over drop" precedent used
|
|
7653
|
-
* elsewhere for SmartArt/shape fills: a gradient's own
|
|
7654
|
-
* `extractGradientFillColor` blend (the same helper shape/text gradient
|
|
7655
|
-
* fills already reduce to one colour with), or a pattern's foreground
|
|
7656
|
-
* colour. Returns `undefined` when `bg` has neither (e.g. a blip/picture
|
|
7657
|
-
* fill, or `a:noFill`) - still a silent drop, but no worse than before this
|
|
7658
|
-
* change, and rarer in practice for a diagram background.
|
|
7738
|
+
* Extract East Asian line-break settings from `p:kinsoku` in presentation XML.
|
|
7659
7739
|
*/
|
|
7660
|
-
|
|
7740
|
+
protected extractKinsoku(): PptxKinsoku | undefined;
|
|
7661
7741
|
/**
|
|
7662
|
-
*
|
|
7742
|
+
* Extract `p:presentation/@embedTrueTypeFonts` (ECMA-376 §19.2.1.26).
|
|
7743
|
+
* `undefined` when absent, matching the `@showMasterPhAnim` convention of
|
|
7744
|
+
* never forcing the spec default onto the typed model.
|
|
7663
7745
|
*/
|
|
7664
|
-
protected
|
|
7665
|
-
private parseSmartArtColorTransformImpl;
|
|
7746
|
+
protected extractEmbedTrueTypeFonts(): boolean | undefined;
|
|
7666
7747
|
/**
|
|
7667
|
-
*
|
|
7748
|
+
* Extract `p:presentation/@firstSlideNum` (ECMA-376 §19.2.1.26, an
|
|
7749
|
+
* `xsd:int`). `undefined` when absent, not an integer, or outside the
|
|
7750
|
+
* `xsd:int` range (-2147483648 to 2147483647, which also rejects digit
|
|
7751
|
+
* strings too long to parse), so the spec default (`1`) is never forced
|
|
7752
|
+
* onto the typed model.
|
|
7668
7753
|
*/
|
|
7669
|
-
protected
|
|
7754
|
+
protected extractFirstSlideNumber(): number | undefined;
|
|
7670
7755
|
}
|
|
7671
7756
|
//#endregion
|
|
7672
|
-
//#region pptx/core/core/runtime/
|
|
7673
|
-
declare class PptxHandlerRuntime$
|
|
7674
|
-
protected
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7757
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeEmbeddedFonts.d.ts
|
|
7758
|
+
declare class PptxHandlerRuntime$7 extends PptxHandlerRuntime$8 {
|
|
7759
|
+
protected getEmbeddedFonts(fontList?: PptxEmbeddedFontList): Promise<PptxEmbeddedFont[]>;
|
|
7760
|
+
/** Load the presentation.xml.rels and build a map of rId → target path. */
|
|
7761
|
+
private loadPresentationFontRels;
|
|
7762
|
+
/** Extract, de-obfuscate, and encode a single font variant. */
|
|
7763
|
+
private extractEmbeddedFontVariant;
|
|
7764
|
+
/** Convert Uint8Array to base64 string. */
|
|
7765
|
+
private uint8ArrayToBase64;
|
|
7766
|
+
getLayoutOptions(): PptxLayoutOption[];
|
|
7767
|
+
protected resolveMasterPathForLayout(layoutPath: string): string | undefined;
|
|
7768
|
+
}
|
|
7769
|
+
//#endregion
|
|
7770
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeLoadSession.d.ts
|
|
7771
|
+
declare class PptxHandlerRuntime$6 extends PptxHandlerRuntime$7 {
|
|
7772
|
+
protected isZipContainer(data: ArrayBuffer): boolean;
|
|
7773
|
+
protected initializeLoadSession(data: ArrayBuffer, options: PptxHandlerLoadOptions): Promise<void>;
|
|
7679
7774
|
/**
|
|
7680
|
-
*
|
|
7775
|
+
* Detect and preserve VBA macro project data for .pptm round-trip.
|
|
7776
|
+
*
|
|
7777
|
+
* Scans the ZIP for `ppt/vbaProject.bin` and any related VBA parts
|
|
7778
|
+
* (e.g. `ppt/vbaData.xml`). The raw binary data is stored in runtime
|
|
7779
|
+
* state so it can be written back during save.
|
|
7681
7780
|
*/
|
|
7682
|
-
protected
|
|
7781
|
+
protected detectAndPreserveVbaProject(): Promise<void>;
|
|
7683
7782
|
/**
|
|
7684
|
-
*
|
|
7783
|
+
* Scan ZIP entry paths for `_xmlsignatures/` parts to detect digital
|
|
7784
|
+
* signatures. Stores the result in runtime state so it can be checked
|
|
7785
|
+
* during build and stripped during save.
|
|
7685
7786
|
*/
|
|
7686
|
-
protected
|
|
7687
|
-
protected parseDrawingShape(sp: XmlObject, index: number, emuPerPx: number, mergedTextColor?: string): PptxSmartArtDrawingShape | null;
|
|
7787
|
+
protected detectDigitalSignatureParts(): void;
|
|
7688
7788
|
/**
|
|
7689
|
-
*
|
|
7690
|
-
*
|
|
7691
|
-
*
|
|
7789
|
+
* Scan ZIP entries for `customXml/item*.xml` parts and their associated
|
|
7790
|
+
* `itemProps*.xml` property files. Parsed parts are stored in
|
|
7791
|
+
* `this.customXmlParts` for round-trip preservation.
|
|
7692
7792
|
*/
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7793
|
+
protected parseCustomXmlParts(): Promise<void>;
|
|
7794
|
+
protected loadPresentationState(): Promise<{
|
|
7795
|
+
width: number;
|
|
7796
|
+
height: number;
|
|
7797
|
+
notesWidthEmu: number;
|
|
7798
|
+
notesHeightEmu: number;
|
|
7799
|
+
sectionBySlideId: Map<string, {
|
|
7800
|
+
sectionId: string;
|
|
7801
|
+
sectionName: string;
|
|
7802
|
+
}>;
|
|
7803
|
+
orderedSections: PptxSection[];
|
|
7804
|
+
}>;
|
|
7700
7805
|
/**
|
|
7701
|
-
*
|
|
7702
|
-
*
|
|
7703
|
-
*
|
|
7704
|
-
*
|
|
7705
|
-
*
|
|
7806
|
+
* Recover and attach the real embedded binary for each OLE element on a
|
|
7807
|
+
* slide so callers can download / open the inner file.
|
|
7808
|
+
*
|
|
7809
|
+
* For each embedded (non-linked) OLE object: resolve its relationship
|
|
7810
|
+
* target to a zip path (same resolution as images), read the bytes, unwrap
|
|
7811
|
+
* a generic "Package" wrapper (recovering the original file name) when
|
|
7812
|
+
* present, derive a MIME type, and expose the payload as a data-URL on the
|
|
7813
|
+
* element. Linked objects, missing targets, oversized payloads, and parse
|
|
7814
|
+
* failures are skipped silently so existing behaviour is preserved.
|
|
7706
7815
|
*/
|
|
7707
|
-
|
|
7708
|
-
/**
|
|
7709
|
-
|
|
7816
|
+
protected enrichOleElementsWithEmbeddedData(elements: PptxElement[], slidePath: string, depth?: number): Promise<void>;
|
|
7817
|
+
/** Thin instance-bound wrapper; see `enrichBulletPictureImages` for the logic. */
|
|
7818
|
+
protected enrichBulletPictureElementsWithEmbeddedData(elements: PptxElement[], slidePath: string): Promise<void>;
|
|
7819
|
+
protected loadSlidesForPresentation(sectionBySlideId: Map<string, {
|
|
7820
|
+
sectionId: string;
|
|
7821
|
+
sectionName: string;
|
|
7822
|
+
}>): Promise<PptxSlide[]>;
|
|
7710
7823
|
}
|
|
7711
7824
|
//#endregion
|
|
7712
|
-
//#region pptx/core/core/runtime/
|
|
7713
|
-
declare class PptxHandlerRuntime$
|
|
7714
|
-
protected
|
|
7715
|
-
|
|
7825
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeLoadPipeline.d.ts
|
|
7826
|
+
declare class PptxHandlerRuntime$5 extends PptxHandlerRuntime$6 {
|
|
7827
|
+
protected buildLoadData(presentationState: {
|
|
7828
|
+
width: number;
|
|
7829
|
+
height: number;
|
|
7830
|
+
notesWidthEmu: number;
|
|
7831
|
+
notesHeightEmu: number;
|
|
7832
|
+
orderedSections: PptxSection[];
|
|
7833
|
+
}, slidesWithWarnings: PptxSlide[], slideMasters: PptxSlideMaster[]): Promise<PptxData>;
|
|
7716
7834
|
/**
|
|
7717
|
-
*
|
|
7718
|
-
*
|
|
7719
|
-
*
|
|
7720
|
-
*
|
|
7721
|
-
* empty spacer cell in the source workbook therefore produces a cache with,
|
|
7722
|
-
* say, `ptCount="5"` and no `idx="2"`.
|
|
7723
|
-
*
|
|
7724
|
-
* {@link extractChartPointValues} collapses that to a DENSE four-entry list,
|
|
7725
|
-
* which is right for series names and error-bar arrays but wrong here: the
|
|
7726
|
-
* value cache next to it is expanded by index
|
|
7727
|
-
* (`extractSeriesNumbersWithBlanks`), so the categories came out shorter than
|
|
7728
|
-
* the values. Render sizes the category axis from this array, so every point
|
|
7729
|
-
* past the shortened list went unplotted and the surviving labels sat under
|
|
7730
|
-
* the wrong bars - silently wrong numbers, not a visual glitch.
|
|
7835
|
+
* Walk the raw XML of every slide to find the highest numeric `@_id`
|
|
7836
|
+
* attribute on `p:cNvPr` / `p:cNvCxnSpPr` / `p:cNvPicPr` nodes.
|
|
7837
|
+
* This is used to seed the element builder's ID counter so that
|
|
7838
|
+
* new elements never collide with existing ones.
|
|
7731
7839
|
*
|
|
7732
|
-
*
|
|
7840
|
+
* Implementation note (Load H1): uses an explicit-stack iterative walk
|
|
7841
|
+
* instead of recursion to bound stack usage on attacker-supplied XML
|
|
7842
|
+
* with deeply nested nodes. Also caps total visited nodes at
|
|
7843
|
+
* MAX_NODES to bound CPU on pathological trees.
|
|
7733
7844
|
*/
|
|
7734
|
-
protected
|
|
7845
|
+
protected findMaxElementId(slides: PptxSlide[]): number;
|
|
7846
|
+
protected resetElementIdCounter(slides: PptxSlide[]): void;
|
|
7847
|
+
protected attachSlideWarnings(slides: PptxSlide[]): PptxSlide[];
|
|
7735
7848
|
/**
|
|
7736
|
-
*
|
|
7737
|
-
*
|
|
7738
|
-
* {@link extractMultiLevelCategoryValues} for the extraction rules; this
|
|
7739
|
-
* is a thin wrapper binding it to the runtime's XML lookup service.
|
|
7849
|
+
* Revoke all Blob URLs created during image loading.
|
|
7850
|
+
* Safe to call in non-browser environments (no-op).
|
|
7740
7851
|
*/
|
|
7741
|
-
|
|
7742
|
-
categories: string[];
|
|
7743
|
-
categoryLevels?: string[][];
|
|
7744
|
-
} | undefined;
|
|
7745
|
-
protected extractChartSeriesName(seriesNode: XmlObject): string;
|
|
7746
|
-
}
|
|
7747
|
-
//#endregion
|
|
7748
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeChartParsingHelpers.d.ts
|
|
7749
|
-
declare class PptxHandlerRuntime$11 extends PptxHandlerRuntime$12 {
|
|
7852
|
+
revokeBlobUrls(): void;
|
|
7750
7853
|
/**
|
|
7751
|
-
*
|
|
7854
|
+
* Release all resources held by this handler instance.
|
|
7752
7855
|
*
|
|
7753
|
-
*
|
|
7754
|
-
* -
|
|
7755
|
-
* -
|
|
7856
|
+
* - Revokes every Blob URL created for images/media.
|
|
7857
|
+
* - Clears all in-memory caches (image data, XML trees, relationships).
|
|
7858
|
+
* - Nulls out the in-memory ZIP archive (largest single allocation).
|
|
7756
7859
|
*
|
|
7757
|
-
*
|
|
7860
|
+
* After calling `dispose()`, the handler cannot load new data, save,
|
|
7861
|
+
* or resolve images. Create a new `PptxHandler` instance instead.
|
|
7758
7862
|
*/
|
|
7759
|
-
|
|
7863
|
+
dispose(): void;
|
|
7864
|
+
load(data: ArrayBuffer, options?: PptxHandlerLoadOptions): Promise<PptxData>;
|
|
7760
7865
|
/**
|
|
7761
|
-
*
|
|
7762
|
-
*
|
|
7763
|
-
* The `c:pivotSource` element indicates the chart data originates from
|
|
7764
|
-
* a PivotTable. It contains:
|
|
7765
|
-
* - `c:name` — the pivot table reference (e.g. "[workbook.xlsx]Sheet1!PivotTable1")
|
|
7766
|
-
* - `c:fmtId/@val` — an optional format identifier
|
|
7767
|
-
*
|
|
7768
|
-
* The chart still renders using its cached series data; the pivot source
|
|
7769
|
-
* is metadata preserved for round-trip fidelity.
|
|
7866
|
+
* Retrieve the current background colour for a layout or master.
|
|
7770
7867
|
*/
|
|
7771
|
-
|
|
7868
|
+
getTemplateBackgroundColor(path: string): string | undefined;
|
|
7772
7869
|
/**
|
|
7773
|
-
*
|
|
7870
|
+
* Update the background colour of a slide layout or slide master XML node.
|
|
7774
7871
|
*
|
|
7775
|
-
*
|
|
7776
|
-
*
|
|
7777
|
-
*
|
|
7778
|
-
*
|
|
7872
|
+
* @param path - The archive path of the layout or master
|
|
7873
|
+
* (e.g. `ppt/slideLayouts/slideLayout1.xml`)
|
|
7874
|
+
* @param backgroundColor - Hex colour string (e.g. `#FF0000`) or
|
|
7875
|
+
* `undefined` / empty to remove background.
|
|
7779
7876
|
*/
|
|
7780
|
-
|
|
7877
|
+
setTemplateBackground(path: string, backgroundColor: string | undefined): void;
|
|
7878
|
+
createXmlBuilder(data: PptxData): PptxXmlBuilder;
|
|
7879
|
+
Builder(data: PptxData): PptxXmlBuilder;
|
|
7880
|
+
getCompatibilityWarnings(): PptxCompatibilityWarning[];
|
|
7781
7881
|
/**
|
|
7782
|
-
*
|
|
7783
|
-
*
|
|
7784
|
-
* Returns `undefined` when the element is absent so it does not
|
|
7785
|
-
* round-trip as an empty `<c:view3D/>` placeholder.
|
|
7882
|
+
* Find the master path that a given layout belongs to by scanning
|
|
7883
|
+
* the layout's own `.rels` file for a `slideMaster` relationship.
|
|
7786
7884
|
*/
|
|
7787
|
-
protected
|
|
7885
|
+
protected findMasterPathForLayout(layoutPath: string): string | undefined;
|
|
7788
7886
|
/**
|
|
7789
|
-
*
|
|
7790
|
-
* `c:autoTitleDeleted`, `c:dispBlanksAs`, `c:showDLblsOverMax`.
|
|
7791
|
-
*
|
|
7792
|
-
* Each flag is included in the result only when present on the
|
|
7793
|
-
* source XML so that absence does not produce empty elements on
|
|
7794
|
-
* save.
|
|
7887
|
+
* Find the master path for a slide by walking: slide -> layout -> master.
|
|
7795
7888
|
*/
|
|
7796
|
-
protected
|
|
7889
|
+
protected findMasterPathForSlide(slidePath: string): string | undefined;
|
|
7797
7890
|
/**
|
|
7798
|
-
*
|
|
7891
|
+
* Resolve the editable template (master + layout) elements a slide
|
|
7892
|
+
* inherits, each carrying a `master-` / `layout-` prefixed id.
|
|
7799
7893
|
*
|
|
7800
|
-
*
|
|
7801
|
-
*
|
|
7802
|
-
*
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
protected parsePivotFmtsXml(chartRoot: XmlObject | undefined): unknown;
|
|
7807
|
-
/**
|
|
7808
|
-
* Parse `c:clrMapOvr` into a flat attribute map.
|
|
7894
|
+
* This is the canonical entry point for an "edit template/master"
|
|
7895
|
+
* feature: it returns the same decorative master/layout shapes that the
|
|
7896
|
+
* loader already merges in front of slide-authored content (master shapes
|
|
7897
|
+
* behind, layout shapes on top), reusing the cached
|
|
7898
|
+
* {@link getLayoutElements} parse. Resolving a slide that has not been
|
|
7899
|
+
* loaded yet (no relationships cached) yields an empty array.
|
|
7809
7900
|
*
|
|
7810
|
-
*
|
|
7811
|
-
*
|
|
7812
|
-
*
|
|
7813
|
-
*
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
*
|
|
7822
|
-
* the external relationship target from the chart part's .rels file.
|
|
7901
|
+
* Important scope notes for callers:
|
|
7902
|
+
* - Placeholder shapes (`<p:ph>`) are intentionally excluded; those are
|
|
7903
|
+
* resolved separately into each slide's own placeholders. Only
|
|
7904
|
+
* non-placeholder decorations (shapes, pictures, graphic frames) are
|
|
7905
|
+
* returned, which is exactly what the save writeback path supports.
|
|
7906
|
+
* - The returned elements are shared by every slide that inherits the
|
|
7907
|
+
* same layout/master. Editing one element and saving updates the shared
|
|
7908
|
+
* layout/master part, so the change is visible on all sibling slides.
|
|
7909
|
+
* - To persist an edit the binding must keep the mutated template element
|
|
7910
|
+
* inside the `slide.elements` array it passes to {@link save}; the save
|
|
7911
|
+
* writer reads template elements from `ctx.slide.elements` and writes
|
|
7912
|
+
* their shape XML back into the owning `p:spTree`.
|
|
7823
7913
|
*
|
|
7824
|
-
*
|
|
7825
|
-
*
|
|
7826
|
-
*
|
|
7914
|
+
* @param slideId - The slide's archive path (the `PptxSlide.id`, e.g.
|
|
7915
|
+
* `ppt/slides/slide1.xml`).
|
|
7916
|
+
* @returns Master + layout elements with prefixed ids (may be empty).
|
|
7827
7917
|
*/
|
|
7828
|
-
|
|
7918
|
+
getTemplateElementsForSlide(slideId: string): Promise<PptxElement[]>;
|
|
7829
7919
|
/**
|
|
7830
|
-
*
|
|
7831
|
-
*
|
|
7832
|
-
*
|
|
7833
|
-
* this method uses the chart-xlsx-parser utility to extract structured
|
|
7834
|
-
* categories and series from the first worksheet.
|
|
7920
|
+
* Get layouts available for a specific slide, scoped to that slide's
|
|
7921
|
+
* master. If the slide's master cannot be determined, returns all
|
|
7922
|
+
* known layouts.
|
|
7835
7923
|
*/
|
|
7836
|
-
|
|
7924
|
+
getAvailableLayoutsForSlide(slideIndex: number, slides: PptxSlide[]): Promise<PptxLayoutOption[]>;
|
|
7925
|
+
protected buildLayoutOption(path: string, xmlObj: XmlObject): PptxLayoutOption;
|
|
7837
7926
|
/**
|
|
7838
|
-
*
|
|
7927
|
+
* Apply a different layout to an existing slide.
|
|
7839
7928
|
*
|
|
7840
|
-
*
|
|
7841
|
-
*
|
|
7842
|
-
*
|
|
7843
|
-
*
|
|
7844
|
-
* when there is no reference, the target cannot be resolved, or the drawing
|
|
7845
|
-
* contains no shapes.
|
|
7846
|
-
*/
|
|
7847
|
-
protected parseChartUserShapes(chartSpace: XmlObject | undefined, chartPartPath: string): Promise<PptxChartUserShape[] | undefined>;
|
|
7848
|
-
/**
|
|
7849
|
-
* Read the chart part's `.rels` file and return all relationships as an
|
|
7850
|
-
* array of `{ id, type, target }` objects.
|
|
7929
|
+
* This updates the slide's `.rels` file in the in-memory ZIP so the
|
|
7930
|
+
* `slideLayout` relationship points to the new layout, then refreshes
|
|
7931
|
+
* the slide's layout-derived properties (background, layoutPath,
|
|
7932
|
+
* layoutName).
|
|
7851
7933
|
*/
|
|
7852
|
-
|
|
7853
|
-
id: string;
|
|
7854
|
-
type: string;
|
|
7855
|
-
target: string;
|
|
7856
|
-
}>>;
|
|
7934
|
+
applyLayoutToSlide(slideIndex: number, layoutPath: string, slides: PptxSlide[]): Promise<PptxSlide>;
|
|
7857
7935
|
}
|
|
7858
7936
|
//#endregion
|
|
7859
|
-
//#region pptx/core/core/runtime/
|
|
7860
|
-
declare class PptxHandlerRuntime$
|
|
7861
|
-
/**
|
|
7862
|
-
* Parse the Office 2013+ chart-style part (`ppt/charts/style#.xml`)
|
|
7863
|
-
* referenced from the chart's relationships, sibling to
|
|
7864
|
-
* {@link parseChartColorStyle}. This is a SEPARATE part/relationship from
|
|
7865
|
-
* the colour style (`chartColorStyle*.xml`): the colour style cycles
|
|
7866
|
-
* series colours, this one carries per-element (title, axis, gridline,
|
|
7867
|
-
* data point, ...) font/line/fill defaults for the active built-in style.
|
|
7868
|
-
*/
|
|
7869
|
-
protected parseChartStyleDefinitionPart(chartPartPath: string): Promise<ResolvedChartStyleDefinition | undefined>;
|
|
7937
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeStyleMatrixResolve.d.ts
|
|
7938
|
+
declare class PptxHandlerRuntime$4 extends PptxHandlerRuntime$5 {
|
|
7870
7939
|
/**
|
|
7871
|
-
*
|
|
7872
|
-
*
|
|
7873
|
-
*
|
|
7874
|
-
*
|
|
7875
|
-
*
|
|
7876
|
-
*
|
|
7877
|
-
*
|
|
7878
|
-
* Returns `{ palette, method }` where `palette` is an array of resolved hex
|
|
7879
|
-
* colors, or `undefined` when no color style is found.
|
|
7940
|
+
* Resolve a `<p:style>` node (`a:lnRef`, `a:fillRef`, `a:effectRef`,
|
|
7941
|
+
* `a:fontRef`) against the current theme's format scheme, with the same
|
|
7942
|
+
* code the load path uses. Editors call this to apply a style-matrix
|
|
7943
|
+
* gallery entry (Shape Styles) so that what they render and what they save
|
|
7944
|
+
* both match what PowerPoint writes: a bare `<p:style>` and an `spPr` with
|
|
7945
|
+
* no fill, outline or effects of its own.
|
|
7880
7946
|
*/
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7947
|
+
resolveStyleMatrixReferences(styleXml: XmlObject): ResolvedStyleMatrix;
|
|
7948
|
+
}
|
|
7949
|
+
//#endregion
|
|
7950
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeThemeEffects.d.ts
|
|
7951
|
+
/** Slides and template (master/layout) elements after style references were resolved again. */
|
|
7952
|
+
interface StyleReferenceReResolution {
|
|
7953
|
+
slides: PptxSlide[];
|
|
7954
|
+
templateElementsBySlideId: Record<string, PptxElement[]>;
|
|
7955
|
+
}
|
|
7956
|
+
/**
|
|
7957
|
+
* Design > Variants > Effects: replace the theme's format scheme (`a:fmtScheme`) and redraw the
|
|
7958
|
+
* shapes that reference it.
|
|
7959
|
+
*
|
|
7960
|
+
* A shape keeps `fillRef`/`lnRef`/`effectRef` indices and the flat values they resolved to at load
|
|
7961
|
+
* time. {@link reResolveThemeStyleReferences} resolves the indices again against a format scheme
|
|
7962
|
+
* and replaces only what the shape still inherits (its flat value equals the recorded baseline),
|
|
7963
|
+
* so a fill, outline or shadow the author set by hand survives a scheme change, as in PowerPoint.
|
|
7964
|
+
*/
|
|
7965
|
+
declare class PptxHandlerRuntime$3 extends PptxHandlerRuntime$4 {
|
|
7966
|
+
private readonly effectSchemeCache;
|
|
7886
7967
|
/**
|
|
7887
|
-
*
|
|
7888
|
-
*
|
|
7889
|
-
* theme resolves all six.
|
|
7968
|
+
* Resolve a `<p:style>` node as the base class does, against built-in effect scheme
|
|
7969
|
+
* `effectSchemeId` instead of the deck's own (the Effects gallery draws each tile this way).
|
|
7890
7970
|
*/
|
|
7891
|
-
|
|
7971
|
+
resolveStyleMatrixReferences(styleXml: XmlObject, effectSchemeId?: string): ResolvedStyleMatrix;
|
|
7972
|
+
private parseEffectScheme;
|
|
7892
7973
|
/**
|
|
7893
|
-
*
|
|
7974
|
+
* Write a built-in effect scheme into every theme part a master references and refresh the
|
|
7975
|
+
* in-memory format schemes. Slides are not touched: call {@link reResolveThemeStyleReferences}
|
|
7976
|
+
* for them.
|
|
7894
7977
|
*
|
|
7895
|
-
*
|
|
7896
|
-
* - `<a:schemeClr val="accent1"/>` — resolved via theme color map
|
|
7897
|
-
* - `<a:srgbClr val="4472C4"/>` — explicit RGB
|
|
7978
|
+
* @returns the parsed scheme now in force, or `undefined` for an unknown id
|
|
7898
7979
|
*/
|
|
7899
|
-
|
|
7980
|
+
applyThemeEffectScheme(id: string): Promise<PptxThemeFormatScheme | undefined>;
|
|
7900
7981
|
/**
|
|
7901
|
-
*
|
|
7902
|
-
*
|
|
7982
|
+
* Write an `a:fmtScheme` element (as the text a theme part carries, `a` prefix undeclared)
|
|
7983
|
+
* into every theme part a master references; a real theme variant brings its own.
|
|
7903
7984
|
*/
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
type ChartPartFacts = Pick<PptxChartData, 'externalData' | 'embeddedWorkbookData' | 'pivotSource' | 'colorPalette' | 'themeAccentColors' | 'colorMethod' | 'colorStylePartPath' | 'colorStyleOriginalPalette' | 'colorStyleOriginalMethod' | 'chartStyleDefinition' | 'layouts' | 'userShapesXml' | 'userShapes' | 'pivotFormats' | 'printSettings' | 'protection'>;
|
|
7910
|
-
declare class PptxHandlerRuntime$8 extends PptxHandlerRuntime$9 {
|
|
7985
|
+
applyThemeFormatSchemeXml(fmtSchemeXml: string): Promise<PptxThemeFormatScheme | undefined>;
|
|
7986
|
+
/** The real theme variants the loaded package carries, or none. */
|
|
7987
|
+
getThemeVariants(): PptxThemeVariant[];
|
|
7988
|
+
/** The format scheme the deck's primary theme carries now. */
|
|
7989
|
+
getThemeFormatScheme(): PptxThemeFormatScheme | undefined;
|
|
7911
7990
|
/**
|
|
7912
|
-
*
|
|
7913
|
-
*
|
|
7914
|
-
*
|
|
7915
|
-
*
|
|
7991
|
+
* Resolve every shape's `p:style` references again.
|
|
7992
|
+
*
|
|
7993
|
+
* @param effectSchemeId resolve against this built-in scheme instead of the one in force
|
|
7994
|
+
* (a preview); omit it after {@link applyThemeEffectScheme}
|
|
7916
7995
|
*/
|
|
7917
|
-
|
|
7996
|
+
reResolveThemeStyleReferences(slides: readonly PptxSlide[], templateElementsBySlideId: Readonly<Record<string, PptxElement[]>>, effectSchemeId?: string): StyleReferenceReResolution;
|
|
7997
|
+
private reResolveElementStyle;
|
|
7998
|
+
private reResolveShapeStyle;
|
|
7999
|
+
}
|
|
8000
|
+
//#endregion
|
|
8001
|
+
//#region pptx/core/core/runtime/PptxHandlerRuntimeBackgroundStyles.d.ts
|
|
8002
|
+
/** Which slides a background style lands on. */
|
|
8003
|
+
type BackgroundStyleScope = {
|
|
8004
|
+
kind: 'all';
|
|
8005
|
+
} | {
|
|
8006
|
+
kind: 'slides';
|
|
8007
|
+
slideIds: readonly string[];
|
|
8008
|
+
};
|
|
8009
|
+
/** Slides and template elements after a background style was applied. */
|
|
8010
|
+
interface BackgroundStyleApplication {
|
|
8011
|
+
slides: PptxSlide[];
|
|
8012
|
+
templateElementsBySlideId: Record<string, PptxElement[]>;
|
|
8013
|
+
}
|
|
8014
|
+
/**
|
|
8015
|
+
* Design > Variants > Background Styles.
|
|
8016
|
+
*
|
|
8017
|
+
* A style is a `p:bgRef` into the theme's `a:bgFillStyleLst` plus, for the dark columns, a swapped
|
|
8018
|
+
* colour map. "Apply to All Slides" writes both on the slide master and makes every slide follow
|
|
8019
|
+
* it; "Apply to Selected Slides" writes the same `bgRef` and an explicit `p:clrMapOvr` on each
|
|
8020
|
+
* slide (what PowerPoint writes, verified against `Slide.BackgroundStyle`).
|
|
8021
|
+
*/
|
|
8022
|
+
declare class PptxHandlerRuntime$2 extends PptxHandlerRuntime$3 {
|
|
8023
|
+
private resolveBackgroundStyle;
|
|
8024
|
+
private layoutAuthorsBackground;
|
|
7918
8025
|
/**
|
|
7919
|
-
*
|
|
7920
|
-
*
|
|
7921
|
-
*
|
|
8026
|
+
* Apply background style `index` (1 to 12) to `slides` and their template elements. Pure with
|
|
8027
|
+
* respect to the handler's state (a preview); {@link commitMasterBackgroundStyle} makes a
|
|
8028
|
+
* deck-wide application permanent.
|
|
7922
8029
|
*/
|
|
7923
|
-
|
|
8030
|
+
applyBackgroundStyleToSlides(slides: readonly PptxSlide[], templateElementsBySlideId: Readonly<Record<string, PptxElement[]>>, index: number, scope: BackgroundStyleScope): BackgroundStyleApplication | undefined;
|
|
7924
8031
|
/**
|
|
7925
|
-
*
|
|
7926
|
-
*
|
|
7927
|
-
* @param plotArea - The `c:plotArea` XML object.
|
|
7928
|
-
* @param chartType - The detected chart type.
|
|
7929
|
-
* @param chartSpace - The `c:chartSpace` XML root.
|
|
7930
|
-
* @param chartRoot - The `c:chart` XML element.
|
|
7931
|
-
* @param chartPartPath - The ZIP path of the chart part.
|
|
7932
|
-
* @param chartRelationshipId - The relationship ID linking the slide to this chart.
|
|
7933
|
-
* @returns Parsed chart data, or `undefined` if cx parsing yields no series.
|
|
8032
|
+
* Write background style `index` onto every slide master (`p:bg` and `p:clrMap`) so a deck-wide
|
|
8033
|
+
* application is saved. Slides follow it through {@link applyBackgroundStyleToSlides}.
|
|
7934
8034
|
*/
|
|
7935
|
-
|
|
8035
|
+
commitMasterBackgroundStyle(index: number): Promise<boolean>;
|
|
7936
8036
|
}
|
|
7937
8037
|
//#endregion
|
|
7938
|
-
//#region pptx/core/core/
|
|
7939
|
-
|
|
8038
|
+
//#region pptx/core/core/types.d.ts
|
|
8039
|
+
interface PptxHandlerLoadOptions {
|
|
8040
|
+
eagerDecodeImages?: boolean;
|
|
8041
|
+
password?: string;
|
|
7940
8042
|
/**
|
|
7941
|
-
*
|
|
7942
|
-
*
|
|
7943
|
-
*
|
|
7944
|
-
*
|
|
7945
|
-
*
|
|
7946
|
-
*
|
|
7947
|
-
* @param slidePath - The ZIP path of the slide containing the graphic frame.
|
|
7948
|
-
* @param graphicFrame - The raw XML object for the `p:graphicFrame` element.
|
|
7949
|
-
* @returns The parsed chart data, or `undefined` if the frame is not a chart.
|
|
8043
|
+
* Maximum total uncompressed bytes accepted from the input ZIP archive.
|
|
8044
|
+
* Defaults to 500 MiB. When the sum of `_data.uncompressedSize` across
|
|
8045
|
+
* all archive entries exceeds this cap, `load()` rejects with a
|
|
8046
|
+
* {@link ZipBombError}. A hard cap of 65 536 archive entries also
|
|
8047
|
+
* applies.
|
|
7950
8048
|
*/
|
|
7951
|
-
|
|
7952
|
-
/** The runtime services the object-tree half of the adapter reads with. */
|
|
7953
|
-
private chartTreeReader;
|
|
8049
|
+
maxUncompressedBytes?: number;
|
|
7954
8050
|
/**
|
|
7955
|
-
*
|
|
7956
|
-
*
|
|
8051
|
+
* When `false` (default), relationship targets that resolve to
|
|
8052
|
+
* `http://` or `https://` URLs are dropped from rendered slides
|
|
8053
|
+
* (image, picture, background). Set to `true` to allow external image
|
|
8054
|
+
* URLs to flow through to `<img src>`.
|
|
8055
|
+
*
|
|
8056
|
+
* Disabled by default to mitigate SSRF / privacy-leak vectors in
|
|
8057
|
+
* server-side rendering and headless export pipelines.
|
|
7957
8058
|
*/
|
|
7958
|
-
|
|
8059
|
+
allowExternalImages?: boolean;
|
|
8060
|
+
}
|
|
8061
|
+
/**
|
|
8062
|
+
* Default maximum uncompressed byte budget for {@link PptxHandlerLoadOptions.maxUncompressedBytes}.
|
|
8063
|
+
* 500 MiB.
|
|
8064
|
+
*/
|
|
8065
|
+
declare const DEFAULT_MAX_UNCOMPRESSED_BYTES: number;
|
|
8066
|
+
/**
|
|
8067
|
+
* Hard cap on archive entry count. Beyond this, the package is rejected.
|
|
8068
|
+
*/
|
|
8069
|
+
declare const MAX_ZIP_ENTRY_COUNT = 65536;
|
|
8070
|
+
/**
|
|
8071
|
+
* Thrown by the load pipeline when a ZIP archive exceeds the configured
|
|
8072
|
+
* uncompressed-size budget or the entry-count limit.
|
|
8073
|
+
*/
|
|
8074
|
+
declare class ZipBombError extends Error {
|
|
8075
|
+
readonly code = "ZIP_BOMB";
|
|
8076
|
+
readonly uncompressedBytes: number | undefined;
|
|
8077
|
+
readonly limit: number;
|
|
8078
|
+
readonly entryCount: number | undefined;
|
|
8079
|
+
constructor(message: string, details: {
|
|
8080
|
+
uncompressedBytes?: number;
|
|
8081
|
+
limit: number;
|
|
8082
|
+
entryCount?: number;
|
|
8083
|
+
});
|
|
8084
|
+
}
|
|
8085
|
+
/** Output format for the save pipeline. */
|
|
8086
|
+
type PptxSaveFormat = 'pptx' | 'ppsx' | 'pptm' | 'ppt';
|
|
8087
|
+
interface PptxHandlerSaveOptions {
|
|
8088
|
+
headerFooter?: PptxHeaderFooter;
|
|
8089
|
+
presentationProperties?: PptxPresentationProperties;
|
|
8090
|
+
customShows?: PptxCustomShow[];
|
|
8091
|
+
sections?: PptxSection[];
|
|
8092
|
+
coreProperties?: PptxCoreProperties;
|
|
8093
|
+
appProperties?: PptxAppProperties;
|
|
8094
|
+
customProperties?: PptxCustomProperty[];
|
|
8095
|
+
/** Updated notes master data to save back to notesMaster1.xml. */
|
|
8096
|
+
notesMaster?: PptxNotesMaster;
|
|
8097
|
+
/** Updated handout master data to save back to handoutMaster1.xml. */
|
|
8098
|
+
handoutMaster?: PptxHandoutMaster;
|
|
7959
8099
|
/**
|
|
7960
|
-
*
|
|
7961
|
-
*
|
|
7962
|
-
*
|
|
7963
|
-
*
|
|
8100
|
+
* Updated slide masters to save back to ppt/slideMasters/slideMaster*.xml.
|
|
8101
|
+
* Each entry in the array applies typed mutations (clrMap, hf flags,
|
|
8102
|
+
* background) to the master at its `path`. Masters not listed here pass
|
|
8103
|
+
* through verbatim from the original load.
|
|
7964
8104
|
*/
|
|
7965
|
-
|
|
8105
|
+
slideMasters?: PptxSlideMaster[];
|
|
7966
8106
|
/**
|
|
7967
|
-
*
|
|
7968
|
-
*
|
|
8107
|
+
* Updated slide layouts to save back to ppt/slideLayouts/slideLayout*.xml.
|
|
8108
|
+
* Each entry applies typed mutations (clrMapOverride, attrs, hf flags,
|
|
8109
|
+
* background) to the layout at its `path`. Layouts not listed here pass
|
|
8110
|
+
* through verbatim from the original load.
|
|
7969
8111
|
*/
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
protected extractSectionMap(): {
|
|
7978
|
-
sectionBySlideId: Map<string, {
|
|
7979
|
-
sectionId: string;
|
|
7980
|
-
sectionName: string;
|
|
7981
|
-
}>;
|
|
7982
|
-
orderedSections: PptxSection[];
|
|
7983
|
-
};
|
|
8112
|
+
slideLayouts?: PptxSlideLayout[];
|
|
8113
|
+
/** Updated tag collections to save back to ppt/tags/tag*.xml. */
|
|
8114
|
+
tags?: PptxTagCollection[];
|
|
8115
|
+
/** Presentation-level customer data references to author or update. */
|
|
8116
|
+
customerData?: PptxCustomerData[];
|
|
8117
|
+
/** Photo album metadata to save back to `p:photoAlbum`. */
|
|
8118
|
+
photoAlbum?: PptxPhotoAlbum;
|
|
7984
8119
|
/**
|
|
7985
|
-
*
|
|
8120
|
+
* Slide dimensions to write back to `p:sldSz`.
|
|
7986
8121
|
*
|
|
7987
|
-
*
|
|
7988
|
-
*
|
|
7989
|
-
*
|
|
7990
|
-
* the footer/date TEXT actually live on the slide master: `p:hf` for the
|
|
7991
|
-
* former, the master's `ftr` / `dt` / `hdr` placeholder shapes for the
|
|
7992
|
-
* latter. See `header-footer-parts.ts` for the COM evidence.
|
|
8122
|
+
* Omitting the option preserves the load-time dimensions verbatim, which
|
|
8123
|
+
* is why an edit made through a viewer's Slide Size control has to reach
|
|
8124
|
+
* the save call: nothing else in the pipeline can observe it.
|
|
7993
8125
|
*
|
|
7994
|
-
*
|
|
7995
|
-
*
|
|
7996
|
-
*
|
|
7997
|
-
|
|
7998
|
-
protected extractHeaderFooter(): PptxHeaderFooter | undefined;
|
|
7999
|
-
/** The `p:sldMaster` node of the first master, in archive-path order. */
|
|
8000
|
-
private firstSlideMasterRoot;
|
|
8001
|
-
/**
|
|
8002
|
-
* Extract photo album metadata from `p:photoAlbum` in presentation XML.
|
|
8126
|
+
* PowerPoint derives `Presentation.PageSetup.SlideSize` from `@cx`/`@cy`
|
|
8127
|
+
* alone (verified by COM: an A4-typed `p:sldSz` carrying 4:3 dimensions
|
|
8128
|
+
* still reports `ppSlideSizeCustom`), so `type` is written for fidelity
|
|
8129
|
+
* but the dimensions are what actually decide the reported preset.
|
|
8003
8130
|
*/
|
|
8004
|
-
|
|
8131
|
+
slideSize?: PptxSlideSize;
|
|
8132
|
+
/** East Asian line-break settings to save back to `p:kinsoku`. */
|
|
8133
|
+
kinsoku?: PptxKinsoku | null;
|
|
8134
|
+
/** Write-protection verifier. Set to `null` to remove, `undefined` to preserve existing. */
|
|
8135
|
+
modifyVerifier?: PptxModifyVerifier | null;
|
|
8005
8136
|
/**
|
|
8006
|
-
*
|
|
8137
|
+
* `p:presentation/@embedTrueTypeFonts` to write. `undefined` preserves
|
|
8138
|
+
* whatever was loaded (or omits the attribute for a brand-new deck);
|
|
8139
|
+
* purely declarative here, see {@link PptxData.embedTrueTypeFonts}.
|
|
8007
8140
|
*/
|
|
8008
|
-
|
|
8141
|
+
embedTrueTypeFonts?: boolean;
|
|
8009
8142
|
/**
|
|
8010
|
-
*
|
|
8143
|
+
* Presentation-level default text style edits to save back to
|
|
8144
|
+
* `p:defaultTextStyle`. Only the levels present in the map are touched;
|
|
8145
|
+
* omitted levels and any unmodelled XML on an edited level survive
|
|
8146
|
+
* untouched. See {@link PptxData.defaultTextStyle}.
|
|
8011
8147
|
*/
|
|
8012
|
-
|
|
8148
|
+
defaultTextStyle?: PptxTextStyleLevels;
|
|
8149
|
+
/** View properties to save back to ppt/viewProps.xml. */
|
|
8150
|
+
viewProperties?: PptxViewProperties;
|
|
8013
8151
|
/**
|
|
8014
|
-
*
|
|
8015
|
-
* `
|
|
8016
|
-
*
|
|
8152
|
+
* Table style edits to save back to `ppt/tableStyles.xml`. Pass the
|
|
8153
|
+
* `tableStyleMap` from `PptxData` (optionally with edited entries)
|
|
8154
|
+
* to persist user edits. The `def` GUID and any unmodelled XML are
|
|
8155
|
+
* preserved verbatim. Omitting the option round-trips the original
|
|
8156
|
+
* part untouched.
|
|
8017
8157
|
*/
|
|
8018
|
-
|
|
8158
|
+
tableStyles?: ParsedTableStyleMap;
|
|
8019
8159
|
/**
|
|
8020
|
-
*
|
|
8021
|
-
*
|
|
8022
|
-
*
|
|
8023
|
-
*
|
|
8024
|
-
*
|
|
8160
|
+
* Set `ppt/tableStyles.xml`'s `<a:tblStyleLst @def>` to this style GUID
|
|
8161
|
+
* (normalised to uppercase-with-braces). `undefined` preserves the
|
|
8162
|
+
* existing default; there is no removal form (`@def` is required by the
|
|
8163
|
+
* schema and PowerPoint always points it at a real style). No-op when the
|
|
8164
|
+
* archive has no `ppt/tableStyles.xml`, same as {@link tableStyles}.
|
|
8025
8165
|
*/
|
|
8026
|
-
|
|
8027
|
-
}
|
|
8028
|
-
//#endregion
|
|
8029
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeEmbeddedFonts.d.ts
|
|
8030
|
-
declare class PptxHandlerRuntime$5 extends PptxHandlerRuntime$6 {
|
|
8031
|
-
protected getEmbeddedFonts(fontList?: PptxEmbeddedFontList): Promise<PptxEmbeddedFont[]>;
|
|
8032
|
-
/** Load the presentation.xml.rels and build a map of rId → target path. */
|
|
8033
|
-
private loadPresentationFontRels;
|
|
8034
|
-
/** Extract, de-obfuscate, and encode a single font variant. */
|
|
8035
|
-
private extractEmbeddedFontVariant;
|
|
8036
|
-
/** Convert Uint8Array to base64 string. */
|
|
8037
|
-
private uint8ArrayToBase64;
|
|
8038
|
-
getLayoutOptions(): PptxLayoutOption[];
|
|
8039
|
-
protected resolveMasterPathForLayout(layoutPath: string): string | undefined;
|
|
8040
|
-
}
|
|
8041
|
-
//#endregion
|
|
8042
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeLoadSession.d.ts
|
|
8043
|
-
declare class PptxHandlerRuntime$4 extends PptxHandlerRuntime$5 {
|
|
8044
|
-
protected isZipContainer(data: ArrayBuffer): boolean;
|
|
8045
|
-
protected initializeLoadSession(data: ArrayBuffer, options: PptxHandlerLoadOptions): Promise<void>;
|
|
8166
|
+
tableStylesDefaultId?: string;
|
|
8046
8167
|
/**
|
|
8047
|
-
*
|
|
8048
|
-
*
|
|
8049
|
-
*
|
|
8050
|
-
* (
|
|
8051
|
-
*
|
|
8168
|
+
* Style GUIDs to remove from `ppt/tableStyles.xml` entirely, kept as a
|
|
8169
|
+
* separate opt-in list rather than inferred from omission on
|
|
8170
|
+
* {@link tableStyles}: that map is documented as safe to pass a PARTIAL
|
|
8171
|
+
* edit (only the entries a caller actually touched), so treating every
|
|
8172
|
+
* GUID missing from it as "delete this" would silently destroy untouched
|
|
8173
|
+
* styles on an ordinary targeted edit. A GUID here that is also the
|
|
8174
|
+
* current (or newly requested) default is left in place and skipped.
|
|
8052
8175
|
*/
|
|
8053
|
-
|
|
8176
|
+
tableStylesToDelete?: string[];
|
|
8054
8177
|
/**
|
|
8055
|
-
*
|
|
8056
|
-
*
|
|
8057
|
-
*
|
|
8178
|
+
* Target output format.
|
|
8179
|
+
* - `'pptx'` (default): Standard presentation.
|
|
8180
|
+
* - `'ppsx'`: Slide-show file (opens in presentation mode).
|
|
8181
|
+
* - `'pptm'`: Macro-enabled presentation (requires VBA data).
|
|
8182
|
+
* - `'ppt'`: Legacy binary PowerPoint 97-2003 presentation. Bypasses the
|
|
8183
|
+
* OOXML ZIP pipeline entirely; see `PptxHandlerRuntimeSaveLegacyPpt`.
|
|
8184
|
+
* Elements with no binary equivalent (charts, SmartArt, media, OLE, ink,
|
|
8185
|
+
* 3D models) are degraded to a rasterised preview picture or a labelled
|
|
8186
|
+
* placeholder, each reported via a `scope: 'save'`-adjacent
|
|
8187
|
+
* `PptxCompatibilityWarning`.
|
|
8058
8188
|
*/
|
|
8059
|
-
|
|
8189
|
+
outputFormat?: PptxSaveFormat;
|
|
8060
8190
|
/**
|
|
8061
|
-
*
|
|
8062
|
-
*
|
|
8063
|
-
*
|
|
8191
|
+
* Password for RC4 CryptoAPI encryption of a `'ppt'`-format save. Ignored
|
|
8192
|
+
* for every other {@link outputFormat}; encrypting a `.pptx`/`.ppsx`/`.pptm`
|
|
8193
|
+
* save uses {@link IPptxHandlerRuntime.saveEncrypted}'s separate AES/Agile
|
|
8194
|
+
* OLE2 wrapping instead, since the legacy binary format's own encryption
|
|
8195
|
+
* scheme is embedded directly in the `.ppt` stream rather than wrapping an
|
|
8196
|
+
* already-produced package.
|
|
8064
8197
|
*/
|
|
8065
|
-
|
|
8066
|
-
protected loadPresentationState(): Promise<{
|
|
8067
|
-
width: number;
|
|
8068
|
-
height: number;
|
|
8069
|
-
notesWidthEmu: number;
|
|
8070
|
-
notesHeightEmu: number;
|
|
8071
|
-
sectionBySlideId: Map<string, {
|
|
8072
|
-
sectionId: string;
|
|
8073
|
-
sectionName: string;
|
|
8074
|
-
}>;
|
|
8075
|
-
orderedSections: PptxSection[];
|
|
8076
|
-
}>;
|
|
8198
|
+
pptPassword?: string;
|
|
8077
8199
|
/**
|
|
8078
|
-
*
|
|
8079
|
-
* slide so callers can download / open the inner file.
|
|
8200
|
+
* Embedded fonts to write back (or add) to the saved PPTX.
|
|
8080
8201
|
*
|
|
8081
|
-
*
|
|
8082
|
-
*
|
|
8083
|
-
*
|
|
8084
|
-
* present, derive a MIME type, and expose the payload as a data-URL on the
|
|
8085
|
-
* element. Linked objects, missing targets, oversized payloads, and parse
|
|
8086
|
-
* failures are skipped silently so existing behaviour is preserved.
|
|
8087
|
-
*/
|
|
8088
|
-
protected enrichOleElementsWithEmbeddedData(elements: PptxElement[], slidePath: string, depth?: number): Promise<void>;
|
|
8089
|
-
/** Thin instance-bound wrapper; see `enrichBulletPictureImages` for the logic. */
|
|
8090
|
-
protected enrichBulletPictureElementsWithEmbeddedData(elements: PptxElement[], slidePath: string): Promise<void>;
|
|
8091
|
-
protected loadSlidesForPresentation(sectionBySlideId: Map<string, {
|
|
8092
|
-
sectionId: string;
|
|
8093
|
-
sectionName: string;
|
|
8094
|
-
}>): Promise<PptxSlide[]>;
|
|
8095
|
-
}
|
|
8096
|
-
//#endregion
|
|
8097
|
-
//#region pptx/core/core/runtime/PptxHandlerRuntimeLoadPipeline.d.ts
|
|
8098
|
-
declare class PptxHandlerRuntime$3 extends PptxHandlerRuntime$4 {
|
|
8099
|
-
protected buildLoadData(presentationState: {
|
|
8100
|
-
width: number;
|
|
8101
|
-
height: number;
|
|
8102
|
-
notesWidthEmu: number;
|
|
8103
|
-
notesHeightEmu: number;
|
|
8104
|
-
orderedSections: PptxSection[];
|
|
8105
|
-
}, slidesWithWarnings: PptxSlide[], slideMasters: PptxSlideMaster[]): Promise<PptxData>;
|
|
8106
|
-
/**
|
|
8107
|
-
* Walk the raw XML of every slide to find the highest numeric `@_id`
|
|
8108
|
-
* attribute on `p:cNvPr` / `p:cNvCxnSpPr` / `p:cNvPicPr` nodes.
|
|
8109
|
-
* This is used to seed the element builder's ID counter so that
|
|
8110
|
-
* new elements never collide with existing ones.
|
|
8202
|
+
* Pass the `embeddedFonts` array from `PptxData` to preserve existing
|
|
8203
|
+
* embedded fonts during save. You can also add new fonts by including
|
|
8204
|
+
* entries with `rawFontData` populated.
|
|
8111
8205
|
*
|
|
8112
|
-
*
|
|
8113
|
-
*
|
|
8114
|
-
*
|
|
8115
|
-
* MAX_NODES to bound CPU on pathological trees.
|
|
8206
|
+
* When omitted, the save pipeline will automatically re-embed any
|
|
8207
|
+
* fonts that were loaded from the original PPTX and have `rawFontData`
|
|
8208
|
+
* preserved (i.e. the default is lossless round-trip).
|
|
8116
8209
|
*/
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8210
|
+
embeddedFonts?: PptxEmbeddedFont[];
|
|
8211
|
+
/** Typed embedded-font list metadata. Set to null to remove fonts and relationships. */
|
|
8212
|
+
embeddedFontList?: PptxEmbeddedFontList | null;
|
|
8120
8213
|
/**
|
|
8121
|
-
*
|
|
8122
|
-
*
|
|
8214
|
+
* OOXML conformance class for the saved output.
|
|
8215
|
+
* - `'preserve'` (default): use the same conformance as the loaded file.
|
|
8216
|
+
* - `'strict'`: force Strict Open XML (ISO/IEC 29500) namespace URIs.
|
|
8217
|
+
* - `'transitional'`: force Transitional (ECMA-376) namespace URIs.
|
|
8123
8218
|
*/
|
|
8124
|
-
|
|
8219
|
+
conformance?: 'strict' | 'transitional' | 'preserve';
|
|
8220
|
+
}
|
|
8221
|
+
interface IPptxHandlerRuntime {
|
|
8125
8222
|
/**
|
|
8126
|
-
* Release all resources held by this
|
|
8127
|
-
*
|
|
8128
|
-
* - Revokes every Blob URL created for images/media.
|
|
8129
|
-
* - Clears all in-memory caches (image data, XML trees, relationships).
|
|
8130
|
-
* - Nulls out the in-memory ZIP archive (largest single allocation).
|
|
8131
|
-
*
|
|
8132
|
-
* After calling `dispose()`, the handler cannot load new data, save,
|
|
8133
|
-
* or resolve images. Create a new `PptxHandler` instance instead.
|
|
8223
|
+
* Release all resources held by this runtime (Blob URLs, caches, ZIP).
|
|
8224
|
+
* After calling, the runtime cannot be used further.
|
|
8134
8225
|
*/
|
|
8135
8226
|
dispose(): void;
|
|
8136
|
-
load(data: ArrayBuffer, options?: PptxHandlerLoadOptions): Promise<PptxData>;
|
|
8137
8227
|
/**
|
|
8138
|
-
*
|
|
8139
|
-
*/
|
|
8140
|
-
getTemplateBackgroundColor(path: string): string | undefined;
|
|
8141
|
-
/**
|
|
8142
|
-
* Update the background colour of a slide layout or slide master XML node.
|
|
8143
|
-
*
|
|
8144
|
-
* @param path - The archive path of the layout or master
|
|
8145
|
-
* (e.g. `ppt/slideLayouts/slideLayout1.xml`)
|
|
8146
|
-
* @param backgroundColor - Hex colour string (e.g. `#FF0000`) or
|
|
8147
|
-
* `undefined` / empty to remove background.
|
|
8228
|
+
* Revoke all Blob URLs created during image loading.
|
|
8148
8229
|
*/
|
|
8149
|
-
|
|
8230
|
+
revokeBlobUrls(): void;
|
|
8231
|
+
getCompatibilityWarnings(): PptxCompatibilityWarning[];
|
|
8232
|
+
getLayoutOptions(): PptxLayoutOption[];
|
|
8233
|
+
getLayoutPreview(layoutPath: string): Promise<PptxLayoutPreview | null>;
|
|
8234
|
+
getLayoutPreviews(layoutPaths?: readonly string[]): Promise<PptxLayoutPreview[]>;
|
|
8150
8235
|
createXmlBuilder(data: PptxData): PptxXmlBuilder;
|
|
8151
8236
|
Builder(data: PptxData): PptxXmlBuilder;
|
|
8152
|
-
|
|
8237
|
+
setTemplateBackground(path: string, backgroundColor: string | undefined): void;
|
|
8238
|
+
setPresentationTheme(themePath: string, applyToAllMasters?: boolean): Promise<void>;
|
|
8239
|
+
getTemplateBackgroundColor(path: string): string | undefined;
|
|
8240
|
+
updateThemeColorScheme(colorScheme: PptxThemeColorScheme): Promise<void>;
|
|
8241
|
+
updateThemeFontScheme(fontScheme: PptxThemeFontScheme): Promise<void>;
|
|
8242
|
+
updateThemeName(name: string): Promise<void>;
|
|
8243
|
+
/** Resolve a `<p:style>` node against the loaded theme (see PptxHandlerRuntimeStyleMatrixResolve). */
|
|
8244
|
+
resolveStyleMatrixReferences(styleXml: XmlObject, effectSchemeId?: string): ResolvedStyleMatrix;
|
|
8245
|
+
/** Write a built-in effect scheme (`a:fmtScheme`) into the theme parts. */
|
|
8246
|
+
applyThemeEffectScheme(id: string): Promise<PptxThemeFormatScheme | undefined>;
|
|
8247
|
+
applyThemeFormatSchemeXml(fmtSchemeXml: string): Promise<PptxThemeFormatScheme | undefined>;
|
|
8248
|
+
getThemeFormatScheme(): PptxThemeFormatScheme | undefined;
|
|
8249
|
+
getThemeVariants(): PptxThemeVariant[];
|
|
8250
|
+
reResolveThemeStyleReferences(slides: readonly PptxSlide[], templateElementsBySlideId: Readonly<Record<string, PptxElement[]>>, effectSchemeId?: string): StyleReferenceReResolution;
|
|
8251
|
+
applyBackgroundStyleToSlides(slides: readonly PptxSlide[], templateElementsBySlideId: Readonly<Record<string, PptxElement[]>>, index: number, scope: BackgroundStyleScope): BackgroundStyleApplication | undefined;
|
|
8252
|
+
commitMasterBackgroundStyle(index: number): Promise<boolean>;
|
|
8253
|
+
applyTheme(colorScheme: PptxThemeColorScheme, fontScheme: PptxThemeFontScheme, themeName?: string): Promise<void>;
|
|
8254
|
+
load(data: ArrayBuffer, options?: PptxHandlerLoadOptions): Promise<PptxData>;
|
|
8255
|
+
getChartDataForGraphicFrame(slidePath: string, graphicFrame: XmlObject | undefined): Promise<PptxChartData | undefined>;
|
|
8256
|
+
getSmartArtDataForGraphicFrame(slidePath: string, graphicFrame: XmlObject | undefined): Promise<PptxSmartArtData | undefined>;
|
|
8257
|
+
getImageData(imagePath: string): Promise<string | undefined>;
|
|
8153
8258
|
/**
|
|
8154
|
-
*
|
|
8155
|
-
*
|
|
8259
|
+
* Extract a media file from the PPTX archive as an ArrayBuffer.
|
|
8260
|
+
* Returns undefined if the file is not found.
|
|
8156
8261
|
*/
|
|
8157
|
-
|
|
8262
|
+
getMediaArrayBuffer(mediaPath: string): Promise<ArrayBuffer | undefined>;
|
|
8263
|
+
save(slides: PptxSlide[], options?: PptxHandlerSaveOptions): Promise<Uint8Array>;
|
|
8264
|
+
exportSlides(slides: PptxSlide[], options: PptxExportOptions): Promise<Map<number, Uint8Array>>;
|
|
8158
8265
|
/**
|
|
8159
|
-
*
|
|
8266
|
+
* Get the available slide layouts for a specific slide, based on the
|
|
8267
|
+
* slide's master. Scans the slide master's relationships to find all
|
|
8268
|
+
* layouts that belong to it.
|
|
8269
|
+
*
|
|
8270
|
+
* @param slideIndex - Zero-based slide index.
|
|
8271
|
+
* @param slides - Current slides array.
|
|
8272
|
+
* @returns Array of layout options belonging to the same slide master.
|
|
8160
8273
|
*/
|
|
8161
|
-
|
|
8274
|
+
getAvailableLayoutsForSlide(slideIndex: number, slides: PptxSlide[]): Promise<PptxLayoutOption[]>;
|
|
8162
8275
|
/**
|
|
8163
8276
|
* Resolve the editable template (master + layout) elements a slide
|
|
8164
|
-
* inherits, each carrying a `master-` / `layout-` prefixed id.
|
|
8165
|
-
*
|
|
8166
|
-
* This is the canonical entry point for an "edit template/master"
|
|
8167
|
-
* feature: it returns the same decorative master/layout shapes that the
|
|
8168
|
-
* loader already merges in front of slide-authored content (master shapes
|
|
8169
|
-
* behind, layout shapes on top), reusing the cached
|
|
8170
|
-
* {@link getLayoutElements} parse. Resolving a slide that has not been
|
|
8171
|
-
* loaded yet (no relationships cached) yields an empty array.
|
|
8172
|
-
*
|
|
8173
|
-
* Important scope notes for callers:
|
|
8174
|
-
* - Placeholder shapes (`<p:ph>`) are intentionally excluded; those are
|
|
8175
|
-
* resolved separately into each slide's own placeholders. Only
|
|
8176
|
-
* non-placeholder decorations (shapes, pictures, graphic frames) are
|
|
8177
|
-
* returned, which is exactly what the save writeback path supports.
|
|
8178
|
-
* - The returned elements are shared by every slide that inherits the
|
|
8179
|
-
* same layout/master. Editing one element and saving updates the shared
|
|
8180
|
-
* layout/master part, so the change is visible on all sibling slides.
|
|
8181
|
-
* - To persist an edit the binding must keep the mutated template element
|
|
8182
|
-
* inside the `slide.elements` array it passes to {@link save}; the save
|
|
8183
|
-
* writer reads template elements from `ctx.slide.elements` and writes
|
|
8184
|
-
* their shape XML back into the owning `p:spTree`.
|
|
8277
|
+
* inherits, each carrying a `master-` / `layout-` prefixed id. Excludes
|
|
8278
|
+
* placeholders; returns only decorative shapes/pictures/graphic frames.
|
|
8185
8279
|
*
|
|
8186
|
-
* @param slideId - The slide's archive path (
|
|
8187
|
-
* `ppt/slides/slide1.xml`).
|
|
8188
|
-
* @returns Master + layout elements with prefixed ids (may be empty).
|
|
8280
|
+
* @param slideId - The slide's archive path (`PptxSlide.id`).
|
|
8189
8281
|
*/
|
|
8190
8282
|
getTemplateElementsForSlide(slideId: string): Promise<PptxElement[]>;
|
|
8191
8283
|
/**
|
|
8192
|
-
*
|
|
8193
|
-
* master. If the slide's master cannot be determined, returns all
|
|
8194
|
-
* known layouts.
|
|
8284
|
+
* Scan the loaded PPTX archive for all theme parts.
|
|
8195
8285
|
*/
|
|
8196
|
-
|
|
8197
|
-
|
|
8286
|
+
getAvailableThemes(): Promise<Array<{
|
|
8287
|
+
path: string;
|
|
8288
|
+
name?: string;
|
|
8289
|
+
}>>;
|
|
8198
8290
|
/**
|
|
8199
|
-
* Apply a different layout to an existing slide
|
|
8291
|
+
* Apply a different layout to an existing slide by updating the slide's
|
|
8292
|
+
* relationship to point to the new layout and re-parsing layout
|
|
8293
|
+
* placeholders / background.
|
|
8200
8294
|
*
|
|
8201
|
-
*
|
|
8202
|
-
*
|
|
8203
|
-
*
|
|
8204
|
-
*
|
|
8295
|
+
* @param slideIndex - Zero-based slide index.
|
|
8296
|
+
* @param layoutPath - Archive path of the target layout
|
|
8297
|
+
* (e.g. `ppt/slideLayouts/slideLayout2.xml`).
|
|
8298
|
+
* @param slides - Current slides array.
|
|
8299
|
+
* @returns The updated slide with new layout path, name, and background.
|
|
8205
8300
|
*/
|
|
8206
8301
|
applyLayoutToSlide(slideIndex: number, layoutPath: string, slides: PptxSlide[]): Promise<PptxSlide>;
|
|
8207
8302
|
}
|
|
8208
8303
|
//#endregion
|
|
8209
|
-
//#region pptx/core/core/
|
|
8210
|
-
|
|
8304
|
+
//#region pptx/core/core/PptxHandlerRuntimeFactory.d.ts
|
|
8305
|
+
/**
|
|
8306
|
+
* Abstract factory contract for creating {@link IPptxHandlerRuntime}
|
|
8307
|
+
* instances.
|
|
8308
|
+
*
|
|
8309
|
+
* Implement this interface to supply a custom runtime (e.g. a
|
|
8310
|
+
* WASM-backed or test-double runtime) to {@link PptxHandlerCore}.
|
|
8311
|
+
*/
|
|
8312
|
+
interface IPptxHandlerRuntimeFactory {
|
|
8313
|
+
/** Instantiate and return a new runtime implementation. */
|
|
8314
|
+
createRuntime(): IPptxHandlerRuntime;
|
|
8315
|
+
}
|
|
8316
|
+
/**
|
|
8317
|
+
* Default factory that produces the standard {@link PptxHandlerRuntime}.
|
|
8318
|
+
*
|
|
8319
|
+
* Used internally by {@link PptxHandlerCore} when no custom factory is
|
|
8320
|
+
* provided.
|
|
8321
|
+
*/
|
|
8322
|
+
declare class PptxHandlerRuntimeFactory implements IPptxHandlerRuntimeFactory {
|
|
8211
8323
|
/**
|
|
8212
|
-
*
|
|
8213
|
-
*
|
|
8214
|
-
*
|
|
8215
|
-
* gallery entry (Shape Styles) so that what they render and what they save
|
|
8216
|
-
* both match what PowerPoint writes: a bare `<p:style>` and an `spPr` with
|
|
8217
|
-
* no fill, outline or effects of its own.
|
|
8324
|
+
* Create and return a new {@link PptxHandlerRuntime} instance.
|
|
8325
|
+
*
|
|
8326
|
+
* @returns A freshly constructed runtime ready for loading a PPTX file.
|
|
8218
8327
|
*/
|
|
8219
|
-
|
|
8328
|
+
createRuntime(): IPptxHandlerRuntime;
|
|
8220
8329
|
}
|
|
8330
|
+
/**
|
|
8331
|
+
* Convenience function that creates a default {@link IPptxHandlerRuntime}
|
|
8332
|
+
* without needing to instantiate the factory class.
|
|
8333
|
+
*
|
|
8334
|
+
* @returns A new {@link PptxHandlerRuntime} instance.
|
|
8335
|
+
*/
|
|
8336
|
+
declare const createDefaultPptxHandlerRuntime: () => IPptxHandlerRuntime;
|
|
8221
8337
|
//#endregion
|
|
8222
8338
|
//#region pptx/core/core/runtime/PptxHandlerRuntimeImplementation.d.ts
|
|
8223
8339
|
declare class PptxHandlerRuntime$1 extends PptxHandlerRuntime$2 {
|
|
@@ -8447,7 +8563,30 @@ declare class PptxHandlerCore {
|
|
|
8447
8563
|
* shape and it renders like PowerPoint's Shape Styles entry and saves as a
|
|
8448
8564
|
* bare `<p:style>` with an empty `spPr`, which is what PowerPoint writes.
|
|
8449
8565
|
*/
|
|
8450
|
-
resolveStyleMatrixReferences(styleXml: XmlObject): ResolvedStyleMatrix;
|
|
8566
|
+
resolveStyleMatrixReferences(styleXml: XmlObject, effectSchemeId?: string): ResolvedStyleMatrix;
|
|
8567
|
+
/**
|
|
8568
|
+
* Design > Variants > Effects: write a built-in effect scheme (the theme's `a:fmtScheme`) into
|
|
8569
|
+
* every theme part. Follow it with {@link reResolveThemeStyleReferences} to redraw the shapes.
|
|
8570
|
+
*/
|
|
8571
|
+
applyThemeEffectScheme(id: string): Promise<PptxThemeFormatScheme | undefined>;
|
|
8572
|
+
/** Write an `a:fmtScheme` element (a real theme variant's) into the theme parts. */
|
|
8573
|
+
applyThemeFormatSchemeXml(fmtSchemeXml: string): Promise<PptxThemeFormatScheme | undefined>;
|
|
8574
|
+
/** The real theme variants the loaded package carries (`themeVariants/` parts), or none. */
|
|
8575
|
+
getThemeVariants(): PptxThemeVariant[];
|
|
8576
|
+
/** The format scheme the deck's primary theme carries now. */
|
|
8577
|
+
getThemeFormatScheme(): PptxThemeFormatScheme | undefined;
|
|
8578
|
+
/**
|
|
8579
|
+
* Resolve every shape's `p:style` references again. With `effectSchemeId` the result is a
|
|
8580
|
+
* preview against that built-in scheme; without it, the scheme now in force.
|
|
8581
|
+
*/
|
|
8582
|
+
reResolveThemeStyleReferences(slides: readonly PptxSlide[], templateElementsBySlideId: Readonly<Record<string, PptxElement[]>>, effectSchemeId?: string): StyleReferenceReResolution;
|
|
8583
|
+
/**
|
|
8584
|
+
* Design > Background Styles: apply preset `index` (1 to 12) to the slides in `scope`. Does not
|
|
8585
|
+
* change the handler (a preview); {@link commitMasterBackgroundStyle} saves a deck-wide pick.
|
|
8586
|
+
*/
|
|
8587
|
+
applyBackgroundStyleToSlides(slides: readonly PptxSlide[], templateElementsBySlideId: Readonly<Record<string, PptxElement[]>>, index: number, scope: BackgroundStyleScope): BackgroundStyleApplication | undefined;
|
|
8588
|
+
/** Write background style `index` onto every slide master so a deck-wide pick is saved. */
|
|
8589
|
+
commitMasterBackgroundStyle(index: number): Promise<boolean>;
|
|
8451
8590
|
/**
|
|
8452
8591
|
* Apply a complete theme in one call (colour scheme + font scheme + optional name).
|
|
8453
8592
|
*
|
|
@@ -10150,5 +10289,5 @@ declare class PptxJsonConverter {
|
|
|
10150
10289
|
*/
|
|
10151
10290
|
declare function applyImportedPptxData(base: PptxData, imported: PptxData): PptxData;
|
|
10152
10291
|
//#endregion
|
|
10153
|
-
export { duplicateLayout as $,
|
|
10154
|
-
//# sourceMappingURL=index-
|
|
10292
|
+
export { duplicateLayout as $, PresentationThemeInput as $i, PptxPresentationSaveBuilder as $n, ooxmlToPresetName as $r, PptxBuilderFactoryContext as $t, SlideProcessor as A, setChartDataPointMarker as Aa, applyDiagramRelationshipIds as Ai, PptxCommentAuthorsXmlFactory as An, SignatureStatus as Ar, IPptxHandlerRuntime as At, generateMediaFilename as B, updateChartDataPoint as Ba, SlideBuilder as Bi, PptxSlideRelationshipRegistry as Bn, PptxSlideReferenceRemap as Br, createAutoNumberSequence as Bt, PptxJsonAssetStats as C, setChartAxisLogScale as Ca, CompatibilityWarningInput as Ci, PptxSlideMediaRelationshipBuilder as Cn, reapplyAlternateContentToTree as Cr, diffSlides as Ct, SvgExportOptions as D, setChartDataPointExplosion as Da, PptxConnectorParser as Di, PptxSlideCommentPartWriter as Dn, SignatureCertificateInfo as Dr, PptxHandlerRuntimeFactory as Dt, isPptxJsonText as E, setChartDataLabels as Ea, IPptxConnectorParser as Ei, IPptxSlideCommentPartWriter as En, ParsedSignature as Er, IPptxHandlerRuntimeFactory as Et, deriveOutputPath as F, setChartSeriesErrorBars as Fa, PptxSlideNotesBuilder as Fi, IPptxSlideCommentsXmlFactory as Fn, EncryptionAlgorithm as Fr, ZipBombError as Ft, DuplicateMasterSuccess as G, ChartGradientStopInput as Ga, ChartSeriesInput as Gi, PptxPresentationSlidesReconciler as Gn, PptxRuntimeDependencyBundle as Gr, IConnectorXmlFactory as Gt, ConversionResult as H, ChartAreaFormatInput as Ha, BackgroundInput as Hi, SlideReferenceRemapInput as Hn, applySections as Hr, PptxElementXmlBuilder as Ht, getDirectory as I, setChartSeriesMarker as Ia, PptxXmlBuilder as Ii, PptxCommentAuthorsXmlFactoryInit as In, EncryptionInfo as Ir, BackgroundStyleApplication as It, insertSlideMaster as J, THEME_PRESETS as Ja, FillInput as Ji, PptxSaveMediaKind as Jn, IPptxAnimationWriteService as Jr, IPptxXmlFactoryProvider as Jt, deleteSlideMaster as K, toChartGradientFill as Ka, ConnectorOptions as Ki, PptxPresentationSlidesReconcilerInput as Kn, PptxRuntimeDependencyFactory as Kr, IMediaGraphicFrameXmlFactory as Kt, normalizePath as L, setChartSeriesTrendline as La, PresentationBuilder as Li, PptxSlideCommentsXmlFactoryInit as Ln, EncryptionOptions as Lr, BackgroundStyleScope as Lt, PptxConverterOptions as M, setChartLegend as Ma, IPptxXmlBuilder as Mi, ICoreXmlElementFactory as Mn, getSignaturePathsToStrip as Mr, PptxHandlerLoadOptions as Mt, PptxMarkdownConverter as N, setChartSeriesChartType as Na, PptxSlideBuilder as Ni, IPptxCommentAuthorsXmlFactory as Nn, parseSignatureXml as Nr, PptxHandlerSaveOptions as Nt, SvgExporter as O, setChartDataPointFill as Oa, PptxConnectorParserContext as Oi, PptxSlideCommentPartWriterInput as On, SignatureDetectionResult as Or, createDefaultPptxHandlerRuntime as Ot, DocumentConverter as P, setChartSeriesColor as Pa, PptxSlideElementsBuilder as Pi, IPptxCommentXmlFactoryProvider as Pn, verifySignatureDigests as Pr, PptxSaveFormat as Pt, deleteLayout as Q, PresentationOptions as Qi, PptxPresentationSaveBuildInput as Qn, PRESET_TO_OOXML as Qr, PictureXmlFactoryInit as Qt, MediaContext as R, setChartTitle as Ra, PresentationBuilderResult as Ri, IPptxSlideRelationshipRegistry as Rn, EncryptionScheme as Rr, StyleReferenceReResolution as Rt, PPTX_JSON_VERSION as S, setChartAxisGridlineStyle as Sa, PptxDocumentPropertiesUpdater as Si, IPptxSlideMediaRelationshipBuilder as Sn, SHAPE_TREE_ELEMENT_TAGS as Sr, diffPresentations as St, decodePptxJsonText as T, setChartCategories as Ta, PptxCompatibilityService as Ti, PptxElementTransformUpdater as Tn, unwrapAlternateContent as Tr, PptxHandlerRuntime as Tt, FileSystemAdapter as U, ChartGroupOptionsInput as Ua, ChartInput as Ui, buildSlideReferenceRemap as Un, parseCustomShows as Ur, PptxElementXmlBuilderOptions as Ut, ConversionOptions as V, updateChartSeriesValues as Va, AnimationInput as Vi, PptxSlideRelationshipRegistryOptions as Vn, applyCustomShows as Vr, nextAutoNumber as Vt, DuplicateMasterResult as W, ChartGradientInput as Wa, ChartOptions as Wi, IPptxPresentationSlidesReconciler as Wn, IPptxRuntimeDependencyFactory as Wr, ConnectorXmlFactoryInit as Wt, DuplicateLayoutResult as X, ImageOptions as Xi, PptxSaveStateBuilder as Xn, OOXML_TO_PRESET_ENTR as Xr, IXmlElementFactory as Xt, renameSlideMaster as Y, GroupOptions as Yi, PptxSaveState as Yn, OOXML_TO_PRESET_EMPH as Yr, ITextShapeXmlFactory as Yt, DuplicateLayoutSuccess as Z, MediaOptions as Zi, IPptxPresentationSaveBuilder as Zn, OOXML_TO_PRESET_EXIT as Zr, MediaGraphicFrameXmlFactoryInit as Zt, decodeJsonValue as _, addChartCategory as _a, PptxSlideLoaderThemeOverride as _i, PptxSlideBackgroundBuilder as _n, isTransitionalNamespaceUri as _r, TemplateData as _t, deserializePptxFromJson as a, TableOptions as aa, IPptxNativeAnimationService as ai, PptxMediaDataParser as an, PptxSaveConstants as ar, LayoutCreationResult as at, PPTX_JSON_FORMAT as b, removeChartSeries as ba, PptxTemplateBackgroundService as bi, PptxSlideNotesPartUpdater as bn, toStrictNamespaceUri as br, PropertyChange as bt, pptxDataFromJsonDocument as c, TextSegmentInput as ca, PptxEditorAnimationService as ci, PptxTableDataParser as cn, IFactory as cr, createLayout as ct, serializePptxToJson as d, ChartAxisEdit as da, PptxXmlLookupService as di, PptxShapeStyleExtractor as dn, parsePresentationSmartTags as dr, findLayoutByType as dt, ShadowInput as ea, resolveOoxmlPresetMapping as ei, TextShapeXmlFactoryInit as en, PptxPresentationSaveBuilderOptions as er, insertLayout as et, PRESENTATION_FIELD_KEYS as f, ChartAxisTitleStyleEdit as fa, PptxSlideLoaderService as fi, PptxShapeStyleExtractorContext as fn, OoxmlConformanceClass as fr, generateLayoutXml as ft, bytesToBase64 as g, PptxChartLegendPosition as ga, PptxSlideLoaderParams as gi, IPptxSlideBackgroundBuilder as gn, isStrictNamespaceUri as gr, mailMerge as gt, base64ToBytes as h, PptxChartAxisType as ha, PptxMediaTimingMap as hi, PptxColorStyleCodecContext as hn, detectStrictConformance as hr, findPlaceholders as ht, PptxJsonFormatError as i, TableInput as ia, PptxSlideTransitionServiceOptions as ii, IPptxMediaDataParser as in, PptxContentTypesSlideMediaBuildInput as ir, MasterLayoutCrudSuccess as it, SlideProcessorOptions as j, setChartGrouping as ja, parseDiagramRelationshipIds as ji, PptxSlideCommentsXmlFactory as jn, detectDigitalSignatures as jr, MAX_ZIP_ENTRY_COUNT as jt, SlideMetadataRenderer as k, setChartDataPointLabel as ka, DiagramRelationshipIds as ki, PptxCommentXmlFactoryProvider as kn, SignatureReference as kr, DEFAULT_MAX_UNCOMPRESSED_BYTES as kt, PptxJsonSerializeOptions as l, TextStyleInput as la, PptxEditorAnimationServiceOptions as li, PptxTableDataParserContext as ln, ResolveChartColor as lr, createLayouts as lt, JsonAssetAccumulator as m, ChartGridlineStyleEdit as ma, PptxMediaTimingEntry as mi, PptxColorStyleCodec as mn, convertXmlToStrict as mr, applyTemplate as mt, PptxJsonConverterOptions as n, StrokeInput as na, IPptxSlideTransitionService as ni, PptxGraphicFrameParser as nn, PptxContentTypesBuilder as nr, MasterLayoutCrudFailure as nt, parsePptxJson as o, TableRowInput as oa, PptxNativeAnimationService as oi, PptxMediaDataParserContext as on, PptxSaveConstantsFactory as or, LayoutDefinition as ot, PRESENTATION_FIELD_NAMES as p, ChartDataPointLabelEdit as pa, IPptxSlideLoaderService as pi, IPptxColorStyleCodec as pn, containsConvertibleStrictNamespaceAttribute as pr, Presentation as pt, duplicateSlideMaster as q, PptxThemePreset as qa, ElementPosition as qi, PptxCommentAuthorDescriptor as qn, PptxRuntimeDependencyFactoryInput as qr, IPictureXmlFactory as qt, applyImportedPptxData as r, TableCellInput as ra, PptxSlideTransitionService as ri, PptxGraphicFrameParserContext as rn, PptxContentTypesCommentBuildInput as rr, MasterLayoutCrudResult as rt, parsePptxJsonDocument as s, TextOptions as sa, IPptxEditorAnimationService as si, IPptxTableDataParser as sn, createPptxSaveConstants as sr, PlaceholderDefinition as st, PptxJsonConverter as t, ShapeOptions as ta, OoxmlPresetMapping as ti, IPptxGraphicFrameParser as tn, IPptxContentTypesBuilder as tr, renameLayout as tt, buildPptxJsonDocument as u, TransitionInput as ua, IPptxXmlLookupService as ui, IPptxShapeStyleExtractor as un, loadThemeVariants as ur, findLayoutByName as ut, encodeJsonValue as v, addChartSeries as va, PptxSlideNotesResult as vi, PptxSlideBackgroundBuilderInput as vn, normalizeNamespaceUri as vr, ElementDiff as vt, PptxJsonDocument as w, setChartAxisTitleStyle as wa, IPptxCompatibilityService as wi, IPptxElementTransformUpdater as wn, selectAlternateContentBranch as wr, PptxHandler as wt, PPTX_JSON_MIME_TYPE as x, setChartAxis as xa, PptxTemplateBackgroundState as xi, PptxSlideNotesPartUpdaterInput as xn, AlternateContentBlock as xr, SlideDiff as xt, PPTX_JSON_FILE_EXTENSION as y, removeChartCategory as ya, IPptxTemplateBackgroundService as yi, IPptxSlideNotesPartUpdater as yn, normalizeStrictXml as yr, PresentationDiff as yt, dataUrlToMediaBytes as z, setChartType as za, buildBlankPresentationArchive as zi, PptxSlideCommentRelationshipInfo as zn, StandardEncryptionInfo as zr, breakAutoNumberRun as zt };
|
|
10293
|
+
//# sourceMappingURL=index-BWHNCVNC.d.ts.map
|